/* * Copyright 2019 The Grafeas Authors. All rights reserved. * * 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: grafeas/v1/cvss.proto package io.grafeas.v1; /** * * *
* Common Vulnerability Scoring System. * For details, see https://www.first.org/cvss/specification-document * This is a message we will try to use for storing various versions of CVSS * rather than making a separate proto for storing a specific version. ** * Protobuf type {@code grafeas.v1.CVSS} */ public final class CVSS extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:grafeas.v1.CVSS) CVSSOrBuilder { private static final long serialVersionUID = 0L; // Use CVSS.newBuilder() to construct. private CVSS(com.google.protobuf.GeneratedMessageV3.Builder> builder) { super(builder); } private CVSS() { attackVector_ = 0; attackComplexity_ = 0; authentication_ = 0; privilegesRequired_ = 0; userInteraction_ = 0; scope_ = 0; confidentialityImpact_ = 0; integrityImpact_ = 0; availabilityImpact_ = 0; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new CVSS(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSS_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSS_fieldAccessorTable .ensureFieldAccessorsInitialized( io.grafeas.v1.CVSS.class, io.grafeas.v1.CVSS.Builder.class); } /** Protobuf enum {@code grafeas.v1.CVSS.AttackVector} */ public enum AttackVector implements com.google.protobuf.ProtocolMessageEnum { /**
ATTACK_VECTOR_UNSPECIFIED = 0; */
ATTACK_VECTOR_UNSPECIFIED(0),
/** ATTACK_VECTOR_NETWORK = 1; */
ATTACK_VECTOR_NETWORK(1),
/** ATTACK_VECTOR_ADJACENT = 2; */
ATTACK_VECTOR_ADJACENT(2),
/** ATTACK_VECTOR_LOCAL = 3; */
ATTACK_VECTOR_LOCAL(3),
/** ATTACK_VECTOR_PHYSICAL = 4; */
ATTACK_VECTOR_PHYSICAL(4),
UNRECOGNIZED(-1),
;
/** ATTACK_VECTOR_UNSPECIFIED = 0; */
public static final int ATTACK_VECTOR_UNSPECIFIED_VALUE = 0;
/** ATTACK_VECTOR_NETWORK = 1; */
public static final int ATTACK_VECTOR_NETWORK_VALUE = 1;
/** ATTACK_VECTOR_ADJACENT = 2; */
public static final int ATTACK_VECTOR_ADJACENT_VALUE = 2;
/** ATTACK_VECTOR_LOCAL = 3; */
public static final int ATTACK_VECTOR_LOCAL_VALUE = 3;
/** ATTACK_VECTOR_PHYSICAL = 4; */
public static final int ATTACK_VECTOR_PHYSICAL_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 AttackVector 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 AttackVector forNumber(int value) {
switch (value) {
case 0:
return ATTACK_VECTOR_UNSPECIFIED;
case 1:
return ATTACK_VECTOR_NETWORK;
case 2:
return ATTACK_VECTOR_ADJACENT;
case 3:
return ATTACK_VECTOR_LOCAL;
case 4:
return ATTACK_VECTOR_PHYSICAL;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMapATTACK_COMPLEXITY_UNSPECIFIED = 0; */
ATTACK_COMPLEXITY_UNSPECIFIED(0),
/** ATTACK_COMPLEXITY_LOW = 1; */
ATTACK_COMPLEXITY_LOW(1),
/** ATTACK_COMPLEXITY_HIGH = 2; */
ATTACK_COMPLEXITY_HIGH(2),
/** ATTACK_COMPLEXITY_MEDIUM = 3; */
ATTACK_COMPLEXITY_MEDIUM(3),
UNRECOGNIZED(-1),
;
/** ATTACK_COMPLEXITY_UNSPECIFIED = 0; */
public static final int ATTACK_COMPLEXITY_UNSPECIFIED_VALUE = 0;
/** ATTACK_COMPLEXITY_LOW = 1; */
public static final int ATTACK_COMPLEXITY_LOW_VALUE = 1;
/** ATTACK_COMPLEXITY_HIGH = 2; */
public static final int ATTACK_COMPLEXITY_HIGH_VALUE = 2;
/** ATTACK_COMPLEXITY_MEDIUM = 3; */
public static final int ATTACK_COMPLEXITY_MEDIUM_VALUE = 3;
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 AttackComplexity 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 AttackComplexity forNumber(int value) {
switch (value) {
case 0:
return ATTACK_COMPLEXITY_UNSPECIFIED;
case 1:
return ATTACK_COMPLEXITY_LOW;
case 2:
return ATTACK_COMPLEXITY_HIGH;
case 3:
return ATTACK_COMPLEXITY_MEDIUM;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMapAUTHENTICATION_UNSPECIFIED = 0; */
AUTHENTICATION_UNSPECIFIED(0),
/** AUTHENTICATION_MULTIPLE = 1; */
AUTHENTICATION_MULTIPLE(1),
/** AUTHENTICATION_SINGLE = 2; */
AUTHENTICATION_SINGLE(2),
/** AUTHENTICATION_NONE = 3; */
AUTHENTICATION_NONE(3),
UNRECOGNIZED(-1),
;
/** AUTHENTICATION_UNSPECIFIED = 0; */
public static final int AUTHENTICATION_UNSPECIFIED_VALUE = 0;
/** AUTHENTICATION_MULTIPLE = 1; */
public static final int AUTHENTICATION_MULTIPLE_VALUE = 1;
/** AUTHENTICATION_SINGLE = 2; */
public static final int AUTHENTICATION_SINGLE_VALUE = 2;
/** AUTHENTICATION_NONE = 3; */
public static final int AUTHENTICATION_NONE_VALUE = 3;
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 Authentication 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 Authentication forNumber(int value) {
switch (value) {
case 0:
return AUTHENTICATION_UNSPECIFIED;
case 1:
return AUTHENTICATION_MULTIPLE;
case 2:
return AUTHENTICATION_SINGLE;
case 3:
return AUTHENTICATION_NONE;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMapPRIVILEGES_REQUIRED_UNSPECIFIED = 0; */
PRIVILEGES_REQUIRED_UNSPECIFIED(0),
/** PRIVILEGES_REQUIRED_NONE = 1; */
PRIVILEGES_REQUIRED_NONE(1),
/** PRIVILEGES_REQUIRED_LOW = 2; */
PRIVILEGES_REQUIRED_LOW(2),
/** PRIVILEGES_REQUIRED_HIGH = 3; */
PRIVILEGES_REQUIRED_HIGH(3),
UNRECOGNIZED(-1),
;
/** PRIVILEGES_REQUIRED_UNSPECIFIED = 0; */
public static final int PRIVILEGES_REQUIRED_UNSPECIFIED_VALUE = 0;
/** PRIVILEGES_REQUIRED_NONE = 1; */
public static final int PRIVILEGES_REQUIRED_NONE_VALUE = 1;
/** PRIVILEGES_REQUIRED_LOW = 2; */
public static final int PRIVILEGES_REQUIRED_LOW_VALUE = 2;
/** PRIVILEGES_REQUIRED_HIGH = 3; */
public static final int PRIVILEGES_REQUIRED_HIGH_VALUE = 3;
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 PrivilegesRequired 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 PrivilegesRequired forNumber(int value) {
switch (value) {
case 0:
return PRIVILEGES_REQUIRED_UNSPECIFIED;
case 1:
return PRIVILEGES_REQUIRED_NONE;
case 2:
return PRIVILEGES_REQUIRED_LOW;
case 3:
return PRIVILEGES_REQUIRED_HIGH;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMapUSER_INTERACTION_UNSPECIFIED = 0; */
USER_INTERACTION_UNSPECIFIED(0),
/** USER_INTERACTION_NONE = 1; */
USER_INTERACTION_NONE(1),
/** USER_INTERACTION_REQUIRED = 2; */
USER_INTERACTION_REQUIRED(2),
UNRECOGNIZED(-1),
;
/** USER_INTERACTION_UNSPECIFIED = 0; */
public static final int USER_INTERACTION_UNSPECIFIED_VALUE = 0;
/** USER_INTERACTION_NONE = 1; */
public static final int USER_INTERACTION_NONE_VALUE = 1;
/** USER_INTERACTION_REQUIRED = 2; */
public static final int USER_INTERACTION_REQUIRED_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 UserInteraction 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 UserInteraction forNumber(int value) {
switch (value) {
case 0:
return USER_INTERACTION_UNSPECIFIED;
case 1:
return USER_INTERACTION_NONE;
case 2:
return USER_INTERACTION_REQUIRED;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMapSCOPE_UNSPECIFIED = 0; */
SCOPE_UNSPECIFIED(0),
/** SCOPE_UNCHANGED = 1; */
SCOPE_UNCHANGED(1),
/** SCOPE_CHANGED = 2; */
SCOPE_CHANGED(2),
UNRECOGNIZED(-1),
;
/** SCOPE_UNSPECIFIED = 0; */
public static final int SCOPE_UNSPECIFIED_VALUE = 0;
/** SCOPE_UNCHANGED = 1; */
public static final int SCOPE_UNCHANGED_VALUE = 1;
/** SCOPE_CHANGED = 2; */
public static final int SCOPE_CHANGED_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 Scope 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 Scope forNumber(int value) {
switch (value) {
case 0:
return SCOPE_UNSPECIFIED;
case 1:
return SCOPE_UNCHANGED;
case 2:
return SCOPE_CHANGED;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMapIMPACT_UNSPECIFIED = 0; */
IMPACT_UNSPECIFIED(0),
/** IMPACT_HIGH = 1; */
IMPACT_HIGH(1),
/** IMPACT_LOW = 2; */
IMPACT_LOW(2),
/** IMPACT_NONE = 3; */
IMPACT_NONE(3),
/** IMPACT_PARTIAL = 4; */
IMPACT_PARTIAL(4),
/** IMPACT_COMPLETE = 5; */
IMPACT_COMPLETE(5),
UNRECOGNIZED(-1),
;
/** IMPACT_UNSPECIFIED = 0; */
public static final int IMPACT_UNSPECIFIED_VALUE = 0;
/** IMPACT_HIGH = 1; */
public static final int IMPACT_HIGH_VALUE = 1;
/** IMPACT_LOW = 2; */
public static final int IMPACT_LOW_VALUE = 2;
/** IMPACT_NONE = 3; */
public static final int IMPACT_NONE_VALUE = 3;
/** IMPACT_PARTIAL = 4; */
public static final int IMPACT_PARTIAL_VALUE = 4;
/** IMPACT_COMPLETE = 5; */
public static final int IMPACT_COMPLETE_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 Impact 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 Impact forNumber(int value) {
switch (value) {
case 0:
return IMPACT_UNSPECIFIED;
case 1:
return IMPACT_HIGH;
case 2:
return IMPACT_LOW;
case 3:
return IMPACT_NONE;
case 4:
return IMPACT_PARTIAL;
case 5:
return IMPACT_COMPLETE;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap* The base score is a function of the base metric scores. ** *
float base_score = 1;
*
* @return The baseScore.
*/
@java.lang.Override
public float getBaseScore() {
return baseScore_;
}
public static final int EXPLOITABILITY_SCORE_FIELD_NUMBER = 2;
private float exploitabilityScore_ = 0F;
/**
* float exploitability_score = 2;
*
* @return The exploitabilityScore.
*/
@java.lang.Override
public float getExploitabilityScore() {
return exploitabilityScore_;
}
public static final int IMPACT_SCORE_FIELD_NUMBER = 3;
private float impactScore_ = 0F;
/**
* float impact_score = 3;
*
* @return The impactScore.
*/
@java.lang.Override
public float getImpactScore() {
return impactScore_;
}
public static final int ATTACK_VECTOR_FIELD_NUMBER = 4;
private int attackVector_ = 0;
/**
*
*
* * Base Metrics * Represents the intrinsic characteristics of a vulnerability that are * constant over time and across user environments. ** *
.grafeas.v1.CVSS.AttackVector attack_vector = 4;
*
* @return The enum numeric value on the wire for attackVector.
*/
@java.lang.Override
public int getAttackVectorValue() {
return attackVector_;
}
/**
*
*
* * Base Metrics * Represents the intrinsic characteristics of a vulnerability that are * constant over time and across user environments. ** *
.grafeas.v1.CVSS.AttackVector attack_vector = 4;
*
* @return The attackVector.
*/
@java.lang.Override
public io.grafeas.v1.CVSS.AttackVector getAttackVector() {
io.grafeas.v1.CVSS.AttackVector result =
io.grafeas.v1.CVSS.AttackVector.forNumber(attackVector_);
return result == null ? io.grafeas.v1.CVSS.AttackVector.UNRECOGNIZED : result;
}
public static final int ATTACK_COMPLEXITY_FIELD_NUMBER = 5;
private int attackComplexity_ = 0;
/**
* .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5;
*
* @return The enum numeric value on the wire for attackComplexity.
*/
@java.lang.Override
public int getAttackComplexityValue() {
return attackComplexity_;
}
/**
* .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5;
*
* @return The attackComplexity.
*/
@java.lang.Override
public io.grafeas.v1.CVSS.AttackComplexity getAttackComplexity() {
io.grafeas.v1.CVSS.AttackComplexity result =
io.grafeas.v1.CVSS.AttackComplexity.forNumber(attackComplexity_);
return result == null ? io.grafeas.v1.CVSS.AttackComplexity.UNRECOGNIZED : result;
}
public static final int AUTHENTICATION_FIELD_NUMBER = 6;
private int authentication_ = 0;
/**
* .grafeas.v1.CVSS.Authentication authentication = 6;
*
* @return The enum numeric value on the wire for authentication.
*/
@java.lang.Override
public int getAuthenticationValue() {
return authentication_;
}
/**
* .grafeas.v1.CVSS.Authentication authentication = 6;
*
* @return The authentication.
*/
@java.lang.Override
public io.grafeas.v1.CVSS.Authentication getAuthentication() {
io.grafeas.v1.CVSS.Authentication result =
io.grafeas.v1.CVSS.Authentication.forNumber(authentication_);
return result == null ? io.grafeas.v1.CVSS.Authentication.UNRECOGNIZED : result;
}
public static final int PRIVILEGES_REQUIRED_FIELD_NUMBER = 7;
private int privilegesRequired_ = 0;
/**
* .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7;
*
* @return The enum numeric value on the wire for privilegesRequired.
*/
@java.lang.Override
public int getPrivilegesRequiredValue() {
return privilegesRequired_;
}
/**
* .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7;
*
* @return The privilegesRequired.
*/
@java.lang.Override
public io.grafeas.v1.CVSS.PrivilegesRequired getPrivilegesRequired() {
io.grafeas.v1.CVSS.PrivilegesRequired result =
io.grafeas.v1.CVSS.PrivilegesRequired.forNumber(privilegesRequired_);
return result == null ? io.grafeas.v1.CVSS.PrivilegesRequired.UNRECOGNIZED : result;
}
public static final int USER_INTERACTION_FIELD_NUMBER = 8;
private int userInteraction_ = 0;
/**
* .grafeas.v1.CVSS.UserInteraction user_interaction = 8;
*
* @return The enum numeric value on the wire for userInteraction.
*/
@java.lang.Override
public int getUserInteractionValue() {
return userInteraction_;
}
/**
* .grafeas.v1.CVSS.UserInteraction user_interaction = 8;
*
* @return The userInteraction.
*/
@java.lang.Override
public io.grafeas.v1.CVSS.UserInteraction getUserInteraction() {
io.grafeas.v1.CVSS.UserInteraction result =
io.grafeas.v1.CVSS.UserInteraction.forNumber(userInteraction_);
return result == null ? io.grafeas.v1.CVSS.UserInteraction.UNRECOGNIZED : result;
}
public static final int SCOPE_FIELD_NUMBER = 9;
private int scope_ = 0;
/**
* .grafeas.v1.CVSS.Scope scope = 9;
*
* @return The enum numeric value on the wire for scope.
*/
@java.lang.Override
public int getScopeValue() {
return scope_;
}
/**
* .grafeas.v1.CVSS.Scope scope = 9;
*
* @return The scope.
*/
@java.lang.Override
public io.grafeas.v1.CVSS.Scope getScope() {
io.grafeas.v1.CVSS.Scope result = io.grafeas.v1.CVSS.Scope.forNumber(scope_);
return result == null ? io.grafeas.v1.CVSS.Scope.UNRECOGNIZED : result;
}
public static final int CONFIDENTIALITY_IMPACT_FIELD_NUMBER = 10;
private int confidentialityImpact_ = 0;
/**
* .grafeas.v1.CVSS.Impact confidentiality_impact = 10;
*
* @return The enum numeric value on the wire for confidentialityImpact.
*/
@java.lang.Override
public int getConfidentialityImpactValue() {
return confidentialityImpact_;
}
/**
* .grafeas.v1.CVSS.Impact confidentiality_impact = 10;
*
* @return The confidentialityImpact.
*/
@java.lang.Override
public io.grafeas.v1.CVSS.Impact getConfidentialityImpact() {
io.grafeas.v1.CVSS.Impact result = io.grafeas.v1.CVSS.Impact.forNumber(confidentialityImpact_);
return result == null ? io.grafeas.v1.CVSS.Impact.UNRECOGNIZED : result;
}
public static final int INTEGRITY_IMPACT_FIELD_NUMBER = 11;
private int integrityImpact_ = 0;
/**
* .grafeas.v1.CVSS.Impact integrity_impact = 11;
*
* @return The enum numeric value on the wire for integrityImpact.
*/
@java.lang.Override
public int getIntegrityImpactValue() {
return integrityImpact_;
}
/**
* .grafeas.v1.CVSS.Impact integrity_impact = 11;
*
* @return The integrityImpact.
*/
@java.lang.Override
public io.grafeas.v1.CVSS.Impact getIntegrityImpact() {
io.grafeas.v1.CVSS.Impact result = io.grafeas.v1.CVSS.Impact.forNumber(integrityImpact_);
return result == null ? io.grafeas.v1.CVSS.Impact.UNRECOGNIZED : result;
}
public static final int AVAILABILITY_IMPACT_FIELD_NUMBER = 12;
private int availabilityImpact_ = 0;
/**
* .grafeas.v1.CVSS.Impact availability_impact = 12;
*
* @return The enum numeric value on the wire for availabilityImpact.
*/
@java.lang.Override
public int getAvailabilityImpactValue() {
return availabilityImpact_;
}
/**
* .grafeas.v1.CVSS.Impact availability_impact = 12;
*
* @return The availabilityImpact.
*/
@java.lang.Override
public io.grafeas.v1.CVSS.Impact getAvailabilityImpact() {
io.grafeas.v1.CVSS.Impact result = io.grafeas.v1.CVSS.Impact.forNumber(availabilityImpact_);
return result == null ? io.grafeas.v1.CVSS.Impact.UNRECOGNIZED : result;
}
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 (java.lang.Float.floatToRawIntBits(baseScore_) != 0) {
output.writeFloat(1, baseScore_);
}
if (java.lang.Float.floatToRawIntBits(exploitabilityScore_) != 0) {
output.writeFloat(2, exploitabilityScore_);
}
if (java.lang.Float.floatToRawIntBits(impactScore_) != 0) {
output.writeFloat(3, impactScore_);
}
if (attackVector_ != io.grafeas.v1.CVSS.AttackVector.ATTACK_VECTOR_UNSPECIFIED.getNumber()) {
output.writeEnum(4, attackVector_);
}
if (attackComplexity_
!= io.grafeas.v1.CVSS.AttackComplexity.ATTACK_COMPLEXITY_UNSPECIFIED.getNumber()) {
output.writeEnum(5, attackComplexity_);
}
if (authentication_
!= io.grafeas.v1.CVSS.Authentication.AUTHENTICATION_UNSPECIFIED.getNumber()) {
output.writeEnum(6, authentication_);
}
if (privilegesRequired_
!= io.grafeas.v1.CVSS.PrivilegesRequired.PRIVILEGES_REQUIRED_UNSPECIFIED.getNumber()) {
output.writeEnum(7, privilegesRequired_);
}
if (userInteraction_
!= io.grafeas.v1.CVSS.UserInteraction.USER_INTERACTION_UNSPECIFIED.getNumber()) {
output.writeEnum(8, userInteraction_);
}
if (scope_ != io.grafeas.v1.CVSS.Scope.SCOPE_UNSPECIFIED.getNumber()) {
output.writeEnum(9, scope_);
}
if (confidentialityImpact_ != io.grafeas.v1.CVSS.Impact.IMPACT_UNSPECIFIED.getNumber()) {
output.writeEnum(10, confidentialityImpact_);
}
if (integrityImpact_ != io.grafeas.v1.CVSS.Impact.IMPACT_UNSPECIFIED.getNumber()) {
output.writeEnum(11, integrityImpact_);
}
if (availabilityImpact_ != io.grafeas.v1.CVSS.Impact.IMPACT_UNSPECIFIED.getNumber()) {
output.writeEnum(12, availabilityImpact_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (java.lang.Float.floatToRawIntBits(baseScore_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, baseScore_);
}
if (java.lang.Float.floatToRawIntBits(exploitabilityScore_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, exploitabilityScore_);
}
if (java.lang.Float.floatToRawIntBits(impactScore_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, impactScore_);
}
if (attackVector_ != io.grafeas.v1.CVSS.AttackVector.ATTACK_VECTOR_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, attackVector_);
}
if (attackComplexity_
!= io.grafeas.v1.CVSS.AttackComplexity.ATTACK_COMPLEXITY_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, attackComplexity_);
}
if (authentication_
!= io.grafeas.v1.CVSS.Authentication.AUTHENTICATION_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, authentication_);
}
if (privilegesRequired_
!= io.grafeas.v1.CVSS.PrivilegesRequired.PRIVILEGES_REQUIRED_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, privilegesRequired_);
}
if (userInteraction_
!= io.grafeas.v1.CVSS.UserInteraction.USER_INTERACTION_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, userInteraction_);
}
if (scope_ != io.grafeas.v1.CVSS.Scope.SCOPE_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, scope_);
}
if (confidentialityImpact_ != io.grafeas.v1.CVSS.Impact.IMPACT_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, confidentialityImpact_);
}
if (integrityImpact_ != io.grafeas.v1.CVSS.Impact.IMPACT_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(11, integrityImpact_);
}
if (availabilityImpact_ != io.grafeas.v1.CVSS.Impact.IMPACT_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(12, availabilityImpact_);
}
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 io.grafeas.v1.CVSS)) {
return super.equals(obj);
}
io.grafeas.v1.CVSS other = (io.grafeas.v1.CVSS) obj;
if (java.lang.Float.floatToIntBits(getBaseScore())
!= java.lang.Float.floatToIntBits(other.getBaseScore())) return false;
if (java.lang.Float.floatToIntBits(getExploitabilityScore())
!= java.lang.Float.floatToIntBits(other.getExploitabilityScore())) return false;
if (java.lang.Float.floatToIntBits(getImpactScore())
!= java.lang.Float.floatToIntBits(other.getImpactScore())) return false;
if (attackVector_ != other.attackVector_) return false;
if (attackComplexity_ != other.attackComplexity_) return false;
if (authentication_ != other.authentication_) return false;
if (privilegesRequired_ != other.privilegesRequired_) return false;
if (userInteraction_ != other.userInteraction_) return false;
if (scope_ != other.scope_) return false;
if (confidentialityImpact_ != other.confidentialityImpact_) return false;
if (integrityImpact_ != other.integrityImpact_) return false;
if (availabilityImpact_ != other.availabilityImpact_) 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) + BASE_SCORE_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(getBaseScore());
hash = (37 * hash) + EXPLOITABILITY_SCORE_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(getExploitabilityScore());
hash = (37 * hash) + IMPACT_SCORE_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(getImpactScore());
hash = (37 * hash) + ATTACK_VECTOR_FIELD_NUMBER;
hash = (53 * hash) + attackVector_;
hash = (37 * hash) + ATTACK_COMPLEXITY_FIELD_NUMBER;
hash = (53 * hash) + attackComplexity_;
hash = (37 * hash) + AUTHENTICATION_FIELD_NUMBER;
hash = (53 * hash) + authentication_;
hash = (37 * hash) + PRIVILEGES_REQUIRED_FIELD_NUMBER;
hash = (53 * hash) + privilegesRequired_;
hash = (37 * hash) + USER_INTERACTION_FIELD_NUMBER;
hash = (53 * hash) + userInteraction_;
hash = (37 * hash) + SCOPE_FIELD_NUMBER;
hash = (53 * hash) + scope_;
hash = (37 * hash) + CONFIDENTIALITY_IMPACT_FIELD_NUMBER;
hash = (53 * hash) + confidentialityImpact_;
hash = (37 * hash) + INTEGRITY_IMPACT_FIELD_NUMBER;
hash = (53 * hash) + integrityImpact_;
hash = (37 * hash) + AVAILABILITY_IMPACT_FIELD_NUMBER;
hash = (53 * hash) + availabilityImpact_;
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.grafeas.v1.CVSS parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grafeas.v1.CVSS parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grafeas.v1.CVSS parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grafeas.v1.CVSS parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grafeas.v1.CVSS parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grafeas.v1.CVSS parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grafeas.v1.CVSS parseFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.grafeas.v1.CVSS 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 io.grafeas.v1.CVSS parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static io.grafeas.v1.CVSS 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 io.grafeas.v1.CVSS parseFrom(com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.grafeas.v1.CVSS 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(io.grafeas.v1.CVSS 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;
}
/**
*
*
* * Common Vulnerability Scoring System. * For details, see https://www.first.org/cvss/specification-document * This is a message we will try to use for storing various versions of CVSS * rather than making a separate proto for storing a specific version. ** * Protobuf type {@code grafeas.v1.CVSS} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
* The base score is a function of the base metric scores.
*
*
* float base_score = 1;
*
* @return The baseScore.
*/
@java.lang.Override
public float getBaseScore() {
return baseScore_;
}
/**
*
*
*
* The base score is a function of the base metric scores.
*
*
* float base_score = 1;
*
* @param value The baseScore to set.
* @return This builder for chaining.
*/
public Builder setBaseScore(float value) {
baseScore_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* The base score is a function of the base metric scores.
*
*
* float base_score = 1;
*
* @return This builder for chaining.
*/
public Builder clearBaseScore() {
bitField0_ = (bitField0_ & ~0x00000001);
baseScore_ = 0F;
onChanged();
return this;
}
private float exploitabilityScore_;
/**
* float exploitability_score = 2;
*
* @return The exploitabilityScore.
*/
@java.lang.Override
public float getExploitabilityScore() {
return exploitabilityScore_;
}
/**
* float exploitability_score = 2;
*
* @param value The exploitabilityScore to set.
* @return This builder for chaining.
*/
public Builder setExploitabilityScore(float value) {
exploitabilityScore_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* float exploitability_score = 2;
*
* @return This builder for chaining.
*/
public Builder clearExploitabilityScore() {
bitField0_ = (bitField0_ & ~0x00000002);
exploitabilityScore_ = 0F;
onChanged();
return this;
}
private float impactScore_;
/**
* float impact_score = 3;
*
* @return The impactScore.
*/
@java.lang.Override
public float getImpactScore() {
return impactScore_;
}
/**
* float impact_score = 3;
*
* @param value The impactScore to set.
* @return This builder for chaining.
*/
public Builder setImpactScore(float value) {
impactScore_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
* float impact_score = 3;
*
* @return This builder for chaining.
*/
public Builder clearImpactScore() {
bitField0_ = (bitField0_ & ~0x00000004);
impactScore_ = 0F;
onChanged();
return this;
}
private int attackVector_ = 0;
/**
*
*
*
* Base Metrics
* Represents the intrinsic characteristics of a vulnerability that are
* constant over time and across user environments.
*
*
* .grafeas.v1.CVSS.AttackVector attack_vector = 4;
*
* @return The enum numeric value on the wire for attackVector.
*/
@java.lang.Override
public int getAttackVectorValue() {
return attackVector_;
}
/**
*
*
*
* Base Metrics
* Represents the intrinsic characteristics of a vulnerability that are
* constant over time and across user environments.
*
*
* .grafeas.v1.CVSS.AttackVector attack_vector = 4;
*
* @param value The enum numeric value on the wire for attackVector to set.
* @return This builder for chaining.
*/
public Builder setAttackVectorValue(int value) {
attackVector_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Base Metrics
* Represents the intrinsic characteristics of a vulnerability that are
* constant over time and across user environments.
*
*
* .grafeas.v1.CVSS.AttackVector attack_vector = 4;
*
* @return The attackVector.
*/
@java.lang.Override
public io.grafeas.v1.CVSS.AttackVector getAttackVector() {
io.grafeas.v1.CVSS.AttackVector result =
io.grafeas.v1.CVSS.AttackVector.forNumber(attackVector_);
return result == null ? io.grafeas.v1.CVSS.AttackVector.UNRECOGNIZED : result;
}
/**
*
*
*
* Base Metrics
* Represents the intrinsic characteristics of a vulnerability that are
* constant over time and across user environments.
*
*
* .grafeas.v1.CVSS.AttackVector attack_vector = 4;
*
* @param value The attackVector to set.
* @return This builder for chaining.
*/
public Builder setAttackVector(io.grafeas.v1.CVSS.AttackVector value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000008;
attackVector_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Base Metrics
* Represents the intrinsic characteristics of a vulnerability that are
* constant over time and across user environments.
*
*
* .grafeas.v1.CVSS.AttackVector attack_vector = 4;
*
* @return This builder for chaining.
*/
public Builder clearAttackVector() {
bitField0_ = (bitField0_ & ~0x00000008);
attackVector_ = 0;
onChanged();
return this;
}
private int attackComplexity_ = 0;
/**
* .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5;
*
* @return The enum numeric value on the wire for attackComplexity.
*/
@java.lang.Override
public int getAttackComplexityValue() {
return attackComplexity_;
}
/**
* .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5;
*
* @param value The enum numeric value on the wire for attackComplexity to set.
* @return This builder for chaining.
*/
public Builder setAttackComplexityValue(int value) {
attackComplexity_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
* .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5;
*
* @return The attackComplexity.
*/
@java.lang.Override
public io.grafeas.v1.CVSS.AttackComplexity getAttackComplexity() {
io.grafeas.v1.CVSS.AttackComplexity result =
io.grafeas.v1.CVSS.AttackComplexity.forNumber(attackComplexity_);
return result == null ? io.grafeas.v1.CVSS.AttackComplexity.UNRECOGNIZED : result;
}
/**
* .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5;
*
* @param value The attackComplexity to set.
* @return This builder for chaining.
*/
public Builder setAttackComplexity(io.grafeas.v1.CVSS.AttackComplexity value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000010;
attackComplexity_ = value.getNumber();
onChanged();
return this;
}
/**
* .grafeas.v1.CVSS.AttackComplexity attack_complexity = 5;
*
* @return This builder for chaining.
*/
public Builder clearAttackComplexity() {
bitField0_ = (bitField0_ & ~0x00000010);
attackComplexity_ = 0;
onChanged();
return this;
}
private int authentication_ = 0;
/**
* .grafeas.v1.CVSS.Authentication authentication = 6;
*
* @return The enum numeric value on the wire for authentication.
*/
@java.lang.Override
public int getAuthenticationValue() {
return authentication_;
}
/**
* .grafeas.v1.CVSS.Authentication authentication = 6;
*
* @param value The enum numeric value on the wire for authentication to set.
* @return This builder for chaining.
*/
public Builder setAuthenticationValue(int value) {
authentication_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
* .grafeas.v1.CVSS.Authentication authentication = 6;
*
* @return The authentication.
*/
@java.lang.Override
public io.grafeas.v1.CVSS.Authentication getAuthentication() {
io.grafeas.v1.CVSS.Authentication result =
io.grafeas.v1.CVSS.Authentication.forNumber(authentication_);
return result == null ? io.grafeas.v1.CVSS.Authentication.UNRECOGNIZED : result;
}
/**
* .grafeas.v1.CVSS.Authentication authentication = 6;
*
* @param value The authentication to set.
* @return This builder for chaining.
*/
public Builder setAuthentication(io.grafeas.v1.CVSS.Authentication value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000020;
authentication_ = value.getNumber();
onChanged();
return this;
}
/**
* .grafeas.v1.CVSS.Authentication authentication = 6;
*
* @return This builder for chaining.
*/
public Builder clearAuthentication() {
bitField0_ = (bitField0_ & ~0x00000020);
authentication_ = 0;
onChanged();
return this;
}
private int privilegesRequired_ = 0;
/**
* .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7;
*
* @return The enum numeric value on the wire for privilegesRequired.
*/
@java.lang.Override
public int getPrivilegesRequiredValue() {
return privilegesRequired_;
}
/**
* .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7;
*
* @param value The enum numeric value on the wire for privilegesRequired to set.
* @return This builder for chaining.
*/
public Builder setPrivilegesRequiredValue(int value) {
privilegesRequired_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
* .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7;
*
* @return The privilegesRequired.
*/
@java.lang.Override
public io.grafeas.v1.CVSS.PrivilegesRequired getPrivilegesRequired() {
io.grafeas.v1.CVSS.PrivilegesRequired result =
io.grafeas.v1.CVSS.PrivilegesRequired.forNumber(privilegesRequired_);
return result == null ? io.grafeas.v1.CVSS.PrivilegesRequired.UNRECOGNIZED : result;
}
/**
* .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7;
*
* @param value The privilegesRequired to set.
* @return This builder for chaining.
*/
public Builder setPrivilegesRequired(io.grafeas.v1.CVSS.PrivilegesRequired value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000040;
privilegesRequired_ = value.getNumber();
onChanged();
return this;
}
/**
* .grafeas.v1.CVSS.PrivilegesRequired privileges_required = 7;
*
* @return This builder for chaining.
*/
public Builder clearPrivilegesRequired() {
bitField0_ = (bitField0_ & ~0x00000040);
privilegesRequired_ = 0;
onChanged();
return this;
}
private int userInteraction_ = 0;
/**
* .grafeas.v1.CVSS.UserInteraction user_interaction = 8;
*
* @return The enum numeric value on the wire for userInteraction.
*/
@java.lang.Override
public int getUserInteractionValue() {
return userInteraction_;
}
/**
* .grafeas.v1.CVSS.UserInteraction user_interaction = 8;
*
* @param value The enum numeric value on the wire for userInteraction to set.
* @return This builder for chaining.
*/
public Builder setUserInteractionValue(int value) {
userInteraction_ = value;
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
* .grafeas.v1.CVSS.UserInteraction user_interaction = 8;
*
* @return The userInteraction.
*/
@java.lang.Override
public io.grafeas.v1.CVSS.UserInteraction getUserInteraction() {
io.grafeas.v1.CVSS.UserInteraction result =
io.grafeas.v1.CVSS.UserInteraction.forNumber(userInteraction_);
return result == null ? io.grafeas.v1.CVSS.UserInteraction.UNRECOGNIZED : result;
}
/**
* .grafeas.v1.CVSS.UserInteraction user_interaction = 8;
*
* @param value The userInteraction to set.
* @return This builder for chaining.
*/
public Builder setUserInteraction(io.grafeas.v1.CVSS.UserInteraction value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000080;
userInteraction_ = value.getNumber();
onChanged();
return this;
}
/**
* .grafeas.v1.CVSS.UserInteraction user_interaction = 8;
*
* @return This builder for chaining.
*/
public Builder clearUserInteraction() {
bitField0_ = (bitField0_ & ~0x00000080);
userInteraction_ = 0;
onChanged();
return this;
}
private int scope_ = 0;
/**
* .grafeas.v1.CVSS.Scope scope = 9;
*
* @return The enum numeric value on the wire for scope.
*/
@java.lang.Override
public int getScopeValue() {
return scope_;
}
/**
* .grafeas.v1.CVSS.Scope scope = 9;
*
* @param value The enum numeric value on the wire for scope to set.
* @return This builder for chaining.
*/
public Builder setScopeValue(int value) {
scope_ = value;
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
* .grafeas.v1.CVSS.Scope scope = 9;
*
* @return The scope.
*/
@java.lang.Override
public io.grafeas.v1.CVSS.Scope getScope() {
io.grafeas.v1.CVSS.Scope result = io.grafeas.v1.CVSS.Scope.forNumber(scope_);
return result == null ? io.grafeas.v1.CVSS.Scope.UNRECOGNIZED : result;
}
/**
* .grafeas.v1.CVSS.Scope scope = 9;
*
* @param value The scope to set.
* @return This builder for chaining.
*/
public Builder setScope(io.grafeas.v1.CVSS.Scope value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000100;
scope_ = value.getNumber();
onChanged();
return this;
}
/**
* .grafeas.v1.CVSS.Scope scope = 9;
*
* @return This builder for chaining.
*/
public Builder clearScope() {
bitField0_ = (bitField0_ & ~0x00000100);
scope_ = 0;
onChanged();
return this;
}
private int confidentialityImpact_ = 0;
/**
* .grafeas.v1.CVSS.Impact confidentiality_impact = 10;
*
* @return The enum numeric value on the wire for confidentialityImpact.
*/
@java.lang.Override
public int getConfidentialityImpactValue() {
return confidentialityImpact_;
}
/**
* .grafeas.v1.CVSS.Impact confidentiality_impact = 10;
*
* @param value The enum numeric value on the wire for confidentialityImpact to set.
* @return This builder for chaining.
*/
public Builder setConfidentialityImpactValue(int value) {
confidentialityImpact_ = value;
bitField0_ |= 0x00000200;
onChanged();
return this;
}
/**
* .grafeas.v1.CVSS.Impact confidentiality_impact = 10;
*
* @return The confidentialityImpact.
*/
@java.lang.Override
public io.grafeas.v1.CVSS.Impact getConfidentialityImpact() {
io.grafeas.v1.CVSS.Impact result =
io.grafeas.v1.CVSS.Impact.forNumber(confidentialityImpact_);
return result == null ? io.grafeas.v1.CVSS.Impact.UNRECOGNIZED : result;
}
/**
* .grafeas.v1.CVSS.Impact confidentiality_impact = 10;
*
* @param value The confidentialityImpact to set.
* @return This builder for chaining.
*/
public Builder setConfidentialityImpact(io.grafeas.v1.CVSS.Impact value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000200;
confidentialityImpact_ = value.getNumber();
onChanged();
return this;
}
/**
* .grafeas.v1.CVSS.Impact confidentiality_impact = 10;
*
* @return This builder for chaining.
*/
public Builder clearConfidentialityImpact() {
bitField0_ = (bitField0_ & ~0x00000200);
confidentialityImpact_ = 0;
onChanged();
return this;
}
private int integrityImpact_ = 0;
/**
* .grafeas.v1.CVSS.Impact integrity_impact = 11;
*
* @return The enum numeric value on the wire for integrityImpact.
*/
@java.lang.Override
public int getIntegrityImpactValue() {
return integrityImpact_;
}
/**
* .grafeas.v1.CVSS.Impact integrity_impact = 11;
*
* @param value The enum numeric value on the wire for integrityImpact to set.
* @return This builder for chaining.
*/
public Builder setIntegrityImpactValue(int value) {
integrityImpact_ = value;
bitField0_ |= 0x00000400;
onChanged();
return this;
}
/**
* .grafeas.v1.CVSS.Impact integrity_impact = 11;
*
* @return The integrityImpact.
*/
@java.lang.Override
public io.grafeas.v1.CVSS.Impact getIntegrityImpact() {
io.grafeas.v1.CVSS.Impact result = io.grafeas.v1.CVSS.Impact.forNumber(integrityImpact_);
return result == null ? io.grafeas.v1.CVSS.Impact.UNRECOGNIZED : result;
}
/**
* .grafeas.v1.CVSS.Impact integrity_impact = 11;
*
* @param value The integrityImpact to set.
* @return This builder for chaining.
*/
public Builder setIntegrityImpact(io.grafeas.v1.CVSS.Impact value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000400;
integrityImpact_ = value.getNumber();
onChanged();
return this;
}
/**
* .grafeas.v1.CVSS.Impact integrity_impact = 11;
*
* @return This builder for chaining.
*/
public Builder clearIntegrityImpact() {
bitField0_ = (bitField0_ & ~0x00000400);
integrityImpact_ = 0;
onChanged();
return this;
}
private int availabilityImpact_ = 0;
/**
* .grafeas.v1.CVSS.Impact availability_impact = 12;
*
* @return The enum numeric value on the wire for availabilityImpact.
*/
@java.lang.Override
public int getAvailabilityImpactValue() {
return availabilityImpact_;
}
/**
* .grafeas.v1.CVSS.Impact availability_impact = 12;
*
* @param value The enum numeric value on the wire for availabilityImpact to set.
* @return This builder for chaining.
*/
public Builder setAvailabilityImpactValue(int value) {
availabilityImpact_ = value;
bitField0_ |= 0x00000800;
onChanged();
return this;
}
/**
* .grafeas.v1.CVSS.Impact availability_impact = 12;
*
* @return The availabilityImpact.
*/
@java.lang.Override
public io.grafeas.v1.CVSS.Impact getAvailabilityImpact() {
io.grafeas.v1.CVSS.Impact result = io.grafeas.v1.CVSS.Impact.forNumber(availabilityImpact_);
return result == null ? io.grafeas.v1.CVSS.Impact.UNRECOGNIZED : result;
}
/**
* .grafeas.v1.CVSS.Impact availability_impact = 12;
*
* @param value The availabilityImpact to set.
* @return This builder for chaining.
*/
public Builder setAvailabilityImpact(io.grafeas.v1.CVSS.Impact value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000800;
availabilityImpact_ = value.getNumber();
onChanged();
return this;
}
/**
* .grafeas.v1.CVSS.Impact availability_impact = 12;
*
* @return This builder for chaining.
*/
public Builder clearAvailabilityImpact() {
bitField0_ = (bitField0_ & ~0x00000800);
availabilityImpact_ = 0;
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:grafeas.v1.CVSS)
}
// @@protoc_insertion_point(class_scope:grafeas.v1.CVSS)
private static final io.grafeas.v1.CVSS DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.grafeas.v1.CVSS();
}
public static io.grafeas.v1.CVSS getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser