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


mutable struct WhatIfPropertyChange <: SwaggerModel
    path::Any # spec type: Union{ Nothing, String } # spec name: path
    propertyChangeType::Any # spec type: Union{ Nothing, String } # spec name: propertyChangeType
    before::Any # spec type: Union{ Nothing, Any } # spec name: before
    after::Any # spec type: Union{ Nothing, Any } # spec name: after
    children::Any # spec type: Union{ Nothing, Vector{WhatIfPropertyChange} } # spec name: children

    function WhatIfPropertyChange(;path=nothing, propertyChangeType=nothing, before=nothing, after=nothing, children=nothing)
        o = new()
        validate_property(WhatIfPropertyChange, Symbol("path"), path)
        setfield!(o, Symbol("path"), path)
        validate_property(WhatIfPropertyChange, Symbol("propertyChangeType"), propertyChangeType)
        setfield!(o, Symbol("propertyChangeType"), propertyChangeType)
        validate_property(WhatIfPropertyChange, Symbol("before"), before)
        setfield!(o, Symbol("before"), before)
        validate_property(WhatIfPropertyChange, Symbol("after"), after)
        setfield!(o, Symbol("after"), after)
        validate_property(WhatIfPropertyChange, Symbol("children"), children)
        setfield!(o, Symbol("children"), children)
        o
    end
end # type WhatIfPropertyChange

const _property_map_WhatIfPropertyChange = Dict{Symbol,Symbol}(Symbol("path")=>Symbol("path"), Symbol("propertyChangeType")=>Symbol("propertyChangeType"), Symbol("before")=>Symbol("before"), Symbol("after")=>Symbol("after"), Symbol("children")=>Symbol("children"))
const _property_types_WhatIfPropertyChange = Dict{Symbol,String}(Symbol("path")=>"String", Symbol("propertyChangeType")=>"String", Symbol("before")=>"Any", Symbol("after")=>"Any", Symbol("children")=>"Vector{WhatIfPropertyChange}")
Base.propertynames(::Type{ WhatIfPropertyChange }) = collect(keys(_property_map_WhatIfPropertyChange))
Swagger.property_type(::Type{ WhatIfPropertyChange }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_WhatIfPropertyChange[name]))}
Swagger.field_name(::Type{ WhatIfPropertyChange }, property_name::Symbol) =  _property_map_WhatIfPropertyChange[property_name]

const _allowed_WhatIfPropertyChange_propertyChangeType = ["Create", "Delete", "Modify", "Array"]

function check_required(o::WhatIfPropertyChange)
    (getproperty(o, Symbol("path")) === nothing) && (return false)
    true
end

function validate_property(::Type{ WhatIfPropertyChange }, name::Symbol, val)
    if name === Symbol("propertyChangeType")
        Swagger.validate_param(name, "WhatIfPropertyChange", :enum, val, _allowed_WhatIfPropertyChange_propertyChangeType)
    end
end
