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


@doc raw"""EndpointAddress is a tuple that describes single IP address.

    IoK8sApiCoreV1EndpointAddress(;
        hostname=nothing,
        ip=nothing,
        nodeName=nothing,
        targetRef=nothing,
    )

    - hostname::String : The Hostname of this endpoint
    - ip::String : The IP of this endpoint. May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16), or link-local multicast ((224.0.0.0/24). IPv6 is also accepted but not fully supported on all platforms. Also, certain kubernetes components, like kube-proxy, are not IPv6 ready.
    - nodeName::String : Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node.
    - targetRef::IoK8sApiCoreV1ObjectReference : Reference to object providing the endpoint.
"""
mutable struct IoK8sApiCoreV1EndpointAddress <: SwaggerModel
    hostname::Any # spec type: Union{ Nothing, String } # spec name: hostname
    ip::Any # spec type: Union{ Nothing, String } # spec name: ip
    nodeName::Any # spec type: Union{ Nothing, String } # spec name: nodeName
    targetRef::Any # spec type: Union{ Nothing, IoK8sApiCoreV1ObjectReference } # spec name: targetRef

    function IoK8sApiCoreV1EndpointAddress(;hostname=nothing, ip=nothing, nodeName=nothing, targetRef=nothing)
        o = new()
        validate_property(IoK8sApiCoreV1EndpointAddress, Symbol("hostname"), hostname)
        setfield!(o, Symbol("hostname"), hostname)
        validate_property(IoK8sApiCoreV1EndpointAddress, Symbol("ip"), ip)
        setfield!(o, Symbol("ip"), ip)
        validate_property(IoK8sApiCoreV1EndpointAddress, Symbol("nodeName"), nodeName)
        setfield!(o, Symbol("nodeName"), nodeName)
        validate_property(IoK8sApiCoreV1EndpointAddress, Symbol("targetRef"), targetRef)
        setfield!(o, Symbol("targetRef"), targetRef)
        o
    end
end # type IoK8sApiCoreV1EndpointAddress

const _property_map_IoK8sApiCoreV1EndpointAddress = Dict{Symbol,Symbol}(Symbol("hostname")=>Symbol("hostname"), Symbol("ip")=>Symbol("ip"), Symbol("nodeName")=>Symbol("nodeName"), Symbol("targetRef")=>Symbol("targetRef"))
const _property_types_IoK8sApiCoreV1EndpointAddress = Dict{Symbol,String}(Symbol("hostname")=>"String", Symbol("ip")=>"String", Symbol("nodeName")=>"String", Symbol("targetRef")=>"IoK8sApiCoreV1ObjectReference")
Base.propertynames(::Type{ IoK8sApiCoreV1EndpointAddress }) = collect(keys(_property_map_IoK8sApiCoreV1EndpointAddress))
Swagger.property_type(::Type{ IoK8sApiCoreV1EndpointAddress }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_IoK8sApiCoreV1EndpointAddress[name]))}
Swagger.field_name(::Type{ IoK8sApiCoreV1EndpointAddress }, property_name::Symbol) =  _property_map_IoK8sApiCoreV1EndpointAddress[property_name]

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

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