#[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>>;
}
#[async_trait::async_trait]
impl<T: super::MigrationService> MigrationService for 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
}
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
}
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
}
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
}
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
}
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
}
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
}
}