Skip to content
Permalink
Browse files
feat!: release gapic-generator-java v2.0.0 (#509)
This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/67939a45-8364-4a45-a469-4e074f9f361c/targets

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

PiperOrigin-RevId: 388535346
Source-Link: googleapis/googleapis@d9eaf41
PiperOrigin-RevId: 388499329
Source-Link: googleapis/googleapis@bb0a090
  • Loading branch information
yoshi-automation committed Aug 10, 2021
1 parent 5550952 commit cd8382f48f35385030d98f07bea51cce4979b593
Showing with 215 additions and 650 deletions.
  1. +4 −25 ...ecurityscanner/src/main/java/com/google/cloud/websecurityscanner/v1/WebSecurityScannerClient.java
  2. +1 −2 ...urityscanner/src/main/java/com/google/cloud/websecurityscanner/v1/WebSecurityScannerSettings.java
  3. +59 −95 ...scanner/src/main/java/com/google/cloud/websecurityscanner/v1/stub/GrpcWebSecurityScannerStub.java
  4. +1 −2 ...ner/src/main/java/com/google/cloud/websecurityscanner/v1/stub/WebSecurityScannerStubSettings.java
  5. +4 −25 ...tyscanner/src/main/java/com/google/cloud/websecurityscanner/v1alpha/WebSecurityScannerClient.java
  6. +1 −2 ...scanner/src/main/java/com/google/cloud/websecurityscanner/v1alpha/WebSecurityScannerSettings.java
  7. +59 −95 ...er/src/main/java/com/google/cloud/websecurityscanner/v1alpha/stub/GrpcWebSecurityScannerStub.java
  8. +1 −2 ...rc/main/java/com/google/cloud/websecurityscanner/v1alpha/stub/WebSecurityScannerStubSettings.java
  9. +4 −25 ...ityscanner/src/main/java/com/google/cloud/websecurityscanner/v1beta/WebSecurityScannerClient.java
  10. +1 −2 ...yscanner/src/main/java/com/google/cloud/websecurityscanner/v1beta/WebSecurityScannerSettings.java
  11. +59 −95 ...ner/src/main/java/com/google/cloud/websecurityscanner/v1beta/stub/GrpcWebSecurityScannerStub.java
  12. +1 −2 ...src/main/java/com/google/cloud/websecurityscanner/v1beta/stub/WebSecurityScannerStubSettings.java
  13. +1 −2 ...ityscanner/src/test/java/com/google/cloud/websecurityscanner/v1/WebSecurityScannerClientTest.java
  14. +12 −0 proto-google-cloud-websecurityscanner-v1/clirr-ignored-differences.xml
  15. +0 −8 proto-google-cloud-websecurityscanner-v1/pom.xml
  16. +0 −260 ...cloud-websecurityscanner-v1/src/main/java/com/google/cloud/websecurityscanner/v1/FindingName.java
  17. +7 −8 synth.metadata
@@ -16,7 +16,6 @@

package com.google.cloud.websecurityscanner.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;
@@ -946,12 +945,7 @@ public static ApiFuture<ListScanConfigsPagedResponse> createAsync(
ListScanConfigsPage.createEmptyPage().createPageAsync(context, futureResponse);
return ApiFutures.transform(
futurePage,
new ApiFunction<ListScanConfigsPage, ListScanConfigsPagedResponse>() {
@Override
public ListScanConfigsPagedResponse apply(ListScanConfigsPage input) {
return new ListScanConfigsPagedResponse(input);
}
},
input -> new ListScanConfigsPagedResponse(input),
MoreExecutors.directExecutor());
}

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

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

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

@@ -232,14 +232,13 @@ public WebSecurityScannerStubSettings.Builder getStubSettingsBuilder() {
return ((WebSecurityScannerStubSettings.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.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.websecurityscanner.v1.CreateScanConfigRequest;
import com.google.cloud.websecurityscanner.v1.DeleteScanConfigRequest;
@@ -55,7 +54,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;

@@ -274,173 +272,133 @@ protected GrpcWebSecurityScannerStub(
GrpcCallSettings.<CreateScanConfigRequest, ScanConfig>newBuilder()
.setMethodDescriptor(createScanConfigMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<CreateScanConfigRequest>() {
@Override
public Map<String, String> extract(CreateScanConfigRequest 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<DeleteScanConfigRequest, Empty> deleteScanConfigTransportSettings =
GrpcCallSettings.<DeleteScanConfigRequest, Empty>newBuilder()
.setMethodDescriptor(deleteScanConfigMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<DeleteScanConfigRequest>() {
@Override
public Map<String, String> extract(DeleteScanConfigRequest 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<GetScanConfigRequest, ScanConfig> getScanConfigTransportSettings =
GrpcCallSettings.<GetScanConfigRequest, ScanConfig>newBuilder()
.setMethodDescriptor(getScanConfigMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<GetScanConfigRequest>() {
@Override
public Map<String, String> extract(GetScanConfigRequest 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<ListScanConfigsRequest, ListScanConfigsResponse>
listScanConfigsTransportSettings =
GrpcCallSettings.<ListScanConfigsRequest, ListScanConfigsResponse>newBuilder()
.setMethodDescriptor(listScanConfigsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ListScanConfigsRequest>() {
@Override
public Map<String, String> extract(ListScanConfigsRequest 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<UpdateScanConfigRequest, ScanConfig> updateScanConfigTransportSettings =
GrpcCallSettings.<UpdateScanConfigRequest, ScanConfig>newBuilder()
.setMethodDescriptor(updateScanConfigMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<UpdateScanConfigRequest>() {
@Override
public Map<String, String> extract(UpdateScanConfigRequest request) {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put(
"scan_config.name", String.valueOf(request.getScanConfig().getName()));
return params.build();
}
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("scan_config.name", String.valueOf(request.getScanConfig().getName()));
return params.build();
})
.build();
GrpcCallSettings<StartScanRunRequest, ScanRun> startScanRunTransportSettings =
GrpcCallSettings.<StartScanRunRequest, ScanRun>newBuilder()
.setMethodDescriptor(startScanRunMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<StartScanRunRequest>() {
@Override
public Map<String, String> extract(StartScanRunRequest 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<GetScanRunRequest, ScanRun> getScanRunTransportSettings =
GrpcCallSettings.<GetScanRunRequest, ScanRun>newBuilder()
.setMethodDescriptor(getScanRunMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<GetScanRunRequest>() {
@Override
public Map<String, String> extract(GetScanRunRequest 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<ListScanRunsRequest, ListScanRunsResponse> listScanRunsTransportSettings =
GrpcCallSettings.<ListScanRunsRequest, ListScanRunsResponse>newBuilder()
.setMethodDescriptor(listScanRunsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ListScanRunsRequest>() {
@Override
public Map<String, String> extract(ListScanRunsRequest 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<StopScanRunRequest, ScanRun> stopScanRunTransportSettings =
GrpcCallSettings.<StopScanRunRequest, ScanRun>newBuilder()
.setMethodDescriptor(stopScanRunMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<StopScanRunRequest>() {
@Override
public Map<String, String> extract(StopScanRunRequest 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<ListCrawledUrlsRequest, ListCrawledUrlsResponse>
listCrawledUrlsTransportSettings =
GrpcCallSettings.<ListCrawledUrlsRequest, ListCrawledUrlsResponse>newBuilder()
.setMethodDescriptor(listCrawledUrlsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ListCrawledUrlsRequest>() {
@Override
public Map<String, String> extract(ListCrawledUrlsRequest 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<GetFindingRequest, Finding> getFindingTransportSettings =
GrpcCallSettings.<GetFindingRequest, Finding>newBuilder()
.setMethodDescriptor(getFindingMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<GetFindingRequest>() {
@Override
public Map<String, String> extract(GetFindingRequest 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<ListFindingsRequest, ListFindingsResponse> listFindingsTransportSettings =
GrpcCallSettings.<ListFindingsRequest, ListFindingsResponse>newBuilder()
.setMethodDescriptor(listFindingsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ListFindingsRequest>() {
@Override
public Map<String, String> extract(ListFindingsRequest 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<ListFindingTypeStatsRequest, ListFindingTypeStatsResponse>
listFindingTypeStatsTransportSettings =
GrpcCallSettings.<ListFindingTypeStatsRequest, ListFindingTypeStatsResponse>newBuilder()
.setMethodDescriptor(listFindingTypeStatsMethodDescriptor)
.setParamsExtractor(
new RequestParamsExtractor<ListFindingTypeStatsRequest>() {
@Override
public Map<String, String> extract(ListFindingTypeStatsRequest 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();

@@ -596,7 +554,13 @@ public UnaryCallable<ListFindingsRequest, ListFindingsPagedResponse> listFinding

@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
@@ -745,14 +745,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 cd8382f

Please sign in to comment.