# 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 Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling.

    IoK8sApiCoreV1RBDVolumeSource(;
        fsType=nothing,
        image=nothing,
        keyring=nothing,
        monitors=nothing,
        pool=nothing,
        readOnly=nothing,
        secretRef=nothing,
        user=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#rbd
    - image::String : The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
    - keyring::String : Keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
    - monitors::Vector{String} : A collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
    - pool::String : The rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
    - readOnly::Bool : ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
    - secretRef::IoK8sApiCoreV1LocalObjectReference : SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
    - user::String : The rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
"""
mutable struct IoK8sApiCoreV1RBDVolumeSource <: SwaggerModel
    fsType::Any # spec type: Union{ Nothing, String } # spec name: fsType
    image::Any # spec type: Union{ Nothing, String } # spec name: image
    keyring::Any # spec type: Union{ Nothing, String } # spec name: keyring
    monitors::Any # spec type: Union{ Nothing, Vector{String} } # spec name: monitors
    pool::Any # spec type: Union{ Nothing, String } # spec name: pool
    readOnly::Any # spec type: Union{ Nothing, Bool } # spec name: readOnly
    secretRef::Any # spec type: Union{ Nothing, IoK8sApiCoreV1LocalObjectReference } # spec name: secretRef
    user::Any # spec type: Union{ Nothing, String } # spec name: user

    function IoK8sApiCoreV1RBDVolumeSource(;fsType=nothing, image=nothing, keyring=nothing, monitors=nothing, pool=nothing, readOnly=nothing, secretRef=nothing, user=nothing)
        o = new()
        validate_property(IoK8sApiCoreV1RBDVolumeSource, Symbol("fsType"), fsType)
        setfield!(o, Symbol("fsType"), fsType)
        validate_property(IoK8sApiCoreV1RBDVolumeSource, Symbol("image"), image)
        setfield!(o, Symbol("image"), image)
        validate_property(IoK8sApiCoreV1RBDVolumeSource, Symbol("keyring"), keyring)
        setfield!(o, Symbol("keyring"), keyring)
        validate_property(IoK8sApiCoreV1RBDVolumeSource, Symbol("monitors"), monitors)
        setfield!(o, Symbol("monitors"), monitors)
        validate_property(IoK8sApiCoreV1RBDVolumeSource, Symbol("pool"), pool)
        setfield!(o, Symbol("pool"), pool)
        validate_property(IoK8sApiCoreV1RBDVolumeSource, Symbol("readOnly"), readOnly)
        setfield!(o, Symbol("readOnly"), readOnly)
        validate_property(IoK8sApiCoreV1RBDVolumeSource, Symbol("secretRef"), secretRef)
        setfield!(o, Symbol("secretRef"), secretRef)
        validate_property(IoK8sApiCoreV1RBDVolumeSource, Symbol("user"), user)
        setfield!(o, Symbol("user"), user)
        o
    end
end # type IoK8sApiCoreV1RBDVolumeSource

const _property_map_IoK8sApiCoreV1RBDVolumeSource = Dict{Symbol,Symbol}(Symbol("fsType")=>Symbol("fsType"), Symbol("image")=>Symbol("image"), Symbol("keyring")=>Symbol("keyring"), Symbol("monitors")=>Symbol("monitors"), Symbol("pool")=>Symbol("pool"), Symbol("readOnly")=>Symbol("readOnly"), Symbol("secretRef")=>Symbol("secretRef"), Symbol("user")=>Symbol("user"))
const _property_types_IoK8sApiCoreV1RBDVolumeSource = Dict{Symbol,String}(Symbol("fsType")=>"String", Symbol("image")=>"String", Symbol("keyring")=>"String", Symbol("monitors")=>"Vector{String}", Symbol("pool")=>"String", Symbol("readOnly")=>"Bool", Symbol("secretRef")=>"IoK8sApiCoreV1LocalObjectReference", Symbol("user")=>"String")
Base.propertynames(::Type{ IoK8sApiCoreV1RBDVolumeSource }) = collect(keys(_property_map_IoK8sApiCoreV1RBDVolumeSource))
Swagger.property_type(::Type{ IoK8sApiCoreV1RBDVolumeSource }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_IoK8sApiCoreV1RBDVolumeSource[name]))}
Swagger.field_name(::Type{ IoK8sApiCoreV1RBDVolumeSource }, property_name::Symbol) =  _property_map_IoK8sApiCoreV1RBDVolumeSource[property_name]

function check_required(o::IoK8sApiCoreV1RBDVolumeSource)
    (getproperty(o, Symbol("image")) === nothing) && (return false)
    (getproperty(o, Symbol("monitors")) === nothing) && (return false)
    true
end

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