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



mutable struct ApiError <: SwaggerModel
    details::Any # spec type: Union{ Nothing, Vector{ApiErrorBase} } # spec name: details
    innererror::Any # spec type: Union{ Nothing, InnerError } # spec name: innererror
    code::Any # spec type: Union{ Nothing, String } # spec name: code
    target::Any # spec type: Union{ Nothing, String } # spec name: target
    message::Any # spec type: Union{ Nothing, String } # spec name: message

    function ApiError(;details=nothing, innererror=nothing, code=nothing, target=nothing, message=nothing)
        o = new()
        validate_property(ApiError, Symbol("details"), details)
        setfield!(o, Symbol("details"), details)
        validate_property(ApiError, Symbol("innererror"), innererror)
        setfield!(o, Symbol("innererror"), innererror)
        validate_property(ApiError, Symbol("code"), code)
        setfield!(o, Symbol("code"), code)
        validate_property(ApiError, Symbol("target"), target)
        setfield!(o, Symbol("target"), target)
        validate_property(ApiError, Symbol("message"), message)
        setfield!(o, Symbol("message"), message)
        o
    end
end # type ApiError

const _property_map_ApiError = Dict{Symbol,Symbol}(Symbol("details")=>Symbol("details"), Symbol("innererror")=>Symbol("innererror"), Symbol("code")=>Symbol("code"), Symbol("target")=>Symbol("target"), Symbol("message")=>Symbol("message"))
const _property_types_ApiError = Dict{Symbol,String}(Symbol("details")=>"Vector{ApiErrorBase}", Symbol("innererror")=>"InnerError", Symbol("code")=>"String", Symbol("target")=>"String", Symbol("message")=>"String")
Base.propertynames(::Type{ ApiError }) = collect(keys(_property_map_ApiError))
Swagger.property_type(::Type{ ApiError }, name::Symbol) = Union{Nothing,eval(Meta.parse(_property_types_ApiError[name]))}
Swagger.field_name(::Type{ ApiError }, property_name::Symbol) =  _property_map_ApiError[property_name]

function check_required(o::ApiError)
    true
end

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