#![allow(rustdoc::redundant_explicit_links)]
#![allow(rustdoc::broken_intra_doc_links)]
#[derive(Clone, Debug)]
pub struct AnalyticsService {
inner: std::sync::Arc<dyn super::stub::dynamic::AnalyticsService>,
}
impl AnalyticsService {
pub fn builder() -> super::builder::analytics_service::ClientBuilder {
crate::new_client_builder(super::builder::analytics_service::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::AnalyticsService + '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::AnalyticsService>>
{
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::AnalyticsService> {
super::transport::AnalyticsService::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::AnalyticsService> {
Self::build_transport(conf)
.await
.map(super::tracing::AnalyticsService::new)
}
pub fn export_analytics_metrics(
&self,
) -> super::builder::analytics_service::ExportAnalyticsMetrics {
super::builder::analytics_service::ExportAnalyticsMetrics::new(self.inner.clone())
}
pub fn list_operations(&self) -> super::builder::analytics_service::ListOperations {
super::builder::analytics_service::ListOperations::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::analytics_service::GetOperation {
super::builder::analytics_service::GetOperation::new(self.inner.clone())
}
}
#[derive(Clone, Debug)]
pub struct CatalogService {
inner: std::sync::Arc<dyn super::stub::dynamic::CatalogService>,
}
impl CatalogService {
pub fn builder() -> super::builder::catalog_service::ClientBuilder {
crate::new_client_builder(super::builder::catalog_service::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::CatalogService + '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::CatalogService>> {
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::CatalogService> {
super::transport::CatalogService::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::CatalogService> {
Self::build_transport(conf)
.await
.map(super::tracing::CatalogService::new)
}
pub fn list_catalogs(&self) -> super::builder::catalog_service::ListCatalogs {
super::builder::catalog_service::ListCatalogs::new(self.inner.clone())
}
pub fn update_catalog(&self) -> super::builder::catalog_service::UpdateCatalog {
super::builder::catalog_service::UpdateCatalog::new(self.inner.clone())
}
pub fn set_default_branch(&self) -> super::builder::catalog_service::SetDefaultBranch {
super::builder::catalog_service::SetDefaultBranch::new(self.inner.clone())
}
pub fn get_default_branch(&self) -> super::builder::catalog_service::GetDefaultBranch {
super::builder::catalog_service::GetDefaultBranch::new(self.inner.clone())
}
pub fn get_completion_config(&self) -> super::builder::catalog_service::GetCompletionConfig {
super::builder::catalog_service::GetCompletionConfig::new(self.inner.clone())
}
pub fn update_completion_config(
&self,
) -> super::builder::catalog_service::UpdateCompletionConfig {
super::builder::catalog_service::UpdateCompletionConfig::new(self.inner.clone())
}
pub fn get_attributes_config(&self) -> super::builder::catalog_service::GetAttributesConfig {
super::builder::catalog_service::GetAttributesConfig::new(self.inner.clone())
}
pub fn update_attributes_config(
&self,
) -> super::builder::catalog_service::UpdateAttributesConfig {
super::builder::catalog_service::UpdateAttributesConfig::new(self.inner.clone())
}
pub fn add_catalog_attribute(&self) -> super::builder::catalog_service::AddCatalogAttribute {
super::builder::catalog_service::AddCatalogAttribute::new(self.inner.clone())
}
pub fn remove_catalog_attribute(
&self,
) -> super::builder::catalog_service::RemoveCatalogAttribute {
super::builder::catalog_service::RemoveCatalogAttribute::new(self.inner.clone())
}
pub fn replace_catalog_attribute(
&self,
) -> super::builder::catalog_service::ReplaceCatalogAttribute {
super::builder::catalog_service::ReplaceCatalogAttribute::new(self.inner.clone())
}
pub fn list_operations(&self) -> super::builder::catalog_service::ListOperations {
super::builder::catalog_service::ListOperations::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::catalog_service::GetOperation {
super::builder::catalog_service::GetOperation::new(self.inner.clone())
}
}
#[derive(Clone, Debug)]
pub struct CompletionService {
inner: std::sync::Arc<dyn super::stub::dynamic::CompletionService>,
}
impl CompletionService {
pub fn builder() -> super::builder::completion_service::ClientBuilder {
crate::new_client_builder(super::builder::completion_service::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::CompletionService + '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::CompletionService>>
{
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::CompletionService> {
super::transport::CompletionService::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::CompletionService> {
Self::build_transport(conf)
.await
.map(super::tracing::CompletionService::new)
}
pub fn complete_query(&self) -> super::builder::completion_service::CompleteQuery {
super::builder::completion_service::CompleteQuery::new(self.inner.clone())
}
pub fn import_completion_data(
&self,
) -> super::builder::completion_service::ImportCompletionData {
super::builder::completion_service::ImportCompletionData::new(self.inner.clone())
}
pub fn list_operations(&self) -> super::builder::completion_service::ListOperations {
super::builder::completion_service::ListOperations::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::completion_service::GetOperation {
super::builder::completion_service::GetOperation::new(self.inner.clone())
}
}
#[derive(Clone, Debug)]
pub struct ControlService {
inner: std::sync::Arc<dyn super::stub::dynamic::ControlService>,
}
impl ControlService {
pub fn builder() -> super::builder::control_service::ClientBuilder {
crate::new_client_builder(super::builder::control_service::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::ControlService + '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::ControlService>> {
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::ControlService> {
super::transport::ControlService::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::ControlService> {
Self::build_transport(conf)
.await
.map(super::tracing::ControlService::new)
}
pub fn create_control(&self) -> super::builder::control_service::CreateControl {
super::builder::control_service::CreateControl::new(self.inner.clone())
}
pub fn delete_control(&self) -> super::builder::control_service::DeleteControl {
super::builder::control_service::DeleteControl::new(self.inner.clone())
}
pub fn update_control(&self) -> super::builder::control_service::UpdateControl {
super::builder::control_service::UpdateControl::new(self.inner.clone())
}
pub fn get_control(&self) -> super::builder::control_service::GetControl {
super::builder::control_service::GetControl::new(self.inner.clone())
}
pub fn list_controls(&self) -> super::builder::control_service::ListControls {
super::builder::control_service::ListControls::new(self.inner.clone())
}
pub fn list_operations(&self) -> super::builder::control_service::ListOperations {
super::builder::control_service::ListOperations::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::control_service::GetOperation {
super::builder::control_service::GetOperation::new(self.inner.clone())
}
}
#[derive(Clone, Debug)]
pub struct ConversationalSearchService {
inner: std::sync::Arc<dyn super::stub::dynamic::ConversationalSearchService>,
}
impl ConversationalSearchService {
pub fn builder() -> super::builder::conversational_search_service::ClientBuilder {
crate::new_client_builder(super::builder::conversational_search_service::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::ConversationalSearchService + '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::ConversationalSearchService>,
> {
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::ConversationalSearchService> {
super::transport::ConversationalSearchService::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::ConversationalSearchService> {
Self::build_transport(conf)
.await
.map(super::tracing::ConversationalSearchService::new)
}
pub fn list_operations(&self) -> super::builder::conversational_search_service::ListOperations {
super::builder::conversational_search_service::ListOperations::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::conversational_search_service::GetOperation {
super::builder::conversational_search_service::GetOperation::new(self.inner.clone())
}
}
#[derive(Clone, Debug)]
pub struct GenerativeQuestionService {
inner: std::sync::Arc<dyn super::stub::dynamic::GenerativeQuestionService>,
}
impl GenerativeQuestionService {
pub fn builder() -> super::builder::generative_question_service::ClientBuilder {
crate::new_client_builder(super::builder::generative_question_service::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::GenerativeQuestionService + '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::GenerativeQuestionService>,
> {
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::GenerativeQuestionService> {
super::transport::GenerativeQuestionService::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::GenerativeQuestionService> {
Self::build_transport(conf)
.await
.map(super::tracing::GenerativeQuestionService::new)
}
pub fn update_generative_questions_feature_config(
&self,
) -> super::builder::generative_question_service::UpdateGenerativeQuestionsFeatureConfig {
super::builder::generative_question_service::UpdateGenerativeQuestionsFeatureConfig::new(
self.inner.clone(),
)
}
pub fn get_generative_questions_feature_config(
&self,
) -> super::builder::generative_question_service::GetGenerativeQuestionsFeatureConfig {
super::builder::generative_question_service::GetGenerativeQuestionsFeatureConfig::new(
self.inner.clone(),
)
}
pub fn list_generative_question_configs(
&self,
) -> super::builder::generative_question_service::ListGenerativeQuestionConfigs {
super::builder::generative_question_service::ListGenerativeQuestionConfigs::new(
self.inner.clone(),
)
}
pub fn update_generative_question_config(
&self,
) -> super::builder::generative_question_service::UpdateGenerativeQuestionConfig {
super::builder::generative_question_service::UpdateGenerativeQuestionConfig::new(
self.inner.clone(),
)
}
pub fn batch_update_generative_question_configs(
&self,
) -> super::builder::generative_question_service::BatchUpdateGenerativeQuestionConfigs {
super::builder::generative_question_service::BatchUpdateGenerativeQuestionConfigs::new(
self.inner.clone(),
)
}
pub fn list_operations(&self) -> super::builder::generative_question_service::ListOperations {
super::builder::generative_question_service::ListOperations::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::generative_question_service::GetOperation {
super::builder::generative_question_service::GetOperation::new(self.inner.clone())
}
}
#[derive(Clone, Debug)]
pub struct ModelService {
inner: std::sync::Arc<dyn super::stub::dynamic::ModelService>,
}
impl ModelService {
pub fn builder() -> super::builder::model_service::ClientBuilder {
crate::new_client_builder(super::builder::model_service::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::ModelService + '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::ModelService>> {
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::ModelService> {
super::transport::ModelService::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::ModelService> {
Self::build_transport(conf)
.await
.map(super::tracing::ModelService::new)
}
pub fn create_model(&self) -> super::builder::model_service::CreateModel {
super::builder::model_service::CreateModel::new(self.inner.clone())
}
pub fn get_model(&self) -> super::builder::model_service::GetModel {
super::builder::model_service::GetModel::new(self.inner.clone())
}
pub fn pause_model(&self) -> super::builder::model_service::PauseModel {
super::builder::model_service::PauseModel::new(self.inner.clone())
}
pub fn resume_model(&self) -> super::builder::model_service::ResumeModel {
super::builder::model_service::ResumeModel::new(self.inner.clone())
}
pub fn delete_model(&self) -> super::builder::model_service::DeleteModel {
super::builder::model_service::DeleteModel::new(self.inner.clone())
}
pub fn list_models(&self) -> super::builder::model_service::ListModels {
super::builder::model_service::ListModels::new(self.inner.clone())
}
pub fn update_model(&self) -> super::builder::model_service::UpdateModel {
super::builder::model_service::UpdateModel::new(self.inner.clone())
}
pub fn tune_model(&self) -> super::builder::model_service::TuneModel {
super::builder::model_service::TuneModel::new(self.inner.clone())
}
pub fn list_operations(&self) -> super::builder::model_service::ListOperations {
super::builder::model_service::ListOperations::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::model_service::GetOperation {
super::builder::model_service::GetOperation::new(self.inner.clone())
}
}
#[derive(Clone, Debug)]
pub struct PredictionService {
inner: std::sync::Arc<dyn super::stub::dynamic::PredictionService>,
}
impl PredictionService {
pub fn builder() -> super::builder::prediction_service::ClientBuilder {
crate::new_client_builder(super::builder::prediction_service::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::PredictionService + '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::PredictionService>>
{
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::PredictionService> {
super::transport::PredictionService::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::PredictionService> {
Self::build_transport(conf)
.await
.map(super::tracing::PredictionService::new)
}
pub fn predict(&self) -> super::builder::prediction_service::Predict {
super::builder::prediction_service::Predict::new(self.inner.clone())
}
pub fn list_operations(&self) -> super::builder::prediction_service::ListOperations {
super::builder::prediction_service::ListOperations::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::prediction_service::GetOperation {
super::builder::prediction_service::GetOperation::new(self.inner.clone())
}
}
#[derive(Clone, Debug)]
pub struct ProductService {
inner: std::sync::Arc<dyn super::stub::dynamic::ProductService>,
}
impl ProductService {
pub fn builder() -> super::builder::product_service::ClientBuilder {
crate::new_client_builder(super::builder::product_service::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::ProductService + '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::ProductService>> {
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::ProductService> {
super::transport::ProductService::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::ProductService> {
Self::build_transport(conf)
.await
.map(super::tracing::ProductService::new)
}
pub fn create_product(&self) -> super::builder::product_service::CreateProduct {
super::builder::product_service::CreateProduct::new(self.inner.clone())
}
pub fn get_product(&self) -> super::builder::product_service::GetProduct {
super::builder::product_service::GetProduct::new(self.inner.clone())
}
pub fn list_products(&self) -> super::builder::product_service::ListProducts {
super::builder::product_service::ListProducts::new(self.inner.clone())
}
pub fn update_product(&self) -> super::builder::product_service::UpdateProduct {
super::builder::product_service::UpdateProduct::new(self.inner.clone())
}
pub fn delete_product(&self) -> super::builder::product_service::DeleteProduct {
super::builder::product_service::DeleteProduct::new(self.inner.clone())
}
pub fn purge_products(&self) -> super::builder::product_service::PurgeProducts {
super::builder::product_service::PurgeProducts::new(self.inner.clone())
}
pub fn import_products(&self) -> super::builder::product_service::ImportProducts {
super::builder::product_service::ImportProducts::new(self.inner.clone())
}
pub fn set_inventory(&self) -> super::builder::product_service::SetInventory {
super::builder::product_service::SetInventory::new(self.inner.clone())
}
pub fn add_fulfillment_places(&self) -> super::builder::product_service::AddFulfillmentPlaces {
super::builder::product_service::AddFulfillmentPlaces::new(self.inner.clone())
}
pub fn remove_fulfillment_places(
&self,
) -> super::builder::product_service::RemoveFulfillmentPlaces {
super::builder::product_service::RemoveFulfillmentPlaces::new(self.inner.clone())
}
pub fn add_local_inventories(&self) -> super::builder::product_service::AddLocalInventories {
super::builder::product_service::AddLocalInventories::new(self.inner.clone())
}
pub fn remove_local_inventories(
&self,
) -> super::builder::product_service::RemoveLocalInventories {
super::builder::product_service::RemoveLocalInventories::new(self.inner.clone())
}
pub fn list_operations(&self) -> super::builder::product_service::ListOperations {
super::builder::product_service::ListOperations::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::product_service::GetOperation {
super::builder::product_service::GetOperation::new(self.inner.clone())
}
}
#[derive(Clone, Debug)]
pub struct SearchService {
inner: std::sync::Arc<dyn super::stub::dynamic::SearchService>,
}
impl SearchService {
pub fn builder() -> super::builder::search_service::ClientBuilder {
crate::new_client_builder(super::builder::search_service::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::SearchService + '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::SearchService>> {
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::SearchService> {
super::transport::SearchService::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::SearchService> {
Self::build_transport(conf)
.await
.map(super::tracing::SearchService::new)
}
pub fn search(&self) -> super::builder::search_service::Search {
super::builder::search_service::Search::new(self.inner.clone())
}
pub fn list_operations(&self) -> super::builder::search_service::ListOperations {
super::builder::search_service::ListOperations::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::search_service::GetOperation {
super::builder::search_service::GetOperation::new(self.inner.clone())
}
}
#[derive(Clone, Debug)]
pub struct ServingConfigService {
inner: std::sync::Arc<dyn super::stub::dynamic::ServingConfigService>,
}
impl ServingConfigService {
pub fn builder() -> super::builder::serving_config_service::ClientBuilder {
crate::new_client_builder(super::builder::serving_config_service::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::ServingConfigService + '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::ServingConfigService>>
{
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::ServingConfigService> {
super::transport::ServingConfigService::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::ServingConfigService> {
Self::build_transport(conf)
.await
.map(super::tracing::ServingConfigService::new)
}
pub fn create_serving_config(
&self,
) -> super::builder::serving_config_service::CreateServingConfig {
super::builder::serving_config_service::CreateServingConfig::new(self.inner.clone())
}
pub fn delete_serving_config(
&self,
) -> super::builder::serving_config_service::DeleteServingConfig {
super::builder::serving_config_service::DeleteServingConfig::new(self.inner.clone())
}
pub fn update_serving_config(
&self,
) -> super::builder::serving_config_service::UpdateServingConfig {
super::builder::serving_config_service::UpdateServingConfig::new(self.inner.clone())
}
pub fn get_serving_config(&self) -> super::builder::serving_config_service::GetServingConfig {
super::builder::serving_config_service::GetServingConfig::new(self.inner.clone())
}
pub fn list_serving_configs(
&self,
) -> super::builder::serving_config_service::ListServingConfigs {
super::builder::serving_config_service::ListServingConfigs::new(self.inner.clone())
}
pub fn add_control(&self) -> super::builder::serving_config_service::AddControl {
super::builder::serving_config_service::AddControl::new(self.inner.clone())
}
pub fn remove_control(&self) -> super::builder::serving_config_service::RemoveControl {
super::builder::serving_config_service::RemoveControl::new(self.inner.clone())
}
pub fn list_operations(&self) -> super::builder::serving_config_service::ListOperations {
super::builder::serving_config_service::ListOperations::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::serving_config_service::GetOperation {
super::builder::serving_config_service::GetOperation::new(self.inner.clone())
}
}
#[derive(Clone, Debug)]
pub struct UserEventService {
inner: std::sync::Arc<dyn super::stub::dynamic::UserEventService>,
}
impl UserEventService {
pub fn builder() -> super::builder::user_event_service::ClientBuilder {
crate::new_client_builder(super::builder::user_event_service::client::Factory)
}
pub fn from_stub<T>(stub: impl Into<std::sync::Arc<T>>) -> Self
where
T: super::stub::UserEventService + '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::UserEventService>>
{
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::UserEventService> {
super::transport::UserEventService::new(conf).await
}
async fn build_with_tracing(
conf: gaxi::options::ClientConfig,
) -> crate::ClientBuilderResult<impl super::stub::UserEventService> {
Self::build_transport(conf)
.await
.map(super::tracing::UserEventService::new)
}
pub fn write_user_event(&self) -> super::builder::user_event_service::WriteUserEvent {
super::builder::user_event_service::WriteUserEvent::new(self.inner.clone())
}
pub fn collect_user_event(&self) -> super::builder::user_event_service::CollectUserEvent {
super::builder::user_event_service::CollectUserEvent::new(self.inner.clone())
}
pub fn purge_user_events(&self) -> super::builder::user_event_service::PurgeUserEvents {
super::builder::user_event_service::PurgeUserEvents::new(self.inner.clone())
}
pub fn import_user_events(&self) -> super::builder::user_event_service::ImportUserEvents {
super::builder::user_event_service::ImportUserEvents::new(self.inner.clone())
}
pub fn rejoin_user_events(&self) -> super::builder::user_event_service::RejoinUserEvents {
super::builder::user_event_service::RejoinUserEvents::new(self.inner.clone())
}
pub fn list_operations(&self) -> super::builder::user_event_service::ListOperations {
super::builder::user_event_service::ListOperations::new(self.inner.clone())
}
pub fn get_operation(&self) -> super::builder::user_event_service::GetOperation {
super::builder::user_event_service::GetOperation::new(self.inner.clone())
}
}