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


mutable struct RoutingPreference <: SwaggerModel
    routingChoice::Any # spec type: Union{ Nothing, String } # spec name: routingChoice
    publishMicrosoftEndpoints::Any # spec type: Union{ Nothing, Bool } # spec name: publishMicrosoftEndpoints
    publishInternetEndpoints::Any # spec type: Union{ Nothing, Bool } # spec name: publishInternetEndpoints

    function RoutingPreference(;routingChoice=nothing, publishMicrosoftEndpoints=nothing, publishInternetEndpoints=nothing)
        o = new()
        validate_property(RoutingPreference, Symbol("routingChoice"), routingChoice)
        setfield!(o, Symbol("routingChoice"), routingChoice)
        validate_property(RoutingPreference, Symbol("publishMicrosoftEndpoints"), publishMicrosoftEndpoints)
        setfield!(o, Symbol("publishMicrosoftEndpoints"), publishMicrosoftEndpoints)
        validate_property(RoutingPreference, Symbol("publishInternetEndpoints"), publishInternetEndpoints)
        setfield!(o, Symbol("publishInternetEndpoints"), publishInternetEndpoints)
        o
    end
end # type RoutingPreference

const _property_map_RoutingPreference = Dict{Symbol,Symbol}(Symbol("routingChoice")=>Symbol("routingChoice"), Symbol("publishMicrosoftEndpoints")=>Symbol("publishMicrosoftEndpoints"), Symbol("publishInternetEndpoints")=>Symbol("publishInternetEndpoints"))
const _property_types_RoutingPreference = Dict{Symbol,String}(Symbol("routingChoice")=>"String", Symbol("publishMicrosoftEndpoints")=>"Bool", Symbol("publishInternetEndpoints")=>"Bool")
Base.propertynames(::Type{ RoutingPreference }) = collect(keys(_property_map_RoutingPreference))
Swagger.property_type(::Type{ RoutingPreference }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_RoutingPreference[name]))}
Swagger.field_name(::Type{ RoutingPreference }, property_name::Symbol) =  _property_map_RoutingPreference[property_name]

const _allowed_RoutingPreference_routingChoice = ["MicrosoftRouting", "InternetRouting"]

function check_required(o::RoutingPreference)
    true
end

function validate_property(::Type{ RoutingPreference }, name::Symbol, val)
    if name === Symbol("routingChoice")
        Swagger.validate_param(name, "RoutingPreference", :enum, val, _allowed_RoutingPreference_routingChoice)
    end
end
