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

Commit

Permalink
build: update from broken v1beta2 links to v1 (#628)
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 389649385
Source-Link: googleapis/googleapis@2c1c2ac
Source-Link: googleapis/googleapis-gen@a10d84a

feat!: release gapic-generator-java v2.0.0
Committer: @miraleung
PiperOrigin-RevId: 388535346
Source-Link: googleapis/googleapis@d9eaf41
Source-Link: googleapis/googleapis-gen@976c5ab
  • Loading branch information
gcf-owl-bot[bot] committed Aug 9, 2021
1 parent 0aaf5a3 commit ff1784f
Show file tree
Hide file tree
Showing 43 changed files with 353 additions and 1,283 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package com.google.cloud.dataproc.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;
Expand Down Expand Up @@ -944,12 +943,7 @@ public static ApiFuture<ListAutoscalingPoliciesPagedResponse> createAsync(
ListAutoscalingPoliciesPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListAutoscalingPoliciesPage, ListAutoscalingPoliciesPagedResponse>() {
@Override
public ListAutoscalingPoliciesPagedResponse apply(ListAutoscalingPoliciesPage input) {
return new ListAutoscalingPoliciesPagedResponse(input);
}
},
input -> new ListAutoscalingPoliciesPagedResponse(input),
MoreExecutors.directExecutor());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,14 +196,13 @@ public AutoscalingPolicyServiceStubSettings.Builder getStubSettingsBuilder() {
return ((AutoscalingPolicyServiceStubSettings.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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package com.google.cloud.dataproc.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;
Expand Down Expand Up @@ -1163,12 +1162,7 @@ public static ApiFuture<ListClustersPagedResponse> createAsync(
ListClustersPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListClustersPage, ListClustersPagedResponse>() {
@Override
public ListClustersPagedResponse apply(ListClustersPage input) {
return new ListClustersPagedResponse(input);
}
},
input -> new ListClustersPagedResponse(input),
MoreExecutors.directExecutor());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,14 +235,13 @@ public ClusterControllerStubSettings.Builder getStubSettingsBuilder() {
return ((ClusterControllerStubSettings.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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package com.google.cloud.dataproc.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;
Expand Down Expand Up @@ -852,14 +851,7 @@ public static ApiFuture<ListJobsPagedResponse> createAsync(
ApiFuture<ListJobsPage> futurePage =
ListJobsPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListJobsPage, ListJobsPagedResponse>() {
@Override
public ListJobsPagedResponse apply(ListJobsPage input) {
return new ListJobsPagedResponse(input);
}
},
MoreExecutors.directExecutor());
futurePage, input -> new ListJobsPagedResponse(input), MoreExecutors.directExecutor());
}

private ListJobsPagedResponse(ListJobsPage page) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,14 +198,13 @@ public JobControllerStubSettings.Builder getStubSettingsBuilder() {
return ((JobControllerStubSettings.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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package com.google.cloud.dataproc.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;
Expand Down Expand Up @@ -1679,12 +1678,7 @@ public static ApiFuture<ListWorkflowTemplatesPagedResponse> createAsync(
ListWorkflowTemplatesPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListWorkflowTemplatesPage, ListWorkflowTemplatesPagedResponse>() {
@Override
public ListWorkflowTemplatesPagedResponse apply(ListWorkflowTemplatesPage input) {
return new ListWorkflowTemplatesPagedResponse(input);
}
},
input -> new ListWorkflowTemplatesPagedResponse(input),
MoreExecutors.directExecutor());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,14 +224,13 @@ public WorkflowTemplateServiceStubSettings.Builder getStubSettingsBuilder() {
return ((WorkflowTemplateServiceStubSettings.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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -441,14 +441,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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -700,14 +700,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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.dataproc.v1.AutoscalingPolicy;
import com.google.cloud.dataproc.v1.CreateAutoscalingPolicyRequest;
Expand All @@ -38,7 +37,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;

Expand Down Expand Up @@ -171,41 +169,32 @@ protected GrpcAutoscalingPolicyServiceStub(
GrpcCallSettings.<CreateAutoscalingPolicyRequest, AutoscalingPolicy>newBuilder()
.setMethodDescriptor(createAutoscalingPolicyMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<CreateAutoscalingPolicyRequest>() {
@Override
public Map<String, String> extract(CreateAutoscalingPolicyRequest 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<UpdateAutoscalingPolicyRequest, AutoscalingPolicy>
updateAutoscalingPolicyTransportSettings =
GrpcCallSettings.<UpdateAutoscalingPolicyRequest, AutoscalingPolicy>newBuilder()
.setMethodDescriptor(updateAutoscalingPolicyMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<UpdateAutoscalingPolicyRequest>() {
@Override
public Map<String, String> extract(UpdateAutoscalingPolicyRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("policy.name", String.valueOf(request.getPolicy().getName()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("policy.name", String.valueOf(request.getPolicy().getName()));
return params.build();
})
.build();
GrpcCallSettings<GetAutoscalingPolicyRequest, AutoscalingPolicy>
getAutoscalingPolicyTransportSettings =
GrpcCallSettings.<GetAutoscalingPolicyRequest, AutoscalingPolicy>newBuilder()
.setMethodDescriptor(getAutoscalingPolicyMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<GetAutoscalingPolicyRequest>() {
@Override
public Map<String, String> extract(GetAutoscalingPolicyRequest 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<ListAutoscalingPoliciesRequest, ListAutoscalingPoliciesResponse>
Expand All @@ -214,27 +203,21 @@ public Map<String, String> extract(GetAutoscalingPolicyRequest request) {
.<ListAutoscalingPoliciesRequest, ListAutoscalingPoliciesResponse>newBuilder()
.setMethodDescriptor(listAutoscalingPoliciesMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ListAutoscalingPoliciesRequest>() {
@Override
public Map<String, String> extract(ListAutoscalingPoliciesRequest 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<DeleteAutoscalingPolicyRequest, Empty>
deleteAutoscalingPolicyTransportSettings =
GrpcCallSettings.<DeleteAutoscalingPolicyRequest, Empty>newBuilder()
.setMethodDescriptor(deleteAutoscalingPolicyMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<DeleteAutoscalingPolicyRequest>() {
@Override
public Map<String, String> extract(DeleteAutoscalingPolicyRequest 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();

Expand Down
Loading

0 comments on commit ff1784f

Please sign in to comment.