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.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.ShipmentTypeRequirement.Builder
addAllRequiredShipmentTypeAlternatives(Iterable<String> values)
List of alternative shipment types required by the `dependent_shipment_types`.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.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.ShipmentTypeRequirement.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
ShipmentTypeRequirement.Builder
addRequiredShipmentTypeAlternatives(String value)
List of alternative shipment types required by the `dependent_shipment_types`.ShipmentTypeRequirement.Builder
addRequiredShipmentTypeAlternativesBytes(com.google.protobuf.ByteString value)
List of alternative shipment types required by the `dependent_shipment_types`.ShipmentTypeRequirement
build()
ShipmentTypeRequirement
buildPartial()
ShipmentTypeRequirement.Builder
clear()
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.ShipmentTypeRequirement.Builder
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
ShipmentTypeRequirement.Builder
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
ShipmentTypeRequirement.Builder
clearRequiredShipmentTypeAlternatives()
List of alternative shipment types required by the `dependent_shipment_types`.ShipmentTypeRequirement.Builder
clearRequirementMode()
Mode applied to the requirement.ShipmentTypeRequirement.Builder
clone()
ShipmentTypeRequirement
getDefaultInstanceForType()
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.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.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.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.static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
String
getRequiredShipmentTypeAlternatives(int index)
List of alternative shipment types required by the `dependent_shipment_types`.com.google.protobuf.ByteString
getRequiredShipmentTypeAlternativesBytes(int index)
List of alternative shipment types required by the `dependent_shipment_types`.int
getRequiredShipmentTypeAlternativesCount()
List of alternative shipment types required by the `dependent_shipment_types`.com.google.protobuf.ProtocolStringList
getRequiredShipmentTypeAlternativesList()
List of alternative shipment types required by the `dependent_shipment_types`.ShipmentTypeRequirement.RequirementMode
getRequirementMode()
Mode applied to the requirement.int
getRequirementModeValue()
Mode applied to the requirement.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
ShipmentTypeRequirement.Builder
mergeFrom(ShipmentTypeRequirement other)
ShipmentTypeRequirement.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
ShipmentTypeRequirement.Builder
mergeFrom(com.google.protobuf.Message other)
ShipmentTypeRequirement.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
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.ShipmentTypeRequirement.Builder
setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
ShipmentTypeRequirement.Builder
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
ShipmentTypeRequirement.Builder
setRequiredShipmentTypeAlternatives(int index, String value)
List of alternative shipment types required by the `dependent_shipment_types`.ShipmentTypeRequirement.Builder
setRequirementMode(ShipmentTypeRequirement.RequirementMode value)
Mode applied to the requirement.ShipmentTypeRequirement.Builder
setRequirementModeValue(int value)
Mode applied to the requirement.ShipmentTypeRequirement.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<ShipmentTypeRequirement.Builder>
-
clear
public ShipmentTypeRequirement.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<ShipmentTypeRequirement.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<ShipmentTypeRequirement.Builder>
-
getDefaultInstanceForType
public ShipmentTypeRequirement getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public ShipmentTypeRequirement build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public ShipmentTypeRequirement buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public ShipmentTypeRequirement.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<ShipmentTypeRequirement.Builder>
-
setField
public ShipmentTypeRequirement.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<ShipmentTypeRequirement.Builder>
-
clearField
public ShipmentTypeRequirement.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<ShipmentTypeRequirement.Builder>
-
clearOneof
public ShipmentTypeRequirement.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<ShipmentTypeRequirement.Builder>
-
setRepeatedField
public ShipmentTypeRequirement.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<ShipmentTypeRequirement.Builder>
-
addRepeatedField
public ShipmentTypeRequirement.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<ShipmentTypeRequirement.Builder>
-
mergeFrom
public ShipmentTypeRequirement.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<ShipmentTypeRequirement.Builder>
-
mergeFrom
public ShipmentTypeRequirement.Builder mergeFrom(ShipmentTypeRequirement other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in 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:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in 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:
getRequiredShipmentTypeAlternativesList
in 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:
getRequiredShipmentTypeAlternativesCount
in 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:
getRequiredShipmentTypeAlternatives
in 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:
getRequiredShipmentTypeAlternativesBytes
in 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:
getDependentShipmentTypesList
in 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:
getDependentShipmentTypesCount
in 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:
getDependentShipmentTypes
in 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:
getDependentShipmentTypesBytes
in 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:
getRequirementModeValue
in 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:
getRequirementMode
in 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:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<ShipmentTypeRequirement.Builder>
-
mergeUnknownFields
public final ShipmentTypeRequirement.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<ShipmentTypeRequirement.Builder>
-
-