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