#![allow(rustdoc::bare_urls)]
#![allow(rustdoc::broken_intra_doc_links)]
#![allow(rustdoc::redundant_explicit_links)]
#[cfg(feature = "accelerator-types")]
#[cfg_attr(docsrs, doc(cfg(feature = "accelerator-types")))]
#[derive(Clone, Debug)]
pub struct AcceleratorTypes {
inner: std::sync::Arc<dyn super::stub::dynamic::AcceleratorTypes>,
}
#[cfg(feature = "accelerator-types")]
impl AcceleratorTypes {
pub fn builder() -> super::builder::accelerator_types::ClientBuilder {
crate::new_client_builder(super::builder::accelerator_types::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::AcceleratorTypes + 'static,
{
Self { inner: stub.into() }
}
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::AcceleratorTypes>>
{
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::AcceleratorTypes> {
super::transport::AcceleratorTypes::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::AcceleratorTypes> {
Self::build_transport(conf)
.await
.map(super::tracing::AcceleratorTypes::new)
}
pub fn aggregated_list(&self) -> super::builder::accelerator_types::AggregatedList {
super::builder::accelerator_types::AggregatedList::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::accelerator_types::Get {
super::builder::accelerator_types::Get::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::accelerator_types::List {
super::builder::accelerator_types::List::new(self.inner.clone())
}
}
#[cfg(feature = "addresses")]
#[cfg_attr(docsrs, doc(cfg(feature = "addresses")))]
#[derive(Clone, Debug)]
pub struct Addresses {
inner: std::sync::Arc<dyn super::stub::dynamic::Addresses>,
}
#[cfg(feature = "addresses")]
impl Addresses {
pub fn builder() -> super::builder::addresses::ClientBuilder {
crate::new_client_builder(super::builder::addresses::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::Addresses + 'static,
{
Self { inner: stub.into() }
}
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::Addresses>> {
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::Addresses> {
super::transport::Addresses::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::Addresses> {
Self::build_transport(conf)
.await
.map(super::tracing::Addresses::new)
}
pub fn aggregated_list(&self) -> super::builder::addresses::AggregatedList {
super::builder::addresses::AggregatedList::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::addresses::Delete {
super::builder::addresses::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::addresses::Get {
super::builder::addresses::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::addresses::Insert {
super::builder::addresses::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::addresses::List {
super::builder::addresses::List::new(self.inner.clone())
}
pub fn r#move(&self) -> super::builder::addresses::Move {
super::builder::addresses::Move::new(self.inner.clone())
}
pub fn set_labels(&self) -> super::builder::addresses::SetLabels {
super::builder::addresses::SetLabels::new(self.inner.clone())
}
pub fn test_iam_permissions(&self) -> super::builder::addresses::TestIamPermissions {
super::builder::addresses::TestIamPermissions::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::addresses::GetOperation {
super::builder::addresses::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "advice")]
#[cfg_attr(docsrs, doc(cfg(feature = "advice")))]
#[derive(Clone, Debug)]
pub struct Advice {
inner: std::sync::Arc<dyn super::stub::dynamic::Advice>,
}
#[cfg(feature = "advice")]
impl Advice {
pub fn builder() -> super::builder::advice::ClientBuilder {
crate::new_client_builder(super::builder::advice::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::Advice + 'static,
{
Self { inner: stub.into() }
}
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::Advice>> {
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::Advice> {
super::transport::Advice::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::Advice> {
Self::build_transport(conf)
.await
.map(super::tracing::Advice::new)
}
pub fn calendar_mode(&self) -> super::builder::advice::CalendarMode {
super::builder::advice::CalendarMode::new(self.inner.clone())
}
}
#[cfg(feature = "autoscalers")]
#[cfg_attr(docsrs, doc(cfg(feature = "autoscalers")))]
#[derive(Clone, Debug)]
pub struct Autoscalers {
inner: std::sync::Arc<dyn super::stub::dynamic::Autoscalers>,
}
#[cfg(feature = "autoscalers")]
impl Autoscalers {
pub fn builder() -> super::builder::autoscalers::ClientBuilder {
crate::new_client_builder(super::builder::autoscalers::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::Autoscalers + 'static,
{
Self { inner: stub.into() }
}
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::Autoscalers>> {
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::Autoscalers> {
super::transport::Autoscalers::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::Autoscalers> {
Self::build_transport(conf)
.await
.map(super::tracing::Autoscalers::new)
}
pub fn aggregated_list(&self) -> super::builder::autoscalers::AggregatedList {
super::builder::autoscalers::AggregatedList::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::autoscalers::Delete {
super::builder::autoscalers::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::autoscalers::Get {
super::builder::autoscalers::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::autoscalers::Insert {
super::builder::autoscalers::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::autoscalers::List {
super::builder::autoscalers::List::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::autoscalers::Patch {
super::builder::autoscalers::Patch::new(self.inner.clone())
}
pub fn test_iam_permissions(&self) -> super::builder::autoscalers::TestIamPermissions {
super::builder::autoscalers::TestIamPermissions::new(self.inner.clone())
}
pub fn update(&self) -> super::builder::autoscalers::Update {
super::builder::autoscalers::Update::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::autoscalers::GetOperation {
super::builder::autoscalers::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "backend-buckets")]
#[cfg_attr(docsrs, doc(cfg(feature = "backend-buckets")))]
#[derive(Clone, Debug)]
pub struct BackendBuckets {
inner: std::sync::Arc<dyn super::stub::dynamic::BackendBuckets>,
}
#[cfg(feature = "backend-buckets")]
impl BackendBuckets {
pub fn builder() -> super::builder::backend_buckets::ClientBuilder {
crate::new_client_builder(super::builder::backend_buckets::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::BackendBuckets + 'static,
{
Self { inner: stub.into() }
}
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::BackendBuckets>> {
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::BackendBuckets> {
super::transport::BackendBuckets::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::BackendBuckets> {
Self::build_transport(conf)
.await
.map(super::tracing::BackendBuckets::new)
}
pub fn add_signed_url_key(&self) -> super::builder::backend_buckets::AddSignedUrlKey {
super::builder::backend_buckets::AddSignedUrlKey::new(self.inner.clone())
}
pub fn aggregated_list(&self) -> super::builder::backend_buckets::AggregatedList {
super::builder::backend_buckets::AggregatedList::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::backend_buckets::Delete {
super::builder::backend_buckets::Delete::new(self.inner.clone())
}
pub fn delete_signed_url_key(&self) -> super::builder::backend_buckets::DeleteSignedUrlKey {
super::builder::backend_buckets::DeleteSignedUrlKey::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::backend_buckets::Get {
super::builder::backend_buckets::Get::new(self.inner.clone())
}
pub fn get_iam_policy(&self) -> super::builder::backend_buckets::GetIamPolicy {
super::builder::backend_buckets::GetIamPolicy::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::backend_buckets::Insert {
super::builder::backend_buckets::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::backend_buckets::List {
super::builder::backend_buckets::List::new(self.inner.clone())
}
pub fn list_usable(&self) -> super::builder::backend_buckets::ListUsable {
super::builder::backend_buckets::ListUsable::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::backend_buckets::Patch {
super::builder::backend_buckets::Patch::new(self.inner.clone())
}
pub fn set_edge_security_policy(
&self,
) -> super::builder::backend_buckets::SetEdgeSecurityPolicy {
super::builder::backend_buckets::SetEdgeSecurityPolicy::new(self.inner.clone())
}
pub fn set_iam_policy(&self) -> super::builder::backend_buckets::SetIamPolicy {
super::builder::backend_buckets::SetIamPolicy::new(self.inner.clone())
}
pub fn test_iam_permissions(&self) -> super::builder::backend_buckets::TestIamPermissions {
super::builder::backend_buckets::TestIamPermissions::new(self.inner.clone())
}
pub fn update(&self) -> super::builder::backend_buckets::Update {
super::builder::backend_buckets::Update::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::backend_buckets::GetOperation {
super::builder::backend_buckets::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "backend-services")]
#[cfg_attr(docsrs, doc(cfg(feature = "backend-services")))]
#[derive(Clone, Debug)]
pub struct BackendServices {
inner: std::sync::Arc<dyn super::stub::dynamic::BackendServices>,
}
#[cfg(feature = "backend-services")]
impl BackendServices {
pub fn builder() -> super::builder::backend_services::ClientBuilder {
crate::new_client_builder(super::builder::backend_services::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::BackendServices + 'static,
{
Self { inner: stub.into() }
}
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::BackendServices>> {
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::BackendServices> {
super::transport::BackendServices::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::BackendServices> {
Self::build_transport(conf)
.await
.map(super::tracing::BackendServices::new)
}
pub fn add_signed_url_key(&self) -> super::builder::backend_services::AddSignedUrlKey {
super::builder::backend_services::AddSignedUrlKey::new(self.inner.clone())
}
pub fn aggregated_list(&self) -> super::builder::backend_services::AggregatedList {
super::builder::backend_services::AggregatedList::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::backend_services::Delete {
super::builder::backend_services::Delete::new(self.inner.clone())
}
pub fn delete_signed_url_key(&self) -> super::builder::backend_services::DeleteSignedUrlKey {
super::builder::backend_services::DeleteSignedUrlKey::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::backend_services::Get {
super::builder::backend_services::Get::new(self.inner.clone())
}
pub fn get_effective_security_policies(
&self,
) -> super::builder::backend_services::GetEffectiveSecurityPolicies {
super::builder::backend_services::GetEffectiveSecurityPolicies::new(self.inner.clone())
}
pub fn get_health(&self) -> super::builder::backend_services::GetHealth {
super::builder::backend_services::GetHealth::new(self.inner.clone())
}
pub fn get_iam_policy(&self) -> super::builder::backend_services::GetIamPolicy {
super::builder::backend_services::GetIamPolicy::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::backend_services::Insert {
super::builder::backend_services::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::backend_services::List {
super::builder::backend_services::List::new(self.inner.clone())
}
pub fn list_usable(&self) -> super::builder::backend_services::ListUsable {
super::builder::backend_services::ListUsable::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::backend_services::Patch {
super::builder::backend_services::Patch::new(self.inner.clone())
}
pub fn set_edge_security_policy(
&self,
) -> super::builder::backend_services::SetEdgeSecurityPolicy {
super::builder::backend_services::SetEdgeSecurityPolicy::new(self.inner.clone())
}
pub fn set_iam_policy(&self) -> super::builder::backend_services::SetIamPolicy {
super::builder::backend_services::SetIamPolicy::new(self.inner.clone())
}
pub fn set_security_policy(&self) -> super::builder::backend_services::SetSecurityPolicy {
super::builder::backend_services::SetSecurityPolicy::new(self.inner.clone())
}
pub fn test_iam_permissions(&self) -> super::builder::backend_services::TestIamPermissions {
super::builder::backend_services::TestIamPermissions::new(self.inner.clone())
}
pub fn update(&self) -> super::builder::backend_services::Update {
super::builder::backend_services::Update::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::backend_services::GetOperation {
super::builder::backend_services::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "cross-site-networks")]
#[cfg_attr(docsrs, doc(cfg(feature = "cross-site-networks")))]
#[derive(Clone, Debug)]
pub struct CrossSiteNetworks {
inner: std::sync::Arc<dyn super::stub::dynamic::CrossSiteNetworks>,
}
#[cfg(feature = "cross-site-networks")]
impl CrossSiteNetworks {
pub fn builder() -> super::builder::cross_site_networks::ClientBuilder {
crate::new_client_builder(super::builder::cross_site_networks::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::CrossSiteNetworks + 'static,
{
Self { inner: stub.into() }
}
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::CrossSiteNetworks>>
{
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::CrossSiteNetworks> {
super::transport::CrossSiteNetworks::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::CrossSiteNetworks> {
Self::build_transport(conf)
.await
.map(super::tracing::CrossSiteNetworks::new)
}
pub fn delete(&self) -> super::builder::cross_site_networks::Delete {
super::builder::cross_site_networks::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::cross_site_networks::Get {
super::builder::cross_site_networks::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::cross_site_networks::Insert {
super::builder::cross_site_networks::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::cross_site_networks::List {
super::builder::cross_site_networks::List::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::cross_site_networks::Patch {
super::builder::cross_site_networks::Patch::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::cross_site_networks::GetOperation {
super::builder::cross_site_networks::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "disk-types")]
#[cfg_attr(docsrs, doc(cfg(feature = "disk-types")))]
#[derive(Clone, Debug)]
pub struct DiskTypes {
inner: std::sync::Arc<dyn super::stub::dynamic::DiskTypes>,
}
#[cfg(feature = "disk-types")]
impl DiskTypes {
pub fn builder() -> super::builder::disk_types::ClientBuilder {
crate::new_client_builder(super::builder::disk_types::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::DiskTypes + 'static,
{
Self { inner: stub.into() }
}
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::DiskTypes>> {
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::DiskTypes> {
super::transport::DiskTypes::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::DiskTypes> {
Self::build_transport(conf)
.await
.map(super::tracing::DiskTypes::new)
}
pub fn aggregated_list(&self) -> super::builder::disk_types::AggregatedList {
super::builder::disk_types::AggregatedList::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::disk_types::Get {
super::builder::disk_types::Get::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::disk_types::List {
super::builder::disk_types::List::new(self.inner.clone())
}
}
#[cfg(feature = "disks")]
#[cfg_attr(docsrs, doc(cfg(feature = "disks")))]
#[derive(Clone, Debug)]
pub struct Disks {
inner: std::sync::Arc<dyn super::stub::dynamic::Disks>,
}
#[cfg(feature = "disks")]
impl Disks {
pub fn builder() -> super::builder::disks::ClientBuilder {
crate::new_client_builder(super::builder::disks::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::Disks + 'static,
{
Self { inner: stub.into() }
}
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::Disks>> {
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::Disks> {
super::transport::Disks::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::Disks> {
Self::build_transport(conf)
.await
.map(super::tracing::Disks::new)
}
pub fn add_resource_policies(&self) -> super::builder::disks::AddResourcePolicies {
super::builder::disks::AddResourcePolicies::new(self.inner.clone())
}
pub fn aggregated_list(&self) -> super::builder::disks::AggregatedList {
super::builder::disks::AggregatedList::new(self.inner.clone())
}
pub fn bulk_insert(&self) -> super::builder::disks::BulkInsert {
super::builder::disks::BulkInsert::new(self.inner.clone())
}
pub fn bulk_set_labels(&self) -> super::builder::disks::BulkSetLabels {
super::builder::disks::BulkSetLabels::new(self.inner.clone())
}
pub fn create_snapshot(&self) -> super::builder::disks::CreateSnapshot {
super::builder::disks::CreateSnapshot::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::disks::Delete {
super::builder::disks::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::disks::Get {
super::builder::disks::Get::new(self.inner.clone())
}
pub fn get_iam_policy(&self) -> super::builder::disks::GetIamPolicy {
super::builder::disks::GetIamPolicy::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::disks::Insert {
super::builder::disks::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::disks::List {
super::builder::disks::List::new(self.inner.clone())
}
pub fn remove_resource_policies(&self) -> super::builder::disks::RemoveResourcePolicies {
super::builder::disks::RemoveResourcePolicies::new(self.inner.clone())
}
pub fn resize(&self) -> super::builder::disks::Resize {
super::builder::disks::Resize::new(self.inner.clone())
}
pub fn set_iam_policy(&self) -> super::builder::disks::SetIamPolicy {
super::builder::disks::SetIamPolicy::new(self.inner.clone())
}
pub fn set_labels(&self) -> super::builder::disks::SetLabels {
super::builder::disks::SetLabels::new(self.inner.clone())
}
pub fn start_async_replication(&self) -> super::builder::disks::StartAsyncReplication {
super::builder::disks::StartAsyncReplication::new(self.inner.clone())
}
pub fn stop_async_replication(&self) -> super::builder::disks::StopAsyncReplication {
super::builder::disks::StopAsyncReplication::new(self.inner.clone())
}
pub fn stop_group_async_replication(&self) -> super::builder::disks::StopGroupAsyncReplication {
super::builder::disks::StopGroupAsyncReplication::new(self.inner.clone())
}
pub fn test_iam_permissions(&self) -> super::builder::disks::TestIamPermissions {
super::builder::disks::TestIamPermissions::new(self.inner.clone())
}
pub fn update(&self) -> super::builder::disks::Update {
super::builder::disks::Update::new(self.inner.clone())
}
pub fn update_kms_key(&self) -> super::builder::disks::UpdateKmsKey {
super::builder::disks::UpdateKmsKey::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::disks::GetOperation {
super::builder::disks::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "external-vpn-gateways")]
#[cfg_attr(docsrs, doc(cfg(feature = "external-vpn-gateways")))]
#[derive(Clone, Debug)]
pub struct ExternalVpnGateways {
inner: std::sync::Arc<dyn super::stub::dynamic::ExternalVpnGateways>,
}
#[cfg(feature = "external-vpn-gateways")]
impl ExternalVpnGateways {
pub fn builder() -> super::builder::external_vpn_gateways::ClientBuilder {
crate::new_client_builder(super::builder::external_vpn_gateways::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::ExternalVpnGateways + 'static,
{
Self { inner: stub.into() }
}
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::ExternalVpnGateways>>
{
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::ExternalVpnGateways> {
super::transport::ExternalVpnGateways::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::ExternalVpnGateways> {
Self::build_transport(conf)
.await
.map(super::tracing::ExternalVpnGateways::new)
}
pub fn delete(&self) -> super::builder::external_vpn_gateways::Delete {
super::builder::external_vpn_gateways::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::external_vpn_gateways::Get {
super::builder::external_vpn_gateways::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::external_vpn_gateways::Insert {
super::builder::external_vpn_gateways::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::external_vpn_gateways::List {
super::builder::external_vpn_gateways::List::new(self.inner.clone())
}
pub fn set_labels(&self) -> super::builder::external_vpn_gateways::SetLabels {
super::builder::external_vpn_gateways::SetLabels::new(self.inner.clone())
}
pub fn test_iam_permissions(
&self,
) -> super::builder::external_vpn_gateways::TestIamPermissions {
super::builder::external_vpn_gateways::TestIamPermissions::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::external_vpn_gateways::GetOperation {
super::builder::external_vpn_gateways::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "firewall-policies")]
#[cfg_attr(docsrs, doc(cfg(feature = "firewall-policies")))]
#[derive(Clone, Debug)]
pub struct FirewallPolicies {
inner: std::sync::Arc<dyn super::stub::dynamic::FirewallPolicies>,
}
#[cfg(feature = "firewall-policies")]
impl FirewallPolicies {
pub fn builder() -> super::builder::firewall_policies::ClientBuilder {
crate::new_client_builder(super::builder::firewall_policies::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::FirewallPolicies + 'static,
{
Self { inner: stub.into() }
}
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::FirewallPolicies>>
{
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::FirewallPolicies> {
super::transport::FirewallPolicies::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::FirewallPolicies> {
Self::build_transport(conf)
.await
.map(super::tracing::FirewallPolicies::new)
}
pub fn add_association(&self) -> super::builder::firewall_policies::AddAssociation {
super::builder::firewall_policies::AddAssociation::new(self.inner.clone())
}
pub fn add_rule(&self) -> super::builder::firewall_policies::AddRule {
super::builder::firewall_policies::AddRule::new(self.inner.clone())
}
pub fn clone_rules(&self) -> super::builder::firewall_policies::CloneRules {
super::builder::firewall_policies::CloneRules::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::firewall_policies::Delete {
super::builder::firewall_policies::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::firewall_policies::Get {
super::builder::firewall_policies::Get::new(self.inner.clone())
}
pub fn get_association(&self) -> super::builder::firewall_policies::GetAssociation {
super::builder::firewall_policies::GetAssociation::new(self.inner.clone())
}
pub fn get_iam_policy(&self) -> super::builder::firewall_policies::GetIamPolicy {
super::builder::firewall_policies::GetIamPolicy::new(self.inner.clone())
}
pub fn get_rule(&self) -> super::builder::firewall_policies::GetRule {
super::builder::firewall_policies::GetRule::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::firewall_policies::Insert {
super::builder::firewall_policies::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::firewall_policies::List {
super::builder::firewall_policies::List::new(self.inner.clone())
}
pub fn list_associations(&self) -> super::builder::firewall_policies::ListAssociations {
super::builder::firewall_policies::ListAssociations::new(self.inner.clone())
}
pub fn r#move(&self) -> super::builder::firewall_policies::Move {
super::builder::firewall_policies::Move::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::firewall_policies::Patch {
super::builder::firewall_policies::Patch::new(self.inner.clone())
}
pub fn patch_rule(&self) -> super::builder::firewall_policies::PatchRule {
super::builder::firewall_policies::PatchRule::new(self.inner.clone())
}
pub fn remove_association(&self) -> super::builder::firewall_policies::RemoveAssociation {
super::builder::firewall_policies::RemoveAssociation::new(self.inner.clone())
}
pub fn remove_rule(&self) -> super::builder::firewall_policies::RemoveRule {
super::builder::firewall_policies::RemoveRule::new(self.inner.clone())
}
pub fn set_iam_policy(&self) -> super::builder::firewall_policies::SetIamPolicy {
super::builder::firewall_policies::SetIamPolicy::new(self.inner.clone())
}
pub fn test_iam_permissions(&self) -> super::builder::firewall_policies::TestIamPermissions {
super::builder::firewall_policies::TestIamPermissions::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::firewall_policies::GetOperation {
super::builder::firewall_policies::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "firewalls")]
#[cfg_attr(docsrs, doc(cfg(feature = "firewalls")))]
#[derive(Clone, Debug)]
pub struct Firewalls {
inner: std::sync::Arc<dyn super::stub::dynamic::Firewalls>,
}
#[cfg(feature = "firewalls")]
impl Firewalls {
pub fn builder() -> super::builder::firewalls::ClientBuilder {
crate::new_client_builder(super::builder::firewalls::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::Firewalls + 'static,
{
Self { inner: stub.into() }
}
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::Firewalls>> {
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::Firewalls> {
super::transport::Firewalls::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::Firewalls> {
Self::build_transport(conf)
.await
.map(super::tracing::Firewalls::new)
}
pub fn delete(&self) -> super::builder::firewalls::Delete {
super::builder::firewalls::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::firewalls::Get {
super::builder::firewalls::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::firewalls::Insert {
super::builder::firewalls::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::firewalls::List {
super::builder::firewalls::List::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::firewalls::Patch {
super::builder::firewalls::Patch::new(self.inner.clone())
}
pub fn test_iam_permissions(&self) -> super::builder::firewalls::TestIamPermissions {
super::builder::firewalls::TestIamPermissions::new(self.inner.clone())
}
pub fn update(&self) -> super::builder::firewalls::Update {
super::builder::firewalls::Update::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::firewalls::GetOperation {
super::builder::firewalls::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "forwarding-rules")]
#[cfg_attr(docsrs, doc(cfg(feature = "forwarding-rules")))]
#[derive(Clone, Debug)]
pub struct ForwardingRules {
inner: std::sync::Arc<dyn super::stub::dynamic::ForwardingRules>,
}
#[cfg(feature = "forwarding-rules")]
impl ForwardingRules {
pub fn builder() -> super::builder::forwarding_rules::ClientBuilder {
crate::new_client_builder(super::builder::forwarding_rules::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::ForwardingRules + 'static,
{
Self { inner: stub.into() }
}
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::ForwardingRules>> {
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::ForwardingRules> {
super::transport::ForwardingRules::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::ForwardingRules> {
Self::build_transport(conf)
.await
.map(super::tracing::ForwardingRules::new)
}
pub fn aggregated_list(&self) -> super::builder::forwarding_rules::AggregatedList {
super::builder::forwarding_rules::AggregatedList::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::forwarding_rules::Delete {
super::builder::forwarding_rules::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::forwarding_rules::Get {
super::builder::forwarding_rules::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::forwarding_rules::Insert {
super::builder::forwarding_rules::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::forwarding_rules::List {
super::builder::forwarding_rules::List::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::forwarding_rules::Patch {
super::builder::forwarding_rules::Patch::new(self.inner.clone())
}
pub fn set_labels(&self) -> super::builder::forwarding_rules::SetLabels {
super::builder::forwarding_rules::SetLabels::new(self.inner.clone())
}
pub fn set_target(&self) -> super::builder::forwarding_rules::SetTarget {
super::builder::forwarding_rules::SetTarget::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::forwarding_rules::GetOperation {
super::builder::forwarding_rules::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "future-reservations")]
#[cfg_attr(docsrs, doc(cfg(feature = "future-reservations")))]
#[derive(Clone, Debug)]
pub struct FutureReservations {
inner: std::sync::Arc<dyn super::stub::dynamic::FutureReservations>,
}
#[cfg(feature = "future-reservations")]
impl FutureReservations {
pub fn builder() -> super::builder::future_reservations::ClientBuilder {
crate::new_client_builder(super::builder::future_reservations::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::FutureReservations + 'static,
{
Self { inner: stub.into() }
}
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::FutureReservations>>
{
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::FutureReservations> {
super::transport::FutureReservations::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::FutureReservations> {
Self::build_transport(conf)
.await
.map(super::tracing::FutureReservations::new)
}
pub fn aggregated_list(&self) -> super::builder::future_reservations::AggregatedList {
super::builder::future_reservations::AggregatedList::new(self.inner.clone())
}
pub fn cancel(&self) -> super::builder::future_reservations::Cancel {
super::builder::future_reservations::Cancel::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::future_reservations::Delete {
super::builder::future_reservations::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::future_reservations::Get {
super::builder::future_reservations::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::future_reservations::Insert {
super::builder::future_reservations::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::future_reservations::List {
super::builder::future_reservations::List::new(self.inner.clone())
}
pub fn update(&self) -> super::builder::future_reservations::Update {
super::builder::future_reservations::Update::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::future_reservations::GetOperation {
super::builder::future_reservations::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "global-addresses")]
#[cfg_attr(docsrs, doc(cfg(feature = "global-addresses")))]
#[derive(Clone, Debug)]
pub struct GlobalAddresses {
inner: std::sync::Arc<dyn super::stub::dynamic::GlobalAddresses>,
}
#[cfg(feature = "global-addresses")]
impl GlobalAddresses {
pub fn builder() -> super::builder::global_addresses::ClientBuilder {
crate::new_client_builder(super::builder::global_addresses::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::GlobalAddresses + 'static,
{
Self { inner: stub.into() }
}
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::GlobalAddresses>> {
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::GlobalAddresses> {
super::transport::GlobalAddresses::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::GlobalAddresses> {
Self::build_transport(conf)
.await
.map(super::tracing::GlobalAddresses::new)
}
pub fn delete(&self) -> super::builder::global_addresses::Delete {
super::builder::global_addresses::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::global_addresses::Get {
super::builder::global_addresses::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::global_addresses::Insert {
super::builder::global_addresses::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::global_addresses::List {
super::builder::global_addresses::List::new(self.inner.clone())
}
pub fn r#move(&self) -> super::builder::global_addresses::Move {
super::builder::global_addresses::Move::new(self.inner.clone())
}
pub fn set_labels(&self) -> super::builder::global_addresses::SetLabels {
super::builder::global_addresses::SetLabels::new(self.inner.clone())
}
pub fn test_iam_permissions(&self) -> super::builder::global_addresses::TestIamPermissions {
super::builder::global_addresses::TestIamPermissions::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::global_addresses::GetOperation {
super::builder::global_addresses::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "global-forwarding-rules")]
#[cfg_attr(docsrs, doc(cfg(feature = "global-forwarding-rules")))]
#[derive(Clone, Debug)]
pub struct GlobalForwardingRules {
inner: std::sync::Arc<dyn super::stub::dynamic::GlobalForwardingRules>,
}
#[cfg(feature = "global-forwarding-rules")]
impl GlobalForwardingRules {
pub fn builder() -> super::builder::global_forwarding_rules::ClientBuilder {
crate::new_client_builder(super::builder::global_forwarding_rules::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::GlobalForwardingRules + 'static,
{
Self { inner: stub.into() }
}
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::GlobalForwardingRules>>
{
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::GlobalForwardingRules> {
super::transport::GlobalForwardingRules::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::GlobalForwardingRules> {
Self::build_transport(conf)
.await
.map(super::tracing::GlobalForwardingRules::new)
}
pub fn delete(&self) -> super::builder::global_forwarding_rules::Delete {
super::builder::global_forwarding_rules::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::global_forwarding_rules::Get {
super::builder::global_forwarding_rules::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::global_forwarding_rules::Insert {
super::builder::global_forwarding_rules::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::global_forwarding_rules::List {
super::builder::global_forwarding_rules::List::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::global_forwarding_rules::Patch {
super::builder::global_forwarding_rules::Patch::new(self.inner.clone())
}
pub fn set_labels(&self) -> super::builder::global_forwarding_rules::SetLabels {
super::builder::global_forwarding_rules::SetLabels::new(self.inner.clone())
}
pub fn set_target(&self) -> super::builder::global_forwarding_rules::SetTarget {
super::builder::global_forwarding_rules::SetTarget::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::global_forwarding_rules::GetOperation {
super::builder::global_forwarding_rules::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "global-network-endpoint-groups")]
#[cfg_attr(docsrs, doc(cfg(feature = "global-network-endpoint-groups")))]
#[derive(Clone, Debug)]
pub struct GlobalNetworkEndpointGroups {
inner: std::sync::Arc<dyn super::stub::dynamic::GlobalNetworkEndpointGroups>,
}
#[cfg(feature = "global-network-endpoint-groups")]
impl GlobalNetworkEndpointGroups {
pub fn builder() -> super::builder::global_network_endpoint_groups::ClientBuilder {
crate::new_client_builder(super::builder::global_network_endpoint_groups::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::GlobalNetworkEndpointGroups + 'static,
{
Self { inner: stub.into() }
}
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::GlobalNetworkEndpointGroups>,
> {
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::GlobalNetworkEndpointGroups> {
super::transport::GlobalNetworkEndpointGroups::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::GlobalNetworkEndpointGroups> {
Self::build_transport(conf)
.await
.map(super::tracing::GlobalNetworkEndpointGroups::new)
}
pub fn attach_network_endpoints(
&self,
) -> super::builder::global_network_endpoint_groups::AttachNetworkEndpoints {
super::builder::global_network_endpoint_groups::AttachNetworkEndpoints::new(
self.inner.clone(),
)
}
pub fn delete(&self) -> super::builder::global_network_endpoint_groups::Delete {
super::builder::global_network_endpoint_groups::Delete::new(self.inner.clone())
}
pub fn detach_network_endpoints(
&self,
) -> super::builder::global_network_endpoint_groups::DetachNetworkEndpoints {
super::builder::global_network_endpoint_groups::DetachNetworkEndpoints::new(
self.inner.clone(),
)
}
pub fn get(&self) -> super::builder::global_network_endpoint_groups::Get {
super::builder::global_network_endpoint_groups::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::global_network_endpoint_groups::Insert {
super::builder::global_network_endpoint_groups::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::global_network_endpoint_groups::List {
super::builder::global_network_endpoint_groups::List::new(self.inner.clone())
}
pub fn list_network_endpoints(
&self,
) -> super::builder::global_network_endpoint_groups::ListNetworkEndpoints {
super::builder::global_network_endpoint_groups::ListNetworkEndpoints::new(
self.inner.clone(),
)
}
pub fn get_operation(&self) -> super::builder::global_network_endpoint_groups::GetOperation {
super::builder::global_network_endpoint_groups::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "global-operations")]
#[cfg_attr(docsrs, doc(cfg(feature = "global-operations")))]
#[derive(Clone, Debug)]
pub struct GlobalOperations {
inner: std::sync::Arc<dyn super::stub::dynamic::GlobalOperations>,
}
#[cfg(feature = "global-operations")]
impl GlobalOperations {
pub fn builder() -> super::builder::global_operations::ClientBuilder {
crate::new_client_builder(super::builder::global_operations::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::GlobalOperations + 'static,
{
Self { inner: stub.into() }
}
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::GlobalOperations>>
{
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::GlobalOperations> {
super::transport::GlobalOperations::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::GlobalOperations> {
Self::build_transport(conf)
.await
.map(super::tracing::GlobalOperations::new)
}
pub fn aggregated_list(&self) -> super::builder::global_operations::AggregatedList {
super::builder::global_operations::AggregatedList::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::global_operations::Delete {
super::builder::global_operations::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::global_operations::Get {
super::builder::global_operations::Get::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::global_operations::List {
super::builder::global_operations::List::new(self.inner.clone())
}
pub fn wait(&self) -> super::builder::global_operations::Wait {
super::builder::global_operations::Wait::new(self.inner.clone())
}
}
#[cfg(feature = "global-organization-operations")]
#[cfg_attr(docsrs, doc(cfg(feature = "global-organization-operations")))]
#[derive(Clone, Debug)]
pub struct GlobalOrganizationOperations {
inner: std::sync::Arc<dyn super::stub::dynamic::GlobalOrganizationOperations>,
}
#[cfg(feature = "global-organization-operations")]
impl GlobalOrganizationOperations {
pub fn builder() -> super::builder::global_organization_operations::ClientBuilder {
crate::new_client_builder(super::builder::global_organization_operations::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::GlobalOrganizationOperations + 'static,
{
Self { inner: stub.into() }
}
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::GlobalOrganizationOperations>,
> {
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::GlobalOrganizationOperations> {
super::transport::GlobalOrganizationOperations::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::GlobalOrganizationOperations> {
Self::build_transport(conf)
.await
.map(super::tracing::GlobalOrganizationOperations::new)
}
pub fn delete(&self) -> super::builder::global_organization_operations::Delete {
super::builder::global_organization_operations::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::global_organization_operations::Get {
super::builder::global_organization_operations::Get::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::global_organization_operations::List {
super::builder::global_organization_operations::List::new(self.inner.clone())
}
}
#[cfg(feature = "global-public-delegated-prefixes")]
#[cfg_attr(docsrs, doc(cfg(feature = "global-public-delegated-prefixes")))]
#[derive(Clone, Debug)]
pub struct GlobalPublicDelegatedPrefixes {
inner: std::sync::Arc<dyn super::stub::dynamic::GlobalPublicDelegatedPrefixes>,
}
#[cfg(feature = "global-public-delegated-prefixes")]
impl GlobalPublicDelegatedPrefixes {
pub fn builder() -> super::builder::global_public_delegated_prefixes::ClientBuilder {
crate::new_client_builder(super::builder::global_public_delegated_prefixes::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::GlobalPublicDelegatedPrefixes + 'static,
{
Self { inner: stub.into() }
}
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::GlobalPublicDelegatedPrefixes>,
> {
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::GlobalPublicDelegatedPrefixes> {
super::transport::GlobalPublicDelegatedPrefixes::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::GlobalPublicDelegatedPrefixes> {
Self::build_transport(conf)
.await
.map(super::tracing::GlobalPublicDelegatedPrefixes::new)
}
pub fn delete(&self) -> super::builder::global_public_delegated_prefixes::Delete {
super::builder::global_public_delegated_prefixes::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::global_public_delegated_prefixes::Get {
super::builder::global_public_delegated_prefixes::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::global_public_delegated_prefixes::Insert {
super::builder::global_public_delegated_prefixes::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::global_public_delegated_prefixes::List {
super::builder::global_public_delegated_prefixes::List::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::global_public_delegated_prefixes::Patch {
super::builder::global_public_delegated_prefixes::Patch::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::global_public_delegated_prefixes::GetOperation {
super::builder::global_public_delegated_prefixes::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "health-checks")]
#[cfg_attr(docsrs, doc(cfg(feature = "health-checks")))]
#[derive(Clone, Debug)]
pub struct HealthChecks {
inner: std::sync::Arc<dyn super::stub::dynamic::HealthChecks>,
}
#[cfg(feature = "health-checks")]
impl HealthChecks {
pub fn builder() -> super::builder::health_checks::ClientBuilder {
crate::new_client_builder(super::builder::health_checks::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::HealthChecks + 'static,
{
Self { inner: stub.into() }
}
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::HealthChecks>> {
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::HealthChecks> {
super::transport::HealthChecks::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::HealthChecks> {
Self::build_transport(conf)
.await
.map(super::tracing::HealthChecks::new)
}
pub fn aggregated_list(&self) -> super::builder::health_checks::AggregatedList {
super::builder::health_checks::AggregatedList::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::health_checks::Delete {
super::builder::health_checks::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::health_checks::Get {
super::builder::health_checks::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::health_checks::Insert {
super::builder::health_checks::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::health_checks::List {
super::builder::health_checks::List::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::health_checks::Patch {
super::builder::health_checks::Patch::new(self.inner.clone())
}
pub fn test_iam_permissions(&self) -> super::builder::health_checks::TestIamPermissions {
super::builder::health_checks::TestIamPermissions::new(self.inner.clone())
}
pub fn update(&self) -> super::builder::health_checks::Update {
super::builder::health_checks::Update::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::health_checks::GetOperation {
super::builder::health_checks::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "http-health-checks")]
#[cfg_attr(docsrs, doc(cfg(feature = "http-health-checks")))]
#[derive(Clone, Debug)]
pub struct HttpHealthChecks {
inner: std::sync::Arc<dyn super::stub::dynamic::HttpHealthChecks>,
}
#[cfg(feature = "http-health-checks")]
impl HttpHealthChecks {
pub fn builder() -> super::builder::http_health_checks::ClientBuilder {
crate::new_client_builder(super::builder::http_health_checks::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::HttpHealthChecks + 'static,
{
Self { inner: stub.into() }
}
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::HttpHealthChecks>>
{
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::HttpHealthChecks> {
super::transport::HttpHealthChecks::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::HttpHealthChecks> {
Self::build_transport(conf)
.await
.map(super::tracing::HttpHealthChecks::new)
}
pub fn delete(&self) -> super::builder::http_health_checks::Delete {
super::builder::http_health_checks::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::http_health_checks::Get {
super::builder::http_health_checks::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::http_health_checks::Insert {
super::builder::http_health_checks::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::http_health_checks::List {
super::builder::http_health_checks::List::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::http_health_checks::Patch {
super::builder::http_health_checks::Patch::new(self.inner.clone())
}
pub fn test_iam_permissions(&self) -> super::builder::http_health_checks::TestIamPermissions {
super::builder::http_health_checks::TestIamPermissions::new(self.inner.clone())
}
pub fn update(&self) -> super::builder::http_health_checks::Update {
super::builder::http_health_checks::Update::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::http_health_checks::GetOperation {
super::builder::http_health_checks::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "https-health-checks")]
#[cfg_attr(docsrs, doc(cfg(feature = "https-health-checks")))]
#[derive(Clone, Debug)]
pub struct HttpsHealthChecks {
inner: std::sync::Arc<dyn super::stub::dynamic::HttpsHealthChecks>,
}
#[cfg(feature = "https-health-checks")]
impl HttpsHealthChecks {
pub fn builder() -> super::builder::https_health_checks::ClientBuilder {
crate::new_client_builder(super::builder::https_health_checks::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::HttpsHealthChecks + 'static,
{
Self { inner: stub.into() }
}
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::HttpsHealthChecks>>
{
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::HttpsHealthChecks> {
super::transport::HttpsHealthChecks::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::HttpsHealthChecks> {
Self::build_transport(conf)
.await
.map(super::tracing::HttpsHealthChecks::new)
}
pub fn delete(&self) -> super::builder::https_health_checks::Delete {
super::builder::https_health_checks::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::https_health_checks::Get {
super::builder::https_health_checks::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::https_health_checks::Insert {
super::builder::https_health_checks::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::https_health_checks::List {
super::builder::https_health_checks::List::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::https_health_checks::Patch {
super::builder::https_health_checks::Patch::new(self.inner.clone())
}
pub fn test_iam_permissions(&self) -> super::builder::https_health_checks::TestIamPermissions {
super::builder::https_health_checks::TestIamPermissions::new(self.inner.clone())
}
pub fn update(&self) -> super::builder::https_health_checks::Update {
super::builder::https_health_checks::Update::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::https_health_checks::GetOperation {
super::builder::https_health_checks::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "image-family-views")]
#[cfg_attr(docsrs, doc(cfg(feature = "image-family-views")))]
#[derive(Clone, Debug)]
pub struct ImageFamilyViews {
inner: std::sync::Arc<dyn super::stub::dynamic::ImageFamilyViews>,
}
#[cfg(feature = "image-family-views")]
impl ImageFamilyViews {
pub fn builder() -> super::builder::image_family_views::ClientBuilder {
crate::new_client_builder(super::builder::image_family_views::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::ImageFamilyViews + 'static,
{
Self { inner: stub.into() }
}
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::ImageFamilyViews>>
{
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::ImageFamilyViews> {
super::transport::ImageFamilyViews::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::ImageFamilyViews> {
Self::build_transport(conf)
.await
.map(super::tracing::ImageFamilyViews::new)
}
pub fn get(&self) -> super::builder::image_family_views::Get {
super::builder::image_family_views::Get::new(self.inner.clone())
}
}
#[cfg(feature = "images")]
#[cfg_attr(docsrs, doc(cfg(feature = "images")))]
#[derive(Clone, Debug)]
pub struct Images {
inner: std::sync::Arc<dyn super::stub::dynamic::Images>,
}
#[cfg(feature = "images")]
impl Images {
pub fn builder() -> super::builder::images::ClientBuilder {
crate::new_client_builder(super::builder::images::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::Images + 'static,
{
Self { inner: stub.into() }
}
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::Images>> {
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::Images> {
super::transport::Images::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::Images> {
Self::build_transport(conf)
.await
.map(super::tracing::Images::new)
}
pub fn delete(&self) -> super::builder::images::Delete {
super::builder::images::Delete::new(self.inner.clone())
}
pub fn deprecate(&self) -> super::builder::images::Deprecate {
super::builder::images::Deprecate::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::images::Get {
super::builder::images::Get::new(self.inner.clone())
}
pub fn get_from_family(&self) -> super::builder::images::GetFromFamily {
super::builder::images::GetFromFamily::new(self.inner.clone())
}
pub fn get_iam_policy(&self) -> super::builder::images::GetIamPolicy {
super::builder::images::GetIamPolicy::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::images::Insert {
super::builder::images::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::images::List {
super::builder::images::List::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::images::Patch {
super::builder::images::Patch::new(self.inner.clone())
}
pub fn set_iam_policy(&self) -> super::builder::images::SetIamPolicy {
super::builder::images::SetIamPolicy::new(self.inner.clone())
}
pub fn set_labels(&self) -> super::builder::images::SetLabels {
super::builder::images::SetLabels::new(self.inner.clone())
}
pub fn test_iam_permissions(&self) -> super::builder::images::TestIamPermissions {
super::builder::images::TestIamPermissions::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::images::GetOperation {
super::builder::images::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "instance-group-manager-resize-requests")]
#[cfg_attr(docsrs, doc(cfg(feature = "instance-group-manager-resize-requests")))]
#[derive(Clone, Debug)]
pub struct InstanceGroupManagerResizeRequests {
inner: std::sync::Arc<dyn super::stub::dynamic::InstanceGroupManagerResizeRequests>,
}
#[cfg(feature = "instance-group-manager-resize-requests")]
impl InstanceGroupManagerResizeRequests {
pub fn builder() -> super::builder::instance_group_manager_resize_requests::ClientBuilder {
crate::new_client_builder(
super::builder::instance_group_manager_resize_requests::client::Factory,
)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::InstanceGroupManagerResizeRequests + 'static,
{
Self { inner: stub.into() }
}
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::InstanceGroupManagerResizeRequests>,
> {
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::InstanceGroupManagerResizeRequests> {
super::transport::InstanceGroupManagerResizeRequests::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::InstanceGroupManagerResizeRequests> {
Self::build_transport(conf)
.await
.map(super::tracing::InstanceGroupManagerResizeRequests::new)
}
pub fn cancel(&self) -> super::builder::instance_group_manager_resize_requests::Cancel {
super::builder::instance_group_manager_resize_requests::Cancel::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::instance_group_manager_resize_requests::Delete {
super::builder::instance_group_manager_resize_requests::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::instance_group_manager_resize_requests::Get {
super::builder::instance_group_manager_resize_requests::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::instance_group_manager_resize_requests::Insert {
super::builder::instance_group_manager_resize_requests::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::instance_group_manager_resize_requests::List {
super::builder::instance_group_manager_resize_requests::List::new(self.inner.clone())
}
pub fn get_operation(
&self,
) -> super::builder::instance_group_manager_resize_requests::GetOperation {
super::builder::instance_group_manager_resize_requests::GetOperation::new(
self.inner.clone(),
)
}
}
#[cfg(feature = "instance-group-managers")]
#[cfg_attr(docsrs, doc(cfg(feature = "instance-group-managers")))]
#[derive(Clone, Debug)]
pub struct InstanceGroupManagers {
inner: std::sync::Arc<dyn super::stub::dynamic::InstanceGroupManagers>,
}
#[cfg(feature = "instance-group-managers")]
impl InstanceGroupManagers {
pub fn builder() -> super::builder::instance_group_managers::ClientBuilder {
crate::new_client_builder(super::builder::instance_group_managers::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::InstanceGroupManagers + 'static,
{
Self { inner: stub.into() }
}
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::InstanceGroupManagers>>
{
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::InstanceGroupManagers> {
super::transport::InstanceGroupManagers::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::InstanceGroupManagers> {
Self::build_transport(conf)
.await
.map(super::tracing::InstanceGroupManagers::new)
}
pub fn abandon_instances(&self) -> super::builder::instance_group_managers::AbandonInstances {
super::builder::instance_group_managers::AbandonInstances::new(self.inner.clone())
}
pub fn aggregated_list(&self) -> super::builder::instance_group_managers::AggregatedList {
super::builder::instance_group_managers::AggregatedList::new(self.inner.clone())
}
pub fn apply_updates_to_instances(
&self,
) -> super::builder::instance_group_managers::ApplyUpdatesToInstances {
super::builder::instance_group_managers::ApplyUpdatesToInstances::new(self.inner.clone())
}
pub fn create_instances(&self) -> super::builder::instance_group_managers::CreateInstances {
super::builder::instance_group_managers::CreateInstances::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::instance_group_managers::Delete {
super::builder::instance_group_managers::Delete::new(self.inner.clone())
}
pub fn delete_instances(&self) -> super::builder::instance_group_managers::DeleteInstances {
super::builder::instance_group_managers::DeleteInstances::new(self.inner.clone())
}
pub fn delete_per_instance_configs(
&self,
) -> super::builder::instance_group_managers::DeletePerInstanceConfigs {
super::builder::instance_group_managers::DeletePerInstanceConfigs::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::instance_group_managers::Get {
super::builder::instance_group_managers::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::instance_group_managers::Insert {
super::builder::instance_group_managers::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::instance_group_managers::List {
super::builder::instance_group_managers::List::new(self.inner.clone())
}
pub fn list_errors(&self) -> super::builder::instance_group_managers::ListErrors {
super::builder::instance_group_managers::ListErrors::new(self.inner.clone())
}
pub fn list_managed_instances(
&self,
) -> super::builder::instance_group_managers::ListManagedInstances {
super::builder::instance_group_managers::ListManagedInstances::new(self.inner.clone())
}
pub fn list_per_instance_configs(
&self,
) -> super::builder::instance_group_managers::ListPerInstanceConfigs {
super::builder::instance_group_managers::ListPerInstanceConfigs::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::instance_group_managers::Patch {
super::builder::instance_group_managers::Patch::new(self.inner.clone())
}
pub fn patch_per_instance_configs(
&self,
) -> super::builder::instance_group_managers::PatchPerInstanceConfigs {
super::builder::instance_group_managers::PatchPerInstanceConfigs::new(self.inner.clone())
}
pub fn recreate_instances(&self) -> super::builder::instance_group_managers::RecreateInstances {
super::builder::instance_group_managers::RecreateInstances::new(self.inner.clone())
}
pub fn resize(&self) -> super::builder::instance_group_managers::Resize {
super::builder::instance_group_managers::Resize::new(self.inner.clone())
}
pub fn resume_instances(&self) -> super::builder::instance_group_managers::ResumeInstances {
super::builder::instance_group_managers::ResumeInstances::new(self.inner.clone())
}
pub fn set_instance_template(
&self,
) -> super::builder::instance_group_managers::SetInstanceTemplate {
super::builder::instance_group_managers::SetInstanceTemplate::new(self.inner.clone())
}
pub fn set_target_pools(&self) -> super::builder::instance_group_managers::SetTargetPools {
super::builder::instance_group_managers::SetTargetPools::new(self.inner.clone())
}
pub fn start_instances(&self) -> super::builder::instance_group_managers::StartInstances {
super::builder::instance_group_managers::StartInstances::new(self.inner.clone())
}
pub fn stop_instances(&self) -> super::builder::instance_group_managers::StopInstances {
super::builder::instance_group_managers::StopInstances::new(self.inner.clone())
}
pub fn suspend_instances(&self) -> super::builder::instance_group_managers::SuspendInstances {
super::builder::instance_group_managers::SuspendInstances::new(self.inner.clone())
}
pub fn update_per_instance_configs(
&self,
) -> super::builder::instance_group_managers::UpdatePerInstanceConfigs {
super::builder::instance_group_managers::UpdatePerInstanceConfigs::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::instance_group_managers::GetOperation {
super::builder::instance_group_managers::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "instance-groups")]
#[cfg_attr(docsrs, doc(cfg(feature = "instance-groups")))]
#[derive(Clone, Debug)]
pub struct InstanceGroups {
inner: std::sync::Arc<dyn super::stub::dynamic::InstanceGroups>,
}
#[cfg(feature = "instance-groups")]
impl InstanceGroups {
pub fn builder() -> super::builder::instance_groups::ClientBuilder {
crate::new_client_builder(super::builder::instance_groups::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::InstanceGroups + 'static,
{
Self { inner: stub.into() }
}
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::InstanceGroups>> {
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::InstanceGroups> {
super::transport::InstanceGroups::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::InstanceGroups> {
Self::build_transport(conf)
.await
.map(super::tracing::InstanceGroups::new)
}
pub fn add_instances(&self) -> super::builder::instance_groups::AddInstances {
super::builder::instance_groups::AddInstances::new(self.inner.clone())
}
pub fn aggregated_list(&self) -> super::builder::instance_groups::AggregatedList {
super::builder::instance_groups::AggregatedList::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::instance_groups::Delete {
super::builder::instance_groups::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::instance_groups::Get {
super::builder::instance_groups::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::instance_groups::Insert {
super::builder::instance_groups::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::instance_groups::List {
super::builder::instance_groups::List::new(self.inner.clone())
}
pub fn list_instances(&self) -> super::builder::instance_groups::ListInstances {
super::builder::instance_groups::ListInstances::new(self.inner.clone())
}
pub fn remove_instances(&self) -> super::builder::instance_groups::RemoveInstances {
super::builder::instance_groups::RemoveInstances::new(self.inner.clone())
}
pub fn set_named_ports(&self) -> super::builder::instance_groups::SetNamedPorts {
super::builder::instance_groups::SetNamedPorts::new(self.inner.clone())
}
pub fn test_iam_permissions(&self) -> super::builder::instance_groups::TestIamPermissions {
super::builder::instance_groups::TestIamPermissions::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::instance_groups::GetOperation {
super::builder::instance_groups::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "instance-settings")]
#[cfg_attr(docsrs, doc(cfg(feature = "instance-settings")))]
#[derive(Clone, Debug)]
pub struct InstanceSettings {
inner: std::sync::Arc<dyn super::stub::dynamic::InstanceSettings>,
}
#[cfg(feature = "instance-settings")]
impl InstanceSettings {
pub fn builder() -> super::builder::instance_settings::ClientBuilder {
crate::new_client_builder(super::builder::instance_settings::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::InstanceSettings + 'static,
{
Self { inner: stub.into() }
}
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::InstanceSettings>>
{
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::InstanceSettings> {
super::transport::InstanceSettings::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::InstanceSettings> {
Self::build_transport(conf)
.await
.map(super::tracing::InstanceSettings::new)
}
pub fn get(&self) -> super::builder::instance_settings::Get {
super::builder::instance_settings::Get::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::instance_settings::Patch {
super::builder::instance_settings::Patch::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::instance_settings::GetOperation {
super::builder::instance_settings::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "instance-templates")]
#[cfg_attr(docsrs, doc(cfg(feature = "instance-templates")))]
#[derive(Clone, Debug)]
pub struct InstanceTemplates {
inner: std::sync::Arc<dyn super::stub::dynamic::InstanceTemplates>,
}
#[cfg(feature = "instance-templates")]
impl InstanceTemplates {
pub fn builder() -> super::builder::instance_templates::ClientBuilder {
crate::new_client_builder(super::builder::instance_templates::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::InstanceTemplates + 'static,
{
Self { inner: stub.into() }
}
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::InstanceTemplates>>
{
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::InstanceTemplates> {
super::transport::InstanceTemplates::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::InstanceTemplates> {
Self::build_transport(conf)
.await
.map(super::tracing::InstanceTemplates::new)
}
pub fn aggregated_list(&self) -> super::builder::instance_templates::AggregatedList {
super::builder::instance_templates::AggregatedList::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::instance_templates::Delete {
super::builder::instance_templates::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::instance_templates::Get {
super::builder::instance_templates::Get::new(self.inner.clone())
}
pub fn get_iam_policy(&self) -> super::builder::instance_templates::GetIamPolicy {
super::builder::instance_templates::GetIamPolicy::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::instance_templates::Insert {
super::builder::instance_templates::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::instance_templates::List {
super::builder::instance_templates::List::new(self.inner.clone())
}
pub fn set_iam_policy(&self) -> super::builder::instance_templates::SetIamPolicy {
super::builder::instance_templates::SetIamPolicy::new(self.inner.clone())
}
pub fn test_iam_permissions(&self) -> super::builder::instance_templates::TestIamPermissions {
super::builder::instance_templates::TestIamPermissions::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::instance_templates::GetOperation {
super::builder::instance_templates::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "instances")]
#[cfg_attr(docsrs, doc(cfg(feature = "instances")))]
#[derive(Clone, Debug)]
pub struct Instances {
inner: std::sync::Arc<dyn super::stub::dynamic::Instances>,
}
#[cfg(feature = "instances")]
impl Instances {
pub fn builder() -> super::builder::instances::ClientBuilder {
crate::new_client_builder(super::builder::instances::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::Instances + 'static,
{
Self { inner: stub.into() }
}
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::Instances>> {
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::Instances> {
super::transport::Instances::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::Instances> {
Self::build_transport(conf)
.await
.map(super::tracing::Instances::new)
}
pub fn add_access_config(&self) -> super::builder::instances::AddAccessConfig {
super::builder::instances::AddAccessConfig::new(self.inner.clone())
}
pub fn add_network_interface(&self) -> super::builder::instances::AddNetworkInterface {
super::builder::instances::AddNetworkInterface::new(self.inner.clone())
}
pub fn add_resource_policies(&self) -> super::builder::instances::AddResourcePolicies {
super::builder::instances::AddResourcePolicies::new(self.inner.clone())
}
pub fn aggregated_list(&self) -> super::builder::instances::AggregatedList {
super::builder::instances::AggregatedList::new(self.inner.clone())
}
pub fn attach_disk(&self) -> super::builder::instances::AttachDisk {
super::builder::instances::AttachDisk::new(self.inner.clone())
}
pub fn bulk_insert(&self) -> super::builder::instances::BulkInsert {
super::builder::instances::BulkInsert::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::instances::Delete {
super::builder::instances::Delete::new(self.inner.clone())
}
pub fn delete_access_config(&self) -> super::builder::instances::DeleteAccessConfig {
super::builder::instances::DeleteAccessConfig::new(self.inner.clone())
}
pub fn delete_network_interface(&self) -> super::builder::instances::DeleteNetworkInterface {
super::builder::instances::DeleteNetworkInterface::new(self.inner.clone())
}
pub fn detach_disk(&self) -> super::builder::instances::DetachDisk {
super::builder::instances::DetachDisk::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::instances::Get {
super::builder::instances::Get::new(self.inner.clone())
}
pub fn get_effective_firewalls(&self) -> super::builder::instances::GetEffectiveFirewalls {
super::builder::instances::GetEffectiveFirewalls::new(self.inner.clone())
}
pub fn get_guest_attributes(&self) -> super::builder::instances::GetGuestAttributes {
super::builder::instances::GetGuestAttributes::new(self.inner.clone())
}
pub fn get_iam_policy(&self) -> super::builder::instances::GetIamPolicy {
super::builder::instances::GetIamPolicy::new(self.inner.clone())
}
pub fn get_screenshot(&self) -> super::builder::instances::GetScreenshot {
super::builder::instances::GetScreenshot::new(self.inner.clone())
}
pub fn get_serial_port_output(&self) -> super::builder::instances::GetSerialPortOutput {
super::builder::instances::GetSerialPortOutput::new(self.inner.clone())
}
pub fn get_shielded_instance_identity(
&self,
) -> super::builder::instances::GetShieldedInstanceIdentity {
super::builder::instances::GetShieldedInstanceIdentity::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::instances::Insert {
super::builder::instances::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::instances::List {
super::builder::instances::List::new(self.inner.clone())
}
pub fn list_referrers(&self) -> super::builder::instances::ListReferrers {
super::builder::instances::ListReferrers::new(self.inner.clone())
}
pub fn perform_maintenance(&self) -> super::builder::instances::PerformMaintenance {
super::builder::instances::PerformMaintenance::new(self.inner.clone())
}
pub fn remove_resource_policies(&self) -> super::builder::instances::RemoveResourcePolicies {
super::builder::instances::RemoveResourcePolicies::new(self.inner.clone())
}
pub fn report_host_as_faulty(&self) -> super::builder::instances::ReportHostAsFaulty {
super::builder::instances::ReportHostAsFaulty::new(self.inner.clone())
}
pub fn reset(&self) -> super::builder::instances::Reset {
super::builder::instances::Reset::new(self.inner.clone())
}
pub fn resume(&self) -> super::builder::instances::Resume {
super::builder::instances::Resume::new(self.inner.clone())
}
pub fn send_diagnostic_interrupt(&self) -> super::builder::instances::SendDiagnosticInterrupt {
super::builder::instances::SendDiagnosticInterrupt::new(self.inner.clone())
}
pub fn set_deletion_protection(&self) -> super::builder::instances::SetDeletionProtection {
super::builder::instances::SetDeletionProtection::new(self.inner.clone())
}
pub fn set_disk_auto_delete(&self) -> super::builder::instances::SetDiskAutoDelete {
super::builder::instances::SetDiskAutoDelete::new(self.inner.clone())
}
pub fn set_iam_policy(&self) -> super::builder::instances::SetIamPolicy {
super::builder::instances::SetIamPolicy::new(self.inner.clone())
}
pub fn set_labels(&self) -> super::builder::instances::SetLabels {
super::builder::instances::SetLabels::new(self.inner.clone())
}
pub fn set_machine_resources(&self) -> super::builder::instances::SetMachineResources {
super::builder::instances::SetMachineResources::new(self.inner.clone())
}
pub fn set_machine_type(&self) -> super::builder::instances::SetMachineType {
super::builder::instances::SetMachineType::new(self.inner.clone())
}
pub fn set_metadata(&self) -> super::builder::instances::SetMetadata {
super::builder::instances::SetMetadata::new(self.inner.clone())
}
pub fn set_min_cpu_platform(&self) -> super::builder::instances::SetMinCpuPlatform {
super::builder::instances::SetMinCpuPlatform::new(self.inner.clone())
}
pub fn set_name(&self) -> super::builder::instances::SetName {
super::builder::instances::SetName::new(self.inner.clone())
}
pub fn set_scheduling(&self) -> super::builder::instances::SetScheduling {
super::builder::instances::SetScheduling::new(self.inner.clone())
}
pub fn set_security_policy(&self) -> super::builder::instances::SetSecurityPolicy {
super::builder::instances::SetSecurityPolicy::new(self.inner.clone())
}
pub fn set_service_account(&self) -> super::builder::instances::SetServiceAccount {
super::builder::instances::SetServiceAccount::new(self.inner.clone())
}
pub fn set_shielded_instance_integrity_policy(
&self,
) -> super::builder::instances::SetShieldedInstanceIntegrityPolicy {
super::builder::instances::SetShieldedInstanceIntegrityPolicy::new(self.inner.clone())
}
pub fn set_tags(&self) -> super::builder::instances::SetTags {
super::builder::instances::SetTags::new(self.inner.clone())
}
pub fn simulate_maintenance_event(
&self,
) -> super::builder::instances::SimulateMaintenanceEvent {
super::builder::instances::SimulateMaintenanceEvent::new(self.inner.clone())
}
pub fn start(&self) -> super::builder::instances::Start {
super::builder::instances::Start::new(self.inner.clone())
}
pub fn start_with_encryption_key(&self) -> super::builder::instances::StartWithEncryptionKey {
super::builder::instances::StartWithEncryptionKey::new(self.inner.clone())
}
pub fn stop(&self) -> super::builder::instances::Stop {
super::builder::instances::Stop::new(self.inner.clone())
}
pub fn suspend(&self) -> super::builder::instances::Suspend {
super::builder::instances::Suspend::new(self.inner.clone())
}
pub fn test_iam_permissions(&self) -> super::builder::instances::TestIamPermissions {
super::builder::instances::TestIamPermissions::new(self.inner.clone())
}
pub fn update(&self) -> super::builder::instances::Update {
super::builder::instances::Update::new(self.inner.clone())
}
pub fn update_access_config(&self) -> super::builder::instances::UpdateAccessConfig {
super::builder::instances::UpdateAccessConfig::new(self.inner.clone())
}
pub fn update_display_device(&self) -> super::builder::instances::UpdateDisplayDevice {
super::builder::instances::UpdateDisplayDevice::new(self.inner.clone())
}
pub fn update_network_interface(&self) -> super::builder::instances::UpdateNetworkInterface {
super::builder::instances::UpdateNetworkInterface::new(self.inner.clone())
}
pub fn update_shielded_instance_config(
&self,
) -> super::builder::instances::UpdateShieldedInstanceConfig {
super::builder::instances::UpdateShieldedInstanceConfig::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::instances::GetOperation {
super::builder::instances::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "instant-snapshot-groups")]
#[cfg_attr(docsrs, doc(cfg(feature = "instant-snapshot-groups")))]
#[derive(Clone, Debug)]
pub struct InstantSnapshotGroups {
inner: std::sync::Arc<dyn super::stub::dynamic::InstantSnapshotGroups>,
}
#[cfg(feature = "instant-snapshot-groups")]
impl InstantSnapshotGroups {
pub fn builder() -> super::builder::instant_snapshot_groups::ClientBuilder {
crate::new_client_builder(super::builder::instant_snapshot_groups::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::InstantSnapshotGroups + 'static,
{
Self { inner: stub.into() }
}
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::InstantSnapshotGroups>>
{
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::InstantSnapshotGroups> {
super::transport::InstantSnapshotGroups::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::InstantSnapshotGroups> {
Self::build_transport(conf)
.await
.map(super::tracing::InstantSnapshotGroups::new)
}
pub fn delete(&self) -> super::builder::instant_snapshot_groups::Delete {
super::builder::instant_snapshot_groups::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::instant_snapshot_groups::Get {
super::builder::instant_snapshot_groups::Get::new(self.inner.clone())
}
pub fn get_iam_policy(&self) -> super::builder::instant_snapshot_groups::GetIamPolicy {
super::builder::instant_snapshot_groups::GetIamPolicy::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::instant_snapshot_groups::Insert {
super::builder::instant_snapshot_groups::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::instant_snapshot_groups::List {
super::builder::instant_snapshot_groups::List::new(self.inner.clone())
}
pub fn set_iam_policy(&self) -> super::builder::instant_snapshot_groups::SetIamPolicy {
super::builder::instant_snapshot_groups::SetIamPolicy::new(self.inner.clone())
}
pub fn test_iam_permissions(
&self,
) -> super::builder::instant_snapshot_groups::TestIamPermissions {
super::builder::instant_snapshot_groups::TestIamPermissions::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::instant_snapshot_groups::GetOperation {
super::builder::instant_snapshot_groups::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "instant-snapshots")]
#[cfg_attr(docsrs, doc(cfg(feature = "instant-snapshots")))]
#[derive(Clone, Debug)]
pub struct InstantSnapshots {
inner: std::sync::Arc<dyn super::stub::dynamic::InstantSnapshots>,
}
#[cfg(feature = "instant-snapshots")]
impl InstantSnapshots {
pub fn builder() -> super::builder::instant_snapshots::ClientBuilder {
crate::new_client_builder(super::builder::instant_snapshots::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::InstantSnapshots + 'static,
{
Self { inner: stub.into() }
}
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::InstantSnapshots>>
{
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::InstantSnapshots> {
super::transport::InstantSnapshots::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::InstantSnapshots> {
Self::build_transport(conf)
.await
.map(super::tracing::InstantSnapshots::new)
}
pub fn aggregated_list(&self) -> super::builder::instant_snapshots::AggregatedList {
super::builder::instant_snapshots::AggregatedList::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::instant_snapshots::Delete {
super::builder::instant_snapshots::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::instant_snapshots::Get {
super::builder::instant_snapshots::Get::new(self.inner.clone())
}
pub fn get_iam_policy(&self) -> super::builder::instant_snapshots::GetIamPolicy {
super::builder::instant_snapshots::GetIamPolicy::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::instant_snapshots::Insert {
super::builder::instant_snapshots::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::instant_snapshots::List {
super::builder::instant_snapshots::List::new(self.inner.clone())
}
pub fn set_iam_policy(&self) -> super::builder::instant_snapshots::SetIamPolicy {
super::builder::instant_snapshots::SetIamPolicy::new(self.inner.clone())
}
pub fn set_labels(&self) -> super::builder::instant_snapshots::SetLabels {
super::builder::instant_snapshots::SetLabels::new(self.inner.clone())
}
pub fn test_iam_permissions(&self) -> super::builder::instant_snapshots::TestIamPermissions {
super::builder::instant_snapshots::TestIamPermissions::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::instant_snapshots::GetOperation {
super::builder::instant_snapshots::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "interconnect-attachment-groups")]
#[cfg_attr(docsrs, doc(cfg(feature = "interconnect-attachment-groups")))]
#[derive(Clone, Debug)]
pub struct InterconnectAttachmentGroups {
inner: std::sync::Arc<dyn super::stub::dynamic::InterconnectAttachmentGroups>,
}
#[cfg(feature = "interconnect-attachment-groups")]
impl InterconnectAttachmentGroups {
pub fn builder() -> super::builder::interconnect_attachment_groups::ClientBuilder {
crate::new_client_builder(super::builder::interconnect_attachment_groups::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::InterconnectAttachmentGroups + 'static,
{
Self { inner: stub.into() }
}
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::InterconnectAttachmentGroups>,
> {
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::InterconnectAttachmentGroups> {
super::transport::InterconnectAttachmentGroups::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::InterconnectAttachmentGroups> {
Self::build_transport(conf)
.await
.map(super::tracing::InterconnectAttachmentGroups::new)
}
pub fn delete(&self) -> super::builder::interconnect_attachment_groups::Delete {
super::builder::interconnect_attachment_groups::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::interconnect_attachment_groups::Get {
super::builder::interconnect_attachment_groups::Get::new(self.inner.clone())
}
pub fn get_iam_policy(&self) -> super::builder::interconnect_attachment_groups::GetIamPolicy {
super::builder::interconnect_attachment_groups::GetIamPolicy::new(self.inner.clone())
}
pub fn get_operational_status(
&self,
) -> super::builder::interconnect_attachment_groups::GetOperationalStatus {
super::builder::interconnect_attachment_groups::GetOperationalStatus::new(
self.inner.clone(),
)
}
pub fn insert(&self) -> super::builder::interconnect_attachment_groups::Insert {
super::builder::interconnect_attachment_groups::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::interconnect_attachment_groups::List {
super::builder::interconnect_attachment_groups::List::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::interconnect_attachment_groups::Patch {
super::builder::interconnect_attachment_groups::Patch::new(self.inner.clone())
}
pub fn set_iam_policy(&self) -> super::builder::interconnect_attachment_groups::SetIamPolicy {
super::builder::interconnect_attachment_groups::SetIamPolicy::new(self.inner.clone())
}
pub fn test_iam_permissions(
&self,
) -> super::builder::interconnect_attachment_groups::TestIamPermissions {
super::builder::interconnect_attachment_groups::TestIamPermissions::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::interconnect_attachment_groups::GetOperation {
super::builder::interconnect_attachment_groups::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "interconnect-attachments")]
#[cfg_attr(docsrs, doc(cfg(feature = "interconnect-attachments")))]
#[derive(Clone, Debug)]
pub struct InterconnectAttachments {
inner: std::sync::Arc<dyn super::stub::dynamic::InterconnectAttachments>,
}
#[cfg(feature = "interconnect-attachments")]
impl InterconnectAttachments {
pub fn builder() -> super::builder::interconnect_attachments::ClientBuilder {
crate::new_client_builder(super::builder::interconnect_attachments::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::InterconnectAttachments + 'static,
{
Self { inner: stub.into() }
}
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::InterconnectAttachments>>
{
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::InterconnectAttachments> {
super::transport::InterconnectAttachments::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::InterconnectAttachments> {
Self::build_transport(conf)
.await
.map(super::tracing::InterconnectAttachments::new)
}
pub fn aggregated_list(&self) -> super::builder::interconnect_attachments::AggregatedList {
super::builder::interconnect_attachments::AggregatedList::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::interconnect_attachments::Delete {
super::builder::interconnect_attachments::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::interconnect_attachments::Get {
super::builder::interconnect_attachments::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::interconnect_attachments::Insert {
super::builder::interconnect_attachments::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::interconnect_attachments::List {
super::builder::interconnect_attachments::List::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::interconnect_attachments::Patch {
super::builder::interconnect_attachments::Patch::new(self.inner.clone())
}
pub fn set_labels(&self) -> super::builder::interconnect_attachments::SetLabels {
super::builder::interconnect_attachments::SetLabels::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::interconnect_attachments::GetOperation {
super::builder::interconnect_attachments::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "interconnect-groups")]
#[cfg_attr(docsrs, doc(cfg(feature = "interconnect-groups")))]
#[derive(Clone, Debug)]
pub struct InterconnectGroups {
inner: std::sync::Arc<dyn super::stub::dynamic::InterconnectGroups>,
}
#[cfg(feature = "interconnect-groups")]
impl InterconnectGroups {
pub fn builder() -> super::builder::interconnect_groups::ClientBuilder {
crate::new_client_builder(super::builder::interconnect_groups::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::InterconnectGroups + 'static,
{
Self { inner: stub.into() }
}
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::InterconnectGroups>>
{
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::InterconnectGroups> {
super::transport::InterconnectGroups::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::InterconnectGroups> {
Self::build_transport(conf)
.await
.map(super::tracing::InterconnectGroups::new)
}
pub fn create_members(&self) -> super::builder::interconnect_groups::CreateMembers {
super::builder::interconnect_groups::CreateMembers::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::interconnect_groups::Delete {
super::builder::interconnect_groups::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::interconnect_groups::Get {
super::builder::interconnect_groups::Get::new(self.inner.clone())
}
pub fn get_iam_policy(&self) -> super::builder::interconnect_groups::GetIamPolicy {
super::builder::interconnect_groups::GetIamPolicy::new(self.inner.clone())
}
pub fn get_operational_status(
&self,
) -> super::builder::interconnect_groups::GetOperationalStatus {
super::builder::interconnect_groups::GetOperationalStatus::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::interconnect_groups::Insert {
super::builder::interconnect_groups::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::interconnect_groups::List {
super::builder::interconnect_groups::List::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::interconnect_groups::Patch {
super::builder::interconnect_groups::Patch::new(self.inner.clone())
}
pub fn set_iam_policy(&self) -> super::builder::interconnect_groups::SetIamPolicy {
super::builder::interconnect_groups::SetIamPolicy::new(self.inner.clone())
}
pub fn test_iam_permissions(&self) -> super::builder::interconnect_groups::TestIamPermissions {
super::builder::interconnect_groups::TestIamPermissions::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::interconnect_groups::GetOperation {
super::builder::interconnect_groups::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "interconnect-locations")]
#[cfg_attr(docsrs, doc(cfg(feature = "interconnect-locations")))]
#[derive(Clone, Debug)]
pub struct InterconnectLocations {
inner: std::sync::Arc<dyn super::stub::dynamic::InterconnectLocations>,
}
#[cfg(feature = "interconnect-locations")]
impl InterconnectLocations {
pub fn builder() -> super::builder::interconnect_locations::ClientBuilder {
crate::new_client_builder(super::builder::interconnect_locations::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::InterconnectLocations + 'static,
{
Self { inner: stub.into() }
}
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::InterconnectLocations>>
{
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::InterconnectLocations> {
super::transport::InterconnectLocations::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::InterconnectLocations> {
Self::build_transport(conf)
.await
.map(super::tracing::InterconnectLocations::new)
}
pub fn get(&self) -> super::builder::interconnect_locations::Get {
super::builder::interconnect_locations::Get::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::interconnect_locations::List {
super::builder::interconnect_locations::List::new(self.inner.clone())
}
}
#[cfg(feature = "interconnect-remote-locations")]
#[cfg_attr(docsrs, doc(cfg(feature = "interconnect-remote-locations")))]
#[derive(Clone, Debug)]
pub struct InterconnectRemoteLocations {
inner: std::sync::Arc<dyn super::stub::dynamic::InterconnectRemoteLocations>,
}
#[cfg(feature = "interconnect-remote-locations")]
impl InterconnectRemoteLocations {
pub fn builder() -> super::builder::interconnect_remote_locations::ClientBuilder {
crate::new_client_builder(super::builder::interconnect_remote_locations::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::InterconnectRemoteLocations + 'static,
{
Self { inner: stub.into() }
}
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::InterconnectRemoteLocations>,
> {
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::InterconnectRemoteLocations> {
super::transport::InterconnectRemoteLocations::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::InterconnectRemoteLocations> {
Self::build_transport(conf)
.await
.map(super::tracing::InterconnectRemoteLocations::new)
}
pub fn get(&self) -> super::builder::interconnect_remote_locations::Get {
super::builder::interconnect_remote_locations::Get::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::interconnect_remote_locations::List {
super::builder::interconnect_remote_locations::List::new(self.inner.clone())
}
}
#[cfg(feature = "interconnects")]
#[cfg_attr(docsrs, doc(cfg(feature = "interconnects")))]
#[derive(Clone, Debug)]
pub struct Interconnects {
inner: std::sync::Arc<dyn super::stub::dynamic::Interconnects>,
}
#[cfg(feature = "interconnects")]
impl Interconnects {
pub fn builder() -> super::builder::interconnects::ClientBuilder {
crate::new_client_builder(super::builder::interconnects::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::Interconnects + 'static,
{
Self { inner: stub.into() }
}
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::Interconnects>> {
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::Interconnects> {
super::transport::Interconnects::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::Interconnects> {
Self::build_transport(conf)
.await
.map(super::tracing::Interconnects::new)
}
pub fn delete(&self) -> super::builder::interconnects::Delete {
super::builder::interconnects::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::interconnects::Get {
super::builder::interconnects::Get::new(self.inner.clone())
}
pub fn get_diagnostics(&self) -> super::builder::interconnects::GetDiagnostics {
super::builder::interconnects::GetDiagnostics::new(self.inner.clone())
}
pub fn get_macsec_config(&self) -> super::builder::interconnects::GetMacsecConfig {
super::builder::interconnects::GetMacsecConfig::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::interconnects::Insert {
super::builder::interconnects::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::interconnects::List {
super::builder::interconnects::List::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::interconnects::Patch {
super::builder::interconnects::Patch::new(self.inner.clone())
}
pub fn set_labels(&self) -> super::builder::interconnects::SetLabels {
super::builder::interconnects::SetLabels::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::interconnects::GetOperation {
super::builder::interconnects::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "license-codes")]
#[cfg_attr(docsrs, doc(cfg(feature = "license-codes")))]
#[derive(Clone, Debug)]
pub struct LicenseCodes {
inner: std::sync::Arc<dyn super::stub::dynamic::LicenseCodes>,
}
#[cfg(feature = "license-codes")]
impl LicenseCodes {
pub fn builder() -> super::builder::license_codes::ClientBuilder {
crate::new_client_builder(super::builder::license_codes::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::LicenseCodes + 'static,
{
Self { inner: stub.into() }
}
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::LicenseCodes>> {
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::LicenseCodes> {
super::transport::LicenseCodes::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::LicenseCodes> {
Self::build_transport(conf)
.await
.map(super::tracing::LicenseCodes::new)
}
pub fn get(&self) -> super::builder::license_codes::Get {
super::builder::license_codes::Get::new(self.inner.clone())
}
pub fn test_iam_permissions(&self) -> super::builder::license_codes::TestIamPermissions {
super::builder::license_codes::TestIamPermissions::new(self.inner.clone())
}
}
#[cfg(feature = "licenses")]
#[cfg_attr(docsrs, doc(cfg(feature = "licenses")))]
#[derive(Clone, Debug)]
pub struct Licenses {
inner: std::sync::Arc<dyn super::stub::dynamic::Licenses>,
}
#[cfg(feature = "licenses")]
impl Licenses {
pub fn builder() -> super::builder::licenses::ClientBuilder {
crate::new_client_builder(super::builder::licenses::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::Licenses + 'static,
{
Self { inner: stub.into() }
}
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::Licenses>> {
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::Licenses> {
super::transport::Licenses::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::Licenses> {
Self::build_transport(conf)
.await
.map(super::tracing::Licenses::new)
}
pub fn delete(&self) -> super::builder::licenses::Delete {
super::builder::licenses::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::licenses::Get {
super::builder::licenses::Get::new(self.inner.clone())
}
pub fn get_iam_policy(&self) -> super::builder::licenses::GetIamPolicy {
super::builder::licenses::GetIamPolicy::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::licenses::Insert {
super::builder::licenses::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::licenses::List {
super::builder::licenses::List::new(self.inner.clone())
}
pub fn set_iam_policy(&self) -> super::builder::licenses::SetIamPolicy {
super::builder::licenses::SetIamPolicy::new(self.inner.clone())
}
pub fn test_iam_permissions(&self) -> super::builder::licenses::TestIamPermissions {
super::builder::licenses::TestIamPermissions::new(self.inner.clone())
}
pub fn update(&self) -> super::builder::licenses::Update {
super::builder::licenses::Update::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::licenses::GetOperation {
super::builder::licenses::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "machine-images")]
#[cfg_attr(docsrs, doc(cfg(feature = "machine-images")))]
#[derive(Clone, Debug)]
pub struct MachineImages {
inner: std::sync::Arc<dyn super::stub::dynamic::MachineImages>,
}
#[cfg(feature = "machine-images")]
impl MachineImages {
pub fn builder() -> super::builder::machine_images::ClientBuilder {
crate::new_client_builder(super::builder::machine_images::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::MachineImages + 'static,
{
Self { inner: stub.into() }
}
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::MachineImages>> {
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::MachineImages> {
super::transport::MachineImages::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::MachineImages> {
Self::build_transport(conf)
.await
.map(super::tracing::MachineImages::new)
}
pub fn delete(&self) -> super::builder::machine_images::Delete {
super::builder::machine_images::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::machine_images::Get {
super::builder::machine_images::Get::new(self.inner.clone())
}
pub fn get_iam_policy(&self) -> super::builder::machine_images::GetIamPolicy {
super::builder::machine_images::GetIamPolicy::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::machine_images::Insert {
super::builder::machine_images::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::machine_images::List {
super::builder::machine_images::List::new(self.inner.clone())
}
pub fn set_iam_policy(&self) -> super::builder::machine_images::SetIamPolicy {
super::builder::machine_images::SetIamPolicy::new(self.inner.clone())
}
pub fn set_labels(&self) -> super::builder::machine_images::SetLabels {
super::builder::machine_images::SetLabels::new(self.inner.clone())
}
pub fn test_iam_permissions(&self) -> super::builder::machine_images::TestIamPermissions {
super::builder::machine_images::TestIamPermissions::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::machine_images::GetOperation {
super::builder::machine_images::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "machine-types")]
#[cfg_attr(docsrs, doc(cfg(feature = "machine-types")))]
#[derive(Clone, Debug)]
pub struct MachineTypes {
inner: std::sync::Arc<dyn super::stub::dynamic::MachineTypes>,
}
#[cfg(feature = "machine-types")]
impl MachineTypes {
pub fn builder() -> super::builder::machine_types::ClientBuilder {
crate::new_client_builder(super::builder::machine_types::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::MachineTypes + 'static,
{
Self { inner: stub.into() }
}
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::MachineTypes>> {
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::MachineTypes> {
super::transport::MachineTypes::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::MachineTypes> {
Self::build_transport(conf)
.await
.map(super::tracing::MachineTypes::new)
}
pub fn aggregated_list(&self) -> super::builder::machine_types::AggregatedList {
super::builder::machine_types::AggregatedList::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::machine_types::Get {
super::builder::machine_types::Get::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::machine_types::List {
super::builder::machine_types::List::new(self.inner.clone())
}
}
#[cfg(feature = "network-attachments")]
#[cfg_attr(docsrs, doc(cfg(feature = "network-attachments")))]
#[derive(Clone, Debug)]
pub struct NetworkAttachments {
inner: std::sync::Arc<dyn super::stub::dynamic::NetworkAttachments>,
}
#[cfg(feature = "network-attachments")]
impl NetworkAttachments {
pub fn builder() -> super::builder::network_attachments::ClientBuilder {
crate::new_client_builder(super::builder::network_attachments::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::NetworkAttachments + 'static,
{
Self { inner: stub.into() }
}
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::NetworkAttachments>>
{
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::NetworkAttachments> {
super::transport::NetworkAttachments::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::NetworkAttachments> {
Self::build_transport(conf)
.await
.map(super::tracing::NetworkAttachments::new)
}
pub fn aggregated_list(&self) -> super::builder::network_attachments::AggregatedList {
super::builder::network_attachments::AggregatedList::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::network_attachments::Delete {
super::builder::network_attachments::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::network_attachments::Get {
super::builder::network_attachments::Get::new(self.inner.clone())
}
pub fn get_iam_policy(&self) -> super::builder::network_attachments::GetIamPolicy {
super::builder::network_attachments::GetIamPolicy::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::network_attachments::Insert {
super::builder::network_attachments::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::network_attachments::List {
super::builder::network_attachments::List::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::network_attachments::Patch {
super::builder::network_attachments::Patch::new(self.inner.clone())
}
pub fn set_iam_policy(&self) -> super::builder::network_attachments::SetIamPolicy {
super::builder::network_attachments::SetIamPolicy::new(self.inner.clone())
}
pub fn test_iam_permissions(&self) -> super::builder::network_attachments::TestIamPermissions {
super::builder::network_attachments::TestIamPermissions::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::network_attachments::GetOperation {
super::builder::network_attachments::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "network-edge-security-services")]
#[cfg_attr(docsrs, doc(cfg(feature = "network-edge-security-services")))]
#[derive(Clone, Debug)]
pub struct NetworkEdgeSecurityServices {
inner: std::sync::Arc<dyn super::stub::dynamic::NetworkEdgeSecurityServices>,
}
#[cfg(feature = "network-edge-security-services")]
impl NetworkEdgeSecurityServices {
pub fn builder() -> super::builder::network_edge_security_services::ClientBuilder {
crate::new_client_builder(super::builder::network_edge_security_services::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::NetworkEdgeSecurityServices + 'static,
{
Self { inner: stub.into() }
}
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::NetworkEdgeSecurityServices>,
> {
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::NetworkEdgeSecurityServices> {
super::transport::NetworkEdgeSecurityServices::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::NetworkEdgeSecurityServices> {
Self::build_transport(conf)
.await
.map(super::tracing::NetworkEdgeSecurityServices::new)
}
pub fn aggregated_list(
&self,
) -> super::builder::network_edge_security_services::AggregatedList {
super::builder::network_edge_security_services::AggregatedList::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::network_edge_security_services::Delete {
super::builder::network_edge_security_services::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::network_edge_security_services::Get {
super::builder::network_edge_security_services::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::network_edge_security_services::Insert {
super::builder::network_edge_security_services::Insert::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::network_edge_security_services::Patch {
super::builder::network_edge_security_services::Patch::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::network_edge_security_services::GetOperation {
super::builder::network_edge_security_services::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "network-endpoint-groups")]
#[cfg_attr(docsrs, doc(cfg(feature = "network-endpoint-groups")))]
#[derive(Clone, Debug)]
pub struct NetworkEndpointGroups {
inner: std::sync::Arc<dyn super::stub::dynamic::NetworkEndpointGroups>,
}
#[cfg(feature = "network-endpoint-groups")]
impl NetworkEndpointGroups {
pub fn builder() -> super::builder::network_endpoint_groups::ClientBuilder {
crate::new_client_builder(super::builder::network_endpoint_groups::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::NetworkEndpointGroups + 'static,
{
Self { inner: stub.into() }
}
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::NetworkEndpointGroups>>
{
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::NetworkEndpointGroups> {
super::transport::NetworkEndpointGroups::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::NetworkEndpointGroups> {
Self::build_transport(conf)
.await
.map(super::tracing::NetworkEndpointGroups::new)
}
pub fn aggregated_list(&self) -> super::builder::network_endpoint_groups::AggregatedList {
super::builder::network_endpoint_groups::AggregatedList::new(self.inner.clone())
}
pub fn attach_network_endpoints(
&self,
) -> super::builder::network_endpoint_groups::AttachNetworkEndpoints {
super::builder::network_endpoint_groups::AttachNetworkEndpoints::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::network_endpoint_groups::Delete {
super::builder::network_endpoint_groups::Delete::new(self.inner.clone())
}
pub fn detach_network_endpoints(
&self,
) -> super::builder::network_endpoint_groups::DetachNetworkEndpoints {
super::builder::network_endpoint_groups::DetachNetworkEndpoints::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::network_endpoint_groups::Get {
super::builder::network_endpoint_groups::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::network_endpoint_groups::Insert {
super::builder::network_endpoint_groups::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::network_endpoint_groups::List {
super::builder::network_endpoint_groups::List::new(self.inner.clone())
}
pub fn list_network_endpoints(
&self,
) -> super::builder::network_endpoint_groups::ListNetworkEndpoints {
super::builder::network_endpoint_groups::ListNetworkEndpoints::new(self.inner.clone())
}
pub fn test_iam_permissions(
&self,
) -> super::builder::network_endpoint_groups::TestIamPermissions {
super::builder::network_endpoint_groups::TestIamPermissions::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::network_endpoint_groups::GetOperation {
super::builder::network_endpoint_groups::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "network-firewall-policies")]
#[cfg_attr(docsrs, doc(cfg(feature = "network-firewall-policies")))]
#[derive(Clone, Debug)]
pub struct NetworkFirewallPolicies {
inner: std::sync::Arc<dyn super::stub::dynamic::NetworkFirewallPolicies>,
}
#[cfg(feature = "network-firewall-policies")]
impl NetworkFirewallPolicies {
pub fn builder() -> super::builder::network_firewall_policies::ClientBuilder {
crate::new_client_builder(super::builder::network_firewall_policies::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::NetworkFirewallPolicies + 'static,
{
Self { inner: stub.into() }
}
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::NetworkFirewallPolicies>>
{
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::NetworkFirewallPolicies> {
super::transport::NetworkFirewallPolicies::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::NetworkFirewallPolicies> {
Self::build_transport(conf)
.await
.map(super::tracing::NetworkFirewallPolicies::new)
}
pub fn add_association(&self) -> super::builder::network_firewall_policies::AddAssociation {
super::builder::network_firewall_policies::AddAssociation::new(self.inner.clone())
}
pub fn add_packet_mirroring_rule(
&self,
) -> super::builder::network_firewall_policies::AddPacketMirroringRule {
super::builder::network_firewall_policies::AddPacketMirroringRule::new(self.inner.clone())
}
pub fn add_rule(&self) -> super::builder::network_firewall_policies::AddRule {
super::builder::network_firewall_policies::AddRule::new(self.inner.clone())
}
pub fn aggregated_list(&self) -> super::builder::network_firewall_policies::AggregatedList {
super::builder::network_firewall_policies::AggregatedList::new(self.inner.clone())
}
pub fn clone_rules(&self) -> super::builder::network_firewall_policies::CloneRules {
super::builder::network_firewall_policies::CloneRules::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::network_firewall_policies::Delete {
super::builder::network_firewall_policies::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::network_firewall_policies::Get {
super::builder::network_firewall_policies::Get::new(self.inner.clone())
}
pub fn get_association(&self) -> super::builder::network_firewall_policies::GetAssociation {
super::builder::network_firewall_policies::GetAssociation::new(self.inner.clone())
}
pub fn get_iam_policy(&self) -> super::builder::network_firewall_policies::GetIamPolicy {
super::builder::network_firewall_policies::GetIamPolicy::new(self.inner.clone())
}
pub fn get_packet_mirroring_rule(
&self,
) -> super::builder::network_firewall_policies::GetPacketMirroringRule {
super::builder::network_firewall_policies::GetPacketMirroringRule::new(self.inner.clone())
}
pub fn get_rule(&self) -> super::builder::network_firewall_policies::GetRule {
super::builder::network_firewall_policies::GetRule::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::network_firewall_policies::Insert {
super::builder::network_firewall_policies::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::network_firewall_policies::List {
super::builder::network_firewall_policies::List::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::network_firewall_policies::Patch {
super::builder::network_firewall_policies::Patch::new(self.inner.clone())
}
pub fn patch_packet_mirroring_rule(
&self,
) -> super::builder::network_firewall_policies::PatchPacketMirroringRule {
super::builder::network_firewall_policies::PatchPacketMirroringRule::new(self.inner.clone())
}
pub fn patch_rule(&self) -> super::builder::network_firewall_policies::PatchRule {
super::builder::network_firewall_policies::PatchRule::new(self.inner.clone())
}
pub fn remove_association(
&self,
) -> super::builder::network_firewall_policies::RemoveAssociation {
super::builder::network_firewall_policies::RemoveAssociation::new(self.inner.clone())
}
pub fn remove_packet_mirroring_rule(
&self,
) -> super::builder::network_firewall_policies::RemovePacketMirroringRule {
super::builder::network_firewall_policies::RemovePacketMirroringRule::new(
self.inner.clone(),
)
}
pub fn remove_rule(&self) -> super::builder::network_firewall_policies::RemoveRule {
super::builder::network_firewall_policies::RemoveRule::new(self.inner.clone())
}
pub fn set_iam_policy(&self) -> super::builder::network_firewall_policies::SetIamPolicy {
super::builder::network_firewall_policies::SetIamPolicy::new(self.inner.clone())
}
pub fn test_iam_permissions(
&self,
) -> super::builder::network_firewall_policies::TestIamPermissions {
super::builder::network_firewall_policies::TestIamPermissions::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::network_firewall_policies::GetOperation {
super::builder::network_firewall_policies::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "network-profiles")]
#[cfg_attr(docsrs, doc(cfg(feature = "network-profiles")))]
#[derive(Clone, Debug)]
pub struct NetworkProfiles {
inner: std::sync::Arc<dyn super::stub::dynamic::NetworkProfiles>,
}
#[cfg(feature = "network-profiles")]
impl NetworkProfiles {
pub fn builder() -> super::builder::network_profiles::ClientBuilder {
crate::new_client_builder(super::builder::network_profiles::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::NetworkProfiles + 'static,
{
Self { inner: stub.into() }
}
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::NetworkProfiles>> {
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::NetworkProfiles> {
super::transport::NetworkProfiles::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::NetworkProfiles> {
Self::build_transport(conf)
.await
.map(super::tracing::NetworkProfiles::new)
}
pub fn get(&self) -> super::builder::network_profiles::Get {
super::builder::network_profiles::Get::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::network_profiles::List {
super::builder::network_profiles::List::new(self.inner.clone())
}
}
#[cfg(feature = "networks")]
#[cfg_attr(docsrs, doc(cfg(feature = "networks")))]
#[derive(Clone, Debug)]
pub struct Networks {
inner: std::sync::Arc<dyn super::stub::dynamic::Networks>,
}
#[cfg(feature = "networks")]
impl Networks {
pub fn builder() -> super::builder::networks::ClientBuilder {
crate::new_client_builder(super::builder::networks::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::Networks + 'static,
{
Self { inner: stub.into() }
}
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::Networks>> {
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::Networks> {
super::transport::Networks::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::Networks> {
Self::build_transport(conf)
.await
.map(super::tracing::Networks::new)
}
pub fn add_peering(&self) -> super::builder::networks::AddPeering {
super::builder::networks::AddPeering::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::networks::Delete {
super::builder::networks::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::networks::Get {
super::builder::networks::Get::new(self.inner.clone())
}
pub fn get_effective_firewalls(&self) -> super::builder::networks::GetEffectiveFirewalls {
super::builder::networks::GetEffectiveFirewalls::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::networks::Insert {
super::builder::networks::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::networks::List {
super::builder::networks::List::new(self.inner.clone())
}
pub fn list_peering_routes(&self) -> super::builder::networks::ListPeeringRoutes {
super::builder::networks::ListPeeringRoutes::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::networks::Patch {
super::builder::networks::Patch::new(self.inner.clone())
}
pub fn remove_peering(&self) -> super::builder::networks::RemovePeering {
super::builder::networks::RemovePeering::new(self.inner.clone())
}
pub fn request_remove_peering(&self) -> super::builder::networks::RequestRemovePeering {
super::builder::networks::RequestRemovePeering::new(self.inner.clone())
}
pub fn switch_to_custom_mode(&self) -> super::builder::networks::SwitchToCustomMode {
super::builder::networks::SwitchToCustomMode::new(self.inner.clone())
}
pub fn update_peering(&self) -> super::builder::networks::UpdatePeering {
super::builder::networks::UpdatePeering::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::networks::GetOperation {
super::builder::networks::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "node-groups")]
#[cfg_attr(docsrs, doc(cfg(feature = "node-groups")))]
#[derive(Clone, Debug)]
pub struct NodeGroups {
inner: std::sync::Arc<dyn super::stub::dynamic::NodeGroups>,
}
#[cfg(feature = "node-groups")]
impl NodeGroups {
pub fn builder() -> super::builder::node_groups::ClientBuilder {
crate::new_client_builder(super::builder::node_groups::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::NodeGroups + 'static,
{
Self { inner: stub.into() }
}
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::NodeGroups>> {
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::NodeGroups> {
super::transport::NodeGroups::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::NodeGroups> {
Self::build_transport(conf)
.await
.map(super::tracing::NodeGroups::new)
}
pub fn add_nodes(&self) -> super::builder::node_groups::AddNodes {
super::builder::node_groups::AddNodes::new(self.inner.clone())
}
pub fn aggregated_list(&self) -> super::builder::node_groups::AggregatedList {
super::builder::node_groups::AggregatedList::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::node_groups::Delete {
super::builder::node_groups::Delete::new(self.inner.clone())
}
pub fn delete_nodes(&self) -> super::builder::node_groups::DeleteNodes {
super::builder::node_groups::DeleteNodes::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::node_groups::Get {
super::builder::node_groups::Get::new(self.inner.clone())
}
pub fn get_iam_policy(&self) -> super::builder::node_groups::GetIamPolicy {
super::builder::node_groups::GetIamPolicy::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::node_groups::Insert {
super::builder::node_groups::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::node_groups::List {
super::builder::node_groups::List::new(self.inner.clone())
}
pub fn list_nodes(&self) -> super::builder::node_groups::ListNodes {
super::builder::node_groups::ListNodes::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::node_groups::Patch {
super::builder::node_groups::Patch::new(self.inner.clone())
}
pub fn perform_maintenance(&self) -> super::builder::node_groups::PerformMaintenance {
super::builder::node_groups::PerformMaintenance::new(self.inner.clone())
}
pub fn set_iam_policy(&self) -> super::builder::node_groups::SetIamPolicy {
super::builder::node_groups::SetIamPolicy::new(self.inner.clone())
}
pub fn set_node_template(&self) -> super::builder::node_groups::SetNodeTemplate {
super::builder::node_groups::SetNodeTemplate::new(self.inner.clone())
}
pub fn simulate_maintenance_event(
&self,
) -> super::builder::node_groups::SimulateMaintenanceEvent {
super::builder::node_groups::SimulateMaintenanceEvent::new(self.inner.clone())
}
pub fn test_iam_permissions(&self) -> super::builder::node_groups::TestIamPermissions {
super::builder::node_groups::TestIamPermissions::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::node_groups::GetOperation {
super::builder::node_groups::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "node-templates")]
#[cfg_attr(docsrs, doc(cfg(feature = "node-templates")))]
#[derive(Clone, Debug)]
pub struct NodeTemplates {
inner: std::sync::Arc<dyn super::stub::dynamic::NodeTemplates>,
}
#[cfg(feature = "node-templates")]
impl NodeTemplates {
pub fn builder() -> super::builder::node_templates::ClientBuilder {
crate::new_client_builder(super::builder::node_templates::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::NodeTemplates + 'static,
{
Self { inner: stub.into() }
}
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::NodeTemplates>> {
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::NodeTemplates> {
super::transport::NodeTemplates::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::NodeTemplates> {
Self::build_transport(conf)
.await
.map(super::tracing::NodeTemplates::new)
}
pub fn aggregated_list(&self) -> super::builder::node_templates::AggregatedList {
super::builder::node_templates::AggregatedList::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::node_templates::Delete {
super::builder::node_templates::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::node_templates::Get {
super::builder::node_templates::Get::new(self.inner.clone())
}
pub fn get_iam_policy(&self) -> super::builder::node_templates::GetIamPolicy {
super::builder::node_templates::GetIamPolicy::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::node_templates::Insert {
super::builder::node_templates::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::node_templates::List {
super::builder::node_templates::List::new(self.inner.clone())
}
pub fn set_iam_policy(&self) -> super::builder::node_templates::SetIamPolicy {
super::builder::node_templates::SetIamPolicy::new(self.inner.clone())
}
pub fn test_iam_permissions(&self) -> super::builder::node_templates::TestIamPermissions {
super::builder::node_templates::TestIamPermissions::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::node_templates::GetOperation {
super::builder::node_templates::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "node-types")]
#[cfg_attr(docsrs, doc(cfg(feature = "node-types")))]
#[derive(Clone, Debug)]
pub struct NodeTypes {
inner: std::sync::Arc<dyn super::stub::dynamic::NodeTypes>,
}
#[cfg(feature = "node-types")]
impl NodeTypes {
pub fn builder() -> super::builder::node_types::ClientBuilder {
crate::new_client_builder(super::builder::node_types::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::NodeTypes + 'static,
{
Self { inner: stub.into() }
}
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::NodeTypes>> {
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::NodeTypes> {
super::transport::NodeTypes::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::NodeTypes> {
Self::build_transport(conf)
.await
.map(super::tracing::NodeTypes::new)
}
pub fn aggregated_list(&self) -> super::builder::node_types::AggregatedList {
super::builder::node_types::AggregatedList::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::node_types::Get {
super::builder::node_types::Get::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::node_types::List {
super::builder::node_types::List::new(self.inner.clone())
}
}
#[cfg(feature = "organization-security-policies")]
#[cfg_attr(docsrs, doc(cfg(feature = "organization-security-policies")))]
#[derive(Clone, Debug)]
pub struct OrganizationSecurityPolicies {
inner: std::sync::Arc<dyn super::stub::dynamic::OrganizationSecurityPolicies>,
}
#[cfg(feature = "organization-security-policies")]
impl OrganizationSecurityPolicies {
pub fn builder() -> super::builder::organization_security_policies::ClientBuilder {
crate::new_client_builder(super::builder::organization_security_policies::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::OrganizationSecurityPolicies + 'static,
{
Self { inner: stub.into() }
}
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::OrganizationSecurityPolicies>,
> {
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::OrganizationSecurityPolicies> {
super::transport::OrganizationSecurityPolicies::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::OrganizationSecurityPolicies> {
Self::build_transport(conf)
.await
.map(super::tracing::OrganizationSecurityPolicies::new)
}
pub fn add_association(
&self,
) -> super::builder::organization_security_policies::AddAssociation {
super::builder::organization_security_policies::AddAssociation::new(self.inner.clone())
}
pub fn add_rule(&self) -> super::builder::organization_security_policies::AddRule {
super::builder::organization_security_policies::AddRule::new(self.inner.clone())
}
pub fn copy_rules(&self) -> super::builder::organization_security_policies::CopyRules {
super::builder::organization_security_policies::CopyRules::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::organization_security_policies::Delete {
super::builder::organization_security_policies::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::organization_security_policies::Get {
super::builder::organization_security_policies::Get::new(self.inner.clone())
}
pub fn get_association(
&self,
) -> super::builder::organization_security_policies::GetAssociation {
super::builder::organization_security_policies::GetAssociation::new(self.inner.clone())
}
pub fn get_rule(&self) -> super::builder::organization_security_policies::GetRule {
super::builder::organization_security_policies::GetRule::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::organization_security_policies::Insert {
super::builder::organization_security_policies::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::organization_security_policies::List {
super::builder::organization_security_policies::List::new(self.inner.clone())
}
pub fn list_associations(
&self,
) -> super::builder::organization_security_policies::ListAssociations {
super::builder::organization_security_policies::ListAssociations::new(self.inner.clone())
}
pub fn list_preconfigured_expression_sets(
&self,
) -> super::builder::organization_security_policies::ListPreconfiguredExpressionSets {
super::builder::organization_security_policies::ListPreconfiguredExpressionSets::new(
self.inner.clone(),
)
}
pub fn r#move(&self) -> super::builder::organization_security_policies::Move {
super::builder::organization_security_policies::Move::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::organization_security_policies::Patch {
super::builder::organization_security_policies::Patch::new(self.inner.clone())
}
pub fn patch_rule(&self) -> super::builder::organization_security_policies::PatchRule {
super::builder::organization_security_policies::PatchRule::new(self.inner.clone())
}
pub fn remove_association(
&self,
) -> super::builder::organization_security_policies::RemoveAssociation {
super::builder::organization_security_policies::RemoveAssociation::new(self.inner.clone())
}
pub fn remove_rule(&self) -> super::builder::organization_security_policies::RemoveRule {
super::builder::organization_security_policies::RemoveRule::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::organization_security_policies::GetOperation {
super::builder::organization_security_policies::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "packet-mirrorings")]
#[cfg_attr(docsrs, doc(cfg(feature = "packet-mirrorings")))]
#[derive(Clone, Debug)]
pub struct PacketMirrorings {
inner: std::sync::Arc<dyn super::stub::dynamic::PacketMirrorings>,
}
#[cfg(feature = "packet-mirrorings")]
impl PacketMirrorings {
pub fn builder() -> super::builder::packet_mirrorings::ClientBuilder {
crate::new_client_builder(super::builder::packet_mirrorings::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::PacketMirrorings + 'static,
{
Self { inner: stub.into() }
}
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::PacketMirrorings>>
{
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::PacketMirrorings> {
super::transport::PacketMirrorings::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::PacketMirrorings> {
Self::build_transport(conf)
.await
.map(super::tracing::PacketMirrorings::new)
}
pub fn aggregated_list(&self) -> super::builder::packet_mirrorings::AggregatedList {
super::builder::packet_mirrorings::AggregatedList::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::packet_mirrorings::Delete {
super::builder::packet_mirrorings::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::packet_mirrorings::Get {
super::builder::packet_mirrorings::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::packet_mirrorings::Insert {
super::builder::packet_mirrorings::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::packet_mirrorings::List {
super::builder::packet_mirrorings::List::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::packet_mirrorings::Patch {
super::builder::packet_mirrorings::Patch::new(self.inner.clone())
}
pub fn test_iam_permissions(&self) -> super::builder::packet_mirrorings::TestIamPermissions {
super::builder::packet_mirrorings::TestIamPermissions::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::packet_mirrorings::GetOperation {
super::builder::packet_mirrorings::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "preview-features")]
#[cfg_attr(docsrs, doc(cfg(feature = "preview-features")))]
#[derive(Clone, Debug)]
pub struct PreviewFeatures {
inner: std::sync::Arc<dyn super::stub::dynamic::PreviewFeatures>,
}
#[cfg(feature = "preview-features")]
impl PreviewFeatures {
pub fn builder() -> super::builder::preview_features::ClientBuilder {
crate::new_client_builder(super::builder::preview_features::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::PreviewFeatures + 'static,
{
Self { inner: stub.into() }
}
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::PreviewFeatures>> {
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::PreviewFeatures> {
super::transport::PreviewFeatures::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::PreviewFeatures> {
Self::build_transport(conf)
.await
.map(super::tracing::PreviewFeatures::new)
}
pub fn get(&self) -> super::builder::preview_features::Get {
super::builder::preview_features::Get::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::preview_features::List {
super::builder::preview_features::List::new(self.inner.clone())
}
pub fn update(&self) -> super::builder::preview_features::Update {
super::builder::preview_features::Update::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::preview_features::GetOperation {
super::builder::preview_features::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "projects")]
#[cfg_attr(docsrs, doc(cfg(feature = "projects")))]
#[derive(Clone, Debug)]
pub struct Projects {
inner: std::sync::Arc<dyn super::stub::dynamic::Projects>,
}
#[cfg(feature = "projects")]
impl Projects {
pub fn builder() -> super::builder::projects::ClientBuilder {
crate::new_client_builder(super::builder::projects::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::Projects + 'static,
{
Self { inner: stub.into() }
}
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::Projects>> {
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::Projects> {
super::transport::Projects::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::Projects> {
Self::build_transport(conf)
.await
.map(super::tracing::Projects::new)
}
pub fn disable_xpn_host(&self) -> super::builder::projects::DisableXpnHost {
super::builder::projects::DisableXpnHost::new(self.inner.clone())
}
pub fn disable_xpn_resource(&self) -> super::builder::projects::DisableXpnResource {
super::builder::projects::DisableXpnResource::new(self.inner.clone())
}
pub fn enable_xpn_host(&self) -> super::builder::projects::EnableXpnHost {
super::builder::projects::EnableXpnHost::new(self.inner.clone())
}
pub fn enable_xpn_resource(&self) -> super::builder::projects::EnableXpnResource {
super::builder::projects::EnableXpnResource::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::projects::Get {
super::builder::projects::Get::new(self.inner.clone())
}
pub fn get_xpn_host(&self) -> super::builder::projects::GetXpnHost {
super::builder::projects::GetXpnHost::new(self.inner.clone())
}
pub fn get_xpn_resources(&self) -> super::builder::projects::GetXpnResources {
super::builder::projects::GetXpnResources::new(self.inner.clone())
}
pub fn list_xpn_hosts(&self) -> super::builder::projects::ListXpnHosts {
super::builder::projects::ListXpnHosts::new(self.inner.clone())
}
#[deprecated]
pub fn move_disk(&self) -> super::builder::projects::MoveDisk {
super::builder::projects::MoveDisk::new(self.inner.clone())
}
#[deprecated]
pub fn move_instance(&self) -> super::builder::projects::MoveInstance {
super::builder::projects::MoveInstance::new(self.inner.clone())
}
pub fn set_cloud_armor_tier(&self) -> super::builder::projects::SetCloudArmorTier {
super::builder::projects::SetCloudArmorTier::new(self.inner.clone())
}
pub fn set_common_instance_metadata(
&self,
) -> super::builder::projects::SetCommonInstanceMetadata {
super::builder::projects::SetCommonInstanceMetadata::new(self.inner.clone())
}
pub fn set_default_network_tier(&self) -> super::builder::projects::SetDefaultNetworkTier {
super::builder::projects::SetDefaultNetworkTier::new(self.inner.clone())
}
pub fn set_usage_export_bucket(&self) -> super::builder::projects::SetUsageExportBucket {
super::builder::projects::SetUsageExportBucket::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::projects::GetOperation {
super::builder::projects::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "public-advertised-prefixes")]
#[cfg_attr(docsrs, doc(cfg(feature = "public-advertised-prefixes")))]
#[derive(Clone, Debug)]
pub struct PublicAdvertisedPrefixes {
inner: std::sync::Arc<dyn super::stub::dynamic::PublicAdvertisedPrefixes>,
}
#[cfg(feature = "public-advertised-prefixes")]
impl PublicAdvertisedPrefixes {
pub fn builder() -> super::builder::public_advertised_prefixes::ClientBuilder {
crate::new_client_builder(super::builder::public_advertised_prefixes::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::PublicAdvertisedPrefixes + 'static,
{
Self { inner: stub.into() }
}
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::PublicAdvertisedPrefixes>,
> {
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::PublicAdvertisedPrefixes> {
super::transport::PublicAdvertisedPrefixes::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::PublicAdvertisedPrefixes> {
Self::build_transport(conf)
.await
.map(super::tracing::PublicAdvertisedPrefixes::new)
}
pub fn announce(&self) -> super::builder::public_advertised_prefixes::Announce {
super::builder::public_advertised_prefixes::Announce::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::public_advertised_prefixes::Delete {
super::builder::public_advertised_prefixes::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::public_advertised_prefixes::Get {
super::builder::public_advertised_prefixes::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::public_advertised_prefixes::Insert {
super::builder::public_advertised_prefixes::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::public_advertised_prefixes::List {
super::builder::public_advertised_prefixes::List::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::public_advertised_prefixes::Patch {
super::builder::public_advertised_prefixes::Patch::new(self.inner.clone())
}
pub fn withdraw(&self) -> super::builder::public_advertised_prefixes::Withdraw {
super::builder::public_advertised_prefixes::Withdraw::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::public_advertised_prefixes::GetOperation {
super::builder::public_advertised_prefixes::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "public-delegated-prefixes")]
#[cfg_attr(docsrs, doc(cfg(feature = "public-delegated-prefixes")))]
#[derive(Clone, Debug)]
pub struct PublicDelegatedPrefixes {
inner: std::sync::Arc<dyn super::stub::dynamic::PublicDelegatedPrefixes>,
}
#[cfg(feature = "public-delegated-prefixes")]
impl PublicDelegatedPrefixes {
pub fn builder() -> super::builder::public_delegated_prefixes::ClientBuilder {
crate::new_client_builder(super::builder::public_delegated_prefixes::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::PublicDelegatedPrefixes + 'static,
{
Self { inner: stub.into() }
}
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::PublicDelegatedPrefixes>>
{
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::PublicDelegatedPrefixes> {
super::transport::PublicDelegatedPrefixes::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::PublicDelegatedPrefixes> {
Self::build_transport(conf)
.await
.map(super::tracing::PublicDelegatedPrefixes::new)
}
pub fn aggregated_list(&self) -> super::builder::public_delegated_prefixes::AggregatedList {
super::builder::public_delegated_prefixes::AggregatedList::new(self.inner.clone())
}
pub fn announce(&self) -> super::builder::public_delegated_prefixes::Announce {
super::builder::public_delegated_prefixes::Announce::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::public_delegated_prefixes::Delete {
super::builder::public_delegated_prefixes::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::public_delegated_prefixes::Get {
super::builder::public_delegated_prefixes::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::public_delegated_prefixes::Insert {
super::builder::public_delegated_prefixes::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::public_delegated_prefixes::List {
super::builder::public_delegated_prefixes::List::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::public_delegated_prefixes::Patch {
super::builder::public_delegated_prefixes::Patch::new(self.inner.clone())
}
pub fn withdraw(&self) -> super::builder::public_delegated_prefixes::Withdraw {
super::builder::public_delegated_prefixes::Withdraw::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::public_delegated_prefixes::GetOperation {
super::builder::public_delegated_prefixes::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "region-autoscalers")]
#[cfg_attr(docsrs, doc(cfg(feature = "region-autoscalers")))]
#[derive(Clone, Debug)]
pub struct RegionAutoscalers {
inner: std::sync::Arc<dyn super::stub::dynamic::RegionAutoscalers>,
}
#[cfg(feature = "region-autoscalers")]
impl RegionAutoscalers {
pub fn builder() -> super::builder::region_autoscalers::ClientBuilder {
crate::new_client_builder(super::builder::region_autoscalers::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::RegionAutoscalers + 'static,
{
Self { inner: stub.into() }
}
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::RegionAutoscalers>>
{
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::RegionAutoscalers> {
super::transport::RegionAutoscalers::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::RegionAutoscalers> {
Self::build_transport(conf)
.await
.map(super::tracing::RegionAutoscalers::new)
}
pub fn delete(&self) -> super::builder::region_autoscalers::Delete {
super::builder::region_autoscalers::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::region_autoscalers::Get {
super::builder::region_autoscalers::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::region_autoscalers::Insert {
super::builder::region_autoscalers::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::region_autoscalers::List {
super::builder::region_autoscalers::List::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::region_autoscalers::Patch {
super::builder::region_autoscalers::Patch::new(self.inner.clone())
}
pub fn test_iam_permissions(&self) -> super::builder::region_autoscalers::TestIamPermissions {
super::builder::region_autoscalers::TestIamPermissions::new(self.inner.clone())
}
pub fn update(&self) -> super::builder::region_autoscalers::Update {
super::builder::region_autoscalers::Update::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::region_autoscalers::GetOperation {
super::builder::region_autoscalers::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "region-backend-buckets")]
#[cfg_attr(docsrs, doc(cfg(feature = "region-backend-buckets")))]
#[derive(Clone, Debug)]
pub struct RegionBackendBuckets {
inner: std::sync::Arc<dyn super::stub::dynamic::RegionBackendBuckets>,
}
#[cfg(feature = "region-backend-buckets")]
impl RegionBackendBuckets {
pub fn builder() -> super::builder::region_backend_buckets::ClientBuilder {
crate::new_client_builder(super::builder::region_backend_buckets::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::RegionBackendBuckets + 'static,
{
Self { inner: stub.into() }
}
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::RegionBackendBuckets>>
{
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::RegionBackendBuckets> {
super::transport::RegionBackendBuckets::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::RegionBackendBuckets> {
Self::build_transport(conf)
.await
.map(super::tracing::RegionBackendBuckets::new)
}
pub fn delete(&self) -> super::builder::region_backend_buckets::Delete {
super::builder::region_backend_buckets::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::region_backend_buckets::Get {
super::builder::region_backend_buckets::Get::new(self.inner.clone())
}
pub fn get_iam_policy(&self) -> super::builder::region_backend_buckets::GetIamPolicy {
super::builder::region_backend_buckets::GetIamPolicy::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::region_backend_buckets::Insert {
super::builder::region_backend_buckets::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::region_backend_buckets::List {
super::builder::region_backend_buckets::List::new(self.inner.clone())
}
pub fn list_usable(&self) -> super::builder::region_backend_buckets::ListUsable {
super::builder::region_backend_buckets::ListUsable::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::region_backend_buckets::Patch {
super::builder::region_backend_buckets::Patch::new(self.inner.clone())
}
pub fn set_iam_policy(&self) -> super::builder::region_backend_buckets::SetIamPolicy {
super::builder::region_backend_buckets::SetIamPolicy::new(self.inner.clone())
}
pub fn test_iam_permissions(
&self,
) -> super::builder::region_backend_buckets::TestIamPermissions {
super::builder::region_backend_buckets::TestIamPermissions::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::region_backend_buckets::GetOperation {
super::builder::region_backend_buckets::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "region-backend-services")]
#[cfg_attr(docsrs, doc(cfg(feature = "region-backend-services")))]
#[derive(Clone, Debug)]
pub struct RegionBackendServices {
inner: std::sync::Arc<dyn super::stub::dynamic::RegionBackendServices>,
}
#[cfg(feature = "region-backend-services")]
impl RegionBackendServices {
pub fn builder() -> super::builder::region_backend_services::ClientBuilder {
crate::new_client_builder(super::builder::region_backend_services::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::RegionBackendServices + 'static,
{
Self { inner: stub.into() }
}
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::RegionBackendServices>>
{
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::RegionBackendServices> {
super::transport::RegionBackendServices::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::RegionBackendServices> {
Self::build_transport(conf)
.await
.map(super::tracing::RegionBackendServices::new)
}
pub fn delete(&self) -> super::builder::region_backend_services::Delete {
super::builder::region_backend_services::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::region_backend_services::Get {
super::builder::region_backend_services::Get::new(self.inner.clone())
}
pub fn get_health(&self) -> super::builder::region_backend_services::GetHealth {
super::builder::region_backend_services::GetHealth::new(self.inner.clone())
}
pub fn get_iam_policy(&self) -> super::builder::region_backend_services::GetIamPolicy {
super::builder::region_backend_services::GetIamPolicy::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::region_backend_services::Insert {
super::builder::region_backend_services::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::region_backend_services::List {
super::builder::region_backend_services::List::new(self.inner.clone())
}
pub fn list_usable(&self) -> super::builder::region_backend_services::ListUsable {
super::builder::region_backend_services::ListUsable::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::region_backend_services::Patch {
super::builder::region_backend_services::Patch::new(self.inner.clone())
}
pub fn set_iam_policy(&self) -> super::builder::region_backend_services::SetIamPolicy {
super::builder::region_backend_services::SetIamPolicy::new(self.inner.clone())
}
pub fn set_security_policy(
&self,
) -> super::builder::region_backend_services::SetSecurityPolicy {
super::builder::region_backend_services::SetSecurityPolicy::new(self.inner.clone())
}
pub fn test_iam_permissions(
&self,
) -> super::builder::region_backend_services::TestIamPermissions {
super::builder::region_backend_services::TestIamPermissions::new(self.inner.clone())
}
pub fn update(&self) -> super::builder::region_backend_services::Update {
super::builder::region_backend_services::Update::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::region_backend_services::GetOperation {
super::builder::region_backend_services::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "region-commitments")]
#[cfg_attr(docsrs, doc(cfg(feature = "region-commitments")))]
#[derive(Clone, Debug)]
pub struct RegionCommitments {
inner: std::sync::Arc<dyn super::stub::dynamic::RegionCommitments>,
}
#[cfg(feature = "region-commitments")]
impl RegionCommitments {
pub fn builder() -> super::builder::region_commitments::ClientBuilder {
crate::new_client_builder(super::builder::region_commitments::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::RegionCommitments + 'static,
{
Self { inner: stub.into() }
}
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::RegionCommitments>>
{
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::RegionCommitments> {
super::transport::RegionCommitments::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::RegionCommitments> {
Self::build_transport(conf)
.await
.map(super::tracing::RegionCommitments::new)
}
pub fn aggregated_list(&self) -> super::builder::region_commitments::AggregatedList {
super::builder::region_commitments::AggregatedList::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::region_commitments::Get {
super::builder::region_commitments::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::region_commitments::Insert {
super::builder::region_commitments::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::region_commitments::List {
super::builder::region_commitments::List::new(self.inner.clone())
}
pub fn update(&self) -> super::builder::region_commitments::Update {
super::builder::region_commitments::Update::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::region_commitments::GetOperation {
super::builder::region_commitments::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "region-composite-health-checks")]
#[cfg_attr(docsrs, doc(cfg(feature = "region-composite-health-checks")))]
#[derive(Clone, Debug)]
pub struct RegionCompositeHealthChecks {
inner: std::sync::Arc<dyn super::stub::dynamic::RegionCompositeHealthChecks>,
}
#[cfg(feature = "region-composite-health-checks")]
impl RegionCompositeHealthChecks {
pub fn builder() -> super::builder::region_composite_health_checks::ClientBuilder {
crate::new_client_builder(super::builder::region_composite_health_checks::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::RegionCompositeHealthChecks + 'static,
{
Self { inner: stub.into() }
}
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::RegionCompositeHealthChecks>,
> {
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::RegionCompositeHealthChecks> {
super::transport::RegionCompositeHealthChecks::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::RegionCompositeHealthChecks> {
Self::build_transport(conf)
.await
.map(super::tracing::RegionCompositeHealthChecks::new)
}
pub fn aggregated_list(
&self,
) -> super::builder::region_composite_health_checks::AggregatedList {
super::builder::region_composite_health_checks::AggregatedList::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::region_composite_health_checks::Delete {
super::builder::region_composite_health_checks::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::region_composite_health_checks::Get {
super::builder::region_composite_health_checks::Get::new(self.inner.clone())
}
pub fn get_health(&self) -> super::builder::region_composite_health_checks::GetHealth {
super::builder::region_composite_health_checks::GetHealth::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::region_composite_health_checks::Insert {
super::builder::region_composite_health_checks::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::region_composite_health_checks::List {
super::builder::region_composite_health_checks::List::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::region_composite_health_checks::Patch {
super::builder::region_composite_health_checks::Patch::new(self.inner.clone())
}
pub fn test_iam_permissions(
&self,
) -> super::builder::region_composite_health_checks::TestIamPermissions {
super::builder::region_composite_health_checks::TestIamPermissions::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::region_composite_health_checks::GetOperation {
super::builder::region_composite_health_checks::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "region-disk-types")]
#[cfg_attr(docsrs, doc(cfg(feature = "region-disk-types")))]
#[derive(Clone, Debug)]
pub struct RegionDiskTypes {
inner: std::sync::Arc<dyn super::stub::dynamic::RegionDiskTypes>,
}
#[cfg(feature = "region-disk-types")]
impl RegionDiskTypes {
pub fn builder() -> super::builder::region_disk_types::ClientBuilder {
crate::new_client_builder(super::builder::region_disk_types::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::RegionDiskTypes + 'static,
{
Self { inner: stub.into() }
}
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::RegionDiskTypes>> {
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::RegionDiskTypes> {
super::transport::RegionDiskTypes::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::RegionDiskTypes> {
Self::build_transport(conf)
.await
.map(super::tracing::RegionDiskTypes::new)
}
pub fn get(&self) -> super::builder::region_disk_types::Get {
super::builder::region_disk_types::Get::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::region_disk_types::List {
super::builder::region_disk_types::List::new(self.inner.clone())
}
}
#[cfg(feature = "region-disks")]
#[cfg_attr(docsrs, doc(cfg(feature = "region-disks")))]
#[derive(Clone, Debug)]
pub struct RegionDisks {
inner: std::sync::Arc<dyn super::stub::dynamic::RegionDisks>,
}
#[cfg(feature = "region-disks")]
impl RegionDisks {
pub fn builder() -> super::builder::region_disks::ClientBuilder {
crate::new_client_builder(super::builder::region_disks::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::RegionDisks + 'static,
{
Self { inner: stub.into() }
}
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::RegionDisks>> {
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::RegionDisks> {
super::transport::RegionDisks::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::RegionDisks> {
Self::build_transport(conf)
.await
.map(super::tracing::RegionDisks::new)
}
pub fn add_resource_policies(&self) -> super::builder::region_disks::AddResourcePolicies {
super::builder::region_disks::AddResourcePolicies::new(self.inner.clone())
}
pub fn bulk_insert(&self) -> super::builder::region_disks::BulkInsert {
super::builder::region_disks::BulkInsert::new(self.inner.clone())
}
pub fn create_snapshot(&self) -> super::builder::region_disks::CreateSnapshot {
super::builder::region_disks::CreateSnapshot::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::region_disks::Delete {
super::builder::region_disks::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::region_disks::Get {
super::builder::region_disks::Get::new(self.inner.clone())
}
pub fn get_iam_policy(&self) -> super::builder::region_disks::GetIamPolicy {
super::builder::region_disks::GetIamPolicy::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::region_disks::Insert {
super::builder::region_disks::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::region_disks::List {
super::builder::region_disks::List::new(self.inner.clone())
}
pub fn remove_resource_policies(&self) -> super::builder::region_disks::RemoveResourcePolicies {
super::builder::region_disks::RemoveResourcePolicies::new(self.inner.clone())
}
pub fn resize(&self) -> super::builder::region_disks::Resize {
super::builder::region_disks::Resize::new(self.inner.clone())
}
pub fn set_iam_policy(&self) -> super::builder::region_disks::SetIamPolicy {
super::builder::region_disks::SetIamPolicy::new(self.inner.clone())
}
pub fn set_labels(&self) -> super::builder::region_disks::SetLabels {
super::builder::region_disks::SetLabels::new(self.inner.clone())
}
pub fn start_async_replication(&self) -> super::builder::region_disks::StartAsyncReplication {
super::builder::region_disks::StartAsyncReplication::new(self.inner.clone())
}
pub fn stop_async_replication(&self) -> super::builder::region_disks::StopAsyncReplication {
super::builder::region_disks::StopAsyncReplication::new(self.inner.clone())
}
pub fn stop_group_async_replication(
&self,
) -> super::builder::region_disks::StopGroupAsyncReplication {
super::builder::region_disks::StopGroupAsyncReplication::new(self.inner.clone())
}
pub fn test_iam_permissions(&self) -> super::builder::region_disks::TestIamPermissions {
super::builder::region_disks::TestIamPermissions::new(self.inner.clone())
}
pub fn update(&self) -> super::builder::region_disks::Update {
super::builder::region_disks::Update::new(self.inner.clone())
}
pub fn update_kms_key(&self) -> super::builder::region_disks::UpdateKmsKey {
super::builder::region_disks::UpdateKmsKey::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::region_disks::GetOperation {
super::builder::region_disks::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "region-health-aggregation-policies")]
#[cfg_attr(docsrs, doc(cfg(feature = "region-health-aggregation-policies")))]
#[derive(Clone, Debug)]
pub struct RegionHealthAggregationPolicies {
inner: std::sync::Arc<dyn super::stub::dynamic::RegionHealthAggregationPolicies>,
}
#[cfg(feature = "region-health-aggregation-policies")]
impl RegionHealthAggregationPolicies {
pub fn builder() -> super::builder::region_health_aggregation_policies::ClientBuilder {
crate::new_client_builder(
super::builder::region_health_aggregation_policies::client::Factory,
)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::RegionHealthAggregationPolicies + 'static,
{
Self { inner: stub.into() }
}
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::RegionHealthAggregationPolicies>,
> {
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::RegionHealthAggregationPolicies> {
super::transport::RegionHealthAggregationPolicies::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::RegionHealthAggregationPolicies> {
Self::build_transport(conf)
.await
.map(super::tracing::RegionHealthAggregationPolicies::new)
}
pub fn aggregated_list(
&self,
) -> super::builder::region_health_aggregation_policies::AggregatedList {
super::builder::region_health_aggregation_policies::AggregatedList::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::region_health_aggregation_policies::Delete {
super::builder::region_health_aggregation_policies::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::region_health_aggregation_policies::Get {
super::builder::region_health_aggregation_policies::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::region_health_aggregation_policies::Insert {
super::builder::region_health_aggregation_policies::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::region_health_aggregation_policies::List {
super::builder::region_health_aggregation_policies::List::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::region_health_aggregation_policies::Patch {
super::builder::region_health_aggregation_policies::Patch::new(self.inner.clone())
}
pub fn test_iam_permissions(
&self,
) -> super::builder::region_health_aggregation_policies::TestIamPermissions {
super::builder::region_health_aggregation_policies::TestIamPermissions::new(
self.inner.clone(),
)
}
pub fn get_operation(
&self,
) -> super::builder::region_health_aggregation_policies::GetOperation {
super::builder::region_health_aggregation_policies::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "region-health-check-services")]
#[cfg_attr(docsrs, doc(cfg(feature = "region-health-check-services")))]
#[derive(Clone, Debug)]
pub struct RegionHealthCheckServices {
inner: std::sync::Arc<dyn super::stub::dynamic::RegionHealthCheckServices>,
}
#[cfg(feature = "region-health-check-services")]
impl RegionHealthCheckServices {
pub fn builder() -> super::builder::region_health_check_services::ClientBuilder {
crate::new_client_builder(super::builder::region_health_check_services::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::RegionHealthCheckServices + 'static,
{
Self { inner: stub.into() }
}
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::RegionHealthCheckServices>,
> {
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::RegionHealthCheckServices> {
super::transport::RegionHealthCheckServices::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::RegionHealthCheckServices> {
Self::build_transport(conf)
.await
.map(super::tracing::RegionHealthCheckServices::new)
}
pub fn aggregated_list(&self) -> super::builder::region_health_check_services::AggregatedList {
super::builder::region_health_check_services::AggregatedList::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::region_health_check_services::Delete {
super::builder::region_health_check_services::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::region_health_check_services::Get {
super::builder::region_health_check_services::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::region_health_check_services::Insert {
super::builder::region_health_check_services::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::region_health_check_services::List {
super::builder::region_health_check_services::List::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::region_health_check_services::Patch {
super::builder::region_health_check_services::Patch::new(self.inner.clone())
}
pub fn test_iam_permissions(
&self,
) -> super::builder::region_health_check_services::TestIamPermissions {
super::builder::region_health_check_services::TestIamPermissions::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::region_health_check_services::GetOperation {
super::builder::region_health_check_services::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "region-health-checks")]
#[cfg_attr(docsrs, doc(cfg(feature = "region-health-checks")))]
#[derive(Clone, Debug)]
pub struct RegionHealthChecks {
inner: std::sync::Arc<dyn super::stub::dynamic::RegionHealthChecks>,
}
#[cfg(feature = "region-health-checks")]
impl RegionHealthChecks {
pub fn builder() -> super::builder::region_health_checks::ClientBuilder {
crate::new_client_builder(super::builder::region_health_checks::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::RegionHealthChecks + 'static,
{
Self { inner: stub.into() }
}
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::RegionHealthChecks>>
{
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::RegionHealthChecks> {
super::transport::RegionHealthChecks::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::RegionHealthChecks> {
Self::build_transport(conf)
.await
.map(super::tracing::RegionHealthChecks::new)
}
pub fn delete(&self) -> super::builder::region_health_checks::Delete {
super::builder::region_health_checks::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::region_health_checks::Get {
super::builder::region_health_checks::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::region_health_checks::Insert {
super::builder::region_health_checks::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::region_health_checks::List {
super::builder::region_health_checks::List::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::region_health_checks::Patch {
super::builder::region_health_checks::Patch::new(self.inner.clone())
}
pub fn test_iam_permissions(&self) -> super::builder::region_health_checks::TestIamPermissions {
super::builder::region_health_checks::TestIamPermissions::new(self.inner.clone())
}
pub fn update(&self) -> super::builder::region_health_checks::Update {
super::builder::region_health_checks::Update::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::region_health_checks::GetOperation {
super::builder::region_health_checks::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "region-health-sources")]
#[cfg_attr(docsrs, doc(cfg(feature = "region-health-sources")))]
#[derive(Clone, Debug)]
pub struct RegionHealthSources {
inner: std::sync::Arc<dyn super::stub::dynamic::RegionHealthSources>,
}
#[cfg(feature = "region-health-sources")]
impl RegionHealthSources {
pub fn builder() -> super::builder::region_health_sources::ClientBuilder {
crate::new_client_builder(super::builder::region_health_sources::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::RegionHealthSources + 'static,
{
Self { inner: stub.into() }
}
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::RegionHealthSources>>
{
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::RegionHealthSources> {
super::transport::RegionHealthSources::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::RegionHealthSources> {
Self::build_transport(conf)
.await
.map(super::tracing::RegionHealthSources::new)
}
pub fn aggregated_list(&self) -> super::builder::region_health_sources::AggregatedList {
super::builder::region_health_sources::AggregatedList::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::region_health_sources::Delete {
super::builder::region_health_sources::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::region_health_sources::Get {
super::builder::region_health_sources::Get::new(self.inner.clone())
}
pub fn get_health(&self) -> super::builder::region_health_sources::GetHealth {
super::builder::region_health_sources::GetHealth::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::region_health_sources::Insert {
super::builder::region_health_sources::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::region_health_sources::List {
super::builder::region_health_sources::List::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::region_health_sources::Patch {
super::builder::region_health_sources::Patch::new(self.inner.clone())
}
pub fn test_iam_permissions(
&self,
) -> super::builder::region_health_sources::TestIamPermissions {
super::builder::region_health_sources::TestIamPermissions::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::region_health_sources::GetOperation {
super::builder::region_health_sources::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "region-instance-group-manager-resize-requests")]
#[cfg_attr(
docsrs,
doc(cfg(feature = "region-instance-group-manager-resize-requests"))
)]
#[derive(Clone, Debug)]
pub struct RegionInstanceGroupManagerResizeRequests {
inner: std::sync::Arc<dyn super::stub::dynamic::RegionInstanceGroupManagerResizeRequests>,
}
#[cfg(feature = "region-instance-group-manager-resize-requests")]
impl RegionInstanceGroupManagerResizeRequests {
pub fn builder() -> super::builder::region_instance_group_manager_resize_requests::ClientBuilder
{
crate::new_client_builder(
super::builder::region_instance_group_manager_resize_requests::client::Factory,
)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::RegionInstanceGroupManagerResizeRequests + 'static,
{
Self { inner: stub.into() }
}
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::RegionInstanceGroupManagerResizeRequests>,
> {
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::RegionInstanceGroupManagerResizeRequests>
{
super::transport::RegionInstanceGroupManagerResizeRequests::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::RegionInstanceGroupManagerResizeRequests>
{
Self::build_transport(conf)
.await
.map(super::tracing::RegionInstanceGroupManagerResizeRequests::new)
}
pub fn cancel(&self) -> super::builder::region_instance_group_manager_resize_requests::Cancel {
super::builder::region_instance_group_manager_resize_requests::Cancel::new(
self.inner.clone(),
)
}
pub fn delete(&self) -> super::builder::region_instance_group_manager_resize_requests::Delete {
super::builder::region_instance_group_manager_resize_requests::Delete::new(
self.inner.clone(),
)
}
pub fn get(&self) -> super::builder::region_instance_group_manager_resize_requests::Get {
super::builder::region_instance_group_manager_resize_requests::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::region_instance_group_manager_resize_requests::Insert {
super::builder::region_instance_group_manager_resize_requests::Insert::new(
self.inner.clone(),
)
}
pub fn list(&self) -> super::builder::region_instance_group_manager_resize_requests::List {
super::builder::region_instance_group_manager_resize_requests::List::new(self.inner.clone())
}
pub fn get_operation(
&self,
) -> super::builder::region_instance_group_manager_resize_requests::GetOperation {
super::builder::region_instance_group_manager_resize_requests::GetOperation::new(
self.inner.clone(),
)
}
}
#[cfg(feature = "region-instance-group-managers")]
#[cfg_attr(docsrs, doc(cfg(feature = "region-instance-group-managers")))]
#[derive(Clone, Debug)]
pub struct RegionInstanceGroupManagers {
inner: std::sync::Arc<dyn super::stub::dynamic::RegionInstanceGroupManagers>,
}
#[cfg(feature = "region-instance-group-managers")]
impl RegionInstanceGroupManagers {
pub fn builder() -> super::builder::region_instance_group_managers::ClientBuilder {
crate::new_client_builder(super::builder::region_instance_group_managers::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::RegionInstanceGroupManagers + 'static,
{
Self { inner: stub.into() }
}
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::RegionInstanceGroupManagers>,
> {
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::RegionInstanceGroupManagers> {
super::transport::RegionInstanceGroupManagers::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::RegionInstanceGroupManagers> {
Self::build_transport(conf)
.await
.map(super::tracing::RegionInstanceGroupManagers::new)
}
pub fn abandon_instances(
&self,
) -> super::builder::region_instance_group_managers::AbandonInstances {
super::builder::region_instance_group_managers::AbandonInstances::new(self.inner.clone())
}
pub fn apply_updates_to_instances(
&self,
) -> super::builder::region_instance_group_managers::ApplyUpdatesToInstances {
super::builder::region_instance_group_managers::ApplyUpdatesToInstances::new(
self.inner.clone(),
)
}
pub fn create_instances(
&self,
) -> super::builder::region_instance_group_managers::CreateInstances {
super::builder::region_instance_group_managers::CreateInstances::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::region_instance_group_managers::Delete {
super::builder::region_instance_group_managers::Delete::new(self.inner.clone())
}
pub fn delete_instances(
&self,
) -> super::builder::region_instance_group_managers::DeleteInstances {
super::builder::region_instance_group_managers::DeleteInstances::new(self.inner.clone())
}
pub fn delete_per_instance_configs(
&self,
) -> super::builder::region_instance_group_managers::DeletePerInstanceConfigs {
super::builder::region_instance_group_managers::DeletePerInstanceConfigs::new(
self.inner.clone(),
)
}
pub fn get(&self) -> super::builder::region_instance_group_managers::Get {
super::builder::region_instance_group_managers::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::region_instance_group_managers::Insert {
super::builder::region_instance_group_managers::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::region_instance_group_managers::List {
super::builder::region_instance_group_managers::List::new(self.inner.clone())
}
pub fn list_errors(&self) -> super::builder::region_instance_group_managers::ListErrors {
super::builder::region_instance_group_managers::ListErrors::new(self.inner.clone())
}
pub fn list_managed_instances(
&self,
) -> super::builder::region_instance_group_managers::ListManagedInstances {
super::builder::region_instance_group_managers::ListManagedInstances::new(
self.inner.clone(),
)
}
pub fn list_per_instance_configs(
&self,
) -> super::builder::region_instance_group_managers::ListPerInstanceConfigs {
super::builder::region_instance_group_managers::ListPerInstanceConfigs::new(
self.inner.clone(),
)
}
pub fn patch(&self) -> super::builder::region_instance_group_managers::Patch {
super::builder::region_instance_group_managers::Patch::new(self.inner.clone())
}
pub fn patch_per_instance_configs(
&self,
) -> super::builder::region_instance_group_managers::PatchPerInstanceConfigs {
super::builder::region_instance_group_managers::PatchPerInstanceConfigs::new(
self.inner.clone(),
)
}
pub fn recreate_instances(
&self,
) -> super::builder::region_instance_group_managers::RecreateInstances {
super::builder::region_instance_group_managers::RecreateInstances::new(self.inner.clone())
}
pub fn resize(&self) -> super::builder::region_instance_group_managers::Resize {
super::builder::region_instance_group_managers::Resize::new(self.inner.clone())
}
pub fn resume_instances(
&self,
) -> super::builder::region_instance_group_managers::ResumeInstances {
super::builder::region_instance_group_managers::ResumeInstances::new(self.inner.clone())
}
pub fn set_instance_template(
&self,
) -> super::builder::region_instance_group_managers::SetInstanceTemplate {
super::builder::region_instance_group_managers::SetInstanceTemplate::new(self.inner.clone())
}
pub fn set_target_pools(
&self,
) -> super::builder::region_instance_group_managers::SetTargetPools {
super::builder::region_instance_group_managers::SetTargetPools::new(self.inner.clone())
}
pub fn start_instances(
&self,
) -> super::builder::region_instance_group_managers::StartInstances {
super::builder::region_instance_group_managers::StartInstances::new(self.inner.clone())
}
pub fn stop_instances(&self) -> super::builder::region_instance_group_managers::StopInstances {
super::builder::region_instance_group_managers::StopInstances::new(self.inner.clone())
}
pub fn suspend_instances(
&self,
) -> super::builder::region_instance_group_managers::SuspendInstances {
super::builder::region_instance_group_managers::SuspendInstances::new(self.inner.clone())
}
pub fn update_per_instance_configs(
&self,
) -> super::builder::region_instance_group_managers::UpdatePerInstanceConfigs {
super::builder::region_instance_group_managers::UpdatePerInstanceConfigs::new(
self.inner.clone(),
)
}
pub fn get_operation(&self) -> super::builder::region_instance_group_managers::GetOperation {
super::builder::region_instance_group_managers::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "region-instance-groups")]
#[cfg_attr(docsrs, doc(cfg(feature = "region-instance-groups")))]
#[derive(Clone, Debug)]
pub struct RegionInstanceGroups {
inner: std::sync::Arc<dyn super::stub::dynamic::RegionInstanceGroups>,
}
#[cfg(feature = "region-instance-groups")]
impl RegionInstanceGroups {
pub fn builder() -> super::builder::region_instance_groups::ClientBuilder {
crate::new_client_builder(super::builder::region_instance_groups::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::RegionInstanceGroups + 'static,
{
Self { inner: stub.into() }
}
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::RegionInstanceGroups>>
{
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::RegionInstanceGroups> {
super::transport::RegionInstanceGroups::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::RegionInstanceGroups> {
Self::build_transport(conf)
.await
.map(super::tracing::RegionInstanceGroups::new)
}
pub fn get(&self) -> super::builder::region_instance_groups::Get {
super::builder::region_instance_groups::Get::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::region_instance_groups::List {
super::builder::region_instance_groups::List::new(self.inner.clone())
}
pub fn list_instances(&self) -> super::builder::region_instance_groups::ListInstances {
super::builder::region_instance_groups::ListInstances::new(self.inner.clone())
}
pub fn set_named_ports(&self) -> super::builder::region_instance_groups::SetNamedPorts {
super::builder::region_instance_groups::SetNamedPorts::new(self.inner.clone())
}
pub fn test_iam_permissions(
&self,
) -> super::builder::region_instance_groups::TestIamPermissions {
super::builder::region_instance_groups::TestIamPermissions::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::region_instance_groups::GetOperation {
super::builder::region_instance_groups::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "region-instance-templates")]
#[cfg_attr(docsrs, doc(cfg(feature = "region-instance-templates")))]
#[derive(Clone, Debug)]
pub struct RegionInstanceTemplates {
inner: std::sync::Arc<dyn super::stub::dynamic::RegionInstanceTemplates>,
}
#[cfg(feature = "region-instance-templates")]
impl RegionInstanceTemplates {
pub fn builder() -> super::builder::region_instance_templates::ClientBuilder {
crate::new_client_builder(super::builder::region_instance_templates::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::RegionInstanceTemplates + 'static,
{
Self { inner: stub.into() }
}
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::RegionInstanceTemplates>>
{
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::RegionInstanceTemplates> {
super::transport::RegionInstanceTemplates::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::RegionInstanceTemplates> {
Self::build_transport(conf)
.await
.map(super::tracing::RegionInstanceTemplates::new)
}
pub fn delete(&self) -> super::builder::region_instance_templates::Delete {
super::builder::region_instance_templates::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::region_instance_templates::Get {
super::builder::region_instance_templates::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::region_instance_templates::Insert {
super::builder::region_instance_templates::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::region_instance_templates::List {
super::builder::region_instance_templates::List::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::region_instance_templates::GetOperation {
super::builder::region_instance_templates::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "region-instances")]
#[cfg_attr(docsrs, doc(cfg(feature = "region-instances")))]
#[derive(Clone, Debug)]
pub struct RegionInstances {
inner: std::sync::Arc<dyn super::stub::dynamic::RegionInstances>,
}
#[cfg(feature = "region-instances")]
impl RegionInstances {
pub fn builder() -> super::builder::region_instances::ClientBuilder {
crate::new_client_builder(super::builder::region_instances::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::RegionInstances + 'static,
{
Self { inner: stub.into() }
}
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::RegionInstances>> {
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::RegionInstances> {
super::transport::RegionInstances::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::RegionInstances> {
Self::build_transport(conf)
.await
.map(super::tracing::RegionInstances::new)
}
pub fn bulk_insert(&self) -> super::builder::region_instances::BulkInsert {
super::builder::region_instances::BulkInsert::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::region_instances::GetOperation {
super::builder::region_instances::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "region-instant-snapshot-groups")]
#[cfg_attr(docsrs, doc(cfg(feature = "region-instant-snapshot-groups")))]
#[derive(Clone, Debug)]
pub struct RegionInstantSnapshotGroups {
inner: std::sync::Arc<dyn super::stub::dynamic::RegionInstantSnapshotGroups>,
}
#[cfg(feature = "region-instant-snapshot-groups")]
impl RegionInstantSnapshotGroups {
pub fn builder() -> super::builder::region_instant_snapshot_groups::ClientBuilder {
crate::new_client_builder(super::builder::region_instant_snapshot_groups::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::RegionInstantSnapshotGroups + 'static,
{
Self { inner: stub.into() }
}
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::RegionInstantSnapshotGroups>,
> {
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::RegionInstantSnapshotGroups> {
super::transport::RegionInstantSnapshotGroups::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::RegionInstantSnapshotGroups> {
Self::build_transport(conf)
.await
.map(super::tracing::RegionInstantSnapshotGroups::new)
}
pub fn delete(&self) -> super::builder::region_instant_snapshot_groups::Delete {
super::builder::region_instant_snapshot_groups::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::region_instant_snapshot_groups::Get {
super::builder::region_instant_snapshot_groups::Get::new(self.inner.clone())
}
pub fn get_iam_policy(&self) -> super::builder::region_instant_snapshot_groups::GetIamPolicy {
super::builder::region_instant_snapshot_groups::GetIamPolicy::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::region_instant_snapshot_groups::Insert {
super::builder::region_instant_snapshot_groups::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::region_instant_snapshot_groups::List {
super::builder::region_instant_snapshot_groups::List::new(self.inner.clone())
}
pub fn set_iam_policy(&self) -> super::builder::region_instant_snapshot_groups::SetIamPolicy {
super::builder::region_instant_snapshot_groups::SetIamPolicy::new(self.inner.clone())
}
pub fn test_iam_permissions(
&self,
) -> super::builder::region_instant_snapshot_groups::TestIamPermissions {
super::builder::region_instant_snapshot_groups::TestIamPermissions::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::region_instant_snapshot_groups::GetOperation {
super::builder::region_instant_snapshot_groups::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "region-instant-snapshots")]
#[cfg_attr(docsrs, doc(cfg(feature = "region-instant-snapshots")))]
#[derive(Clone, Debug)]
pub struct RegionInstantSnapshots {
inner: std::sync::Arc<dyn super::stub::dynamic::RegionInstantSnapshots>,
}
#[cfg(feature = "region-instant-snapshots")]
impl RegionInstantSnapshots {
pub fn builder() -> super::builder::region_instant_snapshots::ClientBuilder {
crate::new_client_builder(super::builder::region_instant_snapshots::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::RegionInstantSnapshots + 'static,
{
Self { inner: stub.into() }
}
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::RegionInstantSnapshots>>
{
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::RegionInstantSnapshots> {
super::transport::RegionInstantSnapshots::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::RegionInstantSnapshots> {
Self::build_transport(conf)
.await
.map(super::tracing::RegionInstantSnapshots::new)
}
pub fn delete(&self) -> super::builder::region_instant_snapshots::Delete {
super::builder::region_instant_snapshots::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::region_instant_snapshots::Get {
super::builder::region_instant_snapshots::Get::new(self.inner.clone())
}
pub fn get_iam_policy(&self) -> super::builder::region_instant_snapshots::GetIamPolicy {
super::builder::region_instant_snapshots::GetIamPolicy::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::region_instant_snapshots::Insert {
super::builder::region_instant_snapshots::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::region_instant_snapshots::List {
super::builder::region_instant_snapshots::List::new(self.inner.clone())
}
pub fn set_iam_policy(&self) -> super::builder::region_instant_snapshots::SetIamPolicy {
super::builder::region_instant_snapshots::SetIamPolicy::new(self.inner.clone())
}
pub fn set_labels(&self) -> super::builder::region_instant_snapshots::SetLabels {
super::builder::region_instant_snapshots::SetLabels::new(self.inner.clone())
}
pub fn test_iam_permissions(
&self,
) -> super::builder::region_instant_snapshots::TestIamPermissions {
super::builder::region_instant_snapshots::TestIamPermissions::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::region_instant_snapshots::GetOperation {
super::builder::region_instant_snapshots::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "region-network-endpoint-groups")]
#[cfg_attr(docsrs, doc(cfg(feature = "region-network-endpoint-groups")))]
#[derive(Clone, Debug)]
pub struct RegionNetworkEndpointGroups {
inner: std::sync::Arc<dyn super::stub::dynamic::RegionNetworkEndpointGroups>,
}
#[cfg(feature = "region-network-endpoint-groups")]
impl RegionNetworkEndpointGroups {
pub fn builder() -> super::builder::region_network_endpoint_groups::ClientBuilder {
crate::new_client_builder(super::builder::region_network_endpoint_groups::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::RegionNetworkEndpointGroups + 'static,
{
Self { inner: stub.into() }
}
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::RegionNetworkEndpointGroups>,
> {
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::RegionNetworkEndpointGroups> {
super::transport::RegionNetworkEndpointGroups::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::RegionNetworkEndpointGroups> {
Self::build_transport(conf)
.await
.map(super::tracing::RegionNetworkEndpointGroups::new)
}
pub fn attach_network_endpoints(
&self,
) -> super::builder::region_network_endpoint_groups::AttachNetworkEndpoints {
super::builder::region_network_endpoint_groups::AttachNetworkEndpoints::new(
self.inner.clone(),
)
}
pub fn delete(&self) -> super::builder::region_network_endpoint_groups::Delete {
super::builder::region_network_endpoint_groups::Delete::new(self.inner.clone())
}
pub fn detach_network_endpoints(
&self,
) -> super::builder::region_network_endpoint_groups::DetachNetworkEndpoints {
super::builder::region_network_endpoint_groups::DetachNetworkEndpoints::new(
self.inner.clone(),
)
}
pub fn get(&self) -> super::builder::region_network_endpoint_groups::Get {
super::builder::region_network_endpoint_groups::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::region_network_endpoint_groups::Insert {
super::builder::region_network_endpoint_groups::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::region_network_endpoint_groups::List {
super::builder::region_network_endpoint_groups::List::new(self.inner.clone())
}
pub fn list_network_endpoints(
&self,
) -> super::builder::region_network_endpoint_groups::ListNetworkEndpoints {
super::builder::region_network_endpoint_groups::ListNetworkEndpoints::new(
self.inner.clone(),
)
}
pub fn get_operation(&self) -> super::builder::region_network_endpoint_groups::GetOperation {
super::builder::region_network_endpoint_groups::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "region-network-firewall-policies")]
#[cfg_attr(docsrs, doc(cfg(feature = "region-network-firewall-policies")))]
#[derive(Clone, Debug)]
pub struct RegionNetworkFirewallPolicies {
inner: std::sync::Arc<dyn super::stub::dynamic::RegionNetworkFirewallPolicies>,
}
#[cfg(feature = "region-network-firewall-policies")]
impl RegionNetworkFirewallPolicies {
pub fn builder() -> super::builder::region_network_firewall_policies::ClientBuilder {
crate::new_client_builder(super::builder::region_network_firewall_policies::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::RegionNetworkFirewallPolicies + 'static,
{
Self { inner: stub.into() }
}
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::RegionNetworkFirewallPolicies>,
> {
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::RegionNetworkFirewallPolicies> {
super::transport::RegionNetworkFirewallPolicies::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::RegionNetworkFirewallPolicies> {
Self::build_transport(conf)
.await
.map(super::tracing::RegionNetworkFirewallPolicies::new)
}
pub fn add_association(
&self,
) -> super::builder::region_network_firewall_policies::AddAssociation {
super::builder::region_network_firewall_policies::AddAssociation::new(self.inner.clone())
}
pub fn add_rule(&self) -> super::builder::region_network_firewall_policies::AddRule {
super::builder::region_network_firewall_policies::AddRule::new(self.inner.clone())
}
pub fn clone_rules(&self) -> super::builder::region_network_firewall_policies::CloneRules {
super::builder::region_network_firewall_policies::CloneRules::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::region_network_firewall_policies::Delete {
super::builder::region_network_firewall_policies::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::region_network_firewall_policies::Get {
super::builder::region_network_firewall_policies::Get::new(self.inner.clone())
}
pub fn get_association(
&self,
) -> super::builder::region_network_firewall_policies::GetAssociation {
super::builder::region_network_firewall_policies::GetAssociation::new(self.inner.clone())
}
pub fn get_effective_firewalls(
&self,
) -> super::builder::region_network_firewall_policies::GetEffectiveFirewalls {
super::builder::region_network_firewall_policies::GetEffectiveFirewalls::new(
self.inner.clone(),
)
}
pub fn get_iam_policy(&self) -> super::builder::region_network_firewall_policies::GetIamPolicy {
super::builder::region_network_firewall_policies::GetIamPolicy::new(self.inner.clone())
}
pub fn get_rule(&self) -> super::builder::region_network_firewall_policies::GetRule {
super::builder::region_network_firewall_policies::GetRule::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::region_network_firewall_policies::Insert {
super::builder::region_network_firewall_policies::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::region_network_firewall_policies::List {
super::builder::region_network_firewall_policies::List::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::region_network_firewall_policies::Patch {
super::builder::region_network_firewall_policies::Patch::new(self.inner.clone())
}
pub fn patch_rule(&self) -> super::builder::region_network_firewall_policies::PatchRule {
super::builder::region_network_firewall_policies::PatchRule::new(self.inner.clone())
}
pub fn remove_association(
&self,
) -> super::builder::region_network_firewall_policies::RemoveAssociation {
super::builder::region_network_firewall_policies::RemoveAssociation::new(self.inner.clone())
}
pub fn remove_rule(&self) -> super::builder::region_network_firewall_policies::RemoveRule {
super::builder::region_network_firewall_policies::RemoveRule::new(self.inner.clone())
}
pub fn set_iam_policy(&self) -> super::builder::region_network_firewall_policies::SetIamPolicy {
super::builder::region_network_firewall_policies::SetIamPolicy::new(self.inner.clone())
}
pub fn test_iam_permissions(
&self,
) -> super::builder::region_network_firewall_policies::TestIamPermissions {
super::builder::region_network_firewall_policies::TestIamPermissions::new(
self.inner.clone(),
)
}
pub fn get_operation(&self) -> super::builder::region_network_firewall_policies::GetOperation {
super::builder::region_network_firewall_policies::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "region-notification-endpoints")]
#[cfg_attr(docsrs, doc(cfg(feature = "region-notification-endpoints")))]
#[derive(Clone, Debug)]
pub struct RegionNotificationEndpoints {
inner: std::sync::Arc<dyn super::stub::dynamic::RegionNotificationEndpoints>,
}
#[cfg(feature = "region-notification-endpoints")]
impl RegionNotificationEndpoints {
pub fn builder() -> super::builder::region_notification_endpoints::ClientBuilder {
crate::new_client_builder(super::builder::region_notification_endpoints::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::RegionNotificationEndpoints + 'static,
{
Self { inner: stub.into() }
}
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::RegionNotificationEndpoints>,
> {
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::RegionNotificationEndpoints> {
super::transport::RegionNotificationEndpoints::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::RegionNotificationEndpoints> {
Self::build_transport(conf)
.await
.map(super::tracing::RegionNotificationEndpoints::new)
}
pub fn aggregated_list(&self) -> super::builder::region_notification_endpoints::AggregatedList {
super::builder::region_notification_endpoints::AggregatedList::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::region_notification_endpoints::Delete {
super::builder::region_notification_endpoints::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::region_notification_endpoints::Get {
super::builder::region_notification_endpoints::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::region_notification_endpoints::Insert {
super::builder::region_notification_endpoints::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::region_notification_endpoints::List {
super::builder::region_notification_endpoints::List::new(self.inner.clone())
}
pub fn test_iam_permissions(
&self,
) -> super::builder::region_notification_endpoints::TestIamPermissions {
super::builder::region_notification_endpoints::TestIamPermissions::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::region_notification_endpoints::GetOperation {
super::builder::region_notification_endpoints::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "region-operations")]
#[cfg_attr(docsrs, doc(cfg(feature = "region-operations")))]
#[derive(Clone, Debug)]
pub struct RegionOperations {
inner: std::sync::Arc<dyn super::stub::dynamic::RegionOperations>,
}
#[cfg(feature = "region-operations")]
impl RegionOperations {
pub fn builder() -> super::builder::region_operations::ClientBuilder {
crate::new_client_builder(super::builder::region_operations::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::RegionOperations + 'static,
{
Self { inner: stub.into() }
}
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::RegionOperations>>
{
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::RegionOperations> {
super::transport::RegionOperations::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::RegionOperations> {
Self::build_transport(conf)
.await
.map(super::tracing::RegionOperations::new)
}
pub fn delete(&self) -> super::builder::region_operations::Delete {
super::builder::region_operations::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::region_operations::Get {
super::builder::region_operations::Get::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::region_operations::List {
super::builder::region_operations::List::new(self.inner.clone())
}
pub fn wait(&self) -> super::builder::region_operations::Wait {
super::builder::region_operations::Wait::new(self.inner.clone())
}
}
#[cfg(feature = "region-security-policies")]
#[cfg_attr(docsrs, doc(cfg(feature = "region-security-policies")))]
#[derive(Clone, Debug)]
pub struct RegionSecurityPolicies {
inner: std::sync::Arc<dyn super::stub::dynamic::RegionSecurityPolicies>,
}
#[cfg(feature = "region-security-policies")]
impl RegionSecurityPolicies {
pub fn builder() -> super::builder::region_security_policies::ClientBuilder {
crate::new_client_builder(super::builder::region_security_policies::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::RegionSecurityPolicies + 'static,
{
Self { inner: stub.into() }
}
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::RegionSecurityPolicies>>
{
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::RegionSecurityPolicies> {
super::transport::RegionSecurityPolicies::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::RegionSecurityPolicies> {
Self::build_transport(conf)
.await
.map(super::tracing::RegionSecurityPolicies::new)
}
pub fn add_rule(&self) -> super::builder::region_security_policies::AddRule {
super::builder::region_security_policies::AddRule::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::region_security_policies::Delete {
super::builder::region_security_policies::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::region_security_policies::Get {
super::builder::region_security_policies::Get::new(self.inner.clone())
}
pub fn get_rule(&self) -> super::builder::region_security_policies::GetRule {
super::builder::region_security_policies::GetRule::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::region_security_policies::Insert {
super::builder::region_security_policies::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::region_security_policies::List {
super::builder::region_security_policies::List::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::region_security_policies::Patch {
super::builder::region_security_policies::Patch::new(self.inner.clone())
}
pub fn patch_rule(&self) -> super::builder::region_security_policies::PatchRule {
super::builder::region_security_policies::PatchRule::new(self.inner.clone())
}
pub fn remove_rule(&self) -> super::builder::region_security_policies::RemoveRule {
super::builder::region_security_policies::RemoveRule::new(self.inner.clone())
}
pub fn set_labels(&self) -> super::builder::region_security_policies::SetLabels {
super::builder::region_security_policies::SetLabels::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::region_security_policies::GetOperation {
super::builder::region_security_policies::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "region-snapshot-settings")]
#[cfg_attr(docsrs, doc(cfg(feature = "region-snapshot-settings")))]
#[derive(Clone, Debug)]
pub struct RegionSnapshotSettings {
inner: std::sync::Arc<dyn super::stub::dynamic::RegionSnapshotSettings>,
}
#[cfg(feature = "region-snapshot-settings")]
impl RegionSnapshotSettings {
pub fn builder() -> super::builder::region_snapshot_settings::ClientBuilder {
crate::new_client_builder(super::builder::region_snapshot_settings::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::RegionSnapshotSettings + 'static,
{
Self { inner: stub.into() }
}
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::RegionSnapshotSettings>>
{
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::RegionSnapshotSettings> {
super::transport::RegionSnapshotSettings::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::RegionSnapshotSettings> {
Self::build_transport(conf)
.await
.map(super::tracing::RegionSnapshotSettings::new)
}
pub fn get(&self) -> super::builder::region_snapshot_settings::Get {
super::builder::region_snapshot_settings::Get::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::region_snapshot_settings::Patch {
super::builder::region_snapshot_settings::Patch::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::region_snapshot_settings::GetOperation {
super::builder::region_snapshot_settings::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "region-snapshots")]
#[cfg_attr(docsrs, doc(cfg(feature = "region-snapshots")))]
#[derive(Clone, Debug)]
pub struct RegionSnapshots {
inner: std::sync::Arc<dyn super::stub::dynamic::RegionSnapshots>,
}
#[cfg(feature = "region-snapshots")]
impl RegionSnapshots {
pub fn builder() -> super::builder::region_snapshots::ClientBuilder {
crate::new_client_builder(super::builder::region_snapshots::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::RegionSnapshots + 'static,
{
Self { inner: stub.into() }
}
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::RegionSnapshots>> {
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::RegionSnapshots> {
super::transport::RegionSnapshots::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::RegionSnapshots> {
Self::build_transport(conf)
.await
.map(super::tracing::RegionSnapshots::new)
}
pub fn delete(&self) -> super::builder::region_snapshots::Delete {
super::builder::region_snapshots::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::region_snapshots::Get {
super::builder::region_snapshots::Get::new(self.inner.clone())
}
pub fn get_iam_policy(&self) -> super::builder::region_snapshots::GetIamPolicy {
super::builder::region_snapshots::GetIamPolicy::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::region_snapshots::Insert {
super::builder::region_snapshots::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::region_snapshots::List {
super::builder::region_snapshots::List::new(self.inner.clone())
}
pub fn set_iam_policy(&self) -> super::builder::region_snapshots::SetIamPolicy {
super::builder::region_snapshots::SetIamPolicy::new(self.inner.clone())
}
pub fn set_labels(&self) -> super::builder::region_snapshots::SetLabels {
super::builder::region_snapshots::SetLabels::new(self.inner.clone())
}
pub fn test_iam_permissions(&self) -> super::builder::region_snapshots::TestIamPermissions {
super::builder::region_snapshots::TestIamPermissions::new(self.inner.clone())
}
pub fn update_kms_key(&self) -> super::builder::region_snapshots::UpdateKmsKey {
super::builder::region_snapshots::UpdateKmsKey::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::region_snapshots::GetOperation {
super::builder::region_snapshots::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "region-ssl-certificates")]
#[cfg_attr(docsrs, doc(cfg(feature = "region-ssl-certificates")))]
#[derive(Clone, Debug)]
pub struct RegionSslCertificates {
inner: std::sync::Arc<dyn super::stub::dynamic::RegionSslCertificates>,
}
#[cfg(feature = "region-ssl-certificates")]
impl RegionSslCertificates {
pub fn builder() -> super::builder::region_ssl_certificates::ClientBuilder {
crate::new_client_builder(super::builder::region_ssl_certificates::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::RegionSslCertificates + 'static,
{
Self { inner: stub.into() }
}
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::RegionSslCertificates>>
{
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::RegionSslCertificates> {
super::transport::RegionSslCertificates::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::RegionSslCertificates> {
Self::build_transport(conf)
.await
.map(super::tracing::RegionSslCertificates::new)
}
pub fn delete(&self) -> super::builder::region_ssl_certificates::Delete {
super::builder::region_ssl_certificates::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::region_ssl_certificates::Get {
super::builder::region_ssl_certificates::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::region_ssl_certificates::Insert {
super::builder::region_ssl_certificates::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::region_ssl_certificates::List {
super::builder::region_ssl_certificates::List::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::region_ssl_certificates::GetOperation {
super::builder::region_ssl_certificates::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "region-ssl-policies")]
#[cfg_attr(docsrs, doc(cfg(feature = "region-ssl-policies")))]
#[derive(Clone, Debug)]
pub struct RegionSslPolicies {
inner: std::sync::Arc<dyn super::stub::dynamic::RegionSslPolicies>,
}
#[cfg(feature = "region-ssl-policies")]
impl RegionSslPolicies {
pub fn builder() -> super::builder::region_ssl_policies::ClientBuilder {
crate::new_client_builder(super::builder::region_ssl_policies::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::RegionSslPolicies + 'static,
{
Self { inner: stub.into() }
}
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::RegionSslPolicies>>
{
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::RegionSslPolicies> {
super::transport::RegionSslPolicies::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::RegionSslPolicies> {
Self::build_transport(conf)
.await
.map(super::tracing::RegionSslPolicies::new)
}
pub fn delete(&self) -> super::builder::region_ssl_policies::Delete {
super::builder::region_ssl_policies::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::region_ssl_policies::Get {
super::builder::region_ssl_policies::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::region_ssl_policies::Insert {
super::builder::region_ssl_policies::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::region_ssl_policies::List {
super::builder::region_ssl_policies::List::new(self.inner.clone())
}
pub fn list_available_features(
&self,
) -> super::builder::region_ssl_policies::ListAvailableFeatures {
super::builder::region_ssl_policies::ListAvailableFeatures::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::region_ssl_policies::Patch {
super::builder::region_ssl_policies::Patch::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::region_ssl_policies::GetOperation {
super::builder::region_ssl_policies::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "region-target-http-proxies")]
#[cfg_attr(docsrs, doc(cfg(feature = "region-target-http-proxies")))]
#[derive(Clone, Debug)]
pub struct RegionTargetHttpProxies {
inner: std::sync::Arc<dyn super::stub::dynamic::RegionTargetHttpProxies>,
}
#[cfg(feature = "region-target-http-proxies")]
impl RegionTargetHttpProxies {
pub fn builder() -> super::builder::region_target_http_proxies::ClientBuilder {
crate::new_client_builder(super::builder::region_target_http_proxies::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::RegionTargetHttpProxies + 'static,
{
Self { inner: stub.into() }
}
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::RegionTargetHttpProxies>>
{
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::RegionTargetHttpProxies> {
super::transport::RegionTargetHttpProxies::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::RegionTargetHttpProxies> {
Self::build_transport(conf)
.await
.map(super::tracing::RegionTargetHttpProxies::new)
}
pub fn delete(&self) -> super::builder::region_target_http_proxies::Delete {
super::builder::region_target_http_proxies::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::region_target_http_proxies::Get {
super::builder::region_target_http_proxies::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::region_target_http_proxies::Insert {
super::builder::region_target_http_proxies::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::region_target_http_proxies::List {
super::builder::region_target_http_proxies::List::new(self.inner.clone())
}
pub fn set_url_map(&self) -> super::builder::region_target_http_proxies::SetUrlMap {
super::builder::region_target_http_proxies::SetUrlMap::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::region_target_http_proxies::GetOperation {
super::builder::region_target_http_proxies::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "region-target-https-proxies")]
#[cfg_attr(docsrs, doc(cfg(feature = "region-target-https-proxies")))]
#[derive(Clone, Debug)]
pub struct RegionTargetHttpsProxies {
inner: std::sync::Arc<dyn super::stub::dynamic::RegionTargetHttpsProxies>,
}
#[cfg(feature = "region-target-https-proxies")]
impl RegionTargetHttpsProxies {
pub fn builder() -> super::builder::region_target_https_proxies::ClientBuilder {
crate::new_client_builder(super::builder::region_target_https_proxies::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::RegionTargetHttpsProxies + 'static,
{
Self { inner: stub.into() }
}
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::RegionTargetHttpsProxies>,
> {
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::RegionTargetHttpsProxies> {
super::transport::RegionTargetHttpsProxies::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::RegionTargetHttpsProxies> {
Self::build_transport(conf)
.await
.map(super::tracing::RegionTargetHttpsProxies::new)
}
pub fn delete(&self) -> super::builder::region_target_https_proxies::Delete {
super::builder::region_target_https_proxies::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::region_target_https_proxies::Get {
super::builder::region_target_https_proxies::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::region_target_https_proxies::Insert {
super::builder::region_target_https_proxies::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::region_target_https_proxies::List {
super::builder::region_target_https_proxies::List::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::region_target_https_proxies::Patch {
super::builder::region_target_https_proxies::Patch::new(self.inner.clone())
}
pub fn set_ssl_certificates(
&self,
) -> super::builder::region_target_https_proxies::SetSslCertificates {
super::builder::region_target_https_proxies::SetSslCertificates::new(self.inner.clone())
}
pub fn set_url_map(&self) -> super::builder::region_target_https_proxies::SetUrlMap {
super::builder::region_target_https_proxies::SetUrlMap::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::region_target_https_proxies::GetOperation {
super::builder::region_target_https_proxies::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "region-target-tcp-proxies")]
#[cfg_attr(docsrs, doc(cfg(feature = "region-target-tcp-proxies")))]
#[derive(Clone, Debug)]
pub struct RegionTargetTcpProxies {
inner: std::sync::Arc<dyn super::stub::dynamic::RegionTargetTcpProxies>,
}
#[cfg(feature = "region-target-tcp-proxies")]
impl RegionTargetTcpProxies {
pub fn builder() -> super::builder::region_target_tcp_proxies::ClientBuilder {
crate::new_client_builder(super::builder::region_target_tcp_proxies::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::RegionTargetTcpProxies + 'static,
{
Self { inner: stub.into() }
}
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::RegionTargetTcpProxies>>
{
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::RegionTargetTcpProxies> {
super::transport::RegionTargetTcpProxies::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::RegionTargetTcpProxies> {
Self::build_transport(conf)
.await
.map(super::tracing::RegionTargetTcpProxies::new)
}
pub fn delete(&self) -> super::builder::region_target_tcp_proxies::Delete {
super::builder::region_target_tcp_proxies::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::region_target_tcp_proxies::Get {
super::builder::region_target_tcp_proxies::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::region_target_tcp_proxies::Insert {
super::builder::region_target_tcp_proxies::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::region_target_tcp_proxies::List {
super::builder::region_target_tcp_proxies::List::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::region_target_tcp_proxies::GetOperation {
super::builder::region_target_tcp_proxies::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "region-url-maps")]
#[cfg_attr(docsrs, doc(cfg(feature = "region-url-maps")))]
#[derive(Clone, Debug)]
pub struct RegionUrlMaps {
inner: std::sync::Arc<dyn super::stub::dynamic::RegionUrlMaps>,
}
#[cfg(feature = "region-url-maps")]
impl RegionUrlMaps {
pub fn builder() -> super::builder::region_url_maps::ClientBuilder {
crate::new_client_builder(super::builder::region_url_maps::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::RegionUrlMaps + 'static,
{
Self { inner: stub.into() }
}
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::RegionUrlMaps>> {
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::RegionUrlMaps> {
super::transport::RegionUrlMaps::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::RegionUrlMaps> {
Self::build_transport(conf)
.await
.map(super::tracing::RegionUrlMaps::new)
}
pub fn delete(&self) -> super::builder::region_url_maps::Delete {
super::builder::region_url_maps::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::region_url_maps::Get {
super::builder::region_url_maps::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::region_url_maps::Insert {
super::builder::region_url_maps::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::region_url_maps::List {
super::builder::region_url_maps::List::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::region_url_maps::Patch {
super::builder::region_url_maps::Patch::new(self.inner.clone())
}
pub fn update(&self) -> super::builder::region_url_maps::Update {
super::builder::region_url_maps::Update::new(self.inner.clone())
}
pub fn validate(&self) -> super::builder::region_url_maps::Validate {
super::builder::region_url_maps::Validate::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::region_url_maps::GetOperation {
super::builder::region_url_maps::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "region-zones")]
#[cfg_attr(docsrs, doc(cfg(feature = "region-zones")))]
#[derive(Clone, Debug)]
pub struct RegionZones {
inner: std::sync::Arc<dyn super::stub::dynamic::RegionZones>,
}
#[cfg(feature = "region-zones")]
impl RegionZones {
pub fn builder() -> super::builder::region_zones::ClientBuilder {
crate::new_client_builder(super::builder::region_zones::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::RegionZones + 'static,
{
Self { inner: stub.into() }
}
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::RegionZones>> {
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::RegionZones> {
super::transport::RegionZones::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::RegionZones> {
Self::build_transport(conf)
.await
.map(super::tracing::RegionZones::new)
}
pub fn list(&self) -> super::builder::region_zones::List {
super::builder::region_zones::List::new(self.inner.clone())
}
}
#[cfg(feature = "regions")]
#[cfg_attr(docsrs, doc(cfg(feature = "regions")))]
#[derive(Clone, Debug)]
pub struct Regions {
inner: std::sync::Arc<dyn super::stub::dynamic::Regions>,
}
#[cfg(feature = "regions")]
impl Regions {
pub fn builder() -> super::builder::regions::ClientBuilder {
crate::new_client_builder(super::builder::regions::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::Regions + 'static,
{
Self { inner: stub.into() }
}
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::Regions>> {
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::Regions> {
super::transport::Regions::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::Regions> {
Self::build_transport(conf)
.await
.map(super::tracing::Regions::new)
}
pub fn get(&self) -> super::builder::regions::Get {
super::builder::regions::Get::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::regions::List {
super::builder::regions::List::new(self.inner.clone())
}
}
#[cfg(feature = "reservation-blocks")]
#[cfg_attr(docsrs, doc(cfg(feature = "reservation-blocks")))]
#[derive(Clone, Debug)]
pub struct ReservationBlocks {
inner: std::sync::Arc<dyn super::stub::dynamic::ReservationBlocks>,
}
#[cfg(feature = "reservation-blocks")]
impl ReservationBlocks {
pub fn builder() -> super::builder::reservation_blocks::ClientBuilder {
crate::new_client_builder(super::builder::reservation_blocks::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::ReservationBlocks + 'static,
{
Self { inner: stub.into() }
}
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::ReservationBlocks>>
{
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::ReservationBlocks> {
super::transport::ReservationBlocks::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::ReservationBlocks> {
Self::build_transport(conf)
.await
.map(super::tracing::ReservationBlocks::new)
}
pub fn get(&self) -> super::builder::reservation_blocks::Get {
super::builder::reservation_blocks::Get::new(self.inner.clone())
}
pub fn get_iam_policy(&self) -> super::builder::reservation_blocks::GetIamPolicy {
super::builder::reservation_blocks::GetIamPolicy::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::reservation_blocks::List {
super::builder::reservation_blocks::List::new(self.inner.clone())
}
pub fn perform_maintenance(&self) -> super::builder::reservation_blocks::PerformMaintenance {
super::builder::reservation_blocks::PerformMaintenance::new(self.inner.clone())
}
pub fn set_iam_policy(&self) -> super::builder::reservation_blocks::SetIamPolicy {
super::builder::reservation_blocks::SetIamPolicy::new(self.inner.clone())
}
pub fn test_iam_permissions(&self) -> super::builder::reservation_blocks::TestIamPermissions {
super::builder::reservation_blocks::TestIamPermissions::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::reservation_blocks::GetOperation {
super::builder::reservation_blocks::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "reservation-slots")]
#[cfg_attr(docsrs, doc(cfg(feature = "reservation-slots")))]
#[derive(Clone, Debug)]
pub struct ReservationSlots {
inner: std::sync::Arc<dyn super::stub::dynamic::ReservationSlots>,
}
#[cfg(feature = "reservation-slots")]
impl ReservationSlots {
pub fn builder() -> super::builder::reservation_slots::ClientBuilder {
crate::new_client_builder(super::builder::reservation_slots::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::ReservationSlots + 'static,
{
Self { inner: stub.into() }
}
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::ReservationSlots>>
{
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::ReservationSlots> {
super::transport::ReservationSlots::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::ReservationSlots> {
Self::build_transport(conf)
.await
.map(super::tracing::ReservationSlots::new)
}
pub fn get(&self) -> super::builder::reservation_slots::Get {
super::builder::reservation_slots::Get::new(self.inner.clone())
}
pub fn get_version(&self) -> super::builder::reservation_slots::GetVersion {
super::builder::reservation_slots::GetVersion::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::reservation_slots::List {
super::builder::reservation_slots::List::new(self.inner.clone())
}
pub fn update(&self) -> super::builder::reservation_slots::Update {
super::builder::reservation_slots::Update::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::reservation_slots::GetOperation {
super::builder::reservation_slots::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "reservation-sub-blocks")]
#[cfg_attr(docsrs, doc(cfg(feature = "reservation-sub-blocks")))]
#[derive(Clone, Debug)]
pub struct ReservationSubBlocks {
inner: std::sync::Arc<dyn super::stub::dynamic::ReservationSubBlocks>,
}
#[cfg(feature = "reservation-sub-blocks")]
impl ReservationSubBlocks {
pub fn builder() -> super::builder::reservation_sub_blocks::ClientBuilder {
crate::new_client_builder(super::builder::reservation_sub_blocks::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::ReservationSubBlocks + 'static,
{
Self { inner: stub.into() }
}
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::ReservationSubBlocks>>
{
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::ReservationSubBlocks> {
super::transport::ReservationSubBlocks::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::ReservationSubBlocks> {
Self::build_transport(conf)
.await
.map(super::tracing::ReservationSubBlocks::new)
}
pub fn get(&self) -> super::builder::reservation_sub_blocks::Get {
super::builder::reservation_sub_blocks::Get::new(self.inner.clone())
}
pub fn get_iam_policy(&self) -> super::builder::reservation_sub_blocks::GetIamPolicy {
super::builder::reservation_sub_blocks::GetIamPolicy::new(self.inner.clone())
}
pub fn get_version(&self) -> super::builder::reservation_sub_blocks::GetVersion {
super::builder::reservation_sub_blocks::GetVersion::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::reservation_sub_blocks::List {
super::builder::reservation_sub_blocks::List::new(self.inner.clone())
}
pub fn perform_maintenance(
&self,
) -> super::builder::reservation_sub_blocks::PerformMaintenance {
super::builder::reservation_sub_blocks::PerformMaintenance::new(self.inner.clone())
}
pub fn report_faulty(&self) -> super::builder::reservation_sub_blocks::ReportFaulty {
super::builder::reservation_sub_blocks::ReportFaulty::new(self.inner.clone())
}
pub fn set_iam_policy(&self) -> super::builder::reservation_sub_blocks::SetIamPolicy {
super::builder::reservation_sub_blocks::SetIamPolicy::new(self.inner.clone())
}
pub fn test_iam_permissions(
&self,
) -> super::builder::reservation_sub_blocks::TestIamPermissions {
super::builder::reservation_sub_blocks::TestIamPermissions::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::reservation_sub_blocks::GetOperation {
super::builder::reservation_sub_blocks::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "reservations")]
#[cfg_attr(docsrs, doc(cfg(feature = "reservations")))]
#[derive(Clone, Debug)]
pub struct Reservations {
inner: std::sync::Arc<dyn super::stub::dynamic::Reservations>,
}
#[cfg(feature = "reservations")]
impl Reservations {
pub fn builder() -> super::builder::reservations::ClientBuilder {
crate::new_client_builder(super::builder::reservations::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::Reservations + 'static,
{
Self { inner: stub.into() }
}
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::Reservations>> {
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::Reservations> {
super::transport::Reservations::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::Reservations> {
Self::build_transport(conf)
.await
.map(super::tracing::Reservations::new)
}
pub fn aggregated_list(&self) -> super::builder::reservations::AggregatedList {
super::builder::reservations::AggregatedList::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::reservations::Delete {
super::builder::reservations::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::reservations::Get {
super::builder::reservations::Get::new(self.inner.clone())
}
pub fn get_iam_policy(&self) -> super::builder::reservations::GetIamPolicy {
super::builder::reservations::GetIamPolicy::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::reservations::Insert {
super::builder::reservations::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::reservations::List {
super::builder::reservations::List::new(self.inner.clone())
}
pub fn perform_maintenance(&self) -> super::builder::reservations::PerformMaintenance {
super::builder::reservations::PerformMaintenance::new(self.inner.clone())
}
pub fn resize(&self) -> super::builder::reservations::Resize {
super::builder::reservations::Resize::new(self.inner.clone())
}
pub fn set_iam_policy(&self) -> super::builder::reservations::SetIamPolicy {
super::builder::reservations::SetIamPolicy::new(self.inner.clone())
}
pub fn test_iam_permissions(&self) -> super::builder::reservations::TestIamPermissions {
super::builder::reservations::TestIamPermissions::new(self.inner.clone())
}
pub fn update(&self) -> super::builder::reservations::Update {
super::builder::reservations::Update::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::reservations::GetOperation {
super::builder::reservations::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "resource-policies")]
#[cfg_attr(docsrs, doc(cfg(feature = "resource-policies")))]
#[derive(Clone, Debug)]
pub struct ResourcePolicies {
inner: std::sync::Arc<dyn super::stub::dynamic::ResourcePolicies>,
}
#[cfg(feature = "resource-policies")]
impl ResourcePolicies {
pub fn builder() -> super::builder::resource_policies::ClientBuilder {
crate::new_client_builder(super::builder::resource_policies::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::ResourcePolicies + 'static,
{
Self { inner: stub.into() }
}
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::ResourcePolicies>>
{
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::ResourcePolicies> {
super::transport::ResourcePolicies::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::ResourcePolicies> {
Self::build_transport(conf)
.await
.map(super::tracing::ResourcePolicies::new)
}
pub fn aggregated_list(&self) -> super::builder::resource_policies::AggregatedList {
super::builder::resource_policies::AggregatedList::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::resource_policies::Delete {
super::builder::resource_policies::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::resource_policies::Get {
super::builder::resource_policies::Get::new(self.inner.clone())
}
pub fn get_iam_policy(&self) -> super::builder::resource_policies::GetIamPolicy {
super::builder::resource_policies::GetIamPolicy::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::resource_policies::Insert {
super::builder::resource_policies::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::resource_policies::List {
super::builder::resource_policies::List::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::resource_policies::Patch {
super::builder::resource_policies::Patch::new(self.inner.clone())
}
pub fn set_iam_policy(&self) -> super::builder::resource_policies::SetIamPolicy {
super::builder::resource_policies::SetIamPolicy::new(self.inner.clone())
}
pub fn test_iam_permissions(&self) -> super::builder::resource_policies::TestIamPermissions {
super::builder::resource_policies::TestIamPermissions::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::resource_policies::GetOperation {
super::builder::resource_policies::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "routers")]
#[cfg_attr(docsrs, doc(cfg(feature = "routers")))]
#[derive(Clone, Debug)]
pub struct Routers {
inner: std::sync::Arc<dyn super::stub::dynamic::Routers>,
}
#[cfg(feature = "routers")]
impl Routers {
pub fn builder() -> super::builder::routers::ClientBuilder {
crate::new_client_builder(super::builder::routers::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::Routers + 'static,
{
Self { inner: stub.into() }
}
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::Routers>> {
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::Routers> {
super::transport::Routers::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::Routers> {
Self::build_transport(conf)
.await
.map(super::tracing::Routers::new)
}
pub fn aggregated_list(&self) -> super::builder::routers::AggregatedList {
super::builder::routers::AggregatedList::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::routers::Delete {
super::builder::routers::Delete::new(self.inner.clone())
}
pub fn delete_route_policy(&self) -> super::builder::routers::DeleteRoutePolicy {
super::builder::routers::DeleteRoutePolicy::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::routers::Get {
super::builder::routers::Get::new(self.inner.clone())
}
pub fn get_nat_ip_info(&self) -> super::builder::routers::GetNatIpInfo {
super::builder::routers::GetNatIpInfo::new(self.inner.clone())
}
pub fn get_nat_mapping_info(&self) -> super::builder::routers::GetNatMappingInfo {
super::builder::routers::GetNatMappingInfo::new(self.inner.clone())
}
pub fn get_route_policy(&self) -> super::builder::routers::GetRoutePolicy {
super::builder::routers::GetRoutePolicy::new(self.inner.clone())
}
pub fn get_router_status(&self) -> super::builder::routers::GetRouterStatus {
super::builder::routers::GetRouterStatus::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::routers::Insert {
super::builder::routers::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::routers::List {
super::builder::routers::List::new(self.inner.clone())
}
pub fn list_bgp_routes(&self) -> super::builder::routers::ListBgpRoutes {
super::builder::routers::ListBgpRoutes::new(self.inner.clone())
}
pub fn list_route_policies(&self) -> super::builder::routers::ListRoutePolicies {
super::builder::routers::ListRoutePolicies::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::routers::Patch {
super::builder::routers::Patch::new(self.inner.clone())
}
pub fn patch_route_policy(&self) -> super::builder::routers::PatchRoutePolicy {
super::builder::routers::PatchRoutePolicy::new(self.inner.clone())
}
pub fn preview(&self) -> super::builder::routers::Preview {
super::builder::routers::Preview::new(self.inner.clone())
}
pub fn update(&self) -> super::builder::routers::Update {
super::builder::routers::Update::new(self.inner.clone())
}
pub fn update_route_policy(&self) -> super::builder::routers::UpdateRoutePolicy {
super::builder::routers::UpdateRoutePolicy::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::routers::GetOperation {
super::builder::routers::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "routes")]
#[cfg_attr(docsrs, doc(cfg(feature = "routes")))]
#[derive(Clone, Debug)]
pub struct Routes {
inner: std::sync::Arc<dyn super::stub::dynamic::Routes>,
}
#[cfg(feature = "routes")]
impl Routes {
pub fn builder() -> super::builder::routes::ClientBuilder {
crate::new_client_builder(super::builder::routes::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::Routes + 'static,
{
Self { inner: stub.into() }
}
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::Routes>> {
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::Routes> {
super::transport::Routes::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::Routes> {
Self::build_transport(conf)
.await
.map(super::tracing::Routes::new)
}
pub fn delete(&self) -> super::builder::routes::Delete {
super::builder::routes::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::routes::Get {
super::builder::routes::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::routes::Insert {
super::builder::routes::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::routes::List {
super::builder::routes::List::new(self.inner.clone())
}
pub fn test_iam_permissions(&self) -> super::builder::routes::TestIamPermissions {
super::builder::routes::TestIamPermissions::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::routes::GetOperation {
super::builder::routes::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "security-policies")]
#[cfg_attr(docsrs, doc(cfg(feature = "security-policies")))]
#[derive(Clone, Debug)]
pub struct SecurityPolicies {
inner: std::sync::Arc<dyn super::stub::dynamic::SecurityPolicies>,
}
#[cfg(feature = "security-policies")]
impl SecurityPolicies {
pub fn builder() -> super::builder::security_policies::ClientBuilder {
crate::new_client_builder(super::builder::security_policies::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::SecurityPolicies + 'static,
{
Self { inner: stub.into() }
}
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::SecurityPolicies>>
{
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::SecurityPolicies> {
super::transport::SecurityPolicies::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::SecurityPolicies> {
Self::build_transport(conf)
.await
.map(super::tracing::SecurityPolicies::new)
}
pub fn add_rule(&self) -> super::builder::security_policies::AddRule {
super::builder::security_policies::AddRule::new(self.inner.clone())
}
pub fn aggregated_list(&self) -> super::builder::security_policies::AggregatedList {
super::builder::security_policies::AggregatedList::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::security_policies::Delete {
super::builder::security_policies::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::security_policies::Get {
super::builder::security_policies::Get::new(self.inner.clone())
}
pub fn get_rule(&self) -> super::builder::security_policies::GetRule {
super::builder::security_policies::GetRule::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::security_policies::Insert {
super::builder::security_policies::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::security_policies::List {
super::builder::security_policies::List::new(self.inner.clone())
}
pub fn list_preconfigured_expression_sets(
&self,
) -> super::builder::security_policies::ListPreconfiguredExpressionSets {
super::builder::security_policies::ListPreconfiguredExpressionSets::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::security_policies::Patch {
super::builder::security_policies::Patch::new(self.inner.clone())
}
pub fn patch_rule(&self) -> super::builder::security_policies::PatchRule {
super::builder::security_policies::PatchRule::new(self.inner.clone())
}
pub fn remove_rule(&self) -> super::builder::security_policies::RemoveRule {
super::builder::security_policies::RemoveRule::new(self.inner.clone())
}
pub fn set_labels(&self) -> super::builder::security_policies::SetLabels {
super::builder::security_policies::SetLabels::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::security_policies::GetOperation {
super::builder::security_policies::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "service-attachments")]
#[cfg_attr(docsrs, doc(cfg(feature = "service-attachments")))]
#[derive(Clone, Debug)]
pub struct ServiceAttachments {
inner: std::sync::Arc<dyn super::stub::dynamic::ServiceAttachments>,
}
#[cfg(feature = "service-attachments")]
impl ServiceAttachments {
pub fn builder() -> super::builder::service_attachments::ClientBuilder {
crate::new_client_builder(super::builder::service_attachments::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::ServiceAttachments + 'static,
{
Self { inner: stub.into() }
}
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::ServiceAttachments>>
{
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::ServiceAttachments> {
super::transport::ServiceAttachments::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::ServiceAttachments> {
Self::build_transport(conf)
.await
.map(super::tracing::ServiceAttachments::new)
}
pub fn aggregated_list(&self) -> super::builder::service_attachments::AggregatedList {
super::builder::service_attachments::AggregatedList::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::service_attachments::Delete {
super::builder::service_attachments::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::service_attachments::Get {
super::builder::service_attachments::Get::new(self.inner.clone())
}
pub fn get_iam_policy(&self) -> super::builder::service_attachments::GetIamPolicy {
super::builder::service_attachments::GetIamPolicy::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::service_attachments::Insert {
super::builder::service_attachments::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::service_attachments::List {
super::builder::service_attachments::List::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::service_attachments::Patch {
super::builder::service_attachments::Patch::new(self.inner.clone())
}
pub fn set_iam_policy(&self) -> super::builder::service_attachments::SetIamPolicy {
super::builder::service_attachments::SetIamPolicy::new(self.inner.clone())
}
pub fn test_iam_permissions(&self) -> super::builder::service_attachments::TestIamPermissions {
super::builder::service_attachments::TestIamPermissions::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::service_attachments::GetOperation {
super::builder::service_attachments::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "snapshot-settings")]
#[cfg_attr(docsrs, doc(cfg(feature = "snapshot-settings")))]
#[derive(Clone, Debug)]
pub struct SnapshotSettings {
inner: std::sync::Arc<dyn super::stub::dynamic::SnapshotSettings>,
}
#[cfg(feature = "snapshot-settings")]
impl SnapshotSettings {
pub fn builder() -> super::builder::snapshot_settings::ClientBuilder {
crate::new_client_builder(super::builder::snapshot_settings::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::SnapshotSettings + 'static,
{
Self { inner: stub.into() }
}
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::SnapshotSettings>>
{
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::SnapshotSettings> {
super::transport::SnapshotSettings::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::SnapshotSettings> {
Self::build_transport(conf)
.await
.map(super::tracing::SnapshotSettings::new)
}
pub fn get(&self) -> super::builder::snapshot_settings::Get {
super::builder::snapshot_settings::Get::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::snapshot_settings::Patch {
super::builder::snapshot_settings::Patch::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::snapshot_settings::GetOperation {
super::builder::snapshot_settings::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "snapshots")]
#[cfg_attr(docsrs, doc(cfg(feature = "snapshots")))]
#[derive(Clone, Debug)]
pub struct Snapshots {
inner: std::sync::Arc<dyn super::stub::dynamic::Snapshots>,
}
#[cfg(feature = "snapshots")]
impl Snapshots {
pub fn builder() -> super::builder::snapshots::ClientBuilder {
crate::new_client_builder(super::builder::snapshots::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::Snapshots + 'static,
{
Self { inner: stub.into() }
}
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::Snapshots>> {
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::Snapshots> {
super::transport::Snapshots::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::Snapshots> {
Self::build_transport(conf)
.await
.map(super::tracing::Snapshots::new)
}
pub fn delete(&self) -> super::builder::snapshots::Delete {
super::builder::snapshots::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::snapshots::Get {
super::builder::snapshots::Get::new(self.inner.clone())
}
pub fn get_iam_policy(&self) -> super::builder::snapshots::GetIamPolicy {
super::builder::snapshots::GetIamPolicy::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::snapshots::Insert {
super::builder::snapshots::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::snapshots::List {
super::builder::snapshots::List::new(self.inner.clone())
}
pub fn set_iam_policy(&self) -> super::builder::snapshots::SetIamPolicy {
super::builder::snapshots::SetIamPolicy::new(self.inner.clone())
}
pub fn set_labels(&self) -> super::builder::snapshots::SetLabels {
super::builder::snapshots::SetLabels::new(self.inner.clone())
}
pub fn test_iam_permissions(&self) -> super::builder::snapshots::TestIamPermissions {
super::builder::snapshots::TestIamPermissions::new(self.inner.clone())
}
pub fn update_kms_key(&self) -> super::builder::snapshots::UpdateKmsKey {
super::builder::snapshots::UpdateKmsKey::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::snapshots::GetOperation {
super::builder::snapshots::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "ssl-certificates")]
#[cfg_attr(docsrs, doc(cfg(feature = "ssl-certificates")))]
#[derive(Clone, Debug)]
pub struct SslCertificates {
inner: std::sync::Arc<dyn super::stub::dynamic::SslCertificates>,
}
#[cfg(feature = "ssl-certificates")]
impl SslCertificates {
pub fn builder() -> super::builder::ssl_certificates::ClientBuilder {
crate::new_client_builder(super::builder::ssl_certificates::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::SslCertificates + 'static,
{
Self { inner: stub.into() }
}
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::SslCertificates>> {
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::SslCertificates> {
super::transport::SslCertificates::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::SslCertificates> {
Self::build_transport(conf)
.await
.map(super::tracing::SslCertificates::new)
}
pub fn aggregated_list(&self) -> super::builder::ssl_certificates::AggregatedList {
super::builder::ssl_certificates::AggregatedList::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::ssl_certificates::Delete {
super::builder::ssl_certificates::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::ssl_certificates::Get {
super::builder::ssl_certificates::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::ssl_certificates::Insert {
super::builder::ssl_certificates::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::ssl_certificates::List {
super::builder::ssl_certificates::List::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::ssl_certificates::GetOperation {
super::builder::ssl_certificates::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "ssl-policies")]
#[cfg_attr(docsrs, doc(cfg(feature = "ssl-policies")))]
#[derive(Clone, Debug)]
pub struct SslPolicies {
inner: std::sync::Arc<dyn super::stub::dynamic::SslPolicies>,
}
#[cfg(feature = "ssl-policies")]
impl SslPolicies {
pub fn builder() -> super::builder::ssl_policies::ClientBuilder {
crate::new_client_builder(super::builder::ssl_policies::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::SslPolicies + 'static,
{
Self { inner: stub.into() }
}
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::SslPolicies>> {
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::SslPolicies> {
super::transport::SslPolicies::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::SslPolicies> {
Self::build_transport(conf)
.await
.map(super::tracing::SslPolicies::new)
}
pub fn aggregated_list(&self) -> super::builder::ssl_policies::AggregatedList {
super::builder::ssl_policies::AggregatedList::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::ssl_policies::Delete {
super::builder::ssl_policies::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::ssl_policies::Get {
super::builder::ssl_policies::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::ssl_policies::Insert {
super::builder::ssl_policies::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::ssl_policies::List {
super::builder::ssl_policies::List::new(self.inner.clone())
}
pub fn list_available_features(&self) -> super::builder::ssl_policies::ListAvailableFeatures {
super::builder::ssl_policies::ListAvailableFeatures::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::ssl_policies::Patch {
super::builder::ssl_policies::Patch::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::ssl_policies::GetOperation {
super::builder::ssl_policies::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "storage-pool-types")]
#[cfg_attr(docsrs, doc(cfg(feature = "storage-pool-types")))]
#[derive(Clone, Debug)]
pub struct StoragePoolTypes {
inner: std::sync::Arc<dyn super::stub::dynamic::StoragePoolTypes>,
}
#[cfg(feature = "storage-pool-types")]
impl StoragePoolTypes {
pub fn builder() -> super::builder::storage_pool_types::ClientBuilder {
crate::new_client_builder(super::builder::storage_pool_types::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::StoragePoolTypes + 'static,
{
Self { inner: stub.into() }
}
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::StoragePoolTypes>>
{
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::StoragePoolTypes> {
super::transport::StoragePoolTypes::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::StoragePoolTypes> {
Self::build_transport(conf)
.await
.map(super::tracing::StoragePoolTypes::new)
}
pub fn aggregated_list(&self) -> super::builder::storage_pool_types::AggregatedList {
super::builder::storage_pool_types::AggregatedList::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::storage_pool_types::Get {
super::builder::storage_pool_types::Get::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::storage_pool_types::List {
super::builder::storage_pool_types::List::new(self.inner.clone())
}
}
#[cfg(feature = "storage-pools")]
#[cfg_attr(docsrs, doc(cfg(feature = "storage-pools")))]
#[derive(Clone, Debug)]
pub struct StoragePools {
inner: std::sync::Arc<dyn super::stub::dynamic::StoragePools>,
}
#[cfg(feature = "storage-pools")]
impl StoragePools {
pub fn builder() -> super::builder::storage_pools::ClientBuilder {
crate::new_client_builder(super::builder::storage_pools::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::StoragePools + 'static,
{
Self { inner: stub.into() }
}
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::StoragePools>> {
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::StoragePools> {
super::transport::StoragePools::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::StoragePools> {
Self::build_transport(conf)
.await
.map(super::tracing::StoragePools::new)
}
pub fn aggregated_list(&self) -> super::builder::storage_pools::AggregatedList {
super::builder::storage_pools::AggregatedList::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::storage_pools::Delete {
super::builder::storage_pools::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::storage_pools::Get {
super::builder::storage_pools::Get::new(self.inner.clone())
}
pub fn get_iam_policy(&self) -> super::builder::storage_pools::GetIamPolicy {
super::builder::storage_pools::GetIamPolicy::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::storage_pools::Insert {
super::builder::storage_pools::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::storage_pools::List {
super::builder::storage_pools::List::new(self.inner.clone())
}
pub fn list_disks(&self) -> super::builder::storage_pools::ListDisks {
super::builder::storage_pools::ListDisks::new(self.inner.clone())
}
pub fn set_iam_policy(&self) -> super::builder::storage_pools::SetIamPolicy {
super::builder::storage_pools::SetIamPolicy::new(self.inner.clone())
}
pub fn test_iam_permissions(&self) -> super::builder::storage_pools::TestIamPermissions {
super::builder::storage_pools::TestIamPermissions::new(self.inner.clone())
}
pub fn update(&self) -> super::builder::storage_pools::Update {
super::builder::storage_pools::Update::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::storage_pools::GetOperation {
super::builder::storage_pools::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "subnetworks")]
#[cfg_attr(docsrs, doc(cfg(feature = "subnetworks")))]
#[derive(Clone, Debug)]
pub struct Subnetworks {
inner: std::sync::Arc<dyn super::stub::dynamic::Subnetworks>,
}
#[cfg(feature = "subnetworks")]
impl Subnetworks {
pub fn builder() -> super::builder::subnetworks::ClientBuilder {
crate::new_client_builder(super::builder::subnetworks::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::Subnetworks + 'static,
{
Self { inner: stub.into() }
}
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::Subnetworks>> {
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::Subnetworks> {
super::transport::Subnetworks::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::Subnetworks> {
Self::build_transport(conf)
.await
.map(super::tracing::Subnetworks::new)
}
pub fn aggregated_list(&self) -> super::builder::subnetworks::AggregatedList {
super::builder::subnetworks::AggregatedList::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::subnetworks::Delete {
super::builder::subnetworks::Delete::new(self.inner.clone())
}
pub fn expand_ip_cidr_range(&self) -> super::builder::subnetworks::ExpandIpCidrRange {
super::builder::subnetworks::ExpandIpCidrRange::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::subnetworks::Get {
super::builder::subnetworks::Get::new(self.inner.clone())
}
pub fn get_iam_policy(&self) -> super::builder::subnetworks::GetIamPolicy {
super::builder::subnetworks::GetIamPolicy::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::subnetworks::Insert {
super::builder::subnetworks::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::subnetworks::List {
super::builder::subnetworks::List::new(self.inner.clone())
}
pub fn list_usable(&self) -> super::builder::subnetworks::ListUsable {
super::builder::subnetworks::ListUsable::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::subnetworks::Patch {
super::builder::subnetworks::Patch::new(self.inner.clone())
}
pub fn set_iam_policy(&self) -> super::builder::subnetworks::SetIamPolicy {
super::builder::subnetworks::SetIamPolicy::new(self.inner.clone())
}
pub fn set_private_ip_google_access(
&self,
) -> super::builder::subnetworks::SetPrivateIpGoogleAccess {
super::builder::subnetworks::SetPrivateIpGoogleAccess::new(self.inner.clone())
}
pub fn test_iam_permissions(&self) -> super::builder::subnetworks::TestIamPermissions {
super::builder::subnetworks::TestIamPermissions::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::subnetworks::GetOperation {
super::builder::subnetworks::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "target-grpc-proxies")]
#[cfg_attr(docsrs, doc(cfg(feature = "target-grpc-proxies")))]
#[derive(Clone, Debug)]
pub struct TargetGrpcProxies {
inner: std::sync::Arc<dyn super::stub::dynamic::TargetGrpcProxies>,
}
#[cfg(feature = "target-grpc-proxies")]
impl TargetGrpcProxies {
pub fn builder() -> super::builder::target_grpc_proxies::ClientBuilder {
crate::new_client_builder(super::builder::target_grpc_proxies::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::TargetGrpcProxies + 'static,
{
Self { inner: stub.into() }
}
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::TargetGrpcProxies>>
{
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::TargetGrpcProxies> {
super::transport::TargetGrpcProxies::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::TargetGrpcProxies> {
Self::build_transport(conf)
.await
.map(super::tracing::TargetGrpcProxies::new)
}
pub fn delete(&self) -> super::builder::target_grpc_proxies::Delete {
super::builder::target_grpc_proxies::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::target_grpc_proxies::Get {
super::builder::target_grpc_proxies::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::target_grpc_proxies::Insert {
super::builder::target_grpc_proxies::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::target_grpc_proxies::List {
super::builder::target_grpc_proxies::List::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::target_grpc_proxies::Patch {
super::builder::target_grpc_proxies::Patch::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::target_grpc_proxies::GetOperation {
super::builder::target_grpc_proxies::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "target-http-proxies")]
#[cfg_attr(docsrs, doc(cfg(feature = "target-http-proxies")))]
#[derive(Clone, Debug)]
pub struct TargetHttpProxies {
inner: std::sync::Arc<dyn super::stub::dynamic::TargetHttpProxies>,
}
#[cfg(feature = "target-http-proxies")]
impl TargetHttpProxies {
pub fn builder() -> super::builder::target_http_proxies::ClientBuilder {
crate::new_client_builder(super::builder::target_http_proxies::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::TargetHttpProxies + 'static,
{
Self { inner: stub.into() }
}
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::TargetHttpProxies>>
{
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::TargetHttpProxies> {
super::transport::TargetHttpProxies::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::TargetHttpProxies> {
Self::build_transport(conf)
.await
.map(super::tracing::TargetHttpProxies::new)
}
pub fn aggregated_list(&self) -> super::builder::target_http_proxies::AggregatedList {
super::builder::target_http_proxies::AggregatedList::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::target_http_proxies::Delete {
super::builder::target_http_proxies::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::target_http_proxies::Get {
super::builder::target_http_proxies::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::target_http_proxies::Insert {
super::builder::target_http_proxies::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::target_http_proxies::List {
super::builder::target_http_proxies::List::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::target_http_proxies::Patch {
super::builder::target_http_proxies::Patch::new(self.inner.clone())
}
pub fn set_url_map(&self) -> super::builder::target_http_proxies::SetUrlMap {
super::builder::target_http_proxies::SetUrlMap::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::target_http_proxies::GetOperation {
super::builder::target_http_proxies::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "target-https-proxies")]
#[cfg_attr(docsrs, doc(cfg(feature = "target-https-proxies")))]
#[derive(Clone, Debug)]
pub struct TargetHttpsProxies {
inner: std::sync::Arc<dyn super::stub::dynamic::TargetHttpsProxies>,
}
#[cfg(feature = "target-https-proxies")]
impl TargetHttpsProxies {
pub fn builder() -> super::builder::target_https_proxies::ClientBuilder {
crate::new_client_builder(super::builder::target_https_proxies::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::TargetHttpsProxies + 'static,
{
Self { inner: stub.into() }
}
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::TargetHttpsProxies>>
{
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::TargetHttpsProxies> {
super::transport::TargetHttpsProxies::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::TargetHttpsProxies> {
Self::build_transport(conf)
.await
.map(super::tracing::TargetHttpsProxies::new)
}
pub fn aggregated_list(&self) -> super::builder::target_https_proxies::AggregatedList {
super::builder::target_https_proxies::AggregatedList::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::target_https_proxies::Delete {
super::builder::target_https_proxies::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::target_https_proxies::Get {
super::builder::target_https_proxies::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::target_https_proxies::Insert {
super::builder::target_https_proxies::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::target_https_proxies::List {
super::builder::target_https_proxies::List::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::target_https_proxies::Patch {
super::builder::target_https_proxies::Patch::new(self.inner.clone())
}
pub fn set_certificate_map(&self) -> super::builder::target_https_proxies::SetCertificateMap {
super::builder::target_https_proxies::SetCertificateMap::new(self.inner.clone())
}
pub fn set_quic_override(&self) -> super::builder::target_https_proxies::SetQuicOverride {
super::builder::target_https_proxies::SetQuicOverride::new(self.inner.clone())
}
pub fn set_ssl_certificates(&self) -> super::builder::target_https_proxies::SetSslCertificates {
super::builder::target_https_proxies::SetSslCertificates::new(self.inner.clone())
}
pub fn set_ssl_policy(&self) -> super::builder::target_https_proxies::SetSslPolicy {
super::builder::target_https_proxies::SetSslPolicy::new(self.inner.clone())
}
pub fn set_url_map(&self) -> super::builder::target_https_proxies::SetUrlMap {
super::builder::target_https_proxies::SetUrlMap::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::target_https_proxies::GetOperation {
super::builder::target_https_proxies::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "target-instances")]
#[cfg_attr(docsrs, doc(cfg(feature = "target-instances")))]
#[derive(Clone, Debug)]
pub struct TargetInstances {
inner: std::sync::Arc<dyn super::stub::dynamic::TargetInstances>,
}
#[cfg(feature = "target-instances")]
impl TargetInstances {
pub fn builder() -> super::builder::target_instances::ClientBuilder {
crate::new_client_builder(super::builder::target_instances::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::TargetInstances + 'static,
{
Self { inner: stub.into() }
}
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::TargetInstances>> {
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::TargetInstances> {
super::transport::TargetInstances::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::TargetInstances> {
Self::build_transport(conf)
.await
.map(super::tracing::TargetInstances::new)
}
pub fn aggregated_list(&self) -> super::builder::target_instances::AggregatedList {
super::builder::target_instances::AggregatedList::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::target_instances::Delete {
super::builder::target_instances::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::target_instances::Get {
super::builder::target_instances::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::target_instances::Insert {
super::builder::target_instances::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::target_instances::List {
super::builder::target_instances::List::new(self.inner.clone())
}
pub fn set_security_policy(&self) -> super::builder::target_instances::SetSecurityPolicy {
super::builder::target_instances::SetSecurityPolicy::new(self.inner.clone())
}
pub fn test_iam_permissions(&self) -> super::builder::target_instances::TestIamPermissions {
super::builder::target_instances::TestIamPermissions::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::target_instances::GetOperation {
super::builder::target_instances::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "target-pools")]
#[cfg_attr(docsrs, doc(cfg(feature = "target-pools")))]
#[derive(Clone, Debug)]
pub struct TargetPools {
inner: std::sync::Arc<dyn super::stub::dynamic::TargetPools>,
}
#[cfg(feature = "target-pools")]
impl TargetPools {
pub fn builder() -> super::builder::target_pools::ClientBuilder {
crate::new_client_builder(super::builder::target_pools::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::TargetPools + 'static,
{
Self { inner: stub.into() }
}
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::TargetPools>> {
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::TargetPools> {
super::transport::TargetPools::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::TargetPools> {
Self::build_transport(conf)
.await
.map(super::tracing::TargetPools::new)
}
pub fn add_health_check(&self) -> super::builder::target_pools::AddHealthCheck {
super::builder::target_pools::AddHealthCheck::new(self.inner.clone())
}
pub fn add_instance(&self) -> super::builder::target_pools::AddInstance {
super::builder::target_pools::AddInstance::new(self.inner.clone())
}
pub fn aggregated_list(&self) -> super::builder::target_pools::AggregatedList {
super::builder::target_pools::AggregatedList::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::target_pools::Delete {
super::builder::target_pools::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::target_pools::Get {
super::builder::target_pools::Get::new(self.inner.clone())
}
pub fn get_health(&self) -> super::builder::target_pools::GetHealth {
super::builder::target_pools::GetHealth::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::target_pools::Insert {
super::builder::target_pools::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::target_pools::List {
super::builder::target_pools::List::new(self.inner.clone())
}
pub fn remove_health_check(&self) -> super::builder::target_pools::RemoveHealthCheck {
super::builder::target_pools::RemoveHealthCheck::new(self.inner.clone())
}
pub fn remove_instance(&self) -> super::builder::target_pools::RemoveInstance {
super::builder::target_pools::RemoveInstance::new(self.inner.clone())
}
pub fn set_backup(&self) -> super::builder::target_pools::SetBackup {
super::builder::target_pools::SetBackup::new(self.inner.clone())
}
pub fn set_security_policy(&self) -> super::builder::target_pools::SetSecurityPolicy {
super::builder::target_pools::SetSecurityPolicy::new(self.inner.clone())
}
pub fn test_iam_permissions(&self) -> super::builder::target_pools::TestIamPermissions {
super::builder::target_pools::TestIamPermissions::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::target_pools::GetOperation {
super::builder::target_pools::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "target-ssl-proxies")]
#[cfg_attr(docsrs, doc(cfg(feature = "target-ssl-proxies")))]
#[derive(Clone, Debug)]
pub struct TargetSslProxies {
inner: std::sync::Arc<dyn super::stub::dynamic::TargetSslProxies>,
}
#[cfg(feature = "target-ssl-proxies")]
impl TargetSslProxies {
pub fn builder() -> super::builder::target_ssl_proxies::ClientBuilder {
crate::new_client_builder(super::builder::target_ssl_proxies::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::TargetSslProxies + 'static,
{
Self { inner: stub.into() }
}
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::TargetSslProxies>>
{
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::TargetSslProxies> {
super::transport::TargetSslProxies::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::TargetSslProxies> {
Self::build_transport(conf)
.await
.map(super::tracing::TargetSslProxies::new)
}
pub fn delete(&self) -> super::builder::target_ssl_proxies::Delete {
super::builder::target_ssl_proxies::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::target_ssl_proxies::Get {
super::builder::target_ssl_proxies::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::target_ssl_proxies::Insert {
super::builder::target_ssl_proxies::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::target_ssl_proxies::List {
super::builder::target_ssl_proxies::List::new(self.inner.clone())
}
pub fn set_backend_service(&self) -> super::builder::target_ssl_proxies::SetBackendService {
super::builder::target_ssl_proxies::SetBackendService::new(self.inner.clone())
}
pub fn set_certificate_map(&self) -> super::builder::target_ssl_proxies::SetCertificateMap {
super::builder::target_ssl_proxies::SetCertificateMap::new(self.inner.clone())
}
pub fn set_proxy_header(&self) -> super::builder::target_ssl_proxies::SetProxyHeader {
super::builder::target_ssl_proxies::SetProxyHeader::new(self.inner.clone())
}
pub fn set_ssl_certificates(&self) -> super::builder::target_ssl_proxies::SetSslCertificates {
super::builder::target_ssl_proxies::SetSslCertificates::new(self.inner.clone())
}
pub fn set_ssl_policy(&self) -> super::builder::target_ssl_proxies::SetSslPolicy {
super::builder::target_ssl_proxies::SetSslPolicy::new(self.inner.clone())
}
pub fn test_iam_permissions(&self) -> super::builder::target_ssl_proxies::TestIamPermissions {
super::builder::target_ssl_proxies::TestIamPermissions::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::target_ssl_proxies::GetOperation {
super::builder::target_ssl_proxies::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "target-tcp-proxies")]
#[cfg_attr(docsrs, doc(cfg(feature = "target-tcp-proxies")))]
#[derive(Clone, Debug)]
pub struct TargetTcpProxies {
inner: std::sync::Arc<dyn super::stub::dynamic::TargetTcpProxies>,
}
#[cfg(feature = "target-tcp-proxies")]
impl TargetTcpProxies {
pub fn builder() -> super::builder::target_tcp_proxies::ClientBuilder {
crate::new_client_builder(super::builder::target_tcp_proxies::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::TargetTcpProxies + 'static,
{
Self { inner: stub.into() }
}
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::TargetTcpProxies>>
{
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::TargetTcpProxies> {
super::transport::TargetTcpProxies::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::TargetTcpProxies> {
Self::build_transport(conf)
.await
.map(super::tracing::TargetTcpProxies::new)
}
pub fn aggregated_list(&self) -> super::builder::target_tcp_proxies::AggregatedList {
super::builder::target_tcp_proxies::AggregatedList::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::target_tcp_proxies::Delete {
super::builder::target_tcp_proxies::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::target_tcp_proxies::Get {
super::builder::target_tcp_proxies::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::target_tcp_proxies::Insert {
super::builder::target_tcp_proxies::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::target_tcp_proxies::List {
super::builder::target_tcp_proxies::List::new(self.inner.clone())
}
pub fn set_backend_service(&self) -> super::builder::target_tcp_proxies::SetBackendService {
super::builder::target_tcp_proxies::SetBackendService::new(self.inner.clone())
}
pub fn set_proxy_header(&self) -> super::builder::target_tcp_proxies::SetProxyHeader {
super::builder::target_tcp_proxies::SetProxyHeader::new(self.inner.clone())
}
pub fn test_iam_permissions(&self) -> super::builder::target_tcp_proxies::TestIamPermissions {
super::builder::target_tcp_proxies::TestIamPermissions::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::target_tcp_proxies::GetOperation {
super::builder::target_tcp_proxies::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "target-vpn-gateways")]
#[cfg_attr(docsrs, doc(cfg(feature = "target-vpn-gateways")))]
#[derive(Clone, Debug)]
pub struct TargetVpnGateways {
inner: std::sync::Arc<dyn super::stub::dynamic::TargetVpnGateways>,
}
#[cfg(feature = "target-vpn-gateways")]
impl TargetVpnGateways {
pub fn builder() -> super::builder::target_vpn_gateways::ClientBuilder {
crate::new_client_builder(super::builder::target_vpn_gateways::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::TargetVpnGateways + 'static,
{
Self { inner: stub.into() }
}
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::TargetVpnGateways>>
{
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::TargetVpnGateways> {
super::transport::TargetVpnGateways::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::TargetVpnGateways> {
Self::build_transport(conf)
.await
.map(super::tracing::TargetVpnGateways::new)
}
pub fn aggregated_list(&self) -> super::builder::target_vpn_gateways::AggregatedList {
super::builder::target_vpn_gateways::AggregatedList::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::target_vpn_gateways::Delete {
super::builder::target_vpn_gateways::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::target_vpn_gateways::Get {
super::builder::target_vpn_gateways::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::target_vpn_gateways::Insert {
super::builder::target_vpn_gateways::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::target_vpn_gateways::List {
super::builder::target_vpn_gateways::List::new(self.inner.clone())
}
pub fn set_labels(&self) -> super::builder::target_vpn_gateways::SetLabels {
super::builder::target_vpn_gateways::SetLabels::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::target_vpn_gateways::GetOperation {
super::builder::target_vpn_gateways::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "url-maps")]
#[cfg_attr(docsrs, doc(cfg(feature = "url-maps")))]
#[derive(Clone, Debug)]
pub struct UrlMaps {
inner: std::sync::Arc<dyn super::stub::dynamic::UrlMaps>,
}
#[cfg(feature = "url-maps")]
impl UrlMaps {
pub fn builder() -> super::builder::url_maps::ClientBuilder {
crate::new_client_builder(super::builder::url_maps::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::UrlMaps + 'static,
{
Self { inner: stub.into() }
}
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::UrlMaps>> {
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::UrlMaps> {
super::transport::UrlMaps::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::UrlMaps> {
Self::build_transport(conf)
.await
.map(super::tracing::UrlMaps::new)
}
pub fn aggregated_list(&self) -> super::builder::url_maps::AggregatedList {
super::builder::url_maps::AggregatedList::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::url_maps::Delete {
super::builder::url_maps::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::url_maps::Get {
super::builder::url_maps::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::url_maps::Insert {
super::builder::url_maps::Insert::new(self.inner.clone())
}
pub fn invalidate_cache(&self) -> super::builder::url_maps::InvalidateCache {
super::builder::url_maps::InvalidateCache::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::url_maps::List {
super::builder::url_maps::List::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::url_maps::Patch {
super::builder::url_maps::Patch::new(self.inner.clone())
}
pub fn test_iam_permissions(&self) -> super::builder::url_maps::TestIamPermissions {
super::builder::url_maps::TestIamPermissions::new(self.inner.clone())
}
pub fn update(&self) -> super::builder::url_maps::Update {
super::builder::url_maps::Update::new(self.inner.clone())
}
pub fn validate(&self) -> super::builder::url_maps::Validate {
super::builder::url_maps::Validate::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::url_maps::GetOperation {
super::builder::url_maps::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "vpn-gateways")]
#[cfg_attr(docsrs, doc(cfg(feature = "vpn-gateways")))]
#[derive(Clone, Debug)]
pub struct VpnGateways {
inner: std::sync::Arc<dyn super::stub::dynamic::VpnGateways>,
}
#[cfg(feature = "vpn-gateways")]
impl VpnGateways {
pub fn builder() -> super::builder::vpn_gateways::ClientBuilder {
crate::new_client_builder(super::builder::vpn_gateways::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::VpnGateways + 'static,
{
Self { inner: stub.into() }
}
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::VpnGateways>> {
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::VpnGateways> {
super::transport::VpnGateways::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::VpnGateways> {
Self::build_transport(conf)
.await
.map(super::tracing::VpnGateways::new)
}
pub fn aggregated_list(&self) -> super::builder::vpn_gateways::AggregatedList {
super::builder::vpn_gateways::AggregatedList::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::vpn_gateways::Delete {
super::builder::vpn_gateways::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::vpn_gateways::Get {
super::builder::vpn_gateways::Get::new(self.inner.clone())
}
pub fn get_status(&self) -> super::builder::vpn_gateways::GetStatus {
super::builder::vpn_gateways::GetStatus::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::vpn_gateways::Insert {
super::builder::vpn_gateways::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::vpn_gateways::List {
super::builder::vpn_gateways::List::new(self.inner.clone())
}
pub fn set_labels(&self) -> super::builder::vpn_gateways::SetLabels {
super::builder::vpn_gateways::SetLabels::new(self.inner.clone())
}
pub fn test_iam_permissions(&self) -> super::builder::vpn_gateways::TestIamPermissions {
super::builder::vpn_gateways::TestIamPermissions::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::vpn_gateways::GetOperation {
super::builder::vpn_gateways::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "vpn-tunnels")]
#[cfg_attr(docsrs, doc(cfg(feature = "vpn-tunnels")))]
#[derive(Clone, Debug)]
pub struct VpnTunnels {
inner: std::sync::Arc<dyn super::stub::dynamic::VpnTunnels>,
}
#[cfg(feature = "vpn-tunnels")]
impl VpnTunnels {
pub fn builder() -> super::builder::vpn_tunnels::ClientBuilder {
crate::new_client_builder(super::builder::vpn_tunnels::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::VpnTunnels + 'static,
{
Self { inner: stub.into() }
}
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::VpnTunnels>> {
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::VpnTunnels> {
super::transport::VpnTunnels::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::VpnTunnels> {
Self::build_transport(conf)
.await
.map(super::tracing::VpnTunnels::new)
}
pub fn aggregated_list(&self) -> super::builder::vpn_tunnels::AggregatedList {
super::builder::vpn_tunnels::AggregatedList::new(self.inner.clone())
}
pub fn delete(&self) -> super::builder::vpn_tunnels::Delete {
super::builder::vpn_tunnels::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::vpn_tunnels::Get {
super::builder::vpn_tunnels::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::vpn_tunnels::Insert {
super::builder::vpn_tunnels::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::vpn_tunnels::List {
super::builder::vpn_tunnels::List::new(self.inner.clone())
}
pub fn set_labels(&self) -> super::builder::vpn_tunnels::SetLabels {
super::builder::vpn_tunnels::SetLabels::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::vpn_tunnels::GetOperation {
super::builder::vpn_tunnels::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "wire-groups")]
#[cfg_attr(docsrs, doc(cfg(feature = "wire-groups")))]
#[derive(Clone, Debug)]
pub struct WireGroups {
inner: std::sync::Arc<dyn super::stub::dynamic::WireGroups>,
}
#[cfg(feature = "wire-groups")]
impl WireGroups {
pub fn builder() -> super::builder::wire_groups::ClientBuilder {
crate::new_client_builder(super::builder::wire_groups::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::WireGroups + 'static,
{
Self { inner: stub.into() }
}
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::WireGroups>> {
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::WireGroups> {
super::transport::WireGroups::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::WireGroups> {
Self::build_transport(conf)
.await
.map(super::tracing::WireGroups::new)
}
pub fn delete(&self) -> super::builder::wire_groups::Delete {
super::builder::wire_groups::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::wire_groups::Get {
super::builder::wire_groups::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::wire_groups::Insert {
super::builder::wire_groups::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::wire_groups::List {
super::builder::wire_groups::List::new(self.inner.clone())
}
pub fn patch(&self) -> super::builder::wire_groups::Patch {
super::builder::wire_groups::Patch::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::wire_groups::GetOperation {
super::builder::wire_groups::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "zone-operations")]
#[cfg_attr(docsrs, doc(cfg(feature = "zone-operations")))]
#[derive(Clone, Debug)]
pub struct ZoneOperations {
inner: std::sync::Arc<dyn super::stub::dynamic::ZoneOperations>,
}
#[cfg(feature = "zone-operations")]
impl ZoneOperations {
pub fn builder() -> super::builder::zone_operations::ClientBuilder {
crate::new_client_builder(super::builder::zone_operations::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::ZoneOperations + 'static,
{
Self { inner: stub.into() }
}
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::ZoneOperations>> {
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::ZoneOperations> {
super::transport::ZoneOperations::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::ZoneOperations> {
Self::build_transport(conf)
.await
.map(super::tracing::ZoneOperations::new)
}
pub fn delete(&self) -> super::builder::zone_operations::Delete {
super::builder::zone_operations::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::zone_operations::Get {
super::builder::zone_operations::Get::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::zone_operations::List {
super::builder::zone_operations::List::new(self.inner.clone())
}
pub fn wait(&self) -> super::builder::zone_operations::Wait {
super::builder::zone_operations::Wait::new(self.inner.clone())
}
}
#[cfg(feature = "zone-vm-extension-policies")]
#[cfg_attr(docsrs, doc(cfg(feature = "zone-vm-extension-policies")))]
#[derive(Clone, Debug)]
pub struct ZoneVmExtensionPolicies {
inner: std::sync::Arc<dyn super::stub::dynamic::ZoneVmExtensionPolicies>,
}
#[cfg(feature = "zone-vm-extension-policies")]
impl ZoneVmExtensionPolicies {
pub fn builder() -> super::builder::zone_vm_extension_policies::ClientBuilder {
crate::new_client_builder(super::builder::zone_vm_extension_policies::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::ZoneVmExtensionPolicies + 'static,
{
Self { inner: stub.into() }
}
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::ZoneVmExtensionPolicies>>
{
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::ZoneVmExtensionPolicies> {
super::transport::ZoneVmExtensionPolicies::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::ZoneVmExtensionPolicies> {
Self::build_transport(conf)
.await
.map(super::tracing::ZoneVmExtensionPolicies::new)
}
pub fn delete(&self) -> super::builder::zone_vm_extension_policies::Delete {
super::builder::zone_vm_extension_policies::Delete::new(self.inner.clone())
}
pub fn get(&self) -> super::builder::zone_vm_extension_policies::Get {
super::builder::zone_vm_extension_policies::Get::new(self.inner.clone())
}
pub fn insert(&self) -> super::builder::zone_vm_extension_policies::Insert {
super::builder::zone_vm_extension_policies::Insert::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::zone_vm_extension_policies::List {
super::builder::zone_vm_extension_policies::List::new(self.inner.clone())
}
pub fn update(&self) -> super::builder::zone_vm_extension_policies::Update {
super::builder::zone_vm_extension_policies::Update::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::zone_vm_extension_policies::GetOperation {
super::builder::zone_vm_extension_policies::GetOperation::new(self.inner.clone())
}
}
#[cfg(feature = "zones")]
#[cfg_attr(docsrs, doc(cfg(feature = "zones")))]
#[derive(Clone, Debug)]
pub struct Zones {
inner: std::sync::Arc<dyn super::stub::dynamic::Zones>,
}
#[cfg(feature = "zones")]
impl Zones {
pub fn builder() -> super::builder::zones::ClientBuilder {
crate::new_client_builder(super::builder::zones::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::Zones + 'static,
{
Self { inner: stub.into() }
}
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::Zones>> {
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::Zones> {
super::transport::Zones::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::Zones> {
Self::build_transport(conf)
.await
.map(super::tracing::Zones::new)
}
pub fn get(&self) -> super::builder::zones::Get {
super::builder::zones::Get::new(self.inner.clone())
}
pub fn list(&self) -> super::builder::zones::List {
super::builder::zones::List::new(self.inner.clone())
}
}