# Class OptimizeToursRequest (1.91.0)

1.91.0 (latest) 1.89.0 1.86.0 1.85.0 1.83.0 1.81.0 1.80.0 1.78.0 1.76.0 1.74.0 1.73.0 1.72.0 1.71.0 1.70.0 1.68.0 1.66.0 1.65.0 1.62.0 1.61.0 1.60.0 1.58.0 1.57.0 1.56.0 1.55.0 1.54.0 1.53.0 1.52.0 1.51.0 1.50.0 1.49.0 1.47.0 1.46.0 1.45.0 1.44.0 1.43.0 1.42.0 1.41.0 1.40.0 1.39.0 1.38.0 1.37.0 1.35.0 1.34.0 1.33.0 1.32.0 1.31.0 1.30.0 1.29.0 1.28.0 1.27.0 1.26.0 1.25.0 1.22.0 1.21.0 1.20.0 1.19.0 1.18.0 1.17.0 1.16.0 1.15.0 1.14.0 1.13.0 1.12.0 1.11.0 1.10.0 1.9.0 1.7.0 1.6.0 1.5.0 1.4.0 1.3.0 1.2.0 1.1.14 0.1.2

    public final class OptimizeToursRequest extends GeneratedMessage implements OptimizeToursRequestOrBuilder

Request to be given to a tour optimization solver which defines the
shipment model to solve as well as optimization parameters.

Protobuf type `google.cloud.optimization.v1.OptimizeToursRequest`

## Inheritance

[Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \> [AbstractMessageLite\<MessageType,BuilderType\>](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessageLite.html) \> [AbstractMessage](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.html) \> [GeneratedMessage](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.html) \> OptimizeToursRequest

## Implements

[OptimizeToursRequestOrBuilder](https://docs.cloud.google.com/java/docs/reference/google-cloud-optimization/latest/com.google.cloud.optimization.v1.OptimizeToursRequestOrBuilder)

## Inherited Members

[AbstractMessage.equals(Object)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.html#com_google_protobuf_AbstractMessage_equals_java_lang_Object_) [AbstractMessage.findInitializationErrors()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.html#com_google_protobuf_AbstractMessage_findInitializationErrors__) [AbstractMessage.getInitializationErrorString()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.html#com_google_protobuf_AbstractMessage_getInitializationErrorString__) [AbstractMessage.hashCode()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.html#com_google_protobuf_AbstractMessage_hashCode__) [AbstractMessage.hashFields(int,Map\<Descriptors.FieldDescriptor,Object\>)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.html#com_google_protobuf_AbstractMessage_hashFields_int_java_util_Map_com_google_protobuf_Descriptors_FieldDescriptor_java_lang_Object__) [AbstractMessage.newBuilderForType(AbstractMessage.BuilderParent)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.html#com_google_protobuf_AbstractMessage_newBuilderForType_com_google_protobuf_AbstractMessage_BuilderParent_) [AbstractMessage.toString()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.html#com_google_protobuf_AbstractMessage_toString__) [AbstractMessageLite.\<T\>addAll(Iterable\<T\>,List\<? super T\>)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessageLite.html#com_google_protobuf_AbstractMessageLite__T_addAll_java_lang_Iterable_T__java_util_List___super_T__) [AbstractMessageLite.checkByteStringIsUtf8(ByteString)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessageLite.html#com_google_protobuf_AbstractMessageLite_checkByteStringIsUtf8_com_google_protobuf_ByteString_) [AbstractMessageLite.toByteArray()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessageLite.html#com_google_protobuf_AbstractMessageLite_toByteArray__) [AbstractMessageLite.toByteString()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessageLite.html#com_google_protobuf_AbstractMessageLite_toByteString__) [AbstractMessageLite.writeDelimitedTo(OutputStream)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessageLite.html#com_google_protobuf_AbstractMessageLite_writeDelimitedTo_java_io_OutputStream_) [AbstractMessageLite.writeTo(OutputStream)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessageLite.html#com_google_protobuf_AbstractMessageLite_writeTo_java_io_OutputStream_) com.google.protobuf.GeneratedMessage.\<ContainingT,T\>newFileScopedGeneratedExtension(java.lang.Class\<?\>,com.google.protobuf.Message) com.google.protobuf.GeneratedMessage.\<ContainingT,T\>newMessageScopedGeneratedExtension(com.google.protobuf.Message,int,java.lang.Class\<?\>,com.google.protobuf.Message) com.google.protobuf.GeneratedMessage.\<ListT\>makeMutableCopy(ListT) com.google.protobuf.GeneratedMessage.\<ListT\>makeMutableCopy(ListT,int) [GeneratedMessage.\<M\>parseDelimitedWithIOException(Parser\<M\>,InputStream)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.html#com_google_protobuf_GeneratedMessage__M_parseDelimitedWithIOException_com_google_protobuf_Parser_M__java_io_InputStream_) [GeneratedMessage.\<M\>parseDelimitedWithIOException(Parser\<M\>,InputStream,ExtensionRegistryLite)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.html#com_google_protobuf_GeneratedMessage__M_parseDelimitedWithIOException_com_google_protobuf_Parser_M__java_io_InputStream_com_google_protobuf_ExtensionRegistryLite_) [GeneratedMessage.\<M\>parseWithIOException(Parser\<M\>,CodedInputStream)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.html#com_google_protobuf_GeneratedMessage__M_parseWithIOException_com_google_protobuf_Parser_M__com_google_protobuf_CodedInputStream_) [GeneratedMessage.\<M\>parseWithIOException(Parser\<M\>,CodedInputStream,ExtensionRegistryLite)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.html#com_google_protobuf_GeneratedMessage__M_parseWithIOException_com_google_protobuf_Parser_M__com_google_protobuf_CodedInputStream_com_google_protobuf_ExtensionRegistryLite_) [GeneratedMessage.\<M\>parseWithIOException(Parser\<M\>,InputStream)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.html#com_google_protobuf_GeneratedMessage__M_parseWithIOException_com_google_protobuf_Parser_M__java_io_InputStream_) [GeneratedMessage.\<M\>parseWithIOException(Parser\<M\>,InputStream,ExtensionRegistryLite)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.html#com_google_protobuf_GeneratedMessage__M_parseWithIOException_com_google_protobuf_Parser_M__java_io_InputStream_com_google_protobuf_ExtensionRegistryLite_) com.google.protobuf.GeneratedMessage.\<T\>emptyList(java.lang.Class\<T\>) com.google.protobuf.GeneratedMessage.\<V\>serializeBooleanMapTo(com.google.protobuf.CodedOutputStream,com.google.protobuf.MapField\<java.lang.Boolean,V\>,com.google.protobuf.MapEntry\<java.lang.Boolean,V\>,int) com.google.protobuf.GeneratedMessage.\<V\>serializeIntegerMapTo(com.google.protobuf.CodedOutputStream,com.google.protobuf.MapField\<java.lang.Integer,V\>,com.google.protobuf.MapEntry\<java.lang.Integer,V\>,int) com.google.protobuf.GeneratedMessage.\<V\>serializeLongMapTo(com.google.protobuf.CodedOutputStream,com.google.protobuf.MapField\<java.lang.Long,V\>,com.google.protobuf.MapEntry\<java.lang.Long,V\>,int) com.google.protobuf.GeneratedMessage.\<V\>serializeStringMapTo(com.google.protobuf.CodedOutputStream,com.google.protobuf.MapField\<java.lang.String,V\>,com.google.protobuf.MapEntry\<java.lang.String,V\>,int) com.google.protobuf.GeneratedMessage.canUseUnsafe() [GeneratedMessage.computeStringSize(int,Object)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.html#com_google_protobuf_GeneratedMessage_computeStringSize_int_java_lang_Object_) [GeneratedMessage.computeStringSizeNoTag(Object)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.html#com_google_protobuf_GeneratedMessage_computeStringSizeNoTag_java_lang_Object_) com.google.protobuf.GeneratedMessage.emptyBooleanList() com.google.protobuf.GeneratedMessage.emptyDoubleList() com.google.protobuf.GeneratedMessage.emptyFloatList() com.google.protobuf.GeneratedMessage.emptyIntList() com.google.protobuf.GeneratedMessage.emptyLongList() [GeneratedMessage.getAllFields()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.html#com_google_protobuf_GeneratedMessage_getAllFields__) [GeneratedMessage.getDescriptorForType()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.html#com_google_protobuf_GeneratedMessage_getDescriptorForType__) [GeneratedMessage.getField(Descriptors.FieldDescriptor)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.html#com_google_protobuf_GeneratedMessage_getField_com_google_protobuf_Descriptors_FieldDescriptor_) [GeneratedMessage.getOneofFieldDescriptor(Descriptors.OneofDescriptor)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.html#com_google_protobuf_GeneratedMessage_getOneofFieldDescriptor_com_google_protobuf_Descriptors_OneofDescriptor_) [GeneratedMessage.getParserForType()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.html#com_google_protobuf_GeneratedMessage_getParserForType__) [GeneratedMessage.getRepeatedField(Descriptors.FieldDescriptor,int)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.html#com_google_protobuf_GeneratedMessage_getRepeatedField_com_google_protobuf_Descriptors_FieldDescriptor_int_) [GeneratedMessage.getRepeatedFieldCount(Descriptors.FieldDescriptor)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.html#com_google_protobuf_GeneratedMessage_getRepeatedFieldCount_com_google_protobuf_Descriptors_FieldDescriptor_) [GeneratedMessage.getSerializedSize()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.html#com_google_protobuf_GeneratedMessage_getSerializedSize__) [GeneratedMessage.getUnknownFields()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.html#com_google_protobuf_GeneratedMessage_getUnknownFields__) [GeneratedMessage.hasField(Descriptors.FieldDescriptor)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.html#com_google_protobuf_GeneratedMessage_hasField_com_google_protobuf_Descriptors_FieldDescriptor_) [GeneratedMessage.hasOneof(Descriptors.OneofDescriptor)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.html#com_google_protobuf_GeneratedMessage_hasOneof_com_google_protobuf_Descriptors_OneofDescriptor_) [GeneratedMessage.internalGetFieldAccessorTable()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.html#com_google_protobuf_GeneratedMessage_internalGetFieldAccessorTable__) [GeneratedMessage.internalGetMapField(int)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.html#com_google_protobuf_GeneratedMessage_internalGetMapField_int_) com.google.protobuf.GeneratedMessage.internalGetMapFieldReflection(int) [GeneratedMessage.isInitialized()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.html#com_google_protobuf_GeneratedMessage_isInitialized__) com.google.protobuf.GeneratedMessage.isStringEmpty(java.lang.Object) [GeneratedMessage.makeExtensionsImmutable()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.html#com_google_protobuf_GeneratedMessage_makeExtensionsImmutable__) com.google.protobuf.GeneratedMessage.mergeFromAndMakeImmutableInternal(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite) com.google.protobuf.GeneratedMessage.newInstance(com.google.protobuf.GeneratedMessage.UnusedPrivateParameter) [GeneratedMessage.parseUnknownField(CodedInputStream,UnknownFieldSet.Builder,ExtensionRegistryLite,int)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.html#com_google_protobuf_GeneratedMessage_parseUnknownField_com_google_protobuf_CodedInputStream_com_google_protobuf_UnknownFieldSet_Builder_com_google_protobuf_ExtensionRegistryLite_int_) com.google.protobuf.GeneratedMessage.parseUnknownFieldProto3(com.google.protobuf.CodedInputStream,com.google.protobuf.UnknownFieldSet.Builder,com.google.protobuf.ExtensionRegistryLite,int) [GeneratedMessage.writeReplace()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.html#com_google_protobuf_GeneratedMessage_writeReplace__) [GeneratedMessage.writeString(CodedOutputStream,int,Object)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.html#com_google_protobuf_GeneratedMessage_writeString_com_google_protobuf_CodedOutputStream_int_java_lang_Object_) [GeneratedMessage.writeStringNoTag(CodedOutputStream,Object)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.html#com_google_protobuf_GeneratedMessage_writeStringNoTag_com_google_protobuf_CodedOutputStream_java_lang_Object_) [GeneratedMessage.writeTo(CodedOutputStream)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.html#com_google_protobuf_GeneratedMessage_writeTo_com_google_protobuf_CodedOutputStream_) [Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) [Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) [Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) [Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) [Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) [Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) [Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) [Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)

## Static Fields

### ALLOW_LARGE_DEADLINE_DESPITE_INTERRUPTION_RISK_FIELD_NUMBER

    public static final int ALLOW_LARGE_DEADLINE_DESPITE_INTERRUPTION_RISK_FIELD_NUMBER

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### CONSIDER_ROAD_TRAFFIC_FIELD_NUMBER

    public static final int CONSIDER_ROAD_TRAFFIC_FIELD_NUMBER

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### GEODESIC_METERS_PER_SECOND_FIELD_NUMBER

    public static final int GEODESIC_METERS_PER_SECOND_FIELD_NUMBER

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### INJECTED_FIRST_SOLUTION_ROUTES_FIELD_NUMBER

    public static final int INJECTED_FIRST_SOLUTION_ROUTES_FIELD_NUMBER

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### INJECTED_SOLUTION_CONSTRAINT_FIELD_NUMBER

    public static final int INJECTED_SOLUTION_CONSTRAINT_FIELD_NUMBER

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### INTERPRET_INJECTED_SOLUTIONS_USING_LABELS_FIELD_NUMBER

    public static final int INTERPRET_INJECTED_SOLUTIONS_USING_LABELS_FIELD_NUMBER

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### LABEL_FIELD_NUMBER

    public static final int LABEL_FIELD_NUMBER

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### MAX_VALIDATION_ERRORS_FIELD_NUMBER

    public static final int MAX_VALIDATION_ERRORS_FIELD_NUMBER

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### MODEL_FIELD_NUMBER

    public static final int MODEL_FIELD_NUMBER

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### PARENT_FIELD_NUMBER

    public static final int PARENT_FIELD_NUMBER

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### POPULATE_POLYLINES_FIELD_NUMBER

    public static final int POPULATE_POLYLINES_FIELD_NUMBER

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### POPULATE_TRANSITION_POLYLINES_FIELD_NUMBER

    public static final int POPULATE_TRANSITION_POLYLINES_FIELD_NUMBER

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### POPULATE_TRAVEL_STEP_POLYLINES_FIELD_NUMBER

    public static final int POPULATE_TRAVEL_STEP_POLYLINES_FIELD_NUMBER

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### REFRESH_DETAILS_ROUTES_FIELD_NUMBER

    public static final int REFRESH_DETAILS_ROUTES_FIELD_NUMBER

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### SEARCH_MODE_FIELD_NUMBER

    public static final int SEARCH_MODE_FIELD_NUMBER

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### SOLVING_MODE_FIELD_NUMBER

    public static final int SOLVING_MODE_FIELD_NUMBER

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### TIMEOUT_FIELD_NUMBER

    public static final int TIMEOUT_FIELD_NUMBER

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### USE_GEODESIC_DISTANCES_FIELD_NUMBER

    public static final int USE_GEODESIC_DISTANCES_FIELD_NUMBER

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

## Static Methods

### getDefaultInstance()

    public static OptimizeToursRequest getDefaultInstance()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-optimization/latest/com.google.cloud.optimization.v1.OptimizeToursRequest` |   |

### getDescriptor()

    public static final Descriptors.Descriptor getDescriptor()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Descriptors.Descriptor.html` |   |

### newBuilder()

    public static OptimizeToursRequest.Builder newBuilder()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-optimization/latest/com.google.cloud.optimization.v1.OptimizeToursRequest.Builder` |   |

### newBuilder(OptimizeToursRequest prototype)

    public static OptimizeToursRequest.Builder newBuilder(OptimizeToursRequest prototype)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `prototype` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-optimization/latest/com.google.cloud.optimization.v1.OptimizeToursRequest` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-optimization/latest/com.google.cloud.optimization.v1.OptimizeToursRequest.Builder` |   |

### parseDelimitedFrom(InputStream input)

    public static OptimizeToursRequest parseDelimitedFrom(InputStream input)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `input` | `https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-optimization/latest/com.google.cloud.optimization.v1.OptimizeToursRequest` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html` |   |

### parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

    public static OptimizeToursRequest parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `input` | `https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html` |
| `extensionRegistry` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ExtensionRegistryLite.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-optimization/latest/com.google.cloud.optimization.v1.OptimizeToursRequest` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html` |   |

### parseFrom(byte\[\] data)

    public static OptimizeToursRequest parseFrom(byte[] data)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `data` | `byte[]` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-optimization/latest/com.google.cloud.optimization.v1.OptimizeToursRequest` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.InvalidProtocolBufferException.html` |   |

### parseFrom(byte\[\] data, ExtensionRegistryLite extensionRegistry)

    public static OptimizeToursRequest parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `byte[]` |
| `extensionRegistry` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ExtensionRegistryLite.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-optimization/latest/com.google.cloud.optimization.v1.OptimizeToursRequest` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.InvalidProtocolBufferException.html` |   |

### parseFrom(ByteString data)

    public static OptimizeToursRequest parseFrom(ByteString data)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `data` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-optimization/latest/com.google.cloud.optimization.v1.OptimizeToursRequest` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.InvalidProtocolBufferException.html` |   |

### parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

    public static OptimizeToursRequest parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` |
| `extensionRegistry` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ExtensionRegistryLite.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-optimization/latest/com.google.cloud.optimization.v1.OptimizeToursRequest` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.InvalidProtocolBufferException.html` |   |

### parseFrom(CodedInputStream input)

    public static OptimizeToursRequest parseFrom(CodedInputStream input)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `input` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.CodedInputStream.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-optimization/latest/com.google.cloud.optimization.v1.OptimizeToursRequest` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html` |   |

### parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

    public static OptimizeToursRequest parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `input` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.CodedInputStream.html` |
| `extensionRegistry` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ExtensionRegistryLite.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-optimization/latest/com.google.cloud.optimization.v1.OptimizeToursRequest` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html` |   |

### parseFrom(InputStream input)

    public static OptimizeToursRequest parseFrom(InputStream input)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `input` | `https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-optimization/latest/com.google.cloud.optimization.v1.OptimizeToursRequest` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html` |   |

### parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

    public static OptimizeToursRequest parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `input` | `https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html` |
| `extensionRegistry` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ExtensionRegistryLite.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-optimization/latest/com.google.cloud.optimization.v1.OptimizeToursRequest` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html` |   |

### parseFrom(ByteBuffer data)

    public static OptimizeToursRequest parseFrom(ByteBuffer data)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `data` | `https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-optimization/latest/com.google.cloud.optimization.v1.OptimizeToursRequest` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.InvalidProtocolBufferException.html` |   |

### parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

    public static OptimizeToursRequest parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html` |
| `extensionRegistry` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ExtensionRegistryLite.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-optimization/latest/com.google.cloud.optimization.v1.OptimizeToursRequest` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.InvalidProtocolBufferException.html` |   |

### parser()

    public static Parser<OptimizeToursRequest> parser()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Parser.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-optimization/latest/com.google.cloud.optimization.v1.OptimizeToursRequest>` |   |

## Methods

### equals(Object obj)

    public boolean equals(Object obj)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `obj` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

**Overrides** [AbstractMessage.equals(Object other)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.html#com_google_protobuf_AbstractMessage_equals_java_lang_Object_)

### getAllowLargeDeadlineDespiteInterruptionRisk()

    public boolean getAllowLargeDeadlineDespiteInterruptionRisk()

If this is set, then the request can have a deadline
(see <https://grpc.io/blog/deadlines>) of up to 60 minutes.
Otherwise, the maximum deadline is only 30 minutes.
Note that long-lived requests have a significantly larger (but still small)
risk of interruption.

`bool allow_large_deadline_despite_interruption_risk = 14;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The allowLargeDeadlineDespiteInterruptionRisk. |

### getConsiderRoadTraffic()

    public boolean getConsiderRoadTraffic()

Consider traffic estimation in calculating `ShipmentRoute` fields
Transition.travel_duration,
Visit.start_time,
and `vehicle_end_time`; in setting the
ShipmentRoute.has_traffic_infeasibilities
field, and in calculating the
OptimizeToursResponse.total_cost
field.

`bool consider_road_traffic = 11;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The considerRoadTraffic. |

### getDefaultInstanceForType()

    public OptimizeToursRequest getDefaultInstanceForType()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-optimization/latest/com.google.cloud.optimization.v1.OptimizeToursRequest` |   |

### getGeodesicMetersPerSecond()

    public double getGeodesicMetersPerSecond()

When `use_geodesic_distances` is true, this field must be set and defines
the speed applied to compute travel times. Its value must be at least 1.0
meters/seconds.

`optional double geodesic_meters_per_second = 16;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The geodesicMetersPerSecond. |

### getInjectedFirstSolutionRoutes(int index)

    public ShipmentRoute getInjectedFirstSolutionRoutes(int index)

Guide the optimization algorithm in finding a first solution that is
similar to a previous solution.

The model is constrained when the first solution is built.
Any shipments not performed on a route are implicitly skipped in the first
solution, but they may be performed in successive solutions.

The solution must satisfy some basic validity assumptions:

- for all routes, `vehicle_index` must be in range and not be duplicated.
- for all visits, `shipment_index` and `visit_request_index` must be in range.
- a shipment may only be referenced on one route.
- the pickup of a pickup-delivery shipment must be performed before the delivery.
- no more than one pickup alternative or delivery alternative of a shipment may be performed.
- for all routes, times are increasing (i.e., `vehicle_start_time
  <= visits[0].start_time <= visits[1].start_time ...
  <= vehicle_end_time`).
- a shipment may only be performed on a vehicle that is allowed. A
  vehicle is allowed if
  Shipment.allowed_vehicle_indices
  is empty or its `vehicle_index` is included in
  Shipment.allowed_vehicle_indices.

  If the injected solution is not feasible, a validation error is not
  necessarily returned and an error indicating infeasibility may be returned
  instead.

`repeated .google.cloud.optimization.v1.ShipmentRoute injected_first_solution_routes = 7;
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-optimization/latest/com.google.cloud.optimization.v1.ShipmentRoute` |   |

### getInjectedFirstSolutionRoutesCount()

    public int getInjectedFirstSolutionRoutesCount()

Guide the optimization algorithm in finding a first solution that is
similar to a previous solution.

The model is constrained when the first solution is built.
Any shipments not performed on a route are implicitly skipped in the first
solution, but they may be performed in successive solutions.

The solution must satisfy some basic validity assumptions:

- for all routes, `vehicle_index` must be in range and not be duplicated.
- for all visits, `shipment_index` and `visit_request_index` must be in range.
- a shipment may only be referenced on one route.
- the pickup of a pickup-delivery shipment must be performed before the delivery.
- no more than one pickup alternative or delivery alternative of a shipment may be performed.
- for all routes, times are increasing (i.e., `vehicle_start_time
  <= visits[0].start_time <= visits[1].start_time ...
  <= vehicle_end_time`).
- a shipment may only be performed on a vehicle that is allowed. A
  vehicle is allowed if
  Shipment.allowed_vehicle_indices
  is empty or its `vehicle_index` is included in
  Shipment.allowed_vehicle_indices.

  If the injected solution is not feasible, a validation error is not
  necessarily returned and an error indicating infeasibility may be returned
  instead.

`repeated .google.cloud.optimization.v1.ShipmentRoute injected_first_solution_routes = 7;
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getInjectedFirstSolutionRoutesList()

    public List<ShipmentRoute> getInjectedFirstSolutionRoutesList()

Guide the optimization algorithm in finding a first solution that is
similar to a previous solution.

The model is constrained when the first solution is built.
Any shipments not performed on a route are implicitly skipped in the first
solution, but they may be performed in successive solutions.

The solution must satisfy some basic validity assumptions:

- for all routes, `vehicle_index` must be in range and not be duplicated.
- for all visits, `shipment_index` and `visit_request_index` must be in range.
- a shipment may only be referenced on one route.
- the pickup of a pickup-delivery shipment must be performed before the delivery.
- no more than one pickup alternative or delivery alternative of a shipment may be performed.
- for all routes, times are increasing (i.e., `vehicle_start_time
  <= visits[0].start_time <= visits[1].start_time ...
  <= vehicle_end_time`).
- a shipment may only be performed on a vehicle that is allowed. A
  vehicle is allowed if
  Shipment.allowed_vehicle_indices
  is empty or its `vehicle_index` is included in
  Shipment.allowed_vehicle_indices.

  If the injected solution is not feasible, a validation error is not
  necessarily returned and an error indicating infeasibility may be returned
  instead.

`repeated .google.cloud.optimization.v1.ShipmentRoute injected_first_solution_routes = 7;
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-optimization/latest/com.google.cloud.optimization.v1.ShipmentRoute>` |   |

### getInjectedFirstSolutionRoutesOrBuilder(int index)

    public ShipmentRouteOrBuilder getInjectedFirstSolutionRoutesOrBuilder(int index)

Guide the optimization algorithm in finding a first solution that is
similar to a previous solution.

The model is constrained when the first solution is built.
Any shipments not performed on a route are implicitly skipped in the first
solution, but they may be performed in successive solutions.

The solution must satisfy some basic validity assumptions:

- for all routes, `vehicle_index` must be in range and not be duplicated.
- for all visits, `shipment_index` and `visit_request_index` must be in range.
- a shipment may only be referenced on one route.
- the pickup of a pickup-delivery shipment must be performed before the delivery.
- no more than one pickup alternative or delivery alternative of a shipment may be performed.
- for all routes, times are increasing (i.e., `vehicle_start_time
  <= visits[0].start_time <= visits[1].start_time ...
  <= vehicle_end_time`).
- a shipment may only be performed on a vehicle that is allowed. A
  vehicle is allowed if
  Shipment.allowed_vehicle_indices
  is empty or its `vehicle_index` is included in
  Shipment.allowed_vehicle_indices.

  If the injected solution is not feasible, a validation error is not
  necessarily returned and an error indicating infeasibility may be returned
  instead.

`repeated .google.cloud.optimization.v1.ShipmentRoute injected_first_solution_routes = 7;
`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-optimization/latest/com.google.cloud.optimization.v1.ShipmentRouteOrBuilder` |   |

### getInjectedFirstSolutionRoutesOrBuilderList()

    public List<? extends ShipmentRouteOrBuilder> getInjectedFirstSolutionRoutesOrBuilderList()

Guide the optimization algorithm in finding a first solution that is
similar to a previous solution.

The model is constrained when the first solution is built.
Any shipments not performed on a route are implicitly skipped in the first
solution, but they may be performed in successive solutions.

The solution must satisfy some basic validity assumptions:

- for all routes, `vehicle_index` must be in range and not be duplicated.
- for all visits, `shipment_index` and `visit_request_index` must be in range.
- a shipment may only be referenced on one route.
- the pickup of a pickup-delivery shipment must be performed before the delivery.
- no more than one pickup alternative or delivery alternative of a shipment may be performed.
- for all routes, times are increasing (i.e., `vehicle_start_time
  <= visits[0].start_time <= visits[1].start_time ...
  <= vehicle_end_time`).
- a shipment may only be performed on a vehicle that is allowed. A
  vehicle is allowed if
  Shipment.allowed_vehicle_indices
  is empty or its `vehicle_index` is included in
  Shipment.allowed_vehicle_indices.

  If the injected solution is not feasible, a validation error is not
  necessarily returned and an error indicating infeasibility may be returned
  instead.

`repeated .google.cloud.optimization.v1.ShipmentRoute injected_first_solution_routes = 7;
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<? extends com.google.cloud.optimization.v1.ShipmentRouteOrBuilder>` |   |

### getInjectedSolutionConstraint()

    public InjectedSolutionConstraint getInjectedSolutionConstraint()

Constrain the optimization algorithm to find a final solution that is
similar to a previous solution. For example, this may be used to freeze
portions of routes which have already been completed or which are to be
completed but must not be modified.

If the injected solution is not feasible, a validation error is not
necessarily returned and an error indicating infeasibility may be returned
instead.

`
.google.cloud.optimization.v1.InjectedSolutionConstraint injected_solution_constraint = 8;
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-optimization/latest/com.google.cloud.optimization.v1.InjectedSolutionConstraint` | The injectedSolutionConstraint. |

### getInjectedSolutionConstraintOrBuilder()

    public InjectedSolutionConstraintOrBuilder getInjectedSolutionConstraintOrBuilder()

Constrain the optimization algorithm to find a final solution that is
similar to a previous solution. For example, this may be used to freeze
portions of routes which have already been completed or which are to be
completed but must not be modified.

If the injected solution is not feasible, a validation error is not
necessarily returned and an error indicating infeasibility may be returned
instead.

`
.google.cloud.optimization.v1.InjectedSolutionConstraint injected_solution_constraint = 8;
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-optimization/latest/com.google.cloud.optimization.v1.InjectedSolutionConstraintOrBuilder` |   |

### getInterpretInjectedSolutionsUsingLabels()

    public boolean getInterpretInjectedSolutionsUsingLabels()

If true:

- uses ShipmentRoute.vehicle_label instead of `vehicle_index` to match routes in an injected solution with vehicles in the request; reuses the mapping of original ShipmentRoute.vehicle_index to new ShipmentRoute.vehicle_index to update ConstraintRelaxation.vehicle_indices if non-empty, but the mapping must be unambiguous (i.e., multiple `ShipmentRoute`s must not share the same original `vehicle_index`).
- uses ShipmentRoute.Visit.shipment_label instead of `shipment_index` to match visits in an injected solution with shipments in the request;
- uses
  SkippedShipment.label
  instead of
  SkippedShipment.index
  to
  match skipped shipments in the injected solution with request
  shipments.

  This interpretation applies to the `injected_first_solution_routes`,
  `injected_solution_constraint`, and `refresh_details_routes` fields.
  It can be used when shipment or vehicle indices in the request have
  changed since the solution was created, perhaps because shipments or
  vehicles have been removed from or added to the request.

  If true, labels in the following categories must appear at most once in
  their category:
- Vehicle.label in the
  request;

- Shipment.label in the request;
- ShipmentRoute.vehicle_label in the injected solution;
- SkippedShipment.label and ShipmentRoute.Visit.shipment_label in
  the injected solution (except pickup/delivery visit pairs, whose
  `shipment_label` must appear twice).

  If a `vehicle_label` in the injected solution does not correspond to a
  request vehicle, the corresponding route is removed from the solution
  along with its visits. If a `shipment_label` in the injected solution does
  not correspond to a request shipment, the corresponding visit is removed
  from the solution. If a
  SkippedShipment.label
  in the injected solution does not correspond to a request shipment, the
  `SkippedShipment` is removed from the solution.

  Removing route visits or entire routes from an injected solution may
  have an effect on the implied constraints, which may lead to change in
  solution, validation errors, or infeasibility.

  NOTE: The caller must ensure that each
  Vehicle.label (resp.
  Shipment.label) uniquely
  identifies a vehicle (resp. shipment) entity used across the two relevant
  requests: the past request that produced the `OptimizeToursResponse` used
  in the injected solution and the current request that includes the injected
  solution. The uniqueness checks described above are not enough to guarantee
  this requirement.

`bool interpret_injected_solutions_using_labels = 10;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The interpretInjectedSolutionsUsingLabels. |

### getLabel()

    public String getLabel()

Label that may be used to identify this request, reported back in the
OptimizeToursResponse.request_label.

`string label = 17;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The label. |

### getLabelBytes()

    public ByteString getLabelBytes()

Label that may be used to identify this request, reported back in the
OptimizeToursResponse.request_label.

`string label = 17;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for label. |

### getMaxValidationErrors()

    public int getMaxValidationErrors()

Truncates the number of validation errors returned. These errors are
typically attached to an INVALID_ARGUMENT error payload as a BadRequest
error detail (<https://cloud.google.com/apis/design/errors#error_details>),
unless solving_mode=VALIDATE_ONLY: see the
OptimizeToursResponse.validation_errors
field.
This defaults to 100 and is capped at 10,000.

`optional int32 max_validation_errors = 5;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The maxValidationErrors. |

### getModel()

    public ShipmentModel getModel()

Shipment model to solve.

`.google.cloud.optimization.v1.ShipmentModel model = 3;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-optimization/latest/com.google.cloud.optimization.v1.ShipmentModel` | The model. |

### getModelOrBuilder()

    public ShipmentModelOrBuilder getModelOrBuilder()

Shipment model to solve.

`.google.cloud.optimization.v1.ShipmentModel model = 3;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-optimization/latest/com.google.cloud.optimization.v1.ShipmentModelOrBuilder` |   |

### getParent()

    public String getParent()

Required. Target project and location to make a call.

Format: `projects/{project-id}/locations/{location-id}`.

If no location is specified, a region will be chosen automatically.

`string parent = 1 [(.google.api.field_behavior) = REQUIRED];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The parent. |

### getParentBytes()

    public ByteString getParentBytes()

Required. Target project and location to make a call.

Format: `projects/{project-id}/locations/{location-id}`.

If no location is specified, a region will be chosen automatically.

`string parent = 1 [(.google.api.field_behavior) = REQUIRED];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for parent. |

### getParserForType()

    public Parser<OptimizeToursRequest> getParserForType()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Parser.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-optimization/latest/com.google.cloud.optimization.v1.OptimizeToursRequest>` |   |

**Overrides** [GeneratedMessage.getParserForType()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.html#com_google_protobuf_GeneratedMessage_getParserForType__)

### getPopulatePolylines()

    public boolean getPopulatePolylines()

If true, polylines will be populated in response `ShipmentRoute`s.

`bool populate_polylines = 12;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The populatePolylines. |

### getPopulateTransitionPolylines()

    public boolean getPopulateTransitionPolylines()

If true, polylines will be populated in response
ShipmentRoute.transitions.
Note that in this case, the polylines will also be populated in the
deprecated `travel_steps`.

`bool populate_transition_polylines = 13;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The populateTransitionPolylines. |

### getPopulateTravelStepPolylines() (deprecated)

    public boolean getPopulateTravelStepPolylines()

**Deprecated.** *google.cloud.optimization.v1.OptimizeToursRequest.populate_travel_step_polylines is
deprecated. See google/cloud/optimization/v1/fleet_routing.proto;l=359*

Deprecated: Use
OptimizeToursRequest.populate_transition_polylines
instead. If true, polylines will be populated in response
ShipmentRoute.transitions.
Note that in this case, the polylines will also be populated in the
deprecated `travel_steps`.

`bool populate_travel_step_polylines = 20 [deprecated = true];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The populateTravelStepPolylines. |

### getRefreshDetailsRoutes(int index)

    public ShipmentRoute getRefreshDetailsRoutes(int index)

If non-empty, the given routes will be refreshed, without modifying their
underlying sequence of visits or travel times: only other details will be
updated. This does not solve the model.

As of 2020/11, this only populates the polylines of non-empty routes and
requires that `populate_polylines` is true.

The `route_polyline` fields of the passed-in routes may be inconsistent
with route `transitions`.

This field must not be used together with `injected_first_solution_routes`
or `injected_solution_constraint`.

`Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior.
Polylines are still populated between all visits in all non-empty routes
regardless of whether the related shipments or vehicles are ignored.

`repeated .google.cloud.optimization.v1.ShipmentRoute refresh_details_routes = 9;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-optimization/latest/com.google.cloud.optimization.v1.ShipmentRoute` |   |

### getRefreshDetailsRoutesCount()

    public int getRefreshDetailsRoutesCount()

If non-empty, the given routes will be refreshed, without modifying their
underlying sequence of visits or travel times: only other details will be
updated. This does not solve the model.

As of 2020/11, this only populates the polylines of non-empty routes and
requires that `populate_polylines` is true.

The `route_polyline` fields of the passed-in routes may be inconsistent
with route `transitions`.

This field must not be used together with `injected_first_solution_routes`
or `injected_solution_constraint`.

`Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior.
Polylines are still populated between all visits in all non-empty routes
regardless of whether the related shipments or vehicles are ignored.

`repeated .google.cloud.optimization.v1.ShipmentRoute refresh_details_routes = 9;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getRefreshDetailsRoutesList()

    public List<ShipmentRoute> getRefreshDetailsRoutesList()

If non-empty, the given routes will be refreshed, without modifying their
underlying sequence of visits or travel times: only other details will be
updated. This does not solve the model.

As of 2020/11, this only populates the polylines of non-empty routes and
requires that `populate_polylines` is true.

The `route_polyline` fields of the passed-in routes may be inconsistent
with route `transitions`.

This field must not be used together with `injected_first_solution_routes`
or `injected_solution_constraint`.

`Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior.
Polylines are still populated between all visits in all non-empty routes
regardless of whether the related shipments or vehicles are ignored.

`repeated .google.cloud.optimization.v1.ShipmentRoute refresh_details_routes = 9;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-optimization/latest/com.google.cloud.optimization.v1.ShipmentRoute>` |   |

### getRefreshDetailsRoutesOrBuilder(int index)

    public ShipmentRouteOrBuilder getRefreshDetailsRoutesOrBuilder(int index)

If non-empty, the given routes will be refreshed, without modifying their
underlying sequence of visits or travel times: only other details will be
updated. This does not solve the model.

As of 2020/11, this only populates the polylines of non-empty routes and
requires that `populate_polylines` is true.

The `route_polyline` fields of the passed-in routes may be inconsistent
with route `transitions`.

This field must not be used together with `injected_first_solution_routes`
or `injected_solution_constraint`.

`Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior.
Polylines are still populated between all visits in all non-empty routes
regardless of whether the related shipments or vehicles are ignored.

`repeated .google.cloud.optimization.v1.ShipmentRoute refresh_details_routes = 9;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-optimization/latest/com.google.cloud.optimization.v1.ShipmentRouteOrBuilder` |   |

### getRefreshDetailsRoutesOrBuilderList()

    public List<? extends ShipmentRouteOrBuilder> getRefreshDetailsRoutesOrBuilderList()

If non-empty, the given routes will be refreshed, without modifying their
underlying sequence of visits or travel times: only other details will be
updated. This does not solve the model.

As of 2020/11, this only populates the polylines of non-empty routes and
requires that `populate_polylines` is true.

The `route_polyline` fields of the passed-in routes may be inconsistent
with route `transitions`.

This field must not be used together with `injected_first_solution_routes`
or `injected_solution_constraint`.

`Shipment.ignore` and `Vehicle.ignore` have no effect on the behavior.
Polylines are still populated between all visits in all non-empty routes
regardless of whether the related shipments or vehicles are ignored.

`repeated .google.cloud.optimization.v1.ShipmentRoute refresh_details_routes = 9;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<? extends com.google.cloud.optimization.v1.ShipmentRouteOrBuilder>` |   |

### getSearchMode()

    public OptimizeToursRequest.SearchMode getSearchMode()

Search mode used to solve the request.

`.google.cloud.optimization.v1.OptimizeToursRequest.SearchMode search_mode = 6;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-optimization/latest/com.google.cloud.optimization.v1.OptimizeToursRequest.SearchMode` | The searchMode. |

### getSearchModeValue()

    public int getSearchModeValue()

Search mode used to solve the request.

`.google.cloud.optimization.v1.OptimizeToursRequest.SearchMode search_mode = 6;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for searchMode. |

### getSerializedSize()

    public int getSerializedSize()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

**Overrides** [GeneratedMessage.getSerializedSize()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.html#com_google_protobuf_GeneratedMessage_getSerializedSize__)

### getSolvingMode()

    public OptimizeToursRequest.SolvingMode getSolvingMode()

By default, the solving mode is `DEFAULT_SOLVE` (0).

`.google.cloud.optimization.v1.OptimizeToursRequest.SolvingMode solving_mode = 4;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-optimization/latest/com.google.cloud.optimization.v1.OptimizeToursRequest.SolvingMode` | The solvingMode. |

### getSolvingModeValue()

    public int getSolvingModeValue()

By default, the solving mode is `DEFAULT_SOLVE` (0).

`.google.cloud.optimization.v1.OptimizeToursRequest.SolvingMode solving_mode = 4;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for solvingMode. |

### getTimeout()

    public Duration getTimeout()

If this timeout is set, the server returns a response before the timeout
period has elapsed or the server deadline for synchronous requests is
reached, whichever is sooner.

For asynchronous requests, the server will generate a solution (if
possible) before the timeout has elapsed.

`.google.protobuf.Duration timeout = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Duration.html` | The timeout. |

### getTimeoutOrBuilder()

    public DurationOrBuilder getTimeoutOrBuilder()

If this timeout is set, the server returns a response before the timeout
period has elapsed or the server deadline for synchronous requests is
reached, whichever is sooner.

For asynchronous requests, the server will generate a solution (if
possible) before the timeout has elapsed.

`.google.protobuf.Duration timeout = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.DurationOrBuilder.html` |   |

### getUseGeodesicDistances()

    public boolean getUseGeodesicDistances()

If true, travel distances will be computed using geodesic distances instead
of Google Maps distances, and travel times will be computed using geodesic
distances with a speed defined by `geodesic_meters_per_second`.

`bool use_geodesic_distances = 15;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The useGeodesicDistances. |

### hasGeodesicMetersPerSecond()

    public boolean hasGeodesicMetersPerSecond()

When `use_geodesic_distances` is true, this field must be set and defines
the speed applied to compute travel times. Its value must be at least 1.0
meters/seconds.

`optional double geodesic_meters_per_second = 16;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the geodesicMetersPerSecond field is set. |

### hasInjectedSolutionConstraint()

    public boolean hasInjectedSolutionConstraint()

Constrain the optimization algorithm to find a final solution that is
similar to a previous solution. For example, this may be used to freeze
portions of routes which have already been completed or which are to be
completed but must not be modified.

If the injected solution is not feasible, a validation error is not
necessarily returned and an error indicating infeasibility may be returned
instead.

`
.google.cloud.optimization.v1.InjectedSolutionConstraint injected_solution_constraint = 8;
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the injectedSolutionConstraint field is set. |

### hasMaxValidationErrors()

    public boolean hasMaxValidationErrors()

Truncates the number of validation errors returned. These errors are
typically attached to an INVALID_ARGUMENT error payload as a BadRequest
error detail (<https://cloud.google.com/apis/design/errors#error_details>),
unless solving_mode=VALIDATE_ONLY: see the
OptimizeToursResponse.validation_errors
field.
This defaults to 100 and is capped at 10,000.

`optional int32 max_validation_errors = 5;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the maxValidationErrors field is set. |

### hasModel()

    public boolean hasModel()

Shipment model to solve.

`.google.cloud.optimization.v1.ShipmentModel model = 3;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the model field is set. |

### hasTimeout()

    public boolean hasTimeout()

If this timeout is set, the server returns a response before the timeout
period has elapsed or the server deadline for synchronous requests is
reached, whichever is sooner.

For asynchronous requests, the server will generate a solution (if
possible) before the timeout has elapsed.

`.google.protobuf.Duration timeout = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the timeout field is set. |

### hashCode()

    public int hashCode()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

**Overrides** [AbstractMessage.hashCode()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.html#com_google_protobuf_AbstractMessage_hashCode__)

### internalGetFieldAccessorTable()

    protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.FieldAccessorTable.html` |   |

**Overrides** [GeneratedMessage.internalGetFieldAccessorTable()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.html#com_google_protobuf_GeneratedMessage_internalGetFieldAccessorTable__)

### isInitialized()

    public final boolean isInitialized()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

**Overrides** [GeneratedMessage.isInitialized()](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.html#com_google_protobuf_GeneratedMessage_isInitialized__)

### newBuilderForType()

    public OptimizeToursRequest.Builder newBuilderForType()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-optimization/latest/com.google.cloud.optimization.v1.OptimizeToursRequest.Builder` |   |

### newBuilderForType(AbstractMessage.BuilderParent parent)

    protected OptimizeToursRequest.Builder newBuilderForType(AbstractMessage.BuilderParent parent)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.BuilderParent.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-optimization/latest/com.google.cloud.optimization.v1.OptimizeToursRequest.Builder` |   |

**Overrides** [AbstractMessage.newBuilderForType(AbstractMessage.BuilderParent parent)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.AbstractMessage.html#com_google_protobuf_AbstractMessage_newBuilderForType_com_google_protobuf_AbstractMessage_BuilderParent_)

### toBuilder()

    public OptimizeToursRequest.Builder toBuilder()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-optimization/latest/com.google.cloud.optimization.v1.OptimizeToursRequest.Builder` |   |

### writeTo(CodedOutputStream output)

    public void writeTo(CodedOutputStream output)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `output` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.CodedOutputStream.html` |

**Overrides** [GeneratedMessage.writeTo(CodedOutputStream output)](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.GeneratedMessage.html#com_google_protobuf_GeneratedMessage_writeTo_com_google_protobuf_CodedOutputStream_)

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html` |   |