#[non_exhaustive]pub struct DeployModelRequest {
pub endpoint: String,
pub deployed_model: Option<DeployedModel>,
pub traffic_split: HashMap<String, i32>,
/* private fields */
}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
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_deployed_model<T: Into<Option<DeployedModel>>>(self, v: T) -> Self
pub fn set_deployed_model<T: Into<Option<DeployedModel>>>(self, v: T) -> Self
Sets the value of deployed_model.
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.
Trait Implementations§
Source§impl Clone for DeployModelRequest
impl Clone for DeployModelRequest
Source§fn clone(&self) -> DeployModelRequest
fn clone(&self) -> DeployModelRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more