public static final class TrafficPortSelector.Builder extends GeneratedMessageV3.Builder<TrafficPortSelector.Builder> implements TrafficPortSelectorOrBuilder
Specification of a port-based selector.
Protobuf type google.cloud.networkservices.v1.TrafficPortSelector
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
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];
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 |
String
The ports to add.
|
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 |
ByteString
The bytes of the ports to add.
|
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public TrafficPortSelector.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
build()
public TrafficPortSelector build()
buildPartial()
public TrafficPortSelector buildPartial()
clear()
public TrafficPortSelector.Builder clear()
Overrides
clearField(Descriptors.FieldDescriptor field)
public TrafficPortSelector.Builder clearField(Descriptors.FieldDescriptor field)
Overrides
clearOneof(Descriptors.OneofDescriptor oneof)
public TrafficPortSelector.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Overrides
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];
clone()
public TrafficPortSelector.Builder clone()
Overrides
getDefaultInstanceForType()
public TrafficPortSelector getDefaultInstanceForType()
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Overrides
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 |
int
The 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 |
int
The 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];
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
mergeFrom(TrafficPortSelector other)
public TrafficPortSelector.Builder mergeFrom(TrafficPortSelector other)
public TrafficPortSelector.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
mergeFrom(Message other)
public TrafficPortSelector.Builder mergeFrom(Message other)
Parameter |
Name |
Description |
other |
Message
|
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final TrafficPortSelector.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Overrides
setField(Descriptors.FieldDescriptor field, Object value)
public TrafficPortSelector.Builder setField(Descriptors.FieldDescriptor field, Object value)
Overrides
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 |
int
The index to set the value at.
|
value |
String
The ports to set.
|
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public TrafficPortSelector.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final TrafficPortSelector.Builder setUnknownFields(UnknownFieldSet unknownFields)
Overrides