Package com.google.cloud.optimization.v1
Class ShipmentTypeRequirement.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<ShipmentTypeRequirement.Builder>
-
- com.google.cloud.optimization.v1.ShipmentTypeRequirement.Builder
-
- All Implemented Interfaces:
ShipmentTypeRequirementOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- ShipmentTypeRequirement
public static final class ShipmentTypeRequirement.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<ShipmentTypeRequirement.Builder> implements ShipmentTypeRequirementOrBuilder
Specifies requirements between shipments based on their shipment_type. The specifics of the requirement are defined by the requirement mode.
Protobuf typegoogle.cloud.optimization.v1.ShipmentTypeRequirement
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ShipmentTypeRequirement.BuilderaddAllDependentShipmentTypes(Iterable<String> values)All shipments with a type in the `dependent_shipment_types` field require at least one shipment of type `required_shipment_type_alternatives` to be visited on the same route.ShipmentTypeRequirement.BuilderaddAllRequiredShipmentTypeAlternatives(Iterable<String> values)List of alternative shipment types required by the `dependent_shipment_types`.ShipmentTypeRequirement.BuilderaddDependentShipmentTypes(String value)All shipments with a type in the `dependent_shipment_types` field require at least one shipment of type `required_shipment_type_alternatives` to be visited on the same route.ShipmentTypeRequirement.BuilderaddDependentShipmentTypesBytes(com.google.protobuf.ByteString value)All shipments with a type in the `dependent_shipment_types` field require at least one shipment of type `required_shipment_type_alternatives` to be visited on the same route.ShipmentTypeRequirement.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)ShipmentTypeRequirement.BuilderaddRequiredShipmentTypeAlternatives(String value)List of alternative shipment types required by the `dependent_shipment_types`.ShipmentTypeRequirement.BuilderaddRequiredShipmentTypeAlternativesBytes(com.google.protobuf.ByteString value)List of alternative shipment types required by the `dependent_shipment_types`.ShipmentTypeRequirementbuild()ShipmentTypeRequirementbuildPartial()ShipmentTypeRequirement.Builderclear()ShipmentTypeRequirement.BuilderclearDependentShipmentTypes()All shipments with a type in the `dependent_shipment_types` field require at least one shipment of type `required_shipment_type_alternatives` to be visited on the same route.ShipmentTypeRequirement.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)ShipmentTypeRequirement.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)ShipmentTypeRequirement.BuilderclearRequiredShipmentTypeAlternatives()List of alternative shipment types required by the `dependent_shipment_types`.ShipmentTypeRequirement.BuilderclearRequirementMode()Mode applied to the requirement.ShipmentTypeRequirement.Builderclone()ShipmentTypeRequirementgetDefaultInstanceForType()StringgetDependentShipmentTypes(int index)All shipments with a type in the `dependent_shipment_types` field require at least one shipment of type `required_shipment_type_alternatives` to be visited on the same route.com.google.protobuf.ByteStringgetDependentShipmentTypesBytes(int index)All shipments with a type in the `dependent_shipment_types` field require at least one shipment of type `required_shipment_type_alternatives` to be visited on the same route.intgetDependentShipmentTypesCount()All shipments with a type in the `dependent_shipment_types` field require at least one shipment of type `required_shipment_type_alternatives` to be visited on the same route.com.google.protobuf.ProtocolStringListgetDependentShipmentTypesList()All shipments with a type in the `dependent_shipment_types` field require at least one shipment of type `required_shipment_type_alternatives` to be visited on the same route.static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()StringgetRequiredShipmentTypeAlternatives(int index)List of alternative shipment types required by the `dependent_shipment_types`.com.google.protobuf.ByteStringgetRequiredShipmentTypeAlternativesBytes(int index)List of alternative shipment types required by the `dependent_shipment_types`.intgetRequiredShipmentTypeAlternativesCount()List of alternative shipment types required by the `dependent_shipment_types`.com.google.protobuf.ProtocolStringListgetRequiredShipmentTypeAlternativesList()List of alternative shipment types required by the `dependent_shipment_types`.ShipmentTypeRequirement.RequirementModegetRequirementMode()Mode applied to the requirement.intgetRequirementModeValue()Mode applied to the requirement.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()ShipmentTypeRequirement.BuildermergeFrom(ShipmentTypeRequirement other)ShipmentTypeRequirement.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)ShipmentTypeRequirement.BuildermergeFrom(com.google.protobuf.Message other)ShipmentTypeRequirement.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)ShipmentTypeRequirement.BuildersetDependentShipmentTypes(int index, String value)All shipments with a type in the `dependent_shipment_types` field require at least one shipment of type `required_shipment_type_alternatives` to be visited on the same route.ShipmentTypeRequirement.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)ShipmentTypeRequirement.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)ShipmentTypeRequirement.BuildersetRequiredShipmentTypeAlternatives(int index, String value)List of alternative shipment types required by the `dependent_shipment_types`.ShipmentTypeRequirement.BuildersetRequirementMode(ShipmentTypeRequirement.RequirementMode value)Mode applied to the requirement.ShipmentTypeRequirement.BuildersetRequirementModeValue(int value)Mode applied to the requirement.ShipmentTypeRequirement.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<ShipmentTypeRequirement.Builder>
-
clear
public ShipmentTypeRequirement.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<ShipmentTypeRequirement.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<ShipmentTypeRequirement.Builder>
-
getDefaultInstanceForType
public ShipmentTypeRequirement getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public ShipmentTypeRequirement build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public ShipmentTypeRequirement buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public ShipmentTypeRequirement.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<ShipmentTypeRequirement.Builder>
-
setField
public ShipmentTypeRequirement.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<ShipmentTypeRequirement.Builder>
-
clearField
public ShipmentTypeRequirement.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<ShipmentTypeRequirement.Builder>
-
clearOneof
public ShipmentTypeRequirement.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<ShipmentTypeRequirement.Builder>
-
setRepeatedField
public ShipmentTypeRequirement.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<ShipmentTypeRequirement.Builder>
-
addRepeatedField
public ShipmentTypeRequirement.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<ShipmentTypeRequirement.Builder>
-
mergeFrom
public ShipmentTypeRequirement.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<ShipmentTypeRequirement.Builder>
-
mergeFrom
public ShipmentTypeRequirement.Builder mergeFrom(ShipmentTypeRequirement other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<ShipmentTypeRequirement.Builder>
-
mergeFrom
public ShipmentTypeRequirement.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<ShipmentTypeRequirement.Builder>- Throws:
IOException
-
getRequiredShipmentTypeAlternativesList
public com.google.protobuf.ProtocolStringList getRequiredShipmentTypeAlternativesList()
List of alternative shipment types required by the `dependent_shipment_types`.
repeated string required_shipment_type_alternatives = 1;- Specified by:
getRequiredShipmentTypeAlternativesListin interfaceShipmentTypeRequirementOrBuilder- Returns:
- A list containing the requiredShipmentTypeAlternatives.
-
getRequiredShipmentTypeAlternativesCount
public int getRequiredShipmentTypeAlternativesCount()
List of alternative shipment types required by the `dependent_shipment_types`.
repeated string required_shipment_type_alternatives = 1;- Specified by:
getRequiredShipmentTypeAlternativesCountin interfaceShipmentTypeRequirementOrBuilder- Returns:
- The count of requiredShipmentTypeAlternatives.
-
getRequiredShipmentTypeAlternatives
public String getRequiredShipmentTypeAlternatives(int index)
List of alternative shipment types required by the `dependent_shipment_types`.
repeated string required_shipment_type_alternatives = 1;- Specified by:
getRequiredShipmentTypeAlternativesin interfaceShipmentTypeRequirementOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The requiredShipmentTypeAlternatives at the given index.
-
getRequiredShipmentTypeAlternativesBytes
public com.google.protobuf.ByteString getRequiredShipmentTypeAlternativesBytes(int index)
List of alternative shipment types required by the `dependent_shipment_types`.
repeated string required_shipment_type_alternatives = 1;- Specified by:
getRequiredShipmentTypeAlternativesBytesin interfaceShipmentTypeRequirementOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the requiredShipmentTypeAlternatives at the given index.
-
setRequiredShipmentTypeAlternatives
public ShipmentTypeRequirement.Builder setRequiredShipmentTypeAlternatives(int index, String value)
List of alternative shipment types required by the `dependent_shipment_types`.
repeated string required_shipment_type_alternatives = 1;- Parameters:
index- The index to set the value at.value- The requiredShipmentTypeAlternatives to set.- Returns:
- This builder for chaining.
-
addRequiredShipmentTypeAlternatives
public ShipmentTypeRequirement.Builder addRequiredShipmentTypeAlternatives(String value)
List of alternative shipment types required by the `dependent_shipment_types`.
repeated string required_shipment_type_alternatives = 1;- Parameters:
value- The requiredShipmentTypeAlternatives to add.- Returns:
- This builder for chaining.
-
addAllRequiredShipmentTypeAlternatives
public ShipmentTypeRequirement.Builder addAllRequiredShipmentTypeAlternatives(Iterable<String> values)
List of alternative shipment types required by the `dependent_shipment_types`.
repeated string required_shipment_type_alternatives = 1;- Parameters:
values- The requiredShipmentTypeAlternatives to add.- Returns:
- This builder for chaining.
-
clearRequiredShipmentTypeAlternatives
public ShipmentTypeRequirement.Builder clearRequiredShipmentTypeAlternatives()
List of alternative shipment types required by the `dependent_shipment_types`.
repeated string required_shipment_type_alternatives = 1;- Returns:
- This builder for chaining.
-
addRequiredShipmentTypeAlternativesBytes
public ShipmentTypeRequirement.Builder addRequiredShipmentTypeAlternativesBytes(com.google.protobuf.ByteString value)
List of alternative shipment types required by the `dependent_shipment_types`.
repeated string required_shipment_type_alternatives = 1;- Parameters:
value- The bytes of the requiredShipmentTypeAlternatives to add.- Returns:
- This builder for chaining.
-
getDependentShipmentTypesList
public com.google.protobuf.ProtocolStringList getDependentShipmentTypesList()
All shipments with a type in the `dependent_shipment_types` field require at least one shipment of type `required_shipment_type_alternatives` to be visited on the same route. NOTE: Chains of requirements such that a `shipment_type` depends on itself are not allowed.
repeated string dependent_shipment_types = 2;- Specified by:
getDependentShipmentTypesListin interfaceShipmentTypeRequirementOrBuilder- Returns:
- A list containing the dependentShipmentTypes.
-
getDependentShipmentTypesCount
public int getDependentShipmentTypesCount()
All shipments with a type in the `dependent_shipment_types` field require at least one shipment of type `required_shipment_type_alternatives` to be visited on the same route. NOTE: Chains of requirements such that a `shipment_type` depends on itself are not allowed.
repeated string dependent_shipment_types = 2;- Specified by:
getDependentShipmentTypesCountin interfaceShipmentTypeRequirementOrBuilder- Returns:
- The count of dependentShipmentTypes.
-
getDependentShipmentTypes
public String getDependentShipmentTypes(int index)
All shipments with a type in the `dependent_shipment_types` field require at least one shipment of type `required_shipment_type_alternatives` to be visited on the same route. NOTE: Chains of requirements such that a `shipment_type` depends on itself are not allowed.
repeated string dependent_shipment_types = 2;- Specified by:
getDependentShipmentTypesin interfaceShipmentTypeRequirementOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The dependentShipmentTypes at the given index.
-
getDependentShipmentTypesBytes
public com.google.protobuf.ByteString getDependentShipmentTypesBytes(int index)
All shipments with a type in the `dependent_shipment_types` field require at least one shipment of type `required_shipment_type_alternatives` to be visited on the same route. NOTE: Chains of requirements such that a `shipment_type` depends on itself are not allowed.
repeated string dependent_shipment_types = 2;- Specified by:
getDependentShipmentTypesBytesin interfaceShipmentTypeRequirementOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the dependentShipmentTypes at the given index.
-
setDependentShipmentTypes
public ShipmentTypeRequirement.Builder setDependentShipmentTypes(int index, String value)
All shipments with a type in the `dependent_shipment_types` field require at least one shipment of type `required_shipment_type_alternatives` to be visited on the same route. NOTE: Chains of requirements such that a `shipment_type` depends on itself are not allowed.
repeated string dependent_shipment_types = 2;- Parameters:
index- The index to set the value at.value- The dependentShipmentTypes to set.- Returns:
- This builder for chaining.
-
addDependentShipmentTypes
public ShipmentTypeRequirement.Builder addDependentShipmentTypes(String value)
All shipments with a type in the `dependent_shipment_types` field require at least one shipment of type `required_shipment_type_alternatives` to be visited on the same route. NOTE: Chains of requirements such that a `shipment_type` depends on itself are not allowed.
repeated string dependent_shipment_types = 2;- Parameters:
value- The dependentShipmentTypes to add.- Returns:
- This builder for chaining.
-
addAllDependentShipmentTypes
public ShipmentTypeRequirement.Builder addAllDependentShipmentTypes(Iterable<String> values)
All shipments with a type in the `dependent_shipment_types` field require at least one shipment of type `required_shipment_type_alternatives` to be visited on the same route. NOTE: Chains of requirements such that a `shipment_type` depends on itself are not allowed.
repeated string dependent_shipment_types = 2;- Parameters:
values- The dependentShipmentTypes to add.- Returns:
- This builder for chaining.
-
clearDependentShipmentTypes
public ShipmentTypeRequirement.Builder clearDependentShipmentTypes()
All shipments with a type in the `dependent_shipment_types` field require at least one shipment of type `required_shipment_type_alternatives` to be visited on the same route. NOTE: Chains of requirements such that a `shipment_type` depends on itself are not allowed.
repeated string dependent_shipment_types = 2;- Returns:
- This builder for chaining.
-
addDependentShipmentTypesBytes
public ShipmentTypeRequirement.Builder addDependentShipmentTypesBytes(com.google.protobuf.ByteString value)
All shipments with a type in the `dependent_shipment_types` field require at least one shipment of type `required_shipment_type_alternatives` to be visited on the same route. NOTE: Chains of requirements such that a `shipment_type` depends on itself are not allowed.
repeated string dependent_shipment_types = 2;- Parameters:
value- The bytes of the dependentShipmentTypes to add.- Returns:
- This builder for chaining.
-
getRequirementModeValue
public int getRequirementModeValue()
Mode applied to the requirement.
.google.cloud.optimization.v1.ShipmentTypeRequirement.RequirementMode requirement_mode = 3;- Specified by:
getRequirementModeValuein interfaceShipmentTypeRequirementOrBuilder- Returns:
- The enum numeric value on the wire for requirementMode.
-
setRequirementModeValue
public ShipmentTypeRequirement.Builder setRequirementModeValue(int value)
Mode applied to the requirement.
.google.cloud.optimization.v1.ShipmentTypeRequirement.RequirementMode requirement_mode = 3;- Parameters:
value- The enum numeric value on the wire for requirementMode to set.- Returns:
- This builder for chaining.
-
getRequirementMode
public ShipmentTypeRequirement.RequirementMode getRequirementMode()
Mode applied to the requirement.
.google.cloud.optimization.v1.ShipmentTypeRequirement.RequirementMode requirement_mode = 3;- Specified by:
getRequirementModein interfaceShipmentTypeRequirementOrBuilder- Returns:
- The requirementMode.
-
setRequirementMode
public ShipmentTypeRequirement.Builder setRequirementMode(ShipmentTypeRequirement.RequirementMode value)
Mode applied to the requirement.
.google.cloud.optimization.v1.ShipmentTypeRequirement.RequirementMode requirement_mode = 3;- Parameters:
value- The requirementMode to set.- Returns:
- This builder for chaining.
-
clearRequirementMode
public ShipmentTypeRequirement.Builder clearRequirementMode()
Mode applied to the requirement.
.google.cloud.optimization.v1.ShipmentTypeRequirement.RequirementMode requirement_mode = 3;- Returns:
- This builder for chaining.
-
setUnknownFields
public final ShipmentTypeRequirement.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<ShipmentTypeRequirement.Builder>
-
mergeUnknownFields
public final ShipmentTypeRequirement.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<ShipmentTypeRequirement.Builder>
-
-