Skip to content
Permalink
Browse files
feat!: release gapic-generator-java v2.0.0 (#159)
* chore: release gapic-generator-java v1.0.17

Committer: @miraleung
PiperOrigin-RevId: 388499329

Source-Author: Google APIs <noreply@google.com>
Source-Date: Tue Aug 3 11:12:29 2021 -0700
Source-Repo: googleapis/googleapis
Source-Sha: bb0a090d9204110042ab5dee2ce9e06e8071ce54
Source-Link: googleapis/googleapis@bb0a090

* feat!: release gapic-generator-java v2.0.0

Committer: @miraleung
PiperOrigin-RevId: 388535346

Source-Author: Google APIs <noreply@google.com>
Source-Date: Tue Aug 3 13:48:38 2021 -0700
Source-Repo: googleapis/googleapis
Source-Sha: d9eaf41de44d953458b18712a3f240bb4c564e48
Source-Link: googleapis/googleapis@d9eaf41

Co-authored-by: Emily Ball <emilyball@google.com>
  • Loading branch information
yoshi-automation and eaball35 committed Aug 6, 2021
1 parent 56f3be8 commit 216bca30da2766c3d3267924fc33909f22b0cf59
@@ -16,7 +16,6 @@

package com.google.cloud.workflows.executions.v1;

import com.google.api.core.ApiFunction;
import com.google.api.core.ApiFuture;
import com.google.api.core.ApiFutures;
import com.google.api.core.BetaApi;
@@ -639,12 +638,7 @@ public static ApiFuture<ListExecutionsPagedResponse> createAsync(
ListExecutionsPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListExecutionsPage, ListExecutionsPagedResponse>() {
@Override
public ListExecutionsPagedResponse apply(ListExecutionsPage input) {
return new ListExecutionsPagedResponse(input);
}
},
input -> new ListExecutionsPagedResponse(input),
MoreExecutors.directExecutor());
}

@@ -175,14 +175,13 @@ public ExecutionsStubSettings.Builder getStubSettingsBuilder() {
return ((ExecutionsStubSettings.Builder) getStubSettings());
}

// NEXT_MAJOR_VER: remove 'throws Exception'.
/**
* Applies the given settings updater function to all of the unary API methods in this service.
*
* <p>Note: This method does not support applying settings to streaming methods.
*/
public Builder applyToAllUnaryMethods(
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
super.applyToAllUnaryMethods(
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
return this;
@@ -360,14 +360,13 @@ private static Builder initDefaults(Builder builder) {
return builder;
}

// NEXT_MAJOR_VER: remove 'throws Exception'.
/**
* Applies the given settings updater function to all of the unary API methods in this service.
*
* <p>Note: This method does not support applying settings to streaming methods.
*/
public Builder applyToAllUnaryMethods(
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater);
return this;
}
@@ -23,7 +23,6 @@
import com.google.api.gax.grpc.GrpcCallSettings;
import com.google.api.gax.grpc.GrpcStubCallableFactory;
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.RequestParamsExtractor;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.workflows.executions.v1.CancelExecutionRequest;
import com.google.cloud.workflows.executions.v1.CreateExecutionRequest;
@@ -36,7 +35,6 @@
import io.grpc.MethodDescriptor;
import io.grpc.protobuf.ProtoUtils;
import java.io.IOException;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import javax.annotation.Generated;

@@ -142,52 +140,40 @@ protected GrpcExecutionsStub(
GrpcCallSettings.<ListExecutionsRequest, ListExecutionsResponse>newBuilder()
.setMethodDescriptor(listExecutionsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ListExecutionsRequest>() {
@Override
public Map<String, String> extract(ListExecutionsRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
})
.build();
GrpcCallSettings<CreateExecutionRequest, Execution> createExecutionTransportSettings =
GrpcCallSettings.<CreateExecutionRequest, Execution>newBuilder()
.setMethodDescriptor(createExecutionMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<CreateExecutionRequest>() {
@Override
public Map<String, String> extract(CreateExecutionRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
})
.build();
GrpcCallSettings<GetExecutionRequest, Execution> getExecutionTransportSettings =
GrpcCallSettings.<GetExecutionRequest, Execution>newBuilder()
.setMethodDescriptor(getExecutionMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<GetExecutionRequest>() {
@Override
public Map<String, String> extract(GetExecutionRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
})
.build();
GrpcCallSettings<CancelExecutionRequest, Execution> cancelExecutionTransportSettings =
GrpcCallSettings.<CancelExecutionRequest, Execution>newBuilder()
.setMethodDescriptor(cancelExecutionMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<CancelExecutionRequest>() {
@Override
public Map<String, String> extract(CancelExecutionRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
})
.build();

@@ -243,7 +229,13 @@ public UnaryCallable<CancelExecutionRequest, Execution> cancelExecutionCallable(

@Override
public final void close() {
shutdown();
try {
backgroundResources.close();
} catch (RuntimeException e) {
throw e;
} catch (Exception e) {
throw new IllegalStateException("Failed to close resource", e);
}
}

@Override
@@ -16,7 +16,6 @@

package com.google.cloud.workflows.executions.v1beta;

import com.google.api.core.ApiFunction;
import com.google.api.core.ApiFuture;
import com.google.api.core.ApiFutures;
import com.google.api.core.BetaApi;
@@ -640,12 +639,7 @@ public static ApiFuture<ListExecutionsPagedResponse> createAsync(
ListExecutionsPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListExecutionsPage, ListExecutionsPagedResponse>() {
@Override
public ListExecutionsPagedResponse apply(ListExecutionsPage input) {
return new ListExecutionsPagedResponse(input);
}
},
input -> new ListExecutionsPagedResponse(input),
MoreExecutors.directExecutor());
}

@@ -176,14 +176,13 @@ public ExecutionsStubSettings.Builder getStubSettingsBuilder() {
return ((ExecutionsStubSettings.Builder) getStubSettings());
}

// NEXT_MAJOR_VER: remove 'throws Exception'.
/**
* Applies the given settings updater function to all of the unary API methods in this service.
*
* <p>Note: This method does not support applying settings to streaming methods.
*/
public Builder applyToAllUnaryMethods(
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
super.applyToAllUnaryMethods(
getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater);
return this;
@@ -361,14 +361,13 @@ private static Builder initDefaults(Builder builder) {
return builder;
}

// NEXT_MAJOR_VER: remove 'throws Exception'.
/**
* Applies the given settings updater function to all of the unary API methods in this service.
*
* <p>Note: This method does not support applying settings to streaming methods.
*/
public Builder applyToAllUnaryMethods(
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) throws Exception {
ApiFunction<UnaryCallSettings.Builder<?, ?>, Void> settingsUpdater) {
super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater);
return this;
}
@@ -24,7 +24,6 @@
import com.google.api.gax.grpc.GrpcCallSettings;
import com.google.api.gax.grpc.GrpcStubCallableFactory;
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.RequestParamsExtractor;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.workflows.executions.v1beta.CancelExecutionRequest;
import com.google.cloud.workflows.executions.v1beta.CreateExecutionRequest;
@@ -37,7 +36,6 @@
import io.grpc.MethodDescriptor;
import io.grpc.protobuf.ProtoUtils;
import java.io.IOException;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import javax.annotation.Generated;

@@ -147,52 +145,40 @@ protected GrpcExecutionsStub(
GrpcCallSettings.<ListExecutionsRequest, ListExecutionsResponse>newBuilder()
.setMethodDescriptor(listExecutionsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ListExecutionsRequest>() {
@Override
public Map<String, String> extract(ListExecutionsRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
})
.build();
GrpcCallSettings<CreateExecutionRequest, Execution> createExecutionTransportSettings =
GrpcCallSettings.<CreateExecutionRequest, Execution>newBuilder()
.setMethodDescriptor(createExecutionMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<CreateExecutionRequest>() {
@Override
public Map<String, String> extract(CreateExecutionRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("parent", String.valueOf(request.getParent()));
return params.build();
})
.build();
GrpcCallSettings<GetExecutionRequest, Execution> getExecutionTransportSettings =
GrpcCallSettings.<GetExecutionRequest, Execution>newBuilder()
.setMethodDescriptor(getExecutionMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<GetExecutionRequest>() {
@Override
public Map<String, String> extract(GetExecutionRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
})
.build();
GrpcCallSettings<CancelExecutionRequest, Execution> cancelExecutionTransportSettings =
GrpcCallSettings.<CancelExecutionRequest, Execution>newBuilder()
.setMethodDescriptor(cancelExecutionMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<CancelExecutionRequest>() {
@Override
public Map<String, String> extract(CancelExecutionRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("name", String.valueOf(request.getName()));
return params.build();
})
.build();

@@ -248,7 +234,13 @@ public UnaryCallable<CancelExecutionRequest, Execution> cancelExecutionCallable(

@Override
public final void close() {
shutdown();
try {
backgroundResources.close();
} catch (RuntimeException e) {
throw e;
} catch (Exception e) {
throw new IllegalStateException("Failed to close resource", e);
}
}

@Override
@@ -11,16 +11,16 @@
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "551681f25e36b11829e87e580281350461f4f3f5",
"internalRef": "379784268"
"sha": "d9eaf41de44d953458b18712a3f240bb4c564e48",
"internalRef": "388535346"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "551681f25e36b11829e87e580281350461f4f3f5",
"internalRef": "379784268"
"sha": "d9eaf41de44d953458b18712a3f240bb4c564e48",
"internalRef": "388535346"
}
},
{

0 comments on commit 216bca3

Please sign in to comment.