pub struct ControlService { /* private fields */ }control-service only.Expand description
Implements a client for the Discovery Engine API.
§Example
let client = ControlService::builder().build().await?;
// use `client` to make requests to the Discovery Engine API.§Service Description
Service for performing CRUD operations on Controls. Controls allow for custom logic to be implemented in the serving path. Controls need to be attached to a Serving Config to be considered during a request.
§Configuration
To configure ControlService 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://discoveryengine.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
ControlService holds a connection pool internally, it is advised to
create one and the reuse it. You do not need to wrap ControlService in
an Rc or Arc to reuse it, because it
already uses an Arc internally.
Implementations§
Source§impl ControlService
impl ControlService
Sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
Returns a builder for ControlService.
let client = ControlService::builder().build().await?;Sourcepub fn from_stub<T>(stub: T) -> Selfwhere
T: ControlService + 'static,
pub fn from_stub<T>(stub: T) -> Selfwhere
T: ControlService + '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_control(&self) -> CreateControl
pub fn create_control(&self) -> CreateControl
Creates a Control.
By default 1000 controls are allowed for a data store. A request can be submitted to adjust this limit. If the Control to create already exists, an ALREADY_EXISTS error is returned.
Sourcepub fn delete_control(&self) -> DeleteControl
pub fn delete_control(&self) -> DeleteControl
Deletes a Control.
If the Control to delete does not exist, a NOT_FOUND error is returned.
Sourcepub fn update_control(&self) -> UpdateControl
pub fn update_control(&self) -> UpdateControl
Sourcepub fn get_control(&self) -> GetControl
pub fn get_control(&self) -> GetControl
Gets a Control.
Sourcepub fn list_controls(&self) -> ListControls
pub fn list_controls(&self) -> ListControls
Lists all Controls by their parent DataStore.
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.
Sourcepub fn cancel_operation(&self) -> CancelOperation
pub fn cancel_operation(&self) -> CancelOperation
Provides the Operations service functionality in this service.
Trait Implementations§
Source§impl Clone for ControlService
impl Clone for ControlService
Source§fn clone(&self) -> ControlService
fn clone(&self) -> ControlService
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more