Class ShipmentTypeIncompatibility.Builder (1.37.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
TypeDescription
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
NameDescription
valuesIterable<String>

The types to add.

Returns
TypeDescription
ShipmentTypeIncompatibility.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public ShipmentTypeIncompatibility.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The types to add.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes of the types to add.

Returns
TypeDescription
ShipmentTypeIncompatibility.Builder

This builder for chaining.

build()

public ShipmentTypeIncompatibility build()
Returns
TypeDescription
ShipmentTypeIncompatibility

buildPartial()

public ShipmentTypeIncompatibility buildPartial()
Returns
TypeDescription
ShipmentTypeIncompatibility

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearIncompatibilityMode()

public ShipmentTypeIncompatibility.Builder clearIncompatibilityMode()

Mode applied to the incompatibility.

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

Returns
TypeDescription
ShipmentTypeIncompatibility.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public ShipmentTypeIncompatibility.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
ShipmentTypeIncompatibility.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public ShipmentTypeIncompatibility getDefaultInstanceForType()
Returns
TypeDescription
ShipmentTypeIncompatibility

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getIncompatibilityMode()

public ShipmentTypeIncompatibility.IncompatibilityMode getIncompatibilityMode()

Mode applied to the incompatibility.

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

Returns
TypeDescription
ShipmentTypeIncompatibility.IncompatibilityMode

The incompatibilityMode.

getIncompatibilityModeValue()

public int getIncompatibilityModeValue()

Mode applied to the incompatibility.

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

Returns
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ProtocolStringList

A list containing the types.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(ShipmentTypeIncompatibility other)

public ShipmentTypeIncompatibility.Builder mergeFrom(ShipmentTypeIncompatibility other)
Parameter
NameDescription
otherShipmentTypeIncompatibility
Returns
TypeDescription
ShipmentTypeIncompatibility.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

public ShipmentTypeIncompatibility.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueShipmentTypeIncompatibility.IncompatibilityMode

The incompatibilityMode to set.

Returns
TypeDescription
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
NameDescription
valueint

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

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
indexint

The index to set the value at.

valueString

The types to set.

Returns
TypeDescription
ShipmentTypeIncompatibility.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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