From b5a7b5688e3505e0d49546162b41f56e2284a4d0 Mon Sep 17 00:00:00 2001 From: yoshi-automation Date: Thu, 28 Mar 2019 00:54:01 -0700 Subject: [PATCH] Regenerate securitycenter client --- .../v1/stub/GrpcSecurityCenterStub.java | 170 ++++++++++++++++++ .../v1beta1/stub/GrpcSecurityCenterStub.java | 170 ++++++++++++++++++ .../synth.metadata | 10 +- 3 files changed, 345 insertions(+), 5 deletions(-) diff --git a/google-cloud-clients/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/GrpcSecurityCenterStub.java b/google-cloud-clients/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/GrpcSecurityCenterStub.java index 6a0226581b62..08fefc212add 100644 --- a/google-cloud-clients/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/GrpcSecurityCenterStub.java +++ b/google-cloud-clients/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/stub/GrpcSecurityCenterStub.java @@ -28,6 +28,7 @@ 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.securitycenter.v1.CreateFindingRequest; import com.google.cloud.securitycenter.v1.CreateSourceRequest; @@ -53,6 +54,7 @@ import com.google.cloud.securitycenter.v1.UpdateOrganizationSettingsRequest; import com.google.cloud.securitycenter.v1.UpdateSecurityMarksRequest; import com.google.cloud.securitycenter.v1.UpdateSourceRequest; +import com.google.common.collect.ImmutableMap; import com.google.iam.v1.GetIamPolicyRequest; import com.google.iam.v1.Policy; import com.google.iam.v1.SetIamPolicyRequest; @@ -64,6 +66,7 @@ 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; @@ -318,78 +321,245 @@ protected GrpcSecurityCenterStub( GrpcCallSettings createSourceTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createSourceMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateSourceRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings createFindingTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createFindingMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateFindingRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings getIamPolicyTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetIamPolicyRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + } + }) .build(); GrpcCallSettings getOrganizationSettingsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getOrganizationSettingsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetOrganizationSettingsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings getSourceTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getSourceMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetSourceRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings groupAssetsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(groupAssetsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GroupAssetsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings groupFindingsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(groupFindingsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GroupFindingsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings listAssetsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listAssetsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListAssetsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings listFindingsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listFindingsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListFindingsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings listSourcesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listSourcesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListSourcesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings runAssetDiscoveryTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(runAssetDiscoveryMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(RunAssetDiscoveryRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings setFindingStateTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(setFindingStateMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(SetFindingStateRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings setIamPolicyTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(SetIamPolicyRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + } + }) .build(); GrpcCallSettings testIamPermissionsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(testIamPermissionsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(TestIamPermissionsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + } + }) .build(); GrpcCallSettings updateFindingTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateFindingMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateFindingRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("finding.name", String.valueOf(request.getFinding().getName())); + return params.build(); + } + }) .build(); GrpcCallSettings updateOrganizationSettingsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateOrganizationSettingsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract( + UpdateOrganizationSettingsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "organization_settings.name", + String.valueOf(request.getOrganizationSettings().getName())); + return params.build(); + } + }) .build(); GrpcCallSettings updateSourceTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateSourceMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateSourceRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("source.name", String.valueOf(request.getSource().getName())); + return params.build(); + } + }) .build(); GrpcCallSettings updateSecurityMarksTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateSecurityMarksMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateSecurityMarksRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "security_marks.name", + String.valueOf(request.getSecurityMarks().getName())); + return params.build(); + } + }) .build(); this.createSourceCallable = diff --git a/google-cloud-clients/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1beta1/stub/GrpcSecurityCenterStub.java b/google-cloud-clients/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1beta1/stub/GrpcSecurityCenterStub.java index ba4e2e62bafe..2500cbd67cea 100644 --- a/google-cloud-clients/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1beta1/stub/GrpcSecurityCenterStub.java +++ b/google-cloud-clients/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1beta1/stub/GrpcSecurityCenterStub.java @@ -28,6 +28,7 @@ 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.securitycenter.v1beta1.CreateFindingRequest; import com.google.cloud.securitycenter.v1beta1.CreateSourceRequest; @@ -53,6 +54,7 @@ import com.google.cloud.securitycenter.v1beta1.UpdateOrganizationSettingsRequest; import com.google.cloud.securitycenter.v1beta1.UpdateSecurityMarksRequest; import com.google.cloud.securitycenter.v1beta1.UpdateSourceRequest; +import com.google.common.collect.ImmutableMap; import com.google.iam.v1.GetIamPolicyRequest; import com.google.iam.v1.Policy; import com.google.iam.v1.SetIamPolicyRequest; @@ -64,6 +66,7 @@ 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; @@ -321,78 +324,245 @@ protected GrpcSecurityCenterStub( GrpcCallSettings createSourceTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createSourceMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateSourceRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings createFindingTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(createFindingMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateFindingRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings getIamPolicyTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetIamPolicyRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + } + }) .build(); GrpcCallSettings getOrganizationSettingsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getOrganizationSettingsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetOrganizationSettingsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings getSourceTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(getSourceMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetSourceRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings groupAssetsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(groupAssetsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GroupAssetsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings groupFindingsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(groupFindingsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GroupFindingsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings listAssetsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listAssetsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListAssetsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings listFindingsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listFindingsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListFindingsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings listSourcesTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(listSourcesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListSourcesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings runAssetDiscoveryTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(runAssetDiscoveryMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(RunAssetDiscoveryRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) .build(); GrpcCallSettings setFindingStateTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(setFindingStateMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(SetFindingStateRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) .build(); GrpcCallSettings setIamPolicyTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(SetIamPolicyRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + } + }) .build(); GrpcCallSettings testIamPermissionsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(testIamPermissionsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(TestIamPermissionsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + } + }) .build(); GrpcCallSettings updateFindingTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateFindingMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateFindingRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("finding.name", String.valueOf(request.getFinding().getName())); + return params.build(); + } + }) .build(); GrpcCallSettings updateOrganizationSettingsTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateOrganizationSettingsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract( + UpdateOrganizationSettingsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "organization_settings.name", + String.valueOf(request.getOrganizationSettings().getName())); + return params.build(); + } + }) .build(); GrpcCallSettings updateSourceTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateSourceMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateSourceRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("source.name", String.valueOf(request.getSource().getName())); + return params.build(); + } + }) .build(); GrpcCallSettings updateSecurityMarksTransportSettings = GrpcCallSettings.newBuilder() .setMethodDescriptor(updateSecurityMarksMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateSecurityMarksRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put( + "security_marks.name", + String.valueOf(request.getSecurityMarks().getName())); + return params.build(); + } + }) .build(); this.createSourceCallable = diff --git a/google-cloud-clients/google-cloud-securitycenter/synth.metadata b/google-cloud-clients/google-cloud-securitycenter/synth.metadata index 96d7b1176f39..dbcf969f0bf1 100644 --- a/google-cloud-clients/google-cloud-securitycenter/synth.metadata +++ b/google-cloud-clients/google-cloud-securitycenter/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-03-20T07:51:04.644878Z", + "updateTime": "2019-03-28T07:54:01.685088Z", "sources": [ { "generator": { "name": "artman", - "version": "0.16.18", - "dockerImage": "googleapis/artman@sha256:e8ac9200640e76d54643f370db71a1556bf254f565ce46b45a467bbcbacbdb37" + "version": "0.16.20", + "dockerImage": "googleapis/artman@sha256:e3c054a2fb85a12481c722af616c7fb6f1d02d862248385eecbec3e4240ebd1e" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "285b7fb430c19b2939313d79ae4ee5170d01cf35", - "internalRef": "239259121" + "sha": "6a84b3267b0a95e922608b9891219075047eee29", + "internalRef": "240640999" } } ],