Package com.google.cloud.optimization.v1
Class SkippedShipment.Reason.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<SkippedShipment.Reason.Builder>
-
- com.google.cloud.optimization.v1.SkippedShipment.Reason.Builder
-
- All Implemented Interfaces:
SkippedShipment.ReasonOrBuilder
,com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Cloneable
- Enclosing class:
- SkippedShipment.Reason
public static final class SkippedShipment.Reason.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<SkippedShipment.Reason.Builder> implements SkippedShipment.ReasonOrBuilder
If we can explain why the shipment was skipped, reasons will be listed here. If the reason is not the same for all vehicles, `reason` will have more than 1 element. A skipped shipment cannot have duplicate reasons, i.e. where all fields are the same except for `example_vehicle_index`. Example: ``` reasons { code: DEMAND_EXCEEDS_VEHICLE_CAPACITY example_vehicle_index: 1 example_exceeded_capacity_type: "Apples" } reasons { code: DEMAND_EXCEEDS_VEHICLE_CAPACITY example_vehicle_index: 3 example_exceeded_capacity_type: "Pears" } reasons { code: CANNOT_BE_PERFORMED_WITHIN_VEHICLE_DISTANCE_LIMIT example_vehicle_index: 1 } ``` The skipped shipment is incompatible with all vehicles. The reasons may be different for all vehicles but at least one vehicle's "Apples" capacity would be exceeded (including vehicle 1), at least one vehicle's "Pears" capacity would be exceeded (including vehicle 3) and at least one vehicle's distance limit would be exceeded (including vehicle 1).
Protobuf typegoogle.cloud.optimization.v1.SkippedShipment.Reason
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SkippedShipment.Reason.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
SkippedShipment.Reason
build()
SkippedShipment.Reason
buildPartial()
SkippedShipment.Reason.Builder
clear()
SkippedShipment.Reason.Builder
clearCode()
Refer to the comments of Code.SkippedShipment.Reason.Builder
clearExampleExceededCapacityType()
If the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one capacity type that is exceeded.SkippedShipment.Reason.Builder
clearExampleVehicleIndex()
If the reason is related to a shipment-vehicle incompatibility, this field provides the index of one relevant vehicle.SkippedShipment.Reason.Builder
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
SkippedShipment.Reason.Builder
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
SkippedShipment.Reason.Builder
clone()
SkippedShipment.Reason.Code
getCode()
Refer to the comments of Code.int
getCodeValue()
Refer to the comments of Code.SkippedShipment.Reason
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
String
getExampleExceededCapacityType()
If the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one capacity type that is exceeded.com.google.protobuf.ByteString
getExampleExceededCapacityTypeBytes()
If the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one capacity type that is exceeded.int
getExampleVehicleIndex()
If the reason is related to a shipment-vehicle incompatibility, this field provides the index of one relevant vehicle.boolean
hasExampleVehicleIndex()
If the reason is related to a shipment-vehicle incompatibility, this field provides the index of one relevant vehicle.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
SkippedShipment.Reason.Builder
mergeFrom(SkippedShipment.Reason other)
SkippedShipment.Reason.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
SkippedShipment.Reason.Builder
mergeFrom(com.google.protobuf.Message other)
SkippedShipment.Reason.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
SkippedShipment.Reason.Builder
setCode(SkippedShipment.Reason.Code value)
Refer to the comments of Code.SkippedShipment.Reason.Builder
setCodeValue(int value)
Refer to the comments of Code.SkippedShipment.Reason.Builder
setExampleExceededCapacityType(String value)
If the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one capacity type that is exceeded.SkippedShipment.Reason.Builder
setExampleExceededCapacityTypeBytes(com.google.protobuf.ByteString value)
If the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one capacity type that is exceeded.SkippedShipment.Reason.Builder
setExampleVehicleIndex(int value)
If the reason is related to a shipment-vehicle incompatibility, this field provides the index of one relevant vehicle.SkippedShipment.Reason.Builder
setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
SkippedShipment.Reason.Builder
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
SkippedShipment.Reason.Builder
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<SkippedShipment.Reason.Builder>
-
clear
public SkippedShipment.Reason.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<SkippedShipment.Reason.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<SkippedShipment.Reason.Builder>
-
getDefaultInstanceForType
public SkippedShipment.Reason getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public SkippedShipment.Reason build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public SkippedShipment.Reason buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public SkippedShipment.Reason.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<SkippedShipment.Reason.Builder>
-
setField
public SkippedShipment.Reason.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<SkippedShipment.Reason.Builder>
-
clearField
public SkippedShipment.Reason.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<SkippedShipment.Reason.Builder>
-
clearOneof
public SkippedShipment.Reason.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<SkippedShipment.Reason.Builder>
-
setRepeatedField
public SkippedShipment.Reason.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<SkippedShipment.Reason.Builder>
-
addRepeatedField
public SkippedShipment.Reason.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<SkippedShipment.Reason.Builder>
-
mergeFrom
public SkippedShipment.Reason.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<SkippedShipment.Reason.Builder>
-
mergeFrom
public SkippedShipment.Reason.Builder mergeFrom(SkippedShipment.Reason other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.Builder<SkippedShipment.Reason.Builder>
-
mergeFrom
public SkippedShipment.Reason.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<SkippedShipment.Reason.Builder>
- Throws:
IOException
-
getCodeValue
public int getCodeValue()
Refer to the comments of Code.
.google.cloud.optimization.v1.SkippedShipment.Reason.Code code = 1;
- Specified by:
getCodeValue
in interfaceSkippedShipment.ReasonOrBuilder
- Returns:
- The enum numeric value on the wire for code.
-
setCodeValue
public SkippedShipment.Reason.Builder setCodeValue(int value)
Refer to the comments of Code.
.google.cloud.optimization.v1.SkippedShipment.Reason.Code code = 1;
- Parameters:
value
- The enum numeric value on the wire for code to set.- Returns:
- This builder for chaining.
-
getCode
public SkippedShipment.Reason.Code getCode()
Refer to the comments of Code.
.google.cloud.optimization.v1.SkippedShipment.Reason.Code code = 1;
- Specified by:
getCode
in interfaceSkippedShipment.ReasonOrBuilder
- Returns:
- The code.
-
setCode
public SkippedShipment.Reason.Builder setCode(SkippedShipment.Reason.Code value)
Refer to the comments of Code.
.google.cloud.optimization.v1.SkippedShipment.Reason.Code code = 1;
- Parameters:
value
- The code to set.- Returns:
- This builder for chaining.
-
clearCode
public SkippedShipment.Reason.Builder clearCode()
Refer to the comments of Code.
.google.cloud.optimization.v1.SkippedShipment.Reason.Code code = 1;
- Returns:
- This builder for chaining.
-
hasExampleVehicleIndex
public boolean hasExampleVehicleIndex()
If the reason is related to a shipment-vehicle incompatibility, this field provides the index of one relevant vehicle.
optional int32 example_vehicle_index = 2;
- Specified by:
hasExampleVehicleIndex
in interfaceSkippedShipment.ReasonOrBuilder
- Returns:
- Whether the exampleVehicleIndex field is set.
-
getExampleVehicleIndex
public int getExampleVehicleIndex()
If the reason is related to a shipment-vehicle incompatibility, this field provides the index of one relevant vehicle.
optional int32 example_vehicle_index = 2;
- Specified by:
getExampleVehicleIndex
in interfaceSkippedShipment.ReasonOrBuilder
- Returns:
- The exampleVehicleIndex.
-
setExampleVehicleIndex
public SkippedShipment.Reason.Builder setExampleVehicleIndex(int value)
If the reason is related to a shipment-vehicle incompatibility, this field provides the index of one relevant vehicle.
optional int32 example_vehicle_index = 2;
- Parameters:
value
- The exampleVehicleIndex to set.- Returns:
- This builder for chaining.
-
clearExampleVehicleIndex
public SkippedShipment.Reason.Builder clearExampleVehicleIndex()
If the reason is related to a shipment-vehicle incompatibility, this field provides the index of one relevant vehicle.
optional int32 example_vehicle_index = 2;
- Returns:
- This builder for chaining.
-
getExampleExceededCapacityType
public String getExampleExceededCapacityType()
If the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one capacity type that is exceeded.
string example_exceeded_capacity_type = 3;
- Specified by:
getExampleExceededCapacityType
in interfaceSkippedShipment.ReasonOrBuilder
- Returns:
- The exampleExceededCapacityType.
-
getExampleExceededCapacityTypeBytes
public com.google.protobuf.ByteString getExampleExceededCapacityTypeBytes()
If the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one capacity type that is exceeded.
string example_exceeded_capacity_type = 3;
- Specified by:
getExampleExceededCapacityTypeBytes
in interfaceSkippedShipment.ReasonOrBuilder
- Returns:
- The bytes for exampleExceededCapacityType.
-
setExampleExceededCapacityType
public SkippedShipment.Reason.Builder setExampleExceededCapacityType(String value)
If the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one capacity type that is exceeded.
string example_exceeded_capacity_type = 3;
- Parameters:
value
- The exampleExceededCapacityType to set.- Returns:
- This builder for chaining.
-
clearExampleExceededCapacityType
public SkippedShipment.Reason.Builder clearExampleExceededCapacityType()
If the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one capacity type that is exceeded.
string example_exceeded_capacity_type = 3;
- Returns:
- This builder for chaining.
-
setExampleExceededCapacityTypeBytes
public SkippedShipment.Reason.Builder setExampleExceededCapacityTypeBytes(com.google.protobuf.ByteString value)
If the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one capacity type that is exceeded.
string example_exceeded_capacity_type = 3;
- Parameters:
value
- The bytes for exampleExceededCapacityType to set.- Returns:
- This builder for chaining.
-
setUnknownFields
public final SkippedShipment.Reason.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<SkippedShipment.Reason.Builder>
-
mergeUnknownFields
public final SkippedShipment.Reason.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<SkippedShipment.Reason.Builder>
-
-