Struct google_api_proto::google::cloud::retail::v2beta::model_service_client::ModelServiceClient
source · pub struct ModelServiceClient<T> { /* private fields */ }
Expand description
Service for performing CRUD operations on models.
Recommendation models contain all the metadata necessary to generate a set of
models for the Predict()
API. A model is queried
indirectly via a ServingConfig, which associates a model with a
given Placement (e.g. Frequently Bought Together on Home Page).
This service allows you to do the following:
- Initiate training of a model.
- Pause training of an existing model.
- List all the available models along with their metadata.
- Control their tuning schedule.
Implementations§
source§impl<T> ModelServiceClient<T>where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<T> ModelServiceClient<T>where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
pub fn new(inner: T) -> Self
pub fn with_origin(inner: T, origin: Uri) -> Self
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> ModelServiceClient<InterceptedService<T, F>>where
F: Interceptor,
T::ResponseBody: Default,
T: Service<Request<BoxBody>, Response = Response<<T as GrpcService<BoxBody>>::ResponseBody>>,
<T as Service<Request<BoxBody>>>::Error: Into<StdError> + Send + Sync,
sourcepub fn send_compressed(self, encoding: CompressionEncoding) -> Self
pub fn send_compressed(self, encoding: CompressionEncoding) -> Self
Compress requests with the given encoding.
This requires the server to support it otherwise it might respond with an error.
sourcepub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
Enable decompressing responses.
sourcepub fn max_decoding_message_size(self, limit: usize) -> Self
pub fn max_decoding_message_size(self, limit: usize) -> Self
Limits the maximum size of a decoded message.
Default: 4MB
sourcepub fn max_encoding_message_size(self, limit: usize) -> Self
pub fn max_encoding_message_size(self, limit: usize) -> Self
Limits the maximum size of an encoded message.
Default: usize::MAX
sourcepub async fn create_model(
&mut self,
request: impl IntoRequest<CreateModelRequest>,
) -> Result<Response<Operation>, Status>
pub async fn create_model( &mut self, request: impl IntoRequest<CreateModelRequest>, ) -> Result<Response<Operation>, Status>
Creates a new model.
sourcepub async fn get_model(
&mut self,
request: impl IntoRequest<GetModelRequest>,
) -> Result<Response<Model>, Status>
pub async fn get_model( &mut self, request: impl IntoRequest<GetModelRequest>, ) -> Result<Response<Model>, Status>
Gets a model.
sourcepub async fn pause_model(
&mut self,
request: impl IntoRequest<PauseModelRequest>,
) -> Result<Response<Model>, Status>
pub async fn pause_model( &mut self, request: impl IntoRequest<PauseModelRequest>, ) -> Result<Response<Model>, Status>
Pauses the training of an existing model.
sourcepub async fn resume_model(
&mut self,
request: impl IntoRequest<ResumeModelRequest>,
) -> Result<Response<Model>, Status>
pub async fn resume_model( &mut self, request: impl IntoRequest<ResumeModelRequest>, ) -> Result<Response<Model>, Status>
Resumes the training of an existing model.
sourcepub async fn delete_model(
&mut self,
request: impl IntoRequest<DeleteModelRequest>,
) -> Result<Response<()>, Status>
pub async fn delete_model( &mut self, request: impl IntoRequest<DeleteModelRequest>, ) -> Result<Response<()>, Status>
Deletes an existing model.
sourcepub async fn list_models(
&mut self,
request: impl IntoRequest<ListModelsRequest>,
) -> Result<Response<ListModelsResponse>, Status>
pub async fn list_models( &mut self, request: impl IntoRequest<ListModelsRequest>, ) -> Result<Response<ListModelsResponse>, Status>
Lists all the models linked to this event store.
sourcepub async fn update_model(
&mut self,
request: impl IntoRequest<UpdateModelRequest>,
) -> Result<Response<Model>, Status>
pub async fn update_model( &mut self, request: impl IntoRequest<UpdateModelRequest>, ) -> Result<Response<Model>, Status>
Update of model metadata. Only fields that
currently can be updated are: filtering_option
and
periodic_tuning_state
.
If other values are provided, this API method ignores them.
sourcepub async fn tune_model(
&mut self,
request: impl IntoRequest<TuneModelRequest>,
) -> Result<Response<Operation>, Status>
pub async fn tune_model( &mut self, request: impl IntoRequest<TuneModelRequest>, ) -> Result<Response<Operation>, Status>
Tunes an existing model.
Trait Implementations§
source§impl<T: Clone> Clone for ModelServiceClient<T>
impl<T: Clone> Clone for ModelServiceClient<T>
source§fn clone(&self) -> ModelServiceClient<T>
fn clone(&self) -> ModelServiceClient<T>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl<T> !Freeze for ModelServiceClient<T>
impl<T> RefUnwindSafe for ModelServiceClient<T>where
T: RefUnwindSafe,
impl<T> Send for ModelServiceClient<T>where
T: Send,
impl<T> Sync for ModelServiceClient<T>where
T: Sync,
impl<T> Unpin for ModelServiceClient<T>where
T: Unpin,
impl<T> UnwindSafe for ModelServiceClient<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request