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


@doc raw"""Represents a Persistent Disk resource in Google Compute Engine.  A GCE PD must exist before mounting to a container. The disk must also be in the same GCE project and zone as the kubelet. A GCE PD can only be mounted as read/write once or read-only many times. GCE PDs support ownership management and SELinux relabeling.

    IoK8sApiCoreV1GCEPersistentDiskVolumeSource(;
        fsType=nothing,
        partition=nothing,
        pdName=nothing,
        readOnly=nothing,
    )

    - fsType::String : Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \&quot;ext4\&quot;, \&quot;xfs\&quot;, \&quot;ntfs\&quot;. Implicitly inferred to be \&quot;ext4\&quot; if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
    - partition::Int32 : The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \&quot;1\&quot;. Similarly, the volume partition for /dev/sda is \&quot;0\&quot; (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
    - pdName::String : Unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
    - readOnly::Bool : ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
"""
mutable struct IoK8sApiCoreV1GCEPersistentDiskVolumeSource <: SwaggerModel
    fsType::Any # spec type: Union{ Nothing, String } # spec name: fsType
    partition::Any # spec type: Union{ Nothing, Int32 } # spec name: partition
    pdName::Any # spec type: Union{ Nothing, String } # spec name: pdName
    readOnly::Any # spec type: Union{ Nothing, Bool } # spec name: readOnly

    function IoK8sApiCoreV1GCEPersistentDiskVolumeSource(;fsType=nothing, partition=nothing, pdName=nothing, readOnly=nothing)
        o = new()
        validate_property(IoK8sApiCoreV1GCEPersistentDiskVolumeSource, Symbol("fsType"), fsType)
        setfield!(o, Symbol("fsType"), fsType)
        validate_property(IoK8sApiCoreV1GCEPersistentDiskVolumeSource, Symbol("partition"), partition)
        setfield!(o, Symbol("partition"), partition)
        validate_property(IoK8sApiCoreV1GCEPersistentDiskVolumeSource, Symbol("pdName"), pdName)
        setfield!(o, Symbol("pdName"), pdName)
        validate_property(IoK8sApiCoreV1GCEPersistentDiskVolumeSource, Symbol("readOnly"), readOnly)
        setfield!(o, Symbol("readOnly"), readOnly)
        o
    end
end # type IoK8sApiCoreV1GCEPersistentDiskVolumeSource

const _property_map_IoK8sApiCoreV1GCEPersistentDiskVolumeSource = Dict{Symbol,Symbol}(Symbol("fsType")=>Symbol("fsType"), Symbol("partition")=>Symbol("partition"), Symbol("pdName")=>Symbol("pdName"), Symbol("readOnly")=>Symbol("readOnly"))
const _property_types_IoK8sApiCoreV1GCEPersistentDiskVolumeSource = Dict{Symbol,String}(Symbol("fsType")=>"String", Symbol("partition")=>"Int32", Symbol("pdName")=>"String", Symbol("readOnly")=>"Bool")
Base.propertynames(::Type{ IoK8sApiCoreV1GCEPersistentDiskVolumeSource }) = collect(keys(_property_map_IoK8sApiCoreV1GCEPersistentDiskVolumeSource))
Swagger.property_type(::Type{ IoK8sApiCoreV1GCEPersistentDiskVolumeSource }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_IoK8sApiCoreV1GCEPersistentDiskVolumeSource[name]))}
Swagger.field_name(::Type{ IoK8sApiCoreV1GCEPersistentDiskVolumeSource }, property_name::Symbol) =  _property_map_IoK8sApiCoreV1GCEPersistentDiskVolumeSource[property_name]

function check_required(o::IoK8sApiCoreV1GCEPersistentDiskVolumeSource)
    (getproperty(o, Symbol("pdName")) === nothing) && (return false)
    true
end

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