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


mutable struct ConnectivityIssue <: SwaggerModel
    origin::Any # spec type: Union{ Nothing, String } # spec name: origin
    severity::Any # spec type: Union{ Nothing, String } # spec name: severity
    type::Any # spec type: Union{ Nothing, String } # spec name: type
    context::Any # spec type: Union{ Nothing, Vector{IssueContext} } # spec name: context

    function ConnectivityIssue(;origin=nothing, severity=nothing, type=nothing, context=nothing)
        o = new()
        validate_property(ConnectivityIssue, Symbol("origin"), origin)
        setfield!(o, Symbol("origin"), origin)
        validate_property(ConnectivityIssue, Symbol("severity"), severity)
        setfield!(o, Symbol("severity"), severity)
        validate_property(ConnectivityIssue, Symbol("type"), type)
        setfield!(o, Symbol("type"), type)
        validate_property(ConnectivityIssue, Symbol("context"), context)
        setfield!(o, Symbol("context"), context)
        o
    end
end # type ConnectivityIssue

const _property_map_ConnectivityIssue = Dict{Symbol,Symbol}(Symbol("origin")=>Symbol("origin"), Symbol("severity")=>Symbol("severity"), Symbol("type")=>Symbol("type"), Symbol("context")=>Symbol("context"))
const _property_types_ConnectivityIssue = Dict{Symbol,String}(Symbol("origin")=>"String", Symbol("severity")=>"String", Symbol("type")=>"String", Symbol("context")=>"Vector{IssueContext}")
Base.propertynames(::Type{ ConnectivityIssue }) = collect(keys(_property_map_ConnectivityIssue))
Swagger.property_type(::Type{ ConnectivityIssue }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_ConnectivityIssue[name]))}
Swagger.field_name(::Type{ ConnectivityIssue }, property_name::Symbol) =  _property_map_ConnectivityIssue[property_name]

const _allowed_ConnectivityIssue_origin = ["Local", "Inbound", "Outbound"]

const _allowed_ConnectivityIssue_severity = ["Error", "Warning"]

const _allowed_ConnectivityIssue_type = ["Unknown", "AgentStopped", "GuestFirewall", "DnsResolution", "SocketBind", "NetworkSecurityRule", "UserDefinedRoute", "PortThrottled", "Platform"]

function check_required(o::ConnectivityIssue)
    true
end

function validate_property(::Type{ ConnectivityIssue }, name::Symbol, val)
    if name === Symbol("origin")
        Swagger.validate_param(name, "ConnectivityIssue", :enum, val, _allowed_ConnectivityIssue_origin)
    end
    if name === Symbol("severity")
        Swagger.validate_param(name, "ConnectivityIssue", :enum, val, _allowed_ConnectivityIssue_severity)
    end
    if name === Symbol("type")
        Swagger.validate_param(name, "ConnectivityIssue", :enum, val, _allowed_ConnectivityIssue_type)
    end
end
