Class TransitionAttributes.Builder (1.25.0)

public static final class TransitionAttributes.Builder extends GeneratedMessageV3.Builder<TransitionAttributes.Builder> implements TransitionAttributesOrBuilder

Specifies attributes of transitions between two consecutive visits on a route. Several TransitionAttributes may apply to the same transition: in that case, all extra costs add up and the strictest constraint or limit applies (following natural "AND" semantics).

Protobuf type google.cloud.optimization.v1.TransitionAttributes

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public TransitionAttributes.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
TransitionAttributes.Builder
Overrides

build()

public TransitionAttributes build()
Returns
TypeDescription
TransitionAttributes

buildPartial()

public TransitionAttributes buildPartial()
Returns
TypeDescription
TransitionAttributes

clear()

public TransitionAttributes.Builder clear()
Returns
TypeDescription
TransitionAttributes.Builder
Overrides

clearCost()

public TransitionAttributes.Builder clearCost()

Specifies a cost for performing this transition. This is in the same unit as all other costs in the model and must not be negative. It is applied on top of all other existing costs.

double cost = 5;

Returns
TypeDescription
TransitionAttributes.Builder

This builder for chaining.

clearCostPerKilometer()

public TransitionAttributes.Builder clearCostPerKilometer()

Specifies a cost per kilometer applied to the distance traveled while performing this transition. It adds up to any Vehicle.cost_per_kilometer specified on vehicles.

double cost_per_kilometer = 6;

Returns
TypeDescription
TransitionAttributes.Builder

This builder for chaining.

clearDelay()

public TransitionAttributes.Builder clearDelay()

Specifies a delay incurred when performing this transition.

This delay always occurs after finishing the source visit and before starting the destination visit.

.google.protobuf.Duration delay = 8;

Returns
TypeDescription
TransitionAttributes.Builder

clearDistanceLimit()

public TransitionAttributes.Builder clearDistanceLimit()

Specifies a limit on the distance traveled while performing this transition.

As of 2021/06, only soft limits are supported.

.google.cloud.optimization.v1.DistanceLimit distance_limit = 7;

Returns
TypeDescription
TransitionAttributes.Builder

clearDstTag()

public TransitionAttributes.Builder clearDstTag()

A destination visit or vehicle end matches iff its VisitRequest.tags or Vehicle.end_tags either contains dst_tag or does not contain excluded_dst_tag (depending on which of these two fields is non-empty).

string dst_tag = 3;

Returns
TypeDescription
TransitionAttributes.Builder

This builder for chaining.

clearExcludedDstTag()

public TransitionAttributes.Builder clearExcludedDstTag()

See dst_tag. Exactly one of dst_tag and excluded_dst_tag must be non-empty.

string excluded_dst_tag = 4;

Returns
TypeDescription
TransitionAttributes.Builder

This builder for chaining.

clearExcludedSrcTag()

public TransitionAttributes.Builder clearExcludedSrcTag()

See src_tag. Exactly one of src_tag and excluded_src_tag must be non-empty.

string excluded_src_tag = 2;

Returns
TypeDescription
TransitionAttributes.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public TransitionAttributes.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
TransitionAttributes.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public TransitionAttributes.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
TransitionAttributes.Builder
Overrides

clearSrcTag()

public TransitionAttributes.Builder clearSrcTag()

Tags defining the set of (src->dst) transitions these attributes apply to.

A source visit or vehicle start matches iff its VisitRequest.tags or Vehicle.start_tags either contains src_tag or does not contain excluded_src_tag (depending on which of these two fields is non-empty).

string src_tag = 1;

Returns
TypeDescription
TransitionAttributes.Builder

This builder for chaining.

clone()

public TransitionAttributes.Builder clone()
Returns
TypeDescription
TransitionAttributes.Builder
Overrides

getCost()

public double getCost()

Specifies a cost for performing this transition. This is in the same unit as all other costs in the model and must not be negative. It is applied on top of all other existing costs.

double cost = 5;

Returns
TypeDescription
double

The cost.

getCostPerKilometer()

public double getCostPerKilometer()

Specifies a cost per kilometer applied to the distance traveled while performing this transition. It adds up to any Vehicle.cost_per_kilometer specified on vehicles.

double cost_per_kilometer = 6;

Returns
TypeDescription
double

The costPerKilometer.

getDefaultInstanceForType()

public TransitionAttributes getDefaultInstanceForType()
Returns
TypeDescription
TransitionAttributes

getDelay()

public Duration getDelay()

Specifies a delay incurred when performing this transition.

This delay always occurs after finishing the source visit and before starting the destination visit.

.google.protobuf.Duration delay = 8;

Returns
TypeDescription
Duration

The delay.

getDelayBuilder()

public Duration.Builder getDelayBuilder()

Specifies a delay incurred when performing this transition.

This delay always occurs after finishing the source visit and before starting the destination visit.

.google.protobuf.Duration delay = 8;

Returns
TypeDescription
Builder

getDelayOrBuilder()

public DurationOrBuilder getDelayOrBuilder()

Specifies a delay incurred when performing this transition.

This delay always occurs after finishing the source visit and before starting the destination visit.

.google.protobuf.Duration delay = 8;

Returns
TypeDescription
DurationOrBuilder

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getDistanceLimit()

public DistanceLimit getDistanceLimit()

Specifies a limit on the distance traveled while performing this transition.

As of 2021/06, only soft limits are supported.

.google.cloud.optimization.v1.DistanceLimit distance_limit = 7;

Returns
TypeDescription
DistanceLimit

The distanceLimit.

getDistanceLimitBuilder()

public DistanceLimit.Builder getDistanceLimitBuilder()

Specifies a limit on the distance traveled while performing this transition.

As of 2021/06, only soft limits are supported.

.google.cloud.optimization.v1.DistanceLimit distance_limit = 7;

Returns
TypeDescription
DistanceLimit.Builder

getDistanceLimitOrBuilder()

public DistanceLimitOrBuilder getDistanceLimitOrBuilder()

Specifies a limit on the distance traveled while performing this transition.

As of 2021/06, only soft limits are supported.

.google.cloud.optimization.v1.DistanceLimit distance_limit = 7;

Returns
TypeDescription
DistanceLimitOrBuilder

getDstTag()

public String getDstTag()

A destination visit or vehicle end matches iff its VisitRequest.tags or Vehicle.end_tags either contains dst_tag or does not contain excluded_dst_tag (depending on which of these two fields is non-empty).

string dst_tag = 3;

Returns
TypeDescription
String

The dstTag.

getDstTagBytes()

public ByteString getDstTagBytes()

A destination visit or vehicle end matches iff its VisitRequest.tags or Vehicle.end_tags either contains dst_tag or does not contain excluded_dst_tag (depending on which of these two fields is non-empty).

string dst_tag = 3;

Returns
TypeDescription
ByteString

The bytes for dstTag.

getExcludedDstTag()

public String getExcludedDstTag()

See dst_tag. Exactly one of dst_tag and excluded_dst_tag must be non-empty.

string excluded_dst_tag = 4;

Returns
TypeDescription
String

The excludedDstTag.

getExcludedDstTagBytes()

public ByteString getExcludedDstTagBytes()

See dst_tag. Exactly one of dst_tag and excluded_dst_tag must be non-empty.

string excluded_dst_tag = 4;

Returns
TypeDescription
ByteString

The bytes for excludedDstTag.

getExcludedSrcTag()

public String getExcludedSrcTag()

See src_tag. Exactly one of src_tag and excluded_src_tag must be non-empty.

string excluded_src_tag = 2;

Returns
TypeDescription
String

The excludedSrcTag.

getExcludedSrcTagBytes()

public ByteString getExcludedSrcTagBytes()

See src_tag. Exactly one of src_tag and excluded_src_tag must be non-empty.

string excluded_src_tag = 2;

Returns
TypeDescription
ByteString

The bytes for excludedSrcTag.

getSrcTag()

public String getSrcTag()

Tags defining the set of (src->dst) transitions these attributes apply to.

A source visit or vehicle start matches iff its VisitRequest.tags or Vehicle.start_tags either contains src_tag or does not contain excluded_src_tag (depending on which of these two fields is non-empty).

string src_tag = 1;

Returns
TypeDescription
String

The srcTag.

getSrcTagBytes()

public ByteString getSrcTagBytes()

Tags defining the set of (src->dst) transitions these attributes apply to.

A source visit or vehicle start matches iff its VisitRequest.tags or Vehicle.start_tags either contains src_tag or does not contain excluded_src_tag (depending on which of these two fields is non-empty).

string src_tag = 1;

Returns
TypeDescription
ByteString

The bytes for srcTag.

hasDelay()

public boolean hasDelay()

Specifies a delay incurred when performing this transition.

This delay always occurs after finishing the source visit and before starting the destination visit.

.google.protobuf.Duration delay = 8;

Returns
TypeDescription
boolean

Whether the delay field is set.

hasDistanceLimit()

public boolean hasDistanceLimit()

Specifies a limit on the distance traveled while performing this transition.

As of 2021/06, only soft limits are supported.

.google.cloud.optimization.v1.DistanceLimit distance_limit = 7;

Returns
TypeDescription
boolean

Whether the distanceLimit field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeDelay(Duration value)

public TransitionAttributes.Builder mergeDelay(Duration value)

Specifies a delay incurred when performing this transition.

This delay always occurs after finishing the source visit and before starting the destination visit.

.google.protobuf.Duration delay = 8;

Parameter
NameDescription
valueDuration
Returns
TypeDescription
TransitionAttributes.Builder

mergeDistanceLimit(DistanceLimit value)

public TransitionAttributes.Builder mergeDistanceLimit(DistanceLimit value)

Specifies a limit on the distance traveled while performing this transition.

As of 2021/06, only soft limits are supported.

.google.cloud.optimization.v1.DistanceLimit distance_limit = 7;

Parameter
NameDescription
valueDistanceLimit
Returns
TypeDescription
TransitionAttributes.Builder

mergeFrom(TransitionAttributes other)

public TransitionAttributes.Builder mergeFrom(TransitionAttributes other)
Parameter
NameDescription
otherTransitionAttributes
Returns
TypeDescription
TransitionAttributes.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public TransitionAttributes.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TransitionAttributes.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public TransitionAttributes.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
TransitionAttributes.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final TransitionAttributes.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
TransitionAttributes.Builder
Overrides

setCost(double value)

public TransitionAttributes.Builder setCost(double value)

Specifies a cost for performing this transition. This is in the same unit as all other costs in the model and must not be negative. It is applied on top of all other existing costs.

double cost = 5;

Parameter
NameDescription
valuedouble

The cost to set.

Returns
TypeDescription
TransitionAttributes.Builder

This builder for chaining.

setCostPerKilometer(double value)

public TransitionAttributes.Builder setCostPerKilometer(double value)

Specifies a cost per kilometer applied to the distance traveled while performing this transition. It adds up to any Vehicle.cost_per_kilometer specified on vehicles.

double cost_per_kilometer = 6;

Parameter
NameDescription
valuedouble

The costPerKilometer to set.

Returns
TypeDescription
TransitionAttributes.Builder

This builder for chaining.

setDelay(Duration value)

public TransitionAttributes.Builder setDelay(Duration value)

Specifies a delay incurred when performing this transition.

This delay always occurs after finishing the source visit and before starting the destination visit.

.google.protobuf.Duration delay = 8;

Parameter
NameDescription
valueDuration
Returns
TypeDescription
TransitionAttributes.Builder

setDelay(Duration.Builder builderForValue)

public TransitionAttributes.Builder setDelay(Duration.Builder builderForValue)

Specifies a delay incurred when performing this transition.

This delay always occurs after finishing the source visit and before starting the destination visit.

.google.protobuf.Duration delay = 8;

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
TransitionAttributes.Builder

setDistanceLimit(DistanceLimit value)

public TransitionAttributes.Builder setDistanceLimit(DistanceLimit value)

Specifies a limit on the distance traveled while performing this transition.

As of 2021/06, only soft limits are supported.

.google.cloud.optimization.v1.DistanceLimit distance_limit = 7;

Parameter
NameDescription
valueDistanceLimit
Returns
TypeDescription
TransitionAttributes.Builder

setDistanceLimit(DistanceLimit.Builder builderForValue)

public TransitionAttributes.Builder setDistanceLimit(DistanceLimit.Builder builderForValue)

Specifies a limit on the distance traveled while performing this transition.

As of 2021/06, only soft limits are supported.

.google.cloud.optimization.v1.DistanceLimit distance_limit = 7;

Parameter
NameDescription
builderForValueDistanceLimit.Builder
Returns
TypeDescription
TransitionAttributes.Builder

setDstTag(String value)

public TransitionAttributes.Builder setDstTag(String value)

A destination visit or vehicle end matches iff its VisitRequest.tags or Vehicle.end_tags either contains dst_tag or does not contain excluded_dst_tag (depending on which of these two fields is non-empty).

string dst_tag = 3;

Parameter
NameDescription
valueString

The dstTag to set.

Returns
TypeDescription
TransitionAttributes.Builder

This builder for chaining.

setDstTagBytes(ByteString value)

public TransitionAttributes.Builder setDstTagBytes(ByteString value)

A destination visit or vehicle end matches iff its VisitRequest.tags or Vehicle.end_tags either contains dst_tag or does not contain excluded_dst_tag (depending on which of these two fields is non-empty).

string dst_tag = 3;

Parameter
NameDescription
valueByteString

The bytes for dstTag to set.

Returns
TypeDescription
TransitionAttributes.Builder

This builder for chaining.

setExcludedDstTag(String value)

public TransitionAttributes.Builder setExcludedDstTag(String value)

See dst_tag. Exactly one of dst_tag and excluded_dst_tag must be non-empty.

string excluded_dst_tag = 4;

Parameter
NameDescription
valueString

The excludedDstTag to set.

Returns
TypeDescription
TransitionAttributes.Builder

This builder for chaining.

setExcludedDstTagBytes(ByteString value)

public TransitionAttributes.Builder setExcludedDstTagBytes(ByteString value)

See dst_tag. Exactly one of dst_tag and excluded_dst_tag must be non-empty.

string excluded_dst_tag = 4;

Parameter
NameDescription
valueByteString

The bytes for excludedDstTag to set.

Returns
TypeDescription
TransitionAttributes.Builder

This builder for chaining.

setExcludedSrcTag(String value)

public TransitionAttributes.Builder setExcludedSrcTag(String value)

See src_tag. Exactly one of src_tag and excluded_src_tag must be non-empty.

string excluded_src_tag = 2;

Parameter
NameDescription
valueString

The excludedSrcTag to set.

Returns
TypeDescription
TransitionAttributes.Builder

This builder for chaining.

setExcludedSrcTagBytes(ByteString value)

public TransitionAttributes.Builder setExcludedSrcTagBytes(ByteString value)

See src_tag. Exactly one of src_tag and excluded_src_tag must be non-empty.

string excluded_src_tag = 2;

Parameter
NameDescription
valueByteString

The bytes for excludedSrcTag to set.

Returns
TypeDescription
TransitionAttributes.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public TransitionAttributes.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
TransitionAttributes.Builder
Overrides

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

public TransitionAttributes.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
TransitionAttributes.Builder
Overrides

setSrcTag(String value)

public TransitionAttributes.Builder setSrcTag(String value)

Tags defining the set of (src->dst) transitions these attributes apply to.

A source visit or vehicle start matches iff its VisitRequest.tags or Vehicle.start_tags either contains src_tag or does not contain excluded_src_tag (depending on which of these two fields is non-empty).

string src_tag = 1;

Parameter
NameDescription
valueString

The srcTag to set.

Returns
TypeDescription
TransitionAttributes.Builder

This builder for chaining.

setSrcTagBytes(ByteString value)

public TransitionAttributes.Builder setSrcTagBytes(ByteString value)

Tags defining the set of (src->dst) transitions these attributes apply to.

A source visit or vehicle start matches iff its VisitRequest.tags or Vehicle.start_tags either contains src_tag or does not contain excluded_src_tag (depending on which of these two fields is non-empty).

string src_tag = 1;

Parameter
NameDescription
valueByteString

The bytes for srcTag to set.

Returns
TypeDescription
TransitionAttributes.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final TransitionAttributes.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
TransitionAttributes.Builder
Overrides