001// Generated by the protocol buffer compiler. DO NOT EDIT! 002// source: hapi/release/hook.proto 003 004package hapi.release; 005 006public final class HookOuterClass { 007 private HookOuterClass() {} 008 public static void registerAllExtensions( 009 com.google.protobuf.ExtensionRegistryLite registry) { 010 } 011 012 public static void registerAllExtensions( 013 com.google.protobuf.ExtensionRegistry registry) { 014 registerAllExtensions( 015 (com.google.protobuf.ExtensionRegistryLite) registry); 016 } 017 public interface HookOrBuilder extends 018 // @@protoc_insertion_point(interface_extends:hapi.release.Hook) 019 com.google.protobuf.MessageOrBuilder { 020 021 /** 022 * <code>string name = 1;</code> 023 */ 024 java.lang.String getName(); 025 /** 026 * <code>string name = 1;</code> 027 */ 028 com.google.protobuf.ByteString 029 getNameBytes(); 030 031 /** 032 * <pre> 033 * Kind is the Kubernetes kind. 034 * </pre> 035 * 036 * <code>string kind = 2;</code> 037 */ 038 java.lang.String getKind(); 039 /** 040 * <pre> 041 * Kind is the Kubernetes kind. 042 * </pre> 043 * 044 * <code>string kind = 2;</code> 045 */ 046 com.google.protobuf.ByteString 047 getKindBytes(); 048 049 /** 050 * <pre> 051 * Path is the chart-relative path to the template. 052 * </pre> 053 * 054 * <code>string path = 3;</code> 055 */ 056 java.lang.String getPath(); 057 /** 058 * <pre> 059 * Path is the chart-relative path to the template. 060 * </pre> 061 * 062 * <code>string path = 3;</code> 063 */ 064 com.google.protobuf.ByteString 065 getPathBytes(); 066 067 /** 068 * <pre> 069 * Manifest is the manifest contents. 070 * </pre> 071 * 072 * <code>string manifest = 4;</code> 073 */ 074 java.lang.String getManifest(); 075 /** 076 * <pre> 077 * Manifest is the manifest contents. 078 * </pre> 079 * 080 * <code>string manifest = 4;</code> 081 */ 082 com.google.protobuf.ByteString 083 getManifestBytes(); 084 085 /** 086 * <pre> 087 * Events are the events that this hook fires on. 088 * </pre> 089 * 090 * <code>repeated .hapi.release.Hook.Event events = 5;</code> 091 */ 092 java.util.List<hapi.release.HookOuterClass.Hook.Event> getEventsList(); 093 /** 094 * <pre> 095 * Events are the events that this hook fires on. 096 * </pre> 097 * 098 * <code>repeated .hapi.release.Hook.Event events = 5;</code> 099 */ 100 int getEventsCount(); 101 /** 102 * <pre> 103 * Events are the events that this hook fires on. 104 * </pre> 105 * 106 * <code>repeated .hapi.release.Hook.Event events = 5;</code> 107 */ 108 hapi.release.HookOuterClass.Hook.Event getEvents(int index); 109 /** 110 * <pre> 111 * Events are the events that this hook fires on. 112 * </pre> 113 * 114 * <code>repeated .hapi.release.Hook.Event events = 5;</code> 115 */ 116 java.util.List<java.lang.Integer> 117 getEventsValueList(); 118 /** 119 * <pre> 120 * Events are the events that this hook fires on. 121 * </pre> 122 * 123 * <code>repeated .hapi.release.Hook.Event events = 5;</code> 124 */ 125 int getEventsValue(int index); 126 127 /** 128 * <pre> 129 * LastRun indicates the date/time this was last run. 130 * </pre> 131 * 132 * <code>.google.protobuf.Timestamp last_run = 6;</code> 133 */ 134 boolean hasLastRun(); 135 /** 136 * <pre> 137 * LastRun indicates the date/time this was last run. 138 * </pre> 139 * 140 * <code>.google.protobuf.Timestamp last_run = 6;</code> 141 */ 142 com.google.protobuf.Timestamp getLastRun(); 143 /** 144 * <pre> 145 * LastRun indicates the date/time this was last run. 146 * </pre> 147 * 148 * <code>.google.protobuf.Timestamp last_run = 6;</code> 149 */ 150 com.google.protobuf.TimestampOrBuilder getLastRunOrBuilder(); 151 152 /** 153 * <pre> 154 * Weight indicates the sort order for execution among similar Hook type 155 * </pre> 156 * 157 * <code>int32 weight = 7;</code> 158 */ 159 int getWeight(); 160 } 161 /** 162 * <pre> 163 * Hook defines a hook object. 164 * </pre> 165 * 166 * Protobuf type {@code hapi.release.Hook} 167 */ 168 public static final class Hook extends 169 com.google.protobuf.GeneratedMessageV3 implements 170 // @@protoc_insertion_point(message_implements:hapi.release.Hook) 171 HookOrBuilder { 172 // Use Hook.newBuilder() to construct. 173 private Hook(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 174 super(builder); 175 } 176 private Hook() { 177 name_ = ""; 178 kind_ = ""; 179 path_ = ""; 180 manifest_ = ""; 181 events_ = java.util.Collections.emptyList(); 182 weight_ = 0; 183 } 184 185 @java.lang.Override 186 public final com.google.protobuf.UnknownFieldSet 187 getUnknownFields() { 188 return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); 189 } 190 private Hook( 191 com.google.protobuf.CodedInputStream input, 192 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 193 throws com.google.protobuf.InvalidProtocolBufferException { 194 this(); 195 int mutable_bitField0_ = 0; 196 try { 197 boolean done = false; 198 while (!done) { 199 int tag = input.readTag(); 200 switch (tag) { 201 case 0: 202 done = true; 203 break; 204 default: { 205 if (!input.skipField(tag)) { 206 done = true; 207 } 208 break; 209 } 210 case 10: { 211 java.lang.String s = input.readStringRequireUtf8(); 212 213 name_ = s; 214 break; 215 } 216 case 18: { 217 java.lang.String s = input.readStringRequireUtf8(); 218 219 kind_ = s; 220 break; 221 } 222 case 26: { 223 java.lang.String s = input.readStringRequireUtf8(); 224 225 path_ = s; 226 break; 227 } 228 case 34: { 229 java.lang.String s = input.readStringRequireUtf8(); 230 231 manifest_ = s; 232 break; 233 } 234 case 40: { 235 int rawValue = input.readEnum(); 236 if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { 237 events_ = new java.util.ArrayList<java.lang.Integer>(); 238 mutable_bitField0_ |= 0x00000010; 239 } 240 events_.add(rawValue); 241 break; 242 } 243 case 42: { 244 int length = input.readRawVarint32(); 245 int oldLimit = input.pushLimit(length); 246 while(input.getBytesUntilLimit() > 0) { 247 int rawValue = input.readEnum(); 248 if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { 249 events_ = new java.util.ArrayList<java.lang.Integer>(); 250 mutable_bitField0_ |= 0x00000010; 251 } 252 events_.add(rawValue); 253 } 254 input.popLimit(oldLimit); 255 break; 256 } 257 case 50: { 258 com.google.protobuf.Timestamp.Builder subBuilder = null; 259 if (lastRun_ != null) { 260 subBuilder = lastRun_.toBuilder(); 261 } 262 lastRun_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); 263 if (subBuilder != null) { 264 subBuilder.mergeFrom(lastRun_); 265 lastRun_ = subBuilder.buildPartial(); 266 } 267 268 break; 269 } 270 case 56: { 271 272 weight_ = input.readInt32(); 273 break; 274 } 275 } 276 } 277 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 278 throw e.setUnfinishedMessage(this); 279 } catch (java.io.IOException e) { 280 throw new com.google.protobuf.InvalidProtocolBufferException( 281 e).setUnfinishedMessage(this); 282 } finally { 283 if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { 284 events_ = java.util.Collections.unmodifiableList(events_); 285 } 286 makeExtensionsImmutable(); 287 } 288 } 289 public static final com.google.protobuf.Descriptors.Descriptor 290 getDescriptor() { 291 return hapi.release.HookOuterClass.internal_static_hapi_release_Hook_descriptor; 292 } 293 294 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable 295 internalGetFieldAccessorTable() { 296 return hapi.release.HookOuterClass.internal_static_hapi_release_Hook_fieldAccessorTable 297 .ensureFieldAccessorsInitialized( 298 hapi.release.HookOuterClass.Hook.class, hapi.release.HookOuterClass.Hook.Builder.class); 299 } 300 301 /** 302 * Protobuf enum {@code hapi.release.Hook.Event} 303 */ 304 public enum Event 305 implements com.google.protobuf.ProtocolMessageEnum { 306 /** 307 * <code>UNKNOWN = 0;</code> 308 */ 309 UNKNOWN(0), 310 /** 311 * <code>PRE_INSTALL = 1;</code> 312 */ 313 PRE_INSTALL(1), 314 /** 315 * <code>POST_INSTALL = 2;</code> 316 */ 317 POST_INSTALL(2), 318 /** 319 * <code>PRE_DELETE = 3;</code> 320 */ 321 PRE_DELETE(3), 322 /** 323 * <code>POST_DELETE = 4;</code> 324 */ 325 POST_DELETE(4), 326 /** 327 * <code>PRE_UPGRADE = 5;</code> 328 */ 329 PRE_UPGRADE(5), 330 /** 331 * <code>POST_UPGRADE = 6;</code> 332 */ 333 POST_UPGRADE(6), 334 /** 335 * <code>PRE_ROLLBACK = 7;</code> 336 */ 337 PRE_ROLLBACK(7), 338 /** 339 * <code>POST_ROLLBACK = 8;</code> 340 */ 341 POST_ROLLBACK(8), 342 /** 343 * <code>RELEASE_TEST_SUCCESS = 9;</code> 344 */ 345 RELEASE_TEST_SUCCESS(9), 346 /** 347 * <code>RELEASE_TEST_FAILURE = 10;</code> 348 */ 349 RELEASE_TEST_FAILURE(10), 350 UNRECOGNIZED(-1), 351 ; 352 353 /** 354 * <code>UNKNOWN = 0;</code> 355 */ 356 public static final int UNKNOWN_VALUE = 0; 357 /** 358 * <code>PRE_INSTALL = 1;</code> 359 */ 360 public static final int PRE_INSTALL_VALUE = 1; 361 /** 362 * <code>POST_INSTALL = 2;</code> 363 */ 364 public static final int POST_INSTALL_VALUE = 2; 365 /** 366 * <code>PRE_DELETE = 3;</code> 367 */ 368 public static final int PRE_DELETE_VALUE = 3; 369 /** 370 * <code>POST_DELETE = 4;</code> 371 */ 372 public static final int POST_DELETE_VALUE = 4; 373 /** 374 * <code>PRE_UPGRADE = 5;</code> 375 */ 376 public static final int PRE_UPGRADE_VALUE = 5; 377 /** 378 * <code>POST_UPGRADE = 6;</code> 379 */ 380 public static final int POST_UPGRADE_VALUE = 6; 381 /** 382 * <code>PRE_ROLLBACK = 7;</code> 383 */ 384 public static final int PRE_ROLLBACK_VALUE = 7; 385 /** 386 * <code>POST_ROLLBACK = 8;</code> 387 */ 388 public static final int POST_ROLLBACK_VALUE = 8; 389 /** 390 * <code>RELEASE_TEST_SUCCESS = 9;</code> 391 */ 392 public static final int RELEASE_TEST_SUCCESS_VALUE = 9; 393 /** 394 * <code>RELEASE_TEST_FAILURE = 10;</code> 395 */ 396 public static final int RELEASE_TEST_FAILURE_VALUE = 10; 397 398 399 public final int getNumber() { 400 if (this == UNRECOGNIZED) { 401 throw new java.lang.IllegalArgumentException( 402 "Can't get the number of an unknown enum value."); 403 } 404 return value; 405 } 406 407 /** 408 * @deprecated Use {@link #forNumber(int)} instead. 409 */ 410 @java.lang.Deprecated 411 public static Event valueOf(int value) { 412 return forNumber(value); 413 } 414 415 public static Event forNumber(int value) { 416 switch (value) { 417 case 0: return UNKNOWN; 418 case 1: return PRE_INSTALL; 419 case 2: return POST_INSTALL; 420 case 3: return PRE_DELETE; 421 case 4: return POST_DELETE; 422 case 5: return PRE_UPGRADE; 423 case 6: return POST_UPGRADE; 424 case 7: return PRE_ROLLBACK; 425 case 8: return POST_ROLLBACK; 426 case 9: return RELEASE_TEST_SUCCESS; 427 case 10: return RELEASE_TEST_FAILURE; 428 default: return null; 429 } 430 } 431 432 public static com.google.protobuf.Internal.EnumLiteMap<Event> 433 internalGetValueMap() { 434 return internalValueMap; 435 } 436 private static final com.google.protobuf.Internal.EnumLiteMap< 437 Event> internalValueMap = 438 new com.google.protobuf.Internal.EnumLiteMap<Event>() { 439 public Event findValueByNumber(int number) { 440 return Event.forNumber(number); 441 } 442 }; 443 444 public final com.google.protobuf.Descriptors.EnumValueDescriptor 445 getValueDescriptor() { 446 return getDescriptor().getValues().get(ordinal()); 447 } 448 public final com.google.protobuf.Descriptors.EnumDescriptor 449 getDescriptorForType() { 450 return getDescriptor(); 451 } 452 public static final com.google.protobuf.Descriptors.EnumDescriptor 453 getDescriptor() { 454 return hapi.release.HookOuterClass.Hook.getDescriptor().getEnumTypes().get(0); 455 } 456 457 private static final Event[] VALUES = values(); 458 459 public static Event valueOf( 460 com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 461 if (desc.getType() != getDescriptor()) { 462 throw new java.lang.IllegalArgumentException( 463 "EnumValueDescriptor is not for this type."); 464 } 465 if (desc.getIndex() == -1) { 466 return UNRECOGNIZED; 467 } 468 return VALUES[desc.getIndex()]; 469 } 470 471 private final int value; 472 473 private Event(int value) { 474 this.value = value; 475 } 476 477 // @@protoc_insertion_point(enum_scope:hapi.release.Hook.Event) 478 } 479 480 private int bitField0_; 481 public static final int NAME_FIELD_NUMBER = 1; 482 private volatile java.lang.Object name_; 483 /** 484 * <code>string name = 1;</code> 485 */ 486 public java.lang.String getName() { 487 java.lang.Object ref = name_; 488 if (ref instanceof java.lang.String) { 489 return (java.lang.String) ref; 490 } else { 491 com.google.protobuf.ByteString bs = 492 (com.google.protobuf.ByteString) ref; 493 java.lang.String s = bs.toStringUtf8(); 494 name_ = s; 495 return s; 496 } 497 } 498 /** 499 * <code>string name = 1;</code> 500 */ 501 public com.google.protobuf.ByteString 502 getNameBytes() { 503 java.lang.Object ref = name_; 504 if (ref instanceof java.lang.String) { 505 com.google.protobuf.ByteString b = 506 com.google.protobuf.ByteString.copyFromUtf8( 507 (java.lang.String) ref); 508 name_ = b; 509 return b; 510 } else { 511 return (com.google.protobuf.ByteString) ref; 512 } 513 } 514 515 public static final int KIND_FIELD_NUMBER = 2; 516 private volatile java.lang.Object kind_; 517 /** 518 * <pre> 519 * Kind is the Kubernetes kind. 520 * </pre> 521 * 522 * <code>string kind = 2;</code> 523 */ 524 public java.lang.String getKind() { 525 java.lang.Object ref = kind_; 526 if (ref instanceof java.lang.String) { 527 return (java.lang.String) ref; 528 } else { 529 com.google.protobuf.ByteString bs = 530 (com.google.protobuf.ByteString) ref; 531 java.lang.String s = bs.toStringUtf8(); 532 kind_ = s; 533 return s; 534 } 535 } 536 /** 537 * <pre> 538 * Kind is the Kubernetes kind. 539 * </pre> 540 * 541 * <code>string kind = 2;</code> 542 */ 543 public com.google.protobuf.ByteString 544 getKindBytes() { 545 java.lang.Object ref = kind_; 546 if (ref instanceof java.lang.String) { 547 com.google.protobuf.ByteString b = 548 com.google.protobuf.ByteString.copyFromUtf8( 549 (java.lang.String) ref); 550 kind_ = b; 551 return b; 552 } else { 553 return (com.google.protobuf.ByteString) ref; 554 } 555 } 556 557 public static final int PATH_FIELD_NUMBER = 3; 558 private volatile java.lang.Object path_; 559 /** 560 * <pre> 561 * Path is the chart-relative path to the template. 562 * </pre> 563 * 564 * <code>string path = 3;</code> 565 */ 566 public java.lang.String getPath() { 567 java.lang.Object ref = path_; 568 if (ref instanceof java.lang.String) { 569 return (java.lang.String) ref; 570 } else { 571 com.google.protobuf.ByteString bs = 572 (com.google.protobuf.ByteString) ref; 573 java.lang.String s = bs.toStringUtf8(); 574 path_ = s; 575 return s; 576 } 577 } 578 /** 579 * <pre> 580 * Path is the chart-relative path to the template. 581 * </pre> 582 * 583 * <code>string path = 3;</code> 584 */ 585 public com.google.protobuf.ByteString 586 getPathBytes() { 587 java.lang.Object ref = path_; 588 if (ref instanceof java.lang.String) { 589 com.google.protobuf.ByteString b = 590 com.google.protobuf.ByteString.copyFromUtf8( 591 (java.lang.String) ref); 592 path_ = b; 593 return b; 594 } else { 595 return (com.google.protobuf.ByteString) ref; 596 } 597 } 598 599 public static final int MANIFEST_FIELD_NUMBER = 4; 600 private volatile java.lang.Object manifest_; 601 /** 602 * <pre> 603 * Manifest is the manifest contents. 604 * </pre> 605 * 606 * <code>string manifest = 4;</code> 607 */ 608 public java.lang.String getManifest() { 609 java.lang.Object ref = manifest_; 610 if (ref instanceof java.lang.String) { 611 return (java.lang.String) ref; 612 } else { 613 com.google.protobuf.ByteString bs = 614 (com.google.protobuf.ByteString) ref; 615 java.lang.String s = bs.toStringUtf8(); 616 manifest_ = s; 617 return s; 618 } 619 } 620 /** 621 * <pre> 622 * Manifest is the manifest contents. 623 * </pre> 624 * 625 * <code>string manifest = 4;</code> 626 */ 627 public com.google.protobuf.ByteString 628 getManifestBytes() { 629 java.lang.Object ref = manifest_; 630 if (ref instanceof java.lang.String) { 631 com.google.protobuf.ByteString b = 632 com.google.protobuf.ByteString.copyFromUtf8( 633 (java.lang.String) ref); 634 manifest_ = b; 635 return b; 636 } else { 637 return (com.google.protobuf.ByteString) ref; 638 } 639 } 640 641 public static final int EVENTS_FIELD_NUMBER = 5; 642 private java.util.List<java.lang.Integer> events_; 643 private static final com.google.protobuf.Internal.ListAdapter.Converter< 644 java.lang.Integer, hapi.release.HookOuterClass.Hook.Event> events_converter_ = 645 new com.google.protobuf.Internal.ListAdapter.Converter< 646 java.lang.Integer, hapi.release.HookOuterClass.Hook.Event>() { 647 public hapi.release.HookOuterClass.Hook.Event convert(java.lang.Integer from) { 648 hapi.release.HookOuterClass.Hook.Event result = hapi.release.HookOuterClass.Hook.Event.valueOf(from); 649 return result == null ? hapi.release.HookOuterClass.Hook.Event.UNRECOGNIZED : result; 650 } 651 }; 652 /** 653 * <pre> 654 * Events are the events that this hook fires on. 655 * </pre> 656 * 657 * <code>repeated .hapi.release.Hook.Event events = 5;</code> 658 */ 659 public java.util.List<hapi.release.HookOuterClass.Hook.Event> getEventsList() { 660 return new com.google.protobuf.Internal.ListAdapter< 661 java.lang.Integer, hapi.release.HookOuterClass.Hook.Event>(events_, events_converter_); 662 } 663 /** 664 * <pre> 665 * Events are the events that this hook fires on. 666 * </pre> 667 * 668 * <code>repeated .hapi.release.Hook.Event events = 5;</code> 669 */ 670 public int getEventsCount() { 671 return events_.size(); 672 } 673 /** 674 * <pre> 675 * Events are the events that this hook fires on. 676 * </pre> 677 * 678 * <code>repeated .hapi.release.Hook.Event events = 5;</code> 679 */ 680 public hapi.release.HookOuterClass.Hook.Event getEvents(int index) { 681 return events_converter_.convert(events_.get(index)); 682 } 683 /** 684 * <pre> 685 * Events are the events that this hook fires on. 686 * </pre> 687 * 688 * <code>repeated .hapi.release.Hook.Event events = 5;</code> 689 */ 690 public java.util.List<java.lang.Integer> 691 getEventsValueList() { 692 return events_; 693 } 694 /** 695 * <pre> 696 * Events are the events that this hook fires on. 697 * </pre> 698 * 699 * <code>repeated .hapi.release.Hook.Event events = 5;</code> 700 */ 701 public int getEventsValue(int index) { 702 return events_.get(index); 703 } 704 private int eventsMemoizedSerializedSize; 705 706 public static final int LAST_RUN_FIELD_NUMBER = 6; 707 private com.google.protobuf.Timestamp lastRun_; 708 /** 709 * <pre> 710 * LastRun indicates the date/time this was last run. 711 * </pre> 712 * 713 * <code>.google.protobuf.Timestamp last_run = 6;</code> 714 */ 715 public boolean hasLastRun() { 716 return lastRun_ != null; 717 } 718 /** 719 * <pre> 720 * LastRun indicates the date/time this was last run. 721 * </pre> 722 * 723 * <code>.google.protobuf.Timestamp last_run = 6;</code> 724 */ 725 public com.google.protobuf.Timestamp getLastRun() { 726 return lastRun_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lastRun_; 727 } 728 /** 729 * <pre> 730 * LastRun indicates the date/time this was last run. 731 * </pre> 732 * 733 * <code>.google.protobuf.Timestamp last_run = 6;</code> 734 */ 735 public com.google.protobuf.TimestampOrBuilder getLastRunOrBuilder() { 736 return getLastRun(); 737 } 738 739 public static final int WEIGHT_FIELD_NUMBER = 7; 740 private int weight_; 741 /** 742 * <pre> 743 * Weight indicates the sort order for execution among similar Hook type 744 * </pre> 745 * 746 * <code>int32 weight = 7;</code> 747 */ 748 public int getWeight() { 749 return weight_; 750 } 751 752 private byte memoizedIsInitialized = -1; 753 public final boolean isInitialized() { 754 byte isInitialized = memoizedIsInitialized; 755 if (isInitialized == 1) return true; 756 if (isInitialized == 0) return false; 757 758 memoizedIsInitialized = 1; 759 return true; 760 } 761 762 public void writeTo(com.google.protobuf.CodedOutputStream output) 763 throws java.io.IOException { 764 getSerializedSize(); 765 if (!getNameBytes().isEmpty()) { 766 com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); 767 } 768 if (!getKindBytes().isEmpty()) { 769 com.google.protobuf.GeneratedMessageV3.writeString(output, 2, kind_); 770 } 771 if (!getPathBytes().isEmpty()) { 772 com.google.protobuf.GeneratedMessageV3.writeString(output, 3, path_); 773 } 774 if (!getManifestBytes().isEmpty()) { 775 com.google.protobuf.GeneratedMessageV3.writeString(output, 4, manifest_); 776 } 777 if (getEventsList().size() > 0) { 778 output.writeUInt32NoTag(42); 779 output.writeUInt32NoTag(eventsMemoizedSerializedSize); 780 } 781 for (int i = 0; i < events_.size(); i++) { 782 output.writeEnumNoTag(events_.get(i)); 783 } 784 if (lastRun_ != null) { 785 output.writeMessage(6, getLastRun()); 786 } 787 if (weight_ != 0) { 788 output.writeInt32(7, weight_); 789 } 790 } 791 792 public int getSerializedSize() { 793 int size = memoizedSize; 794 if (size != -1) return size; 795 796 size = 0; 797 if (!getNameBytes().isEmpty()) { 798 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); 799 } 800 if (!getKindBytes().isEmpty()) { 801 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, kind_); 802 } 803 if (!getPathBytes().isEmpty()) { 804 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, path_); 805 } 806 if (!getManifestBytes().isEmpty()) { 807 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, manifest_); 808 } 809 { 810 int dataSize = 0; 811 for (int i = 0; i < events_.size(); i++) { 812 dataSize += com.google.protobuf.CodedOutputStream 813 .computeEnumSizeNoTag(events_.get(i)); 814 } 815 size += dataSize; 816 if (!getEventsList().isEmpty()) { size += 1; 817 size += com.google.protobuf.CodedOutputStream 818 .computeUInt32SizeNoTag(dataSize); 819 }eventsMemoizedSerializedSize = dataSize; 820 } 821 if (lastRun_ != null) { 822 size += com.google.protobuf.CodedOutputStream 823 .computeMessageSize(6, getLastRun()); 824 } 825 if (weight_ != 0) { 826 size += com.google.protobuf.CodedOutputStream 827 .computeInt32Size(7, weight_); 828 } 829 memoizedSize = size; 830 return size; 831 } 832 833 private static final long serialVersionUID = 0L; 834 @java.lang.Override 835 public boolean equals(final java.lang.Object obj) { 836 if (obj == this) { 837 return true; 838 } 839 if (!(obj instanceof hapi.release.HookOuterClass.Hook)) { 840 return super.equals(obj); 841 } 842 hapi.release.HookOuterClass.Hook other = (hapi.release.HookOuterClass.Hook) obj; 843 844 boolean result = true; 845 result = result && getName() 846 .equals(other.getName()); 847 result = result && getKind() 848 .equals(other.getKind()); 849 result = result && getPath() 850 .equals(other.getPath()); 851 result = result && getManifest() 852 .equals(other.getManifest()); 853 result = result && events_.equals(other.events_); 854 result = result && (hasLastRun() == other.hasLastRun()); 855 if (hasLastRun()) { 856 result = result && getLastRun() 857 .equals(other.getLastRun()); 858 } 859 result = result && (getWeight() 860 == other.getWeight()); 861 return result; 862 } 863 864 @java.lang.Override 865 public int hashCode() { 866 if (memoizedHashCode != 0) { 867 return memoizedHashCode; 868 } 869 int hash = 41; 870 hash = (19 * hash) + getDescriptor().hashCode(); 871 hash = (37 * hash) + NAME_FIELD_NUMBER; 872 hash = (53 * hash) + getName().hashCode(); 873 hash = (37 * hash) + KIND_FIELD_NUMBER; 874 hash = (53 * hash) + getKind().hashCode(); 875 hash = (37 * hash) + PATH_FIELD_NUMBER; 876 hash = (53 * hash) + getPath().hashCode(); 877 hash = (37 * hash) + MANIFEST_FIELD_NUMBER; 878 hash = (53 * hash) + getManifest().hashCode(); 879 if (getEventsCount() > 0) { 880 hash = (37 * hash) + EVENTS_FIELD_NUMBER; 881 hash = (53 * hash) + events_.hashCode(); 882 } 883 if (hasLastRun()) { 884 hash = (37 * hash) + LAST_RUN_FIELD_NUMBER; 885 hash = (53 * hash) + getLastRun().hashCode(); 886 } 887 hash = (37 * hash) + WEIGHT_FIELD_NUMBER; 888 hash = (53 * hash) + getWeight(); 889 hash = (29 * hash) + unknownFields.hashCode(); 890 memoizedHashCode = hash; 891 return hash; 892 } 893 894 public static hapi.release.HookOuterClass.Hook parseFrom( 895 java.nio.ByteBuffer data) 896 throws com.google.protobuf.InvalidProtocolBufferException { 897 return PARSER.parseFrom(data); 898 } 899 public static hapi.release.HookOuterClass.Hook parseFrom( 900 java.nio.ByteBuffer data, 901 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 902 throws com.google.protobuf.InvalidProtocolBufferException { 903 return PARSER.parseFrom(data, extensionRegistry); 904 } 905 public static hapi.release.HookOuterClass.Hook parseFrom( 906 com.google.protobuf.ByteString data) 907 throws com.google.protobuf.InvalidProtocolBufferException { 908 return PARSER.parseFrom(data); 909 } 910 public static hapi.release.HookOuterClass.Hook parseFrom( 911 com.google.protobuf.ByteString data, 912 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 913 throws com.google.protobuf.InvalidProtocolBufferException { 914 return PARSER.parseFrom(data, extensionRegistry); 915 } 916 public static hapi.release.HookOuterClass.Hook parseFrom(byte[] data) 917 throws com.google.protobuf.InvalidProtocolBufferException { 918 return PARSER.parseFrom(data); 919 } 920 public static hapi.release.HookOuterClass.Hook parseFrom( 921 byte[] data, 922 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 923 throws com.google.protobuf.InvalidProtocolBufferException { 924 return PARSER.parseFrom(data, extensionRegistry); 925 } 926 public static hapi.release.HookOuterClass.Hook parseFrom(java.io.InputStream input) 927 throws java.io.IOException { 928 return com.google.protobuf.GeneratedMessageV3 929 .parseWithIOException(PARSER, input); 930 } 931 public static hapi.release.HookOuterClass.Hook parseFrom( 932 java.io.InputStream input, 933 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 934 throws java.io.IOException { 935 return com.google.protobuf.GeneratedMessageV3 936 .parseWithIOException(PARSER, input, extensionRegistry); 937 } 938 public static hapi.release.HookOuterClass.Hook parseDelimitedFrom(java.io.InputStream input) 939 throws java.io.IOException { 940 return com.google.protobuf.GeneratedMessageV3 941 .parseDelimitedWithIOException(PARSER, input); 942 } 943 public static hapi.release.HookOuterClass.Hook parseDelimitedFrom( 944 java.io.InputStream input, 945 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 946 throws java.io.IOException { 947 return com.google.protobuf.GeneratedMessageV3 948 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); 949 } 950 public static hapi.release.HookOuterClass.Hook parseFrom( 951 com.google.protobuf.CodedInputStream input) 952 throws java.io.IOException { 953 return com.google.protobuf.GeneratedMessageV3 954 .parseWithIOException(PARSER, input); 955 } 956 public static hapi.release.HookOuterClass.Hook parseFrom( 957 com.google.protobuf.CodedInputStream input, 958 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 959 throws java.io.IOException { 960 return com.google.protobuf.GeneratedMessageV3 961 .parseWithIOException(PARSER, input, extensionRegistry); 962 } 963 964 public Builder newBuilderForType() { return newBuilder(); } 965 public static Builder newBuilder() { 966 return DEFAULT_INSTANCE.toBuilder(); 967 } 968 public static Builder newBuilder(hapi.release.HookOuterClass.Hook prototype) { 969 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 970 } 971 public Builder toBuilder() { 972 return this == DEFAULT_INSTANCE 973 ? new Builder() : new Builder().mergeFrom(this); 974 } 975 976 @java.lang.Override 977 protected Builder newBuilderForType( 978 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 979 Builder builder = new Builder(parent); 980 return builder; 981 } 982 /** 983 * <pre> 984 * Hook defines a hook object. 985 * </pre> 986 * 987 * Protobuf type {@code hapi.release.Hook} 988 */ 989 public static final class Builder extends 990 com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements 991 // @@protoc_insertion_point(builder_implements:hapi.release.Hook) 992 hapi.release.HookOuterClass.HookOrBuilder { 993 public static final com.google.protobuf.Descriptors.Descriptor 994 getDescriptor() { 995 return hapi.release.HookOuterClass.internal_static_hapi_release_Hook_descriptor; 996 } 997 998 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable 999 internalGetFieldAccessorTable() { 1000 return hapi.release.HookOuterClass.internal_static_hapi_release_Hook_fieldAccessorTable 1001 .ensureFieldAccessorsInitialized( 1002 hapi.release.HookOuterClass.Hook.class, hapi.release.HookOuterClass.Hook.Builder.class); 1003 } 1004 1005 // Construct using hapi.release.HookOuterClass.Hook.newBuilder() 1006 private Builder() { 1007 maybeForceBuilderInitialization(); 1008 } 1009 1010 private Builder( 1011 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 1012 super(parent); 1013 maybeForceBuilderInitialization(); 1014 } 1015 private void maybeForceBuilderInitialization() { 1016 if (com.google.protobuf.GeneratedMessageV3 1017 .alwaysUseFieldBuilders) { 1018 } 1019 } 1020 public Builder clear() { 1021 super.clear(); 1022 name_ = ""; 1023 1024 kind_ = ""; 1025 1026 path_ = ""; 1027 1028 manifest_ = ""; 1029 1030 events_ = java.util.Collections.emptyList(); 1031 bitField0_ = (bitField0_ & ~0x00000010); 1032 if (lastRunBuilder_ == null) { 1033 lastRun_ = null; 1034 } else { 1035 lastRun_ = null; 1036 lastRunBuilder_ = null; 1037 } 1038 weight_ = 0; 1039 1040 return this; 1041 } 1042 1043 public com.google.protobuf.Descriptors.Descriptor 1044 getDescriptorForType() { 1045 return hapi.release.HookOuterClass.internal_static_hapi_release_Hook_descriptor; 1046 } 1047 1048 public hapi.release.HookOuterClass.Hook getDefaultInstanceForType() { 1049 return hapi.release.HookOuterClass.Hook.getDefaultInstance(); 1050 } 1051 1052 public hapi.release.HookOuterClass.Hook build() { 1053 hapi.release.HookOuterClass.Hook result = buildPartial(); 1054 if (!result.isInitialized()) { 1055 throw newUninitializedMessageException(result); 1056 } 1057 return result; 1058 } 1059 1060 public hapi.release.HookOuterClass.Hook buildPartial() { 1061 hapi.release.HookOuterClass.Hook result = new hapi.release.HookOuterClass.Hook(this); 1062 int from_bitField0_ = bitField0_; 1063 int to_bitField0_ = 0; 1064 result.name_ = name_; 1065 result.kind_ = kind_; 1066 result.path_ = path_; 1067 result.manifest_ = manifest_; 1068 if (((bitField0_ & 0x00000010) == 0x00000010)) { 1069 events_ = java.util.Collections.unmodifiableList(events_); 1070 bitField0_ = (bitField0_ & ~0x00000010); 1071 } 1072 result.events_ = events_; 1073 if (lastRunBuilder_ == null) { 1074 result.lastRun_ = lastRun_; 1075 } else { 1076 result.lastRun_ = lastRunBuilder_.build(); 1077 } 1078 result.weight_ = weight_; 1079 result.bitField0_ = to_bitField0_; 1080 onBuilt(); 1081 return result; 1082 } 1083 1084 public Builder clone() { 1085 return (Builder) super.clone(); 1086 } 1087 public Builder setField( 1088 com.google.protobuf.Descriptors.FieldDescriptor field, 1089 Object value) { 1090 return (Builder) super.setField(field, value); 1091 } 1092 public Builder clearField( 1093 com.google.protobuf.Descriptors.FieldDescriptor field) { 1094 return (Builder) super.clearField(field); 1095 } 1096 public Builder clearOneof( 1097 com.google.protobuf.Descriptors.OneofDescriptor oneof) { 1098 return (Builder) super.clearOneof(oneof); 1099 } 1100 public Builder setRepeatedField( 1101 com.google.protobuf.Descriptors.FieldDescriptor field, 1102 int index, Object value) { 1103 return (Builder) super.setRepeatedField(field, index, value); 1104 } 1105 public Builder addRepeatedField( 1106 com.google.protobuf.Descriptors.FieldDescriptor field, 1107 Object value) { 1108 return (Builder) super.addRepeatedField(field, value); 1109 } 1110 public Builder mergeFrom(com.google.protobuf.Message other) { 1111 if (other instanceof hapi.release.HookOuterClass.Hook) { 1112 return mergeFrom((hapi.release.HookOuterClass.Hook)other); 1113 } else { 1114 super.mergeFrom(other); 1115 return this; 1116 } 1117 } 1118 1119 public Builder mergeFrom(hapi.release.HookOuterClass.Hook other) { 1120 if (other == hapi.release.HookOuterClass.Hook.getDefaultInstance()) return this; 1121 if (!other.getName().isEmpty()) { 1122 name_ = other.name_; 1123 onChanged(); 1124 } 1125 if (!other.getKind().isEmpty()) { 1126 kind_ = other.kind_; 1127 onChanged(); 1128 } 1129 if (!other.getPath().isEmpty()) { 1130 path_ = other.path_; 1131 onChanged(); 1132 } 1133 if (!other.getManifest().isEmpty()) { 1134 manifest_ = other.manifest_; 1135 onChanged(); 1136 } 1137 if (!other.events_.isEmpty()) { 1138 if (events_.isEmpty()) { 1139 events_ = other.events_; 1140 bitField0_ = (bitField0_ & ~0x00000010); 1141 } else { 1142 ensureEventsIsMutable(); 1143 events_.addAll(other.events_); 1144 } 1145 onChanged(); 1146 } 1147 if (other.hasLastRun()) { 1148 mergeLastRun(other.getLastRun()); 1149 } 1150 if (other.getWeight() != 0) { 1151 setWeight(other.getWeight()); 1152 } 1153 onChanged(); 1154 return this; 1155 } 1156 1157 public final boolean isInitialized() { 1158 return true; 1159 } 1160 1161 public Builder mergeFrom( 1162 com.google.protobuf.CodedInputStream input, 1163 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1164 throws java.io.IOException { 1165 hapi.release.HookOuterClass.Hook parsedMessage = null; 1166 try { 1167 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); 1168 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1169 parsedMessage = (hapi.release.HookOuterClass.Hook) e.getUnfinishedMessage(); 1170 throw e.unwrapIOException(); 1171 } finally { 1172 if (parsedMessage != null) { 1173 mergeFrom(parsedMessage); 1174 } 1175 } 1176 return this; 1177 } 1178 private int bitField0_; 1179 1180 private java.lang.Object name_ = ""; 1181 /** 1182 * <code>string name = 1;</code> 1183 */ 1184 public java.lang.String getName() { 1185 java.lang.Object ref = name_; 1186 if (!(ref instanceof java.lang.String)) { 1187 com.google.protobuf.ByteString bs = 1188 (com.google.protobuf.ByteString) ref; 1189 java.lang.String s = bs.toStringUtf8(); 1190 name_ = s; 1191 return s; 1192 } else { 1193 return (java.lang.String) ref; 1194 } 1195 } 1196 /** 1197 * <code>string name = 1;</code> 1198 */ 1199 public com.google.protobuf.ByteString 1200 getNameBytes() { 1201 java.lang.Object ref = name_; 1202 if (ref instanceof String) { 1203 com.google.protobuf.ByteString b = 1204 com.google.protobuf.ByteString.copyFromUtf8( 1205 (java.lang.String) ref); 1206 name_ = b; 1207 return b; 1208 } else { 1209 return (com.google.protobuf.ByteString) ref; 1210 } 1211 } 1212 /** 1213 * <code>string name = 1;</code> 1214 */ 1215 public Builder setName( 1216 java.lang.String value) { 1217 if (value == null) { 1218 throw new NullPointerException(); 1219 } 1220 1221 name_ = value; 1222 onChanged(); 1223 return this; 1224 } 1225 /** 1226 * <code>string name = 1;</code> 1227 */ 1228 public Builder clearName() { 1229 1230 name_ = getDefaultInstance().getName(); 1231 onChanged(); 1232 return this; 1233 } 1234 /** 1235 * <code>string name = 1;</code> 1236 */ 1237 public Builder setNameBytes( 1238 com.google.protobuf.ByteString value) { 1239 if (value == null) { 1240 throw new NullPointerException(); 1241 } 1242 checkByteStringIsUtf8(value); 1243 1244 name_ = value; 1245 onChanged(); 1246 return this; 1247 } 1248 1249 private java.lang.Object kind_ = ""; 1250 /** 1251 * <pre> 1252 * Kind is the Kubernetes kind. 1253 * </pre> 1254 * 1255 * <code>string kind = 2;</code> 1256 */ 1257 public java.lang.String getKind() { 1258 java.lang.Object ref = kind_; 1259 if (!(ref instanceof java.lang.String)) { 1260 com.google.protobuf.ByteString bs = 1261 (com.google.protobuf.ByteString) ref; 1262 java.lang.String s = bs.toStringUtf8(); 1263 kind_ = s; 1264 return s; 1265 } else { 1266 return (java.lang.String) ref; 1267 } 1268 } 1269 /** 1270 * <pre> 1271 * Kind is the Kubernetes kind. 1272 * </pre> 1273 * 1274 * <code>string kind = 2;</code> 1275 */ 1276 public com.google.protobuf.ByteString 1277 getKindBytes() { 1278 java.lang.Object ref = kind_; 1279 if (ref instanceof String) { 1280 com.google.protobuf.ByteString b = 1281 com.google.protobuf.ByteString.copyFromUtf8( 1282 (java.lang.String) ref); 1283 kind_ = b; 1284 return b; 1285 } else { 1286 return (com.google.protobuf.ByteString) ref; 1287 } 1288 } 1289 /** 1290 * <pre> 1291 * Kind is the Kubernetes kind. 1292 * </pre> 1293 * 1294 * <code>string kind = 2;</code> 1295 */ 1296 public Builder setKind( 1297 java.lang.String value) { 1298 if (value == null) { 1299 throw new NullPointerException(); 1300 } 1301 1302 kind_ = value; 1303 onChanged(); 1304 return this; 1305 } 1306 /** 1307 * <pre> 1308 * Kind is the Kubernetes kind. 1309 * </pre> 1310 * 1311 * <code>string kind = 2;</code> 1312 */ 1313 public Builder clearKind() { 1314 1315 kind_ = getDefaultInstance().getKind(); 1316 onChanged(); 1317 return this; 1318 } 1319 /** 1320 * <pre> 1321 * Kind is the Kubernetes kind. 1322 * </pre> 1323 * 1324 * <code>string kind = 2;</code> 1325 */ 1326 public Builder setKindBytes( 1327 com.google.protobuf.ByteString value) { 1328 if (value == null) { 1329 throw new NullPointerException(); 1330 } 1331 checkByteStringIsUtf8(value); 1332 1333 kind_ = value; 1334 onChanged(); 1335 return this; 1336 } 1337 1338 private java.lang.Object path_ = ""; 1339 /** 1340 * <pre> 1341 * Path is the chart-relative path to the template. 1342 * </pre> 1343 * 1344 * <code>string path = 3;</code> 1345 */ 1346 public java.lang.String getPath() { 1347 java.lang.Object ref = path_; 1348 if (!(ref instanceof java.lang.String)) { 1349 com.google.protobuf.ByteString bs = 1350 (com.google.protobuf.ByteString) ref; 1351 java.lang.String s = bs.toStringUtf8(); 1352 path_ = s; 1353 return s; 1354 } else { 1355 return (java.lang.String) ref; 1356 } 1357 } 1358 /** 1359 * <pre> 1360 * Path is the chart-relative path to the template. 1361 * </pre> 1362 * 1363 * <code>string path = 3;</code> 1364 */ 1365 public com.google.protobuf.ByteString 1366 getPathBytes() { 1367 java.lang.Object ref = path_; 1368 if (ref instanceof String) { 1369 com.google.protobuf.ByteString b = 1370 com.google.protobuf.ByteString.copyFromUtf8( 1371 (java.lang.String) ref); 1372 path_ = b; 1373 return b; 1374 } else { 1375 return (com.google.protobuf.ByteString) ref; 1376 } 1377 } 1378 /** 1379 * <pre> 1380 * Path is the chart-relative path to the template. 1381 * </pre> 1382 * 1383 * <code>string path = 3;</code> 1384 */ 1385 public Builder setPath( 1386 java.lang.String value) { 1387 if (value == null) { 1388 throw new NullPointerException(); 1389 } 1390 1391 path_ = value; 1392 onChanged(); 1393 return this; 1394 } 1395 /** 1396 * <pre> 1397 * Path is the chart-relative path to the template. 1398 * </pre> 1399 * 1400 * <code>string path = 3;</code> 1401 */ 1402 public Builder clearPath() { 1403 1404 path_ = getDefaultInstance().getPath(); 1405 onChanged(); 1406 return this; 1407 } 1408 /** 1409 * <pre> 1410 * Path is the chart-relative path to the template. 1411 * </pre> 1412 * 1413 * <code>string path = 3;</code> 1414 */ 1415 public Builder setPathBytes( 1416 com.google.protobuf.ByteString value) { 1417 if (value == null) { 1418 throw new NullPointerException(); 1419 } 1420 checkByteStringIsUtf8(value); 1421 1422 path_ = value; 1423 onChanged(); 1424 return this; 1425 } 1426 1427 private java.lang.Object manifest_ = ""; 1428 /** 1429 * <pre> 1430 * Manifest is the manifest contents. 1431 * </pre> 1432 * 1433 * <code>string manifest = 4;</code> 1434 */ 1435 public java.lang.String getManifest() { 1436 java.lang.Object ref = manifest_; 1437 if (!(ref instanceof java.lang.String)) { 1438 com.google.protobuf.ByteString bs = 1439 (com.google.protobuf.ByteString) ref; 1440 java.lang.String s = bs.toStringUtf8(); 1441 manifest_ = s; 1442 return s; 1443 } else { 1444 return (java.lang.String) ref; 1445 } 1446 } 1447 /** 1448 * <pre> 1449 * Manifest is the manifest contents. 1450 * </pre> 1451 * 1452 * <code>string manifest = 4;</code> 1453 */ 1454 public com.google.protobuf.ByteString 1455 getManifestBytes() { 1456 java.lang.Object ref = manifest_; 1457 if (ref instanceof String) { 1458 com.google.protobuf.ByteString b = 1459 com.google.protobuf.ByteString.copyFromUtf8( 1460 (java.lang.String) ref); 1461 manifest_ = b; 1462 return b; 1463 } else { 1464 return (com.google.protobuf.ByteString) ref; 1465 } 1466 } 1467 /** 1468 * <pre> 1469 * Manifest is the manifest contents. 1470 * </pre> 1471 * 1472 * <code>string manifest = 4;</code> 1473 */ 1474 public Builder setManifest( 1475 java.lang.String value) { 1476 if (value == null) { 1477 throw new NullPointerException(); 1478 } 1479 1480 manifest_ = value; 1481 onChanged(); 1482 return this; 1483 } 1484 /** 1485 * <pre> 1486 * Manifest is the manifest contents. 1487 * </pre> 1488 * 1489 * <code>string manifest = 4;</code> 1490 */ 1491 public Builder clearManifest() { 1492 1493 manifest_ = getDefaultInstance().getManifest(); 1494 onChanged(); 1495 return this; 1496 } 1497 /** 1498 * <pre> 1499 * Manifest is the manifest contents. 1500 * </pre> 1501 * 1502 * <code>string manifest = 4;</code> 1503 */ 1504 public Builder setManifestBytes( 1505 com.google.protobuf.ByteString value) { 1506 if (value == null) { 1507 throw new NullPointerException(); 1508 } 1509 checkByteStringIsUtf8(value); 1510 1511 manifest_ = value; 1512 onChanged(); 1513 return this; 1514 } 1515 1516 private java.util.List<java.lang.Integer> events_ = 1517 java.util.Collections.emptyList(); 1518 private void ensureEventsIsMutable() { 1519 if (!((bitField0_ & 0x00000010) == 0x00000010)) { 1520 events_ = new java.util.ArrayList<java.lang.Integer>(events_); 1521 bitField0_ |= 0x00000010; 1522 } 1523 } 1524 /** 1525 * <pre> 1526 * Events are the events that this hook fires on. 1527 * </pre> 1528 * 1529 * <code>repeated .hapi.release.Hook.Event events = 5;</code> 1530 */ 1531 public java.util.List<hapi.release.HookOuterClass.Hook.Event> getEventsList() { 1532 return new com.google.protobuf.Internal.ListAdapter< 1533 java.lang.Integer, hapi.release.HookOuterClass.Hook.Event>(events_, events_converter_); 1534 } 1535 /** 1536 * <pre> 1537 * Events are the events that this hook fires on. 1538 * </pre> 1539 * 1540 * <code>repeated .hapi.release.Hook.Event events = 5;</code> 1541 */ 1542 public int getEventsCount() { 1543 return events_.size(); 1544 } 1545 /** 1546 * <pre> 1547 * Events are the events that this hook fires on. 1548 * </pre> 1549 * 1550 * <code>repeated .hapi.release.Hook.Event events = 5;</code> 1551 */ 1552 public hapi.release.HookOuterClass.Hook.Event getEvents(int index) { 1553 return events_converter_.convert(events_.get(index)); 1554 } 1555 /** 1556 * <pre> 1557 * Events are the events that this hook fires on. 1558 * </pre> 1559 * 1560 * <code>repeated .hapi.release.Hook.Event events = 5;</code> 1561 */ 1562 public Builder setEvents( 1563 int index, hapi.release.HookOuterClass.Hook.Event value) { 1564 if (value == null) { 1565 throw new NullPointerException(); 1566 } 1567 ensureEventsIsMutable(); 1568 events_.set(index, value.getNumber()); 1569 onChanged(); 1570 return this; 1571 } 1572 /** 1573 * <pre> 1574 * Events are the events that this hook fires on. 1575 * </pre> 1576 * 1577 * <code>repeated .hapi.release.Hook.Event events = 5;</code> 1578 */ 1579 public Builder addEvents(hapi.release.HookOuterClass.Hook.Event value) { 1580 if (value == null) { 1581 throw new NullPointerException(); 1582 } 1583 ensureEventsIsMutable(); 1584 events_.add(value.getNumber()); 1585 onChanged(); 1586 return this; 1587 } 1588 /** 1589 * <pre> 1590 * Events are the events that this hook fires on. 1591 * </pre> 1592 * 1593 * <code>repeated .hapi.release.Hook.Event events = 5;</code> 1594 */ 1595 public Builder addAllEvents( 1596 java.lang.Iterable<? extends hapi.release.HookOuterClass.Hook.Event> values) { 1597 ensureEventsIsMutable(); 1598 for (hapi.release.HookOuterClass.Hook.Event value : values) { 1599 events_.add(value.getNumber()); 1600 } 1601 onChanged(); 1602 return this; 1603 } 1604 /** 1605 * <pre> 1606 * Events are the events that this hook fires on. 1607 * </pre> 1608 * 1609 * <code>repeated .hapi.release.Hook.Event events = 5;</code> 1610 */ 1611 public Builder clearEvents() { 1612 events_ = java.util.Collections.emptyList(); 1613 bitField0_ = (bitField0_ & ~0x00000010); 1614 onChanged(); 1615 return this; 1616 } 1617 /** 1618 * <pre> 1619 * Events are the events that this hook fires on. 1620 * </pre> 1621 * 1622 * <code>repeated .hapi.release.Hook.Event events = 5;</code> 1623 */ 1624 public java.util.List<java.lang.Integer> 1625 getEventsValueList() { 1626 return java.util.Collections.unmodifiableList(events_); 1627 } 1628 /** 1629 * <pre> 1630 * Events are the events that this hook fires on. 1631 * </pre> 1632 * 1633 * <code>repeated .hapi.release.Hook.Event events = 5;</code> 1634 */ 1635 public int getEventsValue(int index) { 1636 return events_.get(index); 1637 } 1638 /** 1639 * <pre> 1640 * Events are the events that this hook fires on. 1641 * </pre> 1642 * 1643 * <code>repeated .hapi.release.Hook.Event events = 5;</code> 1644 */ 1645 public Builder setEventsValue( 1646 int index, int value) { 1647 ensureEventsIsMutable(); 1648 events_.set(index, value); 1649 onChanged(); 1650 return this; 1651 } 1652 /** 1653 * <pre> 1654 * Events are the events that this hook fires on. 1655 * </pre> 1656 * 1657 * <code>repeated .hapi.release.Hook.Event events = 5;</code> 1658 */ 1659 public Builder addEventsValue(int value) { 1660 ensureEventsIsMutable(); 1661 events_.add(value); 1662 onChanged(); 1663 return this; 1664 } 1665 /** 1666 * <pre> 1667 * Events are the events that this hook fires on. 1668 * </pre> 1669 * 1670 * <code>repeated .hapi.release.Hook.Event events = 5;</code> 1671 */ 1672 public Builder addAllEventsValue( 1673 java.lang.Iterable<java.lang.Integer> values) { 1674 ensureEventsIsMutable(); 1675 for (int value : values) { 1676 events_.add(value); 1677 } 1678 onChanged(); 1679 return this; 1680 } 1681 1682 private com.google.protobuf.Timestamp lastRun_ = null; 1683 private com.google.protobuf.SingleFieldBuilderV3< 1684 com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> lastRunBuilder_; 1685 /** 1686 * <pre> 1687 * LastRun indicates the date/time this was last run. 1688 * </pre> 1689 * 1690 * <code>.google.protobuf.Timestamp last_run = 6;</code> 1691 */ 1692 public boolean hasLastRun() { 1693 return lastRunBuilder_ != null || lastRun_ != null; 1694 } 1695 /** 1696 * <pre> 1697 * LastRun indicates the date/time this was last run. 1698 * </pre> 1699 * 1700 * <code>.google.protobuf.Timestamp last_run = 6;</code> 1701 */ 1702 public com.google.protobuf.Timestamp getLastRun() { 1703 if (lastRunBuilder_ == null) { 1704 return lastRun_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : lastRun_; 1705 } else { 1706 return lastRunBuilder_.getMessage(); 1707 } 1708 } 1709 /** 1710 * <pre> 1711 * LastRun indicates the date/time this was last run. 1712 * </pre> 1713 * 1714 * <code>.google.protobuf.Timestamp last_run = 6;</code> 1715 */ 1716 public Builder setLastRun(com.google.protobuf.Timestamp value) { 1717 if (lastRunBuilder_ == null) { 1718 if (value == null) { 1719 throw new NullPointerException(); 1720 } 1721 lastRun_ = value; 1722 onChanged(); 1723 } else { 1724 lastRunBuilder_.setMessage(value); 1725 } 1726 1727 return this; 1728 } 1729 /** 1730 * <pre> 1731 * LastRun indicates the date/time this was last run. 1732 * </pre> 1733 * 1734 * <code>.google.protobuf.Timestamp last_run = 6;</code> 1735 */ 1736 public Builder setLastRun( 1737 com.google.protobuf.Timestamp.Builder builderForValue) { 1738 if (lastRunBuilder_ == null) { 1739 lastRun_ = builderForValue.build(); 1740 onChanged(); 1741 } else { 1742 lastRunBuilder_.setMessage(builderForValue.build()); 1743 } 1744 1745 return this; 1746 } 1747 /** 1748 * <pre> 1749 * LastRun indicates the date/time this was last run. 1750 * </pre> 1751 * 1752 * <code>.google.protobuf.Timestamp last_run = 6;</code> 1753 */ 1754 public Builder mergeLastRun(com.google.protobuf.Timestamp value) { 1755 if (lastRunBuilder_ == null) { 1756 if (lastRun_ != null) { 1757 lastRun_ = 1758 com.google.protobuf.Timestamp.newBuilder(lastRun_).mergeFrom(value).buildPartial(); 1759 } else { 1760 lastRun_ = value; 1761 } 1762 onChanged(); 1763 } else { 1764 lastRunBuilder_.mergeFrom(value); 1765 } 1766 1767 return this; 1768 } 1769 /** 1770 * <pre> 1771 * LastRun indicates the date/time this was last run. 1772 * </pre> 1773 * 1774 * <code>.google.protobuf.Timestamp last_run = 6;</code> 1775 */ 1776 public Builder clearLastRun() { 1777 if (lastRunBuilder_ == null) { 1778 lastRun_ = null; 1779 onChanged(); 1780 } else { 1781 lastRun_ = null; 1782 lastRunBuilder_ = null; 1783 } 1784 1785 return this; 1786 } 1787 /** 1788 * <pre> 1789 * LastRun indicates the date/time this was last run. 1790 * </pre> 1791 * 1792 * <code>.google.protobuf.Timestamp last_run = 6;</code> 1793 */ 1794 public com.google.protobuf.Timestamp.Builder getLastRunBuilder() { 1795 1796 onChanged(); 1797 return getLastRunFieldBuilder().getBuilder(); 1798 } 1799 /** 1800 * <pre> 1801 * LastRun indicates the date/time this was last run. 1802 * </pre> 1803 * 1804 * <code>.google.protobuf.Timestamp last_run = 6;</code> 1805 */ 1806 public com.google.protobuf.TimestampOrBuilder getLastRunOrBuilder() { 1807 if (lastRunBuilder_ != null) { 1808 return lastRunBuilder_.getMessageOrBuilder(); 1809 } else { 1810 return lastRun_ == null ? 1811 com.google.protobuf.Timestamp.getDefaultInstance() : lastRun_; 1812 } 1813 } 1814 /** 1815 * <pre> 1816 * LastRun indicates the date/time this was last run. 1817 * </pre> 1818 * 1819 * <code>.google.protobuf.Timestamp last_run = 6;</code> 1820 */ 1821 private com.google.protobuf.SingleFieldBuilderV3< 1822 com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> 1823 getLastRunFieldBuilder() { 1824 if (lastRunBuilder_ == null) { 1825 lastRunBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< 1826 com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( 1827 getLastRun(), 1828 getParentForChildren(), 1829 isClean()); 1830 lastRun_ = null; 1831 } 1832 return lastRunBuilder_; 1833 } 1834 1835 private int weight_ ; 1836 /** 1837 * <pre> 1838 * Weight indicates the sort order for execution among similar Hook type 1839 * </pre> 1840 * 1841 * <code>int32 weight = 7;</code> 1842 */ 1843 public int getWeight() { 1844 return weight_; 1845 } 1846 /** 1847 * <pre> 1848 * Weight indicates the sort order for execution among similar Hook type 1849 * </pre> 1850 * 1851 * <code>int32 weight = 7;</code> 1852 */ 1853 public Builder setWeight(int value) { 1854 1855 weight_ = value; 1856 onChanged(); 1857 return this; 1858 } 1859 /** 1860 * <pre> 1861 * Weight indicates the sort order for execution among similar Hook type 1862 * </pre> 1863 * 1864 * <code>int32 weight = 7;</code> 1865 */ 1866 public Builder clearWeight() { 1867 1868 weight_ = 0; 1869 onChanged(); 1870 return this; 1871 } 1872 public final Builder setUnknownFields( 1873 final com.google.protobuf.UnknownFieldSet unknownFields) { 1874 return this; 1875 } 1876 1877 public final Builder mergeUnknownFields( 1878 final com.google.protobuf.UnknownFieldSet unknownFields) { 1879 return this; 1880 } 1881 1882 1883 // @@protoc_insertion_point(builder_scope:hapi.release.Hook) 1884 } 1885 1886 // @@protoc_insertion_point(class_scope:hapi.release.Hook) 1887 private static final hapi.release.HookOuterClass.Hook DEFAULT_INSTANCE; 1888 static { 1889 DEFAULT_INSTANCE = new hapi.release.HookOuterClass.Hook(); 1890 } 1891 1892 public static hapi.release.HookOuterClass.Hook getDefaultInstance() { 1893 return DEFAULT_INSTANCE; 1894 } 1895 1896 private static final com.google.protobuf.Parser<Hook> 1897 PARSER = new com.google.protobuf.AbstractParser<Hook>() { 1898 public Hook parsePartialFrom( 1899 com.google.protobuf.CodedInputStream input, 1900 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1901 throws com.google.protobuf.InvalidProtocolBufferException { 1902 return new Hook(input, extensionRegistry); 1903 } 1904 }; 1905 1906 public static com.google.protobuf.Parser<Hook> parser() { 1907 return PARSER; 1908 } 1909 1910 @java.lang.Override 1911 public com.google.protobuf.Parser<Hook> getParserForType() { 1912 return PARSER; 1913 } 1914 1915 public hapi.release.HookOuterClass.Hook getDefaultInstanceForType() { 1916 return DEFAULT_INSTANCE; 1917 } 1918 1919 } 1920 1921 private static final com.google.protobuf.Descriptors.Descriptor 1922 internal_static_hapi_release_Hook_descriptor; 1923 private static final 1924 com.google.protobuf.GeneratedMessageV3.FieldAccessorTable 1925 internal_static_hapi_release_Hook_fieldAccessorTable; 1926 1927 public static com.google.protobuf.Descriptors.FileDescriptor 1928 getDescriptor() { 1929 return descriptor; 1930 } 1931 private static com.google.protobuf.Descriptors.FileDescriptor 1932 descriptor; 1933 static { 1934 java.lang.String[] descriptorData = { 1935 "\n\027hapi/release/hook.proto\022\014hapi.release\032" + 1936 "\037google/protobuf/timestamp.proto\"\201\003\n\004Hoo" + 1937 "k\022\014\n\004name\030\001 \001(\t\022\014\n\004kind\030\002 \001(\t\022\014\n\004path\030\003 " + 1938 "\001(\t\022\020\n\010manifest\030\004 \001(\t\022(\n\006events\030\005 \003(\0162\030." + 1939 "hapi.release.Hook.Event\022,\n\010last_run\030\006 \001(" + 1940 "\0132\032.google.protobuf.Timestamp\022\016\n\006weight\030" + 1941 "\007 \001(\005\"\324\001\n\005Event\022\013\n\007UNKNOWN\020\000\022\017\n\013PRE_INST" + 1942 "ALL\020\001\022\020\n\014POST_INSTALL\020\002\022\016\n\nPRE_DELETE\020\003\022" + 1943 "\017\n\013POST_DELETE\020\004\022\017\n\013PRE_UPGRADE\020\005\022\020\n\014POS" + 1944 "T_UPGRADE\020\006\022\020\n\014PRE_ROLLBACK\020\007\022\021\n\rPOST_RO", 1945 "LLBACK\020\010\022\030\n\024RELEASE_TEST_SUCCESS\020\t\022\030\n\024RE" + 1946 "LEASE_TEST_FAILURE\020\nB\tZ\007releaseb\006proto3" 1947 }; 1948 com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = 1949 new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { 1950 public com.google.protobuf.ExtensionRegistry assignDescriptors( 1951 com.google.protobuf.Descriptors.FileDescriptor root) { 1952 descriptor = root; 1953 return null; 1954 } 1955 }; 1956 com.google.protobuf.Descriptors.FileDescriptor 1957 .internalBuildGeneratedFileFrom(descriptorData, 1958 new com.google.protobuf.Descriptors.FileDescriptor[] { 1959 com.google.protobuf.TimestampProto.getDescriptor(), 1960 }, assigner); 1961 internal_static_hapi_release_Hook_descriptor = 1962 getDescriptor().getMessageTypes().get(0); 1963 internal_static_hapi_release_Hook_fieldAccessorTable = new 1964 com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( 1965 internal_static_hapi_release_Hook_descriptor, 1966 new java.lang.String[] { "Name", "Kind", "Path", "Manifest", "Events", "LastRun", "Weight", }); 1967 com.google.protobuf.TimestampProto.getDescriptor(); 1968 } 1969 1970 // @@protoc_insertion_point(outer_class_scope) 1971}