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


mutable struct ConnectionStateSnapshot <: SwaggerModel
    connectionState::Any # spec type: Union{ Nothing, String } # spec name: connectionState
    startTime::Any # spec type: Union{ Nothing, DateTime } # spec name: startTime
    endTime::Any # spec type: Union{ Nothing, DateTime } # spec name: endTime
    evaluationState::Any # spec type: Union{ Nothing, String } # spec name: evaluationState
    avgLatencyInMs::Any # spec type: Union{ Nothing, Int32 } # spec name: avgLatencyInMs
    minLatencyInMs::Any # spec type: Union{ Nothing, Int32 } # spec name: minLatencyInMs
    maxLatencyInMs::Any # spec type: Union{ Nothing, Int32 } # spec name: maxLatencyInMs
    probesSent::Any # spec type: Union{ Nothing, Int32 } # spec name: probesSent
    probesFailed::Any # spec type: Union{ Nothing, Int32 } # spec name: probesFailed
    hops::Any # spec type: Union{ Nothing, Vector{ConnectivityHop2} } # spec name: hops

    function ConnectionStateSnapshot(;connectionState=nothing, startTime=nothing, endTime=nothing, evaluationState=nothing, avgLatencyInMs=nothing, minLatencyInMs=nothing, maxLatencyInMs=nothing, probesSent=nothing, probesFailed=nothing, hops=nothing)
        o = new()
        validate_property(ConnectionStateSnapshot, Symbol("connectionState"), connectionState)
        setfield!(o, Symbol("connectionState"), connectionState)
        validate_property(ConnectionStateSnapshot, Symbol("startTime"), startTime)
        setfield!(o, Symbol("startTime"), startTime)
        validate_property(ConnectionStateSnapshot, Symbol("endTime"), endTime)
        setfield!(o, Symbol("endTime"), endTime)
        validate_property(ConnectionStateSnapshot, Symbol("evaluationState"), evaluationState)
        setfield!(o, Symbol("evaluationState"), evaluationState)
        validate_property(ConnectionStateSnapshot, Symbol("avgLatencyInMs"), avgLatencyInMs)
        setfield!(o, Symbol("avgLatencyInMs"), avgLatencyInMs)
        validate_property(ConnectionStateSnapshot, Symbol("minLatencyInMs"), minLatencyInMs)
        setfield!(o, Symbol("minLatencyInMs"), minLatencyInMs)
        validate_property(ConnectionStateSnapshot, Symbol("maxLatencyInMs"), maxLatencyInMs)
        setfield!(o, Symbol("maxLatencyInMs"), maxLatencyInMs)
        validate_property(ConnectionStateSnapshot, Symbol("probesSent"), probesSent)
        setfield!(o, Symbol("probesSent"), probesSent)
        validate_property(ConnectionStateSnapshot, Symbol("probesFailed"), probesFailed)
        setfield!(o, Symbol("probesFailed"), probesFailed)
        validate_property(ConnectionStateSnapshot, Symbol("hops"), hops)
        setfield!(o, Symbol("hops"), hops)
        o
    end
end # type ConnectionStateSnapshot

const _property_map_ConnectionStateSnapshot = Dict{Symbol,Symbol}(Symbol("connectionState")=>Symbol("connectionState"), Symbol("startTime")=>Symbol("startTime"), Symbol("endTime")=>Symbol("endTime"), Symbol("evaluationState")=>Symbol("evaluationState"), Symbol("avgLatencyInMs")=>Symbol("avgLatencyInMs"), Symbol("minLatencyInMs")=>Symbol("minLatencyInMs"), Symbol("maxLatencyInMs")=>Symbol("maxLatencyInMs"), Symbol("probesSent")=>Symbol("probesSent"), Symbol("probesFailed")=>Symbol("probesFailed"), Symbol("hops")=>Symbol("hops"))
const _property_types_ConnectionStateSnapshot = Dict{Symbol,String}(Symbol("connectionState")=>"String", Symbol("startTime")=>"DateTime", Symbol("endTime")=>"DateTime", Symbol("evaluationState")=>"String", Symbol("avgLatencyInMs")=>"Int32", Symbol("minLatencyInMs")=>"Int32", Symbol("maxLatencyInMs")=>"Int32", Symbol("probesSent")=>"Int32", Symbol("probesFailed")=>"Int32", Symbol("hops")=>"Vector{ConnectivityHop2}")
Base.propertynames(::Type{ ConnectionStateSnapshot }) = collect(keys(_property_map_ConnectionStateSnapshot))
Swagger.property_type(::Type{ ConnectionStateSnapshot }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_ConnectionStateSnapshot[name]))}
Swagger.field_name(::Type{ ConnectionStateSnapshot }, property_name::Symbol) =  _property_map_ConnectionStateSnapshot[property_name]

const _allowed_ConnectionStateSnapshot_connectionState = ["Reachable", "Unreachable", "Unknown"]

const _allowed_ConnectionStateSnapshot_evaluationState = ["NotStarted", "InProgress", "Completed"]

function check_required(o::ConnectionStateSnapshot)
    true
end

function validate_property(::Type{ ConnectionStateSnapshot }, name::Symbol, val)
    if name === Symbol("connectionState")
        Swagger.validate_param(name, "ConnectionStateSnapshot", :enum, val, _allowed_ConnectionStateSnapshot_connectionState)
    end
    if name === Symbol("evaluationState")
        Swagger.validate_param(name, "ConnectionStateSnapshot", :enum, val, _allowed_ConnectionStateSnapshot_evaluationState)
    end
end
