#![allow(rustdoc::redundant_explicit_links)]
#![allow(rustdoc::broken_intra_doc_links)]
#[derive(Clone, Debug)]
pub struct BinauthzManagementServiceV1 {
inner: std::sync::Arc<dyn super::stub::dynamic::BinauthzManagementServiceV1>,
}
impl BinauthzManagementServiceV1 {
pub fn builder() -> super::builder::binauthz_management_service_v_1::ClientBuilder {
crate::new_client_builder(super::builder::binauthz_management_service_v_1::client::Factory)
}
pub fn from_stub<T>(stub: T) -> Self
where
T: super::stub::BinauthzManagementServiceV1 + 'static,
{
Self {
inner: std::sync::Arc::new(stub),
}
}
pub(crate) async fn new(
config: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<Self> {
let inner = Self::build_inner(config).await?;
Ok(Self { inner })
}
async fn build_inner(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<
std::sync::Arc<dyn super::stub::dynamic::BinauthzManagementServiceV1>,
> {
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::BinauthzManagementServiceV1> {
super::transport::BinauthzManagementServiceV1::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::BinauthzManagementServiceV1> {
Self::build_transport(conf)
.await
.map(super::tracing::BinauthzManagementServiceV1::new)
}
pub fn get_policy(&self) -> super::builder::binauthz_management_service_v_1::GetPolicy {
super::builder::binauthz_management_service_v_1::GetPolicy::new(self.inner.clone())
}
pub fn update_policy(&self) -> super::builder::binauthz_management_service_v_1::UpdatePolicy {
super::builder::binauthz_management_service_v_1::UpdatePolicy::new(self.inner.clone())
}
pub fn create_attestor(
&self,
) -> super::builder::binauthz_management_service_v_1::CreateAttestor {
super::builder::binauthz_management_service_v_1::CreateAttestor::new(self.inner.clone())
}
pub fn get_attestor(&self) -> super::builder::binauthz_management_service_v_1::GetAttestor {
super::builder::binauthz_management_service_v_1::GetAttestor::new(self.inner.clone())
}
pub fn update_attestor(
&self,
) -> super::builder::binauthz_management_service_v_1::UpdateAttestor {
super::builder::binauthz_management_service_v_1::UpdateAttestor::new(self.inner.clone())
}
pub fn list_attestors(&self) -> super::builder::binauthz_management_service_v_1::ListAttestors {
super::builder::binauthz_management_service_v_1::ListAttestors::new(self.inner.clone())
}
pub fn delete_attestor(
&self,
) -> super::builder::binauthz_management_service_v_1::DeleteAttestor {
super::builder::binauthz_management_service_v_1::DeleteAttestor::new(self.inner.clone())
}
}
#[derive(Clone, Debug)]
pub struct SystemPolicyV1 {
inner: std::sync::Arc<dyn super::stub::dynamic::SystemPolicyV1>,
}
impl SystemPolicyV1 {
pub fn builder() -> super::builder::system_policy_v_1::ClientBuilder {
crate::new_client_builder(super::builder::system_policy_v_1::client::Factory)
}
pub fn from_stub<T>(stub: T) -> Self
where
T: super::stub::SystemPolicyV1 + 'static,
{
Self {
inner: std::sync::Arc::new(stub),
}
}
pub(crate) async fn new(
config: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<Self> {
let inner = Self::build_inner(config).await?;
Ok(Self { inner })
}
async fn build_inner(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::SystemPolicyV1>> {
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::SystemPolicyV1> {
super::transport::SystemPolicyV1::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::SystemPolicyV1> {
Self::build_transport(conf)
.await
.map(super::tracing::SystemPolicyV1::new)
}
pub fn get_system_policy(&self) -> super::builder::system_policy_v_1::GetSystemPolicy {
super::builder::system_policy_v_1::GetSystemPolicy::new(self.inner.clone())
}
}
#[derive(Clone, Debug)]
pub struct ValidationHelperV1 {
inner: std::sync::Arc<dyn super::stub::dynamic::ValidationHelperV1>,
}
impl ValidationHelperV1 {
pub fn builder() -> super::builder::validation_helper_v_1::ClientBuilder {
crate::new_client_builder(super::builder::validation_helper_v_1::client::Factory)
}
pub fn from_stub<T>(stub: T) -> Self
where
T: super::stub::ValidationHelperV1 + 'static,
{
Self {
inner: std::sync::Arc::new(stub),
}
}
pub(crate) async fn new(
config: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<Self> {
let inner = Self::build_inner(config).await?;
Ok(Self { inner })
}
async fn build_inner(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<std::sync::Arc<dyn super::stub::dynamic::ValidationHelperV1>>
{
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::ValidationHelperV1> {
super::transport::ValidationHelperV1::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::ValidationHelperV1> {
Self::build_transport(conf)
.await
.map(super::tracing::ValidationHelperV1::new)
}
pub fn validate_attestation_occurrence(
&self,
) -> super::builder::validation_helper_v_1::ValidateAttestationOccurrence {
super::builder::validation_helper_v_1::ValidateAttestationOccurrence::new(
self.inner.clone(),
)
}
}