make regen-apis

This commit is contained in:
OMGeeky
2024-05-16 21:23:40 +02:00
parent 52d2e89e51
commit ad85cafeef
5108 changed files with 1615625 additions and 992044 deletions

View File

@@ -4,12 +4,12 @@
[package]
name = "google-workflowexecutions1"
version = "5.0.4+20240220"
version = "5.0.5+20240319"
authors = ["Sebastian Thiel <byronimo@gmail.com>"]
description = "A complete library to interact with Workflow Executions (protocol v1)"
repository = "https://github.com/Byron/google-apis-rs/tree/main/gen/workflowexecutions1"
homepage = "https://cloud.google.com/workflows"
documentation = "https://docs.rs/google-workflowexecutions1/5.0.4+20240220"
documentation = "https://docs.rs/google-workflowexecutions1/5.0.5+20240319"
license = "MIT"
keywords = ["workflowexecutions", "google", "protocol", "web", "api"]
autobins = false
@@ -18,12 +18,12 @@ edition = "2018"
[dependencies]
anyhow = "^ 1.0"
hyper-rustls = "0.24.0"
hyper-rustls = "0.25.0"
mime = "^ 0.3.0"
serde = { version = "^ 1.0", features = ["derive"] }
serde_json = "^ 1.0"
itertools = "^ 0.10"
google-apis-common = { path = "../../google-apis-common", version = "6.0" }
google-apis-common = { path = "../../google-apis-common", version = "6.0.3" }
hyper = "^ 0.14"
http = "^0.2"
tokio = "^1.0"

View File

@@ -6,7 +6,7 @@ DO NOT EDIT !
The MIT License (MIT)
=====================
Copyright © `2015-2020` `Sebastian Thiel`
Copyright 20152024 Sebastian Thiel
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation

View File

@@ -5,16 +5,16 @@ DO NOT EDIT !
-->
The `google-workflowexecutions1` library allows access to all features of the *Google Workflow Executions* service.
This documentation was generated from *Workflow Executions* crate version *5.0.4+20240220*, where *20240220* is the exact revision of the *workflowexecutions:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v5.0.4*.
This documentation was generated from *Workflow Executions* crate version *5.0.5+20240319*, where *20240319* is the exact revision of the *workflowexecutions:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v5.0.5*.
Everything else about the *Workflow Executions* *v1* API can be found at the
[official documentation site](https://cloud.google.com/workflows).
# Features
Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-workflowexecutions1/5.0.4+20240220/google_workflowexecutions1/WorkflowExecutions) ...
Handle the following *Resources* with ease from the central [hub](https://docs.rs/google-workflowexecutions1/5.0.5+20240319/google_workflowexecutions1/WorkflowExecutions) ...
* projects
* [*locations workflows executions callbacks list*](https://docs.rs/google-workflowexecutions1/5.0.4+20240220/google_workflowexecutions1/api::ProjectLocationWorkflowExecutionCallbackListCall), [*locations workflows executions cancel*](https://docs.rs/google-workflowexecutions1/5.0.4+20240220/google_workflowexecutions1/api::ProjectLocationWorkflowExecutionCancelCall), [*locations workflows executions create*](https://docs.rs/google-workflowexecutions1/5.0.4+20240220/google_workflowexecutions1/api::ProjectLocationWorkflowExecutionCreateCall), [*locations workflows executions export data*](https://docs.rs/google-workflowexecutions1/5.0.4+20240220/google_workflowexecutions1/api::ProjectLocationWorkflowExecutionExportDataCall), [*locations workflows executions get*](https://docs.rs/google-workflowexecutions1/5.0.4+20240220/google_workflowexecutions1/api::ProjectLocationWorkflowExecutionGetCall), [*locations workflows executions list*](https://docs.rs/google-workflowexecutions1/5.0.4+20240220/google_workflowexecutions1/api::ProjectLocationWorkflowExecutionListCall), [*locations workflows executions step entries get*](https://docs.rs/google-workflowexecutions1/5.0.4+20240220/google_workflowexecutions1/api::ProjectLocationWorkflowExecutionStepEntryGetCall), [*locations workflows executions step entries list*](https://docs.rs/google-workflowexecutions1/5.0.4+20240220/google_workflowexecutions1/api::ProjectLocationWorkflowExecutionStepEntryListCall) and [*locations workflows trigger pubsub execution*](https://docs.rs/google-workflowexecutions1/5.0.4+20240220/google_workflowexecutions1/api::ProjectLocationWorkflowTriggerPubsubExecutionCall)
* [*locations workflows executions callbacks list*](https://docs.rs/google-workflowexecutions1/5.0.5+20240319/google_workflowexecutions1/api::ProjectLocationWorkflowExecutionCallbackListCall), [*locations workflows executions cancel*](https://docs.rs/google-workflowexecutions1/5.0.5+20240319/google_workflowexecutions1/api::ProjectLocationWorkflowExecutionCancelCall), [*locations workflows executions create*](https://docs.rs/google-workflowexecutions1/5.0.5+20240319/google_workflowexecutions1/api::ProjectLocationWorkflowExecutionCreateCall), [*locations workflows executions export data*](https://docs.rs/google-workflowexecutions1/5.0.5+20240319/google_workflowexecutions1/api::ProjectLocationWorkflowExecutionExportDataCall), [*locations workflows executions get*](https://docs.rs/google-workflowexecutions1/5.0.5+20240319/google_workflowexecutions1/api::ProjectLocationWorkflowExecutionGetCall), [*locations workflows executions list*](https://docs.rs/google-workflowexecutions1/5.0.5+20240319/google_workflowexecutions1/api::ProjectLocationWorkflowExecutionListCall), [*locations workflows executions step entries get*](https://docs.rs/google-workflowexecutions1/5.0.5+20240319/google_workflowexecutions1/api::ProjectLocationWorkflowExecutionStepEntryGetCall), [*locations workflows executions step entries list*](https://docs.rs/google-workflowexecutions1/5.0.5+20240319/google_workflowexecutions1/api::ProjectLocationWorkflowExecutionStepEntryListCall) and [*locations workflows trigger pubsub execution*](https://docs.rs/google-workflowexecutions1/5.0.5+20240319/google_workflowexecutions1/api::ProjectLocationWorkflowTriggerPubsubExecutionCall)
@@ -23,17 +23,17 @@ Handle the following *Resources* with ease from the central [hub](https://docs.r
The API is structured into the following primary items:
* **[Hub](https://docs.rs/google-workflowexecutions1/5.0.4+20240220/google_workflowexecutions1/WorkflowExecutions)**
* **[Hub](https://docs.rs/google-workflowexecutions1/5.0.5+20240319/google_workflowexecutions1/WorkflowExecutions)**
* a central object to maintain state and allow accessing all *Activities*
* creates [*Method Builders*](https://docs.rs/google-workflowexecutions1/5.0.4+20240220/google_workflowexecutions1/client::MethodsBuilder) which in turn
allow access to individual [*Call Builders*](https://docs.rs/google-workflowexecutions1/5.0.4+20240220/google_workflowexecutions1/client::CallBuilder)
* **[Resources](https://docs.rs/google-workflowexecutions1/5.0.4+20240220/google_workflowexecutions1/client::Resource)**
* creates [*Method Builders*](https://docs.rs/google-workflowexecutions1/5.0.5+20240319/google_workflowexecutions1/client::MethodsBuilder) which in turn
allow access to individual [*Call Builders*](https://docs.rs/google-workflowexecutions1/5.0.5+20240319/google_workflowexecutions1/client::CallBuilder)
* **[Resources](https://docs.rs/google-workflowexecutions1/5.0.5+20240319/google_workflowexecutions1/client::Resource)**
* primary types that you can apply *Activities* to
* a collection of properties and *Parts*
* **[Parts](https://docs.rs/google-workflowexecutions1/5.0.4+20240220/google_workflowexecutions1/client::Part)**
* **[Parts](https://docs.rs/google-workflowexecutions1/5.0.5+20240319/google_workflowexecutions1/client::Part)**
* a collection of properties
* never directly used in *Activities*
* **[Activities](https://docs.rs/google-workflowexecutions1/5.0.4+20240220/google_workflowexecutions1/client::CallBuilder)**
* **[Activities](https://docs.rs/google-workflowexecutions1/5.0.5+20240319/google_workflowexecutions1/client::CallBuilder)**
* operations to apply to *Resources*
All *structures* are marked with applicable traits to further categorize them and ease browsing.
@@ -53,8 +53,8 @@ let r = hub.projects().locations_workflows_executions_get(...).doit().await
let r = hub.projects().locations_workflows_trigger_pubsub_execution(...).doit().await
```
The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities`
supports various methods to configure the impending operation (not shown here). It is made such that all required arguments have to be
The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities`
supports various methods to configure the impending operation (not shown here). It is made such that all required arguments have to be
specified right away (i.e. `(...)`), whereas all optional ones can be [build up][builder-pattern] as desired.
The `doit()` method performs the actual communication with the server and returns the respective result.
@@ -79,22 +79,23 @@ extern crate hyper_rustls;
extern crate google_workflowexecutions1 as workflowexecutions1;
use workflowexecutions1::api::CancelExecutionRequest;
use workflowexecutions1::{Result, Error};
use workflowexecutions1::api::enums::*;
use std::default::Default;
use workflowexecutions1::{WorkflowExecutions, oauth2, hyper, hyper_rustls, chrono, FieldMask};
// Get an ApplicationSecret instance by some means. It contains the `client_id` and
// Get an ApplicationSecret instance by some means. It contains the `client_id` and
// `client_secret`, among other things.
let secret: oauth2::ApplicationSecret = Default::default();
// Instantiate the authenticator. It will choose a suitable authentication flow for you,
// Instantiate the authenticator. It will choose a suitable authentication flow for you,
// unless you replace `None` with the desired Flow.
// Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about
// Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about
// what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and
// retrieve them from storage.
let auth = oauth2::InstalledFlowAuthenticator::builder(
secret,
oauth2::InstalledFlowReturnMethod::HTTPRedirect,
).build().await.unwrap();
let mut hub = WorkflowExecutions::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().https_or_http().enable_http1().build()), auth);
let mut hub = WorkflowExecutions::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().unwrap().https_or_http().enable_http1().build()), auth);
// As the method needs a request, you would usually fill it with the desired information
// into the respective structure. Some of the parts shown here might not be applicable !
// Values shown here are possibly random and not representative !
@@ -127,49 +128,49 @@ match result {
```
## Handling Errors
All errors produced by the system are provided either as [Result](https://docs.rs/google-workflowexecutions1/5.0.4+20240220/google_workflowexecutions1/client::Result) enumeration as return value of
the doit() methods, or handed as possibly intermediate results to either the
[Hub Delegate](https://docs.rs/google-workflowexecutions1/5.0.4+20240220/google_workflowexecutions1/client::Delegate), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html).
All errors produced by the system are provided either as [Result](https://docs.rs/google-workflowexecutions1/5.0.5+20240319/google_workflowexecutions1/client::Result) enumeration as return value of
the doit() methods, or handed as possibly intermediate results to either the
[Hub Delegate](https://docs.rs/google-workflowexecutions1/5.0.5+20240319/google_workflowexecutions1/client::Delegate), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html).
When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This
When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This
makes the system potentially resilient to all kinds of errors.
## Uploads and Downloads
If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-workflowexecutions1/5.0.4+20240220/google_workflowexecutions1/client::Result), should be
If a method supports downloads, the response body, which is part of the [Result](https://docs.rs/google-workflowexecutions1/5.0.5+20240319/google_workflowexecutions1/client::Result), should be
read by you to obtain the media.
If such a method also supports a [Response Result](https://docs.rs/google-workflowexecutions1/5.0.4+20240220/google_workflowexecutions1/client::ResponseResult), it will return that by default.
If such a method also supports a [Response Result](https://docs.rs/google-workflowexecutions1/5.0.5+20240319/google_workflowexecutions1/client::ResponseResult), it will return that by default.
You can see it as meta-data for the actual media. To trigger a media download, you will have to set up the builder by making
this call: `.param("alt", "media")`.
Methods supporting uploads can do so using up to 2 different protocols:
*simple* and *resumable*. The distinctiveness of each is represented by customized
Methods supporting uploads can do so using up to 2 different protocols:
*simple* and *resumable*. The distinctiveness of each is represented by customized
`doit(...)` methods, which are then named `upload(...)` and `upload_resumable(...)` respectively.
## Customization and Callbacks
You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-workflowexecutions1/5.0.4+20240220/google_workflowexecutions1/client::Delegate) to the
[Method Builder](https://docs.rs/google-workflowexecutions1/5.0.4+20240220/google_workflowexecutions1/client::CallBuilder) before making the final `doit()` call.
Respective methods will be called to provide progress information, as well as determine whether the system should
You may alter the way an `doit()` method is called by providing a [delegate](https://docs.rs/google-workflowexecutions1/5.0.5+20240319/google_workflowexecutions1/client::Delegate) to the
[Method Builder](https://docs.rs/google-workflowexecutions1/5.0.5+20240319/google_workflowexecutions1/client::CallBuilder) before making the final `doit()` call.
Respective methods will be called to provide progress information, as well as determine whether the system should
retry on failure.
The [delegate trait](https://docs.rs/google-workflowexecutions1/5.0.4+20240220/google_workflowexecutions1/client::Delegate) is default-implemented, allowing you to customize it with minimal effort.
The [delegate trait](https://docs.rs/google-workflowexecutions1/5.0.5+20240319/google_workflowexecutions1/client::Delegate) is default-implemented, allowing you to customize it with minimal effort.
## Optional Parts in Server-Requests
All structures provided by this library are made to be [encodable](https://docs.rs/google-workflowexecutions1/5.0.4+20240220/google_workflowexecutions1/client::RequestValue) and
[decodable](https://docs.rs/google-workflowexecutions1/5.0.4+20240220/google_workflowexecutions1/client::ResponseResult) via *json*. Optionals are used to indicate that partial requests are responses
All structures provided by this library are made to be [encodable](https://docs.rs/google-workflowexecutions1/5.0.5+20240319/google_workflowexecutions1/client::RequestValue) and
[decodable](https://docs.rs/google-workflowexecutions1/5.0.5+20240319/google_workflowexecutions1/client::ResponseResult) via *json*. Optionals are used to indicate that partial requests are responses
are valid.
Most optionals are are considered [Parts](https://docs.rs/google-workflowexecutions1/5.0.4+20240220/google_workflowexecutions1/client::Part) which are identifiable by name, which will be sent to
Most optionals are are considered [Parts](https://docs.rs/google-workflowexecutions1/5.0.5+20240319/google_workflowexecutions1/client::Part) which are identifiable by name, which will be sent to
the server to indicate either the set parts of the request or the desired parts in the response.
## Builder Arguments
Using [method builders](https://docs.rs/google-workflowexecutions1/5.0.4+20240220/google_workflowexecutions1/client::CallBuilder), you are able to prepare an action call by repeatedly calling it's methods.
Using [method builders](https://docs.rs/google-workflowexecutions1/5.0.5+20240319/google_workflowexecutions1/client::CallBuilder), you are able to prepare an action call by repeatedly calling it's methods.
These will always take a single argument, for which the following statements are true.
* [PODs][wiki-pod] are handed by copy
* strings are passed as `&str`
* [request values](https://docs.rs/google-workflowexecutions1/5.0.4+20240220/google_workflowexecutions1/client::RequestValue) are moved
* [request values](https://docs.rs/google-workflowexecutions1/5.0.5+20240319/google_workflowexecutions1/client::RequestValue) are moved
Arguments will always be copied or cloned into the builder, to make them independent of their original life times.
@@ -178,7 +179,7 @@ Arguments will always be copied or cloned into the builder, to make them indepen
[google-go-api]: https://github.com/google/google-api-go-client
# License
The **workflowexecutions1** library was generated by Sebastian Thiel, and is placed
The **workflowexecutions1** library was generated by Sebastian Thiel, and is placed
under the *MIT* license.
You can read the full text at the repository's [license file][repo-license].

View File

@@ -0,0 +1,642 @@
use super::*;
// region ExecutionCallLogLevelEnum
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
/// The call logging level associated to this execution.
pub enum ExecutionCallLogLevelEnum {
/// No call logging level specified.
///
/// "CALL_LOG_LEVEL_UNSPECIFIED"
#[serde(rename="CALL_LOG_LEVEL_UNSPECIFIED")]
CALLLOGLEVELUNSPECIFIED,
/// Log all call steps within workflows, all call returns, and all exceptions raised.
///
/// "LOG_ALL_CALLS"
#[serde(rename="LOG_ALL_CALLS")]
LOGALLCALLS,
/// Log only exceptions that are raised from call steps within workflows.
///
/// "LOG_ERRORS_ONLY"
#[serde(rename="LOG_ERRORS_ONLY")]
LOGERRORSONLY,
/// Explicitly log nothing.
///
/// "LOG_NONE"
#[serde(rename="LOG_NONE")]
LOGNONE,
}
impl AsRef<str> for ExecutionCallLogLevelEnum {
fn as_ref(&self) -> &str {
match *self {
ExecutionCallLogLevelEnum::CALLLOGLEVELUNSPECIFIED => "CALL_LOG_LEVEL_UNSPECIFIED",
ExecutionCallLogLevelEnum::LOGALLCALLS => "LOG_ALL_CALLS",
ExecutionCallLogLevelEnum::LOGERRORSONLY => "LOG_ERRORS_ONLY",
ExecutionCallLogLevelEnum::LOGNONE => "LOG_NONE",
}
}
}
impl std::convert::TryFrom< &str> for ExecutionCallLogLevelEnum {
type Error = ();
fn try_from(value: &str) -> Result<Self, Self::Error> {
match value {
"CALL_LOG_LEVEL_UNSPECIFIED" => Ok(ExecutionCallLogLevelEnum::CALLLOGLEVELUNSPECIFIED),
"LOG_ALL_CALLS" => Ok(ExecutionCallLogLevelEnum::LOGALLCALLS),
"LOG_ERRORS_ONLY" => Ok(ExecutionCallLogLevelEnum::LOGERRORSONLY),
"LOG_NONE" => Ok(ExecutionCallLogLevelEnum::LOGNONE),
_=> Err(()),
}
}
}
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a ExecutionCallLogLevelEnum {
fn into(self) -> std::borrow::Cow<'a, str> {
self.as_ref().into()
}
}
// endregion
// region ExecutionStateEnum
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
/// Output only. Current state of the execution.
pub enum ExecutionStateEnum {
/// Invalid state.
///
/// "STATE_UNSPECIFIED"
#[serde(rename="STATE_UNSPECIFIED")]
STATEUNSPECIFIED,
/// The execution is in progress.
///
/// "ACTIVE"
#[serde(rename="ACTIVE")]
ACTIVE,
/// The execution finished successfully.
///
/// "SUCCEEDED"
#[serde(rename="SUCCEEDED")]
SUCCEEDED,
/// The execution failed with an error.
///
/// "FAILED"
#[serde(rename="FAILED")]
FAILED,
/// The execution was stopped intentionally.
///
/// "CANCELLED"
#[serde(rename="CANCELLED")]
CANCELLED,
/// Execution data is unavailable. See the `state_error` field.
///
/// "UNAVAILABLE"
#[serde(rename="UNAVAILABLE")]
UNAVAILABLE,
/// Request has been placed in the backlog for processing at a later time.
///
/// "QUEUED"
#[serde(rename="QUEUED")]
QUEUED,
}
impl AsRef<str> for ExecutionStateEnum {
fn as_ref(&self) -> &str {
match *self {
ExecutionStateEnum::STATEUNSPECIFIED => "STATE_UNSPECIFIED",
ExecutionStateEnum::ACTIVE => "ACTIVE",
ExecutionStateEnum::SUCCEEDED => "SUCCEEDED",
ExecutionStateEnum::FAILED => "FAILED",
ExecutionStateEnum::CANCELLED => "CANCELLED",
ExecutionStateEnum::UNAVAILABLE => "UNAVAILABLE",
ExecutionStateEnum::QUEUED => "QUEUED",
}
}
}
impl std::convert::TryFrom< &str> for ExecutionStateEnum {
type Error = ();
fn try_from(value: &str) -> Result<Self, Self::Error> {
match value {
"STATE_UNSPECIFIED" => Ok(ExecutionStateEnum::STATEUNSPECIFIED),
"ACTIVE" => Ok(ExecutionStateEnum::ACTIVE),
"SUCCEEDED" => Ok(ExecutionStateEnum::SUCCEEDED),
"FAILED" => Ok(ExecutionStateEnum::FAILED),
"CANCELLED" => Ok(ExecutionStateEnum::CANCELLED),
"UNAVAILABLE" => Ok(ExecutionStateEnum::UNAVAILABLE),
"QUEUED" => Ok(ExecutionStateEnum::QUEUED),
_=> Err(()),
}
}
}
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a ExecutionStateEnum {
fn into(self) -> std::borrow::Cow<'a, str> {
self.as_ref().into()
}
}
// endregion
// region StateErrorTypeEnum
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
/// The type of this state error.
pub enum StateErrorTypeEnum {
/// No type specified.
///
/// "TYPE_UNSPECIFIED"
#[serde(rename="TYPE_UNSPECIFIED")]
TYPEUNSPECIFIED,
/// Caused by an issue with KMS.
///
/// "KMS_ERROR"
#[serde(rename="KMS_ERROR")]
KMSERROR,
}
impl AsRef<str> for StateErrorTypeEnum {
fn as_ref(&self) -> &str {
match *self {
StateErrorTypeEnum::TYPEUNSPECIFIED => "TYPE_UNSPECIFIED",
StateErrorTypeEnum::KMSERROR => "KMS_ERROR",
}
}
}
impl std::convert::TryFrom< &str> for StateErrorTypeEnum {
type Error = ();
fn try_from(value: &str) -> Result<Self, Self::Error> {
match value {
"TYPE_UNSPECIFIED" => Ok(StateErrorTypeEnum::TYPEUNSPECIFIED),
"KMS_ERROR" => Ok(StateErrorTypeEnum::KMSERROR),
_=> Err(()),
}
}
}
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a StateErrorTypeEnum {
fn into(self) -> std::borrow::Cow<'a, str> {
self.as_ref().into()
}
}
// endregion
// region StepEntryStateEnum
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
/// Output only. The state of the step entry.
pub enum StepEntryStateEnum {
/// Invalid state.
///
/// "STATE_UNSPECIFIED"
#[serde(rename="STATE_UNSPECIFIED")]
STATEUNSPECIFIED,
/// The step entry is in progress.
///
/// "STATE_IN_PROGRESS"
#[serde(rename="STATE_IN_PROGRESS")]
STATEINPROGRESS,
/// The step entry finished successfully.
///
/// "STATE_SUCCEEDED"
#[serde(rename="STATE_SUCCEEDED")]
STATESUCCEEDED,
/// The step entry failed with an error.
///
/// "STATE_FAILED"
#[serde(rename="STATE_FAILED")]
STATEFAILED,
}
impl AsRef<str> for StepEntryStateEnum {
fn as_ref(&self) -> &str {
match *self {
StepEntryStateEnum::STATEUNSPECIFIED => "STATE_UNSPECIFIED",
StepEntryStateEnum::STATEINPROGRESS => "STATE_IN_PROGRESS",
StepEntryStateEnum::STATESUCCEEDED => "STATE_SUCCEEDED",
StepEntryStateEnum::STATEFAILED => "STATE_FAILED",
}
}
}
impl std::convert::TryFrom< &str> for StepEntryStateEnum {
type Error = ();
fn try_from(value: &str) -> Result<Self, Self::Error> {
match value {
"STATE_UNSPECIFIED" => Ok(StepEntryStateEnum::STATEUNSPECIFIED),
"STATE_IN_PROGRESS" => Ok(StepEntryStateEnum::STATEINPROGRESS),
"STATE_SUCCEEDED" => Ok(StepEntryStateEnum::STATESUCCEEDED),
"STATE_FAILED" => Ok(StepEntryStateEnum::STATEFAILED),
_=> Err(()),
}
}
}
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a StepEntryStateEnum {
fn into(self) -> std::borrow::Cow<'a, str> {
self.as_ref().into()
}
}
// endregion
// region StepEntryStepTypeEnum
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
/// Output only. The type of the step this step entry belongs to.
pub enum StepEntryStepTypeEnum {
/// Invalid step type.
///
/// "STEP_TYPE_UNSPECIFIED"
#[serde(rename="STEP_TYPE_UNSPECIFIED")]
STEPTYPEUNSPECIFIED,
/// The step entry assigns new variable(s).
///
/// "STEP_ASSIGN"
#[serde(rename="STEP_ASSIGN")]
STEPASSIGN,
/// The step entry calls a standard library routine.
///
/// "STEP_STD_LIB_CALL"
#[serde(rename="STEP_STD_LIB_CALL")]
STEPSTDLIBCALL,
/// The step entry calls a connector.
///
/// "STEP_CONNECTOR_CALL"
#[serde(rename="STEP_CONNECTOR_CALL")]
STEPCONNECTORCALL,
/// The step entry calls a subworklfow.
///
/// "STEP_SUBWORKFLOW_CALL"
#[serde(rename="STEP_SUBWORKFLOW_CALL")]
STEPSUBWORKFLOWCALL,
/// The step entry calls a subworkflow/stdlib.
///
/// "STEP_CALL"
#[serde(rename="STEP_CALL")]
STEPCALL,
/// The step entry executes a switch-case block.
///
/// "STEP_SWITCH"
#[serde(rename="STEP_SWITCH")]
STEPSWITCH,
/// The step entry executes a condition inside a switch.
///
/// "STEP_CONDITION"
#[serde(rename="STEP_CONDITION")]
STEPCONDITION,
/// The step entry executes a for loop.
///
/// "STEP_FOR"
#[serde(rename="STEP_FOR")]
STEPFOR,
/// The step entry executes a iteration of a for loop.
///
/// "STEP_FOR_ITERATION"
#[serde(rename="STEP_FOR_ITERATION")]
STEPFORITERATION,
/// The step entry executes a parallel for loop.
///
/// "STEP_PARALLEL_FOR"
#[serde(rename="STEP_PARALLEL_FOR")]
STEPPARALLELFOR,
/// The step entry executes a series of parallel branch(es).
///
/// "STEP_PARALLEL_BRANCH"
#[serde(rename="STEP_PARALLEL_BRANCH")]
STEPPARALLELBRANCH,
/// The step entry executes a branch of a parallel branch.
///
/// "STEP_PARALLEL_BRANCH_ENTRY"
#[serde(rename="STEP_PARALLEL_BRANCH_ENTRY")]
STEPPARALLELBRANCHENTRY,
/// The step entry executes a try/retry/except block.
///
/// "STEP_TRY_RETRY_EXCEPT"
#[serde(rename="STEP_TRY_RETRY_EXCEPT")]
STEPTRYRETRYEXCEPT,
/// The step entry executes the try part of a try/retry/except block.
///
/// "STEP_TRY"
#[serde(rename="STEP_TRY")]
STEPTRY,
/// The step entry executes the retry part of a try/retry/except block.
///
/// "STEP_RETRY"
#[serde(rename="STEP_RETRY")]
STEPRETRY,
/// The step entry executes the except part of a try/retry/except block.
///
/// "STEP_EXCEPT"
#[serde(rename="STEP_EXCEPT")]
STEPEXCEPT,
/// The step entry returns.
///
/// "STEP_RETURN"
#[serde(rename="STEP_RETURN")]
STEPRETURN,
/// The step entry raises an error.
///
/// "STEP_RAISE"
#[serde(rename="STEP_RAISE")]
STEPRAISE,
/// The step entry jumps to another step.
///
/// "STEP_GOTO"
#[serde(rename="STEP_GOTO")]
STEPGOTO,
}
impl AsRef<str> for StepEntryStepTypeEnum {
fn as_ref(&self) -> &str {
match *self {
StepEntryStepTypeEnum::STEPTYPEUNSPECIFIED => "STEP_TYPE_UNSPECIFIED",
StepEntryStepTypeEnum::STEPASSIGN => "STEP_ASSIGN",
StepEntryStepTypeEnum::STEPSTDLIBCALL => "STEP_STD_LIB_CALL",
StepEntryStepTypeEnum::STEPCONNECTORCALL => "STEP_CONNECTOR_CALL",
StepEntryStepTypeEnum::STEPSUBWORKFLOWCALL => "STEP_SUBWORKFLOW_CALL",
StepEntryStepTypeEnum::STEPCALL => "STEP_CALL",
StepEntryStepTypeEnum::STEPSWITCH => "STEP_SWITCH",
StepEntryStepTypeEnum::STEPCONDITION => "STEP_CONDITION",
StepEntryStepTypeEnum::STEPFOR => "STEP_FOR",
StepEntryStepTypeEnum::STEPFORITERATION => "STEP_FOR_ITERATION",
StepEntryStepTypeEnum::STEPPARALLELFOR => "STEP_PARALLEL_FOR",
StepEntryStepTypeEnum::STEPPARALLELBRANCH => "STEP_PARALLEL_BRANCH",
StepEntryStepTypeEnum::STEPPARALLELBRANCHENTRY => "STEP_PARALLEL_BRANCH_ENTRY",
StepEntryStepTypeEnum::STEPTRYRETRYEXCEPT => "STEP_TRY_RETRY_EXCEPT",
StepEntryStepTypeEnum::STEPTRY => "STEP_TRY",
StepEntryStepTypeEnum::STEPRETRY => "STEP_RETRY",
StepEntryStepTypeEnum::STEPEXCEPT => "STEP_EXCEPT",
StepEntryStepTypeEnum::STEPRETURN => "STEP_RETURN",
StepEntryStepTypeEnum::STEPRAISE => "STEP_RAISE",
StepEntryStepTypeEnum::STEPGOTO => "STEP_GOTO",
}
}
}
impl std::convert::TryFrom< &str> for StepEntryStepTypeEnum {
type Error = ();
fn try_from(value: &str) -> Result<Self, Self::Error> {
match value {
"STEP_TYPE_UNSPECIFIED" => Ok(StepEntryStepTypeEnum::STEPTYPEUNSPECIFIED),
"STEP_ASSIGN" => Ok(StepEntryStepTypeEnum::STEPASSIGN),
"STEP_STD_LIB_CALL" => Ok(StepEntryStepTypeEnum::STEPSTDLIBCALL),
"STEP_CONNECTOR_CALL" => Ok(StepEntryStepTypeEnum::STEPCONNECTORCALL),
"STEP_SUBWORKFLOW_CALL" => Ok(StepEntryStepTypeEnum::STEPSUBWORKFLOWCALL),
"STEP_CALL" => Ok(StepEntryStepTypeEnum::STEPCALL),
"STEP_SWITCH" => Ok(StepEntryStepTypeEnum::STEPSWITCH),
"STEP_CONDITION" => Ok(StepEntryStepTypeEnum::STEPCONDITION),
"STEP_FOR" => Ok(StepEntryStepTypeEnum::STEPFOR),
"STEP_FOR_ITERATION" => Ok(StepEntryStepTypeEnum::STEPFORITERATION),
"STEP_PARALLEL_FOR" => Ok(StepEntryStepTypeEnum::STEPPARALLELFOR),
"STEP_PARALLEL_BRANCH" => Ok(StepEntryStepTypeEnum::STEPPARALLELBRANCH),
"STEP_PARALLEL_BRANCH_ENTRY" => Ok(StepEntryStepTypeEnum::STEPPARALLELBRANCHENTRY),
"STEP_TRY_RETRY_EXCEPT" => Ok(StepEntryStepTypeEnum::STEPTRYRETRYEXCEPT),
"STEP_TRY" => Ok(StepEntryStepTypeEnum::STEPTRY),
"STEP_RETRY" => Ok(StepEntryStepTypeEnum::STEPRETRY),
"STEP_EXCEPT" => Ok(StepEntryStepTypeEnum::STEPEXCEPT),
"STEP_RETURN" => Ok(StepEntryStepTypeEnum::STEPRETURN),
"STEP_RAISE" => Ok(StepEntryStepTypeEnum::STEPRAISE),
"STEP_GOTO" => Ok(StepEntryStepTypeEnum::STEPGOTO),
_=> Err(()),
}
}
}
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a StepEntryStepTypeEnum {
fn into(self) -> std::borrow::Cow<'a, str> {
self.as_ref().into()
}
}
// endregion
// region StepEntryMetadataProgressTypeEnum
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
/// Progress type of this step entry.
pub enum StepEntryMetadataProgressTypeEnum {
/// Current step entry does not have any progress data.
///
/// "PROGRESS_TYPE_UNSPECIFIED"
#[serde(rename="PROGRESS_TYPE_UNSPECIFIED")]
PROGRESSTYPEUNSPECIFIED,
/// Current step entry is in progress of a FOR step.
///
/// "PROGRESS_TYPE_FOR"
#[serde(rename="PROGRESS_TYPE_FOR")]
PROGRESSTYPEFOR,
/// Current step entry is in progress of a SWITCH step.
///
/// "PROGRESS_TYPE_SWITCH"
#[serde(rename="PROGRESS_TYPE_SWITCH")]
PROGRESSTYPESWITCH,
/// Current step entry is in progress of a RETRY step.
///
/// "PROGRESS_TYPE_RETRY"
#[serde(rename="PROGRESS_TYPE_RETRY")]
PROGRESSTYPERETRY,
/// Current step entry is in progress of a PARALLEL FOR step.
///
/// "PROGRESS_TYPE_PARALLEL_FOR"
#[serde(rename="PROGRESS_TYPE_PARALLEL_FOR")]
PROGRESSTYPEPARALLELFOR,
/// Current step entry is in progress of a PARALLEL BRANCH step.
///
/// "PROGRESS_TYPE_PARALLEL_BRANCH"
#[serde(rename="PROGRESS_TYPE_PARALLEL_BRANCH")]
PROGRESSTYPEPARALLELBRANCH,
}
impl AsRef<str> for StepEntryMetadataProgressTypeEnum {
fn as_ref(&self) -> &str {
match *self {
StepEntryMetadataProgressTypeEnum::PROGRESSTYPEUNSPECIFIED => "PROGRESS_TYPE_UNSPECIFIED",
StepEntryMetadataProgressTypeEnum::PROGRESSTYPEFOR => "PROGRESS_TYPE_FOR",
StepEntryMetadataProgressTypeEnum::PROGRESSTYPESWITCH => "PROGRESS_TYPE_SWITCH",
StepEntryMetadataProgressTypeEnum::PROGRESSTYPERETRY => "PROGRESS_TYPE_RETRY",
StepEntryMetadataProgressTypeEnum::PROGRESSTYPEPARALLELFOR => "PROGRESS_TYPE_PARALLEL_FOR",
StepEntryMetadataProgressTypeEnum::PROGRESSTYPEPARALLELBRANCH => "PROGRESS_TYPE_PARALLEL_BRANCH",
}
}
}
impl std::convert::TryFrom< &str> for StepEntryMetadataProgressTypeEnum {
type Error = ();
fn try_from(value: &str) -> Result<Self, Self::Error> {
match value {
"PROGRESS_TYPE_UNSPECIFIED" => Ok(StepEntryMetadataProgressTypeEnum::PROGRESSTYPEUNSPECIFIED),
"PROGRESS_TYPE_FOR" => Ok(StepEntryMetadataProgressTypeEnum::PROGRESSTYPEFOR),
"PROGRESS_TYPE_SWITCH" => Ok(StepEntryMetadataProgressTypeEnum::PROGRESSTYPESWITCH),
"PROGRESS_TYPE_RETRY" => Ok(StepEntryMetadataProgressTypeEnum::PROGRESSTYPERETRY),
"PROGRESS_TYPE_PARALLEL_FOR" => Ok(StepEntryMetadataProgressTypeEnum::PROGRESSTYPEPARALLELFOR),
"PROGRESS_TYPE_PARALLEL_BRANCH" => Ok(StepEntryMetadataProgressTypeEnum::PROGRESSTYPEPARALLELBRANCH),
_=> Err(()),
}
}
}
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a StepEntryMetadataProgressTypeEnum {
fn into(self) -> std::borrow::Cow<'a, str> {
self.as_ref().into()
}
}
// endregion
// region ProjectViewEnum
#[derive(Clone, Copy, Eq, Hash, Debug, PartialEq, Serialize, Deserialize)]
/// Optional. A view defining which fields should be filled in the returned executions. The API will default to the BASIC view.
pub enum ProjectViewEnum {
/// The default / unset value.
///
/// "EXECUTION_VIEW_UNSPECIFIED"
#[serde(rename="EXECUTION_VIEW_UNSPECIFIED")]
EXECUTIONVIEWUNSPECIFIED,
/// Includes only basic metadata about the execution. The following fields are returned: name, start_time, end_time, duration, state, and workflow_revision_id.
///
/// "BASIC"
#[serde(rename="BASIC")]
BASIC,
/// Includes all data.
///
/// "FULL"
#[serde(rename="FULL")]
FULL,
}
impl AsRef<str> for ProjectViewEnum {
fn as_ref(&self) -> &str {
match *self {
ProjectViewEnum::EXECUTIONVIEWUNSPECIFIED => "EXECUTION_VIEW_UNSPECIFIED",
ProjectViewEnum::BASIC => "BASIC",
ProjectViewEnum::FULL => "FULL",
}
}
}
impl std::convert::TryFrom< &str> for ProjectViewEnum {
type Error = ();
fn try_from(value: &str) -> Result<Self, Self::Error> {
match value {
"EXECUTION_VIEW_UNSPECIFIED" => Ok(ProjectViewEnum::EXECUTIONVIEWUNSPECIFIED),
"BASIC" => Ok(ProjectViewEnum::BASIC),
"FULL" => Ok(ProjectViewEnum::FULL),
_=> Err(()),
}
}
}
impl<'a> Into<std::borrow::Cow<'a, str>> for &'a ProjectViewEnum {
fn into(self) -> std::borrow::Cow<'a, str> {
self.as_ref().into()
}
}
// endregion

View File

@@ -0,0 +1,113 @@
use super::*;
/// Central instance to access all WorkflowExecutions related resource activities
///
/// # Examples
///
/// Instantiate a new hub
///
/// ```test_harness,no_run
/// extern crate hyper;
/// extern crate hyper_rustls;
/// extern crate google_workflowexecutions1 as workflowexecutions1;
/// use workflowexecutions1::api::CancelExecutionRequest;
/// use workflowexecutions1::{Result, Error};
/// use workflowexecutions1::api::enums::*;
/// # async fn dox() {
/// use std::default::Default;
/// use workflowexecutions1::{WorkflowExecutions, oauth2, hyper, hyper_rustls, chrono, FieldMask};
///
/// // Get an ApplicationSecret instance by some means. It contains the `client_id` and
/// // `client_secret`, among other things.
/// let secret: oauth2::ApplicationSecret = Default::default();
/// // Instantiate the authenticator. It will choose a suitable authentication flow for you,
/// // unless you replace `None` with the desired Flow.
/// // Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about
/// // what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and
/// // retrieve them from storage.
/// let auth = oauth2::InstalledFlowAuthenticator::builder(
/// secret,
/// oauth2::InstalledFlowReturnMethod::HTTPRedirect,
/// ).build().await.unwrap();
/// let mut hub = WorkflowExecutions::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().unwrap().https_or_http().enable_http1().build()), auth);
/// // As the method needs a request, you would usually fill it with the desired information
/// // into the respective structure. Some of the parts shown here might not be applicable !
/// // Values shown here are possibly random and not representative !
/// let mut req = CancelExecutionRequest::default();
///
/// // You can configure optional parameters by calling the respective setters at will, and
/// // execute the final call using `doit()`.
/// // Values shown here are possibly random and not representative !
/// let result = hub.projects().locations_workflows_executions_cancel(req, "name")
/// .doit().await;
///
/// match result {
/// Err(e) => match e {
/// // The Error enum provides details about what exactly happened.
/// // You can also just use its `Debug`, `Display` or `Error` traits
/// Error::HttpError(_)
/// |Error::Io(_)
/// |Error::MissingAPIKey
/// |Error::MissingToken(_)
/// |Error::Cancelled
/// |Error::UploadSizeLimitExceeded(_, _)
/// |Error::Failure(_)
/// |Error::BadRequest(_)
/// |Error::FieldClash(_)
/// |Error::JsonDecodeError(_, _) => println!("{}", e),
/// },
/// Ok(res) => println!("Success: {:?}", res),
/// }
/// # }
/// ```
#[derive(Clone)]
pub struct WorkflowExecutions<S> {
pub client: hyper::Client<S, hyper::body::Body>,
pub auth: Box<dyn client::GetToken>,
pub(super) _user_agent: String,
pub(super) _base_url: String,
pub(super) _root_url: String,
}
impl<'a, S> client::Hub for WorkflowExecutions<S> {}
impl<'a, S> WorkflowExecutions<S> {
pub fn new<A: 'static + client::GetToken>(client: hyper::Client<S, hyper::body::Body>, auth: A) -> WorkflowExecutions<S> {
WorkflowExecutions {
client,
auth: Box::new(auth),
_user_agent: "google-api-rust-client/5.0.5".to_string(),
_base_url: "https://workflowexecutions.googleapis.com/".to_string(),
_root_url: "https://workflowexecutions.googleapis.com/".to_string(),
}
}
pub fn projects(&'a self) -> ProjectMethods<'a, S> {
ProjectMethods { hub: &self }
}
/// Set the user-agent header field to use in all requests to the server.
/// It defaults to `google-api-rust-client/5.0.5`.
///
/// Returns the previously set user-agent.
pub fn user_agent(&mut self, agent_name: String) -> String {
mem::replace(&mut self._user_agent, agent_name)
}
/// Set the base url to use in all requests to the server.
/// It defaults to `https://workflowexecutions.googleapis.com/`.
///
/// Returns the previously set base url.
pub fn base_url(&mut self, new_base_url: String) -> String {
mem::replace(&mut self._base_url, new_base_url)
}
/// Set the root url to use in all requests to the server.
/// It defaults to `https://workflowexecutions.googleapis.com/`.
///
/// Returns the previously set root url.
pub fn root_url(&mut self, new_root_url: String) -> String {
mem::replace(&mut self._root_url, new_root_url)
}
}

View File

@@ -0,0 +1,214 @@
use super::*;
/// A builder providing access to all methods supported on *project* resources.
/// It is not used directly, but through the [`WorkflowExecutions`] hub.
///
/// # Example
///
/// Instantiate a resource builder
///
/// ```test_harness,no_run
/// extern crate hyper;
/// extern crate hyper_rustls;
/// extern crate google_workflowexecutions1 as workflowexecutions1;
///
/// # async fn dox() {
/// use std::default::Default;
/// use workflowexecutions1::{WorkflowExecutions, oauth2, hyper, hyper_rustls, chrono, FieldMask};
///
/// let secret: oauth2::ApplicationSecret = Default::default();
/// let auth = oauth2::InstalledFlowAuthenticator::builder(
/// secret,
/// oauth2::InstalledFlowReturnMethod::HTTPRedirect,
/// ).build().await.unwrap();
/// let mut hub = WorkflowExecutions::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().unwrap().https_or_http().enable_http1().build()), auth);
/// // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
/// // like `locations_workflows_executions_callbacks_list(...)`, `locations_workflows_executions_cancel(...)`, `locations_workflows_executions_create(...)`, `locations_workflows_executions_export_data(...)`, `locations_workflows_executions_get(...)`, `locations_workflows_executions_list(...)`, `locations_workflows_executions_step_entries_get(...)`, `locations_workflows_executions_step_entries_list(...)` and `locations_workflows_trigger_pubsub_execution(...)`
/// // to build up your call.
/// let rb = hub.projects();
/// # }
/// ```
pub struct ProjectMethods<'a, S>
where S: 'a {
pub(super) hub: &'a WorkflowExecutions<S>,
}
impl<'a, S> client::MethodsBuilder for ProjectMethods<'a, S> {}
impl<'a, S> ProjectMethods<'a, S> {
/// Create a builder to help you perform the following task:
///
/// Returns a list of active callbacks that belong to the execution with the given name. The returned callbacks are ordered by callback ID.
///
/// # Arguments
///
/// * `parent` - Required. Name of the execution for which the callbacks should be listed. Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}
pub fn locations_workflows_executions_callbacks_list(&self, parent: &str) -> ProjectLocationWorkflowExecutionCallbackListCall<'a, S> {
ProjectLocationWorkflowExecutionCallbackListCall {
hub: self.hub,
_parent: parent.to_string(),
_page_token: Default::default(),
_page_size: Default::default(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Gets a step entry.
///
/// # Arguments
///
/// * `name` - Required. The name of the step entry to retrieve. Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}/stepEntries/{step_entry}
pub fn locations_workflows_executions_step_entries_get(&self, name: &str) -> ProjectLocationWorkflowExecutionStepEntryGetCall<'a, S> {
ProjectLocationWorkflowExecutionStepEntryGetCall {
hub: self.hub,
_name: name.to_string(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Lists step entries for the corresponding workflow execution. Returned entries are ordered by their create_time.
///
/// # Arguments
///
/// * `parent` - Required. Name of the workflow execution to list entries for. Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}/stepEntries/
pub fn locations_workflows_executions_step_entries_list(&self, parent: &str) -> ProjectLocationWorkflowExecutionStepEntryListCall<'a, S> {
ProjectLocationWorkflowExecutionStepEntryListCall {
hub: self.hub,
_parent: parent.to_string(),
_skip: Default::default(),
_page_token: Default::default(),
_page_size: Default::default(),
_order_by: Default::default(),
_filter: Default::default(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Cancels an execution of the given name.
///
/// # Arguments
///
/// * `request` - No description provided.
/// * `name` - Required. Name of the execution to be cancelled. Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}
pub fn locations_workflows_executions_cancel(&self, request: CancelExecutionRequest, name: &str) -> ProjectLocationWorkflowExecutionCancelCall<'a, S> {
ProjectLocationWorkflowExecutionCancelCall {
hub: self.hub,
_request: request,
_name: name.to_string(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Creates a new execution using the latest revision of the given workflow. For more information, see Execute a workflow.
///
/// # Arguments
///
/// * `request` - No description provided.
/// * `parent` - Required. Name of the workflow for which an execution should be created. Format: projects/{project}/locations/{location}/workflows/{workflow} The latest revision of the workflow will be used.
pub fn locations_workflows_executions_create(&self, request: Execution, parent: &str) -> ProjectLocationWorkflowExecutionCreateCall<'a, S> {
ProjectLocationWorkflowExecutionCreateCall {
hub: self.hub,
_request: request,
_parent: parent.to_string(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Returns all metadata stored about an execution, excluding most data that is already accessible using other API methods.
///
/// # Arguments
///
/// * `name` - Required. Name of the execution for which data is to be exported. Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}
pub fn locations_workflows_executions_export_data(&self, name: &str) -> ProjectLocationWorkflowExecutionExportDataCall<'a, S> {
ProjectLocationWorkflowExecutionExportDataCall {
hub: self.hub,
_name: name.to_string(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Returns an execution of the given name.
///
/// # Arguments
///
/// * `name` - Required. Name of the execution to be retrieved. Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}
pub fn locations_workflows_executions_get(&self, name: &str) -> ProjectLocationWorkflowExecutionGetCall<'a, S> {
ProjectLocationWorkflowExecutionGetCall {
hub: self.hub,
_name: name.to_string(),
_view: Default::default(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Returns a list of executions which belong to the workflow with the given name. The method returns executions of all workflow revisions. Returned executions are ordered by their start time (newest first).
///
/// # Arguments
///
/// * `parent` - Required. Name of the workflow for which the executions should be listed. Format: projects/{project}/locations/{location}/workflows/{workflow}
pub fn locations_workflows_executions_list(&self, parent: &str) -> ProjectLocationWorkflowExecutionListCall<'a, S> {
ProjectLocationWorkflowExecutionListCall {
hub: self.hub,
_parent: parent.to_string(),
_view: Default::default(),
_page_token: Default::default(),
_page_size: Default::default(),
_order_by: Default::default(),
_filter: Default::default(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
/// Create a builder to help you perform the following task:
///
/// Triggers a new execution using the latest revision of the given workflow by a Pub/Sub push notification.
///
/// # Arguments
///
/// * `request` - No description provided.
/// * `workflow` - Required. Name of the workflow for which an execution should be created. Format: projects/{project}/locations/{location}/workflows/{workflow}
pub fn locations_workflows_trigger_pubsub_execution(&self, request: TriggerPubsubExecutionRequest, workflow: &str) -> ProjectLocationWorkflowTriggerPubsubExecutionCall<'a, S> {
ProjectLocationWorkflowTriggerPubsubExecutionCall {
hub: self.hub,
_request: request,
_workflow: workflow.to_string(),
_delegate: Default::default(),
_additional_params: Default::default(),
_scopes: Default::default(),
}
}
}

View File

@@ -0,0 +1,35 @@
use std::collections::HashMap;
use std::cell::RefCell;
use std::default::Default;
use std::collections::BTreeSet;
use std::error::Error as StdError;
use serde_json as json;
use std::io;
use std::fs;
use std::mem;
use hyper::client::connect;
use tokio::io::{AsyncRead, AsyncWrite};
use tokio::time::sleep;
use tower_service;
use serde::{Serialize, Deserialize};
use crate::{client, client::GetToken, client::serde_with};
mod utilities;
pub use utilities::*;
mod hub;
pub use hub::*;
mod schemas;
pub use schemas::*;
mod method_builders;
pub use method_builders::*;
mod call_builders;
pub use call_builders::*;
pub mod enums;
pub(crate) use enums::*;

View File

@@ -0,0 +1,528 @@
use super::*;
/// An instance of a Callback created by an execution.
///
/// This type is not used in any activity, and only used as *part* of another schema.
///
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct Callback {
/// Output only. The payloads received by the callback that have not been processed by a waiting execution step.
#[serde(rename="availablePayloads")]
pub available_payloads: Option<Vec<String>>,
/// Output only. The method accepted by the callback. For example: GET, POST, PUT.
pub method: Option<String>,
/// Output only. The resource name of the callback. Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}/callback/{callback}
pub name: Option<String>,
/// Output only. Number of execution steps waiting on this callback.
#[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")]
pub waiters: Option<i64>,
}
impl client::Part for Callback {}
/// Request for the CancelExecution method.
///
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [locations workflows executions cancel projects](ProjectLocationWorkflowExecutionCancelCall) (request)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct CancelExecutionRequest { _never_set: Option<bool> }
impl client::RequestValue for CancelExecutionRequest {}
/// Error describes why the execution was abnormally terminated.
///
/// This type is not used in any activity, and only used as *part* of another schema.
///
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct Error {
/// Human-readable stack trace string.
pub context: Option<String>,
/// Error message and data returned represented as a JSON string.
pub payload: Option<String>,
/// Stack trace with detailed information of where error was generated.
#[serde(rename="stackTrace")]
pub stack_trace: Option<StackTrace>,
}
impl client::Part for Error {}
/// Exception describes why the step entry failed.
///
/// This type is not used in any activity, and only used as *part* of another schema.
///
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct Exception {
/// Error message represented as a JSON string.
pub payload: Option<String>,
}
impl client::Part for Exception {}
/// A running instance of a [Workflow](https://cloud.google.com/workflows/docs/reference/rest/v1/projects.locations.workflows).
///
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [locations workflows executions cancel projects](ProjectLocationWorkflowExecutionCancelCall) (response)
/// * [locations workflows executions create projects](ProjectLocationWorkflowExecutionCreateCall) (request|response)
/// * [locations workflows executions get projects](ProjectLocationWorkflowExecutionGetCall) (response)
/// * [locations workflows trigger pubsub execution projects](ProjectLocationWorkflowTriggerPubsubExecutionCall) (response)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct Execution {
/// 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\"}"}'`
pub argument: Option<String>,
/// The call logging level associated to this execution.
#[serde(rename="callLogLevel")]
pub call_log_level: Option<ExecutionCallLogLevelEnum>,
/// Output only. Marks the creation of the execution.
#[serde(rename="createTime")]
pub create_time: Option<client::chrono::DateTime<client::chrono::offset::Utc>>,
/// Optional. If set to true, the execution will not be backlogged when the concurrency quota is exhausted. The backlog execution starts when the concurrency quota becomes available.
#[serde(rename="disableConcurrencyQuotaOverflowBuffering")]
pub disable_concurrency_quota_overflow_buffering: Option<bool>,
/// Output only. Measures the duration of the execution.
#[serde_as(as = "Option<::client::serde::duration::Wrapper>")]
pub duration: Option<client::chrono::Duration>,
/// Output only. Marks the end of execution, successful or not.
#[serde(rename="endTime")]
pub end_time: Option<client::chrono::DateTime<client::chrono::offset::Utc>>,
/// 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`.
pub error: Option<Error>,
/// 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.
pub labels: Option<HashMap<String, String>>,
/// Output only. The resource name of the execution. Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}
pub name: Option<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`.
pub result: Option<String>,
/// Output only. Marks the beginning of execution.
#[serde(rename="startTime")]
pub start_time: Option<client::chrono::DateTime<client::chrono::offset::Utc>>,
/// Output only. Current state of the execution.
pub state: Option<ExecutionStateEnum>,
/// 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.
#[serde(rename="stateError")]
pub state_error: Option<StateError>,
/// Output only. Status tracks the current steps and progress data of this execution.
pub status: Option<Status>,
/// Output only. Revision of the workflow this execution is using.
#[serde(rename="workflowRevisionId")]
pub workflow_revision_id: Option<String>,
}
impl client::RequestValue for Execution {}
impl client::ResponseResult for Execution {}
/// Response for the ExportData method.
///
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [locations workflows executions export data projects](ProjectLocationWorkflowExecutionExportDataCall) (response)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct ExportDataResponse {
/// The JSON string with customer data and metadata for an execution with the given name
pub data: Option<String>,
}
impl client::ResponseResult for ExportDataResponse {}
/// RPC response object for the ListCallbacks method.
///
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [locations workflows executions callbacks list projects](ProjectLocationWorkflowExecutionCallbackListCall) (response)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct ListCallbacksResponse {
/// The callbacks which match the request.
pub callbacks: Option<Vec<Callback>>,
/// A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.
#[serde(rename="nextPageToken")]
pub next_page_token: Option<String>,
}
impl client::ResponseResult for ListCallbacksResponse {}
/// Response for the ListExecutions method.
///
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [locations workflows executions list projects](ProjectLocationWorkflowExecutionListCall) (response)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct ListExecutionsResponse {
/// The executions which match the request.
pub executions: Option<Vec<Execution>>,
/// A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.
#[serde(rename="nextPageToken")]
pub next_page_token: Option<String>,
}
impl client::ResponseResult for ListExecutionsResponse {}
/// Response message for ExecutionHistory.ListStepEntries.
///
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [locations workflows executions step entries list projects](ProjectLocationWorkflowExecutionStepEntryListCall) (response)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct ListStepEntriesResponse {
/// A token to retrieve next page of results. Pass this value in the ListStepEntriesRequest.page_token field in the subsequent call to `ListStepEntries` method to retrieve the next page of results.
#[serde(rename="nextPageToken")]
pub next_page_token: Option<String>,
/// The list of entries.
#[serde(rename="stepEntries")]
pub step_entries: Option<Vec<StepEntry>>,
/// Indicates the total number of StepEntries that matched the request filter. For running executions, this number shows the number of StepEntries that are executed thus far.
#[serde(rename="totalSize")]
pub total_size: Option<i32>,
}
impl client::ResponseResult for ListStepEntriesResponse {}
/// NavigationInfo describes what steps if any come before or after this step, or what steps are parents or children of this step.
///
/// This type is not used in any activity, and only used as *part* of another schema.
///
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct NavigationInfo {
/// Step entries that can be reached by "stepping into" e.g. a subworkflow call.
#[serde_as(as = "Option<Vec<::client::serde_with::DisplayFromStr>>")]
pub children: Option<Vec<i64>>,
/// The index of the next step in the current workflow, if any.
#[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")]
pub next: Option<i64>,
/// The step entry, if any, that can be reached by "stepping out" of the current workflow being executed.
#[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")]
pub parent: Option<i64>,
/// The index of the previous step in the current workflow, if any.
#[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")]
pub previous: Option<i64>,
}
impl client::Part for NavigationInfo {}
/// Position contains source position information about the stack trace element such as line number, column number and length of the code block in bytes.
///
/// This type is not used in any activity, and only used as *part* of another schema.
///
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct Position {
/// The source code column position (of the line) the current instruction was generated from.
#[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")]
pub column: Option<i64>,
/// The number of bytes of source code making up this stack trace element.
#[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")]
pub length: Option<i64>,
/// The source code line number the current instruction was generated from.
#[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")]
pub line: Option<i64>,
}
impl client::Part for Position {}
/// A message that is published by publishers and consumed by subscribers. The message must contain either a non-empty data field or at least one attribute. Note that client libraries represent this object differently depending on the language. See the corresponding [client library documentation](https://cloud.google.com/pubsub/docs/reference/libraries) for more information. See [quotas and limits] (https://cloud.google.com/pubsub/quotas) for more information about message limits.
///
/// This type is not used in any activity, and only used as *part* of another schema.
///
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct PubsubMessage {
/// Optional. Attributes for this message. If this field is empty, the message must contain non-empty data. This can be used to filter messages on the subscription.
pub attributes: Option<HashMap<String, String>>,
/// Optional. The message data field. If this field is empty, the message must contain at least one attribute.
#[serde_as(as = "Option<::client::serde::standard_base64::Wrapper>")]
pub data: Option<Vec<u8>>,
/// ID of this message, assigned by the server when the message is published. Guaranteed to be unique within the topic. This value may be read by a subscriber that receives a `PubsubMessage` via a `Pull` call or a push delivery. It must not be populated by the publisher in a `Publish` call.
#[serde(rename="messageId")]
pub message_id: Option<String>,
/// Optional. If non-empty, identifies related messages for which publish order should be respected. If a `Subscription` has `enable_message_ordering` set to `true`, messages published with the same non-empty `ordering_key` value will be delivered to subscribers in the order in which they are received by the Pub/Sub system. All `PubsubMessage`s published in a given `PublishRequest` must specify the same `ordering_key` value. For more information, see [ordering messages](https://cloud.google.com/pubsub/docs/ordering).
#[serde(rename="orderingKey")]
pub ordering_key: Option<String>,
/// The time at which the message was published, populated by the server when it receives the `Publish` call. It must not be populated by the publisher in a `Publish` call.
#[serde(rename="publishTime")]
pub publish_time: Option<client::chrono::DateTime<client::chrono::offset::Utc>>,
}
impl client::Part for PubsubMessage {}
/// A collection of stack elements (frames) where an error occurred.
///
/// This type is not used in any activity, and only used as *part* of another schema.
///
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct StackTrace {
/// An array of stack elements.
pub elements: Option<Vec<StackTraceElement>>,
}
impl client::Part for StackTrace {}
/// A single stack element (frame) where an error occurred.
///
/// This type is not used in any activity, and only used as *part* of another schema.
///
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct StackTraceElement {
/// The source position information of the stack trace element.
pub position: Option<Position>,
/// The routine where the error occurred.
pub routine: Option<String>,
/// The step the error occurred at.
pub step: Option<String>,
}
impl client::Part for StackTraceElement {}
/// Describes an error related to the current state of the Execution resource.
///
/// This type is not used in any activity, and only used as *part* of another schema.
///
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct StateError {
/// Provides specifics about the error.
pub details: Option<String>,
/// The type of this state error.
#[serde(rename="type")]
pub type_: Option<StateErrorTypeEnum>,
}
impl client::Part for StateError {}
/// Represents the current status of this execution.
///
/// This type is not used in any activity, and only used as *part* of another schema.
///
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct Status {
/// A list of currently executing or last executed step names for the workflow execution currently running. If the workflow has succeeded or failed, this is the last attempted or executed step. Presently, if the current step is inside a subworkflow, the list only includes that step. In the future, the list will contain items for each step in the call stack, starting with the outermost step in the `main` subworkflow, and ending with the most deeply nested step.
#[serde(rename="currentSteps")]
pub current_steps: Option<Vec<Step>>,
}
impl client::Part for Status {}
/// Represents a step of the workflow this execution is running.
///
/// This type is not used in any activity, and only used as *part* of another schema.
///
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct Step {
/// Name of a routine within the workflow.
pub routine: Option<String>,
/// Name of a step within the routine.
pub step: Option<String>,
}
impl client::Part for Step {}
/// An StepEntry contains debugging information for a step transition in a workflow execution.
///
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [locations workflows executions step entries get projects](ProjectLocationWorkflowExecutionStepEntryGetCall) (response)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct StepEntry {
/// Output only. The creation time of the step entry.
#[serde(rename="createTime")]
pub create_time: Option<client::chrono::DateTime<client::chrono::offset::Utc>>,
/// Output only. The numeric ID of this step entry, used for navigation.
#[serde(rename="entryId")]
#[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")]
pub entry_id: Option<i64>,
/// Output only. The exception thrown by the step entry.
pub exception: Option<Exception>,
/// Output only. The full resource name of the step entry. Each step entry has a unique entry ID, which is a monotonically increasing counter. Step entry names have the format: `projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}/stepEntries/{step_entry}`.
pub name: Option<String>,
/// Output only. The NavigationInfo associated to this step.
#[serde(rename="navigationInfo")]
pub navigation_info: Option<NavigationInfo>,
/// Output only. The name of the routine this step entry belongs to. A routine name is the subworkflow name defined in the YAML source code. The top level routine name is `main`.
pub routine: Option<String>,
/// Output only. The state of the step entry.
pub state: Option<StepEntryStateEnum>,
/// Output only. The name of the step this step entry belongs to.
pub step: Option<String>,
/// Output only. The StepEntryMetadata associated to this step.
#[serde(rename="stepEntryMetadata")]
pub step_entry_metadata: Option<StepEntryMetadata>,
/// Output only. The type of the step this step entry belongs to.
#[serde(rename="stepType")]
pub step_type: Option<StepEntryStepTypeEnum>,
/// Output only. The most recently updated time of the step entry.
#[serde(rename="updateTime")]
pub update_time: Option<client::chrono::DateTime<client::chrono::offset::Utc>>,
}
impl client::ResponseResult for StepEntry {}
/// StepEntryMetadata contains metadata information about this step.
///
/// This type is not used in any activity, and only used as *part* of another schema.
///
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct StepEntryMetadata {
/// Progress number represents the current state of the current progress. eg: A step entry represents the 4th iteration in a progress of PROGRESS_TYPE_FOR.
#[serde(rename="progressNumber")]
#[serde_as(as = "Option<::client::serde_with::DisplayFromStr>")]
pub progress_number: Option<i64>,
/// Progress type of this step entry.
#[serde(rename="progressType")]
pub progress_type: Option<StepEntryMetadataProgressTypeEnum>,
/// Child thread id that this step entry belongs to.
#[serde(rename="threadId")]
pub thread_id: Option<String>,
}
impl client::Part for StepEntryMetadata {}
/// Request for the TriggerPubsubExecution method.
///
/// # Activities
///
/// This type is used in activities, which are methods you may call on this type or where this type is involved in.
/// The list links the activity name, along with information about where it is used (one of *request* and *response*).
///
/// * [locations workflows trigger pubsub execution projects](ProjectLocationWorkflowTriggerPubsubExecutionCall) (request)
#[serde_with::serde_as(crate = "::client::serde_with")]
#[derive(Default, Clone, Debug, Serialize, Deserialize)]
pub struct TriggerPubsubExecutionRequest {
/// Required. LINT: LEGACY_NAMES The query parameter value for __GCP_CloudEventsMode, set by the Eventarc service when configuring triggers.
#[serde(rename="GCPCloudEventsMode")]
pub gcp_cloud_events_mode: Option<String>,
/// The number of attempts that have been made to deliver this message. This is set by Pub/Sub for subscriptions that have the "dead letter" feature enabled, and hence provided here for compatibility, but is ignored by Workflows.
#[serde(rename="deliveryAttempt")]
pub delivery_attempt: Option<i32>,
/// Required. The message of the Pub/Sub push notification.
pub message: Option<PubsubMessage>,
/// Required. The subscription of the Pub/Sub push notification. Format: projects/{project}/subscriptions/{sub}
pub subscription: Option<String>,
}
impl client::RequestValue for TriggerPubsubExecutionRequest {}

View File

@@ -0,0 +1,24 @@
use super::*;
/// Identifies the an OAuth2 authorization scope.
/// A scope is needed when requesting an
/// [authorization token](https://developers.google.com/youtube/v3/guides/authentication).
#[derive(PartialEq, Eq, Hash, Debug, Clone)]
pub enum Scope {
/// See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
CloudPlatform,
}
impl AsRef<str> for Scope {
fn as_ref(&self) -> &str {
match *self {
Scope::CloudPlatform => "https://www.googleapis.com/auth/cloud-platform",
}
}
}
impl Default for Scope {
fn default() -> Scope {
Scope::CloudPlatform
}
}

View File

@@ -2,14 +2,14 @@
// This file was generated automatically from 'src/generator/templates/api/lib.rs.mako'
// DO NOT EDIT !
//! This documentation was generated from *Workflow Executions* crate version *5.0.4+20240220*, where *20240220* is the exact revision of the *workflowexecutions:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v5.0.4*.
//! This documentation was generated from *Workflow Executions* crate version *5.0.5+20240319*, where *20240319* is the exact revision of the *workflowexecutions:v1* schema built by the [mako](http://www.makotemplates.org/) code generator *v5.0.5*.
//!
//! Everything else about the *Workflow Executions* *v1* API can be found at the
//! [official documentation site](https://cloud.google.com/workflows).
//! The original source code is [on github](https://github.com/Byron/google-apis-rs/tree/main/gen/workflowexecutions1).
//! # Features
//!
//! Handle the following *Resources* with ease from the central [hub](WorkflowExecutions) ...
//! Handle the following *Resources* with ease from the central [hub](WorkflowExecutions) ...
//!
//! * projects
//! * [*locations workflows executions callbacks list*](api::ProjectLocationWorkflowExecutionCallbackListCall), [*locations workflows executions cancel*](api::ProjectLocationWorkflowExecutionCancelCall), [*locations workflows executions create*](api::ProjectLocationWorkflowExecutionCreateCall), [*locations workflows executions export data*](api::ProjectLocationWorkflowExecutionExportDataCall), [*locations workflows executions get*](api::ProjectLocationWorkflowExecutionGetCall), [*locations workflows executions list*](api::ProjectLocationWorkflowExecutionListCall), [*locations workflows executions step entries get*](api::ProjectLocationWorkflowExecutionStepEntryGetCall), [*locations workflows executions step entries list*](api::ProjectLocationWorkflowExecutionStepEntryListCall) and [*locations workflows trigger pubsub execution*](api::ProjectLocationWorkflowTriggerPubsubExecutionCall)
@@ -53,8 +53,8 @@
//! let r = hub.projects().locations_workflows_trigger_pubsub_execution(...).doit().await
//! ```
//!
//! The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities`
//! supports various methods to configure the impending operation (not shown here). It is made such that all required arguments have to be
//! The `resource()` and `activity(...)` calls create [builders][builder-pattern]. The second one dealing with `Activities`
//! supports various methods to configure the impending operation (not shown here). It is made such that all required arguments have to be
//! specified right away (i.e. `(...)`), whereas all optional ones can be [build up][builder-pattern] as desired.
//! The `doit()` method performs the actual communication with the server and returns the respective result.
//!
@@ -79,23 +79,24 @@
//! extern crate google_workflowexecutions1 as workflowexecutions1;
//! use workflowexecutions1::api::CancelExecutionRequest;
//! use workflowexecutions1::{Result, Error};
//! use workflowexecutions1::api::enums::*;
//! # async fn dox() {
//! use std::default::Default;
//! use workflowexecutions1::{WorkflowExecutions, oauth2, hyper, hyper_rustls, chrono, FieldMask};
//!
//! // Get an ApplicationSecret instance by some means. It contains the `client_id` and
//! // Get an ApplicationSecret instance by some means. It contains the `client_id` and
//! // `client_secret`, among other things.
//! let secret: oauth2::ApplicationSecret = Default::default();
//! // Instantiate the authenticator. It will choose a suitable authentication flow for you,
//! // Instantiate the authenticator. It will choose a suitable authentication flow for you,
//! // unless you replace `None` with the desired Flow.
//! // Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about
//! // Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about
//! // what's going on. You probably want to bring in your own `TokenStorage` to persist tokens and
//! // retrieve them from storage.
//! let auth = oauth2::InstalledFlowAuthenticator::builder(
//! secret,
//! oauth2::InstalledFlowReturnMethod::HTTPRedirect,
//! ).build().await.unwrap();
//! let mut hub = WorkflowExecutions::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().https_or_http().enable_http1().build()), auth);
//! let mut hub = WorkflowExecutions::new(hyper::Client::builder().build(hyper_rustls::HttpsConnectorBuilder::new().with_native_roots().unwrap().https_or_http().enable_http1().build()), auth);
//! // As the method needs a request, you would usually fill it with the desired information
//! // into the respective structure. Some of the parts shown here might not be applicable !
//! // Values shown here are possibly random and not representative !
@@ -129,10 +130,10 @@
//! ## Handling Errors
//!
//! All errors produced by the system are provided either as [Result](client::Result) enumeration as return value of
//! the doit() methods, or handed as possibly intermediate results to either the
//! the doit() methods, or handed as possibly intermediate results to either the
//! [Hub Delegate](client::Delegate), or the [Authenticator Delegate](https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html).
//!
//! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This
//! When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This
//! makes the system potentially resilient to all kinds of errors.
//!
//! ## Uploads and Downloads
@@ -142,25 +143,25 @@
//! You can see it as meta-data for the actual media. To trigger a media download, you will have to set up the builder by making
//! this call: `.param("alt", "media")`.
//!
//! Methods supporting uploads can do so using up to 2 different protocols:
//! *simple* and *resumable*. The distinctiveness of each is represented by customized
//! Methods supporting uploads can do so using up to 2 different protocols:
//! *simple* and *resumable*. The distinctiveness of each is represented by customized
//! `doit(...)` methods, which are then named `upload(...)` and `upload_resumable(...)` respectively.
//!
//! ## Customization and Callbacks
//!
//! You may alter the way an `doit()` method is called by providing a [delegate](client::Delegate) to the
//! [Method Builder](client::CallBuilder) before making the final `doit()` call.
//! Respective methods will be called to provide progress information, as well as determine whether the system should
//! You may alter the way an `doit()` method is called by providing a [delegate](client::Delegate) to the
//! [Method Builder](client::CallBuilder) before making the final `doit()` call.
//! Respective methods will be called to provide progress information, as well as determine whether the system should
//! retry on failure.
//!
//! The [delegate trait](client::Delegate) is default-implemented, allowing you to customize it with minimal effort.
//!
//! ## Optional Parts in Server-Requests
//!
//! All structures provided by this library are made to be [encodable](client::RequestValue) and
//! [decodable](client::ResponseResult) via *json*. Optionals are used to indicate that partial requests are responses
//! All structures provided by this library are made to be [encodable](client::RequestValue) and
//! [decodable](client::ResponseResult) via *json*. Optionals are used to indicate that partial requests are responses
//! are valid.
//! Most optionals are are considered [Parts](client::Part) which are identifiable by name, which will be sent to
//! Most optionals are are considered [Parts](client::Part) which are identifiable by name, which will be sent to
//! the server to indicate either the set parts of the request or the desired parts in the response.
//!
//! ## Builder Arguments