google-maps-routeoptimization 0.1.2__tar.gz → 0.1.4__tar.gz

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.
Files changed (35) hide show
  1. {google_maps_routeoptimization-0.1.2/google_maps_routeoptimization.egg-info → google_maps_routeoptimization-0.1.4}/PKG-INFO +1 -1
  2. {google_maps_routeoptimization-0.1.2 → google_maps_routeoptimization-0.1.4}/google/maps/routeoptimization/__init__.py +2 -0
  3. {google_maps_routeoptimization-0.1.2 → google_maps_routeoptimization-0.1.4}/google/maps/routeoptimization/gapic_version.py +1 -1
  4. {google_maps_routeoptimization-0.1.2 → google_maps_routeoptimization-0.1.4}/google/maps/routeoptimization_v1/__init__.py +2 -0
  5. {google_maps_routeoptimization-0.1.2 → google_maps_routeoptimization-0.1.4}/google/maps/routeoptimization_v1/gapic_version.py +1 -1
  6. {google_maps_routeoptimization-0.1.2 → google_maps_routeoptimization-0.1.4}/google/maps/routeoptimization_v1/services/route_optimization/async_client.py +19 -8
  7. {google_maps_routeoptimization-0.1.2 → google_maps_routeoptimization-0.1.4}/google/maps/routeoptimization_v1/services/route_optimization/client.py +19 -5
  8. {google_maps_routeoptimization-0.1.2 → google_maps_routeoptimization-0.1.4}/google/maps/routeoptimization_v1/services/route_optimization/transports/grpc.py +18 -4
  9. {google_maps_routeoptimization-0.1.2 → google_maps_routeoptimization-0.1.4}/google/maps/routeoptimization_v1/services/route_optimization/transports/grpc_asyncio.py +18 -4
  10. {google_maps_routeoptimization-0.1.2 → google_maps_routeoptimization-0.1.4}/google/maps/routeoptimization_v1/types/__init__.py +2 -0
  11. {google_maps_routeoptimization-0.1.2 → google_maps_routeoptimization-0.1.4}/google/maps/routeoptimization_v1/types/route_optimization_service.py +110 -340
  12. {google_maps_routeoptimization-0.1.2 → google_maps_routeoptimization-0.1.4/google_maps_routeoptimization.egg-info}/PKG-INFO +1 -1
  13. {google_maps_routeoptimization-0.1.2 → google_maps_routeoptimization-0.1.4}/tests/unit/gapic/routeoptimization_v1/test_route_optimization.py +16 -12
  14. {google_maps_routeoptimization-0.1.2 → google_maps_routeoptimization-0.1.4}/LICENSE +0 -0
  15. {google_maps_routeoptimization-0.1.2 → google_maps_routeoptimization-0.1.4}/MANIFEST.in +0 -0
  16. {google_maps_routeoptimization-0.1.2 → google_maps_routeoptimization-0.1.4}/README.rst +0 -0
  17. {google_maps_routeoptimization-0.1.2 → google_maps_routeoptimization-0.1.4}/google/maps/routeoptimization/py.typed +0 -0
  18. {google_maps_routeoptimization-0.1.2 → google_maps_routeoptimization-0.1.4}/google/maps/routeoptimization_v1/gapic_metadata.json +0 -0
  19. {google_maps_routeoptimization-0.1.2 → google_maps_routeoptimization-0.1.4}/google/maps/routeoptimization_v1/py.typed +0 -0
  20. {google_maps_routeoptimization-0.1.2 → google_maps_routeoptimization-0.1.4}/google/maps/routeoptimization_v1/services/__init__.py +0 -0
  21. {google_maps_routeoptimization-0.1.2 → google_maps_routeoptimization-0.1.4}/google/maps/routeoptimization_v1/services/route_optimization/__init__.py +0 -0
  22. {google_maps_routeoptimization-0.1.2 → google_maps_routeoptimization-0.1.4}/google/maps/routeoptimization_v1/services/route_optimization/transports/__init__.py +0 -0
  23. {google_maps_routeoptimization-0.1.2 → google_maps_routeoptimization-0.1.4}/google/maps/routeoptimization_v1/services/route_optimization/transports/base.py +0 -0
  24. {google_maps_routeoptimization-0.1.2 → google_maps_routeoptimization-0.1.4}/google/maps/routeoptimization_v1/services/route_optimization/transports/rest.py +0 -0
  25. {google_maps_routeoptimization-0.1.2 → google_maps_routeoptimization-0.1.4}/google_maps_routeoptimization.egg-info/SOURCES.txt +0 -0
  26. {google_maps_routeoptimization-0.1.2 → google_maps_routeoptimization-0.1.4}/google_maps_routeoptimization.egg-info/dependency_links.txt +0 -0
  27. {google_maps_routeoptimization-0.1.2 → google_maps_routeoptimization-0.1.4}/google_maps_routeoptimization.egg-info/not-zip-safe +0 -0
  28. {google_maps_routeoptimization-0.1.2 → google_maps_routeoptimization-0.1.4}/google_maps_routeoptimization.egg-info/requires.txt +0 -0
  29. {google_maps_routeoptimization-0.1.2 → google_maps_routeoptimization-0.1.4}/google_maps_routeoptimization.egg-info/top_level.txt +0 -0
  30. {google_maps_routeoptimization-0.1.2 → google_maps_routeoptimization-0.1.4}/setup.cfg +0 -0
  31. {google_maps_routeoptimization-0.1.2 → google_maps_routeoptimization-0.1.4}/setup.py +0 -0
  32. {google_maps_routeoptimization-0.1.2 → google_maps_routeoptimization-0.1.4}/tests/__init__.py +0 -0
  33. {google_maps_routeoptimization-0.1.2 → google_maps_routeoptimization-0.1.4}/tests/unit/__init__.py +0 -0
  34. {google_maps_routeoptimization-0.1.2 → google_maps_routeoptimization-0.1.4}/tests/unit/gapic/__init__.py +0 -0
  35. {google_maps_routeoptimization-0.1.2 → google_maps_routeoptimization-0.1.4}/tests/unit/gapic/routeoptimization_v1/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: google-maps-routeoptimization
3
- Version: 0.1.2
3
+ Version: 0.1.4
4
4
  Summary: Google Maps Routeoptimization API client library
5
5
  Home-page: https://github.com/googleapis/google-cloud-python/tree/main/packages/google-maps-routeoptimization
6
6
  Author: Google LLC
@@ -41,6 +41,7 @@ from google.maps.routeoptimization_v1.types.route_optimization_service import (
41
41
  OptimizeToursResponse,
42
42
  OptimizeToursValidationError,
43
43
  OutputConfig,
44
+ RouteModifiers,
44
45
  Shipment,
45
46
  ShipmentModel,
46
47
  ShipmentRoute,
@@ -71,6 +72,7 @@ __all__ = (
71
72
  "OptimizeToursResponse",
72
73
  "OptimizeToursValidationError",
73
74
  "OutputConfig",
75
+ "RouteModifiers",
74
76
  "Shipment",
75
77
  "ShipmentModel",
76
78
  "ShipmentRoute",
@@ -13,4 +13,4 @@
13
13
  # See the License for the specific language governing permissions and
14
14
  # limitations under the License.
15
15
  #
16
- __version__ = "0.1.2" # {x-release-please-version}
16
+ __version__ = "0.1.4" # {x-release-please-version}
@@ -39,6 +39,7 @@ from .types.route_optimization_service import (
39
39
  OptimizeToursResponse,
40
40
  OptimizeToursValidationError,
41
41
  OutputConfig,
42
+ RouteModifiers,
42
43
  Shipment,
43
44
  ShipmentModel,
44
45
  ShipmentRoute,
@@ -69,6 +70,7 @@ __all__ = (
69
70
  "OptimizeToursResponse",
70
71
  "OptimizeToursValidationError",
71
72
  "OutputConfig",
73
+ "RouteModifiers",
72
74
  "RouteOptimizationClient",
73
75
  "Shipment",
74
76
  "ShipmentModel",
@@ -13,4 +13,4 @@
13
13
  # See the License for the specific language governing permissions and
14
14
  # limitations under the License.
15
15
  #
16
- __version__ = "0.1.2" # {x-release-please-version}
16
+ __version__ = "0.1.4" # {x-release-please-version}
@@ -14,7 +14,6 @@
14
14
  # limitations under the License.
15
15
  #
16
16
  from collections import OrderedDict
17
- import functools
18
17
  import re
19
18
  from typing import (
20
19
  Callable,
@@ -211,9 +210,7 @@ class RouteOptimizationAsyncClient:
211
210
  """
212
211
  return self._client._universe_domain
213
212
 
214
- get_transport_class = functools.partial(
215
- type(RouteOptimizationClient).get_transport_class, type(RouteOptimizationClient)
216
- )
213
+ get_transport_class = RouteOptimizationClient.get_transport_class
217
214
 
218
215
  def __init__(
219
216
  self,
@@ -406,12 +403,26 @@ class RouteOptimizationAsyncClient:
406
403
 
407
404
  This method is a Long Running Operation (LRO). The inputs for
408
405
  optimization (``OptimizeToursRequest`` messages) and outputs
409
- (``OptimizeToursResponse`` messages) are read/written from/to
410
- Cloud Storage in user-specified format. Like the
406
+ (``OptimizeToursResponse`` messages) are read from and written
407
+ to Cloud Storage in user-specified format. Like the
411
408
  ``OptimizeTours`` method, each ``OptimizeToursRequest`` contains
412
409
  a ``ShipmentModel`` and returns an ``OptimizeToursResponse``
413
- containing ``ShipmentRoute``\ s, which are a set of routes to be
414
- performed by vehicles minimizing the overall cost.
410
+ containing ``ShipmentRoute`` fields, which are a set of routes
411
+ to be performed by vehicles minimizing the overall cost.
412
+
413
+ The user can poll ``operations.get`` to check the status of the
414
+ LRO:
415
+
416
+ If the LRO ``done`` field is false, then at least one request is
417
+ still being processed. Other requests may have completed
418
+ successfully and their results are available in Cloud Storage.
419
+
420
+ If the LRO's ``done`` field is true, then all requests have been
421
+ processed. Any successfully processed requests will have their
422
+ results available in Cloud Storage. Any requests that failed
423
+ will not have their results available in Cloud Storage. If the
424
+ LRO's ``error`` field is set, then it contains the error from
425
+ one of the failed requests.
415
426
 
416
427
  .. code-block:: python
417
428
 
@@ -669,7 +669,7 @@ class RouteOptimizationClient(metaclass=RouteOptimizationClientMeta):
669
669
  Type[RouteOptimizationTransport],
670
670
  Callable[..., RouteOptimizationTransport],
671
671
  ] = (
672
- type(self).get_transport_class(transport)
672
+ RouteOptimizationClient.get_transport_class(transport)
673
673
  if isinstance(transport, str) or transport is None
674
674
  else cast(Callable[..., RouteOptimizationTransport], transport)
675
675
  )
@@ -805,12 +805,26 @@ class RouteOptimizationClient(metaclass=RouteOptimizationClientMeta):
805
805
 
806
806
  This method is a Long Running Operation (LRO). The inputs for
807
807
  optimization (``OptimizeToursRequest`` messages) and outputs
808
- (``OptimizeToursResponse`` messages) are read/written from/to
809
- Cloud Storage in user-specified format. Like the
808
+ (``OptimizeToursResponse`` messages) are read from and written
809
+ to Cloud Storage in user-specified format. Like the
810
810
  ``OptimizeTours`` method, each ``OptimizeToursRequest`` contains
811
811
  a ``ShipmentModel`` and returns an ``OptimizeToursResponse``
812
- containing ``ShipmentRoute``\ s, which are a set of routes to be
813
- performed by vehicles minimizing the overall cost.
812
+ containing ``ShipmentRoute`` fields, which are a set of routes
813
+ to be performed by vehicles minimizing the overall cost.
814
+
815
+ The user can poll ``operations.get`` to check the status of the
816
+ LRO:
817
+
818
+ If the LRO ``done`` field is false, then at least one request is
819
+ still being processed. Other requests may have completed
820
+ successfully and their results are available in Cloud Storage.
821
+
822
+ If the LRO's ``done`` field is true, then all requests have been
823
+ processed. Any successfully processed requests will have their
824
+ results available in Cloud Storage. Any requests that failed
825
+ will not have their results available in Cloud Storage. If the
826
+ LRO's ``error`` field is set, then it contains the error from
827
+ one of the failed requests.
814
828
 
815
829
  .. code-block:: python
816
830
 
@@ -329,12 +329,26 @@ class RouteOptimizationGrpcTransport(RouteOptimizationTransport):
329
329
 
330
330
  This method is a Long Running Operation (LRO). The inputs for
331
331
  optimization (``OptimizeToursRequest`` messages) and outputs
332
- (``OptimizeToursResponse`` messages) are read/written from/to
333
- Cloud Storage in user-specified format. Like the
332
+ (``OptimizeToursResponse`` messages) are read from and written
333
+ to Cloud Storage in user-specified format. Like the
334
334
  ``OptimizeTours`` method, each ``OptimizeToursRequest`` contains
335
335
  a ``ShipmentModel`` and returns an ``OptimizeToursResponse``
336
- containing ``ShipmentRoute``\ s, which are a set of routes to be
337
- performed by vehicles minimizing the overall cost.
336
+ containing ``ShipmentRoute`` fields, which are a set of routes
337
+ to be performed by vehicles minimizing the overall cost.
338
+
339
+ The user can poll ``operations.get`` to check the status of the
340
+ LRO:
341
+
342
+ If the LRO ``done`` field is false, then at least one request is
343
+ still being processed. Other requests may have completed
344
+ successfully and their results are available in Cloud Storage.
345
+
346
+ If the LRO's ``done`` field is true, then all requests have been
347
+ processed. Any successfully processed requests will have their
348
+ results available in Cloud Storage. Any requests that failed
349
+ will not have their results available in Cloud Storage. If the
350
+ LRO's ``error`` field is set, then it contains the error from
351
+ one of the failed requests.
338
352
 
339
353
  Returns:
340
354
  Callable[[~.BatchOptimizeToursRequest],
@@ -336,12 +336,26 @@ class RouteOptimizationGrpcAsyncIOTransport(RouteOptimizationTransport):
336
336
 
337
337
  This method is a Long Running Operation (LRO). The inputs for
338
338
  optimization (``OptimizeToursRequest`` messages) and outputs
339
- (``OptimizeToursResponse`` messages) are read/written from/to
340
- Cloud Storage in user-specified format. Like the
339
+ (``OptimizeToursResponse`` messages) are read from and written
340
+ to Cloud Storage in user-specified format. Like the
341
341
  ``OptimizeTours`` method, each ``OptimizeToursRequest`` contains
342
342
  a ``ShipmentModel`` and returns an ``OptimizeToursResponse``
343
- containing ``ShipmentRoute``\ s, which are a set of routes to be
344
- performed by vehicles minimizing the overall cost.
343
+ containing ``ShipmentRoute`` fields, which are a set of routes
344
+ to be performed by vehicles minimizing the overall cost.
345
+
346
+ The user can poll ``operations.get`` to check the status of the
347
+ LRO:
348
+
349
+ If the LRO ``done`` field is false, then at least one request is
350
+ still being processed. Other requests may have completed
351
+ successfully and their results are available in Cloud Storage.
352
+
353
+ If the LRO's ``done`` field is true, then all requests have been
354
+ processed. Any successfully processed requests will have their
355
+ results available in Cloud Storage. Any requests that failed
356
+ will not have their results available in Cloud Storage. If the
357
+ LRO's ``error`` field is set, then it contains the error from
358
+ one of the failed requests.
345
359
 
346
360
  Returns:
347
361
  Callable[[~.BatchOptimizeToursRequest],
@@ -30,6 +30,7 @@ from .route_optimization_service import (
30
30
  OptimizeToursResponse,
31
31
  OptimizeToursValidationError,
32
32
  OutputConfig,
33
+ RouteModifiers,
33
34
  Shipment,
34
35
  ShipmentModel,
35
36
  ShipmentRoute,
@@ -58,6 +59,7 @@ __all__ = (
58
59
  "OptimizeToursResponse",
59
60
  "OptimizeToursValidationError",
60
61
  "OutputConfig",
62
+ "RouteModifiers",
61
63
  "Shipment",
62
64
  "ShipmentModel",
63
65
  "ShipmentRoute",
@@ -35,6 +35,7 @@ __protobuf__ = proto.module(
35
35
  "Shipment",
36
36
  "ShipmentTypeIncompatibility",
37
37
  "ShipmentTypeRequirement",
38
+ "RouteModifiers",
38
39
  "Vehicle",
39
40
  "TimeWindow",
40
41
  "DistanceLimit",
@@ -337,7 +338,8 @@ class OptimizeToursRequest(proto.Message):
337
338
  If true, polylines will be populated in response
338
339
  ``ShipmentRoute``\ s.
339
340
  populate_transition_polylines (bool):
340
- If true, polylines will be populated in response
341
+ If true, polylines and route tokens will be populated in
342
+ response
341
343
  [ShipmentRoute.transitions][google.maps.routeoptimization.v1.ShipmentRoute.transitions].
342
344
  allow_large_deadline_despite_interruption_risk (bool):
343
345
  If this is set, then the request can have a
@@ -382,7 +384,8 @@ class OptimizeToursRequest(proto.Message):
382
384
 
383
385
  Values:
384
386
  DEFAULT_SOLVE (0):
385
- Solve the model.
387
+ Solve the model. Warnings may be issued in
388
+ [OptimizeToursResponse.validation_errors][google.cloud.optimization.v1.OptimizeToursResponse.validation_errors].
386
389
  VALIDATE_ONLY (1):
387
390
  Only validates the model without solving it: populates as
388
391
  many
@@ -531,7 +534,8 @@ class OptimizeToursResponse(proto.Message):
531
534
  detect independently. See the "MULTIPLE ERRORS" explanation
532
535
  for the
533
536
  [OptimizeToursValidationError][google.maps.routeoptimization.v1.OptimizeToursValidationError]
534
- message.
537
+ message. Instead of errors, this will include warnings in
538
+ the case ``solving_mode`` is ``DEFAULT_SOLVE``.
535
539
  metrics (google.maps.routeoptimization_v1.types.OptimizeToursResponse.Metrics):
536
540
  Duration, distance and usage metrics for this
537
541
  solution.
@@ -1524,6 +1528,53 @@ class ShipmentTypeRequirement(proto.Message):
1524
1528
  )
1525
1529
 
1526
1530
 
1531
+ class RouteModifiers(proto.Message):
1532
+ r"""Encapsulates a set of optional conditions to satisfy when
1533
+ calculating vehicle routes. This is similar to ``RouteModifiers`` in
1534
+ the Google Maps Platform Routes Preferred API; see:
1535
+ https://developers.google.com/maps/documentation/routes/reference/rest/v2/RouteModifiers.
1536
+
1537
+ Attributes:
1538
+ avoid_tolls (bool):
1539
+ Specifies whether to avoid toll roads where
1540
+ reasonable. Preference will be given to routes
1541
+ not containing toll roads. Applies only to
1542
+ motorized travel modes.
1543
+ avoid_highways (bool):
1544
+ Specifies whether to avoid highways where
1545
+ reasonable. Preference will be given to routes
1546
+ not containing highways. Applies only to
1547
+ motorized travel modes.
1548
+ avoid_ferries (bool):
1549
+ Specifies whether to avoid ferries where
1550
+ reasonable. Preference will be given to routes
1551
+ not containing travel by ferries. Applies only
1552
+ to motorized travel modes.
1553
+ avoid_indoor (bool):
1554
+ Optional. Specifies whether to avoid navigating indoors
1555
+ where reasonable. Preference will be given to routes not
1556
+ containing indoor navigation. Applies only to the
1557
+ ``WALKING`` travel mode.
1558
+ """
1559
+
1560
+ avoid_tolls: bool = proto.Field(
1561
+ proto.BOOL,
1562
+ number=2,
1563
+ )
1564
+ avoid_highways: bool = proto.Field(
1565
+ proto.BOOL,
1566
+ number=3,
1567
+ )
1568
+ avoid_ferries: bool = proto.Field(
1569
+ proto.BOOL,
1570
+ number=4,
1571
+ )
1572
+ avoid_indoor: bool = proto.Field(
1573
+ proto.BOOL,
1574
+ number=5,
1575
+ )
1576
+
1577
+
1527
1578
  class Vehicle(proto.Message):
1528
1579
  r"""Models a vehicle in a shipment problem. Solving a shipment problem
1529
1580
  will build a route starting from ``start_location`` and ending at
@@ -1542,6 +1593,10 @@ class Vehicle(proto.Message):
1542
1593
  The travel mode which affects the roads usable by the
1543
1594
  vehicle and its speed. See also
1544
1595
  ``travel_duration_multiple``.
1596
+ route_modifiers (google.maps.routeoptimization_v1.types.RouteModifiers):
1597
+ A set of conditions to satisfy that affect
1598
+ the way routes are calculated for the given
1599
+ vehicle.
1545
1600
  start_location (google.type.latlng_pb2.LatLng):
1546
1601
  Geographic location where the vehicle starts before picking
1547
1602
  up any shipments. If not specified, the vehicle starts at
@@ -1964,6 +2019,11 @@ class Vehicle(proto.Message):
1964
2019
  number=1,
1965
2020
  enum=TravelMode,
1966
2021
  )
2022
+ route_modifiers: "RouteModifiers" = proto.Field(
2023
+ proto.MESSAGE,
2024
+ number=2,
2025
+ message="RouteModifiers",
2026
+ )
1967
2027
  start_location: latlng_pb2.LatLng = proto.Field(
1968
2028
  proto.MESSAGE,
1969
2029
  number=3,
@@ -2098,8 +2158,9 @@ class TimeWindow(proto.Message):
2098
2158
 
2099
2159
  ::
2100
2160
 
2101
- 0 <= `start_time` <= `soft_start_time` <= `end_time` and
2102
- 0 <= `start_time` <= `soft_end_time` <= `end_time`.
2161
+ 0 <= `start_time` <= `end_time` and
2162
+ 0 <= `start_time` <= `soft_start_time` and
2163
+ 0 <= `soft_end_time` <= `end_time`.
2103
2164
 
2104
2165
 
2105
2166
  .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
@@ -2203,6 +2264,18 @@ class DistanceLimit(proto.Message):
2203
2264
  must be nonnegative.
2204
2265
 
2205
2266
  This field is a member of `oneof`_ ``_soft_max_meters``.
2267
+ cost_per_kilometer_below_soft_max (float):
2268
+ Cost per kilometer incurred, increasing up to
2269
+ ``soft_max_meters``, with formula:
2270
+
2271
+ ::
2272
+
2273
+ min(distance_meters, soft_max_meters) / 1000.0 *
2274
+ cost_per_kilometer_below_soft_max.
2275
+
2276
+ This cost is not supported in ``route_distance_limit``.
2277
+
2278
+ This field is a member of `oneof`_ ``_cost_per_kilometer_below_soft_max``.
2206
2279
  cost_per_kilometer_above_soft_max (float):
2207
2280
  Cost per kilometer incurred if distance is above
2208
2281
  ``soft_max_meters`` limit. The additional cost is 0 if the
@@ -2229,6 +2302,11 @@ class DistanceLimit(proto.Message):
2229
2302
  number=2,
2230
2303
  optional=True,
2231
2304
  )
2305
+ cost_per_kilometer_below_soft_max: float = proto.Field(
2306
+ proto.DOUBLE,
2307
+ number=4,
2308
+ optional=True,
2309
+ )
2232
2310
  cost_per_kilometer_above_soft_max: float = proto.Field(
2233
2311
  proto.DOUBLE,
2234
2312
  number=3,
@@ -2860,6 +2938,18 @@ class ShipmentRoute(proto.Message):
2860
2938
  [populate_transition_polylines]
2861
2939
  [google.maps.routeoptimization.v1.OptimizeToursRequest.populate_transition_polylines]
2862
2940
  is set to true.
2941
+ route_token (str):
2942
+ Output only. An opaque token that can be passed to
2943
+ `Navigation
2944
+ SDK <https://developers.google.com/maps/documentation/navigation>`__
2945
+ to reconstruct the route during navigation, and, in the
2946
+ event of rerouting, honor the original intention when the
2947
+ route was created. Treat this token as an opaque blob. Don't
2948
+ compare its value across requests as its value may change
2949
+ even if the service returns the exact same route. This field
2950
+ is only populated if [populate_transition_polylines]
2951
+ [google.maps.routeoptimization.v1.OptimizeToursRequest.populate_transition_polylines]
2952
+ is set to true.
2863
2953
  vehicle_loads (MutableMapping[str, google.maps.routeoptimization_v1.types.ShipmentRoute.VehicleLoad]):
2864
2954
  Vehicle loads during this transition, for each type that
2865
2955
  either appears in this vehicle's
@@ -2918,6 +3008,10 @@ class ShipmentRoute(proto.Message):
2918
3008
  number=9,
2919
3009
  message="ShipmentRoute.EncodedPolyline",
2920
3010
  )
3011
+ route_token: str = proto.Field(
3012
+ proto.STRING,
3013
+ number=12,
3014
+ )
2921
3015
  vehicle_loads: MutableMapping[
2922
3016
  str, "ShipmentRoute.VehicleLoad"
2923
3017
  ] = proto.MapField(
@@ -3056,7 +3150,8 @@ class SkippedShipment(proto.Message):
3056
3150
  if specified in the ``Shipment``.
3057
3151
  reasons (MutableSequence[google.maps.routeoptimization_v1.types.SkippedShipment.Reason]):
3058
3152
  A list of reasons that explain why the shipment was skipped.
3059
- See comment above ``Reason``.
3153
+ See comment above ``Reason``. If we are unable to understand
3154
+ why a shipment was skipped, reasons will not be set.
3060
3155
  """
3061
3156
 
3062
3157
  class Reason(proto.Message):
@@ -3115,9 +3210,7 @@ class SkippedShipment(proto.Message):
3115
3210
 
3116
3211
  Values:
3117
3212
  CODE_UNSPECIFIED (0):
3118
- This should never be used. If we are unable
3119
- to understand why a shipment was skipped, we
3120
- simply return an empty set of reasons.
3213
+ This should never be used.
3121
3214
  NO_VEHICLE (1):
3122
3215
  There is no vehicle in the model making all
3123
3216
  shipments infeasible.
@@ -3420,8 +3513,8 @@ class InjectedSolutionConstraint(proto.Message):
3420
3513
  or before them.
3421
3514
  RELAX_VISIT_TIMES_AND_SEQUENCE_AFTER_THRESHOLD (2):
3422
3515
  Same as ``RELAX_VISIT_TIMES_AFTER_THRESHOLD``, but the visit
3423
- sequence is also relaxed: visits remain simply bound to
3424
- their vehicle.
3516
+ sequence is also relaxed: visits can only be performed by
3517
+ this vehicle, but can potentially become unperformed.
3425
3518
  RELAX_ALL_AFTER_THRESHOLD (3):
3426
3519
  Same as ``RELAX_VISIT_TIMES_AND_SEQUENCE_AFTER_THRESHOLD``,
3427
3520
  but the vehicle is also relaxed: visits are completely free
@@ -3478,7 +3571,7 @@ class InjectedSolutionConstraint(proto.Message):
3478
3571
 
3479
3572
 
3480
3573
  class OptimizeToursValidationError(proto.Message):
3481
- r"""Describes an error encountered when validating an
3574
+ r"""Describes an error or warning encountered when validating an
3482
3575
  ``OptimizeToursRequest``.
3483
3576
 
3484
3577
  Attributes:
@@ -3486,7 +3579,8 @@ class OptimizeToursValidationError(proto.Message):
3486
3579
  A validation error is defined by the pair (``code``,
3487
3580
  ``display_name``) which are always present.
3488
3581
 
3489
- Other fields (below) provide more context about the error.
3582
+ The fields following this section provide more context about
3583
+ the error.
3490
3584
 
3491
3585
  *MULTIPLE ERRORS*: When there are multiple errors, the
3492
3586
  validation process tries to output several of them. Much
@@ -3494,338 +3588,14 @@ class OptimizeToursValidationError(proto.Message):
3494
3588
  validation errors will be "fatal", meaning that they stop
3495
3589
  the entire validation process. This is the case for
3496
3590
  ``display_name="UNSPECIFIED"`` errors, among others. Some
3497
- may cause the validation process to skip other errors.
3591
+ errors may cause the validation process to skip other
3592
+ errors.
3498
3593
 
3499
3594
  *STABILITY*: ``code`` and ``display_name`` should be very
3500
3595
  stable. But new codes and display names may appear over
3501
3596
  time, which may cause a given (invalid) request to yield a
3502
3597
  different (``code``, ``display_name``) pair because the new
3503
- error hid the old one (see "MULTIPLE ERRORS").
3504
-
3505
- *REFERENCE*: A list of all (code, name) pairs:
3506
-
3507
- - UNSPECIFIED = 0;
3508
-
3509
- - VALIDATION_TIMEOUT_ERROR = 10; Validation couldn't be
3510
- completed within the deadline.
3511
-
3512
- - REQUEST_OPTIONS_ERROR = 12;
3513
-
3514
- - REQUEST_OPTIONS_INVALID_SOLVING_MODE = 1201;
3515
- - REQUEST_OPTIONS_INVALID_MAX_VALIDATION_ERRORS = 1203;
3516
- - REQUEST_OPTIONS_INVALID_GEODESIC_METERS_PER_SECOND =
3517
- 1204;
3518
- - REQUEST_OPTIONS_GEODESIC_METERS_PER_SECOND_TOO_SMALL =
3519
- 1205;
3520
- - REQUEST_OPTIONS_MISSING_GEODESIC_METERS_PER_SECOND =
3521
- 1206;
3522
- - REQUEST_OPTIONS_POPULATE_PATHFINDER_TRIPS_AND_GEODESIC_DISTANCE
3523
- = 1207;
3524
- - REQUEST_OPTIONS_COST_MODEL_OPTIONS_AND_GEODESIC_DISTANCE
3525
- = 1208;
3526
- - REQUEST_OPTIONS_TRAVEL_MODE_INCOMPATIBLE_WITH_TRAFFIC
3527
- = 1211;
3528
- - REQUEST_OPTIONS_MULTIPLE_TRAFFIC_FLAVORS = 1212;
3529
- - REQUEST_OPTIONS_INVALID_TRAFFIC_FLAVOR = 1213;
3530
- - REQUEST_OPTIONS_TRAFFIC_ENABLED_WITHOUT_GLOBAL_START_TIME
3531
- = 1214;
3532
- - REQUEST_OPTIONS_TRAFFIC_ENABLED_WITH_PRECEDENCES =
3533
- 1215;
3534
- - REQUEST_OPTIONS_TRAFFIC_PREFILL_MODE_INVALID = 1216;
3535
- - REQUEST_OPTIONS_TRAFFIC_PREFILL_ENABLED_WITHOUT_TRAFFIC
3536
- = 1217;
3537
-
3538
- - INJECTED_SOLUTION_ERROR = 20;
3539
-
3540
- - INJECTED_SOLUTION_MISSING_LABEL = 2000;
3541
- - INJECTED_SOLUTION_DUPLICATE_LABEL = 2001;
3542
- - INJECTED_SOLUTION_AMBIGUOUS_INDEX = 2002;
3543
- - INJECTED_SOLUTION_INFEASIBLE_AFTER_GETTING_TRAVEL_TIMES
3544
- = 2003;
3545
- - INJECTED_SOLUTION_TRANSITION_INCONSISTENT_WITH_ACTUAL_TRAVEL
3546
- = 2004;
3547
- - INJECTED_SOLUTION_CONCURRENT_SOLUTION_TYPES = 2005;
3548
- - INJECTED_SOLUTION_MORE_THAN_ONE_PER_TYPE = 2006;
3549
- - INJECTED_SOLUTION_REFRESH_WITHOUT_POPULATE = 2008;
3550
- - INJECTED_SOLUTION_CONSTRAINED_ROUTE_PORTION_INFEASIBLE
3551
- = 2010;
3552
-
3553
- - SHIPMENT_MODEL_ERROR = 22;
3554
-
3555
- - SHIPMENT_MODEL_TOO_LARGE = 2200;
3556
- - SHIPMENT_MODEL_TOO_MANY_CAPACITY_TYPES = 2201;
3557
- - SHIPMENT_MODEL_GLOBAL_START_TIME_NEGATIVE_OR_NAN =
3558
- 2202;
3559
- - SHIPMENT_MODEL_GLOBAL_END_TIME_TOO_LARGE_OR_NAN =
3560
- 2203;
3561
- - SHIPMENT_MODEL_GLOBAL_START_TIME_AFTER_GLOBAL_END_TIME
3562
- = 2204;
3563
- - SHIPMENT_MODEL_GLOBAL_DURATION_TOO_LONG = 2205;
3564
- - SHIPMENT_MODEL_MAX_ACTIVE_VEHICLES_NOT_POSITIVE =
3565
- 2206;
3566
- - SHIPMENT_MODEL_DURATION_MATRIX_TOO_LARGE = 2207;
3567
-
3568
- - INDEX_ERROR = 24;
3569
-
3570
- - TAG_ERROR = 26;
3571
-
3572
- - TIME_WINDOW_ERROR = 28;
3573
-
3574
- - TIME_WINDOW_INVALID_START_TIME = 2800;
3575
- - TIME_WINDOW_INVALID_END_TIME = 2801;
3576
- - TIME_WINDOW_INVALID_SOFT_START_TIME = 2802;
3577
- - TIME_WINDOW_INVALID_SOFT_END_TIME = 2803;
3578
- - TIME_WINDOW_OUTSIDE_GLOBAL_TIME_WINDOW = 2804;
3579
- - TIME_WINDOW_START_TIME_AFTER_END_TIME = 2805;
3580
- - TIME_WINDOW_INVALID_COST_PER_HOUR_BEFORE_SOFT_START_TIME
3581
- = 2806;
3582
- - TIME_WINDOW_INVALID_COST_PER_HOUR_AFTER_SOFT_END_TIME
3583
- = 2807;
3584
- - TIME_WINDOW_COST_BEFORE_SOFT_START_TIME_WITHOUT_SOFT_START_TIME
3585
- = 2808;
3586
- - TIME_WINDOW_COST_AFTER_SOFT_END_TIME_WITHOUT_SOFT_END_TIME
3587
- = 2809;
3588
- - TIME_WINDOW_SOFT_START_TIME_WITHOUT_COST_BEFORE_SOFT_START_TIME
3589
- = 2810;
3590
- - TIME_WINDOW_SOFT_END_TIME_WITHOUT_COST_AFTER_SOFT_END_TIME
3591
- = 2811;
3592
- - TIME_WINDOW_OVERLAPPING_ADJACENT_OR_EARLIER_THAN_PREVIOUS
3593
- = 2812;
3594
- - TIME_WINDOW_START_TIME_AFTER_SOFT_START_TIME = 2813;
3595
- - TIME_WINDOW_SOFT_START_TIME_AFTER_END_TIME = 2814;
3596
- - TIME_WINDOW_START_TIME_AFTER_SOFT_END_TIME = 2815;
3597
- - TIME_WINDOW_SOFT_END_TIME_AFTER_END_TIME = 2816;
3598
- - TIME_WINDOW_COST_BEFORE_SOFT_START_TIME_SET_AND_MULTIPLE_WINDOWS
3599
- = 2817;
3600
- - TIME_WINDOW_COST_AFTER_SOFT_END_TIME_SET_AND_MULTIPLE_WINDOWS
3601
- = 2818;
3602
- - TRANSITION_ATTRIBUTES_ERROR = 30;
3603
- - TRANSITION_ATTRIBUTES_INVALID_COST = 3000;
3604
- - TRANSITION_ATTRIBUTES_INVALID_COST_PER_KILOMETER =
3605
- 3001;
3606
- - TRANSITION_ATTRIBUTES_DUPLICATE_TAG_PAIR = 3002;
3607
- - TRANSITION_ATTRIBUTES_DISTANCE_LIMIT_MAX_METERS_UNSUPPORTED
3608
- = 3003;
3609
- - TRANSITION_ATTRIBUTES_UNSPECIFIED_SOURCE_TAGS = 3004;
3610
- - TRANSITION_ATTRIBUTES_CONFLICTING_SOURCE_TAGS_FIELDS =
3611
- 3005;
3612
- - TRANSITION_ATTRIBUTES_UNSPECIFIED_DESTINATION_TAGS =
3613
- 3006;
3614
- - TRANSITION_ATTRIBUTES_CONFLICTING_DESTINATION_TAGS_FIELDS
3615
- = 3007;
3616
- - TRANSITION_ATTRIBUTES_DELAY_DURATION_NEGATIVE_OR_NAN =
3617
- 3008;
3618
- - TRANSITION_ATTRIBUTES_DELAY_DURATION_EXCEEDS_GLOBAL_DURATION
3619
- = 3009;
3620
-
3621
- - AMOUNT_ERROR = 31;
3622
-
3623
- - AMOUNT_NEGATIVE_VALUE = 3100;
3624
-
3625
- - LOAD_LIMIT_ERROR = 33;
3626
-
3627
- - LOAD_LIMIT_INVALID_COST_ABOVE_SOFT_MAX = 3303;
3628
- - LOAD_LIMIT_SOFT_MAX_WITHOUT_COST_ABOVE_SOFT_MAX =
3629
- 3304;
3630
- - LOAD_LIMIT_COST_ABOVE_SOFT_MAX_WITHOUT_SOFT_MAX =
3631
- 3305;
3632
- - LOAD_LIMIT_NEGATIVE_SOFT_MAX = 3306;
3633
- - LOAD_LIMIT_MIXED_DEMAND_TYPE = 3307;
3634
- - LOAD_LIMIT_MAX_LOAD_NEGATIVE_VALUE = 3308;
3635
- - LOAD_LIMIT_SOFT_MAX_ABOVE_MAX = 3309;
3636
-
3637
- - INTERVAL_ERROR = 34;
3638
-
3639
- - INTERVAL_MIN_EXCEEDS_MAX = 3401;
3640
- - INTERVAL_NEGATIVE_MIN = 3402;
3641
- - INTERVAL_NEGATIVE_MAX = 3403;
3642
- - INTERVAL_MIN_EXCEEDS_CAPACITY = 3404;
3643
- - INTERVAL_MAX_EXCEEDS_CAPACITY = 3405;
3644
-
3645
- - DISTANCE_LIMIT_ERROR = 36;
3646
-
3647
- - DISTANCE_LIMIT_INVALID_COST_AFTER_SOFT_MAX = 3601;
3648
- - DISTANCE_LIMIT_SOFT_MAX_WITHOUT_COST_AFTER_SOFT_MAX =
3649
- 3602;
3650
- - DISTANCE_LIMIT_COST_AFTER_SOFT_MAX_WITHOUT_SOFT_MAX =
3651
- 3603;
3652
- - DISTANCE_LIMIT_NEGATIVE_MAX = 3604;
3653
- - DISTANCE_LIMIT_NEGATIVE_SOFT_MAX = 3605;
3654
- - DISTANCE_LIMIT_SOFT_MAX_LARGER_THAN_MAX = 3606;
3655
-
3656
- - DURATION_LIMIT_ERROR = 38;
3657
-
3658
- - DURATION_LIMIT_MAX_DURATION_NEGATIVE_OR_NAN = 3800;
3659
- - DURATION_LIMIT_SOFT_MAX_DURATION_NEGATIVE_OR_NAN =
3660
- 3801;
3661
- - DURATION_LIMIT_INVALID_COST_PER_HOUR_AFTER_SOFT_MAX =
3662
- 3802;
3663
- - DURATION_LIMIT_SOFT_MAX_WITHOUT_COST_AFTER_SOFT_MAX =
3664
- 3803;
3665
- - DURATION_LIMIT_COST_AFTER_SOFT_MAX_WITHOUT_SOFT_MAX =
3666
- 3804;
3667
- - DURATION_LIMIT_QUADRATIC_SOFT_MAX_DURATION_NEGATIVE_OR_NAN
3668
- = 3805;
3669
- - DURATION_LIMIT_INVALID_COST_AFTER_QUADRATIC_SOFT_MAX =
3670
- 3806;
3671
- - DURATION_LIMIT_QUADRATIC_SOFT_MAX_WITHOUT_COST_PER_SQUARE_HOUR
3672
- = 3807;
3673
- - DURATION_LIMIT_COST_PER_SQUARE_HOUR_WITHOUT_QUADRATIC_SOFT_MAX
3674
- = 3808;
3675
- - DURATION_LIMIT_QUADRATIC_SOFT_MAX_WITHOUT_MAX = 3809;
3676
- - DURATION_LIMIT_SOFT_MAX_LARGER_THAN_MAX = 3810;
3677
- - DURATION_LIMIT_QUADRATIC_SOFT_MAX_LARGER_THAN_MAX =
3678
- 3811;
3679
- - DURATION_LIMIT_DIFF_BETWEEN_MAX_AND_QUADRATIC_SOFT_MAX_TOO_LARGE
3680
- = 3812;
3681
- - DURATION_LIMIT_MAX_DURATION_EXCEEDS_GLOBAL_DURATION =
3682
- 3813;
3683
- - DURATION_LIMIT_SOFT_MAX_DURATION_EXCEEDS_GLOBAL_DURATION
3684
- = 3814;
3685
- - DURATION_LIMIT_QUADRATIC_SOFT_MAX_DURATION_EXCEEDS_GLOBAL_DURATION
3686
- = 3815;
3687
-
3688
- - SHIPMENT_ERROR = 40;
3689
-
3690
- - SHIPMENT_PD_LIMIT_WITHOUT_PICKUP_AND_DELIVERY = 4014;
3691
- - SHIPMENT_PD_ABSOLUTE_DETOUR_LIMIT_DURATION_NEGATIVE_OR_NAN
3692
- = 4000;
3693
- - SHIPMENT_PD_ABSOLUTE_DETOUR_LIMIT_DURATION_EXCEEDS_GLOBAL_DURATION
3694
- = 4001;
3695
- - SHIPMENT_PD_RELATIVE_DETOUR_LIMIT_INVALID = 4015;
3696
- - SHIPMENT_PD_DETOUR_LIMIT_AND_EXTRA_VISIT_DURATION =
3697
- 4016;
3698
- - SHIPMENT_PD_TIME_LIMIT_DURATION_NEGATIVE_OR_NAN =
3699
- 4002;
3700
- - SHIPMENT_PD_TIME_LIMIT_DURATION_EXCEEDS_GLOBAL_DURATION
3701
- = 4003;
3702
- - SHIPMENT_EMPTY_SHIPMENT_TYPE = 4004;
3703
- - SHIPMENT_NO_PICKUP_NO_DELIVERY = 4005;
3704
- - SHIPMENT_INVALID_PENALTY_COST = 4006;
3705
- - SHIPMENT_ALLOWED_VEHICLE_INDEX_OUT_OF_BOUNDS = 4007;
3706
- - SHIPMENT_DUPLICATE_ALLOWED_VEHICLE_INDEX = 4008;
3707
- - SHIPMENT_INCONSISTENT_COST_FOR_VEHICLE_SIZE_WITHOUT_INDEX
3708
- = 4009;
3709
- - SHIPMENT_INCONSISTENT_COST_FOR_VEHICLE_SIZE_WITH_INDEX
3710
- = 4010;
3711
- - SHIPMENT_INVALID_COST_FOR_VEHICLE = 4011;
3712
- - SHIPMENT_COST_FOR_VEHICLE_INDEX_OUT_OF_BOUNDS = 4012;
3713
- - SHIPMENT_DUPLICATE_COST_FOR_VEHICLE_INDEX = 4013;
3714
-
3715
- - VEHICLE_ERROR = 42;
3716
-
3717
- - VEHICLE_EMPTY_REQUIRED_OPERATOR_TYPE = 4200;
3718
- - VEHICLE_DUPLICATE_REQUIRED_OPERATOR_TYPE = 4201;
3719
- - VEHICLE_NO_OPERATOR_WITH_REQUIRED_OPERATOR_TYPE =
3720
- 4202;
3721
- - VEHICLE_EMPTY_START_TAG = 4203;
3722
- - VEHICLE_DUPLICATE_START_TAG = 4204;
3723
- - VEHICLE_EMPTY_END_TAG = 4205;
3724
- - VEHICLE_DUPLICATE_END_TAG = 4206;
3725
- - VEHICLE_EXTRA_VISIT_DURATION_NEGATIVE_OR_NAN = 4207;
3726
- - VEHICLE_EXTRA_VISIT_DURATION_EXCEEDS_GLOBAL_DURATION =
3727
- 4208;
3728
- - VEHICLE_EXTRA_VISIT_DURATION_EMPTY_KEY = 4209;
3729
- - VEHICLE_FIRST_SHIPMENT_INDEX_OUT_OF_BOUNDS = 4210;
3730
- - VEHICLE_FIRST_SHIPMENT_IGNORED = 4211;
3731
- - VEHICLE_FIRST_SHIPMENT_NOT_BOUND = 4212;
3732
- - VEHICLE_LAST_SHIPMENT_INDEX_OUT_OF_BOUNDS = 4213;
3733
- - VEHICLE_LAST_SHIPMENT_IGNORED = 4214;
3734
- - VEHICLE_LAST_SHIPMENT_NOT_BOUND = 4215;
3735
- - VEHICLE_IGNORED_WITH_USED_IF_ROUTE_IS_EMPTY = 4216;
3736
- - VEHICLE_INVALID_COST_PER_KILOMETER = 4217;
3737
- - VEHICLE_INVALID_COST_PER_HOUR = 4218;
3738
- - VEHICLE_INVALID_COST_PER_TRAVELED_HOUR = 4219;
3739
- - VEHICLE_INVALID_FIXED_COST = 4220;
3740
- - VEHICLE_INVALID_TRAVEL_DURATION_MULTIPLE = 4221;
3741
- - VEHICLE_TRAVEL_DURATION_MULTIPLE_WITH_SHIPMENT_PD_DETOUR_LIMITS
3742
- = 4223;
3743
- - VEHICLE_MATRIX_INDEX_WITH_SHIPMENT_PD_DETOUR_LIMITS =
3744
- 4224;
3745
- - VEHICLE_MINIMUM_DURATION_LONGER_THAN_DURATION_LIMIT =
3746
- 4222;
3747
-
3748
- - VISIT_REQUEST_ERROR = 44;
3749
-
3750
- - VISIT_REQUEST_EMPTY_TAG = 4400;
3751
- - VISIT_REQUEST_DUPLICATE_TAG = 4401;
3752
- - VISIT_REQUEST_DURATION_NEGATIVE_OR_NAN = 4404;
3753
- - VISIT_REQUEST_DURATION_EXCEEDS_GLOBAL_DURATION = 4405;
3754
-
3755
- - PRECEDENCE_ERROR = 46;
3756
-
3757
- - BREAK_ERROR = 48;
3758
-
3759
- - BREAK_RULE_EMPTY = 4800;
3760
- - BREAK_REQUEST_UNSPECIFIED_DURATION = 4801;
3761
- - BREAK_REQUEST_UNSPECIFIED_EARLIEST_START_TIME = 4802;
3762
- - BREAK_REQUEST_UNSPECIFIED_LATEST_START_TIME = 4803;
3763
- - BREAK_REQUEST_DURATION_NEGATIVE_OR_NAN = 4804; = 4804;
3764
- - BREAK_REQUEST_LATEST_START_TIME_BEFORE_EARLIEST_START_TIME
3765
- = 4805;
3766
- - BREAK_REQUEST_EARLIEST_START_TIME_BEFORE_GLOBAL_START_TIME
3767
- = 4806;
3768
- - BREAK_REQUEST_LATEST_END_TIME_AFTER_GLOBAL_END_TIME =
3769
- 4807;
3770
- - BREAK_REQUEST_NON_SCHEDULABLE = 4808;
3771
- - BREAK_FREQUENCY_MAX_INTER_BREAK_DURATION_NEGATIVE_OR_NAN
3772
- = 4809;
3773
- - BREAK_FREQUENCY_MIN_BREAK_DURATION_NEGATIVE_OR_NAN =
3774
- 4810;
3775
- - BREAK_FREQUENCY_MIN_BREAK_DURATION_EXCEEDS_GLOBAL_DURATION
3776
- = 4811;
3777
- - BREAK_FREQUENCY_MAX_INTER_BREAK_DURATION_EXCEEDS_GLOBAL_DURATION
3778
- = 4812;
3779
- - BREAK_REQUEST_DURATION_EXCEEDS_GLOBAL_DURATION = 4813;
3780
- - BREAK_FREQUENCY_MISSING_MAX_INTER_BREAK_DURATION =
3781
- 4814;
3782
- - BREAK_FREQUENCY_MISSING_MIN_BREAK_DURATION = 4815;
3783
-
3784
- - SHIPMENT_TYPE_INCOMPATIBILITY_ERROR = 50;
3785
-
3786
- - SHIPMENT_TYPE_INCOMPATIBILITY_EMPTY_TYPE = 5001;
3787
- - SHIPMENT_TYPE_INCOMPATIBILITY_LESS_THAN_TWO_TYPES =
3788
- 5002;
3789
- - SHIPMENT_TYPE_INCOMPATIBILITY_DUPLICATE_TYPE = 5003;
3790
- - SHIPMENT_TYPE_INCOMPATIBILITY_INVALID_INCOMPATIBILITY_MODE
3791
- = 5004;
3792
- - SHIPMENT_TYPE_INCOMPATIBILITY_TOO_MANY_INCOMPATIBILITIES
3793
- = 5005;
3794
-
3795
- - SHIPMENT_TYPE_REQUIREMENT_ERROR = 52;
3796
-
3797
- - SHIPMENT_TYPE_REQUIREMENT_NO_REQUIRED_TYPE = 52001;
3798
- - SHIPMENT_TYPE_REQUIREMENT_NO_DEPENDENT_TYPE = 52002;
3799
- - SHIPMENT_TYPE_REQUIREMENT_INVALID_REQUIREMENT_MODE =
3800
- 52003;
3801
- - SHIPMENT_TYPE_REQUIREMENT_TOO_MANY_REQUIREMENTS =
3802
- 52004;
3803
- - SHIPMENT_TYPE_REQUIREMENT_EMPTY_REQUIRED_TYPE = 52005;
3804
- - SHIPMENT_TYPE_REQUIREMENT_DUPLICATE_REQUIRED_TYPE =
3805
- 52006;
3806
- - SHIPMENT_TYPE_REQUIREMENT_NO_REQUIRED_TYPE_FOUND =
3807
- 52007;
3808
- - SHIPMENT_TYPE_REQUIREMENT_EMPTY_DEPENDENT_TYPE =
3809
- 52008;
3810
- - SHIPMENT_TYPE_REQUIREMENT_DUPLICATE_DEPENDENT_TYPE =
3811
- 52009;
3812
- - SHIPMENT_TYPE_REQUIREMENT_SELF_DEPENDENT_TYPE = 52010;
3813
- - SHIPMENT_TYPE_REQUIREMENT_GRAPH_HAS_CYCLES = 52011;
3814
-
3815
- - VEHICLE_OPERATOR_ERROR = 54;
3816
-
3817
- - VEHICLE_OPERATOR_EMPTY_TYPE = 5400;
3818
- - VEHICLE_OPERATOR_MULTIPLE_START_TIME_WINDOWS = 5401;
3819
- - VEHICLE_OPERATOR_SOFT_START_TIME_WINDOW = 5402;
3820
- - VEHICLE_OPERATOR_MULTIPLE_END_TIME_WINDOWS = 5403;
3821
- - VEHICLE_OPERATOR_SOFT_END_TIME_WINDOW = 5404;
3822
-
3823
- - DURATION_SECONDS_MATRIX_ERROR = 56;
3824
-
3825
- - DURATION_SECONDS_MATRIX_DURATION_NEGATIVE_OR_NAN =
3826
- 5600;
3827
- - DURATION_SECONDS_MATRIX_DURATION_EXCEEDS_GLOBAL_DURATION
3828
- = 5601;
3598
+ error hid the old one. For example, see "MULTIPLE ERRORS".
3829
3599
  display_name (str):
3830
3600
  The error display name.
3831
3601
  fields (MutableSequence[google.maps.routeoptimization_v1.types.OptimizeToursValidationError.FieldReference]):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: google-maps-routeoptimization
3
- Version: 0.1.2
3
+ Version: 0.1.4
4
4
  Summary: Google Maps Routeoptimization API client library
5
5
  Home-page: https://github.com/googleapis/google-cloud-python/tree/main/packages/google-maps-routeoptimization
6
6
  Author: Google LLC
@@ -1333,22 +1333,23 @@ async def test_optimize_tours_async_use_cached_wrapped_rpc(
1333
1333
  )
1334
1334
 
1335
1335
  # Replace cached wrapped function with mock
1336
- mock_object = mock.AsyncMock()
1336
+ mock_rpc = mock.AsyncMock()
1337
+ mock_rpc.return_value = mock.Mock()
1337
1338
  client._client._transport._wrapped_methods[
1338
1339
  client._client._transport.optimize_tours
1339
- ] = mock_object
1340
+ ] = mock_rpc
1340
1341
 
1341
1342
  request = {}
1342
1343
  await client.optimize_tours(request)
1343
1344
 
1344
1345
  # Establish that the underlying gRPC stub method was called.
1345
- assert mock_object.call_count == 1
1346
+ assert mock_rpc.call_count == 1
1346
1347
 
1347
1348
  await client.optimize_tours(request)
1348
1349
 
1349
1350
  # Establish that a new wrapper was not created for this call
1350
1351
  assert wrapper_fn.call_count == 0
1351
- assert mock_object.call_count == 2
1352
+ assert mock_rpc.call_count == 2
1352
1353
 
1353
1354
 
1354
1355
  @pytest.mark.asyncio
@@ -1570,8 +1571,9 @@ def test_batch_optimize_tours_use_cached_wrapped_rpc():
1570
1571
  # Establish that the underlying gRPC stub method was called.
1571
1572
  assert mock_rpc.call_count == 1
1572
1573
 
1573
- # Operation methods build a cached wrapper on first rpc call
1574
- # subsequent calls should use the cached wrapper
1574
+ # Operation methods call wrapper_fn to build a cached
1575
+ # client._transport.operations_client instance on first rpc call.
1576
+ # Subsequent calls should use the cached wrapper
1575
1577
  wrapper_fn.reset_mock()
1576
1578
 
1577
1579
  client.batch_optimize_tours(request)
@@ -1627,26 +1629,28 @@ async def test_batch_optimize_tours_async_use_cached_wrapped_rpc(
1627
1629
  )
1628
1630
 
1629
1631
  # Replace cached wrapped function with mock
1630
- mock_object = mock.AsyncMock()
1632
+ mock_rpc = mock.AsyncMock()
1633
+ mock_rpc.return_value = mock.Mock()
1631
1634
  client._client._transport._wrapped_methods[
1632
1635
  client._client._transport.batch_optimize_tours
1633
- ] = mock_object
1636
+ ] = mock_rpc
1634
1637
 
1635
1638
  request = {}
1636
1639
  await client.batch_optimize_tours(request)
1637
1640
 
1638
1641
  # Establish that the underlying gRPC stub method was called.
1639
- assert mock_object.call_count == 1
1642
+ assert mock_rpc.call_count == 1
1640
1643
 
1641
- # Operation methods build a cached wrapper on first rpc call
1642
- # subsequent calls should use the cached wrapper
1644
+ # Operation methods call wrapper_fn to build a cached
1645
+ # client._transport.operations_client instance on first rpc call.
1646
+ # Subsequent calls should use the cached wrapper
1643
1647
  wrapper_fn.reset_mock()
1644
1648
 
1645
1649
  await client.batch_optimize_tours(request)
1646
1650
 
1647
1651
  # Establish that a new wrapper was not created for this call
1648
1652
  assert wrapper_fn.call_count == 0
1649
- assert mock_object.call_count == 2
1653
+ assert mock_rpc.call_count == 2
1650
1654
 
1651
1655
 
1652
1656
  @pytest.mark.asyncio