google-cloud-bigquery-datatransfer-v1 1.5.0

Google Cloud Client Libraries for Rust - BigQuery Data Transfer 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 [DataTransferService](super::stub::DataTransferService) decorator for logging and tracing.
#[derive(Clone, Debug)]
pub struct DataTransferService<T>
where
    T: super::stub::DataTransferService + std::fmt::Debug + Send + Sync,
{
    inner: T,
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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