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


mutable struct IoK8sApiAutoscalingV2beta2MetricTarget <: SwaggerModel
    averageUtilization::Any # spec type: Union{ Nothing, Int32 } # spec name: averageUtilization
    averageValue::Any # spec type: Union{ Nothing, IoK8sApimachineryPkgApiResourceQuantity } # spec name: averageValue
    type::Any # spec type: Union{ Nothing, String } # spec name: type
    value::Any # spec type: Union{ Nothing, IoK8sApimachineryPkgApiResourceQuantity } # spec name: value

    function IoK8sApiAutoscalingV2beta2MetricTarget(;averageUtilization=nothing, averageValue=nothing, type=nothing, value=nothing)
        o = new()
        validate_property(IoK8sApiAutoscalingV2beta2MetricTarget, Symbol("averageUtilization"), averageUtilization)
        setfield!(o, Symbol("averageUtilization"), averageUtilization)
        validate_property(IoK8sApiAutoscalingV2beta2MetricTarget, Symbol("averageValue"), averageValue)
        setfield!(o, Symbol("averageValue"), averageValue)
        validate_property(IoK8sApiAutoscalingV2beta2MetricTarget, Symbol("type"), type)
        setfield!(o, Symbol("type"), type)
        validate_property(IoK8sApiAutoscalingV2beta2MetricTarget, Symbol("value"), value)
        setfield!(o, Symbol("value"), value)
        o
    end
end # type IoK8sApiAutoscalingV2beta2MetricTarget

const _property_map_IoK8sApiAutoscalingV2beta2MetricTarget = Dict{Symbol,Symbol}(Symbol("averageUtilization")=>Symbol("averageUtilization"), Symbol("averageValue")=>Symbol("averageValue"), Symbol("type")=>Symbol("type"), Symbol("value")=>Symbol("value"))
const _property_types_IoK8sApiAutoscalingV2beta2MetricTarget = Dict{Symbol,String}(Symbol("averageUtilization")=>"Int32", Symbol("averageValue")=>"IoK8sApimachineryPkgApiResourceQuantity", Symbol("type")=>"String", Symbol("value")=>"IoK8sApimachineryPkgApiResourceQuantity")
Base.propertynames(::Type{ IoK8sApiAutoscalingV2beta2MetricTarget }) = collect(keys(_property_map_IoK8sApiAutoscalingV2beta2MetricTarget))
Swagger.property_type(::Type{ IoK8sApiAutoscalingV2beta2MetricTarget }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_IoK8sApiAutoscalingV2beta2MetricTarget[name]))}
Swagger.field_name(::Type{ IoK8sApiAutoscalingV2beta2MetricTarget }, property_name::Symbol) =  _property_map_IoK8sApiAutoscalingV2beta2MetricTarget[property_name]

function check_required(o::IoK8sApiAutoscalingV2beta2MetricTarget)
    (getproperty(o, Symbol("type")) === nothing) && (return false)
    true
end

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