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


@doc raw"""PodSecurityPolicySpec defines the policy enforced. Deprecated: use PodSecurityPolicySpec from policy API Group instead.

    IoK8sApiExtensionsV1beta1PodSecurityPolicySpec(;
        allowPrivilegeEscalation=nothing,
        allowedCSIDrivers=nothing,
        allowedCapabilities=nothing,
        allowedFlexVolumes=nothing,
        allowedHostPaths=nothing,
        allowedProcMountTypes=nothing,
        allowedUnsafeSysctls=nothing,
        defaultAddCapabilities=nothing,
        defaultAllowPrivilegeEscalation=nothing,
        forbiddenSysctls=nothing,
        fsGroup=nothing,
        hostIPC=nothing,
        hostNetwork=nothing,
        hostPID=nothing,
        hostPorts=nothing,
        privileged=nothing,
        readOnlyRootFilesystem=nothing,
        requiredDropCapabilities=nothing,
        runAsGroup=nothing,
        runAsUser=nothing,
        runtimeClass=nothing,
        seLinux=nothing,
        supplementalGroups=nothing,
        volumes=nothing,
    )

    - allowPrivilegeEscalation::Bool : allowPrivilegeEscalation determines if a pod can request to allow privilege escalation. If unspecified, defaults to true.
    - allowedCSIDrivers::Vector{IoK8sApiExtensionsV1beta1AllowedCSIDriver} : AllowedCSIDrivers is a whitelist of inline CSI drivers that must be explicitly set to be embedded within a pod spec. An empty value indicates that any CSI driver can be used for inline ephemeral volumes.
    - allowedCapabilities::Vector{String} : allowedCapabilities is a list of capabilities that can be requested to add to the container. Capabilities in this field may be added at the pod author&#39;s discretion. You must not list a capability in both allowedCapabilities and requiredDropCapabilities.
    - allowedFlexVolumes::Vector{IoK8sApiExtensionsV1beta1AllowedFlexVolume} : allowedFlexVolumes is a whitelist of allowed Flexvolumes.  Empty or nil indicates that all Flexvolumes may be used.  This parameter is effective only when the usage of the Flexvolumes is allowed in the \&quot;volumes\&quot; field.
    - allowedHostPaths::Vector{IoK8sApiExtensionsV1beta1AllowedHostPath} : allowedHostPaths is a white list of allowed host paths. Empty indicates that all host paths may be used.
    - allowedProcMountTypes::Vector{String} : AllowedProcMountTypes is a whitelist of allowed ProcMountTypes. Empty or nil indicates that only the DefaultProcMountType may be used. This requires the ProcMountType feature flag to be enabled.
    - allowedUnsafeSysctls::Vector{String} : allowedUnsafeSysctls is a list of explicitly allowed unsafe sysctls, defaults to none. Each entry is either a plain sysctl name or ends in \&quot;*\&quot; in which case it is considered as a prefix of allowed sysctls. Single * means all unsafe sysctls are allowed. Kubelet has to whitelist all allowed unsafe sysctls explicitly to avoid rejection.  Examples: e.g. \&quot;foo/*\&quot; allows \&quot;foo/bar\&quot;, \&quot;foo/baz\&quot;, etc. e.g. \&quot;foo.*\&quot; allows \&quot;foo.bar\&quot;, \&quot;foo.baz\&quot;, etc.
    - defaultAddCapabilities::Vector{String} : defaultAddCapabilities is the default set of capabilities that will be added to the container unless the pod spec specifically drops the capability.  You may not list a capability in both defaultAddCapabilities and requiredDropCapabilities. Capabilities added here are implicitly allowed, and need not be included in the allowedCapabilities list.
    - defaultAllowPrivilegeEscalation::Bool : defaultAllowPrivilegeEscalation controls the default setting for whether a process can gain more privileges than its parent process.
    - forbiddenSysctls::Vector{String} : forbiddenSysctls is a list of explicitly forbidden sysctls, defaults to none. Each entry is either a plain sysctl name or ends in \&quot;*\&quot; in which case it is considered as a prefix of forbidden sysctls. Single * means all sysctls are forbidden.  Examples: e.g. \&quot;foo/*\&quot; forbids \&quot;foo/bar\&quot;, \&quot;foo/baz\&quot;, etc. e.g. \&quot;foo.*\&quot; forbids \&quot;foo.bar\&quot;, \&quot;foo.baz\&quot;, etc.
    - fsGroup::IoK8sApiExtensionsV1beta1FSGroupStrategyOptions : fsGroup is the strategy that will dictate what fs group is used by the SecurityContext.
    - hostIPC::Bool : hostIPC determines if the policy allows the use of HostIPC in the pod spec.
    - hostNetwork::Bool : hostNetwork determines if the policy allows the use of HostNetwork in the pod spec.
    - hostPID::Bool : hostPID determines if the policy allows the use of HostPID in the pod spec.
    - hostPorts::Vector{IoK8sApiExtensionsV1beta1HostPortRange} : hostPorts determines which host port ranges are allowed to be exposed.
    - privileged::Bool : privileged determines if a pod can request to be run as privileged.
    - readOnlyRootFilesystem::Bool : readOnlyRootFilesystem when set to true will force containers to run with a read only root file system.  If the container specifically requests to run with a non-read only root file system the PSP should deny the pod. If set to false the container may run with a read only root file system if it wishes but it will not be forced to.
    - requiredDropCapabilities::Vector{String} : requiredDropCapabilities are the capabilities that will be dropped from the container.  These are required to be dropped and cannot be added.
    - runAsGroup::IoK8sApiExtensionsV1beta1RunAsGroupStrategyOptions : RunAsGroup is the strategy that will dictate the allowable RunAsGroup values that may be set. If this field is omitted, the pod&#39;s RunAsGroup can take any value. This field requires the RunAsGroup feature gate to be enabled.
    - runAsUser::IoK8sApiExtensionsV1beta1RunAsUserStrategyOptions : runAsUser is the strategy that will dictate the allowable RunAsUser values that may be set.
    - runtimeClass::IoK8sApiExtensionsV1beta1RuntimeClassStrategyOptions : runtimeClass is the strategy that will dictate the allowable RuntimeClasses for a pod. If this field is omitted, the pod&#39;s runtimeClassName field is unrestricted. Enforcement of this field depends on the RuntimeClass feature gate being enabled.
    - seLinux::IoK8sApiExtensionsV1beta1SELinuxStrategyOptions : seLinux is the strategy that will dictate the allowable labels that may be set.
    - supplementalGroups::IoK8sApiExtensionsV1beta1SupplementalGroupsStrategyOptions : supplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext.
    - volumes::Vector{String} : volumes is a white list of allowed volume plugins. Empty indicates that no volumes may be used. To allow all volumes you may use &#39;*&#39;.
"""
mutable struct IoK8sApiExtensionsV1beta1PodSecurityPolicySpec <: SwaggerModel
    allowPrivilegeEscalation::Any # spec type: Union{ Nothing, Bool } # spec name: allowPrivilegeEscalation
    allowedCSIDrivers::Any # spec type: Union{ Nothing, Vector{IoK8sApiExtensionsV1beta1AllowedCSIDriver} } # spec name: allowedCSIDrivers
    allowedCapabilities::Any # spec type: Union{ Nothing, Vector{String} } # spec name: allowedCapabilities
    allowedFlexVolumes::Any # spec type: Union{ Nothing, Vector{IoK8sApiExtensionsV1beta1AllowedFlexVolume} } # spec name: allowedFlexVolumes
    allowedHostPaths::Any # spec type: Union{ Nothing, Vector{IoK8sApiExtensionsV1beta1AllowedHostPath} } # spec name: allowedHostPaths
    allowedProcMountTypes::Any # spec type: Union{ Nothing, Vector{String} } # spec name: allowedProcMountTypes
    allowedUnsafeSysctls::Any # spec type: Union{ Nothing, Vector{String} } # spec name: allowedUnsafeSysctls
    defaultAddCapabilities::Any # spec type: Union{ Nothing, Vector{String} } # spec name: defaultAddCapabilities
    defaultAllowPrivilegeEscalation::Any # spec type: Union{ Nothing, Bool } # spec name: defaultAllowPrivilegeEscalation
    forbiddenSysctls::Any # spec type: Union{ Nothing, Vector{String} } # spec name: forbiddenSysctls
    fsGroup::Any # spec type: Union{ Nothing, IoK8sApiExtensionsV1beta1FSGroupStrategyOptions } # spec name: fsGroup
    hostIPC::Any # spec type: Union{ Nothing, Bool } # spec name: hostIPC
    hostNetwork::Any # spec type: Union{ Nothing, Bool } # spec name: hostNetwork
    hostPID::Any # spec type: Union{ Nothing, Bool } # spec name: hostPID
    hostPorts::Any # spec type: Union{ Nothing, Vector{IoK8sApiExtensionsV1beta1HostPortRange} } # spec name: hostPorts
    privileged::Any # spec type: Union{ Nothing, Bool } # spec name: privileged
    readOnlyRootFilesystem::Any # spec type: Union{ Nothing, Bool } # spec name: readOnlyRootFilesystem
    requiredDropCapabilities::Any # spec type: Union{ Nothing, Vector{String} } # spec name: requiredDropCapabilities
    runAsGroup::Any # spec type: Union{ Nothing, IoK8sApiExtensionsV1beta1RunAsGroupStrategyOptions } # spec name: runAsGroup
    runAsUser::Any # spec type: Union{ Nothing, IoK8sApiExtensionsV1beta1RunAsUserStrategyOptions } # spec name: runAsUser
    runtimeClass::Any # spec type: Union{ Nothing, IoK8sApiExtensionsV1beta1RuntimeClassStrategyOptions } # spec name: runtimeClass
    seLinux::Any # spec type: Union{ Nothing, IoK8sApiExtensionsV1beta1SELinuxStrategyOptions } # spec name: seLinux
    supplementalGroups::Any # spec type: Union{ Nothing, IoK8sApiExtensionsV1beta1SupplementalGroupsStrategyOptions } # spec name: supplementalGroups
    volumes::Any # spec type: Union{ Nothing, Vector{String} } # spec name: volumes

    function IoK8sApiExtensionsV1beta1PodSecurityPolicySpec(;allowPrivilegeEscalation=nothing, allowedCSIDrivers=nothing, allowedCapabilities=nothing, allowedFlexVolumes=nothing, allowedHostPaths=nothing, allowedProcMountTypes=nothing, allowedUnsafeSysctls=nothing, defaultAddCapabilities=nothing, defaultAllowPrivilegeEscalation=nothing, forbiddenSysctls=nothing, fsGroup=nothing, hostIPC=nothing, hostNetwork=nothing, hostPID=nothing, hostPorts=nothing, privileged=nothing, readOnlyRootFilesystem=nothing, requiredDropCapabilities=nothing, runAsGroup=nothing, runAsUser=nothing, runtimeClass=nothing, seLinux=nothing, supplementalGroups=nothing, volumes=nothing)
        o = new()
        validate_property(IoK8sApiExtensionsV1beta1PodSecurityPolicySpec, Symbol("allowPrivilegeEscalation"), allowPrivilegeEscalation)
        setfield!(o, Symbol("allowPrivilegeEscalation"), allowPrivilegeEscalation)
        validate_property(IoK8sApiExtensionsV1beta1PodSecurityPolicySpec, Symbol("allowedCSIDrivers"), allowedCSIDrivers)
        setfield!(o, Symbol("allowedCSIDrivers"), allowedCSIDrivers)
        validate_property(IoK8sApiExtensionsV1beta1PodSecurityPolicySpec, Symbol("allowedCapabilities"), allowedCapabilities)
        setfield!(o, Symbol("allowedCapabilities"), allowedCapabilities)
        validate_property(IoK8sApiExtensionsV1beta1PodSecurityPolicySpec, Symbol("allowedFlexVolumes"), allowedFlexVolumes)
        setfield!(o, Symbol("allowedFlexVolumes"), allowedFlexVolumes)
        validate_property(IoK8sApiExtensionsV1beta1PodSecurityPolicySpec, Symbol("allowedHostPaths"), allowedHostPaths)
        setfield!(o, Symbol("allowedHostPaths"), allowedHostPaths)
        validate_property(IoK8sApiExtensionsV1beta1PodSecurityPolicySpec, Symbol("allowedProcMountTypes"), allowedProcMountTypes)
        setfield!(o, Symbol("allowedProcMountTypes"), allowedProcMountTypes)
        validate_property(IoK8sApiExtensionsV1beta1PodSecurityPolicySpec, Symbol("allowedUnsafeSysctls"), allowedUnsafeSysctls)
        setfield!(o, Symbol("allowedUnsafeSysctls"), allowedUnsafeSysctls)
        validate_property(IoK8sApiExtensionsV1beta1PodSecurityPolicySpec, Symbol("defaultAddCapabilities"), defaultAddCapabilities)
        setfield!(o, Symbol("defaultAddCapabilities"), defaultAddCapabilities)
        validate_property(IoK8sApiExtensionsV1beta1PodSecurityPolicySpec, Symbol("defaultAllowPrivilegeEscalation"), defaultAllowPrivilegeEscalation)
        setfield!(o, Symbol("defaultAllowPrivilegeEscalation"), defaultAllowPrivilegeEscalation)
        validate_property(IoK8sApiExtensionsV1beta1PodSecurityPolicySpec, Symbol("forbiddenSysctls"), forbiddenSysctls)
        setfield!(o, Symbol("forbiddenSysctls"), forbiddenSysctls)
        validate_property(IoK8sApiExtensionsV1beta1PodSecurityPolicySpec, Symbol("fsGroup"), fsGroup)
        setfield!(o, Symbol("fsGroup"), fsGroup)
        validate_property(IoK8sApiExtensionsV1beta1PodSecurityPolicySpec, Symbol("hostIPC"), hostIPC)
        setfield!(o, Symbol("hostIPC"), hostIPC)
        validate_property(IoK8sApiExtensionsV1beta1PodSecurityPolicySpec, Symbol("hostNetwork"), hostNetwork)
        setfield!(o, Symbol("hostNetwork"), hostNetwork)
        validate_property(IoK8sApiExtensionsV1beta1PodSecurityPolicySpec, Symbol("hostPID"), hostPID)
        setfield!(o, Symbol("hostPID"), hostPID)
        validate_property(IoK8sApiExtensionsV1beta1PodSecurityPolicySpec, Symbol("hostPorts"), hostPorts)
        setfield!(o, Symbol("hostPorts"), hostPorts)
        validate_property(IoK8sApiExtensionsV1beta1PodSecurityPolicySpec, Symbol("privileged"), privileged)
        setfield!(o, Symbol("privileged"), privileged)
        validate_property(IoK8sApiExtensionsV1beta1PodSecurityPolicySpec, Symbol("readOnlyRootFilesystem"), readOnlyRootFilesystem)
        setfield!(o, Symbol("readOnlyRootFilesystem"), readOnlyRootFilesystem)
        validate_property(IoK8sApiExtensionsV1beta1PodSecurityPolicySpec, Symbol("requiredDropCapabilities"), requiredDropCapabilities)
        setfield!(o, Symbol("requiredDropCapabilities"), requiredDropCapabilities)
        validate_property(IoK8sApiExtensionsV1beta1PodSecurityPolicySpec, Symbol("runAsGroup"), runAsGroup)
        setfield!(o, Symbol("runAsGroup"), runAsGroup)
        validate_property(IoK8sApiExtensionsV1beta1PodSecurityPolicySpec, Symbol("runAsUser"), runAsUser)
        setfield!(o, Symbol("runAsUser"), runAsUser)
        validate_property(IoK8sApiExtensionsV1beta1PodSecurityPolicySpec, Symbol("runtimeClass"), runtimeClass)
        setfield!(o, Symbol("runtimeClass"), runtimeClass)
        validate_property(IoK8sApiExtensionsV1beta1PodSecurityPolicySpec, Symbol("seLinux"), seLinux)
        setfield!(o, Symbol("seLinux"), seLinux)
        validate_property(IoK8sApiExtensionsV1beta1PodSecurityPolicySpec, Symbol("supplementalGroups"), supplementalGroups)
        setfield!(o, Symbol("supplementalGroups"), supplementalGroups)
        validate_property(IoK8sApiExtensionsV1beta1PodSecurityPolicySpec, Symbol("volumes"), volumes)
        setfield!(o, Symbol("volumes"), volumes)
        o
    end
end # type IoK8sApiExtensionsV1beta1PodSecurityPolicySpec

const _property_map_IoK8sApiExtensionsV1beta1PodSecurityPolicySpec = Dict{Symbol,Symbol}(Symbol("allowPrivilegeEscalation")=>Symbol("allowPrivilegeEscalation"), Symbol("allowedCSIDrivers")=>Symbol("allowedCSIDrivers"), Symbol("allowedCapabilities")=>Symbol("allowedCapabilities"), Symbol("allowedFlexVolumes")=>Symbol("allowedFlexVolumes"), Symbol("allowedHostPaths")=>Symbol("allowedHostPaths"), Symbol("allowedProcMountTypes")=>Symbol("allowedProcMountTypes"), Symbol("allowedUnsafeSysctls")=>Symbol("allowedUnsafeSysctls"), Symbol("defaultAddCapabilities")=>Symbol("defaultAddCapabilities"), Symbol("defaultAllowPrivilegeEscalation")=>Symbol("defaultAllowPrivilegeEscalation"), Symbol("forbiddenSysctls")=>Symbol("forbiddenSysctls"), Symbol("fsGroup")=>Symbol("fsGroup"), Symbol("hostIPC")=>Symbol("hostIPC"), Symbol("hostNetwork")=>Symbol("hostNetwork"), Symbol("hostPID")=>Symbol("hostPID"), Symbol("hostPorts")=>Symbol("hostPorts"), Symbol("privileged")=>Symbol("privileged"), Symbol("readOnlyRootFilesystem")=>Symbol("readOnlyRootFilesystem"), Symbol("requiredDropCapabilities")=>Symbol("requiredDropCapabilities"), Symbol("runAsGroup")=>Symbol("runAsGroup"), Symbol("runAsUser")=>Symbol("runAsUser"), Symbol("runtimeClass")=>Symbol("runtimeClass"), Symbol("seLinux")=>Symbol("seLinux"), Symbol("supplementalGroups")=>Symbol("supplementalGroups"), Symbol("volumes")=>Symbol("volumes"))
const _property_types_IoK8sApiExtensionsV1beta1PodSecurityPolicySpec = Dict{Symbol,String}(Symbol("allowPrivilegeEscalation")=>"Bool", Symbol("allowedCSIDrivers")=>"Vector{IoK8sApiExtensionsV1beta1AllowedCSIDriver}", Symbol("allowedCapabilities")=>"Vector{String}", Symbol("allowedFlexVolumes")=>"Vector{IoK8sApiExtensionsV1beta1AllowedFlexVolume}", Symbol("allowedHostPaths")=>"Vector{IoK8sApiExtensionsV1beta1AllowedHostPath}", Symbol("allowedProcMountTypes")=>"Vector{String}", Symbol("allowedUnsafeSysctls")=>"Vector{String}", Symbol("defaultAddCapabilities")=>"Vector{String}", Symbol("defaultAllowPrivilegeEscalation")=>"Bool", Symbol("forbiddenSysctls")=>"Vector{String}", Symbol("fsGroup")=>"IoK8sApiExtensionsV1beta1FSGroupStrategyOptions", Symbol("hostIPC")=>"Bool", Symbol("hostNetwork")=>"Bool", Symbol("hostPID")=>"Bool", Symbol("hostPorts")=>"Vector{IoK8sApiExtensionsV1beta1HostPortRange}", Symbol("privileged")=>"Bool", Symbol("readOnlyRootFilesystem")=>"Bool", Symbol("requiredDropCapabilities")=>"Vector{String}", Symbol("runAsGroup")=>"IoK8sApiExtensionsV1beta1RunAsGroupStrategyOptions", Symbol("runAsUser")=>"IoK8sApiExtensionsV1beta1RunAsUserStrategyOptions", Symbol("runtimeClass")=>"IoK8sApiExtensionsV1beta1RuntimeClassStrategyOptions", Symbol("seLinux")=>"IoK8sApiExtensionsV1beta1SELinuxStrategyOptions", Symbol("supplementalGroups")=>"IoK8sApiExtensionsV1beta1SupplementalGroupsStrategyOptions", Symbol("volumes")=>"Vector{String}")
Base.propertynames(::Type{ IoK8sApiExtensionsV1beta1PodSecurityPolicySpec }) = collect(keys(_property_map_IoK8sApiExtensionsV1beta1PodSecurityPolicySpec))
Swagger.property_type(::Type{ IoK8sApiExtensionsV1beta1PodSecurityPolicySpec }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_IoK8sApiExtensionsV1beta1PodSecurityPolicySpec[name]))}
Swagger.field_name(::Type{ IoK8sApiExtensionsV1beta1PodSecurityPolicySpec }, property_name::Symbol) =  _property_map_IoK8sApiExtensionsV1beta1PodSecurityPolicySpec[property_name]

function check_required(o::IoK8sApiExtensionsV1beta1PodSecurityPolicySpec)
    (getproperty(o, Symbol("fsGroup")) === nothing) && (return false)
    (getproperty(o, Symbol("runAsUser")) === nothing) && (return false)
    (getproperty(o, Symbol("seLinux")) === nothing) && (return false)
    (getproperty(o, Symbol("supplementalGroups")) === nothing) && (return false)
    true
end

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