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


@doc raw"""CSIDriverSpec is the specification of a CSIDriver.

    IoK8sApiStorageV1beta1CSIDriverSpec(;
        attachRequired=nothing,
        podInfoOnMount=nothing,
        volumeLifecycleModes=nothing,
    )

    - attachRequired::Bool : attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called.
    - podInfoOnMount::Bool : If set to true, podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations. If set to false, pod information will not be passed on mount. Default is false. The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. \&quot;csi.storage.k8s.io/pod.name\&quot;: pod.Name \&quot;csi.storage.k8s.io/pod.namespace\&quot;: pod.Namespace \&quot;csi.storage.k8s.io/pod.uid\&quot;: string(pod.UID) \&quot;csi.storage.k8s.io/ephemeral\&quot;: \&quot;true\&quot; iff the volume is an ephemeral inline volume                                 defined by a CSIVolumeSource, otherwise \&quot;false\&quot;  \&quot;csi.storage.k8s.io/ephemeral\&quot; is a new feature in Kubernetes 1.16. It is only required for drivers which support both the \&quot;Persistent\&quot; and \&quot;Ephemeral\&quot; VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn&#39;t support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver.
    - volumeLifecycleModes::Vector{String} : VolumeLifecycleModes defines what kind of volumes this CSI volume driver supports. The default if the list is empty is \&quot;Persistent\&quot;, which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism. The other mode is \&quot;Ephemeral\&quot;. In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume. For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future.
"""
mutable struct IoK8sApiStorageV1beta1CSIDriverSpec <: SwaggerModel
    attachRequired::Any # spec type: Union{ Nothing, Bool } # spec name: attachRequired
    podInfoOnMount::Any # spec type: Union{ Nothing, Bool } # spec name: podInfoOnMount
    volumeLifecycleModes::Any # spec type: Union{ Nothing, Vector{String} } # spec name: volumeLifecycleModes

    function IoK8sApiStorageV1beta1CSIDriverSpec(;attachRequired=nothing, podInfoOnMount=nothing, volumeLifecycleModes=nothing)
        o = new()
        validate_property(IoK8sApiStorageV1beta1CSIDriverSpec, Symbol("attachRequired"), attachRequired)
        setfield!(o, Symbol("attachRequired"), attachRequired)
        validate_property(IoK8sApiStorageV1beta1CSIDriverSpec, Symbol("podInfoOnMount"), podInfoOnMount)
        setfield!(o, Symbol("podInfoOnMount"), podInfoOnMount)
        validate_property(IoK8sApiStorageV1beta1CSIDriverSpec, Symbol("volumeLifecycleModes"), volumeLifecycleModes)
        setfield!(o, Symbol("volumeLifecycleModes"), volumeLifecycleModes)
        o
    end
end # type IoK8sApiStorageV1beta1CSIDriverSpec

const _property_map_IoK8sApiStorageV1beta1CSIDriverSpec = Dict{Symbol,Symbol}(Symbol("attachRequired")=>Symbol("attachRequired"), Symbol("podInfoOnMount")=>Symbol("podInfoOnMount"), Symbol("volumeLifecycleModes")=>Symbol("volumeLifecycleModes"))
const _property_types_IoK8sApiStorageV1beta1CSIDriverSpec = Dict{Symbol,String}(Symbol("attachRequired")=>"Bool", Symbol("podInfoOnMount")=>"Bool", Symbol("volumeLifecycleModes")=>"Vector{String}")
Base.propertynames(::Type{ IoK8sApiStorageV1beta1CSIDriverSpec }) = collect(keys(_property_map_IoK8sApiStorageV1beta1CSIDriverSpec))
Swagger.property_type(::Type{ IoK8sApiStorageV1beta1CSIDriverSpec }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_IoK8sApiStorageV1beta1CSIDriverSpec[name]))}
Swagger.field_name(::Type{ IoK8sApiStorageV1beta1CSIDriverSpec }, property_name::Symbol) =  _property_map_IoK8sApiStorageV1beta1CSIDriverSpec[property_name]

function check_required(o::IoK8sApiStorageV1beta1CSIDriverSpec)
    true
end

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