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


mutable struct IoK8sApiPolicyV1beta1HostPortRange <: SwaggerModel
    max::Any # spec type: Union{ Nothing, Int32 } # spec name: max
    min::Any # spec type: Union{ Nothing, Int32 } # spec name: min

    function IoK8sApiPolicyV1beta1HostPortRange(;max=nothing, min=nothing)
        o = new()
        validate_property(IoK8sApiPolicyV1beta1HostPortRange, Symbol("max"), max)
        setfield!(o, Symbol("max"), max)
        validate_property(IoK8sApiPolicyV1beta1HostPortRange, Symbol("min"), min)
        setfield!(o, Symbol("min"), min)
        o
    end
end # type IoK8sApiPolicyV1beta1HostPortRange

const _property_map_IoK8sApiPolicyV1beta1HostPortRange = Dict{Symbol,Symbol}(Symbol("max")=>Symbol("max"), Symbol("min")=>Symbol("min"))
const _property_types_IoK8sApiPolicyV1beta1HostPortRange = Dict{Symbol,String}(Symbol("max")=>"Int32", Symbol("min")=>"Int32")
Base.propertynames(::Type{ IoK8sApiPolicyV1beta1HostPortRange }) = collect(keys(_property_map_IoK8sApiPolicyV1beta1HostPortRange))
Swagger.property_type(::Type{ IoK8sApiPolicyV1beta1HostPortRange }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_IoK8sApiPolicyV1beta1HostPortRange[name]))}
Swagger.field_name(::Type{ IoK8sApiPolicyV1beta1HostPortRange }, property_name::Symbol) =  _property_map_IoK8sApiPolicyV1beta1HostPortRange[property_name]

function check_required(o::IoK8sApiPolicyV1beta1HostPortRange)
    (getproperty(o, Symbol("max")) === nothing) && (return false)
    (getproperty(o, Symbol("min")) === nothing) && (return false)
    true
end

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