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


@doc raw"""RuntimeClassSpec is a specification of a RuntimeClass. It contains parameters that are required to describe the RuntimeClass to the Container Runtime Interface (CRI) implementation, as well as any other components that need to understand how the pod will be run. The RuntimeClassSpec is immutable.

    IoK8sApiNodeV1alpha1RuntimeClassSpec(;
        overhead=nothing,
        runtimeHandler=nothing,
        scheduling=nothing,
    )

    - overhead::IoK8sApiNodeV1alpha1Overhead : Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. For more details, see https://git.k8s.io/enhancements/keps/sig-node/20190226-pod-overhead.md This field is alpha-level as of Kubernetes v1.15, and is only honored by servers that enable the PodOverhead feature.
    - runtimeHandler::String : RuntimeHandler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. The possible values are specific to the node &amp; CRI configuration.  It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called \&quot;runc\&quot; might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The RuntimeHandler must conform to the DNS Label (RFC 1123) requirements and is immutable.
    - scheduling::IoK8sApiNodeV1alpha1Scheduling : Scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it. If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes.
"""
mutable struct IoK8sApiNodeV1alpha1RuntimeClassSpec <: SwaggerModel
    overhead::Any # spec type: Union{ Nothing, IoK8sApiNodeV1alpha1Overhead } # spec name: overhead
    runtimeHandler::Any # spec type: Union{ Nothing, String } # spec name: runtimeHandler
    scheduling::Any # spec type: Union{ Nothing, IoK8sApiNodeV1alpha1Scheduling } # spec name: scheduling

    function IoK8sApiNodeV1alpha1RuntimeClassSpec(;overhead=nothing, runtimeHandler=nothing, scheduling=nothing)
        o = new()
        validate_property(IoK8sApiNodeV1alpha1RuntimeClassSpec, Symbol("overhead"), overhead)
        setfield!(o, Symbol("overhead"), overhead)
        validate_property(IoK8sApiNodeV1alpha1RuntimeClassSpec, Symbol("runtimeHandler"), runtimeHandler)
        setfield!(o, Symbol("runtimeHandler"), runtimeHandler)
        validate_property(IoK8sApiNodeV1alpha1RuntimeClassSpec, Symbol("scheduling"), scheduling)
        setfield!(o, Symbol("scheduling"), scheduling)
        o
    end
end # type IoK8sApiNodeV1alpha1RuntimeClassSpec

const _property_map_IoK8sApiNodeV1alpha1RuntimeClassSpec = Dict{Symbol,Symbol}(Symbol("overhead")=>Symbol("overhead"), Symbol("runtimeHandler")=>Symbol("runtimeHandler"), Symbol("scheduling")=>Symbol("scheduling"))
const _property_types_IoK8sApiNodeV1alpha1RuntimeClassSpec = Dict{Symbol,String}(Symbol("overhead")=>"IoK8sApiNodeV1alpha1Overhead", Symbol("runtimeHandler")=>"String", Symbol("scheduling")=>"IoK8sApiNodeV1alpha1Scheduling")
Base.propertynames(::Type{ IoK8sApiNodeV1alpha1RuntimeClassSpec }) = collect(keys(_property_map_IoK8sApiNodeV1alpha1RuntimeClassSpec))
Swagger.property_type(::Type{ IoK8sApiNodeV1alpha1RuntimeClassSpec }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_IoK8sApiNodeV1alpha1RuntimeClassSpec[name]))}
Swagger.field_name(::Type{ IoK8sApiNodeV1alpha1RuntimeClassSpec }, property_name::Symbol) =  _property_map_IoK8sApiNodeV1alpha1RuntimeClassSpec[property_name]

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

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