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 eacc92718..160593bc2 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 @@ -298,6 +298,7 @@ public void createFindingTest() throws Exception { .setVulnerability(Vulnerability.newBuilder().build()) .setMuteUpdateTime(Timestamp.newBuilder().build()) .putAllExternalSystems(new HashMap()) + .setAccess(Access.newBuilder().build()) .setMuteInitiator("muteInitiator1395645462") .build(); mockSecurityCenter.addResponse(expectedResponse); @@ -359,6 +360,7 @@ public void createFindingTest2() throws Exception { .setVulnerability(Vulnerability.newBuilder().build()) .setMuteUpdateTime(Timestamp.newBuilder().build()) .putAllExternalSystems(new HashMap()) + .setAccess(Access.newBuilder().build()) .setMuteInitiator("muteInitiator1395645462") .build(); mockSecurityCenter.addResponse(expectedResponse); @@ -2423,6 +2425,7 @@ public void setFindingStateTest() throws Exception { .setVulnerability(Vulnerability.newBuilder().build()) .setMuteUpdateTime(Timestamp.newBuilder().build()) .putAllExternalSystems(new HashMap()) + .setAccess(Access.newBuilder().build()) .setMuteInitiator("muteInitiator1395645462") .build(); mockSecurityCenter.addResponse(expectedResponse); @@ -2486,6 +2489,7 @@ public void setFindingStateTest2() throws Exception { .setVulnerability(Vulnerability.newBuilder().build()) .setMuteUpdateTime(Timestamp.newBuilder().build()) .putAllExternalSystems(new HashMap()) + .setAccess(Access.newBuilder().build()) .setMuteInitiator("muteInitiator1395645462") .build(); mockSecurityCenter.addResponse(expectedResponse); @@ -2547,6 +2551,7 @@ public void setMuteTest() throws Exception { .setVulnerability(Vulnerability.newBuilder().build()) .setMuteUpdateTime(Timestamp.newBuilder().build()) .putAllExternalSystems(new HashMap()) + .setAccess(Access.newBuilder().build()) .setMuteInitiator("muteInitiator1395645462") .build(); mockSecurityCenter.addResponse(expectedResponse); @@ -2607,6 +2612,7 @@ public void setMuteTest2() throws Exception { .setVulnerability(Vulnerability.newBuilder().build()) .setMuteUpdateTime(Timestamp.newBuilder().build()) .putAllExternalSystems(new HashMap()) + .setAccess(Access.newBuilder().build()) .setMuteInitiator("muteInitiator1395645462") .build(); mockSecurityCenter.addResponse(expectedResponse); @@ -2875,6 +2881,7 @@ public void updateFindingTest() throws Exception { .setVulnerability(Vulnerability.newBuilder().build()) .setMuteUpdateTime(Timestamp.newBuilder().build()) .putAllExternalSystems(new HashMap()) + .setAccess(Access.newBuilder().build()) .setMuteInitiator("muteInitiator1395645462") .build(); mockSecurityCenter.addResponse(expectedResponse); diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Access.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Access.java new file mode 100644 index 000000000..acc2ea887 --- /dev/null +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Access.java @@ -0,0 +1,1642 @@ +/* + * 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/access.proto + +package com.google.cloud.securitycenter.v1; + +/** + * + * + *
+ * Represents an access event.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v1.Access} + */ +public final class Access extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.Access) + AccessOrBuilder { + private static final long serialVersionUID = 0L; + // Use Access.newBuilder() to construct. + private Access(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Access() { + principalEmail_ = ""; + callerIp_ = ""; + userAgentFamily_ = ""; + serviceName_ = ""; + methodName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Access(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Access( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + principalEmail_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + callerIp_ = s; + break; + } + case 26: + { + com.google.cloud.securitycenter.v1.Geolocation.Builder subBuilder = null; + if (callerIpGeo_ != null) { + subBuilder = callerIpGeo_.toBuilder(); + } + callerIpGeo_ = + input.readMessage( + com.google.cloud.securitycenter.v1.Geolocation.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(callerIpGeo_); + callerIpGeo_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + userAgentFamily_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + serviceName_ = s; + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + methodName_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.AccessProto + .internal_static_google_cloud_securitycenter_v1_Access_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.AccessProto + .internal_static_google_cloud_securitycenter_v1_Access_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.Access.class, + com.google.cloud.securitycenter.v1.Access.Builder.class); + } + + public static final int PRINCIPAL_EMAIL_FIELD_NUMBER = 1; + private volatile java.lang.Object principalEmail_; + /** + * + * + *
+   * Associated email, such as "foo@google.com".
+   * 
+ * + * string principal_email = 1; + * + * @return The principalEmail. + */ + @java.lang.Override + public java.lang.String getPrincipalEmail() { + java.lang.Object ref = principalEmail_; + 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(); + principalEmail_ = s; + return s; + } + } + /** + * + * + *
+   * Associated email, such as "foo@google.com".
+   * 
+ * + * string principal_email = 1; + * + * @return The bytes for principalEmail. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPrincipalEmailBytes() { + java.lang.Object ref = principalEmail_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + principalEmail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CALLER_IP_FIELD_NUMBER = 2; + private volatile java.lang.Object callerIp_; + /** + * + * + *
+   * Caller's IP address, such as "1.1.1.1".
+   * 
+ * + * string caller_ip = 2; + * + * @return The callerIp. + */ + @java.lang.Override + public java.lang.String getCallerIp() { + java.lang.Object ref = callerIp_; + 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(); + callerIp_ = s; + return s; + } + } + /** + * + * + *
+   * Caller's IP address, such as "1.1.1.1".
+   * 
+ * + * string caller_ip = 2; + * + * @return The bytes for callerIp. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCallerIpBytes() { + java.lang.Object ref = callerIp_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + callerIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CALLER_IP_GEO_FIELD_NUMBER = 3; + private com.google.cloud.securitycenter.v1.Geolocation callerIpGeo_; + /** + * + * + *
+   * The caller IP's geolocation, which identifies where the call came from.
+   * 
+ * + * .google.cloud.securitycenter.v1.Geolocation caller_ip_geo = 3; + * + * @return Whether the callerIpGeo field is set. + */ + @java.lang.Override + public boolean hasCallerIpGeo() { + return callerIpGeo_ != null; + } + /** + * + * + *
+   * The caller IP's geolocation, which identifies where the call came from.
+   * 
+ * + * .google.cloud.securitycenter.v1.Geolocation caller_ip_geo = 3; + * + * @return The callerIpGeo. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.Geolocation getCallerIpGeo() { + return callerIpGeo_ == null + ? com.google.cloud.securitycenter.v1.Geolocation.getDefaultInstance() + : callerIpGeo_; + } + /** + * + * + *
+   * The caller IP's geolocation, which identifies where the call came from.
+   * 
+ * + * .google.cloud.securitycenter.v1.Geolocation caller_ip_geo = 3; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.GeolocationOrBuilder getCallerIpGeoOrBuilder() { + return getCallerIpGeo(); + } + + public static final int USER_AGENT_FAMILY_FIELD_NUMBER = 4; + private volatile java.lang.Object userAgentFamily_; + /** + * + * + *
+   * What kind of user agent is associated, e.g. operating system shells,
+   * embedded or stand-alone applications, etc.
+   * 
+ * + * string user_agent_family = 4; + * + * @return The userAgentFamily. + */ + @java.lang.Override + public java.lang.String getUserAgentFamily() { + java.lang.Object ref = userAgentFamily_; + 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(); + userAgentFamily_ = s; + return s; + } + } + /** + * + * + *
+   * What kind of user agent is associated, e.g. operating system shells,
+   * embedded or stand-alone applications, etc.
+   * 
+ * + * string user_agent_family = 4; + * + * @return The bytes for userAgentFamily. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUserAgentFamilyBytes() { + java.lang.Object ref = userAgentFamily_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userAgentFamily_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICE_NAME_FIELD_NUMBER = 5; + private volatile java.lang.Object serviceName_; + /** + * + * + *
+   * This is the API service that the service account made a call to, e.g.
+   * "iam.googleapis.com"
+   * 
+ * + * string service_name = 5; + * + * @return The serviceName. + */ + @java.lang.Override + public java.lang.String getServiceName() { + java.lang.Object ref = serviceName_; + 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(); + serviceName_ = s; + return s; + } + } + /** + * + * + *
+   * This is the API service that the service account made a call to, e.g.
+   * "iam.googleapis.com"
+   * 
+ * + * string service_name = 5; + * + * @return The bytes for serviceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceNameBytes() { + java.lang.Object ref = serviceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METHOD_NAME_FIELD_NUMBER = 6; + private volatile java.lang.Object methodName_; + /** + * + * + *
+   * The method that the service account called, e.g. "SetIamPolicy".
+   * 
+ * + * string method_name = 6; + * + * @return The methodName. + */ + @java.lang.Override + public java.lang.String getMethodName() { + java.lang.Object ref = methodName_; + 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(); + methodName_ = s; + return s; + } + } + /** + * + * + *
+   * The method that the service account called, e.g. "SetIamPolicy".
+   * 
+ * + * string method_name = 6; + * + * @return The bytes for methodName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMethodNameBytes() { + java.lang.Object ref = methodName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + methodName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(principalEmail_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, principalEmail_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(callerIp_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, callerIp_); + } + if (callerIpGeo_ != null) { + output.writeMessage(3, getCallerIpGeo()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userAgentFamily_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, userAgentFamily_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, serviceName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(methodName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, methodName_); + } + 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(principalEmail_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, principalEmail_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(callerIp_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, callerIp_); + } + if (callerIpGeo_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCallerIpGeo()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userAgentFamily_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, userAgentFamily_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, serviceName_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(methodName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, methodName_); + } + 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.Access)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v1.Access other = + (com.google.cloud.securitycenter.v1.Access) obj; + + if (!getPrincipalEmail().equals(other.getPrincipalEmail())) return false; + if (!getCallerIp().equals(other.getCallerIp())) return false; + if (hasCallerIpGeo() != other.hasCallerIpGeo()) return false; + if (hasCallerIpGeo()) { + if (!getCallerIpGeo().equals(other.getCallerIpGeo())) return false; + } + if (!getUserAgentFamily().equals(other.getUserAgentFamily())) return false; + if (!getServiceName().equals(other.getServiceName())) return false; + if (!getMethodName().equals(other.getMethodName())) 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) + PRINCIPAL_EMAIL_FIELD_NUMBER; + hash = (53 * hash) + getPrincipalEmail().hashCode(); + hash = (37 * hash) + CALLER_IP_FIELD_NUMBER; + hash = (53 * hash) + getCallerIp().hashCode(); + if (hasCallerIpGeo()) { + hash = (37 * hash) + CALLER_IP_GEO_FIELD_NUMBER; + hash = (53 * hash) + getCallerIpGeo().hashCode(); + } + hash = (37 * hash) + USER_AGENT_FAMILY_FIELD_NUMBER; + hash = (53 * hash) + getUserAgentFamily().hashCode(); + hash = (37 * hash) + SERVICE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getServiceName().hashCode(); + hash = (37 * hash) + METHOD_NAME_FIELD_NUMBER; + hash = (53 * hash) + getMethodName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v1.Access parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.Access 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.Access parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.Access 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.Access parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.Access 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.Access parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.Access 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.Access parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.Access 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.Access 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.Access 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.Access 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 an access event.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v1.Access} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.Access) + com.google.cloud.securitycenter.v1.AccessOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.AccessProto + .internal_static_google_cloud_securitycenter_v1_Access_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.AccessProto + .internal_static_google_cloud_securitycenter_v1_Access_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.Access.class, + com.google.cloud.securitycenter.v1.Access.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v1.Access.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(); + principalEmail_ = ""; + + callerIp_ = ""; + + if (callerIpGeoBuilder_ == null) { + callerIpGeo_ = null; + } else { + callerIpGeo_ = null; + callerIpGeoBuilder_ = null; + } + userAgentFamily_ = ""; + + serviceName_ = ""; + + methodName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v1.AccessProto + .internal_static_google_cloud_securitycenter_v1_Access_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.Access getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v1.Access.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.Access build() { + com.google.cloud.securitycenter.v1.Access result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.Access buildPartial() { + com.google.cloud.securitycenter.v1.Access result = + new com.google.cloud.securitycenter.v1.Access(this); + result.principalEmail_ = principalEmail_; + result.callerIp_ = callerIp_; + if (callerIpGeoBuilder_ == null) { + result.callerIpGeo_ = callerIpGeo_; + } else { + result.callerIpGeo_ = callerIpGeoBuilder_.build(); + } + result.userAgentFamily_ = userAgentFamily_; + result.serviceName_ = serviceName_; + result.methodName_ = methodName_; + 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.Access) { + return mergeFrom((com.google.cloud.securitycenter.v1.Access) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v1.Access other) { + if (other == com.google.cloud.securitycenter.v1.Access.getDefaultInstance()) return this; + if (!other.getPrincipalEmail().isEmpty()) { + principalEmail_ = other.principalEmail_; + onChanged(); + } + if (!other.getCallerIp().isEmpty()) { + callerIp_ = other.callerIp_; + onChanged(); + } + if (other.hasCallerIpGeo()) { + mergeCallerIpGeo(other.getCallerIpGeo()); + } + if (!other.getUserAgentFamily().isEmpty()) { + userAgentFamily_ = other.userAgentFamily_; + onChanged(); + } + if (!other.getServiceName().isEmpty()) { + serviceName_ = other.serviceName_; + onChanged(); + } + if (!other.getMethodName().isEmpty()) { + methodName_ = other.methodName_; + 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.Access parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.securitycenter.v1.Access) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object principalEmail_ = ""; + /** + * + * + *
+     * Associated email, such as "foo@google.com".
+     * 
+ * + * string principal_email = 1; + * + * @return The principalEmail. + */ + public java.lang.String getPrincipalEmail() { + java.lang.Object ref = principalEmail_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + principalEmail_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Associated email, such as "foo@google.com".
+     * 
+ * + * string principal_email = 1; + * + * @return The bytes for principalEmail. + */ + public com.google.protobuf.ByteString getPrincipalEmailBytes() { + java.lang.Object ref = principalEmail_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + principalEmail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Associated email, such as "foo@google.com".
+     * 
+ * + * string principal_email = 1; + * + * @param value The principalEmail to set. + * @return This builder for chaining. + */ + public Builder setPrincipalEmail(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + principalEmail_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Associated email, such as "foo@google.com".
+     * 
+ * + * string principal_email = 1; + * + * @return This builder for chaining. + */ + public Builder clearPrincipalEmail() { + + principalEmail_ = getDefaultInstance().getPrincipalEmail(); + onChanged(); + return this; + } + /** + * + * + *
+     * Associated email, such as "foo@google.com".
+     * 
+ * + * string principal_email = 1; + * + * @param value The bytes for principalEmail to set. + * @return This builder for chaining. + */ + public Builder setPrincipalEmailBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + principalEmail_ = value; + onChanged(); + return this; + } + + private java.lang.Object callerIp_ = ""; + /** + * + * + *
+     * Caller's IP address, such as "1.1.1.1".
+     * 
+ * + * string caller_ip = 2; + * + * @return The callerIp. + */ + public java.lang.String getCallerIp() { + java.lang.Object ref = callerIp_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + callerIp_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Caller's IP address, such as "1.1.1.1".
+     * 
+ * + * string caller_ip = 2; + * + * @return The bytes for callerIp. + */ + public com.google.protobuf.ByteString getCallerIpBytes() { + java.lang.Object ref = callerIp_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + callerIp_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Caller's IP address, such as "1.1.1.1".
+     * 
+ * + * string caller_ip = 2; + * + * @param value The callerIp to set. + * @return This builder for chaining. + */ + public Builder setCallerIp(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + callerIp_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Caller's IP address, such as "1.1.1.1".
+     * 
+ * + * string caller_ip = 2; + * + * @return This builder for chaining. + */ + public Builder clearCallerIp() { + + callerIp_ = getDefaultInstance().getCallerIp(); + onChanged(); + return this; + } + /** + * + * + *
+     * Caller's IP address, such as "1.1.1.1".
+     * 
+ * + * string caller_ip = 2; + * + * @param value The bytes for callerIp to set. + * @return This builder for chaining. + */ + public Builder setCallerIpBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + callerIp_ = value; + onChanged(); + return this; + } + + private com.google.cloud.securitycenter.v1.Geolocation callerIpGeo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v1.Geolocation, + com.google.cloud.securitycenter.v1.Geolocation.Builder, + com.google.cloud.securitycenter.v1.GeolocationOrBuilder> + callerIpGeoBuilder_; + /** + * + * + *
+     * The caller IP's geolocation, which identifies where the call came from.
+     * 
+ * + * .google.cloud.securitycenter.v1.Geolocation caller_ip_geo = 3; + * + * @return Whether the callerIpGeo field is set. + */ + public boolean hasCallerIpGeo() { + return callerIpGeoBuilder_ != null || callerIpGeo_ != null; + } + /** + * + * + *
+     * The caller IP's geolocation, which identifies where the call came from.
+     * 
+ * + * .google.cloud.securitycenter.v1.Geolocation caller_ip_geo = 3; + * + * @return The callerIpGeo. + */ + public com.google.cloud.securitycenter.v1.Geolocation getCallerIpGeo() { + if (callerIpGeoBuilder_ == null) { + return callerIpGeo_ == null + ? com.google.cloud.securitycenter.v1.Geolocation.getDefaultInstance() + : callerIpGeo_; + } else { + return callerIpGeoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The caller IP's geolocation, which identifies where the call came from.
+     * 
+ * + * .google.cloud.securitycenter.v1.Geolocation caller_ip_geo = 3; + */ + public Builder setCallerIpGeo(com.google.cloud.securitycenter.v1.Geolocation value) { + if (callerIpGeoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + callerIpGeo_ = value; + onChanged(); + } else { + callerIpGeoBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The caller IP's geolocation, which identifies where the call came from.
+     * 
+ * + * .google.cloud.securitycenter.v1.Geolocation caller_ip_geo = 3; + */ + public Builder setCallerIpGeo( + com.google.cloud.securitycenter.v1.Geolocation.Builder builderForValue) { + if (callerIpGeoBuilder_ == null) { + callerIpGeo_ = builderForValue.build(); + onChanged(); + } else { + callerIpGeoBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The caller IP's geolocation, which identifies where the call came from.
+     * 
+ * + * .google.cloud.securitycenter.v1.Geolocation caller_ip_geo = 3; + */ + public Builder mergeCallerIpGeo(com.google.cloud.securitycenter.v1.Geolocation value) { + if (callerIpGeoBuilder_ == null) { + if (callerIpGeo_ != null) { + callerIpGeo_ = + com.google.cloud.securitycenter.v1.Geolocation.newBuilder(callerIpGeo_) + .mergeFrom(value) + .buildPartial(); + } else { + callerIpGeo_ = value; + } + onChanged(); + } else { + callerIpGeoBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The caller IP's geolocation, which identifies where the call came from.
+     * 
+ * + * .google.cloud.securitycenter.v1.Geolocation caller_ip_geo = 3; + */ + public Builder clearCallerIpGeo() { + if (callerIpGeoBuilder_ == null) { + callerIpGeo_ = null; + onChanged(); + } else { + callerIpGeo_ = null; + callerIpGeoBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The caller IP's geolocation, which identifies where the call came from.
+     * 
+ * + * .google.cloud.securitycenter.v1.Geolocation caller_ip_geo = 3; + */ + public com.google.cloud.securitycenter.v1.Geolocation.Builder getCallerIpGeoBuilder() { + + onChanged(); + return getCallerIpGeoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The caller IP's geolocation, which identifies where the call came from.
+     * 
+ * + * .google.cloud.securitycenter.v1.Geolocation caller_ip_geo = 3; + */ + public com.google.cloud.securitycenter.v1.GeolocationOrBuilder getCallerIpGeoOrBuilder() { + if (callerIpGeoBuilder_ != null) { + return callerIpGeoBuilder_.getMessageOrBuilder(); + } else { + return callerIpGeo_ == null + ? com.google.cloud.securitycenter.v1.Geolocation.getDefaultInstance() + : callerIpGeo_; + } + } + /** + * + * + *
+     * The caller IP's geolocation, which identifies where the call came from.
+     * 
+ * + * .google.cloud.securitycenter.v1.Geolocation caller_ip_geo = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v1.Geolocation, + com.google.cloud.securitycenter.v1.Geolocation.Builder, + com.google.cloud.securitycenter.v1.GeolocationOrBuilder> + getCallerIpGeoFieldBuilder() { + if (callerIpGeoBuilder_ == null) { + callerIpGeoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v1.Geolocation, + com.google.cloud.securitycenter.v1.Geolocation.Builder, + com.google.cloud.securitycenter.v1.GeolocationOrBuilder>( + getCallerIpGeo(), getParentForChildren(), isClean()); + callerIpGeo_ = null; + } + return callerIpGeoBuilder_; + } + + private java.lang.Object userAgentFamily_ = ""; + /** + * + * + *
+     * What kind of user agent is associated, e.g. operating system shells,
+     * embedded or stand-alone applications, etc.
+     * 
+ * + * string user_agent_family = 4; + * + * @return The userAgentFamily. + */ + public java.lang.String getUserAgentFamily() { + java.lang.Object ref = userAgentFamily_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + userAgentFamily_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * What kind of user agent is associated, e.g. operating system shells,
+     * embedded or stand-alone applications, etc.
+     * 
+ * + * string user_agent_family = 4; + * + * @return The bytes for userAgentFamily. + */ + public com.google.protobuf.ByteString getUserAgentFamilyBytes() { + java.lang.Object ref = userAgentFamily_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + userAgentFamily_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * What kind of user agent is associated, e.g. operating system shells,
+     * embedded or stand-alone applications, etc.
+     * 
+ * + * string user_agent_family = 4; + * + * @param value The userAgentFamily to set. + * @return This builder for chaining. + */ + public Builder setUserAgentFamily(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + userAgentFamily_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * What kind of user agent is associated, e.g. operating system shells,
+     * embedded or stand-alone applications, etc.
+     * 
+ * + * string user_agent_family = 4; + * + * @return This builder for chaining. + */ + public Builder clearUserAgentFamily() { + + userAgentFamily_ = getDefaultInstance().getUserAgentFamily(); + onChanged(); + return this; + } + /** + * + * + *
+     * What kind of user agent is associated, e.g. operating system shells,
+     * embedded or stand-alone applications, etc.
+     * 
+ * + * string user_agent_family = 4; + * + * @param value The bytes for userAgentFamily to set. + * @return This builder for chaining. + */ + public Builder setUserAgentFamilyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + userAgentFamily_ = value; + onChanged(); + return this; + } + + private java.lang.Object serviceName_ = ""; + /** + * + * + *
+     * This is the API service that the service account made a call to, e.g.
+     * "iam.googleapis.com"
+     * 
+ * + * string service_name = 5; + * + * @return The serviceName. + */ + public java.lang.String getServiceName() { + java.lang.Object ref = serviceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * This is the API service that the service account made a call to, e.g.
+     * "iam.googleapis.com"
+     * 
+ * + * string service_name = 5; + * + * @return The bytes for serviceName. + */ + public com.google.protobuf.ByteString getServiceNameBytes() { + java.lang.Object ref = serviceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * This is the API service that the service account made a call to, e.g.
+     * "iam.googleapis.com"
+     * 
+ * + * string service_name = 5; + * + * @param value The serviceName to set. + * @return This builder for chaining. + */ + public Builder setServiceName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + serviceName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * This is the API service that the service account made a call to, e.g.
+     * "iam.googleapis.com"
+     * 
+ * + * string service_name = 5; + * + * @return This builder for chaining. + */ + public Builder clearServiceName() { + + serviceName_ = getDefaultInstance().getServiceName(); + onChanged(); + return this; + } + /** + * + * + *
+     * This is the API service that the service account made a call to, e.g.
+     * "iam.googleapis.com"
+     * 
+ * + * string service_name = 5; + * + * @param value The bytes for serviceName to set. + * @return This builder for chaining. + */ + public Builder setServiceNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + serviceName_ = value; + onChanged(); + return this; + } + + private java.lang.Object methodName_ = ""; + /** + * + * + *
+     * The method that the service account called, e.g. "SetIamPolicy".
+     * 
+ * + * string method_name = 6; + * + * @return The methodName. + */ + public java.lang.String getMethodName() { + java.lang.Object ref = methodName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + methodName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The method that the service account called, e.g. "SetIamPolicy".
+     * 
+ * + * string method_name = 6; + * + * @return The bytes for methodName. + */ + public com.google.protobuf.ByteString getMethodNameBytes() { + java.lang.Object ref = methodName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + methodName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The method that the service account called, e.g. "SetIamPolicy".
+     * 
+ * + * string method_name = 6; + * + * @param value The methodName to set. + * @return This builder for chaining. + */ + public Builder setMethodName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + methodName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The method that the service account called, e.g. "SetIamPolicy".
+     * 
+ * + * string method_name = 6; + * + * @return This builder for chaining. + */ + public Builder clearMethodName() { + + methodName_ = getDefaultInstance().getMethodName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The method that the service account called, e.g. "SetIamPolicy".
+     * 
+ * + * string method_name = 6; + * + * @param value The bytes for methodName to set. + * @return This builder for chaining. + */ + public Builder setMethodNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + methodName_ = 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.Access) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.Access) + private static final com.google.cloud.securitycenter.v1.Access DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.Access(); + } + + public static com.google.cloud.securitycenter.v1.Access getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Access parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Access(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.Access getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/AccessOrBuilder.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/AccessOrBuilder.java new file mode 100644 index 000000000..d30c7599c --- /dev/null +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/AccessOrBuilder.java @@ -0,0 +1,189 @@ +/* + * 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/access.proto + +package com.google.cloud.securitycenter.v1; + +public interface AccessOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.Access) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Associated email, such as "foo@google.com".
+   * 
+ * + * string principal_email = 1; + * + * @return The principalEmail. + */ + java.lang.String getPrincipalEmail(); + /** + * + * + *
+   * Associated email, such as "foo@google.com".
+   * 
+ * + * string principal_email = 1; + * + * @return The bytes for principalEmail. + */ + com.google.protobuf.ByteString getPrincipalEmailBytes(); + + /** + * + * + *
+   * Caller's IP address, such as "1.1.1.1".
+   * 
+ * + * string caller_ip = 2; + * + * @return The callerIp. + */ + java.lang.String getCallerIp(); + /** + * + * + *
+   * Caller's IP address, such as "1.1.1.1".
+   * 
+ * + * string caller_ip = 2; + * + * @return The bytes for callerIp. + */ + com.google.protobuf.ByteString getCallerIpBytes(); + + /** + * + * + *
+   * The caller IP's geolocation, which identifies where the call came from.
+   * 
+ * + * .google.cloud.securitycenter.v1.Geolocation caller_ip_geo = 3; + * + * @return Whether the callerIpGeo field is set. + */ + boolean hasCallerIpGeo(); + /** + * + * + *
+   * The caller IP's geolocation, which identifies where the call came from.
+   * 
+ * + * .google.cloud.securitycenter.v1.Geolocation caller_ip_geo = 3; + * + * @return The callerIpGeo. + */ + com.google.cloud.securitycenter.v1.Geolocation getCallerIpGeo(); + /** + * + * + *
+   * The caller IP's geolocation, which identifies where the call came from.
+   * 
+ * + * .google.cloud.securitycenter.v1.Geolocation caller_ip_geo = 3; + */ + com.google.cloud.securitycenter.v1.GeolocationOrBuilder getCallerIpGeoOrBuilder(); + + /** + * + * + *
+   * What kind of user agent is associated, e.g. operating system shells,
+   * embedded or stand-alone applications, etc.
+   * 
+ * + * string user_agent_family = 4; + * + * @return The userAgentFamily. + */ + java.lang.String getUserAgentFamily(); + /** + * + * + *
+   * What kind of user agent is associated, e.g. operating system shells,
+   * embedded or stand-alone applications, etc.
+   * 
+ * + * string user_agent_family = 4; + * + * @return The bytes for userAgentFamily. + */ + com.google.protobuf.ByteString getUserAgentFamilyBytes(); + + /** + * + * + *
+   * This is the API service that the service account made a call to, e.g.
+   * "iam.googleapis.com"
+   * 
+ * + * string service_name = 5; + * + * @return The serviceName. + */ + java.lang.String getServiceName(); + /** + * + * + *
+   * This is the API service that the service account made a call to, e.g.
+   * "iam.googleapis.com"
+   * 
+ * + * string service_name = 5; + * + * @return The bytes for serviceName. + */ + com.google.protobuf.ByteString getServiceNameBytes(); + + /** + * + * + *
+   * The method that the service account called, e.g. "SetIamPolicy".
+   * 
+ * + * string method_name = 6; + * + * @return The methodName. + */ + java.lang.String getMethodName(); + /** + * + * + *
+   * The method that the service account called, e.g. "SetIamPolicy".
+   * 
+ * + * string method_name = 6; + * + * @return The bytes for methodName. + */ + com.google.protobuf.ByteString getMethodNameBytes(); +} diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/AccessProto.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/AccessProto.java new file mode 100644 index 000000000..825e49cab --- /dev/null +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/AccessProto.java @@ -0,0 +1,94 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v1/access.proto + +package com.google.cloud.securitycenter.v1; + +public final class AccessProto { + private AccessProto() {} + + 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_Access_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v1_Access_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_securitycenter_v1_Geolocation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_securitycenter_v1_Geolocation_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/access." + + "proto\022\036google.cloud.securitycenter.v1\032\034g" + + "oogle/api/annotations.proto\"\276\001\n\006Access\022\027" + + "\n\017principal_email\030\001 \001(\t\022\021\n\tcaller_ip\030\002 \001" + + "(\t\022B\n\rcaller_ip_geo\030\003 \001(\0132+.google.cloud" + + ".securitycenter.v1.Geolocation\022\031\n\021user_a" + + "gent_family\030\004 \001(\t\022\024\n\014service_name\030\005 \001(\t\022" + + "\023\n\013method_name\030\006 \001(\t\"\"\n\013Geolocation\022\023\n\013r" + + "egion_code\030\001 \001(\tB\347\001\n\"com.google.cloud.se" + + "curitycenter.v1B\013AccessProtoP\001ZLgoogle.g" + + "olang.org/genproto/googleapis/cloud/secu" + + "ritycenter/v1;securitycenter\252\002\036Google.Cl" + + "oud.SecurityCenter.V1\312\002\036Google\\Cloud\\Sec" + + "urityCenter\\V1\352\002!Google::Cloud::Security" + + "Center::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_securitycenter_v1_Access_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_securitycenter_v1_Access_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v1_Access_descriptor, + new java.lang.String[] { + "PrincipalEmail", + "CallerIp", + "CallerIpGeo", + "UserAgentFamily", + "ServiceName", + "MethodName", + }); + internal_static_google_cloud_securitycenter_v1_Geolocation_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_securitycenter_v1_Geolocation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_securitycenter_v1_Geolocation_descriptor, + new java.lang.String[] { + "RegionCode", + }); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@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 7f578034c..17d53e2ff 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 @@ -286,6 +286,22 @@ private Finding( .put(externalSystems__.getKey(), externalSystems__.getValue()); break; } + case 210: + { + com.google.cloud.securitycenter.v1.Access.Builder subBuilder = null; + if (access_ != null) { + subBuilder = access_.toBuilder(); + } + access_ = + input.readMessage( + com.google.cloud.securitycenter.v1.Access.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(access_); + access_ = subBuilder.buildPartial(); + } + + break; + } case 226: { java.lang.String s = input.readStringRequireUtf8(); @@ -1655,11 +1671,12 @@ public com.google.cloud.securitycenter.v1.SecurityMarksOrBuilder getSecurityMark * * *
-   * The time at which the event took place, or when an update to the finding
-   * occurred. For example, if the finding represents an open firewall it would
-   * capture the time the detector believes the firewall became open. The
-   * accuracy is determined by the detector. If the finding were to be resolved
-   * afterward, this time would reflect when the finding was resolved. Must not
+   * The time the finding was first detected. If an existing finding is updated,
+   * then this is the time the update occurred.
+   * For example, if the finding represents an open firewall, this property
+   * captures the time the detector believes the firewall became open. The
+   * accuracy is determined by the detector. If the finding is later resolved,
+   * then this time reflects when the finding was resolved. This must not
    * be set to a value greater than the current timestamp.
    * 
* @@ -1675,11 +1692,12 @@ public boolean hasEventTime() { * * *
-   * The time at which the event took place, or when an update to the finding
-   * occurred. For example, if the finding represents an open firewall it would
-   * capture the time the detector believes the firewall became open. The
-   * accuracy is determined by the detector. If the finding were to be resolved
-   * afterward, this time would reflect when the finding was resolved. Must not
+   * The time the finding was first detected. If an existing finding is updated,
+   * then this is the time the update occurred.
+   * For example, if the finding represents an open firewall, this property
+   * captures the time the detector believes the firewall became open. The
+   * accuracy is determined by the detector. If the finding is later resolved,
+   * then this time reflects when the finding was resolved. This must not
    * be set to a value greater than the current timestamp.
    * 
* @@ -1695,11 +1713,12 @@ public com.google.protobuf.Timestamp getEventTime() { * * *
-   * The time at which the event took place, or when an update to the finding
-   * occurred. For example, if the finding represents an open firewall it would
-   * capture the time the detector believes the firewall became open. The
-   * accuracy is determined by the detector. If the finding were to be resolved
-   * afterward, this time would reflect when the finding was resolved. Must not
+   * The time the finding was first detected. If an existing finding is updated,
+   * then this is the time the update occurred.
+   * For example, if the finding represents an open firewall, this property
+   * captures the time the detector believes the firewall became open. The
+   * accuracy is determined by the detector. If the finding is later resolved,
+   * then this time reflects when the finding was resolved. This must not
    * be set to a value greater than the current timestamp.
    * 
* @@ -2224,6 +2243,57 @@ public com.google.cloud.securitycenter.v1.ExternalSystem getExternalSystemsOrThr return map.get(key); } + public static final int ACCESS_FIELD_NUMBER = 26; + private com.google.cloud.securitycenter.v1.Access access_; + /** + * + * + *
+   * Access details associated to the Finding, such as more information on the
+   * caller, which method was accessed, from where, etc.
+   * 
+ * + * .google.cloud.securitycenter.v1.Access access = 26; + * + * @return Whether the access field is set. + */ + @java.lang.Override + public boolean hasAccess() { + return access_ != null; + } + /** + * + * + *
+   * Access details associated to the Finding, such as more information on the
+   * caller, which method was accessed, from where, etc.
+   * 
+ * + * .google.cloud.securitycenter.v1.Access access = 26; + * + * @return The access. + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.Access getAccess() { + return access_ == null + ? com.google.cloud.securitycenter.v1.Access.getDefaultInstance() + : access_; + } + /** + * + * + *
+   * Access details associated to the Finding, such as more information on the
+   * caller, which method was accessed, from where, etc.
+   * 
+ * + * .google.cloud.securitycenter.v1.Access access = 26; + */ + @java.lang.Override + public com.google.cloud.securitycenter.v1.AccessOrBuilder getAccessOrBuilder() { + return getAccess(); + } + public static final int MUTE_INITIATOR_FIELD_NUMBER = 28; private volatile java.lang.Object muteInitiator_; /** @@ -2346,6 +2416,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetExternalSystems(), ExternalSystemsDefaultEntryHolder.defaultEntry, 22); + if (access_ != null) { + output.writeMessage(26, getAccess()); + } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(muteInitiator_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 28, muteInitiator_); } @@ -2431,6 +2504,9 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(22, externalSystems__); } + if (access_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(26, getAccess()); + } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(muteInitiator_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(28, muteInitiator_); } @@ -2486,6 +2562,10 @@ public boolean equals(final java.lang.Object obj) { if (!getMuteUpdateTime().equals(other.getMuteUpdateTime())) return false; } if (!internalGetExternalSystems().equals(other.internalGetExternalSystems())) return false; + if (hasAccess() != other.hasAccess()) return false; + if (hasAccess()) { + if (!getAccess().equals(other.getAccess())) return false; + } if (!getMuteInitiator().equals(other.getMuteInitiator())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; @@ -2550,6 +2630,10 @@ public int hashCode() { hash = (37 * hash) + EXTERNAL_SYSTEMS_FIELD_NUMBER; hash = (53 * hash) + internalGetExternalSystems().hashCode(); } + if (hasAccess()) { + hash = (37 * hash) + ACCESS_FIELD_NUMBER; + hash = (53 * hash) + getAccess().hashCode(); + } hash = (37 * hash) + MUTE_INITIATOR_FIELD_NUMBER; hash = (53 * hash) + getMuteInitiator().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); @@ -2784,6 +2868,12 @@ public Builder clear() { muteUpdateTimeBuilder_ = null; } internalGetMutableExternalSystems().clear(); + if (accessBuilder_ == null) { + access_ = null; + } else { + access_ = null; + accessBuilder_ = null; + } muteInitiator_ = ""; return this; @@ -2858,6 +2948,11 @@ public com.google.cloud.securitycenter.v1.Finding buildPartial() { } result.externalSystems_ = internalGetExternalSystems(); result.externalSystems_.makeImmutable(); + if (accessBuilder_ == null) { + result.access_ = access_; + } else { + result.access_ = accessBuilder_.build(); + } result.muteInitiator_ = muteInitiator_; onBuilt(); return result; @@ -2964,6 +3059,9 @@ public Builder mergeFrom(com.google.cloud.securitycenter.v1.Finding other) { mergeMuteUpdateTime(other.getMuteUpdateTime()); } internalGetMutableExternalSystems().mergeFrom(other.internalGetExternalSystems()); + if (other.hasAccess()) { + mergeAccess(other.getAccess()); + } if (!other.getMuteInitiator().isEmpty()) { muteInitiator_ = other.muteInitiator_; onChanged(); @@ -4120,11 +4218,12 @@ public com.google.cloud.securitycenter.v1.SecurityMarksOrBuilder getSecurityMark * * *
-     * The time at which the event took place, or when an update to the finding
-     * occurred. For example, if the finding represents an open firewall it would
-     * capture the time the detector believes the firewall became open. The
-     * accuracy is determined by the detector. If the finding were to be resolved
-     * afterward, this time would reflect when the finding was resolved. Must not
+     * The time the finding was first detected. If an existing finding is updated,
+     * then this is the time the update occurred.
+     * For example, if the finding represents an open firewall, this property
+     * captures the time the detector believes the firewall became open. The
+     * accuracy is determined by the detector. If the finding is later resolved,
+     * then this time reflects when the finding was resolved. This must not
      * be set to a value greater than the current timestamp.
      * 
* @@ -4139,11 +4238,12 @@ public boolean hasEventTime() { * * *
-     * The time at which the event took place, or when an update to the finding
-     * occurred. For example, if the finding represents an open firewall it would
-     * capture the time the detector believes the firewall became open. The
-     * accuracy is determined by the detector. If the finding were to be resolved
-     * afterward, this time would reflect when the finding was resolved. Must not
+     * The time the finding was first detected. If an existing finding is updated,
+     * then this is the time the update occurred.
+     * For example, if the finding represents an open firewall, this property
+     * captures the time the detector believes the firewall became open. The
+     * accuracy is determined by the detector. If the finding is later resolved,
+     * then this time reflects when the finding was resolved. This must not
      * be set to a value greater than the current timestamp.
      * 
* @@ -4162,11 +4262,12 @@ public com.google.protobuf.Timestamp getEventTime() { * * *
-     * The time at which the event took place, or when an update to the finding
-     * occurred. For example, if the finding represents an open firewall it would
-     * capture the time the detector believes the firewall became open. The
-     * accuracy is determined by the detector. If the finding were to be resolved
-     * afterward, this time would reflect when the finding was resolved. Must not
+     * The time the finding was first detected. If an existing finding is updated,
+     * then this is the time the update occurred.
+     * For example, if the finding represents an open firewall, this property
+     * captures the time the detector believes the firewall became open. The
+     * accuracy is determined by the detector. If the finding is later resolved,
+     * then this time reflects when the finding was resolved. This must not
      * be set to a value greater than the current timestamp.
      * 
* @@ -4189,11 +4290,12 @@ public Builder setEventTime(com.google.protobuf.Timestamp value) { * * *
-     * The time at which the event took place, or when an update to the finding
-     * occurred. For example, if the finding represents an open firewall it would
-     * capture the time the detector believes the firewall became open. The
-     * accuracy is determined by the detector. If the finding were to be resolved
-     * afterward, this time would reflect when the finding was resolved. Must not
+     * The time the finding was first detected. If an existing finding is updated,
+     * then this is the time the update occurred.
+     * For example, if the finding represents an open firewall, this property
+     * captures the time the detector believes the firewall became open. The
+     * accuracy is determined by the detector. If the finding is later resolved,
+     * then this time reflects when the finding was resolved. This must not
      * be set to a value greater than the current timestamp.
      * 
* @@ -4213,11 +4315,12 @@ public Builder setEventTime(com.google.protobuf.Timestamp.Builder builderForValu * * *
-     * The time at which the event took place, or when an update to the finding
-     * occurred. For example, if the finding represents an open firewall it would
-     * capture the time the detector believes the firewall became open. The
-     * accuracy is determined by the detector. If the finding were to be resolved
-     * afterward, this time would reflect when the finding was resolved. Must not
+     * The time the finding was first detected. If an existing finding is updated,
+     * then this is the time the update occurred.
+     * For example, if the finding represents an open firewall, this property
+     * captures the time the detector believes the firewall became open. The
+     * accuracy is determined by the detector. If the finding is later resolved,
+     * then this time reflects when the finding was resolved. This must not
      * be set to a value greater than the current timestamp.
      * 
* @@ -4242,11 +4345,12 @@ public Builder mergeEventTime(com.google.protobuf.Timestamp value) { * * *
-     * The time at which the event took place, or when an update to the finding
-     * occurred. For example, if the finding represents an open firewall it would
-     * capture the time the detector believes the firewall became open. The
-     * accuracy is determined by the detector. If the finding were to be resolved
-     * afterward, this time would reflect when the finding was resolved. Must not
+     * The time the finding was first detected. If an existing finding is updated,
+     * then this is the time the update occurred.
+     * For example, if the finding represents an open firewall, this property
+     * captures the time the detector believes the firewall became open. The
+     * accuracy is determined by the detector. If the finding is later resolved,
+     * then this time reflects when the finding was resolved. This must not
      * be set to a value greater than the current timestamp.
      * 
* @@ -4267,11 +4371,12 @@ public Builder clearEventTime() { * * *
-     * The time at which the event took place, or when an update to the finding
-     * occurred. For example, if the finding represents an open firewall it would
-     * capture the time the detector believes the firewall became open. The
-     * accuracy is determined by the detector. If the finding were to be resolved
-     * afterward, this time would reflect when the finding was resolved. Must not
+     * The time the finding was first detected. If an existing finding is updated,
+     * then this is the time the update occurred.
+     * For example, if the finding represents an open firewall, this property
+     * captures the time the detector believes the firewall became open. The
+     * accuracy is determined by the detector. If the finding is later resolved,
+     * then this time reflects when the finding was resolved. This must not
      * be set to a value greater than the current timestamp.
      * 
* @@ -4286,11 +4391,12 @@ public com.google.protobuf.Timestamp.Builder getEventTimeBuilder() { * * *
-     * The time at which the event took place, or when an update to the finding
-     * occurred. For example, if the finding represents an open firewall it would
-     * capture the time the detector believes the firewall became open. The
-     * accuracy is determined by the detector. If the finding were to be resolved
-     * afterward, this time would reflect when the finding was resolved. Must not
+     * The time the finding was first detected. If an existing finding is updated,
+     * then this is the time the update occurred.
+     * For example, if the finding represents an open firewall, this property
+     * captures the time the detector believes the firewall became open. The
+     * accuracy is determined by the detector. If the finding is later resolved,
+     * then this time reflects when the finding was resolved. This must not
      * be set to a value greater than the current timestamp.
      * 
* @@ -4307,11 +4413,12 @@ public com.google.protobuf.TimestampOrBuilder getEventTimeOrBuilder() { * * *
-     * The time at which the event took place, or when an update to the finding
-     * occurred. For example, if the finding represents an open firewall it would
-     * capture the time the detector believes the firewall became open. The
-     * accuracy is determined by the detector. If the finding were to be resolved
-     * afterward, this time would reflect when the finding was resolved. Must not
+     * The time the finding was first detected. If an existing finding is updated,
+     * then this is the time the update occurred.
+     * For example, if the finding represents an open firewall, this property
+     * captures the time the detector believes the firewall became open. The
+     * accuracy is determined by the detector. If the finding is later resolved,
+     * then this time reflects when the finding was resolved. This must not
      * be set to a value greater than the current timestamp.
      * 
* @@ -5758,6 +5865,200 @@ public Builder putAllExternalSystems( return this; } + private com.google.cloud.securitycenter.v1.Access access_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v1.Access, + com.google.cloud.securitycenter.v1.Access.Builder, + com.google.cloud.securitycenter.v1.AccessOrBuilder> + accessBuilder_; + /** + * + * + *
+     * Access details associated to the Finding, such as more information on the
+     * caller, which method was accessed, from where, etc.
+     * 
+ * + * .google.cloud.securitycenter.v1.Access access = 26; + * + * @return Whether the access field is set. + */ + public boolean hasAccess() { + return accessBuilder_ != null || access_ != null; + } + /** + * + * + *
+     * Access details associated to the Finding, such as more information on the
+     * caller, which method was accessed, from where, etc.
+     * 
+ * + * .google.cloud.securitycenter.v1.Access access = 26; + * + * @return The access. + */ + public com.google.cloud.securitycenter.v1.Access getAccess() { + if (accessBuilder_ == null) { + return access_ == null + ? com.google.cloud.securitycenter.v1.Access.getDefaultInstance() + : access_; + } else { + return accessBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Access details associated to the Finding, such as more information on the
+     * caller, which method was accessed, from where, etc.
+     * 
+ * + * .google.cloud.securitycenter.v1.Access access = 26; + */ + public Builder setAccess(com.google.cloud.securitycenter.v1.Access value) { + if (accessBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + access_ = value; + onChanged(); + } else { + accessBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Access details associated to the Finding, such as more information on the
+     * caller, which method was accessed, from where, etc.
+     * 
+ * + * .google.cloud.securitycenter.v1.Access access = 26; + */ + public Builder setAccess(com.google.cloud.securitycenter.v1.Access.Builder builderForValue) { + if (accessBuilder_ == null) { + access_ = builderForValue.build(); + onChanged(); + } else { + accessBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Access details associated to the Finding, such as more information on the
+     * caller, which method was accessed, from where, etc.
+     * 
+ * + * .google.cloud.securitycenter.v1.Access access = 26; + */ + public Builder mergeAccess(com.google.cloud.securitycenter.v1.Access value) { + if (accessBuilder_ == null) { + if (access_ != null) { + access_ = + com.google.cloud.securitycenter.v1.Access.newBuilder(access_) + .mergeFrom(value) + .buildPartial(); + } else { + access_ = value; + } + onChanged(); + } else { + accessBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Access details associated to the Finding, such as more information on the
+     * caller, which method was accessed, from where, etc.
+     * 
+ * + * .google.cloud.securitycenter.v1.Access access = 26; + */ + public Builder clearAccess() { + if (accessBuilder_ == null) { + access_ = null; + onChanged(); + } else { + access_ = null; + accessBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Access details associated to the Finding, such as more information on the
+     * caller, which method was accessed, from where, etc.
+     * 
+ * + * .google.cloud.securitycenter.v1.Access access = 26; + */ + public com.google.cloud.securitycenter.v1.Access.Builder getAccessBuilder() { + + onChanged(); + return getAccessFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Access details associated to the Finding, such as more information on the
+     * caller, which method was accessed, from where, etc.
+     * 
+ * + * .google.cloud.securitycenter.v1.Access access = 26; + */ + public com.google.cloud.securitycenter.v1.AccessOrBuilder getAccessOrBuilder() { + if (accessBuilder_ != null) { + return accessBuilder_.getMessageOrBuilder(); + } else { + return access_ == null + ? com.google.cloud.securitycenter.v1.Access.getDefaultInstance() + : access_; + } + } + /** + * + * + *
+     * Access details associated to the Finding, such as more information on the
+     * caller, which method was accessed, from where, etc.
+     * 
+ * + * .google.cloud.securitycenter.v1.Access access = 26; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v1.Access, + com.google.cloud.securitycenter.v1.Access.Builder, + com.google.cloud.securitycenter.v1.AccessOrBuilder> + getAccessFieldBuilder() { + if (accessBuilder_ == null) { + accessBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.securitycenter.v1.Access, + com.google.cloud.securitycenter.v1.Access.Builder, + com.google.cloud.securitycenter.v1.AccessOrBuilder>( + getAccess(), getParentForChildren(), isClean()); + access_ = null; + } + return accessBuilder_; + } + private java.lang.Object muteInitiator_ = ""; /** * 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 6fa251540..206f463c0 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 @@ -326,11 +326,12 @@ com.google.protobuf.Value getSourcePropertiesOrDefault( * * *
-   * The time at which the event took place, or when an update to the finding
-   * occurred. For example, if the finding represents an open firewall it would
-   * capture the time the detector believes the firewall became open. The
-   * accuracy is determined by the detector. If the finding were to be resolved
-   * afterward, this time would reflect when the finding was resolved. Must not
+   * The time the finding was first detected. If an existing finding is updated,
+   * then this is the time the update occurred.
+   * For example, if the finding represents an open firewall, this property
+   * captures the time the detector believes the firewall became open. The
+   * accuracy is determined by the detector. If the finding is later resolved,
+   * then this time reflects when the finding was resolved. This must not
    * be set to a value greater than the current timestamp.
    * 
* @@ -343,11 +344,12 @@ com.google.protobuf.Value getSourcePropertiesOrDefault( * * *
-   * The time at which the event took place, or when an update to the finding
-   * occurred. For example, if the finding represents an open firewall it would
-   * capture the time the detector believes the firewall became open. The
-   * accuracy is determined by the detector. If the finding were to be resolved
-   * afterward, this time would reflect when the finding was resolved. Must not
+   * The time the finding was first detected. If an existing finding is updated,
+   * then this is the time the update occurred.
+   * For example, if the finding represents an open firewall, this property
+   * captures the time the detector believes the firewall became open. The
+   * accuracy is determined by the detector. If the finding is later resolved,
+   * then this time reflects when the finding was resolved. This must not
    * be set to a value greater than the current timestamp.
    * 
* @@ -360,11 +362,12 @@ com.google.protobuf.Value getSourcePropertiesOrDefault( * * *
-   * The time at which the event took place, or when an update to the finding
-   * occurred. For example, if the finding represents an open firewall it would
-   * capture the time the detector believes the firewall became open. The
-   * accuracy is determined by the detector. If the finding were to be resolved
-   * afterward, this time would reflect when the finding was resolved. Must not
+   * The time the finding was first detected. If an existing finding is updated,
+   * then this is the time the update occurred.
+   * For example, if the finding represents an open firewall, this property
+   * captures the time the detector believes the firewall became open. The
+   * accuracy is determined by the detector. If the finding is later resolved,
+   * then this time reflects when the finding was resolved. This must not
    * be set to a value greater than the current timestamp.
    * 
* @@ -722,6 +725,44 @@ com.google.cloud.securitycenter.v1.ExternalSystem getExternalSystemsOrDefault( */ com.google.cloud.securitycenter.v1.ExternalSystem getExternalSystemsOrThrow(java.lang.String key); + /** + * + * + *
+   * Access details associated to the Finding, such as more information on the
+   * caller, which method was accessed, from where, etc.
+   * 
+ * + * .google.cloud.securitycenter.v1.Access access = 26; + * + * @return Whether the access field is set. + */ + boolean hasAccess(); + /** + * + * + *
+   * Access details associated to the Finding, such as more information on the
+   * caller, which method was accessed, from where, etc.
+   * 
+ * + * .google.cloud.securitycenter.v1.Access access = 26; + * + * @return The access. + */ + com.google.cloud.securitycenter.v1.Access getAccess(); + /** + * + * + *
+   * Access details associated to the Finding, such as more information on the
+   * caller, which method was accessed, from where, etc.
+   * 
+ * + * .google.cloud.securitycenter.v1.Access access = 26; + */ + com.google.cloud.securitycenter.v1.AccessOrBuilder getAccessOrBuilder(); + /** * * 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 bb9e4b374..0ff3e0d8a 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 @@ -49,79 +49,82 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { "\n,google/cloud/securitycenter/v1/finding" - + ".proto\022\036google.cloud.securitycenter.v1\032\037" - + "google/api/field_behavior.proto\032\031google/" - + "api/resource.proto\0324google/cloud/securit" - + "ycenter/v1/external_system.proto\032.google" - + "/cloud/securitycenter/v1/indicator.proto" - + "\0323google/cloud/securitycenter/v1/securit" - + "y_marks.proto\0322google/cloud/securitycent" - + "er/v1/vulnerability.proto\032\034google/protob" - + "uf/struct.proto\032\037google/protobuf/timesta" - + "mp.proto\032\034google/api/annotations.proto\"\242" - + "\r\n\007Finding\022\014\n\004name\030\001 \001(\t\022\016\n\006parent\030\002 \001(\t" - + "\022\025\n\rresource_name\030\003 \001(\t\022<\n\005state\030\004 \001(\0162-" - + ".google.cloud.securitycenter.v1.Finding." - + "State\022\020\n\010category\030\005 \001(\t\022\024\n\014external_uri\030" - + "\006 \001(\t\022X\n\021source_properties\030\007 \003(\0132=.googl" - + "e.cloud.securitycenter.v1.Finding.Source" - + "PropertiesEntry\022J\n\016security_marks\030\010 \001(\0132" - + "-.google.cloud.securitycenter.v1.Securit" - + "yMarksB\003\340A\003\022.\n\nevent_time\030\t \001(\0132\032.google" - + ".protobuf.Timestamp\022/\n\013create_time\030\n \001(\013" - + "2\032.google.protobuf.Timestamp\022B\n\010severity" - + "\030\014 \001(\01620.google.cloud.securitycenter.v1." - + "Finding.Severity\022\026\n\016canonical_name\030\016 \001(\t" - + "\022:\n\004mute\030\017 \001(\0162,.google.cloud.securityce" - + "nter.v1.Finding.Mute\022K\n\rfinding_class\030\021 " - + "\001(\01624.google.cloud.securitycenter.v1.Fin" - + "ding.FindingClass\022<\n\tindicator\030\022 \001(\0132).g" - + "oogle.cloud.securitycenter.v1.Indicator\022" - + "D\n\rvulnerability\030\024 \001(\0132-.google.cloud.se" - + "curitycenter.v1.Vulnerability\0229\n\020mute_up" - + "date_time\030\025 \001(\0132\032.google.protobuf.Timest" - + "ampB\003\340A\003\022[\n\020external_systems\030\026 \003(\0132<.goo" - + "gle.cloud.securitycenter.v1.Finding.Exte" - + "rnalSystemsEntryB\003\340A\003\022\026\n\016mute_initiator\030" - + "\034 \001(\t\032O\n\025SourcePropertiesEntry\022\013\n\003key\030\001 " - + "\001(\t\022%\n\005value\030\002 \001(\0132\026.google.protobuf.Val" - + "ue:\0028\001\032f\n\024ExternalSystemsEntry\022\013\n\003key\030\001 " - + "\001(\t\022=\n\005value\030\002 \001(\0132..google.cloud.securi" - + "tycenter.v1.ExternalSystem:\0028\001\"8\n\005State\022" - + "\025\n\021STATE_UNSPECIFIED\020\000\022\n\n\006ACTIVE\020\001\022\014\n\010IN" - + "ACTIVE\020\002\"Q\n\010Severity\022\030\n\024SEVERITY_UNSPECI" - + "FIED\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" - + "\"s\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:\333\001" - + "\352A\327\001\n%securitycenter.googleapis.com/Find" - + "ing\022@organizations/{organization}/source" - + "s/{source}/findings/{finding}\0224folders/{" - + "folder}/sources/{source}/findings/{findi" - + "ng}\0226projects/{project}/sources/{source}" - + "/findings/{finding}B\332\001\n\"com.google.cloud" - + ".securitycenter.v1P\001ZLgoogle.golang.org/" - + "genproto/googleapis/cloud/securitycenter" - + "/v1;securitycenter\252\002\036Google.Cloud.Securi" - + "tyCenter.V1\312\002\036Google\\Cloud\\SecurityCente" - + "r\\V1\352\002!Google::Cloud::SecurityCenter::V1" - + "b\006proto3" + + ".proto\022\036google.cloud.securitycenter.v1\032\034" + + "google/api/annotations.proto\032\037google/api" + + "/field_behavior.proto\032\031google/api/resour" + + "ce.proto\032+google/cloud/securitycenter/v1" + + "/access.proto\0324google/cloud/securitycent" + + "er/v1/external_system.proto\032.google/clou" + + "d/securitycenter/v1/indicator.proto\0323goo" + + "gle/cloud/securitycenter/v1/security_mar" + + "ks.proto\0322google/cloud/securitycenter/v1" + + "/vulnerability.proto\032\034google/protobuf/st" + + "ruct.proto\032\037google/protobuf/timestamp.pr" + + "oto\"\332\r\n\007Finding\022\014\n\004name\030\001 \001(\t\022\016\n\006parent\030" + + "\002 \001(\t\022\025\n\rresource_name\030\003 \001(\t\022<\n\005state\030\004 " + + "\001(\0162-.google.cloud.securitycenter.v1.Fin" + + "ding.State\022\020\n\010category\030\005 \001(\t\022\024\n\014external" + + "_uri\030\006 \001(\t\022X\n\021source_properties\030\007 \003(\0132=." + + "google.cloud.securitycenter.v1.Finding.S" + + "ourcePropertiesEntry\022J\n\016security_marks\030\010" + + " \001(\0132-.google.cloud.securitycenter.v1.Se" + + "curityMarksB\003\340A\003\022.\n\nevent_time\030\t \001(\0132\032.g" + + "oogle.protobuf.Timestamp\022/\n\013create_time\030" + + "\n \001(\0132\032.google.protobuf.Timestamp\022B\n\010sev" + + "erity\030\014 \001(\01620.google.cloud.securitycente" + + "r.v1.Finding.Severity\022\026\n\016canonical_name\030" + + "\016 \001(\t\022:\n\004mute\030\017 \001(\0162,.google.cloud.secur" + + "itycenter.v1.Finding.Mute\022K\n\rfinding_cla" + + "ss\030\021 \001(\01624.google.cloud.securitycenter.v" + + "1.Finding.FindingClass\022<\n\tindicator\030\022 \001(" + + "\0132).google.cloud.securitycenter.v1.Indic" + + "ator\022D\n\rvulnerability\030\024 \001(\0132-.google.clo" + + "ud.securitycenter.v1.Vulnerability\0229\n\020mu" + + "te_update_time\030\025 \001(\0132\032.google.protobuf.T" + + "imestampB\003\340A\003\022[\n\020external_systems\030\026 \003(\0132" + + "<.google.cloud.securitycenter.v1.Finding" + + ".ExternalSystemsEntryB\003\340A\003\0226\n\006access\030\032 \001" + + "(\0132&.google.cloud.securitycenter.v1.Acce" + + "ss\022\026\n\016mute_initiator\030\034 \001(\t\032O\n\025SourceProp" + + "ertiesEntry\022\013\n\003key\030\001 \001(\t\022%\n\005value\030\002 \001(\0132" + + "\026.google.protobuf.Value:\0028\001\032f\n\024ExternalS" + + "ystemsEntry\022\013\n\003key\030\001 \001(\t\022=\n\005value\030\002 \001(\0132" + + "..google.cloud.securitycenter.v1.Externa" + + "lSystem:\0028\001\"8\n\005State\022\025\n\021STATE_UNSPECIFIE" + + "D\020\000\022\n\n\006ACTIVE\020\001\022\014\n\010INACTIVE\020\002\"Q\n\010Severit" + + "y\022\030\n\024SEVERITY_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\007UNM" + + "UTED\020\002\022\r\n\tUNDEFINED\020\004\"s\n\014FindingClass\022\035\n" + + "\031FINDING_CLASS_UNSPECIFIED\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:\333\001\352A\327\001\n%securitycente" + + "r.googleapis.com/Finding\022@organizations/" + + "{organization}/sources/{source}/findings" + + "/{finding}\0224folders/{folder}/sources/{so" + + "urce}/findings/{finding}\0226projects/{proj" + + "ect}/sources/{source}/findings/{finding}" + + "B\332\001\n\"com.google.cloud.securitycenter.v1P" + + "\001ZLgoogle.golang.org/genproto/googleapis" + + "/cloud/securitycenter/v1;securitycenter\252" + + "\002\036Google.Cloud.SecurityCenter.V1\312\002\036Googl" + + "e\\Cloud\\SecurityCenter\\V1\352\002!Google::Clou" + + "d::SecurityCenter::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.securitycenter.v1.AccessProto.getDescriptor(), com.google.cloud.securitycenter.v1.ExternalSystemProto.getDescriptor(), com.google.cloud.securitycenter.v1.IndicatorProto.getDescriptor(), com.google.cloud.securitycenter.v1.SecurityMarksOuterClass.getDescriptor(), com.google.cloud.securitycenter.v1.VulnerabilityProto.getDescriptor(), com.google.protobuf.StructProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), - com.google.api.AnnotationsProto.getDescriptor(), }); internal_static_google_cloud_securitycenter_v1_Finding_descriptor = getDescriptor().getMessageTypes().get(0); @@ -147,6 +150,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Vulnerability", "MuteUpdateTime", "ExternalSystems", + "Access", "MuteInitiator", }); internal_static_google_cloud_securitycenter_v1_Finding_SourcePropertiesEntry_descriptor = @@ -171,15 +175,16 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { registry.add(com.google.api.ResourceProto.resource); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.securitycenter.v1.AccessProto.getDescriptor(); com.google.cloud.securitycenter.v1.ExternalSystemProto.getDescriptor(); com.google.cloud.securitycenter.v1.IndicatorProto.getDescriptor(); com.google.cloud.securitycenter.v1.SecurityMarksOuterClass.getDescriptor(); com.google.cloud.securitycenter.v1.VulnerabilityProto.getDescriptor(); com.google.protobuf.StructProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); - com.google.api.AnnotationsProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Geolocation.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Geolocation.java new file mode 100644 index 000000000..b2b8d5d1d --- /dev/null +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/Geolocation.java @@ -0,0 +1,634 @@ +/* + * 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/access.proto + +package com.google.cloud.securitycenter.v1; + +/** + * + * + *
+ * Represents a geographical location for a given access.
+ * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v1.Geolocation} + */ +public final class Geolocation extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.Geolocation) + GeolocationOrBuilder { + private static final long serialVersionUID = 0L; + // Use Geolocation.newBuilder() to construct. + private Geolocation(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Geolocation() { + regionCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Geolocation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Geolocation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + regionCode_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.AccessProto + .internal_static_google_cloud_securitycenter_v1_Geolocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.AccessProto + .internal_static_google_cloud_securitycenter_v1_Geolocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.Geolocation.class, + com.google.cloud.securitycenter.v1.Geolocation.Builder.class); + } + + public static final int REGION_CODE_FIELD_NUMBER = 1; + private volatile java.lang.Object regionCode_; + /** + * + * + *
+   * A CLDR.
+   * 
+ * + * string region_code = 1; + * + * @return The regionCode. + */ + @java.lang.Override + public java.lang.String getRegionCode() { + java.lang.Object ref = regionCode_; + 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(); + regionCode_ = s; + return s; + } + } + /** + * + * + *
+   * A CLDR.
+   * 
+ * + * string region_code = 1; + * + * @return The bytes for regionCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRegionCodeBytes() { + java.lang.Object ref = regionCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + regionCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(regionCode_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, regionCode_); + } + 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(regionCode_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, regionCode_); + } + 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.Geolocation)) { + return super.equals(obj); + } + com.google.cloud.securitycenter.v1.Geolocation other = + (com.google.cloud.securitycenter.v1.Geolocation) obj; + + if (!getRegionCode().equals(other.getRegionCode())) 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) + REGION_CODE_FIELD_NUMBER; + hash = (53 * hash) + getRegionCode().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.securitycenter.v1.Geolocation parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.Geolocation 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.Geolocation parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.Geolocation 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.Geolocation parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.securitycenter.v1.Geolocation 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.Geolocation parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.Geolocation 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.Geolocation parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.securitycenter.v1.Geolocation 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.Geolocation 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.Geolocation 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.Geolocation 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 a geographical location for a given access.
+   * 
+ * + * Protobuf type {@code google.cloud.securitycenter.v1.Geolocation} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.Geolocation) + com.google.cloud.securitycenter.v1.GeolocationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.securitycenter.v1.AccessProto + .internal_static_google_cloud_securitycenter_v1_Geolocation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.securitycenter.v1.AccessProto + .internal_static_google_cloud_securitycenter_v1_Geolocation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.securitycenter.v1.Geolocation.class, + com.google.cloud.securitycenter.v1.Geolocation.Builder.class); + } + + // Construct using com.google.cloud.securitycenter.v1.Geolocation.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(); + regionCode_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.securitycenter.v1.AccessProto + .internal_static_google_cloud_securitycenter_v1_Geolocation_descriptor; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.Geolocation getDefaultInstanceForType() { + return com.google.cloud.securitycenter.v1.Geolocation.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.Geolocation build() { + com.google.cloud.securitycenter.v1.Geolocation result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.securitycenter.v1.Geolocation buildPartial() { + com.google.cloud.securitycenter.v1.Geolocation result = + new com.google.cloud.securitycenter.v1.Geolocation(this); + result.regionCode_ = regionCode_; + 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.Geolocation) { + return mergeFrom((com.google.cloud.securitycenter.v1.Geolocation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.securitycenter.v1.Geolocation other) { + if (other == com.google.cloud.securitycenter.v1.Geolocation.getDefaultInstance()) return this; + if (!other.getRegionCode().isEmpty()) { + regionCode_ = other.regionCode_; + 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.Geolocation parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.securitycenter.v1.Geolocation) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object regionCode_ = ""; + /** + * + * + *
+     * A CLDR.
+     * 
+ * + * string region_code = 1; + * + * @return The regionCode. + */ + public java.lang.String getRegionCode() { + java.lang.Object ref = regionCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + regionCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A CLDR.
+     * 
+ * + * string region_code = 1; + * + * @return The bytes for regionCode. + */ + public com.google.protobuf.ByteString getRegionCodeBytes() { + java.lang.Object ref = regionCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + regionCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A CLDR.
+     * 
+ * + * string region_code = 1; + * + * @param value The regionCode to set. + * @return This builder for chaining. + */ + public Builder setRegionCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + regionCode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A CLDR.
+     * 
+ * + * string region_code = 1; + * + * @return This builder for chaining. + */ + public Builder clearRegionCode() { + + regionCode_ = getDefaultInstance().getRegionCode(); + onChanged(); + return this; + } + /** + * + * + *
+     * A CLDR.
+     * 
+ * + * string region_code = 1; + * + * @param value The bytes for regionCode to set. + * @return This builder for chaining. + */ + public Builder setRegionCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + regionCode_ = 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.Geolocation) + } + + // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.Geolocation) + private static final com.google.cloud.securitycenter.v1.Geolocation DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.Geolocation(); + } + + public static com.google.cloud.securitycenter.v1.Geolocation getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Geolocation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Geolocation(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.Geolocation getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GeolocationOrBuilder.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GeolocationOrBuilder.java new file mode 100644 index 000000000..4a8e58cad --- /dev/null +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/GeolocationOrBuilder.java @@ -0,0 +1,50 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/securitycenter/v1/access.proto + +package com.google.cloud.securitycenter.v1; + +public interface GeolocationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v1.Geolocation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A CLDR.
+   * 
+ * + * string region_code = 1; + * + * @return The regionCode. + */ + java.lang.String getRegionCode(); + /** + * + * + *
+   * A CLDR.
+   * 
+ * + * string region_code = 1; + * + * @return The bytes for regionCode. + */ + com.google.protobuf.ByteString getRegionCodeBytes(); +} diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecuritycenterService.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecuritycenterService.java index aa4d5d849..81444fbb8 100644 --- a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecuritycenterService.java +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/SecuritycenterService.java @@ -202,20 +202,20 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n;google/cloud/securitycenter/v1/securit" + "ycenter_service.proto\022\036google.cloud.secu" - + "ritycenter.v1\032Agoogle/cloud/securitycent" - + "er/v1/run_asset_discovery_response.proto" - + "\032\034google/api/annotations.proto\032\027google/a" - + "pi/client.proto\032\037google/api/field_behavi" - + "or.proto\032\031google/api/resource.proto\032*goo" - + "gle/cloud/securitycenter/v1/asset.proto\032" - + "4google/cloud/securitycenter/v1/external" - + "_system.proto\032,google/cloud/securitycent" - + "er/v1/finding.proto\032+google/cloud/securi" - + "tycenter/v1/folder.proto\0320google/cloud/s" - + "ecuritycenter/v1/mute_config.proto\0328goog" - + "le/cloud/securitycenter/v1/notification_" - + "config.proto\032:google/cloud/securitycente" - + "r/v1/organization_settings.proto\0323google" + + "ritycenter.v1\032\034google/api/annotations.pr" + + "oto\032\027google/api/client.proto\032\037google/api" + + "/field_behavior.proto\032\031google/api/resour" + + "ce.proto\032*google/cloud/securitycenter/v1" + + "/asset.proto\0324google/cloud/securitycente" + + "r/v1/external_system.proto\032,google/cloud" + + "/securitycenter/v1/finding.proto\032+google" + + "/cloud/securitycenter/v1/folder.proto\0320g" + + "oogle/cloud/securitycenter/v1/mute_confi" + + "g.proto\0328google/cloud/securitycenter/v1/" + + "notification_config.proto\032:google/cloud/" + + "securitycenter/v1/organization_settings." + + "proto\032Agoogle/cloud/securitycenter/v1/ru" + + "n_asset_discovery_response.proto\0323google" + "/cloud/securitycenter/v1/security_marks." + "proto\032+google/cloud/securitycenter/v1/so" + "urce.proto\032\036google/iam/v1/iam_policy.pro" @@ -613,14 +613,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "/v1;securitycenter\252\002\036Google.Cloud.Securi" + "tyCenter.V1\312\002\036Google\\Cloud\\SecurityCente" + "r\\V1\352\002!Google::Cloud::SecurityCenter::V1" - + "P\000b\006proto3" + + "P\013b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.cloud.securitycenter.v1.RunAssetDiscoveryResponseOuterClass - .getDescriptor(), com.google.api.AnnotationsProto.getDescriptor(), com.google.api.ClientProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), @@ -632,6 +630,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.cloud.securitycenter.v1.MuteConfigProto.getDescriptor(), com.google.cloud.securitycenter.v1.NotificationConfigProto.getDescriptor(), com.google.cloud.securitycenter.v1.OrganizationSettingsOuterClass.getDescriptor(), + com.google.cloud.securitycenter.v1.RunAssetDiscoveryResponseOuterClass + .getDescriptor(), com.google.cloud.securitycenter.v1.SecurityMarksOuterClass.getDescriptor(), com.google.cloud.securitycenter.v1.SourceOuterClass.getDescriptor(), com.google.iam.v1.IamPolicyProto.getDescriptor(), @@ -1009,7 +1009,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { registry.add(com.google.longrunning.OperationsProto.operationInfo); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); - com.google.cloud.securitycenter.v1.RunAssetDiscoveryResponseOuterClass.getDescriptor(); com.google.api.AnnotationsProto.getDescriptor(); com.google.api.ClientProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); @@ -1021,6 +1020,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.cloud.securitycenter.v1.MuteConfigProto.getDescriptor(); com.google.cloud.securitycenter.v1.NotificationConfigProto.getDescriptor(); com.google.cloud.securitycenter.v1.OrganizationSettingsOuterClass.getDescriptor(); + com.google.cloud.securitycenter.v1.RunAssetDiscoveryResponseOuterClass.getDescriptor(); com.google.cloud.securitycenter.v1.SecurityMarksOuterClass.getDescriptor(); com.google.cloud.securitycenter.v1.SourceOuterClass.getDescriptor(); com.google.iam.v1.IamPolicyProto.getDescriptor(); diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/UpdateSecurityMarksRequest.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/UpdateSecurityMarksRequest.java index 2032f08be..74292a27b 100644 --- a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/UpdateSecurityMarksRequest.java +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/UpdateSecurityMarksRequest.java @@ -265,7 +265,8 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { *
    * The time at which the updated SecurityMarks take effect.
    * If not set uses current server time.  Updates will be applied to the
-   * SecurityMarks that are active immediately preceding this time.
+   * SecurityMarks that are active immediately preceding this time. Must be
+   * smaller or equal to the server time.
    * 
* * .google.protobuf.Timestamp start_time = 3; @@ -282,7 +283,8 @@ public boolean hasStartTime() { *
    * The time at which the updated SecurityMarks take effect.
    * If not set uses current server time.  Updates will be applied to the
-   * SecurityMarks that are active immediately preceding this time.
+   * SecurityMarks that are active immediately preceding this time. Must be
+   * smaller or equal to the server time.
    * 
* * .google.protobuf.Timestamp start_time = 3; @@ -299,7 +301,8 @@ public com.google.protobuf.Timestamp getStartTime() { *
    * The time at which the updated SecurityMarks take effect.
    * If not set uses current server time.  Updates will be applied to the
-   * SecurityMarks that are active immediately preceding this time.
+   * SecurityMarks that are active immediately preceding this time. Must be
+   * smaller or equal to the server time.
    * 
* * .google.protobuf.Timestamp start_time = 3; @@ -1125,7 +1128,8 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { *
      * The time at which the updated SecurityMarks take effect.
      * If not set uses current server time.  Updates will be applied to the
-     * SecurityMarks that are active immediately preceding this time.
+     * SecurityMarks that are active immediately preceding this time. Must be
+     * smaller or equal to the server time.
      * 
* * .google.protobuf.Timestamp start_time = 3; @@ -1141,7 +1145,8 @@ public boolean hasStartTime() { *
      * The time at which the updated SecurityMarks take effect.
      * If not set uses current server time.  Updates will be applied to the
-     * SecurityMarks that are active immediately preceding this time.
+     * SecurityMarks that are active immediately preceding this time. Must be
+     * smaller or equal to the server time.
      * 
* * .google.protobuf.Timestamp start_time = 3; @@ -1161,7 +1166,8 @@ public com.google.protobuf.Timestamp getStartTime() { *
      * The time at which the updated SecurityMarks take effect.
      * If not set uses current server time.  Updates will be applied to the
-     * SecurityMarks that are active immediately preceding this time.
+     * SecurityMarks that are active immediately preceding this time. Must be
+     * smaller or equal to the server time.
      * 
* * .google.protobuf.Timestamp start_time = 3; @@ -1185,7 +1191,8 @@ public Builder setStartTime(com.google.protobuf.Timestamp value) { *
      * The time at which the updated SecurityMarks take effect.
      * If not set uses current server time.  Updates will be applied to the
-     * SecurityMarks that are active immediately preceding this time.
+     * SecurityMarks that are active immediately preceding this time. Must be
+     * smaller or equal to the server time.
      * 
* * .google.protobuf.Timestamp start_time = 3; @@ -1206,7 +1213,8 @@ public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValu *
      * The time at which the updated SecurityMarks take effect.
      * If not set uses current server time.  Updates will be applied to the
-     * SecurityMarks that are active immediately preceding this time.
+     * SecurityMarks that are active immediately preceding this time. Must be
+     * smaller or equal to the server time.
      * 
* * .google.protobuf.Timestamp start_time = 3; @@ -1232,7 +1240,8 @@ public Builder mergeStartTime(com.google.protobuf.Timestamp value) { *
      * The time at which the updated SecurityMarks take effect.
      * If not set uses current server time.  Updates will be applied to the
-     * SecurityMarks that are active immediately preceding this time.
+     * SecurityMarks that are active immediately preceding this time. Must be
+     * smaller or equal to the server time.
      * 
* * .google.protobuf.Timestamp start_time = 3; @@ -1254,7 +1263,8 @@ public Builder clearStartTime() { *
      * The time at which the updated SecurityMarks take effect.
      * If not set uses current server time.  Updates will be applied to the
-     * SecurityMarks that are active immediately preceding this time.
+     * SecurityMarks that are active immediately preceding this time. Must be
+     * smaller or equal to the server time.
      * 
* * .google.protobuf.Timestamp start_time = 3; @@ -1270,7 +1280,8 @@ public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { *
      * The time at which the updated SecurityMarks take effect.
      * If not set uses current server time.  Updates will be applied to the
-     * SecurityMarks that are active immediately preceding this time.
+     * SecurityMarks that are active immediately preceding this time. Must be
+     * smaller or equal to the server time.
      * 
* * .google.protobuf.Timestamp start_time = 3; @@ -1288,7 +1299,8 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { *
      * The time at which the updated SecurityMarks take effect.
      * If not set uses current server time.  Updates will be applied to the
-     * SecurityMarks that are active immediately preceding this time.
+     * SecurityMarks that are active immediately preceding this time. Must be
+     * smaller or equal to the server time.
      * 
* * .google.protobuf.Timestamp start_time = 3; diff --git a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/UpdateSecurityMarksRequestOrBuilder.java b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/UpdateSecurityMarksRequestOrBuilder.java index 97d2c9012..5c02f88bb 100644 --- a/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/UpdateSecurityMarksRequestOrBuilder.java +++ b/proto-google-cloud-securitycenter-v1/src/main/java/com/google/cloud/securitycenter/v1/UpdateSecurityMarksRequestOrBuilder.java @@ -114,7 +114,8 @@ public interface UpdateSecurityMarksRequestOrBuilder *
    * The time at which the updated SecurityMarks take effect.
    * If not set uses current server time.  Updates will be applied to the
-   * SecurityMarks that are active immediately preceding this time.
+   * SecurityMarks that are active immediately preceding this time. Must be
+   * smaller or equal to the server time.
    * 
* * .google.protobuf.Timestamp start_time = 3; @@ -128,7 +129,8 @@ public interface UpdateSecurityMarksRequestOrBuilder *
    * The time at which the updated SecurityMarks take effect.
    * If not set uses current server time.  Updates will be applied to the
-   * SecurityMarks that are active immediately preceding this time.
+   * SecurityMarks that are active immediately preceding this time. Must be
+   * smaller or equal to the server time.
    * 
* * .google.protobuf.Timestamp start_time = 3; @@ -142,7 +144,8 @@ public interface UpdateSecurityMarksRequestOrBuilder *
    * The time at which the updated SecurityMarks take effect.
    * If not set uses current server time.  Updates will be applied to the
-   * SecurityMarks that are active immediately preceding this time.
+   * SecurityMarks that are active immediately preceding this time. Must be
+   * smaller or equal to the server time.
    * 
* * .google.protobuf.Timestamp start_time = 3; diff --git a/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/access.proto b/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/access.proto new file mode 100644 index 000000000..f348313a9 --- /dev/null +++ b/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/access.proto @@ -0,0 +1,56 @@ +// Copyright 2021 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; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenter"; +option java_multiple_files = true; +option java_outer_classname = "AccessProto"; +option java_package = "com.google.cloud.securitycenter.v1"; +option csharp_namespace = "Google.Cloud.SecurityCenter.V1"; +option php_namespace = "Google\\Cloud\\SecurityCenter\\V1"; +option ruby_package = "Google::Cloud::SecurityCenter::V1"; + +// Represents an access event. +message Access { + // Associated email, such as "foo@google.com". + string principal_email = 1; + + // Caller's IP address, such as "1.1.1.1". + string caller_ip = 2; + + // The caller IP's geolocation, which identifies where the call came from. + Geolocation caller_ip_geo = 3; + + // What kind of user agent is associated, e.g. operating system shells, + // embedded or stand-alone applications, etc. + string user_agent_family = 4; + + // This is the API service that the service account made a call to, e.g. + // "iam.googleapis.com" + string service_name = 5; + + // The method that the service account called, e.g. "SetIamPolicy". + string method_name = 6; +} + +// Represents a geographical location for a given access. +message Geolocation { + // A CLDR. + string region_code = 1; +} 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 5556b5249..611716ec0 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 @@ -16,15 +16,16 @@ syntax = "proto3"; package google.cloud.securitycenter.v1; +import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/securitycenter/v1/access.proto"; import "google/cloud/securitycenter/v1/external_system.proto"; import "google/cloud/securitycenter/v1/indicator.proto"; import "google/cloud/securitycenter/v1/security_marks.proto"; import "google/cloud/securitycenter/v1/vulnerability.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; -import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.SecurityCenter.V1"; option go_package = "google.golang.org/genproto/googleapis/cloud/securitycenter/v1;securitycenter"; @@ -200,11 +201,12 @@ message Finding { // to the finding. SecurityMarks security_marks = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The time at which the event took place, or when an update to the finding - // occurred. For example, if the finding represents an open firewall it would - // capture the time the detector believes the firewall became open. The - // accuracy is determined by the detector. If the finding were to be resolved - // afterward, this time would reflect when the finding was resolved. Must not + // The time the finding was first detected. If an existing finding is updated, + // then this is the time the update occurred. + // For example, if the finding represents an open firewall, this property + // captures the time the detector believes the firewall became open. The + // accuracy is determined by the detector. If the finding is later resolved, + // then this time reflects when the finding was resolved. This must not // be set to a value greater than the current timestamp. google.protobuf.Timestamp event_time = 9; @@ -249,6 +251,10 @@ message Finding { // information and external system finding fields. map external_systems = 22 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Access details associated to the Finding, such as more information on the + // caller, which method was accessed, from where, etc. + Access access = 26; + // First known as mute_annotation. Records additional information about the // mute operation e.g. mute config that muted the finding, user who muted the // finding, etc. diff --git a/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/securitycenter_service.proto b/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/securitycenter_service.proto index 9c8446c2f..973ded26e 100644 --- a/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/securitycenter_service.proto +++ b/proto-google-cloud-securitycenter-v1/src/main/proto/google/cloud/securitycenter/v1/securitycenter_service.proto @@ -16,7 +16,6 @@ syntax = "proto3"; package google.cloud.securitycenter.v1; -import public "google/cloud/securitycenter/v1/run_asset_discovery_response.proto"; import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; @@ -28,6 +27,7 @@ import "google/cloud/securitycenter/v1/folder.proto"; import "google/cloud/securitycenter/v1/mute_config.proto"; import "google/cloud/securitycenter/v1/notification_config.proto"; import "google/cloud/securitycenter/v1/organization_settings.proto"; +import public "google/cloud/securitycenter/v1/run_asset_discovery_response.proto"; import "google/cloud/securitycenter/v1/security_marks.proto"; import "google/cloud/securitycenter/v1/source.proto"; import "google/iam/v1/iam_policy.proto"; @@ -1459,6 +1459,34 @@ message ListFindingsRequest { message ListFindingsResponse { // Result containing the Finding and its StateChange. message ListFindingsResult { + // The change in state of the finding. + // + // When querying across two points in time this describes + // the change in the finding between the two points: CHANGED, UNCHANGED, + // ADDED, or REMOVED. Findings can not be deleted, so REMOVED implies that + // the finding at timestamp does not match the filter specified, but it did + // at timestamp - compare_duration. If there was no compare_duration + // supplied in the request the state change will be: UNUSED + enum StateChange { + // State change is unused, this is the canonical default for this enum. + UNUSED = 0; + + // The finding has changed state in some way between the points in time + // and existed at both points. + CHANGED = 1; + + // The finding has not changed state between the points in time and + // existed at both points. + UNCHANGED = 2; + + // The finding was created between the points in time. + ADDED = 3; + + // The finding at timestamp does not match the filter specified, but it + // did at timestamp - compare_duration. + REMOVED = 4; + } + // Information related to the Google Cloud resource that is // associated with this finding. message Resource { @@ -1490,34 +1518,6 @@ message ListFindingsResponse { string display_name = 8; } - // The change in state of the finding. - // - // When querying across two points in time this describes - // the change in the finding between the two points: CHANGED, UNCHANGED, - // ADDED, or REMOVED. Findings can not be deleted, so REMOVED implies that - // the finding at timestamp does not match the filter specified, but it did - // at timestamp - compare_duration. If there was no compare_duration - // supplied in the request the state change will be: UNUSED - enum StateChange { - // State change is unused, this is the canonical default for this enum. - UNUSED = 0; - - // The finding has changed state in some way between the points in time - // and existed at both points. - CHANGED = 1; - - // The finding has not changed state between the points in time and - // existed at both points. - UNCHANGED = 2; - - // The finding was created between the points in time. - ADDED = 3; - - // The finding at timestamp does not match the filter specified, but it - // did at timestamp - compare_duration. - REMOVED = 4; - } - // Finding matching the search request. Finding finding = 1; @@ -1681,6 +1681,7 @@ message UpdateSecurityMarksRequest { // The time at which the updated SecurityMarks take effect. // If not set uses current server time. Updates will be applied to the - // SecurityMarks that are active immediately preceding this time. + // SecurityMarks that are active immediately preceding this time. Must be + // smaller or equal to the server time. google.protobuf.Timestamp start_time = 3; }