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


mutable struct IoK8sApiCoreV1NodeSelectorRequirement <: SwaggerModel
    key::Any # spec type: Union{ Nothing, String } # spec name: key
    operator::Any # spec type: Union{ Nothing, String } # spec name: operator
    values::Any # spec type: Union{ Nothing, Vector{String} } # spec name: values

    function IoK8sApiCoreV1NodeSelectorRequirement(;key=nothing, operator=nothing, values=nothing)
        o = new()
        validate_property(IoK8sApiCoreV1NodeSelectorRequirement, Symbol("key"), key)
        setfield!(o, Symbol("key"), key)
        validate_property(IoK8sApiCoreV1NodeSelectorRequirement, Symbol("operator"), operator)
        setfield!(o, Symbol("operator"), operator)
        validate_property(IoK8sApiCoreV1NodeSelectorRequirement, Symbol("values"), values)
        setfield!(o, Symbol("values"), values)
        o
    end
end # type IoK8sApiCoreV1NodeSelectorRequirement

const _property_map_IoK8sApiCoreV1NodeSelectorRequirement = Dict{Symbol,Symbol}(Symbol("key")=>Symbol("key"), Symbol("operator")=>Symbol("operator"), Symbol("values")=>Symbol("values"))
const _property_types_IoK8sApiCoreV1NodeSelectorRequirement = Dict{Symbol,String}(Symbol("key")=>"String", Symbol("operator")=>"String", Symbol("values")=>"Vector{String}")
Base.propertynames(::Type{ IoK8sApiCoreV1NodeSelectorRequirement }) = collect(keys(_property_map_IoK8sApiCoreV1NodeSelectorRequirement))
Swagger.property_type(::Type{ IoK8sApiCoreV1NodeSelectorRequirement }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_IoK8sApiCoreV1NodeSelectorRequirement[name]))}
Swagger.field_name(::Type{ IoK8sApiCoreV1NodeSelectorRequirement }, property_name::Symbol) =  _property_map_IoK8sApiCoreV1NodeSelectorRequirement[property_name]

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

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