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


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

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

const _property_map_PatchSettings = Dict{Symbol,Symbol}(Symbol("patchMode")=>Symbol("patchMode"))
const _property_types_PatchSettings = Dict{Symbol,String}(Symbol("patchMode")=>"String")
Base.propertynames(::Type{ PatchSettings }) = collect(keys(_property_map_PatchSettings))
Swagger.property_type(::Type{ PatchSettings }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_PatchSettings[name]))}
Swagger.field_name(::Type{ PatchSettings }, property_name::Symbol) =  _property_map_PatchSettings[property_name]

const _allowed_PatchSettings_patchMode = ["Manual", "AutomaticByOS", "AutomaticByPlatform"]

function check_required(o::PatchSettings)
    true
end

function validate_property(::Type{ PatchSettings }, name::Symbol, val)
    if name === Symbol("patchMode")
        Swagger.validate_param(name, "PatchSettings", :enum, val, _allowed_PatchSettings_patchMode)
    end
end
