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


@doc raw"""EnvVar represents an environment variable present in a Container.

    IoK8sApiCoreV1EnvVar(;
        name=nothing,
        value=nothing,
        valueFrom=nothing,
    )

    - name::String : Name of the environment variable. Must be a C_IDENTIFIER.
    - value::String : Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to \&quot;\&quot;.
    - valueFrom::IoK8sApiCoreV1EnvVarSource : Source for the environment variable&#39;s value. Cannot be used if value is not empty.
"""
mutable struct IoK8sApiCoreV1EnvVar <: SwaggerModel
    name::Any # spec type: Union{ Nothing, String } # spec name: name
    value::Any # spec type: Union{ Nothing, String } # spec name: value
    valueFrom::Any # spec type: Union{ Nothing, IoK8sApiCoreV1EnvVarSource } # spec name: valueFrom

    function IoK8sApiCoreV1EnvVar(;name=nothing, value=nothing, valueFrom=nothing)
        o = new()
        validate_property(IoK8sApiCoreV1EnvVar, Symbol("name"), name)
        setfield!(o, Symbol("name"), name)
        validate_property(IoK8sApiCoreV1EnvVar, Symbol("value"), value)
        setfield!(o, Symbol("value"), value)
        validate_property(IoK8sApiCoreV1EnvVar, Symbol("valueFrom"), valueFrom)
        setfield!(o, Symbol("valueFrom"), valueFrom)
        o
    end
end # type IoK8sApiCoreV1EnvVar

const _property_map_IoK8sApiCoreV1EnvVar = Dict{Symbol,Symbol}(Symbol("name")=>Symbol("name"), Symbol("value")=>Symbol("value"), Symbol("valueFrom")=>Symbol("valueFrom"))
const _property_types_IoK8sApiCoreV1EnvVar = Dict{Symbol,String}(Symbol("name")=>"String", Symbol("value")=>"String", Symbol("valueFrom")=>"IoK8sApiCoreV1EnvVarSource")
Base.propertynames(::Type{ IoK8sApiCoreV1EnvVar }) = collect(keys(_property_map_IoK8sApiCoreV1EnvVar))
Swagger.property_type(::Type{ IoK8sApiCoreV1EnvVar }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_IoK8sApiCoreV1EnvVar[name]))}
Swagger.field_name(::Type{ IoK8sApiCoreV1EnvVar }, property_name::Symbol) =  _property_map_IoK8sApiCoreV1EnvVar[property_name]

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

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