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


mutable struct IoK8sApiAutoscalingV2beta1HorizontalPodAutoscalerSpec <: SwaggerModel
    maxReplicas::Any # spec type: Union{ Nothing, Int32 } # spec name: maxReplicas
    metrics::Any # spec type: Union{ Nothing, Vector{IoK8sApiAutoscalingV2beta1MetricSpec} } # spec name: metrics
    minReplicas::Any # spec type: Union{ Nothing, Int32 } # spec name: minReplicas
    scaleTargetRef::Any # spec type: Union{ Nothing, IoK8sApiAutoscalingV2beta1CrossVersionObjectReference } # spec name: scaleTargetRef

    function IoK8sApiAutoscalingV2beta1HorizontalPodAutoscalerSpec(;maxReplicas=nothing, metrics=nothing, minReplicas=nothing, scaleTargetRef=nothing)
        o = new()
        validate_property(IoK8sApiAutoscalingV2beta1HorizontalPodAutoscalerSpec, Symbol("maxReplicas"), maxReplicas)
        setfield!(o, Symbol("maxReplicas"), maxReplicas)
        validate_property(IoK8sApiAutoscalingV2beta1HorizontalPodAutoscalerSpec, Symbol("metrics"), metrics)
        setfield!(o, Symbol("metrics"), metrics)
        validate_property(IoK8sApiAutoscalingV2beta1HorizontalPodAutoscalerSpec, Symbol("minReplicas"), minReplicas)
        setfield!(o, Symbol("minReplicas"), minReplicas)
        validate_property(IoK8sApiAutoscalingV2beta1HorizontalPodAutoscalerSpec, Symbol("scaleTargetRef"), scaleTargetRef)
        setfield!(o, Symbol("scaleTargetRef"), scaleTargetRef)
        o
    end
end # type IoK8sApiAutoscalingV2beta1HorizontalPodAutoscalerSpec

const _property_map_IoK8sApiAutoscalingV2beta1HorizontalPodAutoscalerSpec = Dict{Symbol,Symbol}(Symbol("maxReplicas")=>Symbol("maxReplicas"), Symbol("metrics")=>Symbol("metrics"), Symbol("minReplicas")=>Symbol("minReplicas"), Symbol("scaleTargetRef")=>Symbol("scaleTargetRef"))
const _property_types_IoK8sApiAutoscalingV2beta1HorizontalPodAutoscalerSpec = Dict{Symbol,String}(Symbol("maxReplicas")=>"Int32", Symbol("metrics")=>"Vector{IoK8sApiAutoscalingV2beta1MetricSpec}", Symbol("minReplicas")=>"Int32", Symbol("scaleTargetRef")=>"IoK8sApiAutoscalingV2beta1CrossVersionObjectReference")
Base.propertynames(::Type{ IoK8sApiAutoscalingV2beta1HorizontalPodAutoscalerSpec }) = collect(keys(_property_map_IoK8sApiAutoscalingV2beta1HorizontalPodAutoscalerSpec))
Swagger.property_type(::Type{ IoK8sApiAutoscalingV2beta1HorizontalPodAutoscalerSpec }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_IoK8sApiAutoscalingV2beta1HorizontalPodAutoscalerSpec[name]))}
Swagger.field_name(::Type{ IoK8sApiAutoscalingV2beta1HorizontalPodAutoscalerSpec }, property_name::Symbol) =  _property_map_IoK8sApiAutoscalingV2beta1HorizontalPodAutoscalerSpec[property_name]

function check_required(o::IoK8sApiAutoscalingV2beta1HorizontalPodAutoscalerSpec)
    (getproperty(o, Symbol("maxReplicas")) === nothing) && (return false)
    (getproperty(o, Symbol("scaleTargetRef")) === nothing) && (return false)
    true
end

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