#[non_exhaustive]pub struct PredictRequest {
pub endpoint: String,
pub instances: Vec<Value>,
pub parameters: Option<Value>,
/* private fields */
}Expand description
Request message for PredictionService.Predict.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.endpoint: StringRequired. The name of the Endpoint requested to serve the prediction.
Format:
projects/{project}/locations/{location}/endpoints/{endpoint}
instances: Vec<Value>Required. The instances that are the input to the prediction call. A DeployedModel may have an upper limit on the number of instances it supports per request, and when it is exceeded the prediction call errors in case of AutoML Models, or, in case of customer created Models, the behaviour is as documented by that Model. The schema of any single instance may be specified via Endpoint’s DeployedModels’ Model’s PredictSchemata’s instance_schema_uri.
parameters: Option<Value>The parameters that govern the prediction. The schema of the parameters may be specified via Endpoint’s DeployedModels’ Model’s PredictSchemata’s parameters_schema_uri.
Implementations§
Source§impl PredictRequest
impl PredictRequest
pub fn new() -> Self
Sourcepub fn set_endpoint<T: Into<String>>(self, v: T) -> Self
pub fn set_endpoint<T: Into<String>>(self, v: T) -> Self
Sets the value of endpoint.
Sourcepub fn set_instances<T, V>(self, v: T) -> Self
pub fn set_instances<T, V>(self, v: T) -> Self
Sets the value of instances.
Sourcepub fn set_parameters<T: Into<Option<Value>>>(self, v: T) -> Self
pub fn set_parameters<T: Into<Option<Value>>>(self, v: T) -> Self
Sets the value of parameters.
Trait Implementations§
Source§impl Clone for PredictRequest
impl Clone for PredictRequest
Source§fn clone(&self) -> PredictRequest
fn clone(&self) -> PredictRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more