NAME
Google::Cloud::Optimization::V1::FleetRoutingClient - Client library for Google Cloud Services
SYNOPSIS
use Google::Cloud::Optimization::V1::FleetRoutingClient;
use Google::Auth;
my $auth = Google::Auth->default();
# 1. High-performance gRPC Transport (Default)
my $grpc_client = Google::Cloud::Optimization::V1::FleetRoutingClient->new(
credentials => $auth,
transport => 'grpc', # Optional: 'grpc' is default
);
# 2. HTTP/REST Transport
my $rest_client = Google::Cloud::Optimization::V1::FleetRoutingClient->new(
credentials => $auth,
transport => 'rest',
);
# Execute service methods
my $res = $grpc_client->some_method( %params );
DESCRIPTION
Google::Cloud::Optimization::V1::FleetRoutingClient is an auto-generated client library for Google Cloud Services.
It provides a unified client interface supporting both high-performance HTTP/2 gRPC and HTTP/REST transports, with automatic Google Cloud Application Default Credentials (ADC) resolution and typed Protocol Buffers message handling.
SOURCE
Generated from the following Protocol Buffers schemas:
googleapis/google/cloud/optimization/v1/async_model.protogoogleapis/google/cloud/optimization/v1/fleet_routing.proto
CONSTRUCTOR
new
my $client = Google::Cloud::Optimization::V1::FleetRoutingClient->new(
credentials => $auth, # Optional: Google::Auth object (defaults to ADC)
transport => 'grpc', # Optional: 'grpc' (default) or 'rest'
);
ATTRIBUTES
credentials
Returns or accepts the Google::Auth credentials object.
transport
Returns or accepts the active transport object (Google::gRPC::Client or Google::Cloud::REST::Client).
METHODS
METHODS
The following RPC methods are available in this client:
optimize_tours
my $response = $client->optimize_tours( parent => $parent, timeout => $timeout, model => $model, solving_mode => $solving_mode, search_mode => $search_mode, injected_first_solution_routes => [ ... ], injected_solution_constraint => $injected_solution_constraint, refresh_details_routes => [ ... ], interpret_injected_solutions_using_labels => $interpret_injected_solutions_using_labels, consider_road_traffic => $consider_road_traffic, populate_polylines => $populate_polylines, populate_transition_polylines => $populate_transition_polylines, allow_large_deadline_despite_interruption_risk => $allow_large_deadline_despite_interruption_risk, use_geodesic_distances => $use_geodesic_distances, geodesic_meters_per_second => $geodesic_meters_per_second, max_validation_errors => $max_validation_errors, label => $label, populate_travel_step_polylines => $populate_travel_step_polylines, );Calls the RPC method
OptimizeToursongoogle.cloud.optimization.v1.FleetRouting.Request: Google::Cloud::Optimization::V1::FleetRouting::OptimizeToursRequest
Returns: Google::Cloud::Optimization::V1::FleetRouting::OptimizeToursResponse
Parameters:
parent-stringtimeout- Google::Protobuf::Duration::Durationmodel- Google::Cloud::Optimization::V1::FleetRouting::ShipmentModelsolving_mode- Google::Cloud::Optimization::V1::FleetRouting::SolvingModesearch_mode- Google::Cloud::Optimization::V1::FleetRouting::SearchModeinjected_first_solution_routes- ArrayRef of Google::Cloud::Optimization::V1::FleetRouting::ShipmentRouteinjected_solution_constraint- Google::Cloud::Optimization::V1::FleetRouting::InjectedSolutionConstraintrefresh_details_routes- ArrayRef of Google::Cloud::Optimization::V1::FleetRouting::ShipmentRouteinterpret_injected_solutions_using_labels-boolconsider_road_traffic-boolpopulate_polylines-boolpopulate_transition_polylines-boolallow_large_deadline_despite_interruption_risk-booluse_geodesic_distances-boolgeodesic_meters_per_second-doublemax_validation_errors-int32label-stringpopulate_travel_step_polylines-bool
LICENSE AND COPYRIGHT
Copyright (C) 2026 Google LLC
This program is released under the Apache 2.0 license.