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


@doc raw"""APIVersions lists the versions that are available, to allow clients to discover the API at /api, which is the root path of the legacy v1 API.

    IoK8sApimachineryPkgApisMetaV1APIVersions(;
        apiVersion=nothing,
        kind=nothing,
        serverAddressByClientCIDRs=nothing,
        versions=nothing,
    )

    - apiVersion::String : APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
    - kind::String : Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
    - serverAddressByClientCIDRs::Vector{IoK8sApimachineryPkgApisMetaV1ServerAddressByClientCIDR} : a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.
    - versions::Vector{String} : versions are the api versions that are available.
"""
mutable struct IoK8sApimachineryPkgApisMetaV1APIVersions <: SwaggerModel
    apiVersion::Any # spec type: Union{ Nothing, String } # spec name: apiVersion
    kind::Any # spec type: Union{ Nothing, String } # spec name: kind
    serverAddressByClientCIDRs::Any # spec type: Union{ Nothing, Vector{IoK8sApimachineryPkgApisMetaV1ServerAddressByClientCIDR} } # spec name: serverAddressByClientCIDRs
    versions::Any # spec type: Union{ Nothing, Vector{String} } # spec name: versions

    function IoK8sApimachineryPkgApisMetaV1APIVersions(;apiVersion=nothing, kind=nothing, serverAddressByClientCIDRs=nothing, versions=nothing)
        o = new()
        validate_property(IoK8sApimachineryPkgApisMetaV1APIVersions, Symbol("apiVersion"), apiVersion)
        setfield!(o, Symbol("apiVersion"), apiVersion)
        validate_property(IoK8sApimachineryPkgApisMetaV1APIVersions, Symbol("kind"), kind)
        setfield!(o, Symbol("kind"), kind)
        validate_property(IoK8sApimachineryPkgApisMetaV1APIVersions, Symbol("serverAddressByClientCIDRs"), serverAddressByClientCIDRs)
        setfield!(o, Symbol("serverAddressByClientCIDRs"), serverAddressByClientCIDRs)
        validate_property(IoK8sApimachineryPkgApisMetaV1APIVersions, Symbol("versions"), versions)
        setfield!(o, Symbol("versions"), versions)
        o
    end
end # type IoK8sApimachineryPkgApisMetaV1APIVersions

const _property_map_IoK8sApimachineryPkgApisMetaV1APIVersions = Dict{Symbol,Symbol}(Symbol("apiVersion")=>Symbol("apiVersion"), Symbol("kind")=>Symbol("kind"), Symbol("serverAddressByClientCIDRs")=>Symbol("serverAddressByClientCIDRs"), Symbol("versions")=>Symbol("versions"))
const _property_types_IoK8sApimachineryPkgApisMetaV1APIVersions = Dict{Symbol,String}(Symbol("apiVersion")=>"String", Symbol("kind")=>"String", Symbol("serverAddressByClientCIDRs")=>"Vector{IoK8sApimachineryPkgApisMetaV1ServerAddressByClientCIDR}", Symbol("versions")=>"Vector{String}")
Base.propertynames(::Type{ IoK8sApimachineryPkgApisMetaV1APIVersions }) = collect(keys(_property_map_IoK8sApimachineryPkgApisMetaV1APIVersions))
Swagger.property_type(::Type{ IoK8sApimachineryPkgApisMetaV1APIVersions }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_IoK8sApimachineryPkgApisMetaV1APIVersions[name]))}
Swagger.field_name(::Type{ IoK8sApimachineryPkgApisMetaV1APIVersions }, property_name::Symbol) =  _property_map_IoK8sApimachineryPkgApisMetaV1APIVersions[property_name]

function check_required(o::IoK8sApimachineryPkgApisMetaV1APIVersions)
    (getproperty(o, Symbol("serverAddressByClientCIDRs")) === nothing) && (return false)
    (getproperty(o, Symbol("versions")) === nothing) && (return false)
    true
end

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