#[non_exhaustive]pub struct CopyModelRequest {
pub parent: String,
pub source_model: String,
pub encryption_spec: Option<EncryptionSpec>,
pub destination_model: Option<DestinationModel>,
/* private fields */
}Expand description
Request message for ModelService.CopyModel.
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.parent: StringRequired. The resource name of the Location into which to copy the Model.
Format: projects/{project}/locations/{location}
source_model: StringRequired. The resource name of the Model to copy. That Model must be in the
same Project. Format:
projects/{project}/locations/{location}/models/{model}
encryption_spec: Option<EncryptionSpec>Customer-managed encryption key options. If this is set, then the Model copy will be encrypted with the provided encryption key.
destination_model: Option<DestinationModel>If both fields are unset, a new Model will be created with a generated ID.
Implementations§
Source§impl CopyModelRequest
impl CopyModelRequest
pub fn new() -> Self
Sourcepub fn set_parent<T: Into<String>>(self, v: T) -> Self
pub fn set_parent<T: Into<String>>(self, v: T) -> Self
Sets the value of parent.
Sourcepub fn set_source_model<T: Into<String>>(self, v: T) -> Self
pub fn set_source_model<T: Into<String>>(self, v: T) -> Self
Sets the value of source_model.
Sourcepub fn set_encryption_spec<T: Into<Option<EncryptionSpec>>>(self, v: T) -> Self
pub fn set_encryption_spec<T: Into<Option<EncryptionSpec>>>(self, v: T) -> Self
Sets the value of encryption_spec.
Sourcepub fn set_destination_model<T: Into<Option<DestinationModel>>>(
self,
v: T,
) -> Self
pub fn set_destination_model<T: Into<Option<DestinationModel>>>( self, v: T, ) -> Self
Sets the value of destination_model.
Note that all the setters affecting destination_model are mutually
exclusive.
Sourcepub fn model_id(&self) -> Option<&String>
pub fn model_id(&self) -> Option<&String>
The value of destination_model
if it holds a ModelId, None if the field is not set or
holds a different branch.
Sourcepub fn set_model_id<T: Into<String>>(self, v: T) -> Self
pub fn set_model_id<T: Into<String>>(self, v: T) -> Self
Sets the value of destination_model
to hold a ModelId.
Note that all the setters affecting destination_model are
mutually exclusive.
Sourcepub fn parent_model(&self) -> Option<&String>
pub fn parent_model(&self) -> Option<&String>
The value of destination_model
if it holds a ParentModel, None if the field is not set or
holds a different branch.
Sourcepub fn set_parent_model<T: Into<String>>(self, v: T) -> Self
pub fn set_parent_model<T: Into<String>>(self, v: T) -> Self
Sets the value of destination_model
to hold a ParentModel.
Note that all the setters affecting destination_model are
mutually exclusive.
Trait Implementations§
Source§impl Clone for CopyModelRequest
impl Clone for CopyModelRequest
Source§fn clone(&self) -> CopyModelRequest
fn clone(&self) -> CopyModelRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more