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


mutable struct RoutePropertiesFormat2 <: SwaggerModel
    addressPrefix::Any # spec type: Union{ Nothing, String } # spec name: addressPrefix
    nextHopType::Any # spec type: Union{ Nothing, RouteNextHopType2 } # spec name: nextHopType
    nextHopIpAddress::Any # spec type: Union{ Nothing, String } # spec name: nextHopIpAddress
    provisioningState::Any # spec type: Union{ Nothing, ProvisioningState } # spec name: provisioningState

    function RoutePropertiesFormat2(;addressPrefix=nothing, nextHopType=nothing, nextHopIpAddress=nothing, provisioningState=nothing)
        o = new()
        validate_property(RoutePropertiesFormat2, Symbol("addressPrefix"), addressPrefix)
        setfield!(o, Symbol("addressPrefix"), addressPrefix)
        validate_property(RoutePropertiesFormat2, Symbol("nextHopType"), nextHopType)
        setfield!(o, Symbol("nextHopType"), nextHopType)
        validate_property(RoutePropertiesFormat2, Symbol("nextHopIpAddress"), nextHopIpAddress)
        setfield!(o, Symbol("nextHopIpAddress"), nextHopIpAddress)
        validate_property(RoutePropertiesFormat2, Symbol("provisioningState"), provisioningState)
        setfield!(o, Symbol("provisioningState"), provisioningState)
        o
    end
end # type RoutePropertiesFormat2

const _property_map_RoutePropertiesFormat2 = Dict{Symbol,Symbol}(Symbol("addressPrefix")=>Symbol("addressPrefix"), Symbol("nextHopType")=>Symbol("nextHopType"), Symbol("nextHopIpAddress")=>Symbol("nextHopIpAddress"), Symbol("provisioningState")=>Symbol("provisioningState"))
const _property_types_RoutePropertiesFormat2 = Dict{Symbol,String}(Symbol("addressPrefix")=>"String", Symbol("nextHopType")=>"RouteNextHopType2", Symbol("nextHopIpAddress")=>"String", Symbol("provisioningState")=>"ProvisioningState")
Base.propertynames(::Type{ RoutePropertiesFormat2 }) = collect(keys(_property_map_RoutePropertiesFormat2))
Swagger.property_type(::Type{ RoutePropertiesFormat2 }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_RoutePropertiesFormat2[name]))}
Swagger.field_name(::Type{ RoutePropertiesFormat2 }, property_name::Symbol) =  _property_map_RoutePropertiesFormat2[property_name]

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

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