#[non_exhaustive]pub struct MigrationSubtask {
pub name: String,
pub task_id: String,
pub type: String,
pub state: State,
pub processing_error: Option<ErrorInfo>,
pub resource_error_details: Vec<ResourceErrorDetail>,
pub resource_error_count: i32,
pub create_time: Option<Timestamp>,
pub last_update_time: Option<Timestamp>,
pub metrics: Vec<TimeSeries>,
/* private fields */
}Expand description
A subtask for a migration which carries details about the configuration of the subtask. The content of the details should not matter to the end user, but is a contract between the subtask creator and subtask worker.
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.name: StringOutput only. Immutable. The resource name for the migration subtask. The ID is server-generated.
Example: projects/123/locations/us/workflows/345/subtasks/678
task_id: StringThe unique ID of the task to which this subtask belongs.
type: StringThe type of the Subtask. The migration service does not check whether this is a known type. It is up to the task creator (i.e. orchestrator or worker) to ensure it only creates subtasks for which there are compatible workers polling for Subtasks.
state: StateOutput only. The current state of the subtask.
processing_error: Option<ErrorInfo>Output only. An explanation that may be populated when the task is in FAILED state.
resource_error_details: Vec<ResourceErrorDetail>Output only. Provides details to errors and issues encountered while processing the subtask. Presence of error details does not mean that the subtask failed.
resource_error_count: i32The number or resources with errors. Note: This is not the total
number of errors as each resource can have more than one error.
This is used to indicate truncation by having a resource_error_count
that is higher than the size of resource_error_details.
create_time: Option<Timestamp>Time when the subtask was created.
last_update_time: Option<Timestamp>Time when the subtask was last updated.
metrics: Vec<TimeSeries>The metrics for the subtask.
Implementations§
Source§impl MigrationSubtask
impl MigrationSubtask
pub fn new() -> Self
Sourcepub fn set_task_id<T: Into<String>>(self, v: T) -> Self
pub fn set_task_id<T: Into<String>>(self, v: T) -> Self
Sets the value of task_id.
Sourcepub fn set_processing_error<T>(self, v: T) -> Self
pub fn set_processing_error<T>(self, v: T) -> Self
Sets the value of processing_error.
Sourcepub fn set_or_clear_processing_error<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_processing_error<T>(self, v: Option<T>) -> Self
Sets or clears the value of processing_error.
Sourcepub fn set_resource_error_details<T, V>(self, v: T) -> Self
pub fn set_resource_error_details<T, V>(self, v: T) -> Self
Sets the value of resource_error_details.
Sourcepub fn set_resource_error_count<T: Into<i32>>(self, v: T) -> Self
pub fn set_resource_error_count<T: Into<i32>>(self, v: T) -> Self
Sets the value of resource_error_count.
Sourcepub fn set_create_time<T>(self, v: T) -> Self
pub fn set_create_time<T>(self, v: T) -> Self
Sets the value of create_time.
Sourcepub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of create_time.
Sourcepub fn set_last_update_time<T>(self, v: T) -> Self
pub fn set_last_update_time<T>(self, v: T) -> Self
Sets the value of last_update_time.
Sourcepub fn set_or_clear_last_update_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_last_update_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of last_update_time.
Sourcepub fn set_metrics<T, V>(self, v: T) -> Self
pub fn set_metrics<T, V>(self, v: T) -> Self
Sets the value of metrics.
Trait Implementations§
Source§impl Clone for MigrationSubtask
impl Clone for MigrationSubtask
Source§fn clone(&self) -> MigrationSubtask
fn clone(&self) -> MigrationSubtask
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more