Class ShipmentTypeRequirement.Builder (1.50.0)

public static final class ShipmentTypeRequirement.Builder extends GeneratedMessageV3.Builder<ShipmentTypeRequirement.Builder> implements ShipmentTypeRequirementOrBuilder

Specifies requirements between shipments based on their shipment_type. The specifics of the requirement are defined by the requirement mode.

Protobuf type google.cloud.optimization.v1.ShipmentTypeRequirement

Static Methods

getDescriptor()

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

Methods

addAllDependentShipmentTypes(Iterable<String> values)

public ShipmentTypeRequirement.Builder addAllDependentShipmentTypes(Iterable<String> values)

All shipments with a type in the dependent_shipment_types field require at least one shipment of type required_shipment_type_alternatives to be visited on the same route.

NOTE: Chains of requirements such that a shipment_type depends on itself are not allowed.

repeated string dependent_shipment_types = 2;

Parameter
Name Description
values Iterable<String>

The dependentShipmentTypes to add.

Returns
Type Description
ShipmentTypeRequirement.Builder

This builder for chaining.

addAllRequiredShipmentTypeAlternatives(Iterable<String> values)

public ShipmentTypeRequirement.Builder addAllRequiredShipmentTypeAlternatives(Iterable<String> values)

List of alternative shipment types required by the dependent_shipment_types.

repeated string required_shipment_type_alternatives = 1;

Parameter
Name Description
values Iterable<String>

The requiredShipmentTypeAlternatives to add.

Returns
Type Description
ShipmentTypeRequirement.Builder

This builder for chaining.

addDependentShipmentTypes(String value)

public ShipmentTypeRequirement.Builder addDependentShipmentTypes(String value)

All shipments with a type in the dependent_shipment_types field require at least one shipment of type required_shipment_type_alternatives to be visited on the same route.

NOTE: Chains of requirements such that a shipment_type depends on itself are not allowed.

repeated string dependent_shipment_types = 2;

Parameter
Name Description
value String

The dependentShipmentTypes to add.

Returns
Type Description
ShipmentTypeRequirement.Builder

This builder for chaining.

addDependentShipmentTypesBytes(ByteString value)

public ShipmentTypeRequirement.Builder addDependentShipmentTypesBytes(ByteString value)

All shipments with a type in the dependent_shipment_types field require at least one shipment of type required_shipment_type_alternatives to be visited on the same route.

NOTE: Chains of requirements such that a shipment_type depends on itself are not allowed.

repeated string dependent_shipment_types = 2;

Parameter
Name Description
value ByteString

The bytes of the dependentShipmentTypes to add.

Returns
Type Description
ShipmentTypeRequirement.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

addRequiredShipmentTypeAlternatives(String value)

public ShipmentTypeRequirement.Builder addRequiredShipmentTypeAlternatives(String value)

List of alternative shipment types required by the dependent_shipment_types.

repeated string required_shipment_type_alternatives = 1;

Parameter
Name Description
value String

The requiredShipmentTypeAlternatives to add.

Returns
Type Description
ShipmentTypeRequirement.Builder

This builder for chaining.

addRequiredShipmentTypeAlternativesBytes(ByteString value)

public ShipmentTypeRequirement.Builder addRequiredShipmentTypeAlternativesBytes(ByteString value)

List of alternative shipment types required by the dependent_shipment_types.

repeated string required_shipment_type_alternatives = 1;

Parameter
Name Description
value ByteString

The bytes of the requiredShipmentTypeAlternatives to add.

Returns
Type Description
ShipmentTypeRequirement.Builder

This builder for chaining.

build()

public ShipmentTypeRequirement build()
Returns
Type Description
ShipmentTypeRequirement

buildPartial()

public ShipmentTypeRequirement buildPartial()
Returns
Type Description
ShipmentTypeRequirement

clear()

public ShipmentTypeRequirement.Builder clear()
Returns
Type Description
ShipmentTypeRequirement.Builder
Overrides

clearDependentShipmentTypes()

public ShipmentTypeRequirement.Builder clearDependentShipmentTypes()

All shipments with a type in the dependent_shipment_types field require at least one shipment of type required_shipment_type_alternatives to be visited on the same route.

NOTE: Chains of requirements such that a shipment_type depends on itself are not allowed.

repeated string dependent_shipment_types = 2;

Returns
Type Description
ShipmentTypeRequirement.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearRequiredShipmentTypeAlternatives()

public ShipmentTypeRequirement.Builder clearRequiredShipmentTypeAlternatives()

List of alternative shipment types required by the dependent_shipment_types.

repeated string required_shipment_type_alternatives = 1;

Returns
Type Description
ShipmentTypeRequirement.Builder

This builder for chaining.

clearRequirementMode()

public ShipmentTypeRequirement.Builder clearRequirementMode()

Mode applied to the requirement.

.google.cloud.optimization.v1.ShipmentTypeRequirement.RequirementMode requirement_mode = 3;

Returns
Type Description
ShipmentTypeRequirement.Builder

This builder for chaining.

clone()

public ShipmentTypeRequirement.Builder clone()
Returns
Type Description
ShipmentTypeRequirement.Builder
Overrides

getDefaultInstanceForType()

public ShipmentTypeRequirement getDefaultInstanceForType()
Returns
Type Description
ShipmentTypeRequirement

getDependentShipmentTypes(int index)

public String getDependentShipmentTypes(int index)

All shipments with a type in the dependent_shipment_types field require at least one shipment of type required_shipment_type_alternatives to be visited on the same route.

NOTE: Chains of requirements such that a shipment_type depends on itself are not allowed.

repeated string dependent_shipment_types = 2;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The dependentShipmentTypes at the given index.

getDependentShipmentTypesBytes(int index)

public ByteString getDependentShipmentTypesBytes(int index)

All shipments with a type in the dependent_shipment_types field require at least one shipment of type required_shipment_type_alternatives to be visited on the same route.

NOTE: Chains of requirements such that a shipment_type depends on itself are not allowed.

repeated string dependent_shipment_types = 2;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the dependentShipmentTypes at the given index.

getDependentShipmentTypesCount()

public int getDependentShipmentTypesCount()

All shipments with a type in the dependent_shipment_types field require at least one shipment of type required_shipment_type_alternatives to be visited on the same route.

NOTE: Chains of requirements such that a shipment_type depends on itself are not allowed.

repeated string dependent_shipment_types = 2;

Returns
Type Description
int

The count of dependentShipmentTypes.

getDependentShipmentTypesList()

public ProtocolStringList getDependentShipmentTypesList()

All shipments with a type in the dependent_shipment_types field require at least one shipment of type required_shipment_type_alternatives to be visited on the same route.

NOTE: Chains of requirements such that a shipment_type depends on itself are not allowed.

repeated string dependent_shipment_types = 2;

Returns
Type Description
ProtocolStringList

A list containing the dependentShipmentTypes.

getDescriptorForType()

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

getRequiredShipmentTypeAlternatives(int index)

public String getRequiredShipmentTypeAlternatives(int index)

List of alternative shipment types required by the dependent_shipment_types.

repeated string required_shipment_type_alternatives = 1;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The requiredShipmentTypeAlternatives at the given index.

getRequiredShipmentTypeAlternativesBytes(int index)

public ByteString getRequiredShipmentTypeAlternativesBytes(int index)

List of alternative shipment types required by the dependent_shipment_types.

repeated string required_shipment_type_alternatives = 1;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the requiredShipmentTypeAlternatives at the given index.

getRequiredShipmentTypeAlternativesCount()

public int getRequiredShipmentTypeAlternativesCount()

List of alternative shipment types required by the dependent_shipment_types.

repeated string required_shipment_type_alternatives = 1;

Returns
Type Description
int

The count of requiredShipmentTypeAlternatives.

getRequiredShipmentTypeAlternativesList()

public ProtocolStringList getRequiredShipmentTypeAlternativesList()

List of alternative shipment types required by the dependent_shipment_types.

repeated string required_shipment_type_alternatives = 1;

Returns
Type Description
ProtocolStringList

A list containing the requiredShipmentTypeAlternatives.

getRequirementMode()

public ShipmentTypeRequirement.RequirementMode getRequirementMode()

Mode applied to the requirement.

.google.cloud.optimization.v1.ShipmentTypeRequirement.RequirementMode requirement_mode = 3;

Returns
Type Description
ShipmentTypeRequirement.RequirementMode

The requirementMode.

getRequirementModeValue()

public int getRequirementModeValue()

Mode applied to the requirement.

.google.cloud.optimization.v1.ShipmentTypeRequirement.RequirementMode requirement_mode = 3;

Returns
Type Description
int

The enum numeric value on the wire for requirementMode.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(ShipmentTypeRequirement other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setDependentShipmentTypes(int index, String value)

public ShipmentTypeRequirement.Builder setDependentShipmentTypes(int index, String value)

All shipments with a type in the dependent_shipment_types field require at least one shipment of type required_shipment_type_alternatives to be visited on the same route.

NOTE: Chains of requirements such that a shipment_type depends on itself are not allowed.

repeated string dependent_shipment_types = 2;

Parameters
Name Description
index int

The index to set the value at.

value String

The dependentShipmentTypes to set.

Returns
Type Description
ShipmentTypeRequirement.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setRequiredShipmentTypeAlternatives(int index, String value)

public ShipmentTypeRequirement.Builder setRequiredShipmentTypeAlternatives(int index, String value)

List of alternative shipment types required by the dependent_shipment_types.

repeated string required_shipment_type_alternatives = 1;

Parameters
Name Description
index int

The index to set the value at.

value String

The requiredShipmentTypeAlternatives to set.

Returns
Type Description
ShipmentTypeRequirement.Builder

This builder for chaining.

setRequirementMode(ShipmentTypeRequirement.RequirementMode value)

public ShipmentTypeRequirement.Builder setRequirementMode(ShipmentTypeRequirement.RequirementMode value)

Mode applied to the requirement.

.google.cloud.optimization.v1.ShipmentTypeRequirement.RequirementMode requirement_mode = 3;

Parameter
Name Description
value ShipmentTypeRequirement.RequirementMode

The requirementMode to set.

Returns
Type Description
ShipmentTypeRequirement.Builder

This builder for chaining.

setRequirementModeValue(int value)

public ShipmentTypeRequirement.Builder setRequirementModeValue(int value)

Mode applied to the requirement.

.google.cloud.optimization.v1.ShipmentTypeRequirement.RequirementMode requirement_mode = 3;

Parameter
Name Description
value int

The enum numeric value on the wire for requirementMode to set.

Returns
Type Description
ShipmentTypeRequirement.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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