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


@doc raw"""Maps a string key to a path within a volume.

    IoK8sApiCoreV1KeyToPath(;
        key=nothing,
        mode=nothing,
        path=nothing,
    )

    - key::String : The key to project.
    - mode::Int32 : Optional: mode bits to use on this file, must be a value between 0 and 0777. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.
    - path::String : The relative path of the file to map the key to. May not be an absolute path. May not contain the path element &#39;..&#39;. May not start with the string &#39;..&#39;.
"""
mutable struct IoK8sApiCoreV1KeyToPath <: SwaggerModel
    key::Any # spec type: Union{ Nothing, String } # spec name: key
    mode::Any # spec type: Union{ Nothing, Int32 } # spec name: mode
    path::Any # spec type: Union{ Nothing, String } # spec name: path

    function IoK8sApiCoreV1KeyToPath(;key=nothing, mode=nothing, path=nothing)
        o = new()
        validate_property(IoK8sApiCoreV1KeyToPath, Symbol("key"), key)
        setfield!(o, Symbol("key"), key)
        validate_property(IoK8sApiCoreV1KeyToPath, Symbol("mode"), mode)
        setfield!(o, Symbol("mode"), mode)
        validate_property(IoK8sApiCoreV1KeyToPath, Symbol("path"), path)
        setfield!(o, Symbol("path"), path)
        o
    end
end # type IoK8sApiCoreV1KeyToPath

const _property_map_IoK8sApiCoreV1KeyToPath = Dict{Symbol,Symbol}(Symbol("key")=>Symbol("key"), Symbol("mode")=>Symbol("mode"), Symbol("path")=>Symbol("path"))
const _property_types_IoK8sApiCoreV1KeyToPath = Dict{Symbol,String}(Symbol("key")=>"String", Symbol("mode")=>"Int32", Symbol("path")=>"String")
Base.propertynames(::Type{ IoK8sApiCoreV1KeyToPath }) = collect(keys(_property_map_IoK8sApiCoreV1KeyToPath))
Swagger.property_type(::Type{ IoK8sApiCoreV1KeyToPath }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_IoK8sApiCoreV1KeyToPath[name]))}
Swagger.field_name(::Type{ IoK8sApiCoreV1KeyToPath }, property_name::Symbol) =  _property_map_IoK8sApiCoreV1KeyToPath[property_name]

function check_required(o::IoK8sApiCoreV1KeyToPath)
    (getproperty(o, Symbol("key")) === nothing) && (return false)
    (getproperty(o, Symbol("path")) === nothing) && (return false)
    true
end

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