google-cloud-asset-v1 1.7.0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    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)
    }
}