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


@doc raw"""ExternalMetricStatus indicates the current value of a global metric not associated with any Kubernetes object.

    IoK8sApiAutoscalingV2beta1ExternalMetricStatus(;
        currentAverageValue=nothing,
        currentValue=nothing,
        metricName=nothing,
        metricSelector=nothing,
    )

    - currentAverageValue::IoK8sApimachineryPkgApiResourceQuantity : currentAverageValue is the current value of metric averaged over autoscaled pods.
    - currentValue::IoK8sApimachineryPkgApiResourceQuantity : currentValue is the current value of the metric (as a quantity)
    - metricName::String : metricName is the name of a metric used for autoscaling in metric system.
    - metricSelector::IoK8sApimachineryPkgApisMetaV1LabelSelector : metricSelector is used to identify a specific time series within a given metric.
"""
mutable struct IoK8sApiAutoscalingV2beta1ExternalMetricStatus <: SwaggerModel
    currentAverageValue::Any # spec type: Union{ Nothing, IoK8sApimachineryPkgApiResourceQuantity } # spec name: currentAverageValue
    currentValue::Any # spec type: Union{ Nothing, IoK8sApimachineryPkgApiResourceQuantity } # spec name: currentValue
    metricName::Any # spec type: Union{ Nothing, String } # spec name: metricName
    metricSelector::Any # spec type: Union{ Nothing, IoK8sApimachineryPkgApisMetaV1LabelSelector } # spec name: metricSelector

    function IoK8sApiAutoscalingV2beta1ExternalMetricStatus(;currentAverageValue=nothing, currentValue=nothing, metricName=nothing, metricSelector=nothing)
        o = new()
        validate_property(IoK8sApiAutoscalingV2beta1ExternalMetricStatus, Symbol("currentAverageValue"), currentAverageValue)
        setfield!(o, Symbol("currentAverageValue"), currentAverageValue)
        validate_property(IoK8sApiAutoscalingV2beta1ExternalMetricStatus, Symbol("currentValue"), currentValue)
        setfield!(o, Symbol("currentValue"), currentValue)
        validate_property(IoK8sApiAutoscalingV2beta1ExternalMetricStatus, Symbol("metricName"), metricName)
        setfield!(o, Symbol("metricName"), metricName)
        validate_property(IoK8sApiAutoscalingV2beta1ExternalMetricStatus, Symbol("metricSelector"), metricSelector)
        setfield!(o, Symbol("metricSelector"), metricSelector)
        o
    end
end # type IoK8sApiAutoscalingV2beta1ExternalMetricStatus

const _property_map_IoK8sApiAutoscalingV2beta1ExternalMetricStatus = Dict{Symbol,Symbol}(Symbol("currentAverageValue")=>Symbol("currentAverageValue"), Symbol("currentValue")=>Symbol("currentValue"), Symbol("metricName")=>Symbol("metricName"), Symbol("metricSelector")=>Symbol("metricSelector"))
const _property_types_IoK8sApiAutoscalingV2beta1ExternalMetricStatus = Dict{Symbol,String}(Symbol("currentAverageValue")=>"IoK8sApimachineryPkgApiResourceQuantity", Symbol("currentValue")=>"IoK8sApimachineryPkgApiResourceQuantity", Symbol("metricName")=>"String", Symbol("metricSelector")=>"IoK8sApimachineryPkgApisMetaV1LabelSelector")
Base.propertynames(::Type{ IoK8sApiAutoscalingV2beta1ExternalMetricStatus }) = collect(keys(_property_map_IoK8sApiAutoscalingV2beta1ExternalMetricStatus))
Swagger.property_type(::Type{ IoK8sApiAutoscalingV2beta1ExternalMetricStatus }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_IoK8sApiAutoscalingV2beta1ExternalMetricStatus[name]))}
Swagger.field_name(::Type{ IoK8sApiAutoscalingV2beta1ExternalMetricStatus }, property_name::Symbol) =  _property_map_IoK8sApiAutoscalingV2beta1ExternalMetricStatus[property_name]

function check_required(o::IoK8sApiAutoscalingV2beta1ExternalMetricStatus)
    (getproperty(o, Symbol("currentValue")) === nothing) && (return false)
    (getproperty(o, Symbol("metricName")) === nothing) && (return false)
    true
end

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