All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.cloud.securitycenter.v1beta1.Finding Maven / Gradle / Ivy

There is a newer version: 0.157.0
Show newest version
/*
 * Copyright 2024 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/v1beta1/finding.proto

// Protobuf Java Version: 3.25.3
package com.google.cloud.securitycenter.v1beta1;

/**
 *
 *
 * 
 * Security Command Center finding.
 *
 * A finding is a record of assessment data (security, risk, health or privacy)
 * ingested into Security Command Center for presentation, notification,
 * analysis, policy testing, and enforcement. For example, an XSS vulnerability
 * in an App Engine application is a finding.
 * 
* * Protobuf type {@code google.cloud.securitycenter.v1beta1.Finding} */ public final class Finding extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1beta1.Finding) FindingOrBuilder { private static final long serialVersionUID = 0L; // Use Finding.newBuilder() to construct. private Finding(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Finding() { name_ = ""; parent_ = ""; resourceName_ = ""; state_ = 0; category_ = ""; externalUri_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new Finding(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.securitycenter.v1beta1.FindingOuterClass .internal_static_google_cloud_securitycenter_v1beta1_Finding_descriptor; } @SuppressWarnings({"rawtypes"}) @java.lang.Override protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 7: return internalGetSourceProperties(); default: throw new RuntimeException("Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.securitycenter.v1beta1.FindingOuterClass .internal_static_google_cloud_securitycenter_v1beta1_Finding_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.securitycenter.v1beta1.Finding.class, com.google.cloud.securitycenter.v1beta1.Finding.Builder.class); } /** * * *
   * The state of the finding.
   * 
* * Protobuf enum {@code google.cloud.securitycenter.v1beta1.Finding.State} */ public enum State implements com.google.protobuf.ProtocolMessageEnum { /** * * *
     * Unspecified state.
     * 
* * STATE_UNSPECIFIED = 0; */ STATE_UNSPECIFIED(0), /** * * *
     * The finding requires attention and has not been addressed yet.
     * 
* * ACTIVE = 1; */ ACTIVE(1), /** * * *
     * The finding has been fixed, triaged as a non-issue or otherwise addressed
     * and is no longer active.
     * 
* * INACTIVE = 2; */ INACTIVE(2), UNRECOGNIZED(-1), ; /** * * *
     * Unspecified state.
     * 
* * STATE_UNSPECIFIED = 0; */ public static final int STATE_UNSPECIFIED_VALUE = 0; /** * * *
     * The finding requires attention and has not been addressed yet.
     * 
* * ACTIVE = 1; */ public static final int ACTIVE_VALUE = 1; /** * * *
     * The finding has been fixed, triaged as a non-issue or otherwise addressed
     * and is no longer active.
     * 
* * INACTIVE = 2; */ public static final int INACTIVE_VALUE = 2; public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static State valueOf(int value) { return forNumber(value); } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. */ public static State forNumber(int value) { switch (value) { case 0: return STATE_UNSPECIFIED; case 1: return ACTIVE; case 2: return INACTIVE; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public State findValueByNumber(int number) { return State.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalStateException( "Can't get the descriptor of an unrecognized enum value."); } return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.cloud.securitycenter.v1beta1.Finding.getDescriptor().getEnumTypes().get(0); } private static final State[] VALUES = values(); public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; } private final int value; private State(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:google.cloud.securitycenter.v1beta1.Finding.State) } private int bitField0_; public static final int NAME_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; /** * * *
   * The relative resource name of this finding. See:
   * https://cloud.google.com/apis/design/resource_names#relative_resource_name
   * Example:
   * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}"
   * 
* * string name = 1; * * @return The name. */ @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** * * *
   * The relative resource name of this finding. See:
   * https://cloud.google.com/apis/design/resource_names#relative_resource_name
   * Example:
   * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}"
   * 
* * string name = 1; * * @return The bytes for name. */ @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int PARENT_FIELD_NUMBER = 2; @SuppressWarnings("serial") private volatile java.lang.Object parent_ = ""; /** * * *
   * Immutable. The relative resource name of the source the finding belongs to.
   * See:
   * https://cloud.google.com/apis/design/resource_names#relative_resource_name
   * This field is immutable after creation time.
   * For example:
   * "organizations/{organization_id}/sources/{source_id}"
   * 
* * string parent = 2 [(.google.api.field_behavior) = IMMUTABLE]; * * @return The parent. */ @java.lang.Override public java.lang.String getParent() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); parent_ = s; return s; } } /** * * *
   * Immutable. The relative resource name of the source the finding belongs to.
   * See:
   * https://cloud.google.com/apis/design/resource_names#relative_resource_name
   * This field is immutable after creation time.
   * For example:
   * "organizations/{organization_id}/sources/{source_id}"
   * 
* * string parent = 2 [(.google.api.field_behavior) = IMMUTABLE]; * * @return The bytes for parent. */ @java.lang.Override public com.google.protobuf.ByteString getParentBytes() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); parent_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int RESOURCE_NAME_FIELD_NUMBER = 3; @SuppressWarnings("serial") private volatile java.lang.Object resourceName_ = ""; /** * * *
   * For findings on Google Cloud resources, the full resource
   * name of the Google Cloud resource this finding is for. See:
   * https://cloud.google.com/apis/design/resource_names#full_resource_name
   * When the finding is for a non-Google Cloud resource, the resourceName can
   * be a customer or partner defined string. This field is immutable after
   * creation time.
   * 
* * string resource_name = 3; * * @return The resourceName. */ @java.lang.Override public java.lang.String getResourceName() { java.lang.Object ref = resourceName_; 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(); resourceName_ = s; return s; } } /** * * *
   * For findings on Google Cloud resources, the full resource
   * name of the Google Cloud resource this finding is for. See:
   * https://cloud.google.com/apis/design/resource_names#full_resource_name
   * When the finding is for a non-Google Cloud resource, the resourceName can
   * be a customer or partner defined string. This field is immutable after
   * creation time.
   * 
* * string resource_name = 3; * * @return The bytes for resourceName. */ @java.lang.Override public com.google.protobuf.ByteString getResourceNameBytes() { java.lang.Object ref = resourceName_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); resourceName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int STATE_FIELD_NUMBER = 4; private int state_ = 0; /** * * *
   * The state of the finding.
   * 
* * .google.cloud.securitycenter.v1beta1.Finding.State state = 4; * * @return The enum numeric value on the wire for state. */ @java.lang.Override public int getStateValue() { return state_; } /** * * *
   * The state of the finding.
   * 
* * .google.cloud.securitycenter.v1beta1.Finding.State state = 4; * * @return The state. */ @java.lang.Override public com.google.cloud.securitycenter.v1beta1.Finding.State getState() { com.google.cloud.securitycenter.v1beta1.Finding.State result = com.google.cloud.securitycenter.v1beta1.Finding.State.forNumber(state_); return result == null ? com.google.cloud.securitycenter.v1beta1.Finding.State.UNRECOGNIZED : result; } public static final int CATEGORY_FIELD_NUMBER = 5; @SuppressWarnings("serial") private volatile java.lang.Object category_ = ""; /** * * *
   * The additional taxonomy group within findings from a given source.
   * This field is immutable after creation time.
   * Example: "XSS_FLASH_INJECTION"
   * 
* * string category = 5; * * @return The category. */ @java.lang.Override public java.lang.String getCategory() { java.lang.Object ref = category_; 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(); category_ = s; return s; } } /** * * *
   * The additional taxonomy group within findings from a given source.
   * This field is immutable after creation time.
   * Example: "XSS_FLASH_INJECTION"
   * 
* * string category = 5; * * @return The bytes for category. */ @java.lang.Override public com.google.protobuf.ByteString getCategoryBytes() { java.lang.Object ref = category_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); category_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int EXTERNAL_URI_FIELD_NUMBER = 6; @SuppressWarnings("serial") private volatile java.lang.Object externalUri_ = ""; /** * * *
   * The URI that, if available, points to a web page outside of Security
   * Command Center where additional information about the finding can be found.
   * This field is guaranteed to be either empty or a well formed URL.
   * 
* * string external_uri = 6; * * @return The externalUri. */ @java.lang.Override public java.lang.String getExternalUri() { java.lang.Object ref = externalUri_; 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(); externalUri_ = s; return s; } } /** * * *
   * The URI that, if available, points to a web page outside of Security
   * Command Center where additional information about the finding can be found.
   * This field is guaranteed to be either empty or a well formed URL.
   * 
* * string external_uri = 6; * * @return The bytes for externalUri. */ @java.lang.Override public com.google.protobuf.ByteString getExternalUriBytes() { java.lang.Object ref = externalUri_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); externalUri_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int SOURCE_PROPERTIES_FIELD_NUMBER = 7; private static final class SourcePropertiesDefaultEntryHolder { static final com.google.protobuf.MapEntry defaultEntry = com.google.protobuf.MapEntry .newDefaultInstance( com.google.cloud.securitycenter.v1beta1.FindingOuterClass .internal_static_google_cloud_securitycenter_v1beta1_Finding_SourcePropertiesEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.MESSAGE, com.google.protobuf.Value.getDefaultInstance()); } @SuppressWarnings("serial") private com.google.protobuf.MapField sourceProperties_; private com.google.protobuf.MapField internalGetSourceProperties() { if (sourceProperties_ == null) { return com.google.protobuf.MapField.emptyMapField( SourcePropertiesDefaultEntryHolder.defaultEntry); } return sourceProperties_; } public int getSourcePropertiesCount() { return internalGetSourceProperties().getMap().size(); } /** * * *
   * Source specific properties. These properties are managed by the source
   * that writes the finding. The key names in the source_properties map must be
   * between 1 and 255 characters, and must start with a letter and contain
   * alphanumeric characters or underscores only.
   * 
* * map<string, .google.protobuf.Value> source_properties = 7; */ @java.lang.Override public boolean containsSourceProperties(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetSourceProperties().getMap().containsKey(key); } /** Use {@link #getSourcePropertiesMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getSourceProperties() { return getSourcePropertiesMap(); } /** * * *
   * Source specific properties. These properties are managed by the source
   * that writes the finding. The key names in the source_properties map must be
   * between 1 and 255 characters, and must start with a letter and contain
   * alphanumeric characters or underscores only.
   * 
* * map<string, .google.protobuf.Value> source_properties = 7; */ @java.lang.Override public java.util.Map getSourcePropertiesMap() { return internalGetSourceProperties().getMap(); } /** * * *
   * Source specific properties. These properties are managed by the source
   * that writes the finding. The key names in the source_properties map must be
   * between 1 and 255 characters, and must start with a letter and contain
   * alphanumeric characters or underscores only.
   * 
* * map<string, .google.protobuf.Value> source_properties = 7; */ @java.lang.Override public /* nullable */ com.google.protobuf.Value getSourcePropertiesOrDefault( java.lang.String key, /* nullable */ com.google.protobuf.Value defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetSourceProperties().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** * * *
   * Source specific properties. These properties are managed by the source
   * that writes the finding. The key names in the source_properties map must be
   * between 1 and 255 characters, and must start with a letter and contain
   * alphanumeric characters or underscores only.
   * 
* * map<string, .google.protobuf.Value> source_properties = 7; */ @java.lang.Override public com.google.protobuf.Value getSourcePropertiesOrThrow(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetSourceProperties().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public static final int SECURITY_MARKS_FIELD_NUMBER = 8; private com.google.cloud.securitycenter.v1beta1.SecurityMarks securityMarks_; /** * * *
   * Output only. User specified security marks. These marks are entirely
   * managed by the user and come from the SecurityMarks resource that belongs
   * to the finding.
   * 
* * * .google.cloud.securitycenter.v1beta1.SecurityMarks security_marks = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return Whether the securityMarks field is set. */ @java.lang.Override public boolean hasSecurityMarks() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
   * Output only. User specified security marks. These marks are entirely
   * managed by the user and come from the SecurityMarks resource that belongs
   * to the finding.
   * 
* * * .google.cloud.securitycenter.v1beta1.SecurityMarks security_marks = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return The securityMarks. */ @java.lang.Override public com.google.cloud.securitycenter.v1beta1.SecurityMarks getSecurityMarks() { return securityMarks_ == null ? com.google.cloud.securitycenter.v1beta1.SecurityMarks.getDefaultInstance() : securityMarks_; } /** * * *
   * Output only. User specified security marks. These marks are entirely
   * managed by the user and come from the SecurityMarks resource that belongs
   * to the finding.
   * 
* * * .google.cloud.securitycenter.v1beta1.SecurityMarks security_marks = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override public com.google.cloud.securitycenter.v1beta1.SecurityMarksOrBuilder getSecurityMarksOrBuilder() { return securityMarks_ == null ? com.google.cloud.securitycenter.v1beta1.SecurityMarks.getDefaultInstance() : securityMarks_; } public static final int EVENT_TIME_FIELD_NUMBER = 9; private com.google.protobuf.Timestamp eventTime_; /** * * *
   * 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.
   * 
* * .google.protobuf.Timestamp event_time = 9; * * @return Whether the eventTime field is set. */ @java.lang.Override public boolean hasEventTime() { return ((bitField0_ & 0x00000002) != 0); } /** * * *
   * 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.
   * 
* * .google.protobuf.Timestamp event_time = 9; * * @return The eventTime. */ @java.lang.Override public com.google.protobuf.Timestamp getEventTime() { return eventTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : eventTime_; } /** * * *
   * 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.
   * 
* * .google.protobuf.Timestamp event_time = 9; */ @java.lang.Override public com.google.protobuf.TimestampOrBuilder getEventTimeOrBuilder() { return eventTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : eventTime_; } public static final int CREATE_TIME_FIELD_NUMBER = 10; private com.google.protobuf.Timestamp createTime_; /** * * *
   * The time at which the finding was created in Security Command Center.
   * 
* * .google.protobuf.Timestamp create_time = 10; * * @return Whether the createTime field is set. */ @java.lang.Override public boolean hasCreateTime() { return ((bitField0_ & 0x00000004) != 0); } /** * * *
   * The time at which the finding was created in Security Command Center.
   * 
* * .google.protobuf.Timestamp create_time = 10; * * @return The createTime. */ @java.lang.Override public com.google.protobuf.Timestamp getCreateTime() { return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } /** * * *
   * The time at which the finding was created in Security Command Center.
   * 
* * .google.protobuf.Timestamp create_time = 10; */ @java.lang.Override public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, parent_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, resourceName_); } if (state_ != com.google.cloud.securitycenter.v1beta1.Finding.State.STATE_UNSPECIFIED.getNumber()) { output.writeEnum(4, state_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(category_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, category_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(externalUri_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, externalUri_); } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetSourceProperties(), SourcePropertiesDefaultEntryHolder.defaultEntry, 7); if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(8, getSecurityMarks()); } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(9, getEventTime()); } if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(10, getCreateTime()); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, parent_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, resourceName_); } if (state_ != com.google.cloud.securitycenter.v1beta1.Finding.State.STATE_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, state_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(category_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, category_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(externalUri_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, externalUri_); } for (java.util.Map.Entry entry : internalGetSourceProperties().getMap().entrySet()) { com.google.protobuf.MapEntry sourceProperties__ = SourcePropertiesDefaultEntryHolder.defaultEntry .newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, sourceProperties__); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getSecurityMarks()); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getEventTime()); } if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getCreateTime()); } size += getUnknownFields().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.v1beta1.Finding)) { return super.equals(obj); } com.google.cloud.securitycenter.v1beta1.Finding other = (com.google.cloud.securitycenter.v1beta1.Finding) obj; if (!getName().equals(other.getName())) return false; if (!getParent().equals(other.getParent())) return false; if (!getResourceName().equals(other.getResourceName())) return false; if (state_ != other.state_) return false; if (!getCategory().equals(other.getCategory())) return false; if (!getExternalUri().equals(other.getExternalUri())) return false; if (!internalGetSourceProperties().equals(other.internalGetSourceProperties())) return false; if (hasSecurityMarks() != other.hasSecurityMarks()) return false; if (hasSecurityMarks()) { if (!getSecurityMarks().equals(other.getSecurityMarks())) return false; } if (hasEventTime() != other.hasEventTime()) return false; if (hasEventTime()) { if (!getEventTime().equals(other.getEventTime())) return false; } if (hasCreateTime() != other.hasCreateTime()) return false; if (hasCreateTime()) { if (!getCreateTime().equals(other.getCreateTime())) return false; } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + PARENT_FIELD_NUMBER; hash = (53 * hash) + getParent().hashCode(); hash = (37 * hash) + RESOURCE_NAME_FIELD_NUMBER; hash = (53 * hash) + getResourceName().hashCode(); hash = (37 * hash) + STATE_FIELD_NUMBER; hash = (53 * hash) + state_; hash = (37 * hash) + CATEGORY_FIELD_NUMBER; hash = (53 * hash) + getCategory().hashCode(); hash = (37 * hash) + EXTERNAL_URI_FIELD_NUMBER; hash = (53 * hash) + getExternalUri().hashCode(); if (!internalGetSourceProperties().getMap().isEmpty()) { hash = (37 * hash) + SOURCE_PROPERTIES_FIELD_NUMBER; hash = (53 * hash) + internalGetSourceProperties().hashCode(); } if (hasSecurityMarks()) { hash = (37 * hash) + SECURITY_MARKS_FIELD_NUMBER; hash = (53 * hash) + getSecurityMarks().hashCode(); } if (hasEventTime()) { hash = (37 * hash) + EVENT_TIME_FIELD_NUMBER; hash = (53 * hash) + getEventTime().hashCode(); } if (hasCreateTime()) { hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; hash = (53 * hash) + getCreateTime().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.securitycenter.v1beta1.Finding parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.securitycenter.v1beta1.Finding 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.v1beta1.Finding parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.securitycenter.v1beta1.Finding 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.v1beta1.Finding parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.securitycenter.v1beta1.Finding parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.securitycenter.v1beta1.Finding parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.securitycenter.v1beta1.Finding 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.v1beta1.Finding parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.securitycenter.v1beta1.Finding 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.v1beta1.Finding parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.securitycenter.v1beta1.Finding 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.v1beta1.Finding 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; } /** * * *
   * Security Command Center finding.
   *
   * A finding is a record of assessment data (security, risk, health or privacy)
   * ingested into Security Command Center for presentation, notification,
   * analysis, policy testing, and enforcement. For example, an XSS vulnerability
   * in an App Engine application is a finding.
   * 
* * Protobuf type {@code google.cloud.securitycenter.v1beta1.Finding} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1beta1.Finding) com.google.cloud.securitycenter.v1beta1.FindingOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.securitycenter.v1beta1.FindingOuterClass .internal_static_google_cloud_securitycenter_v1beta1_Finding_descriptor; } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 7: return internalGetSourceProperties(); default: throw new RuntimeException("Invalid map field number: " + number); } } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( int number) { switch (number) { case 7: return internalGetMutableSourceProperties(); default: throw new RuntimeException("Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.securitycenter.v1beta1.FindingOuterClass .internal_static_google_cloud_securitycenter_v1beta1_Finding_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.securitycenter.v1beta1.Finding.class, com.google.cloud.securitycenter.v1beta1.Finding.Builder.class); } // Construct using com.google.cloud.securitycenter.v1beta1.Finding.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getSecurityMarksFieldBuilder(); getEventTimeFieldBuilder(); getCreateTimeFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; name_ = ""; parent_ = ""; resourceName_ = ""; state_ = 0; category_ = ""; externalUri_ = ""; internalGetMutableSourceProperties().clear(); securityMarks_ = null; if (securityMarksBuilder_ != null) { securityMarksBuilder_.dispose(); securityMarksBuilder_ = null; } eventTime_ = null; if (eventTimeBuilder_ != null) { eventTimeBuilder_.dispose(); eventTimeBuilder_ = null; } createTime_ = null; if (createTimeBuilder_ != null) { createTimeBuilder_.dispose(); createTimeBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.securitycenter.v1beta1.FindingOuterClass .internal_static_google_cloud_securitycenter_v1beta1_Finding_descriptor; } @java.lang.Override public com.google.cloud.securitycenter.v1beta1.Finding getDefaultInstanceForType() { return com.google.cloud.securitycenter.v1beta1.Finding.getDefaultInstance(); } @java.lang.Override public com.google.cloud.securitycenter.v1beta1.Finding build() { com.google.cloud.securitycenter.v1beta1.Finding result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.securitycenter.v1beta1.Finding buildPartial() { com.google.cloud.securitycenter.v1beta1.Finding result = new com.google.cloud.securitycenter.v1beta1.Finding(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(com.google.cloud.securitycenter.v1beta1.Finding result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.name_ = name_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.parent_ = parent_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.resourceName_ = resourceName_; } if (((from_bitField0_ & 0x00000008) != 0)) { result.state_ = state_; } if (((from_bitField0_ & 0x00000010) != 0)) { result.category_ = category_; } if (((from_bitField0_ & 0x00000020) != 0)) { result.externalUri_ = externalUri_; } if (((from_bitField0_ & 0x00000040) != 0)) { result.sourceProperties_ = internalGetSourceProperties().build(SourcePropertiesDefaultEntryHolder.defaultEntry); } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000080) != 0)) { result.securityMarks_ = securityMarksBuilder_ == null ? securityMarks_ : securityMarksBuilder_.build(); to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000100) != 0)) { result.eventTime_ = eventTimeBuilder_ == null ? eventTime_ : eventTimeBuilder_.build(); to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000200) != 0)) { result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); to_bitField0_ |= 0x00000004; } result.bitField0_ |= to_bitField0_; } @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.v1beta1.Finding) { return mergeFrom((com.google.cloud.securitycenter.v1beta1.Finding) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.securitycenter.v1beta1.Finding other) { if (other == com.google.cloud.securitycenter.v1beta1.Finding.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; bitField0_ |= 0x00000001; onChanged(); } if (!other.getParent().isEmpty()) { parent_ = other.parent_; bitField0_ |= 0x00000002; onChanged(); } if (!other.getResourceName().isEmpty()) { resourceName_ = other.resourceName_; bitField0_ |= 0x00000004; onChanged(); } if (other.state_ != 0) { setStateValue(other.getStateValue()); } if (!other.getCategory().isEmpty()) { category_ = other.category_; bitField0_ |= 0x00000010; onChanged(); } if (!other.getExternalUri().isEmpty()) { externalUri_ = other.externalUri_; bitField0_ |= 0x00000020; onChanged(); } internalGetMutableSourceProperties().mergeFrom(other.internalGetSourceProperties()); bitField0_ |= 0x00000040; if (other.hasSecurityMarks()) { mergeSecurityMarks(other.getSecurityMarks()); } if (other.hasEventTime()) { mergeEventTime(other.getEventTime()); } if (other.hasCreateTime()) { mergeCreateTime(other.getCreateTime()); } this.mergeUnknownFields(other.getUnknownFields()); 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 { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { name_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 18: { parent_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 18 case 26: { resourceName_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000004; break; } // case 26 case 32: { state_ = input.readEnum(); bitField0_ |= 0x00000008; break; } // case 32 case 42: { category_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000010; break; } // case 42 case 50: { externalUri_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000020; break; } // case 50 case 58: { com.google.protobuf.MapEntry sourceProperties__ = input.readMessage( SourcePropertiesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); internalGetMutableSourceProperties() .ensureBuilderMap() .put(sourceProperties__.getKey(), sourceProperties__.getValue()); bitField0_ |= 0x00000040; break; } // case 58 case 66: { input.readMessage(getSecurityMarksFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000080; break; } // case 66 case 74: { input.readMessage(getEventTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000100; break; } // case 74 case 82: { input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000200; break; } // case 82 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.lang.Object name_ = ""; /** * * *
     * The relative resource name of this finding. See:
     * https://cloud.google.com/apis/design/resource_names#relative_resource_name
     * Example:
     * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}"
     * 
* * string name = 1; * * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * The relative resource name of this finding. See:
     * https://cloud.google.com/apis/design/resource_names#relative_resource_name
     * Example:
     * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}"
     * 
* * string name = 1; * * @return The bytes for name. */ public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * The relative resource name of this finding. See:
     * https://cloud.google.com/apis/design/resource_names#relative_resource_name
     * Example:
     * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}"
     * 
* * string name = 1; * * @param value The name to set. * @return This builder for chaining. */ public Builder setName(java.lang.String value) { if (value == null) { throw new NullPointerException(); } name_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
     * The relative resource name of this finding. See:
     * https://cloud.google.com/apis/design/resource_names#relative_resource_name
     * Example:
     * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}"
     * 
* * string name = 1; * * @return This builder for chaining. */ public Builder clearName() { name_ = getDefaultInstance().getName(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * * *
     * The relative resource name of this finding. See:
     * https://cloud.google.com/apis/design/resource_names#relative_resource_name
     * Example:
     * "organizations/{organization_id}/sources/{source_id}/findings/{finding_id}"
     * 
* * string name = 1; * * @param value The bytes for name to set. * @return This builder for chaining. */ public Builder setNameBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); name_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private java.lang.Object parent_ = ""; /** * * *
     * Immutable. The relative resource name of the source the finding belongs to.
     * See:
     * https://cloud.google.com/apis/design/resource_names#relative_resource_name
     * This field is immutable after creation time.
     * For example:
     * "organizations/{organization_id}/sources/{source_id}"
     * 
* * string parent = 2 [(.google.api.field_behavior) = IMMUTABLE]; * * @return The parent. */ public java.lang.String getParent() { java.lang.Object ref = parent_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); parent_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Immutable. The relative resource name of the source the finding belongs to.
     * See:
     * https://cloud.google.com/apis/design/resource_names#relative_resource_name
     * This field is immutable after creation time.
     * For example:
     * "organizations/{organization_id}/sources/{source_id}"
     * 
* * string parent = 2 [(.google.api.field_behavior) = IMMUTABLE]; * * @return The bytes for parent. */ public com.google.protobuf.ByteString getParentBytes() { java.lang.Object ref = parent_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); parent_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Immutable. The relative resource name of the source the finding belongs to.
     * See:
     * https://cloud.google.com/apis/design/resource_names#relative_resource_name
     * This field is immutable after creation time.
     * For example:
     * "organizations/{organization_id}/sources/{source_id}"
     * 
* * string parent = 2 [(.google.api.field_behavior) = IMMUTABLE]; * * @param value The parent to set. * @return This builder for chaining. */ public Builder setParent(java.lang.String value) { if (value == null) { throw new NullPointerException(); } parent_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
     * Immutable. The relative resource name of the source the finding belongs to.
     * See:
     * https://cloud.google.com/apis/design/resource_names#relative_resource_name
     * This field is immutable after creation time.
     * For example:
     * "organizations/{organization_id}/sources/{source_id}"
     * 
* * string parent = 2 [(.google.api.field_behavior) = IMMUTABLE]; * * @return This builder for chaining. */ public Builder clearParent() { parent_ = getDefaultInstance().getParent(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * * *
     * Immutable. The relative resource name of the source the finding belongs to.
     * See:
     * https://cloud.google.com/apis/design/resource_names#relative_resource_name
     * This field is immutable after creation time.
     * For example:
     * "organizations/{organization_id}/sources/{source_id}"
     * 
* * string parent = 2 [(.google.api.field_behavior) = IMMUTABLE]; * * @param value The bytes for parent to set. * @return This builder for chaining. */ public Builder setParentBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); parent_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } private java.lang.Object resourceName_ = ""; /** * * *
     * For findings on Google Cloud resources, the full resource
     * name of the Google Cloud resource this finding is for. See:
     * https://cloud.google.com/apis/design/resource_names#full_resource_name
     * When the finding is for a non-Google Cloud resource, the resourceName can
     * be a customer or partner defined string. This field is immutable after
     * creation time.
     * 
* * string resource_name = 3; * * @return The resourceName. */ public java.lang.String getResourceName() { java.lang.Object ref = resourceName_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); resourceName_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * For findings on Google Cloud resources, the full resource
     * name of the Google Cloud resource this finding is for. See:
     * https://cloud.google.com/apis/design/resource_names#full_resource_name
     * When the finding is for a non-Google Cloud resource, the resourceName can
     * be a customer or partner defined string. This field is immutable after
     * creation time.
     * 
* * string resource_name = 3; * * @return The bytes for resourceName. */ public com.google.protobuf.ByteString getResourceNameBytes() { java.lang.Object ref = resourceName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); resourceName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * For findings on Google Cloud resources, the full resource
     * name of the Google Cloud resource this finding is for. See:
     * https://cloud.google.com/apis/design/resource_names#full_resource_name
     * When the finding is for a non-Google Cloud resource, the resourceName can
     * be a customer or partner defined string. This field is immutable after
     * creation time.
     * 
* * string resource_name = 3; * * @param value The resourceName to set. * @return This builder for chaining. */ public Builder setResourceName(java.lang.String value) { if (value == null) { throw new NullPointerException(); } resourceName_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * For findings on Google Cloud resources, the full resource
     * name of the Google Cloud resource this finding is for. See:
     * https://cloud.google.com/apis/design/resource_names#full_resource_name
     * When the finding is for a non-Google Cloud resource, the resourceName can
     * be a customer or partner defined string. This field is immutable after
     * creation time.
     * 
* * string resource_name = 3; * * @return This builder for chaining. */ public Builder clearResourceName() { resourceName_ = getDefaultInstance().getResourceName(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } /** * * *
     * For findings on Google Cloud resources, the full resource
     * name of the Google Cloud resource this finding is for. See:
     * https://cloud.google.com/apis/design/resource_names#full_resource_name
     * When the finding is for a non-Google Cloud resource, the resourceName can
     * be a customer or partner defined string. This field is immutable after
     * creation time.
     * 
* * string resource_name = 3; * * @param value The bytes for resourceName to set. * @return This builder for chaining. */ public Builder setResourceNameBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); resourceName_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } private int state_ = 0; /** * * *
     * The state of the finding.
     * 
* * .google.cloud.securitycenter.v1beta1.Finding.State state = 4; * * @return The enum numeric value on the wire for state. */ @java.lang.Override public int getStateValue() { return state_; } /** * * *
     * The state of the finding.
     * 
* * .google.cloud.securitycenter.v1beta1.Finding.State state = 4; * * @param value The enum numeric value on the wire for state to set. * @return This builder for chaining. */ public Builder setStateValue(int value) { state_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
     * The state of the finding.
     * 
* * .google.cloud.securitycenter.v1beta1.Finding.State state = 4; * * @return The state. */ @java.lang.Override public com.google.cloud.securitycenter.v1beta1.Finding.State getState() { com.google.cloud.securitycenter.v1beta1.Finding.State result = com.google.cloud.securitycenter.v1beta1.Finding.State.forNumber(state_); return result == null ? com.google.cloud.securitycenter.v1beta1.Finding.State.UNRECOGNIZED : result; } /** * * *
     * The state of the finding.
     * 
* * .google.cloud.securitycenter.v1beta1.Finding.State state = 4; * * @param value The state to set. * @return This builder for chaining. */ public Builder setState(com.google.cloud.securitycenter.v1beta1.Finding.State value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000008; state_ = value.getNumber(); onChanged(); return this; } /** * * *
     * The state of the finding.
     * 
* * .google.cloud.securitycenter.v1beta1.Finding.State state = 4; * * @return This builder for chaining. */ public Builder clearState() { bitField0_ = (bitField0_ & ~0x00000008); state_ = 0; onChanged(); return this; } private java.lang.Object category_ = ""; /** * * *
     * The additional taxonomy group within findings from a given source.
     * This field is immutable after creation time.
     * Example: "XSS_FLASH_INJECTION"
     * 
* * string category = 5; * * @return The category. */ public java.lang.String getCategory() { java.lang.Object ref = category_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); category_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * The additional taxonomy group within findings from a given source.
     * This field is immutable after creation time.
     * Example: "XSS_FLASH_INJECTION"
     * 
* * string category = 5; * * @return The bytes for category. */ public com.google.protobuf.ByteString getCategoryBytes() { java.lang.Object ref = category_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); category_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * The additional taxonomy group within findings from a given source.
     * This field is immutable after creation time.
     * Example: "XSS_FLASH_INJECTION"
     * 
* * string category = 5; * * @param value The category to set. * @return This builder for chaining. */ public Builder setCategory(java.lang.String value) { if (value == null) { throw new NullPointerException(); } category_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } /** * * *
     * The additional taxonomy group within findings from a given source.
     * This field is immutable after creation time.
     * Example: "XSS_FLASH_INJECTION"
     * 
* * string category = 5; * * @return This builder for chaining. */ public Builder clearCategory() { category_ = getDefaultInstance().getCategory(); bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } /** * * *
     * The additional taxonomy group within findings from a given source.
     * This field is immutable after creation time.
     * Example: "XSS_FLASH_INJECTION"
     * 
* * string category = 5; * * @param value The bytes for category to set. * @return This builder for chaining. */ public Builder setCategoryBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); category_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } private java.lang.Object externalUri_ = ""; /** * * *
     * The URI that, if available, points to a web page outside of Security
     * Command Center where additional information about the finding can be found.
     * This field is guaranteed to be either empty or a well formed URL.
     * 
* * string external_uri = 6; * * @return The externalUri. */ public java.lang.String getExternalUri() { java.lang.Object ref = externalUri_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); externalUri_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * The URI that, if available, points to a web page outside of Security
     * Command Center where additional information about the finding can be found.
     * This field is guaranteed to be either empty or a well formed URL.
     * 
* * string external_uri = 6; * * @return The bytes for externalUri. */ public com.google.protobuf.ByteString getExternalUriBytes() { java.lang.Object ref = externalUri_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); externalUri_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * The URI that, if available, points to a web page outside of Security
     * Command Center where additional information about the finding can be found.
     * This field is guaranteed to be either empty or a well formed URL.
     * 
* * string external_uri = 6; * * @param value The externalUri to set. * @return This builder for chaining. */ public Builder setExternalUri(java.lang.String value) { if (value == null) { throw new NullPointerException(); } externalUri_ = value; bitField0_ |= 0x00000020; onChanged(); return this; } /** * * *
     * The URI that, if available, points to a web page outside of Security
     * Command Center where additional information about the finding can be found.
     * This field is guaranteed to be either empty or a well formed URL.
     * 
* * string external_uri = 6; * * @return This builder for chaining. */ public Builder clearExternalUri() { externalUri_ = getDefaultInstance().getExternalUri(); bitField0_ = (bitField0_ & ~0x00000020); onChanged(); return this; } /** * * *
     * The URI that, if available, points to a web page outside of Security
     * Command Center where additional information about the finding can be found.
     * This field is guaranteed to be either empty or a well formed URL.
     * 
* * string external_uri = 6; * * @param value The bytes for externalUri to set. * @return This builder for chaining. */ public Builder setExternalUriBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); externalUri_ = value; bitField0_ |= 0x00000020; onChanged(); return this; } private static final class SourcePropertiesConverter implements com.google.protobuf.MapFieldBuilder.Converter< java.lang.String, com.google.protobuf.ValueOrBuilder, com.google.protobuf.Value> { @java.lang.Override public com.google.protobuf.Value build(com.google.protobuf.ValueOrBuilder val) { if (val instanceof com.google.protobuf.Value) { return (com.google.protobuf.Value) val; } return ((com.google.protobuf.Value.Builder) val).build(); } @java.lang.Override public com.google.protobuf.MapEntry defaultEntry() { return SourcePropertiesDefaultEntryHolder.defaultEntry; } }; private static final SourcePropertiesConverter sourcePropertiesConverter = new SourcePropertiesConverter(); private com.google.protobuf.MapFieldBuilder< java.lang.String, com.google.protobuf.ValueOrBuilder, com.google.protobuf.Value, com.google.protobuf.Value.Builder> sourceProperties_; private com.google.protobuf.MapFieldBuilder< java.lang.String, com.google.protobuf.ValueOrBuilder, com.google.protobuf.Value, com.google.protobuf.Value.Builder> internalGetSourceProperties() { if (sourceProperties_ == null) { return new com.google.protobuf.MapFieldBuilder<>(sourcePropertiesConverter); } return sourceProperties_; } private com.google.protobuf.MapFieldBuilder< java.lang.String, com.google.protobuf.ValueOrBuilder, com.google.protobuf.Value, com.google.protobuf.Value.Builder> internalGetMutableSourceProperties() { if (sourceProperties_ == null) { sourceProperties_ = new com.google.protobuf.MapFieldBuilder<>(sourcePropertiesConverter); } bitField0_ |= 0x00000040; onChanged(); return sourceProperties_; } public int getSourcePropertiesCount() { return internalGetSourceProperties().ensureBuilderMap().size(); } /** * * *
     * Source specific properties. These properties are managed by the source
     * that writes the finding. The key names in the source_properties map must be
     * between 1 and 255 characters, and must start with a letter and contain
     * alphanumeric characters or underscores only.
     * 
* * map<string, .google.protobuf.Value> source_properties = 7; */ @java.lang.Override public boolean containsSourceProperties(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetSourceProperties().ensureBuilderMap().containsKey(key); } /** Use {@link #getSourcePropertiesMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getSourceProperties() { return getSourcePropertiesMap(); } /** * * *
     * Source specific properties. These properties are managed by the source
     * that writes the finding. The key names in the source_properties map must be
     * between 1 and 255 characters, and must start with a letter and contain
     * alphanumeric characters or underscores only.
     * 
* * map<string, .google.protobuf.Value> source_properties = 7; */ @java.lang.Override public java.util.Map getSourcePropertiesMap() { return internalGetSourceProperties().getImmutableMap(); } /** * * *
     * Source specific properties. These properties are managed by the source
     * that writes the finding. The key names in the source_properties map must be
     * between 1 and 255 characters, and must start with a letter and contain
     * alphanumeric characters or underscores only.
     * 
* * map<string, .google.protobuf.Value> source_properties = 7; */ @java.lang.Override public /* nullable */ com.google.protobuf.Value getSourcePropertiesOrDefault( java.lang.String key, /* nullable */ com.google.protobuf.Value defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetMutableSourceProperties().ensureBuilderMap(); return map.containsKey(key) ? sourcePropertiesConverter.build(map.get(key)) : defaultValue; } /** * * *
     * Source specific properties. These properties are managed by the source
     * that writes the finding. The key names in the source_properties map must be
     * between 1 and 255 characters, and must start with a letter and contain
     * alphanumeric characters or underscores only.
     * 
* * map<string, .google.protobuf.Value> source_properties = 7; */ @java.lang.Override public com.google.protobuf.Value getSourcePropertiesOrThrow(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetMutableSourceProperties().ensureBuilderMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return sourcePropertiesConverter.build(map.get(key)); } public Builder clearSourceProperties() { bitField0_ = (bitField0_ & ~0x00000040); internalGetMutableSourceProperties().clear(); return this; } /** * * *
     * Source specific properties. These properties are managed by the source
     * that writes the finding. The key names in the source_properties map must be
     * between 1 and 255 characters, and must start with a letter and contain
     * alphanumeric characters or underscores only.
     * 
* * map<string, .google.protobuf.Value> source_properties = 7; */ public Builder removeSourceProperties(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } internalGetMutableSourceProperties().ensureBuilderMap().remove(key); return this; } /** Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableSourceProperties() { bitField0_ |= 0x00000040; return internalGetMutableSourceProperties().ensureMessageMap(); } /** * * *
     * Source specific properties. These properties are managed by the source
     * that writes the finding. The key names in the source_properties map must be
     * between 1 and 255 characters, and must start with a letter and contain
     * alphanumeric characters or underscores only.
     * 
* * map<string, .google.protobuf.Value> source_properties = 7; */ public Builder putSourceProperties(java.lang.String key, com.google.protobuf.Value value) { if (key == null) { throw new NullPointerException("map key"); } if (value == null) { throw new NullPointerException("map value"); } internalGetMutableSourceProperties().ensureBuilderMap().put(key, value); bitField0_ |= 0x00000040; return this; } /** * * *
     * Source specific properties. These properties are managed by the source
     * that writes the finding. The key names in the source_properties map must be
     * between 1 and 255 characters, and must start with a letter and contain
     * alphanumeric characters or underscores only.
     * 
* * map<string, .google.protobuf.Value> source_properties = 7; */ public Builder putAllSourceProperties( java.util.Map values) { for (java.util.Map.Entry e : values.entrySet()) { if (e.getKey() == null || e.getValue() == null) { throw new NullPointerException(); } } internalGetMutableSourceProperties().ensureBuilderMap().putAll(values); bitField0_ |= 0x00000040; return this; } /** * * *
     * Source specific properties. These properties are managed by the source
     * that writes the finding. The key names in the source_properties map must be
     * between 1 and 255 characters, and must start with a letter and contain
     * alphanumeric characters or underscores only.
     * 
* * map<string, .google.protobuf.Value> source_properties = 7; */ public com.google.protobuf.Value.Builder putSourcePropertiesBuilderIfAbsent( java.lang.String key) { java.util.Map builderMap = internalGetMutableSourceProperties().ensureBuilderMap(); com.google.protobuf.ValueOrBuilder entry = builderMap.get(key); if (entry == null) { entry = com.google.protobuf.Value.newBuilder(); builderMap.put(key, entry); } if (entry instanceof com.google.protobuf.Value) { entry = ((com.google.protobuf.Value) entry).toBuilder(); builderMap.put(key, entry); } return (com.google.protobuf.Value.Builder) entry; } private com.google.cloud.securitycenter.v1beta1.SecurityMarks securityMarks_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.securitycenter.v1beta1.SecurityMarks, com.google.cloud.securitycenter.v1beta1.SecurityMarks.Builder, com.google.cloud.securitycenter.v1beta1.SecurityMarksOrBuilder> securityMarksBuilder_; /** * * *
     * Output only. User specified security marks. These marks are entirely
     * managed by the user and come from the SecurityMarks resource that belongs
     * to the finding.
     * 
* * * .google.cloud.securitycenter.v1beta1.SecurityMarks security_marks = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return Whether the securityMarks field is set. */ public boolean hasSecurityMarks() { return ((bitField0_ & 0x00000080) != 0); } /** * * *
     * Output only. User specified security marks. These marks are entirely
     * managed by the user and come from the SecurityMarks resource that belongs
     * to the finding.
     * 
* * * .google.cloud.securitycenter.v1beta1.SecurityMarks security_marks = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return The securityMarks. */ public com.google.cloud.securitycenter.v1beta1.SecurityMarks getSecurityMarks() { if (securityMarksBuilder_ == null) { return securityMarks_ == null ? com.google.cloud.securitycenter.v1beta1.SecurityMarks.getDefaultInstance() : securityMarks_; } else { return securityMarksBuilder_.getMessage(); } } /** * * *
     * Output only. User specified security marks. These marks are entirely
     * managed by the user and come from the SecurityMarks resource that belongs
     * to the finding.
     * 
* * * .google.cloud.securitycenter.v1beta1.SecurityMarks security_marks = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder setSecurityMarks(com.google.cloud.securitycenter.v1beta1.SecurityMarks value) { if (securityMarksBuilder_ == null) { if (value == null) { throw new NullPointerException(); } securityMarks_ = value; } else { securityMarksBuilder_.setMessage(value); } bitField0_ |= 0x00000080; onChanged(); return this; } /** * * *
     * Output only. User specified security marks. These marks are entirely
     * managed by the user and come from the SecurityMarks resource that belongs
     * to the finding.
     * 
* * * .google.cloud.securitycenter.v1beta1.SecurityMarks security_marks = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder setSecurityMarks( com.google.cloud.securitycenter.v1beta1.SecurityMarks.Builder builderForValue) { if (securityMarksBuilder_ == null) { securityMarks_ = builderForValue.build(); } else { securityMarksBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000080; onChanged(); return this; } /** * * *
     * Output only. User specified security marks. These marks are entirely
     * managed by the user and come from the SecurityMarks resource that belongs
     * to the finding.
     * 
* * * .google.cloud.securitycenter.v1beta1.SecurityMarks security_marks = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder mergeSecurityMarks(com.google.cloud.securitycenter.v1beta1.SecurityMarks value) { if (securityMarksBuilder_ == null) { if (((bitField0_ & 0x00000080) != 0) && securityMarks_ != null && securityMarks_ != com.google.cloud.securitycenter.v1beta1.SecurityMarks.getDefaultInstance()) { getSecurityMarksBuilder().mergeFrom(value); } else { securityMarks_ = value; } } else { securityMarksBuilder_.mergeFrom(value); } if (securityMarks_ != null) { bitField0_ |= 0x00000080; onChanged(); } return this; } /** * * *
     * Output only. User specified security marks. These marks are entirely
     * managed by the user and come from the SecurityMarks resource that belongs
     * to the finding.
     * 
* * * .google.cloud.securitycenter.v1beta1.SecurityMarks security_marks = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder clearSecurityMarks() { bitField0_ = (bitField0_ & ~0x00000080); securityMarks_ = null; if (securityMarksBuilder_ != null) { securityMarksBuilder_.dispose(); securityMarksBuilder_ = null; } onChanged(); return this; } /** * * *
     * Output only. User specified security marks. These marks are entirely
     * managed by the user and come from the SecurityMarks resource that belongs
     * to the finding.
     * 
* * * .google.cloud.securitycenter.v1beta1.SecurityMarks security_marks = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.cloud.securitycenter.v1beta1.SecurityMarks.Builder getSecurityMarksBuilder() { bitField0_ |= 0x00000080; onChanged(); return getSecurityMarksFieldBuilder().getBuilder(); } /** * * *
     * Output only. User specified security marks. These marks are entirely
     * managed by the user and come from the SecurityMarks resource that belongs
     * to the finding.
     * 
* * * .google.cloud.securitycenter.v1beta1.SecurityMarks security_marks = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.cloud.securitycenter.v1beta1.SecurityMarksOrBuilder getSecurityMarksOrBuilder() { if (securityMarksBuilder_ != null) { return securityMarksBuilder_.getMessageOrBuilder(); } else { return securityMarks_ == null ? com.google.cloud.securitycenter.v1beta1.SecurityMarks.getDefaultInstance() : securityMarks_; } } /** * * *
     * Output only. User specified security marks. These marks are entirely
     * managed by the user and come from the SecurityMarks resource that belongs
     * to the finding.
     * 
* * * .google.cloud.securitycenter.v1beta1.SecurityMarks security_marks = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.securitycenter.v1beta1.SecurityMarks, com.google.cloud.securitycenter.v1beta1.SecurityMarks.Builder, com.google.cloud.securitycenter.v1beta1.SecurityMarksOrBuilder> getSecurityMarksFieldBuilder() { if (securityMarksBuilder_ == null) { securityMarksBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.securitycenter.v1beta1.SecurityMarks, com.google.cloud.securitycenter.v1beta1.SecurityMarks.Builder, com.google.cloud.securitycenter.v1beta1.SecurityMarksOrBuilder>( getSecurityMarks(), getParentForChildren(), isClean()); securityMarks_ = null; } return securityMarksBuilder_; } private com.google.protobuf.Timestamp eventTime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> eventTimeBuilder_; /** * * *
     * 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.
     * 
* * .google.protobuf.Timestamp event_time = 9; * * @return Whether the eventTime field is set. */ public boolean hasEventTime() { return ((bitField0_ & 0x00000100) != 0); } /** * * *
     * 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.
     * 
* * .google.protobuf.Timestamp event_time = 9; * * @return The eventTime. */ public com.google.protobuf.Timestamp getEventTime() { if (eventTimeBuilder_ == null) { return eventTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : eventTime_; } else { return eventTimeBuilder_.getMessage(); } } /** * * *
     * 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.
     * 
* * .google.protobuf.Timestamp event_time = 9; */ public Builder setEventTime(com.google.protobuf.Timestamp value) { if (eventTimeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } eventTime_ = value; } else { eventTimeBuilder_.setMessage(value); } bitField0_ |= 0x00000100; onChanged(); return this; } /** * * *
     * 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.
     * 
* * .google.protobuf.Timestamp event_time = 9; */ public Builder setEventTime(com.google.protobuf.Timestamp.Builder builderForValue) { if (eventTimeBuilder_ == null) { eventTime_ = builderForValue.build(); } else { eventTimeBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000100; onChanged(); return this; } /** * * *
     * 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.
     * 
* * .google.protobuf.Timestamp event_time = 9; */ public Builder mergeEventTime(com.google.protobuf.Timestamp value) { if (eventTimeBuilder_ == null) { if (((bitField0_ & 0x00000100) != 0) && eventTime_ != null && eventTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getEventTimeBuilder().mergeFrom(value); } else { eventTime_ = value; } } else { eventTimeBuilder_.mergeFrom(value); } if (eventTime_ != null) { bitField0_ |= 0x00000100; onChanged(); } return this; } /** * * *
     * 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.
     * 
* * .google.protobuf.Timestamp event_time = 9; */ public Builder clearEventTime() { bitField0_ = (bitField0_ & ~0x00000100); eventTime_ = null; if (eventTimeBuilder_ != null) { eventTimeBuilder_.dispose(); eventTimeBuilder_ = null; } onChanged(); return this; } /** * * *
     * 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.
     * 
* * .google.protobuf.Timestamp event_time = 9; */ public com.google.protobuf.Timestamp.Builder getEventTimeBuilder() { bitField0_ |= 0x00000100; onChanged(); return getEventTimeFieldBuilder().getBuilder(); } /** * * *
     * 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.
     * 
* * .google.protobuf.Timestamp event_time = 9; */ public com.google.protobuf.TimestampOrBuilder getEventTimeOrBuilder() { if (eventTimeBuilder_ != null) { return eventTimeBuilder_.getMessageOrBuilder(); } else { return eventTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : eventTime_; } } /** * * *
     * 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.
     * 
* * .google.protobuf.Timestamp event_time = 9; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> getEventTimeFieldBuilder() { if (eventTimeBuilder_ == null) { eventTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( getEventTime(), getParentForChildren(), isClean()); eventTime_ = null; } return eventTimeBuilder_; } private com.google.protobuf.Timestamp createTime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; /** * * *
     * The time at which the finding was created in Security Command Center.
     * 
* * .google.protobuf.Timestamp create_time = 10; * * @return Whether the createTime field is set. */ public boolean hasCreateTime() { return ((bitField0_ & 0x00000200) != 0); } /** * * *
     * The time at which the finding was created in Security Command Center.
     * 
* * .google.protobuf.Timestamp create_time = 10; * * @return The createTime. */ public com.google.protobuf.Timestamp getCreateTime() { if (createTimeBuilder_ == null) { return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } else { return createTimeBuilder_.getMessage(); } } /** * * *
     * The time at which the finding was created in Security Command Center.
     * 
* * .google.protobuf.Timestamp create_time = 10; */ public Builder setCreateTime(com.google.protobuf.Timestamp value) { if (createTimeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } createTime_ = value; } else { createTimeBuilder_.setMessage(value); } bitField0_ |= 0x00000200; onChanged(); return this; } /** * * *
     * The time at which the finding was created in Security Command Center.
     * 
* * .google.protobuf.Timestamp create_time = 10; */ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { if (createTimeBuilder_ == null) { createTime_ = builderForValue.build(); } else { createTimeBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000200; onChanged(); return this; } /** * * *
     * The time at which the finding was created in Security Command Center.
     * 
* * .google.protobuf.Timestamp create_time = 10; */ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { if (createTimeBuilder_ == null) { if (((bitField0_ & 0x00000200) != 0) && createTime_ != null && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getCreateTimeBuilder().mergeFrom(value); } else { createTime_ = value; } } else { createTimeBuilder_.mergeFrom(value); } if (createTime_ != null) { bitField0_ |= 0x00000200; onChanged(); } return this; } /** * * *
     * The time at which the finding was created in Security Command Center.
     * 
* * .google.protobuf.Timestamp create_time = 10; */ public Builder clearCreateTime() { bitField0_ = (bitField0_ & ~0x00000200); createTime_ = null; if (createTimeBuilder_ != null) { createTimeBuilder_.dispose(); createTimeBuilder_ = null; } onChanged(); return this; } /** * * *
     * The time at which the finding was created in Security Command Center.
     * 
* * .google.protobuf.Timestamp create_time = 10; */ public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { bitField0_ |= 0x00000200; onChanged(); return getCreateTimeFieldBuilder().getBuilder(); } /** * * *
     * The time at which the finding was created in Security Command Center.
     * 
* * .google.protobuf.Timestamp create_time = 10; */ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { if (createTimeBuilder_ != null) { return createTimeBuilder_.getMessageOrBuilder(); } else { return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } } /** * * *
     * The time at which the finding was created in Security Command Center.
     * 
* * .google.protobuf.Timestamp create_time = 10; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> getCreateTimeFieldBuilder() { if (createTimeBuilder_ == null) { createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( getCreateTime(), getParentForChildren(), isClean()); createTime_ = null; } return createTimeBuilder_; } @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.v1beta1.Finding) } // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1beta1.Finding) private static final com.google.cloud.securitycenter.v1beta1.Finding DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1beta1.Finding(); } public static com.google.cloud.securitycenter.v1beta1.Finding getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Finding parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; 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.v1beta1.Finding getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy