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


@doc raw"""A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.

    IoK8sApimachineryPkgApisMetaV1LabelSelectorRequirement(;
        key=nothing,
        operator=nothing,
        values=nothing,
    )

    - key::String : key is the label key that the selector applies to.
    - operator::String : operator represents a key&#39;s relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
    - values::Vector{String} : values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
"""
mutable struct IoK8sApimachineryPkgApisMetaV1LabelSelectorRequirement <: 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 IoK8sApimachineryPkgApisMetaV1LabelSelectorRequirement(;key=nothing, operator=nothing, values=nothing)
        o = new()
        validate_property(IoK8sApimachineryPkgApisMetaV1LabelSelectorRequirement, Symbol("key"), key)
        setfield!(o, Symbol("key"), key)
        validate_property(IoK8sApimachineryPkgApisMetaV1LabelSelectorRequirement, Symbol("operator"), operator)
        setfield!(o, Symbol("operator"), operator)
        validate_property(IoK8sApimachineryPkgApisMetaV1LabelSelectorRequirement, Symbol("values"), values)
        setfield!(o, Symbol("values"), values)
        o
    end
end # type IoK8sApimachineryPkgApisMetaV1LabelSelectorRequirement

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

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

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