# This file was generated by the Julia Swagger Code Generator
# Do not modify this file directly. Modify the swagger specification instead.


@doc raw"""SecurityContext holds security configuration that will be applied to a container. Some fields are present in both SecurityContext and PodSecurityContext.  When both are set, the values in SecurityContext take precedence.

    IoK8sApiCoreV1SecurityContext(;
        allowPrivilegeEscalation=nothing,
        capabilities=nothing,
        privileged=nothing,
        procMount=nothing,
        readOnlyRootFilesystem=nothing,
        runAsGroup=nothing,
        runAsNonRoot=nothing,
        runAsUser=nothing,
        seLinuxOptions=nothing,
        windowsOptions=nothing,
    )

    - allowPrivilegeEscalation::Bool : AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN
    - capabilities::IoK8sApiCoreV1Capabilities : The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container runtime.
    - privileged::Bool : Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults to false.
    - procMount::String : procMount denotes the type of proc mount to use for the containers. The default is DefaultProcMount which uses the container runtime defaults for readonly paths and masked paths. This requires the ProcMountType feature flag to be enabled.
    - readOnlyRootFilesystem::Bool : Whether this container has a read-only root filesystem. Default is false.
    - runAsGroup::Int64 : The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in PodSecurityContext.  If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
    - runAsNonRoot::Bool : Indicates that the container must run as a non-root user. If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in PodSecurityContext.  If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
    - runAsUser::Int64 : The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext.  If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
    - seLinuxOptions::IoK8sApiCoreV1SELinuxOptions : The SELinux context to be applied to the container. If unspecified, the container runtime will allocate a random SELinux context for each container.  May also be set in PodSecurityContext.  If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
    - windowsOptions::IoK8sApiCoreV1WindowsSecurityContextOptions : The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
"""
mutable struct IoK8sApiCoreV1SecurityContext <: SwaggerModel
    allowPrivilegeEscalation::Any # spec type: Union{ Nothing, Bool } # spec name: allowPrivilegeEscalation
    capabilities::Any # spec type: Union{ Nothing, IoK8sApiCoreV1Capabilities } # spec name: capabilities
    privileged::Any # spec type: Union{ Nothing, Bool } # spec name: privileged
    procMount::Any # spec type: Union{ Nothing, String } # spec name: procMount
    readOnlyRootFilesystem::Any # spec type: Union{ Nothing, Bool } # spec name: readOnlyRootFilesystem
    runAsGroup::Any # spec type: Union{ Nothing, Int64 } # spec name: runAsGroup
    runAsNonRoot::Any # spec type: Union{ Nothing, Bool } # spec name: runAsNonRoot
    runAsUser::Any # spec type: Union{ Nothing, Int64 } # spec name: runAsUser
    seLinuxOptions::Any # spec type: Union{ Nothing, IoK8sApiCoreV1SELinuxOptions } # spec name: seLinuxOptions
    windowsOptions::Any # spec type: Union{ Nothing, IoK8sApiCoreV1WindowsSecurityContextOptions } # spec name: windowsOptions

    function IoK8sApiCoreV1SecurityContext(;allowPrivilegeEscalation=nothing, capabilities=nothing, privileged=nothing, procMount=nothing, readOnlyRootFilesystem=nothing, runAsGroup=nothing, runAsNonRoot=nothing, runAsUser=nothing, seLinuxOptions=nothing, windowsOptions=nothing)
        o = new()
        validate_property(IoK8sApiCoreV1SecurityContext, Symbol("allowPrivilegeEscalation"), allowPrivilegeEscalation)
        setfield!(o, Symbol("allowPrivilegeEscalation"), allowPrivilegeEscalation)
        validate_property(IoK8sApiCoreV1SecurityContext, Symbol("capabilities"), capabilities)
        setfield!(o, Symbol("capabilities"), capabilities)
        validate_property(IoK8sApiCoreV1SecurityContext, Symbol("privileged"), privileged)
        setfield!(o, Symbol("privileged"), privileged)
        validate_property(IoK8sApiCoreV1SecurityContext, Symbol("procMount"), procMount)
        setfield!(o, Symbol("procMount"), procMount)
        validate_property(IoK8sApiCoreV1SecurityContext, Symbol("readOnlyRootFilesystem"), readOnlyRootFilesystem)
        setfield!(o, Symbol("readOnlyRootFilesystem"), readOnlyRootFilesystem)
        validate_property(IoK8sApiCoreV1SecurityContext, Symbol("runAsGroup"), runAsGroup)
        setfield!(o, Symbol("runAsGroup"), runAsGroup)
        validate_property(IoK8sApiCoreV1SecurityContext, Symbol("runAsNonRoot"), runAsNonRoot)
        setfield!(o, Symbol("runAsNonRoot"), runAsNonRoot)
        validate_property(IoK8sApiCoreV1SecurityContext, Symbol("runAsUser"), runAsUser)
        setfield!(o, Symbol("runAsUser"), runAsUser)
        validate_property(IoK8sApiCoreV1SecurityContext, Symbol("seLinuxOptions"), seLinuxOptions)
        setfield!(o, Symbol("seLinuxOptions"), seLinuxOptions)
        validate_property(IoK8sApiCoreV1SecurityContext, Symbol("windowsOptions"), windowsOptions)
        setfield!(o, Symbol("windowsOptions"), windowsOptions)
        o
    end
end # type IoK8sApiCoreV1SecurityContext

const _property_map_IoK8sApiCoreV1SecurityContext = Dict{Symbol,Symbol}(Symbol("allowPrivilegeEscalation")=>Symbol("allowPrivilegeEscalation"), Symbol("capabilities")=>Symbol("capabilities"), Symbol("privileged")=>Symbol("privileged"), Symbol("procMount")=>Symbol("procMount"), Symbol("readOnlyRootFilesystem")=>Symbol("readOnlyRootFilesystem"), Symbol("runAsGroup")=>Symbol("runAsGroup"), Symbol("runAsNonRoot")=>Symbol("runAsNonRoot"), Symbol("runAsUser")=>Symbol("runAsUser"), Symbol("seLinuxOptions")=>Symbol("seLinuxOptions"), Symbol("windowsOptions")=>Symbol("windowsOptions"))
const _property_types_IoK8sApiCoreV1SecurityContext = Dict{Symbol,String}(Symbol("allowPrivilegeEscalation")=>"Bool", Symbol("capabilities")=>"IoK8sApiCoreV1Capabilities", Symbol("privileged")=>"Bool", Symbol("procMount")=>"String", Symbol("readOnlyRootFilesystem")=>"Bool", Symbol("runAsGroup")=>"Int64", Symbol("runAsNonRoot")=>"Bool", Symbol("runAsUser")=>"Int64", Symbol("seLinuxOptions")=>"IoK8sApiCoreV1SELinuxOptions", Symbol("windowsOptions")=>"IoK8sApiCoreV1WindowsSecurityContextOptions")
Base.propertynames(::Type{ IoK8sApiCoreV1SecurityContext }) = collect(keys(_property_map_IoK8sApiCoreV1SecurityContext))
Swagger.property_type(::Type{ IoK8sApiCoreV1SecurityContext }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_IoK8sApiCoreV1SecurityContext[name]))}
Swagger.field_name(::Type{ IoK8sApiCoreV1SecurityContext }, property_name::Symbol) =  _property_map_IoK8sApiCoreV1SecurityContext[property_name]

function check_required(o::IoK8sApiCoreV1SecurityContext)
    true
end

function validate_property(::Type{ IoK8sApiCoreV1SecurityContext }, name::Symbol, val)
end
