1.7.0 (latest) 1.6.0 1.5.0 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0

    public sealed class TrafficPortSelector : IMessage<TrafficPortSelector>, IEquatable<TrafficPortSelector>, IDeepCloneable<TrafficPortSelector>, IBufferMessage, IMessage

Reference documentation and code samples for the Network Services v1 API class TrafficPortSelector.

Specification of a port-based selector.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> TrafficPortSelector

## Implements

[IMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.md.txt)[TrafficPortSelector](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.TrafficPortSelector.md.txt), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[TrafficPortSelector](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.TrafficPortSelector.md.txt), [IDeepCloneable](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.md.txt)[TrafficPortSelector](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.TrafficPortSelector.md.txt), [IBufferMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.md.txt), [IMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.md.txt)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.NetworkServices.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.NetworkServices.V1/latest/Google.Cloud.NetworkServices.V1.md.txt)

## Assembly

Google.Cloud.NetworkServices.V1.dll

## Constructors

### TrafficPortSelector()

    public TrafficPortSelector()

### TrafficPortSelector(TrafficPortSelector)

    public TrafficPortSelector(TrafficPortSelector other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `TrafficPortSelector` |

## Properties

### Ports

    public RepeatedField<string> Ports { get; }

Optional. A list of ports. Can be port numbers or port range
(example, \[80-90\] specifies all ports from 80 to 90, including
80 and 90) or named ports or \* to specify all ports. If the
list is empty, all ports are selected.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `RepeatedFieldstring` |   |