1 /* 2 * Copyright 2019 The Grafeas Authors. All rights reserved. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * https://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 // Generated by the protocol buffer compiler. DO NOT EDIT! 18 // source: grafeas/v1/cvss.proto 19 20 package io.grafeas.v1; 21 22 /** 23 * 24 * 25 * <pre> 26 * Common Vulnerability Scoring System version 3. 27 * For details, see https://www.first.org/cvss/specification-document 28 * </pre> 29 * 30 * Protobuf type {@code grafeas.v1.CVSSv3} 31 */ 32 public final class CVSSv3 extends com.google.protobuf.GeneratedMessageV3 33 implements 34 // @@protoc_insertion_point(message_implements:grafeas.v1.CVSSv3) 35 CVSSv3OrBuilder { 36 private static final long serialVersionUID = 0L; 37 // Use CVSSv3.newBuilder() to construct. CVSSv3(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)38 private CVSSv3(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 39 super(builder); 40 } 41 CVSSv3()42 private CVSSv3() { 43 attackVector_ = 0; 44 attackComplexity_ = 0; 45 privilegesRequired_ = 0; 46 userInteraction_ = 0; 47 scope_ = 0; 48 confidentialityImpact_ = 0; 49 integrityImpact_ = 0; 50 availabilityImpact_ = 0; 51 } 52 53 @java.lang.Override 54 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)55 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 56 return new CVSSv3(); 57 } 58 59 @java.lang.Override getUnknownFields()60 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 61 return this.unknownFields; 62 } 63 getDescriptor()64 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 65 return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSSv3_descriptor; 66 } 67 68 @java.lang.Override 69 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()70 internalGetFieldAccessorTable() { 71 return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSSv3_fieldAccessorTable 72 .ensureFieldAccessorsInitialized( 73 io.grafeas.v1.CVSSv3.class, io.grafeas.v1.CVSSv3.Builder.class); 74 } 75 76 /** Protobuf enum {@code grafeas.v1.CVSSv3.AttackVector} */ 77 public enum AttackVector implements com.google.protobuf.ProtocolMessageEnum { 78 /** <code>ATTACK_VECTOR_UNSPECIFIED = 0;</code> */ 79 ATTACK_VECTOR_UNSPECIFIED(0), 80 /** <code>ATTACK_VECTOR_NETWORK = 1;</code> */ 81 ATTACK_VECTOR_NETWORK(1), 82 /** <code>ATTACK_VECTOR_ADJACENT = 2;</code> */ 83 ATTACK_VECTOR_ADJACENT(2), 84 /** <code>ATTACK_VECTOR_LOCAL = 3;</code> */ 85 ATTACK_VECTOR_LOCAL(3), 86 /** <code>ATTACK_VECTOR_PHYSICAL = 4;</code> */ 87 ATTACK_VECTOR_PHYSICAL(4), 88 UNRECOGNIZED(-1), 89 ; 90 91 /** <code>ATTACK_VECTOR_UNSPECIFIED = 0;</code> */ 92 public static final int ATTACK_VECTOR_UNSPECIFIED_VALUE = 0; 93 /** <code>ATTACK_VECTOR_NETWORK = 1;</code> */ 94 public static final int ATTACK_VECTOR_NETWORK_VALUE = 1; 95 /** <code>ATTACK_VECTOR_ADJACENT = 2;</code> */ 96 public static final int ATTACK_VECTOR_ADJACENT_VALUE = 2; 97 /** <code>ATTACK_VECTOR_LOCAL = 3;</code> */ 98 public static final int ATTACK_VECTOR_LOCAL_VALUE = 3; 99 /** <code>ATTACK_VECTOR_PHYSICAL = 4;</code> */ 100 public static final int ATTACK_VECTOR_PHYSICAL_VALUE = 4; 101 getNumber()102 public final int getNumber() { 103 if (this == UNRECOGNIZED) { 104 throw new java.lang.IllegalArgumentException( 105 "Can't get the number of an unknown enum value."); 106 } 107 return value; 108 } 109 110 /** 111 * @param value The numeric wire value of the corresponding enum entry. 112 * @return The enum associated with the given numeric wire value. 113 * @deprecated Use {@link #forNumber(int)} instead. 114 */ 115 @java.lang.Deprecated valueOf(int value)116 public static AttackVector valueOf(int value) { 117 return forNumber(value); 118 } 119 120 /** 121 * @param value The numeric wire value of the corresponding enum entry. 122 * @return The enum associated with the given numeric wire value. 123 */ forNumber(int value)124 public static AttackVector forNumber(int value) { 125 switch (value) { 126 case 0: 127 return ATTACK_VECTOR_UNSPECIFIED; 128 case 1: 129 return ATTACK_VECTOR_NETWORK; 130 case 2: 131 return ATTACK_VECTOR_ADJACENT; 132 case 3: 133 return ATTACK_VECTOR_LOCAL; 134 case 4: 135 return ATTACK_VECTOR_PHYSICAL; 136 default: 137 return null; 138 } 139 } 140 internalGetValueMap()141 public static com.google.protobuf.Internal.EnumLiteMap<AttackVector> internalGetValueMap() { 142 return internalValueMap; 143 } 144 145 private static final com.google.protobuf.Internal.EnumLiteMap<AttackVector> internalValueMap = 146 new com.google.protobuf.Internal.EnumLiteMap<AttackVector>() { 147 public AttackVector findValueByNumber(int number) { 148 return AttackVector.forNumber(number); 149 } 150 }; 151 getValueDescriptor()152 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 153 if (this == UNRECOGNIZED) { 154 throw new java.lang.IllegalStateException( 155 "Can't get the descriptor of an unrecognized enum value."); 156 } 157 return getDescriptor().getValues().get(ordinal()); 158 } 159 getDescriptorForType()160 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 161 return getDescriptor(); 162 } 163 getDescriptor()164 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 165 return io.grafeas.v1.CVSSv3.getDescriptor().getEnumTypes().get(0); 166 } 167 168 private static final AttackVector[] VALUES = values(); 169 valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)170 public static AttackVector valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 171 if (desc.getType() != getDescriptor()) { 172 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 173 } 174 if (desc.getIndex() == -1) { 175 return UNRECOGNIZED; 176 } 177 return VALUES[desc.getIndex()]; 178 } 179 180 private final int value; 181 AttackVector(int value)182 private AttackVector(int value) { 183 this.value = value; 184 } 185 186 // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSSv3.AttackVector) 187 } 188 189 /** Protobuf enum {@code grafeas.v1.CVSSv3.AttackComplexity} */ 190 public enum AttackComplexity implements com.google.protobuf.ProtocolMessageEnum { 191 /** <code>ATTACK_COMPLEXITY_UNSPECIFIED = 0;</code> */ 192 ATTACK_COMPLEXITY_UNSPECIFIED(0), 193 /** <code>ATTACK_COMPLEXITY_LOW = 1;</code> */ 194 ATTACK_COMPLEXITY_LOW(1), 195 /** <code>ATTACK_COMPLEXITY_HIGH = 2;</code> */ 196 ATTACK_COMPLEXITY_HIGH(2), 197 UNRECOGNIZED(-1), 198 ; 199 200 /** <code>ATTACK_COMPLEXITY_UNSPECIFIED = 0;</code> */ 201 public static final int ATTACK_COMPLEXITY_UNSPECIFIED_VALUE = 0; 202 /** <code>ATTACK_COMPLEXITY_LOW = 1;</code> */ 203 public static final int ATTACK_COMPLEXITY_LOW_VALUE = 1; 204 /** <code>ATTACK_COMPLEXITY_HIGH = 2;</code> */ 205 public static final int ATTACK_COMPLEXITY_HIGH_VALUE = 2; 206 getNumber()207 public final int getNumber() { 208 if (this == UNRECOGNIZED) { 209 throw new java.lang.IllegalArgumentException( 210 "Can't get the number of an unknown enum value."); 211 } 212 return value; 213 } 214 215 /** 216 * @param value The numeric wire value of the corresponding enum entry. 217 * @return The enum associated with the given numeric wire value. 218 * @deprecated Use {@link #forNumber(int)} instead. 219 */ 220 @java.lang.Deprecated valueOf(int value)221 public static AttackComplexity valueOf(int value) { 222 return forNumber(value); 223 } 224 225 /** 226 * @param value The numeric wire value of the corresponding enum entry. 227 * @return The enum associated with the given numeric wire value. 228 */ forNumber(int value)229 public static AttackComplexity forNumber(int value) { 230 switch (value) { 231 case 0: 232 return ATTACK_COMPLEXITY_UNSPECIFIED; 233 case 1: 234 return ATTACK_COMPLEXITY_LOW; 235 case 2: 236 return ATTACK_COMPLEXITY_HIGH; 237 default: 238 return null; 239 } 240 } 241 internalGetValueMap()242 public static com.google.protobuf.Internal.EnumLiteMap<AttackComplexity> internalGetValueMap() { 243 return internalValueMap; 244 } 245 246 private static final com.google.protobuf.Internal.EnumLiteMap<AttackComplexity> 247 internalValueMap = 248 new com.google.protobuf.Internal.EnumLiteMap<AttackComplexity>() { 249 public AttackComplexity findValueByNumber(int number) { 250 return AttackComplexity.forNumber(number); 251 } 252 }; 253 getValueDescriptor()254 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 255 if (this == UNRECOGNIZED) { 256 throw new java.lang.IllegalStateException( 257 "Can't get the descriptor of an unrecognized enum value."); 258 } 259 return getDescriptor().getValues().get(ordinal()); 260 } 261 getDescriptorForType()262 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 263 return getDescriptor(); 264 } 265 getDescriptor()266 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 267 return io.grafeas.v1.CVSSv3.getDescriptor().getEnumTypes().get(1); 268 } 269 270 private static final AttackComplexity[] VALUES = values(); 271 valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc)272 public static AttackComplexity valueOf( 273 com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 274 if (desc.getType() != getDescriptor()) { 275 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 276 } 277 if (desc.getIndex() == -1) { 278 return UNRECOGNIZED; 279 } 280 return VALUES[desc.getIndex()]; 281 } 282 283 private final int value; 284 AttackComplexity(int value)285 private AttackComplexity(int value) { 286 this.value = value; 287 } 288 289 // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSSv3.AttackComplexity) 290 } 291 292 /** Protobuf enum {@code grafeas.v1.CVSSv3.PrivilegesRequired} */ 293 public enum PrivilegesRequired implements com.google.protobuf.ProtocolMessageEnum { 294 /** <code>PRIVILEGES_REQUIRED_UNSPECIFIED = 0;</code> */ 295 PRIVILEGES_REQUIRED_UNSPECIFIED(0), 296 /** <code>PRIVILEGES_REQUIRED_NONE = 1;</code> */ 297 PRIVILEGES_REQUIRED_NONE(1), 298 /** <code>PRIVILEGES_REQUIRED_LOW = 2;</code> */ 299 PRIVILEGES_REQUIRED_LOW(2), 300 /** <code>PRIVILEGES_REQUIRED_HIGH = 3;</code> */ 301 PRIVILEGES_REQUIRED_HIGH(3), 302 UNRECOGNIZED(-1), 303 ; 304 305 /** <code>PRIVILEGES_REQUIRED_UNSPECIFIED = 0;</code> */ 306 public static final int PRIVILEGES_REQUIRED_UNSPECIFIED_VALUE = 0; 307 /** <code>PRIVILEGES_REQUIRED_NONE = 1;</code> */ 308 public static final int PRIVILEGES_REQUIRED_NONE_VALUE = 1; 309 /** <code>PRIVILEGES_REQUIRED_LOW = 2;</code> */ 310 public static final int PRIVILEGES_REQUIRED_LOW_VALUE = 2; 311 /** <code>PRIVILEGES_REQUIRED_HIGH = 3;</code> */ 312 public static final int PRIVILEGES_REQUIRED_HIGH_VALUE = 3; 313 getNumber()314 public final int getNumber() { 315 if (this == UNRECOGNIZED) { 316 throw new java.lang.IllegalArgumentException( 317 "Can't get the number of an unknown enum value."); 318 } 319 return value; 320 } 321 322 /** 323 * @param value The numeric wire value of the corresponding enum entry. 324 * @return The enum associated with the given numeric wire value. 325 * @deprecated Use {@link #forNumber(int)} instead. 326 */ 327 @java.lang.Deprecated valueOf(int value)328 public static PrivilegesRequired valueOf(int value) { 329 return forNumber(value); 330 } 331 332 /** 333 * @param value The numeric wire value of the corresponding enum entry. 334 * @return The enum associated with the given numeric wire value. 335 */ forNumber(int value)336 public static PrivilegesRequired forNumber(int value) { 337 switch (value) { 338 case 0: 339 return PRIVILEGES_REQUIRED_UNSPECIFIED; 340 case 1: 341 return PRIVILEGES_REQUIRED_NONE; 342 case 2: 343 return PRIVILEGES_REQUIRED_LOW; 344 case 3: 345 return PRIVILEGES_REQUIRED_HIGH; 346 default: 347 return null; 348 } 349 } 350 351 public static com.google.protobuf.Internal.EnumLiteMap<PrivilegesRequired> internalGetValueMap()352 internalGetValueMap() { 353 return internalValueMap; 354 } 355 356 private static final com.google.protobuf.Internal.EnumLiteMap<PrivilegesRequired> 357 internalValueMap = 358 new com.google.protobuf.Internal.EnumLiteMap<PrivilegesRequired>() { 359 public PrivilegesRequired findValueByNumber(int number) { 360 return PrivilegesRequired.forNumber(number); 361 } 362 }; 363 getValueDescriptor()364 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 365 if (this == UNRECOGNIZED) { 366 throw new java.lang.IllegalStateException( 367 "Can't get the descriptor of an unrecognized enum value."); 368 } 369 return getDescriptor().getValues().get(ordinal()); 370 } 371 getDescriptorForType()372 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 373 return getDescriptor(); 374 } 375 getDescriptor()376 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 377 return io.grafeas.v1.CVSSv3.getDescriptor().getEnumTypes().get(2); 378 } 379 380 private static final PrivilegesRequired[] VALUES = values(); 381 valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc)382 public static PrivilegesRequired valueOf( 383 com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 384 if (desc.getType() != getDescriptor()) { 385 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 386 } 387 if (desc.getIndex() == -1) { 388 return UNRECOGNIZED; 389 } 390 return VALUES[desc.getIndex()]; 391 } 392 393 private final int value; 394 PrivilegesRequired(int value)395 private PrivilegesRequired(int value) { 396 this.value = value; 397 } 398 399 // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSSv3.PrivilegesRequired) 400 } 401 402 /** Protobuf enum {@code grafeas.v1.CVSSv3.UserInteraction} */ 403 public enum UserInteraction implements com.google.protobuf.ProtocolMessageEnum { 404 /** <code>USER_INTERACTION_UNSPECIFIED = 0;</code> */ 405 USER_INTERACTION_UNSPECIFIED(0), 406 /** <code>USER_INTERACTION_NONE = 1;</code> */ 407 USER_INTERACTION_NONE(1), 408 /** <code>USER_INTERACTION_REQUIRED = 2;</code> */ 409 USER_INTERACTION_REQUIRED(2), 410 UNRECOGNIZED(-1), 411 ; 412 413 /** <code>USER_INTERACTION_UNSPECIFIED = 0;</code> */ 414 public static final int USER_INTERACTION_UNSPECIFIED_VALUE = 0; 415 /** <code>USER_INTERACTION_NONE = 1;</code> */ 416 public static final int USER_INTERACTION_NONE_VALUE = 1; 417 /** <code>USER_INTERACTION_REQUIRED = 2;</code> */ 418 public static final int USER_INTERACTION_REQUIRED_VALUE = 2; 419 getNumber()420 public final int getNumber() { 421 if (this == UNRECOGNIZED) { 422 throw new java.lang.IllegalArgumentException( 423 "Can't get the number of an unknown enum value."); 424 } 425 return value; 426 } 427 428 /** 429 * @param value The numeric wire value of the corresponding enum entry. 430 * @return The enum associated with the given numeric wire value. 431 * @deprecated Use {@link #forNumber(int)} instead. 432 */ 433 @java.lang.Deprecated valueOf(int value)434 public static UserInteraction valueOf(int value) { 435 return forNumber(value); 436 } 437 438 /** 439 * @param value The numeric wire value of the corresponding enum entry. 440 * @return The enum associated with the given numeric wire value. 441 */ forNumber(int value)442 public static UserInteraction forNumber(int value) { 443 switch (value) { 444 case 0: 445 return USER_INTERACTION_UNSPECIFIED; 446 case 1: 447 return USER_INTERACTION_NONE; 448 case 2: 449 return USER_INTERACTION_REQUIRED; 450 default: 451 return null; 452 } 453 } 454 internalGetValueMap()455 public static com.google.protobuf.Internal.EnumLiteMap<UserInteraction> internalGetValueMap() { 456 return internalValueMap; 457 } 458 459 private static final com.google.protobuf.Internal.EnumLiteMap<UserInteraction> 460 internalValueMap = 461 new com.google.protobuf.Internal.EnumLiteMap<UserInteraction>() { 462 public UserInteraction findValueByNumber(int number) { 463 return UserInteraction.forNumber(number); 464 } 465 }; 466 getValueDescriptor()467 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 468 if (this == UNRECOGNIZED) { 469 throw new java.lang.IllegalStateException( 470 "Can't get the descriptor of an unrecognized enum value."); 471 } 472 return getDescriptor().getValues().get(ordinal()); 473 } 474 getDescriptorForType()475 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 476 return getDescriptor(); 477 } 478 getDescriptor()479 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 480 return io.grafeas.v1.CVSSv3.getDescriptor().getEnumTypes().get(3); 481 } 482 483 private static final UserInteraction[] VALUES = values(); 484 valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc)485 public static UserInteraction valueOf( 486 com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 487 if (desc.getType() != getDescriptor()) { 488 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 489 } 490 if (desc.getIndex() == -1) { 491 return UNRECOGNIZED; 492 } 493 return VALUES[desc.getIndex()]; 494 } 495 496 private final int value; 497 UserInteraction(int value)498 private UserInteraction(int value) { 499 this.value = value; 500 } 501 502 // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSSv3.UserInteraction) 503 } 504 505 /** Protobuf enum {@code grafeas.v1.CVSSv3.Scope} */ 506 public enum Scope implements com.google.protobuf.ProtocolMessageEnum { 507 /** <code>SCOPE_UNSPECIFIED = 0;</code> */ 508 SCOPE_UNSPECIFIED(0), 509 /** <code>SCOPE_UNCHANGED = 1;</code> */ 510 SCOPE_UNCHANGED(1), 511 /** <code>SCOPE_CHANGED = 2;</code> */ 512 SCOPE_CHANGED(2), 513 UNRECOGNIZED(-1), 514 ; 515 516 /** <code>SCOPE_UNSPECIFIED = 0;</code> */ 517 public static final int SCOPE_UNSPECIFIED_VALUE = 0; 518 /** <code>SCOPE_UNCHANGED = 1;</code> */ 519 public static final int SCOPE_UNCHANGED_VALUE = 1; 520 /** <code>SCOPE_CHANGED = 2;</code> */ 521 public static final int SCOPE_CHANGED_VALUE = 2; 522 getNumber()523 public final int getNumber() { 524 if (this == UNRECOGNIZED) { 525 throw new java.lang.IllegalArgumentException( 526 "Can't get the number of an unknown enum value."); 527 } 528 return value; 529 } 530 531 /** 532 * @param value The numeric wire value of the corresponding enum entry. 533 * @return The enum associated with the given numeric wire value. 534 * @deprecated Use {@link #forNumber(int)} instead. 535 */ 536 @java.lang.Deprecated valueOf(int value)537 public static Scope valueOf(int value) { 538 return forNumber(value); 539 } 540 541 /** 542 * @param value The numeric wire value of the corresponding enum entry. 543 * @return The enum associated with the given numeric wire value. 544 */ forNumber(int value)545 public static Scope forNumber(int value) { 546 switch (value) { 547 case 0: 548 return SCOPE_UNSPECIFIED; 549 case 1: 550 return SCOPE_UNCHANGED; 551 case 2: 552 return SCOPE_CHANGED; 553 default: 554 return null; 555 } 556 } 557 internalGetValueMap()558 public static com.google.protobuf.Internal.EnumLiteMap<Scope> internalGetValueMap() { 559 return internalValueMap; 560 } 561 562 private static final com.google.protobuf.Internal.EnumLiteMap<Scope> internalValueMap = 563 new com.google.protobuf.Internal.EnumLiteMap<Scope>() { 564 public Scope findValueByNumber(int number) { 565 return Scope.forNumber(number); 566 } 567 }; 568 getValueDescriptor()569 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 570 if (this == UNRECOGNIZED) { 571 throw new java.lang.IllegalStateException( 572 "Can't get the descriptor of an unrecognized enum value."); 573 } 574 return getDescriptor().getValues().get(ordinal()); 575 } 576 getDescriptorForType()577 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 578 return getDescriptor(); 579 } 580 getDescriptor()581 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 582 return io.grafeas.v1.CVSSv3.getDescriptor().getEnumTypes().get(4); 583 } 584 585 private static final Scope[] VALUES = values(); 586 valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)587 public static Scope valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 588 if (desc.getType() != getDescriptor()) { 589 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 590 } 591 if (desc.getIndex() == -1) { 592 return UNRECOGNIZED; 593 } 594 return VALUES[desc.getIndex()]; 595 } 596 597 private final int value; 598 Scope(int value)599 private Scope(int value) { 600 this.value = value; 601 } 602 603 // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSSv3.Scope) 604 } 605 606 /** Protobuf enum {@code grafeas.v1.CVSSv3.Impact} */ 607 public enum Impact implements com.google.protobuf.ProtocolMessageEnum { 608 /** <code>IMPACT_UNSPECIFIED = 0;</code> */ 609 IMPACT_UNSPECIFIED(0), 610 /** <code>IMPACT_HIGH = 1;</code> */ 611 IMPACT_HIGH(1), 612 /** <code>IMPACT_LOW = 2;</code> */ 613 IMPACT_LOW(2), 614 /** <code>IMPACT_NONE = 3;</code> */ 615 IMPACT_NONE(3), 616 UNRECOGNIZED(-1), 617 ; 618 619 /** <code>IMPACT_UNSPECIFIED = 0;</code> */ 620 public static final int IMPACT_UNSPECIFIED_VALUE = 0; 621 /** <code>IMPACT_HIGH = 1;</code> */ 622 public static final int IMPACT_HIGH_VALUE = 1; 623 /** <code>IMPACT_LOW = 2;</code> */ 624 public static final int IMPACT_LOW_VALUE = 2; 625 /** <code>IMPACT_NONE = 3;</code> */ 626 public static final int IMPACT_NONE_VALUE = 3; 627 getNumber()628 public final int getNumber() { 629 if (this == UNRECOGNIZED) { 630 throw new java.lang.IllegalArgumentException( 631 "Can't get the number of an unknown enum value."); 632 } 633 return value; 634 } 635 636 /** 637 * @param value The numeric wire value of the corresponding enum entry. 638 * @return The enum associated with the given numeric wire value. 639 * @deprecated Use {@link #forNumber(int)} instead. 640 */ 641 @java.lang.Deprecated valueOf(int value)642 public static Impact valueOf(int value) { 643 return forNumber(value); 644 } 645 646 /** 647 * @param value The numeric wire value of the corresponding enum entry. 648 * @return The enum associated with the given numeric wire value. 649 */ forNumber(int value)650 public static Impact forNumber(int value) { 651 switch (value) { 652 case 0: 653 return IMPACT_UNSPECIFIED; 654 case 1: 655 return IMPACT_HIGH; 656 case 2: 657 return IMPACT_LOW; 658 case 3: 659 return IMPACT_NONE; 660 default: 661 return null; 662 } 663 } 664 internalGetValueMap()665 public static com.google.protobuf.Internal.EnumLiteMap<Impact> internalGetValueMap() { 666 return internalValueMap; 667 } 668 669 private static final com.google.protobuf.Internal.EnumLiteMap<Impact> internalValueMap = 670 new com.google.protobuf.Internal.EnumLiteMap<Impact>() { 671 public Impact findValueByNumber(int number) { 672 return Impact.forNumber(number); 673 } 674 }; 675 getValueDescriptor()676 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 677 if (this == UNRECOGNIZED) { 678 throw new java.lang.IllegalStateException( 679 "Can't get the descriptor of an unrecognized enum value."); 680 } 681 return getDescriptor().getValues().get(ordinal()); 682 } 683 getDescriptorForType()684 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 685 return getDescriptor(); 686 } 687 getDescriptor()688 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 689 return io.grafeas.v1.CVSSv3.getDescriptor().getEnumTypes().get(5); 690 } 691 692 private static final Impact[] VALUES = values(); 693 valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)694 public static Impact valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 695 if (desc.getType() != getDescriptor()) { 696 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 697 } 698 if (desc.getIndex() == -1) { 699 return UNRECOGNIZED; 700 } 701 return VALUES[desc.getIndex()]; 702 } 703 704 private final int value; 705 Impact(int value)706 private Impact(int value) { 707 this.value = value; 708 } 709 710 // @@protoc_insertion_point(enum_scope:grafeas.v1.CVSSv3.Impact) 711 } 712 713 public static final int BASE_SCORE_FIELD_NUMBER = 1; 714 private float baseScore_ = 0F; 715 /** 716 * 717 * 718 * <pre> 719 * The base score is a function of the base metric scores. 720 * </pre> 721 * 722 * <code>float base_score = 1;</code> 723 * 724 * @return The baseScore. 725 */ 726 @java.lang.Override getBaseScore()727 public float getBaseScore() { 728 return baseScore_; 729 } 730 731 public static final int EXPLOITABILITY_SCORE_FIELD_NUMBER = 2; 732 private float exploitabilityScore_ = 0F; 733 /** 734 * <code>float exploitability_score = 2;</code> 735 * 736 * @return The exploitabilityScore. 737 */ 738 @java.lang.Override getExploitabilityScore()739 public float getExploitabilityScore() { 740 return exploitabilityScore_; 741 } 742 743 public static final int IMPACT_SCORE_FIELD_NUMBER = 3; 744 private float impactScore_ = 0F; 745 /** 746 * <code>float impact_score = 3;</code> 747 * 748 * @return The impactScore. 749 */ 750 @java.lang.Override getImpactScore()751 public float getImpactScore() { 752 return impactScore_; 753 } 754 755 public static final int ATTACK_VECTOR_FIELD_NUMBER = 5; 756 private int attackVector_ = 0; 757 /** 758 * 759 * 760 * <pre> 761 * Base Metrics 762 * Represents the intrinsic characteristics of a vulnerability that are 763 * constant over time and across user environments. 764 * </pre> 765 * 766 * <code>.grafeas.v1.CVSSv3.AttackVector attack_vector = 5;</code> 767 * 768 * @return The enum numeric value on the wire for attackVector. 769 */ 770 @java.lang.Override getAttackVectorValue()771 public int getAttackVectorValue() { 772 return attackVector_; 773 } 774 /** 775 * 776 * 777 * <pre> 778 * Base Metrics 779 * Represents the intrinsic characteristics of a vulnerability that are 780 * constant over time and across user environments. 781 * </pre> 782 * 783 * <code>.grafeas.v1.CVSSv3.AttackVector attack_vector = 5;</code> 784 * 785 * @return The attackVector. 786 */ 787 @java.lang.Override getAttackVector()788 public io.grafeas.v1.CVSSv3.AttackVector getAttackVector() { 789 io.grafeas.v1.CVSSv3.AttackVector result = 790 io.grafeas.v1.CVSSv3.AttackVector.forNumber(attackVector_); 791 return result == null ? io.grafeas.v1.CVSSv3.AttackVector.UNRECOGNIZED : result; 792 } 793 794 public static final int ATTACK_COMPLEXITY_FIELD_NUMBER = 6; 795 private int attackComplexity_ = 0; 796 /** 797 * <code>.grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6;</code> 798 * 799 * @return The enum numeric value on the wire for attackComplexity. 800 */ 801 @java.lang.Override getAttackComplexityValue()802 public int getAttackComplexityValue() { 803 return attackComplexity_; 804 } 805 /** 806 * <code>.grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6;</code> 807 * 808 * @return The attackComplexity. 809 */ 810 @java.lang.Override getAttackComplexity()811 public io.grafeas.v1.CVSSv3.AttackComplexity getAttackComplexity() { 812 io.grafeas.v1.CVSSv3.AttackComplexity result = 813 io.grafeas.v1.CVSSv3.AttackComplexity.forNumber(attackComplexity_); 814 return result == null ? io.grafeas.v1.CVSSv3.AttackComplexity.UNRECOGNIZED : result; 815 } 816 817 public static final int PRIVILEGES_REQUIRED_FIELD_NUMBER = 7; 818 private int privilegesRequired_ = 0; 819 /** 820 * <code>.grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7;</code> 821 * 822 * @return The enum numeric value on the wire for privilegesRequired. 823 */ 824 @java.lang.Override getPrivilegesRequiredValue()825 public int getPrivilegesRequiredValue() { 826 return privilegesRequired_; 827 } 828 /** 829 * <code>.grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7;</code> 830 * 831 * @return The privilegesRequired. 832 */ 833 @java.lang.Override getPrivilegesRequired()834 public io.grafeas.v1.CVSSv3.PrivilegesRequired getPrivilegesRequired() { 835 io.grafeas.v1.CVSSv3.PrivilegesRequired result = 836 io.grafeas.v1.CVSSv3.PrivilegesRequired.forNumber(privilegesRequired_); 837 return result == null ? io.grafeas.v1.CVSSv3.PrivilegesRequired.UNRECOGNIZED : result; 838 } 839 840 public static final int USER_INTERACTION_FIELD_NUMBER = 8; 841 private int userInteraction_ = 0; 842 /** 843 * <code>.grafeas.v1.CVSSv3.UserInteraction user_interaction = 8;</code> 844 * 845 * @return The enum numeric value on the wire for userInteraction. 846 */ 847 @java.lang.Override getUserInteractionValue()848 public int getUserInteractionValue() { 849 return userInteraction_; 850 } 851 /** 852 * <code>.grafeas.v1.CVSSv3.UserInteraction user_interaction = 8;</code> 853 * 854 * @return The userInteraction. 855 */ 856 @java.lang.Override getUserInteraction()857 public io.grafeas.v1.CVSSv3.UserInteraction getUserInteraction() { 858 io.grafeas.v1.CVSSv3.UserInteraction result = 859 io.grafeas.v1.CVSSv3.UserInteraction.forNumber(userInteraction_); 860 return result == null ? io.grafeas.v1.CVSSv3.UserInteraction.UNRECOGNIZED : result; 861 } 862 863 public static final int SCOPE_FIELD_NUMBER = 9; 864 private int scope_ = 0; 865 /** 866 * <code>.grafeas.v1.CVSSv3.Scope scope = 9;</code> 867 * 868 * @return The enum numeric value on the wire for scope. 869 */ 870 @java.lang.Override getScopeValue()871 public int getScopeValue() { 872 return scope_; 873 } 874 /** 875 * <code>.grafeas.v1.CVSSv3.Scope scope = 9;</code> 876 * 877 * @return The scope. 878 */ 879 @java.lang.Override getScope()880 public io.grafeas.v1.CVSSv3.Scope getScope() { 881 io.grafeas.v1.CVSSv3.Scope result = io.grafeas.v1.CVSSv3.Scope.forNumber(scope_); 882 return result == null ? io.grafeas.v1.CVSSv3.Scope.UNRECOGNIZED : result; 883 } 884 885 public static final int CONFIDENTIALITY_IMPACT_FIELD_NUMBER = 10; 886 private int confidentialityImpact_ = 0; 887 /** 888 * <code>.grafeas.v1.CVSSv3.Impact confidentiality_impact = 10;</code> 889 * 890 * @return The enum numeric value on the wire for confidentialityImpact. 891 */ 892 @java.lang.Override getConfidentialityImpactValue()893 public int getConfidentialityImpactValue() { 894 return confidentialityImpact_; 895 } 896 /** 897 * <code>.grafeas.v1.CVSSv3.Impact confidentiality_impact = 10;</code> 898 * 899 * @return The confidentialityImpact. 900 */ 901 @java.lang.Override getConfidentialityImpact()902 public io.grafeas.v1.CVSSv3.Impact getConfidentialityImpact() { 903 io.grafeas.v1.CVSSv3.Impact result = 904 io.grafeas.v1.CVSSv3.Impact.forNumber(confidentialityImpact_); 905 return result == null ? io.grafeas.v1.CVSSv3.Impact.UNRECOGNIZED : result; 906 } 907 908 public static final int INTEGRITY_IMPACT_FIELD_NUMBER = 11; 909 private int integrityImpact_ = 0; 910 /** 911 * <code>.grafeas.v1.CVSSv3.Impact integrity_impact = 11;</code> 912 * 913 * @return The enum numeric value on the wire for integrityImpact. 914 */ 915 @java.lang.Override getIntegrityImpactValue()916 public int getIntegrityImpactValue() { 917 return integrityImpact_; 918 } 919 /** 920 * <code>.grafeas.v1.CVSSv3.Impact integrity_impact = 11;</code> 921 * 922 * @return The integrityImpact. 923 */ 924 @java.lang.Override getIntegrityImpact()925 public io.grafeas.v1.CVSSv3.Impact getIntegrityImpact() { 926 io.grafeas.v1.CVSSv3.Impact result = io.grafeas.v1.CVSSv3.Impact.forNumber(integrityImpact_); 927 return result == null ? io.grafeas.v1.CVSSv3.Impact.UNRECOGNIZED : result; 928 } 929 930 public static final int AVAILABILITY_IMPACT_FIELD_NUMBER = 12; 931 private int availabilityImpact_ = 0; 932 /** 933 * <code>.grafeas.v1.CVSSv3.Impact availability_impact = 12;</code> 934 * 935 * @return The enum numeric value on the wire for availabilityImpact. 936 */ 937 @java.lang.Override getAvailabilityImpactValue()938 public int getAvailabilityImpactValue() { 939 return availabilityImpact_; 940 } 941 /** 942 * <code>.grafeas.v1.CVSSv3.Impact availability_impact = 12;</code> 943 * 944 * @return The availabilityImpact. 945 */ 946 @java.lang.Override getAvailabilityImpact()947 public io.grafeas.v1.CVSSv3.Impact getAvailabilityImpact() { 948 io.grafeas.v1.CVSSv3.Impact result = io.grafeas.v1.CVSSv3.Impact.forNumber(availabilityImpact_); 949 return result == null ? io.grafeas.v1.CVSSv3.Impact.UNRECOGNIZED : result; 950 } 951 952 private byte memoizedIsInitialized = -1; 953 954 @java.lang.Override isInitialized()955 public final boolean isInitialized() { 956 byte isInitialized = memoizedIsInitialized; 957 if (isInitialized == 1) return true; 958 if (isInitialized == 0) return false; 959 960 memoizedIsInitialized = 1; 961 return true; 962 } 963 964 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)965 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 966 if (java.lang.Float.floatToRawIntBits(baseScore_) != 0) { 967 output.writeFloat(1, baseScore_); 968 } 969 if (java.lang.Float.floatToRawIntBits(exploitabilityScore_) != 0) { 970 output.writeFloat(2, exploitabilityScore_); 971 } 972 if (java.lang.Float.floatToRawIntBits(impactScore_) != 0) { 973 output.writeFloat(3, impactScore_); 974 } 975 if (attackVector_ != io.grafeas.v1.CVSSv3.AttackVector.ATTACK_VECTOR_UNSPECIFIED.getNumber()) { 976 output.writeEnum(5, attackVector_); 977 } 978 if (attackComplexity_ 979 != io.grafeas.v1.CVSSv3.AttackComplexity.ATTACK_COMPLEXITY_UNSPECIFIED.getNumber()) { 980 output.writeEnum(6, attackComplexity_); 981 } 982 if (privilegesRequired_ 983 != io.grafeas.v1.CVSSv3.PrivilegesRequired.PRIVILEGES_REQUIRED_UNSPECIFIED.getNumber()) { 984 output.writeEnum(7, privilegesRequired_); 985 } 986 if (userInteraction_ 987 != io.grafeas.v1.CVSSv3.UserInteraction.USER_INTERACTION_UNSPECIFIED.getNumber()) { 988 output.writeEnum(8, userInteraction_); 989 } 990 if (scope_ != io.grafeas.v1.CVSSv3.Scope.SCOPE_UNSPECIFIED.getNumber()) { 991 output.writeEnum(9, scope_); 992 } 993 if (confidentialityImpact_ != io.grafeas.v1.CVSSv3.Impact.IMPACT_UNSPECIFIED.getNumber()) { 994 output.writeEnum(10, confidentialityImpact_); 995 } 996 if (integrityImpact_ != io.grafeas.v1.CVSSv3.Impact.IMPACT_UNSPECIFIED.getNumber()) { 997 output.writeEnum(11, integrityImpact_); 998 } 999 if (availabilityImpact_ != io.grafeas.v1.CVSSv3.Impact.IMPACT_UNSPECIFIED.getNumber()) { 1000 output.writeEnum(12, availabilityImpact_); 1001 } 1002 getUnknownFields().writeTo(output); 1003 } 1004 1005 @java.lang.Override getSerializedSize()1006 public int getSerializedSize() { 1007 int size = memoizedSize; 1008 if (size != -1) return size; 1009 1010 size = 0; 1011 if (java.lang.Float.floatToRawIntBits(baseScore_) != 0) { 1012 size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, baseScore_); 1013 } 1014 if (java.lang.Float.floatToRawIntBits(exploitabilityScore_) != 0) { 1015 size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, exploitabilityScore_); 1016 } 1017 if (java.lang.Float.floatToRawIntBits(impactScore_) != 0) { 1018 size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, impactScore_); 1019 } 1020 if (attackVector_ != io.grafeas.v1.CVSSv3.AttackVector.ATTACK_VECTOR_UNSPECIFIED.getNumber()) { 1021 size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, attackVector_); 1022 } 1023 if (attackComplexity_ 1024 != io.grafeas.v1.CVSSv3.AttackComplexity.ATTACK_COMPLEXITY_UNSPECIFIED.getNumber()) { 1025 size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, attackComplexity_); 1026 } 1027 if (privilegesRequired_ 1028 != io.grafeas.v1.CVSSv3.PrivilegesRequired.PRIVILEGES_REQUIRED_UNSPECIFIED.getNumber()) { 1029 size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, privilegesRequired_); 1030 } 1031 if (userInteraction_ 1032 != io.grafeas.v1.CVSSv3.UserInteraction.USER_INTERACTION_UNSPECIFIED.getNumber()) { 1033 size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, userInteraction_); 1034 } 1035 if (scope_ != io.grafeas.v1.CVSSv3.Scope.SCOPE_UNSPECIFIED.getNumber()) { 1036 size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, scope_); 1037 } 1038 if (confidentialityImpact_ != io.grafeas.v1.CVSSv3.Impact.IMPACT_UNSPECIFIED.getNumber()) { 1039 size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, confidentialityImpact_); 1040 } 1041 if (integrityImpact_ != io.grafeas.v1.CVSSv3.Impact.IMPACT_UNSPECIFIED.getNumber()) { 1042 size += com.google.protobuf.CodedOutputStream.computeEnumSize(11, integrityImpact_); 1043 } 1044 if (availabilityImpact_ != io.grafeas.v1.CVSSv3.Impact.IMPACT_UNSPECIFIED.getNumber()) { 1045 size += com.google.protobuf.CodedOutputStream.computeEnumSize(12, availabilityImpact_); 1046 } 1047 size += getUnknownFields().getSerializedSize(); 1048 memoizedSize = size; 1049 return size; 1050 } 1051 1052 @java.lang.Override equals(final java.lang.Object obj)1053 public boolean equals(final java.lang.Object obj) { 1054 if (obj == this) { 1055 return true; 1056 } 1057 if (!(obj instanceof io.grafeas.v1.CVSSv3)) { 1058 return super.equals(obj); 1059 } 1060 io.grafeas.v1.CVSSv3 other = (io.grafeas.v1.CVSSv3) obj; 1061 1062 if (java.lang.Float.floatToIntBits(getBaseScore()) 1063 != java.lang.Float.floatToIntBits(other.getBaseScore())) return false; 1064 if (java.lang.Float.floatToIntBits(getExploitabilityScore()) 1065 != java.lang.Float.floatToIntBits(other.getExploitabilityScore())) return false; 1066 if (java.lang.Float.floatToIntBits(getImpactScore()) 1067 != java.lang.Float.floatToIntBits(other.getImpactScore())) return false; 1068 if (attackVector_ != other.attackVector_) return false; 1069 if (attackComplexity_ != other.attackComplexity_) return false; 1070 if (privilegesRequired_ != other.privilegesRequired_) return false; 1071 if (userInteraction_ != other.userInteraction_) return false; 1072 if (scope_ != other.scope_) return false; 1073 if (confidentialityImpact_ != other.confidentialityImpact_) return false; 1074 if (integrityImpact_ != other.integrityImpact_) return false; 1075 if (availabilityImpact_ != other.availabilityImpact_) return false; 1076 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 1077 return true; 1078 } 1079 1080 @java.lang.Override hashCode()1081 public int hashCode() { 1082 if (memoizedHashCode != 0) { 1083 return memoizedHashCode; 1084 } 1085 int hash = 41; 1086 hash = (19 * hash) + getDescriptor().hashCode(); 1087 hash = (37 * hash) + BASE_SCORE_FIELD_NUMBER; 1088 hash = (53 * hash) + java.lang.Float.floatToIntBits(getBaseScore()); 1089 hash = (37 * hash) + EXPLOITABILITY_SCORE_FIELD_NUMBER; 1090 hash = (53 * hash) + java.lang.Float.floatToIntBits(getExploitabilityScore()); 1091 hash = (37 * hash) + IMPACT_SCORE_FIELD_NUMBER; 1092 hash = (53 * hash) + java.lang.Float.floatToIntBits(getImpactScore()); 1093 hash = (37 * hash) + ATTACK_VECTOR_FIELD_NUMBER; 1094 hash = (53 * hash) + attackVector_; 1095 hash = (37 * hash) + ATTACK_COMPLEXITY_FIELD_NUMBER; 1096 hash = (53 * hash) + attackComplexity_; 1097 hash = (37 * hash) + PRIVILEGES_REQUIRED_FIELD_NUMBER; 1098 hash = (53 * hash) + privilegesRequired_; 1099 hash = (37 * hash) + USER_INTERACTION_FIELD_NUMBER; 1100 hash = (53 * hash) + userInteraction_; 1101 hash = (37 * hash) + SCOPE_FIELD_NUMBER; 1102 hash = (53 * hash) + scope_; 1103 hash = (37 * hash) + CONFIDENTIALITY_IMPACT_FIELD_NUMBER; 1104 hash = (53 * hash) + confidentialityImpact_; 1105 hash = (37 * hash) + INTEGRITY_IMPACT_FIELD_NUMBER; 1106 hash = (53 * hash) + integrityImpact_; 1107 hash = (37 * hash) + AVAILABILITY_IMPACT_FIELD_NUMBER; 1108 hash = (53 * hash) + availabilityImpact_; 1109 hash = (29 * hash) + getUnknownFields().hashCode(); 1110 memoizedHashCode = hash; 1111 return hash; 1112 } 1113 parseFrom(java.nio.ByteBuffer data)1114 public static io.grafeas.v1.CVSSv3 parseFrom(java.nio.ByteBuffer data) 1115 throws com.google.protobuf.InvalidProtocolBufferException { 1116 return PARSER.parseFrom(data); 1117 } 1118 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1119 public static io.grafeas.v1.CVSSv3 parseFrom( 1120 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1121 throws com.google.protobuf.InvalidProtocolBufferException { 1122 return PARSER.parseFrom(data, extensionRegistry); 1123 } 1124 parseFrom(com.google.protobuf.ByteString data)1125 public static io.grafeas.v1.CVSSv3 parseFrom(com.google.protobuf.ByteString data) 1126 throws com.google.protobuf.InvalidProtocolBufferException { 1127 return PARSER.parseFrom(data); 1128 } 1129 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1130 public static io.grafeas.v1.CVSSv3 parseFrom( 1131 com.google.protobuf.ByteString data, 1132 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1133 throws com.google.protobuf.InvalidProtocolBufferException { 1134 return PARSER.parseFrom(data, extensionRegistry); 1135 } 1136 parseFrom(byte[] data)1137 public static io.grafeas.v1.CVSSv3 parseFrom(byte[] data) 1138 throws com.google.protobuf.InvalidProtocolBufferException { 1139 return PARSER.parseFrom(data); 1140 } 1141 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1142 public static io.grafeas.v1.CVSSv3 parseFrom( 1143 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1144 throws com.google.protobuf.InvalidProtocolBufferException { 1145 return PARSER.parseFrom(data, extensionRegistry); 1146 } 1147 parseFrom(java.io.InputStream input)1148 public static io.grafeas.v1.CVSSv3 parseFrom(java.io.InputStream input) 1149 throws java.io.IOException { 1150 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 1151 } 1152 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1153 public static io.grafeas.v1.CVSSv3 parseFrom( 1154 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1155 throws java.io.IOException { 1156 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 1157 PARSER, input, extensionRegistry); 1158 } 1159 parseDelimitedFrom(java.io.InputStream input)1160 public static io.grafeas.v1.CVSSv3 parseDelimitedFrom(java.io.InputStream input) 1161 throws java.io.IOException { 1162 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 1163 } 1164 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1165 public static io.grafeas.v1.CVSSv3 parseDelimitedFrom( 1166 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1167 throws java.io.IOException { 1168 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 1169 PARSER, input, extensionRegistry); 1170 } 1171 parseFrom(com.google.protobuf.CodedInputStream input)1172 public static io.grafeas.v1.CVSSv3 parseFrom(com.google.protobuf.CodedInputStream input) 1173 throws java.io.IOException { 1174 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 1175 } 1176 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1177 public static io.grafeas.v1.CVSSv3 parseFrom( 1178 com.google.protobuf.CodedInputStream input, 1179 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1180 throws java.io.IOException { 1181 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 1182 PARSER, input, extensionRegistry); 1183 } 1184 1185 @java.lang.Override newBuilderForType()1186 public Builder newBuilderForType() { 1187 return newBuilder(); 1188 } 1189 newBuilder()1190 public static Builder newBuilder() { 1191 return DEFAULT_INSTANCE.toBuilder(); 1192 } 1193 newBuilder(io.grafeas.v1.CVSSv3 prototype)1194 public static Builder newBuilder(io.grafeas.v1.CVSSv3 prototype) { 1195 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 1196 } 1197 1198 @java.lang.Override toBuilder()1199 public Builder toBuilder() { 1200 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 1201 } 1202 1203 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1204 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 1205 Builder builder = new Builder(parent); 1206 return builder; 1207 } 1208 /** 1209 * 1210 * 1211 * <pre> 1212 * Common Vulnerability Scoring System version 3. 1213 * For details, see https://www.first.org/cvss/specification-document 1214 * </pre> 1215 * 1216 * Protobuf type {@code grafeas.v1.CVSSv3} 1217 */ 1218 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 1219 implements 1220 // @@protoc_insertion_point(builder_implements:grafeas.v1.CVSSv3) 1221 io.grafeas.v1.CVSSv3OrBuilder { getDescriptor()1222 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 1223 return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSSv3_descriptor; 1224 } 1225 1226 @java.lang.Override 1227 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()1228 internalGetFieldAccessorTable() { 1229 return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSSv3_fieldAccessorTable 1230 .ensureFieldAccessorsInitialized( 1231 io.grafeas.v1.CVSSv3.class, io.grafeas.v1.CVSSv3.Builder.class); 1232 } 1233 1234 // Construct using io.grafeas.v1.CVSSv3.newBuilder() Builder()1235 private Builder() {} 1236 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1237 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 1238 super(parent); 1239 } 1240 1241 @java.lang.Override clear()1242 public Builder clear() { 1243 super.clear(); 1244 bitField0_ = 0; 1245 baseScore_ = 0F; 1246 exploitabilityScore_ = 0F; 1247 impactScore_ = 0F; 1248 attackVector_ = 0; 1249 attackComplexity_ = 0; 1250 privilegesRequired_ = 0; 1251 userInteraction_ = 0; 1252 scope_ = 0; 1253 confidentialityImpact_ = 0; 1254 integrityImpact_ = 0; 1255 availabilityImpact_ = 0; 1256 return this; 1257 } 1258 1259 @java.lang.Override getDescriptorForType()1260 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 1261 return io.grafeas.v1.CVSSProto.internal_static_grafeas_v1_CVSSv3_descriptor; 1262 } 1263 1264 @java.lang.Override getDefaultInstanceForType()1265 public io.grafeas.v1.CVSSv3 getDefaultInstanceForType() { 1266 return io.grafeas.v1.CVSSv3.getDefaultInstance(); 1267 } 1268 1269 @java.lang.Override build()1270 public io.grafeas.v1.CVSSv3 build() { 1271 io.grafeas.v1.CVSSv3 result = buildPartial(); 1272 if (!result.isInitialized()) { 1273 throw newUninitializedMessageException(result); 1274 } 1275 return result; 1276 } 1277 1278 @java.lang.Override buildPartial()1279 public io.grafeas.v1.CVSSv3 buildPartial() { 1280 io.grafeas.v1.CVSSv3 result = new io.grafeas.v1.CVSSv3(this); 1281 if (bitField0_ != 0) { 1282 buildPartial0(result); 1283 } 1284 onBuilt(); 1285 return result; 1286 } 1287 buildPartial0(io.grafeas.v1.CVSSv3 result)1288 private void buildPartial0(io.grafeas.v1.CVSSv3 result) { 1289 int from_bitField0_ = bitField0_; 1290 if (((from_bitField0_ & 0x00000001) != 0)) { 1291 result.baseScore_ = baseScore_; 1292 } 1293 if (((from_bitField0_ & 0x00000002) != 0)) { 1294 result.exploitabilityScore_ = exploitabilityScore_; 1295 } 1296 if (((from_bitField0_ & 0x00000004) != 0)) { 1297 result.impactScore_ = impactScore_; 1298 } 1299 if (((from_bitField0_ & 0x00000008) != 0)) { 1300 result.attackVector_ = attackVector_; 1301 } 1302 if (((from_bitField0_ & 0x00000010) != 0)) { 1303 result.attackComplexity_ = attackComplexity_; 1304 } 1305 if (((from_bitField0_ & 0x00000020) != 0)) { 1306 result.privilegesRequired_ = privilegesRequired_; 1307 } 1308 if (((from_bitField0_ & 0x00000040) != 0)) { 1309 result.userInteraction_ = userInteraction_; 1310 } 1311 if (((from_bitField0_ & 0x00000080) != 0)) { 1312 result.scope_ = scope_; 1313 } 1314 if (((from_bitField0_ & 0x00000100) != 0)) { 1315 result.confidentialityImpact_ = confidentialityImpact_; 1316 } 1317 if (((from_bitField0_ & 0x00000200) != 0)) { 1318 result.integrityImpact_ = integrityImpact_; 1319 } 1320 if (((from_bitField0_ & 0x00000400) != 0)) { 1321 result.availabilityImpact_ = availabilityImpact_; 1322 } 1323 } 1324 1325 @java.lang.Override clone()1326 public Builder clone() { 1327 return super.clone(); 1328 } 1329 1330 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1331 public Builder setField( 1332 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1333 return super.setField(field, value); 1334 } 1335 1336 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1337 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 1338 return super.clearField(field); 1339 } 1340 1341 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1342 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 1343 return super.clearOneof(oneof); 1344 } 1345 1346 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1347 public Builder setRepeatedField( 1348 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 1349 return super.setRepeatedField(field, index, value); 1350 } 1351 1352 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1353 public Builder addRepeatedField( 1354 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1355 return super.addRepeatedField(field, value); 1356 } 1357 1358 @java.lang.Override mergeFrom(com.google.protobuf.Message other)1359 public Builder mergeFrom(com.google.protobuf.Message other) { 1360 if (other instanceof io.grafeas.v1.CVSSv3) { 1361 return mergeFrom((io.grafeas.v1.CVSSv3) other); 1362 } else { 1363 super.mergeFrom(other); 1364 return this; 1365 } 1366 } 1367 mergeFrom(io.grafeas.v1.CVSSv3 other)1368 public Builder mergeFrom(io.grafeas.v1.CVSSv3 other) { 1369 if (other == io.grafeas.v1.CVSSv3.getDefaultInstance()) return this; 1370 if (other.getBaseScore() != 0F) { 1371 setBaseScore(other.getBaseScore()); 1372 } 1373 if (other.getExploitabilityScore() != 0F) { 1374 setExploitabilityScore(other.getExploitabilityScore()); 1375 } 1376 if (other.getImpactScore() != 0F) { 1377 setImpactScore(other.getImpactScore()); 1378 } 1379 if (other.attackVector_ != 0) { 1380 setAttackVectorValue(other.getAttackVectorValue()); 1381 } 1382 if (other.attackComplexity_ != 0) { 1383 setAttackComplexityValue(other.getAttackComplexityValue()); 1384 } 1385 if (other.privilegesRequired_ != 0) { 1386 setPrivilegesRequiredValue(other.getPrivilegesRequiredValue()); 1387 } 1388 if (other.userInteraction_ != 0) { 1389 setUserInteractionValue(other.getUserInteractionValue()); 1390 } 1391 if (other.scope_ != 0) { 1392 setScopeValue(other.getScopeValue()); 1393 } 1394 if (other.confidentialityImpact_ != 0) { 1395 setConfidentialityImpactValue(other.getConfidentialityImpactValue()); 1396 } 1397 if (other.integrityImpact_ != 0) { 1398 setIntegrityImpactValue(other.getIntegrityImpactValue()); 1399 } 1400 if (other.availabilityImpact_ != 0) { 1401 setAvailabilityImpactValue(other.getAvailabilityImpactValue()); 1402 } 1403 this.mergeUnknownFields(other.getUnknownFields()); 1404 onChanged(); 1405 return this; 1406 } 1407 1408 @java.lang.Override isInitialized()1409 public final boolean isInitialized() { 1410 return true; 1411 } 1412 1413 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1414 public Builder mergeFrom( 1415 com.google.protobuf.CodedInputStream input, 1416 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1417 throws java.io.IOException { 1418 if (extensionRegistry == null) { 1419 throw new java.lang.NullPointerException(); 1420 } 1421 try { 1422 boolean done = false; 1423 while (!done) { 1424 int tag = input.readTag(); 1425 switch (tag) { 1426 case 0: 1427 done = true; 1428 break; 1429 case 13: 1430 { 1431 baseScore_ = input.readFloat(); 1432 bitField0_ |= 0x00000001; 1433 break; 1434 } // case 13 1435 case 21: 1436 { 1437 exploitabilityScore_ = input.readFloat(); 1438 bitField0_ |= 0x00000002; 1439 break; 1440 } // case 21 1441 case 29: 1442 { 1443 impactScore_ = input.readFloat(); 1444 bitField0_ |= 0x00000004; 1445 break; 1446 } // case 29 1447 case 40: 1448 { 1449 attackVector_ = input.readEnum(); 1450 bitField0_ |= 0x00000008; 1451 break; 1452 } // case 40 1453 case 48: 1454 { 1455 attackComplexity_ = input.readEnum(); 1456 bitField0_ |= 0x00000010; 1457 break; 1458 } // case 48 1459 case 56: 1460 { 1461 privilegesRequired_ = input.readEnum(); 1462 bitField0_ |= 0x00000020; 1463 break; 1464 } // case 56 1465 case 64: 1466 { 1467 userInteraction_ = input.readEnum(); 1468 bitField0_ |= 0x00000040; 1469 break; 1470 } // case 64 1471 case 72: 1472 { 1473 scope_ = input.readEnum(); 1474 bitField0_ |= 0x00000080; 1475 break; 1476 } // case 72 1477 case 80: 1478 { 1479 confidentialityImpact_ = input.readEnum(); 1480 bitField0_ |= 0x00000100; 1481 break; 1482 } // case 80 1483 case 88: 1484 { 1485 integrityImpact_ = input.readEnum(); 1486 bitField0_ |= 0x00000200; 1487 break; 1488 } // case 88 1489 case 96: 1490 { 1491 availabilityImpact_ = input.readEnum(); 1492 bitField0_ |= 0x00000400; 1493 break; 1494 } // case 96 1495 default: 1496 { 1497 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 1498 done = true; // was an endgroup tag 1499 } 1500 break; 1501 } // default: 1502 } // switch (tag) 1503 } // while (!done) 1504 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1505 throw e.unwrapIOException(); 1506 } finally { 1507 onChanged(); 1508 } // finally 1509 return this; 1510 } 1511 1512 private int bitField0_; 1513 1514 private float baseScore_; 1515 /** 1516 * 1517 * 1518 * <pre> 1519 * The base score is a function of the base metric scores. 1520 * </pre> 1521 * 1522 * <code>float base_score = 1;</code> 1523 * 1524 * @return The baseScore. 1525 */ 1526 @java.lang.Override getBaseScore()1527 public float getBaseScore() { 1528 return baseScore_; 1529 } 1530 /** 1531 * 1532 * 1533 * <pre> 1534 * The base score is a function of the base metric scores. 1535 * </pre> 1536 * 1537 * <code>float base_score = 1;</code> 1538 * 1539 * @param value The baseScore to set. 1540 * @return This builder for chaining. 1541 */ setBaseScore(float value)1542 public Builder setBaseScore(float value) { 1543 1544 baseScore_ = value; 1545 bitField0_ |= 0x00000001; 1546 onChanged(); 1547 return this; 1548 } 1549 /** 1550 * 1551 * 1552 * <pre> 1553 * The base score is a function of the base metric scores. 1554 * </pre> 1555 * 1556 * <code>float base_score = 1;</code> 1557 * 1558 * @return This builder for chaining. 1559 */ clearBaseScore()1560 public Builder clearBaseScore() { 1561 bitField0_ = (bitField0_ & ~0x00000001); 1562 baseScore_ = 0F; 1563 onChanged(); 1564 return this; 1565 } 1566 1567 private float exploitabilityScore_; 1568 /** 1569 * <code>float exploitability_score = 2;</code> 1570 * 1571 * @return The exploitabilityScore. 1572 */ 1573 @java.lang.Override getExploitabilityScore()1574 public float getExploitabilityScore() { 1575 return exploitabilityScore_; 1576 } 1577 /** 1578 * <code>float exploitability_score = 2;</code> 1579 * 1580 * @param value The exploitabilityScore to set. 1581 * @return This builder for chaining. 1582 */ setExploitabilityScore(float value)1583 public Builder setExploitabilityScore(float value) { 1584 1585 exploitabilityScore_ = value; 1586 bitField0_ |= 0x00000002; 1587 onChanged(); 1588 return this; 1589 } 1590 /** 1591 * <code>float exploitability_score = 2;</code> 1592 * 1593 * @return This builder for chaining. 1594 */ clearExploitabilityScore()1595 public Builder clearExploitabilityScore() { 1596 bitField0_ = (bitField0_ & ~0x00000002); 1597 exploitabilityScore_ = 0F; 1598 onChanged(); 1599 return this; 1600 } 1601 1602 private float impactScore_; 1603 /** 1604 * <code>float impact_score = 3;</code> 1605 * 1606 * @return The impactScore. 1607 */ 1608 @java.lang.Override getImpactScore()1609 public float getImpactScore() { 1610 return impactScore_; 1611 } 1612 /** 1613 * <code>float impact_score = 3;</code> 1614 * 1615 * @param value The impactScore to set. 1616 * @return This builder for chaining. 1617 */ setImpactScore(float value)1618 public Builder setImpactScore(float value) { 1619 1620 impactScore_ = value; 1621 bitField0_ |= 0x00000004; 1622 onChanged(); 1623 return this; 1624 } 1625 /** 1626 * <code>float impact_score = 3;</code> 1627 * 1628 * @return This builder for chaining. 1629 */ clearImpactScore()1630 public Builder clearImpactScore() { 1631 bitField0_ = (bitField0_ & ~0x00000004); 1632 impactScore_ = 0F; 1633 onChanged(); 1634 return this; 1635 } 1636 1637 private int attackVector_ = 0; 1638 /** 1639 * 1640 * 1641 * <pre> 1642 * Base Metrics 1643 * Represents the intrinsic characteristics of a vulnerability that are 1644 * constant over time and across user environments. 1645 * </pre> 1646 * 1647 * <code>.grafeas.v1.CVSSv3.AttackVector attack_vector = 5;</code> 1648 * 1649 * @return The enum numeric value on the wire for attackVector. 1650 */ 1651 @java.lang.Override getAttackVectorValue()1652 public int getAttackVectorValue() { 1653 return attackVector_; 1654 } 1655 /** 1656 * 1657 * 1658 * <pre> 1659 * Base Metrics 1660 * Represents the intrinsic characteristics of a vulnerability that are 1661 * constant over time and across user environments. 1662 * </pre> 1663 * 1664 * <code>.grafeas.v1.CVSSv3.AttackVector attack_vector = 5;</code> 1665 * 1666 * @param value The enum numeric value on the wire for attackVector to set. 1667 * @return This builder for chaining. 1668 */ setAttackVectorValue(int value)1669 public Builder setAttackVectorValue(int value) { 1670 attackVector_ = value; 1671 bitField0_ |= 0x00000008; 1672 onChanged(); 1673 return this; 1674 } 1675 /** 1676 * 1677 * 1678 * <pre> 1679 * Base Metrics 1680 * Represents the intrinsic characteristics of a vulnerability that are 1681 * constant over time and across user environments. 1682 * </pre> 1683 * 1684 * <code>.grafeas.v1.CVSSv3.AttackVector attack_vector = 5;</code> 1685 * 1686 * @return The attackVector. 1687 */ 1688 @java.lang.Override getAttackVector()1689 public io.grafeas.v1.CVSSv3.AttackVector getAttackVector() { 1690 io.grafeas.v1.CVSSv3.AttackVector result = 1691 io.grafeas.v1.CVSSv3.AttackVector.forNumber(attackVector_); 1692 return result == null ? io.grafeas.v1.CVSSv3.AttackVector.UNRECOGNIZED : result; 1693 } 1694 /** 1695 * 1696 * 1697 * <pre> 1698 * Base Metrics 1699 * Represents the intrinsic characteristics of a vulnerability that are 1700 * constant over time and across user environments. 1701 * </pre> 1702 * 1703 * <code>.grafeas.v1.CVSSv3.AttackVector attack_vector = 5;</code> 1704 * 1705 * @param value The attackVector to set. 1706 * @return This builder for chaining. 1707 */ setAttackVector(io.grafeas.v1.CVSSv3.AttackVector value)1708 public Builder setAttackVector(io.grafeas.v1.CVSSv3.AttackVector value) { 1709 if (value == null) { 1710 throw new NullPointerException(); 1711 } 1712 bitField0_ |= 0x00000008; 1713 attackVector_ = value.getNumber(); 1714 onChanged(); 1715 return this; 1716 } 1717 /** 1718 * 1719 * 1720 * <pre> 1721 * Base Metrics 1722 * Represents the intrinsic characteristics of a vulnerability that are 1723 * constant over time and across user environments. 1724 * </pre> 1725 * 1726 * <code>.grafeas.v1.CVSSv3.AttackVector attack_vector = 5;</code> 1727 * 1728 * @return This builder for chaining. 1729 */ clearAttackVector()1730 public Builder clearAttackVector() { 1731 bitField0_ = (bitField0_ & ~0x00000008); 1732 attackVector_ = 0; 1733 onChanged(); 1734 return this; 1735 } 1736 1737 private int attackComplexity_ = 0; 1738 /** 1739 * <code>.grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6;</code> 1740 * 1741 * @return The enum numeric value on the wire for attackComplexity. 1742 */ 1743 @java.lang.Override getAttackComplexityValue()1744 public int getAttackComplexityValue() { 1745 return attackComplexity_; 1746 } 1747 /** 1748 * <code>.grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6;</code> 1749 * 1750 * @param value The enum numeric value on the wire for attackComplexity to set. 1751 * @return This builder for chaining. 1752 */ setAttackComplexityValue(int value)1753 public Builder setAttackComplexityValue(int value) { 1754 attackComplexity_ = value; 1755 bitField0_ |= 0x00000010; 1756 onChanged(); 1757 return this; 1758 } 1759 /** 1760 * <code>.grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6;</code> 1761 * 1762 * @return The attackComplexity. 1763 */ 1764 @java.lang.Override getAttackComplexity()1765 public io.grafeas.v1.CVSSv3.AttackComplexity getAttackComplexity() { 1766 io.grafeas.v1.CVSSv3.AttackComplexity result = 1767 io.grafeas.v1.CVSSv3.AttackComplexity.forNumber(attackComplexity_); 1768 return result == null ? io.grafeas.v1.CVSSv3.AttackComplexity.UNRECOGNIZED : result; 1769 } 1770 /** 1771 * <code>.grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6;</code> 1772 * 1773 * @param value The attackComplexity to set. 1774 * @return This builder for chaining. 1775 */ setAttackComplexity(io.grafeas.v1.CVSSv3.AttackComplexity value)1776 public Builder setAttackComplexity(io.grafeas.v1.CVSSv3.AttackComplexity value) { 1777 if (value == null) { 1778 throw new NullPointerException(); 1779 } 1780 bitField0_ |= 0x00000010; 1781 attackComplexity_ = value.getNumber(); 1782 onChanged(); 1783 return this; 1784 } 1785 /** 1786 * <code>.grafeas.v1.CVSSv3.AttackComplexity attack_complexity = 6;</code> 1787 * 1788 * @return This builder for chaining. 1789 */ clearAttackComplexity()1790 public Builder clearAttackComplexity() { 1791 bitField0_ = (bitField0_ & ~0x00000010); 1792 attackComplexity_ = 0; 1793 onChanged(); 1794 return this; 1795 } 1796 1797 private int privilegesRequired_ = 0; 1798 /** 1799 * <code>.grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7;</code> 1800 * 1801 * @return The enum numeric value on the wire for privilegesRequired. 1802 */ 1803 @java.lang.Override getPrivilegesRequiredValue()1804 public int getPrivilegesRequiredValue() { 1805 return privilegesRequired_; 1806 } 1807 /** 1808 * <code>.grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7;</code> 1809 * 1810 * @param value The enum numeric value on the wire for privilegesRequired to set. 1811 * @return This builder for chaining. 1812 */ setPrivilegesRequiredValue(int value)1813 public Builder setPrivilegesRequiredValue(int value) { 1814 privilegesRequired_ = value; 1815 bitField0_ |= 0x00000020; 1816 onChanged(); 1817 return this; 1818 } 1819 /** 1820 * <code>.grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7;</code> 1821 * 1822 * @return The privilegesRequired. 1823 */ 1824 @java.lang.Override getPrivilegesRequired()1825 public io.grafeas.v1.CVSSv3.PrivilegesRequired getPrivilegesRequired() { 1826 io.grafeas.v1.CVSSv3.PrivilegesRequired result = 1827 io.grafeas.v1.CVSSv3.PrivilegesRequired.forNumber(privilegesRequired_); 1828 return result == null ? io.grafeas.v1.CVSSv3.PrivilegesRequired.UNRECOGNIZED : result; 1829 } 1830 /** 1831 * <code>.grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7;</code> 1832 * 1833 * @param value The privilegesRequired to set. 1834 * @return This builder for chaining. 1835 */ setPrivilegesRequired(io.grafeas.v1.CVSSv3.PrivilegesRequired value)1836 public Builder setPrivilegesRequired(io.grafeas.v1.CVSSv3.PrivilegesRequired value) { 1837 if (value == null) { 1838 throw new NullPointerException(); 1839 } 1840 bitField0_ |= 0x00000020; 1841 privilegesRequired_ = value.getNumber(); 1842 onChanged(); 1843 return this; 1844 } 1845 /** 1846 * <code>.grafeas.v1.CVSSv3.PrivilegesRequired privileges_required = 7;</code> 1847 * 1848 * @return This builder for chaining. 1849 */ clearPrivilegesRequired()1850 public Builder clearPrivilegesRequired() { 1851 bitField0_ = (bitField0_ & ~0x00000020); 1852 privilegesRequired_ = 0; 1853 onChanged(); 1854 return this; 1855 } 1856 1857 private int userInteraction_ = 0; 1858 /** 1859 * <code>.grafeas.v1.CVSSv3.UserInteraction user_interaction = 8;</code> 1860 * 1861 * @return The enum numeric value on the wire for userInteraction. 1862 */ 1863 @java.lang.Override getUserInteractionValue()1864 public int getUserInteractionValue() { 1865 return userInteraction_; 1866 } 1867 /** 1868 * <code>.grafeas.v1.CVSSv3.UserInteraction user_interaction = 8;</code> 1869 * 1870 * @param value The enum numeric value on the wire for userInteraction to set. 1871 * @return This builder for chaining. 1872 */ setUserInteractionValue(int value)1873 public Builder setUserInteractionValue(int value) { 1874 userInteraction_ = value; 1875 bitField0_ |= 0x00000040; 1876 onChanged(); 1877 return this; 1878 } 1879 /** 1880 * <code>.grafeas.v1.CVSSv3.UserInteraction user_interaction = 8;</code> 1881 * 1882 * @return The userInteraction. 1883 */ 1884 @java.lang.Override getUserInteraction()1885 public io.grafeas.v1.CVSSv3.UserInteraction getUserInteraction() { 1886 io.grafeas.v1.CVSSv3.UserInteraction result = 1887 io.grafeas.v1.CVSSv3.UserInteraction.forNumber(userInteraction_); 1888 return result == null ? io.grafeas.v1.CVSSv3.UserInteraction.UNRECOGNIZED : result; 1889 } 1890 /** 1891 * <code>.grafeas.v1.CVSSv3.UserInteraction user_interaction = 8;</code> 1892 * 1893 * @param value The userInteraction to set. 1894 * @return This builder for chaining. 1895 */ setUserInteraction(io.grafeas.v1.CVSSv3.UserInteraction value)1896 public Builder setUserInteraction(io.grafeas.v1.CVSSv3.UserInteraction value) { 1897 if (value == null) { 1898 throw new NullPointerException(); 1899 } 1900 bitField0_ |= 0x00000040; 1901 userInteraction_ = value.getNumber(); 1902 onChanged(); 1903 return this; 1904 } 1905 /** 1906 * <code>.grafeas.v1.CVSSv3.UserInteraction user_interaction = 8;</code> 1907 * 1908 * @return This builder for chaining. 1909 */ clearUserInteraction()1910 public Builder clearUserInteraction() { 1911 bitField0_ = (bitField0_ & ~0x00000040); 1912 userInteraction_ = 0; 1913 onChanged(); 1914 return this; 1915 } 1916 1917 private int scope_ = 0; 1918 /** 1919 * <code>.grafeas.v1.CVSSv3.Scope scope = 9;</code> 1920 * 1921 * @return The enum numeric value on the wire for scope. 1922 */ 1923 @java.lang.Override getScopeValue()1924 public int getScopeValue() { 1925 return scope_; 1926 } 1927 /** 1928 * <code>.grafeas.v1.CVSSv3.Scope scope = 9;</code> 1929 * 1930 * @param value The enum numeric value on the wire for scope to set. 1931 * @return This builder for chaining. 1932 */ setScopeValue(int value)1933 public Builder setScopeValue(int value) { 1934 scope_ = value; 1935 bitField0_ |= 0x00000080; 1936 onChanged(); 1937 return this; 1938 } 1939 /** 1940 * <code>.grafeas.v1.CVSSv3.Scope scope = 9;</code> 1941 * 1942 * @return The scope. 1943 */ 1944 @java.lang.Override getScope()1945 public io.grafeas.v1.CVSSv3.Scope getScope() { 1946 io.grafeas.v1.CVSSv3.Scope result = io.grafeas.v1.CVSSv3.Scope.forNumber(scope_); 1947 return result == null ? io.grafeas.v1.CVSSv3.Scope.UNRECOGNIZED : result; 1948 } 1949 /** 1950 * <code>.grafeas.v1.CVSSv3.Scope scope = 9;</code> 1951 * 1952 * @param value The scope to set. 1953 * @return This builder for chaining. 1954 */ setScope(io.grafeas.v1.CVSSv3.Scope value)1955 public Builder setScope(io.grafeas.v1.CVSSv3.Scope value) { 1956 if (value == null) { 1957 throw new NullPointerException(); 1958 } 1959 bitField0_ |= 0x00000080; 1960 scope_ = value.getNumber(); 1961 onChanged(); 1962 return this; 1963 } 1964 /** 1965 * <code>.grafeas.v1.CVSSv3.Scope scope = 9;</code> 1966 * 1967 * @return This builder for chaining. 1968 */ clearScope()1969 public Builder clearScope() { 1970 bitField0_ = (bitField0_ & ~0x00000080); 1971 scope_ = 0; 1972 onChanged(); 1973 return this; 1974 } 1975 1976 private int confidentialityImpact_ = 0; 1977 /** 1978 * <code>.grafeas.v1.CVSSv3.Impact confidentiality_impact = 10;</code> 1979 * 1980 * @return The enum numeric value on the wire for confidentialityImpact. 1981 */ 1982 @java.lang.Override getConfidentialityImpactValue()1983 public int getConfidentialityImpactValue() { 1984 return confidentialityImpact_; 1985 } 1986 /** 1987 * <code>.grafeas.v1.CVSSv3.Impact confidentiality_impact = 10;</code> 1988 * 1989 * @param value The enum numeric value on the wire for confidentialityImpact to set. 1990 * @return This builder for chaining. 1991 */ setConfidentialityImpactValue(int value)1992 public Builder setConfidentialityImpactValue(int value) { 1993 confidentialityImpact_ = value; 1994 bitField0_ |= 0x00000100; 1995 onChanged(); 1996 return this; 1997 } 1998 /** 1999 * <code>.grafeas.v1.CVSSv3.Impact confidentiality_impact = 10;</code> 2000 * 2001 * @return The confidentialityImpact. 2002 */ 2003 @java.lang.Override getConfidentialityImpact()2004 public io.grafeas.v1.CVSSv3.Impact getConfidentialityImpact() { 2005 io.grafeas.v1.CVSSv3.Impact result = 2006 io.grafeas.v1.CVSSv3.Impact.forNumber(confidentialityImpact_); 2007 return result == null ? io.grafeas.v1.CVSSv3.Impact.UNRECOGNIZED : result; 2008 } 2009 /** 2010 * <code>.grafeas.v1.CVSSv3.Impact confidentiality_impact = 10;</code> 2011 * 2012 * @param value The confidentialityImpact to set. 2013 * @return This builder for chaining. 2014 */ setConfidentialityImpact(io.grafeas.v1.CVSSv3.Impact value)2015 public Builder setConfidentialityImpact(io.grafeas.v1.CVSSv3.Impact value) { 2016 if (value == null) { 2017 throw new NullPointerException(); 2018 } 2019 bitField0_ |= 0x00000100; 2020 confidentialityImpact_ = value.getNumber(); 2021 onChanged(); 2022 return this; 2023 } 2024 /** 2025 * <code>.grafeas.v1.CVSSv3.Impact confidentiality_impact = 10;</code> 2026 * 2027 * @return This builder for chaining. 2028 */ clearConfidentialityImpact()2029 public Builder clearConfidentialityImpact() { 2030 bitField0_ = (bitField0_ & ~0x00000100); 2031 confidentialityImpact_ = 0; 2032 onChanged(); 2033 return this; 2034 } 2035 2036 private int integrityImpact_ = 0; 2037 /** 2038 * <code>.grafeas.v1.CVSSv3.Impact integrity_impact = 11;</code> 2039 * 2040 * @return The enum numeric value on the wire for integrityImpact. 2041 */ 2042 @java.lang.Override getIntegrityImpactValue()2043 public int getIntegrityImpactValue() { 2044 return integrityImpact_; 2045 } 2046 /** 2047 * <code>.grafeas.v1.CVSSv3.Impact integrity_impact = 11;</code> 2048 * 2049 * @param value The enum numeric value on the wire for integrityImpact to set. 2050 * @return This builder for chaining. 2051 */ setIntegrityImpactValue(int value)2052 public Builder setIntegrityImpactValue(int value) { 2053 integrityImpact_ = value; 2054 bitField0_ |= 0x00000200; 2055 onChanged(); 2056 return this; 2057 } 2058 /** 2059 * <code>.grafeas.v1.CVSSv3.Impact integrity_impact = 11;</code> 2060 * 2061 * @return The integrityImpact. 2062 */ 2063 @java.lang.Override getIntegrityImpact()2064 public io.grafeas.v1.CVSSv3.Impact getIntegrityImpact() { 2065 io.grafeas.v1.CVSSv3.Impact result = io.grafeas.v1.CVSSv3.Impact.forNumber(integrityImpact_); 2066 return result == null ? io.grafeas.v1.CVSSv3.Impact.UNRECOGNIZED : result; 2067 } 2068 /** 2069 * <code>.grafeas.v1.CVSSv3.Impact integrity_impact = 11;</code> 2070 * 2071 * @param value The integrityImpact to set. 2072 * @return This builder for chaining. 2073 */ setIntegrityImpact(io.grafeas.v1.CVSSv3.Impact value)2074 public Builder setIntegrityImpact(io.grafeas.v1.CVSSv3.Impact value) { 2075 if (value == null) { 2076 throw new NullPointerException(); 2077 } 2078 bitField0_ |= 0x00000200; 2079 integrityImpact_ = value.getNumber(); 2080 onChanged(); 2081 return this; 2082 } 2083 /** 2084 * <code>.grafeas.v1.CVSSv3.Impact integrity_impact = 11;</code> 2085 * 2086 * @return This builder for chaining. 2087 */ clearIntegrityImpact()2088 public Builder clearIntegrityImpact() { 2089 bitField0_ = (bitField0_ & ~0x00000200); 2090 integrityImpact_ = 0; 2091 onChanged(); 2092 return this; 2093 } 2094 2095 private int availabilityImpact_ = 0; 2096 /** 2097 * <code>.grafeas.v1.CVSSv3.Impact availability_impact = 12;</code> 2098 * 2099 * @return The enum numeric value on the wire for availabilityImpact. 2100 */ 2101 @java.lang.Override getAvailabilityImpactValue()2102 public int getAvailabilityImpactValue() { 2103 return availabilityImpact_; 2104 } 2105 /** 2106 * <code>.grafeas.v1.CVSSv3.Impact availability_impact = 12;</code> 2107 * 2108 * @param value The enum numeric value on the wire for availabilityImpact to set. 2109 * @return This builder for chaining. 2110 */ setAvailabilityImpactValue(int value)2111 public Builder setAvailabilityImpactValue(int value) { 2112 availabilityImpact_ = value; 2113 bitField0_ |= 0x00000400; 2114 onChanged(); 2115 return this; 2116 } 2117 /** 2118 * <code>.grafeas.v1.CVSSv3.Impact availability_impact = 12;</code> 2119 * 2120 * @return The availabilityImpact. 2121 */ 2122 @java.lang.Override getAvailabilityImpact()2123 public io.grafeas.v1.CVSSv3.Impact getAvailabilityImpact() { 2124 io.grafeas.v1.CVSSv3.Impact result = 2125 io.grafeas.v1.CVSSv3.Impact.forNumber(availabilityImpact_); 2126 return result == null ? io.grafeas.v1.CVSSv3.Impact.UNRECOGNIZED : result; 2127 } 2128 /** 2129 * <code>.grafeas.v1.CVSSv3.Impact availability_impact = 12;</code> 2130 * 2131 * @param value The availabilityImpact to set. 2132 * @return This builder for chaining. 2133 */ setAvailabilityImpact(io.grafeas.v1.CVSSv3.Impact value)2134 public Builder setAvailabilityImpact(io.grafeas.v1.CVSSv3.Impact value) { 2135 if (value == null) { 2136 throw new NullPointerException(); 2137 } 2138 bitField0_ |= 0x00000400; 2139 availabilityImpact_ = value.getNumber(); 2140 onChanged(); 2141 return this; 2142 } 2143 /** 2144 * <code>.grafeas.v1.CVSSv3.Impact availability_impact = 12;</code> 2145 * 2146 * @return This builder for chaining. 2147 */ clearAvailabilityImpact()2148 public Builder clearAvailabilityImpact() { 2149 bitField0_ = (bitField0_ & ~0x00000400); 2150 availabilityImpact_ = 0; 2151 onChanged(); 2152 return this; 2153 } 2154 2155 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)2156 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 2157 return super.setUnknownFields(unknownFields); 2158 } 2159 2160 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)2161 public final Builder mergeUnknownFields( 2162 final com.google.protobuf.UnknownFieldSet unknownFields) { 2163 return super.mergeUnknownFields(unknownFields); 2164 } 2165 2166 // @@protoc_insertion_point(builder_scope:grafeas.v1.CVSSv3) 2167 } 2168 2169 // @@protoc_insertion_point(class_scope:grafeas.v1.CVSSv3) 2170 private static final io.grafeas.v1.CVSSv3 DEFAULT_INSTANCE; 2171 2172 static { 2173 DEFAULT_INSTANCE = new io.grafeas.v1.CVSSv3(); 2174 } 2175 getDefaultInstance()2176 public static io.grafeas.v1.CVSSv3 getDefaultInstance() { 2177 return DEFAULT_INSTANCE; 2178 } 2179 2180 private static final com.google.protobuf.Parser<CVSSv3> PARSER = 2181 new com.google.protobuf.AbstractParser<CVSSv3>() { 2182 @java.lang.Override 2183 public CVSSv3 parsePartialFrom( 2184 com.google.protobuf.CodedInputStream input, 2185 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 2186 throws com.google.protobuf.InvalidProtocolBufferException { 2187 Builder builder = newBuilder(); 2188 try { 2189 builder.mergeFrom(input, extensionRegistry); 2190 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 2191 throw e.setUnfinishedMessage(builder.buildPartial()); 2192 } catch (com.google.protobuf.UninitializedMessageException e) { 2193 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 2194 } catch (java.io.IOException e) { 2195 throw new com.google.protobuf.InvalidProtocolBufferException(e) 2196 .setUnfinishedMessage(builder.buildPartial()); 2197 } 2198 return builder.buildPartial(); 2199 } 2200 }; 2201 parser()2202 public static com.google.protobuf.Parser<CVSSv3> parser() { 2203 return PARSER; 2204 } 2205 2206 @java.lang.Override getParserForType()2207 public com.google.protobuf.Parser<CVSSv3> getParserForType() { 2208 return PARSER; 2209 } 2210 2211 @java.lang.Override getDefaultInstanceForType()2212 public io.grafeas.v1.CVSSv3 getDefaultInstanceForType() { 2213 return DEFAULT_INSTANCE; 2214 } 2215 } 2216