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


mutable struct DdosSettings <: SwaggerModel
    ddosCustomPolicy::Any # spec type: Union{ Nothing, SubResource } # spec name: ddosCustomPolicy
    protectionCoverage::Any # spec type: Union{ Nothing, String } # spec name: protectionCoverage
    protectedIP::Any # spec type: Union{ Nothing, Bool } # spec name: protectedIP

    function DdosSettings(;ddosCustomPolicy=nothing, protectionCoverage=nothing, protectedIP=nothing)
        o = new()
        validate_property(DdosSettings, Symbol("ddosCustomPolicy"), ddosCustomPolicy)
        setfield!(o, Symbol("ddosCustomPolicy"), ddosCustomPolicy)
        validate_property(DdosSettings, Symbol("protectionCoverage"), protectionCoverage)
        setfield!(o, Symbol("protectionCoverage"), protectionCoverage)
        validate_property(DdosSettings, Symbol("protectedIP"), protectedIP)
        setfield!(o, Symbol("protectedIP"), protectedIP)
        o
    end
end # type DdosSettings

const _property_map_DdosSettings = Dict{Symbol,Symbol}(Symbol("ddosCustomPolicy")=>Symbol("ddosCustomPolicy"), Symbol("protectionCoverage")=>Symbol("protectionCoverage"), Symbol("protectedIP")=>Symbol("protectedIP"))
const _property_types_DdosSettings = Dict{Symbol,String}(Symbol("ddosCustomPolicy")=>"SubResource", Symbol("protectionCoverage")=>"String", Symbol("protectedIP")=>"Bool")
Base.propertynames(::Type{ DdosSettings }) = collect(keys(_property_map_DdosSettings))
Swagger.property_type(::Type{ DdosSettings }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_DdosSettings[name]))}
Swagger.field_name(::Type{ DdosSettings }, property_name::Symbol) =  _property_map_DdosSettings[property_name]

const _allowed_DdosSettings_protectionCoverage = ["Basic", "Standard"]

function check_required(o::DdosSettings)
    true
end

function validate_property(::Type{ DdosSettings }, name::Symbol, val)
    if name === Symbol("protectionCoverage")
        Swagger.validate_param(name, "DdosSettings", :enum, val, _allowed_DdosSettings_protectionCoverage)
    end
end
