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


mutable struct OnErrorDeployment <: SwaggerModel
    type::Any # spec type: Union{ Nothing, String } # spec name: type
    deploymentName::Any # spec type: Union{ Nothing, String } # spec name: deploymentName

    function OnErrorDeployment(;type=nothing, deploymentName=nothing)
        o = new()
        validate_property(OnErrorDeployment, Symbol("type"), type)
        setfield!(o, Symbol("type"), type)
        validate_property(OnErrorDeployment, Symbol("deploymentName"), deploymentName)
        setfield!(o, Symbol("deploymentName"), deploymentName)
        o
    end
end # type OnErrorDeployment

const _property_map_OnErrorDeployment = Dict{Symbol,Symbol}(Symbol("type")=>Symbol("type"), Symbol("deploymentName")=>Symbol("deploymentName"))
const _property_types_OnErrorDeployment = Dict{Symbol,String}(Symbol("type")=>"String", Symbol("deploymentName")=>"String")
Base.propertynames(::Type{ OnErrorDeployment }) = collect(keys(_property_map_OnErrorDeployment))
Swagger.property_type(::Type{ OnErrorDeployment }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_OnErrorDeployment[name]))}
Swagger.field_name(::Type{ OnErrorDeployment }, property_name::Symbol) =  _property_map_OnErrorDeployment[property_name]

const _allowed_OnErrorDeployment_type = ["LastSuccessful", "SpecificDeployment"]

function check_required(o::OnErrorDeployment)
    true
end

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