Skip to content
Permalink
Browse files
feat!: release gapic-generator-java v2.0.0 (#47)
  • Loading branch information
gcf-owl-bot[bot] committed Aug 4, 2021
1 parent d3fcbba commit 2e458a9d657f9a3dbc1d7bc51dd23901eaace09a
@@ -16,7 +16,6 @@

package com.google.cloud.tpu.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;
@@ -1369,14 +1368,7 @@ public static ApiFuture<ListNodesPagedResponse> createAsync(
ApiFuture<ListNodesPage> futurePage =
ListNodesPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListNodesPage, ListNodesPagedResponse>() {
@Override
public ListNodesPagedResponse apply(ListNodesPage input) {
return new ListNodesPagedResponse(input);
}
},
MoreExecutors.directExecutor());
futurePage, input -> new ListNodesPagedResponse(input), MoreExecutors.directExecutor());
}

private ListNodesPagedResponse(ListNodesPage page) {
@@ -1448,12 +1440,7 @@ public static ApiFuture<ListTensorFlowVersionsPagedResponse> createAsync(
ListTensorFlowVersionsPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListTensorFlowVersionsPage, ListTensorFlowVersionsPagedResponse>() {
@Override
public ListTensorFlowVersionsPagedResponse apply(ListTensorFlowVersionsPage input) {
return new ListTensorFlowVersionsPagedResponse(input);
}
},
input -> new ListTensorFlowVersionsPagedResponse(input),
MoreExecutors.directExecutor());
}

@@ -1540,12 +1527,7 @@ public static ApiFuture<ListAcceleratorTypesPagedResponse> createAsync(
ListAcceleratorTypesPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListAcceleratorTypesPage, ListAcceleratorTypesPagedResponse>() {
@Override
public ListAcceleratorTypesPagedResponse apply(ListAcceleratorTypesPage input) {
return new ListAcceleratorTypesPagedResponse(input);
}
},
input -> new ListAcceleratorTypesPagedResponse(input),
MoreExecutors.directExecutor());
}

@@ -252,14 +252,13 @@ public TpuStubSettings.Builder getStubSettingsBuilder() {
return ((TpuStubSettings.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;
@@ -26,7 +26,6 @@
import com.google.api.gax.grpc.GrpcStubCallableFactory;
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.OperationCallable;
import com.google.api.gax.rpc.RequestParamsExtractor;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.tpu.v1.AcceleratorType;
import com.google.cloud.tpu.v1.CreateNodeRequest;
@@ -52,7 +51,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;

@@ -237,91 +235,70 @@ protected GrpcTpuStub(
GrpcCallSettings.<ListNodesRequest, ListNodesResponse>newBuilder()
.setMethodDescriptor(listNodesMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ListNodesRequest>() {
@Override
public Map<String, String> extract(ListNodesRequest 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<GetNodeRequest, Node> getNodeTransportSettings =
GrpcCallSettings.<GetNodeRequest, Node>newBuilder()
.setMethodDescriptor(getNodeMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<GetNodeRequest>() {
@Override
public Map<String, String> extract(GetNodeRequest 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<CreateNodeRequest, Operation> createNodeTransportSettings =
GrpcCallSettings.<CreateNodeRequest, Operation>newBuilder()
.setMethodDescriptor(createNodeMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<CreateNodeRequest>() {
@Override
public Map<String, String> extract(CreateNodeRequest 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<DeleteNodeRequest, Operation> deleteNodeTransportSettings =
GrpcCallSettings.<DeleteNodeRequest, Operation>newBuilder()
.setMethodDescriptor(deleteNodeMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<DeleteNodeRequest>() {
@Override
public Map<String, String> extract(DeleteNodeRequest 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<ReimageNodeRequest, Operation> reimageNodeTransportSettings =
GrpcCallSettings.<ReimageNodeRequest, Operation>newBuilder()
.setMethodDescriptor(reimageNodeMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ReimageNodeRequest>() {
@Override
public Map<String, String> extract(ReimageNodeRequest 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<StopNodeRequest, Operation> stopNodeTransportSettings =
GrpcCallSettings.<StopNodeRequest, Operation>newBuilder()
.setMethodDescriptor(stopNodeMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<StopNodeRequest>() {
@Override
public Map<String, String> extract(StopNodeRequest 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<StartNodeRequest, Operation> startNodeTransportSettings =
GrpcCallSettings.<StartNodeRequest, Operation>newBuilder()
.setMethodDescriptor(startNodeMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<StartNodeRequest>() {
@Override
public Map<String, String> extract(StartNodeRequest 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<ListTensorFlowVersionsRequest, ListTensorFlowVersionsResponse>
@@ -330,55 +307,43 @@ public Map<String, String> extract(StartNodeRequest request) {
.<ListTensorFlowVersionsRequest, ListTensorFlowVersionsResponse>newBuilder()
.setMethodDescriptor(listTensorFlowVersionsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ListTensorFlowVersionsRequest>() {
@Override
public Map<String, String> extract(ListTensorFlowVersionsRequest 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<GetTensorFlowVersionRequest, TensorFlowVersion>
getTensorFlowVersionTransportSettings =
GrpcCallSettings.<GetTensorFlowVersionRequest, TensorFlowVersion>newBuilder()
.setMethodDescriptor(getTensorFlowVersionMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<GetTensorFlowVersionRequest>() {
@Override
public Map<String, String> extract(GetTensorFlowVersionRequest 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<ListAcceleratorTypesRequest, ListAcceleratorTypesResponse>
listAcceleratorTypesTransportSettings =
GrpcCallSettings.<ListAcceleratorTypesRequest, ListAcceleratorTypesResponse>newBuilder()
.setMethodDescriptor(listAcceleratorTypesMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ListAcceleratorTypesRequest>() {
@Override
public Map<String, String> extract(ListAcceleratorTypesRequest 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<GetAcceleratorTypeRequest, AcceleratorType>
getAcceleratorTypeTransportSettings =
GrpcCallSettings.<GetAcceleratorTypeRequest, AcceleratorType>newBuilder()
.setMethodDescriptor(getAcceleratorTypeMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<GetAcceleratorTypeRequest>() {
@Override
public Map<String, String> extract(GetAcceleratorTypeRequest 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();

@@ -841,14 +841,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;
}

0 comments on commit 2e458a9

Please sign in to comment.