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.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)SkippedShipment.Reasonbuild()SkippedShipment.ReasonbuildPartial()SkippedShipment.Reason.Builderclear()SkippedShipment.Reason.BuilderclearCode()Refer to the comments of Code.SkippedShipment.Reason.BuilderclearExampleExceededCapacityType()If the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one capacity type that is exceeded.SkippedShipment.Reason.BuilderclearExampleVehicleIndex()If the reason is related to a shipment-vehicle incompatibility, this field provides the index of one relevant vehicle.SkippedShipment.Reason.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)SkippedShipment.Reason.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)SkippedShipment.Reason.Builderclone()SkippedShipment.Reason.CodegetCode()Refer to the comments of Code.intgetCodeValue()Refer to the comments of Code.SkippedShipment.ReasongetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()StringgetExampleExceededCapacityType()If the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one capacity type that is exceeded.com.google.protobuf.ByteStringgetExampleExceededCapacityTypeBytes()If the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one capacity type that is exceeded.intgetExampleVehicleIndex()If the reason is related to a shipment-vehicle incompatibility, this field provides the index of one relevant vehicle.booleanhasExampleVehicleIndex()If the reason is related to a shipment-vehicle incompatibility, this field provides the index of one relevant vehicle.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()SkippedShipment.Reason.BuildermergeFrom(SkippedShipment.Reason other)SkippedShipment.Reason.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)SkippedShipment.Reason.BuildermergeFrom(com.google.protobuf.Message other)SkippedShipment.Reason.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)SkippedShipment.Reason.BuildersetCode(SkippedShipment.Reason.Code value)Refer to the comments of Code.SkippedShipment.Reason.BuildersetCodeValue(int value)Refer to the comments of Code.SkippedShipment.Reason.BuildersetExampleExceededCapacityType(String value)If the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one capacity type that is exceeded.SkippedShipment.Reason.BuildersetExampleExceededCapacityTypeBytes(com.google.protobuf.ByteString value)If the reason code is `DEMAND_EXCEEDS_VEHICLE_CAPACITY`, documents one capacity type that is exceeded.SkippedShipment.Reason.BuildersetExampleVehicleIndex(int value)If the reason is related to a shipment-vehicle incompatibility, this field provides the index of one relevant vehicle.SkippedShipment.Reason.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)SkippedShipment.Reason.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)SkippedShipment.Reason.BuildersetUnknownFields(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:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<SkippedShipment.Reason.Builder>
-
clear
public 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.GeneratedMessageV3.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.GeneratedMessageV3.Builder<SkippedShipment.Reason.Builder>
-
getDefaultInstanceForType
public SkippedShipment.Reason getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public SkippedShipment.Reason build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public SkippedShipment.Reason buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public SkippedShipment.Reason.Builder clone()
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<SkippedShipment.Reason.Builder>
-
setField
public SkippedShipment.Reason.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<SkippedShipment.Reason.Builder>
-
clearField
public SkippedShipment.Reason.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<SkippedShipment.Reason.Builder>
-
clearOneof
public SkippedShipment.Reason.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin 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:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<SkippedShipment.Reason.Builder>
-
addRepeatedField
public SkippedShipment.Reason.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<SkippedShipment.Reason.Builder>
-
mergeFrom
public SkippedShipment.Reason.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<SkippedShipment.Reason.Builder>
-
mergeFrom
public SkippedShipment.Reason.Builder mergeFrom(SkippedShipment.Reason other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin 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:
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
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:
getCodein 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:
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
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:
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
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:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<SkippedShipment.Reason.Builder>
-
mergeUnknownFields
public final SkippedShipment.Reason.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<SkippedShipment.Reason.Builder>
-
-