google-cloud-config-v1 1.6.0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    #[tracing::instrument(ret)]
    async fn update_auto_migration_config(
        &self,
        req: crate::model::UpdateAutoMigrationConfigRequest,
        options: crate::RequestOptions,
    ) -> Result<crate::Response<google_cloud_longrunning::model::Operation>> {
        self.inner.update_auto_migration_config(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
    }

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

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

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

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

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

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

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

    fn get_polling_error_policy(
        &self,
        options: &crate::RequestOptions,
    ) -> std::sync::Arc<dyn google_cloud_gax::polling_error_policy::PollingErrorPolicy> {
        self.inner.get_polling_error_policy(options)
    }

    fn get_polling_backoff_policy(
        &self,
        options: &crate::RequestOptions,
    ) -> std::sync::Arc<dyn google_cloud_gax::polling_backoff_policy::PollingBackoffPolicy> {
        self.inner.get_polling_backoff_policy(options)
    }
}