google-cloud-bigquery-migration-v2 1.8.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.

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

    async fn get_migration_workflow(
        &self,
        req: crate::model::GetMigrationWorkflowRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::MigrationWorkflow>>;

    async fn list_migration_workflows(
        &self,
        req: crate::model::ListMigrationWorkflowsRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::ListMigrationWorkflowsResponse>>;

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

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

    async fn get_migration_subtask(
        &self,
        req: crate::model::GetMigrationSubtaskRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::MigrationSubtask>>;

    async fn list_migration_subtasks(
        &self,
        req: crate::model::ListMigrationSubtasksRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::ListMigrationSubtasksResponse>>;
}

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

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

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

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

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

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

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