#[non_exhaustive]pub struct PredictResponse {
pub predictions: Vec<Value>,
pub deployed_model_id: String,
pub model: String,
pub model_version_id: String,
pub model_display_name: String,
pub metadata: Option<Value>,
/* private fields */
}prediction-service only.Expand description
Response 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.predictions: Vec<Value>The predictions that are the output of the predictions call. The schema of any single prediction may be specified via Endpoint’s DeployedModels’ Model’s PredictSchemata’s prediction_schema_uri.
deployed_model_id: StringID of the Endpoint’s DeployedModel that served this prediction.
model: StringOutput only. The resource name of the Model which is deployed as the DeployedModel that this prediction hits.
model_version_id: StringOutput only. The version ID of the Model which is deployed as the DeployedModel that this prediction hits.
model_display_name: StringOutput only. The display name of the Model which is deployed as the DeployedModel that this prediction hits.
metadata: Option<Value>Output only. Request-level metadata returned by the model. The metadata type will be dependent upon the model implementation.
Implementations§
Source§impl PredictResponse
impl PredictResponse
Sourcepub fn set_predictions<T, V>(self, v: T) -> Self
pub fn set_predictions<T, V>(self, v: T) -> Self
Sets the value of predictions.
§Example
use wkt::Value;
let x = PredictResponse::new()
.set_predictions([
Value::default()/* use setters */,
Value::default()/* use (different) setters */,
]);Sourcepub fn set_deployed_model_id<T: Into<String>>(self, v: T) -> Self
pub fn set_deployed_model_id<T: Into<String>>(self, v: T) -> Self
Sets the value of deployed_model_id.
§Example
let x = PredictResponse::new().set_deployed_model_id("example");Sourcepub fn set_model_version_id<T: Into<String>>(self, v: T) -> Self
pub fn set_model_version_id<T: Into<String>>(self, v: T) -> Self
Sets the value of model_version_id.
§Example
let x = PredictResponse::new().set_model_version_id("example");Sourcepub fn set_model_display_name<T: Into<String>>(self, v: T) -> Self
pub fn set_model_display_name<T: Into<String>>(self, v: T) -> Self
Sets the value of model_display_name.
§Example
let x = PredictResponse::new().set_model_display_name("example");Sourcepub fn set_metadata<T>(self, v: T) -> Self
pub fn set_metadata<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_metadata<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_metadata<T>(self, v: Option<T>) -> Self
Trait Implementations§
Source§impl Clone for PredictResponse
impl Clone for PredictResponse
Source§fn clone(&self) -> PredictResponse
fn clone(&self) -> PredictResponse
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PredictResponse
impl Debug for PredictResponse
Source§impl Default for PredictResponse
impl Default for PredictResponse
Source§fn default() -> PredictResponse
fn default() -> PredictResponse
Source§impl Message for PredictResponse
impl Message for PredictResponse
Source§impl PartialEq for PredictResponse
impl PartialEq for PredictResponse
impl StructuralPartialEq for PredictResponse
Auto Trait Implementations§
impl Freeze for PredictResponse
impl RefUnwindSafe for PredictResponse
impl Send for PredictResponse
impl Sync for PredictResponse
impl Unpin for PredictResponse
impl UnsafeUnpin for PredictResponse
impl UnwindSafe for PredictResponse
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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