pub struct ServingConfigService { /* private fields */ }Expand description
Implements a client for the Vertex AI Search for commerce API.
§Example
let client = ServingConfigService::builder().build().await?;
// use `client` to make requests to the Vertex AI Search for commerce API.§Service Description
Service for modifying ServingConfig.
§Configuration
To configure ServingConfigService use the with_* methods in the type returned
by builder(). The default configuration should
work for most applications. Common configuration changes include
- with_endpoint(): by default this client uses the global default endpoint
(
https://retail.googleapis.com). Applications using regional endpoints or running in restricted networks (e.g. a network configured override this default. - with_credentials(): by default this client uses Application Default Credentials. Applications using custom authentication may need to override this default.
§Pooling and Cloning
ServingConfigService holds a connection pool internally, it is advised to
create one and the reuse it. You do not need to wrap ServingConfigService in
an Rc or Arc to reuse it, because it
already uses an Arc internally.
Implementations§
Source§impl ServingConfigService
impl ServingConfigService
Sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
Returns a builder for ServingConfigService.
let client = ServingConfigService::builder().build().await?;Sourcepub fn from_stub<T>(stub: T) -> Selfwhere
T: ServingConfigService + 'static,
pub fn from_stub<T>(stub: T) -> Selfwhere
T: ServingConfigService + 'static,
Creates a new client from the provided stub.
The most common case for calling this function is in tests mocking the client’s behavior.
Sourcepub fn create_serving_config(&self) -> CreateServingConfig
pub fn create_serving_config(&self) -> CreateServingConfig
Creates a ServingConfig.
A maximum of 100 ServingConfigs are allowed in a Catalog, otherwise a FAILED_PRECONDITION error is returned.
Sourcepub fn delete_serving_config(&self) -> DeleteServingConfig
pub fn delete_serving_config(&self) -> DeleteServingConfig
Deletes a ServingConfig.
Returns a NotFound error if the ServingConfig does not exist.
Sourcepub fn update_serving_config(&self) -> UpdateServingConfig
pub fn update_serving_config(&self) -> UpdateServingConfig
Updates a ServingConfig.
Sourcepub fn get_serving_config(&self) -> GetServingConfig
pub fn get_serving_config(&self) -> GetServingConfig
Gets a ServingConfig.
Returns a NotFound error if the ServingConfig does not exist.
Sourcepub fn list_serving_configs(&self) -> ListServingConfigs
pub fn list_serving_configs(&self) -> ListServingConfigs
Lists all ServingConfigs linked to this catalog.
Sourcepub fn add_control(&self) -> AddControl
pub fn add_control(&self) -> AddControl
Enables a Control on the specified ServingConfig. The control is added in the last position of the list of controls it belongs to (e.g. if it’s a facet spec control it will be applied in the last position of servingConfig.facetSpecIds) Returns a ALREADY_EXISTS error if the control has already been applied. Returns a FAILED_PRECONDITION error if the addition could exceed maximum number of control allowed for that type of control.
Sourcepub fn remove_control(&self) -> RemoveControl
pub fn remove_control(&self) -> RemoveControl
Disables a Control on the specified ServingConfig. The control is removed from the ServingConfig. Returns a NOT_FOUND error if the Control is not enabled for the ServingConfig.
Sourcepub fn list_operations(&self) -> ListOperations
pub fn list_operations(&self) -> ListOperations
Provides the Operations service functionality in this service.
Sourcepub fn get_operation(&self) -> GetOperation
pub fn get_operation(&self) -> GetOperation
Provides the Operations service functionality in this service.
Trait Implementations§
Source§impl Clone for ServingConfigService
impl Clone for ServingConfigService
Source§fn clone(&self) -> ServingConfigService
fn clone(&self) -> ServingConfigService
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more