Execution

Struct Execution 

Source
#[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
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§name: String

Output 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: State

Output only. Current state of the execution.

§argument: String

Input 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: String

Output 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: String

Output only. Revision of the workflow this execution is using.

§call_log_level: CallLogLevel

The 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

Source

pub fn new() -> Self

Source

pub fn set_name<T: Into<String>>(self, v: T) -> Self

Sets the value of name.

§Example
let x = Execution::new().set_name("example");
Source

pub fn set_start_time<T>(self, v: T) -> Self
where T: Into<Timestamp>,

Sets the value of start_time.

§Example
use wkt::Timestamp;
let x = Execution::new().set_start_time(Timestamp::default()/* use setters */);
Source

pub fn set_or_clear_start_time<T>(self, v: Option<T>) -> Self
where T: Into<Timestamp>,

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>);
Source

pub fn set_end_time<T>(self, v: T) -> Self
where T: Into<Timestamp>,

Sets the value of end_time.

§Example
use wkt::Timestamp;
let x = Execution::new().set_end_time(Timestamp::default()/* use setters */);
Source

pub fn set_or_clear_end_time<T>(self, v: Option<T>) -> Self
where T: Into<Timestamp>,

Sets or clears the value of end_time.

§Example
use wkt::Timestamp;
let x = Execution::new().set_or_clear_end_time(Some(Timestamp::default()/* use setters */));
let x = Execution::new().set_or_clear_end_time(None::<Timestamp>);
Source

pub fn set_duration<T>(self, v: T) -> Self
where T: Into<Duration>,

Sets the value of duration.

§Example
use wkt::Duration;
let x = Execution::new().set_duration(Duration::default()/* use setters */);
Source

pub fn set_or_clear_duration<T>(self, v: Option<T>) -> Self
where T: Into<Duration>,

Sets or clears the value of duration.

§Example
use wkt::Duration;
let x = Execution::new().set_or_clear_duration(Some(Duration::default()/* use setters */));
let x = Execution::new().set_or_clear_duration(None::<Duration>);
Source

pub fn set_state<T: Into<State>>(self, v: T) -> Self

Sets the value of state.

§Example
use google_cloud_workflows_executions_v1::model::execution::State;
let x0 = Execution::new().set_state(State::Active);
let x1 = Execution::new().set_state(State::Succeeded);
let x2 = Execution::new().set_state(State::Failed);
Source

pub fn set_argument<T: Into<String>>(self, v: T) -> Self

Sets the value of argument.

§Example
let x = Execution::new().set_argument("example");
Source

pub fn set_result<T: Into<String>>(self, v: T) -> Self

Sets the value of result.

§Example
let x = Execution::new().set_result("example");
Source

pub fn set_error<T>(self, v: T) -> Self
where T: Into<Error>,

Sets the value of error.

§Example
use google_cloud_workflows_executions_v1::model::execution::Error;
let x = Execution::new().set_error(Error::default()/* use setters */);
Source

pub fn set_or_clear_error<T>(self, v: Option<T>) -> Self
where T: Into<Error>,

Sets or clears the value of error.

§Example
use google_cloud_workflows_executions_v1::model::execution::Error;
let x = Execution::new().set_or_clear_error(Some(Error::default()/* use setters */));
let x = Execution::new().set_or_clear_error(None::<Error>);
Source

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");
Source

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);
Source

pub fn set_status<T>(self, v: T) -> Self
where T: Into<Status>,

Sets the value of status.

§Example
use google_cloud_workflows_executions_v1::model::execution::Status;
let x = Execution::new().set_status(Status::default()/* use setters */);
Source

pub fn set_or_clear_status<T>(self, v: Option<T>) -> Self
where T: Into<Status>,

Sets or clears the value of status.

§Example
use google_cloud_workflows_executions_v1::model::execution::Status;
let x = Execution::new().set_or_clear_status(Some(Status::default()/* use setters */));
let x = Execution::new().set_or_clear_status(None::<Status>);
Source

pub fn set_labels<T, K, V>(self, v: T) -> Self
where T: IntoIterator<Item = (K, V)>, K: Into<String>, V: Into<String>,

Sets the value of labels.

§Example
let x = Execution::new().set_labels([
    ("key0", "abc"),
    ("key1", "xyz"),
]);
Source

pub fn set_state_error<T>(self, v: T) -> Self
where 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 */);
Source

pub fn set_or_clear_state_error<T>(self, v: Option<T>) -> Self
where 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>);

Trait Implementations§

Source§

impl Clone for Execution

Source§

fn clone(&self) -> Execution

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Execution

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Execution

Source§

fn default() -> Execution

Returns the “default value” for a type. Read more
Source§

impl Message for Execution

Source§

fn typename() -> &'static str

The typename of this message.
Source§

impl PartialEq for Execution

Source§

fn eq(&self, other: &Execution) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for Execution

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,