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

Commit

Permalink
feat!: release gapic-generator-java v2.0.0 (#81)
Browse files Browse the repository at this point in the history
This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/ac2f064d-3d3b-450a-971d-7858aaf4e364/targets

- [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.)

PiperOrigin-RevId: 388535346
Source-Link: googleapis/googleapis@d9eaf41
Source-Link: googleapis/googleapis-gen@976c5ab
PiperOrigin-RevId: 388499329
Source-Link: googleapis/googleapis@bb0a090
Source-Link: googleapis/googleapis-gen@d196f38
  • Loading branch information
yoshi-automation authored Aug 6, 2021
1 parent 583c846 commit a86a136
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 88 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

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

private ListDomainsPagedResponse(ListDomainsPage page) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,14 +264,13 @@ public ManagedIdentitiesServiceStubSettings.Builder getStubSettingsBuilder() {
return ((ManagedIdentitiesServiceStubSettings.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 @@ -24,7 +24,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.managedidentities.v1.AttachTrustRequest;
import com.google.cloud.managedidentities.v1.CreateMicrosoftAdDomainRequest;
Expand All @@ -47,7 +46,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 @@ -240,131 +238,101 @@ protected GrpcManagedIdentitiesServiceStub(
GrpcCallSettings.<CreateMicrosoftAdDomainRequest, Operation>newBuilder()
.setMethodDescriptor(createMicrosoftAdDomainMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<CreateMicrosoftAdDomainRequest>() {
@Override
public Map<String, String> extract(CreateMicrosoftAdDomainRequest 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<ResetAdminPasswordRequest, ResetAdminPasswordResponse>
resetAdminPasswordTransportSettings =
GrpcCallSettings.<ResetAdminPasswordRequest, ResetAdminPasswordResponse>newBuilder()
.setMethodDescriptor(resetAdminPasswordMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ResetAdminPasswordRequest>() {
@Override
public Map<String, String> extract(ResetAdminPasswordRequest 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<ListDomainsRequest, ListDomainsResponse> listDomainsTransportSettings =
GrpcCallSettings.<ListDomainsRequest, ListDomainsResponse>newBuilder()
.setMethodDescriptor(listDomainsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ListDomainsRequest>() {
@Override
public Map<String, String> extract(ListDomainsRequest 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<GetDomainRequest, Domain> getDomainTransportSettings =
GrpcCallSettings.<GetDomainRequest, Domain>newBuilder()
.setMethodDescriptor(getDomainMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<GetDomainRequest>() {
@Override
public Map<String, String> extract(GetDomainRequest 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<UpdateDomainRequest, Operation> updateDomainTransportSettings =
GrpcCallSettings.<UpdateDomainRequest, Operation>newBuilder()
.setMethodDescriptor(updateDomainMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<UpdateDomainRequest>() {
@Override
public Map<String, String> extract(UpdateDomainRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("domain.name", String.valueOf(request.getDomain().getName()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("domain.name", String.valueOf(request.getDomain().getName()));
return params.build();
})
.build();
GrpcCallSettings<DeleteDomainRequest, Operation> deleteDomainTransportSettings =
GrpcCallSettings.<DeleteDomainRequest, Operation>newBuilder()
.setMethodDescriptor(deleteDomainMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<DeleteDomainRequest>() {
@Override
public Map<String, String> extract(DeleteDomainRequest 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<AttachTrustRequest, Operation> attachTrustTransportSettings =
GrpcCallSettings.<AttachTrustRequest, Operation>newBuilder()
.setMethodDescriptor(attachTrustMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<AttachTrustRequest>() {
@Override
public Map<String, String> extract(AttachTrustRequest 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<ReconfigureTrustRequest, Operation> reconfigureTrustTransportSettings =
GrpcCallSettings.<ReconfigureTrustRequest, Operation>newBuilder()
.setMethodDescriptor(reconfigureTrustMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ReconfigureTrustRequest>() {
@Override
public Map<String, String> extract(ReconfigureTrustRequest 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<DetachTrustRequest, Operation> detachTrustTransportSettings =
GrpcCallSettings.<DetachTrustRequest, Operation>newBuilder()
.setMethodDescriptor(detachTrustMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<DetachTrustRequest>() {
@Override
public Map<String, String> extract(DetachTrustRequest 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<ValidateTrustRequest, Operation> validateTrustTransportSettings =
GrpcCallSettings.<ValidateTrustRequest, Operation>newBuilder()
.setMethodDescriptor(validateTrustMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ValidateTrustRequest>() {
@Override
public Map<String, String> extract(ValidateTrustRequest 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 Expand Up @@ -554,7 +522,13 @@ public UnaryCallable<ValidateTrustRequest, Operation> validateTrustCallable() {

@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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -749,14 +749,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
4 changes: 2 additions & 2 deletions synth.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"git": {
"name": "googleapis-gen",
"remote": "https://github.com/googleapis/googleapis-gen.git",
"sha": "478f36572d7bcf1dc66038d0e76b9b3fa2abae63",
"internalRef": "379784268"
"sha": "976c5ab6f24b58c91fe04847ead1953f99d19e6a",
"internalRef": "388535346"
}
},
{
Expand Down

0 comments on commit a86a136

Please sign in to comment.