google-cloud-iap-v1 1.7.0

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

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

impl<T> super::stub::IdentityAwareProxyAdminService for IdentityAwareProxyAdminService<T>
where
    T: super::stub::IdentityAwareProxyAdminService + std::fmt::Debug + Send + Sync,
{
    #[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 get_iap_settings(
        &self,
        req: crate::model::GetIapSettingsRequest,
        options: crate::RequestOptions,
    ) -> Result<crate::Response<crate::model::IapSettings>> {
        self.inner.get_iap_settings(req, options).await
    }

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

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

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

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

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

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

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

/// Implements a [IdentityAwareProxyOAuthService](super::stub::IdentityAwareProxyOAuthService) decorator for logging and tracing.
#[derive(Clone, Debug)]
pub struct IdentityAwareProxyOAuthService<T>
where
    T: super::stub::IdentityAwareProxyOAuthService + std::fmt::Debug + Send + Sync,
{
    inner: T,
}

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

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

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

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

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

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

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

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

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