#[non_exhaustive]pub struct Execution {Show 13 fields
pub name: String,
pub start_time: Option<Timestamp>,
pub end_time: Option<Timestamp>,
pub duration: Option<Duration>,
pub state: State,
pub argument: String,
pub result: String,
pub error: Option<Error>,
pub workflow_revision_id: String,
pub call_log_level: CallLogLevel,
pub status: Option<Status>,
pub labels: HashMap<String, String>,
pub state_error: Option<StateError>,
/* private fields */
}Expand description
A running instance of a Workflow.
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. The resource name of the execution. Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}
start_time: Option<Timestamp>Output only. Marks the beginning of execution.
end_time: Option<Timestamp>Output only. Marks the end of execution, successful or not.
duration: Option<Duration>Output only. Measures the duration of the execution.
state: StateOutput only. Current state of the execution.
argument: StringInput parameters of the execution represented as a JSON string. The size limit is 32KB.
Note: If you are using the REST API directly to run your workflow, you
must escape any JSON string value of argument. Example:
'{"argument":"{\"firstName\":\"FIRST\",\"lastName\":\"LAST\"}"}'
result: StringOutput only. Output of the execution represented as a JSON string. The
value can only be present if the execution’s state is SUCCEEDED.
error: Option<Error>Output only. The error which caused the execution to finish prematurely.
The value is only present if the execution’s state is FAILED
or CANCELLED.
workflow_revision_id: StringOutput only. Revision of the workflow this execution is using.
call_log_level: CallLogLevelThe call logging level associated to this execution.
status: Option<Status>Output only. Status tracks the current steps and progress data of this execution.
labels: HashMap<String, String>Labels associated with this execution. Labels can contain at most 64 entries. Keys and values can be no longer than 63 characters and can only contain lowercase letters, numeric characters, underscores, and dashes. Label keys must start with a letter. International characters are allowed. By default, labels are inherited from the workflow but are overridden by any labels associated with the execution.
state_error: Option<StateError>Output only. Error regarding the state of the Execution resource. For example, this field will have error details if the execution data is unavailable due to revoked KMS key permissions.
Implementations§
Source§impl Execution
impl Execution
pub fn new() -> Self
Sourcepub fn set_start_time<T>(self, v: T) -> Self
pub fn set_start_time<T>(self, v: T) -> Self
Sets the value of start_time.
§Example
use wkt::Timestamp;
let x = Execution::new().set_start_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_start_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_start_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of start_time.
§Example
use wkt::Timestamp;
let x = Execution::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
let x = Execution::new().set_or_clear_start_time(None::<Timestamp>);Sourcepub fn set_end_time<T>(self, v: T) -> Self
pub fn set_end_time<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_end_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_end_time<T>(self, v: Option<T>) -> Self
Sourcepub fn set_duration<T>(self, v: T) -> Self
pub fn set_duration<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_duration<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_duration<T>(self, v: Option<T>) -> Self
Sourcepub fn set_argument<T: Into<String>>(self, v: T) -> Self
pub fn set_argument<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_result<T: Into<String>>(self, v: T) -> Self
pub fn set_result<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_or_clear_error<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_error<T>(self, v: Option<T>) -> Self
Sourcepub fn set_workflow_revision_id<T: Into<String>>(self, v: T) -> Self
pub fn set_workflow_revision_id<T: Into<String>>(self, v: T) -> Self
Sets the value of workflow_revision_id.
§Example
let x = Execution::new().set_workflow_revision_id("example");Sourcepub fn set_call_log_level<T: Into<CallLogLevel>>(self, v: T) -> Self
pub fn set_call_log_level<T: Into<CallLogLevel>>(self, v: T) -> Self
Sets the value of call_log_level.
§Example
use google_cloud_workflows_executions_v1::model::execution::CallLogLevel;
let x0 = Execution::new().set_call_log_level(CallLogLevel::LogAllCalls);
let x1 = Execution::new().set_call_log_level(CallLogLevel::LogErrorsOnly);
let x2 = Execution::new().set_call_log_level(CallLogLevel::LogNone);Sourcepub fn set_status<T>(self, v: T) -> Self
pub fn set_status<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_status<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_status<T>(self, v: Option<T>) -> Self
Sourcepub fn set_labels<T, K, V>(self, v: T) -> Self
pub fn set_labels<T, K, V>(self, v: T) -> Self
Sourcepub fn set_state_error<T>(self, v: T) -> Selfwhere
T: Into<StateError>,
pub fn set_state_error<T>(self, v: T) -> Selfwhere
T: Into<StateError>,
Sets the value of state_error.
§Example
use google_cloud_workflows_executions_v1::model::execution::StateError;
let x = Execution::new().set_state_error(StateError::default()/* use setters */);Sourcepub fn set_or_clear_state_error<T>(self, v: Option<T>) -> Selfwhere
T: Into<StateError>,
pub fn set_or_clear_state_error<T>(self, v: Option<T>) -> Selfwhere
T: Into<StateError>,
Sets or clears the value of state_error.
§Example
use google_cloud_workflows_executions_v1::model::execution::StateError;
let x = Execution::new().set_or_clear_state_error(Some(StateError::default()/* use setters */));
let x = Execution::new().set_or_clear_state_error(None::<StateError>);