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.GeneratedMessage.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.GeneratedMessage.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 type
google.cloud.optimization.v1.ShipmentTypeRequirement-
Method Summary
Modifier and TypeMethodDescriptionaddAllDependentShipmentTypes(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.List of alternative shipment types required by the `dependent_shipment_types`.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.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.List of alternative shipment types required by the `dependent_shipment_types`.addRequiredShipmentTypeAlternativesBytes(com.google.protobuf.ByteString value) List of alternative shipment types required by the `dependent_shipment_types`.build()clear()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.List of alternative shipment types required by the `dependent_shipment_types`.Mode applied to the requirement.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.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.intAll 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.ProtocolStringListAll 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 final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorgetRequiredShipmentTypeAlternatives(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`.intList of alternative shipment types required by the `dependent_shipment_types`.com.google.protobuf.ProtocolStringListList of alternative shipment types required by the `dependent_shipment_types`.Mode applied to the requirement.intMode applied to the requirement.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(ShipmentTypeRequirement other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) 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.setRequiredShipmentTypeAlternatives(int index, String value) List of alternative shipment types required by the `dependent_shipment_types`.Mode applied to the requirement.setRequirementModeValue(int value) Mode applied to the requirement.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<ShipmentTypeRequirement.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<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.GeneratedMessage.Builder<ShipmentTypeRequirement.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<ShipmentTypeRequirement.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.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
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
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
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
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
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
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
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
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
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
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
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
Mode applied to the requirement.
.google.cloud.optimization.v1.ShipmentTypeRequirement.RequirementMode requirement_mode = 3;- Returns:
- This builder for chaining.
-