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



mutable struct PacketCaptureFilter <: SwaggerModel
    protocol::Any # spec type: Union{ Nothing, String } # spec name: protocol
    localIPAddress::Any # spec type: Union{ Nothing, String } # spec name: localIPAddress
    remoteIPAddress::Any # spec type: Union{ Nothing, String } # spec name: remoteIPAddress
    localPort::Any # spec type: Union{ Nothing, String } # spec name: localPort
    remotePort::Any # spec type: Union{ Nothing, String } # spec name: remotePort

    function PacketCaptureFilter(;protocol="Any", localIPAddress=nothing, remoteIPAddress=nothing, localPort=nothing, remotePort=nothing)
        o = new()
        validate_property(PacketCaptureFilter, Symbol("protocol"), protocol)
        setfield!(o, Symbol("protocol"), protocol)
        validate_property(PacketCaptureFilter, Symbol("localIPAddress"), localIPAddress)
        setfield!(o, Symbol("localIPAddress"), localIPAddress)
        validate_property(PacketCaptureFilter, Symbol("remoteIPAddress"), remoteIPAddress)
        setfield!(o, Symbol("remoteIPAddress"), remoteIPAddress)
        validate_property(PacketCaptureFilter, Symbol("localPort"), localPort)
        setfield!(o, Symbol("localPort"), localPort)
        validate_property(PacketCaptureFilter, Symbol("remotePort"), remotePort)
        setfield!(o, Symbol("remotePort"), remotePort)
        o
    end
end # type PacketCaptureFilter

const _property_map_PacketCaptureFilter = Dict{Symbol,Symbol}(Symbol("protocol")=>Symbol("protocol"), Symbol("localIPAddress")=>Symbol("localIPAddress"), Symbol("remoteIPAddress")=>Symbol("remoteIPAddress"), Symbol("localPort")=>Symbol("localPort"), Symbol("remotePort")=>Symbol("remotePort"))
const _property_types_PacketCaptureFilter = Dict{Symbol,String}(Symbol("protocol")=>"String", Symbol("localIPAddress")=>"String", Symbol("remoteIPAddress")=>"String", Symbol("localPort")=>"String", Symbol("remotePort")=>"String")
Base.propertynames(::Type{ PacketCaptureFilter }) = collect(keys(_property_map_PacketCaptureFilter))
Swagger.property_type(::Type{ PacketCaptureFilter }, name::Symbol) = Union{Nothing,eval(Meta.parse(_property_types_PacketCaptureFilter[name]))}
Swagger.field_name(::Type{ PacketCaptureFilter }, property_name::Symbol) =  _property_map_PacketCaptureFilter[property_name]

const _allowed_PacketCaptureFilter_protocol = ["TCP", "UDP", "Any"]

function check_required(o::PacketCaptureFilter)
    true
end

function validate_property(::Type{ PacketCaptureFilter }, name::Symbol, val)
    if name === Symbol("protocol")
        Swagger.validate_param(name, "PacketCaptureFilter", :enum, val, _allowed_PacketCaptureFilter_protocol)
    end
end
