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.GeneratedMessage.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.GeneratedMessage.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 type google.cloud.optimization.v1.SkippedShipment.Reason-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()Refer to the comments of Code.If the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one capacity type that is exceeded.If the reason is related to a shipment-vehicle incompatibility, this field provides the index of one relevant vehicle.getCode()Refer to the comments of Code.intRefer to the comments of Code.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorIf the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one capacity type that is exceeded.com.google.protobuf.ByteStringIf the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one capacity type that is exceeded.intIf the reason is related to a shipment-vehicle incompatibility, this field provides the index of one relevant vehicle.booleanIf the reason is related to a shipment-vehicle incompatibility, this field provides the index of one relevant vehicle.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(SkippedShipment.Reason other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) Refer to the comments of Code.setCodeValue(int value) Refer to the comments of Code.If the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one capacity type that is exceeded.setExampleExceededCapacityTypeBytes(com.google.protobuf.ByteString value) If the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one capacity type that is exceeded.setExampleVehicleIndex(int value) If the reason is related to a shipment-vehicle incompatibility, this field provides the index of one relevant vehicle.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<SkippedShipment.Reason.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<SkippedShipment.Reason.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<SkippedShipment.Reason.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<SkippedShipment.Reason.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<SkippedShipment.Reason.Builder>
-
mergeFrom
public SkippedShipment.Reason.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin 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:
getCodeValuein interfaceSkippedShipment.ReasonOrBuilder- Returns:
- The enum numeric value on the wire for code.
-
setCodeValue
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
Refer to the comments of Code.
.google.cloud.optimization.v1.SkippedShipment.Reason.Code code = 1;- Specified by:
getCodein interfaceSkippedShipment.ReasonOrBuilder- Returns:
- The code.
-
setCode
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
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:
hasExampleVehicleIndexin 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:
getExampleVehicleIndexin interfaceSkippedShipment.ReasonOrBuilder- Returns:
- The exampleVehicleIndex.
-
setExampleVehicleIndex
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
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
If the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one capacity type that is exceeded.
string example_exceeded_capacity_type = 3;- Specified by:
getExampleExceededCapacityTypein 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:
getExampleExceededCapacityTypeBytesin interfaceSkippedShipment.ReasonOrBuilder- Returns:
- The bytes for exampleExceededCapacityType.
-
setExampleExceededCapacityType
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
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.
-