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


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
