Class TransitionAttributes.Builder (1.42.0)

publicstaticfinalclass TransitionAttributes.BuilderextendsGeneratedMessageV3.Builder<TransitionAttributes.Builder>implementsTransitionAttributesOrBuilder

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

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()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

publicTransitionAttributes.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
TransitionAttributes.Builder
Overrides

build()

publicTransitionAttributesbuild()
Returns
Type Description
TransitionAttributes

buildPartial()

publicTransitionAttributesbuildPartial()
Returns
Type Description
TransitionAttributes

clear()

publicTransitionAttributes.Builderclear()
Returns
Type Description
TransitionAttributes.Builder
Overrides

clearCost()

publicTransitionAttributes.BuilderclearCost()

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
Type Description
TransitionAttributes.Builder

This builder for chaining.

clearCostPerKilometer()

publicTransitionAttributes.BuilderclearCostPerKilometer()

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
Type Description
TransitionAttributes.Builder

This builder for chaining.

clearDelay()

publicTransitionAttributes.BuilderclearDelay()

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
Type Description
TransitionAttributes.Builder

clearDistanceLimit()

publicTransitionAttributes.BuilderclearDistanceLimit()

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
Type Description
TransitionAttributes.Builder

clearDstTag()

publicTransitionAttributes.BuilderclearDstTag()

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
Type Description
TransitionAttributes.Builder

This builder for chaining.

clearExcludedDstTag()

publicTransitionAttributes.BuilderclearExcludedDstTag()

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

string excluded_dst_tag = 4;

Returns
Type Description
TransitionAttributes.Builder

This builder for chaining.

clearExcludedSrcTag()

publicTransitionAttributes.BuilderclearExcludedSrcTag()

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

string excluded_src_tag = 2;

Returns
Type Description
TransitionAttributes.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

publicTransitionAttributes.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
TransitionAttributes.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

publicTransitionAttributes.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
TransitionAttributes.Builder
Overrides

clearSrcTag()

publicTransitionAttributes.BuilderclearSrcTag()

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
Type Description
TransitionAttributes.Builder

This builder for chaining.

clone()

publicTransitionAttributes.Builderclone()
Returns
Type Description
TransitionAttributes.Builder
Overrides

getCost()

publicdoublegetCost()

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
Type Description
double

The cost.

getCostPerKilometer()

publicdoublegetCostPerKilometer()

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
Type Description
double

The costPerKilometer.

getDefaultInstanceForType()

publicTransitionAttributesgetDefaultInstanceForType()
Returns
Type Description
TransitionAttributes

getDelay()

publicDurationgetDelay()

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
Type Description
Duration

The delay.

getDelayBuilder()

publicDuration.BuildergetDelayBuilder()

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
Type Description
Builder

getDelayOrBuilder()

publicDurationOrBuildergetDelayOrBuilder()

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
Type Description
DurationOrBuilder

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getDistanceLimit()

publicDistanceLimitgetDistanceLimit()

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
Type Description
DistanceLimit

The distanceLimit.

getDistanceLimitBuilder()

publicDistanceLimit.BuildergetDistanceLimitBuilder()

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
Type Description
DistanceLimit.Builder

getDistanceLimitOrBuilder()

publicDistanceLimitOrBuildergetDistanceLimitOrBuilder()

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
Type Description
DistanceLimitOrBuilder

getDstTag()

publicStringgetDstTag()

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
Type Description
String

The dstTag.

getDstTagBytes()

publicByteStringgetDstTagBytes()

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
Type Description
ByteString

The bytes for dstTag.

getExcludedDstTag()

publicStringgetExcludedDstTag()

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

string excluded_dst_tag = 4;

Returns
Type Description
String

The excludedDstTag.

getExcludedDstTagBytes()

publicByteStringgetExcludedDstTagBytes()

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

string excluded_dst_tag = 4;

Returns
Type Description
ByteString

The bytes for excludedDstTag.

getExcludedSrcTag()

publicStringgetExcludedSrcTag()

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

string excluded_src_tag = 2;

Returns
Type Description
String

The excludedSrcTag.

getExcludedSrcTagBytes()

publicByteStringgetExcludedSrcTagBytes()

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

string excluded_src_tag = 2;

Returns
Type Description
ByteString

The bytes for excludedSrcTag.

getSrcTag()

publicStringgetSrcTag()

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
Type Description
String

The srcTag.

getSrcTagBytes()

publicByteStringgetSrcTagBytes()

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
Type Description
ByteString

The bytes for srcTag.

hasDelay()

publicbooleanhasDelay()

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
Type Description
boolean

Whether the delay field is set.

hasDistanceLimit()

publicbooleanhasDistanceLimit()

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
Type Description
boolean

Whether the distanceLimit field is set.

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

mergeDelay(Duration value)

publicTransitionAttributes.BuildermergeDelay(Durationvalue)

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
Name Description
value Duration
Returns
Type Description
TransitionAttributes.Builder

mergeDistanceLimit(DistanceLimit value)

publicTransitionAttributes.BuildermergeDistanceLimit(DistanceLimitvalue)

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
Name Description
value DistanceLimit
Returns
Type Description
TransitionAttributes.Builder

mergeFrom(TransitionAttributes other)

publicTransitionAttributes.BuildermergeFrom(TransitionAttributesother)
Parameter
Name Description
other TransitionAttributes
Returns
Type Description
TransitionAttributes.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicTransitionAttributes.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TransitionAttributes.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

publicTransitionAttributes.BuildermergeFrom(Messageother)
Parameter
Name Description
other Message
Returns
Type Description
TransitionAttributes.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalTransitionAttributes.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
TransitionAttributes.Builder
Overrides

setCost(double value)

publicTransitionAttributes.BuildersetCost(doublevalue)

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
Name Description
value double

The cost to set.

Returns
Type Description
TransitionAttributes.Builder

This builder for chaining.

setCostPerKilometer(double value)

publicTransitionAttributes.BuildersetCostPerKilometer(doublevalue)

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
Name Description
value double

The costPerKilometer to set.

Returns
Type Description
TransitionAttributes.Builder

This builder for chaining.

setDelay(Duration value)

publicTransitionAttributes.BuildersetDelay(Durationvalue)

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
Name Description
value Duration
Returns
Type Description
TransitionAttributes.Builder

setDelay(Duration.Builder builderForValue)

publicTransitionAttributes.BuildersetDelay(Duration.BuilderbuilderForValue)

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
Name Description
builderForValue Builder
Returns
Type Description
TransitionAttributes.Builder

setDistanceLimit(DistanceLimit value)

publicTransitionAttributes.BuildersetDistanceLimit(DistanceLimitvalue)

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
Name Description
value DistanceLimit
Returns
Type Description
TransitionAttributes.Builder

setDistanceLimit(DistanceLimit.Builder builderForValue)

publicTransitionAttributes.BuildersetDistanceLimit(DistanceLimit.BuilderbuilderForValue)

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
Name Description
builderForValue DistanceLimit.Builder
Returns
Type Description
TransitionAttributes.Builder

setDstTag(String value)

publicTransitionAttributes.BuildersetDstTag(Stringvalue)

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
Name Description
value String

The dstTag to set.

Returns
Type Description
TransitionAttributes.Builder

This builder for chaining.

setDstTagBytes(ByteString value)

publicTransitionAttributes.BuildersetDstTagBytes(ByteStringvalue)

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
Name Description
value ByteString

The bytes for dstTag to set.

Returns
Type Description
TransitionAttributes.Builder

This builder for chaining.

setExcludedDstTag(String value)

publicTransitionAttributes.BuildersetExcludedDstTag(Stringvalue)

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

string excluded_dst_tag = 4;

Parameter
Name Description
value String

The excludedDstTag to set.

Returns
Type Description
TransitionAttributes.Builder

This builder for chaining.

setExcludedDstTagBytes(ByteString value)

publicTransitionAttributes.BuildersetExcludedDstTagBytes(ByteStringvalue)

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

string excluded_dst_tag = 4;

Parameter
Name Description
value ByteString

The bytes for excludedDstTag to set.

Returns
Type Description
TransitionAttributes.Builder

This builder for chaining.

setExcludedSrcTag(String value)

publicTransitionAttributes.BuildersetExcludedSrcTag(Stringvalue)

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

string excluded_src_tag = 2;

Parameter
Name Description
value String

The excludedSrcTag to set.

Returns
Type Description
TransitionAttributes.Builder

This builder for chaining.

setExcludedSrcTagBytes(ByteString value)

publicTransitionAttributes.BuildersetExcludedSrcTagBytes(ByteStringvalue)

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

string excluded_src_tag = 2;

Parameter
Name Description
value ByteString

The bytes for excludedSrcTag to set.

Returns
Type Description
TransitionAttributes.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

publicTransitionAttributes.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
TransitionAttributes.Builder
Overrides

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

publicTransitionAttributes.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
TransitionAttributes.Builder
Overrides

setSrcTag(String value)

publicTransitionAttributes.BuildersetSrcTag(Stringvalue)

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
Name Description
value String

The srcTag to set.

Returns
Type Description
TransitionAttributes.Builder

This builder for chaining.

setSrcTagBytes(ByteString value)

publicTransitionAttributes.BuildersetSrcTagBytes(ByteStringvalue)

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
Name Description
value ByteString

The bytes for srcTag to set.

Returns
Type Description
TransitionAttributes.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalTransitionAttributes.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
TransitionAttributes.Builder
Overrides

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.