Class TcpRoute.RouteAction.Builder (0.3.0)

public static final class TcpRoute.RouteAction.Builder extends GeneratedMessageV3.Builder<TcpRoute.RouteAction.Builder> implements TcpRoute.RouteActionOrBuilder

The specifications for routing traffic and applying associated policies.

Protobuf type google.cloud.networkservices.v1.TcpRoute.RouteAction

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllDestinations(Iterable<? extends TcpRoute.RouteDestination> values)

public TcpRoute.RouteAction.Builder addAllDestinations(Iterable<? extends TcpRoute.RouteDestination> values)

Optional. The destination services to which traffic should be forwarded. At least one destination service is required. Only one of route destination or original destination can be set.

repeated .google.cloud.networkservices.v1.TcpRoute.RouteDestination destinations = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<? extends com.google.cloud.networkservices.v1.TcpRoute.RouteDestination>
Returns
Type Description
TcpRoute.RouteAction.Builder

addDestinations(TcpRoute.RouteDestination value)

public TcpRoute.RouteAction.Builder addDestinations(TcpRoute.RouteDestination value)

Optional. The destination services to which traffic should be forwarded. At least one destination service is required. Only one of route destination or original destination can be set.

repeated .google.cloud.networkservices.v1.TcpRoute.RouteDestination destinations = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value TcpRoute.RouteDestination
Returns
Type Description
TcpRoute.RouteAction.Builder

addDestinations(TcpRoute.RouteDestination.Builder builderForValue)

public TcpRoute.RouteAction.Builder addDestinations(TcpRoute.RouteDestination.Builder builderForValue)

Optional. The destination services to which traffic should be forwarded. At least one destination service is required. Only one of route destination or original destination can be set.

repeated .google.cloud.networkservices.v1.TcpRoute.RouteDestination destinations = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue TcpRoute.RouteDestination.Builder
Returns
Type Description
TcpRoute.RouteAction.Builder

addDestinations(int index, TcpRoute.RouteDestination value)

public TcpRoute.RouteAction.Builder addDestinations(int index, TcpRoute.RouteDestination value)

Optional. The destination services to which traffic should be forwarded. At least one destination service is required. Only one of route destination or original destination can be set.

repeated .google.cloud.networkservices.v1.TcpRoute.RouteDestination destinations = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
value TcpRoute.RouteDestination
Returns
Type Description
TcpRoute.RouteAction.Builder

addDestinations(int index, TcpRoute.RouteDestination.Builder builderForValue)

public TcpRoute.RouteAction.Builder addDestinations(int index, TcpRoute.RouteDestination.Builder builderForValue)

Optional. The destination services to which traffic should be forwarded. At least one destination service is required. Only one of route destination or original destination can be set.

repeated .google.cloud.networkservices.v1.TcpRoute.RouteDestination destinations = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
builderForValue TcpRoute.RouteDestination.Builder
Returns
Type Description
TcpRoute.RouteAction.Builder

addDestinationsBuilder()

public TcpRoute.RouteDestination.Builder addDestinationsBuilder()

Optional. The destination services to which traffic should be forwarded. At least one destination service is required. Only one of route destination or original destination can be set.

repeated .google.cloud.networkservices.v1.TcpRoute.RouteDestination destinations = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
TcpRoute.RouteDestination.Builder

addDestinationsBuilder(int index)

public TcpRoute.RouteDestination.Builder addDestinationsBuilder(int index)

Optional. The destination services to which traffic should be forwarded. At least one destination service is required. Only one of route destination or original destination can be set.

repeated .google.cloud.networkservices.v1.TcpRoute.RouteDestination destinations = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
TcpRoute.RouteDestination.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public TcpRoute.RouteAction.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
TcpRoute.RouteAction.Builder
Overrides

build()

public TcpRoute.RouteAction build()
Returns
Type Description
TcpRoute.RouteAction

buildPartial()

public TcpRoute.RouteAction buildPartial()
Returns
Type Description
TcpRoute.RouteAction

clear()

public TcpRoute.RouteAction.Builder clear()
Returns
Type Description
TcpRoute.RouteAction.Builder
Overrides

clearDestinations()

public TcpRoute.RouteAction.Builder clearDestinations()

Optional. The destination services to which traffic should be forwarded. At least one destination service is required. Only one of route destination or original destination can be set.

repeated .google.cloud.networkservices.v1.TcpRoute.RouteDestination destinations = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
TcpRoute.RouteAction.Builder

clearField(Descriptors.FieldDescriptor field)

public TcpRoute.RouteAction.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
TcpRoute.RouteAction.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public TcpRoute.RouteAction.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
TcpRoute.RouteAction.Builder
Overrides

clearOriginalDestination()

public TcpRoute.RouteAction.Builder clearOriginalDestination()

Optional. If true, Router will use the destination IP and port of the original connection as the destination of the request. Default is false. Only one of route destinations or original destination can be set.

bool original_destination = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
TcpRoute.RouteAction.Builder

This builder for chaining.

clone()

public TcpRoute.RouteAction.Builder clone()
Returns
Type Description
TcpRoute.RouteAction.Builder
Overrides

getDefaultInstanceForType()

public TcpRoute.RouteAction getDefaultInstanceForType()
Returns
Type Description
TcpRoute.RouteAction

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getDestinations(int index)

public TcpRoute.RouteDestination getDestinations(int index)

Optional. The destination services to which traffic should be forwarded. At least one destination service is required. Only one of route destination or original destination can be set.

repeated .google.cloud.networkservices.v1.TcpRoute.RouteDestination destinations = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
TcpRoute.RouteDestination

getDestinationsBuilder(int index)

public TcpRoute.RouteDestination.Builder getDestinationsBuilder(int index)

Optional. The destination services to which traffic should be forwarded. At least one destination service is required. Only one of route destination or original destination can be set.

repeated .google.cloud.networkservices.v1.TcpRoute.RouteDestination destinations = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
TcpRoute.RouteDestination.Builder

getDestinationsBuilderList()

public List<TcpRoute.RouteDestination.Builder> getDestinationsBuilderList()

Optional. The destination services to which traffic should be forwarded. At least one destination service is required. Only one of route destination or original destination can be set.

repeated .google.cloud.networkservices.v1.TcpRoute.RouteDestination destinations = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<Builder>

getDestinationsCount()

public int getDestinationsCount()

Optional. The destination services to which traffic should be forwarded. At least one destination service is required. Only one of route destination or original destination can be set.

repeated .google.cloud.networkservices.v1.TcpRoute.RouteDestination destinations = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getDestinationsList()

public List<TcpRoute.RouteDestination> getDestinationsList()

Optional. The destination services to which traffic should be forwarded. At least one destination service is required. Only one of route destination or original destination can be set.

repeated .google.cloud.networkservices.v1.TcpRoute.RouteDestination destinations = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<RouteDestination>

getDestinationsOrBuilder(int index)

public TcpRoute.RouteDestinationOrBuilder getDestinationsOrBuilder(int index)

Optional. The destination services to which traffic should be forwarded. At least one destination service is required. Only one of route destination or original destination can be set.

repeated .google.cloud.networkservices.v1.TcpRoute.RouteDestination destinations = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
TcpRoute.RouteDestinationOrBuilder

getDestinationsOrBuilderList()

public List<? extends TcpRoute.RouteDestinationOrBuilder> getDestinationsOrBuilderList()

Optional. The destination services to which traffic should be forwarded. At least one destination service is required. Only one of route destination or original destination can be set.

repeated .google.cloud.networkservices.v1.TcpRoute.RouteDestination destinations = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<? extends com.google.cloud.networkservices.v1.TcpRoute.RouteDestinationOrBuilder>

getOriginalDestination()

public boolean getOriginalDestination()

Optional. If true, Router will use the destination IP and port of the original connection as the destination of the request. Default is false. Only one of route destinations or original destination can be set.

bool original_destination = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

The originalDestination.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(TcpRoute.RouteAction other)

public TcpRoute.RouteAction.Builder mergeFrom(TcpRoute.RouteAction other)
Parameter
Name Description
other TcpRoute.RouteAction
Returns
Type Description
TcpRoute.RouteAction.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public TcpRoute.RouteAction.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TcpRoute.RouteAction.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public TcpRoute.RouteAction.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
TcpRoute.RouteAction.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final TcpRoute.RouteAction.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
TcpRoute.RouteAction.Builder
Overrides

removeDestinations(int index)

public TcpRoute.RouteAction.Builder removeDestinations(int index)

Optional. The destination services to which traffic should be forwarded. At least one destination service is required. Only one of route destination or original destination can be set.

repeated .google.cloud.networkservices.v1.TcpRoute.RouteDestination destinations = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
TcpRoute.RouteAction.Builder

setDestinations(int index, TcpRoute.RouteDestination value)

public TcpRoute.RouteAction.Builder setDestinations(int index, TcpRoute.RouteDestination value)

Optional. The destination services to which traffic should be forwarded. At least one destination service is required. Only one of route destination or original destination can be set.

repeated .google.cloud.networkservices.v1.TcpRoute.RouteDestination destinations = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
value TcpRoute.RouteDestination
Returns
Type Description
TcpRoute.RouteAction.Builder

setDestinations(int index, TcpRoute.RouteDestination.Builder builderForValue)

public TcpRoute.RouteAction.Builder setDestinations(int index, TcpRoute.RouteDestination.Builder builderForValue)

Optional. The destination services to which traffic should be forwarded. At least one destination service is required. Only one of route destination or original destination can be set.

repeated .google.cloud.networkservices.v1.TcpRoute.RouteDestination destinations = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
builderForValue TcpRoute.RouteDestination.Builder
Returns
Type Description
TcpRoute.RouteAction.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public TcpRoute.RouteAction.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
TcpRoute.RouteAction.Builder
Overrides

setOriginalDestination(boolean value)

public TcpRoute.RouteAction.Builder setOriginalDestination(boolean value)

Optional. If true, Router will use the destination IP and port of the original connection as the destination of the request. Default is false. Only one of route destinations or original destination can be set.

bool original_destination = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value boolean

The originalDestination to set.

Returns
Type Description
TcpRoute.RouteAction.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public TcpRoute.RouteAction.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
TcpRoute.RouteAction.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final TcpRoute.RouteAction.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
TcpRoute.RouteAction.Builder
Overrides