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



mutable struct PolicyDefinitionProperties <: 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
    policyRule::Any # spec type: Union{ Nothing, Any } # spec name: policyRule

    function PolicyDefinitionProperties(;policyType=nothing, displayName=nothing, description=nothing, policyRule=nothing)
        o = new()
        validate_property(PolicyDefinitionProperties, Symbol("policyType"), policyType)
        setfield!(o, Symbol("policyType"), policyType)
        validate_property(PolicyDefinitionProperties, Symbol("displayName"), displayName)
        setfield!(o, Symbol("displayName"), displayName)
        validate_property(PolicyDefinitionProperties, Symbol("description"), description)
        setfield!(o, Symbol("description"), description)
        validate_property(PolicyDefinitionProperties, Symbol("policyRule"), policyRule)
        setfield!(o, Symbol("policyRule"), policyRule)
        o
    end
end # type PolicyDefinitionProperties

const _property_map_PolicyDefinitionProperties = Dict{Symbol,Symbol}(Symbol("policyType")=>Symbol("policyType"), Symbol("displayName")=>Symbol("displayName"), Symbol("description")=>Symbol("description"), Symbol("policyRule")=>Symbol("policyRule"))
const _property_types_PolicyDefinitionProperties = Dict{Symbol,String}(Symbol("policyType")=>"String", Symbol("displayName")=>"String", Symbol("description")=>"String", Symbol("policyRule")=>"Any")
Base.propertynames(::Type{ PolicyDefinitionProperties }) = collect(keys(_property_map_PolicyDefinitionProperties))
Swagger.property_type(::Type{ PolicyDefinitionProperties }, name::Symbol) = Union{Nothing,eval(Meta.parse(_property_types_PolicyDefinitionProperties[name]))}
Swagger.field_name(::Type{ PolicyDefinitionProperties }, property_name::Symbol) =  _property_map_PolicyDefinitionProperties[property_name]

const _allowed_PolicyDefinitionProperties_policyType = ["NotSpecified", "BuiltIn", "Custom"]

function check_required(o::PolicyDefinitionProperties)
    true
end

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