google-maps-fleetengine-delivery-v1 1.1.0

Google Cloud Client Libraries for Rust - Last Mile Fleet Solution Delivery API
Documentation
// Copyright 2026 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by sidekick. DO NOT EDIT.

/// A dyn-compatible, crate-private version of [super::DeliveryService].
#[async_trait::async_trait]
pub trait DeliveryService: std::fmt::Debug + Send + Sync {
    async fn create_delivery_vehicle(
        &self,
        req: crate::model::CreateDeliveryVehicleRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::DeliveryVehicle>>;

    async fn get_delivery_vehicle(
        &self,
        req: crate::model::GetDeliveryVehicleRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::DeliveryVehicle>>;

    async fn delete_delivery_vehicle(
        &self,
        req: crate::model::DeleteDeliveryVehicleRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<()>>;

    async fn update_delivery_vehicle(
        &self,
        req: crate::model::UpdateDeliveryVehicleRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::DeliveryVehicle>>;

    async fn batch_create_tasks(
        &self,
        req: crate::model::BatchCreateTasksRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::BatchCreateTasksResponse>>;

    async fn create_task(
        &self,
        req: crate::model::CreateTaskRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::Task>>;

    async fn get_task(
        &self,
        req: crate::model::GetTaskRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::Task>>;

    async fn delete_task(
        &self,
        req: crate::model::DeleteTaskRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<()>>;

    async fn update_task(
        &self,
        req: crate::model::UpdateTaskRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::Task>>;

    async fn list_tasks(
        &self,
        req: crate::model::ListTasksRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::ListTasksResponse>>;

    async fn get_task_tracking_info(
        &self,
        req: crate::model::GetTaskTrackingInfoRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::TaskTrackingInfo>>;

    async fn list_delivery_vehicles(
        &self,
        req: crate::model::ListDeliveryVehiclesRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::ListDeliveryVehiclesResponse>>;
}

/// All implementations of [super::DeliveryService] also implement [DeliveryService].
#[async_trait::async_trait]
impl<T: super::DeliveryService> DeliveryService for T {
    /// Forwards the call to the implementation provided by `T`.
    async fn create_delivery_vehicle(
        &self,
        req: crate::model::CreateDeliveryVehicleRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::DeliveryVehicle>> {
        T::create_delivery_vehicle(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_delivery_vehicle(
        &self,
        req: crate::model::GetDeliveryVehicleRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::DeliveryVehicle>> {
        T::get_delivery_vehicle(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn delete_delivery_vehicle(
        &self,
        req: crate::model::DeleteDeliveryVehicleRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<()>> {
        T::delete_delivery_vehicle(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn update_delivery_vehicle(
        &self,
        req: crate::model::UpdateDeliveryVehicleRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::DeliveryVehicle>> {
        T::update_delivery_vehicle(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn batch_create_tasks(
        &self,
        req: crate::model::BatchCreateTasksRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::BatchCreateTasksResponse>> {
        T::batch_create_tasks(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn create_task(
        &self,
        req: crate::model::CreateTaskRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::Task>> {
        T::create_task(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_task(
        &self,
        req: crate::model::GetTaskRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::Task>> {
        T::get_task(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn delete_task(
        &self,
        req: crate::model::DeleteTaskRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<()>> {
        T::delete_task(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn update_task(
        &self,
        req: crate::model::UpdateTaskRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::Task>> {
        T::update_task(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_tasks(
        &self,
        req: crate::model::ListTasksRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::ListTasksResponse>> {
        T::list_tasks(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_task_tracking_info(
        &self,
        req: crate::model::GetTaskTrackingInfoRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::TaskTrackingInfo>> {
        T::get_task_tracking_info(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_delivery_vehicles(
        &self,
        req: crate::model::ListDeliveryVehiclesRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::ListDeliveryVehiclesResponse>> {
        T::list_delivery_vehicles(self, req, options).await
    }
}