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


@doc raw"""Adapts a ConfigMap into a volume.  The contents of the target ConfigMap&#39;s Data field will be presented in a volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. ConfigMap volumes support ownership management and SELinux relabeling.

    IoK8sApiCoreV1ConfigMapVolumeSource(;
        defaultMode=nothing,
        items=nothing,
        name=nothing,
        optional=nothing,
    )

    - defaultMode::Int32 : Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
    - items::Vector{IoK8sApiCoreV1KeyToPath} : If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the &#39;..&#39; path or start with &#39;..&#39;.
    - name::String : Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
    - optional::Bool : Specify whether the ConfigMap or its keys must be defined
"""
mutable struct IoK8sApiCoreV1ConfigMapVolumeSource <: SwaggerModel
    defaultMode::Any # spec type: Union{ Nothing, Int32 } # spec name: defaultMode
    items::Any # spec type: Union{ Nothing, Vector{IoK8sApiCoreV1KeyToPath} } # spec name: items
    name::Any # spec type: Union{ Nothing, String } # spec name: name
    optional::Any # spec type: Union{ Nothing, Bool } # spec name: optional

    function IoK8sApiCoreV1ConfigMapVolumeSource(;defaultMode=nothing, items=nothing, name=nothing, optional=nothing)
        o = new()
        validate_property(IoK8sApiCoreV1ConfigMapVolumeSource, Symbol("defaultMode"), defaultMode)
        setfield!(o, Symbol("defaultMode"), defaultMode)
        validate_property(IoK8sApiCoreV1ConfigMapVolumeSource, Symbol("items"), items)
        setfield!(o, Symbol("items"), items)
        validate_property(IoK8sApiCoreV1ConfigMapVolumeSource, Symbol("name"), name)
        setfield!(o, Symbol("name"), name)
        validate_property(IoK8sApiCoreV1ConfigMapVolumeSource, Symbol("optional"), optional)
        setfield!(o, Symbol("optional"), optional)
        o
    end
end # type IoK8sApiCoreV1ConfigMapVolumeSource

const _property_map_IoK8sApiCoreV1ConfigMapVolumeSource = Dict{Symbol,Symbol}(Symbol("defaultMode")=>Symbol("defaultMode"), Symbol("items")=>Symbol("items"), Symbol("name")=>Symbol("name"), Symbol("optional")=>Symbol("optional"))
const _property_types_IoK8sApiCoreV1ConfigMapVolumeSource = Dict{Symbol,String}(Symbol("defaultMode")=>"Int32", Symbol("items")=>"Vector{IoK8sApiCoreV1KeyToPath}", Symbol("name")=>"String", Symbol("optional")=>"Bool")
Base.propertynames(::Type{ IoK8sApiCoreV1ConfigMapVolumeSource }) = collect(keys(_property_map_IoK8sApiCoreV1ConfigMapVolumeSource))
Swagger.property_type(::Type{ IoK8sApiCoreV1ConfigMapVolumeSource }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_IoK8sApiCoreV1ConfigMapVolumeSource[name]))}
Swagger.field_name(::Type{ IoK8sApiCoreV1ConfigMapVolumeSource }, property_name::Symbol) =  _property_map_IoK8sApiCoreV1ConfigMapVolumeSource[property_name]

function check_required(o::IoK8sApiCoreV1ConfigMapVolumeSource)
    true
end

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