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


@doc raw"""PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.

    IoK8sApiPolicyV1beta1PodDisruptionBudgetSpec(;
        maxUnavailable=nothing,
        minAvailable=nothing,
        selector=nothing,
    )

    - maxUnavailable::IoK8sApimachineryPkgUtilIntstrIntOrString : An eviction is allowed if at most \&quot;maxUnavailable\&quot; pods selected by \&quot;selector\&quot; are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with \&quot;minAvailable\&quot;.
    - minAvailable::IoK8sApimachineryPkgUtilIntstrIntOrString : An eviction is allowed if at least \&quot;minAvailable\&quot; pods selected by \&quot;selector\&quot; will still be available after the eviction, i.e. even in the absence of the evicted pod.  So for example you can prevent all voluntary evictions by specifying \&quot;100%\&quot;.
    - selector::IoK8sApimachineryPkgApisMetaV1LabelSelector : Label query over pods whose evictions are managed by the disruption budget.
"""
mutable struct IoK8sApiPolicyV1beta1PodDisruptionBudgetSpec <: SwaggerModel
    maxUnavailable::Any # spec type: Union{ Nothing, IoK8sApimachineryPkgUtilIntstrIntOrString } # spec name: maxUnavailable
    minAvailable::Any # spec type: Union{ Nothing, IoK8sApimachineryPkgUtilIntstrIntOrString } # spec name: minAvailable
    selector::Any # spec type: Union{ Nothing, IoK8sApimachineryPkgApisMetaV1LabelSelector } # spec name: selector

    function IoK8sApiPolicyV1beta1PodDisruptionBudgetSpec(;maxUnavailable=nothing, minAvailable=nothing, selector=nothing)
        o = new()
        validate_property(IoK8sApiPolicyV1beta1PodDisruptionBudgetSpec, Symbol("maxUnavailable"), maxUnavailable)
        setfield!(o, Symbol("maxUnavailable"), maxUnavailable)
        validate_property(IoK8sApiPolicyV1beta1PodDisruptionBudgetSpec, Symbol("minAvailable"), minAvailable)
        setfield!(o, Symbol("minAvailable"), minAvailable)
        validate_property(IoK8sApiPolicyV1beta1PodDisruptionBudgetSpec, Symbol("selector"), selector)
        setfield!(o, Symbol("selector"), selector)
        o
    end
end # type IoK8sApiPolicyV1beta1PodDisruptionBudgetSpec

const _property_map_IoK8sApiPolicyV1beta1PodDisruptionBudgetSpec = Dict{Symbol,Symbol}(Symbol("maxUnavailable")=>Symbol("maxUnavailable"), Symbol("minAvailable")=>Symbol("minAvailable"), Symbol("selector")=>Symbol("selector"))
const _property_types_IoK8sApiPolicyV1beta1PodDisruptionBudgetSpec = Dict{Symbol,String}(Symbol("maxUnavailable")=>"IoK8sApimachineryPkgUtilIntstrIntOrString", Symbol("minAvailable")=>"IoK8sApimachineryPkgUtilIntstrIntOrString", Symbol("selector")=>"IoK8sApimachineryPkgApisMetaV1LabelSelector")
Base.propertynames(::Type{ IoK8sApiPolicyV1beta1PodDisruptionBudgetSpec }) = collect(keys(_property_map_IoK8sApiPolicyV1beta1PodDisruptionBudgetSpec))
Swagger.property_type(::Type{ IoK8sApiPolicyV1beta1PodDisruptionBudgetSpec }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_IoK8sApiPolicyV1beta1PodDisruptionBudgetSpec[name]))}
Swagger.field_name(::Type{ IoK8sApiPolicyV1beta1PodDisruptionBudgetSpec }, property_name::Symbol) =  _property_map_IoK8sApiPolicyV1beta1PodDisruptionBudgetSpec[property_name]

function check_required(o::IoK8sApiPolicyV1beta1PodDisruptionBudgetSpec)
    true
end

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