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


@doc raw"""PodSecurityContext holds pod-level security attributes and common container settings. Some fields are also present in container.securityContext.  Field values of container.securityContext take precedence over field values of PodSecurityContext.

    IoK8sApiCoreV1PodSecurityContext(;
        fsGroup=nothing,
        runAsGroup=nothing,
        runAsNonRoot=nothing,
        runAsUser=nothing,
        seLinuxOptions=nothing,
        supplementalGroups=nothing,
        sysctls=nothing,
        windowsOptions=nothing,
    )

    - fsGroup::Int64 : A special supplemental group that applies to all containers in a pod. Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod:  1. The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR&#39;d with rw-rw----  If unset, the Kubelet will not modify the ownership and permissions of any volume.
    - runAsGroup::Int64 : The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in SecurityContext.  If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.
    - 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 SecurityContext.  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 SecurityContext.  If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.
    - seLinuxOptions::IoK8sApiCoreV1SELinuxOptions : The SELinux context to be applied to all containers. If unspecified, the container runtime will allocate a random SELinux context for each container.  May also be set in SecurityContext.  If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container.
    - supplementalGroups::Vector{Int64} : A list of groups applied to the first process run in each container, in addition to the container&#39;s primary GID.  If unspecified, no groups will be added to any container.
    - sysctls::Vector{IoK8sApiCoreV1Sysctl} : Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) might fail to launch.
    - windowsOptions::IoK8sApiCoreV1WindowsSecurityContextOptions : The Windows specific settings applied to all containers. If unspecified, the options within a container&#39;s SecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
"""
mutable struct IoK8sApiCoreV1PodSecurityContext <: SwaggerModel
    fsGroup::Any # spec type: Union{ Nothing, Int64 } # spec name: fsGroup
    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
    supplementalGroups::Any # spec type: Union{ Nothing, Vector{Int64} } # spec name: supplementalGroups
    sysctls::Any # spec type: Union{ Nothing, Vector{IoK8sApiCoreV1Sysctl} } # spec name: sysctls
    windowsOptions::Any # spec type: Union{ Nothing, IoK8sApiCoreV1WindowsSecurityContextOptions } # spec name: windowsOptions

    function IoK8sApiCoreV1PodSecurityContext(;fsGroup=nothing, runAsGroup=nothing, runAsNonRoot=nothing, runAsUser=nothing, seLinuxOptions=nothing, supplementalGroups=nothing, sysctls=nothing, windowsOptions=nothing)
        o = new()
        validate_property(IoK8sApiCoreV1PodSecurityContext, Symbol("fsGroup"), fsGroup)
        setfield!(o, Symbol("fsGroup"), fsGroup)
        validate_property(IoK8sApiCoreV1PodSecurityContext, Symbol("runAsGroup"), runAsGroup)
        setfield!(o, Symbol("runAsGroup"), runAsGroup)
        validate_property(IoK8sApiCoreV1PodSecurityContext, Symbol("runAsNonRoot"), runAsNonRoot)
        setfield!(o, Symbol("runAsNonRoot"), runAsNonRoot)
        validate_property(IoK8sApiCoreV1PodSecurityContext, Symbol("runAsUser"), runAsUser)
        setfield!(o, Symbol("runAsUser"), runAsUser)
        validate_property(IoK8sApiCoreV1PodSecurityContext, Symbol("seLinuxOptions"), seLinuxOptions)
        setfield!(o, Symbol("seLinuxOptions"), seLinuxOptions)
        validate_property(IoK8sApiCoreV1PodSecurityContext, Symbol("supplementalGroups"), supplementalGroups)
        setfield!(o, Symbol("supplementalGroups"), supplementalGroups)
        validate_property(IoK8sApiCoreV1PodSecurityContext, Symbol("sysctls"), sysctls)
        setfield!(o, Symbol("sysctls"), sysctls)
        validate_property(IoK8sApiCoreV1PodSecurityContext, Symbol("windowsOptions"), windowsOptions)
        setfield!(o, Symbol("windowsOptions"), windowsOptions)
        o
    end
end # type IoK8sApiCoreV1PodSecurityContext

const _property_map_IoK8sApiCoreV1PodSecurityContext = Dict{Symbol,Symbol}(Symbol("fsGroup")=>Symbol("fsGroup"), Symbol("runAsGroup")=>Symbol("runAsGroup"), Symbol("runAsNonRoot")=>Symbol("runAsNonRoot"), Symbol("runAsUser")=>Symbol("runAsUser"), Symbol("seLinuxOptions")=>Symbol("seLinuxOptions"), Symbol("supplementalGroups")=>Symbol("supplementalGroups"), Symbol("sysctls")=>Symbol("sysctls"), Symbol("windowsOptions")=>Symbol("windowsOptions"))
const _property_types_IoK8sApiCoreV1PodSecurityContext = Dict{Symbol,String}(Symbol("fsGroup")=>"Int64", Symbol("runAsGroup")=>"Int64", Symbol("runAsNonRoot")=>"Bool", Symbol("runAsUser")=>"Int64", Symbol("seLinuxOptions")=>"IoK8sApiCoreV1SELinuxOptions", Symbol("supplementalGroups")=>"Vector{Int64}", Symbol("sysctls")=>"Vector{IoK8sApiCoreV1Sysctl}", Symbol("windowsOptions")=>"IoK8sApiCoreV1WindowsSecurityContextOptions")
Base.propertynames(::Type{ IoK8sApiCoreV1PodSecurityContext }) = collect(keys(_property_map_IoK8sApiCoreV1PodSecurityContext))
Swagger.property_type(::Type{ IoK8sApiCoreV1PodSecurityContext }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_IoK8sApiCoreV1PodSecurityContext[name]))}
Swagger.field_name(::Type{ IoK8sApiCoreV1PodSecurityContext }, property_name::Symbol) =  _property_map_IoK8sApiCoreV1PodSecurityContext[property_name]

function check_required(o::IoK8sApiCoreV1PodSecurityContext)
    true
end

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