@googlemaps/routeoptimization 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.2.0](https://github.com/googleapis/google-cloud-node/compare/routeoptimization-v0.1.0...routeoptimization-v0.2.0) (2024-09-24)
4
+
5
+
6
+ ### Features
7
+
8
+ * [routeoptimization] minor fields and documentation update ([#5677](https://github.com/googleapis/google-cloud-node/issues/5677)) ([90a7e94](https://github.com/googleapis/google-cloud-node/commit/90a7e94a18e2472fd3e942c1006c0d53b5ab33fb))
9
+
3
10
  ## 0.1.0 (2024-05-23)
4
11
 
5
12
 
package/README.md CHANGED
@@ -44,7 +44,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
44
44
  1. [Select or create a Cloud Platform project][projects].
45
45
  1. [Enable billing for your project][billing].
46
46
  1. [Enable the Route Optimization API API][enable_api].
47
- 1. [Set up authentication with a service account][auth] so you can access the
47
+ 1. [Set up authentication][auth] so you can access the
48
48
  API from your local workstation.
49
49
 
50
50
  ### Installing the client library
@@ -362,4 +362,4 @@ See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE)
362
362
  [projects]: https://console.cloud.google.com/project
363
363
  [billing]: https://support.google.com/cloud/answer/6293499#enable-billing
364
364
  [enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=routeoptimization.googleapis.com
365
- [auth]: https://cloud.google.com/docs/authentication/getting-started
365
+ [auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local
@@ -85,11 +85,23 @@ service RouteOptimization {
85
85
  //
86
86
  // This method is a Long Running Operation (LRO). The inputs for optimization
87
87
  // (`OptimizeToursRequest` messages) and outputs (`OptimizeToursResponse`
88
- // messages) are read/written from/to Cloud Storage in user-specified
88
+ // messages) are read from and written to Cloud Storage in user-specified
89
89
  // format. Like the `OptimizeTours` method, each `OptimizeToursRequest`
90
90
  // contains a `ShipmentModel` and returns an `OptimizeToursResponse`
91
- // containing `ShipmentRoute`s, which are a set of routes to be performed by
92
- // vehicles minimizing the overall cost.
91
+ // containing `ShipmentRoute` fields, which are a set of routes to be
92
+ // performed by vehicles minimizing the overall cost.
93
+ //
94
+ // The user can poll `operations.get` to check the status of the LRO:
95
+ //
96
+ // If the LRO `done` field is false, then at least one request is still
97
+ // being processed. Other requests may have completed successfully and their
98
+ // results are available in Cloud Storage.
99
+ //
100
+ // If the LRO's `done` field is true, then all requests have been processed.
101
+ // Any successfully processed requests will have their results available in
102
+ // Cloud Storage. Any requests that failed will not have their results
103
+ // available in Cloud Storage. If the LRO's `error` field is set, then it
104
+ // contains the error from one of the failed requests.
93
105
  rpc BatchOptimizeTours(BatchOptimizeToursRequest)
94
106
  returns (google.longrunning.Operation) {
95
107
  option (google.api.http) = {
@@ -157,7 +169,8 @@ message OptimizeToursRequest {
157
169
  // [max_validation_errors][google.maps.routeoptimization.v1.OptimizeToursRequest.max_validation_errors]
158
170
  // to cap the number of errors returned.
159
171
  enum SolvingMode {
160
- // Solve the model.
172
+ // Solve the model. Warnings may be issued in
173
+ // [OptimizeToursResponse.validation_errors][google.cloud.optimization.v1.OptimizeToursResponse.validation_errors].
161
174
  DEFAULT_SOLVE = 0;
162
175
 
163
176
  // Only validates the model without solving it: populates as many
@@ -361,7 +374,7 @@ message OptimizeToursRequest {
361
374
  // If true, polylines will be populated in response `ShipmentRoute`s.
362
375
  bool populate_polylines = 12;
363
376
 
364
- // If true, polylines will be populated in response
377
+ // If true, polylines and route tokens will be populated in response
365
378
  // [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions].
366
379
  bool populate_transition_polylines = 13;
367
380
 
@@ -456,7 +469,8 @@ message OptimizeToursResponse {
456
469
  // List of all the validation errors that we were able to detect
457
470
  // independently. See the "MULTIPLE ERRORS" explanation for the
458
471
  // [OptimizeToursValidationError][google.maps.routeoptimization.v1.OptimizeToursValidationError]
459
- // message.
472
+ // message. Instead of errors, this will include warnings in the case
473
+ // `solving_mode` is `DEFAULT_SOLVE`.
460
474
  repeated OptimizeToursValidationError validation_errors = 5;
461
475
 
462
476
  // Duration, distance and usage metrics for this solution.
@@ -1008,6 +1022,32 @@ message ShipmentTypeRequirement {
1008
1022
  RequirementMode requirement_mode = 3;
1009
1023
  }
1010
1024
 
1025
+ // Encapsulates a set of optional conditions to satisfy when calculating
1026
+ // vehicle routes. This is similar to `RouteModifiers` in the Google Maps
1027
+ // Platform Routes Preferred API; see:
1028
+ // https://developers.google.com/maps/documentation/routes/reference/rest/v2/RouteModifiers.
1029
+ message RouteModifiers {
1030
+ // Specifies whether to avoid toll roads where reasonable. Preference will be
1031
+ // given to routes not containing toll roads. Applies only to motorized travel
1032
+ // modes.
1033
+ bool avoid_tolls = 2;
1034
+
1035
+ // Specifies whether to avoid highways where reasonable. Preference will be
1036
+ // given to routes not containing highways. Applies only to motorized travel
1037
+ // modes.
1038
+ bool avoid_highways = 3;
1039
+
1040
+ // Specifies whether to avoid ferries where reasonable. Preference will be
1041
+ // given to routes not containing travel by ferries. Applies only to motorized
1042
+ // travel modes.
1043
+ bool avoid_ferries = 4;
1044
+
1045
+ // Optional. Specifies whether to avoid navigating indoors where reasonable.
1046
+ // Preference will be given to routes not containing indoor navigation.
1047
+ // Applies only to the `WALKING` travel mode.
1048
+ bool avoid_indoor = 5 [(google.api.field_behavior) = OPTIONAL];
1049
+ }
1050
+
1011
1051
  // Models a vehicle in a shipment problem. Solving a shipment problem will
1012
1052
  // build a route starting from `start_location` and ending at `end_location`
1013
1053
  // for this vehicle. A route is a sequence of visits (see `ShipmentRoute`).
@@ -1152,6 +1192,10 @@ message Vehicle {
1152
1192
  // speed. See also `travel_duration_multiple`.
1153
1193
  TravelMode travel_mode = 1;
1154
1194
 
1195
+ // A set of conditions to satisfy that affect the way routes are calculated
1196
+ // for the given vehicle.
1197
+ RouteModifiers route_modifiers = 2;
1198
+
1155
1199
  // Geographic location where the vehicle starts before picking up any
1156
1200
  // shipments. If not specified, the vehicle starts at its first pickup.
1157
1201
  // If the shipment model has duration and distance matrices, `start_location`
@@ -1353,8 +1397,9 @@ message Vehicle {
1353
1397
  // [ShipmentModel.global_end_time][google.maps.routeoptimization.v1.ShipmentModel.global_end_time])
1354
1398
  // and should respect:
1355
1399
  // ```
1356
- // 0 <= `start_time` <= `soft_start_time` <= `end_time` and
1357
- // 0 <= `start_time` <= `soft_end_time` <= `end_time`.
1400
+ // 0 <= `start_time` <= `end_time` and
1401
+ // 0 <= `start_time` <= `soft_start_time` and
1402
+ // 0 <= `soft_end_time` <= `end_time`.
1358
1403
  // ```
1359
1404
  message TimeWindow {
1360
1405
  // The hard time window start time. If unspecified it will be set to
@@ -1416,6 +1461,15 @@ message DistanceLimit {
1416
1461
  // nonnegative.
1417
1462
  optional int64 soft_max_meters = 2;
1418
1463
 
1464
+ // Cost per kilometer incurred, increasing up to `soft_max_meters`, with
1465
+ // formula:
1466
+ // ```
1467
+ // min(distance_meters, soft_max_meters) / 1000.0 *
1468
+ // cost_per_kilometer_below_soft_max.
1469
+ // ```
1470
+ // This cost is not supported in `route_distance_limit`.
1471
+ optional double cost_per_kilometer_below_soft_max = 4;
1472
+
1419
1473
  // Cost per kilometer incurred if distance is above `soft_max_meters` limit.
1420
1474
  // The additional cost is 0 if the distance is under the limit, otherwise the
1421
1475
  // formula used to compute the cost is the following:
@@ -1794,6 +1848,17 @@ message ShipmentRoute {
1794
1848
  // is set to true.
1795
1849
  EncodedPolyline route_polyline = 9;
1796
1850
 
1851
+ // Output only. An opaque token that can be passed to [Navigation
1852
+ // SDK](https://developers.google.com/maps/documentation/navigation) to
1853
+ // reconstruct the route during navigation, and, in the event of rerouting,
1854
+ // honor the original intention when the route was created. Treat this token
1855
+ // as an opaque blob. Don't compare its value across requests as its value
1856
+ // may change even if the service returns the exact same route. This field
1857
+ // is only populated if [populate_transition_polylines]
1858
+ // [google.maps.routeoptimization.v1.OptimizeToursRequest.populate_transition_polylines]
1859
+ // is set to true.
1860
+ string route_token = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
1861
+
1797
1862
  // Vehicle loads during this transition, for each type that either appears
1798
1863
  // in this vehicle's
1799
1864
  // [Vehicle.load_limits][google.maps.routeoptimization.v1.Vehicle.load_limits],
@@ -1947,8 +2012,7 @@ message SkippedShipment {
1947
2012
  // particular, it gives no indication of whether a given reason will
1948
2013
  // appear before another in the solution, if both apply.
1949
2014
  enum Code {
1950
- // This should never be used. If we are unable to understand why a
1951
- // shipment was skipped, we simply return an empty set of reasons.
2015
+ // This should never be used.
1952
2016
  CODE_UNSPECIFIED = 0;
1953
2017
 
1954
2018
  // There is no vehicle in the model making all shipments infeasible.
@@ -2011,7 +2075,8 @@ message SkippedShipment {
2011
2075
  string label = 2;
2012
2076
 
2013
2077
  // A list of reasons that explain why the shipment was skipped. See comment
2014
- // above `Reason`.
2078
+ // above `Reason`. If we are unable to understand why a shipment was skipped,
2079
+ // reasons will not be set.
2015
2080
  repeated Reason reasons = 3;
2016
2081
  }
2017
2082
 
@@ -2127,7 +2192,8 @@ message InjectedSolutionConstraint {
2127
2192
  RELAX_VISIT_TIMES_AFTER_THRESHOLD = 1;
2128
2193
 
2129
2194
  // Same as `RELAX_VISIT_TIMES_AFTER_THRESHOLD`, but the visit sequence
2130
- // is also relaxed: visits remain simply bound to their vehicle.
2195
+ // is also relaxed: visits can only be performed by this vehicle, but
2196
+ // can potentially become unperformed.
2131
2197
  RELAX_VISIT_TIMES_AND_SEQUENCE_AFTER_THRESHOLD = 2;
2132
2198
 
2133
2199
  // Same as `RELAX_VISIT_TIMES_AND_SEQUENCE_AFTER_THRESHOLD`, but the
@@ -2188,7 +2254,8 @@ message InjectedSolutionConstraint {
2188
2254
  repeated ConstraintRelaxation constraint_relaxations = 3;
2189
2255
  }
2190
2256
 
2191
- // Describes an error encountered when validating an `OptimizeToursRequest`.
2257
+ // Describes an error or warning encountered when validating an
2258
+ // `OptimizeToursRequest`.
2192
2259
  message OptimizeToursValidationError {
2193
2260
  // Specifies a context for the validation error. A `FieldReference` always
2194
2261
  // refers to a given field in this file and follows the same hierarchical
@@ -2218,240 +2285,21 @@ message OptimizeToursValidationError {
2218
2285
  // A validation error is defined by the pair (`code`, `display_name`) which
2219
2286
  // are always present.
2220
2287
  //
2221
- // Other fields (below) provide more context about the error.
2288
+ // The fields following this section provide more context about the error.
2222
2289
  //
2223
2290
  // *MULTIPLE ERRORS*:
2224
2291
  // When there are multiple errors, the validation process tries to output
2225
2292
  // several of them. Much like a compiler, this is an imperfect process. Some
2226
2293
  // validation errors will be "fatal", meaning that they stop the entire
2227
2294
  // validation process. This is the case for `display_name="UNSPECIFIED"`
2228
- // errors, among others. Some may cause the validation process to skip other
2229
- // errors.
2295
+ // errors, among others. Some errors may cause the validation process to skip
2296
+ // other errors.
2230
2297
  //
2231
2298
  // *STABILITY*:
2232
2299
  // `code` and `display_name` should be very stable. But new codes and
2233
2300
  // display names may appear over time, which may cause a given (invalid)
2234
2301
  // request to yield a different (`code`, `display_name`) pair because the new
2235
- // error hid the old one (see "MULTIPLE ERRORS").
2236
- //
2237
- // *REFERENCE*: A list of all (code, name) pairs:
2238
- //
2239
- // * UNSPECIFIED = 0;
2240
- // * VALIDATION_TIMEOUT_ERROR = 10; Validation couldn't be completed within
2241
- // the deadline.
2242
- //
2243
- // * REQUEST_OPTIONS_ERROR = 12;
2244
- // * REQUEST_OPTIONS_INVALID_SOLVING_MODE = 1201;
2245
- // * REQUEST_OPTIONS_INVALID_MAX_VALIDATION_ERRORS = 1203;
2246
- // * REQUEST_OPTIONS_INVALID_GEODESIC_METERS_PER_SECOND = 1204;
2247
- // * REQUEST_OPTIONS_GEODESIC_METERS_PER_SECOND_TOO_SMALL = 1205;
2248
- // * REQUEST_OPTIONS_MISSING_GEODESIC_METERS_PER_SECOND = 1206;
2249
- // * REQUEST_OPTIONS_POPULATE_PATHFINDER_TRIPS_AND_GEODESIC_DISTANCE
2250
- // = 1207;
2251
- // * REQUEST_OPTIONS_COST_MODEL_OPTIONS_AND_GEODESIC_DISTANCE = 1208;
2252
- // * REQUEST_OPTIONS_TRAVEL_MODE_INCOMPATIBLE_WITH_TRAFFIC = 1211;
2253
- // * REQUEST_OPTIONS_MULTIPLE_TRAFFIC_FLAVORS = 1212;
2254
- // * REQUEST_OPTIONS_INVALID_TRAFFIC_FLAVOR = 1213;
2255
- // * REQUEST_OPTIONS_TRAFFIC_ENABLED_WITHOUT_GLOBAL_START_TIME = 1214;
2256
- // * REQUEST_OPTIONS_TRAFFIC_ENABLED_WITH_PRECEDENCES = 1215;
2257
- // * REQUEST_OPTIONS_TRAFFIC_PREFILL_MODE_INVALID = 1216;
2258
- // * REQUEST_OPTIONS_TRAFFIC_PREFILL_ENABLED_WITHOUT_TRAFFIC = 1217;
2259
- // * INJECTED_SOLUTION_ERROR = 20;
2260
- // * INJECTED_SOLUTION_MISSING_LABEL = 2000;
2261
- // * INJECTED_SOLUTION_DUPLICATE_LABEL = 2001;
2262
- // * INJECTED_SOLUTION_AMBIGUOUS_INDEX = 2002;
2263
- // * INJECTED_SOLUTION_INFEASIBLE_AFTER_GETTING_TRAVEL_TIMES = 2003;
2264
- // * INJECTED_SOLUTION_TRANSITION_INCONSISTENT_WITH_ACTUAL_TRAVEL = 2004;
2265
- // * INJECTED_SOLUTION_CONCURRENT_SOLUTION_TYPES = 2005;
2266
- // * INJECTED_SOLUTION_MORE_THAN_ONE_PER_TYPE = 2006;
2267
- // * INJECTED_SOLUTION_REFRESH_WITHOUT_POPULATE = 2008;
2268
- // * INJECTED_SOLUTION_CONSTRAINED_ROUTE_PORTION_INFEASIBLE = 2010;
2269
- // * SHIPMENT_MODEL_ERROR = 22;
2270
- // * SHIPMENT_MODEL_TOO_LARGE = 2200;
2271
- // * SHIPMENT_MODEL_TOO_MANY_CAPACITY_TYPES = 2201;
2272
- // * SHIPMENT_MODEL_GLOBAL_START_TIME_NEGATIVE_OR_NAN = 2202;
2273
- // * SHIPMENT_MODEL_GLOBAL_END_TIME_TOO_LARGE_OR_NAN = 2203;
2274
- // * SHIPMENT_MODEL_GLOBAL_START_TIME_AFTER_GLOBAL_END_TIME = 2204;
2275
- // * SHIPMENT_MODEL_GLOBAL_DURATION_TOO_LONG = 2205;
2276
- // * SHIPMENT_MODEL_MAX_ACTIVE_VEHICLES_NOT_POSITIVE = 2206;
2277
- // * SHIPMENT_MODEL_DURATION_MATRIX_TOO_LARGE = 2207;
2278
- // * INDEX_ERROR = 24;
2279
- // * TAG_ERROR = 26;
2280
- // * TIME_WINDOW_ERROR = 28;
2281
- // * TIME_WINDOW_INVALID_START_TIME = 2800;
2282
- // * TIME_WINDOW_INVALID_END_TIME = 2801;
2283
- // * TIME_WINDOW_INVALID_SOFT_START_TIME = 2802;
2284
- // * TIME_WINDOW_INVALID_SOFT_END_TIME = 2803;
2285
- // * TIME_WINDOW_OUTSIDE_GLOBAL_TIME_WINDOW = 2804;
2286
- // * TIME_WINDOW_START_TIME_AFTER_END_TIME = 2805;
2287
- // * TIME_WINDOW_INVALID_COST_PER_HOUR_BEFORE_SOFT_START_TIME = 2806;
2288
- // * TIME_WINDOW_INVALID_COST_PER_HOUR_AFTER_SOFT_END_TIME = 2807;
2289
- // * TIME_WINDOW_COST_BEFORE_SOFT_START_TIME_WITHOUT_SOFT_START_TIME
2290
- // = 2808;
2291
- // * TIME_WINDOW_COST_AFTER_SOFT_END_TIME_WITHOUT_SOFT_END_TIME = 2809;
2292
- // * TIME_WINDOW_SOFT_START_TIME_WITHOUT_COST_BEFORE_SOFT_START_TIME
2293
- // = 2810;
2294
- // * TIME_WINDOW_SOFT_END_TIME_WITHOUT_COST_AFTER_SOFT_END_TIME = 2811;
2295
- // * TIME_WINDOW_OVERLAPPING_ADJACENT_OR_EARLIER_THAN_PREVIOUS = 2812;
2296
- // * TIME_WINDOW_START_TIME_AFTER_SOFT_START_TIME = 2813;
2297
- // * TIME_WINDOW_SOFT_START_TIME_AFTER_END_TIME = 2814;
2298
- // * TIME_WINDOW_START_TIME_AFTER_SOFT_END_TIME = 2815;
2299
- // * TIME_WINDOW_SOFT_END_TIME_AFTER_END_TIME = 2816;
2300
- // * TIME_WINDOW_COST_BEFORE_SOFT_START_TIME_SET_AND_MULTIPLE_WINDOWS
2301
- // = 2817;
2302
- // * TIME_WINDOW_COST_AFTER_SOFT_END_TIME_SET_AND_MULTIPLE_WINDOWS = 2818;
2303
- // * TRANSITION_ATTRIBUTES_ERROR = 30;
2304
- // * TRANSITION_ATTRIBUTES_INVALID_COST = 3000;
2305
- // * TRANSITION_ATTRIBUTES_INVALID_COST_PER_KILOMETER = 3001;
2306
- // * TRANSITION_ATTRIBUTES_DUPLICATE_TAG_PAIR = 3002;
2307
- // * TRANSITION_ATTRIBUTES_DISTANCE_LIMIT_MAX_METERS_UNSUPPORTED = 3003;
2308
- // * TRANSITION_ATTRIBUTES_UNSPECIFIED_SOURCE_TAGS = 3004;
2309
- // * TRANSITION_ATTRIBUTES_CONFLICTING_SOURCE_TAGS_FIELDS = 3005;
2310
- // * TRANSITION_ATTRIBUTES_UNSPECIFIED_DESTINATION_TAGS = 3006;
2311
- // * TRANSITION_ATTRIBUTES_CONFLICTING_DESTINATION_TAGS_FIELDS = 3007;
2312
- // * TRANSITION_ATTRIBUTES_DELAY_DURATION_NEGATIVE_OR_NAN = 3008;
2313
- // * TRANSITION_ATTRIBUTES_DELAY_DURATION_EXCEEDS_GLOBAL_DURATION = 3009;
2314
- // * AMOUNT_ERROR = 31;
2315
- // * AMOUNT_NEGATIVE_VALUE = 3100;
2316
- // * LOAD_LIMIT_ERROR = 33;
2317
- // * LOAD_LIMIT_INVALID_COST_ABOVE_SOFT_MAX = 3303;
2318
- // * LOAD_LIMIT_SOFT_MAX_WITHOUT_COST_ABOVE_SOFT_MAX = 3304;
2319
- // * LOAD_LIMIT_COST_ABOVE_SOFT_MAX_WITHOUT_SOFT_MAX = 3305;
2320
- // * LOAD_LIMIT_NEGATIVE_SOFT_MAX = 3306;
2321
- // * LOAD_LIMIT_MIXED_DEMAND_TYPE = 3307;
2322
- // * LOAD_LIMIT_MAX_LOAD_NEGATIVE_VALUE = 3308;
2323
- // * LOAD_LIMIT_SOFT_MAX_ABOVE_MAX = 3309;
2324
- // * INTERVAL_ERROR = 34;
2325
- // * INTERVAL_MIN_EXCEEDS_MAX = 3401;
2326
- // * INTERVAL_NEGATIVE_MIN = 3402;
2327
- // * INTERVAL_NEGATIVE_MAX = 3403;
2328
- // * INTERVAL_MIN_EXCEEDS_CAPACITY = 3404;
2329
- // * INTERVAL_MAX_EXCEEDS_CAPACITY = 3405;
2330
- // * DISTANCE_LIMIT_ERROR = 36;
2331
- // * DISTANCE_LIMIT_INVALID_COST_AFTER_SOFT_MAX = 3601;
2332
- // * DISTANCE_LIMIT_SOFT_MAX_WITHOUT_COST_AFTER_SOFT_MAX = 3602;
2333
- // * DISTANCE_LIMIT_COST_AFTER_SOFT_MAX_WITHOUT_SOFT_MAX = 3603;
2334
- // * DISTANCE_LIMIT_NEGATIVE_MAX = 3604;
2335
- // * DISTANCE_LIMIT_NEGATIVE_SOFT_MAX = 3605;
2336
- // * DISTANCE_LIMIT_SOFT_MAX_LARGER_THAN_MAX = 3606;
2337
- // * DURATION_LIMIT_ERROR = 38;
2338
- // * DURATION_LIMIT_MAX_DURATION_NEGATIVE_OR_NAN = 3800;
2339
- // * DURATION_LIMIT_SOFT_MAX_DURATION_NEGATIVE_OR_NAN = 3801;
2340
- // * DURATION_LIMIT_INVALID_COST_PER_HOUR_AFTER_SOFT_MAX = 3802;
2341
- // * DURATION_LIMIT_SOFT_MAX_WITHOUT_COST_AFTER_SOFT_MAX = 3803;
2342
- // * DURATION_LIMIT_COST_AFTER_SOFT_MAX_WITHOUT_SOFT_MAX = 3804;
2343
- // * DURATION_LIMIT_QUADRATIC_SOFT_MAX_DURATION_NEGATIVE_OR_NAN = 3805;
2344
- // * DURATION_LIMIT_INVALID_COST_AFTER_QUADRATIC_SOFT_MAX = 3806;
2345
- // * DURATION_LIMIT_QUADRATIC_SOFT_MAX_WITHOUT_COST_PER_SQUARE_HOUR
2346
- // = 3807;
2347
- // * DURATION_LIMIT_COST_PER_SQUARE_HOUR_WITHOUT_QUADRATIC_SOFT_MAX
2348
- // = 3808;
2349
- // * DURATION_LIMIT_QUADRATIC_SOFT_MAX_WITHOUT_MAX = 3809;
2350
- // * DURATION_LIMIT_SOFT_MAX_LARGER_THAN_MAX = 3810;
2351
- // * DURATION_LIMIT_QUADRATIC_SOFT_MAX_LARGER_THAN_MAX = 3811;
2352
- // * DURATION_LIMIT_DIFF_BETWEEN_MAX_AND_QUADRATIC_SOFT_MAX_TOO_LARGE
2353
- // = 3812;
2354
- // * DURATION_LIMIT_MAX_DURATION_EXCEEDS_GLOBAL_DURATION = 3813;
2355
- // * DURATION_LIMIT_SOFT_MAX_DURATION_EXCEEDS_GLOBAL_DURATION = 3814;
2356
- // * DURATION_LIMIT_QUADRATIC_SOFT_MAX_DURATION_EXCEEDS_GLOBAL_DURATION
2357
- // = 3815;
2358
- // * SHIPMENT_ERROR = 40;
2359
- // * SHIPMENT_PD_LIMIT_WITHOUT_PICKUP_AND_DELIVERY = 4014;
2360
- // * SHIPMENT_PD_ABSOLUTE_DETOUR_LIMIT_DURATION_NEGATIVE_OR_NAN = 4000;
2361
- // * SHIPMENT_PD_ABSOLUTE_DETOUR_LIMIT_DURATION_EXCEEDS_GLOBAL_DURATION
2362
- // = 4001;
2363
- // * SHIPMENT_PD_RELATIVE_DETOUR_LIMIT_INVALID = 4015;
2364
- // * SHIPMENT_PD_DETOUR_LIMIT_AND_EXTRA_VISIT_DURATION = 4016;
2365
- // * SHIPMENT_PD_TIME_LIMIT_DURATION_NEGATIVE_OR_NAN = 4002;
2366
- // * SHIPMENT_PD_TIME_LIMIT_DURATION_EXCEEDS_GLOBAL_DURATION = 4003;
2367
- // * SHIPMENT_EMPTY_SHIPMENT_TYPE = 4004;
2368
- // * SHIPMENT_NO_PICKUP_NO_DELIVERY = 4005;
2369
- // * SHIPMENT_INVALID_PENALTY_COST = 4006;
2370
- // * SHIPMENT_ALLOWED_VEHICLE_INDEX_OUT_OF_BOUNDS = 4007;
2371
- // * SHIPMENT_DUPLICATE_ALLOWED_VEHICLE_INDEX = 4008;
2372
- // * SHIPMENT_INCONSISTENT_COST_FOR_VEHICLE_SIZE_WITHOUT_INDEX = 4009;
2373
- // * SHIPMENT_INCONSISTENT_COST_FOR_VEHICLE_SIZE_WITH_INDEX = 4010;
2374
- // * SHIPMENT_INVALID_COST_FOR_VEHICLE = 4011;
2375
- // * SHIPMENT_COST_FOR_VEHICLE_INDEX_OUT_OF_BOUNDS = 4012;
2376
- // * SHIPMENT_DUPLICATE_COST_FOR_VEHICLE_INDEX = 4013;
2377
- // * VEHICLE_ERROR = 42;
2378
- // * VEHICLE_EMPTY_REQUIRED_OPERATOR_TYPE = 4200;
2379
- // * VEHICLE_DUPLICATE_REQUIRED_OPERATOR_TYPE = 4201;
2380
- // * VEHICLE_NO_OPERATOR_WITH_REQUIRED_OPERATOR_TYPE = 4202;
2381
- // * VEHICLE_EMPTY_START_TAG = 4203;
2382
- // * VEHICLE_DUPLICATE_START_TAG = 4204;
2383
- // * VEHICLE_EMPTY_END_TAG = 4205;
2384
- // * VEHICLE_DUPLICATE_END_TAG = 4206;
2385
- // * VEHICLE_EXTRA_VISIT_DURATION_NEGATIVE_OR_NAN = 4207;
2386
- // * VEHICLE_EXTRA_VISIT_DURATION_EXCEEDS_GLOBAL_DURATION = 4208;
2387
- // * VEHICLE_EXTRA_VISIT_DURATION_EMPTY_KEY = 4209;
2388
- // * VEHICLE_FIRST_SHIPMENT_INDEX_OUT_OF_BOUNDS = 4210;
2389
- // * VEHICLE_FIRST_SHIPMENT_IGNORED = 4211;
2390
- // * VEHICLE_FIRST_SHIPMENT_NOT_BOUND = 4212;
2391
- // * VEHICLE_LAST_SHIPMENT_INDEX_OUT_OF_BOUNDS = 4213;
2392
- // * VEHICLE_LAST_SHIPMENT_IGNORED = 4214;
2393
- // * VEHICLE_LAST_SHIPMENT_NOT_BOUND = 4215;
2394
- // * VEHICLE_IGNORED_WITH_USED_IF_ROUTE_IS_EMPTY = 4216;
2395
- // * VEHICLE_INVALID_COST_PER_KILOMETER = 4217;
2396
- // * VEHICLE_INVALID_COST_PER_HOUR = 4218;
2397
- // * VEHICLE_INVALID_COST_PER_TRAVELED_HOUR = 4219;
2398
- // * VEHICLE_INVALID_FIXED_COST = 4220;
2399
- // * VEHICLE_INVALID_TRAVEL_DURATION_MULTIPLE = 4221;
2400
- // * VEHICLE_TRAVEL_DURATION_MULTIPLE_WITH_SHIPMENT_PD_DETOUR_LIMITS
2401
- // = 4223;
2402
- // * VEHICLE_MATRIX_INDEX_WITH_SHIPMENT_PD_DETOUR_LIMITS = 4224;
2403
- // * VEHICLE_MINIMUM_DURATION_LONGER_THAN_DURATION_LIMIT = 4222;
2404
- // * VISIT_REQUEST_ERROR = 44;
2405
- // * VISIT_REQUEST_EMPTY_TAG = 4400;
2406
- // * VISIT_REQUEST_DUPLICATE_TAG = 4401;
2407
- // * VISIT_REQUEST_DURATION_NEGATIVE_OR_NAN = 4404;
2408
- // * VISIT_REQUEST_DURATION_EXCEEDS_GLOBAL_DURATION = 4405;
2409
- // * PRECEDENCE_ERROR = 46;
2410
- // * BREAK_ERROR = 48;
2411
- // * BREAK_RULE_EMPTY = 4800;
2412
- // * BREAK_REQUEST_UNSPECIFIED_DURATION = 4801;
2413
- // * BREAK_REQUEST_UNSPECIFIED_EARLIEST_START_TIME = 4802;
2414
- // * BREAK_REQUEST_UNSPECIFIED_LATEST_START_TIME = 4803;
2415
- // * BREAK_REQUEST_DURATION_NEGATIVE_OR_NAN = 4804; = 4804;
2416
- // * BREAK_REQUEST_LATEST_START_TIME_BEFORE_EARLIEST_START_TIME = 4805;
2417
- // * BREAK_REQUEST_EARLIEST_START_TIME_BEFORE_GLOBAL_START_TIME = 4806;
2418
- // * BREAK_REQUEST_LATEST_END_TIME_AFTER_GLOBAL_END_TIME = 4807;
2419
- // * BREAK_REQUEST_NON_SCHEDULABLE = 4808;
2420
- // * BREAK_FREQUENCY_MAX_INTER_BREAK_DURATION_NEGATIVE_OR_NAN = 4809;
2421
- // * BREAK_FREQUENCY_MIN_BREAK_DURATION_NEGATIVE_OR_NAN = 4810;
2422
- // * BREAK_FREQUENCY_MIN_BREAK_DURATION_EXCEEDS_GLOBAL_DURATION = 4811;
2423
- // * BREAK_FREQUENCY_MAX_INTER_BREAK_DURATION_EXCEEDS_GLOBAL_DURATION
2424
- // = 4812;
2425
- // * BREAK_REQUEST_DURATION_EXCEEDS_GLOBAL_DURATION = 4813;
2426
- // * BREAK_FREQUENCY_MISSING_MAX_INTER_BREAK_DURATION = 4814;
2427
- // * BREAK_FREQUENCY_MISSING_MIN_BREAK_DURATION = 4815;
2428
- // * SHIPMENT_TYPE_INCOMPATIBILITY_ERROR = 50;
2429
- // * SHIPMENT_TYPE_INCOMPATIBILITY_EMPTY_TYPE = 5001;
2430
- // * SHIPMENT_TYPE_INCOMPATIBILITY_LESS_THAN_TWO_TYPES = 5002;
2431
- // * SHIPMENT_TYPE_INCOMPATIBILITY_DUPLICATE_TYPE = 5003;
2432
- // * SHIPMENT_TYPE_INCOMPATIBILITY_INVALID_INCOMPATIBILITY_MODE = 5004;
2433
- // * SHIPMENT_TYPE_INCOMPATIBILITY_TOO_MANY_INCOMPATIBILITIES = 5005;
2434
- // * SHIPMENT_TYPE_REQUIREMENT_ERROR = 52;
2435
- // * SHIPMENT_TYPE_REQUIREMENT_NO_REQUIRED_TYPE = 52001;
2436
- // * SHIPMENT_TYPE_REQUIREMENT_NO_DEPENDENT_TYPE = 52002;
2437
- // * SHIPMENT_TYPE_REQUIREMENT_INVALID_REQUIREMENT_MODE = 52003;
2438
- // * SHIPMENT_TYPE_REQUIREMENT_TOO_MANY_REQUIREMENTS = 52004;
2439
- // * SHIPMENT_TYPE_REQUIREMENT_EMPTY_REQUIRED_TYPE = 52005;
2440
- // * SHIPMENT_TYPE_REQUIREMENT_DUPLICATE_REQUIRED_TYPE = 52006;
2441
- // * SHIPMENT_TYPE_REQUIREMENT_NO_REQUIRED_TYPE_FOUND = 52007;
2442
- // * SHIPMENT_TYPE_REQUIREMENT_EMPTY_DEPENDENT_TYPE = 52008;
2443
- // * SHIPMENT_TYPE_REQUIREMENT_DUPLICATE_DEPENDENT_TYPE = 52009;
2444
- // * SHIPMENT_TYPE_REQUIREMENT_SELF_DEPENDENT_TYPE = 52010;
2445
- // * SHIPMENT_TYPE_REQUIREMENT_GRAPH_HAS_CYCLES = 52011;
2446
- // * VEHICLE_OPERATOR_ERROR = 54;
2447
- // * VEHICLE_OPERATOR_EMPTY_TYPE = 5400;
2448
- // * VEHICLE_OPERATOR_MULTIPLE_START_TIME_WINDOWS = 5401;
2449
- // * VEHICLE_OPERATOR_SOFT_START_TIME_WINDOW = 5402;
2450
- // * VEHICLE_OPERATOR_MULTIPLE_END_TIME_WINDOWS = 5403;
2451
- // * VEHICLE_OPERATOR_SOFT_END_TIME_WINDOW = 5404;
2452
- // * DURATION_SECONDS_MATRIX_ERROR = 56;
2453
- // * DURATION_SECONDS_MATRIX_DURATION_NEGATIVE_OR_NAN = 5600;
2454
- // * DURATION_SECONDS_MATRIX_DURATION_EXCEEDS_GLOBAL_DURATION = 5601;
2302
+ // error hid the old one. For example, see "MULTIPLE ERRORS".
2455
2303
  int32 code = 1;
2456
2304
 
2457
2305
  // The error display name.
@@ -2144,6 +2144,121 @@ export namespace google {
2144
2144
  }
2145
2145
  }
2146
2146
 
2147
+ /** Properties of a RouteModifiers. */
2148
+ interface IRouteModifiers {
2149
+
2150
+ /** RouteModifiers avoidTolls */
2151
+ avoidTolls?: (boolean|null);
2152
+
2153
+ /** RouteModifiers avoidHighways */
2154
+ avoidHighways?: (boolean|null);
2155
+
2156
+ /** RouteModifiers avoidFerries */
2157
+ avoidFerries?: (boolean|null);
2158
+
2159
+ /** RouteModifiers avoidIndoor */
2160
+ avoidIndoor?: (boolean|null);
2161
+ }
2162
+
2163
+ /** Represents a RouteModifiers. */
2164
+ class RouteModifiers implements IRouteModifiers {
2165
+
2166
+ /**
2167
+ * Constructs a new RouteModifiers.
2168
+ * @param [properties] Properties to set
2169
+ */
2170
+ constructor(properties?: google.maps.routeoptimization.v1.IRouteModifiers);
2171
+
2172
+ /** RouteModifiers avoidTolls. */
2173
+ public avoidTolls: boolean;
2174
+
2175
+ /** RouteModifiers avoidHighways. */
2176
+ public avoidHighways: boolean;
2177
+
2178
+ /** RouteModifiers avoidFerries. */
2179
+ public avoidFerries: boolean;
2180
+
2181
+ /** RouteModifiers avoidIndoor. */
2182
+ public avoidIndoor: boolean;
2183
+
2184
+ /**
2185
+ * Creates a new RouteModifiers instance using the specified properties.
2186
+ * @param [properties] Properties to set
2187
+ * @returns RouteModifiers instance
2188
+ */
2189
+ public static create(properties?: google.maps.routeoptimization.v1.IRouteModifiers): google.maps.routeoptimization.v1.RouteModifiers;
2190
+
2191
+ /**
2192
+ * Encodes the specified RouteModifiers message. Does not implicitly {@link google.maps.routeoptimization.v1.RouteModifiers.verify|verify} messages.
2193
+ * @param message RouteModifiers message or plain object to encode
2194
+ * @param [writer] Writer to encode to
2195
+ * @returns Writer
2196
+ */
2197
+ public static encode(message: google.maps.routeoptimization.v1.IRouteModifiers, writer?: $protobuf.Writer): $protobuf.Writer;
2198
+
2199
+ /**
2200
+ * Encodes the specified RouteModifiers message, length delimited. Does not implicitly {@link google.maps.routeoptimization.v1.RouteModifiers.verify|verify} messages.
2201
+ * @param message RouteModifiers message or plain object to encode
2202
+ * @param [writer] Writer to encode to
2203
+ * @returns Writer
2204
+ */
2205
+ public static encodeDelimited(message: google.maps.routeoptimization.v1.IRouteModifiers, writer?: $protobuf.Writer): $protobuf.Writer;
2206
+
2207
+ /**
2208
+ * Decodes a RouteModifiers message from the specified reader or buffer.
2209
+ * @param reader Reader or buffer to decode from
2210
+ * @param [length] Message length if known beforehand
2211
+ * @returns RouteModifiers
2212
+ * @throws {Error} If the payload is not a reader or valid buffer
2213
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
2214
+ */
2215
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.routeoptimization.v1.RouteModifiers;
2216
+
2217
+ /**
2218
+ * Decodes a RouteModifiers message from the specified reader or buffer, length delimited.
2219
+ * @param reader Reader or buffer to decode from
2220
+ * @returns RouteModifiers
2221
+ * @throws {Error} If the payload is not a reader or valid buffer
2222
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
2223
+ */
2224
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.routeoptimization.v1.RouteModifiers;
2225
+
2226
+ /**
2227
+ * Verifies a RouteModifiers message.
2228
+ * @param message Plain object to verify
2229
+ * @returns `null` if valid, otherwise the reason why it is not
2230
+ */
2231
+ public static verify(message: { [k: string]: any }): (string|null);
2232
+
2233
+ /**
2234
+ * Creates a RouteModifiers message from a plain object. Also converts values to their respective internal types.
2235
+ * @param object Plain object
2236
+ * @returns RouteModifiers
2237
+ */
2238
+ public static fromObject(object: { [k: string]: any }): google.maps.routeoptimization.v1.RouteModifiers;
2239
+
2240
+ /**
2241
+ * Creates a plain object from a RouteModifiers message. Also converts values to other types if specified.
2242
+ * @param message RouteModifiers
2243
+ * @param [options] Conversion options
2244
+ * @returns Plain object
2245
+ */
2246
+ public static toObject(message: google.maps.routeoptimization.v1.RouteModifiers, options?: $protobuf.IConversionOptions): { [k: string]: any };
2247
+
2248
+ /**
2249
+ * Converts this RouteModifiers to JSON.
2250
+ * @returns JSON object
2251
+ */
2252
+ public toJSON(): { [k: string]: any };
2253
+
2254
+ /**
2255
+ * Gets the default type url for RouteModifiers
2256
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
2257
+ * @returns The default type url
2258
+ */
2259
+ public static getTypeUrl(typeUrlPrefix?: string): string;
2260
+ }
2261
+
2147
2262
  /** Properties of a Vehicle. */
2148
2263
  interface IVehicle {
2149
2264
 
@@ -2153,6 +2268,9 @@ export namespace google {
2153
2268
  /** Vehicle travelMode */
2154
2269
  travelMode?: (google.maps.routeoptimization.v1.Vehicle.TravelMode|keyof typeof google.maps.routeoptimization.v1.Vehicle.TravelMode|null);
2155
2270
 
2271
+ /** Vehicle routeModifiers */
2272
+ routeModifiers?: (google.maps.routeoptimization.v1.IRouteModifiers|null);
2273
+
2156
2274
  /** Vehicle startLocation */
2157
2275
  startLocation?: (google.type.ILatLng|null);
2158
2276
 
@@ -2238,6 +2356,9 @@ export namespace google {
2238
2356
  /** Vehicle travelMode. */
2239
2357
  public travelMode: (google.maps.routeoptimization.v1.Vehicle.TravelMode|keyof typeof google.maps.routeoptimization.v1.Vehicle.TravelMode);
2240
2358
 
2359
+ /** Vehicle routeModifiers. */
2360
+ public routeModifiers?: (google.maps.routeoptimization.v1.IRouteModifiers|null);
2361
+
2241
2362
  /** Vehicle startLocation. */
2242
2363
  public startLocation?: (google.type.ILatLng|null);
2243
2364
 
@@ -2907,6 +3028,9 @@ export namespace google {
2907
3028
  /** DistanceLimit softMaxMeters */
2908
3029
  softMaxMeters?: (number|Long|string|null);
2909
3030
 
3031
+ /** DistanceLimit costPerKilometerBelowSoftMax */
3032
+ costPerKilometerBelowSoftMax?: (number|null);
3033
+
2910
3034
  /** DistanceLimit costPerKilometerAboveSoftMax */
2911
3035
  costPerKilometerAboveSoftMax?: (number|null);
2912
3036
  }
@@ -2926,6 +3050,9 @@ export namespace google {
2926
3050
  /** DistanceLimit softMaxMeters. */
2927
3051
  public softMaxMeters?: (number|Long|string|null);
2928
3052
 
3053
+ /** DistanceLimit costPerKilometerBelowSoftMax. */
3054
+ public costPerKilometerBelowSoftMax?: (number|null);
3055
+
2929
3056
  /** DistanceLimit costPerKilometerAboveSoftMax. */
2930
3057
  public costPerKilometerAboveSoftMax?: (number|null);
2931
3058
 
@@ -2935,6 +3062,9 @@ export namespace google {
2935
3062
  /** DistanceLimit _softMaxMeters. */
2936
3063
  public _softMaxMeters?: "softMaxMeters";
2937
3064
 
3065
+ /** DistanceLimit _costPerKilometerBelowSoftMax. */
3066
+ public _costPerKilometerBelowSoftMax?: "costPerKilometerBelowSoftMax";
3067
+
2938
3068
  /** DistanceLimit _costPerKilometerAboveSoftMax. */
2939
3069
  public _costPerKilometerAboveSoftMax?: "costPerKilometerAboveSoftMax";
2940
3070
 
@@ -4025,6 +4155,9 @@ export namespace google {
4025
4155
  /** Transition routePolyline */
4026
4156
  routePolyline?: (google.maps.routeoptimization.v1.ShipmentRoute.IEncodedPolyline|null);
4027
4157
 
4158
+ /** Transition routeToken */
4159
+ routeToken?: (string|null);
4160
+
4028
4161
  /** Transition vehicleLoads */
4029
4162
  vehicleLoads?: ({ [k: string]: google.maps.routeoptimization.v1.ShipmentRoute.IVehicleLoad }|null);
4030
4163
  }
@@ -4065,6 +4198,9 @@ export namespace google {
4065
4198
  /** Transition routePolyline. */
4066
4199
  public routePolyline?: (google.maps.routeoptimization.v1.ShipmentRoute.IEncodedPolyline|null);
4067
4200
 
4201
+ /** Transition routeToken. */
4202
+ public routeToken: string;
4203
+
4068
4204
  /** Transition vehicleLoads. */
4069
4205
  public vehicleLoads: { [k: string]: google.maps.routeoptimization.v1.ShipmentRoute.IVehicleLoad };
4070
4206