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


mutable struct PolicyAssignment <: SwaggerModel
    properties::Any # spec type: Union{ Nothing, PolicyAssignmentProperties } # spec name: properties
    id::Any # spec type: Union{ Nothing, String } # spec name: id
    type::Any # spec type: Union{ Nothing, String } # spec name: type
    name::Any # spec type: Union{ Nothing, String } # spec name: name
    sku::Any # spec type: Union{ Nothing, PolicySku } # spec name: sku
    location::Any # spec type: Union{ Nothing, String } # spec name: location
    identity::Any # spec type: Union{ Nothing, Identity } # spec name: identity

    function PolicyAssignment(;properties=nothing, id=nothing, type=nothing, name=nothing, sku=nothing, location=nothing, identity=nothing)
        o = new()
        validate_property(PolicyAssignment, Symbol("properties"), properties)
        setfield!(o, Symbol("properties"), properties)
        validate_property(PolicyAssignment, Symbol("id"), id)
        setfield!(o, Symbol("id"), id)
        validate_property(PolicyAssignment, Symbol("type"), type)
        setfield!(o, Symbol("type"), type)
        validate_property(PolicyAssignment, Symbol("name"), name)
        setfield!(o, Symbol("name"), name)
        validate_property(PolicyAssignment, Symbol("sku"), sku)
        setfield!(o, Symbol("sku"), sku)
        validate_property(PolicyAssignment, Symbol("location"), location)
        setfield!(o, Symbol("location"), location)
        validate_property(PolicyAssignment, Symbol("identity"), identity)
        setfield!(o, Symbol("identity"), identity)
        o
    end
end # type PolicyAssignment

const _property_map_PolicyAssignment = Dict{Symbol,Symbol}(Symbol("properties")=>Symbol("properties"), Symbol("id")=>Symbol("id"), Symbol("type")=>Symbol("type"), Symbol("name")=>Symbol("name"), Symbol("sku")=>Symbol("sku"), Symbol("location")=>Symbol("location"), Symbol("identity")=>Symbol("identity"))
const _property_types_PolicyAssignment = Dict{Symbol,String}(Symbol("properties")=>"PolicyAssignmentProperties", Symbol("id")=>"String", Symbol("type")=>"String", Symbol("name")=>"String", Symbol("sku")=>"PolicySku", Symbol("location")=>"String", Symbol("identity")=>"Identity")
Base.propertynames(::Type{ PolicyAssignment }) = collect(keys(_property_map_PolicyAssignment))
Swagger.property_type(::Type{ PolicyAssignment }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_PolicyAssignment[name]))}
Swagger.field_name(::Type{ PolicyAssignment }, property_name::Symbol) =  _property_map_PolicyAssignment[property_name]

function check_required(o::PolicyAssignment)
    true
end

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