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


mutable struct TopologyAssociation <: SwaggerModel
    name::Any # spec type: Union{ Nothing, String } # spec name: name
    resourceId::Any # spec type: Union{ Nothing, String } # spec name: resourceId
    associationType::Any # spec type: Union{ Nothing, String } # spec name: associationType

    function TopologyAssociation(;name=nothing, resourceId=nothing, associationType=nothing)
        o = new()
        validate_property(TopologyAssociation, Symbol("name"), name)
        setfield!(o, Symbol("name"), name)
        validate_property(TopologyAssociation, Symbol("resourceId"), resourceId)
        setfield!(o, Symbol("resourceId"), resourceId)
        validate_property(TopologyAssociation, Symbol("associationType"), associationType)
        setfield!(o, Symbol("associationType"), associationType)
        o
    end
end # type TopologyAssociation

const _property_map_TopologyAssociation = Dict{Symbol,Symbol}(Symbol("name")=>Symbol("name"), Symbol("resourceId")=>Symbol("resourceId"), Symbol("associationType")=>Symbol("associationType"))
const _property_types_TopologyAssociation = Dict{Symbol,String}(Symbol("name")=>"String", Symbol("resourceId")=>"String", Symbol("associationType")=>"String")
Base.propertynames(::Type{ TopologyAssociation }) = collect(keys(_property_map_TopologyAssociation))
Swagger.property_type(::Type{ TopologyAssociation }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_TopologyAssociation[name]))}
Swagger.field_name(::Type{ TopologyAssociation }, property_name::Symbol) =  _property_map_TopologyAssociation[property_name]

const _allowed_TopologyAssociation_associationType = ["Associated", "Contains"]

function check_required(o::TopologyAssociation)
    true
end

function validate_property(::Type{ TopologyAssociation }, name::Symbol, val)
    if name === Symbol("associationType")
        Swagger.validate_param(name, "TopologyAssociation", :enum, val, _allowed_TopologyAssociation_associationType)
    end
end
