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


@doc raw"""DownwardAPIVolumeFile represents information to create the file containing the pod field

    IoK8sApiCoreV1DownwardAPIVolumeFile(;
        fieldRef=nothing,
        mode=nothing,
        path=nothing,
        resourceFieldRef=nothing,
    )

    - fieldRef::IoK8sApiCoreV1ObjectFieldSelector : Required: Selects a field of the pod: only annotations, labels, name and namespace are supported.
    - 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 : Required: Path is  the relative path name of the file to be created. Must not be absolute or contain the &#39;..&#39; path. Must be utf-8 encoded. The first item of the relative path must not start with &#39;..&#39;
    - resourceFieldRef::IoK8sApiCoreV1ResourceFieldSelector : Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.
"""
mutable struct IoK8sApiCoreV1DownwardAPIVolumeFile <: SwaggerModel
    fieldRef::Any # spec type: Union{ Nothing, IoK8sApiCoreV1ObjectFieldSelector } # spec name: fieldRef
    mode::Any # spec type: Union{ Nothing, Int32 } # spec name: mode
    path::Any # spec type: Union{ Nothing, String } # spec name: path
    resourceFieldRef::Any # spec type: Union{ Nothing, IoK8sApiCoreV1ResourceFieldSelector } # spec name: resourceFieldRef

    function IoK8sApiCoreV1DownwardAPIVolumeFile(;fieldRef=nothing, mode=nothing, path=nothing, resourceFieldRef=nothing)
        o = new()
        validate_property(IoK8sApiCoreV1DownwardAPIVolumeFile, Symbol("fieldRef"), fieldRef)
        setfield!(o, Symbol("fieldRef"), fieldRef)
        validate_property(IoK8sApiCoreV1DownwardAPIVolumeFile, Symbol("mode"), mode)
        setfield!(o, Symbol("mode"), mode)
        validate_property(IoK8sApiCoreV1DownwardAPIVolumeFile, Symbol("path"), path)
        setfield!(o, Symbol("path"), path)
        validate_property(IoK8sApiCoreV1DownwardAPIVolumeFile, Symbol("resourceFieldRef"), resourceFieldRef)
        setfield!(o, Symbol("resourceFieldRef"), resourceFieldRef)
        o
    end
end # type IoK8sApiCoreV1DownwardAPIVolumeFile

const _property_map_IoK8sApiCoreV1DownwardAPIVolumeFile = Dict{Symbol,Symbol}(Symbol("fieldRef")=>Symbol("fieldRef"), Symbol("mode")=>Symbol("mode"), Symbol("path")=>Symbol("path"), Symbol("resourceFieldRef")=>Symbol("resourceFieldRef"))
const _property_types_IoK8sApiCoreV1DownwardAPIVolumeFile = Dict{Symbol,String}(Symbol("fieldRef")=>"IoK8sApiCoreV1ObjectFieldSelector", Symbol("mode")=>"Int32", Symbol("path")=>"String", Symbol("resourceFieldRef")=>"IoK8sApiCoreV1ResourceFieldSelector")
Base.propertynames(::Type{ IoK8sApiCoreV1DownwardAPIVolumeFile }) = collect(keys(_property_map_IoK8sApiCoreV1DownwardAPIVolumeFile))
Swagger.property_type(::Type{ IoK8sApiCoreV1DownwardAPIVolumeFile }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_IoK8sApiCoreV1DownwardAPIVolumeFile[name]))}
Swagger.field_name(::Type{ IoK8sApiCoreV1DownwardAPIVolumeFile }, property_name::Symbol) =  _property_map_IoK8sApiCoreV1DownwardAPIVolumeFile[property_name]

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

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