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 5e67529c..8219bfbd 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 @@ -21,6 +21,9 @@ import com.google.api.resourcenames.ResourceName; import com.google.cloud.devtools.containeranalysis.v1.stub.ContainerAnalysisStub; import com.google.cloud.devtools.containeranalysis.v1.stub.ContainerAnalysisStubSettings; +import com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest; +import com.google.containeranalysis.v1.ProjectName; +import com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary; import com.google.iam.v1.GetIamPolicyRequest; import com.google.iam.v1.Policy; import com.google.iam.v1.SetIamPolicyRequest; @@ -52,7 +55,7 @@ *
*
* try (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
- * String resource = "";
+ * ResourceName resource = ProjectName.of("[PROJECT]");
* Policy policy = Policy.newBuilder().build();
* Policy response = containerAnalysisClient.setIamPolicy(resource, policy);
* }
@@ -185,7 +188,7 @@ public ContainerAnalysisStub getStub() {
*
*
* try (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
- * String resource = "";
+ * ResourceName resource = ProjectName.of("[PROJECT]");
* Policy policy = Policy.newBuilder().build();
* Policy response = containerAnalysisClient.setIamPolicy(resource, policy);
* }
@@ -220,7 +223,7 @@ public final Policy setIamPolicy(ResourceName resource, Policy policy) {
*
*
* try (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
- * String resource = "";
+ * ResourceName resource = ProjectName.of("[PROJECT]");
* Policy policy = Policy.newBuilder().build();
* Policy response = containerAnalysisClient.setIamPolicy(resource.toString(), policy);
* }
@@ -252,7 +255,7 @@ public final Policy setIamPolicy(String resource, Policy policy) {
*
*
* try (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
- * String resource = "";
+ * ResourceName resource = ProjectName.of("[PROJECT]");
* Policy policy = Policy.newBuilder().build();
* SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder()
* .setResource(resource.toString())
@@ -282,7 +285,7 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) {
*
*
* try (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
- * String resource = "";
+ * ResourceName resource = ProjectName.of("[PROJECT]");
* Policy policy = Policy.newBuilder().build();
* SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder()
* .setResource(resource.toString())
@@ -311,7 +314,7 @@ public final UnaryCallable setIamPolicyCallable() {
*
*
* try (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
- * String resource = "";
+ * ResourceName resource = ProjectName.of("[PROJECT]");
* Policy response = containerAnalysisClient.getIamPolicy(resource);
* }
*
@@ -341,7 +344,7 @@ public final Policy getIamPolicy(ResourceName resource) {
*
*
* try (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
- * String resource = "";
+ * ResourceName resource = ProjectName.of("[PROJECT]");
* Policy response = containerAnalysisClient.getIamPolicy(resource.toString());
* }
*
@@ -368,7 +371,7 @@ public final Policy getIamPolicy(String resource) {
*
*
* try (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
- * String resource = "";
+ * ResourceName resource = ProjectName.of("[PROJECT]");
* GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder()
* .setResource(resource.toString())
* .build();
@@ -396,7 +399,7 @@ public final Policy getIamPolicy(GetIamPolicyRequest request) {
*
*
* try (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
- * String resource = "";
+ * ResourceName resource = ProjectName.of("[PROJECT]");
* GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder()
* .setResource(resource.toString())
* .build();
@@ -422,7 +425,7 @@ public final UnaryCallable getIamPolicyCallable() {
*
*
* try (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
- * String resource = "";
+ * ResourceName resource = ProjectName.of("[PROJECT]");
* List<String> permissions = new ArrayList<>();
* TestIamPermissionsResponse response = containerAnalysisClient.testIamPermissions(resource, permissions);
* }
@@ -457,7 +460,7 @@ public final TestIamPermissionsResponse testIamPermissions(
*
*
* try (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
- * String resource = "";
+ * ResourceName resource = ProjectName.of("[PROJECT]");
* List<String> permissions = new ArrayList<>();
* TestIamPermissionsResponse response = containerAnalysisClient.testIamPermissions(resource.toString(), permissions);
* }
@@ -492,7 +495,7 @@ public final TestIamPermissionsResponse testIamPermissions(
*
*
* try (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
- * String resource = "";
+ * ResourceName resource = ProjectName.of("[PROJECT]");
* List<String> permissions = new ArrayList<>();
* TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder()
* .setResource(resource.toString())
@@ -521,7 +524,7 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq
*
*
* try (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
- * String resource = "";
+ * ResourceName resource = ProjectName.of("[PROJECT]");
* List<String> permissions = new ArrayList<>();
* TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder()
* .setResource(resource.toString())
@@ -538,6 +541,112 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq
return stub.testIamPermissionsCallable();
}
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Gets a summary of the number and severity of occurrences.
+ *
+ * Sample code:
+ *
+ *
+ * try (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * String filter = "";
+ * 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.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final VulnerabilityOccurrencesSummary getVulnerabilityOccurrencesSummary(
+ ProjectName parent, String filter) {
+ GetVulnerabilityOccurrencesSummaryRequest request =
+ GetVulnerabilityOccurrencesSummaryRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setFilter(filter)
+ .build();
+ return getVulnerabilityOccurrencesSummary(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Gets a summary of the number and severity of occurrences.
+ *
+ * Sample code:
+ *
+ *
+ * try (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * String filter = "";
+ * VulnerabilityOccurrencesSummary response = containerAnalysisClient.getVulnerabilityOccurrencesSummary(parent.toString(), 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.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final VulnerabilityOccurrencesSummary getVulnerabilityOccurrencesSummary(
+ String parent, String filter) {
+ GetVulnerabilityOccurrencesSummaryRequest request =
+ GetVulnerabilityOccurrencesSummaryRequest.newBuilder()
+ .setParent(parent)
+ .setFilter(filter)
+ .build();
+ return getVulnerabilityOccurrencesSummary(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Gets a summary of the number and severity of occurrences.
+ *
+ * Sample code:
+ *
+ *
+ * try (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * GetVulnerabilityOccurrencesSummaryRequest request = GetVulnerabilityOccurrencesSummaryRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .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
+ */
+ public final VulnerabilityOccurrencesSummary getVulnerabilityOccurrencesSummary(
+ GetVulnerabilityOccurrencesSummaryRequest request) {
+ return getVulnerabilityOccurrencesSummaryCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Gets a summary of the number and severity of occurrences.
+ *
+ * Sample code:
+ *
+ *
+ * try (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
+ * ProjectName parent = ProjectName.of("[PROJECT]");
+ * GetVulnerabilityOccurrencesSummaryRequest request = GetVulnerabilityOccurrencesSummaryRequest.newBuilder()
+ * .setParent(parent.toString())
+ * .build();
+ * ApiFuture<VulnerabilityOccurrencesSummary> future = containerAnalysisClient.getVulnerabilityOccurrencesSummaryCallable().futureCall(request);
+ * // Do something
+ * VulnerabilityOccurrencesSummary response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallable<
+ GetVulnerabilityOccurrencesSummaryRequest, VulnerabilityOccurrencesSummary>
+ getVulnerabilityOccurrencesSummaryCallable() {
+ return stub.getVulnerabilityOccurrencesSummaryCallable();
+ }
+
@Override
public final void close() {
stub.close();
diff --git a/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/ContainerAnalysisSettings.java b/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/ContainerAnalysisSettings.java
index 34c9ab7a..ec36003b 100644
--- a/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/ContainerAnalysisSettings.java
+++ b/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/ContainerAnalysisSettings.java
@@ -26,6 +26,8 @@
import com.google.api.gax.rpc.TransportChannelProvider;
import com.google.api.gax.rpc.UnaryCallSettings;
import com.google.cloud.devtools.containeranalysis.v1.stub.ContainerAnalysisStubSettings;
+import com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest;
+import com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary;
import com.google.iam.v1.GetIamPolicyRequest;
import com.google.iam.v1.Policy;
import com.google.iam.v1.SetIamPolicyRequest;
@@ -86,6 +88,14 @@ public UnaryCallSettings getIamPolicySettings() {
return ((ContainerAnalysisStubSettings) getStubSettings()).testIamPermissionsSettings();
}
+ /** Returns the object with the settings used for calls to getVulnerabilityOccurrencesSummary. */
+ public UnaryCallSettings<
+ GetVulnerabilityOccurrencesSummaryRequest, VulnerabilityOccurrencesSummary>
+ getVulnerabilityOccurrencesSummarySettings() {
+ return ((ContainerAnalysisStubSettings) getStubSettings())
+ .getVulnerabilityOccurrencesSummarySettings();
+ }
+
public static final ContainerAnalysisSettings create(ContainerAnalysisStubSettings stub)
throws IOException {
return new ContainerAnalysisSettings.Builder(stub.toBuilder()).build();
@@ -199,6 +209,15 @@ public UnaryCallSettings.Builder getIamPolicySettin
return getStubSettingsBuilder().testIamPermissionsSettings();
}
+ /**
+ * Returns the builder for the settings used for calls to getVulnerabilityOccurrencesSummary.
+ */
+ public UnaryCallSettings.Builder<
+ GetVulnerabilityOccurrencesSummaryRequest, VulnerabilityOccurrencesSummary>
+ getVulnerabilityOccurrencesSummarySettings() {
+ return getStubSettingsBuilder().getVulnerabilityOccurrencesSummarySettings();
+ }
+
@Override
public ContainerAnalysisSettings build() throws IOException {
return new ContainerAnalysisSettings(this);
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 3af87d77..0a2831fd 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
@@ -38,7 +38,7 @@
*
*
* try (ContainerAnalysisClient containerAnalysisClient = ContainerAnalysisClient.create()) {
- * String resource = "";
+ * ResourceName resource = ProjectName.of("[PROJECT]");
* Policy policy = Policy.newBuilder().build();
* Policy response = containerAnalysisClient.setIamPolicy(resource, policy);
* }
diff --git a/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/stub/ContainerAnalysisStub.java b/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/stub/ContainerAnalysisStub.java
index 37a4877a..7577d06a 100644
--- a/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/stub/ContainerAnalysisStub.java
+++ b/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/stub/ContainerAnalysisStub.java
@@ -18,6 +18,8 @@
import com.google.api.core.BetaApi;
import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.rpc.UnaryCallable;
+import com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest;
+import com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary;
import com.google.iam.v1.GetIamPolicyRequest;
import com.google.iam.v1.Policy;
import com.google.iam.v1.SetIamPolicyRequest;
@@ -48,6 +50,12 @@ public UnaryCallable getIamPolicyCallable() {
throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()");
}
+ public UnaryCallable
+ getVulnerabilityOccurrencesSummaryCallable() {
+ throw new UnsupportedOperationException(
+ "Not implemented: getVulnerabilityOccurrencesSummaryCallable()");
+ }
+
@Override
public abstract void close();
}
diff --git a/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/stub/ContainerAnalysisStubSettings.java b/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/stub/ContainerAnalysisStubSettings.java
index addb1c7c..980c85bb 100644
--- a/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/stub/ContainerAnalysisStubSettings.java
+++ b/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1/stub/ContainerAnalysisStubSettings.java
@@ -34,6 +34,8 @@
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Lists;
+import com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest;
+import com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary;
import com.google.iam.v1.GetIamPolicyRequest;
import com.google.iam.v1.Policy;
import com.google.iam.v1.SetIamPolicyRequest;
@@ -87,6 +89,9 @@ public class ContainerAnalysisStubSettings extends StubSettings getIamPolicySettings;
private final UnaryCallSettings
testIamPermissionsSettings;
+ private final UnaryCallSettings<
+ GetVulnerabilityOccurrencesSummaryRequest, VulnerabilityOccurrencesSummary>
+ getVulnerabilityOccurrencesSummarySettings;
/** Returns the object with the settings used for calls to setIamPolicy. */
public UnaryCallSettings setIamPolicySettings() {
@@ -104,6 +109,13 @@ public UnaryCallSettings getIamPolicySettings() {
return testIamPermissionsSettings;
}
+ /** Returns the object with the settings used for calls to getVulnerabilityOccurrencesSummary. */
+ public UnaryCallSettings<
+ GetVulnerabilityOccurrencesSummaryRequest, VulnerabilityOccurrencesSummary>
+ getVulnerabilityOccurrencesSummarySettings() {
+ return getVulnerabilityOccurrencesSummarySettings;
+ }
+
@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
public ContainerAnalysisStub createStub() throws IOException {
if (getTransportChannelProvider()
@@ -176,6 +188,8 @@ protected ContainerAnalysisStubSettings(Builder settingsBuilder) throws IOExcept
setIamPolicySettings = settingsBuilder.setIamPolicySettings().build();
getIamPolicySettings = settingsBuilder.getIamPolicySettings().build();
testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build();
+ getVulnerabilityOccurrencesSummarySettings =
+ settingsBuilder.getVulnerabilityOccurrencesSummarySettings().build();
}
/** Builder for ContainerAnalysisStubSettings. */
@@ -186,6 +200,9 @@ public static class Builder extends StubSettings.Builder getIamPolicySettings;
private final UnaryCallSettings.Builder
testIamPermissionsSettings;
+ private final UnaryCallSettings.Builder<
+ GetVulnerabilityOccurrencesSummaryRequest, VulnerabilityOccurrencesSummary>
+ getVulnerabilityOccurrencesSummarySettings;
private static final ImmutableMap>
RETRYABLE_CODE_DEFINITIONS;
@@ -230,9 +247,14 @@ protected Builder(ClientContext clientContext) {
testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ getVulnerabilityOccurrencesSummarySettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+
unaryMethodSettingsBuilders =
ImmutableList.>of(
- setIamPolicySettings, getIamPolicySettings, testIamPermissionsSettings);
+ setIamPolicySettings,
+ getIamPolicySettings,
+ testIamPermissionsSettings,
+ getVulnerabilityOccurrencesSummarySettings);
initDefaults(this);
}
@@ -263,6 +285,11 @@ private static Builder initDefaults(Builder builder) {
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));
+ builder
+ .getVulnerabilityOccurrencesSummarySettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
return builder;
}
@@ -272,10 +299,15 @@ protected Builder(ContainerAnalysisStubSettings settings) {
setIamPolicySettings = settings.setIamPolicySettings.toBuilder();
getIamPolicySettings = settings.getIamPolicySettings.toBuilder();
testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder();
+ getVulnerabilityOccurrencesSummarySettings =
+ settings.getVulnerabilityOccurrencesSummarySettings.toBuilder();
unaryMethodSettingsBuilders =
ImmutableList.>of(
- setIamPolicySettings, getIamPolicySettings, testIamPermissionsSettings);
+ setIamPolicySettings,
+ getIamPolicySettings,
+ testIamPermissionsSettings,
+ getVulnerabilityOccurrencesSummarySettings);
}
// NEXT_MAJOR_VER: remove 'throws Exception'
@@ -310,6 +342,15 @@ public UnaryCallSettings.Builder getIamPolicySettin
return testIamPermissionsSettings;
}
+ /**
+ * Returns the builder for the settings used for calls to getVulnerabilityOccurrencesSummary.
+ */
+ public UnaryCallSettings.Builder<
+ GetVulnerabilityOccurrencesSummaryRequest, VulnerabilityOccurrencesSummary>
+ getVulnerabilityOccurrencesSummarySettings() {
+ return getVulnerabilityOccurrencesSummarySettings;
+ }
+
@Override
public ContainerAnalysisStubSettings build() throws IOException {
return new ContainerAnalysisStubSettings(this);
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 4dbec6ae..1d0cfe8a 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
@@ -24,6 +24,8 @@
import com.google.api.gax.rpc.RequestParamsExtractor;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.common.collect.ImmutableMap;
+import com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest;
+import com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary;
import com.google.iam.v1.GetIamPolicyRequest;
import com.google.iam.v1.Policy;
import com.google.iam.v1.SetIamPolicyRequest;
@@ -71,6 +73,21 @@ public class GrpcContainerAnalysisStub extends ContainerAnalysisStub {
.setResponseMarshaller(
ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance()))
.build();
+ private static final MethodDescriptor<
+ GetVulnerabilityOccurrencesSummaryRequest, VulnerabilityOccurrencesSummary>
+ getVulnerabilityOccurrencesSummaryMethodDescriptor =
+ MethodDescriptor
+ .
+ newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(
+ "google.devtools.containeranalysis.v1.ContainerAnalysis/GetVulnerabilityOccurrencesSummary")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(
+ GetVulnerabilityOccurrencesSummaryRequest.getDefaultInstance()))
+ .setResponseMarshaller(
+ ProtoUtils.marshaller(VulnerabilityOccurrencesSummary.getDefaultInstance()))
+ .build();
private final BackgroundResource backgroundResources;
@@ -78,6 +95,9 @@ public class GrpcContainerAnalysisStub extends ContainerAnalysisStub {
private final UnaryCallable getIamPolicyCallable;
private final UnaryCallable
testIamPermissionsCallable;
+ private final UnaryCallable<
+ GetVulnerabilityOccurrencesSummaryRequest, VulnerabilityOccurrencesSummary>
+ getVulnerabilityOccurrencesSummaryCallable;
private final GrpcStubCallableFactory callableFactory;
@@ -160,6 +180,23 @@ public Map extract(TestIamPermissionsRequest request) {
}
})
.build();
+ GrpcCallSettings
+ getVulnerabilityOccurrencesSummaryTransportSettings =
+ GrpcCallSettings
+ .
+ newBuilder()
+ .setMethodDescriptor(getVulnerabilityOccurrencesSummaryMethodDescriptor)
+ .setParamsExtractor(
+ new RequestParamsExtractor() {
+ @Override
+ public Map extract(
+ GetVulnerabilityOccurrencesSummaryRequest request) {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("parent", String.valueOf(request.getParent()));
+ return params.build();
+ }
+ })
+ .build();
this.setIamPolicyCallable =
callableFactory.createUnaryCallable(
@@ -172,6 +209,11 @@ public Map extract(TestIamPermissionsRequest request) {
testIamPermissionsTransportSettings,
settings.testIamPermissionsSettings(),
clientContext);
+ this.getVulnerabilityOccurrencesSummaryCallable =
+ callableFactory.createUnaryCallable(
+ getVulnerabilityOccurrencesSummaryTransportSettings,
+ settings.getVulnerabilityOccurrencesSummarySettings(),
+ clientContext);
backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources());
}
@@ -189,6 +231,11 @@ public UnaryCallable getIamPolicyCallable() {
return testIamPermissionsCallable;
}
+ public UnaryCallable
+ getVulnerabilityOccurrencesSummaryCallable() {
+ return getVulnerabilityOccurrencesSummaryCallable;
+ }
+
@Override
public final void close() {
shutdown();
diff --git a/google-cloud-containeranalysis/src/test/java/com/google/cloud/devtools/containeranalysis/v1/ContainerAnalysisClientTest.java b/google-cloud-containeranalysis/src/test/java/com/google/cloud/devtools/containeranalysis/v1/ContainerAnalysisClientTest.java
index 5110e025..e246db6a 100644
--- a/google-cloud-containeranalysis/src/test/java/com/google/cloud/devtools/containeranalysis/v1/ContainerAnalysisClientTest.java
+++ b/google-cloud-containeranalysis/src/test/java/com/google/cloud/devtools/containeranalysis/v1/ContainerAnalysisClientTest.java
@@ -22,6 +22,10 @@
import com.google.api.gax.grpc.testing.MockServiceHelper;
import com.google.api.gax.rpc.ApiClientHeaderProvider;
import com.google.api.gax.rpc.InvalidArgumentException;
+import com.google.api.resourcenames.ResourceName;
+import com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest;
+import com.google.containeranalysis.v1.ProjectName;
+import com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary;
import com.google.iam.v1.GetIamPolicyRequest;
import com.google.iam.v1.Policy;
import com.google.iam.v1.SetIamPolicyRequest;
@@ -90,7 +94,7 @@ public void setIamPolicyTest() {
Policy expectedResponse = Policy.newBuilder().setVersion(version).setEtag(etag).build();
mockContainerAnalysis.addResponse(expectedResponse);
- String resource = "resource-341064690";
+ ResourceName resource = ProjectName.of("[PROJECT]");
Policy policy = Policy.newBuilder().build();
Policy actualResponse = client.setIamPolicy(resource, policy);
@@ -115,7 +119,7 @@ public void setIamPolicyExceptionTest() throws Exception {
mockContainerAnalysis.addException(exception);
try {
- String resource = "resource-341064690";
+ ResourceName resource = ProjectName.of("[PROJECT]");
Policy policy = Policy.newBuilder().build();
client.setIamPolicy(resource, policy);
@@ -133,7 +137,7 @@ public void getIamPolicyTest() {
Policy expectedResponse = Policy.newBuilder().setVersion(version).setEtag(etag).build();
mockContainerAnalysis.addResponse(expectedResponse);
- String resource = "resource-341064690";
+ ResourceName resource = ProjectName.of("[PROJECT]");
Policy actualResponse = client.getIamPolicy(resource);
Assert.assertEquals(expectedResponse, actualResponse);
@@ -156,7 +160,7 @@ public void getIamPolicyExceptionTest() throws Exception {
mockContainerAnalysis.addException(exception);
try {
- String resource = "resource-341064690";
+ ResourceName resource = ProjectName.of("[PROJECT]");
client.getIamPolicy(resource);
Assert.fail("No exception raised");
@@ -171,7 +175,7 @@ public void testIamPermissionsTest() {
TestIamPermissionsResponse expectedResponse = TestIamPermissionsResponse.newBuilder().build();
mockContainerAnalysis.addResponse(expectedResponse);
- String resource = "resource-341064690";
+ ResourceName resource = ProjectName.of("[PROJECT]");
List permissions = new ArrayList<>();
TestIamPermissionsResponse actualResponse = client.testIamPermissions(resource, permissions);
@@ -196,7 +200,7 @@ public void testIamPermissionsExceptionTest() throws Exception {
mockContainerAnalysis.addException(exception);
try {
- String resource = "resource-341064690";
+ ResourceName resource = ProjectName.of("[PROJECT]");
List permissions = new ArrayList<>();
client.testIamPermissions(resource, permissions);
@@ -205,4 +209,48 @@ public void testIamPermissionsExceptionTest() throws Exception {
// Expected exception
}
}
+
+ @Test
+ @SuppressWarnings("all")
+ public void getVulnerabilityOccurrencesSummaryTest() {
+ VulnerabilityOccurrencesSummary expectedResponse =
+ VulnerabilityOccurrencesSummary.newBuilder().build();
+ mockContainerAnalysis.addResponse(expectedResponse);
+
+ ProjectName parent = ProjectName.of("[PROJECT]");
+ String filter = "filter-1274492040";
+
+ VulnerabilityOccurrencesSummary actualResponse =
+ client.getVulnerabilityOccurrencesSummary(parent, filter);
+ Assert.assertEquals(expectedResponse, actualResponse);
+
+ List actualRequests = mockContainerAnalysis.getRequests();
+ Assert.assertEquals(1, actualRequests.size());
+ GetVulnerabilityOccurrencesSummaryRequest actualRequest =
+ (GetVulnerabilityOccurrencesSummaryRequest) actualRequests.get(0);
+
+ Assert.assertEquals(parent, ProjectName.parse(actualRequest.getParent()));
+ Assert.assertEquals(filter, actualRequest.getFilter());
+ Assert.assertTrue(
+ channelProvider.isHeaderSent(
+ ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+ GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+ }
+
+ @Test
+ @SuppressWarnings("all")
+ public void getVulnerabilityOccurrencesSummaryExceptionTest() throws Exception {
+ StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
+ mockContainerAnalysis.addException(exception);
+
+ try {
+ ProjectName parent = ProjectName.of("[PROJECT]");
+ String filter = "filter-1274492040";
+
+ client.getVulnerabilityOccurrencesSummary(parent, filter);
+ Assert.fail("No exception raised");
+ } catch (InvalidArgumentException e) {
+ // Expected exception
+ }
+ }
}
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 f1624087..f890c448 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
@@ -17,6 +17,8 @@
import com.google.api.core.BetaApi;
import com.google.containeranalysis.v1.ContainerAnalysisGrpc.ContainerAnalysisImplBase;
+import com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest;
+import com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary;
import com.google.iam.v1.GetIamPolicyRequest;
import com.google.iam.v1.Policy;
import com.google.iam.v1.SetIamPolicyRequest;
@@ -104,4 +106,20 @@ public void testIamPermissions(
responseObserver.onError(new IllegalArgumentException("Unrecognized response type"));
}
}
+
+ @Override
+ public void getVulnerabilityOccurrencesSummary(
+ GetVulnerabilityOccurrencesSummaryRequest request,
+ StreamObserver responseObserver) {
+ Object response = responses.remove();
+ if (response instanceof VulnerabilityOccurrencesSummary) {
+ requests.add(request);
+ responseObserver.onNext((VulnerabilityOccurrencesSummary) response);
+ responseObserver.onCompleted();
+ } else if (response instanceof Exception) {
+ responseObserver.onError((Exception) response);
+ } else {
+ responseObserver.onError(new IllegalArgumentException("Unrecognized response type"));
+ }
+ }
}
diff --git a/grpc-google-cloud-containeranalysis-v1/src/main/java/com/google/containeranalysis/v1/ContainerAnalysisGrpc.java b/grpc-google-cloud-containeranalysis-v1/src/main/java/com/google/containeranalysis/v1/ContainerAnalysisGrpc.java
index 2fb1eb5f..a3dac85d 100644
--- a/grpc-google-cloud-containeranalysis-v1/src/main/java/com/google/containeranalysis/v1/ContainerAnalysisGrpc.java
+++ b/grpc-google-cloud-containeranalysis-v1/src/main/java/com/google/containeranalysis/v1/ContainerAnalysisGrpc.java
@@ -172,6 +172,60 @@ private ContainerAnalysisGrpc() {}
return getTestIamPermissionsMethod;
}
+ private static volatile io.grpc.MethodDescriptor<
+ com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest,
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary>
+ getGetVulnerabilityOccurrencesSummaryMethod;
+
+ @io.grpc.stub.annotations.RpcMethod(
+ fullMethodName = SERVICE_NAME + '/' + "GetVulnerabilityOccurrencesSummary",
+ requestType = com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest.class,
+ responseType = com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.class,
+ methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
+ public static io.grpc.MethodDescriptor<
+ com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest,
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary>
+ getGetVulnerabilityOccurrencesSummaryMethod() {
+ io.grpc.MethodDescriptor<
+ com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest,
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary>
+ getGetVulnerabilityOccurrencesSummaryMethod;
+ if ((getGetVulnerabilityOccurrencesSummaryMethod =
+ ContainerAnalysisGrpc.getGetVulnerabilityOccurrencesSummaryMethod)
+ == null) {
+ synchronized (ContainerAnalysisGrpc.class) {
+ if ((getGetVulnerabilityOccurrencesSummaryMethod =
+ ContainerAnalysisGrpc.getGetVulnerabilityOccurrencesSummaryMethod)
+ == null) {
+ ContainerAnalysisGrpc.getGetVulnerabilityOccurrencesSummaryMethod =
+ getGetVulnerabilityOccurrencesSummaryMethod =
+ io.grpc.MethodDescriptor
+ .
+ newBuilder()
+ .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(
+ generateFullMethodName(
+ SERVICE_NAME, "GetVulnerabilityOccurrencesSummary"))
+ .setSampledToLocalTracing(true)
+ .setRequestMarshaller(
+ io.grpc.protobuf.ProtoUtils.marshaller(
+ com.google.containeranalysis.v1
+ .GetVulnerabilityOccurrencesSummaryRequest.getDefaultInstance()))
+ .setResponseMarshaller(
+ io.grpc.protobuf.ProtoUtils.marshaller(
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary
+ .getDefaultInstance()))
+ .setSchemaDescriptor(
+ new ContainerAnalysisMethodDescriptorSupplier(
+ "GetVulnerabilityOccurrencesSummary"))
+ .build();
+ }
+ }
+ }
+ return getGetVulnerabilityOccurrencesSummaryMethod;
+ }
+
/** Creates a new async stub that supports all call types for the service */
public static ContainerAnalysisStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
@@ -289,6 +343,20 @@ public void testIamPermissions(
asyncUnimplementedUnaryCall(getTestIamPermissionsMethod(), responseObserver);
}
+ /**
+ *
+ *
+ *
+ * Gets a summary of the number and severity of occurrences.
+ *
+ */
+ public void getVulnerabilityOccurrencesSummary(
+ com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest request,
+ io.grpc.stub.StreamObserver
+ responseObserver) {
+ asyncUnimplementedUnaryCall(getGetVulnerabilityOccurrencesSummaryMethod(), responseObserver);
+ }
+
@java.lang.Override
public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
@@ -311,6 +379,13 @@ public final io.grpc.ServerServiceDefinition bindService() {
com.google.iam.v1.TestIamPermissionsRequest,
com.google.iam.v1.TestIamPermissionsResponse>(
this, METHODID_TEST_IAM_PERMISSIONS)))
+ .addMethod(
+ getGetVulnerabilityOccurrencesSummaryMethod(),
+ asyncUnaryCall(
+ new MethodHandlers<
+ com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest,
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary>(
+ this, METHODID_GET_VULNERABILITY_OCCURRENCES_SUMMARY)))
.build();
}
}
@@ -409,6 +484,23 @@ public void testIamPermissions(
request,
responseObserver);
}
+
+ /**
+ *
+ *
+ *
+ * Gets a summary of the number and severity of occurrences.
+ *
+ */
+ public void getVulnerabilityOccurrencesSummary(
+ com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest request,
+ io.grpc.stub.StreamObserver
+ responseObserver) {
+ asyncUnaryCall(
+ getChannel().newCall(getGetVulnerabilityOccurrencesSummaryMethod(), getCallOptions()),
+ request,
+ responseObserver);
+ }
}
/**
@@ -492,6 +584,20 @@ public com.google.iam.v1.TestIamPermissionsResponse testIamPermissions(
return blockingUnaryCall(
getChannel(), getTestIamPermissionsMethod(), getCallOptions(), request);
}
+
+ /**
+ *
+ *
+ *
+ * Gets a summary of the number and severity of occurrences.
+ *
+ */
+ public com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary
+ getVulnerabilityOccurrencesSummary(
+ com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest request) {
+ return blockingUnaryCall(
+ getChannel(), getGetVulnerabilityOccurrencesSummaryMethod(), getCallOptions(), request);
+ }
}
/**
@@ -579,11 +685,28 @@ protected ContainerAnalysisFutureStub build(
return futureUnaryCall(
getChannel().newCall(getTestIamPermissionsMethod(), getCallOptions()), request);
}
+
+ /**
+ *
+ *
+ *
+ * Gets a summary of the number and severity of occurrences.
+ *
+ */
+ public com.google.common.util.concurrent.ListenableFuture<
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary>
+ getVulnerabilityOccurrencesSummary(
+ com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest request) {
+ return futureUnaryCall(
+ getChannel().newCall(getGetVulnerabilityOccurrencesSummaryMethod(), getCallOptions()),
+ request);
+ }
}
private static final int METHODID_SET_IAM_POLICY = 0;
private static final int METHODID_GET_IAM_POLICY = 1;
private static final int METHODID_TEST_IAM_PERMISSIONS = 2;
+ private static final int METHODID_GET_VULNERABILITY_OCCURRENCES_SUMMARY = 3;
private static final class MethodHandlers
implements io.grpc.stub.ServerCalls.UnaryMethod,
@@ -618,6 +741,13 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv
(io.grpc.stub.StreamObserver)
responseObserver);
break;
+ case METHODID_GET_VULNERABILITY_OCCURRENCES_SUMMARY:
+ serviceImpl.getVulnerabilityOccurrencesSummary(
+ (com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest) request,
+ (io.grpc.stub.StreamObserver<
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary>)
+ responseObserver);
+ break;
default:
throw new AssertionError();
}
@@ -685,6 +815,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() {
.addMethod(getSetIamPolicyMethod())
.addMethod(getGetIamPolicyMethod())
.addMethod(getTestIamPermissionsMethod())
+ .addMethod(getGetVulnerabilityOccurrencesSummaryMethod())
.build();
}
}
diff --git a/proto-google-cloud-containeranalysis-v1/pom.xml b/proto-google-cloud-containeranalysis-v1/pom.xml
index a0dbb058..876ca30a 100644
--- a/proto-google-cloud-containeranalysis-v1/pom.xml
+++ b/proto-google-cloud-containeranalysis-v1/pom.xml
@@ -33,6 +33,10 @@
com.google.api.grpc
proto-google-iam-v1
+
+ io.grafeas
+ grafeas
+
diff --git a/proto-google-cloud-containeranalysis-v1/src/main/java/com/google/containeranalysis/v1/Containeranalysis.java b/proto-google-cloud-containeranalysis-v1/src/main/java/com/google/containeranalysis/v1/Containeranalysis.java
index caa9920e..6200aa6a 100644
--- a/proto-google-cloud-containeranalysis-v1/src/main/java/com/google/containeranalysis/v1/Containeranalysis.java
+++ b/proto-google-cloud-containeranalysis-v1/src/main/java/com/google/containeranalysis/v1/Containeranalysis.java
@@ -27,6 +27,19 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r
registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry);
}
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_devtools_containeranalysis_v1_GetVulnerabilityOccurrencesSummaryRequest_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_devtools_containeranalysis_v1_GetVulnerabilityOccurrencesSummaryRequest_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_devtools_containeranalysis_v1_VulnerabilityOccurrencesSummary_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_devtools_containeranalysis_v1_VulnerabilityOccurrencesSummary_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_devtools_containeranalysis_v1_VulnerabilityOccurrencesSummary_FixableTotalByDigest_descriptor;
+ static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_devtools_containeranalysis_v1_VulnerabilityOccurrencesSummary_FixableTotalByDigest_fieldAccessorTable;
+
public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
return descriptor;
}
@@ -38,35 +51,54 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
"\n
+ * Request to get a vulnerability summary for some set of occurrences.
+ *
+ *
+ * Protobuf type {@code
+ * google.devtools.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest}
+ */
+public final class GetVulnerabilityOccurrencesSummaryRequest
+ extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.devtools.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest)
+ GetVulnerabilityOccurrencesSummaryRequestOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use GetVulnerabilityOccurrencesSummaryRequest.newBuilder() to construct.
+ private GetVulnerabilityOccurrencesSummaryRequest(
+ com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private GetVulnerabilityOccurrencesSummaryRequest() {
+ parent_ = "";
+ filter_ = "";
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new GetVulnerabilityOccurrencesSummaryRequest();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
+ return this.unknownFields;
+ }
+
+ private GetVulnerabilityOccurrencesSummaryRequest(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ parent_ = s;
+ break;
+ }
+ case 18:
+ {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ filter_ = s;
+ break;
+ }
+ default:
+ {
+ if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.containeranalysis.v1.Containeranalysis
+ .internal_static_google_devtools_containeranalysis_v1_GetVulnerabilityOccurrencesSummaryRequest_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.containeranalysis.v1.Containeranalysis
+ .internal_static_google_devtools_containeranalysis_v1_GetVulnerabilityOccurrencesSummaryRequest_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest.class,
+ com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest.Builder
+ .class);
+ }
+
+ public static final int PARENT_FIELD_NUMBER = 1;
+ private volatile java.lang.Object parent_;
+ /**
+ *
+ *
+ *
+ * The name of the project to get a vulnerability summary for in the form of
+ * `projects/[PROJECT_ID]`.
+ *
+ *
+ *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The parent.
+ */
+ @java.lang.Override
+ public java.lang.String getParent() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ parent_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The name of the project to get a vulnerability summary for in the form of
+ * `projects/[PROJECT_ID]`.
+ *
+ *
+ *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The bytes for parent.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getParentBytes() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ parent_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int FILTER_FIELD_NUMBER = 2;
+ private volatile java.lang.Object filter_;
+ /**
+ *
+ *
+ *
+ * The filter expression.
+ *
+ *
+ * string filter = 2;
+ *
+ * @return The filter.
+ */
+ @java.lang.Override
+ public java.lang.String getFilter() {
+ java.lang.Object ref = filter_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ filter_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The filter expression.
+ *
+ *
+ * string filter = 2;
+ *
+ * @return The bytes for filter.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getFilterBytes() {
+ java.lang.Object ref = filter_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ filter_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!getParentBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_);
+ }
+ if (!getFilterBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getParentBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_);
+ }
+ if (!getFilterBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj
+ instanceof com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest)) {
+ return super.equals(obj);
+ }
+ com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest other =
+ (com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest) obj;
+
+ if (!getParent().equals(other.getParent())) return false;
+ if (!getFilter().equals(other.getFilter())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + PARENT_FIELD_NUMBER;
+ hash = (53 * hash) + getParent().hashCode();
+ hash = (37 * hash) + FILTER_FIELD_NUMBER;
+ hash = (53 * hash) + getFilter().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest parseFrom(
+ byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest
+ parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest
+ parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ *
+ * Request to get a vulnerability summary for some set of occurrences.
+ *
+ *
+ * Protobuf type {@code
+ * google.devtools.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest}
+ */
+ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ implements
+ // @@protoc_insertion_point(builder_implements:google.devtools.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest)
+ com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequestOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.containeranalysis.v1.Containeranalysis
+ .internal_static_google_devtools_containeranalysis_v1_GetVulnerabilityOccurrencesSummaryRequest_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.containeranalysis.v1.Containeranalysis
+ .internal_static_google_devtools_containeranalysis_v1_GetVulnerabilityOccurrencesSummaryRequest_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest.class,
+ com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest.Builder
+ .class);
+ }
+
+ // Construct using
+ // com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
+ }
+
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ parent_ = "";
+
+ filter_ = "";
+
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+ return com.google.containeranalysis.v1.Containeranalysis
+ .internal_static_google_devtools_containeranalysis_v1_GetVulnerabilityOccurrencesSummaryRequest_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest
+ getDefaultInstanceForType() {
+ return com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest
+ .getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest build() {
+ com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest result =
+ buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest
+ buildPartial() {
+ com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest result =
+ new com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest(this);
+ result.parent_ = parent_;
+ result.filter_ = filter_;
+ onBuilt();
+ return result;
+ }
+
+ @java.lang.Override
+ public Builder clone() {
+ return super.clone();
+ }
+
+ @java.lang.Override
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
+ return super.setField(field, value);
+ }
+
+ @java.lang.Override
+ public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return super.clearField(field);
+ }
+
+ @java.lang.Override
+ public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return super.clearOneof(oneof);
+ }
+
+ @java.lang.Override
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
+ return super.setRepeatedField(field, index, value);
+ }
+
+ @java.lang.Override
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
+ return super.addRepeatedField(field, value);
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other
+ instanceof com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest) {
+ return mergeFrom(
+ (com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest) other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(
+ com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest other) {
+ if (other
+ == com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest
+ .getDefaultInstance()) return this;
+ if (!other.getParent().isEmpty()) {
+ parent_ = other.parent_;
+ onChanged();
+ }
+ if (!other.getFilter().isEmpty()) {
+ filter_ = other.filter_;
+ onChanged();
+ }
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest parsedMessage =
+ null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage =
+ (com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest)
+ e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+
+ private java.lang.Object parent_ = "";
+ /**
+ *
+ *
+ *
+ * The name of the project to get a vulnerability summary for in the form of
+ * `projects/[PROJECT_ID]`.
+ *
+ *
+ *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The parent.
+ */
+ public java.lang.String getParent() {
+ java.lang.Object ref = parent_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ parent_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The name of the project to get a vulnerability summary for in the form of
+ * `projects/[PROJECT_ID]`.
+ *
+ *
+ *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The bytes for parent.
+ */
+ public com.google.protobuf.ByteString getParentBytes() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ parent_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The name of the project to get a vulnerability summary for in the form of
+ * `projects/[PROJECT_ID]`.
+ *
+ *
+ *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param value The parent to set.
+ * @return This builder for chaining.
+ */
+ public Builder setParent(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ parent_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The name of the project to get a vulnerability summary for in the form of
+ * `projects/[PROJECT_ID]`.
+ *
+ *
+ *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearParent() {
+
+ parent_ = getDefaultInstance().getParent();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The name of the project to get a vulnerability summary for in the form of
+ * `projects/[PROJECT_ID]`.
+ *
+ *
+ *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param value The bytes for parent to set.
+ * @return This builder for chaining.
+ */
+ public Builder setParentBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ parent_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object filter_ = "";
+ /**
+ *
+ *
+ *
+ * The filter expression.
+ *
+ *
+ * string filter = 2;
+ *
+ * @return The filter.
+ */
+ public java.lang.String getFilter() {
+ java.lang.Object ref = filter_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ filter_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The filter expression.
+ *
+ *
+ * string filter = 2;
+ *
+ * @return The bytes for filter.
+ */
+ public com.google.protobuf.ByteString getFilterBytes() {
+ java.lang.Object ref = filter_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ filter_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The filter expression.
+ *
+ *
+ * string filter = 2;
+ *
+ * @param value The filter to set.
+ * @return This builder for chaining.
+ */
+ public Builder setFilter(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ filter_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The filter expression.
+ *
+ *
+ * string filter = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearFilter() {
+
+ filter_ = getDefaultInstance().getFilter();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The filter expression.
+ *
+ *
+ * string filter = 2;
+ *
+ * @param value The bytes for filter to set.
+ * @return This builder for chaining.
+ */
+ public Builder setFilterBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ filter_ = value;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.devtools.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.devtools.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest)
+ private static final com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE =
+ new com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest();
+ }
+
+ public static com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ PARSER =
+ new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public GetVulnerabilityOccurrencesSummaryRequest parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new GetVulnerabilityOccurrencesSummaryRequest(input, extensionRegistry);
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest
+ getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+}
diff --git a/proto-google-cloud-containeranalysis-v1/src/main/java/com/google/containeranalysis/v1/GetVulnerabilityOccurrencesSummaryRequestOrBuilder.java b/proto-google-cloud-containeranalysis-v1/src/main/java/com/google/containeranalysis/v1/GetVulnerabilityOccurrencesSummaryRequestOrBuilder.java
new file mode 100644
index 00000000..7d31eae2
--- /dev/null
+++ b/proto-google-cloud-containeranalysis-v1/src/main/java/com/google/containeranalysis/v1/GetVulnerabilityOccurrencesSummaryRequestOrBuilder.java
@@ -0,0 +1,81 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/devtools/containeranalysis/v1/containeranalysis.proto
+
+package com.google.containeranalysis.v1;
+
+public interface GetVulnerabilityOccurrencesSummaryRequestOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:google.devtools.containeranalysis.v1.GetVulnerabilityOccurrencesSummaryRequest)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ *
+ *
+ *
+ * The name of the project to get a vulnerability summary for in the form of
+ * `projects/[PROJECT_ID]`.
+ *
+ *
+ *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The parent.
+ */
+ java.lang.String getParent();
+ /**
+ *
+ *
+ *
+ * The name of the project to get a vulnerability summary for in the form of
+ * `projects/[PROJECT_ID]`.
+ *
+ *
+ *
+ * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The bytes for parent.
+ */
+ com.google.protobuf.ByteString getParentBytes();
+
+ /**
+ *
+ *
+ *
+ * The filter expression.
+ *
+ *
+ * string filter = 2;
+ *
+ * @return The filter.
+ */
+ java.lang.String getFilter();
+ /**
+ *
+ *
+ *
+ * The filter expression.
+ *
+ *
+ * string filter = 2;
+ *
+ * @return The bytes for filter.
+ */
+ com.google.protobuf.ByteString getFilterBytes();
+}
diff --git a/proto-google-cloud-containeranalysis-v1/src/main/java/com/google/containeranalysis/v1/VulnerabilityOccurrencesSummary.java b/proto-google-cloud-containeranalysis-v1/src/main/java/com/google/containeranalysis/v1/VulnerabilityOccurrencesSummary.java
new file mode 100644
index 00000000..b1835121
--- /dev/null
+++ b/proto-google-cloud-containeranalysis-v1/src/main/java/com/google/containeranalysis/v1/VulnerabilityOccurrencesSummary.java
@@ -0,0 +1,2165 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/devtools/containeranalysis/v1/containeranalysis.proto
+
+package com.google.containeranalysis.v1;
+
+/**
+ *
+ *
+ *
+ * A summary of how many vulnerability occurrences there are per resource and
+ * severity type.
+ *
+ *
+ * Protobuf type {@code google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary}
+ */
+public final class VulnerabilityOccurrencesSummary extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary)
+ VulnerabilityOccurrencesSummaryOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use VulnerabilityOccurrencesSummary.newBuilder() to construct.
+ private VulnerabilityOccurrencesSummary(
+ com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private VulnerabilityOccurrencesSummary() {
+ counts_ = java.util.Collections.emptyList();
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new VulnerabilityOccurrencesSummary();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
+ return this.unknownFields;
+ }
+
+ private VulnerabilityOccurrencesSummary(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ if (!((mutable_bitField0_ & 0x00000001) != 0)) {
+ counts_ =
+ new java.util.ArrayList<
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary
+ .FixableTotalByDigest>();
+ mutable_bitField0_ |= 0x00000001;
+ }
+ counts_.add(
+ input.readMessage(
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary
+ .FixableTotalByDigest.parser(),
+ extensionRegistry));
+ break;
+ }
+ default:
+ {
+ if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
+ } finally {
+ if (((mutable_bitField0_ & 0x00000001) != 0)) {
+ counts_ = java.util.Collections.unmodifiableList(counts_);
+ }
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.containeranalysis.v1.Containeranalysis
+ .internal_static_google_devtools_containeranalysis_v1_VulnerabilityOccurrencesSummary_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.containeranalysis.v1.Containeranalysis
+ .internal_static_google_devtools_containeranalysis_v1_VulnerabilityOccurrencesSummary_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.class,
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.Builder.class);
+ }
+
+ public interface FixableTotalByDigestOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ *
+ *
+ *
+ * The affected resource.
+ *
+ *
+ * string resource_uri = 1;
+ *
+ * @return The resourceUri.
+ */
+ java.lang.String getResourceUri();
+ /**
+ *
+ *
+ *
+ * The affected resource.
+ *
+ *
+ * string resource_uri = 1;
+ *
+ * @return The bytes for resourceUri.
+ */
+ com.google.protobuf.ByteString getResourceUriBytes();
+
+ /**
+ *
+ *
+ *
+ * The severity for this count. SEVERITY_UNSPECIFIED indicates total across
+ * all severities.
+ *
+ *
+ * .grafeas.v1.Severity severity = 2;
+ *
+ * @return The enum numeric value on the wire for severity.
+ */
+ int getSeverityValue();
+ /**
+ *
+ *
+ *
+ * The severity for this count. SEVERITY_UNSPECIFIED indicates total across
+ * all severities.
+ *
+ *
+ * .grafeas.v1.Severity severity = 2;
+ *
+ * @return The severity.
+ */
+ io.grafeas.v1.Severity getSeverity();
+
+ /**
+ *
+ *
+ *
+ * The number of fixable vulnerabilities associated with this resource.
+ *
+ *
+ * int64 fixable_count = 3;
+ *
+ * @return The fixableCount.
+ */
+ long getFixableCount();
+
+ /**
+ *
+ *
+ *
+ * The total number of vulnerabilities associated with this resource.
+ *
+ *
+ * int64 total_count = 4;
+ *
+ * @return The totalCount.
+ */
+ long getTotalCount();
+ }
+ /**
+ *
+ *
+ *
+ * Per resource and severity counts of fixable and total vulnerabilities.
+ *
+ *
+ * Protobuf type {@code
+ * google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest}
+ */
+ public static final class FixableTotalByDigest extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest)
+ FixableTotalByDigestOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use FixableTotalByDigest.newBuilder() to construct.
+ private FixableTotalByDigest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private FixableTotalByDigest() {
+ resourceUri_ = "";
+ severity_ = 0;
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new FixableTotalByDigest();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
+ return this.unknownFields;
+ }
+
+ private FixableTotalByDigest(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ resourceUri_ = s;
+ break;
+ }
+ case 16:
+ {
+ int rawValue = input.readEnum();
+
+ severity_ = rawValue;
+ break;
+ }
+ case 24:
+ {
+ fixableCount_ = input.readInt64();
+ break;
+ }
+ case 32:
+ {
+ totalCount_ = input.readInt64();
+ break;
+ }
+ default:
+ {
+ if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.containeranalysis.v1.Containeranalysis
+ .internal_static_google_devtools_containeranalysis_v1_VulnerabilityOccurrencesSummary_FixableTotalByDigest_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.containeranalysis.v1.Containeranalysis
+ .internal_static_google_devtools_containeranalysis_v1_VulnerabilityOccurrencesSummary_FixableTotalByDigest_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest
+ .class,
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest
+ .Builder.class);
+ }
+
+ public static final int RESOURCE_URI_FIELD_NUMBER = 1;
+ private volatile java.lang.Object resourceUri_;
+ /**
+ *
+ *
+ *
+ * The affected resource.
+ *
+ *
+ * string resource_uri = 1;
+ *
+ * @return The resourceUri.
+ */
+ @java.lang.Override
+ public java.lang.String getResourceUri() {
+ java.lang.Object ref = resourceUri_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ resourceUri_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The affected resource.
+ *
+ *
+ * string resource_uri = 1;
+ *
+ * @return The bytes for resourceUri.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getResourceUriBytes() {
+ java.lang.Object ref = resourceUri_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ resourceUri_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int SEVERITY_FIELD_NUMBER = 2;
+ private int severity_;
+ /**
+ *
+ *
+ *
+ * The severity for this count. SEVERITY_UNSPECIFIED indicates total across
+ * all severities.
+ *
+ *
+ * .grafeas.v1.Severity severity = 2;
+ *
+ * @return The enum numeric value on the wire for severity.
+ */
+ @java.lang.Override
+ public int getSeverityValue() {
+ return severity_;
+ }
+ /**
+ *
+ *
+ *
+ * The severity for this count. SEVERITY_UNSPECIFIED indicates total across
+ * all severities.
+ *
+ *
+ * .grafeas.v1.Severity severity = 2;
+ *
+ * @return The severity.
+ */
+ @java.lang.Override
+ public io.grafeas.v1.Severity getSeverity() {
+ @SuppressWarnings("deprecation")
+ io.grafeas.v1.Severity result = io.grafeas.v1.Severity.valueOf(severity_);
+ return result == null ? io.grafeas.v1.Severity.UNRECOGNIZED : result;
+ }
+
+ public static final int FIXABLE_COUNT_FIELD_NUMBER = 3;
+ private long fixableCount_;
+ /**
+ *
+ *
+ *
+ * The number of fixable vulnerabilities associated with this resource.
+ *
+ *
+ * int64 fixable_count = 3;
+ *
+ * @return The fixableCount.
+ */
+ @java.lang.Override
+ public long getFixableCount() {
+ return fixableCount_;
+ }
+
+ public static final int TOTAL_COUNT_FIELD_NUMBER = 4;
+ private long totalCount_;
+ /**
+ *
+ *
+ *
+ * The total number of vulnerabilities associated with this resource.
+ *
+ *
+ * int64 total_count = 4;
+ *
+ * @return The totalCount.
+ */
+ @java.lang.Override
+ public long getTotalCount() {
+ return totalCount_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!getResourceUriBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resourceUri_);
+ }
+ if (severity_ != io.grafeas.v1.Severity.SEVERITY_UNSPECIFIED.getNumber()) {
+ output.writeEnum(2, severity_);
+ }
+ if (fixableCount_ != 0L) {
+ output.writeInt64(3, fixableCount_);
+ }
+ if (totalCount_ != 0L) {
+ output.writeInt64(4, totalCount_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getResourceUriBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resourceUri_);
+ }
+ if (severity_ != io.grafeas.v1.Severity.SEVERITY_UNSPECIFIED.getNumber()) {
+ size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, severity_);
+ }
+ if (fixableCount_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, fixableCount_);
+ }
+ if (totalCount_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, totalCount_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj
+ instanceof
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest)) {
+ return super.equals(obj);
+ }
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest other =
+ (com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest)
+ obj;
+
+ if (!getResourceUri().equals(other.getResourceUri())) return false;
+ if (severity_ != other.severity_) return false;
+ if (getFixableCount() != other.getFixableCount()) return false;
+ if (getTotalCount() != other.getTotalCount()) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + RESOURCE_URI_FIELD_NUMBER;
+ hash = (53 * hash) + getResourceUri().hashCode();
+ hash = (37 * hash) + SEVERITY_FIELD_NUMBER;
+ hash = (53 * hash) + severity_;
+ hash = (37 * hash) + FIXABLE_COUNT_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getFixableCount());
+ hash = (37 * hash) + TOTAL_COUNT_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTotalCount());
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary
+ .FixableTotalByDigest
+ parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary
+ .FixableTotalByDigest
+ parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary
+ .FixableTotalByDigest
+ parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary
+ .FixableTotalByDigest
+ parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary
+ .FixableTotalByDigest
+ parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary
+ .FixableTotalByDigest
+ parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary
+ .FixableTotalByDigest
+ parseFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary
+ .FixableTotalByDigest
+ parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary
+ .FixableTotalByDigest
+ parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary
+ .FixableTotalByDigest
+ parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary
+ .FixableTotalByDigest
+ parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary
+ .FixableTotalByDigest
+ parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest
+ prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ *
+ * Per resource and severity counts of fixable and total vulnerabilities.
+ *
+ *
+ * Protobuf type {@code
+ * google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest}
+ */
+ public static final class Builder
+ extends com.google.protobuf.GeneratedMessageV3.Builder
+ implements
+ // @@protoc_insertion_point(builder_implements:google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest)
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary
+ .FixableTotalByDigestOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.containeranalysis.v1.Containeranalysis
+ .internal_static_google_devtools_containeranalysis_v1_VulnerabilityOccurrencesSummary_FixableTotalByDigest_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.containeranalysis.v1.Containeranalysis
+ .internal_static_google_devtools_containeranalysis_v1_VulnerabilityOccurrencesSummary_FixableTotalByDigest_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest
+ .class,
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest
+ .Builder.class);
+ }
+
+ // Construct using
+ // com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
+ }
+
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ resourceUri_ = "";
+
+ severity_ = 0;
+
+ fixableCount_ = 0L;
+
+ totalCount_ = 0L;
+
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+ return com.google.containeranalysis.v1.Containeranalysis
+ .internal_static_google_devtools_containeranalysis_v1_VulnerabilityOccurrencesSummary_FixableTotalByDigest_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest
+ getDefaultInstanceForType() {
+ return com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest
+ .getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest
+ build() {
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest
+ result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest
+ buildPartial() {
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest
+ result =
+ new com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary
+ .FixableTotalByDigest(this);
+ result.resourceUri_ = resourceUri_;
+ result.severity_ = severity_;
+ result.fixableCount_ = fixableCount_;
+ result.totalCount_ = totalCount_;
+ onBuilt();
+ return result;
+ }
+
+ @java.lang.Override
+ public Builder clone() {
+ return super.clone();
+ }
+
+ @java.lang.Override
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
+ return super.setField(field, value);
+ }
+
+ @java.lang.Override
+ public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return super.clearField(field);
+ }
+
+ @java.lang.Override
+ public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return super.clearOneof(oneof);
+ }
+
+ @java.lang.Override
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ int index,
+ java.lang.Object value) {
+ return super.setRepeatedField(field, index, value);
+ }
+
+ @java.lang.Override
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
+ return super.addRepeatedField(field, value);
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other
+ instanceof
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest) {
+ return mergeFrom(
+ (com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest)
+ other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest
+ other) {
+ if (other
+ == com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest
+ .getDefaultInstance()) return this;
+ if (!other.getResourceUri().isEmpty()) {
+ resourceUri_ = other.resourceUri_;
+ onChanged();
+ }
+ if (other.severity_ != 0) {
+ setSeverityValue(other.getSeverityValue());
+ }
+ if (other.getFixableCount() != 0L) {
+ setFixableCount(other.getFixableCount());
+ }
+ if (other.getTotalCount() != 0L) {
+ setTotalCount(other.getTotalCount());
+ }
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest
+ parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage =
+ (com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest)
+ e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+
+ private java.lang.Object resourceUri_ = "";
+ /**
+ *
+ *
+ *
+ * The affected resource.
+ *
+ *
+ * string resource_uri = 1;
+ *
+ * @return The resourceUri.
+ */
+ public java.lang.String getResourceUri() {
+ java.lang.Object ref = resourceUri_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ resourceUri_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The affected resource.
+ *
+ *
+ * string resource_uri = 1;
+ *
+ * @return The bytes for resourceUri.
+ */
+ public com.google.protobuf.ByteString getResourceUriBytes() {
+ java.lang.Object ref = resourceUri_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ resourceUri_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The affected resource.
+ *
+ *
+ * string resource_uri = 1;
+ *
+ * @param value The resourceUri to set.
+ * @return This builder for chaining.
+ */
+ public Builder setResourceUri(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ resourceUri_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The affected resource.
+ *
+ *
+ * string resource_uri = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearResourceUri() {
+
+ resourceUri_ = getDefaultInstance().getResourceUri();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The affected resource.
+ *
+ *
+ * string resource_uri = 1;
+ *
+ * @param value The bytes for resourceUri to set.
+ * @return This builder for chaining.
+ */
+ public Builder setResourceUriBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ resourceUri_ = value;
+ onChanged();
+ return this;
+ }
+
+ private int severity_ = 0;
+ /**
+ *
+ *
+ *
+ * The severity for this count. SEVERITY_UNSPECIFIED indicates total across
+ * all severities.
+ *
+ *
+ * .grafeas.v1.Severity severity = 2;
+ *
+ * @return The enum numeric value on the wire for severity.
+ */
+ @java.lang.Override
+ public int getSeverityValue() {
+ return severity_;
+ }
+ /**
+ *
+ *
+ *
+ * The severity for this count. SEVERITY_UNSPECIFIED indicates total across
+ * all severities.
+ *
+ *
+ * .grafeas.v1.Severity severity = 2;
+ *
+ * @param value The enum numeric value on the wire for severity to set.
+ * @return This builder for chaining.
+ */
+ public Builder setSeverityValue(int value) {
+
+ severity_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The severity for this count. SEVERITY_UNSPECIFIED indicates total across
+ * all severities.
+ *
+ *
+ * .grafeas.v1.Severity severity = 2;
+ *
+ * @return The severity.
+ */
+ @java.lang.Override
+ public io.grafeas.v1.Severity getSeverity() {
+ @SuppressWarnings("deprecation")
+ io.grafeas.v1.Severity result = io.grafeas.v1.Severity.valueOf(severity_);
+ return result == null ? io.grafeas.v1.Severity.UNRECOGNIZED : result;
+ }
+ /**
+ *
+ *
+ *
+ * The severity for this count. SEVERITY_UNSPECIFIED indicates total across
+ * all severities.
+ *
+ *
+ * .grafeas.v1.Severity severity = 2;
+ *
+ * @param value The severity to set.
+ * @return This builder for chaining.
+ */
+ public Builder setSeverity(io.grafeas.v1.Severity value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ severity_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The severity for this count. SEVERITY_UNSPECIFIED indicates total across
+ * all severities.
+ *
+ *
+ * .grafeas.v1.Severity severity = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearSeverity() {
+
+ severity_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private long fixableCount_;
+ /**
+ *
+ *
+ *
+ * The number of fixable vulnerabilities associated with this resource.
+ *
+ *
+ * int64 fixable_count = 3;
+ *
+ * @return The fixableCount.
+ */
+ @java.lang.Override
+ public long getFixableCount() {
+ return fixableCount_;
+ }
+ /**
+ *
+ *
+ *
+ * The number of fixable vulnerabilities associated with this resource.
+ *
+ *
+ * int64 fixable_count = 3;
+ *
+ * @param value The fixableCount to set.
+ * @return This builder for chaining.
+ */
+ public Builder setFixableCount(long value) {
+
+ fixableCount_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The number of fixable vulnerabilities associated with this resource.
+ *
+ *
+ * int64 fixable_count = 3;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearFixableCount() {
+
+ fixableCount_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private long totalCount_;
+ /**
+ *
+ *
+ *
+ * The total number of vulnerabilities associated with this resource.
+ *
+ *
+ * int64 total_count = 4;
+ *
+ * @return The totalCount.
+ */
+ @java.lang.Override
+ public long getTotalCount() {
+ return totalCount_;
+ }
+ /**
+ *
+ *
+ *
+ * The total number of vulnerabilities associated with this resource.
+ *
+ *
+ * int64 total_count = 4;
+ *
+ * @param value The totalCount to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTotalCount(long value) {
+
+ totalCount_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The total number of vulnerabilities associated with this resource.
+ *
+ *
+ * int64 total_count = 4;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearTotalCount() {
+
+ totalCount_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest)
+ private static final com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary
+ .FixableTotalByDigest
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE =
+ new com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary
+ .FixableTotalByDigest();
+ }
+
+ public static com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary
+ .FixableTotalByDigest
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser PARSER =
+ new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public FixableTotalByDigest parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new FixableTotalByDigest(input, extensionRegistry);
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest
+ getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+ }
+
+ public static final int COUNTS_FIELD_NUMBER = 1;
+ private java.util.List<
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest>
+ counts_;
+ /**
+ *
+ *
+ *
+ * A listing by resource of the number of fixable and total vulnerabilities.
+ *
+ *
+ *
+ * repeated .google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;
+ *
+ */
+ @java.lang.Override
+ public java.util.List<
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest>
+ getCountsList() {
+ return counts_;
+ }
+ /**
+ *
+ *
+ *
+ * A listing by resource of the number of fixable and total vulnerabilities.
+ *
+ *
+ *
+ * repeated .google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;
+ *
+ */
+ @java.lang.Override
+ public java.util.List<
+ ? extends
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary
+ .FixableTotalByDigestOrBuilder>
+ getCountsOrBuilderList() {
+ return counts_;
+ }
+ /**
+ *
+ *
+ *
+ * A listing by resource of the number of fixable and total vulnerabilities.
+ *
+ *
+ *
+ * repeated .google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;
+ *
+ */
+ @java.lang.Override
+ public int getCountsCount() {
+ return counts_.size();
+ }
+ /**
+ *
+ *
+ *
+ * A listing by resource of the number of fixable and total vulnerabilities.
+ *
+ *
+ *
+ * repeated .google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;
+ *
+ */
+ @java.lang.Override
+ public com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest
+ getCounts(int index) {
+ return counts_.get(index);
+ }
+ /**
+ *
+ *
+ *
+ * A listing by resource of the number of fixable and total vulnerabilities.
+ *
+ *
+ *
+ * repeated .google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;
+ *
+ */
+ @java.lang.Override
+ public com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary
+ .FixableTotalByDigestOrBuilder
+ getCountsOrBuilder(int index) {
+ return counts_.get(index);
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ for (int i = 0; i < counts_.size(); i++) {
+ output.writeMessage(1, counts_.get(i));
+ }
+ unknownFields.writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ for (int i = 0; i < counts_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, counts_.get(i));
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary)) {
+ return super.equals(obj);
+ }
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary other =
+ (com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary) obj;
+
+ if (!getCountsList().equals(other.getCountsList())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (getCountsCount() > 0) {
+ hash = (37 * hash) + COUNTS_FIELD_NUMBER;
+ hash = (53 * hash) + getCountsList().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary parseFrom(
+ byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ *
+ *
+ * A summary of how many vulnerability occurrences there are per resource and
+ * severity type.
+ *
+ *
+ * Protobuf type {@code google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary}
+ */
+ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ implements
+ // @@protoc_insertion_point(builder_implements:google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary)
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummaryOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.containeranalysis.v1.Containeranalysis
+ .internal_static_google_devtools_containeranalysis_v1_VulnerabilityOccurrencesSummary_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.containeranalysis.v1.Containeranalysis
+ .internal_static_google_devtools_containeranalysis_v1_VulnerabilityOccurrencesSummary_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.class,
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.Builder.class);
+ }
+
+ // Construct using com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
+ getCountsFieldBuilder();
+ }
+ }
+
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ if (countsBuilder_ == null) {
+ counts_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ } else {
+ countsBuilder_.clear();
+ }
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+ return com.google.containeranalysis.v1.Containeranalysis
+ .internal_static_google_devtools_containeranalysis_v1_VulnerabilityOccurrencesSummary_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary
+ getDefaultInstanceForType() {
+ return com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary build() {
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary buildPartial() {
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary result =
+ new com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary(this);
+ int from_bitField0_ = bitField0_;
+ if (countsBuilder_ == null) {
+ if (((bitField0_ & 0x00000001) != 0)) {
+ counts_ = java.util.Collections.unmodifiableList(counts_);
+ bitField0_ = (bitField0_ & ~0x00000001);
+ }
+ result.counts_ = counts_;
+ } else {
+ result.counts_ = countsBuilder_.build();
+ }
+ onBuilt();
+ return result;
+ }
+
+ @java.lang.Override
+ public Builder clone() {
+ return super.clone();
+ }
+
+ @java.lang.Override
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
+ return super.setField(field, value);
+ }
+
+ @java.lang.Override
+ public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return super.clearField(field);
+ }
+
+ @java.lang.Override
+ public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return super.clearOneof(oneof);
+ }
+
+ @java.lang.Override
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
+ return super.setRepeatedField(field, index, value);
+ }
+
+ @java.lang.Override
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
+ return super.addRepeatedField(field, value);
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary) {
+ return mergeFrom((com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary) other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary other) {
+ if (other
+ == com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.getDefaultInstance())
+ return this;
+ if (countsBuilder_ == null) {
+ if (!other.counts_.isEmpty()) {
+ if (counts_.isEmpty()) {
+ counts_ = other.counts_;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ } else {
+ ensureCountsIsMutable();
+ counts_.addAll(other.counts_);
+ }
+ onChanged();
+ }
+ } else {
+ if (!other.counts_.isEmpty()) {
+ if (countsBuilder_.isEmpty()) {
+ countsBuilder_.dispose();
+ countsBuilder_ = null;
+ counts_ = other.counts_;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ countsBuilder_ =
+ com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
+ ? getCountsFieldBuilder()
+ : null;
+ } else {
+ countsBuilder_.addAllMessages(other.counts_);
+ }
+ }
+ }
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ return true;
+ }
+
+ @java.lang.Override
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage =
+ (com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary)
+ e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+
+ private int bitField0_;
+
+ private java.util.List<
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest>
+ counts_ = java.util.Collections.emptyList();
+
+ private void ensureCountsIsMutable() {
+ if (!((bitField0_ & 0x00000001) != 0)) {
+ counts_ =
+ new java.util.ArrayList<
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary
+ .FixableTotalByDigest>(counts_);
+ bitField0_ |= 0x00000001;
+ }
+ }
+
+ private com.google.protobuf.RepeatedFieldBuilderV3<
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest,
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest
+ .Builder,
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary
+ .FixableTotalByDigestOrBuilder>
+ countsBuilder_;
+
+ /**
+ *
+ *
+ *
+ * A listing by resource of the number of fixable and total vulnerabilities.
+ *
+ *
+ *
+ * repeated .google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;
+ *
+ */
+ public java.util.List<
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest>
+ getCountsList() {
+ if (countsBuilder_ == null) {
+ return java.util.Collections.unmodifiableList(counts_);
+ } else {
+ return countsBuilder_.getMessageList();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * A listing by resource of the number of fixable and total vulnerabilities.
+ *
+ *
+ *
+ * repeated .google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;
+ *
+ */
+ public int getCountsCount() {
+ if (countsBuilder_ == null) {
+ return counts_.size();
+ } else {
+ return countsBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * A listing by resource of the number of fixable and total vulnerabilities.
+ *
+ *
+ *
+ * repeated .google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;
+ *
+ */
+ public com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest
+ getCounts(int index) {
+ if (countsBuilder_ == null) {
+ return counts_.get(index);
+ } else {
+ return countsBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ *
+ *
+ * A listing by resource of the number of fixable and total vulnerabilities.
+ *
+ *
+ *
+ * repeated .google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;
+ *
+ */
+ public Builder setCounts(
+ int index,
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest
+ value) {
+ if (countsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureCountsIsMutable();
+ counts_.set(index, value);
+ onChanged();
+ } else {
+ countsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A listing by resource of the number of fixable and total vulnerabilities.
+ *
+ *
+ *
+ * repeated .google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;
+ *
+ */
+ public Builder setCounts(
+ int index,
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest.Builder
+ builderForValue) {
+ if (countsBuilder_ == null) {
+ ensureCountsIsMutable();
+ counts_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ countsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A listing by resource of the number of fixable and total vulnerabilities.
+ *
+ *
+ *
+ * repeated .google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;
+ *
+ */
+ public Builder addCounts(
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest
+ value) {
+ if (countsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureCountsIsMutable();
+ counts_.add(value);
+ onChanged();
+ } else {
+ countsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A listing by resource of the number of fixable and total vulnerabilities.
+ *
+ *
+ *
+ * repeated .google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;
+ *
+ */
+ public Builder addCounts(
+ int index,
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest
+ value) {
+ if (countsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureCountsIsMutable();
+ counts_.add(index, value);
+ onChanged();
+ } else {
+ countsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A listing by resource of the number of fixable and total vulnerabilities.
+ *
+ *
+ *
+ * repeated .google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;
+ *
+ */
+ public Builder addCounts(
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest.Builder
+ builderForValue) {
+ if (countsBuilder_ == null) {
+ ensureCountsIsMutable();
+ counts_.add(builderForValue.build());
+ onChanged();
+ } else {
+ countsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A listing by resource of the number of fixable and total vulnerabilities.
+ *
+ *
+ *
+ * repeated .google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;
+ *
+ */
+ public Builder addCounts(
+ int index,
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest.Builder
+ builderForValue) {
+ if (countsBuilder_ == null) {
+ ensureCountsIsMutable();
+ counts_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ countsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A listing by resource of the number of fixable and total vulnerabilities.
+ *
+ *
+ *
+ * repeated .google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;
+ *
+ */
+ public Builder addAllCounts(
+ java.lang.Iterable<
+ ? extends
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary
+ .FixableTotalByDigest>
+ values) {
+ if (countsBuilder_ == null) {
+ ensureCountsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, counts_);
+ onChanged();
+ } else {
+ countsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A listing by resource of the number of fixable and total vulnerabilities.
+ *
+ *
+ *
+ * repeated .google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;
+ *
+ */
+ public Builder clearCounts() {
+ if (countsBuilder_ == null) {
+ counts_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ countsBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A listing by resource of the number of fixable and total vulnerabilities.
+ *
+ *
+ *
+ * repeated .google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;
+ *
+ */
+ public Builder removeCounts(int index) {
+ if (countsBuilder_ == null) {
+ ensureCountsIsMutable();
+ counts_.remove(index);
+ onChanged();
+ } else {
+ countsBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A listing by resource of the number of fixable and total vulnerabilities.
+ *
+ *
+ *
+ * repeated .google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;
+ *
+ */
+ public com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest
+ .Builder
+ getCountsBuilder(int index) {
+ return getCountsFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ *
+ *
+ * A listing by resource of the number of fixable and total vulnerabilities.
+ *
+ *
+ *
+ * repeated .google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;
+ *
+ */
+ public com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary
+ .FixableTotalByDigestOrBuilder
+ getCountsOrBuilder(int index) {
+ if (countsBuilder_ == null) {
+ return counts_.get(index);
+ } else {
+ return countsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ *
+ *
+ * A listing by resource of the number of fixable and total vulnerabilities.
+ *
+ *
+ *
+ * repeated .google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;
+ *
+ */
+ public java.util.List<
+ ? extends
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary
+ .FixableTotalByDigestOrBuilder>
+ getCountsOrBuilderList() {
+ if (countsBuilder_ != null) {
+ return countsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(counts_);
+ }
+ }
+ /**
+ *
+ *
+ *
+ * A listing by resource of the number of fixable and total vulnerabilities.
+ *
+ *
+ *
+ * repeated .google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;
+ *
+ */
+ public com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest
+ .Builder
+ addCountsBuilder() {
+ return getCountsFieldBuilder()
+ .addBuilder(
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest
+ .getDefaultInstance());
+ }
+ /**
+ *
+ *
+ *
+ * A listing by resource of the number of fixable and total vulnerabilities.
+ *
+ *
+ *
+ * repeated .google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;
+ *
+ */
+ public com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest
+ .Builder
+ addCountsBuilder(int index) {
+ return getCountsFieldBuilder()
+ .addBuilder(
+ index,
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest
+ .getDefaultInstance());
+ }
+ /**
+ *
+ *
+ *
+ * A listing by resource of the number of fixable and total vulnerabilities.
+ *
+ *
+ *
+ * repeated .google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;
+ *
+ */
+ public java.util.List<
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest
+ .Builder>
+ getCountsBuilderList() {
+ return getCountsFieldBuilder().getBuilderList();
+ }
+
+ private com.google.protobuf.RepeatedFieldBuilderV3<
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest,
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest
+ .Builder,
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary
+ .FixableTotalByDigestOrBuilder>
+ getCountsFieldBuilder() {
+ if (countsBuilder_ == null) {
+ countsBuilder_ =
+ new com.google.protobuf.RepeatedFieldBuilderV3<
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary
+ .FixableTotalByDigest,
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest
+ .Builder,
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary
+ .FixableTotalByDigestOrBuilder>(
+ counts_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean());
+ counts_ = null;
+ }
+ return countsBuilder_;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary)
+ private static final com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary();
+ }
+
+ public static com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser PARSER =
+ new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public VulnerabilityOccurrencesSummary parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new VulnerabilityOccurrencesSummary(input, extensionRegistry);
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary
+ getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+}
diff --git a/proto-google-cloud-containeranalysis-v1/src/main/java/com/google/containeranalysis/v1/VulnerabilityOccurrencesSummaryOrBuilder.java b/proto-google-cloud-containeranalysis-v1/src/main/java/com/google/containeranalysis/v1/VulnerabilityOccurrencesSummaryOrBuilder.java
new file mode 100644
index 00000000..e78c2faf
--- /dev/null
+++ b/proto-google-cloud-containeranalysis-v1/src/main/java/com/google/containeranalysis/v1/VulnerabilityOccurrencesSummaryOrBuilder.java
@@ -0,0 +1,94 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/devtools/containeranalysis/v1/containeranalysis.proto
+
+package com.google.containeranalysis.v1;
+
+public interface VulnerabilityOccurrencesSummaryOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ *
+ *
+ *
+ * A listing by resource of the number of fixable and total vulnerabilities.
+ *
+ *
+ *
+ * repeated .google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;
+ *
+ */
+ java.util.List<
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest>
+ getCountsList();
+ /**
+ *
+ *
+ *
+ * A listing by resource of the number of fixable and total vulnerabilities.
+ *
+ *
+ *
+ * repeated .google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;
+ *
+ */
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest getCounts(
+ int index);
+ /**
+ *
+ *
+ *
+ * A listing by resource of the number of fixable and total vulnerabilities.
+ *
+ *
+ *
+ * repeated .google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;
+ *
+ */
+ int getCountsCount();
+ /**
+ *
+ *
+ *
+ * A listing by resource of the number of fixable and total vulnerabilities.
+ *
+ *
+ *
+ * repeated .google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;
+ *
+ */
+ java.util.List<
+ ? extends
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary
+ .FixableTotalByDigestOrBuilder>
+ getCountsOrBuilderList();
+ /**
+ *
+ *
+ *
+ * A listing by resource of the number of fixable and total vulnerabilities.
+ *
+ *
+ *
+ * repeated .google.devtools.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigest counts = 1;
+ *
+ */
+ com.google.containeranalysis.v1.VulnerabilityOccurrencesSummary.FixableTotalByDigestOrBuilder
+ getCountsOrBuilder(int index);
+}
diff --git a/proto-google-cloud-containeranalysis-v1/src/main/proto/google/devtools/containeranalysis/v1/containeranalysis.proto b/proto-google-cloud-containeranalysis-v1/src/main/proto/google/devtools/containeranalysis/v1/containeranalysis.proto
index 55b842a0..f1f1e273 100644
--- a/proto-google-cloud-containeranalysis-v1/src/main/proto/google/devtools/containeranalysis/v1/containeranalysis.proto
+++ b/proto-google-cloud-containeranalysis-v1/src/main/proto/google/devtools/containeranalysis/v1/containeranalysis.proto
@@ -1,4 +1,4 @@
-// Copyright 2019 Google LLC.
+// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -11,7 +11,6 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
-//
syntax = "proto3";
@@ -19,9 +18,12 @@ package google.devtools.containeranalysis.v1;
import "google/api/annotations.proto";
import "google/api/client.proto";
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
import "google/iam/v1/iam_policy.proto";
import "google/iam/v1/policy.proto";
import "google/protobuf/timestamp.proto";
+import "grafeas/v1/vulnerability.proto";
option csharp_namespace = "Google.Cloud.DevTools.ContainerAnalysis.V1";
option go_package = "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1;containeranalysis";
@@ -105,4 +107,48 @@ service ContainerAnalysis {
};
option (google.api.method_signature) = "resource,permissions";
}
+
+ // Gets a summary of the number and severity of occurrences.
+ rpc GetVulnerabilityOccurrencesSummary(GetVulnerabilityOccurrencesSummaryRequest) returns (VulnerabilityOccurrencesSummary) {
+ option (google.api.http) = {
+ get: "/v1/{parent=projects/*}/occurrences:vulnerabilitySummary"
+ };
+ option (google.api.method_signature) = "parent,filter";
+ }
+}
+
+// Request to get a vulnerability summary for some set of occurrences.
+message GetVulnerabilityOccurrencesSummaryRequest {
+ // The name of the project to get a vulnerability summary for in the form of
+ // `projects/[PROJECT_ID]`.
+ string parent = 1 [
+ (google.api.resource_reference).type = "cloudresourcemanager.googleapis.com/Project",
+ (google.api.field_behavior) = REQUIRED
+ ];
+
+ // The filter expression.
+ string filter = 2;
+}
+
+// A summary of how many vulnerability occurrences there are per resource and
+// severity type.
+message VulnerabilityOccurrencesSummary {
+ // Per resource and severity counts of fixable and total vulnerabilities.
+ message FixableTotalByDigest {
+ // The affected resource.
+ string resource_uri = 1;
+
+ // The severity for this count. SEVERITY_UNSPECIFIED indicates total across
+ // all severities.
+ grafeas.v1.Severity severity = 2;
+
+ // The number of fixable vulnerabilities associated with this resource.
+ int64 fixable_count = 3;
+
+ // The total number of vulnerabilities associated with this resource.
+ int64 total_count = 4;
+ }
+
+ // A listing by resource of the number of fixable and total vulnerabilities.
+ repeated FixableTotalByDigest counts = 1;
}
diff --git a/synth.metadata b/synth.metadata
index b8e72de3..0a2b2dee 100644
--- a/synth.metadata
+++ b/synth.metadata
@@ -11,16 +11,16 @@
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
- "sha": "96ef637adf148d54236ad83fefa30c7f75f29737",
- "internalRef": "325052820"
+ "sha": "cb7fc620590382a4a2ea6ffdf6f51ae0e77bbbb5",
+ "internalRef": "334682521"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
- "sha": "96ef637adf148d54236ad83fefa30c7f75f29737",
- "internalRef": "325052820"
+ "sha": "cb7fc620590382a4a2ea6ffdf6f51ae0e77bbbb5",
+ "internalRef": "334682521"
}
},
{
@@ -148,6 +148,11 @@
"java.header",
"license-checks.xml",
"proto-google-cloud-containeranalysis-v1/src/main/java/com/google/containeranalysis/v1/Containeranalysis.java",
+ "proto-google-cloud-containeranalysis-v1/src/main/java/com/google/containeranalysis/v1/GetVulnerabilityOccurrencesSummaryRequest.java",
+ "proto-google-cloud-containeranalysis-v1/src/main/java/com/google/containeranalysis/v1/GetVulnerabilityOccurrencesSummaryRequestOrBuilder.java",
+ "proto-google-cloud-containeranalysis-v1/src/main/java/com/google/containeranalysis/v1/ProjectName.java",
+ "proto-google-cloud-containeranalysis-v1/src/main/java/com/google/containeranalysis/v1/VulnerabilityOccurrencesSummary.java",
+ "proto-google-cloud-containeranalysis-v1/src/main/java/com/google/containeranalysis/v1/VulnerabilityOccurrencesSummaryOrBuilder.java",
"proto-google-cloud-containeranalysis-v1/src/main/proto/google/devtools/containeranalysis/v1/containeranalysis.proto",
"proto-google-cloud-containeranalysis-v1beta1/src/main/java/com/google/containeranalysis/v1beta1/Containeranalysis.java",
"proto-google-cloud-containeranalysis-v1beta1/src/main/java/com/google/containeranalysis/v1beta1/GetScanConfigRequest.java",