From a4916de44d3646a3315abc8654530ba86f71604c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 29 Nov 2022 19:19:12 -0800 Subject: [PATCH] docs: fix minor docstring formatting (#3684) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: fix minor docstring formatting PiperOrigin-RevId: 491440092 Source-Link: https://github.com/googleapis/googleapis/commit/16db2fb7fab4668bdfa09966513e03581d8f5e35 Source-Link: https://github.com/googleapis/googleapis-gen/commit/5ac3b73a0af5e1dccee53431e3d5124fd16e3073 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW9wdGltaXphdGlvbi8uT3dsQm90LnlhbWwiLCJoIjoiNWFjM2I3M2EwYWY1ZTFkY2NlZTUzNDMxZTNkNTEyNGZkMTZlMzA3MyJ9 * Update .OwlBot.lock.yaml * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Update .OwlBot.lock.yaml Co-authored-by: Owl Bot Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> --- .github/.OwlBot.lock.yaml | 2 +- .../cloud/optimization/v1/fleet_routing.proto | 305 ++++++++++++------ .../v1/fleet_routing.batch_optimize_tours.js | 4 +- .../v1/fleet_routing.optimize_tours.js | 59 ++-- ...metadata.google.cloud.optimization.v1.json | 2 +- .../src/v1/fleet_routing_client.ts | 72 +++-- 6 files changed, 287 insertions(+), 157 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 6cd8ce729c7..a8bdae35da5 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs-mono-repo:latest - digest: sha256:4178ea7c7f3e71650ca9f50fc8eb9ccbe004e4d4ea6aeac26a2249d32ea823f8 + digest: sha256:2fe57986c24050a5a5a2f51a3c609b28eaa88eebe16d47c7ffcbfed7bbd38ac0 diff --git a/packages/google-cloud-optimization/protos/google/cloud/optimization/v1/fleet_routing.proto b/packages/google-cloud-optimization/protos/google/cloud/optimization/v1/fleet_routing.proto index 5e381e9f07c..a00d1b78135 100644 --- a/packages/google-cloud-optimization/protos/google/cloud/optimization/v1/fleet_routing.proto +++ b/packages/google-cloud-optimization/protos/google/cloud/optimization/v1/fleet_routing.proto @@ -49,7 +49,8 @@ option java_package = "com.google.cloud.optimization.v1"; // * at least one of latitude and longitude must be non-zero. service FleetRouting { option (google.api.default_host) = "cloudoptimization.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; // Sends an `OptimizeToursRequest` containing a `ShipmentModel` and returns an // `OptimizeToursResponse` containing `ShipmentRoute`s, which are a set of @@ -86,7 +87,8 @@ service FleetRouting { // contains a `ShipmentModel` and returns an `OptimizeToursResponse` // containing `ShipmentRoute`s, which are a set of routes to be performed by // vehicles minimizing the overall cost. - rpc BatchOptimizeTours(BatchOptimizeToursRequest) returns (google.longrunning.Operation) { + rpc BatchOptimizeTours(BatchOptimizeToursRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*}:batchOptimizeTours" body: "*" @@ -107,8 +109,9 @@ service FleetRouting { message OptimizeToursRequest { // Defines how the solver should handle the request. In all modes but // `VALIDATE_ONLY`, if the request is invalid, you will receive an - // `INVALID_REQUEST` error. See [max_validation_errors][google.cloud.optimization.v1.OptimizeToursRequest.max_validation_errors] to cap the number of - // errors returned. + // `INVALID_REQUEST` error. See + // [max_validation_errors][google.cloud.optimization.v1.OptimizeToursRequest.max_validation_errors] + // to cap the number of errors returned. enum SolvingMode { // Solve the model. DEFAULT_SOLVE = 0; @@ -195,8 +198,9 @@ message OptimizeToursRequest { // <= visits[0].start_time <= visits[1].start_time ... // <= vehicle_end_time`). // * a shipment may only be performed on a vehicle that is allowed. A - // vehicle is allowed if [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices] is empty or - // its `vehicle_index` is included in + // vehicle is allowed if + // [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices] + // is empty or its `vehicle_index` is included in // [Shipment.allowed_vehicle_indices][google.cloud.optimization.v1.Shipment.allowed_vehicle_indices]. // // If the injected solution is not feasible, a validation error is not @@ -234,16 +238,27 @@ message OptimizeToursRequest { // If true: // - // * uses [ShipmentRoute.vehicle_label][google.cloud.optimization.v1.ShipmentRoute.vehicle_label] instead of `vehicle_index` to + // * uses + // [ShipmentRoute.vehicle_label][google.cloud.optimization.v1.ShipmentRoute.vehicle_label] + // instead of `vehicle_index` to // match routes in an injected solution with vehicles in the request; - // reuses the mapping of original [ShipmentRoute.vehicle_index][google.cloud.optimization.v1.ShipmentRoute.vehicle_index] to new - // [ShipmentRoute.vehicle_index][google.cloud.optimization.v1.ShipmentRoute.vehicle_index] to update + // reuses the mapping of original + // [ShipmentRoute.vehicle_index][google.cloud.optimization.v1.ShipmentRoute.vehicle_index] + // to new + // [ShipmentRoute.vehicle_index][google.cloud.optimization.v1.ShipmentRoute.vehicle_index] + // to update // [ConstraintRelaxation.vehicle_indices][google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.vehicle_indices] // if non-empty, but the mapping must be unambiguous (i.e., multiple // `ShipmentRoute`s must not share the same original `vehicle_index`). - // * uses [ShipmentRoute.Visit.shipment_label][google.cloud.optimization.v1.ShipmentRoute.Visit.shipment_label] instead of `shipment_index` + // * uses + // [ShipmentRoute.Visit.shipment_label][google.cloud.optimization.v1.ShipmentRoute.Visit.shipment_label] + // instead of `shipment_index` // to match visits in an injected solution with shipments in the request; - // * uses [SkippedShipment.label][google.cloud.optimization.v1.SkippedShipment.label] instead of [SkippedShipment.index][google.cloud.optimization.v1.SkippedShipment.index] to + // * uses + // [SkippedShipment.label][google.cloud.optimization.v1.SkippedShipment.label] + // instead of + // [SkippedShipment.index][google.cloud.optimization.v1.SkippedShipment.index] + // to // match skipped shipments in the injected solution with request // shipments. // @@ -256,8 +271,10 @@ message OptimizeToursRequest { // If true, labels in the following categories must appear at most once in // their category: // - // * [Vehicle.label][google.cloud.optimization.v1.Vehicle.label] in the request; - // * [Shipment.label][google.cloud.optimization.v1.Shipment.label] in the request; + // * [Vehicle.label][google.cloud.optimization.v1.Vehicle.label] in the + // request; + // * [Shipment.label][google.cloud.optimization.v1.Shipment.label] in the + // request; // * [ShipmentRoute.vehicle_label][google.cloud.optimization.v1.ShipmentRoute.vehicle_label] in the injected solution; // * [SkippedShipment.label][google.cloud.optimization.v1.SkippedShipment.label] and [ShipmentRoute.Visit.shipment_label][google.cloud.optimization.v1.ShipmentRoute.Visit.shipment_label] in // the injected solution (except pickup/delivery visit pairs, whose @@ -267,28 +284,33 @@ message OptimizeToursRequest { // request vehicle, the corresponding route is removed from the solution // along with its visits. If a `shipment_label` in the injected solution does // not correspond to a request shipment, the corresponding visit is removed - // from the solution. If a [SkippedShipment.label][google.cloud.optimization.v1.SkippedShipment.label] in the injected solution - // does not correspond to a request shipment, the `SkippedShipment` is removed - // from the solution. + // from the solution. If a + // [SkippedShipment.label][google.cloud.optimization.v1.SkippedShipment.label] + // in the injected solution does not correspond to a request shipment, the + // `SkippedShipment` is removed from the solution. // // Removing route visits or entire routes from an injected solution may // have an effect on the implied constraints, which may lead to change in // solution, validation errors, or infeasibility. // - // NOTE: The caller must ensure that each [Vehicle.label][google.cloud.optimization.v1.Vehicle.label] - // (resp. [Shipment.label][google.cloud.optimization.v1.Shipment.label]) uniquely identifies a vehicle (resp. shipment) - // entity used across the two relevant requests: the past request that - // produced the `OptimizeToursResponse` used in the injected solution and the - // current request that includes the injected solution. The uniqueness checks - // described above are not enough to guarantee this requirement. + // NOTE: The caller must ensure that each + // [Vehicle.label][google.cloud.optimization.v1.Vehicle.label] (resp. + // [Shipment.label][google.cloud.optimization.v1.Shipment.label]) uniquely + // identifies a vehicle (resp. shipment) entity used across the two relevant + // requests: the past request that produced the `OptimizeToursResponse` used + // in the injected solution and the current request that includes the injected + // solution. The uniqueness checks described above are not enough to guarantee + // this requirement. bool interpret_injected_solutions_using_labels = 10; // Consider traffic estimation in calculating `ShipmentRoute` fields // [Transition.travel_duration][google.cloud.optimization.v1.ShipmentRoute.Transition.travel_duration], // [Visit.start_time][google.cloud.optimization.v1.ShipmentRoute.Visit.start_time], // and `vehicle_end_time`; in setting the - // [ShipmentRoute.has_traffic_infeasibilities][google.cloud.optimization.v1.ShipmentRoute.has_traffic_infeasibilities] field, and in calculating the - // [OptimizeToursResponse.total_cost][google.cloud.optimization.v1.OptimizeToursResponse.total_cost] field. + // [ShipmentRoute.has_traffic_infeasibilities][google.cloud.optimization.v1.ShipmentRoute.has_traffic_infeasibilities] + // field, and in calculating the + // [OptimizeToursResponse.total_cost][google.cloud.optimization.v1.OptimizeToursResponse.total_cost] + // field. bool consider_road_traffic = 11; // If true, polylines will be populated in response `ShipmentRoute`s. @@ -321,10 +343,11 @@ message OptimizeToursRequest { // [OptimizeToursResponse.request_label][google.cloud.optimization.v1.OptimizeToursResponse.request_label]. string label = 17; - // Deprecated: Use [OptimizeToursRequest.populate_transition_polylines][] instead. - // If true, polylines will be populated in response - // [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions]. Note that in this case, the polylines will - // also be populated in the deprecated `travel_steps`. + // Deprecated: Use [OptimizeToursRequest.populate_transition_polylines][] + // instead. If true, polylines will be populated in response + // [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions]. + // Note that in this case, the polylines will also be populated in the + // deprecated `travel_steps`. bool populate_travel_step_polylines = 20 [deprecated = true]; } @@ -335,23 +358,27 @@ message OptimizeToursResponse { // Overall metrics, aggregated over all routes. message Metrics { // Aggregated over the routes. Each metric is the sum (or max, for loads) - // over all [ShipmentRoute.metrics][google.cloud.optimization.v1.ShipmentRoute.metrics] fields of the same name. + // over all + // [ShipmentRoute.metrics][google.cloud.optimization.v1.ShipmentRoute.metrics] + // fields of the same name. AggregatedMetrics aggregated_route_metrics = 1; // Number of mandatory shipments skipped. int32 skipped_mandatory_shipment_count = 2; // Number of vehicles used. Note: if a vehicle route is empty and - // [Vehicle.used_if_route_is_empty][google.cloud.optimization.v1.Vehicle.used_if_route_is_empty] is true, the vehicle is considered - // used. + // [Vehicle.used_if_route_is_empty][google.cloud.optimization.v1.Vehicle.used_if_route_is_empty] + // is true, the vehicle is considered used. int32 used_vehicle_count = 3; // The earliest start time for a used vehicle, computed as the minimum over - // all used vehicles of [ShipmentRoute.vehicle_start_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_start_time]. + // all used vehicles of + // [ShipmentRoute.vehicle_start_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_start_time]. google.protobuf.Timestamp earliest_vehicle_start_time = 4; // The latest end time for a used vehicle, computed as the maximum over all - // used vehicles of [ShipmentRoute.vehicle_end_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_end_time]. + // used vehicles of + // [ShipmentRoute.vehicle_end_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_end_time]. google.protobuf.Timestamp latest_vehicle_end_time = 5; // Cost of the solution, broken down by cost-related request fields. @@ -373,8 +400,9 @@ message OptimizeToursResponse { // vehicle in the model. repeated ShipmentRoute routes = 1; - // Copy of the [OptimizeToursRequest.label][google.cloud.optimization.v1.OptimizeToursRequest.label], if a label was specified in the - // request. + // Copy of the + // [OptimizeToursRequest.label][google.cloud.optimization.v1.OptimizeToursRequest.label], + // if a label was specified in the request. string request_label = 3; // The list of all shipments skipped. @@ -382,7 +410,8 @@ message OptimizeToursResponse { // List of all the validation errors that we were able to detect // independently. See the "MULTIPLE ERRORS" explanation for the - // [OptimizeToursValidationError][google.cloud.optimization.v1.OptimizeToursValidationError] message. + // [OptimizeToursValidationError][google.cloud.optimization.v1.OptimizeToursValidationError] + // message. repeated OptimizeToursValidationError validation_errors = 5; // Duration, distance and usage metrics for this solution. @@ -431,16 +460,15 @@ message BatchOptimizeToursRequest { // If no location is specified, a region will be chosen automatically. string parent = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. Input/Output information each purchase model, such as file paths and data - // formats. - repeated AsyncModelConfig model_configs = 2 [(google.api.field_behavior) = REQUIRED]; + // Required. Input/Output information each purchase model, such as file paths + // and data formats. + repeated AsyncModelConfig model_configs = 2 + [(google.api.field_behavior) = REQUIRED]; } // Response to a `BatchOptimizeToursRequest`. This is returned in // the LRO Operation after the operation is complete. -message BatchOptimizeToursResponse { - -} +message BatchOptimizeToursResponse {} // A shipment model contains a set of shipments which must be performed by a // set of vehicles, while minimizing the overall cost, which is the sum of: @@ -466,7 +494,8 @@ message ShipmentModel { } // Specifies the rows of the duration and distance matrix. It must have as - // many elements as [ShipmentModel.duration_distance_matrix_src_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_src_tags]. + // many elements as + // [ShipmentModel.duration_distance_matrix_src_tags][google.cloud.optimization.v1.ShipmentModel.duration_distance_matrix_src_tags]. repeated Row rows = 1; // Tag defining to which vehicles this duration and distance matrix applies. @@ -530,13 +559,16 @@ message ShipmentModel { // be compatible with the order (this is checked). message BreakRequest { // Required. Lower bound (inclusive) on the start of the break. - google.protobuf.Timestamp earliest_start_time = 1 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.Timestamp earliest_start_time = 1 + [(google.api.field_behavior) = REQUIRED]; // Required. Upper bound (inclusive) on the start of the break. - google.protobuf.Timestamp latest_start_time = 2 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.Timestamp latest_start_time = 2 + [(google.api.field_behavior) = REQUIRED]; // Required. Minimum duration of the break. Must be positive. - google.protobuf.Duration min_duration = 3 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.Duration min_duration = 3 + [(google.api.field_behavior) = REQUIRED]; } // One may further constrain the frequency and duration of the breaks @@ -575,12 +607,14 @@ message ShipmentModel { message FrequencyConstraint { // Required. Minimum break duration for this constraint. Nonnegative. // See description of `FrequencyConstraint`. - google.protobuf.Duration min_break_duration = 1 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.Duration min_break_duration = 1 + [(google.api.field_behavior) = REQUIRED]; - // Required. Maximum allowed span of any interval of time in the route that does not - // include at least partially a break of `duration >= + // Required. Maximum allowed span of any interval of time in the route + // that does not include at least partially a break of `duration >= // min_break_duration`. Must be positive. - google.protobuf.Duration max_inter_break_duration = 2 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.Duration max_inter_break_duration = 2 + [(google.api.field_behavior) = REQUIRED]; } // Sequence of breaks. See the `BreakRequest` message. @@ -626,7 +660,8 @@ message ShipmentModel { // earliest effective start time and the latest effective end time of // all vehicles. Users can assign a cost per hour to that quantity to try // and optimize for earliest job completion, for example. This cost must be in - // the same unit as [Shipment.penalty_cost][google.cloud.optimization.v1.Shipment.penalty_cost]. + // the same unit as + // [Shipment.penalty_cost][google.cloud.optimization.v1.Shipment.penalty_cost]. double global_duration_cost_per_hour = 7; // Specifies duration and distance matrices used in the model. If this field @@ -765,7 +800,8 @@ message ShipmentModel { // Deprecated: No longer used. // Set of break rules used in the model. // Each vehicle specifies the `BreakRule` that applies to it via the - // [Vehicle.break_rule_indices][google.cloud.optimization.v1.Vehicle.break_rule_indices] field (which must be a singleton). + // [Vehicle.break_rule_indices][google.cloud.optimization.v1.Vehicle.break_rule_indices] + // field (which must be a singleton). repeated BreakRule break_rules = 15 [deprecated = true]; } @@ -834,8 +870,10 @@ message Shipment { double cost = 8; // Load demands of this visit request. This is just like - // [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands] field, except that it only applies to this - // [VisitRequest][google.cloud.optimization.v1.Shipment.VisitRequest] instead of the whole [Shipment][google.cloud.optimization.v1.Shipment]. + // [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands] + // field, except that it only applies to this + // [VisitRequest][google.cloud.optimization.v1.Shipment.VisitRequest] + // instead of the whole [Shipment][google.cloud.optimization.v1.Shipment]. // The demands listed here are added to the demands listed in // [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands]. map load_demands = 12; @@ -848,7 +886,8 @@ message Shipment { repeated string visit_types = 10; // Specifies a label for this `VisitRequest`. This label is reported in the - // response as `visit_label` in the corresponding [ShipmentRoute.Visit][google.cloud.optimization.v1.ShipmentRoute.Visit]. + // response as `visit_label` in the corresponding + // [ShipmentRoute.Visit][google.cloud.optimization.v1.ShipmentRoute.Visit]. string label = 11; // Deprecated: Use [VisitRequest.load_demands][] instead. @@ -857,7 +896,8 @@ message Shipment { // When performing a visit, a predefined amount may be added to the vehicle // load if it's a pickup, or subtracted if it's a delivery. This message - // defines such amount. See [load_demands][google.cloud.optimization.v1.Shipment.load_demands]. + // defines such amount. See + // [load_demands][google.cloud.optimization.v1.Shipment.load_demands]. message Load { // The amount by which the load of the vehicle performing the corresponding // visit will vary. Since it is an integer, users are advised to choose an @@ -972,7 +1012,8 @@ message Shipment { string shipment_type = 11; // Specifies a label for this shipment. This label is reported in the response - // in the `shipment_label` of the corresponding [ShipmentRoute.Visit][google.cloud.optimization.v1.ShipmentRoute.Visit]. + // in the `shipment_label` of the corresponding + // [ShipmentRoute.Visit][google.cloud.optimization.v1.ShipmentRoute.Visit]. string label = 12; // If true, skip this shipment, but don't apply a `penalty_cost`. @@ -1103,30 +1144,42 @@ message Vehicle { } // Defines a load limit applying to a vehicle, e.g. "this truck may only - // carry up to 3500 kg". See [load_limits][google.cloud.optimization.v1.Vehicle.load_limits]. + // carry up to 3500 kg". See + // [load_limits][google.cloud.optimization.v1.Vehicle.load_limits]. message LoadLimit { // Interval of acceptable load amounts. message Interval { // A minimum acceptable load. Must be ≥ 0. - // If they're both specified, [min][google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.min] must be ≤ [max][google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.max]. + // If they're both specified, + // [min][google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.min] must + // be ≤ + // [max][google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.max]. int64 min = 1; // A maximum acceptable load. Must be ≥ 0. If unspecified, the maximum // load is unrestricted by this message. - // If they're both specified, [min][google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.min] must be ≤ [max][google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.max]. + // If they're both specified, + // [min][google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.min] must + // be ≤ + // [max][google.cloud.optimization.v1.Vehicle.LoadLimit.Interval.max]. optional int64 max = 2; } // The maximum acceptable amount of load. optional int64 max_load = 1; - // A soft limit of the load. See [cost_per_unit_above_soft_max][google.cloud.optimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. + // A soft limit of the load. See + // [cost_per_unit_above_soft_max][google.cloud.optimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. int64 soft_max_load = 2; - // If the load ever exceeds [soft_max_load][google.cloud.optimization.v1.Vehicle.LoadLimit.soft_max_load] along this vehicle's route, - // the following cost penalty applies (only once per vehicle): - // (load - [soft_max_load][google.cloud.optimization.v1.Vehicle.LoadLimit.soft_max_load]) * [cost_per_unit_above_soft_max][google.cloud.optimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. All costs - // add up and must be in the same unit as [Shipment.penalty_cost][google.cloud.optimization.v1.Shipment.penalty_cost]. + // If the load ever exceeds + // [soft_max_load][google.cloud.optimization.v1.Vehicle.LoadLimit.soft_max_load] + // along this vehicle's route, the following cost penalty applies (only once + // per vehicle): (load - + // [soft_max_load][google.cloud.optimization.v1.Vehicle.LoadLimit.soft_max_load]) + // * [cost_per_unit_above_soft_max][google.cloud.optimization.v1.Vehicle.LoadLimit.cost_per_unit_above_soft_max]. All costs + // add up and must be in the same unit as + // [Shipment.penalty_cost][google.cloud.optimization.v1.Shipment.penalty_cost]. double cost_per_unit_above_soft_max = 3; // The acceptable load interval of the vehicle at the start of the route. @@ -1296,13 +1349,15 @@ message Vehicle { // Cost per traveled hour of the vehicle route. This cost is applied only to // travel time taken by the route (i.e., that reported in - // [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions]), and excludes waiting time and visit time. + // [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions]), + // and excludes waiting time and visit time. double cost_per_traveled_hour = 17; // Cost per kilometer of the vehicle route. This cost is applied to the - // distance reported in the [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions] and does not apply - // to any distance implicitly traveled from the `arrival_location` to the - // `departure_location` of a single `VisitRequest`. + // distance reported in the + // [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions] + // and does not apply to any distance implicitly traveled from the + // `arrival_location` to the `departure_location` of a single `VisitRequest`. double cost_per_kilometer = 18; // Fixed cost applied if this vehicle is used to handle a shipment. @@ -1346,14 +1401,16 @@ message Vehicle { // // If a visit request has multiple types, a duration will be added for each // type in the map. - map extra_visit_duration_for_visit_type = 24; + map extra_visit_duration_for_visit_type = + 24; // Describes the break schedule to be enforced on this vehicle. // If empty, no breaks will be scheduled for this vehicle. BreakRule break_rule = 25; // Specifies a label for this vehicle. This label is reported in the response - // as the `vehicle_label` of the corresponding [ShipmentRoute][google.cloud.optimization.v1.ShipmentRoute]. + // as the `vehicle_label` of the corresponding + // [ShipmentRoute][google.cloud.optimization.v1.ShipmentRoute]. string label = 27; // If true, `used_if_route_is_empty` must be false, and this vehicle will @@ -1383,7 +1440,8 @@ message Vehicle { repeated CapacityQuantity capacities = 13 [deprecated = true]; // Deprecated: Use [Vehicle.LoadLimit.start_load_interval][] instead. - repeated CapacityQuantityInterval start_load_intervals = 14 [deprecated = true]; + repeated CapacityQuantityInterval start_load_intervals = 14 + [deprecated = true]; // Deprecated: Use [Vehicle.LoadLimit.end_load_interval][] instead. repeated CapacityQuantityInterval end_load_intervals = 15 [deprecated = true]; @@ -1401,8 +1459,11 @@ message Vehicle { // event to happen at or before `soft_end_time` by incurring a cost proportional // to how long after `soft_end_time` the event occurs. `start_time`, `end_time`, // `soft_start_time` and `soft_end_time` should be within the global time limits -// (see [ShipmentModel.global_start_time][google.cloud.optimization.v1.ShipmentModel.global_start_time] and -// [ShipmentModel.global_end_time][google.cloud.optimization.v1.ShipmentModel.global_end_time]) and should respect: +// (see +// [ShipmentModel.global_start_time][google.cloud.optimization.v1.ShipmentModel.global_start_time] +// and +// [ShipmentModel.global_end_time][google.cloud.optimization.v1.ShipmentModel.global_end_time]) +// and should respect: // ``` // 0 <= `start_time` <= `soft_start_time` <= `end_time` and // 0 <= `start_time` <= `soft_end_time` <= `end_time`. @@ -1449,7 +1510,8 @@ message TimeWindow { optional double cost_per_hour_after_soft_end_time = 6; } -// Deprecated: Use [Shipment.Load][], [Vehicle.LoadLimit][] and [ShipmentRoute.VehicleLoad][] instead. +// Deprecated: Use [Shipment.Load][], [Vehicle.LoadLimit][] and +// [ShipmentRoute.VehicleLoad][] instead. message CapacityQuantity { option deprecated = true; @@ -1518,8 +1580,9 @@ message TransitionAttributes { // A destination visit or vehicle end matches iff its // [VisitRequest.tags][google.cloud.optimization.v1.Shipment.VisitRequest.tags] - // or [Vehicle.end_tags][google.cloud.optimization.v1.Vehicle.end_tags] either contains `dst_tag` or does not contain - // `excluded_dst_tag` (depending on which of these two fields is non-empty). + // or [Vehicle.end_tags][google.cloud.optimization.v1.Vehicle.end_tags] either + // contains `dst_tag` or does not contain `excluded_dst_tag` (depending on + // which of these two fields is non-empty). string dst_tag = 3; // See `dst_tag`. Exactly one of `dst_tag` and `excluded_dst_tag` must be @@ -1533,7 +1596,8 @@ message TransitionAttributes { // Specifies a cost per kilometer applied to the distance traveled while // performing this transition. It adds up to any - // [Vehicle.cost_per_kilometer][google.cloud.optimization.v1.Vehicle.cost_per_kilometer] specified on vehicles. + // [Vehicle.cost_per_kilometer][google.cloud.optimization.v1.Vehicle.cost_per_kilometer] + // specified on vehicles. double cost_per_kilometer = 6; // Specifies a limit on the distance traveled while performing this @@ -1601,13 +1665,16 @@ message BreakRule { // be compatible with the order (this is checked). message BreakRequest { // Required. Lower bound (inclusive) on the start of the break. - google.protobuf.Timestamp earliest_start_time = 1 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.Timestamp earliest_start_time = 1 + [(google.api.field_behavior) = REQUIRED]; // Required. Upper bound (inclusive) on the start of the break. - google.protobuf.Timestamp latest_start_time = 2 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.Timestamp latest_start_time = 2 + [(google.api.field_behavior) = REQUIRED]; // Required. Minimum duration of the break. Must be positive. - google.protobuf.Duration min_duration = 3 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.Duration min_duration = 3 + [(google.api.field_behavior) = REQUIRED]; } // One may further constrain the frequency and duration of the breaks @@ -1646,12 +1713,14 @@ message BreakRule { message FrequencyConstraint { // Required. Minimum break duration for this constraint. Nonnegative. // See description of `FrequencyConstraint`. - google.protobuf.Duration min_break_duration = 1 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.Duration min_break_duration = 1 + [(google.api.field_behavior) = REQUIRED]; - // Required. Maximum allowed span of any interval of time in the route that does not - // include at least partially a break of `duration >= + // Required. Maximum allowed span of any interval of time in the route that + // does not include at least partially a break of `duration >= // min_break_duration`. Must be positive. - google.protobuf.Duration max_inter_break_duration = 2 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.Duration max_inter_break_duration = 2 + [(google.api.field_behavior) = REQUIRED]; } // Sequence of breaks. See the `BreakRequest` message. @@ -1763,7 +1832,8 @@ message ShipmentRoute { // A visit performed during a route. This visit corresponds to a pickup or a // delivery of a `Shipment`. message Visit { - // Index of the `shipments` field in the source [ShipmentModel][google.cloud.optimization.v1.ShipmentModel]. + // Index of the `shipments` field in the source + // [ShipmentModel][google.cloud.optimization.v1.ShipmentModel]. int32 shipment_index = 1; // If true the visit corresponds to a pickup of a `Shipment`. Otherwise, it @@ -1814,8 +1884,9 @@ message ShipmentRoute { // Deprecated: Use [ShipmentRoute.Transition.loads][] instead. // Vehicle loads upon arrival at the visit location, for each - // type specified in [Vehicle.capacities][google.cloud.optimization.v1.Vehicle.capacities], `start_load_intervals`, - // `end_load_intervals` or `demands`. + // type specified in + // [Vehicle.capacities][google.cloud.optimization.v1.Vehicle.capacities], + // `start_load_intervals`, `end_load_intervals` or `demands`. // // Exception: we omit loads for quantity types unconstrained by intervals // and that don't have any non-zero demand on the route. @@ -1885,8 +1956,11 @@ message ShipmentRoute { EncodedPolyline route_polyline = 9; // Vehicle loads during this transition, for each type that either appears - // in this vehicle's [Vehicle.load_limits][google.cloud.optimization.v1.Vehicle.load_limits], or that have non-zero - // [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands] on some shipment performed on this route. + // in this vehicle's + // [Vehicle.load_limits][google.cloud.optimization.v1.Vehicle.load_limits], + // or that have non-zero + // [Shipment.load_demands][google.cloud.optimization.v1.Shipment.load_demands] + // on some shipment performed on this route. // // The loads during the first transition are the starting loads of the // vehicle route. Then, after each visit, the visit's `load_demands` are @@ -1899,10 +1973,12 @@ message ShipmentRoute { } // Reports the actual load of the vehicle at some point along the route, - // for a given type (see [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads]). + // for a given type (see + // [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads]). message VehicleLoad { // The amount of load on the vehicle, for the given type. The unit of load - // is usually indicated by the type. See [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads]. + // is usually indicated by the type. See + // [Transition.vehicle_loads][google.cloud.optimization.v1.ShipmentRoute.Transition.vehicle_loads]. int64 amount = 1; } @@ -1992,8 +2068,10 @@ message ShipmentRoute { // between visits, before the first visit, or after the last visit, while // still satisfying the visit and vehicle time windows. For example, // - // ```start_time(previous_visit) + duration(previous_visit) + - // travel_duration(previous_visit, next_visit) > start_time(next_visit)``` + // ``` + // start_time(previous_visit) + duration(previous_visit) + + // travel_duration(previous_visit, next_visit) > start_time(next_visit) + // ``` // // Arrival at next_visit will likely happen later than its current // time window due the increased estimate of travel time @@ -2014,8 +2092,12 @@ message ShipmentRoute { repeated Break breaks = 11; // Duration, distance and load metrics for this route. The fields of - // [AggregatedMetrics][google.cloud.optimization.v1.AggregatedMetrics] are summed over all [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions] or - // [ShipmentRoute.visits][google.cloud.optimization.v1.ShipmentRoute.visits], depending on the context. + // [AggregatedMetrics][google.cloud.optimization.v1.AggregatedMetrics] are + // summed over all + // [ShipmentRoute.transitions][google.cloud.optimization.v1.ShipmentRoute.transitions] + // or + // [ShipmentRoute.visits][google.cloud.optimization.v1.ShipmentRoute.visits], + // depending on the context. AggregatedMetrics metrics = 12; // Cost of the route, broken down by cost-related request fields. @@ -2033,7 +2115,8 @@ message ShipmentRoute { // Deprecated: Use [ShipmentRoute.Transition.loads][] instead. // Vehicle loads upon arrival at its end location, for each - // type specified in [Vehicle.capacities][google.cloud.optimization.v1.Vehicle.capacities], + // type specified in + // [Vehicle.capacities][google.cloud.optimization.v1.Vehicle.capacities], // `start_load_intervals`, `end_load_intervals` or demands. Exception: we omit // loads for quantity types unconstrained by intervals and that don't have any // non-zero demand on the route. @@ -2045,8 +2128,8 @@ message ShipmentRoute { // Deprecated: No longer used. // This field will only be populated at the - // [ShipmentRoute.Visit][google.cloud.optimization.v1.ShipmentRoute.Visit] level. - // Extra detour time due to the shipments visited on the route. + // [ShipmentRoute.Visit][google.cloud.optimization.v1.ShipmentRoute.Visit] + // level. Extra detour time due to the shipments visited on the route. // // It is equal to `vehicle_end_time` - `vehicle_start_time` - travel duration // from the vehicle's start_location to its `end_location`. @@ -2151,8 +2234,9 @@ message SkippedShipment { // `ShipmentModel`. int32 index = 1; - // Copy of the corresponding [Shipment.label][google.cloud.optimization.v1.Shipment.label], if specified in the - // `Shipment`. + // Copy of the corresponding + // [Shipment.label][google.cloud.optimization.v1.Shipment.label], if specified + // in the `Shipment`. string label = 2; // A list of reasons that explain why the shipment was skipped. See comment @@ -2160,7 +2244,9 @@ message SkippedShipment { repeated Reason reasons = 3; } -// Aggregated metrics for [ShipmentRoute][google.cloud.optimization.v1.ShipmentRoute] (resp. for [OptimizeToursResponse][google.cloud.optimization.v1.OptimizeToursResponse] +// Aggregated metrics for +// [ShipmentRoute][google.cloud.optimization.v1.ShipmentRoute] (resp. for +// [OptimizeToursResponse][google.cloud.optimization.v1.OptimizeToursResponse] // over all [Transition][google.cloud.optimization.v1.ShipmentRoute.Transition] // and/or [Visit][google.cloud.optimization.v1.ShipmentRoute.Visit] (resp. over // all [ShipmentRoute][google.cloud.optimization.v1.ShipmentRoute]) elements. @@ -2185,7 +2271,9 @@ message AggregatedMetrics { google.protobuf.Duration visit_duration = 6; // The total duration should be equal to the sum of all durations above. - // For routes, it also corresponds to [ShipmentRoute.vehicle_end_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_end_time] - + // For routes, it also corresponds to + // [ShipmentRoute.vehicle_end_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_end_time] + // - // [ShipmentRoute.vehicle_start_time][google.cloud.optimization.v1.ShipmentRoute.vehicle_start_time]. google.protobuf.Duration total_duration = 7; @@ -2200,10 +2288,12 @@ message AggregatedMetrics { // [ShipmentRoute.metrics.max_loads][google.cloud.optimization.v1.AggregatedMetrics.max_loads]. map max_loads = 9; - // Deprecated: Use [ShipmentRoute.route_costs][] and [OptimizeToursResponse.Metrics.costs][] instead. + // Deprecated: Use [ShipmentRoute.route_costs][] and + // [OptimizeToursResponse.Metrics.costs][] instead. map costs = 10 [deprecated = true]; - // Deprecated: Use [ShipmentRoute.route_total_cost][] and [OptimizeToursResponse.Metrics.total_cost][] instead. + // Deprecated: Use [ShipmentRoute.route_total_cost][] and + // [OptimizeToursResponse.Metrics.total_cost][] instead. double total_cost = 11 [deprecated = true]; } @@ -2309,8 +2399,9 @@ message InjectedSolutionConstraint { // `vehicle_indices`. A vehicle index can only be listed once, even within // several `constraint_relaxations`. // - // A vehicle index is mapped the same as [ShipmentRoute.vehicle_index][google.cloud.optimization.v1.ShipmentRoute.vehicle_index], if - // `interpret_injected_solutions_using_labels` is true (see `fields` + // A vehicle index is mapped the same as + // [ShipmentRoute.vehicle_index][google.cloud.optimization.v1.ShipmentRoute.vehicle_index], + // if `interpret_injected_solutions_using_labels` is true (see `fields` // comment). repeated int32 vehicle_indices = 2; } diff --git a/packages/google-cloud-optimization/samples/generated/v1/fleet_routing.batch_optimize_tours.js b/packages/google-cloud-optimization/samples/generated/v1/fleet_routing.batch_optimize_tours.js index 221de63fb1d..34307eed588 100644 --- a/packages/google-cloud-optimization/samples/generated/v1/fleet_routing.batch_optimize_tours.js +++ b/packages/google-cloud-optimization/samples/generated/v1/fleet_routing.batch_optimize_tours.js @@ -35,8 +35,8 @@ function main(parent, modelConfigs) { */ // const parent = 'abc123' /** - * Required. Input/Output information each purchase model, such as file paths and data - * formats. + * Required. Input/Output information each purchase model, such as file paths + * and data formats. */ // const modelConfigs = 1234 diff --git a/packages/google-cloud-optimization/samples/generated/v1/fleet_routing.optimize_tours.js b/packages/google-cloud-optimization/samples/generated/v1/fleet_routing.optimize_tours.js index b6471aac784..440600b7cd4 100644 --- a/packages/google-cloud-optimization/samples/generated/v1/fleet_routing.optimize_tours.js +++ b/packages/google-cloud-optimization/samples/generated/v1/fleet_routing.optimize_tours.js @@ -83,8 +83,9 @@ function main(parent) { * <= visits0.start_time <= visits1.start_time ... * <= vehicle_end_time`). * * a shipment may only be performed on a vehicle that is allowed. A - * vehicle is allowed if Shipment.allowed_vehicle_indices google.cloud.optimization.v1.Shipment.allowed_vehicle_indices is empty or - * its `vehicle_index` is included in + * vehicle is allowed if + * Shipment.allowed_vehicle_indices google.cloud.optimization.v1.Shipment.allowed_vehicle_indices + * is empty or its `vehicle_index` is included in * Shipment.allowed_vehicle_indices google.cloud.optimization.v1.Shipment.allowed_vehicle_indices. * If the injected solution is not feasible, a validation error is not * necessarily returned and an error indicating infeasibility may be returned @@ -118,16 +119,27 @@ function main(parent) { // const refreshDetailsRoutes = 1234 /** * If true: - * * uses ShipmentRoute.vehicle_label google.cloud.optimization.v1.ShipmentRoute.vehicle_label instead of `vehicle_index` to + * * uses + * ShipmentRoute.vehicle_label google.cloud.optimization.v1.ShipmentRoute.vehicle_label + * instead of `vehicle_index` to * match routes in an injected solution with vehicles in the request; - * reuses the mapping of original ShipmentRoute.vehicle_index google.cloud.optimization.v1.ShipmentRoute.vehicle_index to new - * ShipmentRoute.vehicle_index google.cloud.optimization.v1.ShipmentRoute.vehicle_index to update + * reuses the mapping of original + * ShipmentRoute.vehicle_index google.cloud.optimization.v1.ShipmentRoute.vehicle_index + * to new + * ShipmentRoute.vehicle_index google.cloud.optimization.v1.ShipmentRoute.vehicle_index + * to update * ConstraintRelaxation.vehicle_indices google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.vehicle_indices * if non-empty, but the mapping must be unambiguous (i.e., multiple * `ShipmentRoute`s must not share the same original `vehicle_index`). - * * uses ShipmentRoute.Visit.shipment_label google.cloud.optimization.v1.ShipmentRoute.Visit.shipment_label instead of `shipment_index` + * * uses + * ShipmentRoute.Visit.shipment_label google.cloud.optimization.v1.ShipmentRoute.Visit.shipment_label + * instead of `shipment_index` * to match visits in an injected solution with shipments in the request; - * * uses SkippedShipment.label google.cloud.optimization.v1.SkippedShipment.label instead of SkippedShipment.index google.cloud.optimization.v1.SkippedShipment.index to + * * uses + * SkippedShipment.label google.cloud.optimization.v1.SkippedShipment.label + * instead of + * SkippedShipment.index google.cloud.optimization.v1.SkippedShipment.index + * to * match skipped shipments in the injected solution with request * shipments. * This interpretation applies to the `injected_first_solution_routes`, @@ -137,8 +149,10 @@ function main(parent) { * vehicles have been removed from or added to the request. * If true, labels in the following categories must appear at most once in * their category: - * * Vehicle.label google.cloud.optimization.v1.Vehicle.label in the request; - * * Shipment.label google.cloud.optimization.v1.Shipment.label in the request; + * * Vehicle.label google.cloud.optimization.v1.Vehicle.label in the + * request; + * * Shipment.label google.cloud.optimization.v1.Shipment.label in the + * request; * * ShipmentRoute.vehicle_label google.cloud.optimization.v1.ShipmentRoute.vehicle_label in the injected solution; * * SkippedShipment.label google.cloud.optimization.v1.SkippedShipment.label and ShipmentRoute.Visit.shipment_label google.cloud.optimization.v1.ShipmentRoute.Visit.shipment_label in * the injected solution (except pickup/delivery visit pairs, whose @@ -147,18 +161,21 @@ function main(parent) { * request vehicle, the corresponding route is removed from the solution * along with its visits. If a `shipment_label` in the injected solution does * not correspond to a request shipment, the corresponding visit is removed - * from the solution. If a SkippedShipment.label google.cloud.optimization.v1.SkippedShipment.label in the injected solution - * does not correspond to a request shipment, the `SkippedShipment` is removed - * from the solution. + * from the solution. If a + * SkippedShipment.label google.cloud.optimization.v1.SkippedShipment.label + * in the injected solution does not correspond to a request shipment, the + * `SkippedShipment` is removed from the solution. * Removing route visits or entire routes from an injected solution may * have an effect on the implied constraints, which may lead to change in * solution, validation errors, or infeasibility. - * NOTE: The caller must ensure that each Vehicle.label google.cloud.optimization.v1.Vehicle.label - * (resp. Shipment.label google.cloud.optimization.v1.Shipment.label) uniquely identifies a vehicle (resp. shipment) - * entity used across the two relevant requests: the past request that - * produced the `OptimizeToursResponse` used in the injected solution and the - * current request that includes the injected solution. The uniqueness checks - * described above are not enough to guarantee this requirement. + * NOTE: The caller must ensure that each + * Vehicle.label google.cloud.optimization.v1.Vehicle.label (resp. + * Shipment.label google.cloud.optimization.v1.Shipment.label) uniquely + * identifies a vehicle (resp. shipment) entity used across the two relevant + * requests: the past request that produced the `OptimizeToursResponse` used + * in the injected solution and the current request that includes the injected + * solution. The uniqueness checks described above are not enough to guarantee + * this requirement. */ // const interpretInjectedSolutionsUsingLabels = true /** @@ -166,8 +183,10 @@ function main(parent) { * Transition.travel_duration google.cloud.optimization.v1.ShipmentRoute.Transition.travel_duration, * Visit.start_time google.cloud.optimization.v1.ShipmentRoute.Visit.start_time, * and `vehicle_end_time`; in setting the - * ShipmentRoute.has_traffic_infeasibilities google.cloud.optimization.v1.ShipmentRoute.has_traffic_infeasibilities field, and in calculating the - * OptimizeToursResponse.total_cost google.cloud.optimization.v1.OptimizeToursResponse.total_cost field. + * ShipmentRoute.has_traffic_infeasibilities google.cloud.optimization.v1.ShipmentRoute.has_traffic_infeasibilities + * field, and in calculating the + * OptimizeToursResponse.total_cost google.cloud.optimization.v1.OptimizeToursResponse.total_cost + * field. */ // const considerRoadTraffic = true /** diff --git a/packages/google-cloud-optimization/samples/generated/v1/snippet_metadata.google.cloud.optimization.v1.json b/packages/google-cloud-optimization/samples/generated/v1/snippet_metadata.google.cloud.optimization.v1.json index 227018b9bf7..9f48711ae5e 100644 --- a/packages/google-cloud-optimization/samples/generated/v1/snippet_metadata.google.cloud.optimization.v1.json +++ b/packages/google-cloud-optimization/samples/generated/v1/snippet_metadata.google.cloud.optimization.v1.json @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 227, + "end": 246, "type": "FULL" } ], diff --git a/packages/google-cloud-optimization/src/v1/fleet_routing_client.ts b/packages/google-cloud-optimization/src/v1/fleet_routing_client.ts index 868a72d7547..ac1c835d274 100644 --- a/packages/google-cloud-optimization/src/v1/fleet_routing_client.ts +++ b/packages/google-cloud-optimization/src/v1/fleet_routing_client.ts @@ -424,8 +424,9 @@ export class FleetRoutingClient { * <= visits[0].start_time <= visits[1].start_time ... * <= vehicle_end_time`). * * a shipment may only be performed on a vehicle that is allowed. A - * vehicle is allowed if {@link google.cloud.optimization.v1.Shipment.allowed_vehicle_indices|Shipment.allowed_vehicle_indices} is empty or - * its `vehicle_index` is included in + * vehicle is allowed if + * {@link google.cloud.optimization.v1.Shipment.allowed_vehicle_indices|Shipment.allowed_vehicle_indices} + * is empty or its `vehicle_index` is included in * {@link google.cloud.optimization.v1.Shipment.allowed_vehicle_indices|Shipment.allowed_vehicle_indices}. * * If the injected solution is not feasible, a validation error is not @@ -460,16 +461,27 @@ export class FleetRoutingClient { * @param {boolean} request.interpretInjectedSolutionsUsingLabels * If true: * - * * uses {@link google.cloud.optimization.v1.ShipmentRoute.vehicle_label|ShipmentRoute.vehicle_label} instead of `vehicle_index` to + * * uses + * {@link google.cloud.optimization.v1.ShipmentRoute.vehicle_label|ShipmentRoute.vehicle_label} + * instead of `vehicle_index` to * match routes in an injected solution with vehicles in the request; - * reuses the mapping of original {@link google.cloud.optimization.v1.ShipmentRoute.vehicle_index|ShipmentRoute.vehicle_index} to new - * {@link google.cloud.optimization.v1.ShipmentRoute.vehicle_index|ShipmentRoute.vehicle_index} to update + * reuses the mapping of original + * {@link google.cloud.optimization.v1.ShipmentRoute.vehicle_index|ShipmentRoute.vehicle_index} + * to new + * {@link google.cloud.optimization.v1.ShipmentRoute.vehicle_index|ShipmentRoute.vehicle_index} + * to update * {@link google.cloud.optimization.v1.InjectedSolutionConstraint.ConstraintRelaxation.vehicle_indices|ConstraintRelaxation.vehicle_indices} * if non-empty, but the mapping must be unambiguous (i.e., multiple * `ShipmentRoute`s must not share the same original `vehicle_index`). - * * uses {@link google.cloud.optimization.v1.ShipmentRoute.Visit.shipment_label|ShipmentRoute.Visit.shipment_label} instead of `shipment_index` + * * uses + * {@link google.cloud.optimization.v1.ShipmentRoute.Visit.shipment_label|ShipmentRoute.Visit.shipment_label} + * instead of `shipment_index` * to match visits in an injected solution with shipments in the request; - * * uses {@link google.cloud.optimization.v1.SkippedShipment.label|SkippedShipment.label} instead of {@link google.cloud.optimization.v1.SkippedShipment.index|SkippedShipment.index} to + * * uses + * {@link google.cloud.optimization.v1.SkippedShipment.label|SkippedShipment.label} + * instead of + * {@link google.cloud.optimization.v1.SkippedShipment.index|SkippedShipment.index} + * to * match skipped shipments in the injected solution with request * shipments. * @@ -482,8 +494,10 @@ export class FleetRoutingClient { * If true, labels in the following categories must appear at most once in * their category: * - * * {@link google.cloud.optimization.v1.Vehicle.label|Vehicle.label} in the request; - * * {@link google.cloud.optimization.v1.Shipment.label|Shipment.label} in the request; + * * {@link google.cloud.optimization.v1.Vehicle.label|Vehicle.label} in the + * request; + * * {@link google.cloud.optimization.v1.Shipment.label|Shipment.label} in the + * request; * * {@link google.cloud.optimization.v1.ShipmentRoute.vehicle_label|ShipmentRoute.vehicle_label} in the injected solution; * * {@link google.cloud.optimization.v1.SkippedShipment.label|SkippedShipment.label} and {@link google.cloud.optimization.v1.ShipmentRoute.Visit.shipment_label|ShipmentRoute.Visit.shipment_label} in * the injected solution (except pickup/delivery visit pairs, whose @@ -493,27 +507,32 @@ export class FleetRoutingClient { * request vehicle, the corresponding route is removed from the solution * along with its visits. If a `shipment_label` in the injected solution does * not correspond to a request shipment, the corresponding visit is removed - * from the solution. If a {@link google.cloud.optimization.v1.SkippedShipment.label|SkippedShipment.label} in the injected solution - * does not correspond to a request shipment, the `SkippedShipment` is removed - * from the solution. + * from the solution. If a + * {@link google.cloud.optimization.v1.SkippedShipment.label|SkippedShipment.label} + * in the injected solution does not correspond to a request shipment, the + * `SkippedShipment` is removed from the solution. * * Removing route visits or entire routes from an injected solution may * have an effect on the implied constraints, which may lead to change in * solution, validation errors, or infeasibility. * - * NOTE: The caller must ensure that each {@link google.cloud.optimization.v1.Vehicle.label|Vehicle.label} - * (resp. {@link google.cloud.optimization.v1.Shipment.label|Shipment.label}) uniquely identifies a vehicle (resp. shipment) - * entity used across the two relevant requests: the past request that - * produced the `OptimizeToursResponse` used in the injected solution and the - * current request that includes the injected solution. The uniqueness checks - * described above are not enough to guarantee this requirement. + * NOTE: The caller must ensure that each + * {@link google.cloud.optimization.v1.Vehicle.label|Vehicle.label} (resp. + * {@link google.cloud.optimization.v1.Shipment.label|Shipment.label}) uniquely + * identifies a vehicle (resp. shipment) entity used across the two relevant + * requests: the past request that produced the `OptimizeToursResponse` used + * in the injected solution and the current request that includes the injected + * solution. The uniqueness checks described above are not enough to guarantee + * this requirement. * @param {boolean} request.considerRoadTraffic * Consider traffic estimation in calculating `ShipmentRoute` fields * {@link google.cloud.optimization.v1.ShipmentRoute.Transition.travel_duration|Transition.travel_duration}, * {@link google.cloud.optimization.v1.ShipmentRoute.Visit.start_time|Visit.start_time}, * and `vehicle_end_time`; in setting the - * {@link google.cloud.optimization.v1.ShipmentRoute.has_traffic_infeasibilities|ShipmentRoute.has_traffic_infeasibilities} field, and in calculating the - * {@link google.cloud.optimization.v1.OptimizeToursResponse.total_cost|OptimizeToursResponse.total_cost} field. + * {@link google.cloud.optimization.v1.ShipmentRoute.has_traffic_infeasibilities|ShipmentRoute.has_traffic_infeasibilities} + * field, and in calculating the + * {@link google.cloud.optimization.v1.OptimizeToursResponse.total_cost|OptimizeToursResponse.total_cost} + * field. * @param {boolean} request.populatePolylines * If true, polylines will be populated in response `ShipmentRoute`s. * @param {boolean} request.populateTransitionPolylines @@ -539,10 +558,11 @@ export class FleetRoutingClient { * Label that may be used to identify this request, reported back in the * {@link google.cloud.optimization.v1.OptimizeToursResponse.request_label|OptimizeToursResponse.request_label}. * @param {boolean} request.populateTravelStepPolylines - * Deprecated: Use {@link |OptimizeToursRequest.populate_transition_polylines} instead. - * If true, polylines will be populated in response - * {@link google.cloud.optimization.v1.ShipmentRoute.transitions|ShipmentRoute.transitions}. Note that in this case, the polylines will - * also be populated in the deprecated `travel_steps`. + * Deprecated: Use {@link |OptimizeToursRequest.populate_transition_polylines} + * instead. If true, polylines will be populated in response + * {@link google.cloud.optimization.v1.ShipmentRoute.transitions|ShipmentRoute.transitions}. + * Note that in this case, the polylines will also be populated in the + * deprecated `travel_steps`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -649,8 +669,8 @@ export class FleetRoutingClient { * * If no location is specified, a region will be chosen automatically. * @param {number[]} request.modelConfigs - * Required. Input/Output information each purchase model, such as file paths and data - * formats. + * Required. Input/Output information each purchase model, such as file paths + * and data formats. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array.