Class ShipmentTypeIncompatibility.Builder (1.43.0)

public static final class ShipmentTypeIncompatibility.Builder extends GeneratedMessageV3.Builder<ShipmentTypeIncompatibility.Builder> implements ShipmentTypeIncompatibilityOrBuilder

Specifies incompatibilties between shipments depending on their shipment_type. The appearance of incompatible shipments on the same route is restricted based on the incompatibility mode.

Protobuf type google.cloud.optimization.v1.ShipmentTypeIncompatibility

Static Methods

getDescriptor()

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

Methods

addAllTypes(Iterable<String> values)

public ShipmentTypeIncompatibility.Builder addAllTypes(Iterable<String> values)

List of incompatible types. Two shipments having different shipment_types among those listed are "incompatible".

repeated string types = 1;

Parameter
Name Description
values Iterable<String>

The types to add.

Returns
Type Description
ShipmentTypeIncompatibility.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

addTypes(String value)

public ShipmentTypeIncompatibility.Builder addTypes(String value)

List of incompatible types. Two shipments having different shipment_types among those listed are "incompatible".

repeated string types = 1;

Parameter
Name Description
value String

The types to add.

Returns
Type Description
ShipmentTypeIncompatibility.Builder

This builder for chaining.

addTypesBytes(ByteString value)

public ShipmentTypeIncompatibility.Builder addTypesBytes(ByteString value)

List of incompatible types. Two shipments having different shipment_types among those listed are "incompatible".

repeated string types = 1;

Parameter
Name Description
value ByteString

The bytes of the types to add.

Returns
Type Description
ShipmentTypeIncompatibility.Builder

This builder for chaining.

build()

public ShipmentTypeIncompatibility build()
Returns
Type Description
ShipmentTypeIncompatibility

buildPartial()

public ShipmentTypeIncompatibility buildPartial()
Returns
Type Description
ShipmentTypeIncompatibility

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearIncompatibilityMode()

public ShipmentTypeIncompatibility.Builder clearIncompatibilityMode()

Mode applied to the incompatibility.

.google.cloud.optimization.v1.ShipmentTypeIncompatibility.IncompatibilityMode incompatibility_mode = 2;

Returns
Type Description
ShipmentTypeIncompatibility.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearTypes()

public ShipmentTypeIncompatibility.Builder clearTypes()

List of incompatible types. Two shipments having different shipment_types among those listed are "incompatible".

repeated string types = 1;

Returns
Type Description
ShipmentTypeIncompatibility.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public ShipmentTypeIncompatibility getDefaultInstanceForType()
Returns
Type Description
ShipmentTypeIncompatibility

getDescriptorForType()

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

getIncompatibilityMode()

public ShipmentTypeIncompatibility.IncompatibilityMode getIncompatibilityMode()

Mode applied to the incompatibility.

.google.cloud.optimization.v1.ShipmentTypeIncompatibility.IncompatibilityMode incompatibility_mode = 2;

Returns
Type Description
ShipmentTypeIncompatibility.IncompatibilityMode

The incompatibilityMode.

getIncompatibilityModeValue()

public int getIncompatibilityModeValue()

Mode applied to the incompatibility.

.google.cloud.optimization.v1.ShipmentTypeIncompatibility.IncompatibilityMode incompatibility_mode = 2;

Returns
Type Description
int

The enum numeric value on the wire for incompatibilityMode.

getTypes(int index)

public String getTypes(int index)

List of incompatible types. Two shipments having different shipment_types among those listed are "incompatible".

repeated string types = 1;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The types at the given index.

getTypesBytes(int index)

public ByteString getTypesBytes(int index)

List of incompatible types. Two shipments having different shipment_types among those listed are "incompatible".

repeated string types = 1;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the types at the given index.

getTypesCount()

public int getTypesCount()

List of incompatible types. Two shipments having different shipment_types among those listed are "incompatible".

repeated string types = 1;

Returns
Type Description
int

The count of types.

getTypesList()

public ProtocolStringList getTypesList()

List of incompatible types. Two shipments having different shipment_types among those listed are "incompatible".

repeated string types = 1;

Returns
Type Description
ProtocolStringList

A list containing the types.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(ShipmentTypeIncompatibility other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

setIncompatibilityMode(ShipmentTypeIncompatibility.IncompatibilityMode value)

public ShipmentTypeIncompatibility.Builder setIncompatibilityMode(ShipmentTypeIncompatibility.IncompatibilityMode value)

Mode applied to the incompatibility.

.google.cloud.optimization.v1.ShipmentTypeIncompatibility.IncompatibilityMode incompatibility_mode = 2;

Parameter
Name Description
value ShipmentTypeIncompatibility.IncompatibilityMode

The incompatibilityMode to set.

Returns
Type Description
ShipmentTypeIncompatibility.Builder

This builder for chaining.

setIncompatibilityModeValue(int value)

public ShipmentTypeIncompatibility.Builder setIncompatibilityModeValue(int value)

Mode applied to the incompatibility.

.google.cloud.optimization.v1.ShipmentTypeIncompatibility.IncompatibilityMode incompatibility_mode = 2;

Parameter
Name Description
value int

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

Returns
Type Description
ShipmentTypeIncompatibility.Builder

This builder for chaining.

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

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

setTypes(int index, String value)

public ShipmentTypeIncompatibility.Builder setTypes(int index, String value)

List of incompatible types. Two shipments having different shipment_types among those listed are "incompatible".

repeated string types = 1;

Parameters
Name Description
index int

The index to set the value at.

value String

The types to set.

Returns
Type Description
ShipmentTypeIncompatibility.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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