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


mutable struct ParameterDefinitionsValue <: SwaggerModel
    type::Any # spec type: Union{ Nothing, String } # spec name: type
    allowedValues::Any # spec type: Union{ Nothing, Vector{Any} } # spec name: allowedValues
    defaultValue::Any # spec type: Union{ Nothing, Any } # spec name: defaultValue
    metadata::Any # spec type: Union{ Nothing, Dict{String, Any} } # spec name: metadata

    function ParameterDefinitionsValue(;type=nothing, allowedValues=nothing, defaultValue=nothing, metadata=nothing)
        o = new()
        validate_property(ParameterDefinitionsValue, Symbol("type"), type)
        setfield!(o, Symbol("type"), type)
        validate_property(ParameterDefinitionsValue, Symbol("allowedValues"), allowedValues)
        setfield!(o, Symbol("allowedValues"), allowedValues)
        validate_property(ParameterDefinitionsValue, Symbol("defaultValue"), defaultValue)
        setfield!(o, Symbol("defaultValue"), defaultValue)
        validate_property(ParameterDefinitionsValue, Symbol("metadata"), metadata)
        setfield!(o, Symbol("metadata"), metadata)
        o
    end
end # type ParameterDefinitionsValue

const _property_map_ParameterDefinitionsValue = Dict{Symbol,Symbol}(Symbol("type")=>Symbol("type"), Symbol("allowedValues")=>Symbol("allowedValues"), Symbol("defaultValue")=>Symbol("defaultValue"), Symbol("metadata")=>Symbol("metadata"))
const _property_types_ParameterDefinitionsValue = Dict{Symbol,String}(Symbol("type")=>"String", Symbol("allowedValues")=>"Vector{Any}", Symbol("defaultValue")=>"Any", Symbol("metadata")=>"Dict{String, Any}")
Base.propertynames(::Type{ ParameterDefinitionsValue }) = collect(keys(_property_map_ParameterDefinitionsValue))
Swagger.property_type(::Type{ ParameterDefinitionsValue }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_ParameterDefinitionsValue[name]))}
Swagger.field_name(::Type{ ParameterDefinitionsValue }, property_name::Symbol) =  _property_map_ParameterDefinitionsValue[property_name]

const _allowed_ParameterDefinitionsValue_type = ["String", "Array", "Object", "Boolean", "Integer", "Float", "DateTime"]

function check_required(o::ParameterDefinitionsValue)
    true
end

function validate_property(::Type{ ParameterDefinitionsValue }, name::Symbol, val)
    if name === Symbol("type")
        Swagger.validate_param(name, "ParameterDefinitionsValue", :enum, val, _allowed_ParameterDefinitionsValue_type)
    end
end
