From 080c59004ce85a4813a2ade16e0972d4f7baee3f Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 13 Jul 2022 17:51:31 -0400 Subject: [PATCH] feat: Added contacts field to findings attributes, specifying Essential Contacts defined at org, folder or project level within a GCP org (#865) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Added contacts field to findings attributes, specifying Essential Contacts defined at org, folder or project level within a GCP org feat: Added process signature fields to the indicator attribute that helps surface multiple types of signature defined IOCs PiperOrigin-RevId: 458537238 Source-Link: https://github.com/googleapis/googleapis/commit/7fdec62959f080693e8e137c7772970cb45ecffd Source-Link: https://github.com/googleapis/googleapis-gen/commit/bb340e3223539a792a204be2a794fb2ad3724f68 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYmIzNDBlMzIyMzUzOWE3OTJhMjA0YmUyYTc5NGZiMmFkMzcyNGY2OCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * add scc-secrets, excluded samples.cfg from owlbot changes and fixed PrintStream init in Mute config test * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot Co-authored-by: Sita Lakshmi Sangameswaran --- .kokoro/presubmit/samples.cfg | 2 +- .../v1/SecurityCenterClientHttpJsonTest.java | 9 + .../v1/SecurityCenterClientTest.java | 7 + owlbot.py | 5 +- .../cloud/securitycenter/v1/Contact.java | 636 +++ .../securitycenter/v1/ContactDetails.java | 951 ++++ .../v1/ContactDetailsOrBuilder.java | 77 + .../v1/ContactDetailsProto.java | 81 + .../securitycenter/v1/ContactOrBuilder.java | 50 + .../google/cloud/securitycenter/v1/File.java | 14 +- .../securitycenter/v1/FileOrBuilder.java | 4 +- .../cloud/securitycenter/v1/Finding.java | 609 +- .../securitycenter/v1/FindingOrBuilder.java | 165 +- .../securitycenter/v1/FindingOuterClass.java | 165 +- .../cloud/securitycenter/v1/Indicator.java | 5044 ++++++++++++++++- .../securitycenter/v1/IndicatorOrBuilder.java | 63 + .../securitycenter/v1/IndicatorProto.java | 87 +- .../cloud/securitycenter/v1/Process.java | 186 + .../securitycenter/v1/ProcessOrBuilder.java | 27 + .../cloud/securitycenter/v1/ProcessProto.java | 35 +- .../securitycenter/v1/contact_details.proto | 37 + .../google/cloud/securitycenter/v1/file.proto | 2 +- .../cloud/securitycenter/v1/finding.proto | 30 +- .../cloud/securitycenter/v1/indicator.proto | 42 + .../cloud/securitycenter/v1/process.proto | 4 + .../snippets/MuteFindingIT.java | 7 + 26 files changed, 8101 insertions(+), 238 deletions(-) create mode 100644 proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Contact.java create mode 100644 proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ContactDetails.java create mode 100644 proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ContactDetailsOrBuilder.java create mode 100644 proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ContactDetailsProto.java create mode 100644 proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ContactOrBuilder.java create mode 100644 proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/contact_details.proto diff --git a/.kokoro/presubmit/samples.cfg b/.kokoro/presubmit/samples.cfg index 01e096004..67806dd18 100644 --- a/.kokoro/presubmit/samples.cfg +++ b/.kokoro/presubmit/samples.cfg @@ -29,5 +29,5 @@ env_vars: { env_vars: { key: "SECRET_MANAGER_KEYS" - value: "java-docs-samples-service-account" + value: "java-docs-samples-service-account,java-scc-samples-secrets" } \ No newline at end of file diff --git a/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/SecurityCenterClientHttpJsonTest.java b/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/SecurityCenterClientHttpJsonTest.java index 3195ac5e1..014f97bb0 100644 --- a/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/SecurityCenterClientHttpJsonTest.java +++ b/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/SecurityCenterClientHttpJsonTest.java @@ -314,6 +314,7 @@ public void createFindingTest() throws Exception { .addAllConnections(new ArrayList()) .setMuteInitiator("muteInitiator1395645462") .addAllProcesses(new ArrayList()) + .putAllContacts(new HashMap()) .addAllCompliances(new ArrayList()) .setDescription("description-1724546052") .setExfiltration(Exfiltration.newBuilder().build()) @@ -388,6 +389,7 @@ public void createFindingTest2() throws Exception { .addAllConnections(new ArrayList()) .setMuteInitiator("muteInitiator1395645462") .addAllProcesses(new ArrayList()) + .putAllContacts(new HashMap()) .addAllCompliances(new ArrayList()) .setDescription("description-1724546052") .setExfiltration(Exfiltration.newBuilder().build()) @@ -2775,6 +2777,7 @@ public void setFindingStateTest() throws Exception { .addAllConnections(new ArrayList()) .setMuteInitiator("muteInitiator1395645462") .addAllProcesses(new ArrayList()) + .putAllContacts(new HashMap()) .addAllCompliances(new ArrayList()) .setDescription("description-1724546052") .setExfiltration(Exfiltration.newBuilder().build()) @@ -2851,6 +2854,7 @@ public void setFindingStateTest2() throws Exception { .addAllConnections(new ArrayList()) .setMuteInitiator("muteInitiator1395645462") .addAllProcesses(new ArrayList()) + .putAllContacts(new HashMap()) .addAllCompliances(new ArrayList()) .setDescription("description-1724546052") .setExfiltration(Exfiltration.newBuilder().build()) @@ -2925,6 +2929,7 @@ public void setMuteTest() throws Exception { .addAllConnections(new ArrayList()) .setMuteInitiator("muteInitiator1395645462") .addAllProcesses(new ArrayList()) + .putAllContacts(new HashMap()) .addAllCompliances(new ArrayList()) .setDescription("description-1724546052") .setExfiltration(Exfiltration.newBuilder().build()) @@ -2999,6 +3004,7 @@ public void setMuteTest2() throws Exception { .addAllConnections(new ArrayList()) .setMuteInitiator("muteInitiator1395645462") .addAllProcesses(new ArrayList()) + .putAllContacts(new HashMap()) .addAllCompliances(new ArrayList()) .setDescription("description-1724546052") .setExfiltration(Exfiltration.newBuilder().build()) @@ -3323,6 +3329,7 @@ public void updateFindingTest() throws Exception { .addAllConnections(new ArrayList()) .setMuteInitiator("muteInitiator1395645462") .addAllProcesses(new ArrayList()) + .putAllContacts(new HashMap()) .addAllCompliances(new ArrayList()) .setDescription("description-1724546052") .setExfiltration(Exfiltration.newBuilder().build()) @@ -3355,6 +3362,7 @@ public void updateFindingTest() throws Exception { .addAllConnections(new ArrayList()) .setMuteInitiator("muteInitiator1395645462") .addAllProcesses(new ArrayList()) + .putAllContacts(new HashMap()) .addAllCompliances(new ArrayList()) .setDescription("description-1724546052") .setExfiltration(Exfiltration.newBuilder().build()) @@ -3412,6 +3420,7 @@ public void updateFindingExceptionTest() throws Exception { .addAllConnections(new ArrayList()) .setMuteInitiator("muteInitiator1395645462") .addAllProcesses(new ArrayList()) + .putAllContacts(new HashMap()) .addAllCompliances(new ArrayList()) .setDescription("description-1724546052") .setExfiltration(Exfiltration.newBuilder().build()) diff --git a/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/SecurityCenterClientTest.java b/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/SecurityCenterClientTest.java index 0e5b30f22..b2159484c 100644 --- a/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/SecurityCenterClientTest.java +++ b/google-cloud-securitycenter/src/test/java/com/google/cloud/securitycenter/v1/SecurityCenterClientTest.java @@ -305,6 +305,7 @@ public void createFindingTest() throws Exception { .addAllConnections(new ArrayList()) .setMuteInitiator("muteInitiator1395645462") .addAllProcesses(new ArrayList()) + .putAllContacts(new HashMap()) .addAllCompliances(new ArrayList()) .setDescription("description-1724546052") .setExfiltration(Exfiltration.newBuilder().build()) @@ -375,6 +376,7 @@ public void createFindingTest2() throws Exception { .addAllConnections(new ArrayList()) .setMuteInitiator("muteInitiator1395645462") .addAllProcesses(new ArrayList()) + .putAllContacts(new HashMap()) .addAllCompliances(new ArrayList()) .setDescription("description-1724546052") .setExfiltration(Exfiltration.newBuilder().build()) @@ -2546,6 +2548,7 @@ public void setFindingStateTest() throws Exception { .addAllConnections(new ArrayList()) .setMuteInitiator("muteInitiator1395645462") .addAllProcesses(new ArrayList()) + .putAllContacts(new HashMap()) .addAllCompliances(new ArrayList()) .setDescription("description-1724546052") .setExfiltration(Exfiltration.newBuilder().build()) @@ -2618,6 +2621,7 @@ public void setFindingStateTest2() throws Exception { .addAllConnections(new ArrayList()) .setMuteInitiator("muteInitiator1395645462") .addAllProcesses(new ArrayList()) + .putAllContacts(new HashMap()) .addAllCompliances(new ArrayList()) .setDescription("description-1724546052") .setExfiltration(Exfiltration.newBuilder().build()) @@ -2688,6 +2692,7 @@ public void setMuteTest() throws Exception { .addAllConnections(new ArrayList()) .setMuteInitiator("muteInitiator1395645462") .addAllProcesses(new ArrayList()) + .putAllContacts(new HashMap()) .addAllCompliances(new ArrayList()) .setDescription("description-1724546052") .setExfiltration(Exfiltration.newBuilder().build()) @@ -2757,6 +2762,7 @@ public void setMuteTest2() throws Exception { .addAllConnections(new ArrayList()) .setMuteInitiator("muteInitiator1395645462") .addAllProcesses(new ArrayList()) + .putAllContacts(new HashMap()) .addAllCompliances(new ArrayList()) .setDescription("description-1724546052") .setExfiltration(Exfiltration.newBuilder().build()) @@ -3036,6 +3042,7 @@ public void updateFindingTest() throws Exception { .addAllConnections(new ArrayList()) .setMuteInitiator("muteInitiator1395645462") .addAllProcesses(new ArrayList()) + .putAllContacts(new HashMap()) .addAllCompliances(new ArrayList()) .setDescription("description-1724546052") .setExfiltration(Exfiltration.newBuilder().build()) diff --git a/owlbot.py b/owlbot.py index ffd4579d5..d17bd2eda 100644 --- a/owlbot.py +++ b/owlbot.py @@ -64,4 +64,7 @@ s.move(library) s.remove_staging_dirs() -java.common_templates() + +java.common_templates(excludes=[ + '.kokoro/presubmit/samples.cfg' +]) diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Contact.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Contact.java new file mode 100644 index 000000000..e73c828a4 --- /dev/null +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Contact.java @@ -0,0 +1,636 @@ +/* + * 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/cloud/securitycenter/v1/contact_details.proto + +package com.google.cloud.securitycenter.v1; + +/** + * + * + *
+ * Representa a single contact's email address
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v1.Contact} + */ +public final class Contact extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.Contact) + ContactOrBuilder { + private static final long serialVersionUID = 0L; + // Use Contact.newBuilder() to construct. + private Contact(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Contact() { + email_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Contact(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Contact( + 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(); + + email_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().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.cloud.securitycenter.v1.ContactDetailsProto + .internal_static_google_cloud_securitycenter_v1_Contact_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.ContactDetailsProto + .internal_static_google_cloud_securitycenter_v1_Contact_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.Contact.class, + com.google.cloud.securitycenter.v1.Contact.Builder.class); + } + + public static final int EMAIL_FIELD_NUMBER = 1; + private volatile java.lang.Object email_; + /** + * + * + *
+   * An email address e.g. "person123@company.com"
+   * 
+ * + * string email = 1; + * + * @return The email. + */ + @java.lang.Override + public java.lang.String getEmail() { + java.lang.Object ref = email_; + 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(); + email_ = s; + return s; + } + } + /** + * + * + *
+   * An email address e.g. "person123@company.com"
+   * 
+ * + * string email = 1; + * + * @return The bytes for email. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEmailBytes() { + java.lang.Object ref = email_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + email_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(email_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, email_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(email_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, email_); + } + 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.cloud.securitycenter.v1.Contact)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v1.Contact other = + (com.google.cloud.securitycenter.v1.Contact) obj; + + if (!getEmail().equals(other.getEmail())) 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) + EMAIL_FIELD_NUMBER; + hash = (53 * hash) + getEmail().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v1.Contact parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.Contact parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.Contact parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.Contact 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.cloud.securitycenter.v1.Contact parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.Contact parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.Contact parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.Contact 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.cloud.securitycenter.v1.Contact parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.Contact 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.cloud.securitycenter.v1.Contact parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.Contact 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.cloud.securitycenter.v1.Contact 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; + } + /** + * + * + *
+   * Representa a single contact's email address
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v1.Contact} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.Contact) + com.google.cloud.securitycenter.v1.ContactOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.ContactDetailsProto + .internal_static_google_cloud_securitycenter_v1_Contact_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.ContactDetailsProto + .internal_static_google_cloud_securitycenter_v1_Contact_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.Contact.class, + com.google.cloud.securitycenter.v1.Contact.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v1.Contact.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(); + email_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v1.ContactDetailsProto + .internal_static_google_cloud_securitycenter_v1_Contact_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.Contact getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v1.Contact.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.Contact build() { + com.google.cloud.securitycenter.v1.Contact result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.Contact buildPartial() { + com.google.cloud.securitycenter.v1.Contact result = + new com.google.cloud.securitycenter.v1.Contact(this); + result.email_ = email_; + 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.cloud.securitycenter.v1.Contact) { + return mergeFrom((com.google.cloud.securitycenter.v1.Contact) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v1.Contact other) { + if (other == com.google.cloud.securitycenter.v1.Contact.getDefaultInstance()) return this; + if (!other.getEmail().isEmpty()) { + email_ = other.email_; + 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.cloud.securitycenter.v1.Contact parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.securitycenter.v1.Contact) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object email_ = ""; + /** + * + * + *
+     * An email address e.g. "person123@company.com"
+     * 
+ * + * string email = 1; + * + * @return The email. + */ + public java.lang.String getEmail() { + java.lang.Object ref = email_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + email_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * An email address e.g. "person123@company.com"
+     * 
+ * + * string email = 1; + * + * @return The bytes for email. + */ + public com.google.protobuf.ByteString getEmailBytes() { + java.lang.Object ref = email_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + email_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * An email address e.g. "person123@company.com"
+     * 
+ * + * string email = 1; + * + * @param value The email to set. + * @return This builder for chaining. + */ + public Builder setEmail(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + email_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * An email address e.g. "person123@company.com"
+     * 
+ * + * string email = 1; + * + * @return This builder for chaining. + */ + public Builder clearEmail() { + + email_ = getDefaultInstance().getEmail(); + onChanged(); + return this; + } + /** + * + * + *
+     * An email address e.g. "person123@company.com"
+     * 
+ * + * string email = 1; + * + * @param value The bytes for email to set. + * @return This builder for chaining. + */ + public Builder setEmailBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + email_ = 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.cloud.securitycenter.v1.Contact) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.Contact) + private static final com.google.cloud.securitycenter.v1.Contact DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.Contact(); + } + + public static com.google.cloud.securitycenter.v1.Contact getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Contact parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Contact(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.cloud.securitycenter.v1.Contact getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ContactDetails.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ContactDetails.java new file mode 100644 index 000000000..48ba5adfa --- /dev/null +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ContactDetails.java @@ -0,0 +1,951 @@ +/* + * 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/cloud/securitycenter/v1/contact_details.proto + +package com.google.cloud.securitycenter.v1; + +/** + * + * + *
+ * The details pertaining to specific contacts
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v1.ContactDetails} + */ +public final class ContactDetails extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.ContactDetails) + ContactDetailsOrBuilder { + private static final long serialVersionUID = 0L; + // Use ContactDetails.newBuilder() to construct. + private ContactDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ContactDetails() { + contacts_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ContactDetails(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ContactDetails( + 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)) { + contacts_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + contacts_.add( + input.readMessage( + com.google.cloud.securitycenter.v1.Contact.parser(), extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + contacts_ = java.util.Collections.unmodifiableList(contacts_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.ContactDetailsProto + .internal_static_google_cloud_securitycenter_v1_ContactDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.ContactDetailsProto + .internal_static_google_cloud_securitycenter_v1_ContactDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.ContactDetails.class, + com.google.cloud.securitycenter.v1.ContactDetails.Builder.class); + } + + public static final int CONTACTS_FIELD_NUMBER = 1; + private java.util.List contacts_; + /** + * + * + *
+   * A list of contacts
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; + */ + @java.lang.Override + public java.util.List getContactsList() { + return contacts_; + } + /** + * + * + *
+   * A list of contacts
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; + */ + @java.lang.Override + public java.util.List + getContactsOrBuilderList() { + return contacts_; + } + /** + * + * + *
+   * A list of contacts
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; + */ + @java.lang.Override + public int getContactsCount() { + return contacts_.size(); + } + /** + * + * + *
+   * A list of contacts
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.Contact getContacts(int index) { + return contacts_.get(index); + } + /** + * + * + *
+   * A list of contacts
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.ContactOrBuilder getContactsOrBuilder(int index) { + return contacts_.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 < contacts_.size(); i++) { + output.writeMessage(1, contacts_.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 < contacts_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, contacts_.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.cloud.securitycenter.v1.ContactDetails)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v1.ContactDetails other = + (com.google.cloud.securitycenter.v1.ContactDetails) obj; + + if (!getContactsList().equals(other.getContactsList())) 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 (getContactsCount() > 0) { + hash = (37 * hash) + CONTACTS_FIELD_NUMBER; + hash = (53 * hash) + getContactsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v1.ContactDetails parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.ContactDetails parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.ContactDetails parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.ContactDetails 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.cloud.securitycenter.v1.ContactDetails parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.ContactDetails parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.ContactDetails parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.ContactDetails 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.cloud.securitycenter.v1.ContactDetails parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.ContactDetails 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.cloud.securitycenter.v1.ContactDetails parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.ContactDetails 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.cloud.securitycenter.v1.ContactDetails 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; + } + /** + * + * + *
+   * The details pertaining to specific contacts
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v1.ContactDetails} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.ContactDetails) + com.google.cloud.securitycenter.v1.ContactDetailsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.ContactDetailsProto + .internal_static_google_cloud_securitycenter_v1_ContactDetails_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.ContactDetailsProto + .internal_static_google_cloud_securitycenter_v1_ContactDetails_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.ContactDetails.class, + com.google.cloud.securitycenter.v1.ContactDetails.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v1.ContactDetails.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getContactsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (contactsBuilder_ == null) { + contacts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + contactsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v1.ContactDetailsProto + .internal_static_google_cloud_securitycenter_v1_ContactDetails_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.ContactDetails getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v1.ContactDetails.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.ContactDetails build() { + com.google.cloud.securitycenter.v1.ContactDetails result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.ContactDetails buildPartial() { + com.google.cloud.securitycenter.v1.ContactDetails result = + new com.google.cloud.securitycenter.v1.ContactDetails(this); + int from_bitField0_ = bitField0_; + if (contactsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + contacts_ = java.util.Collections.unmodifiableList(contacts_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.contacts_ = contacts_; + } else { + result.contacts_ = contactsBuilder_.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.cloud.securitycenter.v1.ContactDetails) { + return mergeFrom((com.google.cloud.securitycenter.v1.ContactDetails) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v1.ContactDetails other) { + if (other == com.google.cloud.securitycenter.v1.ContactDetails.getDefaultInstance()) + return this; + if (contactsBuilder_ == null) { + if (!other.contacts_.isEmpty()) { + if (contacts_.isEmpty()) { + contacts_ = other.contacts_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureContactsIsMutable(); + contacts_.addAll(other.contacts_); + } + onChanged(); + } + } else { + if (!other.contacts_.isEmpty()) { + if (contactsBuilder_.isEmpty()) { + contactsBuilder_.dispose(); + contactsBuilder_ = null; + contacts_ = other.contacts_; + bitField0_ = (bitField0_ & ~0x00000001); + contactsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getContactsFieldBuilder() + : null; + } else { + contactsBuilder_.addAllMessages(other.contacts_); + } + } + } + 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.cloud.securitycenter.v1.ContactDetails parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.securitycenter.v1.ContactDetails) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List contacts_ = + java.util.Collections.emptyList(); + + private void ensureContactsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + contacts_ = new java.util.ArrayList(contacts_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v1.Contact, + com.google.cloud.securitycenter.v1.Contact.Builder, + com.google.cloud.securitycenter.v1.ContactOrBuilder> + contactsBuilder_; + + /** + * + * + *
+     * A list of contacts
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; + */ + public java.util.List getContactsList() { + if (contactsBuilder_ == null) { + return java.util.Collections.unmodifiableList(contacts_); + } else { + return contactsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * A list of contacts
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; + */ + public int getContactsCount() { + if (contactsBuilder_ == null) { + return contacts_.size(); + } else { + return contactsBuilder_.getCount(); + } + } + /** + * + * + *
+     * A list of contacts
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; + */ + public com.google.cloud.securitycenter.v1.Contact getContacts(int index) { + if (contactsBuilder_ == null) { + return contacts_.get(index); + } else { + return contactsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * A list of contacts
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; + */ + public Builder setContacts(int index, com.google.cloud.securitycenter.v1.Contact value) { + if (contactsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContactsIsMutable(); + contacts_.set(index, value); + onChanged(); + } else { + contactsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of contacts
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; + */ + public Builder setContacts( + int index, com.google.cloud.securitycenter.v1.Contact.Builder builderForValue) { + if (contactsBuilder_ == null) { + ensureContactsIsMutable(); + contacts_.set(index, builderForValue.build()); + onChanged(); + } else { + contactsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of contacts
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; + */ + public Builder addContacts(com.google.cloud.securitycenter.v1.Contact value) { + if (contactsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContactsIsMutable(); + contacts_.add(value); + onChanged(); + } else { + contactsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * A list of contacts
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; + */ + public Builder addContacts(int index, com.google.cloud.securitycenter.v1.Contact value) { + if (contactsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureContactsIsMutable(); + contacts_.add(index, value); + onChanged(); + } else { + contactsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * A list of contacts
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; + */ + public Builder addContacts(com.google.cloud.securitycenter.v1.Contact.Builder builderForValue) { + if (contactsBuilder_ == null) { + ensureContactsIsMutable(); + contacts_.add(builderForValue.build()); + onChanged(); + } else { + contactsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of contacts
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; + */ + public Builder addContacts( + int index, com.google.cloud.securitycenter.v1.Contact.Builder builderForValue) { + if (contactsBuilder_ == null) { + ensureContactsIsMutable(); + contacts_.add(index, builderForValue.build()); + onChanged(); + } else { + contactsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * A list of contacts
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; + */ + public Builder addAllContacts( + java.lang.Iterable values) { + if (contactsBuilder_ == null) { + ensureContactsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, contacts_); + onChanged(); + } else { + contactsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * A list of contacts
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; + */ + public Builder clearContacts() { + if (contactsBuilder_ == null) { + contacts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + contactsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * A list of contacts
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; + */ + public Builder removeContacts(int index) { + if (contactsBuilder_ == null) { + ensureContactsIsMutable(); + contacts_.remove(index); + onChanged(); + } else { + contactsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * A list of contacts
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; + */ + public com.google.cloud.securitycenter.v1.Contact.Builder getContactsBuilder(int index) { + return getContactsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * A list of contacts
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; + */ + public com.google.cloud.securitycenter.v1.ContactOrBuilder getContactsOrBuilder(int index) { + if (contactsBuilder_ == null) { + return contacts_.get(index); + } else { + return contactsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * A list of contacts
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; + */ + public java.util.List + getContactsOrBuilderList() { + if (contactsBuilder_ != null) { + return contactsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(contacts_); + } + } + /** + * + * + *
+     * A list of contacts
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; + */ + public com.google.cloud.securitycenter.v1.Contact.Builder addContactsBuilder() { + return getContactsFieldBuilder() + .addBuilder(com.google.cloud.securitycenter.v1.Contact.getDefaultInstance()); + } + /** + * + * + *
+     * A list of contacts
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; + */ + public com.google.cloud.securitycenter.v1.Contact.Builder addContactsBuilder(int index) { + return getContactsFieldBuilder() + .addBuilder(index, com.google.cloud.securitycenter.v1.Contact.getDefaultInstance()); + } + /** + * + * + *
+     * A list of contacts
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; + */ + public java.util.List + getContactsBuilderList() { + return getContactsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v1.Contact, + com.google.cloud.securitycenter.v1.Contact.Builder, + com.google.cloud.securitycenter.v1.ContactOrBuilder> + getContactsFieldBuilder() { + if (contactsBuilder_ == null) { + contactsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v1.Contact, + com.google.cloud.securitycenter.v1.Contact.Builder, + com.google.cloud.securitycenter.v1.ContactOrBuilder>( + contacts_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + contacts_ = null; + } + return contactsBuilder_; + } + + @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.cloud.securitycenter.v1.ContactDetails) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.ContactDetails) + private static final com.google.cloud.securitycenter.v1.ContactDetails DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.ContactDetails(); + } + + public static com.google.cloud.securitycenter.v1.ContactDetails getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ContactDetails parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ContactDetails(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.cloud.securitycenter.v1.ContactDetails getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ContactDetailsOrBuilder.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ContactDetailsOrBuilder.java new file mode 100644 index 000000000..3f02f5f44 --- /dev/null +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ContactDetailsOrBuilder.java @@ -0,0 +1,77 @@ +/* + * 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/cloud/securitycenter/v1/contact_details.proto + +package com.google.cloud.securitycenter.v1; + +public interface ContactDetailsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.ContactDetails) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A list of contacts
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; + */ + java.util.List getContactsList(); + /** + * + * + *
+   * A list of contacts
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; + */ + com.google.cloud.securitycenter.v1.Contact getContacts(int index); + /** + * + * + *
+   * A list of contacts
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; + */ + int getContactsCount(); + /** + * + * + *
+   * A list of contacts
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; + */ + java.util.List + getContactsOrBuilderList(); + /** + * + * + *
+   * A list of contacts
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.Contact contacts = 1; + */ + com.google.cloud.securitycenter.v1.ContactOrBuilder getContactsOrBuilder(int index); +} diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ContactDetailsProto.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ContactDetailsProto.java new file mode 100644 index 000000000..f5a73ac38 --- /dev/null +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ContactDetailsProto.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/cloud/securitycenter/v1/contact_details.proto + +package com.google.cloud.securitycenter.v1; + +public final class ContactDetailsProto { + private ContactDetailsProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v1_ContactDetails_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v1_ContactDetails_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v1_Contact_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v1_Contact_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n4google/cloud/securitycenter/v1/contact" + + "_details.proto\022\036google.cloud.securitycen" + + "ter.v1\"K\n\016ContactDetails\0229\n\010contacts\030\001 \003" + + "(\0132\'.google.cloud.securitycenter.v1.Cont" + + "act\"\030\n\007Contact\022\r\n\005email\030\001 \001(\tB\357\001\n\"com.go" + + "ogle.cloud.securitycenter.v1B\023ContactDet" + + "ailsProtoP\001ZLgoogle.golang.org/genproto/" + + "googleapis/cloud/securitycenter/v1;secur" + + "itycenter\252\002\036Google.Cloud.SecurityCenter." + + "V1\312\002\036Google\\Cloud\\SecurityCenter\\V1\352\002!Go" + + "ogle::Cloud::SecurityCenter::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + internal_static_google_cloud_securitycenter_v1_ContactDetails_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_securitycenter_v1_ContactDetails_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v1_ContactDetails_descriptor, + new java.lang.String[] { + "Contacts", + }); + internal_static_google_cloud_securitycenter_v1_Contact_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_securitycenter_v1_Contact_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v1_Contact_descriptor, + new java.lang.String[] { + "Email", + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ContactOrBuilder.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ContactOrBuilder.java new file mode 100644 index 000000000..32deb13cd --- /dev/null +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ContactOrBuilder.java @@ -0,0 +1,50 @@ +/* + * 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/cloud/securitycenter/v1/contact_details.proto + +package com.google.cloud.securitycenter.v1; + +public interface ContactOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.Contact) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * An email address e.g. "person123@company.com"
+   * 
+ * + * string email = 1; + * + * @return The email. + */ + java.lang.String getEmail(); + /** + * + * + *
+   * An email address e.g. "person123@company.com"
+   * 
+ * + * string email = 1; + * + * @return The bytes for email. + */ + com.google.protobuf.ByteString getEmailBytes(); +} diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/File.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/File.java index 693bf5ff4..6c0279a19 100644 --- a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/File.java +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/File.java @@ -219,7 +219,7 @@ public long getSize() { * *
    * SHA256 hash of the first hashed_size bytes of the file encoded as a
-   * hex string.  If hashed_size == size, hash_sha256 represents the SHA256 hash
+   * hex string.  If hashed_size == size, sha256 represents the SHA256 hash
    * of the entire file.
    * 
* @@ -244,7 +244,7 @@ public java.lang.String getSha256() { * *
    * SHA256 hash of the first hashed_size bytes of the file encoded as a
-   * hex string.  If hashed_size == size, hash_sha256 represents the SHA256 hash
+   * hex string.  If hashed_size == size, sha256 represents the SHA256 hash
    * of the entire file.
    * 
* @@ -911,7 +911,7 @@ public Builder clearSize() { * *
      * SHA256 hash of the first hashed_size bytes of the file encoded as a
-     * hex string.  If hashed_size == size, hash_sha256 represents the SHA256 hash
+     * hex string.  If hashed_size == size, sha256 represents the SHA256 hash
      * of the entire file.
      * 
* @@ -935,7 +935,7 @@ public java.lang.String getSha256() { * *
      * SHA256 hash of the first hashed_size bytes of the file encoded as a
-     * hex string.  If hashed_size == size, hash_sha256 represents the SHA256 hash
+     * hex string.  If hashed_size == size, sha256 represents the SHA256 hash
      * of the entire file.
      * 
* @@ -959,7 +959,7 @@ public com.google.protobuf.ByteString getSha256Bytes() { * *
      * SHA256 hash of the first hashed_size bytes of the file encoded as a
-     * hex string.  If hashed_size == size, hash_sha256 represents the SHA256 hash
+     * hex string.  If hashed_size == size, sha256 represents the SHA256 hash
      * of the entire file.
      * 
* @@ -982,7 +982,7 @@ public Builder setSha256(java.lang.String value) { * *
      * SHA256 hash of the first hashed_size bytes of the file encoded as a
-     * hex string.  If hashed_size == size, hash_sha256 represents the SHA256 hash
+     * hex string.  If hashed_size == size, sha256 represents the SHA256 hash
      * of the entire file.
      * 
* @@ -1001,7 +1001,7 @@ public Builder clearSha256() { * *
      * SHA256 hash of the first hashed_size bytes of the file encoded as a
-     * hex string.  If hashed_size == size, hash_sha256 represents the SHA256 hash
+     * hex string.  If hashed_size == size, sha256 represents the SHA256 hash
      * of the entire file.
      * 
* diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FileOrBuilder.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FileOrBuilder.java index b48ec9954..421dafb03 100644 --- a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FileOrBuilder.java +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FileOrBuilder.java @@ -66,7 +66,7 @@ public interface FileOrBuilder * *
    * SHA256 hash of the first hashed_size bytes of the file encoded as a
-   * hex string.  If hashed_size == size, hash_sha256 represents the SHA256 hash
+   * hex string.  If hashed_size == size, sha256 represents the SHA256 hash
    * of the entire file.
    * 
* @@ -80,7 +80,7 @@ public interface FileOrBuilder * *
    * SHA256 hash of the first hashed_size bytes of the file encoded as a
-   * hex string.  If hashed_size == size, hash_sha256 represents the SHA256 hash
+   * hex string.  If hashed_size == size, sha256 represents the SHA256 hash
    * of the entire file.
    * 
* diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Finding.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Finding.java index e1c0d0890..3d7ece351 100644 --- a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Finding.java +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Finding.java @@ -354,12 +354,29 @@ private Finding( com.google.cloud.securitycenter.v1.Connection.parser(), extensionRegistry)); break; } - case 274: + case 266: { if (!((mutable_bitField0_ & 0x00000010) != 0)) { + contacts_ = + com.google.protobuf.MapField.newMapField( + ContactsDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000010; + } + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.securitycenter.v1.ContactDetails> + contacts__ = + input.readMessage( + ContactsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + contacts_.getMutableMap().put(contacts__.getKey(), contacts__.getValue()); + break; + } + case 274: + { + if (!((mutable_bitField0_ & 0x00000020) != 0)) { compliances_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000010; + mutable_bitField0_ |= 0x00000020; } compliances_.add( input.readMessage( @@ -391,10 +408,10 @@ private Finding( } case 314: { - if (!((mutable_bitField0_ & 0x00000020) != 0)) { + if (!((mutable_bitField0_ & 0x00000040) != 0)) { iamBindings_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000020; + mutable_bitField0_ |= 0x00000040; } iamBindings_.add( input.readMessage( @@ -430,10 +447,10 @@ private Finding( if (((mutable_bitField0_ & 0x00000004) != 0)) { connections_ = java.util.Collections.unmodifiableList(connections_); } - if (((mutable_bitField0_ & 0x00000010) != 0)) { + if (((mutable_bitField0_ & 0x00000020) != 0)) { compliances_ = java.util.Collections.unmodifiableList(compliances_); } - if (((mutable_bitField0_ & 0x00000020) != 0)) { + if (((mutable_bitField0_ & 0x00000040) != 0)) { iamBindings_ = java.util.Collections.unmodifiableList(iamBindings_); } this.unknownFields = unknownFields.build(); @@ -454,6 +471,8 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { return internalGetSourceProperties(); case 22: return internalGetExternalSystems(); + case 33: + return internalGetContacts(); default: throw new RuntimeException("Invalid map field number: " + number); } @@ -2293,8 +2312,8 @@ public int getExternalSystemsCount() { * * *
-   * Output only. Third party SIEM/SOAR fields within SCC, contains external
-   * system information and external system finding fields.
+   * Output only. Third party SIEM/SOAR fields within SCC, contains external system
+   * information and external system finding fields.
    * 
* * @@ -2319,8 +2338,8 @@ public boolean containsExternalSystems(java.lang.String key) { * * *
-   * Output only. Third party SIEM/SOAR fields within SCC, contains external
-   * system information and external system finding fields.
+   * Output only. Third party SIEM/SOAR fields within SCC, contains external system
+   * information and external system finding fields.
    * 
* * @@ -2336,8 +2355,8 @@ public boolean containsExternalSystems(java.lang.String key) { * * *
-   * Output only. Third party SIEM/SOAR fields within SCC, contains external
-   * system information and external system finding fields.
+   * Output only. Third party SIEM/SOAR fields within SCC, contains external system
+   * information and external system finding fields.
    * 
* * @@ -2358,8 +2377,8 @@ public com.google.cloud.securitycenter.v1.ExternalSystem getExternalSystemsOrDef * * *
-   * Output only. Third party SIEM/SOAR fields within SCC, contains external
-   * system information and external system finding fields.
+   * Output only. Third party SIEM/SOAR fields within SCC, contains external system
+   * information and external system finding fields.
    * 
* * @@ -2675,6 +2694,186 @@ public com.google.cloud.securitycenter.v1.ProcessOrBuilder getProcessesOrBuilder return processes_.get(index); } + public static final int CONTACTS_FIELD_NUMBER = 33; + + private static final class ContactsDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.securitycenter.v1.ContactDetails> + defaultEntry = + com.google.protobuf.MapEntry + . + newDefaultInstance( + com.google.cloud.securitycenter.v1.FindingOuterClass + .internal_static_google_cloud_securitycenter_v1_Finding_ContactsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.cloud.securitycenter.v1.ContactDetails.getDefaultInstance()); + } + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.securitycenter.v1.ContactDetails> + contacts_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.securitycenter.v1.ContactDetails> + internalGetContacts() { + if (contacts_ == null) { + return com.google.protobuf.MapField.emptyMapField(ContactsDefaultEntryHolder.defaultEntry); + } + return contacts_; + } + + public int getContactsCount() { + return internalGetContacts().getMap().size(); + } + /** + * + * + *
+   * Output only. Map containing the point of contacts for the given finding. The key
+   * represents the type of contact, while the value contains a list of all the
+   * contacts that pertain. Please refer to:
+   * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
+   *     {
+   *       "security": {
+   *         "contacts": [
+   *           {
+   *             "email": "person1@company.com"
+   *           },
+   *           {
+   *             "email": "person2@company.com"
+   *           }
+   *         ]
+   *       }
+   *     }
+   * 
+ * + * + * map<string, .google.cloud.securitycenter.v1.ContactDetails> contacts = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public boolean containsContacts(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetContacts().getMap().containsKey(key); + } + /** Use {@link #getContactsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map + getContacts() { + return getContactsMap(); + } + /** + * + * + *
+   * Output only. Map containing the point of contacts for the given finding. The key
+   * represents the type of contact, while the value contains a list of all the
+   * contacts that pertain. Please refer to:
+   * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
+   *     {
+   *       "security": {
+   *         "contacts": [
+   *           {
+   *             "email": "person1@company.com"
+   *           },
+   *           {
+   *             "email": "person2@company.com"
+   *           }
+   *         ]
+   *       }
+   *     }
+   * 
+ * + * + * map<string, .google.cloud.securitycenter.v1.ContactDetails> contacts = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.Map + getContactsMap() { + return internalGetContacts().getMap(); + } + /** + * + * + *
+   * Output only. Map containing the point of contacts for the given finding. The key
+   * represents the type of contact, while the value contains a list of all the
+   * contacts that pertain. Please refer to:
+   * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
+   *     {
+   *       "security": {
+   *         "contacts": [
+   *           {
+   *             "email": "person1@company.com"
+   *           },
+   *           {
+   *             "email": "person2@company.com"
+   *           }
+   *         ]
+   *       }
+   *     }
+   * 
+ * + * + * map<string, .google.cloud.securitycenter.v1.ContactDetails> contacts = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.ContactDetails getContactsOrDefault( + java.lang.String key, com.google.cloud.securitycenter.v1.ContactDetails defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetContacts().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Output only. Map containing the point of contacts for the given finding. The key
+   * represents the type of contact, while the value contains a list of all the
+   * contacts that pertain. Please refer to:
+   * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
+   *     {
+   *       "security": {
+   *         "contacts": [
+   *           {
+   *             "email": "person1@company.com"
+   *           },
+   *           {
+   *             "email": "person2@company.com"
+   *           }
+   *         ]
+   *       }
+   *     }
+   * 
+ * + * + * map<string, .google.cloud.securitycenter.v1.ContactDetails> contacts = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.ContactDetails getContactsOrThrow( + java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetContacts().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public static final int COMPLIANCES_FIELD_NUMBER = 34; private java.util.List compliances_; /** @@ -3048,6 +3247,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < connections_.size(); i++) { output.writeMessage(31, connections_.get(i)); } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetContacts(), ContactsDefaultEntryHolder.defaultEntry, 33); for (int i = 0; i < compliances_.size(); i++) { output.writeMessage(34, compliances_.get(i)); } @@ -3160,6 +3361,18 @@ public int getSerializedSize() { for (int i = 0; i < connections_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(31, connections_.get(i)); } + for (java.util.Map.Entry + entry : internalGetContacts().getMap().entrySet()) { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.securitycenter.v1.ContactDetails> + contacts__ = + ContactsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(33, contacts__); + } for (int i = 0; i < compliances_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(34, compliances_.get(i)); } @@ -3238,6 +3451,7 @@ public boolean equals(final java.lang.Object obj) { if (!getConnectionsList().equals(other.getConnectionsList())) return false; if (!getMuteInitiator().equals(other.getMuteInitiator())) return false; if (!getProcessesList().equals(other.getProcessesList())) return false; + if (!internalGetContacts().equals(other.internalGetContacts())) return false; if (!getCompliancesList().equals(other.getCompliancesList())) return false; if (!getDescription().equals(other.getDescription())) return false; if (hasExfiltration() != other.hasExfiltration()) return false; @@ -3327,6 +3541,10 @@ public int hashCode() { hash = (37 * hash) + PROCESSES_FIELD_NUMBER; hash = (53 * hash) + getProcessesList().hashCode(); } + if (!internalGetContacts().getMap().isEmpty()) { + hash = (37 * hash) + CONTACTS_FIELD_NUMBER; + hash = (53 * hash) + internalGetContacts().hashCode(); + } if (getCompliancesCount() > 0) { hash = (37 * hash) + COMPLIANCES_FIELD_NUMBER; hash = (53 * hash) + getCompliancesList().hashCode(); @@ -3473,6 +3691,8 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { return internalGetSourceProperties(); case 22: return internalGetExternalSystems(); + case 33: + return internalGetContacts(); default: throw new RuntimeException("Invalid map field number: " + number); } @@ -3485,6 +3705,8 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { return internalGetMutableSourceProperties(); case 22: return internalGetMutableExternalSystems(); + case 33: + return internalGetMutableContacts(); default: throw new RuntimeException("Invalid map field number: " + number); } @@ -3606,9 +3828,10 @@ public Builder clear() { } else { processesBuilder_.clear(); } + internalGetMutableContacts().clear(); if (compliancesBuilder_ == null) { compliances_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000020); } else { compliancesBuilder_.clear(); } @@ -3622,7 +3845,7 @@ public Builder clear() { } if (iamBindingsBuilder_ == null) { iamBindings_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000040); } else { iamBindingsBuilder_.clear(); } @@ -3729,10 +3952,12 @@ public com.google.cloud.securitycenter.v1.Finding buildPartial() { } else { result.processes_ = processesBuilder_.build(); } + result.contacts_ = internalGetContacts(); + result.contacts_.makeImmutable(); if (compliancesBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0)) { + if (((bitField0_ & 0x00000020) != 0)) { compliances_ = java.util.Collections.unmodifiableList(compliances_); - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000020); } result.compliances_ = compliances_; } else { @@ -3745,9 +3970,9 @@ public com.google.cloud.securitycenter.v1.Finding buildPartial() { result.exfiltration_ = exfiltrationBuilder_.build(); } if (iamBindingsBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0)) { + if (((bitField0_ & 0x00000040) != 0)) { iamBindings_ = java.util.Collections.unmodifiableList(iamBindings_); - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000040); } result.iamBindings_ = iamBindings_; } else { @@ -3923,11 +4148,12 @@ public Builder mergeFrom(com.google.cloud.securitycenter.v1.Finding other) { } } } + internalGetMutableContacts().mergeFrom(other.internalGetContacts()); if (compliancesBuilder_ == null) { if (!other.compliances_.isEmpty()) { if (compliances_.isEmpty()) { compliances_ = other.compliances_; - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000020); } else { ensureCompliancesIsMutable(); compliances_.addAll(other.compliances_); @@ -3940,7 +4166,7 @@ public Builder mergeFrom(com.google.cloud.securitycenter.v1.Finding other) { compliancesBuilder_.dispose(); compliancesBuilder_ = null; compliances_ = other.compliances_; - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000020); compliancesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getCompliancesFieldBuilder() @@ -3961,7 +4187,7 @@ public Builder mergeFrom(com.google.cloud.securitycenter.v1.Finding other) { if (!other.iamBindings_.isEmpty()) { if (iamBindings_.isEmpty()) { iamBindings_ = other.iamBindings_; - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000040); } else { ensureIamBindingsIsMutable(); iamBindings_.addAll(other.iamBindings_); @@ -3974,7 +4200,7 @@ public Builder mergeFrom(com.google.cloud.securitycenter.v1.Finding other) { iamBindingsBuilder_.dispose(); iamBindingsBuilder_ = null; iamBindings_ = other.iamBindings_; - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000040); iamBindingsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getIamBindingsFieldBuilder() @@ -6636,8 +6862,8 @@ public int getExternalSystemsCount() { * * *
-     * Output only. Third party SIEM/SOAR fields within SCC, contains external
-     * system information and external system finding fields.
+     * Output only. Third party SIEM/SOAR fields within SCC, contains external system
+     * information and external system finding fields.
      * 
* * @@ -6662,8 +6888,8 @@ public boolean containsExternalSystems(java.lang.String key) { * * *
-     * Output only. Third party SIEM/SOAR fields within SCC, contains external
-     * system information and external system finding fields.
+     * Output only. Third party SIEM/SOAR fields within SCC, contains external system
+     * information and external system finding fields.
      * 
* * @@ -6679,8 +6905,8 @@ public boolean containsExternalSystems(java.lang.String key) { * * *
-     * Output only. Third party SIEM/SOAR fields within SCC, contains external
-     * system information and external system finding fields.
+     * Output only. Third party SIEM/SOAR fields within SCC, contains external system
+     * information and external system finding fields.
      * 
* * @@ -6701,8 +6927,8 @@ public com.google.cloud.securitycenter.v1.ExternalSystem getExternalSystemsOrDef * * *
-     * Output only. Third party SIEM/SOAR fields within SCC, contains external
-     * system information and external system finding fields.
+     * Output only. Third party SIEM/SOAR fields within SCC, contains external system
+     * information and external system finding fields.
      * 
* * @@ -6731,8 +6957,8 @@ public Builder clearExternalSystems() { * * *
-     * Output only. Third party SIEM/SOAR fields within SCC, contains external
-     * system information and external system finding fields.
+     * Output only. Third party SIEM/SOAR fields within SCC, contains external system
+     * information and external system finding fields.
      * 
* * @@ -6756,8 +6982,8 @@ public Builder removeExternalSystems(java.lang.String key) { * * *
-     * Output only. Third party SIEM/SOAR fields within SCC, contains external
-     * system information and external system finding fields.
+     * Output only. Third party SIEM/SOAR fields within SCC, contains external system
+     * information and external system finding fields.
      * 
* * @@ -6780,8 +7006,8 @@ public Builder putExternalSystems( * * *
-     * Output only. Third party SIEM/SOAR fields within SCC, contains external
-     * system information and external system finding fields.
+     * Output only. Third party SIEM/SOAR fields within SCC, contains external system
+     * information and external system finding fields.
      * 
* * @@ -8007,14 +8233,305 @@ public com.google.cloud.securitycenter.v1.Process.Builder addProcessesBuilder(in return processesBuilder_; } + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.securitycenter.v1.ContactDetails> + contacts_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.securitycenter.v1.ContactDetails> + internalGetContacts() { + if (contacts_ == null) { + return com.google.protobuf.MapField.emptyMapField(ContactsDefaultEntryHolder.defaultEntry); + } + return contacts_; + } + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.securitycenter.v1.ContactDetails> + internalGetMutableContacts() { + onChanged(); + ; + if (contacts_ == null) { + contacts_ = + com.google.protobuf.MapField.newMapField(ContactsDefaultEntryHolder.defaultEntry); + } + if (!contacts_.isMutable()) { + contacts_ = contacts_.copy(); + } + return contacts_; + } + + public int getContactsCount() { + return internalGetContacts().getMap().size(); + } + /** + * + * + *
+     * Output only. Map containing the point of contacts for the given finding. The key
+     * represents the type of contact, while the value contains a list of all the
+     * contacts that pertain. Please refer to:
+     * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
+     *     {
+     *       "security": {
+     *         "contacts": [
+     *           {
+     *             "email": "person1@company.com"
+     *           },
+     *           {
+     *             "email": "person2@company.com"
+     *           }
+     *         ]
+     *       }
+     *     }
+     * 
+ * + * + * map<string, .google.cloud.securitycenter.v1.ContactDetails> contacts = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public boolean containsContacts(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetContacts().getMap().containsKey(key); + } + /** Use {@link #getContactsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map + getContacts() { + return getContactsMap(); + } + /** + * + * + *
+     * Output only. Map containing the point of contacts for the given finding. The key
+     * represents the type of contact, while the value contains a list of all the
+     * contacts that pertain. Please refer to:
+     * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
+     *     {
+     *       "security": {
+     *         "contacts": [
+     *           {
+     *             "email": "person1@company.com"
+     *           },
+     *           {
+     *             "email": "person2@company.com"
+     *           }
+     *         ]
+     *       }
+     *     }
+     * 
+ * + * + * map<string, .google.cloud.securitycenter.v1.ContactDetails> contacts = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.Map + getContactsMap() { + return internalGetContacts().getMap(); + } + /** + * + * + *
+     * Output only. Map containing the point of contacts for the given finding. The key
+     * represents the type of contact, while the value contains a list of all the
+     * contacts that pertain. Please refer to:
+     * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
+     *     {
+     *       "security": {
+     *         "contacts": [
+     *           {
+     *             "email": "person1@company.com"
+     *           },
+     *           {
+     *             "email": "person2@company.com"
+     *           }
+     *         ]
+     *       }
+     *     }
+     * 
+ * + * + * map<string, .google.cloud.securitycenter.v1.ContactDetails> contacts = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.ContactDetails getContactsOrDefault( + java.lang.String key, com.google.cloud.securitycenter.v1.ContactDetails defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetContacts().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Output only. Map containing the point of contacts for the given finding. The key
+     * represents the type of contact, while the value contains a list of all the
+     * contacts that pertain. Please refer to:
+     * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
+     *     {
+     *       "security": {
+     *         "contacts": [
+     *           {
+     *             "email": "person1@company.com"
+     *           },
+     *           {
+     *             "email": "person2@company.com"
+     *           }
+     *         ]
+     *       }
+     *     }
+     * 
+ * + * + * map<string, .google.cloud.securitycenter.v1.ContactDetails> contacts = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.ContactDetails getContactsOrThrow( + java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = + internalGetContacts().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearContacts() { + internalGetMutableContacts().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Output only. Map containing the point of contacts for the given finding. The key
+     * represents the type of contact, while the value contains a list of all the
+     * contacts that pertain. Please refer to:
+     * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
+     *     {
+     *       "security": {
+     *         "contacts": [
+     *           {
+     *             "email": "person1@company.com"
+     *           },
+     *           {
+     *             "email": "person2@company.com"
+     *           }
+     *         ]
+     *       }
+     *     }
+     * 
+ * + * + * map<string, .google.cloud.securitycenter.v1.ContactDetails> contacts = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeContacts(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableContacts().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map + getMutableContacts() { + return internalGetMutableContacts().getMutableMap(); + } + /** + * + * + *
+     * Output only. Map containing the point of contacts for the given finding. The key
+     * represents the type of contact, while the value contains a list of all the
+     * contacts that pertain. Please refer to:
+     * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
+     *     {
+     *       "security": {
+     *         "contacts": [
+     *           {
+     *             "email": "person1@company.com"
+     *           },
+     *           {
+     *             "email": "person2@company.com"
+     *           }
+     *         ]
+     *       }
+     *     }
+     * 
+ * + * + * map<string, .google.cloud.securitycenter.v1.ContactDetails> contacts = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder putContacts( + java.lang.String key, com.google.cloud.securitycenter.v1.ContactDetails value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + + internalGetMutableContacts().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+     * Output only. Map containing the point of contacts for the given finding. The key
+     * represents the type of contact, while the value contains a list of all the
+     * contacts that pertain. Please refer to:
+     * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
+     *     {
+     *       "security": {
+     *         "contacts": [
+     *           {
+     *             "email": "person1@company.com"
+     *           },
+     *           {
+     *             "email": "person2@company.com"
+     *           }
+     *         ]
+     *       }
+     *     }
+     * 
+ * + * + * map<string, .google.cloud.securitycenter.v1.ContactDetails> contacts = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder putAllContacts( + java.util.Map values) { + internalGetMutableContacts().getMutableMap().putAll(values); + return this; + } + private java.util.List compliances_ = java.util.Collections.emptyList(); private void ensureCompliancesIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { + if (!((bitField0_ & 0x00000020) != 0)) { compliances_ = new java.util.ArrayList(compliances_); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000020; } } @@ -8241,7 +8758,7 @@ public Builder addAllCompliances( public Builder clearCompliances() { if (compliancesBuilder_ == null) { compliances_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000020); onChanged(); } else { compliancesBuilder_.clear(); @@ -8371,7 +8888,7 @@ public com.google.cloud.securitycenter.v1.Compliance.Builder addCompliancesBuild com.google.cloud.securitycenter.v1.Compliance, com.google.cloud.securitycenter.v1.Compliance.Builder, com.google.cloud.securitycenter.v1.ComplianceOrBuilder>( - compliances_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); + compliances_, ((bitField0_ & 0x00000020) != 0), getParentForChildren(), isClean()); compliances_ = null; } return compliancesBuilder_; @@ -8673,10 +9190,10 @@ public com.google.cloud.securitycenter.v1.ExfiltrationOrBuilder getExfiltrationO java.util.Collections.emptyList(); private void ensureIamBindingsIsMutable() { - if (!((bitField0_ & 0x00000020) != 0)) { + if (!((bitField0_ & 0x00000040) != 0)) { iamBindings_ = new java.util.ArrayList(iamBindings_); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000040; } } @@ -8892,7 +9409,7 @@ public Builder addAllIamBindings( public Builder clearIamBindings() { if (iamBindingsBuilder_ == null) { iamBindings_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000040); onChanged(); } else { iamBindingsBuilder_.clear(); @@ -9015,7 +9532,7 @@ public com.google.cloud.securitycenter.v1.IamBinding.Builder addIamBindingsBuild com.google.cloud.securitycenter.v1.IamBinding, com.google.cloud.securitycenter.v1.IamBinding.Builder, com.google.cloud.securitycenter.v1.IamBindingOrBuilder>( - iamBindings_, ((bitField0_ & 0x00000020) != 0), getParentForChildren(), isClean()); + iamBindings_, ((bitField0_ & 0x00000040) != 0), getParentForChildren(), isClean()); iamBindings_ = null; } return iamBindingsBuilder_; diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingOrBuilder.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingOrBuilder.java index 0bc5d05ae..ef6a64412 100644 --- a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingOrBuilder.java +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingOrBuilder.java @@ -663,8 +663,8 @@ com.google.protobuf.Value getSourcePropertiesOrDefault( * * *
-   * Output only. Third party SIEM/SOAR fields within SCC, contains external
-   * system information and external system finding fields.
+   * Output only. Third party SIEM/SOAR fields within SCC, contains external system
+   * information and external system finding fields.
    * 
* * @@ -676,8 +676,8 @@ com.google.protobuf.Value getSourcePropertiesOrDefault( * * *
-   * Output only. Third party SIEM/SOAR fields within SCC, contains external
-   * system information and external system finding fields.
+   * Output only. Third party SIEM/SOAR fields within SCC, contains external system
+   * information and external system finding fields.
    * 
* * @@ -693,8 +693,8 @@ com.google.protobuf.Value getSourcePropertiesOrDefault( * * *
-   * Output only. Third party SIEM/SOAR fields within SCC, contains external
-   * system information and external system finding fields.
+   * Output only. Third party SIEM/SOAR fields within SCC, contains external system
+   * information and external system finding fields.
    * 
* * @@ -707,8 +707,8 @@ com.google.protobuf.Value getSourcePropertiesOrDefault( * * *
-   * Output only. Third party SIEM/SOAR fields within SCC, contains external
-   * system information and external system finding fields.
+   * Output only. Third party SIEM/SOAR fields within SCC, contains external system
+   * information and external system finding fields.
    * 
* * @@ -725,8 +725,8 @@ com.google.cloud.securitycenter.v1.ExternalSystem getExternalSystemsOrDefault( * * *
-   * Output only. Third party SIEM/SOAR fields within SCC, contains external
-   * system information and external system finding fields.
+   * Output only. Third party SIEM/SOAR fields within SCC, contains external system
+   * information and external system finding fields.
    * 
* * @@ -946,6 +946,151 @@ com.google.cloud.securitycenter.v1.ExternalSystem getExternalSystemsOrDefault( */ com.google.cloud.securitycenter.v1.ProcessOrBuilder getProcessesOrBuilder(int index); + /** + * + * + *
+   * Output only. Map containing the point of contacts for the given finding. The key
+   * represents the type of contact, while the value contains a list of all the
+   * contacts that pertain. Please refer to:
+   * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
+   *     {
+   *       "security": {
+   *         "contacts": [
+   *           {
+   *             "email": "person1@company.com"
+   *           },
+   *           {
+   *             "email": "person2@company.com"
+   *           }
+   *         ]
+   *       }
+   *     }
+   * 
+ * + * + * map<string, .google.cloud.securitycenter.v1.ContactDetails> contacts = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getContactsCount(); + /** + * + * + *
+   * Output only. Map containing the point of contacts for the given finding. The key
+   * represents the type of contact, while the value contains a list of all the
+   * contacts that pertain. Please refer to:
+   * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
+   *     {
+   *       "security": {
+   *         "contacts": [
+   *           {
+   *             "email": "person1@company.com"
+   *           },
+   *           {
+   *             "email": "person2@company.com"
+   *           }
+   *         ]
+   *       }
+   *     }
+   * 
+ * + * + * map<string, .google.cloud.securitycenter.v1.ContactDetails> contacts = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + boolean containsContacts(java.lang.String key); + /** Use {@link #getContactsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getContacts(); + /** + * + * + *
+   * Output only. Map containing the point of contacts for the given finding. The key
+   * represents the type of contact, while the value contains a list of all the
+   * contacts that pertain. Please refer to:
+   * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
+   *     {
+   *       "security": {
+   *         "contacts": [
+   *           {
+   *             "email": "person1@company.com"
+   *           },
+   *           {
+   *             "email": "person2@company.com"
+   *           }
+   *         ]
+   *       }
+   *     }
+   * 
+ * + * + * map<string, .google.cloud.securitycenter.v1.ContactDetails> contacts = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.Map + getContactsMap(); + /** + * + * + *
+   * Output only. Map containing the point of contacts for the given finding. The key
+   * represents the type of contact, while the value contains a list of all the
+   * contacts that pertain. Please refer to:
+   * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
+   *     {
+   *       "security": {
+   *         "contacts": [
+   *           {
+   *             "email": "person1@company.com"
+   *           },
+   *           {
+   *             "email": "person2@company.com"
+   *           }
+   *         ]
+   *       }
+   *     }
+   * 
+ * + * + * map<string, .google.cloud.securitycenter.v1.ContactDetails> contacts = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + + /* nullable */ + com.google.cloud.securitycenter.v1.ContactDetails getContactsOrDefault( + java.lang.String key, + /* nullable */ + com.google.cloud.securitycenter.v1.ContactDetails defaultValue); + /** + * + * + *
+   * Output only. Map containing the point of contacts for the given finding. The key
+   * represents the type of contact, while the value contains a list of all the
+   * contacts that pertain. Please refer to:
+   * https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories
+   *     {
+   *       "security": {
+   *         "contacts": [
+   *           {
+   *             "email": "person1@company.com"
+   *           },
+   *           {
+   *             "email": "person2@company.com"
+   *           }
+   *         ]
+   *       }
+   *     }
+   * 
+ * + * + * map<string, .google.cloud.securitycenter.v1.ContactDetails> contacts = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.securitycenter.v1.ContactDetails getContactsOrThrow(java.lang.String key); + /** * * diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingOuterClass.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingOuterClass.java index a25500939..739ac9d75 100644 --- a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingOuterClass.java +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingOuterClass.java @@ -39,6 +39,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_securitycenter_v1_Finding_ExternalSystemsEntry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_securitycenter_v1_Finding_ExternalSystemsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v1_Finding_ContactsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v1_Finding_ContactsEntry_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -55,79 +59,85 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ycenter/v1/access.proto\032/google/cloud/se" + "curitycenter/v1/compliance.proto\032/google" + "/cloud/securitycenter/v1/connection.prot" - + "o\0321google/cloud/securitycenter/v1/exfilt" - + "ration.proto\0324google/cloud/securitycente" - + "r/v1/external_system.proto\0320google/cloud" - + "/securitycenter/v1/iam_binding.proto\032.go" - + "ogle/cloud/securitycenter/v1/indicator.p" - + "roto\0321google/cloud/securitycenter/v1/mit" - + "re_attack.proto\032,google/cloud/securityce" - + "nter/v1/process.proto\0323google/cloud/secu" - + "ritycenter/v1/security_marks.proto\0322goog" - + "le/cloud/securitycenter/v1/vulnerability" - + ".proto\032\034google/protobuf/struct.proto\032\037go" - + "ogle/protobuf/timestamp.proto\"\232\021\n\007Findin" - + "g\022\014\n\004name\030\001 \001(\t\022\016\n\006parent\030\002 \001(\t\022\025\n\rresou" - + "rce_name\030\003 \001(\t\022<\n\005state\030\004 \001(\0162-.google.c" - + "loud.securitycenter.v1.Finding.State\022\020\n\010" - + "category\030\005 \001(\t\022\024\n\014external_uri\030\006 \001(\t\022X\n\021" - + "source_properties\030\007 \003(\0132=.google.cloud.s" - + "ecuritycenter.v1.Finding.SourcePropertie" - + "sEntry\022J\n\016security_marks\030\010 \001(\0132-.google." - + "cloud.securitycenter.v1.SecurityMarksB\003\340" - + "A\003\022.\n\nevent_time\030\t \001(\0132\032.google.protobuf" - + ".Timestamp\022/\n\013create_time\030\n \001(\0132\032.google" - + ".protobuf.Timestamp\022B\n\010severity\030\014 \001(\01620." + + "o\0324google/cloud/securitycenter/v1/contac" + + "t_details.proto\0321google/cloud/securityce" + + "nter/v1/exfiltration.proto\0324google/cloud" + + "/securitycenter/v1/external_system.proto" + + "\0320google/cloud/securitycenter/v1/iam_bin" + + "ding.proto\032.google/cloud/securitycenter/" + + "v1/indicator.proto\0321google/cloud/securit" + + "ycenter/v1/mitre_attack.proto\032,google/cl" + + "oud/securitycenter/v1/process.proto\0323goo" + + "gle/cloud/securitycenter/v1/security_mar" + + "ks.proto\0322google/cloud/securitycenter/v1" + + "/vulnerability.proto\032\034google/protobuf/st" + + "ruct.proto\032\037google/protobuf/timestamp.pr" + + "oto\"\311\022\n\007Finding\022\014\n\004name\030\001 \001(\t\022\016\n\006parent\030" + + "\002 \001(\t\022\025\n\rresource_name\030\003 \001(\t\022<\n\005state\030\004 " + + "\001(\0162-.google.cloud.securitycenter.v1.Fin" + + "ding.State\022\020\n\010category\030\005 \001(\t\022\024\n\014external" + + "_uri\030\006 \001(\t\022X\n\021source_properties\030\007 \003(\0132=." + "google.cloud.securitycenter.v1.Finding.S" - + "everity\022\026\n\016canonical_name\030\016 \001(\t\022:\n\004mute\030" - + "\017 \001(\0162,.google.cloud.securitycenter.v1.F" - + "inding.Mute\022K\n\rfinding_class\030\021 \001(\01624.goo" - + "gle.cloud.securitycenter.v1.Finding.Find" - + "ingClass\022<\n\tindicator\030\022 \001(\0132).google.clo" - + "ud.securitycenter.v1.Indicator\022D\n\rvulner" - + "ability\030\024 \001(\0132-.google.cloud.securitycen" - + "ter.v1.Vulnerability\0229\n\020mute_update_time" - + "\030\025 \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022" - + "[\n\020external_systems\030\026 \003(\0132<.google.cloud" - + ".securitycenter.v1.Finding.ExternalSyste" - + "msEntryB\003\340A\003\022A\n\014mitre_attack\030\031 \001(\0132+.goo" - + "gle.cloud.securitycenter.v1.MitreAttack\022" - + "6\n\006access\030\032 \001(\0132&.google.cloud.securityc" - + "enter.v1.Access\022?\n\013connections\030\037 \003(\0132*.g" - + "oogle.cloud.securitycenter.v1.Connection" - + "\022\026\n\016mute_initiator\030\034 \001(\t\022:\n\tprocesses\030\036 " - + "\003(\0132\'.google.cloud.securitycenter.v1.Pro" - + "cess\022?\n\013compliances\030\" \003(\0132*.google.cloud" - + ".securitycenter.v1.Compliance\022\023\n\013descrip" - + "tion\030% \001(\t\022B\n\014exfiltration\030& \001(\0132,.googl" - + "e.cloud.securitycenter.v1.Exfiltration\022@" - + "\n\014iam_bindings\030\' \003(\0132*.google.cloud.secu" - + "ritycenter.v1.IamBinding\022\022\n\nnext_steps\030(" - + " \001(\t\032O\n\025SourcePropertiesEntry\022\013\n\003key\030\001 \001" - + "(\t\022%\n\005value\030\002 \001(\0132\026.google.protobuf.Valu" - + "e:\0028\001\032f\n\024ExternalSystemsEntry\022\013\n\003key\030\001 \001" - + "(\t\022=\n\005value\030\002 \001(\0132..google.cloud.securit" - + "ycenter.v1.ExternalSystem:\0028\001\"8\n\005State\022\025" - + "\n\021STATE_UNSPECIFIED\020\000\022\n\n\006ACTIVE\020\001\022\014\n\010INA" - + "CTIVE\020\002\"Q\n\010Severity\022\030\n\024SEVERITY_UNSPECIF" - + "IED\020\000\022\014\n\010CRITICAL\020\001\022\010\n\004HIGH\020\002\022\n\n\006MEDIUM\020" - + "\003\022\007\n\003LOW\020\004\"C\n\004Mute\022\024\n\020MUTE_UNSPECIFIED\020\000" - + "\022\t\n\005MUTED\020\001\022\013\n\007UNMUTED\020\002\022\r\n\tUNDEFINED\020\004\"" - + "\202\001\n\014FindingClass\022\035\n\031FINDING_CLASS_UNSPEC" - + "IFIED\020\000\022\n\n\006THREAT\020\001\022\021\n\rVULNERABILITY\020\002\022\024" - + "\n\020MISCONFIGURATION\020\003\022\017\n\013OBSERVATION\020\004\022\r\n" - + "\tSCC_ERROR\020\005:\333\001\352A\327\001\n%securitycenter.goog" - + "leapis.com/Finding\022@organizations/{organ" - + "ization}/sources/{source}/findings/{find" - + "ing}\0224folders/{folder}/sources/{source}/" - + "findings/{finding}\0226projects/{project}/s" - + "ources/{source}/findings/{finding}B\332\001\n\"c" - + "om.google.cloud.securitycenter.v1P\001ZLgoo" - + "gle.golang.org/genproto/googleapis/cloud" - + "/securitycenter/v1;securitycenter\252\002\036Goog" - + "le.Cloud.SecurityCenter.V1\312\002\036Google\\Clou" - + "d\\SecurityCenter\\V1\352\002!Google::Cloud::Sec" - + "urityCenter::V1b\006proto3" + + "ourcePropertiesEntry\022J\n\016security_marks\030\010" + + " \001(\0132-.google.cloud.securitycenter.v1.Se" + + "curityMarksB\003\340A\003\022.\n\nevent_time\030\t \001(\0132\032.g" + + "oogle.protobuf.Timestamp\022/\n\013create_time\030" + + "\n \001(\0132\032.google.protobuf.Timestamp\022B\n\010sev" + + "erity\030\014 \001(\01620.google.cloud.securitycente" + + "r.v1.Finding.Severity\022\026\n\016canonical_name\030" + + "\016 \001(\t\022:\n\004mute\030\017 \001(\0162,.google.cloud.secur" + + "itycenter.v1.Finding.Mute\022K\n\rfinding_cla" + + "ss\030\021 \001(\01624.google.cloud.securitycenter.v" + + "1.Finding.FindingClass\022<\n\tindicator\030\022 \001(" + + "\0132).google.cloud.securitycenter.v1.Indic" + + "ator\022D\n\rvulnerability\030\024 \001(\0132-.google.clo" + + "ud.securitycenter.v1.Vulnerability\0229\n\020mu" + + "te_update_time\030\025 \001(\0132\032.google.protobuf.T" + + "imestampB\003\340A\003\022[\n\020external_systems\030\026 \003(\0132" + + "<.google.cloud.securitycenter.v1.Finding" + + ".ExternalSystemsEntryB\003\340A\003\022A\n\014mitre_atta" + + "ck\030\031 \001(\0132+.google.cloud.securitycenter.v" + + "1.MitreAttack\0226\n\006access\030\032 \001(\0132&.google.c" + + "loud.securitycenter.v1.Access\022?\n\013connect" + + "ions\030\037 \003(\0132*.google.cloud.securitycenter" + + ".v1.Connection\022\026\n\016mute_initiator\030\034 \001(\t\022:" + + "\n\tprocesses\030\036 \003(\0132\'.google.cloud.securit" + + "ycenter.v1.Process\022L\n\010contacts\030! \003(\01325.g" + + "oogle.cloud.securitycenter.v1.Finding.Co" + + "ntactsEntryB\003\340A\003\022?\n\013compliances\030\" \003(\0132*." + + "google.cloud.securitycenter.v1.Complianc" + + "e\022\023\n\013description\030% \001(\t\022B\n\014exfiltration\030&" + + " \001(\0132,.google.cloud.securitycenter.v1.Ex" + + "filtration\022@\n\014iam_bindings\030\' \003(\0132*.googl" + + "e.cloud.securitycenter.v1.IamBinding\022\022\n\n" + + "next_steps\030( \001(\t\032O\n\025SourcePropertiesEntr" + + "y\022\013\n\003key\030\001 \001(\t\022%\n\005value\030\002 \001(\0132\026.google.p" + + "rotobuf.Value:\0028\001\032f\n\024ExternalSystemsEntr" + + "y\022\013\n\003key\030\001 \001(\t\022=\n\005value\030\002 \001(\0132..google.c" + + "loud.securitycenter.v1.ExternalSystem:\0028" + + "\001\032_\n\rContactsEntry\022\013\n\003key\030\001 \001(\t\022=\n\005value" + + "\030\002 \001(\0132..google.cloud.securitycenter.v1." + + "ContactDetails:\0028\001\"8\n\005State\022\025\n\021STATE_UNS" + + "PECIFIED\020\000\022\n\n\006ACTIVE\020\001\022\014\n\010INACTIVE\020\002\"Q\n\010" + + "Severity\022\030\n\024SEVERITY_UNSPECIFIED\020\000\022\014\n\010CR" + + "ITICAL\020\001\022\010\n\004HIGH\020\002\022\n\n\006MEDIUM\020\003\022\007\n\003LOW\020\004\"" + + "C\n\004Mute\022\024\n\020MUTE_UNSPECIFIED\020\000\022\t\n\005MUTED\020\001" + + "\022\013\n\007UNMUTED\020\002\022\r\n\tUNDEFINED\020\004\"\202\001\n\014Finding" + + "Class\022\035\n\031FINDING_CLASS_UNSPECIFIED\020\000\022\n\n\006" + + "THREAT\020\001\022\021\n\rVULNERABILITY\020\002\022\024\n\020MISCONFIG" + + "URATION\020\003\022\017\n\013OBSERVATION\020\004\022\r\n\tSCC_ERROR\020" + + "\005:\333\001\352A\327\001\n%securitycenter.googleapis.com/" + + "Finding\022@organizations/{organization}/so" + + "urces/{source}/findings/{finding}\0224folde" + + "rs/{folder}/sources/{source}/findings/{f" + + "inding}\0226projects/{project}/sources/{sou" + + "rce}/findings/{finding}B\332\001\n\"com.google.c" + + "loud.securitycenter.v1P\001ZLgoogle.golang." + + "org/genproto/googleapis/cloud/securityce" + + "nter/v1;securitycenter\252\002\036Google.Cloud.Se" + + "curityCenter.V1\312\002\036Google\\Cloud\\SecurityC" + + "enter\\V1\352\002!Google::Cloud::SecurityCenter" + + "::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -138,6 +148,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.cloud.securitycenter.v1.AccessProto.getDescriptor(), com.google.cloud.securitycenter.v1.ComplianceProto.getDescriptor(), com.google.cloud.securitycenter.v1.ConnectionProto.getDescriptor(), + com.google.cloud.securitycenter.v1.ContactDetailsProto.getDescriptor(), com.google.cloud.securitycenter.v1.ExfiltrationProto.getDescriptor(), com.google.cloud.securitycenter.v1.ExternalSystemProto.getDescriptor(), com.google.cloud.securitycenter.v1.IamBindingProto.getDescriptor(), @@ -178,6 +189,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Connections", "MuteInitiator", "Processes", + "Contacts", "Compliances", "Description", "Exfiltration", @@ -200,6 +212,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Key", "Value", }); + internal_static_google_cloud_securitycenter_v1_Finding_ContactsEntry_descriptor = + internal_static_google_cloud_securitycenter_v1_Finding_descriptor.getNestedTypes().get(2); + internal_static_google_cloud_securitycenter_v1_Finding_ContactsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v1_Finding_ContactsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); @@ -211,6 +231,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.cloud.securitycenter.v1.AccessProto.getDescriptor(); com.google.cloud.securitycenter.v1.ComplianceProto.getDescriptor(); com.google.cloud.securitycenter.v1.ConnectionProto.getDescriptor(); + com.google.cloud.securitycenter.v1.ContactDetailsProto.getDescriptor(); com.google.cloud.securitycenter.v1.ExfiltrationProto.getDescriptor(); com.google.cloud.securitycenter.v1.ExternalSystemProto.getDescriptor(); com.google.cloud.securitycenter.v1.IamBindingProto.getDescriptor(); diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Indicator.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Indicator.java index 3a70f24ee..112d60fe5 100644 --- a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Indicator.java +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Indicator.java @@ -43,6 +43,7 @@ private Indicator(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Indicator() { ipAddresses_ = com.google.protobuf.LazyStringArrayList.EMPTY; domains_ = com.google.protobuf.LazyStringArrayList.EMPTY; + signatures_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -95,46 +96,4417 @@ private Indicator( domains_.add(s); break; } + case 26: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + signatures_ = + new java.util.ArrayList< + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature>(); + mutable_bitField0_ |= 0x00000004; + } + signatures_.add( + input.readMessage( + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + ipAddresses_ = ipAddresses_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + domains_ = domains_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + signatures_ = java.util.Collections.unmodifiableList(signatures_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.IndicatorProto + .internal_static_google_cloud_securitycenter_v1_Indicator_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.IndicatorProto + .internal_static_google_cloud_securitycenter_v1_Indicator_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.Indicator.class, + com.google.cloud.securitycenter.v1.Indicator.Builder.class); + } + + public interface ProcessSignatureOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.Indicator.ProcessSignature) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Signature indicating that a binary family was matched.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6; + * + * + * @return Whether the memoryHashSignature field is set. + */ + boolean hasMemoryHashSignature(); + /** + * + * + *
+     * Signature indicating that a binary family was matched.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6; + * + * + * @return The memoryHashSignature. + */ + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + getMemoryHashSignature(); + /** + * + * + *
+     * Signature indicating that a binary family was matched.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6; + * + */ + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignatureOrBuilder + getMemoryHashSignatureOrBuilder(); + + /** + * + * + *
+     * Signature indicating that a YARA rule was matched.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7; + * + * + * @return Whether the yaraRuleSignature field is set. + */ + boolean hasYaraRuleSignature(); + /** + * + * + *
+     * Signature indicating that a YARA rule was matched.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7; + * + * + * @return The yaraRuleSignature. + */ + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + getYaraRuleSignature(); + /** + * + * + *
+     * Signature indicating that a YARA rule was matched.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7; + * + */ + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignatureOrBuilder + getYaraRuleSignatureOrBuilder(); + + public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.SignatureCase + getSignatureCase(); + } + /** + * + * + *
+   * Indicates what signature matched this process.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v1.Indicator.ProcessSignature} + */ + public static final class ProcessSignature extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.Indicator.ProcessSignature) + ProcessSignatureOrBuilder { + private static final long serialVersionUID = 0L; + // Use ProcessSignature.newBuilder() to construct. + private ProcessSignature(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ProcessSignature() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ProcessSignature(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ProcessSignature( + 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 50: + { + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Builder + subBuilder = null; + if (signatureCase_ == 6) { + subBuilder = + ((com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignature) + signature_) + .toBuilder(); + } + signature_ = + input.readMessage( + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignature.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignature) + signature_); + signature_ = subBuilder.buildPartial(); + } + signatureCase_ = 6; + break; + } + case 58: + { + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + .Builder + subBuilder = null; + if (signatureCase_ == 7) { + subBuilder = + ((com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .YaraRuleSignature) + signature_) + .toBuilder(); + } + signature_ = + input.readMessage( + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .YaraRuleSignature.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .YaraRuleSignature) + signature_); + signature_ = subBuilder.buildPartial(); + } + signatureCase_ = 7; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().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.cloud.securitycenter.v1.IndicatorProto + .internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.IndicatorProto + .internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.class, + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.Builder.class); + } + + public interface MemoryHashSignatureOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * The binary family.
+       * 
+ * + * string binary_family = 1; + * + * @return The binaryFamily. + */ + java.lang.String getBinaryFamily(); + /** + * + * + *
+       * The binary family.
+       * 
+ * + * string binary_family = 1; + * + * @return The bytes for binaryFamily. + */ + com.google.protobuf.ByteString getBinaryFamilyBytes(); + + /** + * + * + *
+       * The list of memory hash detections contributing to the binary family
+       * match.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + java.util.List< + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Detection> + getDetectionsList(); + /** + * + * + *
+       * The list of memory hash detections contributing to the binary family
+       * match.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection + getDetections(int index); + /** + * + * + *
+       * The list of memory hash detections contributing to the binary family
+       * match.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + int getDetectionsCount(); + /** + * + * + *
+       * The list of memory hash detections contributing to the binary family
+       * match.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + java.util.List< + ? extends + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .DetectionOrBuilder> + getDetectionsOrBuilderList(); + /** + * + * + *
+       * The list of memory hash detections contributing to the binary family
+       * match.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .DetectionOrBuilder + getDetectionsOrBuilder(int index); + } + /** + * + * + *
+     * A signature corresponding to memory page hashes.
+     * 
+ * + * Protobuf type {@code + * google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature} + */ + public static final class MemoryHashSignature extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature) + MemoryHashSignatureOrBuilder { + private static final long serialVersionUID = 0L; + // Use MemoryHashSignature.newBuilder() to construct. + private MemoryHashSignature(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MemoryHashSignature() { + binaryFamily_ = ""; + detections_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MemoryHashSignature(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private MemoryHashSignature( + 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: + { + java.lang.String s = input.readStringRequireUtf8(); + + binaryFamily_ = s; + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + detections_ = + new java.util.ArrayList< + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignature.Detection>(); + mutable_bitField0_ |= 0x00000001; + } + detections_.add( + input.readMessage( + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignature.Detection.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + detections_ = java.util.Collections.unmodifiableList(detections_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.IndicatorProto + .internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_MemoryHashSignature_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.IndicatorProto + .internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_MemoryHashSignature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .class, + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Builder.class); + } + + public interface DetectionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+         * The name of the binary associated with the memory hash
+         * signature detection.
+         * 
+ * + * string binary = 2; + * + * @return The binary. + */ + java.lang.String getBinary(); + /** + * + * + *
+         * The name of the binary associated with the memory hash
+         * signature detection.
+         * 
+ * + * string binary = 2; + * + * @return The bytes for binary. + */ + com.google.protobuf.ByteString getBinaryBytes(); + + /** + * + * + *
+         * The percentage of memory page hashes in the signature
+         * that were matched.
+         * 
+ * + * double percent_pages_matched = 3; + * + * @return The percentPagesMatched. + */ + double getPercentPagesMatched(); + } + /** + * + * + *
+       * Memory hash detection contributing to the binary family match.
+       * 
+ * + * Protobuf type {@code + * google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection} + */ + public static final class Detection extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection) + DetectionOrBuilder { + private static final long serialVersionUID = 0L; + // Use Detection.newBuilder() to construct. + private Detection(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Detection() { + binary_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Detection(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Detection( + 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 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + binary_ = s; + break; + } + case 25: + { + percentPagesMatched_ = input.readDouble(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().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.cloud.securitycenter.v1.IndicatorProto + .internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_MemoryHashSignature_Detection_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.IndicatorProto + .internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_MemoryHashSignature_Detection_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Detection.class, + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Detection.Builder.class); + } + + public static final int BINARY_FIELD_NUMBER = 2; + private volatile java.lang.Object binary_; + /** + * + * + *
+         * The name of the binary associated with the memory hash
+         * signature detection.
+         * 
+ * + * string binary = 2; + * + * @return The binary. + */ + @java.lang.Override + public java.lang.String getBinary() { + java.lang.Object ref = binary_; + 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(); + binary_ = s; + return s; + } + } + /** + * + * + *
+         * The name of the binary associated with the memory hash
+         * signature detection.
+         * 
+ * + * string binary = 2; + * + * @return The bytes for binary. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBinaryBytes() { + java.lang.Object ref = binary_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + binary_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PERCENT_PAGES_MATCHED_FIELD_NUMBER = 3; + private double percentPagesMatched_; + /** + * + * + *
+         * The percentage of memory page hashes in the signature
+         * that were matched.
+         * 
+ * + * double percent_pages_matched = 3; + * + * @return The percentPagesMatched. + */ + @java.lang.Override + public double getPercentPagesMatched() { + return percentPagesMatched_; + } + + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(binary_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, binary_); + } + if (java.lang.Double.doubleToRawLongBits(percentPagesMatched_) != 0) { + output.writeDouble(3, percentPagesMatched_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(binary_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, binary_); + } + if (java.lang.Double.doubleToRawLongBits(percentPagesMatched_) != 0) { + size += + com.google.protobuf.CodedOutputStream.computeDoubleSize(3, percentPagesMatched_); + } + 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.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Detection)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Detection + other = + (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Detection) + obj; + + if (!getBinary().equals(other.getBinary())) return false; + if (java.lang.Double.doubleToLongBits(getPercentPagesMatched()) + != java.lang.Double.doubleToLongBits(other.getPercentPagesMatched())) 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) + BINARY_FIELD_NUMBER; + hash = (53 * hash) + getBinary().hashCode(); + hash = (37 * hash) + PERCENT_PAGES_MATCHED_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getPercentPagesMatched())); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignature.Detection + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignature.Detection + parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignature.Detection + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignature.Detection + 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.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignature.Detection + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignature.Detection + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignature.Detection + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignature.Detection + 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.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignature.Detection + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignature.Detection + 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.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignature.Detection + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignature.Detection + 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.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Detection + 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; + } + /** + * + * + *
+         * Memory hash detection contributing to the binary family match.
+         * 
+ * + * Protobuf type {@code + * google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection) + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .DetectionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.IndicatorProto + .internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_MemoryHashSignature_Detection_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.IndicatorProto + .internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_MemoryHashSignature_Detection_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignature.Detection.class, + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignature.Detection.Builder.class); + } + + // Construct using + // com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection.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(); + binary_ = ""; + + percentPagesMatched_ = 0D; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v1.IndicatorProto + .internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_MemoryHashSignature_Detection_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Detection + getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Detection.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Detection + build() { + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Detection + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Detection + buildPartial() { + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Detection + result = + new com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignature.Detection(this); + result.binary_ = binary_; + result.percentPagesMatched_ = percentPagesMatched_; + 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.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Detection) { + return mergeFrom( + (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Detection) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Detection + other) { + if (other + == com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Detection.getDefaultInstance()) return this; + if (!other.getBinary().isEmpty()) { + binary_ = other.binary_; + onChanged(); + } + if (other.getPercentPagesMatched() != 0D) { + setPercentPagesMatched(other.getPercentPagesMatched()); + } + 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.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Detection + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Detection) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object binary_ = ""; + /** + * + * + *
+           * The name of the binary associated with the memory hash
+           * signature detection.
+           * 
+ * + * string binary = 2; + * + * @return The binary. + */ + public java.lang.String getBinary() { + java.lang.Object ref = binary_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + binary_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+           * The name of the binary associated with the memory hash
+           * signature detection.
+           * 
+ * + * string binary = 2; + * + * @return The bytes for binary. + */ + public com.google.protobuf.ByteString getBinaryBytes() { + java.lang.Object ref = binary_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + binary_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+           * The name of the binary associated with the memory hash
+           * signature detection.
+           * 
+ * + * string binary = 2; + * + * @param value The binary to set. + * @return This builder for chaining. + */ + public Builder setBinary(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + binary_ = value; + onChanged(); + return this; + } + /** + * + * + *
+           * The name of the binary associated with the memory hash
+           * signature detection.
+           * 
+ * + * string binary = 2; + * + * @return This builder for chaining. + */ + public Builder clearBinary() { + + binary_ = getDefaultInstance().getBinary(); + onChanged(); + return this; + } + /** + * + * + *
+           * The name of the binary associated with the memory hash
+           * signature detection.
+           * 
+ * + * string binary = 2; + * + * @param value The bytes for binary to set. + * @return This builder for chaining. + */ + public Builder setBinaryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + binary_ = value; + onChanged(); + return this; + } + + private double percentPagesMatched_; + /** + * + * + *
+           * The percentage of memory page hashes in the signature
+           * that were matched.
+           * 
+ * + * double percent_pages_matched = 3; + * + * @return The percentPagesMatched. + */ + @java.lang.Override + public double getPercentPagesMatched() { + return percentPagesMatched_; + } + /** + * + * + *
+           * The percentage of memory page hashes in the signature
+           * that were matched.
+           * 
+ * + * double percent_pages_matched = 3; + * + * @param value The percentPagesMatched to set. + * @return This builder for chaining. + */ + public Builder setPercentPagesMatched(double value) { + + percentPagesMatched_ = value; + onChanged(); + return this; + } + /** + * + * + *
+           * The percentage of memory page hashes in the signature
+           * that were matched.
+           * 
+ * + * double percent_pages_matched = 3; + * + * @return This builder for chaining. + */ + public Builder clearPercentPagesMatched() { + + percentPagesMatched_ = 0D; + 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.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection) + private static final com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignature.Detection + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Detection(); + } + + public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignature.Detection + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Detection parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Detection(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.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Detection + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int BINARY_FAMILY_FIELD_NUMBER = 1; + private volatile java.lang.Object binaryFamily_; + /** + * + * + *
+       * The binary family.
+       * 
+ * + * string binary_family = 1; + * + * @return The binaryFamily. + */ + @java.lang.Override + public java.lang.String getBinaryFamily() { + java.lang.Object ref = binaryFamily_; + 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(); + binaryFamily_ = s; + return s; + } + } + /** + * + * + *
+       * The binary family.
+       * 
+ * + * string binary_family = 1; + * + * @return The bytes for binaryFamily. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBinaryFamilyBytes() { + java.lang.Object ref = binaryFamily_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + binaryFamily_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DETECTIONS_FIELD_NUMBER = 4; + private java.util.List< + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Detection> + detections_; + /** + * + * + *
+       * The list of memory hash detections contributing to the binary family
+       * match.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + @java.lang.Override + public java.util.List< + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Detection> + getDetectionsList() { + return detections_; + } + /** + * + * + *
+       * The list of memory hash detections contributing to the binary family
+       * match.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .DetectionOrBuilder> + getDetectionsOrBuilderList() { + return detections_; + } + /** + * + * + *
+       * The list of memory hash detections contributing to the binary family
+       * match.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + @java.lang.Override + public int getDetectionsCount() { + return detections_.size(); + } + /** + * + * + *
+       * The list of memory hash detections contributing to the binary family
+       * match.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Detection + getDetections(int index) { + return detections_.get(index); + } + /** + * + * + *
+       * The list of memory hash detections contributing to the binary family
+       * match.
+       * 
+ * + * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .DetectionOrBuilder + getDetectionsOrBuilder(int index) { + return detections_.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 { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(binaryFamily_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, binaryFamily_); + } + for (int i = 0; i < detections_.size(); i++) { + output.writeMessage(4, detections_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(binaryFamily_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, binaryFamily_); + } + for (int i = 0; i < detections_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, detections_.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.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature other = + (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature) obj; + + if (!getBinaryFamily().equals(other.getBinaryFamily())) return false; + if (!getDetectionsList().equals(other.getDetectionsList())) 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) + BINARY_FAMILY_FIELD_NUMBER; + hash = (53 * hash) + getBinaryFamily().hashCode(); + if (getDetectionsCount() > 0) { + hash = (37 * hash) + DETECTIONS_FIELD_NUMBER; + hash = (53 * hash) + getDetectionsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignature + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignature + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignature + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignature + 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.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignature + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignature + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignature + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignature + 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.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignature + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignature + 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.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignature + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignature + 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.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + 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 signature corresponding to memory page hashes.
+       * 
+ * + * Protobuf type {@code + * google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature) + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignatureOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.IndicatorProto + .internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_MemoryHashSignature_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.IndicatorProto + .internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_MemoryHashSignature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .class, + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Builder.class); + } + + // Construct using + // com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDetectionsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + binaryFamily_ = ""; + + if (detectionsBuilder_ == null) { + detections_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + detectionsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v1.IndicatorProto + .internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_MemoryHashSignature_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + build() { + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + buildPartial() { + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature result = + new com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature( + this); + int from_bitField0_ = bitField0_; + result.binaryFamily_ = binaryFamily_; + if (detectionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + detections_ = java.util.Collections.unmodifiableList(detections_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.detections_ = detections_; + } else { + result.detections_ = detectionsBuilder_.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.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature) { + return mergeFrom( + (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + other) { + if (other + == com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .getDefaultInstance()) return this; + if (!other.getBinaryFamily().isEmpty()) { + binaryFamily_ = other.binaryFamily_; + onChanged(); + } + if (detectionsBuilder_ == null) { + if (!other.detections_.isEmpty()) { + if (detections_.isEmpty()) { + detections_ = other.detections_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDetectionsIsMutable(); + detections_.addAll(other.detections_); + } + onChanged(); + } + } else { + if (!other.detections_.isEmpty()) { + if (detectionsBuilder_.isEmpty()) { + detectionsBuilder_.dispose(); + detectionsBuilder_ = null; + detections_ = other.detections_; + bitField0_ = (bitField0_ & ~0x00000001); + detectionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDetectionsFieldBuilder() + : null; + } else { + detectionsBuilder_.addAllMessages(other.detections_); + } + } + } + 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.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object binaryFamily_ = ""; + /** + * + * + *
+         * The binary family.
+         * 
+ * + * string binary_family = 1; + * + * @return The binaryFamily. + */ + public java.lang.String getBinaryFamily() { + java.lang.Object ref = binaryFamily_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + binaryFamily_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * The binary family.
+         * 
+ * + * string binary_family = 1; + * + * @return The bytes for binaryFamily. + */ + public com.google.protobuf.ByteString getBinaryFamilyBytes() { + java.lang.Object ref = binaryFamily_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + binaryFamily_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * The binary family.
+         * 
+ * + * string binary_family = 1; + * + * @param value The binaryFamily to set. + * @return This builder for chaining. + */ + public Builder setBinaryFamily(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + binaryFamily_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * The binary family.
+         * 
+ * + * string binary_family = 1; + * + * @return This builder for chaining. + */ + public Builder clearBinaryFamily() { + + binaryFamily_ = getDefaultInstance().getBinaryFamily(); + onChanged(); + return this; + } + /** + * + * + *
+         * The binary family.
+         * 
+ * + * string binary_family = 1; + * + * @param value The bytes for binaryFamily to set. + * @return This builder for chaining. + */ + public Builder setBinaryFamilyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + binaryFamily_ = value; + onChanged(); + return this; + } + + private java.util.List< + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Detection> + detections_ = java.util.Collections.emptyList(); + + private void ensureDetectionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + detections_ = + new java.util.ArrayList< + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignature.Detection>(detections_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Detection, + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Detection.Builder, + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .DetectionOrBuilder> + detectionsBuilder_; + + /** + * + * + *
+         * The list of memory hash detections contributing to the binary family
+         * match.
+         * 
+ * + * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + public java.util.List< + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Detection> + getDetectionsList() { + if (detectionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(detections_); + } else { + return detectionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+         * The list of memory hash detections contributing to the binary family
+         * match.
+         * 
+ * + * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + public int getDetectionsCount() { + if (detectionsBuilder_ == null) { + return detections_.size(); + } else { + return detectionsBuilder_.getCount(); + } + } + /** + * + * + *
+         * The list of memory hash detections contributing to the binary family
+         * match.
+         * 
+ * + * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Detection + getDetections(int index) { + if (detectionsBuilder_ == null) { + return detections_.get(index); + } else { + return detectionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+         * The list of memory hash detections contributing to the binary family
+         * match.
+         * 
+ * + * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + public Builder setDetections( + int index, + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Detection + value) { + if (detectionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectionsIsMutable(); + detections_.set(index, value); + onChanged(); + } else { + detectionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+         * The list of memory hash detections contributing to the binary family
+         * match.
+         * 
+ * + * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + public Builder setDetections( + int index, + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Detection.Builder + builderForValue) { + if (detectionsBuilder_ == null) { + ensureDetectionsIsMutable(); + detections_.set(index, builderForValue.build()); + onChanged(); + } else { + detectionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * The list of memory hash detections contributing to the binary family
+         * match.
+         * 
+ * + * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + public Builder addDetections( + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Detection + value) { + if (detectionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectionsIsMutable(); + detections_.add(value); + onChanged(); + } else { + detectionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+         * The list of memory hash detections contributing to the binary family
+         * match.
+         * 
+ * + * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + public Builder addDetections( + int index, + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Detection + value) { + if (detectionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDetectionsIsMutable(); + detections_.add(index, value); + onChanged(); + } else { + detectionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+         * The list of memory hash detections contributing to the binary family
+         * match.
+         * 
+ * + * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + public Builder addDetections( + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Detection.Builder + builderForValue) { + if (detectionsBuilder_ == null) { + ensureDetectionsIsMutable(); + detections_.add(builderForValue.build()); + onChanged(); + } else { + detectionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * The list of memory hash detections contributing to the binary family
+         * match.
+         * 
+ * + * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + public Builder addDetections( + int index, + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Detection.Builder + builderForValue) { + if (detectionsBuilder_ == null) { + ensureDetectionsIsMutable(); + detections_.add(index, builderForValue.build()); + onChanged(); + } else { + detectionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+         * The list of memory hash detections contributing to the binary family
+         * match.
+         * 
+ * + * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + public Builder addAllDetections( + java.lang.Iterable< + ? extends + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignature.Detection> + values) { + if (detectionsBuilder_ == null) { + ensureDetectionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, detections_); + onChanged(); + } else { + detectionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+         * The list of memory hash detections contributing to the binary family
+         * match.
+         * 
+ * + * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + public Builder clearDetections() { + if (detectionsBuilder_ == null) { + detections_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + detectionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+         * The list of memory hash detections contributing to the binary family
+         * match.
+         * 
+ * + * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + public Builder removeDetections(int index) { + if (detectionsBuilder_ == null) { + ensureDetectionsIsMutable(); + detections_.remove(index); + onChanged(); + } else { + detectionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+         * The list of memory hash detections contributing to the binary family
+         * match.
+         * 
+ * + * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Detection.Builder + getDetectionsBuilder(int index) { + return getDetectionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+         * The list of memory hash detections contributing to the binary family
+         * match.
+         * 
+ * + * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .DetectionOrBuilder + getDetectionsOrBuilder(int index) { + if (detectionsBuilder_ == null) { + return detections_.get(index); + } else { + return detectionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+         * The list of memory hash detections contributing to the binary family
+         * match.
+         * 
+ * + * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + public java.util.List< + ? extends + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignature.DetectionOrBuilder> + getDetectionsOrBuilderList() { + if (detectionsBuilder_ != null) { + return detectionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(detections_); + } + } + /** + * + * + *
+         * The list of memory hash detections contributing to the binary family
+         * match.
+         * 
+ * + * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Detection.Builder + addDetectionsBuilder() { + return getDetectionsFieldBuilder() + .addBuilder( + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Detection.getDefaultInstance()); + } + /** + * + * + *
+         * The list of memory hash detections contributing to the binary family
+         * match.
+         * 
+ * + * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Detection.Builder + addDetectionsBuilder(int index) { + return getDetectionsFieldBuilder() + .addBuilder( + index, + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Detection.getDefaultInstance()); + } + /** + * + * + *
+         * The list of memory hash detections contributing to the binary family
+         * match.
+         * 
+ * + * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Detection detections = 4; + * + */ + public java.util.List< + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Detection.Builder> + getDetectionsBuilderList() { + return getDetectionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Detection, + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Detection.Builder, + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .DetectionOrBuilder> + getDetectionsFieldBuilder() { + if (detectionsBuilder_ == null) { + detectionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignature.Detection, + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignature.Detection.Builder, + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignature.DetectionOrBuilder>( + detections_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + detections_ = null; + } + return detectionsBuilder_; + } + + @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.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature) + private static final com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignature + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature(); + } + + public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignature + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MemoryHashSignature parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MemoryHashSignature(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.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface YaraRuleSignatureOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * The name of the YARA rule.
+       * 
+ * + * string yara_rule = 5; + * + * @return The yaraRule. + */ + java.lang.String getYaraRule(); + /** + * + * + *
+       * The name of the YARA rule.
+       * 
+ * + * string yara_rule = 5; + * + * @return The bytes for yaraRule. + */ + com.google.protobuf.ByteString getYaraRuleBytes(); + } + /** + * + * + *
+     * A signature corresponding to a YARA rule.
+     * 
+ * + * Protobuf type {@code + * google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature} + */ + public static final class YaraRuleSignature extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature) + YaraRuleSignatureOrBuilder { + private static final long serialVersionUID = 0L; + // Use YaraRuleSignature.newBuilder() to construct. + private YaraRuleSignature(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private YaraRuleSignature() { + yaraRule_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new YaraRuleSignature(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private YaraRuleSignature( + 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 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + yaraRule_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().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.cloud.securitycenter.v1.IndicatorProto + .internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_YaraRuleSignature_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.IndicatorProto + .internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_YaraRuleSignature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + .class, + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + .Builder.class); + } + + public static final int YARA_RULE_FIELD_NUMBER = 5; + private volatile java.lang.Object yaraRule_; + /** + * + * + *
+       * The name of the YARA rule.
+       * 
+ * + * string yara_rule = 5; + * + * @return The yaraRule. + */ + @java.lang.Override + public java.lang.String getYaraRule() { + java.lang.Object ref = yaraRule_; + 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(); + yaraRule_ = s; + return s; + } + } + /** + * + * + *
+       * The name of the YARA rule.
+       * 
+ * + * string yara_rule = 5; + * + * @return The bytes for yaraRule. + */ + @java.lang.Override + public com.google.protobuf.ByteString getYaraRuleBytes() { + java.lang.Object ref = yaraRule_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + yaraRule_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(yaraRule_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, yaraRule_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(yaraRule_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, yaraRule_); + } + 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.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature other = + (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature) obj; + + if (!getYaraRule().equals(other.getYaraRule())) 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) + YARA_RULE_FIELD_NUMBER; + hash = (53 * hash) + getYaraRule().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + 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.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + 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.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + 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.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + 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.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + 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 signature corresponding to a YARA rule.
+       * 
+ * + * Protobuf type {@code + * google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature) + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignatureOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.IndicatorProto + .internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_YaraRuleSignature_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.IndicatorProto + .internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_YaraRuleSignature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + .class, + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + .Builder.class); + } + + // Construct using + // com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature.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(); + yaraRule_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v1.IndicatorProto + .internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_YaraRuleSignature_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + build() { + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + buildPartial() { + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature result = + new com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature( + this); + result.yaraRule_ = yaraRule_; + 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.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature) { + return mergeFrom( + (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature other) { + if (other + == com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + .getDefaultInstance()) return this; + if (!other.getYaraRule().isEmpty()) { + yaraRule_ = other.yaraRule_; + 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.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object yaraRule_ = ""; + /** + * + * + *
+         * The name of the YARA rule.
+         * 
+ * + * string yara_rule = 5; + * + * @return The yaraRule. + */ + public java.lang.String getYaraRule() { + java.lang.Object ref = yaraRule_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + yaraRule_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * The name of the YARA rule.
+         * 
+ * + * string yara_rule = 5; + * + * @return The bytes for yaraRule. + */ + public com.google.protobuf.ByteString getYaraRuleBytes() { + java.lang.Object ref = yaraRule_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + yaraRule_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * The name of the YARA rule.
+         * 
+ * + * string yara_rule = 5; + * + * @param value The yaraRule to set. + * @return This builder for chaining. + */ + public Builder setYaraRule(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + yaraRule_ = value; + onChanged(); + return this; + } + /** + * + * + *
+         * The name of the YARA rule.
+         * 
+ * + * string yara_rule = 5; + * + * @return This builder for chaining. + */ + public Builder clearYaraRule() { + + yaraRule_ = getDefaultInstance().getYaraRule(); + onChanged(); + return this; + } + /** + * + * + *
+         * The name of the YARA rule.
+         * 
+ * + * string yara_rule = 5; + * + * @param value The bytes for yaraRule to set. + * @return This builder for chaining. + */ + public Builder setYaraRuleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + yaraRule_ = 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.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature) + private static final com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .YaraRuleSignature + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature(); + } + + public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public YaraRuleSignature parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new YaraRuleSignature(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.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int signatureCase_ = 0; + private java.lang.Object signature_; + + public enum SignatureCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + MEMORY_HASH_SIGNATURE(6), + YARA_RULE_SIGNATURE(7), + SIGNATURE_NOT_SET(0); + private final int value; + + private SignatureCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static SignatureCase valueOf(int value) { + return forNumber(value); + } + + public static SignatureCase forNumber(int value) { + switch (value) { + case 6: + return MEMORY_HASH_SIGNATURE; + case 7: + return YARA_RULE_SIGNATURE; + case 0: + return SIGNATURE_NOT_SET; default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SignatureCase getSignatureCase() { + return SignatureCase.forNumber(signatureCase_); + } + + public static final int MEMORY_HASH_SIGNATURE_FIELD_NUMBER = 6; + /** + * + * + *
+     * Signature indicating that a binary family was matched.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6; + * + * + * @return Whether the memoryHashSignature field is set. + */ + @java.lang.Override + public boolean hasMemoryHashSignature() { + return signatureCase_ == 6; + } + /** + * + * + *
+     * Signature indicating that a binary family was matched.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6; + * + * + * @return The memoryHashSignature. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + getMemoryHashSignature() { + if (signatureCase_ == 6) { + return (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature) + signature_; + } + return com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .getDefaultInstance(); + } + /** + * + * + *
+     * Signature indicating that a binary family was matched.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignatureOrBuilder + getMemoryHashSignatureOrBuilder() { + if (signatureCase_ == 6) { + return (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature) + signature_; + } + return com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .getDefaultInstance(); + } + + public static final int YARA_RULE_SIGNATURE_FIELD_NUMBER = 7; + /** + * + * + *
+     * Signature indicating that a YARA rule was matched.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7; + * + * + * @return Whether the yaraRuleSignature field is set. + */ + @java.lang.Override + public boolean hasYaraRuleSignature() { + return signatureCase_ == 7; + } + /** + * + * + *
+     * Signature indicating that a YARA rule was matched.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7; + * + * + * @return The yaraRuleSignature. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + getYaraRuleSignature() { + if (signatureCase_ == 7) { + return (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature) + signature_; + } + return com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + .getDefaultInstance(); + } + /** + * + * + *
+     * Signature indicating that a YARA rule was matched.
+     * 
+ * + * + * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignatureOrBuilder + getYaraRuleSignatureOrBuilder() { + if (signatureCase_ == 7) { + return (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature) + signature_; + } + return com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + .getDefaultInstance(); + } + + 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 (signatureCase_ == 6) { + output.writeMessage( + 6, + (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature) + signature_); + } + if (signatureCase_ == 7) { + output.writeMessage( + 7, + (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature) + signature_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (signatureCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, + (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature) + signature_); + } + if (signatureCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, + (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature) + signature_); + } + 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.cloud.securitycenter.v1.Indicator.ProcessSignature)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature other = + (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature) obj; + + if (!getSignatureCase().equals(other.getSignatureCase())) return false; + switch (signatureCase_) { + case 6: + if (!getMemoryHashSignature().equals(other.getMemoryHashSignature())) return false; + break; + case 7: + if (!getYaraRuleSignature().equals(other.getYaraRuleSignature())) return false; + break; + case 0: + default: + } + 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(); + switch (signatureCase_) { + case 6: + hash = (37 * hash) + MEMORY_HASH_SIGNATURE_FIELD_NUMBER; + hash = (53 * hash) + getMemoryHashSignature().hashCode(); + break; + case 7: + hash = (37 * hash) + YARA_RULE_SIGNATURE_FIELD_NUMBER; + hash = (53 * hash) + getYaraRuleSignature().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature 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.cloud.securitycenter.v1.Indicator.ProcessSignature parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature 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.cloud.securitycenter.v1.Indicator.ProcessSignature parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature 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.cloud.securitycenter.v1.Indicator.ProcessSignature parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature 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.cloud.securitycenter.v1.Indicator.ProcessSignature 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; + } + /** + * + * + *
+     * Indicates what signature matched this process.
+     * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v1.Indicator.ProcessSignature} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.Indicator.ProcessSignature) + com.google.cloud.securitycenter.v1.Indicator.ProcessSignatureOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.IndicatorProto + .internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.IndicatorProto + .internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.class, + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.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(); + signatureCase_ = 0; + signature_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v1.IndicatorProto + .internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature build() { + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature buildPartial() { + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature result = + new com.google.cloud.securitycenter.v1.Indicator.ProcessSignature(this); + if (signatureCase_ == 6) { + if (memoryHashSignatureBuilder_ == null) { + result.signature_ = signature_; + } else { + result.signature_ = memoryHashSignatureBuilder_.build(); + } + } + if (signatureCase_ == 7) { + if (yaraRuleSignatureBuilder_ == null) { + result.signature_ = signature_; + } else { + result.signature_ = yaraRuleSignatureBuilder_.build(); + } + } + result.signatureCase_ = signatureCase_; + 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.cloud.securitycenter.v1.Indicator.ProcessSignature) { + return mergeFrom((com.google.cloud.securitycenter.v1.Indicator.ProcessSignature) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature other) { + if (other + == com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.getDefaultInstance()) + return this; + switch (other.getSignatureCase()) { + case MEMORY_HASH_SIGNATURE: + { + mergeMemoryHashSignature(other.getMemoryHashSignature()); + break; + } + case YARA_RULE_SIGNATURE: + { + mergeYaraRuleSignature(other.getYaraRuleSignature()); + break; + } + case SIGNATURE_NOT_SET: { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } break; } } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - ipAddresses_ = ipAddresses_.getUnmodifiableView(); + + @java.lang.Override + public final boolean isInitialized() { + return true; } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - domains_ = domains_.getUnmodifiableView(); + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); + + private int signatureCase_ = 0; + private java.lang.Object signature_; + + public SignatureCase getSignatureCase() { + return SignatureCase.forNumber(signatureCase_); + } + + public Builder clearSignature() { + signatureCase_ = 0; + signature_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature, + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Builder, + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignatureOrBuilder> + memoryHashSignatureBuilder_; + /** + * + * + *
+       * Signature indicating that a binary family was matched.
+       * 
+ * + * + * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6; + * + * + * @return Whether the memoryHashSignature field is set. + */ + @java.lang.Override + public boolean hasMemoryHashSignature() { + return signatureCase_ == 6; + } + /** + * + * + *
+       * Signature indicating that a binary family was matched.
+       * 
+ * + * + * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6; + * + * + * @return The memoryHashSignature. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + getMemoryHashSignature() { + if (memoryHashSignatureBuilder_ == null) { + if (signatureCase_ == 6) { + return (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignature) + signature_; + } + return com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .getDefaultInstance(); + } else { + if (signatureCase_ == 6) { + return memoryHashSignatureBuilder_.getMessage(); + } + return com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Signature indicating that a binary family was matched.
+       * 
+ * + * + * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6; + * + */ + public Builder setMemoryHashSignature( + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature value) { + if (memoryHashSignatureBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + signature_ = value; + onChanged(); + } else { + memoryHashSignatureBuilder_.setMessage(value); + } + signatureCase_ = 6; + return this; + } + /** + * + * + *
+       * Signature indicating that a binary family was matched.
+       * 
+ * + * + * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6; + * + */ + public Builder setMemoryHashSignature( + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature.Builder + builderForValue) { + if (memoryHashSignatureBuilder_ == null) { + signature_ = builderForValue.build(); + onChanged(); + } else { + memoryHashSignatureBuilder_.setMessage(builderForValue.build()); + } + signatureCase_ = 6; + return this; + } + /** + * + * + *
+       * Signature indicating that a binary family was matched.
+       * 
+ * + * + * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6; + * + */ + public Builder mergeMemoryHashSignature( + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature value) { + if (memoryHashSignatureBuilder_ == null) { + if (signatureCase_ == 6 + && signature_ + != com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignature.getDefaultInstance()) { + signature_ = + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .newBuilder( + (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignature) + signature_) + .mergeFrom(value) + .buildPartial(); + } else { + signature_ = value; + } + onChanged(); + } else { + if (signatureCase_ == 6) { + memoryHashSignatureBuilder_.mergeFrom(value); + } else { + memoryHashSignatureBuilder_.setMessage(value); + } + } + signatureCase_ = 6; + return this; + } + /** + * + * + *
+       * Signature indicating that a binary family was matched.
+       * 
+ * + * + * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6; + * + */ + public Builder clearMemoryHashSignature() { + if (memoryHashSignatureBuilder_ == null) { + if (signatureCase_ == 6) { + signatureCase_ = 0; + signature_ = null; + onChanged(); + } + } else { + if (signatureCase_ == 6) { + signatureCase_ = 0; + signature_ = null; + } + memoryHashSignatureBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Signature indicating that a binary family was matched.
+       * 
+ * + * + * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6; + * + */ + public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Builder + getMemoryHashSignatureBuilder() { + return getMemoryHashSignatureFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Signature indicating that a binary family was matched.
+       * 
+ * + * + * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignatureOrBuilder + getMemoryHashSignatureOrBuilder() { + if ((signatureCase_ == 6) && (memoryHashSignatureBuilder_ != null)) { + return memoryHashSignatureBuilder_.getMessageOrBuilder(); + } else { + if (signatureCase_ == 6) { + return (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignature) + signature_; + } + return com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Signature indicating that a binary family was matched.
+       * 
+ * + * + * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature memory_hash_signature = 6; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature, + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Builder, + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignatureOrBuilder> + getMemoryHashSignatureFieldBuilder() { + if (memoryHashSignatureBuilder_ == null) { + if (!(signatureCase_ == 6)) { + signature_ = + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .getDefaultInstance(); + } + memoryHashSignatureBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature, + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.MemoryHashSignature + .Builder, + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignatureOrBuilder>( + (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .MemoryHashSignature) + signature_, + getParentForChildren(), + isClean()); + signature_ = null; + } + signatureCase_ = 6; + onChanged(); + ; + return memoryHashSignatureBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature, + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + .Builder, + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .YaraRuleSignatureOrBuilder> + yaraRuleSignatureBuilder_; + /** + * + * + *
+       * Signature indicating that a YARA rule was matched.
+       * 
+ * + * + * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7; + * + * + * @return Whether the yaraRuleSignature field is set. + */ + @java.lang.Override + public boolean hasYaraRuleSignature() { + return signatureCase_ == 7; + } + /** + * + * + *
+       * Signature indicating that a YARA rule was matched.
+       * 
+ * + * + * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7; + * + * + * @return The yaraRuleSignature. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + getYaraRuleSignature() { + if (yaraRuleSignatureBuilder_ == null) { + if (signatureCase_ == 7) { + return (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature) + signature_; + } + return com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + .getDefaultInstance(); + } else { + if (signatureCase_ == 7) { + return yaraRuleSignatureBuilder_.getMessage(); + } + return com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Signature indicating that a YARA rule was matched.
+       * 
+ * + * + * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7; + * + */ + public Builder setYaraRuleSignature( + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature value) { + if (yaraRuleSignatureBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + signature_ = value; + onChanged(); + } else { + yaraRuleSignatureBuilder_.setMessage(value); + } + signatureCase_ = 7; + return this; + } + /** + * + * + *
+       * Signature indicating that a YARA rule was matched.
+       * 
+ * + * + * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7; + * + */ + public Builder setYaraRuleSignature( + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature.Builder + builderForValue) { + if (yaraRuleSignatureBuilder_ == null) { + signature_ = builderForValue.build(); + onChanged(); + } else { + yaraRuleSignatureBuilder_.setMessage(builderForValue.build()); + } + signatureCase_ = 7; + return this; + } + /** + * + * + *
+       * Signature indicating that a YARA rule was matched.
+       * 
+ * + * + * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7; + * + */ + public Builder mergeYaraRuleSignature( + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature value) { + if (yaraRuleSignatureBuilder_ == null) { + if (signatureCase_ == 7 + && signature_ + != com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + .getDefaultInstance()) { + signature_ = + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + .newBuilder( + (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .YaraRuleSignature) + signature_) + .mergeFrom(value) + .buildPartial(); + } else { + signature_ = value; + } + onChanged(); + } else { + if (signatureCase_ == 7) { + yaraRuleSignatureBuilder_.mergeFrom(value); + } else { + yaraRuleSignatureBuilder_.setMessage(value); + } + } + signatureCase_ = 7; + return this; + } + /** + * + * + *
+       * Signature indicating that a YARA rule was matched.
+       * 
+ * + * + * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7; + * + */ + public Builder clearYaraRuleSignature() { + if (yaraRuleSignatureBuilder_ == null) { + if (signatureCase_ == 7) { + signatureCase_ = 0; + signature_ = null; + onChanged(); + } + } else { + if (signatureCase_ == 7) { + signatureCase_ = 0; + signature_ = null; + } + yaraRuleSignatureBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Signature indicating that a YARA rule was matched.
+       * 
+ * + * + * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7; + * + */ + public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature.Builder + getYaraRuleSignatureBuilder() { + return getYaraRuleSignatureFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Signature indicating that a YARA rule was matched.
+       * 
+ * + * + * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7; + * + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .YaraRuleSignatureOrBuilder + getYaraRuleSignatureOrBuilder() { + if ((signatureCase_ == 7) && (yaraRuleSignatureBuilder_ != null)) { + return yaraRuleSignatureBuilder_.getMessageOrBuilder(); + } else { + if (signatureCase_ == 7) { + return (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature) + signature_; + } + return com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + .getDefaultInstance(); + } + } + /** + * + * + *
+       * Signature indicating that a YARA rule was matched.
+       * 
+ * + * + * .google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature yara_rule_signature = 7; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature, + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + .Builder, + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .YaraRuleSignatureOrBuilder> + getYaraRuleSignatureFieldBuilder() { + if (yaraRuleSignatureBuilder_ == null) { + if (!(signatureCase_ == 7)) { + signature_ = + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + .getDefaultInstance(); + } + yaraRuleSignatureBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature, + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature + .Builder, + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + .YaraRuleSignatureOrBuilder>( + (com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.YaraRuleSignature) + signature_, + getParentForChildren(), + isClean()); + signature_ = null; + } + signatureCase_ = 7; + onChanged(); + ; + return yaraRuleSignatureBuilder_; + } + + @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.cloud.securitycenter.v1.Indicator.ProcessSignature) } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.securitycenter.v1.IndicatorProto - .internal_static_google_cloud_securitycenter_v1_Indicator_descriptor; - } + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.Indicator.ProcessSignature) + private static final com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + DEFAULT_INSTANCE; - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.securitycenter.v1.IndicatorProto - .internal_static_google_cloud_securitycenter_v1_Indicator_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.securitycenter.v1.Indicator.class, - com.google.cloud.securitycenter.v1.Indicator.Builder.class); + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.Indicator.ProcessSignature(); + } + + public static com.google.cloud.securitycenter.v1.Indicator.ProcessSignature + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProcessSignature parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ProcessSignature(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.cloud.securitycenter.v1.Indicator.ProcessSignature + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } } public static final int IP_ADDRESSES_FIELD_NUMBER = 1; @@ -186,77 +4558,159 @@ public java.lang.String getIpAddresses(int index) { * * *
-   * List of ip addresses associated to the Finding.
+   * List of ip addresses associated to the Finding.
+   * 
+ * + * repeated string ip_addresses = 1; + * + * @param index The index of the value to return. + * @return The bytes of the ipAddresses at the given index. + */ + public com.google.protobuf.ByteString getIpAddressesBytes(int index) { + return ipAddresses_.getByteString(index); + } + + public static final int DOMAINS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList domains_; + /** + * + * + *
+   * List of domains associated to the Finding.
+   * 
+ * + * repeated string domains = 2; + * + * @return A list containing the domains. + */ + public com.google.protobuf.ProtocolStringList getDomainsList() { + return domains_; + } + /** + * + * + *
+   * List of domains associated to the Finding.
+   * 
+ * + * repeated string domains = 2; + * + * @return The count of domains. + */ + public int getDomainsCount() { + return domains_.size(); + } + /** + * + * + *
+   * List of domains associated to the Finding.
+   * 
+ * + * repeated string domains = 2; + * + * @param index The index of the element to return. + * @return The domains at the given index. + */ + public java.lang.String getDomains(int index) { + return domains_.get(index); + } + /** + * + * + *
+   * List of domains associated to the Finding.
+   * 
+ * + * repeated string domains = 2; + * + * @param index The index of the value to return. + * @return The bytes of the domains at the given index. + */ + public com.google.protobuf.ByteString getDomainsBytes(int index) { + return domains_.getByteString(index); + } + + public static final int SIGNATURES_FIELD_NUMBER = 3; + private java.util.List signatures_; + /** + * + * + *
+   * The list of matched signatures indicating that the given
+   * process is present in the environment.
    * 
* - * repeated string ip_addresses = 1; - * - * @param index The index of the value to return. - * @return The bytes of the ipAddresses at the given index. + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; + * */ - public com.google.protobuf.ByteString getIpAddressesBytes(int index) { - return ipAddresses_.getByteString(index); + @java.lang.Override + public java.util.List + getSignaturesList() { + return signatures_; } - - public static final int DOMAINS_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList domains_; /** * * *
-   * List of domains associated to the Finding.
+   * The list of matched signatures indicating that the given
+   * process is present in the environment.
    * 
* - * repeated string domains = 2; - * - * @return A list containing the domains. + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; + * */ - public com.google.protobuf.ProtocolStringList getDomainsList() { - return domains_; + @java.lang.Override + public java.util.List< + ? extends com.google.cloud.securitycenter.v1.Indicator.ProcessSignatureOrBuilder> + getSignaturesOrBuilderList() { + return signatures_; } /** * * *
-   * List of domains associated to the Finding.
+   * The list of matched signatures indicating that the given
+   * process is present in the environment.
    * 
* - * repeated string domains = 2; - * - * @return The count of domains. + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; + * */ - public int getDomainsCount() { - return domains_.size(); + @java.lang.Override + public int getSignaturesCount() { + return signatures_.size(); } /** * * *
-   * List of domains associated to the Finding.
+   * The list of matched signatures indicating that the given
+   * process is present in the environment.
    * 
* - * repeated string domains = 2; - * - * @param index The index of the element to return. - * @return The domains at the given index. + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; + * */ - public java.lang.String getDomains(int index) { - return domains_.get(index); + @java.lang.Override + public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature getSignatures(int index) { + return signatures_.get(index); } /** * * *
-   * List of domains associated to the Finding.
+   * The list of matched signatures indicating that the given
+   * process is present in the environment.
    * 
* - * repeated string domains = 2; - * - * @param index The index of the value to return. - * @return The bytes of the domains at the given index. + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; + * */ - public com.google.protobuf.ByteString getDomainsBytes(int index) { - return domains_.getByteString(index); + @java.lang.Override + public com.google.cloud.securitycenter.v1.Indicator.ProcessSignatureOrBuilder + getSignaturesOrBuilder(int index) { + return signatures_.get(index); } private byte memoizedIsInitialized = -1; @@ -279,6 +4733,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < domains_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, domains_.getRaw(i)); } + for (int i = 0; i < signatures_.size(); i++) { + output.writeMessage(3, signatures_.get(i)); + } unknownFields.writeTo(output); } @@ -304,6 +4761,9 @@ public int getSerializedSize() { size += dataSize; size += 1 * getDomainsList().size(); } + for (int i = 0; i < signatures_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, signatures_.get(i)); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -322,6 +4782,7 @@ public boolean equals(final java.lang.Object obj) { if (!getIpAddressesList().equals(other.getIpAddressesList())) return false; if (!getDomainsList().equals(other.getDomainsList())) return false; + if (!getSignaturesList().equals(other.getSignaturesList())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -341,6 +4802,10 @@ public int hashCode() { hash = (37 * hash) + DOMAINS_FIELD_NUMBER; hash = (53 * hash) + getDomainsList().hashCode(); } + if (getSignaturesCount() > 0) { + hash = (37 * hash) + SIGNATURES_FIELD_NUMBER; + hash = (53 * hash) + getSignaturesList().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -483,7 +4948,9 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getSignaturesFieldBuilder(); + } } @java.lang.Override @@ -493,6 +4960,12 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); domains_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); + if (signaturesBuilder_ == null) { + signatures_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + signaturesBuilder_.clear(); + } return this; } @@ -531,6 +5004,15 @@ public com.google.cloud.securitycenter.v1.Indicator buildPartial() { bitField0_ = (bitField0_ & ~0x00000002); } result.domains_ = domains_; + if (signaturesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + signatures_ = java.util.Collections.unmodifiableList(signatures_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.signatures_ = signatures_; + } else { + result.signatures_ = signaturesBuilder_.build(); + } onBuilt(); return result; } @@ -600,6 +5082,33 @@ public Builder mergeFrom(com.google.cloud.securitycenter.v1.Indicator other) { } onChanged(); } + if (signaturesBuilder_ == null) { + if (!other.signatures_.isEmpty()) { + if (signatures_.isEmpty()) { + signatures_ = other.signatures_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureSignaturesIsMutable(); + signatures_.addAll(other.signatures_); + } + onChanged(); + } + } else { + if (!other.signatures_.isEmpty()) { + if (signaturesBuilder_.isEmpty()) { + signaturesBuilder_.dispose(); + signaturesBuilder_ = null; + signatures_ = other.signatures_; + bitField0_ = (bitField0_ & ~0x00000004); + signaturesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSignaturesFieldBuilder() + : null; + } else { + signaturesBuilder_.addAllMessages(other.signatures_); + } + } + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -967,6 +5476,409 @@ public Builder addDomainsBytes(com.google.protobuf.ByteString value) { return this; } + private java.util.List + signatures_ = java.util.Collections.emptyList(); + + private void ensureSignaturesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + signatures_ = + new java.util.ArrayList( + signatures_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature, + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.Builder, + com.google.cloud.securitycenter.v1.Indicator.ProcessSignatureOrBuilder> + signaturesBuilder_; + + /** + * + * + *
+     * The list of matched signatures indicating that the given
+     * process is present in the environment.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; + * + */ + public java.util.List + getSignaturesList() { + if (signaturesBuilder_ == null) { + return java.util.Collections.unmodifiableList(signatures_); + } else { + return signaturesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of matched signatures indicating that the given
+     * process is present in the environment.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; + * + */ + public int getSignaturesCount() { + if (signaturesBuilder_ == null) { + return signatures_.size(); + } else { + return signaturesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of matched signatures indicating that the given
+     * process is present in the environment.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; + * + */ + public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature getSignatures(int index) { + if (signaturesBuilder_ == null) { + return signatures_.get(index); + } else { + return signaturesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of matched signatures indicating that the given
+     * process is present in the environment.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; + * + */ + public Builder setSignatures( + int index, com.google.cloud.securitycenter.v1.Indicator.ProcessSignature value) { + if (signaturesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSignaturesIsMutable(); + signatures_.set(index, value); + onChanged(); + } else { + signaturesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of matched signatures indicating that the given
+     * process is present in the environment.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; + * + */ + public Builder setSignatures( + int index, + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.Builder builderForValue) { + if (signaturesBuilder_ == null) { + ensureSignaturesIsMutable(); + signatures_.set(index, builderForValue.build()); + onChanged(); + } else { + signaturesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of matched signatures indicating that the given
+     * process is present in the environment.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; + * + */ + public Builder addSignatures( + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature value) { + if (signaturesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSignaturesIsMutable(); + signatures_.add(value); + onChanged(); + } else { + signaturesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of matched signatures indicating that the given
+     * process is present in the environment.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; + * + */ + public Builder addSignatures( + int index, com.google.cloud.securitycenter.v1.Indicator.ProcessSignature value) { + if (signaturesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSignaturesIsMutable(); + signatures_.add(index, value); + onChanged(); + } else { + signaturesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of matched signatures indicating that the given
+     * process is present in the environment.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; + * + */ + public Builder addSignatures( + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.Builder builderForValue) { + if (signaturesBuilder_ == null) { + ensureSignaturesIsMutable(); + signatures_.add(builderForValue.build()); + onChanged(); + } else { + signaturesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of matched signatures indicating that the given
+     * process is present in the environment.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; + * + */ + public Builder addSignatures( + int index, + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.Builder builderForValue) { + if (signaturesBuilder_ == null) { + ensureSignaturesIsMutable(); + signatures_.add(index, builderForValue.build()); + onChanged(); + } else { + signaturesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of matched signatures indicating that the given
+     * process is present in the environment.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; + * + */ + public Builder addAllSignatures( + java.lang.Iterable + values) { + if (signaturesBuilder_ == null) { + ensureSignaturesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, signatures_); + onChanged(); + } else { + signaturesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of matched signatures indicating that the given
+     * process is present in the environment.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; + * + */ + public Builder clearSignatures() { + if (signaturesBuilder_ == null) { + signatures_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + signaturesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of matched signatures indicating that the given
+     * process is present in the environment.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; + * + */ + public Builder removeSignatures(int index) { + if (signaturesBuilder_ == null) { + ensureSignaturesIsMutable(); + signatures_.remove(index); + onChanged(); + } else { + signaturesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of matched signatures indicating that the given
+     * process is present in the environment.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; + * + */ + public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.Builder + getSignaturesBuilder(int index) { + return getSignaturesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of matched signatures indicating that the given
+     * process is present in the environment.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; + * + */ + public com.google.cloud.securitycenter.v1.Indicator.ProcessSignatureOrBuilder + getSignaturesOrBuilder(int index) { + if (signaturesBuilder_ == null) { + return signatures_.get(index); + } else { + return signaturesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of matched signatures indicating that the given
+     * process is present in the environment.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; + * + */ + public java.util.List< + ? extends com.google.cloud.securitycenter.v1.Indicator.ProcessSignatureOrBuilder> + getSignaturesOrBuilderList() { + if (signaturesBuilder_ != null) { + return signaturesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(signatures_); + } + } + /** + * + * + *
+     * The list of matched signatures indicating that the given
+     * process is present in the environment.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; + * + */ + public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.Builder + addSignaturesBuilder() { + return getSignaturesFieldBuilder() + .addBuilder( + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.getDefaultInstance()); + } + /** + * + * + *
+     * The list of matched signatures indicating that the given
+     * process is present in the environment.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; + * + */ + public com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.Builder + addSignaturesBuilder(int index) { + return getSignaturesFieldBuilder() + .addBuilder( + index, + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.getDefaultInstance()); + } + /** + * + * + *
+     * The list of matched signatures indicating that the given
+     * process is present in the environment.
+     * 
+ * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; + * + */ + public java.util.List + getSignaturesBuilderList() { + return getSignaturesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature, + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.Builder, + com.google.cloud.securitycenter.v1.Indicator.ProcessSignatureOrBuilder> + getSignaturesFieldBuilder() { + if (signaturesBuilder_ == null) { + signaturesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature, + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature.Builder, + com.google.cloud.securitycenter.v1.Indicator.ProcessSignatureOrBuilder>( + signatures_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + signatures_ = null; + } + return signaturesBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/IndicatorOrBuilder.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/IndicatorOrBuilder.java index 651b1f369..536b52415 100644 --- a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/IndicatorOrBuilder.java +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/IndicatorOrBuilder.java @@ -124,4 +124,67 @@ public interface IndicatorOrBuilder * @return The bytes of the domains at the given index. */ com.google.protobuf.ByteString getDomainsBytes(int index); + + /** + * + * + *
+   * The list of matched signatures indicating that the given
+   * process is present in the environment.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; + * + */ + java.util.List getSignaturesList(); + /** + * + * + *
+   * The list of matched signatures indicating that the given
+   * process is present in the environment.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; + * + */ + com.google.cloud.securitycenter.v1.Indicator.ProcessSignature getSignatures(int index); + /** + * + * + *
+   * The list of matched signatures indicating that the given
+   * process is present in the environment.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; + * + */ + int getSignaturesCount(); + /** + * + * + *
+   * The list of matched signatures indicating that the given
+   * process is present in the environment.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; + * + */ + java.util.List + getSignaturesOrBuilderList(); + /** + * + * + *
+   * The list of matched signatures indicating that the given
+   * process is present in the environment.
+   * 
+ * + * repeated .google.cloud.securitycenter.v1.Indicator.ProcessSignature signatures = 3; + * + */ + com.google.cloud.securitycenter.v1.Indicator.ProcessSignatureOrBuilder getSignaturesOrBuilder( + int index); } diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/IndicatorProto.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/IndicatorProto.java index a06405f60..fd45924ea 100644 --- a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/IndicatorProto.java +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/IndicatorProto.java @@ -31,6 +31,22 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_securitycenter_v1_Indicator_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_securitycenter_v1_Indicator_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_MemoryHashSignature_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_MemoryHashSignature_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_MemoryHashSignature_Detection_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_MemoryHashSignature_Detection_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_YaraRuleSignature_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_YaraRuleSignature_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -42,14 +58,29 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n.google/cloud/securitycenter/v1/indicat" + "or.proto\022\036google.cloud.securitycenter.v1" - + "\"2\n\tIndicator\022\024\n\014ip_addresses\030\001 \003(\t\022\017\n\007d" - + "omains\030\002 \003(\tB\352\001\n\"com.google.cloud.securi" - + "tycenter.v1B\016IndicatorProtoP\001ZLgoogle.go" - + "lang.org/genproto/googleapis/cloud/secur" - + "itycenter/v1;securitycenter\252\002\036Google.Clo" - + "ud.SecurityCenter.V1\312\002\036Google\\Cloud\\Secu" - + "rityCenter\\V1\352\002!Google::Cloud::SecurityC" - + "enter::V1b\006proto3" + + "\"\203\005\n\tIndicator\022\024\n\014ip_addresses\030\001 \003(\t\022\017\n\007" + + "domains\030\002 \003(\t\022N\n\nsignatures\030\003 \003(\0132:.goog" + + "le.cloud.securitycenter.v1.Indicator.Pro" + + "cessSignature\032\376\003\n\020ProcessSignature\022o\n\025me" + + "mory_hash_signature\030\006 \001(\0132N.google.cloud" + + ".securitycenter.v1.Indicator.ProcessSign" + + "ature.MemoryHashSignatureH\000\022k\n\023yara_rule" + + "_signature\030\007 \001(\0132L.google.cloud.security" + + "center.v1.Indicator.ProcessSignature.Yar" + + "aRuleSignatureH\000\032\326\001\n\023MemoryHashSignature" + + "\022\025\n\rbinary_family\030\001 \001(\t\022l\n\ndetections\030\004 " + + "\003(\0132X.google.cloud.securitycenter.v1.Ind" + + "icator.ProcessSignature.MemoryHashSignat" + + "ure.Detection\032:\n\tDetection\022\016\n\006binary\030\002 \001" + + "(\t\022\035\n\025percent_pages_matched\030\003 \001(\001\032&\n\021Yar" + + "aRuleSignature\022\021\n\tyara_rule\030\005 \001(\tB\013\n\tsig" + + "natureB\352\001\n\"com.google.cloud.securitycent" + + "er.v1B\016IndicatorProtoP\001ZLgoogle.golang.o" + + "rg/genproto/googleapis/cloud/securitycen" + + "ter/v1;securitycenter\252\002\036Google.Cloud.Sec" + + "urityCenter.V1\312\002\036Google\\Cloud\\SecurityCe" + + "nter\\V1\352\002!Google::Cloud::SecurityCenter:" + + ":V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -60,7 +91,45 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_securitycenter_v1_Indicator_descriptor, new java.lang.String[] { - "IpAddresses", "Domains", + "IpAddresses", "Domains", "Signatures", + }); + internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_descriptor = + internal_static_google_cloud_securitycenter_v1_Indicator_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_descriptor, + new java.lang.String[] { + "MemoryHashSignature", "YaraRuleSignature", "Signature", + }); + internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_MemoryHashSignature_descriptor = + internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_MemoryHashSignature_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_MemoryHashSignature_descriptor, + new java.lang.String[] { + "BinaryFamily", "Detections", + }); + internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_MemoryHashSignature_Detection_descriptor = + internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_MemoryHashSignature_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_MemoryHashSignature_Detection_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_MemoryHashSignature_Detection_descriptor, + new java.lang.String[] { + "Binary", "PercentPagesMatched", + }); + internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_YaraRuleSignature_descriptor = + internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_YaraRuleSignature_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v1_Indicator_ProcessSignature_YaraRuleSignature_descriptor, + new java.lang.String[] { + "YaraRule", }); } diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Process.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Process.java index 54cf3db62..a7cd39564 100644 --- a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Process.java +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Process.java @@ -38,6 +38,7 @@ private Process(com.google.protobuf.GeneratedMessageV3.Builder builder) { } private Process() { + name_ = ""; libraries_ = java.util.Collections.emptyList(); args_ = com.google.protobuf.LazyStringArrayList.EMPTY; envVariables_ = java.util.Collections.emptyList(); @@ -160,6 +161,13 @@ private Process( parentPid_ = input.readInt64(); break; } + case 98: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -205,6 +213,57 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.securitycenter.v1.Process.Builder.class); } + public static final int NAME_FIELD_NUMBER = 12; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The process name visible in utilities like `top` and `ps`; it can
+   * be accessed via `/proc/[pid]/comm` and changed with `prctl(PR_SET_NAME)`.
+   * 
+ * + * string name = 12; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * The process name visible in utilities like `top` and `ps`; it can
+   * be accessed via `/proc/[pid]/comm` and changed with `prctl(PR_SET_NAME)`.
+   * 
+ * + * string name = 12; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int BINARY_FIELD_NUMBER = 3; private com.google.cloud.securitycenter.v1.File binary_; /** @@ -620,6 +679,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (parentPid_ != 0L) { output.writeInt64(11, parentPid_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, name_); + } unknownFields.writeTo(output); } @@ -661,6 +723,9 @@ public int getSerializedSize() { if (parentPid_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(11, parentPid_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, name_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -677,6 +742,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.securitycenter.v1.Process other = (com.google.cloud.securitycenter.v1.Process) obj; + if (!getName().equals(other.getName())) return false; if (hasBinary() != other.hasBinary()) return false; if (hasBinary()) { if (!getBinary().equals(other.getBinary())) return false; @@ -703,6 +769,8 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); if (hasBinary()) { hash = (37 * hash) + BINARY_FIELD_NUMBER; hash = (53 * hash) + getBinary().hashCode(); @@ -879,6 +947,8 @@ private void maybeForceBuilderInitialization() { @java.lang.Override public Builder clear() { super.clear(); + name_ = ""; + if (binaryBuilder_ == null) { binary_ = null; } else { @@ -941,6 +1011,7 @@ public com.google.cloud.securitycenter.v1.Process buildPartial() { com.google.cloud.securitycenter.v1.Process result = new com.google.cloud.securitycenter.v1.Process(this); int from_bitField0_ = bitField0_; + result.name_ = name_; if (binaryBuilder_ == null) { result.binary_ = binary_; } else { @@ -1027,6 +1098,10 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.cloud.securitycenter.v1.Process other) { if (other == com.google.cloud.securitycenter.v1.Process.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } if (other.hasBinary()) { mergeBinary(other.getBinary()); } @@ -1140,6 +1215,117 @@ public Builder mergeFrom( private int bitField0_; + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The process name visible in utilities like `top` and `ps`; it can
+     * be accessed via `/proc/[pid]/comm` and changed with `prctl(PR_SET_NAME)`.
+     * 
+ * + * string name = 12; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The process name visible in utilities like `top` and `ps`; it can
+     * be accessed via `/proc/[pid]/comm` and changed with `prctl(PR_SET_NAME)`.
+     * 
+ * + * string name = 12; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The process name visible in utilities like `top` and `ps`; it can
+     * be accessed via `/proc/[pid]/comm` and changed with `prctl(PR_SET_NAME)`.
+     * 
+ * + * string name = 12; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The process name visible in utilities like `top` and `ps`; it can
+     * be accessed via `/proc/[pid]/comm` and changed with `prctl(PR_SET_NAME)`.
+     * 
+ * + * string name = 12; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The process name visible in utilities like `top` and `ps`; it can
+     * be accessed via `/proc/[pid]/comm` and changed with `prctl(PR_SET_NAME)`.
+     * 
+ * + * string name = 12; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + private com.google.cloud.securitycenter.v1.File binary_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.securitycenter.v1.File, diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ProcessOrBuilder.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ProcessOrBuilder.java index 00904a14f..c4f35f14c 100644 --- a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ProcessOrBuilder.java +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ProcessOrBuilder.java @@ -23,6 +23,33 @@ public interface ProcessOrBuilder // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.Process) com.google.protobuf.MessageOrBuilder { + /** + * + * + *
+   * The process name visible in utilities like `top` and `ps`; it can
+   * be accessed via `/proc/[pid]/comm` and changed with `prctl(PR_SET_NAME)`.
+   * 
+ * + * string name = 12; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The process name visible in utilities like `top` and `ps`; it can
+   * be accessed via `/proc/[pid]/comm` and changed with `prctl(PR_SET_NAME)`.
+   * 
+ * + * string name = 12; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + /** * * diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ProcessProto.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ProcessProto.java index 342b225b8..26c720b01 100644 --- a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ProcessProto.java +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/ProcessProto.java @@ -47,23 +47,23 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "\n,google/cloud/securitycenter/v1/process" + ".proto\022\036google.cloud.securitycenter.v1\032)" + "google/cloud/securitycenter/v1/file.prot" - + "o\"\347\002\n\007Process\0224\n\006binary\030\003 \001(\0132$.google.c" - + "loud.securitycenter.v1.File\0227\n\tlibraries" - + "\030\004 \003(\0132$.google.cloud.securitycenter.v1." - + "File\0224\n\006script\030\005 \001(\0132$.google.cloud.secu" - + "ritycenter.v1.File\022\014\n\004args\030\006 \003(\t\022\033\n\023argu" - + "ments_truncated\030\007 \001(\010\022J\n\renv_variables\030\010" - + " \003(\01323.google.cloud.securitycenter.v1.En" - + "vironmentVariable\022\037\n\027env_variables_trunc" - + "ated\030\t \001(\010\022\013\n\003pid\030\n \001(\003\022\022\n\nparent_pid\030\013 " - + "\001(\003\"0\n\023EnvironmentVariable\022\014\n\004name\030\001 \001(\t" - + "\022\013\n\003val\030\002 \001(\tB\350\001\n\"com.google.cloud.secur" - + "itycenter.v1B\014ProcessProtoP\001ZLgoogle.gol" - + "ang.org/genproto/googleapis/cloud/securi" - + "tycenter/v1;securitycenter\252\002\036Google.Clou" - + "d.SecurityCenter.V1\312\002\036Google\\Cloud\\Secur" - + "ityCenter\\V1\352\002!Google::Cloud::SecurityCe" - + "nter::V1b\006proto3" + + "o\"\365\002\n\007Process\022\014\n\004name\030\014 \001(\t\0224\n\006binary\030\003 " + + "\001(\0132$.google.cloud.securitycenter.v1.Fil" + + "e\0227\n\tlibraries\030\004 \003(\0132$.google.cloud.secu" + + "ritycenter.v1.File\0224\n\006script\030\005 \001(\0132$.goo" + + "gle.cloud.securitycenter.v1.File\022\014\n\004args" + + "\030\006 \003(\t\022\033\n\023arguments_truncated\030\007 \001(\010\022J\n\re" + + "nv_variables\030\010 \003(\01323.google.cloud.securi" + + "tycenter.v1.EnvironmentVariable\022\037\n\027env_v" + + "ariables_truncated\030\t \001(\010\022\013\n\003pid\030\n \001(\003\022\022\n" + + "\nparent_pid\030\013 \001(\003\"0\n\023EnvironmentVariable" + + "\022\014\n\004name\030\001 \001(\t\022\013\n\003val\030\002 \001(\tB\350\001\n\"com.goog" + + "le.cloud.securitycenter.v1B\014ProcessProto" + + "P\001ZLgoogle.golang.org/genproto/googleapi" + + "s/cloud/securitycenter/v1;securitycenter" + + "\252\002\036Google.Cloud.SecurityCenter.V1\312\002\036Goog" + + "le\\Cloud\\SecurityCenter\\V1\352\002!Google::Clo" + + "ud::SecurityCenter::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -77,6 +77,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_securitycenter_v1_Process_descriptor, new java.lang.String[] { + "Name", "Binary", "Libraries", "Script", diff --git a/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/contact_details.proto b/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/contact_details.proto new file mode 100644 index 000000000..c282d325b --- /dev/null +++ b/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/contact_details.proto @@ -0,0 +1,37 @@ +// Copyright 2022 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 +// +// http://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. + +syntax = "proto3"; + +package google.cloud.securitycenter.v1; + +option csharp_namespace = "Google.Cloud.SecurityCenter.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenter"; +option java_multiple_files = true; +option java_outer_classname = "ContactDetailsProto"; +option java_package = "com.google.cloud.securitycenter.v1"; +option php_namespace = "Google\\Cloud\\SecurityCenter\\V1"; +option ruby_package = "Google::Cloud::SecurityCenter::V1"; + +// The details pertaining to specific contacts +message ContactDetails { + // A list of contacts + repeated Contact contacts = 1; +} + +// Representa a single contact's email address +message Contact { + // An email address e.g. "person123@company.com" + string email = 1; +} diff --git a/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/file.proto b/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/file.proto index 97ba1d0bd..d802dda6e 100644 --- a/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/file.proto +++ b/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/file.proto @@ -34,7 +34,7 @@ message File { int64 size = 2; // SHA256 hash of the first hashed_size bytes of the file encoded as a - // hex string. If hashed_size == size, hash_sha256 represents the SHA256 hash + // hex string. If hashed_size == size, sha256 represents the SHA256 hash // of the entire file. string sha256 = 3; diff --git a/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/finding.proto b/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/finding.proto index e43a90c28..70aa90e99 100644 --- a/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/finding.proto +++ b/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/finding.proto @@ -21,6 +21,7 @@ import "google/api/resource.proto"; import "google/cloud/securitycenter/v1/access.proto"; import "google/cloud/securitycenter/v1/compliance.proto"; import "google/cloud/securitycenter/v1/connection.proto"; +import "google/cloud/securitycenter/v1/contact_details.proto"; import "google/cloud/securitycenter/v1/exfiltration.proto"; import "google/cloud/securitycenter/v1/external_system.proto"; import "google/cloud/securitycenter/v1/iam_binding.proto"; @@ -254,13 +255,11 @@ message Finding { Vulnerability vulnerability = 20; // Output only. The most recent time this finding was muted or unmuted. - google.protobuf.Timestamp mute_update_time = 21 - [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp mute_update_time = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Third party SIEM/SOAR fields within SCC, contains external - // system information and external system finding fields. - map external_systems = 22 - [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Third party SIEM/SOAR fields within SCC, contains external system + // information and external system finding fields. + map external_systems = 22 [(google.api.field_behavior) = OUTPUT_ONLY]; // MITRE ATT&CK tactics and techniques related to this finding. // See: https://attack.mitre.org @@ -282,6 +281,25 @@ message Finding { // Represents operating system processes associated with the Finding. repeated Process processes = 30; + // Output only. Map containing the point of contacts for the given finding. The key + // represents the type of contact, while the value contains a list of all the + // contacts that pertain. Please refer to: + // https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories + // + // { + // "security": { + // "contacts": [ + // { + // "email": "person1@company.com" + // }, + // { + // "email": "person2@company.com" + // } + // ] + // } + // } + map contacts = 33 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Contains compliance information for security standards associated to the // finding. repeated Compliance compliances = 34; diff --git a/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/indicator.proto b/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/indicator.proto index 922347764..e14e57abc 100644 --- a/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/indicator.proto +++ b/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/indicator.proto @@ -29,9 +29,51 @@ option ruby_package = "Google::Cloud::SecurityCenter::V1"; // operating system that, with high confidence, indicates a computer intrusion. // Reference: https://en.wikipedia.org/wiki/Indicator_of_compromise message Indicator { + // Indicates what signature matched this process. + message ProcessSignature { + // A signature corresponding to memory page hashes. + message MemoryHashSignature { + // Memory hash detection contributing to the binary family match. + message Detection { + // The name of the binary associated with the memory hash + // signature detection. + string binary = 2; + + // The percentage of memory page hashes in the signature + // that were matched. + double percent_pages_matched = 3; + } + + // The binary family. + string binary_family = 1; + + // The list of memory hash detections contributing to the binary family + // match. + repeated Detection detections = 4; + } + + // A signature corresponding to a YARA rule. + message YaraRuleSignature { + // The name of the YARA rule. + string yara_rule = 5; + } + + oneof signature { + // Signature indicating that a binary family was matched. + MemoryHashSignature memory_hash_signature = 6; + + // Signature indicating that a YARA rule was matched. + YaraRuleSignature yara_rule_signature = 7; + } + } + // List of ip addresses associated to the Finding. repeated string ip_addresses = 1; // List of domains associated to the Finding. repeated string domains = 2; + + // The list of matched signatures indicating that the given + // process is present in the environment. + repeated ProcessSignature signatures = 3; } diff --git a/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/process.proto b/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/process.proto index 185f0467f..480714be4 100644 --- a/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/process.proto +++ b/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/process.proto @@ -28,6 +28,10 @@ option ruby_package = "Google::Cloud::SecurityCenter::V1"; // Represents an operating system process. message Process { + // The process name visible in utilities like `top` and `ps`; it can + // be accessed via `/proc/[pid]/comm` and changed with `prctl(PR_SET_NAME)`. + string name = 12; + // File information for the process executable. File binary = 3; diff --git a/samples/snippets/src/test/java/com/google/cloud/examples/securitycenter/snippets/MuteFindingIT.java b/samples/snippets/src/test/java/com/google/cloud/examples/securitycenter/snippets/MuteFindingIT.java index 7f2c48472..3bbcf3a84 100644 --- a/samples/snippets/src/test/java/com/google/cloud/examples/securitycenter/snippets/MuteFindingIT.java +++ b/samples/snippets/src/test/java/com/google/cloud/examples/securitycenter/snippets/MuteFindingIT.java @@ -79,6 +79,10 @@ public static void requireEnvVar(String envVarName) { @BeforeClass public static void setUp() throws IOException { + final PrintStream out = System.out; + stdOut = new ByteArrayOutputStream(); + System.setOut(new PrintStream(stdOut)); + requireEnvVar("GOOGLE_APPLICATION_CREDENTIALS"); requireEnvVar("SCC_PROJECT_ID"); requireEnvVar("SCC_PROJECT_ORG_ID"); @@ -93,6 +97,9 @@ public static void setUp() throws IOException { FINDING_1 = createFinding(SOURCE.getName(), "1testingscc" + uuid); FINDING_2 = createFinding(SOURCE.getName(), "2testingscc" + uuid); FINDING_3 = createFinding(SOURCE.getName(), "3testingscc" + uuid); + + stdOut = null; + System.setOut(out); } @AfterClass