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


mutable struct IoK8sApiCoreV1TopologySpreadConstraint <: SwaggerModel
    labelSelector::Any # spec type: Union{ Nothing, IoK8sApimachineryPkgApisMetaV1LabelSelector } # spec name: labelSelector
    maxSkew::Any # spec type: Union{ Nothing, Int32 } # spec name: maxSkew
    topologyKey::Any # spec type: Union{ Nothing, String } # spec name: topologyKey
    whenUnsatisfiable::Any # spec type: Union{ Nothing, String } # spec name: whenUnsatisfiable

    function IoK8sApiCoreV1TopologySpreadConstraint(;labelSelector=nothing, maxSkew=nothing, topologyKey=nothing, whenUnsatisfiable=nothing)
        o = new()
        validate_property(IoK8sApiCoreV1TopologySpreadConstraint, Symbol("labelSelector"), labelSelector)
        setfield!(o, Symbol("labelSelector"), labelSelector)
        validate_property(IoK8sApiCoreV1TopologySpreadConstraint, Symbol("maxSkew"), maxSkew)
        setfield!(o, Symbol("maxSkew"), maxSkew)
        validate_property(IoK8sApiCoreV1TopologySpreadConstraint, Symbol("topologyKey"), topologyKey)
        setfield!(o, Symbol("topologyKey"), topologyKey)
        validate_property(IoK8sApiCoreV1TopologySpreadConstraint, Symbol("whenUnsatisfiable"), whenUnsatisfiable)
        setfield!(o, Symbol("whenUnsatisfiable"), whenUnsatisfiable)
        o
    end
end # type IoK8sApiCoreV1TopologySpreadConstraint

const _property_map_IoK8sApiCoreV1TopologySpreadConstraint = Dict{Symbol,Symbol}(Symbol("labelSelector")=>Symbol("labelSelector"), Symbol("maxSkew")=>Symbol("maxSkew"), Symbol("topologyKey")=>Symbol("topologyKey"), Symbol("whenUnsatisfiable")=>Symbol("whenUnsatisfiable"))
const _property_types_IoK8sApiCoreV1TopologySpreadConstraint = Dict{Symbol,String}(Symbol("labelSelector")=>"IoK8sApimachineryPkgApisMetaV1LabelSelector", Symbol("maxSkew")=>"Int32", Symbol("topologyKey")=>"String", Symbol("whenUnsatisfiable")=>"String")
Base.propertynames(::Type{ IoK8sApiCoreV1TopologySpreadConstraint }) = collect(keys(_property_map_IoK8sApiCoreV1TopologySpreadConstraint))
Swagger.property_type(::Type{ IoK8sApiCoreV1TopologySpreadConstraint }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_IoK8sApiCoreV1TopologySpreadConstraint[name]))}
Swagger.field_name(::Type{ IoK8sApiCoreV1TopologySpreadConstraint }, property_name::Symbol) =  _property_map_IoK8sApiCoreV1TopologySpreadConstraint[property_name]

function check_required(o::IoK8sApiCoreV1TopologySpreadConstraint)
    (getproperty(o, Symbol("maxSkew")) === nothing) && (return false)
    (getproperty(o, Symbol("topologyKey")) === nothing) && (return false)
    (getproperty(o, Symbol("whenUnsatisfiable")) === nothing) && (return false)
    true
end

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