#[async_trait::async_trait]
pub trait ImageAnnotator: std::fmt::Debug + Send + Sync {
async fn batch_annotate_images(
&self,
req: crate::model::BatchAnnotateImagesRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::BatchAnnotateImagesResponse>>;
async fn batch_annotate_files(
&self,
req: crate::model::BatchAnnotateFilesRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::BatchAnnotateFilesResponse>>;
async fn async_batch_annotate_images(
&self,
req: crate::model::AsyncBatchAnnotateImagesRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<google_cloud_longrunning::model::Operation>>;
async fn async_batch_annotate_files(
&self,
req: crate::model::AsyncBatchAnnotateFilesRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<google_cloud_longrunning::model::Operation>>;
async fn get_operation(
&self,
req: google_cloud_longrunning::model::GetOperationRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<google_cloud_longrunning::model::Operation>>;
fn get_polling_error_policy(
&self,
options: &crate::RequestOptions,
) -> std::sync::Arc<dyn google_cloud_gax::polling_error_policy::PollingErrorPolicy>;
fn get_polling_backoff_policy(
&self,
options: &crate::RequestOptions,
) -> std::sync::Arc<dyn google_cloud_gax::polling_backoff_policy::PollingBackoffPolicy>;
}
#[async_trait::async_trait]
impl<T: super::ImageAnnotator> ImageAnnotator for T {
async fn batch_annotate_images(
&self,
req: crate::model::BatchAnnotateImagesRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::BatchAnnotateImagesResponse>> {
T::batch_annotate_images(self, req, options).await
}
async fn batch_annotate_files(
&self,
req: crate::model::BatchAnnotateFilesRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::BatchAnnotateFilesResponse>> {
T::batch_annotate_files(self, req, options).await
}
async fn async_batch_annotate_images(
&self,
req: crate::model::AsyncBatchAnnotateImagesRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<google_cloud_longrunning::model::Operation>> {
T::async_batch_annotate_images(self, req, options).await
}
async fn async_batch_annotate_files(
&self,
req: crate::model::AsyncBatchAnnotateFilesRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<google_cloud_longrunning::model::Operation>> {
T::async_batch_annotate_files(self, req, options).await
}
async fn get_operation(
&self,
req: google_cloud_longrunning::model::GetOperationRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<google_cloud_longrunning::model::Operation>> {
T::get_operation(self, req, options).await
}
fn get_polling_error_policy(
&self,
options: &crate::RequestOptions,
) -> std::sync::Arc<dyn google_cloud_gax::polling_error_policy::PollingErrorPolicy> {
T::get_polling_error_policy(self, options)
}
fn get_polling_backoff_policy(
&self,
options: &crate::RequestOptions,
) -> std::sync::Arc<dyn google_cloud_gax::polling_backoff_policy::PollingBackoffPolicy> {
T::get_polling_backoff_policy(self, options)
}
}
#[async_trait::async_trait]
pub trait ProductSearch: std::fmt::Debug + Send + Sync {
async fn create_product_set(
&self,
req: crate::model::CreateProductSetRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::ProductSet>>;
async fn list_product_sets(
&self,
req: crate::model::ListProductSetsRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::ListProductSetsResponse>>;
async fn get_product_set(
&self,
req: crate::model::GetProductSetRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::ProductSet>>;
async fn update_product_set(
&self,
req: crate::model::UpdateProductSetRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::ProductSet>>;
async fn delete_product_set(
&self,
req: crate::model::DeleteProductSetRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<()>>;
async fn create_product(
&self,
req: crate::model::CreateProductRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::Product>>;
async fn list_products(
&self,
req: crate::model::ListProductsRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::ListProductsResponse>>;
async fn get_product(
&self,
req: crate::model::GetProductRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::Product>>;
async fn update_product(
&self,
req: crate::model::UpdateProductRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::Product>>;
async fn delete_product(
&self,
req: crate::model::DeleteProductRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<()>>;
async fn create_reference_image(
&self,
req: crate::model::CreateReferenceImageRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::ReferenceImage>>;
async fn delete_reference_image(
&self,
req: crate::model::DeleteReferenceImageRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<()>>;
async fn list_reference_images(
&self,
req: crate::model::ListReferenceImagesRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::ListReferenceImagesResponse>>;
async fn get_reference_image(
&self,
req: crate::model::GetReferenceImageRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::ReferenceImage>>;
async fn add_product_to_product_set(
&self,
req: crate::model::AddProductToProductSetRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<()>>;
async fn remove_product_from_product_set(
&self,
req: crate::model::RemoveProductFromProductSetRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<()>>;
async fn list_products_in_product_set(
&self,
req: crate::model::ListProductsInProductSetRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::ListProductsInProductSetResponse>>;
async fn import_product_sets(
&self,
req: crate::model::ImportProductSetsRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<google_cloud_longrunning::model::Operation>>;
async fn purge_products(
&self,
req: crate::model::PurgeProductsRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<google_cloud_longrunning::model::Operation>>;
async fn get_operation(
&self,
req: google_cloud_longrunning::model::GetOperationRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<google_cloud_longrunning::model::Operation>>;
fn get_polling_error_policy(
&self,
options: &crate::RequestOptions,
) -> std::sync::Arc<dyn google_cloud_gax::polling_error_policy::PollingErrorPolicy>;
fn get_polling_backoff_policy(
&self,
options: &crate::RequestOptions,
) -> std::sync::Arc<dyn google_cloud_gax::polling_backoff_policy::PollingBackoffPolicy>;
}
#[async_trait::async_trait]
impl<T: super::ProductSearch> ProductSearch for T {
async fn create_product_set(
&self,
req: crate::model::CreateProductSetRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::ProductSet>> {
T::create_product_set(self, req, options).await
}
async fn list_product_sets(
&self,
req: crate::model::ListProductSetsRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::ListProductSetsResponse>> {
T::list_product_sets(self, req, options).await
}
async fn get_product_set(
&self,
req: crate::model::GetProductSetRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::ProductSet>> {
T::get_product_set(self, req, options).await
}
async fn update_product_set(
&self,
req: crate::model::UpdateProductSetRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::ProductSet>> {
T::update_product_set(self, req, options).await
}
async fn delete_product_set(
&self,
req: crate::model::DeleteProductSetRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<()>> {
T::delete_product_set(self, req, options).await
}
async fn create_product(
&self,
req: crate::model::CreateProductRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::Product>> {
T::create_product(self, req, options).await
}
async fn list_products(
&self,
req: crate::model::ListProductsRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::ListProductsResponse>> {
T::list_products(self, req, options).await
}
async fn get_product(
&self,
req: crate::model::GetProductRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::Product>> {
T::get_product(self, req, options).await
}
async fn update_product(
&self,
req: crate::model::UpdateProductRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::Product>> {
T::update_product(self, req, options).await
}
async fn delete_product(
&self,
req: crate::model::DeleteProductRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<()>> {
T::delete_product(self, req, options).await
}
async fn create_reference_image(
&self,
req: crate::model::CreateReferenceImageRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::ReferenceImage>> {
T::create_reference_image(self, req, options).await
}
async fn delete_reference_image(
&self,
req: crate::model::DeleteReferenceImageRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<()>> {
T::delete_reference_image(self, req, options).await
}
async fn list_reference_images(
&self,
req: crate::model::ListReferenceImagesRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::ListReferenceImagesResponse>> {
T::list_reference_images(self, req, options).await
}
async fn get_reference_image(
&self,
req: crate::model::GetReferenceImageRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::ReferenceImage>> {
T::get_reference_image(self, req, options).await
}
async fn add_product_to_product_set(
&self,
req: crate::model::AddProductToProductSetRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<()>> {
T::add_product_to_product_set(self, req, options).await
}
async fn remove_product_from_product_set(
&self,
req: crate::model::RemoveProductFromProductSetRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<()>> {
T::remove_product_from_product_set(self, req, options).await
}
async fn list_products_in_product_set(
&self,
req: crate::model::ListProductsInProductSetRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::ListProductsInProductSetResponse>> {
T::list_products_in_product_set(self, req, options).await
}
async fn import_product_sets(
&self,
req: crate::model::ImportProductSetsRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<google_cloud_longrunning::model::Operation>> {
T::import_product_sets(self, req, options).await
}
async fn purge_products(
&self,
req: crate::model::PurgeProductsRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<google_cloud_longrunning::model::Operation>> {
T::purge_products(self, req, options).await
}
async fn get_operation(
&self,
req: google_cloud_longrunning::model::GetOperationRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<google_cloud_longrunning::model::Operation>> {
T::get_operation(self, req, options).await
}
fn get_polling_error_policy(
&self,
options: &crate::RequestOptions,
) -> std::sync::Arc<dyn google_cloud_gax::polling_error_policy::PollingErrorPolicy> {
T::get_polling_error_policy(self, options)
}
fn get_polling_backoff_policy(
&self,
options: &crate::RequestOptions,
) -> std::sync::Arc<dyn google_cloud_gax::polling_backoff_policy::PollingBackoffPolicy> {
T::get_polling_backoff_policy(self, options)
}
}