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


mutable struct ManagementPolicyDefinition <: SwaggerModel
    actions::Any # spec type: Union{ Nothing, ManagementPolicyAction } # spec name: actions
    filters::Any # spec type: Union{ Nothing, ManagementPolicyFilter } # spec name: filters

    function ManagementPolicyDefinition(;actions=nothing, filters=nothing)
        o = new()
        validate_property(ManagementPolicyDefinition, Symbol("actions"), actions)
        setfield!(o, Symbol("actions"), actions)
        validate_property(ManagementPolicyDefinition, Symbol("filters"), filters)
        setfield!(o, Symbol("filters"), filters)
        o
    end
end # type ManagementPolicyDefinition

const _property_map_ManagementPolicyDefinition = Dict{Symbol,Symbol}(Symbol("actions")=>Symbol("actions"), Symbol("filters")=>Symbol("filters"))
const _property_types_ManagementPolicyDefinition = Dict{Symbol,String}(Symbol("actions")=>"ManagementPolicyAction", Symbol("filters")=>"ManagementPolicyFilter")
Base.propertynames(::Type{ ManagementPolicyDefinition }) = collect(keys(_property_map_ManagementPolicyDefinition))
Swagger.property_type(::Type{ ManagementPolicyDefinition }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_ManagementPolicyDefinition[name]))}
Swagger.field_name(::Type{ ManagementPolicyDefinition }, property_name::Symbol) =  _property_map_ManagementPolicyDefinition[property_name]

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

function validate_property(::Type{ ManagementPolicyDefinition }, name::Symbol, val)
end
