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


@doc raw"""Endpoint represents a single logical \&quot;backend\&quot; implementing a service.

    IoK8sApiDiscoveryV1beta1Endpoint(;
        addresses=nothing,
        conditions=nothing,
        hostname=nothing,
        targetRef=nothing,
        topology=nothing,
    )

    - addresses::Vector{String} : addresses of this endpoint. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100.
    - conditions::IoK8sApiDiscoveryV1beta1EndpointConditions : conditions contains information about the current status of the endpoint.
    - hostname::String : hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must pass DNS Label (RFC 1123) validation.
    - targetRef::IoK8sApiCoreV1ObjectReference : targetRef is a reference to a Kubernetes object that represents this endpoint.
    - topology::Dict{String, String} : topology contains arbitrary topology information associated with the endpoint. These key/value pairs must conform with the label format. https://kubernetes.io/docs/concepts/overview/working-with-objects/labels Topology may include a maximum of 16 key/value pairs. This includes, but is not limited to the following well known keys: * kubernetes.io/hostname: the value indicates the hostname of the node   where the endpoint is located. This should match the corresponding   node label. * topology.kubernetes.io/zone: the value indicates the zone where the   endpoint is located. This should match the corresponding node label. * topology.kubernetes.io/region: the value indicates the region where the   endpoint is located. This should match the corresponding node label.
"""
mutable struct IoK8sApiDiscoveryV1beta1Endpoint <: SwaggerModel
    addresses::Any # spec type: Union{ Nothing, Vector{String} } # spec name: addresses
    conditions::Any # spec type: Union{ Nothing, IoK8sApiDiscoveryV1beta1EndpointConditions } # spec name: conditions
    hostname::Any # spec type: Union{ Nothing, String } # spec name: hostname
    targetRef::Any # spec type: Union{ Nothing, IoK8sApiCoreV1ObjectReference } # spec name: targetRef
    topology::Any # spec type: Union{ Nothing, Dict{String, String} } # spec name: topology

    function IoK8sApiDiscoveryV1beta1Endpoint(;addresses=nothing, conditions=nothing, hostname=nothing, targetRef=nothing, topology=nothing)
        o = new()
        validate_property(IoK8sApiDiscoveryV1beta1Endpoint, Symbol("addresses"), addresses)
        setfield!(o, Symbol("addresses"), addresses)
        validate_property(IoK8sApiDiscoveryV1beta1Endpoint, Symbol("conditions"), conditions)
        setfield!(o, Symbol("conditions"), conditions)
        validate_property(IoK8sApiDiscoveryV1beta1Endpoint, Symbol("hostname"), hostname)
        setfield!(o, Symbol("hostname"), hostname)
        validate_property(IoK8sApiDiscoveryV1beta1Endpoint, Symbol("targetRef"), targetRef)
        setfield!(o, Symbol("targetRef"), targetRef)
        validate_property(IoK8sApiDiscoveryV1beta1Endpoint, Symbol("topology"), topology)
        setfield!(o, Symbol("topology"), topology)
        o
    end
end # type IoK8sApiDiscoveryV1beta1Endpoint

const _property_map_IoK8sApiDiscoveryV1beta1Endpoint = Dict{Symbol,Symbol}(Symbol("addresses")=>Symbol("addresses"), Symbol("conditions")=>Symbol("conditions"), Symbol("hostname")=>Symbol("hostname"), Symbol("targetRef")=>Symbol("targetRef"), Symbol("topology")=>Symbol("topology"))
const _property_types_IoK8sApiDiscoveryV1beta1Endpoint = Dict{Symbol,String}(Symbol("addresses")=>"Vector{String}", Symbol("conditions")=>"IoK8sApiDiscoveryV1beta1EndpointConditions", Symbol("hostname")=>"String", Symbol("targetRef")=>"IoK8sApiCoreV1ObjectReference", Symbol("topology")=>"Dict{String, String}")
Base.propertynames(::Type{ IoK8sApiDiscoveryV1beta1Endpoint }) = collect(keys(_property_map_IoK8sApiDiscoveryV1beta1Endpoint))
Swagger.property_type(::Type{ IoK8sApiDiscoveryV1beta1Endpoint }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_IoK8sApiDiscoveryV1beta1Endpoint[name]))}
Swagger.field_name(::Type{ IoK8sApiDiscoveryV1beta1Endpoint }, property_name::Symbol) =  _property_map_IoK8sApiDiscoveryV1beta1Endpoint[property_name]

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

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