Class ShipmentModel.PrecedenceRule (1.1.14)

publicstaticfinalclass ShipmentModel.PrecedenceRuleextendsGeneratedMessageV3implementsShipmentModel.PrecedenceRuleOrBuilder

A precedence rule between two events (each event is the pickup or the delivery of a shipment): the "second" event has to start at least offset_duration after "first" has started. Several precedences can refer to the same (or related) events, e.g., "pickup of B happens after delivery of A" and "pickup of C happens after pickup of B". Furthermore, precedences only apply when both shipments are performed and are otherwise ignored.

Protobuf type google.cloud.optimization.v1.ShipmentModel.PrecedenceRule

Inherited Members

Static Fields

FIRST_INDEX_FIELD_NUMBER

publicstaticfinalintFIRST_INDEX_FIELD_NUMBER
Field Value
Type Description
int

FIRST_IS_DELIVERY_FIELD_NUMBER

publicstaticfinalintFIRST_IS_DELIVERY_FIELD_NUMBER
Field Value
Type Description
int

OFFSET_DURATION_FIELD_NUMBER

publicstaticfinalintOFFSET_DURATION_FIELD_NUMBER
Field Value
Type Description
int

SECOND_INDEX_FIELD_NUMBER

publicstaticfinalintSECOND_INDEX_FIELD_NUMBER
Field Value
Type Description
int

SECOND_IS_DELIVERY_FIELD_NUMBER

publicstaticfinalintSECOND_IS_DELIVERY_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

publicstaticShipmentModel.PrecedenceRulegetDefaultInstance()
Returns
Type Description

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description

newBuilder()

publicstaticShipmentModel.PrecedenceRule.BuildernewBuilder()
Returns
Type Description

newBuilder(ShipmentModel.PrecedenceRule prototype)

publicstaticShipmentModel.PrecedenceRule.BuildernewBuilder(ShipmentModel.PrecedenceRuleprototype)
Parameter
Name Description
Returns
Type Description

parseDelimitedFrom(InputStream input)

publicstaticShipmentModel.PrecedenceRuleparseDelimitedFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
Exceptions
Type Description

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticShipmentModel.PrecedenceRuleparseDelimitedFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Exceptions
Type Description

parseFrom(byte[] data)

publicstaticShipmentModel.PrecedenceRuleparseFrom(byte[]data)
Parameter
Name Description
data byte[]
Returns
Type Description
Exceptions
Type Description

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

publicstaticShipmentModel.PrecedenceRuleparseFrom(byte[]data,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Exceptions
Type Description

parseFrom(ByteString data)

publicstaticShipmentModel.PrecedenceRuleparseFrom(ByteStringdata)
Parameter
Name Description
data ByteString
Returns
Type Description
Exceptions
Type Description

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

publicstaticShipmentModel.PrecedenceRuleparseFrom(ByteStringdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Exceptions
Type Description

parseFrom(CodedInputStream input)

publicstaticShipmentModel.PrecedenceRuleparseFrom(CodedInputStreaminput)
Parameter
Name Description
Returns
Type Description
Exceptions
Type Description

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticShipmentModel.PrecedenceRuleparseFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Exceptions
Type Description

parseFrom(InputStream input)

publicstaticShipmentModel.PrecedenceRuleparseFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
Exceptions
Type Description

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticShipmentModel.PrecedenceRuleparseFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Exceptions
Type Description

parseFrom(ByteBuffer data)

publicstaticShipmentModel.PrecedenceRuleparseFrom(ByteBufferdata)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Exceptions
Type Description

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

publicstaticShipmentModel.PrecedenceRuleparseFrom(ByteBufferdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Exceptions
Type Description

parser()

publicstaticParser<ShipmentModel.PrecedenceRule>parser()
Returns
Type Description

Methods

equals(Object obj)

publicbooleanequals(Objectobj)
Parameter
Name Description
obj Object
Returns
Type Description
Overrides

getDefaultInstanceForType()

publicShipmentModel.PrecedenceRulegetDefaultInstanceForType()
Returns
Type Description

getFirstIndex()

publicintgetFirstIndex()

Shipment index of the "first" event. This field must be specified.

optional int32 first_index = 1;

Returns
Type Description
int

The firstIndex.

getFirstIsDelivery()

publicbooleangetFirstIsDelivery()

Indicates if the "first" event is a delivery.

bool first_is_delivery = 3;

Returns
Type Description
boolean

The firstIsDelivery.

getOffsetDuration()

publicDurationgetOffsetDuration()

The offset between the "first" and "second" event. It can be negative.

.google.protobuf.Duration offset_duration = 5;

Returns
Type Description
Duration

The offsetDuration.

getOffsetDurationOrBuilder()

publicDurationOrBuildergetOffsetDurationOrBuilder()

The offset between the "first" and "second" event. It can be negative.

.google.protobuf.Duration offset_duration = 5;

Returns
Type Description

getParserForType()

publicParser<ShipmentModel.PrecedenceRule>getParserForType()
Returns
Type Description
Overrides

getSecondIndex()

publicintgetSecondIndex()

Shipment index of the "second" event. This field must be specified.

optional int32 second_index = 2;

Returns
Type Description
int

The secondIndex.

getSecondIsDelivery()

publicbooleangetSecondIsDelivery()

Indicates if the "second" event is a delivery.

bool second_is_delivery = 4;

Returns
Type Description
boolean

The secondIsDelivery.

getSerializedSize()

publicintgetSerializedSize()
Returns
Type Description
int
Overrides

getUnknownFields()

publicfinalUnknownFieldSetgetUnknownFields()
Returns
Type Description
Overrides

hasFirstIndex()

publicbooleanhasFirstIndex()

Shipment index of the "first" event. This field must be specified.

optional int32 first_index = 1;

Returns
Type Description
boolean

Whether the firstIndex field is set.

hasOffsetDuration()

publicbooleanhasOffsetDuration()

The offset between the "first" and "second" event. It can be negative.

.google.protobuf.Duration offset_duration = 5;

Returns
Type Description
boolean

Whether the offsetDuration field is set.

hasSecondIndex()

publicbooleanhasSecondIndex()

Shipment index of the "second" event. This field must be specified.

optional int32 second_index = 2;

Returns
Type Description
boolean

Whether the secondIndex field is set.

hashCode()

publicinthashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
Overrides

newBuilderForType()

publicShipmentModel.PrecedenceRule.BuildernewBuilderForType()
Returns
Type Description

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protectedShipmentModel.PrecedenceRule.BuildernewBuilderForType(GeneratedMessageV3.BuilderParentparent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protectedObjectnewInstance(GeneratedMessageV3.UnusedPrivateParameterunused)
Parameter
Name Description
Returns
Type Description
Overrides

toBuilder()

publicShipmentModel.PrecedenceRule.BuildertoBuilder()
Returns
Type Description

writeTo(CodedOutputStream output)

publicvoidwriteTo(CodedOutputStreamoutput)
Parameter
Name Description
Overrides Exceptions
Type Description

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.