google-cloud-cloudcontrolspartner-v1 1.7.0

Google Cloud Client Libraries for Rust - Cloud Controls Partner 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.

/// A dyn-compatible, crate-private version of [super::CloudControlsPartnerCore].
#[async_trait::async_trait]
pub trait CloudControlsPartnerCore: std::fmt::Debug + Send + Sync {
    async fn get_workload(
        &self,
        req: crate::model::GetWorkloadRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::Workload>>;

    async fn list_workloads(
        &self,
        req: crate::model::ListWorkloadsRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::ListWorkloadsResponse>>;

    async fn get_customer(
        &self,
        req: crate::model::GetCustomerRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::Customer>>;

    async fn list_customers(
        &self,
        req: crate::model::ListCustomersRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::ListCustomersResponse>>;

    async fn get_ekm_connections(
        &self,
        req: crate::model::GetEkmConnectionsRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::EkmConnections>>;

    async fn get_partner_permissions(
        &self,
        req: crate::model::GetPartnerPermissionsRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::PartnerPermissions>>;

    async fn list_access_approval_requests(
        &self,
        req: crate::model::ListAccessApprovalRequestsRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::ListAccessApprovalRequestsResponse>>;

    async fn get_partner(
        &self,
        req: crate::model::GetPartnerRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::Partner>>;

    async fn create_customer(
        &self,
        req: crate::model::CreateCustomerRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::Customer>>;

    async fn update_customer(
        &self,
        req: crate::model::UpdateCustomerRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::Customer>>;

    async fn delete_customer(
        &self,
        req: crate::model::DeleteCustomerRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<()>>;
}

/// All implementations of [super::CloudControlsPartnerCore] also implement [CloudControlsPartnerCore].
#[async_trait::async_trait]
impl<T: super::CloudControlsPartnerCore> CloudControlsPartnerCore for T {
    /// Forwards the call to the implementation provided by `T`.
    async fn get_workload(
        &self,
        req: crate::model::GetWorkloadRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::Workload>> {
        T::get_workload(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_workloads(
        &self,
        req: crate::model::ListWorkloadsRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::ListWorkloadsResponse>> {
        T::list_workloads(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_customer(
        &self,
        req: crate::model::GetCustomerRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::Customer>> {
        T::get_customer(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_customers(
        &self,
        req: crate::model::ListCustomersRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::ListCustomersResponse>> {
        T::list_customers(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_ekm_connections(
        &self,
        req: crate::model::GetEkmConnectionsRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::EkmConnections>> {
        T::get_ekm_connections(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_partner_permissions(
        &self,
        req: crate::model::GetPartnerPermissionsRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::PartnerPermissions>> {
        T::get_partner_permissions(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_access_approval_requests(
        &self,
        req: crate::model::ListAccessApprovalRequestsRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::ListAccessApprovalRequestsResponse>> {
        T::list_access_approval_requests(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_partner(
        &self,
        req: crate::model::GetPartnerRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::Partner>> {
        T::get_partner(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn create_customer(
        &self,
        req: crate::model::CreateCustomerRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::Customer>> {
        T::create_customer(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn update_customer(
        &self,
        req: crate::model::UpdateCustomerRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::Customer>> {
        T::update_customer(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn delete_customer(
        &self,
        req: crate::model::DeleteCustomerRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<()>> {
        T::delete_customer(self, req, options).await
    }
}

/// A dyn-compatible, crate-private version of [super::CloudControlsPartnerMonitoring].
#[async_trait::async_trait]
pub trait CloudControlsPartnerMonitoring: std::fmt::Debug + Send + Sync {
    async fn list_violations(
        &self,
        req: crate::model::ListViolationsRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::ListViolationsResponse>>;

    async fn get_violation(
        &self,
        req: crate::model::GetViolationRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::Violation>>;
}

/// All implementations of [super::CloudControlsPartnerMonitoring] also implement [CloudControlsPartnerMonitoring].
#[async_trait::async_trait]
impl<T: super::CloudControlsPartnerMonitoring> CloudControlsPartnerMonitoring for T {
    /// Forwards the call to the implementation provided by `T`.
    async fn list_violations(
        &self,
        req: crate::model::ListViolationsRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::ListViolationsResponse>> {
        T::list_violations(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_violation(
        &self,
        req: crate::model::GetViolationRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::Violation>> {
        T::get_violation(self, req, options).await
    }
}