#[non_exhaustive]pub struct DeployModelRequest {
pub endpoint: String,
pub deployed_model: Option<DeployedModel>,
pub traffic_split: HashMap<String, i32>,
/* private fields */
}endpoint-service only.Expand description
Request message for EndpointService.DeployModel.
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 resource into which to deploy a Model.
Format:
projects/{project}/locations/{location}/endpoints/{endpoint}
deployed_model: Option<DeployedModel>Required. The DeployedModel to be created within the Endpoint. Note that Endpoint.traffic_split must be updated for the DeployedModel to start receiving traffic, either as part of this call, or via EndpointService.UpdateEndpoint.
traffic_split: HashMap<String, i32>A map from a DeployedModel’s ID to the percentage of this Endpoint’s traffic that should be forwarded to that DeployedModel.
If this field is non-empty, then the Endpoint’s traffic_split will be overwritten with it. To refer to the ID of the just being deployed Model, a “0” should be used, and the actual ID of the new DeployedModel will be filled in its place by this method. The traffic percentage values must add up to 100.
If this field is empty, then the Endpoint’s traffic_split is not updated.
Implementations§
Source§impl DeployModelRequest
impl DeployModelRequest
Sourcepub fn set_endpoint<T: Into<String>>(self, v: T) -> Self
pub fn set_endpoint<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_deployed_model<T>(self, v: T) -> Selfwhere
T: Into<DeployedModel>,
pub fn set_deployed_model<T>(self, v: T) -> Selfwhere
T: Into<DeployedModel>,
Sets the value of deployed_model.
§Example
use google_cloud_aiplatform_v1::model::DeployedModel;
let x = DeployModelRequest::new().set_deployed_model(DeployedModel::default()/* use setters */);Sourcepub fn set_or_clear_deployed_model<T>(self, v: Option<T>) -> Selfwhere
T: Into<DeployedModel>,
pub fn set_or_clear_deployed_model<T>(self, v: Option<T>) -> Selfwhere
T: Into<DeployedModel>,
Sets or clears the value of deployed_model.
§Example
use google_cloud_aiplatform_v1::model::DeployedModel;
let x = DeployModelRequest::new().set_or_clear_deployed_model(Some(DeployedModel::default()/* use setters */));
let x = DeployModelRequest::new().set_or_clear_deployed_model(None::<DeployedModel>);Sourcepub fn set_traffic_split<T, K, V>(self, v: T) -> Self
pub fn set_traffic_split<T, K, V>(self, v: T) -> Self
Sets the value of traffic_split.
§Example
let x = DeployModelRequest::new().set_traffic_split([
("key0", 123),
("key1", 456),
]);Trait Implementations§
Source§impl Clone for DeployModelRequest
impl Clone for DeployModelRequest
Source§fn clone(&self) -> DeployModelRequest
fn clone(&self) -> DeployModelRequest
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 DeployModelRequest
impl Debug for DeployModelRequest
Source§impl Default for DeployModelRequest
impl Default for DeployModelRequest
Source§fn default() -> DeployModelRequest
fn default() -> DeployModelRequest
Source§impl Message for DeployModelRequest
impl Message for DeployModelRequest
Source§impl PartialEq for DeployModelRequest
impl PartialEq for DeployModelRequest
impl StructuralPartialEq for DeployModelRequest
Auto Trait Implementations§
impl Freeze for DeployModelRequest
impl RefUnwindSafe for DeployModelRequest
impl Send for DeployModelRequest
impl Sync for DeployModelRequest
impl Unpin for DeployModelRequest
impl UnsafeUnpin for DeployModelRequest
impl UnwindSafe for DeployModelRequest
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