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

com.google.cloud.securitycenter.v1.Cve Maven / Gradle / Ivy

There is a newer version: 2.62.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/v1/vulnerability.proto

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

/**
 *
 *
 * 
 * CVE stands for Common Vulnerabilities and Exposures.
 * Information from the [CVE
 * record](https://www.cve.org/ResourcesSupport/Glossary) that describes this
 * vulnerability.
 * 
* * Protobuf type {@code google.cloud.securitycenter.v1.Cve} */ public final class Cve extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v1.Cve) CveOrBuilder { private static final long serialVersionUID = 0L; // Use Cve.newBuilder() to construct. private Cve(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Cve() { id_ = ""; references_ = java.util.Collections.emptyList(); impact_ = 0; exploitationActivity_ = 0; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new Cve(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.securitycenter.v1.VulnerabilityProto .internal_static_google_cloud_securitycenter_v1_Cve_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.securitycenter.v1.VulnerabilityProto .internal_static_google_cloud_securitycenter_v1_Cve_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.securitycenter.v1.Cve.class, com.google.cloud.securitycenter.v1.Cve.Builder.class); } /** * * *
   * The possible values of impact of the vulnerability if it was to be
   * exploited.
   * 
* * Protobuf enum {@code google.cloud.securitycenter.v1.Cve.RiskRating} */ public enum RiskRating implements com.google.protobuf.ProtocolMessageEnum { /** * * *
     * Invalid or empty value.
     * 
* * RISK_RATING_UNSPECIFIED = 0; */ RISK_RATING_UNSPECIFIED(0), /** * * *
     * Exploitation would have little to no security impact.
     * 
* * LOW = 1; */ LOW(1), /** * * *
     * Exploitation would enable attackers to perform activities, or could allow
     * attackers to have a direct impact, but would require additional steps.
     * 
* * MEDIUM = 2; */ MEDIUM(2), /** * * *
     * Exploitation would enable attackers to have a notable direct impact
     * without needing to overcome any major mitigating factors.
     * 
* * HIGH = 3; */ HIGH(3), /** * * *
     * Exploitation would fundamentally undermine the security of affected
     * systems, enable actors to perform significant attacks with minimal
     * effort, with little to no mitigating factors to overcome.
     * 
* * CRITICAL = 4; */ CRITICAL(4), UNRECOGNIZED(-1), ; /** * * *
     * Invalid or empty value.
     * 
* * RISK_RATING_UNSPECIFIED = 0; */ public static final int RISK_RATING_UNSPECIFIED_VALUE = 0; /** * * *
     * Exploitation would have little to no security impact.
     * 
* * LOW = 1; */ public static final int LOW_VALUE = 1; /** * * *
     * Exploitation would enable attackers to perform activities, or could allow
     * attackers to have a direct impact, but would require additional steps.
     * 
* * MEDIUM = 2; */ public static final int MEDIUM_VALUE = 2; /** * * *
     * Exploitation would enable attackers to have a notable direct impact
     * without needing to overcome any major mitigating factors.
     * 
* * HIGH = 3; */ public static final int HIGH_VALUE = 3; /** * * *
     * Exploitation would fundamentally undermine the security of affected
     * systems, enable actors to perform significant attacks with minimal
     * effort, with little to no mitigating factors to overcome.
     * 
* * CRITICAL = 4; */ public static final int CRITICAL_VALUE = 4; 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 RiskRating 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 RiskRating forNumber(int value) { switch (value) { case 0: return RISK_RATING_UNSPECIFIED; case 1: return LOW; case 2: return MEDIUM; case 3: return HIGH; case 4: return CRITICAL; 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 RiskRating findValueByNumber(int number) { return RiskRating.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.v1.Cve.getDescriptor().getEnumTypes().get(0); } private static final RiskRating[] VALUES = values(); public static RiskRating 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 RiskRating(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:google.cloud.securitycenter.v1.Cve.RiskRating) } /** * * *
   * The possible values of exploitation activity of the vulnerability in the
   * wild.
   * 
* * Protobuf enum {@code google.cloud.securitycenter.v1.Cve.ExploitationActivity} */ public enum ExploitationActivity implements com.google.protobuf.ProtocolMessageEnum { /** * * *
     * Invalid or empty value.
     * 
* * EXPLOITATION_ACTIVITY_UNSPECIFIED = 0; */ EXPLOITATION_ACTIVITY_UNSPECIFIED(0), /** * * *
     * Exploitation has been reported or confirmed to widely occur.
     * 
* * WIDE = 1; */ WIDE(1), /** * * *
     * Limited reported or confirmed exploitation activities.
     * 
* * CONFIRMED = 2; */ CONFIRMED(2), /** * * *
     * Exploit is publicly available.
     * 
* * AVAILABLE = 3; */ AVAILABLE(3), /** * * *
     * No known exploitation activity, but has a high potential for
     * exploitation.
     * 
* * ANTICIPATED = 4; */ ANTICIPATED(4), /** * * *
     * No known exploitation activity.
     * 
* * NO_KNOWN = 5; */ NO_KNOWN(5), UNRECOGNIZED(-1), ; /** * * *
     * Invalid or empty value.
     * 
* * EXPLOITATION_ACTIVITY_UNSPECIFIED = 0; */ public static final int EXPLOITATION_ACTIVITY_UNSPECIFIED_VALUE = 0; /** * * *
     * Exploitation has been reported or confirmed to widely occur.
     * 
* * WIDE = 1; */ public static final int WIDE_VALUE = 1; /** * * *
     * Limited reported or confirmed exploitation activities.
     * 
* * CONFIRMED = 2; */ public static final int CONFIRMED_VALUE = 2; /** * * *
     * Exploit is publicly available.
     * 
* * AVAILABLE = 3; */ public static final int AVAILABLE_VALUE = 3; /** * * *
     * No known exploitation activity, but has a high potential for
     * exploitation.
     * 
* * ANTICIPATED = 4; */ public static final int ANTICIPATED_VALUE = 4; /** * * *
     * No known exploitation activity.
     * 
* * NO_KNOWN = 5; */ public static final int NO_KNOWN_VALUE = 5; 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 ExploitationActivity 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 ExploitationActivity forNumber(int value) { switch (value) { case 0: return EXPLOITATION_ACTIVITY_UNSPECIFIED; case 1: return WIDE; case 2: return CONFIRMED; case 3: return AVAILABLE; case 4: return ANTICIPATED; case 5: return NO_KNOWN; 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 ExploitationActivity findValueByNumber(int number) { return ExploitationActivity.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.v1.Cve.getDescriptor().getEnumTypes().get(1); } private static final ExploitationActivity[] VALUES = values(); public static ExploitationActivity 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 ExploitationActivity(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:google.cloud.securitycenter.v1.Cve.ExploitationActivity) } private int bitField0_; public static final int ID_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object id_ = ""; /** * * *
   * The unique identifier for the vulnerability. e.g. CVE-2021-34527
   * 
* * string id = 1; * * @return The id. */ @java.lang.Override public java.lang.String getId() { java.lang.Object ref = id_; 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(); id_ = s; return s; } } /** * * *
   * The unique identifier for the vulnerability. e.g. CVE-2021-34527
   * 
* * string id = 1; * * @return The bytes for id. */ @java.lang.Override public com.google.protobuf.ByteString getIdBytes() { java.lang.Object ref = id_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); id_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int REFERENCES_FIELD_NUMBER = 2; @SuppressWarnings("serial") private java.util.List references_; /** * * *
   * Additional information about the CVE.
   * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
   * 
* * repeated .google.cloud.securitycenter.v1.Reference references = 2; */ @java.lang.Override public java.util.List getReferencesList() { return references_; } /** * * *
   * Additional information about the CVE.
   * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
   * 
* * repeated .google.cloud.securitycenter.v1.Reference references = 2; */ @java.lang.Override public java.util.List getReferencesOrBuilderList() { return references_; } /** * * *
   * Additional information about the CVE.
   * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
   * 
* * repeated .google.cloud.securitycenter.v1.Reference references = 2; */ @java.lang.Override public int getReferencesCount() { return references_.size(); } /** * * *
   * Additional information about the CVE.
   * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
   * 
* * repeated .google.cloud.securitycenter.v1.Reference references = 2; */ @java.lang.Override public com.google.cloud.securitycenter.v1.Reference getReferences(int index) { return references_.get(index); } /** * * *
   * Additional information about the CVE.
   * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
   * 
* * repeated .google.cloud.securitycenter.v1.Reference references = 2; */ @java.lang.Override public com.google.cloud.securitycenter.v1.ReferenceOrBuilder getReferencesOrBuilder(int index) { return references_.get(index); } public static final int CVSSV3_FIELD_NUMBER = 3; private com.google.cloud.securitycenter.v1.Cvssv3 cvssv3_; /** * * *
   * Describe Common Vulnerability Scoring System specified at
   * https://www.first.org/cvss/v3.1/specification-document
   * 
* * .google.cloud.securitycenter.v1.Cvssv3 cvssv3 = 3; * * @return Whether the cvssv3 field is set. */ @java.lang.Override public boolean hasCvssv3() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
   * Describe Common Vulnerability Scoring System specified at
   * https://www.first.org/cvss/v3.1/specification-document
   * 
* * .google.cloud.securitycenter.v1.Cvssv3 cvssv3 = 3; * * @return The cvssv3. */ @java.lang.Override public com.google.cloud.securitycenter.v1.Cvssv3 getCvssv3() { return cvssv3_ == null ? com.google.cloud.securitycenter.v1.Cvssv3.getDefaultInstance() : cvssv3_; } /** * * *
   * Describe Common Vulnerability Scoring System specified at
   * https://www.first.org/cvss/v3.1/specification-document
   * 
* * .google.cloud.securitycenter.v1.Cvssv3 cvssv3 = 3; */ @java.lang.Override public com.google.cloud.securitycenter.v1.Cvssv3OrBuilder getCvssv3OrBuilder() { return cvssv3_ == null ? com.google.cloud.securitycenter.v1.Cvssv3.getDefaultInstance() : cvssv3_; } public static final int UPSTREAM_FIX_AVAILABLE_FIELD_NUMBER = 4; private boolean upstreamFixAvailable_ = false; /** * * *
   * Whether upstream fix is available for the CVE.
   * 
* * bool upstream_fix_available = 4; * * @return The upstreamFixAvailable. */ @java.lang.Override public boolean getUpstreamFixAvailable() { return upstreamFixAvailable_; } public static final int IMPACT_FIELD_NUMBER = 5; private int impact_ = 0; /** * * *
   * The potential impact of the vulnerability if it was to be exploited.
   * 
* * .google.cloud.securitycenter.v1.Cve.RiskRating impact = 5; * * @return The enum numeric value on the wire for impact. */ @java.lang.Override public int getImpactValue() { return impact_; } /** * * *
   * The potential impact of the vulnerability if it was to be exploited.
   * 
* * .google.cloud.securitycenter.v1.Cve.RiskRating impact = 5; * * @return The impact. */ @java.lang.Override public com.google.cloud.securitycenter.v1.Cve.RiskRating getImpact() { com.google.cloud.securitycenter.v1.Cve.RiskRating result = com.google.cloud.securitycenter.v1.Cve.RiskRating.forNumber(impact_); return result == null ? com.google.cloud.securitycenter.v1.Cve.RiskRating.UNRECOGNIZED : result; } public static final int EXPLOITATION_ACTIVITY_FIELD_NUMBER = 6; private int exploitationActivity_ = 0; /** * * *
   * The exploitation activity of the vulnerability in the wild.
   * 
* * .google.cloud.securitycenter.v1.Cve.ExploitationActivity exploitation_activity = 6; * * * @return The enum numeric value on the wire for exploitationActivity. */ @java.lang.Override public int getExploitationActivityValue() { return exploitationActivity_; } /** * * *
   * The exploitation activity of the vulnerability in the wild.
   * 
* * .google.cloud.securitycenter.v1.Cve.ExploitationActivity exploitation_activity = 6; * * * @return The exploitationActivity. */ @java.lang.Override public com.google.cloud.securitycenter.v1.Cve.ExploitationActivity getExploitationActivity() { com.google.cloud.securitycenter.v1.Cve.ExploitationActivity result = com.google.cloud.securitycenter.v1.Cve.ExploitationActivity.forNumber( exploitationActivity_); return result == null ? com.google.cloud.securitycenter.v1.Cve.ExploitationActivity.UNRECOGNIZED : result; } public static final int OBSERVED_IN_THE_WILD_FIELD_NUMBER = 7; private boolean observedInTheWild_ = false; /** * * *
   * Whether or not the vulnerability has been observed in the wild.
   * 
* * bool observed_in_the_wild = 7; * * @return The observedInTheWild. */ @java.lang.Override public boolean getObservedInTheWild() { return observedInTheWild_; } public static final int ZERO_DAY_FIELD_NUMBER = 8; private boolean zeroDay_ = false; /** * * *
   * Whether or not the vulnerability was zero day when the finding was
   * published.
   * 
* * bool zero_day = 8; * * @return The zeroDay. */ @java.lang.Override public boolean getZeroDay() { return zeroDay_; } 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(id_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); } for (int i = 0; i < references_.size(); i++) { output.writeMessage(2, references_.get(i)); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getCvssv3()); } if (upstreamFixAvailable_ != false) { output.writeBool(4, upstreamFixAvailable_); } if (impact_ != com.google.cloud.securitycenter.v1.Cve.RiskRating.RISK_RATING_UNSPECIFIED.getNumber()) { output.writeEnum(5, impact_); } if (exploitationActivity_ != com.google.cloud.securitycenter.v1.Cve.ExploitationActivity .EXPLOITATION_ACTIVITY_UNSPECIFIED .getNumber()) { output.writeEnum(6, exploitationActivity_); } if (observedInTheWild_ != false) { output.writeBool(7, observedInTheWild_); } if (zeroDay_ != false) { output.writeBool(8, zeroDay_); } 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(id_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); } for (int i = 0; i < references_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, references_.get(i)); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCvssv3()); } if (upstreamFixAvailable_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, upstreamFixAvailable_); } if (impact_ != com.google.cloud.securitycenter.v1.Cve.RiskRating.RISK_RATING_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, impact_); } if (exploitationActivity_ != com.google.cloud.securitycenter.v1.Cve.ExploitationActivity .EXPLOITATION_ACTIVITY_UNSPECIFIED .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, exploitationActivity_); } if (observedInTheWild_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, observedInTheWild_); } if (zeroDay_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(8, zeroDay_); } 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.v1.Cve)) { return super.equals(obj); } com.google.cloud.securitycenter.v1.Cve other = (com.google.cloud.securitycenter.v1.Cve) obj; if (!getId().equals(other.getId())) return false; if (!getReferencesList().equals(other.getReferencesList())) return false; if (hasCvssv3() != other.hasCvssv3()) return false; if (hasCvssv3()) { if (!getCvssv3().equals(other.getCvssv3())) return false; } if (getUpstreamFixAvailable() != other.getUpstreamFixAvailable()) return false; if (impact_ != other.impact_) return false; if (exploitationActivity_ != other.exploitationActivity_) return false; if (getObservedInTheWild() != other.getObservedInTheWild()) return false; if (getZeroDay() != other.getZeroDay()) 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) + ID_FIELD_NUMBER; hash = (53 * hash) + getId().hashCode(); if (getReferencesCount() > 0) { hash = (37 * hash) + REFERENCES_FIELD_NUMBER; hash = (53 * hash) + getReferencesList().hashCode(); } if (hasCvssv3()) { hash = (37 * hash) + CVSSV3_FIELD_NUMBER; hash = (53 * hash) + getCvssv3().hashCode(); } hash = (37 * hash) + UPSTREAM_FIX_AVAILABLE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getUpstreamFixAvailable()); hash = (37 * hash) + IMPACT_FIELD_NUMBER; hash = (53 * hash) + impact_; hash = (37 * hash) + EXPLOITATION_ACTIVITY_FIELD_NUMBER; hash = (53 * hash) + exploitationActivity_; hash = (37 * hash) + OBSERVED_IN_THE_WILD_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getObservedInTheWild()); hash = (37 * hash) + ZERO_DAY_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getZeroDay()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.securitycenter.v1.Cve parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.securitycenter.v1.Cve 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.Cve parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.securitycenter.v1.Cve 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.Cve parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.securitycenter.v1.Cve 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.Cve parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.securitycenter.v1.Cve 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.Cve parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.securitycenter.v1.Cve 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.Cve 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.Cve 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.Cve 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; } /** * * *
   * CVE stands for Common Vulnerabilities and Exposures.
   * Information from the [CVE
   * record](https://www.cve.org/ResourcesSupport/Glossary) that describes this
   * vulnerability.
   * 
* * Protobuf type {@code google.cloud.securitycenter.v1.Cve} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v1.Cve) com.google.cloud.securitycenter.v1.CveOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.securitycenter.v1.VulnerabilityProto .internal_static_google_cloud_securitycenter_v1_Cve_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.securitycenter.v1.VulnerabilityProto .internal_static_google_cloud_securitycenter_v1_Cve_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.securitycenter.v1.Cve.class, com.google.cloud.securitycenter.v1.Cve.Builder.class); } // Construct using com.google.cloud.securitycenter.v1.Cve.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getReferencesFieldBuilder(); getCvssv3FieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; id_ = ""; if (referencesBuilder_ == null) { references_ = java.util.Collections.emptyList(); } else { references_ = null; referencesBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); cvssv3_ = null; if (cvssv3Builder_ != null) { cvssv3Builder_.dispose(); cvssv3Builder_ = null; } upstreamFixAvailable_ = false; impact_ = 0; exploitationActivity_ = 0; observedInTheWild_ = false; zeroDay_ = false; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.securitycenter.v1.VulnerabilityProto .internal_static_google_cloud_securitycenter_v1_Cve_descriptor; } @java.lang.Override public com.google.cloud.securitycenter.v1.Cve getDefaultInstanceForType() { return com.google.cloud.securitycenter.v1.Cve.getDefaultInstance(); } @java.lang.Override public com.google.cloud.securitycenter.v1.Cve build() { com.google.cloud.securitycenter.v1.Cve result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.securitycenter.v1.Cve buildPartial() { com.google.cloud.securitycenter.v1.Cve result = new com.google.cloud.securitycenter.v1.Cve(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields(com.google.cloud.securitycenter.v1.Cve result) { if (referencesBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0)) { references_ = java.util.Collections.unmodifiableList(references_); bitField0_ = (bitField0_ & ~0x00000002); } result.references_ = references_; } else { result.references_ = referencesBuilder_.build(); } } private void buildPartial0(com.google.cloud.securitycenter.v1.Cve result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.id_ = id_; } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000004) != 0)) { result.cvssv3_ = cvssv3Builder_ == null ? cvssv3_ : cvssv3Builder_.build(); to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000008) != 0)) { result.upstreamFixAvailable_ = upstreamFixAvailable_; } if (((from_bitField0_ & 0x00000010) != 0)) { result.impact_ = impact_; } if (((from_bitField0_ & 0x00000020) != 0)) { result.exploitationActivity_ = exploitationActivity_; } if (((from_bitField0_ & 0x00000040) != 0)) { result.observedInTheWild_ = observedInTheWild_; } if (((from_bitField0_ & 0x00000080) != 0)) { result.zeroDay_ = zeroDay_; } 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.v1.Cve) { return mergeFrom((com.google.cloud.securitycenter.v1.Cve) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.securitycenter.v1.Cve other) { if (other == com.google.cloud.securitycenter.v1.Cve.getDefaultInstance()) return this; if (!other.getId().isEmpty()) { id_ = other.id_; bitField0_ |= 0x00000001; onChanged(); } if (referencesBuilder_ == null) { if (!other.references_.isEmpty()) { if (references_.isEmpty()) { references_ = other.references_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensureReferencesIsMutable(); references_.addAll(other.references_); } onChanged(); } } else { if (!other.references_.isEmpty()) { if (referencesBuilder_.isEmpty()) { referencesBuilder_.dispose(); referencesBuilder_ = null; references_ = other.references_; bitField0_ = (bitField0_ & ~0x00000002); referencesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getReferencesFieldBuilder() : null; } else { referencesBuilder_.addAllMessages(other.references_); } } } if (other.hasCvssv3()) { mergeCvssv3(other.getCvssv3()); } if (other.getUpstreamFixAvailable() != false) { setUpstreamFixAvailable(other.getUpstreamFixAvailable()); } if (other.impact_ != 0) { setImpactValue(other.getImpactValue()); } if (other.exploitationActivity_ != 0) { setExploitationActivityValue(other.getExploitationActivityValue()); } if (other.getObservedInTheWild() != false) { setObservedInTheWild(other.getObservedInTheWild()); } if (other.getZeroDay() != false) { setZeroDay(other.getZeroDay()); } 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: { id_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 18: { com.google.cloud.securitycenter.v1.Reference m = input.readMessage( com.google.cloud.securitycenter.v1.Reference.parser(), extensionRegistry); if (referencesBuilder_ == null) { ensureReferencesIsMutable(); references_.add(m); } else { referencesBuilder_.addMessage(m); } break; } // case 18 case 26: { input.readMessage(getCvssv3FieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 case 32: { upstreamFixAvailable_ = input.readBool(); bitField0_ |= 0x00000008; break; } // case 32 case 40: { impact_ = input.readEnum(); bitField0_ |= 0x00000010; break; } // case 40 case 48: { exploitationActivity_ = input.readEnum(); bitField0_ |= 0x00000020; break; } // case 48 case 56: { observedInTheWild_ = input.readBool(); bitField0_ |= 0x00000040; break; } // case 56 case 64: { zeroDay_ = input.readBool(); bitField0_ |= 0x00000080; break; } // case 64 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 id_ = ""; /** * * *
     * The unique identifier for the vulnerability. e.g. CVE-2021-34527
     * 
* * string id = 1; * * @return The id. */ public java.lang.String getId() { java.lang.Object ref = id_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); id_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * The unique identifier for the vulnerability. e.g. CVE-2021-34527
     * 
* * string id = 1; * * @return The bytes for id. */ public com.google.protobuf.ByteString getIdBytes() { java.lang.Object ref = id_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); id_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * The unique identifier for the vulnerability. e.g. CVE-2021-34527
     * 
* * string id = 1; * * @param value The id to set. * @return This builder for chaining. */ public Builder setId(java.lang.String value) { if (value == null) { throw new NullPointerException(); } id_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
     * The unique identifier for the vulnerability. e.g. CVE-2021-34527
     * 
* * string id = 1; * * @return This builder for chaining. */ public Builder clearId() { id_ = getDefaultInstance().getId(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * * *
     * The unique identifier for the vulnerability. e.g. CVE-2021-34527
     * 
* * string id = 1; * * @param value The bytes for id to set. * @return This builder for chaining. */ public Builder setIdBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); id_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private java.util.List references_ = java.util.Collections.emptyList(); private void ensureReferencesIsMutable() { if (!((bitField0_ & 0x00000002) != 0)) { references_ = new java.util.ArrayList(references_); bitField0_ |= 0x00000002; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.securitycenter.v1.Reference, com.google.cloud.securitycenter.v1.Reference.Builder, com.google.cloud.securitycenter.v1.ReferenceOrBuilder> referencesBuilder_; /** * * *
     * Additional information about the CVE.
     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
     * 
* * repeated .google.cloud.securitycenter.v1.Reference references = 2; */ public java.util.List getReferencesList() { if (referencesBuilder_ == null) { return java.util.Collections.unmodifiableList(references_); } else { return referencesBuilder_.getMessageList(); } } /** * * *
     * Additional information about the CVE.
     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
     * 
* * repeated .google.cloud.securitycenter.v1.Reference references = 2; */ public int getReferencesCount() { if (referencesBuilder_ == null) { return references_.size(); } else { return referencesBuilder_.getCount(); } } /** * * *
     * Additional information about the CVE.
     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
     * 
* * repeated .google.cloud.securitycenter.v1.Reference references = 2; */ public com.google.cloud.securitycenter.v1.Reference getReferences(int index) { if (referencesBuilder_ == null) { return references_.get(index); } else { return referencesBuilder_.getMessage(index); } } /** * * *
     * Additional information about the CVE.
     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
     * 
* * repeated .google.cloud.securitycenter.v1.Reference references = 2; */ public Builder setReferences(int index, com.google.cloud.securitycenter.v1.Reference value) { if (referencesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureReferencesIsMutable(); references_.set(index, value); onChanged(); } else { referencesBuilder_.setMessage(index, value); } return this; } /** * * *
     * Additional information about the CVE.
     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
     * 
* * repeated .google.cloud.securitycenter.v1.Reference references = 2; */ public Builder setReferences( int index, com.google.cloud.securitycenter.v1.Reference.Builder builderForValue) { if (referencesBuilder_ == null) { ensureReferencesIsMutable(); references_.set(index, builderForValue.build()); onChanged(); } else { referencesBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * Additional information about the CVE.
     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
     * 
* * repeated .google.cloud.securitycenter.v1.Reference references = 2; */ public Builder addReferences(com.google.cloud.securitycenter.v1.Reference value) { if (referencesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureReferencesIsMutable(); references_.add(value); onChanged(); } else { referencesBuilder_.addMessage(value); } return this; } /** * * *
     * Additional information about the CVE.
     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
     * 
* * repeated .google.cloud.securitycenter.v1.Reference references = 2; */ public Builder addReferences(int index, com.google.cloud.securitycenter.v1.Reference value) { if (referencesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureReferencesIsMutable(); references_.add(index, value); onChanged(); } else { referencesBuilder_.addMessage(index, value); } return this; } /** * * *
     * Additional information about the CVE.
     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
     * 
* * repeated .google.cloud.securitycenter.v1.Reference references = 2; */ public Builder addReferences( com.google.cloud.securitycenter.v1.Reference.Builder builderForValue) { if (referencesBuilder_ == null) { ensureReferencesIsMutable(); references_.add(builderForValue.build()); onChanged(); } else { referencesBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * Additional information about the CVE.
     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
     * 
* * repeated .google.cloud.securitycenter.v1.Reference references = 2; */ public Builder addReferences( int index, com.google.cloud.securitycenter.v1.Reference.Builder builderForValue) { if (referencesBuilder_ == null) { ensureReferencesIsMutable(); references_.add(index, builderForValue.build()); onChanged(); } else { referencesBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * Additional information about the CVE.
     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
     * 
* * repeated .google.cloud.securitycenter.v1.Reference references = 2; */ public Builder addAllReferences( java.lang.Iterable values) { if (referencesBuilder_ == null) { ensureReferencesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, references_); onChanged(); } else { referencesBuilder_.addAllMessages(values); } return this; } /** * * *
     * Additional information about the CVE.
     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
     * 
* * repeated .google.cloud.securitycenter.v1.Reference references = 2; */ public Builder clearReferences() { if (referencesBuilder_ == null) { references_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { referencesBuilder_.clear(); } return this; } /** * * *
     * Additional information about the CVE.
     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
     * 
* * repeated .google.cloud.securitycenter.v1.Reference references = 2; */ public Builder removeReferences(int index) { if (referencesBuilder_ == null) { ensureReferencesIsMutable(); references_.remove(index); onChanged(); } else { referencesBuilder_.remove(index); } return this; } /** * * *
     * Additional information about the CVE.
     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
     * 
* * repeated .google.cloud.securitycenter.v1.Reference references = 2; */ public com.google.cloud.securitycenter.v1.Reference.Builder getReferencesBuilder(int index) { return getReferencesFieldBuilder().getBuilder(index); } /** * * *
     * Additional information about the CVE.
     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
     * 
* * repeated .google.cloud.securitycenter.v1.Reference references = 2; */ public com.google.cloud.securitycenter.v1.ReferenceOrBuilder getReferencesOrBuilder(int index) { if (referencesBuilder_ == null) { return references_.get(index); } else { return referencesBuilder_.getMessageOrBuilder(index); } } /** * * *
     * Additional information about the CVE.
     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
     * 
* * repeated .google.cloud.securitycenter.v1.Reference references = 2; */ public java.util.List getReferencesOrBuilderList() { if (referencesBuilder_ != null) { return referencesBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(references_); } } /** * * *
     * Additional information about the CVE.
     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
     * 
* * repeated .google.cloud.securitycenter.v1.Reference references = 2; */ public com.google.cloud.securitycenter.v1.Reference.Builder addReferencesBuilder() { return getReferencesFieldBuilder() .addBuilder(com.google.cloud.securitycenter.v1.Reference.getDefaultInstance()); } /** * * *
     * Additional information about the CVE.
     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
     * 
* * repeated .google.cloud.securitycenter.v1.Reference references = 2; */ public com.google.cloud.securitycenter.v1.Reference.Builder addReferencesBuilder(int index) { return getReferencesFieldBuilder() .addBuilder(index, com.google.cloud.securitycenter.v1.Reference.getDefaultInstance()); } /** * * *
     * Additional information about the CVE.
     * e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527
     * 
* * repeated .google.cloud.securitycenter.v1.Reference references = 2; */ public java.util.List getReferencesBuilderList() { return getReferencesFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.securitycenter.v1.Reference, com.google.cloud.securitycenter.v1.Reference.Builder, com.google.cloud.securitycenter.v1.ReferenceOrBuilder> getReferencesFieldBuilder() { if (referencesBuilder_ == null) { referencesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.securitycenter.v1.Reference, com.google.cloud.securitycenter.v1.Reference.Builder, com.google.cloud.securitycenter.v1.ReferenceOrBuilder>( references_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); references_ = null; } return referencesBuilder_; } private com.google.cloud.securitycenter.v1.Cvssv3 cvssv3_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.securitycenter.v1.Cvssv3, com.google.cloud.securitycenter.v1.Cvssv3.Builder, com.google.cloud.securitycenter.v1.Cvssv3OrBuilder> cvssv3Builder_; /** * * *
     * Describe Common Vulnerability Scoring System specified at
     * https://www.first.org/cvss/v3.1/specification-document
     * 
* * .google.cloud.securitycenter.v1.Cvssv3 cvssv3 = 3; * * @return Whether the cvssv3 field is set. */ public boolean hasCvssv3() { return ((bitField0_ & 0x00000004) != 0); } /** * * *
     * Describe Common Vulnerability Scoring System specified at
     * https://www.first.org/cvss/v3.1/specification-document
     * 
* * .google.cloud.securitycenter.v1.Cvssv3 cvssv3 = 3; * * @return The cvssv3. */ public com.google.cloud.securitycenter.v1.Cvssv3 getCvssv3() { if (cvssv3Builder_ == null) { return cvssv3_ == null ? com.google.cloud.securitycenter.v1.Cvssv3.getDefaultInstance() : cvssv3_; } else { return cvssv3Builder_.getMessage(); } } /** * * *
     * Describe Common Vulnerability Scoring System specified at
     * https://www.first.org/cvss/v3.1/specification-document
     * 
* * .google.cloud.securitycenter.v1.Cvssv3 cvssv3 = 3; */ public Builder setCvssv3(com.google.cloud.securitycenter.v1.Cvssv3 value) { if (cvssv3Builder_ == null) { if (value == null) { throw new NullPointerException(); } cvssv3_ = value; } else { cvssv3Builder_.setMessage(value); } bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * Describe Common Vulnerability Scoring System specified at
     * https://www.first.org/cvss/v3.1/specification-document
     * 
* * .google.cloud.securitycenter.v1.Cvssv3 cvssv3 = 3; */ public Builder setCvssv3(com.google.cloud.securitycenter.v1.Cvssv3.Builder builderForValue) { if (cvssv3Builder_ == null) { cvssv3_ = builderForValue.build(); } else { cvssv3Builder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * Describe Common Vulnerability Scoring System specified at
     * https://www.first.org/cvss/v3.1/specification-document
     * 
* * .google.cloud.securitycenter.v1.Cvssv3 cvssv3 = 3; */ public Builder mergeCvssv3(com.google.cloud.securitycenter.v1.Cvssv3 value) { if (cvssv3Builder_ == null) { if (((bitField0_ & 0x00000004) != 0) && cvssv3_ != null && cvssv3_ != com.google.cloud.securitycenter.v1.Cvssv3.getDefaultInstance()) { getCvssv3Builder().mergeFrom(value); } else { cvssv3_ = value; } } else { cvssv3Builder_.mergeFrom(value); } if (cvssv3_ != null) { bitField0_ |= 0x00000004; onChanged(); } return this; } /** * * *
     * Describe Common Vulnerability Scoring System specified at
     * https://www.first.org/cvss/v3.1/specification-document
     * 
* * .google.cloud.securitycenter.v1.Cvssv3 cvssv3 = 3; */ public Builder clearCvssv3() { bitField0_ = (bitField0_ & ~0x00000004); cvssv3_ = null; if (cvssv3Builder_ != null) { cvssv3Builder_.dispose(); cvssv3Builder_ = null; } onChanged(); return this; } /** * * *
     * Describe Common Vulnerability Scoring System specified at
     * https://www.first.org/cvss/v3.1/specification-document
     * 
* * .google.cloud.securitycenter.v1.Cvssv3 cvssv3 = 3; */ public com.google.cloud.securitycenter.v1.Cvssv3.Builder getCvssv3Builder() { bitField0_ |= 0x00000004; onChanged(); return getCvssv3FieldBuilder().getBuilder(); } /** * * *
     * Describe Common Vulnerability Scoring System specified at
     * https://www.first.org/cvss/v3.1/specification-document
     * 
* * .google.cloud.securitycenter.v1.Cvssv3 cvssv3 = 3; */ public com.google.cloud.securitycenter.v1.Cvssv3OrBuilder getCvssv3OrBuilder() { if (cvssv3Builder_ != null) { return cvssv3Builder_.getMessageOrBuilder(); } else { return cvssv3_ == null ? com.google.cloud.securitycenter.v1.Cvssv3.getDefaultInstance() : cvssv3_; } } /** * * *
     * Describe Common Vulnerability Scoring System specified at
     * https://www.first.org/cvss/v3.1/specification-document
     * 
* * .google.cloud.securitycenter.v1.Cvssv3 cvssv3 = 3; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.securitycenter.v1.Cvssv3, com.google.cloud.securitycenter.v1.Cvssv3.Builder, com.google.cloud.securitycenter.v1.Cvssv3OrBuilder> getCvssv3FieldBuilder() { if (cvssv3Builder_ == null) { cvssv3Builder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.securitycenter.v1.Cvssv3, com.google.cloud.securitycenter.v1.Cvssv3.Builder, com.google.cloud.securitycenter.v1.Cvssv3OrBuilder>( getCvssv3(), getParentForChildren(), isClean()); cvssv3_ = null; } return cvssv3Builder_; } private boolean upstreamFixAvailable_; /** * * *
     * Whether upstream fix is available for the CVE.
     * 
* * bool upstream_fix_available = 4; * * @return The upstreamFixAvailable. */ @java.lang.Override public boolean getUpstreamFixAvailable() { return upstreamFixAvailable_; } /** * * *
     * Whether upstream fix is available for the CVE.
     * 
* * bool upstream_fix_available = 4; * * @param value The upstreamFixAvailable to set. * @return This builder for chaining. */ public Builder setUpstreamFixAvailable(boolean value) { upstreamFixAvailable_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
     * Whether upstream fix is available for the CVE.
     * 
* * bool upstream_fix_available = 4; * * @return This builder for chaining. */ public Builder clearUpstreamFixAvailable() { bitField0_ = (bitField0_ & ~0x00000008); upstreamFixAvailable_ = false; onChanged(); return this; } private int impact_ = 0; /** * * *
     * The potential impact of the vulnerability if it was to be exploited.
     * 
* * .google.cloud.securitycenter.v1.Cve.RiskRating impact = 5; * * @return The enum numeric value on the wire for impact. */ @java.lang.Override public int getImpactValue() { return impact_; } /** * * *
     * The potential impact of the vulnerability if it was to be exploited.
     * 
* * .google.cloud.securitycenter.v1.Cve.RiskRating impact = 5; * * @param value The enum numeric value on the wire for impact to set. * @return This builder for chaining. */ public Builder setImpactValue(int value) { impact_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } /** * * *
     * The potential impact of the vulnerability if it was to be exploited.
     * 
* * .google.cloud.securitycenter.v1.Cve.RiskRating impact = 5; * * @return The impact. */ @java.lang.Override public com.google.cloud.securitycenter.v1.Cve.RiskRating getImpact() { com.google.cloud.securitycenter.v1.Cve.RiskRating result = com.google.cloud.securitycenter.v1.Cve.RiskRating.forNumber(impact_); return result == null ? com.google.cloud.securitycenter.v1.Cve.RiskRating.UNRECOGNIZED : result; } /** * * *
     * The potential impact of the vulnerability if it was to be exploited.
     * 
* * .google.cloud.securitycenter.v1.Cve.RiskRating impact = 5; * * @param value The impact to set. * @return This builder for chaining. */ public Builder setImpact(com.google.cloud.securitycenter.v1.Cve.RiskRating value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000010; impact_ = value.getNumber(); onChanged(); return this; } /** * * *
     * The potential impact of the vulnerability if it was to be exploited.
     * 
* * .google.cloud.securitycenter.v1.Cve.RiskRating impact = 5; * * @return This builder for chaining. */ public Builder clearImpact() { bitField0_ = (bitField0_ & ~0x00000010); impact_ = 0; onChanged(); return this; } private int exploitationActivity_ = 0; /** * * *
     * The exploitation activity of the vulnerability in the wild.
     * 
* * .google.cloud.securitycenter.v1.Cve.ExploitationActivity exploitation_activity = 6; * * * @return The enum numeric value on the wire for exploitationActivity. */ @java.lang.Override public int getExploitationActivityValue() { return exploitationActivity_; } /** * * *
     * The exploitation activity of the vulnerability in the wild.
     * 
* * .google.cloud.securitycenter.v1.Cve.ExploitationActivity exploitation_activity = 6; * * * @param value The enum numeric value on the wire for exploitationActivity to set. * @return This builder for chaining. */ public Builder setExploitationActivityValue(int value) { exploitationActivity_ = value; bitField0_ |= 0x00000020; onChanged(); return this; } /** * * *
     * The exploitation activity of the vulnerability in the wild.
     * 
* * .google.cloud.securitycenter.v1.Cve.ExploitationActivity exploitation_activity = 6; * * * @return The exploitationActivity. */ @java.lang.Override public com.google.cloud.securitycenter.v1.Cve.ExploitationActivity getExploitationActivity() { com.google.cloud.securitycenter.v1.Cve.ExploitationActivity result = com.google.cloud.securitycenter.v1.Cve.ExploitationActivity.forNumber( exploitationActivity_); return result == null ? com.google.cloud.securitycenter.v1.Cve.ExploitationActivity.UNRECOGNIZED : result; } /** * * *
     * The exploitation activity of the vulnerability in the wild.
     * 
* * .google.cloud.securitycenter.v1.Cve.ExploitationActivity exploitation_activity = 6; * * * @param value The exploitationActivity to set. * @return This builder for chaining. */ public Builder setExploitationActivity( com.google.cloud.securitycenter.v1.Cve.ExploitationActivity value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000020; exploitationActivity_ = value.getNumber(); onChanged(); return this; } /** * * *
     * The exploitation activity of the vulnerability in the wild.
     * 
* * .google.cloud.securitycenter.v1.Cve.ExploitationActivity exploitation_activity = 6; * * * @return This builder for chaining. */ public Builder clearExploitationActivity() { bitField0_ = (bitField0_ & ~0x00000020); exploitationActivity_ = 0; onChanged(); return this; } private boolean observedInTheWild_; /** * * *
     * Whether or not the vulnerability has been observed in the wild.
     * 
* * bool observed_in_the_wild = 7; * * @return The observedInTheWild. */ @java.lang.Override public boolean getObservedInTheWild() { return observedInTheWild_; } /** * * *
     * Whether or not the vulnerability has been observed in the wild.
     * 
* * bool observed_in_the_wild = 7; * * @param value The observedInTheWild to set. * @return This builder for chaining. */ public Builder setObservedInTheWild(boolean value) { observedInTheWild_ = value; bitField0_ |= 0x00000040; onChanged(); return this; } /** * * *
     * Whether or not the vulnerability has been observed in the wild.
     * 
* * bool observed_in_the_wild = 7; * * @return This builder for chaining. */ public Builder clearObservedInTheWild() { bitField0_ = (bitField0_ & ~0x00000040); observedInTheWild_ = false; onChanged(); return this; } private boolean zeroDay_; /** * * *
     * Whether or not the vulnerability was zero day when the finding was
     * published.
     * 
* * bool zero_day = 8; * * @return The zeroDay. */ @java.lang.Override public boolean getZeroDay() { return zeroDay_; } /** * * *
     * Whether or not the vulnerability was zero day when the finding was
     * published.
     * 
* * bool zero_day = 8; * * @param value The zeroDay to set. * @return This builder for chaining. */ public Builder setZeroDay(boolean value) { zeroDay_ = value; bitField0_ |= 0x00000080; onChanged(); return this; } /** * * *
     * Whether or not the vulnerability was zero day when the finding was
     * published.
     * 
* * bool zero_day = 8; * * @return This builder for chaining. */ public Builder clearZeroDay() { bitField0_ = (bitField0_ & ~0x00000080); zeroDay_ = false; 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.Cve) } // @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v1.Cve) private static final com.google.cloud.securitycenter.v1.Cve DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v1.Cve(); } public static com.google.cloud.securitycenter.v1.Cve getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Cve 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.v1.Cve getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy