public static final class TrafficPortSelector.Builder extends GeneratedMessage.Builder<TrafficPortSelector.Builder> implements TrafficPortSelectorOrBuilderSpecification of a port-based selector.
Protobuf type google.cloud.networkservices.v1.TrafficPortSelector
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > TrafficPortSelector.BuilderImplements
TrafficPortSelectorOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
addAllPorts(Iterable<String> values)
public TrafficPortSelector.Builder addAllPorts(Iterable<String> values)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.
repeated string ports = 1 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
values |
Iterable<String>The ports to add. |
| Returns | |
|---|---|
| Type | Description |
TrafficPortSelector.Builder |
This builder for chaining. |
addPorts(String value)
public TrafficPortSelector.Builder addPorts(String value)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.
repeated string ports = 1 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe ports to add. |
| Returns | |
|---|---|
| Type | Description |
TrafficPortSelector.Builder |
This builder for chaining. |
addPortsBytes(ByteString value)
public TrafficPortSelector.Builder addPortsBytes(ByteString value)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.
repeated string ports = 1 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes of the ports to add. |
| Returns | |
|---|---|
| Type | Description |
TrafficPortSelector.Builder |
This builder for chaining. |
build()
public TrafficPortSelector build()| Returns | |
|---|---|
| Type | Description |
TrafficPortSelector |
|
buildPartial()
public TrafficPortSelector buildPartial()| Returns | |
|---|---|
| Type | Description |
TrafficPortSelector |
|
clear()
public TrafficPortSelector.Builder clear()| Returns | |
|---|---|
| Type | Description |
TrafficPortSelector.Builder |
|
clearPorts()
public TrafficPortSelector.Builder clearPorts()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.
repeated string ports = 1 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
TrafficPortSelector.Builder |
This builder for chaining. |
getDefaultInstanceForType()
public TrafficPortSelector getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
TrafficPortSelector |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getPorts(int index)
public String getPorts(int index)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.
repeated string ports = 1 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
index |
intThe index of the element to return. |
| Returns | |
|---|---|
| Type | Description |
String |
The ports at the given index. |
getPortsBytes(int index)
public ByteString getPortsBytes(int index)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.
repeated string ports = 1 [(.google.api.field_behavior) = OPTIONAL];
| Parameter | |
|---|---|
| Name | Description |
index |
intThe index of the value to return. |
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes of the ports at the given index. |
getPortsCount()
public int getPortsCount()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.
repeated string ports = 1 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
int |
The count of ports. |
getPortsList()
public ProtocolStringList getPortsList()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.
repeated string ports = 1 [(.google.api.field_behavior) = OPTIONAL];
| Returns | |
|---|---|
| Type | Description |
ProtocolStringList |
A list containing the ports. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(TrafficPortSelector other)
public TrafficPortSelector.Builder mergeFrom(TrafficPortSelector other)| Parameter | |
|---|---|
| Name | Description |
other |
TrafficPortSelector |
| Returns | |
|---|---|
| Type | Description |
TrafficPortSelector.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public TrafficPortSelector.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
TrafficPortSelector.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public TrafficPortSelector.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
TrafficPortSelector.Builder |
|
setPorts(int index, String value)
public TrafficPortSelector.Builder setPorts(int index, String value)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.
repeated string ports = 1 [(.google.api.field_behavior) = OPTIONAL];
| Parameters | |
|---|---|
| Name | Description |
index |
intThe index to set the value at. |
value |
StringThe ports to set. |
| Returns | |
|---|---|
| Type | Description |
TrafficPortSelector.Builder |
This builder for chaining. |