google-cloud-optimization-v1 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8eba4a90b10abd2a2b938152f59760d4912404340fbf11d15a61a2204e913981
4
- data.tar.gz: 7ea08b70a526a413d14760f63806263208112404bfef301eb08fa68f9b053907
3
+ metadata.gz: ef1c06c8689f9ec9924927c2e6a0f05bf3ae76fc4cacfb54f66209e9c41c80f5
4
+ data.tar.gz: b88a5648c0cd64550643df1bae0294832727a0048b710f8ffefd8d6a5172ed30
5
5
  SHA512:
6
- metadata.gz: ddaef58d2ada9922be2e767e9ff00b1174b000846cd4e08cb81e0c52a2194b3376b012d3bfc0725ce66a892d85f98d06973971375d93f99fe6dfe263d4e044b1
7
- data.tar.gz: 928138b6bd229b6ec3cc620d588827b145aaee9c05bfb530d071daf553bbe03beea7c8d9928b5b15578b228024f7944119865780e3614fb6d5058cf7580b8ac1
6
+ metadata.gz: 31d9d6dd3d96519f5c6e832bca5ac24bd478f2e0fad7514de42554d996fb377a3d7638c458b8b3721f0358ed68e52fc9ec321bf1e22335c1163d8306e467a268
7
+ data.tar.gz: 740e1e2341166cc4a3206e813ad6479a9a6178573fa8238051a6ff20d2bc6bfc1511845235bcc79b66726ab1a7ff9d49c32f13798182590c14a3f529d388ca73
data/AUTHENTICATION.md CHANGED
@@ -112,7 +112,7 @@ credentials are discovered.
112
112
  To configure your system for this, simply:
113
113
 
114
114
  1. [Download and install the Cloud SDK](https://cloud.google.com/sdk)
115
- 2. Authenticate using OAuth 2.0 `$ gcloud auth login`
115
+ 2. Authenticate using OAuth 2.0 `$ gcloud auth application-default login`
116
116
  3. Write code as if already authenticated.
117
117
 
118
118
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Ruby Client for the Cloud Optimization V1 API
2
2
 
3
- API Client library for the Cloud Optimization V1 API
3
+ Cloud Optimization API provides a portfolio of solvers to address common optimization use cases starting with optimal route planning for vehicle fleets.
4
4
 
5
5
  Cloud Optimization API provides a portfolio of solvers to address common optimization use cases starting with optimal route planning for vehicle fleets.
6
6
 
@@ -46,7 +46,7 @@ for general usage information.
46
46
  ## Enabling Logging
47
47
 
48
48
  To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
49
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
49
+ The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
50
50
  or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
51
51
  that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
52
52
  and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
@@ -230,7 +230,7 @@ module Google
230
230
  # @param solving_mode [::Google::Cloud::Optimization::V1::OptimizeToursRequest::SolvingMode]
231
231
  # By default, the solving mode is `DEFAULT_SOLVE` (0).
232
232
  # @param max_validation_errors [::Integer]
233
- # Truncates the number of validation errors returned. Those errors are
233
+ # Truncates the number of validation errors returned. These errors are
234
234
  # typically attached to an INVALID_ARGUMENT error payload as a BadRequest
235
235
  # error detail (https://cloud.google.com/apis/design/errors#error_details),
236
236
  # unless solving_mode=VALIDATE_ONLY: see the
@@ -261,8 +261,9 @@ module Google
261
261
  # <= visits[0].start_time <= visits[1].start_time ...
262
262
  # <= vehicle_end_time`).
263
263
  # * a shipment may only be performed on a vehicle that is allowed. A
264
- # vehicle is allowed if {::Google::Cloud::Optimization::V1::Shipment#allowed_vehicle_indices Shipment.allowed_vehicle_indices} is empty or
265
- # its `vehicle_index` is included in
264
+ # vehicle is allowed if
265
+ # {::Google::Cloud::Optimization::V1::Shipment#allowed_vehicle_indices Shipment.allowed_vehicle_indices}
266
+ # is empty or its `vehicle_index` is included in
266
267
  # {::Google::Cloud::Optimization::V1::Shipment#allowed_vehicle_indices Shipment.allowed_vehicle_indices}.
267
268
  #
268
269
  # If the injected solution is not feasible, a validation error is not
@@ -297,16 +298,27 @@ module Google
297
298
  # @param interpret_injected_solutions_using_labels [::Boolean]
298
299
  # If true:
299
300
  #
300
- # * uses {::Google::Cloud::Optimization::V1::ShipmentRoute#vehicle_label ShipmentRoute.vehicle_label} instead of `vehicle_index` to
301
+ # * uses
302
+ # {::Google::Cloud::Optimization::V1::ShipmentRoute#vehicle_label ShipmentRoute.vehicle_label}
303
+ # instead of `vehicle_index` to
301
304
  # match routes in an injected solution with vehicles in the request;
302
- # reuses the mapping of original {::Google::Cloud::Optimization::V1::ShipmentRoute#vehicle_index ShipmentRoute.vehicle_index} to new
303
- # {::Google::Cloud::Optimization::V1::ShipmentRoute#vehicle_index ShipmentRoute.vehicle_index} to update
305
+ # reuses the mapping of original
306
+ # {::Google::Cloud::Optimization::V1::ShipmentRoute#vehicle_index ShipmentRoute.vehicle_index}
307
+ # to new
308
+ # {::Google::Cloud::Optimization::V1::ShipmentRoute#vehicle_index ShipmentRoute.vehicle_index}
309
+ # to update
304
310
  # {::Google::Cloud::Optimization::V1::InjectedSolutionConstraint::ConstraintRelaxation#vehicle_indices ConstraintRelaxation.vehicle_indices}
305
311
  # if non-empty, but the mapping must be unambiguous (i.e., multiple
306
312
  # `ShipmentRoute`s must not share the same original `vehicle_index`).
307
- # * uses {::Google::Cloud::Optimization::V1::ShipmentRoute::Visit#shipment_label ShipmentRoute.Visit.shipment_label} instead of `shipment_index`
313
+ # * uses
314
+ # {::Google::Cloud::Optimization::V1::ShipmentRoute::Visit#shipment_label ShipmentRoute.Visit.shipment_label}
315
+ # instead of `shipment_index`
308
316
  # to match visits in an injected solution with shipments in the request;
309
- # * uses {::Google::Cloud::Optimization::V1::SkippedShipment#label SkippedShipment.label} instead of {::Google::Cloud::Optimization::V1::SkippedShipment#index SkippedShipment.index} to
317
+ # * uses
318
+ # {::Google::Cloud::Optimization::V1::SkippedShipment#label SkippedShipment.label}
319
+ # instead of
320
+ # {::Google::Cloud::Optimization::V1::SkippedShipment#index SkippedShipment.index}
321
+ # to
310
322
  # match skipped shipments in the injected solution with request
311
323
  # shipments.
312
324
  #
@@ -319,8 +331,10 @@ module Google
319
331
  # If true, labels in the following categories must appear at most once in
320
332
  # their category:
321
333
  #
322
- # * {::Google::Cloud::Optimization::V1::Vehicle#label Vehicle.label} in the request;
323
- # * {::Google::Cloud::Optimization::V1::Shipment#label Shipment.label} in the request;
334
+ # * {::Google::Cloud::Optimization::V1::Vehicle#label Vehicle.label} in the
335
+ # request;
336
+ # * {::Google::Cloud::Optimization::V1::Shipment#label Shipment.label} in the
337
+ # request;
324
338
  # * {::Google::Cloud::Optimization::V1::ShipmentRoute#vehicle_label ShipmentRoute.vehicle_label} in the injected solution;
325
339
  # * {::Google::Cloud::Optimization::V1::SkippedShipment#label SkippedShipment.label} and {::Google::Cloud::Optimization::V1::ShipmentRoute::Visit#shipment_label ShipmentRoute.Visit.shipment_label} in
326
340
  # the injected solution (except pickup/delivery visit pairs, whose
@@ -330,27 +344,32 @@ module Google
330
344
  # request vehicle, the corresponding route is removed from the solution
331
345
  # along with its visits. If a `shipment_label` in the injected solution does
332
346
  # not correspond to a request shipment, the corresponding visit is removed
333
- # from the solution. If a {::Google::Cloud::Optimization::V1::SkippedShipment#label SkippedShipment.label} in the injected solution
334
- # does not correspond to a request shipment, the `SkippedShipment` is removed
335
- # from the solution.
347
+ # from the solution. If a
348
+ # {::Google::Cloud::Optimization::V1::SkippedShipment#label SkippedShipment.label}
349
+ # in the injected solution does not correspond to a request shipment, the
350
+ # `SkippedShipment` is removed from the solution.
336
351
  #
337
352
  # Removing route visits or entire routes from an injected solution may
338
353
  # have an effect on the implied constraints, which may lead to change in
339
354
  # solution, validation errors, or infeasibility.
340
355
  #
341
- # NOTE: The caller must ensure that each {::Google::Cloud::Optimization::V1::Vehicle#label Vehicle.label}
342
- # (resp. {::Google::Cloud::Optimization::V1::Shipment#label Shipment.label}) uniquely identifies a vehicle (resp. shipment)
343
- # entity used across the two relevant requests: the past request that
344
- # produced the `OptimizeToursResponse` used in the injected solution and the
345
- # current request that includes the injected solution. The uniqueness checks
346
- # described above are not enough to guarantee this requirement.
356
+ # NOTE: The caller must ensure that each
357
+ # {::Google::Cloud::Optimization::V1::Vehicle#label Vehicle.label} (resp.
358
+ # {::Google::Cloud::Optimization::V1::Shipment#label Shipment.label}) uniquely
359
+ # identifies a vehicle (resp. shipment) entity used across the two relevant
360
+ # requests: the past request that produced the `OptimizeToursResponse` used
361
+ # in the injected solution and the current request that includes the injected
362
+ # solution. The uniqueness checks described above are not enough to guarantee
363
+ # this requirement.
347
364
  # @param consider_road_traffic [::Boolean]
348
365
  # Consider traffic estimation in calculating `ShipmentRoute` fields
349
366
  # {::Google::Cloud::Optimization::V1::ShipmentRoute::Transition#travel_duration Transition.travel_duration},
350
367
  # {::Google::Cloud::Optimization::V1::ShipmentRoute::Visit#start_time Visit.start_time},
351
368
  # and `vehicle_end_time`; in setting the
352
- # {::Google::Cloud::Optimization::V1::ShipmentRoute#has_traffic_infeasibilities ShipmentRoute.has_traffic_infeasibilities} field, and in calculating the
353
- # {::Google::Cloud::Optimization::V1::OptimizeToursResponse#total_cost OptimizeToursResponse.total_cost} field.
369
+ # {::Google::Cloud::Optimization::V1::ShipmentRoute#has_traffic_infeasibilities ShipmentRoute.has_traffic_infeasibilities}
370
+ # field, and in calculating the
371
+ # {::Google::Cloud::Optimization::V1::OptimizeToursResponse#total_cost OptimizeToursResponse.total_cost}
372
+ # field.
354
373
  # @param populate_polylines [::Boolean]
355
374
  # If true, polylines will be populated in response `ShipmentRoute`s.
356
375
  # @param populate_transition_polylines [::Boolean]
@@ -376,10 +395,12 @@ module Google
376
395
  # Label that may be used to identify this request, reported back in the
377
396
  # {::Google::Cloud::Optimization::V1::OptimizeToursResponse#request_label OptimizeToursResponse.request_label}.
378
397
  # @param populate_travel_step_polylines [::Boolean]
379
- # Deprecated: Use [OptimizeToursRequest.populate_transition_polylines][] instead.
380
- # If true, polylines will be populated in response
381
- # {::Google::Cloud::Optimization::V1::ShipmentRoute#transitions ShipmentRoute.transitions}. Note that in this case, the polylines will
382
- # also be populated in the deprecated `travel_steps`.
398
+ # Deprecated: Use
399
+ # {::Google::Cloud::Optimization::V1::OptimizeToursRequest#populate_transition_polylines OptimizeToursRequest.populate_transition_polylines}
400
+ # instead. If true, polylines will be populated in response
401
+ # {::Google::Cloud::Optimization::V1::ShipmentRoute#transitions ShipmentRoute.transitions}.
402
+ # Note that in this case, the polylines will also be populated in the
403
+ # deprecated `travel_steps`.
383
404
  #
384
405
  # @yield [response, operation] Access the result along with the RPC operation
385
406
  # @yieldparam response [::Google::Cloud::Optimization::V1::OptimizeToursResponse]
@@ -479,8 +500,8 @@ module Google
479
500
  #
480
501
  # If no location is specified, a region will be chosen automatically.
481
502
  # @param model_configs [::Array<::Google::Cloud::Optimization::V1::BatchOptimizeToursRequest::AsyncModelConfig, ::Hash>]
482
- # Required. Input/Output information each purchase model, such as file paths and data
483
- # formats.
503
+ # Required. Input/Output information each purchase model, such as file paths
504
+ # and data formats.
484
505
  #
485
506
  # @yield [response, operation] Access the result along with the RPC operation
486
507
  # @yieldparam response [::Gapic::Operation]
@@ -502,14 +523,14 @@ module Google
502
523
  # # Call the batch_optimize_tours method.
503
524
  # result = client.batch_optimize_tours request
504
525
  #
505
- # # The returned object is of type Gapic::Operation. You can use this
506
- # # object to check the status of an operation, cancel it, or wait
507
- # # for results. Here is how to block until completion:
526
+ # # The returned object is of type Gapic::Operation. You can use it to
527
+ # # check the status of an operation, cancel it, or wait for results.
528
+ # # Here is how to wait for a response.
508
529
  # result.wait_until_done! timeout: 60
509
530
  # if result.response?
510
531
  # p result.response
511
532
  # else
512
- # puts "Error!"
533
+ # puts "No response received."
513
534
  # end
514
535
  #
515
536
  def batch_optimize_tours request, options = nil
@@ -158,13 +158,11 @@ module Google
158
158
  # # Call the list_operations method.
159
159
  # result = client.list_operations request
160
160
  #
161
- # # The returned object is of type Gapic::PagedEnumerable. You can
162
- # # iterate over all elements by calling #each, and the enumerable
163
- # # will lazily make API calls to fetch subsequent pages. Other
164
- # # methods are also available for managing paging directly.
165
- # result.each do |response|
161
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
162
+ # # over elements, and API calls will be issued to fetch pages as needed.
163
+ # result.each do |item|
166
164
  # # Each element is of type ::Google::Longrunning::Operation.
167
- # p response
165
+ # p item
168
166
  # end
169
167
  #
170
168
  def list_operations request, options = nil
@@ -253,14 +251,14 @@ module Google
253
251
  # # Call the get_operation method.
254
252
  # result = client.get_operation request
255
253
  #
256
- # # The returned object is of type Gapic::Operation. You can use this
257
- # # object to check the status of an operation, cancel it, or wait
258
- # # for results. Here is how to block until completion:
254
+ # # The returned object is of type Gapic::Operation. You can use it to
255
+ # # check the status of an operation, cancel it, or wait for results.
256
+ # # Here is how to wait for a response.
259
257
  # result.wait_until_done! timeout: 60
260
258
  # if result.response?
261
259
  # p result.response
262
260
  # else
263
- # puts "Error!"
261
+ # puts "No response received."
264
262
  # end
265
263
  #
266
264
  def get_operation request, options = nil
@@ -540,14 +538,14 @@ module Google
540
538
  # # Call the wait_operation method.
541
539
  # result = client.wait_operation request
542
540
  #
543
- # # The returned object is of type Gapic::Operation. You can use this
544
- # # object to check the status of an operation, cancel it, or wait
545
- # # for results. Here is how to block until completion:
541
+ # # The returned object is of type Gapic::Operation. You can use it to
542
+ # # check the status of an operation, cancel it, or wait for results.
543
+ # # Here is how to wait for a response.
546
544
  # result.wait_until_done! timeout: 60
547
545
  # if result.response?
548
546
  # p result.response
549
547
  # else
550
- # puts "Error!"
548
+ # puts "No response received."
551
549
  # end
552
550
  #
553
551
  def wait_operation request, options = nil