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



mutable struct CheckNameAvailabilityResult <: SwaggerModel
    nameAvailable::Any # spec type: Union{ Nothing, Bool } # spec name: nameAvailable
    reason::Any # spec type: Union{ Nothing, String } # spec name: reason
    message::Any # spec type: Union{ Nothing, String } # spec name: message

    function CheckNameAvailabilityResult(;nameAvailable=nothing, reason=nothing, message=nothing)
        o = new()
        validate_property(CheckNameAvailabilityResult, Symbol("nameAvailable"), nameAvailable)
        setfield!(o, Symbol("nameAvailable"), nameAvailable)
        validate_property(CheckNameAvailabilityResult, Symbol("reason"), reason)
        setfield!(o, Symbol("reason"), reason)
        validate_property(CheckNameAvailabilityResult, Symbol("message"), message)
        setfield!(o, Symbol("message"), message)
        o
    end
end # type CheckNameAvailabilityResult

const _property_map_CheckNameAvailabilityResult = Dict{Symbol,Symbol}(Symbol("nameAvailable")=>Symbol("nameAvailable"), Symbol("reason")=>Symbol("reason"), Symbol("message")=>Symbol("message"))
const _property_types_CheckNameAvailabilityResult = Dict{Symbol,String}(Symbol("nameAvailable")=>"Bool", Symbol("reason")=>"String", Symbol("message")=>"String")
Base.propertynames(::Type{ CheckNameAvailabilityResult }) = collect(keys(_property_map_CheckNameAvailabilityResult))
Swagger.property_type(::Type{ CheckNameAvailabilityResult }, name::Symbol) = Union{Nothing,eval(Meta.parse(_property_types_CheckNameAvailabilityResult[name]))}
Swagger.field_name(::Type{ CheckNameAvailabilityResult }, property_name::Symbol) =  _property_map_CheckNameAvailabilityResult[property_name]

const _allowed_CheckNameAvailabilityResult_reason = ["AccountNameInvalid", "AlreadyExists"]

function check_required(o::CheckNameAvailabilityResult)
    true
end

function validate_property(::Type{ CheckNameAvailabilityResult }, name::Symbol, val)
    if name === Symbol("reason")
        Swagger.validate_param(name, "CheckNameAvailabilityResult", :enum, val, _allowed_CheckNameAvailabilityResult_reason)
    end
end
