diff --git a/.github/readme/synth.metadata/synth.metadata b/.github/readme/synth.metadata/synth.metadata index ed5f374a..28f894ee 100644 --- a/.github/readme/synth.metadata/synth.metadata +++ b/.github/readme/synth.metadata/synth.metadata @@ -4,14 +4,14 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-containeranalysis.git", - "sha": "979b50a50903ba0836bd516d3f759da9d97cc048" + "sha": "2f8c44bfc7165dfd6cc37f8661402a488d4447e8" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "6946fd71ae9215b0e7ae188f5057df765ee6d7d2" + "sha": "0199c79b8324fba66476300824aa931788c47e2d" } } ] diff --git a/CHANGELOG.md b/CHANGELOG.md index dc1a23fd..cb108139 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.2.13](https://www.github.com/googleapis/java-containeranalysis/compare/v1.2.12...v1.2.13) (2021-02-25) + + +### Documentation + +* generate samples in gapic client classes ([#454](https://www.github.com/googleapis/java-containeranalysis/issues/454)) ([874915c](https://www.github.com/googleapis/java-containeranalysis/commit/874915cb9c8f42c1e56824cd4a8de44affbc7dc9)) + ### [1.2.12](https://www.github.com/googleapis/java-containeranalysis/compare/v1.2.11...v1.2.12) (2021-02-23) diff --git a/README.md b/README.md index 63551f5f..c297fba9 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file com.google.cloud libraries-bom - 16.4.0 + 18.0.0 pom import @@ -38,25 +38,25 @@ If you are using Maven without BOM, add this to your dependencies: com.google.cloud google-cloud-containeranalysis - 1.2.11 + 1.2.29 ``` If you are using Gradle 5.x or later, add this to your dependencies ```Groovy -implementation platform('com.google.cloud:libraries-bom:16.4.0') +implementation platform('com.google.cloud:libraries-bom:18.0.0') compile 'com.google.cloud:google-cloud-containeranalysis' ``` If you are using Gradle without BOM, add this to your dependencies ```Groovy -compile 'com.google.cloud:google-cloud-containeranalysis:1.2.11' +compile 'com.google.cloud:google-cloud-containeranalysis:1.2.29' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-containeranalysis" % "1.2.11" +libraryDependencies += "com.google.cloud" % "google-cloud-containeranalysis" % "1.2.29" ``` ## Authentication diff --git a/google-cloud-containeranalysis-bom/pom.xml b/google-cloud-containeranalysis-bom/pom.xml index c1731ba7..5c98262f 100644 --- a/google-cloud-containeranalysis-bom/pom.xml +++ b/google-cloud-containeranalysis-bom/pom.xml @@ -3,12 +3,12 @@ 4.0.0 com.google.cloud google-cloud-containeranalysis-bom - 1.2.29 + 1.2.30 pom com.google.cloud google-cloud-shared-config - 0.10.0 + 0.11.0 Google Cloud Container Analysis BOM @@ -64,27 +64,27 @@ com.google.api.grpc proto-google-cloud-containeranalysis-v1 - 1.2.29 + 1.2.30 com.google.api.grpc grpc-google-cloud-containeranalysis-v1beta1 - 0.88.29 + 0.88.30 com.google.cloud google-cloud-containeranalysis - 1.2.29 + 1.2.30 com.google.api.grpc grpc-google-cloud-containeranalysis-v1 - 1.2.29 + 1.2.30 com.google.api.grpc proto-google-cloud-containeranalysis-v1beta1 - 0.88.29 + 0.88.30 diff --git a/google-cloud-containeranalysis/pom.xml b/google-cloud-containeranalysis/pom.xml index a94bea78..cf7a2f43 100644 --- a/google-cloud-containeranalysis/pom.xml +++ b/google-cloud-containeranalysis/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-containeranalysis - 1.2.29 + 1.2.30 jar Google Cloud Container Analysis https://github.com/googleapis/java-containeranalysis @@ -11,7 +11,7 @@ com.google.cloud google-cloud-containeranalysis-parent - 1.2.29 + 1.2.30 google-cloud-containeranalysis diff --git a/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/ContainerAnalysisClient.java b/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/ContainerAnalysisClient.java index 1ed88581..bf4e0adb 100644 --- a/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/ContainerAnalysisClient.java +++ b/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/ContainerAnalysisClient.java @@ -53,6 +53,14 @@ *

This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * + *

{@code
+ * try (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
+ *   ResourceName resource = ProjectName.of("[PROJECT]");
+ *   Policy policy = Policy.newBuilder().build();
+ *   Policy response = containerAnalysisClient.setIamPolicy(resource, policy);
+ * }
+ * }
+ * *

Note: close() needs to be called on the ContainerAnalysisClient object to clean up resources * such as threads. In the example above, try-with-resources is used, which automatically calls * close(). @@ -172,6 +180,16 @@ public ContainerAnalysisStub getStub() { *

The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences. * + *

Sample code: + * + *

{@code
+   * try (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
+   *   ResourceName resource = ProjectName.of("[PROJECT]");
+   *   Policy policy = Policy.newBuilder().build();
+   *   Policy response = containerAnalysisClient.setIamPolicy(resource, policy);
+   * }
+   * }
+ * * @param resource REQUIRED: The resource for which the policy is being specified. See the * operation documentation for the appropriate value for this field. * @param policy REQUIRED: The complete policy to be applied to the `resource`. The size of the @@ -197,6 +215,16 @@ public final Policy setIamPolicy(ResourceName resource, Policy policy) { *

The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences. * + *

Sample code: + * + *

{@code
+   * try (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
+   *   String resource = ProjectName.of("[PROJECT]").toString();
+   *   Policy policy = Policy.newBuilder().build();
+   *   Policy response = containerAnalysisClient.setIamPolicy(resource, policy);
+   * }
+   * }
+ * * @param resource REQUIRED: The resource for which the policy is being specified. See the * operation documentation for the appropriate value for this field. * @param policy REQUIRED: The complete policy to be applied to the `resource`. The size of the @@ -219,6 +247,19 @@ public final Policy setIamPolicy(String resource, Policy policy) { *

The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences. * + *

Sample code: + * + *

{@code
+   * try (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(ProjectName.of("[PROJECT]").toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .build();
+   *   Policy response = containerAnalysisClient.setIamPolicy(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -236,6 +277,19 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) { * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences. * *

Sample code: + * + *

{@code
+   * try (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
+   *   SetIamPolicyRequest request =
+   *       SetIamPolicyRequest.newBuilder()
+   *           .setResource(ProjectName.of("[PROJECT]").toString())
+   *           .setPolicy(Policy.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = containerAnalysisClient.setIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
*/ public final UnaryCallable setIamPolicyCallable() { return stub.setIamPolicyCallable(); @@ -250,6 +304,15 @@ public final UnaryCallable setIamPolicyCallable() { *

The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences. * + *

Sample code: + * + *

{@code
+   * try (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
+   *   ResourceName resource = ProjectName.of("[PROJECT]");
+   *   Policy response = containerAnalysisClient.getIamPolicy(resource);
+   * }
+   * }
+ * * @param resource REQUIRED: The resource for which the policy is being requested. See the * operation documentation for the appropriate value for this field. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -271,6 +334,15 @@ public final Policy getIamPolicy(ResourceName resource) { *

The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences. * + *

Sample code: + * + *

{@code
+   * try (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
+   *   String resource = ProjectName.of("[PROJECT]").toString();
+   *   Policy response = containerAnalysisClient.getIamPolicy(resource);
+   * }
+   * }
+ * * @param resource REQUIRED: The resource for which the policy is being requested. See the * operation documentation for the appropriate value for this field. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -289,6 +361,19 @@ public final Policy getIamPolicy(String resource) { *

The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences. * + *

Sample code: + * + *

{@code
+   * try (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(ProjectName.of("[PROJECT]").toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   Policy response = containerAnalysisClient.getIamPolicy(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -306,6 +391,19 @@ public final Policy getIamPolicy(GetIamPolicyRequest request) { * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences. * *

Sample code: + * + *

{@code
+   * try (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
+   *   GetIamPolicyRequest request =
+   *       GetIamPolicyRequest.newBuilder()
+   *           .setResource(ProjectName.of("[PROJECT]").toString())
+   *           .setOptions(GetPolicyOptions.newBuilder().build())
+   *           .build();
+   *   ApiFuture future = containerAnalysisClient.getIamPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
*/ public final UnaryCallable getIamPolicyCallable() { return stub.getIamPolicyCallable(); @@ -319,6 +417,17 @@ public final UnaryCallable getIamPolicyCallable() { *

The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences. * + *

Sample code: + * + *

{@code
+   * try (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
+   *   ResourceName resource = ProjectName.of("[PROJECT]");
+   *   List permissions = new ArrayList<>();
+   *   TestIamPermissionsResponse response =
+   *       containerAnalysisClient.testIamPermissions(resource, permissions);
+   * }
+   * }
+ * * @param resource REQUIRED: The resource for which the policy detail is being requested. See the * operation documentation for the appropriate value for this field. * @param permissions The set of permissions to check for the `resource`. Permissions with @@ -344,6 +453,17 @@ public final TestIamPermissionsResponse testIamPermissions( *

The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences. * + *

Sample code: + * + *

{@code
+   * try (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
+   *   String resource = ProjectName.of("[PROJECT]").toString();
+   *   List permissions = new ArrayList<>();
+   *   TestIamPermissionsResponse response =
+   *       containerAnalysisClient.testIamPermissions(resource, permissions);
+   * }
+   * }
+ * * @param resource REQUIRED: The resource for which the policy detail is being requested. See the * operation documentation for the appropriate value for this field. * @param permissions The set of permissions to check for the `resource`. Permissions with @@ -369,6 +489,19 @@ public final TestIamPermissionsResponse testIamPermissions( *

The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences. * + *

Sample code: + * + *

{@code
+   * try (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(ProjectName.of("[PROJECT]").toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   TestIamPermissionsResponse response = containerAnalysisClient.testIamPermissions(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -385,6 +518,20 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq * `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences. * *

Sample code: + * + *

{@code
+   * try (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
+   *   TestIamPermissionsRequest request =
+   *       TestIamPermissionsRequest.newBuilder()
+   *           .setResource(ProjectName.of("[PROJECT]").toString())
+   *           .addAllPermissions(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       containerAnalysisClient.testIamPermissionsCallable().futureCall(request);
+   *   // Do something.
+   *   TestIamPermissionsResponse response = future.get();
+   * }
+   * }
*/ public final UnaryCallable testIamPermissionsCallable() { @@ -395,6 +542,17 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq /** * Gets a summary of the number and severity of occurrences. * + *

Sample code: + * + *

{@code
+   * try (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   String filter = "filter-1274492040";
+   *   VulnerabilityOccurrencesSummary response =
+   *       containerAnalysisClient.getVulnerabilityOccurrencesSummary(parent, filter);
+   * }
+   * }
+ * * @param parent The name of the project to get a vulnerability summary for in the form of * `projects/[PROJECT_ID]`. * @param filter The filter expression. @@ -414,6 +572,17 @@ public final VulnerabilityOccurrencesSummary getVulnerabilityOccurrencesSummary( /** * Gets a summary of the number and severity of occurrences. * + *

Sample code: + * + *

{@code
+   * try (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
+   *   String parent = ProjectName.of("[PROJECT]").toString();
+   *   String filter = "filter-1274492040";
+   *   VulnerabilityOccurrencesSummary response =
+   *       containerAnalysisClient.getVulnerabilityOccurrencesSummary(parent, filter);
+   * }
+   * }
+ * * @param parent The name of the project to get a vulnerability summary for in the form of * `projects/[PROJECT_ID]`. * @param filter The filter expression. @@ -433,6 +602,20 @@ public final VulnerabilityOccurrencesSummary getVulnerabilityOccurrencesSummary( /** * Gets a summary of the number and severity of occurrences. * + *

Sample code: + * + *

{@code
+   * try (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
+   *   GetVulnerabilityOccurrencesSummaryRequest request =
+   *       GetVulnerabilityOccurrencesSummaryRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   VulnerabilityOccurrencesSummary response =
+   *       containerAnalysisClient.getVulnerabilityOccurrencesSummary(request);
+   * }
+   * }
+ * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -446,6 +629,20 @@ public final VulnerabilityOccurrencesSummary getVulnerabilityOccurrencesSummary( * Gets a summary of the number and severity of occurrences. * *

Sample code: + * + *

{@code
+   * try (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
+   *   GetVulnerabilityOccurrencesSummaryRequest request =
+   *       GetVulnerabilityOccurrencesSummaryRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   ApiFuture future =
+   *       containerAnalysisClient.getVulnerabilityOccurrencesSummaryCallable().futureCall(request);
+   *   // Do something.
+   *   VulnerabilityOccurrencesSummary response = future.get();
+   * }
+   * }
*/ public final UnaryCallable< GetVulnerabilityOccurrencesSummaryRequest, VulnerabilityOccurrencesSummary> diff --git a/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/gapic_metadata.json b/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/gapic_metadata.json new file mode 100644 index 00000000..bfd2bb81 --- /dev/null +++ b/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/gapic_metadata.json @@ -0,0 +1,30 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.devtools.containeranalysis.v1", + "libraryPackage": "com.google.cloud.devtools.containeranalysis.v1", + "services": { + "ContainerAnalysis": { + "clients": { + "grpc": { + "libraryClient": "ContainerAnalysisClient", + "rpcs": { + "GetIamPolicy": { + "methods": ["getIamPolicy", "getIamPolicy", "getIamPolicy", "getIamPolicyCallable"] + }, + "GetVulnerabilityOccurrencesSummary": { + "methods": ["getVulnerabilityOccurrencesSummary", "getVulnerabilityOccurrencesSummary", "getVulnerabilityOccurrencesSummary", "getVulnerabilityOccurrencesSummaryCallable"] + }, + "SetIamPolicy": { + "methods": ["setIamPolicy", "setIamPolicy", "setIamPolicy", "setIamPolicyCallable"] + }, + "TestIamPermissions": { + "methods": ["testIamPermissions", "testIamPermissions", "testIamPermissions", "testIamPermissionsCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/package-info.java b/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/package-info.java index 20d05f6c..597ebd66 100644 --- a/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/package-info.java +++ b/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/package-info.java @@ -32,6 +32,14 @@ * to that note. * *

Sample for ContainerAnalysisClient: + * + *

{@code
+ * try (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
+ *   ResourceName resource = ProjectName.of("[PROJECT]");
+ *   Policy policy = Policy.newBuilder().build();
+ *   Policy response = containerAnalysisClient.setIamPolicy(resource, policy);
+ * }
+ * }
*/ @Generated("by gapic-generator-java") package com.google.cloud.devtools.containeranalysis.v1; diff --git a/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/stub/GrpcContainerAnalysisStub.java b/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/stub/GrpcContainerAnalysisStub.java index 8bca88c1..051df17e 100644 --- a/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/stub/GrpcContainerAnalysisStub.java +++ b/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/stub/GrpcContainerAnalysisStub.java @@ -226,19 +226,23 @@ public GrpcOperationsStub getOperationsStub() { return operationsStub; } + @Override public UnaryCallable setIamPolicyCallable() { return setIamPolicyCallable; } + @Override public UnaryCallable getIamPolicyCallable() { return getIamPolicyCallable; } + @Override public UnaryCallable testIamPermissionsCallable() { return testIamPermissionsCallable; } + @Override public UnaryCallable getVulnerabilityOccurrencesSummaryCallable() { return getVulnerabilityOccurrencesSummaryCallable; diff --git a/google-cloud-containeranalysis/src/test/java/com/google/cloud/devtools/containeranalysis/v1/MockContainerAnalysisImpl.java b/google-cloud-containeranalysis/src/test/java/com/google/cloud/devtools/containeranalysis/v1/MockContainerAnalysisImpl.java index ee65fb5d..936c608a 100644 --- a/google-cloud-containeranalysis/src/test/java/com/google/cloud/devtools/containeranalysis/v1/MockContainerAnalysisImpl.java +++ b/google-cloud-containeranalysis/src/test/java/com/google/cloud/devtools/containeranalysis/v1/MockContainerAnalysisImpl.java @@ -75,7 +75,13 @@ public void setIamPolicy(SetIamPolicyRequest request, StreamObserver res } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method SetIamPolicy, expected %s or %s", + response.getClass().getName(), + Policy.class.getName(), + Exception.class.getName()))); } } @@ -89,7 +95,13 @@ public void getIamPolicy(GetIamPolicyRequest request, StreamObserver res } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetIamPolicy, expected %s or %s", + response.getClass().getName(), + Policy.class.getName(), + Exception.class.getName()))); } } @@ -105,7 +117,13 @@ public void testIamPermissions( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method TestIamPermissions, expected %s or %s", + response.getClass().getName(), + TestIamPermissionsResponse.class.getName(), + Exception.class.getName()))); } } @@ -121,7 +139,13 @@ public void getVulnerabilityOccurrencesSummary( } else if (response instanceof Exception) { responseObserver.onError(((Exception) response)); } else { - responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method GetVulnerabilityOccurrencesSummary, expected %s or %s", + response.getClass().getName(), + VulnerabilityOccurrencesSummary.class.getName(), + Exception.class.getName()))); } } } diff --git a/grpc-google-cloud-containeranalysis-v1/pom.xml b/grpc-google-cloud-containeranalysis-v1/pom.xml index b242b948..009ab35f 100644 --- a/grpc-google-cloud-containeranalysis-v1/pom.xml +++ b/grpc-google-cloud-containeranalysis-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-containeranalysis-v1 - 1.2.29 + 1.2.30 grpc-google-cloud-containeranalysis-v1 GRPC library for grpc-google-cloud-containeranalysis-v1 com.google.cloud google-cloud-containeranalysis-parent - 1.2.29 + 1.2.30 diff --git a/grpc-google-cloud-containeranalysis-v1beta1/pom.xml b/grpc-google-cloud-containeranalysis-v1beta1/pom.xml index e0a5ef15..4a3ec4eb 100644 --- a/grpc-google-cloud-containeranalysis-v1beta1/pom.xml +++ b/grpc-google-cloud-containeranalysis-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-containeranalysis-v1beta1 - 0.88.29 + 0.88.30 grpc-google-cloud-containeranalysis-v1beta1 GRPC library for grpc-google-cloud-containeranalysis-v1beta1 com.google.cloud google-cloud-containeranalysis-parent - 1.2.29 + 1.2.30 diff --git a/pom.xml b/pom.xml index c371e5ba..1f8b1ca4 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-containeranalysis-parent pom - 1.2.29 + 1.2.30 Google Cloud Container Analysis Parent https://github.com/googleapis/java-containeranalysis @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 0.10.0 + 0.11.0 @@ -70,27 +70,27 @@ com.google.api.grpc proto-google-cloud-containeranalysis-v1 - 1.2.29 + 1.2.30 com.google.api.grpc proto-google-cloud-containeranalysis-v1beta1 - 0.88.29 + 0.88.30 com.google.api.grpc grpc-google-cloud-containeranalysis-v1beta1 - 0.88.29 + 0.88.30 com.google.api.grpc grpc-google-cloud-containeranalysis-v1 - 1.2.29 + 1.2.30 com.google.cloud google-cloud-containeranalysis - 1.2.29 + 1.2.30 diff --git a/proto-google-cloud-containeranalysis-v1/pom.xml b/proto-google-cloud-containeranalysis-v1/pom.xml index 13f43324..ba7d00e7 100644 --- a/proto-google-cloud-containeranalysis-v1/pom.xml +++ b/proto-google-cloud-containeranalysis-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-containeranalysis-v1 - 1.2.29 + 1.2.30 proto-google-cloud-containeranalysis-v1 PROTO library for proto-google-cloud-containeranalysis-v1 com.google.cloud google-cloud-containeranalysis-parent - 1.2.29 + 1.2.30 diff --git a/proto-google-cloud-containeranalysis-v1beta1/pom.xml b/proto-google-cloud-containeranalysis-v1beta1/pom.xml index 36ff7ae3..5ad1dc04 100644 --- a/proto-google-cloud-containeranalysis-v1beta1/pom.xml +++ b/proto-google-cloud-containeranalysis-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-containeranalysis-v1beta1 - 0.88.29 + 0.88.30 proto-google-cloud-containeranalysis-v1beta1 PROTO library for proto-google-cloud-containeranalysis-v1beta1 com.google.cloud google-cloud-containeranalysis-parent - 1.2.29 + 1.2.30 diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 0550d06b..7f2ca544 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-containeranalysis - 1.2.11 + 1.2.29 diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index d2d365f7..e7c6f65f 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-containeranalysis - 1.2.11 + 1.2.29 diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 9b00f194..6dc029c4 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -30,7 +30,7 @@ com.google.cloud libraries-bom - 16.4.0 + 18.0.0 pom import diff --git a/synth.metadata b/synth.metadata index 989fd3b1..b1dc0514 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-containeranalysis.git", - "sha": "6b9f88aad1d512c8080f797768dd05660630047d" + "sha": "792daa15c0a78a9e68df445ce36fe0c7d9f47469" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "cb7fc620590382a4a2ea6ffdf6f51ae0e77bbbb5", - "internalRef": "334682521" + "sha": "af8f71dae961ee036a0ac52a1965270149a6b2c9", + "internalRef": "358516065" } }, { @@ -103,6 +103,7 @@ "codecov.yaml", "google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/ContainerAnalysisClient.java", "google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/ContainerAnalysisSettings.java", + "google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/gapic_metadata.json", "google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/package-info.java", "google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/stub/ContainerAnalysisStub.java", "google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/stub/ContainerAnalysisStubSettings.java", diff --git a/versions.txt b/versions.txt index 51b8d952..88bbe182 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -proto-google-cloud-containeranalysis-v1:1.2.29:1.2.29 -proto-google-cloud-containeranalysis-v1beta1:0.88.29:0.88.29 -grpc-google-cloud-containeranalysis-v1beta1:0.88.29:0.88.29 -grpc-google-cloud-containeranalysis-v1:1.2.29:1.2.29 -google-cloud-containeranalysis:1.2.29:1.2.29 +proto-google-cloud-containeranalysis-v1:1.2.30:1.2.30 +proto-google-cloud-containeranalysis-v1beta1:0.88.30:0.88.30 +grpc-google-cloud-containeranalysis-v1beta1:0.88.30:0.88.30 +grpc-google-cloud-containeranalysis-v1:1.2.30:1.2.30 +google-cloud-containeranalysis:1.2.30:1.2.30