Skip to content
This repository was archived by the owner on Sep 16, 2023. It is now read-only.

Commit fb32524

Browse files
feat: migrate to microgenerator (#159)
This PR was generated using Autosynth. 🌈 Synth log will be available here: https://source.cloud.google.com/results/invocations/5ae2a465-c5f2-47a0-a06e-68a2666fe368/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 345495218 Source-Link: googleapis/googleapis@0a9a8c8 PiperOrigin-RevId: 345067549 Source-Link: googleapis/googleapis@8cfc6c8 PiperOrigin-RevId: 344134135 Source-Link: googleapis/googleapis@b11a87f
1 parent a3003c8 commit fb32524

File tree

13 files changed

+649
-821
lines changed

13 files changed

+649
-821
lines changed

google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1beta/WorkflowsClient.java

Lines changed: 57 additions & 363 deletions
Large diffs are not rendered by default.

google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1beta/WorkflowsSettings.java

Lines changed: 19 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@
55
* you may not use this file except in compliance with the License.
66
* You may obtain a copy of the License at
77
*
8-
* https://www.apache.org/licenses/LICENSE-2.0
8+
* https://www.apache.org/licenses/LICENSE-2.0
99
*
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,
1212
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
package com.google.cloud.workflows.v1beta;
1718

1819
import static com.google.cloud.workflows.v1beta.WorkflowsClient.ListWorkflowsPagedResponse;
@@ -36,7 +37,7 @@
3637
import java.util.List;
3738
import javax.annotation.Generated;
3839

39-
// AUTO-GENERATED DOCUMENTATION AND CLASS
40+
// AUTO-GENERATED DOCUMENTATION AND CLASS.
4041
/**
4142
* Settings class to configure an instance of {@link WorkflowsClient}.
4243
*
@@ -53,23 +54,23 @@
5354
*
5455
* <p>For example, to set the total timeout of getWorkflow to 30 seconds:
5556
*
56-
* <pre>
57-
* <code>
58-
* WorkflowsSettings.Builder workflowsSettingsBuilder =
59-
* WorkflowsSettings.newBuilder();
57+
* <pre>{@code
58+
* WorkflowsSettings.Builder workflowsSettingsBuilder = WorkflowsSettings.newBuilder();
6059
* workflowsSettingsBuilder
6160
* .getWorkflowSettings()
6261
* .setRetrySettings(
63-
* workflowsSettingsBuilder.getWorkflowSettings().getRetrySettings().toBuilder()
62+
* workflowsSettingsBuilder
63+
* .getWorkflowSettings()
64+
* .getRetrySettings()
65+
* .toBuilder()
6466
* .setTotalTimeout(Duration.ofSeconds(30))
6567
* .build());
6668
* WorkflowsSettings workflowsSettings = workflowsSettingsBuilder.build();
67-
* </code>
68-
* </pre>
69+
* }</pre>
6970
*/
70-
@Generated("by gapic-generator")
71-
@BetaApi
71+
@Generated("by gapic-generator-java")
7272
public class WorkflowsSettings extends ClientSettings<WorkflowsSettings> {
73+
7374
/** Returns the object with the settings used for calls to listWorkflows. */
7475
public PagedCallSettings<ListWorkflowsRequest, ListWorkflowsResponse, ListWorkflowsPagedResponse>
7576
listWorkflowsSettings() {
@@ -87,8 +88,6 @@ public UnaryCallSettings<CreateWorkflowRequest, Operation> createWorkflowSetting
8788
}
8889

8990
/** Returns the object with the settings used for calls to createWorkflow. */
90-
@BetaApi(
91-
"The surface for long-running operations is not stable yet and may change in the future.")
9291
public OperationCallSettings<CreateWorkflowRequest, Workflow, OperationMetadata>
9392
createWorkflowOperationSettings() {
9493
return ((WorkflowsStubSettings) getStubSettings()).createWorkflowOperationSettings();
@@ -100,8 +99,6 @@ public UnaryCallSettings<DeleteWorkflowRequest, Operation> deleteWorkflowSetting
10099
}
101100

102101
/** Returns the object with the settings used for calls to deleteWorkflow. */
103-
@BetaApi(
104-
"The surface for long-running operations is not stable yet and may change in the future.")
105102
public OperationCallSettings<DeleteWorkflowRequest, Empty, OperationMetadata>
106103
deleteWorkflowOperationSettings() {
107104
return ((WorkflowsStubSettings) getStubSettings()).deleteWorkflowOperationSettings();
@@ -113,8 +110,6 @@ public UnaryCallSettings<UpdateWorkflowRequest, Operation> updateWorkflowSetting
113110
}
114111

115112
/** Returns the object with the settings used for calls to updateWorkflow. */
116-
@BetaApi(
117-
"The surface for long-running operations is not stable yet and may change in the future.")
118113
public OperationCallSettings<UpdateWorkflowRequest, Workflow, OperationMetadata>
119114
updateWorkflowOperationSettings() {
120115
return ((WorkflowsStubSettings) getStubSettings()).updateWorkflowOperationSettings();
@@ -179,18 +174,15 @@ protected WorkflowsSettings(Builder settingsBuilder) throws IOException {
179174

180175
/** Builder for WorkflowsSettings. */
181176
public static class Builder extends ClientSettings.Builder<WorkflowsSettings, Builder> {
177+
182178
protected Builder() throws IOException {
183-
this((ClientContext) null);
179+
this(((ClientContext) null));
184180
}
185181

186182
protected Builder(ClientContext clientContext) {
187183
super(WorkflowsStubSettings.newBuilder(clientContext));
188184
}
189185

190-
private static Builder createDefault() {
191-
return new Builder(WorkflowsStubSettings.newBuilder());
192-
}
193-
194186
protected Builder(WorkflowsSettings settings) {
195187
super(settings.getStubSettings().toBuilder());
196188
}
@@ -199,11 +191,15 @@ protected Builder(WorkflowsStubSettings.Builder stubSettings) {
199191
super(stubSettings);
200192
}
201193

194+
private static Builder createDefault() {
195+
return new Builder(WorkflowsStubSettings.newBuilder());
196+
}
197+
202198
public WorkflowsStubSettings.Builder getStubSettingsBuilder() {
203199
return ((WorkflowsStubSettings.Builder) getStubSettings());
204200
}
205201

206-
// NEXT_MAJOR_VER: remove 'throws Exception'
202+
// NEXT_MAJOR_VER: remove 'throws Exception'.
207203
/**
208204
* Applies the given settings updater function to all of the unary API methods in this service.
209205
*
@@ -234,8 +230,6 @@ public UnaryCallSettings.Builder<CreateWorkflowRequest, Operation> createWorkflo
234230
}
235231

236232
/** Returns the builder for the settings used for calls to createWorkflow. */
237-
@BetaApi(
238-
"The surface for long-running operations is not stable yet and may change in the future.")
239233
public OperationCallSettings.Builder<CreateWorkflowRequest, Workflow, OperationMetadata>
240234
createWorkflowOperationSettings() {
241235
return getStubSettingsBuilder().createWorkflowOperationSettings();
@@ -247,8 +241,6 @@ public UnaryCallSettings.Builder<DeleteWorkflowRequest, Operation> deleteWorkflo
247241
}
248242

249243
/** Returns the builder for the settings used for calls to deleteWorkflow. */
250-
@BetaApi(
251-
"The surface for long-running operations is not stable yet and may change in the future.")
252244
public OperationCallSettings.Builder<DeleteWorkflowRequest, Empty, OperationMetadata>
253245
deleteWorkflowOperationSettings() {
254246
return getStubSettingsBuilder().deleteWorkflowOperationSettings();
@@ -260,8 +252,6 @@ public UnaryCallSettings.Builder<UpdateWorkflowRequest, Operation> updateWorkflo
260252
}
261253

262254
/** Returns the builder for the settings used for calls to updateWorkflow. */
263-
@BetaApi(
264-
"The surface for long-running operations is not stable yet and may change in the future.")
265255
public OperationCallSettings.Builder<UpdateWorkflowRequest, Workflow, OperationMetadata>
266256
updateWorkflowOperationSettings() {
267257
return getStubSettingsBuilder().updateWorkflowOperationSettings();

google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1beta/package-info.java

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* you may not use this file except in compliance with the License.
66
* You may obtain a copy of the License at
77
*
8-
* https://www.apache.org/licenses/LICENSE-2.0
8+
* https://www.apache.org/licenses/LICENSE-2.0
99
*
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -15,27 +15,16 @@
1515
*/
1616

1717
/**
18-
* A client to Workflows API.
18+
* The interfaces provided are listed below, along with usage samples.
1919
*
20-
* <p>The interfaces provided are listed below, along with usage samples.
21-
*
22-
* <p>=============== WorkflowsClient ===============
20+
* <p>======================= WorkflowsClient =======================
2321
*
2422
* <p>Service Description: Workflows is used to deploy and execute workflow programs. Workflows
2523
* makes sure the program executes reliably, despite hardware and networking interruptions.
2624
*
2725
* <p>Sample for WorkflowsClient:
28-
*
29-
* <pre>
30-
* <code>
31-
* try (WorkflowsClient workflowsClient = WorkflowsClient.create()) {
32-
* WorkflowName name = WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]");
33-
* Workflow response = workflowsClient.getWorkflow(name);
34-
* }
35-
* </code>
36-
* </pre>
3726
*/
38-
@Generated("by gapic-generator")
27+
@Generated("by gapic-generator-java")
3928
package com.google.cloud.workflows.v1beta;
4029

4130
import javax.annotation.Generated;

google-cloud-workflows/src/main/java/com/google/cloud/workflows/v1beta/stub/GrpcWorkflowsCallableFactory.java

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55
* you may not use this file except in compliance with the License.
66
* You may obtain a copy of the License at
77
*
8-
* https://www.apache.org/licenses/LICENSE-2.0
8+
* https://www.apache.org/licenses/LICENSE-2.0
99
*
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,
1212
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
package com.google.cloud.workflows.v1beta.stub;
1718

18-
import com.google.api.core.BetaApi;
1919
import com.google.api.gax.grpc.GrpcCallSettings;
2020
import com.google.api.gax.grpc.GrpcCallableFactory;
2121
import com.google.api.gax.grpc.GrpcStubCallableFactory;
@@ -31,18 +31,19 @@
3131
import com.google.api.gax.rpc.StreamingCallSettings;
3232
import com.google.api.gax.rpc.UnaryCallSettings;
3333
import com.google.api.gax.rpc.UnaryCallable;
34+
import com.google.longrunning.Operation;
3435
import com.google.longrunning.stub.OperationsStub;
3536
import javax.annotation.Generated;
3637

37-
// AUTO-GENERATED DOCUMENTATION AND CLASS
38+
// AUTO-GENERATED DOCUMENTATION AND CLASS.
3839
/**
39-
* gRPC callable factory implementation for Workflows API.
40+
* gRPC callable factory implementation for the Workflows service API.
4041
*
4142
* <p>This class is for advanced usage.
4243
*/
4344
@Generated("by gapic-generator")
44-
@BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
4545
public class GrpcWorkflowsCallableFactory implements GrpcStubCallableFactory {
46+
4647
@Override
4748
public <RequestT, ResponseT> UnaryCallable<RequestT, ResponseT> createUnaryCallable(
4849
GrpcCallSettings<RequestT, ResponseT> grpcCallSettings,
@@ -55,61 +56,58 @@ public <RequestT, ResponseT> UnaryCallable<RequestT, ResponseT> createUnaryCalla
5556
public <RequestT, ResponseT, PagedListResponseT>
5657
UnaryCallable<RequestT, PagedListResponseT> createPagedCallable(
5758
GrpcCallSettings<RequestT, ResponseT> grpcCallSettings,
58-
PagedCallSettings<RequestT, ResponseT, PagedListResponseT> pagedCallSettings,
59+
PagedCallSettings<RequestT, ResponseT, PagedListResponseT> callSettings,
5960
ClientContext clientContext) {
60-
return GrpcCallableFactory.createPagedCallable(
61-
grpcCallSettings, pagedCallSettings, clientContext);
61+
return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext);
6262
}
6363

6464
@Override
6565
public <RequestT, ResponseT> UnaryCallable<RequestT, ResponseT> createBatchingCallable(
6666
GrpcCallSettings<RequestT, ResponseT> grpcCallSettings,
67-
BatchingCallSettings<RequestT, ResponseT> batchingCallSettings,
67+
BatchingCallSettings<RequestT, ResponseT> callSettings,
6868
ClientContext clientContext) {
6969
return GrpcCallableFactory.createBatchingCallable(
70-
grpcCallSettings, batchingCallSettings, clientContext);
70+
grpcCallSettings, callSettings, clientContext);
7171
}
7272

73-
@BetaApi(
74-
"The surface for long-running operations is not stable yet and may change in the future.")
7573
@Override
7674
public <RequestT, ResponseT, MetadataT>
7775
OperationCallable<RequestT, ResponseT, MetadataT> createOperationCallable(
78-
GrpcCallSettings<RequestT, com.google.longrunning.Operation> grpcCallSettings,
79-
OperationCallSettings<RequestT, ResponseT, MetadataT> operationCallSettings,
76+
GrpcCallSettings<RequestT, Operation> grpcCallSettings,
77+
OperationCallSettings<RequestT, ResponseT, MetadataT> callSettings,
8078
ClientContext clientContext,
8179
OperationsStub operationsStub) {
8280
return GrpcCallableFactory.createOperationCallable(
83-
grpcCallSettings, operationCallSettings, clientContext, operationsStub);
81+
grpcCallSettings, callSettings, clientContext, operationsStub);
8482
}
8583

8684
@Override
8785
public <RequestT, ResponseT>
8886
BidiStreamingCallable<RequestT, ResponseT> createBidiStreamingCallable(
8987
GrpcCallSettings<RequestT, ResponseT> grpcCallSettings,
90-
StreamingCallSettings<RequestT, ResponseT> streamingCallSettings,
88+
StreamingCallSettings<RequestT, ResponseT> callSettings,
9189
ClientContext clientContext) {
9290
return GrpcCallableFactory.createBidiStreamingCallable(
93-
grpcCallSettings, streamingCallSettings, clientContext);
91+
grpcCallSettings, callSettings, clientContext);
9492
}
9593

9694
@Override
9795
public <RequestT, ResponseT>
9896
ServerStreamingCallable<RequestT, ResponseT> createServerStreamingCallable(
9997
GrpcCallSettings<RequestT, ResponseT> grpcCallSettings,
100-
ServerStreamingCallSettings<RequestT, ResponseT> streamingCallSettings,
98+
ServerStreamingCallSettings<RequestT, ResponseT> callSettings,
10199
ClientContext clientContext) {
102100
return GrpcCallableFactory.createServerStreamingCallable(
103-
grpcCallSettings, streamingCallSettings, clientContext);
101+
grpcCallSettings, callSettings, clientContext);
104102
}
105103

106104
@Override
107105
public <RequestT, ResponseT>
108106
ClientStreamingCallable<RequestT, ResponseT> createClientStreamingCallable(
109107
GrpcCallSettings<RequestT, ResponseT> grpcCallSettings,
110-
StreamingCallSettings<RequestT, ResponseT> streamingCallSettings,
108+
StreamingCallSettings<RequestT, ResponseT> callSettings,
111109
ClientContext clientContext) {
112110
return GrpcCallableFactory.createClientStreamingCallable(
113-
grpcCallSettings, streamingCallSettings, clientContext);
111+
grpcCallSettings, callSettings, clientContext);
114112
}
115113
}

0 commit comments

Comments
 (0)