Skip to content
Permalink
Browse files
feat!: release gapic-generator-java v2.0.0 (#348)
* 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: Neenu Shaji <Neenu1995@users.noreply.github.com>
  • Loading branch information
yoshi-automation and Neenu1995 committed Aug 12, 2021
1 parent c5f2ce7 commit cb65ffe298935753f02c60639b366c66173c1dba
@@ -16,7 +16,6 @@

package io.grafeas.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;
@@ -1750,12 +1749,7 @@ public static ApiFuture<ListOccurrencesPagedResponse> createAsync(
ListOccurrencesPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListOccurrencesPage, ListOccurrencesPagedResponse>() {
@Override
public ListOccurrencesPagedResponse apply(ListOccurrencesPage input) {
return new ListOccurrencesPagedResponse(input);
}
},
input -> new ListOccurrencesPagedResponse(input),
MoreExecutors.directExecutor());
}

@@ -1827,14 +1821,7 @@ public static ApiFuture<ListNotesPagedResponse> createAsync(
ApiFuture<ListNotesPage> futurePage =
ListNotesPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListNotesPage, ListNotesPagedResponse>() {
@Override
public ListNotesPagedResponse apply(ListNotesPage input) {
return new ListNotesPagedResponse(input);
}
},
MoreExecutors.directExecutor());
futurePage, input -> new ListNotesPagedResponse(input), MoreExecutors.directExecutor());
}

private ListNotesPagedResponse(ListNotesPage page) {
@@ -1904,12 +1891,7 @@ public static ApiFuture<ListNoteOccurrencesPagedResponse> createAsync(
ListNoteOccurrencesPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListNoteOccurrencesPage, ListNoteOccurrencesPagedResponse>() {
@Override
public ListNoteOccurrencesPagedResponse apply(ListNoteOccurrencesPage input) {
return new ListNoteOccurrencesPagedResponse(input);
}
},
input -> new ListNoteOccurrencesPagedResponse(input),
MoreExecutors.directExecutor());
}

@@ -233,14 +233,13 @@ public GrafeasStubSettings.Builder getStubSettingsBuilder() {
return ((GrafeasStubSettings.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;
@@ -707,14 +707,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;
}
@@ -25,7 +25,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.common.collect.ImmutableMap;
import com.google.longrunning.stub.GrpcOperationsStub;
@@ -54,7 +53,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;

@@ -270,53 +268,41 @@ protected GrpcGrafeasStub(
GrpcCallSettings.<GetOccurrenceRequest, Occurrence>newBuilder()
.setMethodDescriptor(getOccurrenceMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<GetOccurrenceRequest>() {
@Override
public Map<String, String> extract(GetOccurrenceRequest 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<ListOccurrencesRequest, ListOccurrencesResponse>
listOccurrencesTransportSettings =
GrpcCallSettings.<ListOccurrencesRequest, ListOccurrencesResponse>newBuilder()
.setMethodDescriptor(listOccurrencesMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ListOccurrencesRequest>() {
@Override
public Map<String, String> extract(ListOccurrencesRequest 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<DeleteOccurrenceRequest, Empty> deleteOccurrenceTransportSettings =
GrpcCallSettings.<DeleteOccurrenceRequest, Empty>newBuilder()
.setMethodDescriptor(deleteOccurrenceMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<DeleteOccurrenceRequest>() {
@Override
public Map<String, String> extract(DeleteOccurrenceRequest 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<CreateOccurrenceRequest, Occurrence> createOccurrenceTransportSettings =
GrpcCallSettings.<CreateOccurrenceRequest, Occurrence>newBuilder()
.setMethodDescriptor(createOccurrenceMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<CreateOccurrenceRequest>() {
@Override
public Map<String, String> extract(CreateOccurrenceRequest 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<BatchCreateOccurrencesRequest, BatchCreateOccurrencesResponse>
@@ -325,132 +311,102 @@ public Map<String, String> extract(CreateOccurrenceRequest request) {
.<BatchCreateOccurrencesRequest, BatchCreateOccurrencesResponse>newBuilder()
.setMethodDescriptor(batchCreateOccurrencesMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<BatchCreateOccurrencesRequest>() {
@Override
public Map<String, String> extract(BatchCreateOccurrencesRequest 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<UpdateOccurrenceRequest, Occurrence> updateOccurrenceTransportSettings =
GrpcCallSettings.<UpdateOccurrenceRequest, Occurrence>newBuilder()
.setMethodDescriptor(updateOccurrenceMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<UpdateOccurrenceRequest>() {
@Override
public Map<String, String> extract(UpdateOccurrenceRequest 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<GetOccurrenceNoteRequest, Note> getOccurrenceNoteTransportSettings =
GrpcCallSettings.<GetOccurrenceNoteRequest, Note>newBuilder()
.setMethodDescriptor(getOccurrenceNoteMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<GetOccurrenceNoteRequest>() {
@Override
public Map<String, String> extract(GetOccurrenceNoteRequest 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<GetNoteRequest, Note> getNoteTransportSettings =
GrpcCallSettings.<GetNoteRequest, Note>newBuilder()
.setMethodDescriptor(getNoteMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<GetNoteRequest>() {
@Override
public Map<String, String> extract(GetNoteRequest 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<ListNotesRequest, ListNotesResponse> listNotesTransportSettings =
GrpcCallSettings.<ListNotesRequest, ListNotesResponse>newBuilder()
.setMethodDescriptor(listNotesMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ListNotesRequest>() {
@Override
public Map<String, String> extract(ListNotesRequest 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<DeleteNoteRequest, Empty> deleteNoteTransportSettings =
GrpcCallSettings.<DeleteNoteRequest, Empty>newBuilder()
.setMethodDescriptor(deleteNoteMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<DeleteNoteRequest>() {
@Override
public Map<String, String> extract(DeleteNoteRequest 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<CreateNoteRequest, Note> createNoteTransportSettings =
GrpcCallSettings.<CreateNoteRequest, Note>newBuilder()
.setMethodDescriptor(createNoteMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<CreateNoteRequest>() {
@Override
public Map<String, String> extract(CreateNoteRequest 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<BatchCreateNotesRequest, BatchCreateNotesResponse>
batchCreateNotesTransportSettings =
GrpcCallSettings.<BatchCreateNotesRequest, BatchCreateNotesResponse>newBuilder()
.setMethodDescriptor(batchCreateNotesMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<BatchCreateNotesRequest>() {
@Override
public Map<String, String> extract(BatchCreateNotesRequest 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<UpdateNoteRequest, Note> updateNoteTransportSettings =
GrpcCallSettings.<UpdateNoteRequest, Note>newBuilder()
.setMethodDescriptor(updateNoteMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<UpdateNoteRequest>() {
@Override
public Map<String, String> extract(UpdateNoteRequest 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<ListNoteOccurrencesRequest, ListNoteOccurrencesResponse>
listNoteOccurrencesTransportSettings =
GrpcCallSettings.<ListNoteOccurrencesRequest, ListNoteOccurrencesResponse>newBuilder()
.setMethodDescriptor(listNoteOccurrencesMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ListNoteOccurrencesRequest>() {
@Override
public Map<String, String> extract(ListNoteOccurrencesRequest 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();

@@ -614,7 +570,13 @@ public UnaryCallable<UpdateNoteRequest, Note> updateNoteCallable() {

@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,8 +11,8 @@
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "551681f25e36b11829e87e580281350461f4f3f5",
"internalRef": "379784268"
"sha": "d9eaf41de44d953458b18712a3f240bb4c564e48",
"internalRef": "388535346"
}
},
{

0 comments on commit cb65ffe

Please sign in to comment.