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


mutable struct PolicySetDefinitionProperties <: SwaggerModel
    policyType::Any # spec type: Union{ Nothing, String } # spec name: policyType
    displayName::Any # spec type: Union{ Nothing, String } # spec name: displayName
    description::Any # spec type: Union{ Nothing, String } # spec name: description
    metadata::Any # spec type: Union{ Nothing, Any } # spec name: metadata
    parameters::Any # spec type: Union{ Nothing, ParameterDefinitions } # spec name: parameters
    policyDefinitions::Any # spec type: Union{ Nothing, Vector{PolicyDefinitionReference} } # spec name: policyDefinitions
    policyDefinitionGroups::Any # spec type: Union{ Nothing, Vector{PolicyDefinitionGroup} } # spec name: policyDefinitionGroups

    function PolicySetDefinitionProperties(;policyType=nothing, displayName=nothing, description=nothing, metadata=nothing, parameters=nothing, policyDefinitions=nothing, policyDefinitionGroups=nothing)
        o = new()
        validate_property(PolicySetDefinitionProperties, Symbol("policyType"), policyType)
        setfield!(o, Symbol("policyType"), policyType)
        validate_property(PolicySetDefinitionProperties, Symbol("displayName"), displayName)
        setfield!(o, Symbol("displayName"), displayName)
        validate_property(PolicySetDefinitionProperties, Symbol("description"), description)
        setfield!(o, Symbol("description"), description)
        validate_property(PolicySetDefinitionProperties, Symbol("metadata"), metadata)
        setfield!(o, Symbol("metadata"), metadata)
        validate_property(PolicySetDefinitionProperties, Symbol("parameters"), parameters)
        setfield!(o, Symbol("parameters"), parameters)
        validate_property(PolicySetDefinitionProperties, Symbol("policyDefinitions"), policyDefinitions)
        setfield!(o, Symbol("policyDefinitions"), policyDefinitions)
        validate_property(PolicySetDefinitionProperties, Symbol("policyDefinitionGroups"), policyDefinitionGroups)
        setfield!(o, Symbol("policyDefinitionGroups"), policyDefinitionGroups)
        o
    end
end # type PolicySetDefinitionProperties

const _property_map_PolicySetDefinitionProperties = Dict{Symbol,Symbol}(Symbol("policyType")=>Symbol("policyType"), Symbol("displayName")=>Symbol("displayName"), Symbol("description")=>Symbol("description"), Symbol("metadata")=>Symbol("metadata"), Symbol("parameters")=>Symbol("parameters"), Symbol("policyDefinitions")=>Symbol("policyDefinitions"), Symbol("policyDefinitionGroups")=>Symbol("policyDefinitionGroups"))
const _property_types_PolicySetDefinitionProperties = Dict{Symbol,String}(Symbol("policyType")=>"String", Symbol("displayName")=>"String", Symbol("description")=>"String", Symbol("metadata")=>"Any", Symbol("parameters")=>"ParameterDefinitions", Symbol("policyDefinitions")=>"Vector{PolicyDefinitionReference}", Symbol("policyDefinitionGroups")=>"Vector{PolicyDefinitionGroup}")
Base.propertynames(::Type{ PolicySetDefinitionProperties }) = collect(keys(_property_map_PolicySetDefinitionProperties))
Swagger.property_type(::Type{ PolicySetDefinitionProperties }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_PolicySetDefinitionProperties[name]))}
Swagger.field_name(::Type{ PolicySetDefinitionProperties }, property_name::Symbol) =  _property_map_PolicySetDefinitionProperties[property_name]

const _allowed_PolicySetDefinitionProperties_policyType = ["NotSpecified", "BuiltIn", "Custom", "Static"]

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

function validate_property(::Type{ PolicySetDefinitionProperties }, name::Symbol, val)
    if name === Symbol("policyType")
        Swagger.validate_param(name, "PolicySetDefinitionProperties", :enum, val, _allowed_PolicySetDefinitionProperties_policyType)
    end
end
