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


@doc raw"""DEPRECATED 1.9 - This group version of NetworkPolicyPort is deprecated by networking/v1/NetworkPolicyPort.

    IoK8sApiExtensionsV1beta1NetworkPolicyPort(;
        port=nothing,
        protocol=nothing,
    )

    - port::IoK8sApimachineryPkgUtilIntstrIntOrString : If specified, the port on the given protocol.  This can either be a numerical or named port on a pod.  If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched.
    - protocol::String : Optional.  The protocol (TCP, UDP, or SCTP) which traffic must match. If not specified, this field defaults to TCP.
"""
mutable struct IoK8sApiExtensionsV1beta1NetworkPolicyPort <: SwaggerModel
    port::Any # spec type: Union{ Nothing, IoK8sApimachineryPkgUtilIntstrIntOrString } # spec name: port
    protocol::Any # spec type: Union{ Nothing, String } # spec name: protocol

    function IoK8sApiExtensionsV1beta1NetworkPolicyPort(;port=nothing, protocol=nothing)
        o = new()
        validate_property(IoK8sApiExtensionsV1beta1NetworkPolicyPort, Symbol("port"), port)
        setfield!(o, Symbol("port"), port)
        validate_property(IoK8sApiExtensionsV1beta1NetworkPolicyPort, Symbol("protocol"), protocol)
        setfield!(o, Symbol("protocol"), protocol)
        o
    end
end # type IoK8sApiExtensionsV1beta1NetworkPolicyPort

const _property_map_IoK8sApiExtensionsV1beta1NetworkPolicyPort = Dict{Symbol,Symbol}(Symbol("port")=>Symbol("port"), Symbol("protocol")=>Symbol("protocol"))
const _property_types_IoK8sApiExtensionsV1beta1NetworkPolicyPort = Dict{Symbol,String}(Symbol("port")=>"IoK8sApimachineryPkgUtilIntstrIntOrString", Symbol("protocol")=>"String")
Base.propertynames(::Type{ IoK8sApiExtensionsV1beta1NetworkPolicyPort }) = collect(keys(_property_map_IoK8sApiExtensionsV1beta1NetworkPolicyPort))
Swagger.property_type(::Type{ IoK8sApiExtensionsV1beta1NetworkPolicyPort }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_IoK8sApiExtensionsV1beta1NetworkPolicyPort[name]))}
Swagger.field_name(::Type{ IoK8sApiExtensionsV1beta1NetworkPolicyPort }, property_name::Symbol) =  _property_map_IoK8sApiExtensionsV1beta1NetworkPolicyPort[property_name]

function check_required(o::IoK8sApiExtensionsV1beta1NetworkPolicyPort)
    true
end

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