#![allow(rustdoc::redundant_explicit_links)]
#![allow(rustdoc::broken_intra_doc_links)]
#[derive(Clone, Debug)]
pub struct CompanyService {
inner: std::sync::Arc<dyn super::stub::dynamic::CompanyService>,
}
impl CompanyService {
pub fn builder() -> super::builder::company_service::ClientBuilder {
crate::new_client_builder(super::builder::company_service::client::Factory)
}
pub fn from_stub<T>(stub: T) -> Self
where
T: super::stub::CompanyService + '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::CompanyService>> {
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::CompanyService> {
super::transport::CompanyService::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::CompanyService> {
Self::build_transport(conf)
.await
.map(super::tracing::CompanyService::new)
}
pub fn create_company(&self) -> super::builder::company_service::CreateCompany {
super::builder::company_service::CreateCompany::new(self.inner.clone())
}
pub fn get_company(&self) -> super::builder::company_service::GetCompany {
super::builder::company_service::GetCompany::new(self.inner.clone())
}
pub fn update_company(&self) -> super::builder::company_service::UpdateCompany {
super::builder::company_service::UpdateCompany::new(self.inner.clone())
}
pub fn delete_company(&self) -> super::builder::company_service::DeleteCompany {
super::builder::company_service::DeleteCompany::new(self.inner.clone())
}
pub fn list_companies(&self) -> super::builder::company_service::ListCompanies {
super::builder::company_service::ListCompanies::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::company_service::GetOperation {
super::builder::company_service::GetOperation::new(self.inner.clone())
}
}
#[derive(Clone, Debug)]
pub struct Completion {
inner: std::sync::Arc<dyn super::stub::dynamic::Completion>,
}
impl Completion {
pub fn builder() -> super::builder::completion::ClientBuilder {
crate::new_client_builder(super::builder::completion::client::Factory)
}
pub fn from_stub<T>(stub: T) -> Self
where
T: super::stub::Completion + '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::Completion>> {
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::Completion> {
super::transport::Completion::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::Completion> {
Self::build_transport(conf)
.await
.map(super::tracing::Completion::new)
}
pub fn complete_query(&self) -> super::builder::completion::CompleteQuery {
super::builder::completion::CompleteQuery::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::completion::GetOperation {
super::builder::completion::GetOperation::new(self.inner.clone())
}
}
#[derive(Clone, Debug)]
pub struct EventService {
inner: std::sync::Arc<dyn super::stub::dynamic::EventService>,
}
impl EventService {
pub fn builder() -> super::builder::event_service::ClientBuilder {
crate::new_client_builder(super::builder::event_service::client::Factory)
}
pub fn from_stub<T>(stub: T) -> Self
where
T: super::stub::EventService + '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::EventService>> {
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::EventService> {
super::transport::EventService::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::EventService> {
Self::build_transport(conf)
.await
.map(super::tracing::EventService::new)
}
pub fn create_client_event(&self) -> super::builder::event_service::CreateClientEvent {
super::builder::event_service::CreateClientEvent::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::event_service::GetOperation {
super::builder::event_service::GetOperation::new(self.inner.clone())
}
}
#[derive(Clone, Debug)]
pub struct JobService {
inner: std::sync::Arc<dyn super::stub::dynamic::JobService>,
}
impl JobService {
pub fn builder() -> super::builder::job_service::ClientBuilder {
crate::new_client_builder(super::builder::job_service::client::Factory)
}
pub fn from_stub<T>(stub: T) -> Self
where
T: super::stub::JobService + '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::JobService>> {
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::JobService> {
super::transport::JobService::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::JobService> {
Self::build_transport(conf)
.await
.map(super::tracing::JobService::new)
}
pub fn create_job(&self) -> super::builder::job_service::CreateJob {
super::builder::job_service::CreateJob::new(self.inner.clone())
}
pub fn batch_create_jobs(&self) -> super::builder::job_service::BatchCreateJobs {
super::builder::job_service::BatchCreateJobs::new(self.inner.clone())
}
pub fn get_job(&self) -> super::builder::job_service::GetJob {
super::builder::job_service::GetJob::new(self.inner.clone())
}
pub fn update_job(&self) -> super::builder::job_service::UpdateJob {
super::builder::job_service::UpdateJob::new(self.inner.clone())
}
pub fn batch_update_jobs(&self) -> super::builder::job_service::BatchUpdateJobs {
super::builder::job_service::BatchUpdateJobs::new(self.inner.clone())
}
pub fn delete_job(&self) -> super::builder::job_service::DeleteJob {
super::builder::job_service::DeleteJob::new(self.inner.clone())
}
pub fn batch_delete_jobs(&self) -> super::builder::job_service::BatchDeleteJobs {
super::builder::job_service::BatchDeleteJobs::new(self.inner.clone())
}
pub fn list_jobs(&self) -> super::builder::job_service::ListJobs {
super::builder::job_service::ListJobs::new(self.inner.clone())
}
pub fn search_jobs(&self) -> super::builder::job_service::SearchJobs {
super::builder::job_service::SearchJobs::new(self.inner.clone())
}
pub fn search_jobs_for_alert(&self) -> super::builder::job_service::SearchJobsForAlert {
super::builder::job_service::SearchJobsForAlert::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::job_service::GetOperation {
super::builder::job_service::GetOperation::new(self.inner.clone())
}
}
#[derive(Clone, Debug)]
pub struct TenantService {
inner: std::sync::Arc<dyn super::stub::dynamic::TenantService>,
}
impl TenantService {
pub fn builder() -> super::builder::tenant_service::ClientBuilder {
crate::new_client_builder(super::builder::tenant_service::client::Factory)
}
pub fn from_stub<T>(stub: T) -> Self
where
T: super::stub::TenantService + '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::TenantService>> {
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::TenantService> {
super::transport::TenantService::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::TenantService> {
Self::build_transport(conf)
.await
.map(super::tracing::TenantService::new)
}
pub fn create_tenant(&self) -> super::builder::tenant_service::CreateTenant {
super::builder::tenant_service::CreateTenant::new(self.inner.clone())
}
pub fn get_tenant(&self) -> super::builder::tenant_service::GetTenant {
super::builder::tenant_service::GetTenant::new(self.inner.clone())
}
pub fn update_tenant(&self) -> super::builder::tenant_service::UpdateTenant {
super::builder::tenant_service::UpdateTenant::new(self.inner.clone())
}
pub fn delete_tenant(&self) -> super::builder::tenant_service::DeleteTenant {
super::builder::tenant_service::DeleteTenant::new(self.inner.clone())
}
pub fn list_tenants(&self) -> super::builder::tenant_service::ListTenants {
super::builder::tenant_service::ListTenants::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::tenant_service::GetOperation {
super::builder::tenant_service::GetOperation::new(self.inner.clone())
}
}