google-cloud-bigquery-migration-v2 1.7.0

Google Cloud Client Libraries for Rust - BigQuery Migration API
Documentation
// Copyright 2025 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.
use crate::Result;

/// Implements a [MigrationService](super::stub::MigrationService) decorator for logging and tracing.
#[derive(Clone, Debug)]
pub struct MigrationService<T>
where
    T: super::stub::MigrationService + std::fmt::Debug + Send + Sync,
{
    inner: T,
}

impl<T> MigrationService<T>
where
    T: super::stub::MigrationService + std::fmt::Debug + Send + Sync,
{
    pub fn new(inner: T) -> Self {
        Self { inner }
    }
}

impl<T> super::stub::MigrationService for MigrationService<T>
where
    T: super::stub::MigrationService + std::fmt::Debug + Send + Sync,
{
    #[tracing::instrument(ret)]
    async fn create_migration_workflow(
        &self,
        req: crate::model::CreateMigrationWorkflowRequest,
        options: crate::RequestOptions,
    ) -> Result<crate::Response<crate::model::MigrationWorkflow>> {
        self.inner.create_migration_workflow(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_migration_workflow(
        &self,
        req: crate::model::GetMigrationWorkflowRequest,
        options: crate::RequestOptions,
    ) -> Result<crate::Response<crate::model::MigrationWorkflow>> {
        self.inner.get_migration_workflow(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_migration_workflows(
        &self,
        req: crate::model::ListMigrationWorkflowsRequest,
        options: crate::RequestOptions,
    ) -> Result<crate::Response<crate::model::ListMigrationWorkflowsResponse>> {
        self.inner.list_migration_workflows(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn delete_migration_workflow(
        &self,
        req: crate::model::DeleteMigrationWorkflowRequest,
        options: crate::RequestOptions,
    ) -> Result<crate::Response<()>> {
        self.inner.delete_migration_workflow(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn start_migration_workflow(
        &self,
        req: crate::model::StartMigrationWorkflowRequest,
        options: crate::RequestOptions,
    ) -> Result<crate::Response<()>> {
        self.inner.start_migration_workflow(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_migration_subtask(
        &self,
        req: crate::model::GetMigrationSubtaskRequest,
        options: crate::RequestOptions,
    ) -> Result<crate::Response<crate::model::MigrationSubtask>> {
        self.inner.get_migration_subtask(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_migration_subtasks(
        &self,
        req: crate::model::ListMigrationSubtasksRequest,
        options: crate::RequestOptions,
    ) -> Result<crate::Response<crate::model::ListMigrationSubtasksResponse>> {
        self.inner.list_migration_subtasks(req, options).await
    }
}