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



mutable struct SubscriptionPolicies <: SwaggerModel
    locationPlacementId::Any # spec type: Union{ Nothing, String } # spec name: locationPlacementId
    quotaId::Any # spec type: Union{ Nothing, String } # spec name: quotaId
    spendingLimit::Any # spec type: Union{ Nothing, String } # spec name: spendingLimit

    function SubscriptionPolicies(;locationPlacementId=nothing, quotaId=nothing, spendingLimit=nothing)
        o = new()
        validate_property(SubscriptionPolicies, Symbol("locationPlacementId"), locationPlacementId)
        setfield!(o, Symbol("locationPlacementId"), locationPlacementId)
        validate_property(SubscriptionPolicies, Symbol("quotaId"), quotaId)
        setfield!(o, Symbol("quotaId"), quotaId)
        validate_property(SubscriptionPolicies, Symbol("spendingLimit"), spendingLimit)
        setfield!(o, Symbol("spendingLimit"), spendingLimit)
        o
    end
end # type SubscriptionPolicies

const _property_map_SubscriptionPolicies = Dict{Symbol,Symbol}(Symbol("locationPlacementId")=>Symbol("locationPlacementId"), Symbol("quotaId")=>Symbol("quotaId"), Symbol("spendingLimit")=>Symbol("spendingLimit"))
const _property_types_SubscriptionPolicies = Dict{Symbol,String}(Symbol("locationPlacementId")=>"String", Symbol("quotaId")=>"String", Symbol("spendingLimit")=>"String")
Base.propertynames(::Type{ SubscriptionPolicies }) = collect(keys(_property_map_SubscriptionPolicies))
Swagger.property_type(::Type{ SubscriptionPolicies }, name::Symbol) = Union{Nothing,eval(Meta.parse(_property_types_SubscriptionPolicies[name]))}
Swagger.field_name(::Type{ SubscriptionPolicies }, property_name::Symbol) =  _property_map_SubscriptionPolicies[property_name]

const _allowed_SubscriptionPolicies_spendingLimit = ["On", "Off", "CurrentPeriodOff"]

function check_required(o::SubscriptionPolicies)
    true
end

function validate_property(::Type{ SubscriptionPolicies }, name::Symbol, val)
    if name === Symbol("spendingLimit")
        Swagger.validate_param(name, "SubscriptionPolicies", :enum, val, _allowed_SubscriptionPolicies_spendingLimit)
    end
end
