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 01ff50d82..4571c8c77 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 @@ -322,6 +322,7 @@ public void createFindingTest() throws Exception { .setNextSteps("nextSteps1206138868") .addAllContainers(new ArrayList()) .setKubernetes(Kubernetes.newBuilder().build()) + .setDatabase(Database.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -399,6 +400,7 @@ public void createFindingTest2() throws Exception { .setNextSteps("nextSteps1206138868") .addAllContainers(new ArrayList()) .setKubernetes(Kubernetes.newBuilder().build()) + .setDatabase(Database.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -2789,6 +2791,7 @@ public void setFindingStateTest() throws Exception { .setNextSteps("nextSteps1206138868") .addAllContainers(new ArrayList()) .setKubernetes(Kubernetes.newBuilder().build()) + .setDatabase(Database.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -2868,6 +2871,7 @@ public void setFindingStateTest2() throws Exception { .setNextSteps("nextSteps1206138868") .addAllContainers(new ArrayList()) .setKubernetes(Kubernetes.newBuilder().build()) + .setDatabase(Database.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -2945,6 +2949,7 @@ public void setMuteTest() throws Exception { .setNextSteps("nextSteps1206138868") .addAllContainers(new ArrayList()) .setKubernetes(Kubernetes.newBuilder().build()) + .setDatabase(Database.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -3022,6 +3027,7 @@ public void setMuteTest2() throws Exception { .setNextSteps("nextSteps1206138868") .addAllContainers(new ArrayList()) .setKubernetes(Kubernetes.newBuilder().build()) + .setDatabase(Database.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -3349,6 +3355,7 @@ public void updateFindingTest() throws Exception { .setNextSteps("nextSteps1206138868") .addAllContainers(new ArrayList()) .setKubernetes(Kubernetes.newBuilder().build()) + .setDatabase(Database.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -3384,6 +3391,7 @@ public void updateFindingTest() throws Exception { .setNextSteps("nextSteps1206138868") .addAllContainers(new ArrayList()) .setKubernetes(Kubernetes.newBuilder().build()) + .setDatabase(Database.newBuilder().build()) .build(); Finding actualResponse = client.updateFinding(finding); @@ -3444,6 +3452,7 @@ public void updateFindingExceptionTest() throws Exception { .setNextSteps("nextSteps1206138868") .addAllContainers(new ArrayList()) .setKubernetes(Kubernetes.newBuilder().build()) + .setDatabase(Database.newBuilder().build()) .build(); client.updateFinding(finding); Assert.fail("No exception raised"); 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 e49af1ad6..e06c74740 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 @@ -313,6 +313,7 @@ public void createFindingTest() throws Exception { .setNextSteps("nextSteps1206138868") .addAllContainers(new ArrayList()) .setKubernetes(Kubernetes.newBuilder().build()) + .setDatabase(Database.newBuilder().build()) .build(); mockSecurityCenter.addResponse(expectedResponse); @@ -386,6 +387,7 @@ public void createFindingTest2() throws Exception { .setNextSteps("nextSteps1206138868") .addAllContainers(new ArrayList()) .setKubernetes(Kubernetes.newBuilder().build()) + .setDatabase(Database.newBuilder().build()) .build(); mockSecurityCenter.addResponse(expectedResponse); @@ -2560,6 +2562,7 @@ public void setFindingStateTest() throws Exception { .setNextSteps("nextSteps1206138868") .addAllContainers(new ArrayList()) .setKubernetes(Kubernetes.newBuilder().build()) + .setDatabase(Database.newBuilder().build()) .build(); mockSecurityCenter.addResponse(expectedResponse); @@ -2635,6 +2638,7 @@ public void setFindingStateTest2() throws Exception { .setNextSteps("nextSteps1206138868") .addAllContainers(new ArrayList()) .setKubernetes(Kubernetes.newBuilder().build()) + .setDatabase(Database.newBuilder().build()) .build(); mockSecurityCenter.addResponse(expectedResponse); @@ -2708,6 +2712,7 @@ public void setMuteTest() throws Exception { .setNextSteps("nextSteps1206138868") .addAllContainers(new ArrayList()) .setKubernetes(Kubernetes.newBuilder().build()) + .setDatabase(Database.newBuilder().build()) .build(); mockSecurityCenter.addResponse(expectedResponse); @@ -2780,6 +2785,7 @@ public void setMuteTest2() throws Exception { .setNextSteps("nextSteps1206138868") .addAllContainers(new ArrayList()) .setKubernetes(Kubernetes.newBuilder().build()) + .setDatabase(Database.newBuilder().build()) .build(); mockSecurityCenter.addResponse(expectedResponse); @@ -3062,6 +3068,7 @@ public void updateFindingTest() throws Exception { .setNextSteps("nextSteps1206138868") .addAllContainers(new ArrayList()) .setKubernetes(Kubernetes.newBuilder().build()) + .setDatabase(Database.newBuilder().build()) .build(); mockSecurityCenter.addResponse(expectedResponse); diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Database.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Database.java new file mode 100644 index 000000000..3fca4c22b --- /dev/null +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Database.java @@ -0,0 +1,1492 @@ +/* + * 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/database.proto + +package com.google.cloud.securitycenter.v1; + +/** + * + * + *
+ * Represents database access information, such as queries.
+ * A database may be a sub-resource of an instance (as in the case of CloudSQL
+ * instances or Cloud Spanner instances), or the database instance itself.
+ * Some database resources may not have the full resource name populated
+ * because these resource types are not yet supported by Cloud Asset Inventory
+ * (e.g. CloudSQL databases).  In these cases only the display name will be
+ * provided.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v1.Database} + */ +public final class Database extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.Database) + DatabaseOrBuilder { + private static final long serialVersionUID = 0L; + // Use Database.newBuilder() to construct. + private Database(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Database() { + name_ = ""; + displayName_ = ""; + userName_ = ""; + query_ = ""; + grantees_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Database(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Database( + 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(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + userName_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + query_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + grantees_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + grantees_.add(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 { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + grantees_ = grantees_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.DatabaseProto + .internal_static_google_cloud_securitycenter_v1_Database_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.DatabaseProto + .internal_static_google_cloud_securitycenter_v1_Database_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.Database.class, + com.google.cloud.securitycenter.v1.Database.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * The full resource name of the database the user connected to, if it is
+   * supported by CAI. (https://google.aip.dev/122#full-resource-names)
+   * 
+ * + * string name = 1; + * + * @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 full resource name of the database the user connected to, if it is
+   * supported by CAI. (https://google.aip.dev/122#full-resource-names)
+   * 
+ * + * string name = 1; + * + * @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 DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * The human readable name of the database the user connected to.
+   * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + 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(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * The human readable name of the database the user connected to.
+   * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int USER_NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object userName_; + /** + * + * + *
+   * The username used to connect to the DB. This may not necessarily be an IAM
+   * principal, and has no required format.
+   * 
+ * + * string user_name = 3; + * + * @return The userName. + */ + @java.lang.Override + public java.lang.String getUserName() { + java.lang.Object ref = userName_; + 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(); + userName_ = s; + return s; + } + } + /** + * + * + *
+   * The username used to connect to the DB. This may not necessarily be an IAM
+   * principal, and has no required format.
+   * 
+ * + * string user_name = 3; + * + * @return The bytes for userName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUserNameBytes() { + java.lang.Object ref = userName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int QUERY_FIELD_NUMBER = 4; + private volatile java.lang.Object query_; + /** + * + * + *
+   * The SQL statement associated with the relevant access.
+   * 
+ * + * string query = 4; + * + * @return The query. + */ + @java.lang.Override + public java.lang.String getQuery() { + java.lang.Object ref = query_; + 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(); + query_ = s; + return s; + } + } + /** + * + * + *
+   * The SQL statement associated with the relevant access.
+   * 
+ * + * string query = 4; + * + * @return The bytes for query. + */ + @java.lang.Override + public com.google.protobuf.ByteString getQueryBytes() { + java.lang.Object ref = query_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + query_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GRANTEES_FIELD_NUMBER = 5; + private com.google.protobuf.LazyStringList grantees_; + /** + * + * + *
+   * The target usernames/roles/groups of a SQL privilege grant (not an IAM
+   * policy change).
+   * 
+ * + * repeated string grantees = 5; + * + * @return A list containing the grantees. + */ + public com.google.protobuf.ProtocolStringList getGranteesList() { + return grantees_; + } + /** + * + * + *
+   * The target usernames/roles/groups of a SQL privilege grant (not an IAM
+   * policy change).
+   * 
+ * + * repeated string grantees = 5; + * + * @return The count of grantees. + */ + public int getGranteesCount() { + return grantees_.size(); + } + /** + * + * + *
+   * The target usernames/roles/groups of a SQL privilege grant (not an IAM
+   * policy change).
+   * 
+ * + * repeated string grantees = 5; + * + * @param index The index of the element to return. + * @return The grantees at the given index. + */ + public java.lang.String getGrantees(int index) { + return grantees_.get(index); + } + /** + * + * + *
+   * The target usernames/roles/groups of a SQL privilege grant (not an IAM
+   * policy change).
+   * 
+ * + * repeated string grantees = 5; + * + * @param index The index of the value to return. + * @return The bytes of the grantees at the given index. + */ + public com.google.protobuf.ByteString getGranteesBytes(int index) { + return grantees_.getByteString(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(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, userName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, query_); + } + for (int i = 0; i < grantees_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, grantees_.getRaw(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(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, userName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, query_); + } + { + int dataSize = 0; + for (int i = 0; i < grantees_.size(); i++) { + dataSize += computeStringSizeNoTag(grantees_.getRaw(i)); + } + size += dataSize; + size += 1 * getGranteesList().size(); + } + 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.Database)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v1.Database other = + (com.google.cloud.securitycenter.v1.Database) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getUserName().equals(other.getUserName())) return false; + if (!getQuery().equals(other.getQuery())) return false; + if (!getGranteesList().equals(other.getGranteesList())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + USER_NAME_FIELD_NUMBER; + hash = (53 * hash) + getUserName().hashCode(); + hash = (37 * hash) + QUERY_FIELD_NUMBER; + hash = (53 * hash) + getQuery().hashCode(); + if (getGranteesCount() > 0) { + hash = (37 * hash) + GRANTEES_FIELD_NUMBER; + hash = (53 * hash) + getGranteesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v1.Database parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.Database 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.Database parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.Database 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.Database parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.Database 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.Database parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.Database 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.Database parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.Database 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.Database 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.Database 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.Database 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; + } + /** + * + * + *
+   * Represents database access information, such as queries.
+   * A database may be a sub-resource of an instance (as in the case of CloudSQL
+   * instances or Cloud Spanner instances), or the database instance itself.
+   * Some database resources may not have the full resource name populated
+   * because these resource types are not yet supported by Cloud Asset Inventory
+   * (e.g. CloudSQL databases).  In these cases only the display name will be
+   * provided.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v1.Database} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.Database) + com.google.cloud.securitycenter.v1.DatabaseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.DatabaseProto + .internal_static_google_cloud_securitycenter_v1_Database_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.DatabaseProto + .internal_static_google_cloud_securitycenter_v1_Database_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.Database.class, + com.google.cloud.securitycenter.v1.Database.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v1.Database.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(); + name_ = ""; + + displayName_ = ""; + + userName_ = ""; + + query_ = ""; + + grantees_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v1.DatabaseProto + .internal_static_google_cloud_securitycenter_v1_Database_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.Database getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v1.Database.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.Database build() { + com.google.cloud.securitycenter.v1.Database result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.Database buildPartial() { + com.google.cloud.securitycenter.v1.Database result = + new com.google.cloud.securitycenter.v1.Database(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.displayName_ = displayName_; + result.userName_ = userName_; + result.query_ = query_; + if (((bitField0_ & 0x00000001) != 0)) { + grantees_ = grantees_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.grantees_ = grantees_; + 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.Database) { + return mergeFrom((com.google.cloud.securitycenter.v1.Database) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v1.Database other) { + if (other == com.google.cloud.securitycenter.v1.Database.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getUserName().isEmpty()) { + userName_ = other.userName_; + onChanged(); + } + if (!other.getQuery().isEmpty()) { + query_ = other.query_; + onChanged(); + } + if (!other.grantees_.isEmpty()) { + if (grantees_.isEmpty()) { + grantees_ = other.grantees_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureGranteesIsMutable(); + grantees_.addAll(other.grantees_); + } + 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.Database parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.securitycenter.v1.Database) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * The full resource name of the database the user connected to, if it is
+     * supported by CAI. (https://google.aip.dev/122#full-resource-names)
+     * 
+ * + * string name = 1; + * + * @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 full resource name of the database the user connected to, if it is
+     * supported by CAI. (https://google.aip.dev/122#full-resource-names)
+     * 
+ * + * string name = 1; + * + * @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 full resource name of the database the user connected to, if it is
+     * supported by CAI. (https://google.aip.dev/122#full-resource-names)
+     * 
+ * + * string name = 1; + * + * @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 full resource name of the database the user connected to, if it is
+     * supported by CAI. (https://google.aip.dev/122#full-resource-names)
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The full resource name of the database the user connected to, if it is
+     * supported by CAI. (https://google.aip.dev/122#full-resource-names)
+     * 
+ * + * string name = 1; + * + * @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 java.lang.Object displayName_ = ""; + /** + * + * + *
+     * The human readable name of the database the user connected to.
+     * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The human readable name of the database the user connected to.
+     * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The human readable name of the database the user connected to.
+     * 
+ * + * string display_name = 2; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The human readable name of the database the user connected to.
+     * 
+ * + * string display_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The human readable name of the database the user connected to.
+     * 
+ * + * string display_name = 2; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object userName_ = ""; + /** + * + * + *
+     * The username used to connect to the DB. This may not necessarily be an IAM
+     * principal, and has no required format.
+     * 
+ * + * string user_name = 3; + * + * @return The userName. + */ + public java.lang.String getUserName() { + java.lang.Object ref = userName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The username used to connect to the DB. This may not necessarily be an IAM
+     * principal, and has no required format.
+     * 
+ * + * string user_name = 3; + * + * @return The bytes for userName. + */ + public com.google.protobuf.ByteString getUserNameBytes() { + java.lang.Object ref = userName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The username used to connect to the DB. This may not necessarily be an IAM
+     * principal, and has no required format.
+     * 
+ * + * string user_name = 3; + * + * @param value The userName to set. + * @return This builder for chaining. + */ + public Builder setUserName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + userName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The username used to connect to the DB. This may not necessarily be an IAM
+     * principal, and has no required format.
+     * 
+ * + * string user_name = 3; + * + * @return This builder for chaining. + */ + public Builder clearUserName() { + + userName_ = getDefaultInstance().getUserName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The username used to connect to the DB. This may not necessarily be an IAM
+     * principal, and has no required format.
+     * 
+ * + * string user_name = 3; + * + * @param value The bytes for userName to set. + * @return This builder for chaining. + */ + public Builder setUserNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + userName_ = value; + onChanged(); + return this; + } + + private java.lang.Object query_ = ""; + /** + * + * + *
+     * The SQL statement associated with the relevant access.
+     * 
+ * + * string query = 4; + * + * @return The query. + */ + public java.lang.String getQuery() { + java.lang.Object ref = query_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + query_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The SQL statement associated with the relevant access.
+     * 
+ * + * string query = 4; + * + * @return The bytes for query. + */ + public com.google.protobuf.ByteString getQueryBytes() { + java.lang.Object ref = query_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + query_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The SQL statement associated with the relevant access.
+     * 
+ * + * string query = 4; + * + * @param value The query to set. + * @return This builder for chaining. + */ + public Builder setQuery(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + query_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The SQL statement associated with the relevant access.
+     * 
+ * + * string query = 4; + * + * @return This builder for chaining. + */ + public Builder clearQuery() { + + query_ = getDefaultInstance().getQuery(); + onChanged(); + return this; + } + /** + * + * + *
+     * The SQL statement associated with the relevant access.
+     * 
+ * + * string query = 4; + * + * @param value The bytes for query to set. + * @return This builder for chaining. + */ + public Builder setQueryBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + query_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList grantees_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureGranteesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + grantees_ = new com.google.protobuf.LazyStringArrayList(grantees_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * The target usernames/roles/groups of a SQL privilege grant (not an IAM
+     * policy change).
+     * 
+ * + * repeated string grantees = 5; + * + * @return A list containing the grantees. + */ + public com.google.protobuf.ProtocolStringList getGranteesList() { + return grantees_.getUnmodifiableView(); + } + /** + * + * + *
+     * The target usernames/roles/groups of a SQL privilege grant (not an IAM
+     * policy change).
+     * 
+ * + * repeated string grantees = 5; + * + * @return The count of grantees. + */ + public int getGranteesCount() { + return grantees_.size(); + } + /** + * + * + *
+     * The target usernames/roles/groups of a SQL privilege grant (not an IAM
+     * policy change).
+     * 
+ * + * repeated string grantees = 5; + * + * @param index The index of the element to return. + * @return The grantees at the given index. + */ + public java.lang.String getGrantees(int index) { + return grantees_.get(index); + } + /** + * + * + *
+     * The target usernames/roles/groups of a SQL privilege grant (not an IAM
+     * policy change).
+     * 
+ * + * repeated string grantees = 5; + * + * @param index The index of the value to return. + * @return The bytes of the grantees at the given index. + */ + public com.google.protobuf.ByteString getGranteesBytes(int index) { + return grantees_.getByteString(index); + } + /** + * + * + *
+     * The target usernames/roles/groups of a SQL privilege grant (not an IAM
+     * policy change).
+     * 
+ * + * repeated string grantees = 5; + * + * @param index The index to set the value at. + * @param value The grantees to set. + * @return This builder for chaining. + */ + public Builder setGrantees(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureGranteesIsMutable(); + grantees_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The target usernames/roles/groups of a SQL privilege grant (not an IAM
+     * policy change).
+     * 
+ * + * repeated string grantees = 5; + * + * @param value The grantees to add. + * @return This builder for chaining. + */ + public Builder addGrantees(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureGranteesIsMutable(); + grantees_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The target usernames/roles/groups of a SQL privilege grant (not an IAM
+     * policy change).
+     * 
+ * + * repeated string grantees = 5; + * + * @param values The grantees to add. + * @return This builder for chaining. + */ + public Builder addAllGrantees(java.lang.Iterable values) { + ensureGranteesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, grantees_); + onChanged(); + return this; + } + /** + * + * + *
+     * The target usernames/roles/groups of a SQL privilege grant (not an IAM
+     * policy change).
+     * 
+ * + * repeated string grantees = 5; + * + * @return This builder for chaining. + */ + public Builder clearGrantees() { + grantees_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The target usernames/roles/groups of a SQL privilege grant (not an IAM
+     * policy change).
+     * 
+ * + * repeated string grantees = 5; + * + * @param value The bytes of the grantees to add. + * @return This builder for chaining. + */ + public Builder addGranteesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureGranteesIsMutable(); + grantees_.add(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.Database) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.Database) + private static final com.google.cloud.securitycenter.v1.Database DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.Database(); + } + + public static com.google.cloud.securitycenter.v1.Database getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Database parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Database(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.Database getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/DatabaseOrBuilder.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/DatabaseOrBuilder.java new file mode 100644 index 000000000..f8b48e443 --- /dev/null +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/DatabaseOrBuilder.java @@ -0,0 +1,184 @@ +/* + * 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/database.proto + +package com.google.cloud.securitycenter.v1; + +public interface DatabaseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.Database) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The full resource name of the database the user connected to, if it is
+   * supported by CAI. (https://google.aip.dev/122#full-resource-names)
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * The full resource name of the database the user connected to, if it is
+   * supported by CAI. (https://google.aip.dev/122#full-resource-names)
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * The human readable name of the database the user connected to.
+   * 
+ * + * string display_name = 2; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * The human readable name of the database the user connected to.
+   * 
+ * + * string display_name = 2; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * The username used to connect to the DB. This may not necessarily be an IAM
+   * principal, and has no required format.
+   * 
+ * + * string user_name = 3; + * + * @return The userName. + */ + java.lang.String getUserName(); + /** + * + * + *
+   * The username used to connect to the DB. This may not necessarily be an IAM
+   * principal, and has no required format.
+   * 
+ * + * string user_name = 3; + * + * @return The bytes for userName. + */ + com.google.protobuf.ByteString getUserNameBytes(); + + /** + * + * + *
+   * The SQL statement associated with the relevant access.
+   * 
+ * + * string query = 4; + * + * @return The query. + */ + java.lang.String getQuery(); + /** + * + * + *
+   * The SQL statement associated with the relevant access.
+   * 
+ * + * string query = 4; + * + * @return The bytes for query. + */ + com.google.protobuf.ByteString getQueryBytes(); + + /** + * + * + *
+   * The target usernames/roles/groups of a SQL privilege grant (not an IAM
+   * policy change).
+   * 
+ * + * repeated string grantees = 5; + * + * @return A list containing the grantees. + */ + java.util.List getGranteesList(); + /** + * + * + *
+   * The target usernames/roles/groups of a SQL privilege grant (not an IAM
+   * policy change).
+   * 
+ * + * repeated string grantees = 5; + * + * @return The count of grantees. + */ + int getGranteesCount(); + /** + * + * + *
+   * The target usernames/roles/groups of a SQL privilege grant (not an IAM
+   * policy change).
+   * 
+ * + * repeated string grantees = 5; + * + * @param index The index of the element to return. + * @return The grantees at the given index. + */ + java.lang.String getGrantees(int index); + /** + * + * + *
+   * The target usernames/roles/groups of a SQL privilege grant (not an IAM
+   * policy change).
+   * 
+ * + * repeated string grantees = 5; + * + * @param index The index of the value to return. + * @return The bytes of the grantees at the given index. + */ + com.google.protobuf.ByteString getGranteesBytes(int index); +} diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/DatabaseProto.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/DatabaseProto.java new file mode 100644 index 000000000..6561ea4e7 --- /dev/null +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/DatabaseProto.java @@ -0,0 +1,69 @@ +/* + * 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/database.proto + +package com.google.cloud.securitycenter.v1; + +public final class DatabaseProto { + private DatabaseProto() {} + + 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_Database_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v1_Database_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n-google/cloud/securitycenter/v1/databas" + + "e.proto\022\036google.cloud.securitycenter.v1\"" + + "b\n\010Database\022\014\n\004name\030\001 \001(\t\022\024\n\014display_nam" + + "e\030\002 \001(\t\022\021\n\tuser_name\030\003 \001(\t\022\r\n\005query\030\004 \001(" + + "\t\022\020\n\010grantees\030\005 \003(\tB\351\001\n\"com.google.cloud" + + ".securitycenter.v1B\rDatabaseProtoP\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" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); + internal_static_google_cloud_securitycenter_v1_Database_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_securitycenter_v1_Database_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v1_Database_descriptor, + new java.lang.String[] { + "Name", "DisplayName", "UserName", "Query", "Grantees", + }); + } + + // @@protoc_insertion_point(outer_class_scope) +} 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 cd44fba17..831ecdc55 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 @@ -452,6 +452,22 @@ private Finding( kubernetes_ = subBuilder.buildPartial(); } + break; + } + case 354: + { + com.google.cloud.securitycenter.v1.Database.Builder subBuilder = null; + if (database_ != null) { + subBuilder = database_.toBuilder(); + } + database_ = + input.readMessage( + com.google.cloud.securitycenter.v1.Database.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(database_); + database_ = subBuilder.buildPartial(); + } + break; } default: @@ -2344,8 +2360,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.
    * 
* * @@ -2370,8 +2386,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.
    * 
* * @@ -2387,8 +2403,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.
    * 
* * @@ -2409,8 +2425,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.
    * 
* * @@ -2763,9 +2779,9 @@ public 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:
+   * 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": {
@@ -2803,9 +2819,9 @@ public boolean containsContacts(java.lang.String key) {
    *
    *
    * 
-   * 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:
+   * 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": {
@@ -2834,9 +2850,9 @@ public boolean containsContacts(java.lang.String key) {
    *
    *
    * 
-   * 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:
+   * 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": {
@@ -2870,9 +2886,9 @@ public com.google.cloud.securitycenter.v1.ContactDetails getContactsOrDefault(
    *
    *
    * 
-   * 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:
+   * 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": {
@@ -3317,6 +3333,54 @@ public com.google.cloud.securitycenter.v1.KubernetesOrBuilder getKubernetesOrBui
     return getKubernetes();
   }
 
+  public static final int DATABASE_FIELD_NUMBER = 44;
+  private com.google.cloud.securitycenter.v1.Database database_;
+  /**
+   *
+   *
+   * 
+   * Database associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v1.Database database = 44; + * + * @return Whether the database field is set. + */ + @java.lang.Override + public boolean hasDatabase() { + return database_ != null; + } + /** + * + * + *
+   * Database associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v1.Database database = 44; + * + * @return The database. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.Database getDatabase() { + return database_ == null + ? com.google.cloud.securitycenter.v1.Database.getDefaultInstance() + : database_; + } + /** + * + * + *
+   * Database associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v1.Database database = 44; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.DatabaseOrBuilder getDatabaseOrBuilder() { + return getDatabase(); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -3424,6 +3488,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (kubernetes_ != null) { output.writeMessage(43, getKubernetes()); } + if (database_ != null) { + output.writeMessage(44, getDatabase()); + } unknownFields.writeTo(output); } @@ -3554,6 +3621,9 @@ public int getSerializedSize() { if (kubernetes_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(43, getKubernetes()); } + if (database_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(44, getDatabase()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -3631,6 +3701,10 @@ public boolean equals(final java.lang.Object obj) { if (hasKubernetes()) { if (!getKubernetes().equals(other.getKubernetes())) return false; } + if (hasDatabase() != other.hasDatabase()) return false; + if (hasDatabase()) { + if (!getDatabase().equals(other.getDatabase())) return false; + } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -3740,6 +3814,10 @@ public int hashCode() { hash = (37 * hash) + KUBERNETES_FIELD_NUMBER; hash = (53 * hash) + getKubernetes().hashCode(); } + if (hasDatabase()) { + hash = (37 * hash) + DATABASE_FIELD_NUMBER; + hash = (53 * hash) + getDatabase().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -4043,6 +4121,12 @@ public Builder clear() { kubernetes_ = null; kubernetesBuilder_ = null; } + if (databaseBuilder_ == null) { + database_ = null; + } else { + database_ = null; + databaseBuilder_ = null; + } return this; } @@ -4185,6 +4269,11 @@ public com.google.cloud.securitycenter.v1.Finding buildPartial() { } else { result.kubernetes_ = kubernetesBuilder_.build(); } + if (databaseBuilder_ == null) { + result.database_ = database_; + } else { + result.database_ = databaseBuilder_.build(); + } onBuilt(); return result; } @@ -4450,6 +4539,9 @@ public Builder mergeFrom(com.google.cloud.securitycenter.v1.Finding other) { if (other.hasKubernetes()) { mergeKubernetes(other.getKubernetes()); } + if (other.hasDatabase()) { + mergeDatabase(other.getDatabase()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -7098,8 +7190,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.
      * 
* * @@ -7124,8 +7216,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.
      * 
* * @@ -7141,8 +7233,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.
      * 
* * @@ -7163,8 +7255,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.
      * 
* * @@ -7193,8 +7285,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.
      * 
* * @@ -7218,8 +7310,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.
      * 
* * @@ -7242,8 +7334,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.
      * 
* * @@ -8504,9 +8596,9 @@ public 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:
+     * 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": {
@@ -8544,9 +8636,9 @@ public boolean containsContacts(java.lang.String key) {
      *
      *
      * 
-     * 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:
+     * 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": {
@@ -8575,9 +8667,9 @@ public boolean containsContacts(java.lang.String key) {
      *
      *
      * 
-     * 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:
+     * 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": {
@@ -8611,9 +8703,9 @@ public com.google.cloud.securitycenter.v1.ContactDetails getContactsOrDefault(
      *
      *
      * 
-     * 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:
+     * 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": {
@@ -8655,9 +8747,9 @@ public Builder clearContacts() {
      *
      *
      * 
-     * 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:
+     * 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": {
@@ -8694,9 +8786,9 @@ public Builder removeContacts(java.lang.String key) {
      *
      *
      * 
-     * 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:
+     * 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": {
@@ -8732,9 +8824,9 @@ public Builder putContacts(
      *
      *
      * 
-     * 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:
+     * 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": {
@@ -10435,6 +10527,192 @@ public com.google.cloud.securitycenter.v1.KubernetesOrBuilder getKubernetesOrBui
       return kubernetesBuilder_;
     }
 
+    private com.google.cloud.securitycenter.v1.Database database_;
+    private com.google.protobuf.SingleFieldBuilderV3<
+            com.google.cloud.securitycenter.v1.Database,
+            com.google.cloud.securitycenter.v1.Database.Builder,
+            com.google.cloud.securitycenter.v1.DatabaseOrBuilder>
+        databaseBuilder_;
+    /**
+     *
+     *
+     * 
+     * Database associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v1.Database database = 44; + * + * @return Whether the database field is set. + */ + public boolean hasDatabase() { + return databaseBuilder_ != null || database_ != null; + } + /** + * + * + *
+     * Database associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v1.Database database = 44; + * + * @return The database. + */ + public com.google.cloud.securitycenter.v1.Database getDatabase() { + if (databaseBuilder_ == null) { + return database_ == null + ? com.google.cloud.securitycenter.v1.Database.getDefaultInstance() + : database_; + } else { + return databaseBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Database associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v1.Database database = 44; + */ + public Builder setDatabase(com.google.cloud.securitycenter.v1.Database value) { + if (databaseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + database_ = value; + onChanged(); + } else { + databaseBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Database associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v1.Database database = 44; + */ + public Builder setDatabase( + com.google.cloud.securitycenter.v1.Database.Builder builderForValue) { + if (databaseBuilder_ == null) { + database_ = builderForValue.build(); + onChanged(); + } else { + databaseBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Database associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v1.Database database = 44; + */ + public Builder mergeDatabase(com.google.cloud.securitycenter.v1.Database value) { + if (databaseBuilder_ == null) { + if (database_ != null) { + database_ = + com.google.cloud.securitycenter.v1.Database.newBuilder(database_) + .mergeFrom(value) + .buildPartial(); + } else { + database_ = value; + } + onChanged(); + } else { + databaseBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Database associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v1.Database database = 44; + */ + public Builder clearDatabase() { + if (databaseBuilder_ == null) { + database_ = null; + onChanged(); + } else { + database_ = null; + databaseBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Database associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v1.Database database = 44; + */ + public com.google.cloud.securitycenter.v1.Database.Builder getDatabaseBuilder() { + + onChanged(); + return getDatabaseFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Database associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v1.Database database = 44; + */ + public com.google.cloud.securitycenter.v1.DatabaseOrBuilder getDatabaseOrBuilder() { + if (databaseBuilder_ != null) { + return databaseBuilder_.getMessageOrBuilder(); + } else { + return database_ == null + ? com.google.cloud.securitycenter.v1.Database.getDefaultInstance() + : database_; + } + } + /** + * + * + *
+     * Database associated with the finding.
+     * 
+ * + * .google.cloud.securitycenter.v1.Database database = 44; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v1.Database, + com.google.cloud.securitycenter.v1.Database.Builder, + com.google.cloud.securitycenter.v1.DatabaseOrBuilder> + getDatabaseFieldBuilder() { + if (databaseBuilder_ == null) { + databaseBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v1.Database, + com.google.cloud.securitycenter.v1.Database.Builder, + com.google.cloud.securitycenter.v1.DatabaseOrBuilder>( + getDatabase(), getParentForChildren(), isClean()); + database_ = null; + } + return databaseBuilder_; + } + @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/FindingOrBuilder.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/FindingOrBuilder.java index 9d30c7bb1..81c48623a 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.
    * 
* * @@ -950,9 +950,9 @@ com.google.cloud.securitycenter.v1.ExternalSystem getExternalSystemsOrDefault( * * *
-   * 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:
+   * 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": {
@@ -977,9 +977,9 @@ com.google.cloud.securitycenter.v1.ExternalSystem getExternalSystemsOrDefault(
    *
    *
    * 
-   * 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:
+   * 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": {
@@ -1007,9 +1007,9 @@ com.google.cloud.securitycenter.v1.ExternalSystem getExternalSystemsOrDefault(
    *
    *
    * 
-   * 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:
+   * 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": {
@@ -1035,9 +1035,9 @@ com.google.cloud.securitycenter.v1.ExternalSystem getExternalSystemsOrDefault(
    *
    *
    * 
-   * 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:
+   * 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": {
@@ -1067,9 +1067,9 @@ com.google.cloud.securitycenter.v1.ContactDetails getContactsOrDefault(
    *
    *
    * 
-   * 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:
+   * 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": {
@@ -1376,4 +1376,39 @@ com.google.cloud.securitycenter.v1.ContactDetails getContactsOrDefault(
    * .google.cloud.securitycenter.v1.Kubernetes kubernetes = 43;
    */
   com.google.cloud.securitycenter.v1.KubernetesOrBuilder getKubernetesOrBuilder();
+
+  /**
+   *
+   *
+   * 
+   * Database associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v1.Database database = 44; + * + * @return Whether the database field is set. + */ + boolean hasDatabase(); + /** + * + * + *
+   * Database associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v1.Database database = 44; + * + * @return The database. + */ + com.google.cloud.securitycenter.v1.Database getDatabase(); + /** + * + * + *
+   * Database associated with the finding.
+   * 
+ * + * .google.cloud.securitycenter.v1.Database database = 44; + */ + com.google.cloud.securitycenter.v1.DatabaseOrBuilder getDatabaseOrBuilder(); } 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 9c33d6941..633246196 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 @@ -61,88 +61,91 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "/cloud/securitycenter/v1/connection.prot" + "o\0324google/cloud/securitycenter/v1/contac" + "t_details.proto\032.google/cloud/securityce" - + "nter/v1/container.proto\0321google/cloud/se" - + "curitycenter/v1/exfiltration.proto\0324goog" - + "le/cloud/securitycenter/v1/external_syst" - + "em.proto\0320google/cloud/securitycenter/v1" - + "/iam_binding.proto\032.google/cloud/securit" - + "ycenter/v1/indicator.proto\032/google/cloud" - + "/securitycenter/v1/kubernetes.proto\0321goo" - + "gle/cloud/securitycenter/v1/mitre_attack" - + ".proto\032,google/cloud/securitycenter/v1/p" - + "rocess.proto\0323google/cloud/securitycente" - + "r/v1/security_marks.proto\0322google/cloud/" - + "securitycenter/v1/vulnerability.proto\032\034g" - + "oogle/protobuf/struct.proto\032\037google/prot" - + "obuf/timestamp.proto\"\310\023\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.secu" - + "ritycenter.v1.Finding.State\022\020\n\010category\030" - + "\005 \001(\t\022\024\n\014external_uri\030\006 \001(\t\022X\n\021source_pr" - + "operties\030\007 \003(\0132=.google.cloud.securityce" - + "nter.v1.Finding.SourcePropertiesEntry\022J\n" - + "\016security_marks\030\010 \001(\0132-.google.cloud.sec" - + "uritycenter.v1.SecurityMarksB\003\340A\003\022.\n\neve" - + "nt_time\030\t \001(\0132\032.google.protobuf.Timestam" - + "p\022/\n\013create_time\030\n \001(\0132\032.google.protobuf" - + ".Timestamp\022B\n\010severity\030\014 \001(\01620.google.cl" - + "oud.securitycenter.v1.Finding.Severity\022\026" - + "\n\016canonical_name\030\016 \001(\t\022:\n\004mute\030\017 \001(\0162,.g" - + "oogle.cloud.securitycenter.v1.Finding.Mu" - + "te\022K\n\rfinding_class\030\021 \001(\01624.google.cloud" - + ".securitycenter.v1.Finding.FindingClass\022" - + "<\n\tindicator\030\022 \001(\0132).google.cloud.securi" - + "tycenter.v1.Indicator\022D\n\rvulnerability\030\024" - + " \001(\0132-.google.cloud.securitycenter.v1.Vu" - + "lnerability\0229\n\020mute_update_time\030\025 \001(\0132\032." - + "google.protobuf.TimestampB\003\340A\003\022[\n\020extern" - + "al_systems\030\026 \003(\0132<.google.cloud.security" - + "center.v1.Finding.ExternalSystemsEntryB\003" - + "\340A\003\022A\n\014mitre_attack\030\031 \001(\0132+.google.cloud" - + ".securitycenter.v1.MitreAttack\0226\n\006access" - + "\030\032 \001(\0132&.google.cloud.securitycenter.v1." - + "Access\022?\n\013connections\030\037 \003(\0132*.google.clo" - + "ud.securitycenter.v1.Connection\022\026\n\016mute_" - + "initiator\030\034 \001(\t\022:\n\tprocesses\030\036 \003(\0132\'.goo" - + "gle.cloud.securitycenter.v1.Process\022L\n\010c" - + "ontacts\030! \003(\01325.google.cloud.securitycen" - + "ter.v1.Finding.ContactsEntryB\003\340A\003\022?\n\013com" - + "pliances\030\" \003(\0132*.google.cloud.securityce" - + "nter.v1.Compliance\022\023\n\013description\030% \001(\t\022" - + "B\n\014exfiltration\030& \001(\0132,.google.cloud.sec" - + "uritycenter.v1.Exfiltration\022@\n\014iam_bindi" - + "ngs\030\' \003(\0132*.google.cloud.securitycenter." - + "v1.IamBinding\022\022\n\nnext_steps\030( \001(\t\022=\n\ncon" - + "tainers\030* \003(\0132).google.cloud.securitycen" - + "ter.v1.Container\022>\n\nkubernetes\030+ \001(\0132*.g" - + "oogle.cloud.securitycenter.v1.Kubernetes" - + "\032O\n\025SourcePropertiesEntry\022\013\n\003key\030\001 \001(\t\022%" - + "\n\005value\030\002 \001(\0132\026.google.protobuf.Value:\0028" - + "\001\032f\n\024ExternalSystemsEntry\022\013\n\003key\030\001 \001(\t\022=" - + "\n\005value\030\002 \001(\0132..google.cloud.securitycen" - + "ter.v1.ExternalSystem:\0028\001\032_\n\rContactsEnt" - + "ry\022\013\n\003key\030\001 \001(\t\022=\n\005value\030\002 \001(\0132..google." - + "cloud.securitycenter.v1.ContactDetails:\002" - + "8\001\"8\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\n\n\006AC" - + "TIVE\020\001\022\014\n\010INACTIVE\020\002\"Q\n\010Severity\022\030\n\024SEVE" - + "RITY_UNSPECIFIED\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_UNSPECIFIED\020\000\022\n\n\006THREAT\020\001\022\021\n\rVULN" - + "ERABILITY\020\002\022\024\n\020MISCONFIGURATION\020\003\022\017\n\013OBS" - + "ERVATION\020\004\022\r\n\tSCC_ERROR\020\005:\333\001\352A\327\001\n%securi" - + "tycenter.googleapis.com/Finding\022@organiz" - + "ations/{organization}/sources/{source}/f" - + "indings/{finding}\0224folders/{folder}/sour" - + "ces/{source}/findings/{finding}\0226project" - + "s/{project}/sources/{source}/findings/{f" - + "inding}B\332\001\n\"com.google.cloud.securitycen" - + "ter.v1P\001ZLgoogle.golang.org/genproto/goo" - + "gleapis/cloud/securitycenter/v1;security" - + "center\252\002\036Google.Cloud.SecurityCenter.V1\312" - + "\002\036Google\\Cloud\\SecurityCenter\\V1\352\002!Googl" - + "e::Cloud::SecurityCenter::V1b\006proto3" + + "nter/v1/container.proto\032-google/cloud/se" + + "curitycenter/v1/database.proto\0321google/c" + + "loud/securitycenter/v1/exfiltration.prot" + + "o\0324google/cloud/securitycenter/v1/extern" + + "al_system.proto\0320google/cloud/securityce" + + "nter/v1/iam_binding.proto\032.google/cloud/" + + "securitycenter/v1/indicator.proto\032/googl" + + "e/cloud/securitycenter/v1/kubernetes.pro" + + "to\0321google/cloud/securitycenter/v1/mitre" + + "_attack.proto\032,google/cloud/securitycent" + + "er/v1/process.proto\0323google/cloud/securi" + + "tycenter/v1/security_marks.proto\0322google" + + "/cloud/securitycenter/v1/vulnerability.p" + + "roto\032\034google/protobuf/struct.proto\032\037goog" + + "le/protobuf/timestamp.proto\"\204\024\n\007Finding\022" + + "\014\n\004name\030\001 \001(\t\022\016\n\006parent\030\002 \001(\t\022\025\n\rresourc" + + "e_name\030\003 \001(\t\022<\n\005state\030\004 \001(\0162-.google.clo" + + "ud.securitycenter.v1.Finding.State\022\020\n\010ca" + + "tegory\030\005 \001(\t\022\024\n\014external_uri\030\006 \001(\t\022X\n\021so" + + "urce_properties\030\007 \003(\0132=.google.cloud.sec" + + "uritycenter.v1.Finding.SourcePropertiesE" + + "ntry\022J\n\016security_marks\030\010 \001(\0132-.google.cl" + + "oud.securitycenter.v1.SecurityMarksB\003\340A\003" + + "\022.\n\nevent_time\030\t \001(\0132\032.google.protobuf.T" + + "imestamp\022/\n\013create_time\030\n \001(\0132\032.google.p" + + "rotobuf.Timestamp\022B\n\010severity\030\014 \001(\01620.go" + + "ogle.cloud.securitycenter.v1.Finding.Sev" + + "erity\022\026\n\016canonical_name\030\016 \001(\t\022:\n\004mute\030\017 " + + "\001(\0162,.google.cloud.securitycenter.v1.Fin" + + "ding.Mute\022K\n\rfinding_class\030\021 \001(\01624.googl" + + "e.cloud.securitycenter.v1.Finding.Findin" + + "gClass\022<\n\tindicator\030\022 \001(\0132).google.cloud" + + ".securitycenter.v1.Indicator\022D\n\rvulnerab" + + "ility\030\024 \001(\0132-.google.cloud.securitycente" + + "r.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.s" + + "ecuritycenter.v1.Finding.ExternalSystems" + + "EntryB\003\340A\003\022A\n\014mitre_attack\030\031 \001(\0132+.googl" + + "e.cloud.securitycenter.v1.MitreAttack\0226\n" + + "\006access\030\032 \001(\0132&.google.cloud.securitycen" + + "ter.v1.Access\022?\n\013connections\030\037 \003(\0132*.goo" + + "gle.cloud.securitycenter.v1.Connection\022\026" + + "\n\016mute_initiator\030\034 \001(\t\022:\n\tprocesses\030\036 \003(" + + "\0132\'.google.cloud.securitycenter.v1.Proce" + + "ss\022L\n\010contacts\030! \003(\01325.google.cloud.secu" + + "ritycenter.v1.Finding.ContactsEntryB\003\340A\003" + + "\022?\n\013compliances\030\" \003(\0132*.google.cloud.sec" + + "uritycenter.v1.Compliance\022\023\n\013description" + + "\030% \001(\t\022B\n\014exfiltration\030& \001(\0132,.google.cl" + + "oud.securitycenter.v1.Exfiltration\022@\n\014ia" + + "m_bindings\030\' \003(\0132*.google.cloud.security" + + "center.v1.IamBinding\022\022\n\nnext_steps\030( \001(\t" + + "\022=\n\ncontainers\030* \003(\0132).google.cloud.secu" + + "ritycenter.v1.Container\022>\n\nkubernetes\030+ " + + "\001(\0132*.google.cloud.securitycenter.v1.Kub" + + "ernetes\022:\n\010database\030, \001(\0132(.google.cloud" + + ".securitycenter.v1.Database\032O\n\025SourcePro" + + "pertiesEntry\022\013\n\003key\030\001 \001(\t\022%\n\005value\030\002 \001(\013" + + "2\026.google.protobuf.Value:\0028\001\032f\n\024External" + + "SystemsEntry\022\013\n\003key\030\001 \001(\t\022=\n\005value\030\002 \001(\013" + + "2..google.cloud.securitycenter.v1.Extern" + + "alSystem:\0028\001\032_\n\rContactsEntry\022\013\n\003key\030\001 \001" + + "(\t\022=\n\005value\030\002 \001(\0132..google.cloud.securit" + + "ycenter.v1.ContactDetails:\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" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -155,6 +158,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.cloud.securitycenter.v1.ConnectionProto.getDescriptor(), com.google.cloud.securitycenter.v1.ContactDetailsProto.getDescriptor(), com.google.cloud.securitycenter.v1.ContainerProto.getDescriptor(), + com.google.cloud.securitycenter.v1.DatabaseProto.getDescriptor(), com.google.cloud.securitycenter.v1.ExfiltrationProto.getDescriptor(), com.google.cloud.securitycenter.v1.ExternalSystemProto.getDescriptor(), com.google.cloud.securitycenter.v1.IamBindingProto.getDescriptor(), @@ -204,6 +208,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "NextSteps", "Containers", "Kubernetes", + "Database", }); internal_static_google_cloud_securitycenter_v1_Finding_SourcePropertiesEntry_descriptor = internal_static_google_cloud_securitycenter_v1_Finding_descriptor.getNestedTypes().get(0); @@ -242,6 +247,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.cloud.securitycenter.v1.ConnectionProto.getDescriptor(); com.google.cloud.securitycenter.v1.ContactDetailsProto.getDescriptor(); com.google.cloud.securitycenter.v1.ContainerProto.getDescriptor(); + com.google.cloud.securitycenter.v1.DatabaseProto.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/proto/google/cloud/securitycenter/v1/database.proto b/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/database.proto new file mode 100644 index 000000000..276b31004 --- /dev/null +++ b/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/database.proto @@ -0,0 +1,52 @@ +// 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 = "DatabaseProto"; +option java_package = "com.google.cloud.securitycenter.v1"; +option php_namespace = "Google\\Cloud\\SecurityCenter\\V1"; +option ruby_package = "Google::Cloud::SecurityCenter::V1"; + +// Represents database access information, such as queries. +// A database may be a sub-resource of an instance (as in the case of CloudSQL +// instances or Cloud Spanner instances), or the database instance itself. +// Some database resources may not have the full resource name populated +// because these resource types are not yet supported by Cloud Asset Inventory +// (e.g. CloudSQL databases). In these cases only the display name will be +// provided. +message Database { + // The full resource name of the database the user connected to, if it is + // supported by CAI. (https://google.aip.dev/122#full-resource-names) + string name = 1; + + // The human readable name of the database the user connected to. + string display_name = 2; + + // The username used to connect to the DB. This may not necessarily be an IAM + // principal, and has no required format. + string user_name = 3; + + // The SQL statement associated with the relevant access. + string query = 4; + + // The target usernames/roles/groups of a SQL privilege grant (not an IAM + // policy change). + repeated string grantees = 5; +} 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 6c6043b5b..8fbd9421f 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 @@ -23,6 +23,7 @@ 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/container.proto"; +import "google/cloud/securitycenter/v1/database.proto"; import "google/cloud/securitycenter/v1/exfiltration.proto"; import "google/cloud/securitycenter/v1/external_system.proto"; import "google/cloud/securitycenter/v1/iam_binding.proto"; @@ -257,11 +258,13 @@ 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 @@ -283,9 +286,9 @@ 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: + // 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 // // { @@ -300,7 +303,8 @@ message Finding { // ] // } // } - map contacts = 33 [(google.api.field_behavior) = OUTPUT_ONLY]; + map contacts = 33 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Contains compliance information for security standards associated to the // finding. @@ -324,4 +328,7 @@ message Finding { // Kubernetes resources associated with the finding. Kubernetes kubernetes = 43; + + // Database associated with the finding. + Database database = 44; }