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


mutable struct OfferTermInfo <: SwaggerModel
    Name::Any # spec type: Union{ Nothing, String } # spec name: Name
    EffectiveDate::Any # spec type: Union{ Nothing, DateTime } # spec name: EffectiveDate

    function OfferTermInfo(;Name=nothing, EffectiveDate=nothing)
        o = new()
        validate_property(OfferTermInfo, Symbol("Name"), Name)
        setfield!(o, Symbol("Name"), Name)
        validate_property(OfferTermInfo, Symbol("EffectiveDate"), EffectiveDate)
        setfield!(o, Symbol("EffectiveDate"), EffectiveDate)
        o
    end
end # type OfferTermInfo

const _property_map_OfferTermInfo = Dict{Symbol,Symbol}(Symbol("Name")=>Symbol("Name"), Symbol("EffectiveDate")=>Symbol("EffectiveDate"))
const _property_types_OfferTermInfo = Dict{Symbol,String}(Symbol("Name")=>"String", Symbol("EffectiveDate")=>"DateTime")
Base.propertynames(::Type{ OfferTermInfo }) = collect(keys(_property_map_OfferTermInfo))
Swagger.property_type(::Type{ OfferTermInfo }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_OfferTermInfo[name]))}
Swagger.field_name(::Type{ OfferTermInfo }, property_name::Symbol) =  _property_map_OfferTermInfo[property_name]

const _allowed_OfferTermInfo_Name = ["Recurring Charge", "Monetary Commitment", "Monetary Credit"]

function check_required(o::OfferTermInfo)
    true
end

function validate_property(::Type{ OfferTermInfo }, name::Symbol, val)
    if name === Symbol("Name")
        Swagger.validate_param(name, "OfferTermInfo", :enum, val, _allowed_OfferTermInfo_Name)
    end
end
