#[non_exhaustive]pub struct Workflow {Show 19 fields
pub name: String,
pub description: String,
pub state: State,
pub revision_id: String,
pub create_time: Option<Timestamp>,
pub update_time: Option<Timestamp>,
pub revision_create_time: Option<Timestamp>,
pub labels: HashMap<String, String>,
pub service_account: String,
pub crypto_key_name: String,
pub state_error: Option<StateError>,
pub call_log_level: CallLogLevel,
pub user_env_vars: HashMap<String, String>,
pub execution_history_level: ExecutionHistoryLevel,
pub all_kms_keys: Vec<String>,
pub all_kms_keys_versions: Vec<String>,
pub crypto_key_version: String,
pub tags: HashMap<String, String>,
pub source_code: Option<SourceCode>,
/* private fields */
}Expand description
Workflow program to be executed by Workflows.
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: StringThe resource name of the workflow. Format: projects/{project}/locations/{location}/workflows/{workflow}. This is a workflow-wide field and is not tied to a specific revision.
description: StringDescription of the workflow provided by the user. Must be at most 1000 Unicode characters long. This is a workflow-wide field and is not tied to a specific revision.
state: StateOutput only. State of the workflow deployment.
revision_id: StringOutput only. The revision of the workflow. A new revision of a workflow is created as a result of updating the following properties of a workflow:
The format is “000001-a4d”, where the first six characters define the zero-padded revision ordinal number. They are followed by a hyphen and three hexadecimal random characters.
create_time: Option<Timestamp>Output only. The timestamp for when the workflow was created. This is a workflow-wide field and is not tied to a specific revision.
update_time: Option<Timestamp>Output only. The timestamp for when the workflow was last updated. This is a workflow-wide field and is not tied to a specific revision.
revision_create_time: Option<Timestamp>Output only. The timestamp for the latest revision of the workflow’s creation.
labels: HashMap<String, String>Labels associated with this workflow. 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. This is a workflow-wide field and is not tied to a specific revision.
service_account: StringThe service account associated with the latest workflow version. This service account represents the identity of the workflow and determines what permissions the workflow has. Format: projects/{project}/serviceAccounts/{account} or {account}
Using - as a wildcard for the {project} or not providing one at all
will infer the project from the account. The {account} value can be the
email address or the unique_id of the service account.
If not provided, workflow will use the project’s default service account. Modifying this field for an existing workflow results in a new workflow revision.
crypto_key_name: StringOptional. The resource name of a KMS crypto key used to encrypt or decrypt the data associated with the workflow.
Format: projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}
Using - as a wildcard for the {project} or not providing one at all
will infer the project from the account.
If not provided, data associated with the workflow will not be CMEK-encrypted.
state_error: Option<StateError>Output only. Error regarding the state of the workflow. For example, this field will have error details if the execution data is unavailable due to revoked KMS key permissions.
call_log_level: CallLogLevelOptional. Describes the level of platform logging to apply to calls and call responses during executions of this workflow. If both the workflow and the execution specify a logging level, the execution level takes precedence.
user_env_vars: HashMap<String, String>Optional. User-defined environment variables associated with this workflow revision. This map has a maximum length of 20. Each string can take up to 4KiB. Keys cannot be empty strings and cannot start with “GOOGLE” or “WORKFLOWS”.
execution_history_level: ExecutionHistoryLevelOptional. Describes the execution history level to apply to this workflow.
all_kms_keys: Vec<String>Output only. A list of all KMS crypto keys used to encrypt or decrypt the data associated with the workflow.
all_kms_keys_versions: Vec<String>Output only. A list of all KMS crypto key versions used to encrypt or decrypt the data associated with the workflow.
crypto_key_version: StringOutput only. The resource name of a KMS crypto key version used to encrypt or decrypt the data associated with the workflow.
Format: projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}/cryptoKeyVersions/{cryptoKeyVersion}
Optional. Input only. Immutable. Tags associated with this workflow.
source_code: Option<SourceCode>Required. Location of the workflow source code. Modifying this field for an existing workflow results in a new workflow revision.
Implementations§
Source§impl Workflow
impl Workflow
pub fn new() -> Self
Sourcepub fn set_description<T: Into<String>>(self, v: T) -> Self
pub fn set_description<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_revision_id<T: Into<String>>(self, v: T) -> Self
pub fn set_revision_id<T: Into<String>>(self, v: T) -> Self
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.
§Example
use wkt::Timestamp;
let x = Workflow::new().set_create_time(Timestamp::default()/* use setters */);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.
§Example
use wkt::Timestamp;
let x = Workflow::new().set_or_clear_create_time(Some(Timestamp::default()/* use setters */));
let x = Workflow::new().set_or_clear_create_time(None::<Timestamp>);Sourcepub fn set_update_time<T>(self, v: T) -> Self
pub fn set_update_time<T>(self, v: T) -> Self
Sets the value of update_time.
§Example
use wkt::Timestamp;
let x = Workflow::new().set_update_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_update_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of update_time.
§Example
use wkt::Timestamp;
let x = Workflow::new().set_or_clear_update_time(Some(Timestamp::default()/* use setters */));
let x = Workflow::new().set_or_clear_update_time(None::<Timestamp>);Sourcepub fn set_revision_create_time<T>(self, v: T) -> Self
pub fn set_revision_create_time<T>(self, v: T) -> Self
Sets the value of revision_create_time.
§Example
use wkt::Timestamp;
let x = Workflow::new().set_revision_create_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_revision_create_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_revision_create_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of revision_create_time.
§Example
use wkt::Timestamp;
let x = Workflow::new().set_or_clear_revision_create_time(Some(Timestamp::default()/* use setters */));
let x = Workflow::new().set_or_clear_revision_create_time(None::<Timestamp>);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_service_account<T: Into<String>>(self, v: T) -> Self
pub fn set_service_account<T: Into<String>>(self, v: T) -> Self
Sets the value of service_account.
§Example
let x = Workflow::new().set_service_account("example");Sourcepub fn set_crypto_key_name<T: Into<String>>(self, v: T) -> Self
pub fn set_crypto_key_name<T: Into<String>>(self, v: T) -> Self
Sets the value of crypto_key_name.
§Example
let x = Workflow::new().set_crypto_key_name("example");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_v1::model::workflow::StateError;
let x = Workflow::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_v1::model::workflow::StateError;
let x = Workflow::new().set_or_clear_state_error(Some(StateError::default()/* use setters */));
let x = Workflow::new().set_or_clear_state_error(None::<StateError>);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_v1::model::workflow::CallLogLevel;
let x0 = Workflow::new().set_call_log_level(CallLogLevel::LogAllCalls);
let x1 = Workflow::new().set_call_log_level(CallLogLevel::LogErrorsOnly);
let x2 = Workflow::new().set_call_log_level(CallLogLevel::LogNone);Sourcepub fn set_user_env_vars<T, K, V>(self, v: T) -> Self
pub fn set_user_env_vars<T, K, V>(self, v: T) -> Self
Sets the value of user_env_vars.
§Example
let x = Workflow::new().set_user_env_vars([
("key0", "abc"),
("key1", "xyz"),
]);Sourcepub fn set_execution_history_level<T: Into<ExecutionHistoryLevel>>(
self,
v: T,
) -> Self
pub fn set_execution_history_level<T: Into<ExecutionHistoryLevel>>( self, v: T, ) -> Self
Sets the value of execution_history_level.
§Example
use google_cloud_workflows_v1::model::ExecutionHistoryLevel;
let x0 = Workflow::new().set_execution_history_level(ExecutionHistoryLevel::ExecutionHistoryBasic);
let x1 = Workflow::new().set_execution_history_level(ExecutionHistoryLevel::ExecutionHistoryDetailed);Sourcepub fn set_all_kms_keys<T, V>(self, v: T) -> Self
pub fn set_all_kms_keys<T, V>(self, v: T) -> Self
Sets the value of all_kms_keys.
§Example
let x = Workflow::new().set_all_kms_keys(["a", "b", "c"]);Sourcepub fn set_all_kms_keys_versions<T, V>(self, v: T) -> Self
pub fn set_all_kms_keys_versions<T, V>(self, v: T) -> Self
Sets the value of all_kms_keys_versions.
§Example
let x = Workflow::new().set_all_kms_keys_versions(["a", "b", "c"]);Sourcepub fn set_crypto_key_version<T: Into<String>>(self, v: T) -> Self
pub fn set_crypto_key_version<T: Into<String>>(self, v: T) -> Self
Sets the value of crypto_key_version.
§Example
let x = Workflow::new().set_crypto_key_version("example");Sourcepub fn set_source_code<T: Into<Option<SourceCode>>>(self, v: T) -> Self
pub fn set_source_code<T: Into<Option<SourceCode>>>(self, v: T) -> Self
Sets the value of source_code.
Note that all the setters affecting source_code are mutually
exclusive.
§Example
use google_cloud_workflows_v1::model::workflow::SourceCode;
let x = Workflow::new().set_source_code(Some(SourceCode::SourceContents("example".to_string())));Sourcepub fn source_contents(&self) -> Option<&String>
pub fn source_contents(&self) -> Option<&String>
The value of source_code
if it holds a SourceContents, None if the field is not set or
holds a different branch.
Sourcepub fn set_source_contents<T: Into<String>>(self, v: T) -> Self
pub fn set_source_contents<T: Into<String>>(self, v: T) -> Self
Sets the value of source_code
to hold a SourceContents.
Note that all the setters affecting source_code are
mutually exclusive.
§Example
let x = Workflow::new().set_source_contents("example");
assert!(x.source_contents().is_some());