#![allow(rustdoc::redundant_explicit_links)]
#![allow(rustdoc::broken_intra_doc_links)]
#[derive(Clone, Debug)]
pub struct Audit {
inner: std::sync::Arc<dyn super::stub::dynamic::Audit>,
}
impl Audit {
pub fn builder() -> super::builder::audit::ClientBuilder {
crate::new_client_builder(super::builder::audit::client::Factory)
}
pub fn from_stub<T>(stub: T) -> Self
where
T: super::stub::Audit + 'static,
{
Self {
inner: std::sync::Arc::new(stub),
}
}
pub(crate) async fn new(
config: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<Self> {
let inner = Self::build_inner(config).await?;
Ok(Self { inner })
}
async fn build_inner(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::Audit>> {
if gaxi::options::tracing_enabled(&conf) {
return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
}
Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
}
async fn build_transport(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::Audit> {
super::transport::Audit::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::Audit> {
Self::build_transport(conf)
.await
.map(super::tracing::Audit::new)
}
pub fn generate_framework_audit_scope_report(
&self,
) -> super::builder::audit::GenerateFrameworkAuditScopeReport {
super::builder::audit::GenerateFrameworkAuditScopeReport::new(self.inner.clone())
}
pub fn create_framework_audit(&self) -> super::builder::audit::CreateFrameworkAudit {
super::builder::audit::CreateFrameworkAudit::new(self.inner.clone())
}
pub fn list_framework_audits(&self) -> super::builder::audit::ListFrameworkAudits {
super::builder::audit::ListFrameworkAudits::new(self.inner.clone())
}
pub fn get_framework_audit(&self) -> super::builder::audit::GetFrameworkAudit {
super::builder::audit::GetFrameworkAudit::new(self.inner.clone())
}
pub fn list_locations(&self) -> super::builder::audit::ListLocations {
super::builder::audit::ListLocations::new(self.inner.clone())
}
pub fn get_location(&self) -> super::builder::audit::GetLocation {
super::builder::audit::GetLocation::new(self.inner.clone())
}
pub fn list_operations(&self) -> super::builder::audit::ListOperations {
super::builder::audit::ListOperations::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::audit::GetOperation {
super::builder::audit::GetOperation::new(self.inner.clone())
}
pub fn delete_operation(&self) -> super::builder::audit::DeleteOperation {
super::builder::audit::DeleteOperation::new(self.inner.clone())
}
pub fn cancel_operation(&self) -> super::builder::audit::CancelOperation {
super::builder::audit::CancelOperation::new(self.inner.clone())
}
}
#[derive(Clone, Debug)]
pub struct CmEnrollmentService {
inner: std::sync::Arc<dyn super::stub::dynamic::CmEnrollmentService>,
}
impl CmEnrollmentService {
pub fn builder() -> super::builder::cm_enrollment_service::ClientBuilder {
crate::new_client_builder(super::builder::cm_enrollment_service::client::Factory)
}
pub fn from_stub<T>(stub: T) -> Self
where
T: super::stub::CmEnrollmentService + 'static,
{
Self {
inner: std::sync::Arc::new(stub),
}
}
pub(crate) async fn new(
config: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<Self> {
let inner = Self::build_inner(config).await?;
Ok(Self { inner })
}
async fn build_inner(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::CmEnrollmentService>>
{
if gaxi::options::tracing_enabled(&conf) {
return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
}
Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
}
async fn build_transport(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::CmEnrollmentService> {
super::transport::CmEnrollmentService::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::CmEnrollmentService> {
Self::build_transport(conf)
.await
.map(super::tracing::CmEnrollmentService::new)
}
pub fn update_cm_enrollment(
&self,
) -> super::builder::cm_enrollment_service::UpdateCmEnrollment {
super::builder::cm_enrollment_service::UpdateCmEnrollment::new(self.inner.clone())
}
pub fn calculate_effective_cm_enrollment(
&self,
) -> super::builder::cm_enrollment_service::CalculateEffectiveCmEnrollment {
super::builder::cm_enrollment_service::CalculateEffectiveCmEnrollment::new(
self.inner.clone(),
)
}
pub fn list_locations(&self) -> super::builder::cm_enrollment_service::ListLocations {
super::builder::cm_enrollment_service::ListLocations::new(self.inner.clone())
}
pub fn get_location(&self) -> super::builder::cm_enrollment_service::GetLocation {
super::builder::cm_enrollment_service::GetLocation::new(self.inner.clone())
}
pub fn list_operations(&self) -> super::builder::cm_enrollment_service::ListOperations {
super::builder::cm_enrollment_service::ListOperations::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::cm_enrollment_service::GetOperation {
super::builder::cm_enrollment_service::GetOperation::new(self.inner.clone())
}
pub fn delete_operation(&self) -> super::builder::cm_enrollment_service::DeleteOperation {
super::builder::cm_enrollment_service::DeleteOperation::new(self.inner.clone())
}
pub fn cancel_operation(&self) -> super::builder::cm_enrollment_service::CancelOperation {
super::builder::cm_enrollment_service::CancelOperation::new(self.inner.clone())
}
}
#[derive(Clone, Debug)]
pub struct Config {
inner: std::sync::Arc<dyn super::stub::dynamic::Config>,
}
impl Config {
pub fn builder() -> super::builder::config::ClientBuilder {
crate::new_client_builder(super::builder::config::client::Factory)
}
pub fn from_stub<T>(stub: T) -> Self
where
T: super::stub::Config + 'static,
{
Self {
inner: std::sync::Arc::new(stub),
}
}
pub(crate) async fn new(
config: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<Self> {
let inner = Self::build_inner(config).await?;
Ok(Self { inner })
}
async fn build_inner(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::Config>> {
if gaxi::options::tracing_enabled(&conf) {
return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
}
Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
}
async fn build_transport(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::Config> {
super::transport::Config::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::Config> {
Self::build_transport(conf)
.await
.map(super::tracing::Config::new)
}
pub fn list_frameworks(&self) -> super::builder::config::ListFrameworks {
super::builder::config::ListFrameworks::new(self.inner.clone())
}
pub fn get_framework(&self) -> super::builder::config::GetFramework {
super::builder::config::GetFramework::new(self.inner.clone())
}
pub fn create_framework(&self) -> super::builder::config::CreateFramework {
super::builder::config::CreateFramework::new(self.inner.clone())
}
pub fn update_framework(&self) -> super::builder::config::UpdateFramework {
super::builder::config::UpdateFramework::new(self.inner.clone())
}
pub fn delete_framework(&self) -> super::builder::config::DeleteFramework {
super::builder::config::DeleteFramework::new(self.inner.clone())
}
pub fn list_cloud_controls(&self) -> super::builder::config::ListCloudControls {
super::builder::config::ListCloudControls::new(self.inner.clone())
}
pub fn get_cloud_control(&self) -> super::builder::config::GetCloudControl {
super::builder::config::GetCloudControl::new(self.inner.clone())
}
pub fn create_cloud_control(&self) -> super::builder::config::CreateCloudControl {
super::builder::config::CreateCloudControl::new(self.inner.clone())
}
pub fn update_cloud_control(&self) -> super::builder::config::UpdateCloudControl {
super::builder::config::UpdateCloudControl::new(self.inner.clone())
}
pub fn delete_cloud_control(&self) -> super::builder::config::DeleteCloudControl {
super::builder::config::DeleteCloudControl::new(self.inner.clone())
}
pub fn list_locations(&self) -> super::builder::config::ListLocations {
super::builder::config::ListLocations::new(self.inner.clone())
}
pub fn get_location(&self) -> super::builder::config::GetLocation {
super::builder::config::GetLocation::new(self.inner.clone())
}
pub fn list_operations(&self) -> super::builder::config::ListOperations {
super::builder::config::ListOperations::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::config::GetOperation {
super::builder::config::GetOperation::new(self.inner.clone())
}
pub fn delete_operation(&self) -> super::builder::config::DeleteOperation {
super::builder::config::DeleteOperation::new(self.inner.clone())
}
pub fn cancel_operation(&self) -> super::builder::config::CancelOperation {
super::builder::config::CancelOperation::new(self.inner.clone())
}
}
#[derive(Clone, Debug)]
pub struct Deployment {
inner: std::sync::Arc<dyn super::stub::dynamic::Deployment>,
}
impl Deployment {
pub fn builder() -> super::builder::deployment::ClientBuilder {
crate::new_client_builder(super::builder::deployment::client::Factory)
}
pub fn from_stub<T>(stub: T) -> Self
where
T: super::stub::Deployment + 'static,
{
Self {
inner: std::sync::Arc::new(stub),
}
}
pub(crate) async fn new(
config: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<Self> {
let inner = Self::build_inner(config).await?;
Ok(Self { inner })
}
async fn build_inner(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::Deployment>> {
if gaxi::options::tracing_enabled(&conf) {
return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
}
Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
}
async fn build_transport(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::Deployment> {
super::transport::Deployment::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::Deployment> {
Self::build_transport(conf)
.await
.map(super::tracing::Deployment::new)
}
pub fn create_framework_deployment(
&self,
) -> super::builder::deployment::CreateFrameworkDeployment {
super::builder::deployment::CreateFrameworkDeployment::new(self.inner.clone())
}
pub fn delete_framework_deployment(
&self,
) -> super::builder::deployment::DeleteFrameworkDeployment {
super::builder::deployment::DeleteFrameworkDeployment::new(self.inner.clone())
}
pub fn get_framework_deployment(&self) -> super::builder::deployment::GetFrameworkDeployment {
super::builder::deployment::GetFrameworkDeployment::new(self.inner.clone())
}
pub fn list_framework_deployments(
&self,
) -> super::builder::deployment::ListFrameworkDeployments {
super::builder::deployment::ListFrameworkDeployments::new(self.inner.clone())
}
pub fn get_cloud_control_deployment(
&self,
) -> super::builder::deployment::GetCloudControlDeployment {
super::builder::deployment::GetCloudControlDeployment::new(self.inner.clone())
}
pub fn list_cloud_control_deployments(
&self,
) -> super::builder::deployment::ListCloudControlDeployments {
super::builder::deployment::ListCloudControlDeployments::new(self.inner.clone())
}
pub fn list_locations(&self) -> super::builder::deployment::ListLocations {
super::builder::deployment::ListLocations::new(self.inner.clone())
}
pub fn get_location(&self) -> super::builder::deployment::GetLocation {
super::builder::deployment::GetLocation::new(self.inner.clone())
}
pub fn list_operations(&self) -> super::builder::deployment::ListOperations {
super::builder::deployment::ListOperations::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::deployment::GetOperation {
super::builder::deployment::GetOperation::new(self.inner.clone())
}
pub fn delete_operation(&self) -> super::builder::deployment::DeleteOperation {
super::builder::deployment::DeleteOperation::new(self.inner.clone())
}
pub fn cancel_operation(&self) -> super::builder::deployment::CancelOperation {
super::builder::deployment::CancelOperation::new(self.inner.clone())
}
}
#[derive(Clone, Debug)]
pub struct Monitoring {
inner: std::sync::Arc<dyn super::stub::dynamic::Monitoring>,
}
impl Monitoring {
pub fn builder() -> super::builder::monitoring::ClientBuilder {
crate::new_client_builder(super::builder::monitoring::client::Factory)
}
pub fn from_stub<T>(stub: T) -> Self
where
T: super::stub::Monitoring + 'static,
{
Self {
inner: std::sync::Arc::new(stub),
}
}
pub(crate) async fn new(
config: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<Self> {
let inner = Self::build_inner(config).await?;
Ok(Self { inner })
}
async fn build_inner(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::Monitoring>> {
if gaxi::options::tracing_enabled(&conf) {
return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
}
Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
}
async fn build_transport(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::Monitoring> {
super::transport::Monitoring::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::Monitoring> {
Self::build_transport(conf)
.await
.map(super::tracing::Monitoring::new)
}
pub fn list_framework_compliance_summaries(
&self,
) -> super::builder::monitoring::ListFrameworkComplianceSummaries {
super::builder::monitoring::ListFrameworkComplianceSummaries::new(self.inner.clone())
}
pub fn list_finding_summaries(&self) -> super::builder::monitoring::ListFindingSummaries {
super::builder::monitoring::ListFindingSummaries::new(self.inner.clone())
}
pub fn fetch_framework_compliance_report(
&self,
) -> super::builder::monitoring::FetchFrameworkComplianceReport {
super::builder::monitoring::FetchFrameworkComplianceReport::new(self.inner.clone())
}
pub fn list_control_compliance_summaries(
&self,
) -> super::builder::monitoring::ListControlComplianceSummaries {
super::builder::monitoring::ListControlComplianceSummaries::new(self.inner.clone())
}
pub fn aggregate_framework_compliance_report(
&self,
) -> super::builder::monitoring::AggregateFrameworkComplianceReport {
super::builder::monitoring::AggregateFrameworkComplianceReport::new(self.inner.clone())
}
pub fn list_locations(&self) -> super::builder::monitoring::ListLocations {
super::builder::monitoring::ListLocations::new(self.inner.clone())
}
pub fn get_location(&self) -> super::builder::monitoring::GetLocation {
super::builder::monitoring::GetLocation::new(self.inner.clone())
}
pub fn list_operations(&self) -> super::builder::monitoring::ListOperations {
super::builder::monitoring::ListOperations::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::monitoring::GetOperation {
super::builder::monitoring::GetOperation::new(self.inner.clone())
}
pub fn delete_operation(&self) -> super::builder::monitoring::DeleteOperation {
super::builder::monitoring::DeleteOperation::new(self.inner.clone())
}
pub fn cancel_operation(&self) -> super::builder::monitoring::CancelOperation {
super::builder::monitoring::CancelOperation::new(self.inner.clone())
}
}