As of January 1, 2020 this library no longer supports Python 2 on the latest released version. Library versions released prior to that date will continue to be available. For more information please visit Python 2 support on Google Cloud.

DeliveryService

class google.maps.fleetengine_delivery_v1.services.delivery_service.DeliveryServiceAsyncClient(*, credentials: typing.Optional[google.auth.credentials.Credentials] = None, transport: typing.Optional[typing.Union[str, google.maps.fleetengine_delivery_v1.services.delivery_service.transports.base.DeliveryServiceTransport, typing.Callable[[...], google.maps.fleetengine_delivery_v1.services.delivery_service.transports.base.DeliveryServiceTransport]]] = 'grpc_asyncio', client_options: typing.Optional[google.api_core.client_options.ClientOptions] = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)[source]

The Last Mile Delivery service.

Instantiates the delivery service async client.

Parameters
  • credentials (Optional[google.auth.credentials.Credentials]) – The authorization credentials to attach to requests. These credentials identify the application to the service; if none are specified, the client will attempt to ascertain the credentials from the environment.

  • transport (Optional[Union[str,DeliveryServiceTransport,Callable[..., DeliveryServiceTransport]]]) – The transport to use, or a Callable that constructs and returns a new transport to use. If a Callable is given, it will be called with the same set of initialization arguments as used in the DeliveryServiceTransport constructor. If set to None, a transport is chosen automatically.

  • client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]) –

    Custom options for the client.

    1. The api_endpoint property can be used to override the default endpoint provided by the client when transport is not explicitly provided. Only if this property is not set and transport was not explicitly provided, the endpoint is determined by the GOOGLE_API_USE_MTLS_ENDPOINT environment variable, which have one of the following values: “always” (always use the default mTLS endpoint), “never” (always use the default regular endpoint) and “auto” (auto-switch to the default mTLS endpoint if client certificate is present; this is the default value).

    2. If the GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is “true”, then the client_cert_source property can be used to provide a client certificate for mTLS transport. If not provided, the default SSL client certificate will be used if present. If GOOGLE_API_USE_CLIENT_CERTIFICATE is “false” or not set, no client certificate will be used.

    3. The universe_domain property can be used to override the default “googleapis.com” universe. Note that api_endpoint property still takes precedence; and universe_domain is currently not supported for mTLS.

  • client_info (google.api_core.gapic_v1.client_info.ClientInfo) – The client info used to send a user-agent string along with API requests. If None, then default info will be used. Generally, you only need to set this if you’re developing your own client library.

Raises

google.auth.exceptions.MutualTlsChannelError – If mutual TLS transport creation failed for any reason.

property api_endpoint

Return the API endpoint used by the client instance.

Returns

The API endpoint used by the client instance.

Return type

str

async batch_create_tasks(request: Optional[Union[google.maps.fleetengine_delivery_v1.types.delivery_api.BatchCreateTasksRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.maps.fleetengine_delivery_v1.types.delivery_api.BatchCreateTasksResponse[source]

Creates and returns a batch of new Task objects.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.maps import fleetengine_delivery_v1

async def sample_batch_create_tasks():
    # Create a client
    client = fleetengine_delivery_v1.DeliveryServiceAsyncClient()

    # Initialize request argument(s)
    requests = fleetengine_delivery_v1.CreateTaskRequest()
    requests.parent = "parent_value"
    requests.task_id = "task_id_value"
    requests.task.type_ = "UNAVAILABLE"
    requests.task.state = "CLOSED"

    request = fleetengine_delivery_v1.BatchCreateTasksRequest(
        parent="parent_value",
        requests=requests,
    )

    # Make the request
    response = await client.batch_create_tasks(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.maps.fleetengine_delivery_v1.types.BatchCreateTasksRequest, dict]]) – The request object. The BatchCreateTask request message.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns

The BatchCreateTask response message.

Return type

google.maps.fleetengine_delivery_v1.types.BatchCreateTasksResponse

static common_billing_account_path(billing_account: str) str

Returns a fully-qualified billing_account string.

static common_folder_path(folder: str) str

Returns a fully-qualified folder string.

static common_location_path(project: str, location: str) str

Returns a fully-qualified location string.

static common_organization_path(organization: str) str

Returns a fully-qualified organization string.

static common_project_path(project: str) str

Returns a fully-qualified project string.

async create_delivery_vehicle(request: Optional[Union[google.maps.fleetengine_delivery_v1.types.delivery_api.CreateDeliveryVehicleRequest, dict]] = None, *, parent: Optional[str] = None, delivery_vehicle: Optional[google.maps.fleetengine_delivery_v1.types.delivery_vehicles.DeliveryVehicle] = None, delivery_vehicle_id: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.maps.fleetengine_delivery_v1.types.delivery_vehicles.DeliveryVehicle[source]

Creates and returns a new DeliveryVehicle.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.maps import fleetengine_delivery_v1

async def sample_create_delivery_vehicle():
    # Create a client
    client = fleetengine_delivery_v1.DeliveryServiceAsyncClient()

    # Initialize request argument(s)
    request = fleetengine_delivery_v1.CreateDeliveryVehicleRequest(
        parent="parent_value",
        delivery_vehicle_id="delivery_vehicle_id_value",
    )

    # Make the request
    response = await client.create_delivery_vehicle(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.maps.fleetengine_delivery_v1.types.CreateDeliveryVehicleRequest, dict]]) – The request object. The CreateDeliveryVehicle request message.

  • parent (str) –

    Required. Must be in the format providers/{provider}. The provider must be the Google Cloud Project ID. For example, sample-cloud-project.

    This corresponds to the parent field on the request instance; if request is provided, this should not be set.

  • delivery_vehicle (google.maps.fleetengine_delivery_v1.types.DeliveryVehicle) –

    Required. The DeliveryVehicle entity to create. When creating a new delivery vehicle, you may set the following optional fields:

    • type

    • last_location

    • attributes

    Note: The DeliveryVehicle’s name field is ignored. All other DeliveryVehicle fields must not be set; otherwise, an error is returned.

    This corresponds to the delivery_vehicle field on the request instance; if request is provided, this should not be set.

  • delivery_vehicle_id (str) –

    Required. The Delivery Vehicle ID must be unique and subject to the following restrictions:

    • Must be a valid Unicode string.

    • Limited to a maximum length of 64 characters.

    • Normalized according to [Unicode Normalization Form C] (http://www.unicode.org/reports/tr15/).

    • May not contain any of the following ASCII characters: ‘/’, ‘:’, ‘?’, ‘,’, or ‘#’.

    This corresponds to the delivery_vehicle_id field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns

The DeliveryVehicle message. A delivery vehicle transports shipments from a

depot to a delivery location, and from a pickup location to the depot. In some cases, delivery vehicles also transport shipments directly from the pickup location to the delivery location.

Note: gRPC and REST APIs use different field naming conventions. For example, the DeliveryVehicle.current_route_segment field in the gRPC API and the DeliveryVehicle.currentRouteSegment field in the REST API refer to the same field.

Return type

google.maps.fleetengine_delivery_v1.types.DeliveryVehicle

async create_task(request: Optional[Union[google.maps.fleetengine_delivery_v1.types.delivery_api.CreateTaskRequest, dict]] = None, *, parent: Optional[str] = None, task: Optional[google.maps.fleetengine_delivery_v1.types.tasks.Task] = None, task_id: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.maps.fleetengine_delivery_v1.types.tasks.Task[source]

Creates and returns a new Task object.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.maps import fleetengine_delivery_v1

async def sample_create_task():
    # Create a client
    client = fleetengine_delivery_v1.DeliveryServiceAsyncClient()

    # Initialize request argument(s)
    task = fleetengine_delivery_v1.Task()
    task.type_ = "UNAVAILABLE"
    task.state = "CLOSED"

    request = fleetengine_delivery_v1.CreateTaskRequest(
        parent="parent_value",
        task_id="task_id_value",
        task=task,
    )

    # Make the request
    response = await client.create_task(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.maps.fleetengine_delivery_v1.types.CreateTaskRequest, dict]]) – The request object. The CreateTask request message.

  • parent (str) –

    Required. Must be in the format providers/{provider}. The provider must be the Google Cloud Project ID. For example, sample-cloud-project.

    This corresponds to the parent field on the request instance; if request is provided, this should not be set.

  • task (google.maps.fleetengine_delivery_v1.types.Task) –

    Required. The Task entity to create. When creating a Task, the following fields are required:

    • type

    • state (must be set to OPEN)

    • tracking_id (must not be set for UNAVAILABLE or SCHEDULED_STOP tasks, but required for all other task types)

    • planned_location (optional for UNAVAILABLE tasks)

    • task_duration

    Note: The Task’s name field is ignored. All other Task fields must not be set; otherwise, an error is returned.

    This corresponds to the task field on the request instance; if request is provided, this should not be set.

  • task_id (str) –

    Required. The Task ID must be unique, but it should be not a shipment tracking ID. To store a shipment tracking ID, use the tracking_id field. Note that multiple tasks can have the same tracking_id. Task IDs are subject to the following restrictions:

    • Must be a valid Unicode string.

    • Limited to a maximum length of 64 characters.

    • Normalized according to [Unicode Normalization Form C] (http://www.unicode.org/reports/tr15/).

    • May not contain any of the following ASCII characters: ‘/’, ‘:’, ‘?’, ‘,’, or ‘#’.

    This corresponds to the task_id field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns

A Task in the Delivery API represents a single action to track. In general,

there is a distinction between shipment-related Tasks and break Tasks. A shipment can have multiple Tasks associated with it. For example, there could be one Task for the pickup, and one for the drop-off or transfer. Also, different Tasks for a given shipment can be handled by different vehicles. For example, one vehicle could handle the pickup, driving the shipment to the hub, while another vehicle drives the same shipment from the hub to the drop-off location.

Note: gRPC and REST APIs use different field naming conventions. For example, the Task.journey_sharing_info field in the gRPC API and the Task.journeySharingInfo field in the REST API refer to the same field.

Return type

google.maps.fleetengine_delivery_v1.types.Task

static delivery_vehicle_path(provider: str, vehicle: str) str

Returns a fully-qualified delivery_vehicle string.

classmethod from_service_account_file(filename: str, *args, **kwargs)[source]
Creates an instance of this client using the provided credentials

file.

Parameters
  • filename (str) – The path to the service account private key json file.

  • args – Additional arguments to pass to the constructor.

  • kwargs – Additional arguments to pass to the constructor.

Returns

The constructed client.

Return type

DeliveryServiceAsyncClient

classmethod from_service_account_info(info: dict, *args, **kwargs)[source]
Creates an instance of this client using the provided credentials

info.

Parameters
  • info (dict) – The service account private key info.

  • args – Additional arguments to pass to the constructor.

  • kwargs – Additional arguments to pass to the constructor.

Returns

The constructed client.

Return type

DeliveryServiceAsyncClient

classmethod from_service_account_json(filename: str, *args, **kwargs)
Creates an instance of this client using the provided credentials

file.

Parameters
  • filename (str) – The path to the service account private key json file.

  • args – Additional arguments to pass to the constructor.

  • kwargs – Additional arguments to pass to the constructor.

Returns

The constructed client.

Return type

DeliveryServiceAsyncClient

async get_delivery_vehicle(request: Optional[Union[google.maps.fleetengine_delivery_v1.types.delivery_api.GetDeliveryVehicleRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.maps.fleetengine_delivery_v1.types.delivery_vehicles.DeliveryVehicle[source]

Returns the specified DeliveryVehicle instance.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.maps import fleetengine_delivery_v1

async def sample_get_delivery_vehicle():
    # Create a client
    client = fleetengine_delivery_v1.DeliveryServiceAsyncClient()

    # Initialize request argument(s)
    request = fleetengine_delivery_v1.GetDeliveryVehicleRequest(
        name="name_value",
    )

    # Make the request
    response = await client.get_delivery_vehicle(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.maps.fleetengine_delivery_v1.types.GetDeliveryVehicleRequest, dict]]) – The request object. The GetDeliveryVehicle request message.

  • name (str) –

    Required. Must be in the format providers/{provider}/deliveryVehicles/{delivery_vehicle}. The provider must be the Google Cloud Project ID. For example, sample-cloud-project.

    This corresponds to the name field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns

The DeliveryVehicle message. A delivery vehicle transports shipments from a

depot to a delivery location, and from a pickup location to the depot. In some cases, delivery vehicles also transport shipments directly from the pickup location to the delivery location.

Note: gRPC and REST APIs use different field naming conventions. For example, the DeliveryVehicle.current_route_segment field in the gRPC API and the DeliveryVehicle.currentRouteSegment field in the REST API refer to the same field.

Return type

google.maps.fleetengine_delivery_v1.types.DeliveryVehicle

classmethod get_mtls_endpoint_and_cert_source(client_options: Optional[google.api_core.client_options.ClientOptions] = None)[source]

Return the API endpoint and client cert source for mutual TLS.

The client cert source is determined in the following order: (1) if GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is not “true”, the client cert source is None. (2) if client_options.client_cert_source is provided, use the provided one; if the default client cert source exists, use the default one; otherwise the client cert source is None.

The API endpoint is determined in the following order: (1) if client_options.api_endpoint if provided, use the provided one. (2) if GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is “always”, use the default mTLS endpoint; if the environment variable is “never”, use the default API endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise use the default API endpoint.

More details can be found at https://google.aip.dev/auth/4114.

Parameters

client_options (google.api_core.client_options.ClientOptions) – Custom options for the client. Only the api_endpoint and client_cert_source properties may be used in this method.

Returns

returns the API endpoint and the

client cert source to use.

Return type

Tuple[str, Callable[[], Tuple[bytes, bytes]]]

Raises

google.auth.exceptions.MutualTLSChannelError – If any errors happen.

async get_task(request: Optional[Union[google.maps.fleetengine_delivery_v1.types.delivery_api.GetTaskRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.maps.fleetengine_delivery_v1.types.tasks.Task[source]

Gets information about a Task.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.maps import fleetengine_delivery_v1

async def sample_get_task():
    # Create a client
    client = fleetengine_delivery_v1.DeliveryServiceAsyncClient()

    # Initialize request argument(s)
    request = fleetengine_delivery_v1.GetTaskRequest(
        name="name_value",
    )

    # Make the request
    response = await client.get_task(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.maps.fleetengine_delivery_v1.types.GetTaskRequest, dict]]) – The request object. The GetTask request message.

  • name (str) –

    Required. Must be in the format providers/{provider}/tasks/{task}. The provider must be the Google Cloud Project ID. For example, sample-cloud-project.

    This corresponds to the name field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns

A Task in the Delivery API represents a single action to track. In general,

there is a distinction between shipment-related Tasks and break Tasks. A shipment can have multiple Tasks associated with it. For example, there could be one Task for the pickup, and one for the drop-off or transfer. Also, different Tasks for a given shipment can be handled by different vehicles. For example, one vehicle could handle the pickup, driving the shipment to the hub, while another vehicle drives the same shipment from the hub to the drop-off location.

Note: gRPC and REST APIs use different field naming conventions. For example, the Task.journey_sharing_info field in the gRPC API and the Task.journeySharingInfo field in the REST API refer to the same field.

Return type

google.maps.fleetengine_delivery_v1.types.Task

async get_task_tracking_info(request: Optional[Union[google.maps.fleetengine_delivery_v1.types.delivery_api.GetTaskTrackingInfoRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.maps.fleetengine_delivery_v1.types.task_tracking_info.TaskTrackingInfo[source]

Returns the specified TaskTrackingInfo instance.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.maps import fleetengine_delivery_v1

async def sample_get_task_tracking_info():
    # Create a client
    client = fleetengine_delivery_v1.DeliveryServiceAsyncClient()

    # Initialize request argument(s)
    request = fleetengine_delivery_v1.GetTaskTrackingInfoRequest(
        name="name_value",
    )

    # Make the request
    response = await client.get_task_tracking_info(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.maps.fleetengine_delivery_v1.types.GetTaskTrackingInfoRequest, dict]]) – The request object. The GetTaskTrackingInfoRequest request message.

  • name (str) –

    Required. Must be in the format providers/{provider}/taskTrackingInfo/{tracking_id}. The provider must be the Google Cloud Project ID, and the tracking_id must be the tracking ID associated with the task. An example name can be providers/sample-cloud-project/taskTrackingInfo/sample-tracking-id.

    This corresponds to the name field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns

The TaskTrackingInfo message. The message contains task tracking

information which will be used for display. If a tracking ID is associated with multiple Tasks, Fleet Engine uses a heuristic to decide which Task’s TaskTrackingInfo to select.

Return type

google.maps.fleetengine_delivery_v1.types.TaskTrackingInfo

classmethod get_transport_class(label: Optional[str] = None) Type[google.maps.fleetengine_delivery_v1.services.delivery_service.transports.base.DeliveryServiceTransport]

Returns an appropriate transport class.

Parameters

label – The name of the desired transport. If none is provided, then the first transport in the registry is used.

Returns

The transport class to use.

async list_delivery_vehicles(request: Optional[Union[google.maps.fleetengine_delivery_v1.types.delivery_api.ListDeliveryVehiclesRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.maps.fleetengine_delivery_v1.services.delivery_service.pagers.ListDeliveryVehiclesAsyncPager[source]

Gets all DeliveryVehicles that meet the specified filtering criteria.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.maps import fleetengine_delivery_v1

async def sample_list_delivery_vehicles():
    # Create a client
    client = fleetengine_delivery_v1.DeliveryServiceAsyncClient()

    # Initialize request argument(s)
    request = fleetengine_delivery_v1.ListDeliveryVehiclesRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_delivery_vehicles(request=request)

    # Handle the response
    async for response in page_result:
        print(response)
Parameters
  • request (Optional[Union[google.maps.fleetengine_delivery_v1.types.ListDeliveryVehiclesRequest, dict]]) – The request object. The ListDeliveryVehicles request message.

  • parent (str) –

    Required. Must be in the format providers/{provider}. The provider must be the Google Cloud Project ID. For example, sample-cloud-project.

    This corresponds to the parent field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns

The ListDeliveryVehicles response message.

Iterating over this object will yield results and resolve additional pages automatically.

Return type

google.maps.fleetengine_delivery_v1.services.delivery_service.pagers.ListDeliveryVehiclesAsyncPager

async list_tasks(request: Optional[Union[google.maps.fleetengine_delivery_v1.types.delivery_api.ListTasksRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.maps.fleetengine_delivery_v1.services.delivery_service.pagers.ListTasksAsyncPager[source]

Gets all Tasks that meet the specified filtering criteria.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.maps import fleetengine_delivery_v1

async def sample_list_tasks():
    # Create a client
    client = fleetengine_delivery_v1.DeliveryServiceAsyncClient()

    # Initialize request argument(s)
    request = fleetengine_delivery_v1.ListTasksRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_tasks(request=request)

    # Handle the response
    async for response in page_result:
        print(response)
Parameters
  • request (Optional[Union[google.maps.fleetengine_delivery_v1.types.ListTasksRequest, dict]]) – The request object. The ListTasks request message.

  • parent (str) –

    Required. Must be in the format providers/{provider}. The provider must be the Google Cloud Project ID. For example, sample-cloud-project.

    This corresponds to the parent field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns

The ListTasks response that contains the set of Tasks that meet the filter

criteria in the ListTasksRequest.

Iterating over this object will yield results and resolve additional pages automatically.

Return type

google.maps.fleetengine_delivery_v1.services.delivery_service.pagers.ListTasksAsyncPager

static parse_common_billing_account_path(path: str) Dict[str, str]

Parse a billing_account path into its component segments.

static parse_common_folder_path(path: str) Dict[str, str]

Parse a folder path into its component segments.

static parse_common_location_path(path: str) Dict[str, str]

Parse a location path into its component segments.

static parse_common_organization_path(path: str) Dict[str, str]

Parse a organization path into its component segments.

static parse_common_project_path(path: str) Dict[str, str]

Parse a project path into its component segments.

static parse_delivery_vehicle_path(path: str) Dict[str, str]

Parses a delivery_vehicle path into its component segments.

static parse_task_path(path: str) Dict[str, str]

Parses a task path into its component segments.

static parse_task_tracking_info_path(path: str) Dict[str, str]

Parses a task_tracking_info path into its component segments.

static task_path(provider: str, task: str) str

Returns a fully-qualified task string.

static task_tracking_info_path(provider: str, tracking: str) str

Returns a fully-qualified task_tracking_info string.

property transport: google.maps.fleetengine_delivery_v1.services.delivery_service.transports.base.DeliveryServiceTransport

Returns the transport used by the client instance.

Returns

The transport used by the client instance.

Return type

DeliveryServiceTransport

property universe_domain: str

Return the universe domain used by the client instance.

Returns

The universe domain used

by the client instance.

Return type

str

async update_delivery_vehicle(request: Optional[Union[google.maps.fleetengine_delivery_v1.types.delivery_api.UpdateDeliveryVehicleRequest, dict]] = None, *, delivery_vehicle: Optional[google.maps.fleetengine_delivery_v1.types.delivery_vehicles.DeliveryVehicle] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.maps.fleetengine_delivery_v1.types.delivery_vehicles.DeliveryVehicle[source]

Writes updated DeliveryVehicle data to Fleet Engine, and assigns Tasks to the DeliveryVehicle. You cannot update the name of the DeliveryVehicle. You can update remaining_vehicle_journey_segments, but it must contain all of the VehicleJourneySegments to be persisted on the DeliveryVehicle. The task_ids are retrieved from remaining_vehicle_journey_segments, and their corresponding Tasks are assigned to the DeliveryVehicle if they have not yet been assigned.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.maps import fleetengine_delivery_v1

async def sample_update_delivery_vehicle():
    # Create a client
    client = fleetengine_delivery_v1.DeliveryServiceAsyncClient()

    # Initialize request argument(s)
    request = fleetengine_delivery_v1.UpdateDeliveryVehicleRequest(
    )

    # Make the request
    response = await client.update_delivery_vehicle(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.maps.fleetengine_delivery_v1.types.UpdateDeliveryVehicleRequest, dict]]) – The request object. The UpdateDeliveryVehicle request message.

  • delivery_vehicle (google.maps.fleetengine_delivery_v1.types.DeliveryVehicle) –

    Required. The DeliveryVehicle entity update to apply. Note: You cannot update the name of the DeliveryVehicle.

    This corresponds to the delivery_vehicle field on the request instance; if request is provided, this should not be set.

  • update_mask (google.protobuf.field_mask_pb2.FieldMask) –

    Required. A field mask that indicates which DeliveryVehicle fields to update. Note that the update_mask must contain at least one field.

    This is a comma-separated list of fully qualified names of fields. Example: "remaining_vehicle_journey_segments".

    This corresponds to the update_mask field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns

The DeliveryVehicle message. A delivery vehicle transports shipments from a

depot to a delivery location, and from a pickup location to the depot. In some cases, delivery vehicles also transport shipments directly from the pickup location to the delivery location.

Note: gRPC and REST APIs use different field naming conventions. For example, the DeliveryVehicle.current_route_segment field in the gRPC API and the DeliveryVehicle.currentRouteSegment field in the REST API refer to the same field.

Return type

google.maps.fleetengine_delivery_v1.types.DeliveryVehicle

async update_task(request: Optional[Union[google.maps.fleetengine_delivery_v1.types.delivery_api.UpdateTaskRequest, dict]] = None, *, task: Optional[google.maps.fleetengine_delivery_v1.types.tasks.Task] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.maps.fleetengine_delivery_v1.types.tasks.Task[source]

Updates Task data.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.maps import fleetengine_delivery_v1

async def sample_update_task():
    # Create a client
    client = fleetengine_delivery_v1.DeliveryServiceAsyncClient()

    # Initialize request argument(s)
    task = fleetengine_delivery_v1.Task()
    task.type_ = "UNAVAILABLE"
    task.state = "CLOSED"

    request = fleetengine_delivery_v1.UpdateTaskRequest(
        task=task,
    )

    # Make the request
    response = await client.update_task(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Optional[Union[google.maps.fleetengine_delivery_v1.types.UpdateTaskRequest, dict]]) – The request object. The UpdateTask request message.

  • task (google.maps.fleetengine_delivery_v1.types.Task) –

    Required. The Task associated with the update. The following fields are maintained by Fleet Engine. Do not update them using Task.update.

    • last_location.

    • last_location_snappable.

    • name.

    • remaining_vehicle_journey_segments.

    • task_outcome_location_source.

    Note: You cannot change the value of task_outcome once you set it.

    If the Task has been assigned to a delivery vehicle, then don’t set the Task state to CLOSED using Task.update. Instead, remove the VehicleStop that contains the Task from the delivery vehicle, which automatically sets the Task state to CLOSED.

    This corresponds to the task field on the request instance; if request is provided, this should not be set.

  • update_mask (google.protobuf.field_mask_pb2.FieldMask) –

    Required. The field mask that indicates which Task fields to update. Note: The update_mask must contain at least one field.

    This is a comma-separated list of fully qualified names of fields. Example: "task_outcome,task_outcome_time,task_outcome_location".

    This corresponds to the update_mask field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry_async.AsyncRetry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns

A Task in the Delivery API represents a single action to track. In general,

there is a distinction between shipment-related Tasks and break Tasks. A shipment can have multiple Tasks associated with it. For example, there could be one Task for the pickup, and one for the drop-off or transfer. Also, different Tasks for a given shipment can be handled by different vehicles. For example, one vehicle could handle the pickup, driving the shipment to the hub, while another vehicle drives the same shipment from the hub to the drop-off location.

Note: gRPC and REST APIs use different field naming conventions. For example, the Task.journey_sharing_info field in the gRPC API and the Task.journeySharingInfo field in the REST API refer to the same field.

Return type

google.maps.fleetengine_delivery_v1.types.Task

class google.maps.fleetengine_delivery_v1.services.delivery_service.DeliveryServiceClient(*, credentials: typing.Optional[google.auth.credentials.Credentials] = None, transport: typing.Optional[typing.Union[str, google.maps.fleetengine_delivery_v1.services.delivery_service.transports.base.DeliveryServiceTransport, typing.Callable[[...], google.maps.fleetengine_delivery_v1.services.delivery_service.transports.base.DeliveryServiceTransport]]] = None, client_options: typing.Optional[typing.Union[google.api_core.client_options.ClientOptions, dict]] = None, client_info: google.api_core.gapic_v1.client_info.ClientInfo = <google.api_core.gapic_v1.client_info.ClientInfo object>)[source]

The Last Mile Delivery service.

Instantiates the delivery service client.

Parameters
  • credentials (Optional[google.auth.credentials.Credentials]) – The authorization credentials to attach to requests. These credentials identify the application to the service; if none are specified, the client will attempt to ascertain the credentials from the environment.

  • transport (Optional[Union[str,DeliveryServiceTransport,Callable[..., DeliveryServiceTransport]]]) – The transport to use, or a Callable that constructs and returns a new transport. If a Callable is given, it will be called with the same set of initialization arguments as used in the DeliveryServiceTransport constructor. If set to None, a transport is chosen automatically.

  • client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]) –

    Custom options for the client.

    1. The api_endpoint property can be used to override the default endpoint provided by the client when transport is not explicitly provided. Only if this property is not set and transport was not explicitly provided, the endpoint is determined by the GOOGLE_API_USE_MTLS_ENDPOINT environment variable, which have one of the following values: “always” (always use the default mTLS endpoint), “never” (always use the default regular endpoint) and “auto” (auto-switch to the default mTLS endpoint if client certificate is present; this is the default value).

    2. If the GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is “true”, then the client_cert_source property can be used to provide a client certificate for mTLS transport. If not provided, the default SSL client certificate will be used if present. If GOOGLE_API_USE_CLIENT_CERTIFICATE is “false” or not set, no client certificate will be used.

    3. The universe_domain property can be used to override the default “googleapis.com” universe. Note that the api_endpoint property still takes precedence; and universe_domain is currently not supported for mTLS.

  • client_info (google.api_core.gapic_v1.client_info.ClientInfo) – The client info used to send a user-agent string along with API requests. If None, then default info will be used. Generally, you only need to set this if you’re developing your own client library.

Raises

google.auth.exceptions.MutualTLSChannelError – If mutual TLS transport creation failed for any reason.

__exit__(type, value, traceback)[source]

Releases underlying transport’s resources.

Warning

ONLY use as a context manager if the transport is NOT shared with other clients! Exiting the with block will CLOSE the transport and may cause errors in other clients!

property api_endpoint

Return the API endpoint used by the client instance.

Returns

The API endpoint used by the client instance.

Return type

str

batch_create_tasks(request: Optional[Union[google.maps.fleetengine_delivery_v1.types.delivery_api.BatchCreateTasksRequest, dict]] = None, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.maps.fleetengine_delivery_v1.types.delivery_api.BatchCreateTasksResponse[source]

Creates and returns a batch of new Task objects.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.maps import fleetengine_delivery_v1

def sample_batch_create_tasks():
    # Create a client
    client = fleetengine_delivery_v1.DeliveryServiceClient()

    # Initialize request argument(s)
    requests = fleetengine_delivery_v1.CreateTaskRequest()
    requests.parent = "parent_value"
    requests.task_id = "task_id_value"
    requests.task.type_ = "UNAVAILABLE"
    requests.task.state = "CLOSED"

    request = fleetengine_delivery_v1.BatchCreateTasksRequest(
        parent="parent_value",
        requests=requests,
    )

    # Make the request
    response = client.batch_create_tasks(request=request)

    # Handle the response
    print(response)
Parameters
Returns

The BatchCreateTask response message.

Return type

google.maps.fleetengine_delivery_v1.types.BatchCreateTasksResponse

static common_billing_account_path(billing_account: str) str[source]

Returns a fully-qualified billing_account string.

static common_folder_path(folder: str) str[source]

Returns a fully-qualified folder string.

static common_location_path(project: str, location: str) str[source]

Returns a fully-qualified location string.

static common_organization_path(organization: str) str[source]

Returns a fully-qualified organization string.

static common_project_path(project: str) str[source]

Returns a fully-qualified project string.

create_delivery_vehicle(request: Optional[Union[google.maps.fleetengine_delivery_v1.types.delivery_api.CreateDeliveryVehicleRequest, dict]] = None, *, parent: Optional[str] = None, delivery_vehicle: Optional[google.maps.fleetengine_delivery_v1.types.delivery_vehicles.DeliveryVehicle] = None, delivery_vehicle_id: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.maps.fleetengine_delivery_v1.types.delivery_vehicles.DeliveryVehicle[source]

Creates and returns a new DeliveryVehicle.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.maps import fleetengine_delivery_v1

def sample_create_delivery_vehicle():
    # Create a client
    client = fleetengine_delivery_v1.DeliveryServiceClient()

    # Initialize request argument(s)
    request = fleetengine_delivery_v1.CreateDeliveryVehicleRequest(
        parent="parent_value",
        delivery_vehicle_id="delivery_vehicle_id_value",
    )

    # Make the request
    response = client.create_delivery_vehicle(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Union[google.maps.fleetengine_delivery_v1.types.CreateDeliveryVehicleRequest, dict]) – The request object. The CreateDeliveryVehicle request message.

  • parent (str) –

    Required. Must be in the format providers/{provider}. The provider must be the Google Cloud Project ID. For example, sample-cloud-project.

    This corresponds to the parent field on the request instance; if request is provided, this should not be set.

  • delivery_vehicle (google.maps.fleetengine_delivery_v1.types.DeliveryVehicle) –

    Required. The DeliveryVehicle entity to create. When creating a new delivery vehicle, you may set the following optional fields:

    • type

    • last_location

    • attributes

    Note: The DeliveryVehicle’s name field is ignored. All other DeliveryVehicle fields must not be set; otherwise, an error is returned.

    This corresponds to the delivery_vehicle field on the request instance; if request is provided, this should not be set.

  • delivery_vehicle_id (str) –

    Required. The Delivery Vehicle ID must be unique and subject to the following restrictions:

    • Must be a valid Unicode string.

    • Limited to a maximum length of 64 characters.

    • Normalized according to [Unicode Normalization Form C] (http://www.unicode.org/reports/tr15/).

    • May not contain any of the following ASCII characters: ‘/’, ‘:’, ‘?’, ‘,’, or ‘#’.

    This corresponds to the delivery_vehicle_id field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns

The DeliveryVehicle message. A delivery vehicle transports shipments from a

depot to a delivery location, and from a pickup location to the depot. In some cases, delivery vehicles also transport shipments directly from the pickup location to the delivery location.

Note: gRPC and REST APIs use different field naming conventions. For example, the DeliveryVehicle.current_route_segment field in the gRPC API and the DeliveryVehicle.currentRouteSegment field in the REST API refer to the same field.

Return type

google.maps.fleetengine_delivery_v1.types.DeliveryVehicle

create_task(request: Optional[Union[google.maps.fleetengine_delivery_v1.types.delivery_api.CreateTaskRequest, dict]] = None, *, parent: Optional[str] = None, task: Optional[google.maps.fleetengine_delivery_v1.types.tasks.Task] = None, task_id: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.maps.fleetengine_delivery_v1.types.tasks.Task[source]

Creates and returns a new Task object.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.maps import fleetengine_delivery_v1

def sample_create_task():
    # Create a client
    client = fleetengine_delivery_v1.DeliveryServiceClient()

    # Initialize request argument(s)
    task = fleetengine_delivery_v1.Task()
    task.type_ = "UNAVAILABLE"
    task.state = "CLOSED"

    request = fleetengine_delivery_v1.CreateTaskRequest(
        parent="parent_value",
        task_id="task_id_value",
        task=task,
    )

    # Make the request
    response = client.create_task(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Union[google.maps.fleetengine_delivery_v1.types.CreateTaskRequest, dict]) – The request object. The CreateTask request message.

  • parent (str) –

    Required. Must be in the format providers/{provider}. The provider must be the Google Cloud Project ID. For example, sample-cloud-project.

    This corresponds to the parent field on the request instance; if request is provided, this should not be set.

  • task (google.maps.fleetengine_delivery_v1.types.Task) –

    Required. The Task entity to create. When creating a Task, the following fields are required:

    • type

    • state (must be set to OPEN)

    • tracking_id (must not be set for UNAVAILABLE or SCHEDULED_STOP tasks, but required for all other task types)

    • planned_location (optional for UNAVAILABLE tasks)

    • task_duration

    Note: The Task’s name field is ignored. All other Task fields must not be set; otherwise, an error is returned.

    This corresponds to the task field on the request instance; if request is provided, this should not be set.

  • task_id (str) –

    Required. The Task ID must be unique, but it should be not a shipment tracking ID. To store a shipment tracking ID, use the tracking_id field. Note that multiple tasks can have the same tracking_id. Task IDs are subject to the following restrictions:

    • Must be a valid Unicode string.

    • Limited to a maximum length of 64 characters.

    • Normalized according to [Unicode Normalization Form C] (http://www.unicode.org/reports/tr15/).

    • May not contain any of the following ASCII characters: ‘/’, ‘:’, ‘?’, ‘,’, or ‘#’.

    This corresponds to the task_id field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns

A Task in the Delivery API represents a single action to track. In general,

there is a distinction between shipment-related Tasks and break Tasks. A shipment can have multiple Tasks associated with it. For example, there could be one Task for the pickup, and one for the drop-off or transfer. Also, different Tasks for a given shipment can be handled by different vehicles. For example, one vehicle could handle the pickup, driving the shipment to the hub, while another vehicle drives the same shipment from the hub to the drop-off location.

Note: gRPC and REST APIs use different field naming conventions. For example, the Task.journey_sharing_info field in the gRPC API and the Task.journeySharingInfo field in the REST API refer to the same field.

Return type

google.maps.fleetengine_delivery_v1.types.Task

static delivery_vehicle_path(provider: str, vehicle: str) str[source]

Returns a fully-qualified delivery_vehicle string.

classmethod from_service_account_file(filename: str, *args, **kwargs)[source]
Creates an instance of this client using the provided credentials

file.

Parameters
  • filename (str) – The path to the service account private key json file.

  • args – Additional arguments to pass to the constructor.

  • kwargs – Additional arguments to pass to the constructor.

Returns

The constructed client.

Return type

DeliveryServiceClient

classmethod from_service_account_info(info: dict, *args, **kwargs)[source]
Creates an instance of this client using the provided credentials

info.

Parameters
  • info (dict) – The service account private key info.

  • args – Additional arguments to pass to the constructor.

  • kwargs – Additional arguments to pass to the constructor.

Returns

The constructed client.

Return type

DeliveryServiceClient

classmethod from_service_account_json(filename: str, *args, **kwargs)
Creates an instance of this client using the provided credentials

file.

Parameters
  • filename (str) – The path to the service account private key json file.

  • args – Additional arguments to pass to the constructor.

  • kwargs – Additional arguments to pass to the constructor.

Returns

The constructed client.

Return type

DeliveryServiceClient

get_delivery_vehicle(request: Optional[Union[google.maps.fleetengine_delivery_v1.types.delivery_api.GetDeliveryVehicleRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.maps.fleetengine_delivery_v1.types.delivery_vehicles.DeliveryVehicle[source]

Returns the specified DeliveryVehicle instance.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.maps import fleetengine_delivery_v1

def sample_get_delivery_vehicle():
    # Create a client
    client = fleetengine_delivery_v1.DeliveryServiceClient()

    # Initialize request argument(s)
    request = fleetengine_delivery_v1.GetDeliveryVehicleRequest(
        name="name_value",
    )

    # Make the request
    response = client.get_delivery_vehicle(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Union[google.maps.fleetengine_delivery_v1.types.GetDeliveryVehicleRequest, dict]) – The request object. The GetDeliveryVehicle request message.

  • name (str) –

    Required. Must be in the format providers/{provider}/deliveryVehicles/{delivery_vehicle}. The provider must be the Google Cloud Project ID. For example, sample-cloud-project.

    This corresponds to the name field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns

The DeliveryVehicle message. A delivery vehicle transports shipments from a

depot to a delivery location, and from a pickup location to the depot. In some cases, delivery vehicles also transport shipments directly from the pickup location to the delivery location.

Note: gRPC and REST APIs use different field naming conventions. For example, the DeliveryVehicle.current_route_segment field in the gRPC API and the DeliveryVehicle.currentRouteSegment field in the REST API refer to the same field.

Return type

google.maps.fleetengine_delivery_v1.types.DeliveryVehicle

classmethod get_mtls_endpoint_and_cert_source(client_options: Optional[google.api_core.client_options.ClientOptions] = None)[source]

Deprecated. Return the API endpoint and client cert source for mutual TLS.

The client cert source is determined in the following order: (1) if GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is not “true”, the client cert source is None. (2) if client_options.client_cert_source is provided, use the provided one; if the default client cert source exists, use the default one; otherwise the client cert source is None.

The API endpoint is determined in the following order: (1) if client_options.api_endpoint if provided, use the provided one. (2) if GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is “always”, use the default mTLS endpoint; if the environment variable is “never”, use the default API endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise use the default API endpoint.

More details can be found at https://google.aip.dev/auth/4114.

Parameters

client_options (google.api_core.client_options.ClientOptions) – Custom options for the client. Only the api_endpoint and client_cert_source properties may be used in this method.

Returns

returns the API endpoint and the

client cert source to use.

Return type

Tuple[str, Callable[[], Tuple[bytes, bytes]]]

Raises

google.auth.exceptions.MutualTLSChannelError – If any errors happen.

get_task(request: Optional[Union[google.maps.fleetengine_delivery_v1.types.delivery_api.GetTaskRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.maps.fleetengine_delivery_v1.types.tasks.Task[source]

Gets information about a Task.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.maps import fleetengine_delivery_v1

def sample_get_task():
    # Create a client
    client = fleetengine_delivery_v1.DeliveryServiceClient()

    # Initialize request argument(s)
    request = fleetengine_delivery_v1.GetTaskRequest(
        name="name_value",
    )

    # Make the request
    response = client.get_task(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Union[google.maps.fleetengine_delivery_v1.types.GetTaskRequest, dict]) – The request object. The GetTask request message.

  • name (str) –

    Required. Must be in the format providers/{provider}/tasks/{task}. The provider must be the Google Cloud Project ID. For example, sample-cloud-project.

    This corresponds to the name field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns

A Task in the Delivery API represents a single action to track. In general,

there is a distinction between shipment-related Tasks and break Tasks. A shipment can have multiple Tasks associated with it. For example, there could be one Task for the pickup, and one for the drop-off or transfer. Also, different Tasks for a given shipment can be handled by different vehicles. For example, one vehicle could handle the pickup, driving the shipment to the hub, while another vehicle drives the same shipment from the hub to the drop-off location.

Note: gRPC and REST APIs use different field naming conventions. For example, the Task.journey_sharing_info field in the gRPC API and the Task.journeySharingInfo field in the REST API refer to the same field.

Return type

google.maps.fleetengine_delivery_v1.types.Task

get_task_tracking_info(request: Optional[Union[google.maps.fleetengine_delivery_v1.types.delivery_api.GetTaskTrackingInfoRequest, dict]] = None, *, name: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.maps.fleetengine_delivery_v1.types.task_tracking_info.TaskTrackingInfo[source]

Returns the specified TaskTrackingInfo instance.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.maps import fleetengine_delivery_v1

def sample_get_task_tracking_info():
    # Create a client
    client = fleetengine_delivery_v1.DeliveryServiceClient()

    # Initialize request argument(s)
    request = fleetengine_delivery_v1.GetTaskTrackingInfoRequest(
        name="name_value",
    )

    # Make the request
    response = client.get_task_tracking_info(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Union[google.maps.fleetengine_delivery_v1.types.GetTaskTrackingInfoRequest, dict]) – The request object. The GetTaskTrackingInfoRequest request message.

  • name (str) –

    Required. Must be in the format providers/{provider}/taskTrackingInfo/{tracking_id}. The provider must be the Google Cloud Project ID, and the tracking_id must be the tracking ID associated with the task. An example name can be providers/sample-cloud-project/taskTrackingInfo/sample-tracking-id.

    This corresponds to the name field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns

The TaskTrackingInfo message. The message contains task tracking

information which will be used for display. If a tracking ID is associated with multiple Tasks, Fleet Engine uses a heuristic to decide which Task’s TaskTrackingInfo to select.

Return type

google.maps.fleetengine_delivery_v1.types.TaskTrackingInfo

list_delivery_vehicles(request: Optional[Union[google.maps.fleetengine_delivery_v1.types.delivery_api.ListDeliveryVehiclesRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.maps.fleetengine_delivery_v1.services.delivery_service.pagers.ListDeliveryVehiclesPager[source]

Gets all DeliveryVehicles that meet the specified filtering criteria.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.maps import fleetengine_delivery_v1

def sample_list_delivery_vehicles():
    # Create a client
    client = fleetengine_delivery_v1.DeliveryServiceClient()

    # Initialize request argument(s)
    request = fleetengine_delivery_v1.ListDeliveryVehiclesRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_delivery_vehicles(request=request)

    # Handle the response
    for response in page_result:
        print(response)
Parameters
  • request (Union[google.maps.fleetengine_delivery_v1.types.ListDeliveryVehiclesRequest, dict]) – The request object. The ListDeliveryVehicles request message.

  • parent (str) –

    Required. Must be in the format providers/{provider}. The provider must be the Google Cloud Project ID. For example, sample-cloud-project.

    This corresponds to the parent field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns

The ListDeliveryVehicles response message.

Iterating over this object will yield results and resolve additional pages automatically.

Return type

google.maps.fleetengine_delivery_v1.services.delivery_service.pagers.ListDeliveryVehiclesPager

list_tasks(request: Optional[Union[google.maps.fleetengine_delivery_v1.types.delivery_api.ListTasksRequest, dict]] = None, *, parent: Optional[str] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.maps.fleetengine_delivery_v1.services.delivery_service.pagers.ListTasksPager[source]

Gets all Tasks that meet the specified filtering criteria.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.maps import fleetengine_delivery_v1

def sample_list_tasks():
    # Create a client
    client = fleetengine_delivery_v1.DeliveryServiceClient()

    # Initialize request argument(s)
    request = fleetengine_delivery_v1.ListTasksRequest(
        parent="parent_value",
    )

    # Make the request
    page_result = client.list_tasks(request=request)

    # Handle the response
    for response in page_result:
        print(response)
Parameters
  • request (Union[google.maps.fleetengine_delivery_v1.types.ListTasksRequest, dict]) – The request object. The ListTasks request message.

  • parent (str) –

    Required. Must be in the format providers/{provider}. The provider must be the Google Cloud Project ID. For example, sample-cloud-project.

    This corresponds to the parent field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns

The ListTasks response that contains the set of Tasks that meet the filter

criteria in the ListTasksRequest.

Iterating over this object will yield results and resolve additional pages automatically.

Return type

google.maps.fleetengine_delivery_v1.services.delivery_service.pagers.ListTasksPager

static parse_common_billing_account_path(path: str) Dict[str, str][source]

Parse a billing_account path into its component segments.

static parse_common_folder_path(path: str) Dict[str, str][source]

Parse a folder path into its component segments.

static parse_common_location_path(path: str) Dict[str, str][source]

Parse a location path into its component segments.

static parse_common_organization_path(path: str) Dict[str, str][source]

Parse a organization path into its component segments.

static parse_common_project_path(path: str) Dict[str, str][source]

Parse a project path into its component segments.

static parse_delivery_vehicle_path(path: str) Dict[str, str][source]

Parses a delivery_vehicle path into its component segments.

static parse_task_path(path: str) Dict[str, str][source]

Parses a task path into its component segments.

static parse_task_tracking_info_path(path: str) Dict[str, str][source]

Parses a task_tracking_info path into its component segments.

static task_path(provider: str, task: str) str[source]

Returns a fully-qualified task string.

static task_tracking_info_path(provider: str, tracking: str) str[source]

Returns a fully-qualified task_tracking_info string.

property transport: google.maps.fleetengine_delivery_v1.services.delivery_service.transports.base.DeliveryServiceTransport

Returns the transport used by the client instance.

Returns

The transport used by the client

instance.

Return type

DeliveryServiceTransport

property universe_domain: str

Return the universe domain used by the client instance.

Returns

The universe domain used by the client instance.

Return type

str

update_delivery_vehicle(request: Optional[Union[google.maps.fleetengine_delivery_v1.types.delivery_api.UpdateDeliveryVehicleRequest, dict]] = None, *, delivery_vehicle: Optional[google.maps.fleetengine_delivery_v1.types.delivery_vehicles.DeliveryVehicle] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.maps.fleetengine_delivery_v1.types.delivery_vehicles.DeliveryVehicle[source]

Writes updated DeliveryVehicle data to Fleet Engine, and assigns Tasks to the DeliveryVehicle. You cannot update the name of the DeliveryVehicle. You can update remaining_vehicle_journey_segments, but it must contain all of the VehicleJourneySegments to be persisted on the DeliveryVehicle. The task_ids are retrieved from remaining_vehicle_journey_segments, and their corresponding Tasks are assigned to the DeliveryVehicle if they have not yet been assigned.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.maps import fleetengine_delivery_v1

def sample_update_delivery_vehicle():
    # Create a client
    client = fleetengine_delivery_v1.DeliveryServiceClient()

    # Initialize request argument(s)
    request = fleetengine_delivery_v1.UpdateDeliveryVehicleRequest(
    )

    # Make the request
    response = client.update_delivery_vehicle(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Union[google.maps.fleetengine_delivery_v1.types.UpdateDeliveryVehicleRequest, dict]) – The request object. The UpdateDeliveryVehicle request message.

  • delivery_vehicle (google.maps.fleetengine_delivery_v1.types.DeliveryVehicle) –

    Required. The DeliveryVehicle entity update to apply. Note: You cannot update the name of the DeliveryVehicle.

    This corresponds to the delivery_vehicle field on the request instance; if request is provided, this should not be set.

  • update_mask (google.protobuf.field_mask_pb2.FieldMask) –

    Required. A field mask that indicates which DeliveryVehicle fields to update. Note that the update_mask must contain at least one field.

    This is a comma-separated list of fully qualified names of fields. Example: "remaining_vehicle_journey_segments".

    This corresponds to the update_mask field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns

The DeliveryVehicle message. A delivery vehicle transports shipments from a

depot to a delivery location, and from a pickup location to the depot. In some cases, delivery vehicles also transport shipments directly from the pickup location to the delivery location.

Note: gRPC and REST APIs use different field naming conventions. For example, the DeliveryVehicle.current_route_segment field in the gRPC API and the DeliveryVehicle.currentRouteSegment field in the REST API refer to the same field.

Return type

google.maps.fleetengine_delivery_v1.types.DeliveryVehicle

update_task(request: Optional[Union[google.maps.fleetengine_delivery_v1.types.delivery_api.UpdateTaskRequest, dict]] = None, *, task: Optional[google.maps.fleetengine_delivery_v1.types.tasks.Task] = None, update_mask: Optional[google.protobuf.field_mask_pb2.FieldMask] = None, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ()) google.maps.fleetengine_delivery_v1.types.tasks.Task[source]

Updates Task data.

# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
#   client as shown in:
#   https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.maps import fleetengine_delivery_v1

def sample_update_task():
    # Create a client
    client = fleetengine_delivery_v1.DeliveryServiceClient()

    # Initialize request argument(s)
    task = fleetengine_delivery_v1.Task()
    task.type_ = "UNAVAILABLE"
    task.state = "CLOSED"

    request = fleetengine_delivery_v1.UpdateTaskRequest(
        task=task,
    )

    # Make the request
    response = client.update_task(request=request)

    # Handle the response
    print(response)
Parameters
  • request (Union[google.maps.fleetengine_delivery_v1.types.UpdateTaskRequest, dict]) – The request object. The UpdateTask request message.

  • task (google.maps.fleetengine_delivery_v1.types.Task) –

    Required. The Task associated with the update. The following fields are maintained by Fleet Engine. Do not update them using Task.update.

    • last_location.

    • last_location_snappable.

    • name.

    • remaining_vehicle_journey_segments.

    • task_outcome_location_source.

    Note: You cannot change the value of task_outcome once you set it.

    If the Task has been assigned to a delivery vehicle, then don’t set the Task state to CLOSED using Task.update. Instead, remove the VehicleStop that contains the Task from the delivery vehicle, which automatically sets the Task state to CLOSED.

    This corresponds to the task field on the request instance; if request is provided, this should not be set.

  • update_mask (google.protobuf.field_mask_pb2.FieldMask) –

    Required. The field mask that indicates which Task fields to update. Note: The update_mask must contain at least one field.

    This is a comma-separated list of fully qualified names of fields. Example: "task_outcome,task_outcome_time,task_outcome_location".

    This corresponds to the update_mask field on the request instance; if request is provided, this should not be set.

  • retry (google.api_core.retry.Retry) – Designation of what errors, if any, should be retried.

  • timeout (float) – The timeout for this request.

  • metadata (Sequence[Tuple[str, str]]) – Strings which should be sent along with the request as metadata.

Returns

A Task in the Delivery API represents a single action to track. In general,

there is a distinction between shipment-related Tasks and break Tasks. A shipment can have multiple Tasks associated with it. For example, there could be one Task for the pickup, and one for the drop-off or transfer. Also, different Tasks for a given shipment can be handled by different vehicles. For example, one vehicle could handle the pickup, driving the shipment to the hub, while another vehicle drives the same shipment from the hub to the drop-off location.

Note: gRPC and REST APIs use different field naming conventions. For example, the Task.journey_sharing_info field in the gRPC API and the Task.journeySharingInfo field in the REST API refer to the same field.

Return type

google.maps.fleetengine_delivery_v1.types.Task

class google.maps.fleetengine_delivery_v1.services.delivery_service.pagers.ListDeliveryVehiclesAsyncPager(method: Callable[[...], Awaitable[google.maps.fleetengine_delivery_v1.types.delivery_api.ListDeliveryVehiclesResponse]], request: google.maps.fleetengine_delivery_v1.types.delivery_api.ListDeliveryVehiclesRequest, response: google.maps.fleetengine_delivery_v1.types.delivery_api.ListDeliveryVehiclesResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through list_delivery_vehicles requests.

This class thinly wraps an initial google.maps.fleetengine_delivery_v1.types.ListDeliveryVehiclesResponse object, and provides an __aiter__ method to iterate through its delivery_vehicles field.

If there are more pages, the __aiter__ method will make additional ListDeliveryVehicles requests and continue to iterate through the delivery_vehicles field on the corresponding responses.

All the usual google.maps.fleetengine_delivery_v1.types.ListDeliveryVehiclesResponse attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.

Instantiates the pager.

Parameters
class google.maps.fleetengine_delivery_v1.services.delivery_service.pagers.ListDeliveryVehiclesPager(method: Callable[[...], google.maps.fleetengine_delivery_v1.types.delivery_api.ListDeliveryVehiclesResponse], request: google.maps.fleetengine_delivery_v1.types.delivery_api.ListDeliveryVehiclesRequest, response: google.maps.fleetengine_delivery_v1.types.delivery_api.ListDeliveryVehiclesResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through list_delivery_vehicles requests.

This class thinly wraps an initial google.maps.fleetengine_delivery_v1.types.ListDeliveryVehiclesResponse object, and provides an __iter__ method to iterate through its delivery_vehicles field.

If there are more pages, the __iter__ method will make additional ListDeliveryVehicles requests and continue to iterate through the delivery_vehicles field on the corresponding responses.

All the usual google.maps.fleetengine_delivery_v1.types.ListDeliveryVehiclesResponse attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.

Instantiate the pager.

Parameters
class google.maps.fleetengine_delivery_v1.services.delivery_service.pagers.ListTasksAsyncPager(method: Callable[[...], Awaitable[google.maps.fleetengine_delivery_v1.types.delivery_api.ListTasksResponse]], request: google.maps.fleetengine_delivery_v1.types.delivery_api.ListTasksRequest, response: google.maps.fleetengine_delivery_v1.types.delivery_api.ListTasksResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary_async.AsyncRetry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through list_tasks requests.

This class thinly wraps an initial google.maps.fleetengine_delivery_v1.types.ListTasksResponse object, and provides an __aiter__ method to iterate through its tasks field.

If there are more pages, the __aiter__ method will make additional ListTasks requests and continue to iterate through the tasks field on the corresponding responses.

All the usual google.maps.fleetengine_delivery_v1.types.ListTasksResponse attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.

Instantiates the pager.

Parameters
class google.maps.fleetengine_delivery_v1.services.delivery_service.pagers.ListTasksPager(method: Callable[[...], google.maps.fleetengine_delivery_v1.types.delivery_api.ListTasksResponse], request: google.maps.fleetengine_delivery_v1.types.delivery_api.ListTasksRequest, response: google.maps.fleetengine_delivery_v1.types.delivery_api.ListTasksResponse, *, retry: Optional[Union[google.api_core.retry.retry_unary.Retry, google.api_core.gapic_v1.method._MethodDefault]] = _MethodDefault._DEFAULT_VALUE, timeout: Union[float, object] = _MethodDefault._DEFAULT_VALUE, metadata: Sequence[Tuple[str, str]] = ())[source]

A pager for iterating through list_tasks requests.

This class thinly wraps an initial google.maps.fleetengine_delivery_v1.types.ListTasksResponse object, and provides an __iter__ method to iterate through its tasks field.

If there are more pages, the __iter__ method will make additional ListTasks requests and continue to iterate through the tasks field on the corresponding responses.

All the usual google.maps.fleetengine_delivery_v1.types.ListTasksResponse attributes are available on the pager. If multiple requests are made, only the most recent response is retained, and thus used for attribute lookup.

Instantiate the pager.

Parameters