diff --git a/.github/generated-files-bot.yml b/.github/generated-files-bot.yml
index 47c2ba13..c644a24e 100644
--- a/.github/generated-files-bot.yml
+++ b/.github/generated-files-bot.yml
@@ -9,3 +9,4 @@ ignoreAuthors:
- 'renovate-bot'
- 'yoshi-automation'
- 'release-please[bot]'
+- 'gcf-owl-bot[bot]'
diff --git a/.github/release-please.yml b/.github/release-please.yml
index dce2c845..8ca7f9ca 100644
--- a/.github/release-please.yml
+++ b/.github/release-please.yml
@@ -1,2 +1,3 @@
+bumpMinorPreMajor: true
+handleGHRelease: true
releaseType: java-yoshi
-bumpMinorPreMajor: true
\ No newline at end of file
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index def8b3a2..0195b32f 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -19,10 +19,6 @@ jobs:
- run: .kokoro/build.sh
env:
JOB_TYPE: test
- - name: coverage
- uses: codecov/codecov-action@v1
- with:
- name: actions ${{matrix.java}}
windows:
runs-on: windows-latest
steps:
@@ -80,4 +76,4 @@ jobs:
- run: java -version
- run: .kokoro/build.sh
env:
- JOB_TYPE: clirr
\ No newline at end of file
+ JOB_TYPE: clirr
diff --git a/.kokoro/build.sh b/.kokoro/build.sh
index 3ac65fbe..1a2e2922 100755
--- a/.kokoro/build.sh
+++ b/.kokoro/build.sh
@@ -23,8 +23,8 @@ cd ${scriptDir}/..
# include common functions
source ${scriptDir}/common.sh
-# Print out Java version
-java -version
+# Print out Maven & Java version
+mvn -version
echo ${JOB_TYPE}
# attempt to install 3 times with exponential backoff (starting with 10 seconds)
@@ -37,7 +37,7 @@ retry_with_backoff 3 10 \
-Dgcloud.download.skip=true \
-T 1C
-# if GOOGLE_APPLICATION_CREDIENTIALS is specified as a relative path prepend Kokoro root directory onto it
+# if GOOGLE_APPLICATION_CREDENTIALS is specified as a relative path, prepend Kokoro root directory onto it
if [[ ! -z "${GOOGLE_APPLICATION_CREDENTIALS}" && "${GOOGLE_APPLICATION_CREDENTIALS}" != /* ]]; then
export GOOGLE_APPLICATION_CREDENTIALS=$(realpath ${KOKORO_GFILE_DIR}/${GOOGLE_APPLICATION_CREDENTIALS})
fi
diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh
index 0fb8c843..59d2aafc 100755
--- a/.kokoro/dependencies.sh
+++ b/.kokoro/dependencies.sh
@@ -33,6 +33,7 @@ export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m"
retry_with_backoff 3 10 \
mvn install -B -V -ntp \
-DskipTests=true \
+ -Dmaven.javadoc.skip=true \
-Dclirr.skip=true
mvn -B dependency:analyze -DfailOnWarning=true
diff --git a/.kokoro/release/publish_javadoc11.sh b/.kokoro/release/publish_javadoc11.sh
index c99c266e..cbd53390 100755
--- a/.kokoro/release/publish_javadoc11.sh
+++ b/.kokoro/release/publish_javadoc11.sh
@@ -42,6 +42,8 @@ mvn clean site -B -q -P docFX
# copy README to docfx-yml dir and rename index.md
cp README.md target/docfx-yml/index.md
+# copy CHANGELOG to docfx-yml dir and rename history.md
+cp CHANGELOG.md target/docfx-yml/history.md
pushd target/docfx-yml
@@ -49,6 +51,13 @@ pushd target/docfx-yml
python3 -m docuploader create-metadata \
--name ${NAME} \
--version ${VERSION} \
+ --xrefs devsite://java/gax \
+ --xrefs devsite://java/google-cloud-core \
+ --xrefs devsite://java/api-common \
+ --xrefs devsite://java/proto-google-common-protos \
+ --xrefs devsite://java/google-api-client \
+ --xrefs devsite://java/google-http-client \
+ --xrefs devsite://java/protobuf \
--language java
# upload yml to production bucket
diff --git a/.kokoro/release/snapshot.sh b/.kokoro/release/snapshot.sh
index 098168a7..1f55b770 100755
--- a/.kokoro/release/snapshot.sh
+++ b/.kokoro/release/snapshot.sh
@@ -25,7 +25,7 @@ grep SNAPSHOT versions.txt
setup_environment_secrets
create_settings_xml_file "settings.xml"
-mvn clean install deploy -B \
+mvn clean deploy -B \
--settings ${MAVEN_SETTINGS_FILE} \
-DperformRelease=true \
-Dgpg.executable=gpg \
diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh
index 16126d2e..8a103384 100755
--- a/.kokoro/release/stage.sh
+++ b/.kokoro/release/stage.sh
@@ -29,7 +29,7 @@ create_settings_xml_file "settings.xml"
# attempt to stage 3 times with exponential backoff (starting with 10 seconds)
retry_with_backoff 3 10 \
- mvn clean install deploy -B \
+ mvn clean deploy -B \
--settings ${MAVEN_SETTINGS_FILE} \
-DskipTests=true \
-DperformRelease=true \
diff --git a/.repo-metadata.json b/.repo-metadata.json
index 433541dc..9c8ac224 100644
--- a/.repo-metadata.json
+++ b/.repo-metadata.json
@@ -1,15 +1,16 @@
{
- "name": "workflows-executions",
- "name_pretty": "Cloud Workflow Executions",
- "product_documentation": "https://cloud.google.com/workflows",
- "api_description": "allows you to ochestrate and automate Google Cloud and HTTP-based API services with serverless workflows.",
- "client_documentation": "https://googleapis.dev/java/google-cloud-workflow-executions/latest/index.html",
- "release_level": "beta",
- "transport": "grpc",
- "language": "java",
- "repo": "googleapis/java-workflow-executions",
- "repo_short": "java-workflow-executions",
- "distribution_name": "com.google.cloud:google-cloud-workflow-executions",
- "api_id": "workflows-executions.googleapis.com",
- "requires_billing": true
+ "name": "workflows-executions",
+ "name_pretty": "Cloud Workflow Executions",
+ "product_documentation": "https://cloud.google.com/workflows",
+ "api_description": "allows you to ochestrate and automate Google Cloud and HTTP-based API services with serverless workflows.",
+ "client_documentation": "https://googleapis.dev/java/google-cloud-workflow-executions/latest/index.html",
+ "release_level": "ga",
+ "transport": "grpc",
+ "language": "java",
+ "repo": "googleapis/java-workflow-executions",
+ "repo_short": "java-workflow-executions",
+ "distribution_name": "com.google.cloud:google-cloud-workflow-executions",
+ "api_id": "workflows-executions.googleapis.com",
+ "requires_billing": true,
+ "library_type": "GAPIC_AUTO"
}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b5916897..afbf8491 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,27 @@
# Changelog
+## [0.2.0](https://www.github.com/googleapis/java-workflow-executions/compare/v0.1.8...v0.2.0) (2021-05-26)
+
+
+### Features
+
+* add `gcf-owl-bot[bot]` to `ignoreAuthors` ([#114](https://www.github.com/googleapis/java-workflow-executions/issues/114)) ([b877b23](https://www.github.com/googleapis/java-workflow-executions/commit/b877b236d5435ba03c8edf2468202f48194c1176))
+* add v1 client ([#119](https://www.github.com/googleapis/java-workflow-executions/issues/119)) ([2039980](https://www.github.com/googleapis/java-workflow-executions/commit/2039980de2b82567d5252d2884a0cdd143b281d6))
+
+
+### Bug Fixes
+
+* release scripts from issuing overlapping phases ([#95](https://www.github.com/googleapis/java-workflow-executions/issues/95)) ([f013e7a](https://www.github.com/googleapis/java-workflow-executions/commit/f013e7a29415493d046273e6ec68e89843a1b2d1))
+* typo ([#92](https://www.github.com/googleapis/java-workflow-executions/issues/92)) ([079eb7f](https://www.github.com/googleapis/java-workflow-executions/commit/079eb7f3be4097c710f0185331bd9df89cb7e4d8))
+
+
+### Dependencies
+
+* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.21.1 ([#96](https://www.github.com/googleapis/java-workflow-executions/issues/96)) ([1bc3bef](https://www.github.com/googleapis/java-workflow-executions/commit/1bc3bef95d72d8a8aee33f51fcce97c86eacd66d))
+* update dependency com.google.cloud:google-cloud-shared-dependencies to v1 ([#99](https://www.github.com/googleapis/java-workflow-executions/issues/99)) ([774e2ca](https://www.github.com/googleapis/java-workflow-executions/commit/774e2cab1f4af73c55ffa85a2b91f3273a44e81c))
+* update dependency com.google.cloud:google-cloud-shared-dependencies to v1.1.0 ([#110](https://www.github.com/googleapis/java-workflow-executions/issues/110)) ([99f28de](https://www.github.com/googleapis/java-workflow-executions/commit/99f28de65b4867a496b13e11c896e33805b9c2d6))
+* update dependency com.google.cloud:google-cloud-shared-dependencies to v1.2.0 ([#113](https://www.github.com/googleapis/java-workflow-executions/issues/113)) ([ef824c9](https://www.github.com/googleapis/java-workflow-executions/commit/ef824c9e2bd461a5940dbdde0f01b033f307360e))
+
### [0.1.8](https://www.github.com/googleapis/java-workflow-executions/compare/v0.1.7...v0.1.8) (2021-04-09)
diff --git a/README.md b/README.md
index 1b3ff87f..9ce4fde6 100644
--- a/README.md
+++ b/README.md
@@ -28,11 +28,11 @@ If you are using Maven, add this to your pom.xml file:
If you are using Gradle, add this to your dependencies
```Groovy
-compile 'com.google.cloud:google-cloud-workflow-executions:0.1.8'
+compile 'com.google.cloud:google-cloud-workflow-executions:0.2.0'
```
If you are using SBT, add this to your dependencies
```Scala
-libraryDependencies += "com.google.cloud" % "google-cloud-workflow-executions" % "0.1.8"
+libraryDependencies += "com.google.cloud" % "google-cloud-workflow-executions" % "0.2.0"
```
[//]: # ({x-version-update-end})
diff --git a/SECURITY.md b/SECURITY.md
new file mode 100644
index 00000000..8b58ae9c
--- /dev/null
+++ b/SECURITY.md
@@ -0,0 +1,7 @@
+# Security Policy
+
+To report a security issue, please use [g.co/vulnz](https://g.co/vulnz).
+
+The Google Security Team will respond within 5 working days of your report on g.co/vulnz.
+
+We use g.co/vulnz for our intake, and do coordination and disclosure here using GitHub Security Advisory to privately discuss and fix the issue.
diff --git a/google-cloud-workflow-executions-bom/pom.xml b/google-cloud-workflow-executions-bom/pom.xml
index d333c58b..3cd7b5a6 100644
--- a/google-cloud-workflow-executions-bom/pom.xml
+++ b/google-cloud-workflow-executions-bom/pom.xml
@@ -1,14 +1,14 @@
-
+
This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *
{@code
+ * try (ExecutionsClient executionsClient = ExecutionsClient.create()) {
+ * WorkflowName parent = WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]");
+ * Execution execution = Execution.newBuilder().build();
+ * Execution response = executionsClient.createExecution(parent, execution);
+ * }
+ * }
+ *
+ * Note: close() needs to be called on the ExecutionsClient object to clean up resources such as + * threads. In the example above, try-with-resources is used, which automatically calls close(). + * + *
The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *
See the individual methods for example code. + * + *
Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *
This class can be customized by passing in a custom instance of ExecutionsSettings to + * create(). For example: + * + *
To customize credentials: + * + *
{@code
+ * ExecutionsSettings executionsSettings =
+ * ExecutionsSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * ExecutionsClient executionsClient = ExecutionsClient.create(executionsSettings);
+ * }
+ *
+ * To customize the endpoint: + * + *
{@code
+ * ExecutionsSettings executionsSettings =
+ * ExecutionsSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * ExecutionsClient executionsClient = ExecutionsClient.create(executionsSettings);
+ * }
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class ExecutionsClient implements BackgroundResource { + private final ExecutionsSettings settings; + private final ExecutionsStub stub; + + /** Constructs an instance of ExecutionsClient with default settings. */ + public static final ExecutionsClient create() throws IOException { + return create(ExecutionsSettings.newBuilder().build()); + } + + /** + * Constructs an instance of ExecutionsClient, using the given settings. The channels are created + * based on the settings passed in, or defaults for any settings that are not set. + */ + public static final ExecutionsClient create(ExecutionsSettings settings) throws IOException { + return new ExecutionsClient(settings); + } + + /** + * Constructs an instance of ExecutionsClient, using the given stub for making calls. This is for + * advanced usage - prefer using create(ExecutionsSettings). + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final ExecutionsClient create(ExecutionsStub stub) { + return new ExecutionsClient(stub); + } + + /** + * Constructs an instance of ExecutionsClient, using the given settings. This is protected so that + * it is easy to make a subclass, but otherwise, the static factory methods should be preferred. + */ + protected ExecutionsClient(ExecutionsSettings settings) throws IOException { + this.settings = settings; + this.stub = ((ExecutionsStubSettings) settings.getStubSettings()).createStub(); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected ExecutionsClient(ExecutionsStub stub) { + this.settings = null; + this.stub = stub; + } + + public final ExecutionsSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public ExecutionsStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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). + * + *
Sample code: + * + *
{@code
+ * try (ExecutionsClient executionsClient = ExecutionsClient.create()) {
+ * WorkflowName parent = WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]");
+ * for (Execution element : executionsClient.listExecutions(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Name of the workflow for which the executions should be listed. Format:
+ * projects/{project}/locations/{location}/workflows/{workflow}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListExecutionsPagedResponse listExecutions(WorkflowName parent) {
+ ListExecutionsRequest request =
+ ListExecutionsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listExecutions(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * 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).
+ *
+ * Sample code: + * + *
{@code
+ * try (ExecutionsClient executionsClient = ExecutionsClient.create()) {
+ * String parent = WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString();
+ * for (Execution element : executionsClient.listExecutions(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. Name of the workflow for which the executions should be listed. Format:
+ * projects/{project}/locations/{location}/workflows/{workflow}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListExecutionsPagedResponse listExecutions(String parent) {
+ ListExecutionsRequest request = ListExecutionsRequest.newBuilder().setParent(parent).build();
+ return listExecutions(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * 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).
+ *
+ * Sample code: + * + *
{@code
+ * try (ExecutionsClient executionsClient = ExecutionsClient.create()) {
+ * ListExecutionsRequest request =
+ * ListExecutionsRequest.newBuilder()
+ * .setParent(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setView(ExecutionView.forNumber(0))
+ * .build();
+ * for (Execution element : executionsClient.listExecutions(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListExecutionsPagedResponse listExecutions(ListExecutionsRequest request) {
+ return listExecutionsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * 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).
+ *
+ * Sample code: + * + *
{@code
+ * try (ExecutionsClient executionsClient = ExecutionsClient.create()) {
+ * ListExecutionsRequest request =
+ * ListExecutionsRequest.newBuilder()
+ * .setParent(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setView(ExecutionView.forNumber(0))
+ * .build();
+ * ApiFuture future =
+ * executionsClient.listExecutionsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Execution element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * try (ExecutionsClient executionsClient = ExecutionsClient.create()) {
+ * ListExecutionsRequest request =
+ * ListExecutionsRequest.newBuilder()
+ * .setParent(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setView(ExecutionView.forNumber(0))
+ * .build();
+ * while (true) {
+ * ListExecutionsResponse response = executionsClient.listExecutionsCallable().call(request);
+ * for (Execution element : response.getResponsesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * try (ExecutionsClient executionsClient = ExecutionsClient.create()) {
+ * WorkflowName parent = WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]");
+ * Execution execution = Execution.newBuilder().build();
+ * Execution response = executionsClient.createExecution(parent, execution);
+ * }
+ * }
+ *
+ * @param 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.
+ * @param execution Required. Execution to be created.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Execution createExecution(WorkflowName parent, Execution execution) {
+ CreateExecutionRequest request =
+ CreateExecutionRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setExecution(execution)
+ .build();
+ return createExecution(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new execution using the latest revision of the given workflow.
+ *
+ * Sample code: + * + *
{@code
+ * try (ExecutionsClient executionsClient = ExecutionsClient.create()) {
+ * String parent = WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString();
+ * Execution execution = Execution.newBuilder().build();
+ * Execution response = executionsClient.createExecution(parent, execution);
+ * }
+ * }
+ *
+ * @param 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.
+ * @param execution Required. Execution to be created.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Execution createExecution(String parent, Execution execution) {
+ CreateExecutionRequest request =
+ CreateExecutionRequest.newBuilder().setParent(parent).setExecution(execution).build();
+ return createExecution(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new execution using the latest revision of the given workflow.
+ *
+ * Sample code: + * + *
{@code
+ * try (ExecutionsClient executionsClient = ExecutionsClient.create()) {
+ * CreateExecutionRequest request =
+ * CreateExecutionRequest.newBuilder()
+ * .setParent(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString())
+ * .setExecution(Execution.newBuilder().build())
+ * .build();
+ * Execution response = executionsClient.createExecution(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Execution createExecution(CreateExecutionRequest request) {
+ return createExecutionCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new execution using the latest revision of the given workflow.
+ *
+ * Sample code: + * + *
{@code
+ * try (ExecutionsClient executionsClient = ExecutionsClient.create()) {
+ * CreateExecutionRequest request =
+ * CreateExecutionRequest.newBuilder()
+ * .setParent(WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]").toString())
+ * .setExecution(Execution.newBuilder().build())
+ * .build();
+ * ApiFuture future = executionsClient.createExecutionCallable().futureCall(request);
+ * // Do something.
+ * Execution response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * try (ExecutionsClient executionsClient = ExecutionsClient.create()) {
+ * ExecutionName name = ExecutionName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]", "[EXECUTION]");
+ * Execution response = executionsClient.getExecution(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the execution to be retrieved. Format:
+ * projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Execution getExecution(ExecutionName name) {
+ GetExecutionRequest request =
+ GetExecutionRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getExecution(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns an execution of the given name.
+ *
+ * Sample code: + * + *
{@code
+ * try (ExecutionsClient executionsClient = ExecutionsClient.create()) {
+ * String name =
+ * ExecutionName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]", "[EXECUTION]").toString();
+ * Execution response = executionsClient.getExecution(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the execution to be retrieved. Format:
+ * projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Execution getExecution(String name) {
+ GetExecutionRequest request = GetExecutionRequest.newBuilder().setName(name).build();
+ return getExecution(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns an execution of the given name.
+ *
+ * Sample code: + * + *
{@code
+ * try (ExecutionsClient executionsClient = ExecutionsClient.create()) {
+ * GetExecutionRequest request =
+ * GetExecutionRequest.newBuilder()
+ * .setName(
+ * ExecutionName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]", "[EXECUTION]")
+ * .toString())
+ * .setView(ExecutionView.forNumber(0))
+ * .build();
+ * Execution response = executionsClient.getExecution(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Execution getExecution(GetExecutionRequest request) {
+ return getExecutionCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns an execution of the given name.
+ *
+ * Sample code: + * + *
{@code
+ * try (ExecutionsClient executionsClient = ExecutionsClient.create()) {
+ * GetExecutionRequest request =
+ * GetExecutionRequest.newBuilder()
+ * .setName(
+ * ExecutionName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]", "[EXECUTION]")
+ * .toString())
+ * .setView(ExecutionView.forNumber(0))
+ * .build();
+ * ApiFuture future = executionsClient.getExecutionCallable().futureCall(request);
+ * // Do something.
+ * Execution response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * try (ExecutionsClient executionsClient = ExecutionsClient.create()) {
+ * ExecutionName name = ExecutionName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]", "[EXECUTION]");
+ * Execution response = executionsClient.cancelExecution(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the execution to be cancelled. Format:
+ * projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Execution cancelExecution(ExecutionName name) {
+ CancelExecutionRequest request =
+ CancelExecutionRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return cancelExecution(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Cancels an execution of the given name.
+ *
+ * Sample code: + * + *
{@code
+ * try (ExecutionsClient executionsClient = ExecutionsClient.create()) {
+ * String name =
+ * ExecutionName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]", "[EXECUTION]").toString();
+ * Execution response = executionsClient.cancelExecution(name);
+ * }
+ * }
+ *
+ * @param name Required. Name of the execution to be cancelled. Format:
+ * projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Execution cancelExecution(String name) {
+ CancelExecutionRequest request = CancelExecutionRequest.newBuilder().setName(name).build();
+ return cancelExecution(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Cancels an execution of the given name.
+ *
+ * Sample code: + * + *
{@code
+ * try (ExecutionsClient executionsClient = ExecutionsClient.create()) {
+ * CancelExecutionRequest request =
+ * CancelExecutionRequest.newBuilder()
+ * .setName(
+ * ExecutionName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]", "[EXECUTION]")
+ * .toString())
+ * .build();
+ * Execution response = executionsClient.cancelExecution(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Execution cancelExecution(CancelExecutionRequest request) {
+ return cancelExecutionCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Cancels an execution of the given name.
+ *
+ * Sample code: + * + *
{@code
+ * try (ExecutionsClient executionsClient = ExecutionsClient.create()) {
+ * CancelExecutionRequest request =
+ * CancelExecutionRequest.newBuilder()
+ * .setName(
+ * ExecutionName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]", "[EXECUTION]")
+ * .toString())
+ * .build();
+ * ApiFuture future = executionsClient.cancelExecutionCallable().futureCall(request);
+ * // Do something.
+ * Execution response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableThe default instance has everything set to sensible defaults: + * + *
The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *
For example, to set the total timeout of createExecution to 30 seconds: + * + *
{@code
+ * ExecutionsSettings.Builder executionsSettingsBuilder = ExecutionsSettings.newBuilder();
+ * executionsSettingsBuilder
+ * .createExecutionSettings()
+ * .setRetrySettings(
+ * executionsSettingsBuilder
+ * .createExecutionSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * ExecutionsSettings executionsSettings = executionsSettingsBuilder.build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class ExecutionsSettings extends ClientSettingsNote: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction ======================= ExecutionsClient =======================
+ *
+ * Service Description: Executions is used to start and manage running instances of
+ * [Workflows][google.cloud.workflows.v1.Workflow] called executions.
+ *
+ * Sample for ExecutionsClient:
+ *
+ * This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+public abstract class ExecutionsStub implements BackgroundResource {
+
+ public UnaryCallable The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the total timeout of createExecution to 30 seconds:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction This class is for advanced usage.
+ */
+@Generated("by gapic-generator-java")
+public class GrpcExecutionsCallableFactory implements GrpcStubCallableFactory {
+
+ @Override
+ public This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+public class GrpcExecutionsStub extends ExecutionsStub {
+ private static final MethodDescriptor{@code
+ * try (ExecutionsClient executionsClient = ExecutionsClient.create()) {
+ * WorkflowName parent = WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]");
+ * Execution execution = Execution.newBuilder().build();
+ * Execution response = executionsClient.createExecution(parent, execution);
+ * }
+ * }
+ */
+@Generated("by gapic-generator-java")
+package com.google.cloud.workflows.executions.v1;
+
+import javax.annotation.Generated;
diff --git a/google-cloud-workflow-executions/src/main/java/com/google/cloud/workflows/executions/v1/stub/ExecutionsStub.java b/google-cloud-workflow-executions/src/main/java/com/google/cloud/workflows/executions/v1/stub/ExecutionsStub.java
new file mode 100644
index 00000000..c2fb64b0
--- /dev/null
+++ b/google-cloud-workflow-executions/src/main/java/com/google/cloud/workflows/executions/v1/stub/ExecutionsStub.java
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2021 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.workflows.executions.v1.stub;
+
+import static com.google.cloud.workflows.executions.v1.ExecutionsClient.ListExecutionsPagedResponse;
+
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.workflows.executions.v1.CancelExecutionRequest;
+import com.google.cloud.workflows.executions.v1.CreateExecutionRequest;
+import com.google.cloud.workflows.executions.v1.Execution;
+import com.google.cloud.workflows.executions.v1.GetExecutionRequest;
+import com.google.cloud.workflows.executions.v1.ListExecutionsRequest;
+import com.google.cloud.workflows.executions.v1.ListExecutionsResponse;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Base stub class for the Executions service API.
+ *
+ *
+ *
+ *
+ * {@code
+ * ExecutionsStubSettings.Builder executionsSettingsBuilder = ExecutionsStubSettings.newBuilder();
+ * executionsSettingsBuilder
+ * .createExecutionSettings()
+ * .setRetrySettings(
+ * executionsSettingsBuilder
+ * .createExecutionSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * ExecutionsStubSettings executionsSettings = executionsSettingsBuilder.build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class ExecutionsStubSettings extends StubSettings