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



mutable struct IoK8sApiCoreV1WeightedPodAffinityTerm <: SwaggerModel
    podAffinityTerm::Any # spec type: Union{ Nothing, IoK8sApiCoreV1PodAffinityTerm } # spec name: podAffinityTerm
    weight::Any # spec type: Union{ Nothing, Int32 } # spec name: weight

    function IoK8sApiCoreV1WeightedPodAffinityTerm(;podAffinityTerm=nothing, weight=nothing)
        o = new()
        validate_property(IoK8sApiCoreV1WeightedPodAffinityTerm, Symbol("podAffinityTerm"), podAffinityTerm)
        setfield!(o, Symbol("podAffinityTerm"), podAffinityTerm)
        validate_property(IoK8sApiCoreV1WeightedPodAffinityTerm, Symbol("weight"), weight)
        setfield!(o, Symbol("weight"), weight)
        o
    end
end # type IoK8sApiCoreV1WeightedPodAffinityTerm

const _property_map_IoK8sApiCoreV1WeightedPodAffinityTerm = Dict{Symbol,Symbol}(Symbol("podAffinityTerm")=>Symbol("podAffinityTerm"), Symbol("weight")=>Symbol("weight"))
const _property_types_IoK8sApiCoreV1WeightedPodAffinityTerm = Dict{Symbol,String}(Symbol("podAffinityTerm")=>"IoK8sApiCoreV1PodAffinityTerm", Symbol("weight")=>"Int32")
Base.propertynames(::Type{ IoK8sApiCoreV1WeightedPodAffinityTerm }) = collect(keys(_property_map_IoK8sApiCoreV1WeightedPodAffinityTerm))
Swagger.property_type(::Type{ IoK8sApiCoreV1WeightedPodAffinityTerm }, name::Symbol) = Union{Nothing,eval(Meta.parse(_property_types_IoK8sApiCoreV1WeightedPodAffinityTerm[name]))}
Swagger.field_name(::Type{ IoK8sApiCoreV1WeightedPodAffinityTerm }, property_name::Symbol) =  _property_map_IoK8sApiCoreV1WeightedPodAffinityTerm[property_name]

function check_required(o::IoK8sApiCoreV1WeightedPodAffinityTerm)
    (getproperty(o, Symbol("podAffinityTerm")) === nothing) && (return false)
    (getproperty(o, Symbol("weight")) === nothing) && (return false)
    true
end

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