myriad-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpgilabe...@apache.org
Subject [07/26] incubator-myriad git commit: Upgrade mesos driver to Mesos 1.5 with protobuf 2.5
Date Wed, 12 Sep 2018 15:52:03 GMT
http://git-wip-us.apache.org/repos/asf/incubator-myriad/blob/b5b468b9/myriad-commons/src/main/java/org/apache/mesos/scheduler/Protos.java
----------------------------------------------------------------------
diff --git a/myriad-commons/src/main/java/org/apache/mesos/scheduler/Protos.java b/myriad-commons/src/main/java/org/apache/mesos/scheduler/Protos.java
new file mode 100644
index 0000000..bda044a
--- /dev/null
+++ b/myriad-commons/src/main/java/org/apache/mesos/scheduler/Protos.java
@@ -0,0 +1,24780 @@
+// Generated by the protocol buffer compiler.  DO NOT EDIT!
+// source: mesos/scheduler.proto
+
+package org.apache.mesos.scheduler;
+
+public final class Protos {
+  private Protos() {}
+  public static void registerAllExtensions(
+      com.google.protobuf.ExtensionRegistry registry) {
+  }
+  public interface EventOrBuilder
+      extends com.google.protobuf.MessageOrBuilder {
+
+    // optional .mesos.scheduler.Event.Type type = 1;
+    /**
+     * <code>optional .mesos.scheduler.Event.Type type = 1;</code>
+     *
+     * <pre>
+     * Type of the event, indicates which optional field below should be
+     * present if that type has a nested message definition.
+     * Enum fields should be optional, see: MESOS-4997.
+     * </pre>
+     */
+    boolean hasType();
+    /**
+     * <code>optional .mesos.scheduler.Event.Type type = 1;</code>
+     *
+     * <pre>
+     * Type of the event, indicates which optional field below should be
+     * present if that type has a nested message definition.
+     * Enum fields should be optional, see: MESOS-4997.
+     * </pre>
+     */
+    org.apache.mesos.scheduler.Protos.Event.Type getType();
+
+    // optional .mesos.scheduler.Event.Subscribed subscribed = 2;
+    /**
+     * <code>optional .mesos.scheduler.Event.Subscribed subscribed = 2;</code>
+     */
+    boolean hasSubscribed();
+    /**
+     * <code>optional .mesos.scheduler.Event.Subscribed subscribed = 2;</code>
+     */
+    org.apache.mesos.scheduler.Protos.Event.Subscribed getSubscribed();
+    /**
+     * <code>optional .mesos.scheduler.Event.Subscribed subscribed = 2;</code>
+     */
+    org.apache.mesos.scheduler.Protos.Event.SubscribedOrBuilder getSubscribedOrBuilder();
+
+    // optional .mesos.scheduler.Event.Offers offers = 3;
+    /**
+     * <code>optional .mesos.scheduler.Event.Offers offers = 3;</code>
+     */
+    boolean hasOffers();
+    /**
+     * <code>optional .mesos.scheduler.Event.Offers offers = 3;</code>
+     */
+    org.apache.mesos.scheduler.Protos.Event.Offers getOffers();
+    /**
+     * <code>optional .mesos.scheduler.Event.Offers offers = 3;</code>
+     */
+    org.apache.mesos.scheduler.Protos.Event.OffersOrBuilder getOffersOrBuilder();
+
+    // optional .mesos.scheduler.Event.InverseOffers inverse_offers = 9;
+    /**
+     * <code>optional .mesos.scheduler.Event.InverseOffers inverse_offers = 9;</code>
+     */
+    boolean hasInverseOffers();
+    /**
+     * <code>optional .mesos.scheduler.Event.InverseOffers inverse_offers = 9;</code>
+     */
+    org.apache.mesos.scheduler.Protos.Event.InverseOffers getInverseOffers();
+    /**
+     * <code>optional .mesos.scheduler.Event.InverseOffers inverse_offers = 9;</code>
+     */
+    org.apache.mesos.scheduler.Protos.Event.InverseOffersOrBuilder getInverseOffersOrBuilder();
+
+    // optional .mesos.scheduler.Event.Rescind rescind = 4;
+    /**
+     * <code>optional .mesos.scheduler.Event.Rescind rescind = 4;</code>
+     */
+    boolean hasRescind();
+    /**
+     * <code>optional .mesos.scheduler.Event.Rescind rescind = 4;</code>
+     */
+    org.apache.mesos.scheduler.Protos.Event.Rescind getRescind();
+    /**
+     * <code>optional .mesos.scheduler.Event.Rescind rescind = 4;</code>
+     */
+    org.apache.mesos.scheduler.Protos.Event.RescindOrBuilder getRescindOrBuilder();
+
+    // optional .mesos.scheduler.Event.RescindInverseOffer rescind_inverse_offer = 10;
+    /**
+     * <code>optional .mesos.scheduler.Event.RescindInverseOffer rescind_inverse_offer = 10;</code>
+     */
+    boolean hasRescindInverseOffer();
+    /**
+     * <code>optional .mesos.scheduler.Event.RescindInverseOffer rescind_inverse_offer = 10;</code>
+     */
+    org.apache.mesos.scheduler.Protos.Event.RescindInverseOffer getRescindInverseOffer();
+    /**
+     * <code>optional .mesos.scheduler.Event.RescindInverseOffer rescind_inverse_offer = 10;</code>
+     */
+    org.apache.mesos.scheduler.Protos.Event.RescindInverseOfferOrBuilder getRescindInverseOfferOrBuilder();
+
+    // optional .mesos.scheduler.Event.Update update = 5;
+    /**
+     * <code>optional .mesos.scheduler.Event.Update update = 5;</code>
+     */
+    boolean hasUpdate();
+    /**
+     * <code>optional .mesos.scheduler.Event.Update update = 5;</code>
+     */
+    org.apache.mesos.scheduler.Protos.Event.Update getUpdate();
+    /**
+     * <code>optional .mesos.scheduler.Event.Update update = 5;</code>
+     */
+    org.apache.mesos.scheduler.Protos.Event.UpdateOrBuilder getUpdateOrBuilder();
+
+    // optional .mesos.scheduler.Event.Message message = 6;
+    /**
+     * <code>optional .mesos.scheduler.Event.Message message = 6;</code>
+     */
+    boolean hasMessage();
+    /**
+     * <code>optional .mesos.scheduler.Event.Message message = 6;</code>
+     */
+    org.apache.mesos.scheduler.Protos.Event.Message getMessage();
+    /**
+     * <code>optional .mesos.scheduler.Event.Message message = 6;</code>
+     */
+    org.apache.mesos.scheduler.Protos.Event.MessageOrBuilder getMessageOrBuilder();
+
+    // optional .mesos.scheduler.Event.Failure failure = 7;
+    /**
+     * <code>optional .mesos.scheduler.Event.Failure failure = 7;</code>
+     */
+    boolean hasFailure();
+    /**
+     * <code>optional .mesos.scheduler.Event.Failure failure = 7;</code>
+     */
+    org.apache.mesos.scheduler.Protos.Event.Failure getFailure();
+    /**
+     * <code>optional .mesos.scheduler.Event.Failure failure = 7;</code>
+     */
+    org.apache.mesos.scheduler.Protos.Event.FailureOrBuilder getFailureOrBuilder();
+
+    // optional .mesos.scheduler.Event.Error error = 8;
+    /**
+     * <code>optional .mesos.scheduler.Event.Error error = 8;</code>
+     */
+    boolean hasError();
+    /**
+     * <code>optional .mesos.scheduler.Event.Error error = 8;</code>
+     */
+    org.apache.mesos.scheduler.Protos.Event.Error getError();
+    /**
+     * <code>optional .mesos.scheduler.Event.Error error = 8;</code>
+     */
+    org.apache.mesos.scheduler.Protos.Event.ErrorOrBuilder getErrorOrBuilder();
+  }
+  /**
+   * Protobuf type {@code mesos.scheduler.Event}
+   *
+   * <pre>
+   **
+   * Scheduler event API.
+   *
+   * An event is described using the standard protocol buffer "union"
+   * trick, see:
+   * https://developers.google.com/protocol-buffers/docs/techniques#union.
+   * </pre>
+   */
+  public static final class Event extends
+      com.google.protobuf.GeneratedMessage
+      implements EventOrBuilder {
+    // Use Event.newBuilder() to construct.
+    private Event(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
+      super(builder);
+      this.unknownFields = builder.getUnknownFields();
+    }
+    private Event(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+    private static final Event defaultInstance;
+    public static Event getDefaultInstance() {
+      return defaultInstance;
+    }
+
+    public Event getDefaultInstanceForType() {
+      return defaultInstance;
+    }
+
+    private final com.google.protobuf.UnknownFieldSet unknownFields;
+    @java.lang.Override
+    public final com.google.protobuf.UnknownFieldSet
+        getUnknownFields() {
+      return this.unknownFields;
+    }
+    private Event(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      initFields();
+      int mutable_bitField0_ = 0;
+      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+          com.google.protobuf.UnknownFieldSet.newBuilder();
+      try {
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            default: {
+              if (!parseUnknownField(input, unknownFields,
+                                     extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
+            case 8: {
+              int rawValue = input.readEnum();
+              org.apache.mesos.scheduler.Protos.Event.Type value = org.apache.mesos.scheduler.Protos.Event.Type.valueOf(rawValue);
+              if (value == null) {
+                unknownFields.mergeVarintField(1, rawValue);
+              } else {
+                bitField0_ |= 0x00000001;
+                type_ = value;
+              }
+              break;
+            }
+            case 18: {
+              org.apache.mesos.scheduler.Protos.Event.Subscribed.Builder subBuilder = null;
+              if (((bitField0_ & 0x00000002) == 0x00000002)) {
+                subBuilder = subscribed_.toBuilder();
+              }
+              subscribed_ = input.readMessage(org.apache.mesos.scheduler.Protos.Event.Subscribed.PARSER, extensionRegistry);
+              if (subBuilder != null) {
+                subBuilder.mergeFrom(subscribed_);
+                subscribed_ = subBuilder.buildPartial();
+              }
+              bitField0_ |= 0x00000002;
+              break;
+            }
+            case 26: {
+              org.apache.mesos.scheduler.Protos.Event.Offers.Builder subBuilder = null;
+              if (((bitField0_ & 0x00000004) == 0x00000004)) {
+                subBuilder = offers_.toBuilder();
+              }
+              offers_ = input.readMessage(org.apache.mesos.scheduler.Protos.Event.Offers.PARSER, extensionRegistry);
+              if (subBuilder != null) {
+                subBuilder.mergeFrom(offers_);
+                offers_ = subBuilder.buildPartial();
+              }
+              bitField0_ |= 0x00000004;
+              break;
+            }
+            case 34: {
+              org.apache.mesos.scheduler.Protos.Event.Rescind.Builder subBuilder = null;
+              if (((bitField0_ & 0x00000010) == 0x00000010)) {
+                subBuilder = rescind_.toBuilder();
+              }
+              rescind_ = input.readMessage(org.apache.mesos.scheduler.Protos.Event.Rescind.PARSER, extensionRegistry);
+              if (subBuilder != null) {
+                subBuilder.mergeFrom(rescind_);
+                rescind_ = subBuilder.buildPartial();
+              }
+              bitField0_ |= 0x00000010;
+              break;
+            }
+            case 42: {
+              org.apache.mesos.scheduler.Protos.Event.Update.Builder subBuilder = null;
+              if (((bitField0_ & 0x00000040) == 0x00000040)) {
+                subBuilder = update_.toBuilder();
+              }
+              update_ = input.readMessage(org.apache.mesos.scheduler.Protos.Event.Update.PARSER, extensionRegistry);
+              if (subBuilder != null) {
+                subBuilder.mergeFrom(update_);
+                update_ = subBuilder.buildPartial();
+              }
+              bitField0_ |= 0x00000040;
+              break;
+            }
+            case 50: {
+              org.apache.mesos.scheduler.Protos.Event.Message.Builder subBuilder = null;
+              if (((bitField0_ & 0x00000080) == 0x00000080)) {
+                subBuilder = message_.toBuilder();
+              }
+              message_ = input.readMessage(org.apache.mesos.scheduler.Protos.Event.Message.PARSER, extensionRegistry);
+              if (subBuilder != null) {
+                subBuilder.mergeFrom(message_);
+                message_ = subBuilder.buildPartial();
+              }
+              bitField0_ |= 0x00000080;
+              break;
+            }
+            case 58: {
+              org.apache.mesos.scheduler.Protos.Event.Failure.Builder subBuilder = null;
+              if (((bitField0_ & 0x00000100) == 0x00000100)) {
+                subBuilder = failure_.toBuilder();
+              }
+              failure_ = input.readMessage(org.apache.mesos.scheduler.Protos.Event.Failure.PARSER, extensionRegistry);
+              if (subBuilder != null) {
+                subBuilder.mergeFrom(failure_);
+                failure_ = subBuilder.buildPartial();
+              }
+              bitField0_ |= 0x00000100;
+              break;
+            }
+            case 66: {
+              org.apache.mesos.scheduler.Protos.Event.Error.Builder subBuilder = null;
+              if (((bitField0_ & 0x00000200) == 0x00000200)) {
+                subBuilder = error_.toBuilder();
+              }
+              error_ = input.readMessage(org.apache.mesos.scheduler.Protos.Event.Error.PARSER, extensionRegistry);
+              if (subBuilder != null) {
+                subBuilder.mergeFrom(error_);
+                error_ = subBuilder.buildPartial();
+              }
+              bitField0_ |= 0x00000200;
+              break;
+            }
+            case 74: {
+              org.apache.mesos.scheduler.Protos.Event.InverseOffers.Builder subBuilder = null;
+              if (((bitField0_ & 0x00000008) == 0x00000008)) {
+                subBuilder = inverseOffers_.toBuilder();
+              }
+              inverseOffers_ = input.readMessage(org.apache.mesos.scheduler.Protos.Event.InverseOffers.PARSER, extensionRegistry);
+              if (subBuilder != null) {
+                subBuilder.mergeFrom(inverseOffers_);
+                inverseOffers_ = subBuilder.buildPartial();
+              }
+              bitField0_ |= 0x00000008;
+              break;
+            }
+            case 82: {
+              org.apache.mesos.scheduler.Protos.Event.RescindInverseOffer.Builder subBuilder = null;
+              if (((bitField0_ & 0x00000020) == 0x00000020)) {
+                subBuilder = rescindInverseOffer_.toBuilder();
+              }
+              rescindInverseOffer_ = input.readMessage(org.apache.mesos.scheduler.Protos.Event.RescindInverseOffer.PARSER, extensionRegistry);
+              if (subBuilder != null) {
+                subBuilder.mergeFrom(rescindInverseOffer_);
+                rescindInverseOffer_ = subBuilder.buildPartial();
+              }
+              bitField0_ |= 0x00000020;
+              break;
+            }
+          }
+        }
+      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+        throw e.setUnfinishedMessage(this);
+      } catch (java.io.IOException e) {
+        throw new com.google.protobuf.InvalidProtocolBufferException(
+            e.getMessage()).setUnfinishedMessage(this);
+      } finally {
+        this.unknownFields = unknownFields.build();
+        makeExtensionsImmutable();
+      }
+    }
+    public static final com.google.protobuf.Descriptors.Descriptor
+        getDescriptor() {
+      return org.apache.mesos.scheduler.Protos.internal_static_mesos_scheduler_Event_descriptor;
+    }
+
+    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+        internalGetFieldAccessorTable() {
+      return org.apache.mesos.scheduler.Protos.internal_static_mesos_scheduler_Event_fieldAccessorTable
+          .ensureFieldAccessorsInitialized(
+              org.apache.mesos.scheduler.Protos.Event.class, org.apache.mesos.scheduler.Protos.Event.Builder.class);
+    }
+
+    public static com.google.protobuf.Parser<Event> PARSER =
+        new com.google.protobuf.AbstractParser<Event>() {
+      public Event parsePartialFrom(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        return new Event(input, extensionRegistry);
+      }
+    };
+
+    @java.lang.Override
+    public com.google.protobuf.Parser<Event> getParserForType() {
+      return PARSER;
+    }
+
+    /**
+     * Protobuf enum {@code mesos.scheduler.Event.Type}
+     *
+     * <pre>
+     * Possible event types, followed by message definitions if
+     * applicable.
+     * </pre>
+     */
+    public enum Type
+        implements com.google.protobuf.ProtocolMessageEnum {
+      /**
+       * <code>UNKNOWN = 0;</code>
+       *
+       * <pre>
+       * This must be the first enum value in this list, to
+       * ensure that if 'type' is not set, the default value
+       * is UNKNOWN. This enables enum values to be added
+       * in a backwards-compatible way. See: MESOS-4997.
+       * </pre>
+       */
+      UNKNOWN(0, 0),
+      /**
+       * <code>SUBSCRIBED = 1;</code>
+       *
+       * <pre>
+       * See 'Subscribed' below.
+       * </pre>
+       */
+      SUBSCRIBED(1, 1),
+      /**
+       * <code>OFFERS = 2;</code>
+       *
+       * <pre>
+       * See 'Offers' below.
+       * </pre>
+       */
+      OFFERS(2, 2),
+      /**
+       * <code>INVERSE_OFFERS = 9;</code>
+       *
+       * <pre>
+       * See 'InverseOffers' below.
+       * </pre>
+       */
+      INVERSE_OFFERS(3, 9),
+      /**
+       * <code>RESCIND = 3;</code>
+       *
+       * <pre>
+       * See 'Rescind' below.
+       * </pre>
+       */
+      RESCIND(4, 3),
+      /**
+       * <code>RESCIND_INVERSE_OFFER = 10;</code>
+       *
+       * <pre>
+       * See 'RescindInverseOffer' below.
+       * </pre>
+       */
+      RESCIND_INVERSE_OFFER(5, 10),
+      /**
+       * <code>UPDATE = 4;</code>
+       *
+       * <pre>
+       * See 'Update' below.
+       * </pre>
+       */
+      UPDATE(6, 4),
+      /**
+       * <code>MESSAGE = 5;</code>
+       *
+       * <pre>
+       * See 'Message' below.
+       * </pre>
+       */
+      MESSAGE(7, 5),
+      /**
+       * <code>FAILURE = 6;</code>
+       *
+       * <pre>
+       * See 'Failure' below.
+       * </pre>
+       */
+      FAILURE(8, 6),
+      /**
+       * <code>ERROR = 7;</code>
+       *
+       * <pre>
+       * See 'Error' below.
+       * </pre>
+       */
+      ERROR(9, 7),
+      /**
+       * <code>HEARTBEAT = 8;</code>
+       *
+       * <pre>
+       * Periodic message sent by the Mesos master according to
+       * 'Subscribed.heartbeat_interval_seconds'. If the scheduler does
+       * not receive any events (including heartbeats) for an extended
+       * period of time (e.g., 5 x heartbeat_interval_seconds), there is
+       * likely a network partition. In such a case the scheduler should
+       * close the existing subscription connection and resubscribe
+       * using a backoff strategy.
+       * </pre>
+       */
+      HEARTBEAT(10, 8),
+      ;
+
+      /**
+       * <code>UNKNOWN = 0;</code>
+       *
+       * <pre>
+       * This must be the first enum value in this list, to
+       * ensure that if 'type' is not set, the default value
+       * is UNKNOWN. This enables enum values to be added
+       * in a backwards-compatible way. See: MESOS-4997.
+       * </pre>
+       */
+      public static final int UNKNOWN_VALUE = 0;
+      /**
+       * <code>SUBSCRIBED = 1;</code>
+       *
+       * <pre>
+       * See 'Subscribed' below.
+       * </pre>
+       */
+      public static final int SUBSCRIBED_VALUE = 1;
+      /**
+       * <code>OFFERS = 2;</code>
+       *
+       * <pre>
+       * See 'Offers' below.
+       * </pre>
+       */
+      public static final int OFFERS_VALUE = 2;
+      /**
+       * <code>INVERSE_OFFERS = 9;</code>
+       *
+       * <pre>
+       * See 'InverseOffers' below.
+       * </pre>
+       */
+      public static final int INVERSE_OFFERS_VALUE = 9;
+      /**
+       * <code>RESCIND = 3;</code>
+       *
+       * <pre>
+       * See 'Rescind' below.
+       * </pre>
+       */
+      public static final int RESCIND_VALUE = 3;
+      /**
+       * <code>RESCIND_INVERSE_OFFER = 10;</code>
+       *
+       * <pre>
+       * See 'RescindInverseOffer' below.
+       * </pre>
+       */
+      public static final int RESCIND_INVERSE_OFFER_VALUE = 10;
+      /**
+       * <code>UPDATE = 4;</code>
+       *
+       * <pre>
+       * See 'Update' below.
+       * </pre>
+       */
+      public static final int UPDATE_VALUE = 4;
+      /**
+       * <code>MESSAGE = 5;</code>
+       *
+       * <pre>
+       * See 'Message' below.
+       * </pre>
+       */
+      public static final int MESSAGE_VALUE = 5;
+      /**
+       * <code>FAILURE = 6;</code>
+       *
+       * <pre>
+       * See 'Failure' below.
+       * </pre>
+       */
+      public static final int FAILURE_VALUE = 6;
+      /**
+       * <code>ERROR = 7;</code>
+       *
+       * <pre>
+       * See 'Error' below.
+       * </pre>
+       */
+      public static final int ERROR_VALUE = 7;
+      /**
+       * <code>HEARTBEAT = 8;</code>
+       *
+       * <pre>
+       * Periodic message sent by the Mesos master according to
+       * 'Subscribed.heartbeat_interval_seconds'. If the scheduler does
+       * not receive any events (including heartbeats) for an extended
+       * period of time (e.g., 5 x heartbeat_interval_seconds), there is
+       * likely a network partition. In such a case the scheduler should
+       * close the existing subscription connection and resubscribe
+       * using a backoff strategy.
+       * </pre>
+       */
+      public static final int HEARTBEAT_VALUE = 8;
+
+
+      public final int getNumber() { return value; }
+
+      public static Type valueOf(int value) {
+        switch (value) {
+          case 0: return UNKNOWN;
+          case 1: return SUBSCRIBED;
+          case 2: return OFFERS;
+          case 9: return INVERSE_OFFERS;
+          case 3: return RESCIND;
+          case 10: return RESCIND_INVERSE_OFFER;
+          case 4: return UPDATE;
+          case 5: return MESSAGE;
+          case 6: return FAILURE;
+          case 7: return ERROR;
+          case 8: return HEARTBEAT;
+          default: return null;
+        }
+      }
+
+      public static com.google.protobuf.Internal.EnumLiteMap<Type>
+          internalGetValueMap() {
+        return internalValueMap;
+      }
+      private static com.google.protobuf.Internal.EnumLiteMap<Type>
+          internalValueMap =
+            new com.google.protobuf.Internal.EnumLiteMap<Type>() {
+              public Type findValueByNumber(int number) {
+                return Type.valueOf(number);
+              }
+            };
+
+      public final com.google.protobuf.Descriptors.EnumValueDescriptor
+          getValueDescriptor() {
+        return getDescriptor().getValues().get(index);
+      }
+      public final com.google.protobuf.Descriptors.EnumDescriptor
+          getDescriptorForType() {
+        return getDescriptor();
+      }
+      public static final com.google.protobuf.Descriptors.EnumDescriptor
+          getDescriptor() {
+        return org.apache.mesos.scheduler.Protos.Event.getDescriptor().getEnumTypes().get(0);
+      }
+
+      private static final Type[] VALUES = values();
+
+      public static Type valueOf(
+          com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
+        if (desc.getType() != getDescriptor()) {
+          throw new java.lang.IllegalArgumentException(
+            "EnumValueDescriptor is not for this type.");
+        }
+        return VALUES[desc.getIndex()];
+      }
+
+      private final int index;
+      private final int value;
+
+      private Type(int index, int value) {
+        this.index = index;
+        this.value = value;
+      }
+
+      // @@protoc_insertion_point(enum_scope:mesos.scheduler.Event.Type)
+    }
+
+    public interface SubscribedOrBuilder
+        extends com.google.protobuf.MessageOrBuilder {
+
+      // required .mesos.FrameworkID framework_id = 1;
+      /**
+       * <code>required .mesos.FrameworkID framework_id = 1;</code>
+       */
+      boolean hasFrameworkId();
+      /**
+       * <code>required .mesos.FrameworkID framework_id = 1;</code>
+       */
+      org.apache.mesos.Protos.FrameworkID getFrameworkId();
+      /**
+       * <code>required .mesos.FrameworkID framework_id = 1;</code>
+       */
+      org.apache.mesos.Protos.FrameworkIDOrBuilder getFrameworkIdOrBuilder();
+
+      // optional double heartbeat_interval_seconds = 2;
+      /**
+       * <code>optional double heartbeat_interval_seconds = 2;</code>
+       *
+       * <pre>
+       * This value will be set if the master is sending heartbeats. See
+       * the comment above on 'HEARTBEAT' for more details.
+       * </pre>
+       */
+      boolean hasHeartbeatIntervalSeconds();
+      /**
+       * <code>optional double heartbeat_interval_seconds = 2;</code>
+       *
+       * <pre>
+       * This value will be set if the master is sending heartbeats. See
+       * the comment above on 'HEARTBEAT' for more details.
+       * </pre>
+       */
+      double getHeartbeatIntervalSeconds();
+
+      // optional .mesos.MasterInfo master_info = 3;
+      /**
+       * <code>optional .mesos.MasterInfo master_info = 3;</code>
+       *
+       * <pre>
+       * Since Mesos 1.1.
+       * </pre>
+       */
+      boolean hasMasterInfo();
+      /**
+       * <code>optional .mesos.MasterInfo master_info = 3;</code>
+       *
+       * <pre>
+       * Since Mesos 1.1.
+       * </pre>
+       */
+      org.apache.mesos.Protos.MasterInfo getMasterInfo();
+      /**
+       * <code>optional .mesos.MasterInfo master_info = 3;</code>
+       *
+       * <pre>
+       * Since Mesos 1.1.
+       * </pre>
+       */
+      org.apache.mesos.Protos.MasterInfoOrBuilder getMasterInfoOrBuilder();
+    }
+    /**
+     * Protobuf type {@code mesos.scheduler.Event.Subscribed}
+     *
+     * <pre>
+     * First event received when the scheduler subscribes.
+     * </pre>
+     */
+    public static final class Subscribed extends
+        com.google.protobuf.GeneratedMessage
+        implements SubscribedOrBuilder {
+      // Use Subscribed.newBuilder() to construct.
+      private Subscribed(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
+        super(builder);
+        this.unknownFields = builder.getUnknownFields();
+      }
+      private Subscribed(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+      private static final Subscribed defaultInstance;
+      public static Subscribed getDefaultInstance() {
+        return defaultInstance;
+      }
+
+      public Subscribed getDefaultInstanceForType() {
+        return defaultInstance;
+      }
+
+      private final com.google.protobuf.UnknownFieldSet unknownFields;
+      @java.lang.Override
+      public final com.google.protobuf.UnknownFieldSet
+          getUnknownFields() {
+        return this.unknownFields;
+      }
+      private Subscribed(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        initFields();
+        int mutable_bitField0_ = 0;
+        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+            com.google.protobuf.UnknownFieldSet.newBuilder();
+        try {
+          boolean done = false;
+          while (!done) {
+            int tag = input.readTag();
+            switch (tag) {
+              case 0:
+                done = true;
+                break;
+              default: {
+                if (!parseUnknownField(input, unknownFields,
+                                       extensionRegistry, tag)) {
+                  done = true;
+                }
+                break;
+              }
+              case 10: {
+                org.apache.mesos.Protos.FrameworkID.Builder subBuilder = null;
+                if (((bitField0_ & 0x00000001) == 0x00000001)) {
+                  subBuilder = frameworkId_.toBuilder();
+                }
+                frameworkId_ = input.readMessage(org.apache.mesos.Protos.FrameworkID.PARSER, extensionRegistry);
+                if (subBuilder != null) {
+                  subBuilder.mergeFrom(frameworkId_);
+                  frameworkId_ = subBuilder.buildPartial();
+                }
+                bitField0_ |= 0x00000001;
+                break;
+              }
+              case 17: {
+                bitField0_ |= 0x00000002;
+                heartbeatIntervalSeconds_ = input.readDouble();
+                break;
+              }
+              case 26: {
+                org.apache.mesos.Protos.MasterInfo.Builder subBuilder = null;
+                if (((bitField0_ & 0x00000004) == 0x00000004)) {
+                  subBuilder = masterInfo_.toBuilder();
+                }
+                masterInfo_ = input.readMessage(org.apache.mesos.Protos.MasterInfo.PARSER, extensionRegistry);
+                if (subBuilder != null) {
+                  subBuilder.mergeFrom(masterInfo_);
+                  masterInfo_ = subBuilder.buildPartial();
+                }
+                bitField0_ |= 0x00000004;
+                break;
+              }
+            }
+          }
+        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          throw e.setUnfinishedMessage(this);
+        } catch (java.io.IOException e) {
+          throw new com.google.protobuf.InvalidProtocolBufferException(
+              e.getMessage()).setUnfinishedMessage(this);
+        } finally {
+          this.unknownFields = unknownFields.build();
+          makeExtensionsImmutable();
+        }
+      }
+      public static final com.google.protobuf.Descriptors.Descriptor
+          getDescriptor() {
+        return org.apache.mesos.scheduler.Protos.internal_static_mesos_scheduler_Event_Subscribed_descriptor;
+      }
+
+      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+          internalGetFieldAccessorTable() {
+        return org.apache.mesos.scheduler.Protos.internal_static_mesos_scheduler_Event_Subscribed_fieldAccessorTable
+            .ensureFieldAccessorsInitialized(
+                org.apache.mesos.scheduler.Protos.Event.Subscribed.class, org.apache.mesos.scheduler.Protos.Event.Subscribed.Builder.class);
+      }
+
+      public static com.google.protobuf.Parser<Subscribed> PARSER =
+          new com.google.protobuf.AbstractParser<Subscribed>() {
+        public Subscribed parsePartialFrom(
+            com.google.protobuf.CodedInputStream input,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws com.google.protobuf.InvalidProtocolBufferException {
+          return new Subscribed(input, extensionRegistry);
+        }
+      };
+
+      @java.lang.Override
+      public com.google.protobuf.Parser<Subscribed> getParserForType() {
+        return PARSER;
+      }
+
+      private int bitField0_;
+      // required .mesos.FrameworkID framework_id = 1;
+      public static final int FRAMEWORK_ID_FIELD_NUMBER = 1;
+      private org.apache.mesos.Protos.FrameworkID frameworkId_;
+      /**
+       * <code>required .mesos.FrameworkID framework_id = 1;</code>
+       */
+      public boolean hasFrameworkId() {
+        return ((bitField0_ & 0x00000001) == 0x00000001);
+      }
+      /**
+       * <code>required .mesos.FrameworkID framework_id = 1;</code>
+       */
+      public org.apache.mesos.Protos.FrameworkID getFrameworkId() {
+        return frameworkId_;
+      }
+      /**
+       * <code>required .mesos.FrameworkID framework_id = 1;</code>
+       */
+      public org.apache.mesos.Protos.FrameworkIDOrBuilder getFrameworkIdOrBuilder() {
+        return frameworkId_;
+      }
+
+      // optional double heartbeat_interval_seconds = 2;
+      public static final int HEARTBEAT_INTERVAL_SECONDS_FIELD_NUMBER = 2;
+      private double heartbeatIntervalSeconds_;
+      /**
+       * <code>optional double heartbeat_interval_seconds = 2;</code>
+       *
+       * <pre>
+       * This value will be set if the master is sending heartbeats. See
+       * the comment above on 'HEARTBEAT' for more details.
+       * </pre>
+       */
+      public boolean hasHeartbeatIntervalSeconds() {
+        return ((bitField0_ & 0x00000002) == 0x00000002);
+      }
+      /**
+       * <code>optional double heartbeat_interval_seconds = 2;</code>
+       *
+       * <pre>
+       * This value will be set if the master is sending heartbeats. See
+       * the comment above on 'HEARTBEAT' for more details.
+       * </pre>
+       */
+      public double getHeartbeatIntervalSeconds() {
+        return heartbeatIntervalSeconds_;
+      }
+
+      // optional .mesos.MasterInfo master_info = 3;
+      public static final int MASTER_INFO_FIELD_NUMBER = 3;
+      private org.apache.mesos.Protos.MasterInfo masterInfo_;
+      /**
+       * <code>optional .mesos.MasterInfo master_info = 3;</code>
+       *
+       * <pre>
+       * Since Mesos 1.1.
+       * </pre>
+       */
+      public boolean hasMasterInfo() {
+        return ((bitField0_ & 0x00000004) == 0x00000004);
+      }
+      /**
+       * <code>optional .mesos.MasterInfo master_info = 3;</code>
+       *
+       * <pre>
+       * Since Mesos 1.1.
+       * </pre>
+       */
+      public org.apache.mesos.Protos.MasterInfo getMasterInfo() {
+        return masterInfo_;
+      }
+      /**
+       * <code>optional .mesos.MasterInfo master_info = 3;</code>
+       *
+       * <pre>
+       * Since Mesos 1.1.
+       * </pre>
+       */
+      public org.apache.mesos.Protos.MasterInfoOrBuilder getMasterInfoOrBuilder() {
+        return masterInfo_;
+      }
+
+      private void initFields() {
+        frameworkId_ = org.apache.mesos.Protos.FrameworkID.getDefaultInstance();
+        heartbeatIntervalSeconds_ = 0D;
+        masterInfo_ = org.apache.mesos.Protos.MasterInfo.getDefaultInstance();
+      }
+      private byte memoizedIsInitialized = -1;
+      public final boolean isInitialized() {
+        byte isInitialized = memoizedIsInitialized;
+        if (isInitialized != -1) return isInitialized == 1;
+
+        if (!hasFrameworkId()) {
+          memoizedIsInitialized = 0;
+          return false;
+        }
+        if (!getFrameworkId().isInitialized()) {
+          memoizedIsInitialized = 0;
+          return false;
+        }
+        if (hasMasterInfo()) {
+          if (!getMasterInfo().isInitialized()) {
+            memoizedIsInitialized = 0;
+            return false;
+          }
+        }
+        memoizedIsInitialized = 1;
+        return true;
+      }
+
+      public void writeTo(com.google.protobuf.CodedOutputStream output)
+                          throws java.io.IOException {
+        getSerializedSize();
+        if (((bitField0_ & 0x00000001) == 0x00000001)) {
+          output.writeMessage(1, frameworkId_);
+        }
+        if (((bitField0_ & 0x00000002) == 0x00000002)) {
+          output.writeDouble(2, heartbeatIntervalSeconds_);
+        }
+        if (((bitField0_ & 0x00000004) == 0x00000004)) {
+          output.writeMessage(3, masterInfo_);
+        }
+        getUnknownFields().writeTo(output);
+      }
+
+      private int memoizedSerializedSize = -1;
+      public int getSerializedSize() {
+        int size = memoizedSerializedSize;
+        if (size != -1) return size;
+
+        size = 0;
+        if (((bitField0_ & 0x00000001) == 0x00000001)) {
+          size += com.google.protobuf.CodedOutputStream
+            .computeMessageSize(1, frameworkId_);
+        }
+        if (((bitField0_ & 0x00000002) == 0x00000002)) {
+          size += com.google.protobuf.CodedOutputStream
+            .computeDoubleSize(2, heartbeatIntervalSeconds_);
+        }
+        if (((bitField0_ & 0x00000004) == 0x00000004)) {
+          size += com.google.protobuf.CodedOutputStream
+            .computeMessageSize(3, masterInfo_);
+        }
+        size += getUnknownFields().getSerializedSize();
+        memoizedSerializedSize = size;
+        return size;
+      }
+
+      private static final long serialVersionUID = 0L;
+      @java.lang.Override
+      protected java.lang.Object writeReplace()
+          throws java.io.ObjectStreamException {
+        return super.writeReplace();
+      }
+
+      public static org.apache.mesos.scheduler.Protos.Event.Subscribed parseFrom(
+          com.google.protobuf.ByteString data)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        return PARSER.parseFrom(data);
+      }
+      public static org.apache.mesos.scheduler.Protos.Event.Subscribed parseFrom(
+          com.google.protobuf.ByteString data,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        return PARSER.parseFrom(data, extensionRegistry);
+      }
+      public static org.apache.mesos.scheduler.Protos.Event.Subscribed parseFrom(byte[] data)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        return PARSER.parseFrom(data);
+      }
+      public static org.apache.mesos.scheduler.Protos.Event.Subscribed parseFrom(
+          byte[] data,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        return PARSER.parseFrom(data, extensionRegistry);
+      }
+      public static org.apache.mesos.scheduler.Protos.Event.Subscribed parseFrom(java.io.InputStream input)
+          throws java.io.IOException {
+        return PARSER.parseFrom(input);
+      }
+      public static org.apache.mesos.scheduler.Protos.Event.Subscribed parseFrom(
+          java.io.InputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws java.io.IOException {
+        return PARSER.parseFrom(input, extensionRegistry);
+      }
+      public static org.apache.mesos.scheduler.Protos.Event.Subscribed parseDelimitedFrom(java.io.InputStream input)
+          throws java.io.IOException {
+        return PARSER.parseDelimitedFrom(input);
+      }
+      public static org.apache.mesos.scheduler.Protos.Event.Subscribed parseDelimitedFrom(
+          java.io.InputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws java.io.IOException {
+        return PARSER.parseDelimitedFrom(input, extensionRegistry);
+      }
+      public static org.apache.mesos.scheduler.Protos.Event.Subscribed parseFrom(
+          com.google.protobuf.CodedInputStream input)
+          throws java.io.IOException {
+        return PARSER.parseFrom(input);
+      }
+      public static org.apache.mesos.scheduler.Protos.Event.Subscribed parseFrom(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws java.io.IOException {
+        return PARSER.parseFrom(input, extensionRegistry);
+      }
+
+      public static Builder newBuilder() { return Builder.create(); }
+      public Builder newBuilderForType() { return newBuilder(); }
+      public static Builder newBuilder(org.apache.mesos.scheduler.Protos.Event.Subscribed prototype) {
+        return newBuilder().mergeFrom(prototype);
+      }
+      public Builder toBuilder() { return newBuilder(this); }
+
+      @java.lang.Override
+      protected Builder newBuilderForType(
+          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+        Builder builder = new Builder(parent);
+        return builder;
+      }
+      /**
+       * Protobuf type {@code mesos.scheduler.Event.Subscribed}
+       *
+       * <pre>
+       * First event received when the scheduler subscribes.
+       * </pre>
+       */
+      public static final class Builder extends
+          com.google.protobuf.GeneratedMessage.Builder<Builder>
+         implements org.apache.mesos.scheduler.Protos.Event.SubscribedOrBuilder {
+        public static final com.google.protobuf.Descriptors.Descriptor
+            getDescriptor() {
+          return org.apache.mesos.scheduler.Protos.internal_static_mesos_scheduler_Event_Subscribed_descriptor;
+        }
+
+        protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+            internalGetFieldAccessorTable() {
+          return org.apache.mesos.scheduler.Protos.internal_static_mesos_scheduler_Event_Subscribed_fieldAccessorTable
+              .ensureFieldAccessorsInitialized(
+                  org.apache.mesos.scheduler.Protos.Event.Subscribed.class, org.apache.mesos.scheduler.Protos.Event.Subscribed.Builder.class);
+        }
+
+        // Construct using org.apache.mesos.scheduler.Protos.Event.Subscribed.newBuilder()
+        private Builder() {
+          maybeForceBuilderInitialization();
+        }
+
+        private Builder(
+            com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+          super(parent);
+          maybeForceBuilderInitialization();
+        }
+        private void maybeForceBuilderInitialization() {
+          if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
+            getFrameworkIdFieldBuilder();
+            getMasterInfoFieldBuilder();
+          }
+        }
+        private static Builder create() {
+          return new Builder();
+        }
+
+        public Builder clear() {
+          super.clear();
+          if (frameworkIdBuilder_ == null) {
+            frameworkId_ = org.apache.mesos.Protos.FrameworkID.getDefaultInstance();
+          } else {
+            frameworkIdBuilder_.clear();
+          }
+          bitField0_ = (bitField0_ & ~0x00000001);
+          heartbeatIntervalSeconds_ = 0D;
+          bitField0_ = (bitField0_ & ~0x00000002);
+          if (masterInfoBuilder_ == null) {
+            masterInfo_ = org.apache.mesos.Protos.MasterInfo.getDefaultInstance();
+          } else {
+            masterInfoBuilder_.clear();
+          }
+          bitField0_ = (bitField0_ & ~0x00000004);
+          return this;
+        }
+
+        public Builder clone() {
+          return create().mergeFrom(buildPartial());
+        }
+
+        public com.google.protobuf.Descriptors.Descriptor
+            getDescriptorForType() {
+          return org.apache.mesos.scheduler.Protos.internal_static_mesos_scheduler_Event_Subscribed_descriptor;
+        }
+
+        public org.apache.mesos.scheduler.Protos.Event.Subscribed getDefaultInstanceForType() {
+          return org.apache.mesos.scheduler.Protos.Event.Subscribed.getDefaultInstance();
+        }
+
+        public org.apache.mesos.scheduler.Protos.Event.Subscribed build() {
+          org.apache.mesos.scheduler.Protos.Event.Subscribed result = buildPartial();
+          if (!result.isInitialized()) {
+            throw newUninitializedMessageException(result);
+          }
+          return result;
+        }
+
+        public org.apache.mesos.scheduler.Protos.Event.Subscribed buildPartial() {
+          org.apache.mesos.scheduler.Protos.Event.Subscribed result = new org.apache.mesos.scheduler.Protos.Event.Subscribed(this);
+          int from_bitField0_ = bitField0_;
+          int to_bitField0_ = 0;
+          if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
+            to_bitField0_ |= 0x00000001;
+          }
+          if (frameworkIdBuilder_ == null) {
+            result.frameworkId_ = frameworkId_;
+          } else {
+            result.frameworkId_ = frameworkIdBuilder_.build();
+          }
+          if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
+            to_bitField0_ |= 0x00000002;
+          }
+          result.heartbeatIntervalSeconds_ = heartbeatIntervalSeconds_;
+          if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
+            to_bitField0_ |= 0x00000004;
+          }
+          if (masterInfoBuilder_ == null) {
+            result.masterInfo_ = masterInfo_;
+          } else {
+            result.masterInfo_ = masterInfoBuilder_.build();
+          }
+          result.bitField0_ = to_bitField0_;
+          onBuilt();
+          return result;
+        }
+
+        public Builder mergeFrom(com.google.protobuf.Message other) {
+          if (other instanceof org.apache.mesos.scheduler.Protos.Event.Subscribed) {
+            return mergeFrom((org.apache.mesos.scheduler.Protos.Event.Subscribed)other);
+          } else {
+            super.mergeFrom(other);
+            return this;
+          }
+        }
+
+        public Builder mergeFrom(org.apache.mesos.scheduler.Protos.Event.Subscribed other) {
+          if (other == org.apache.mesos.scheduler.Protos.Event.Subscribed.getDefaultInstance()) return this;
+          if (other.hasFrameworkId()) {
+            mergeFrameworkId(other.getFrameworkId());
+          }
+          if (other.hasHeartbeatIntervalSeconds()) {
+            setHeartbeatIntervalSeconds(other.getHeartbeatIntervalSeconds());
+          }
+          if (other.hasMasterInfo()) {
+            mergeMasterInfo(other.getMasterInfo());
+          }
+          this.mergeUnknownFields(other.getUnknownFields());
+          return this;
+        }
+
+        public final boolean isInitialized() {
+          if (!hasFrameworkId()) {
+            
+            return false;
+          }
+          if (!getFrameworkId().isInitialized()) {
+            
+            return false;
+          }
+          if (hasMasterInfo()) {
+            if (!getMasterInfo().isInitialized()) {
+              
+              return false;
+            }
+          }
+          return true;
+        }
+
+        public Builder mergeFrom(
+            com.google.protobuf.CodedInputStream input,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws java.io.IOException {
+          org.apache.mesos.scheduler.Protos.Event.Subscribed parsedMessage = null;
+          try {
+            parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+            parsedMessage = (org.apache.mesos.scheduler.Protos.Event.Subscribed) e.getUnfinishedMessage();
+            throw e;
+          } finally {
+            if (parsedMessage != null) {
+              mergeFrom(parsedMessage);
+            }
+          }
+          return this;
+        }
+        private int bitField0_;
+
+        // required .mesos.FrameworkID framework_id = 1;
+        private org.apache.mesos.Protos.FrameworkID frameworkId_ = org.apache.mesos.Protos.FrameworkID.getDefaultInstance();
+        private com.google.protobuf.SingleFieldBuilder<
+            org.apache.mesos.Protos.FrameworkID, org.apache.mesos.Protos.FrameworkID.Builder, org.apache.mesos.Protos.FrameworkIDOrBuilder> frameworkIdBuilder_;
+        /**
+         * <code>required .mesos.FrameworkID framework_id = 1;</code>
+         */
+        public boolean hasFrameworkId() {
+          return ((bitField0_ & 0x00000001) == 0x00000001);
+        }
+        /**
+         * <code>required .mesos.FrameworkID framework_id = 1;</code>
+         */
+        public org.apache.mesos.Protos.FrameworkID getFrameworkId() {
+          if (frameworkIdBuilder_ == null) {
+            return frameworkId_;
+          } else {
+            return frameworkIdBuilder_.getMessage();
+          }
+        }
+        /**
+         * <code>required .mesos.FrameworkID framework_id = 1;</code>
+         */
+        public Builder setFrameworkId(org.apache.mesos.Protos.FrameworkID value) {
+          if (frameworkIdBuilder_ == null) {
+            if (value == null) {
+              throw new NullPointerException();
+            }
+            frameworkId_ = value;
+            onChanged();
+          } else {
+            frameworkIdBuilder_.setMessage(value);
+          }
+          bitField0_ |= 0x00000001;
+          return this;
+        }
+        /**
+         * <code>required .mesos.FrameworkID framework_id = 1;</code>
+         */
+        public Builder setFrameworkId(
+            org.apache.mesos.Protos.FrameworkID.Builder builderForValue) {
+          if (frameworkIdBuilder_ == null) {
+            frameworkId_ = builderForValue.build();
+            onChanged();
+          } else {
+            frameworkIdBuilder_.setMessage(builderForValue.build());
+          }
+          bitField0_ |= 0x00000001;
+          return this;
+        }
+        /**
+         * <code>required .mesos.FrameworkID framework_id = 1;</code>
+         */
+        public Builder mergeFrameworkId(org.apache.mesos.Protos.FrameworkID value) {
+          if (frameworkIdBuilder_ == null) {
+            if (((bitField0_ & 0x00000001) == 0x00000001) &&
+                frameworkId_ != org.apache.mesos.Protos.FrameworkID.getDefaultInstance()) {
+              frameworkId_ =
+                org.apache.mesos.Protos.FrameworkID.newBuilder(frameworkId_).mergeFrom(value).buildPartial();
+            } else {
+              frameworkId_ = value;
+            }
+            onChanged();
+          } else {
+            frameworkIdBuilder_.mergeFrom(value);
+          }
+          bitField0_ |= 0x00000001;
+          return this;
+        }
+        /**
+         * <code>required .mesos.FrameworkID framework_id = 1;</code>
+         */
+        public Builder clearFrameworkId() {
+          if (frameworkIdBuilder_ == null) {
+            frameworkId_ = org.apache.mesos.Protos.FrameworkID.getDefaultInstance();
+            onChanged();
+          } else {
+            frameworkIdBuilder_.clear();
+          }
+          bitField0_ = (bitField0_ & ~0x00000001);
+          return this;
+        }
+        /**
+         * <code>required .mesos.FrameworkID framework_id = 1;</code>
+         */
+        public org.apache.mesos.Protos.FrameworkID.Builder getFrameworkIdBuilder() {
+          bitField0_ |= 0x00000001;
+          onChanged();
+          return getFrameworkIdFieldBuilder().getBuilder();
+        }
+        /**
+         * <code>required .mesos.FrameworkID framework_id = 1;</code>
+         */
+        public org.apache.mesos.Protos.FrameworkIDOrBuilder getFrameworkIdOrBuilder() {
+          if (frameworkIdBuilder_ != null) {
+            return frameworkIdBuilder_.getMessageOrBuilder();
+          } else {
+            return frameworkId_;
+          }
+        }
+        /**
+         * <code>required .mesos.FrameworkID framework_id = 1;</code>
+         */
+        private com.google.protobuf.SingleFieldBuilder<
+            org.apache.mesos.Protos.FrameworkID, org.apache.mesos.Protos.FrameworkID.Builder, org.apache.mesos.Protos.FrameworkIDOrBuilder> 
+            getFrameworkIdFieldBuilder() {
+          if (frameworkIdBuilder_ == null) {
+            frameworkIdBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+                org.apache.mesos.Protos.FrameworkID, org.apache.mesos.Protos.FrameworkID.Builder, org.apache.mesos.Protos.FrameworkIDOrBuilder>(
+                    frameworkId_,
+                    getParentForChildren(),
+                    isClean());
+            frameworkId_ = null;
+          }
+          return frameworkIdBuilder_;
+        }
+
+        // optional double heartbeat_interval_seconds = 2;
+        private double heartbeatIntervalSeconds_ ;
+        /**
+         * <code>optional double heartbeat_interval_seconds = 2;</code>
+         *
+         * <pre>
+         * This value will be set if the master is sending heartbeats. See
+         * the comment above on 'HEARTBEAT' for more details.
+         * </pre>
+         */
+        public boolean hasHeartbeatIntervalSeconds() {
+          return ((bitField0_ & 0x00000002) == 0x00000002);
+        }
+        /**
+         * <code>optional double heartbeat_interval_seconds = 2;</code>
+         *
+         * <pre>
+         * This value will be set if the master is sending heartbeats. See
+         * the comment above on 'HEARTBEAT' for more details.
+         * </pre>
+         */
+        public double getHeartbeatIntervalSeconds() {
+          return heartbeatIntervalSeconds_;
+        }
+        /**
+         * <code>optional double heartbeat_interval_seconds = 2;</code>
+         *
+         * <pre>
+         * This value will be set if the master is sending heartbeats. See
+         * the comment above on 'HEARTBEAT' for more details.
+         * </pre>
+         */
+        public Builder setHeartbeatIntervalSeconds(double value) {
+          bitField0_ |= 0x00000002;
+          heartbeatIntervalSeconds_ = value;
+          onChanged();
+          return this;
+        }
+        /**
+         * <code>optional double heartbeat_interval_seconds = 2;</code>
+         *
+         * <pre>
+         * This value will be set if the master is sending heartbeats. See
+         * the comment above on 'HEARTBEAT' for more details.
+         * </pre>
+         */
+        public Builder clearHeartbeatIntervalSeconds() {
+          bitField0_ = (bitField0_ & ~0x00000002);
+          heartbeatIntervalSeconds_ = 0D;
+          onChanged();
+          return this;
+        }
+
+        // optional .mesos.MasterInfo master_info = 3;
+        private org.apache.mesos.Protos.MasterInfo masterInfo_ = org.apache.mesos.Protos.MasterInfo.getDefaultInstance();
+        private com.google.protobuf.SingleFieldBuilder<
+            org.apache.mesos.Protos.MasterInfo, org.apache.mesos.Protos.MasterInfo.Builder, org.apache.mesos.Protos.MasterInfoOrBuilder> masterInfoBuilder_;
+        /**
+         * <code>optional .mesos.MasterInfo master_info = 3;</code>
+         *
+         * <pre>
+         * Since Mesos 1.1.
+         * </pre>
+         */
+        public boolean hasMasterInfo() {
+          return ((bitField0_ & 0x00000004) == 0x00000004);
+        }
+        /**
+         * <code>optional .mesos.MasterInfo master_info = 3;</code>
+         *
+         * <pre>
+         * Since Mesos 1.1.
+         * </pre>
+         */
+        public org.apache.mesos.Protos.MasterInfo getMasterInfo() {
+          if (masterInfoBuilder_ == null) {
+            return masterInfo_;
+          } else {
+            return masterInfoBuilder_.getMessage();
+          }
+        }
+        /**
+         * <code>optional .mesos.MasterInfo master_info = 3;</code>
+         *
+         * <pre>
+         * Since Mesos 1.1.
+         * </pre>
+         */
+        public Builder setMasterInfo(org.apache.mesos.Protos.MasterInfo value) {
+          if (masterInfoBuilder_ == null) {
+            if (value == null) {
+              throw new NullPointerException();
+            }
+            masterInfo_ = value;
+            onChanged();
+          } else {
+            masterInfoBuilder_.setMessage(value);
+          }
+          bitField0_ |= 0x00000004;
+          return this;
+        }
+        /**
+         * <code>optional .mesos.MasterInfo master_info = 3;</code>
+         *
+         * <pre>
+         * Since Mesos 1.1.
+         * </pre>
+         */
+        public Builder setMasterInfo(
+            org.apache.mesos.Protos.MasterInfo.Builder builderForValue) {
+          if (masterInfoBuilder_ == null) {
+            masterInfo_ = builderForValue.build();
+            onChanged();
+          } else {
+            masterInfoBuilder_.setMessage(builderForValue.build());
+          }
+          bitField0_ |= 0x00000004;
+          return this;
+        }
+        /**
+         * <code>optional .mesos.MasterInfo master_info = 3;</code>
+         *
+         * <pre>
+         * Since Mesos 1.1.
+         * </pre>
+         */
+        public Builder mergeMasterInfo(org.apache.mesos.Protos.MasterInfo value) {
+          if (masterInfoBuilder_ == null) {
+            if (((bitField0_ & 0x00000004) == 0x00000004) &&
+                masterInfo_ != org.apache.mesos.Protos.MasterInfo.getDefaultInstance()) {
+              masterInfo_ =
+                org.apache.mesos.Protos.MasterInfo.newBuilder(masterInfo_).mergeFrom(value).buildPartial();
+            } else {
+              masterInfo_ = value;
+            }
+            onChanged();
+          } else {
+            masterInfoBuilder_.mergeFrom(value);
+          }
+          bitField0_ |= 0x00000004;
+          return this;
+        }
+        /**
+         * <code>optional .mesos.MasterInfo master_info = 3;</code>
+         *
+         * <pre>
+         * Since Mesos 1.1.
+         * </pre>
+         */
+        public Builder clearMasterInfo() {
+          if (masterInfoBuilder_ == null) {
+            masterInfo_ = org.apache.mesos.Protos.MasterInfo.getDefaultInstance();
+            onChanged();
+          } else {
+            masterInfoBuilder_.clear();
+          }
+          bitField0_ = (bitField0_ & ~0x00000004);
+          return this;
+        }
+        /**
+         * <code>optional .mesos.MasterInfo master_info = 3;</code>
+         *
+         * <pre>
+         * Since Mesos 1.1.
+         * </pre>
+         */
+        public org.apache.mesos.Protos.MasterInfo.Builder getMasterInfoBuilder() {
+          bitField0_ |= 0x00000004;
+          onChanged();
+          return getMasterInfoFieldBuilder().getBuilder();
+        }
+        /**
+         * <code>optional .mesos.MasterInfo master_info = 3;</code>
+         *
+         * <pre>
+         * Since Mesos 1.1.
+         * </pre>
+         */
+        public org.apache.mesos.Protos.MasterInfoOrBuilder getMasterInfoOrBuilder() {
+          if (masterInfoBuilder_ != null) {
+            return masterInfoBuilder_.getMessageOrBuilder();
+          } else {
+            return masterInfo_;
+          }
+        }
+        /**
+         * <code>optional .mesos.MasterInfo master_info = 3;</code>
+         *
+         * <pre>
+         * Since Mesos 1.1.
+         * </pre>
+         */
+        private com.google.protobuf.SingleFieldBuilder<
+            org.apache.mesos.Protos.MasterInfo, org.apache.mesos.Protos.MasterInfo.Builder, org.apache.mesos.Protos.MasterInfoOrBuilder> 
+            getMasterInfoFieldBuilder() {
+          if (masterInfoBuilder_ == null) {
+            masterInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+                org.apache.mesos.Protos.MasterInfo, org.apache.mesos.Protos.MasterInfo.Builder, org.apache.mesos.Protos.MasterInfoOrBuilder>(
+                    masterInfo_,
+                    getParentForChildren(),
+                    isClean());
+            masterInfo_ = null;
+          }
+          return masterInfoBuilder_;
+        }
+
+        // @@protoc_insertion_point(builder_scope:mesos.scheduler.Event.Subscribed)
+      }
+
+      static {
+        defaultInstance = new Subscribed(true);
+        defaultInstance.initFields();
+      }
+
+      // @@protoc_insertion_point(class_scope:mesos.scheduler.Event.Subscribed)
+    }
+
+    public interface OffersOrBuilder
+        extends com.google.protobuf.MessageOrBuilder {
+
+      // repeated .mesos.Offer offers = 1;
+      /**
+       * <code>repeated .mesos.Offer offers = 1;</code>
+       */
+      java.util.List<org.apache.mesos.Protos.Offer> 
+          getOffersList();
+      /**
+       * <code>repeated .mesos.Offer offers = 1;</code>
+       */
+      org.apache.mesos.Protos.Offer getOffers(int index);
+      /**
+       * <code>repeated .mesos.Offer offers = 1;</code>
+       */
+      int getOffersCount();
+      /**
+       * <code>repeated .mesos.Offer offers = 1;</code>
+       */
+      java.util.List<? extends org.apache.mesos.Protos.OfferOrBuilder> 
+          getOffersOrBuilderList();
+      /**
+       * <code>repeated .mesos.Offer offers = 1;</code>
+       */
+      org.apache.mesos.Protos.OfferOrBuilder getOffersOrBuilder(
+          int index);
+    }
+    /**
+     * Protobuf type {@code mesos.scheduler.Event.Offers}
+     *
+     * <pre>
+     * Received whenever there are new resources that are offered to the
+     * scheduler. Each offer corresponds to a set of resources on an
+     * agent. Until the scheduler accepts or declines an offer the
+     * resources are considered allocated to the scheduler.
+     * </pre>
+     */
+    public static final class Offers extends
+        com.google.protobuf.GeneratedMessage
+        implements OffersOrBuilder {
+      // Use Offers.newBuilder() to construct.
+      private Offers(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
+        super(builder);
+        this.unknownFields = builder.getUnknownFields();
+      }
+      private Offers(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+      private static final Offers defaultInstance;
+      public static Offers getDefaultInstance() {
+        return defaultInstance;
+      }
+
+      public Offers getDefaultInstanceForType() {
+        return defaultInstance;
+      }
+
+      private final com.google.protobuf.UnknownFieldSet unknownFields;
+      @java.lang.Override
+      public final com.google.protobuf.UnknownFieldSet
+          getUnknownFields() {
+        return this.unknownFields;
+      }
+      private Offers(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        initFields();
+        int mutable_bitField0_ = 0;
+        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+            com.google.protobuf.UnknownFieldSet.newBuilder();
+        try {
+          boolean done = false;
+          while (!done) {
+            int tag = input.readTag();
+            switch (tag) {
+              case 0:
+                done = true;
+                break;
+              default: {
+                if (!parseUnknownField(input, unknownFields,
+                                       extensionRegistry, tag)) {
+                  done = true;
+                }
+                break;
+              }
+              case 10: {
+                if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
+                  offers_ = new java.util.ArrayList<org.apache.mesos.Protos.Offer>();
+                  mutable_bitField0_ |= 0x00000001;
+                }
+                offers_.add(input.readMessage(org.apache.mesos.Protos.Offer.PARSER, extensionRegistry));
+                break;
+              }
+            }
+          }
+        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          throw e.setUnfinishedMessage(this);
+        } catch (java.io.IOException e) {
+          throw new com.google.protobuf.InvalidProtocolBufferException(
+              e.getMessage()).setUnfinishedMessage(this);
+        } finally {
+          if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
+            offers_ = java.util.Collections.unmodifiableList(offers_);
+          }
+          this.unknownFields = unknownFields.build();
+          makeExtensionsImmutable();
+        }
+      }
+      public static final com.google.protobuf.Descriptors.Descriptor
+          getDescriptor() {
+        return org.apache.mesos.scheduler.Protos.internal_static_mesos_scheduler_Event_Offers_descriptor;
+      }
+
+      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+          internalGetFieldAccessorTable() {
+        return org.apache.mesos.scheduler.Protos.internal_static_mesos_scheduler_Event_Offers_fieldAccessorTable
+            .ensureFieldAccessorsInitialized(
+                org.apache.mesos.scheduler.Protos.Event.Offers.class, org.apache.mesos.scheduler.Protos.Event.Offers.Builder.class);
+      }
+
+      public static com.google.protobuf.Parser<Offers> PARSER =
+          new com.google.protobuf.AbstractParser<Offers>() {
+        public Offers parsePartialFrom(
+            com.google.protobuf.CodedInputStream input,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws com.google.protobuf.InvalidProtocolBufferException {
+          return new Offers(input, extensionRegistry);
+        }
+      };
+
+      @java.lang.Override
+      public com.google.protobuf.Parser<Offers> getParserForType() {
+        return PARSER;
+      }
+
+      // repeated .mesos.Offer offers = 1;
+      public static final int OFFERS_FIELD_NUMBER = 1;
+      private java.util.List<org.apache.mesos.Protos.Offer> offers_;
+      /**
+       * <code>repeated .mesos.Offer offers = 1;</code>
+       */
+      public java.util.List<org.apache.mesos.Protos.Offer> getOffersList() {
+        return offers_;
+      }
+      /**
+       * <code>repeated .mesos.Offer offers = 1;</code>
+       */
+      public java.util.List<? extends org.apache.mesos.Protos.OfferOrBuilder> 
+          getOffersOrBuilderList() {
+        return offers_;
+      }
+      /**
+       * <code>repeated .mesos.Offer offers = 1;</code>
+       */
+      public int getOffersCount() {
+        return offers_.size();
+      }
+      /**
+       * <code>repeated .mesos.Offer offers = 1;</code>
+       */
+      public org.apache.mesos.Protos.Offer getOffers(int index) {
+        return offers_.get(index);
+      }
+      /**
+       * <code>repeated .mesos.Offer offers = 1;</code>
+       */
+      public org.apache.mesos.Protos.OfferOrBuilder getOffersOrBuilder(
+          int index) {
+        return offers_.get(index);
+      }
+
+      private void initFields() {
+        offers_ = java.util.Collections.emptyList();
+      }
+      private byte memoizedIsInitialized = -1;
+      public final boolean isInitialized() {
+        byte isInitialized = memoizedIsInitialized;
+        if (isInitialized != -1) return isInitialized == 1;
+
+        for (int i = 0; i < getOffersCount(); i++) {
+          if (!getOffers(i).isInitialized()) {
+            memoizedIsInitialized = 0;
+            return false;
+          }
+        }
+        memoizedIsInitialized = 1;
+        return true;
+      }
+
+      public void writeTo(com.google.protobuf.CodedOutputStream output)
+                          throws java.io.IOException {
+        getSerializedSize();
+        for (int i = 0; i < offers_.size(); i++) {
+          output.writeMessage(1, offers_.get(i));
+        }
+        getUnknownFields().writeTo(output);
+      }
+
+      private int memoizedSerializedSize = -1;
+      public int getSerializedSize() {
+        int size = memoizedSerializedSize;
+        if (size != -1) return size;
+
+        size = 0;
+        for (int i = 0; i < offers_.size(); i++) {
+          size += com.google.protobuf.CodedOutputStream
+            .computeMessageSize(1, offers_.get(i));
+        }
+        size += getUnknownFields().getSerializedSize();
+        memoizedSerializedSize = size;
+        return size;
+      }
+
+      private static final long serialVersionUID = 0L;
+      @java.lang.Override
+      protected java.lang.Object writeReplace()
+          throws java.io.ObjectStreamException {
+        return super.writeReplace();
+      }
+
+      public static org.apache.mesos.scheduler.Protos.Event.Offers parseFrom(
+          com.google.protobuf.ByteString data)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        return PARSER.parseFrom(data);
+      }
+      public static org.apache.mesos.scheduler.Protos.Event.Offers parseFrom(
+          com.google.protobuf.ByteString data,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        return PARSER.parseFrom(data, extensionRegistry);
+      }
+      public static org.apache.mesos.scheduler.Protos.Event.Offers parseFrom(byte[] data)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        return PARSER.parseFrom(data);
+      }
+      public static org.apache.mesos.scheduler.Protos.Event.Offers parseFrom(
+          byte[] data,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        return PARSER.parseFrom(data, extensionRegistry);
+      }
+      public static org.apache.mesos.scheduler.Protos.Event.Offers parseFrom(java.io.InputStream input)
+          throws java.io.IOException {
+        return PARSER.parseFrom(input);
+      }
+      public static org.apache.mesos.scheduler.Protos.Event.Offers parseFrom(
+          java.io.InputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws java.io.IOException {
+        return PARSER.parseFrom(input, extensionRegistry);
+      }
+      public static org.apache.mesos.scheduler.Protos.Event.Offers parseDelimitedFrom(java.io.InputStream input)
+          throws java.io.IOException {
+        return PARSER.parseDelimitedFrom(input);
+      }
+      public static org.apache.mesos.scheduler.Protos.Event.Offers parseDelimitedFrom(
+          java.io.InputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws java.io.IOException {
+        return PARSER.parseDelimitedFrom(input, extensionRegistry);
+      }
+      public static org.apache.mesos.scheduler.Protos.Event.Offers parseFrom(
+          com.google.protobuf.CodedInputStream input)
+          throws java.io.IOException {
+        return PARSER.parseFrom(input);
+      }
+      public static org.apache.mesos.scheduler.Protos.Event.Offers parseFrom(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws java.io.IOException {
+        return PARSER.parseFrom(input, extensionRegistry);
+      }
+
+      public static Builder newBuilder() { return Builder.create(); }
+      public Builder newBuilderForType() { return newBuilder(); }
+      public static Builder newBuilder(org.apache.mesos.scheduler.Protos.Event.Offers prototype) {
+        return newBuilder().mergeFrom(prototype);
+      }
+      public Builder toBuilder() { return newBuilder(this); }
+
+      @java.lang.Override
+      protected Builder newBuilderForType(
+          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+        Builder builder = new Builder(parent);
+        return builder;
+      }
+      /**
+       * Protobuf type {@code mesos.scheduler.Event.Offers}
+       *
+       * <pre>
+       * Received whenever there are new resources that are offered to the
+       * scheduler. Each offer corresponds to a set of resources on an
+       * agent. Until the scheduler accepts or declines an offer the
+       * resources are considered allocated to the scheduler.
+       * </pre>
+       */
+      public static final class Builder extends
+          com.google.protobuf.GeneratedMessage.Builder<Builder>
+         implements org.apache.mesos.scheduler.Protos.Event.OffersOrBuilder {
+        public static final com.google.protobuf.Descriptors.Descriptor
+            getDescriptor() {
+          return org.apache.mesos.scheduler.Protos.internal_static_mesos_scheduler_Event_Offers_descriptor;
+        }
+
+        protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+            internalGetFieldAccessorTable() {
+          return org.apache.mesos.scheduler.Protos.internal_static_mesos_scheduler_Event_Offers_fieldAccessorTable
+              .ensureFieldAccessorsInitialized(
+                  org.apache.mesos.scheduler.Protos.Event.Offers.class, org.apache.mesos.scheduler.Protos.Event.Offers.Builder.class);
+        }
+
+        // Construct using org.apache.mesos.scheduler.Protos.Event.Offers.newBuilder()
+        private Builder() {
+          maybeForceBuilderInitialization();
+        }
+
+        private Builder(
+            com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+          super(parent);
+          maybeForceBuilderInitialization();
+        }
+        private void maybeForceBuilderInitialization() {
+          if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
+            getOffersFieldBuilder();
+          }
+        }
+        private static Builder create() {
+          return new Builder();
+        }
+
+        public Builder clear() {
+          super.clear();
+          if (offersBuilder_ == null) {
+            offers_ = java.util.Collections.emptyList();
+            bitField0_ = (bitField0_ & ~0x00000001);
+          } else {
+            offersBuilder_.clear();
+          }
+          return this;
+        }
+
+        public Builder clone() {
+          return create().mergeFrom(buildPartial());
+        }
+
+        public com.google.protobuf.Descriptors.Descriptor
+            getDescriptorForType() {
+          return org.apache.mesos.scheduler.Protos.internal_static_mesos_scheduler_Event_Offers_descriptor;
+        }
+
+        public org.apache.mesos.scheduler.Protos.Event.Offers getDefaultInstanceForType() {
+          return org.apache.mesos.scheduler.Protos.Event.Offers.getDefaultInstance();
+        }
+
+        public org.apache.mesos.scheduler.Protos.Event.Offers build() {
+          org.apache.mesos.scheduler.Protos.Event.Offers result = buildPartial();
+          if (!result.isInitialized()) {
+            throw newUninitializedMessageException(result);
+          }
+          return result;
+        }
+
+        public org.apache.mesos.scheduler.Protos.Event.Offers buildPartial() {
+          org.apache.mesos.scheduler.Protos.Event.Offers result = new org.apache.mesos.scheduler.Protos.Event.Offers(this);
+          int from_bitField0_ = bitField0_;
+          if (offersBuilder_ == null) {
+            if (((bitField0_ & 0x00000001) == 0x00000001)) {
+              offers_ = java.util.Collections.unmodifiableList(offers_);
+              bitField0_ = (bitField0_ & ~0x00000001);
+            }
+            result.offers_ = offers_;
+          } else {
+            result.offers_ = offersBuilder_.build();
+          }
+          onBuilt();
+          return result;
+        }
+
+        public Builder mergeFrom(com.google.protobuf.Message other) {
+          if (other instanceof org.apache.mesos.scheduler.Protos.Event.Offers) {
+            return mergeFrom((org.apache.mesos.scheduler.Protos.Event.Offers)other);
+          } else {
+            super.mergeFrom(other);
+            return this;
+          }
+        }
+
+        public Builder mergeFrom(org.apache.mesos.scheduler.Protos.Event.Offers other) {
+          if (other == org.apache.mesos.scheduler.Protos.Event.Offers.getDefaultInstance()) return this;
+          if (offersBuilder_ == null) {
+            if (!other.offers_.isEmpty()) {
+              if (offers_.isEmpty()) {
+                offers_ = other.offers_;
+                bitField0_ = (bitField0_ & ~0x00000001);
+              } else {
+                ensureOffersIsMutable();
+                offers_.addAll(other.offers_);
+              }
+              onChanged();
+            }
+          } else {
+            if (!other.offers_.isEmpty()) {
+              if (offersBuilder_.isEmpty()) {
+                offersBuilder_.dispose();
+                offersBuilder_ = null;
+                offers_ = other.offers_;
+                bitField0_ = (bitField0_ & ~0x00000001);
+                offersBuilder_ = 
+                  com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
+                     getOffersFieldBuilder() : null;
+              } else {
+                offersBuilder_.addAllMessages(other.offers_);
+              }
+            }
+          }
+          this.mergeUnknownFields(other.getUnknownFields());
+          return this;
+        }
+
+        public final boolean isInitialized() {
+          for (int i = 0; i < getOffersCount(); i++) {
+            if (!getOffers(i).isInitialized()) {
+              
+              return false;
+            }
+          }
+          return true;
+        }
+
+        public Builder mergeFrom(
+            com.google.protobuf.CodedInputStream input,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws java.io.IOException {
+          org.apache.mesos.scheduler.Protos.Event.Offers parsedMessage = null;
+          try {
+            parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+            parsedMessage = (org.apache.mesos.scheduler.Protos.Event.Offers) e.getUnfinishedMessage();
+            throw e;
+          } finally {
+            if (parsedMessage != null) {
+              mergeFrom(parsedMessage);
+            }
+          }
+          return this;
+        }
+        private int bitField0_;
+
+        // repeated .mesos.Offer offers = 1;
+        private java.util.List<org.apache.mesos.Protos.Offer> offers_ =
+          java.util.Collections.emptyList();
+        private void ensureOffersIsMutable() {
+          if (!((bitField0_ & 0x00000001) == 0x00000001)) {
+            offers_ = new java.util.ArrayList<org.apache.mesos.Protos.Offer>(offers_);
+            bitField0_ |= 0x00000001;
+           }
+        }
+
+        private com.google.protobuf.RepeatedFieldBuilder<
+            org.apache.mesos.Protos.Offer, org.apache.mesos.Protos.Offer.Builder, org.apache.mesos.Protos.OfferOrBuilder> offersBuilder_;
+
+        /**
+         * <code>repeated .mesos.Offer offers = 1;</code>
+         */
+        public java.util.List<org.apache.mesos.Protos.Offer> getOffersList() {
+          if (offersBuilder_ == null) {
+            return java.util.Collections.unmodifiableList(offers_);
+          } else {
+            return offersBuilder_.getMessageList();
+          }
+        }
+        /**
+         * <code>repeated .mesos.Offer offers = 1;</code>
+         */
+        public int getOffersCount() {
+          if (offersBuilder_ == null) {
+            return offers_.size();
+          } else {
+            return offersBuilder_.getCount();
+          }
+        }
+        /**
+         * <code>repeated .mesos.Offer offers = 1;</code>
+         */
+        public org.apache.mesos.Protos.Offer getOffers(int index) {
+          if (offersBuilder_ == null) {
+            return offers_.get(index);
+          } else {
+            return offersBuilder_.getMessage(index);
+          }
+        }
+        /**
+         * <code>repeated .mesos.Offer offers = 1;</code>
+         */
+        public Builder setOffers(
+            int index, org.apache.mesos.Protos.Offer value) {
+          if (offersBuilder_ == null) {
+            if (value == null) {
+              throw new NullPointerException();
+            }
+            ensureOffersIsMutable();
+            offers_.set(index, value);
+            onChanged();
+          } else {
+            offersBuilder_.setMessage(index, value);
+          }
+          return this;
+        }
+        /**
+         * <code>repeated .mesos.Offer offers = 1;</code>
+         */
+        public Builder setOffers(
+            int index, org.apache.mesos.Protos.Offer.Builder builderForValue) {
+          if (offersBuilder_ == null) {
+            ensureOffersIsMutable();
+            offers_.set(index, builderForValue.build());
+            onChanged();
+          } else {
+            offersBuilder_.setMessage(index, builderForValue.build());
+          }
+          return this;
+        }
+        /**
+         * <code>repeated .mesos.Offer offers = 1;</code>
+         */
+        public Builder addOffers(org.apache.mesos.Protos.Offer value) {
+          if (offersBuilder_ == null) {
+            if (value == null) {
+              throw new NullPointerException();
+            }
+            ensureOffersIsMutable();
+            offers_.add(value);
+            onChanged();
+          } else {
+            offersBuilder_.addMessage(value);
+          }
+          return this;
+        }
+        /**
+         * <code>repeated .mesos.Offer offers = 1;</code>
+         */
+        public Builder addOffers(
+            int index, org.apache.mesos.Protos.Offer value) {
+          if (offersBuilder_ == null) {
+            if (value == null) {
+              throw new NullPointerException();
+            }
+            ensureOffersIsMutable();
+            offers_.add(index, value);
+            onChanged();
+          } else {
+            offersBuilder_.addMessage(index, value);
+          }
+          return this;
+        }
+        /**
+         * <code>repeated .mesos.Offer offers = 1;</code>
+         */
+        public Builder addOffers(
+            org.apache.mesos.Protos.Offer.Builder builderForValue) {
+          if (offersBuilder_ == null) {
+            ensureOffersIsMutable();
+            offers_.add(builderForValue.build());
+            onChanged();
+          } else {
+            offersBuilder_.addMessage(builderForValue.build());
+          }
+          return this;
+        }
+        /**
+         * <code>repeated .mesos.Offer offers = 1;</code>
+         */
+        public Builder addOffers(
+            int index, org.apache.mesos.Protos.Offer.Builder builderForValue) {
+          if (offersBuilder_ == null) {
+            ensureOffersIsMutable();
+            offers_.add(index, builderForValue.build());
+            onChanged();
+          } else {
+            offersBuilder_.addMessage(index, builderForValue.build());
+          }
+          return this;
+        }
+        /**
+         * <code>repeated .mesos.Offer offers = 1;</code>
+         */
+        public Builder addAllOffers(
+            java.lang.Iterable<? extends org.apache.mesos.Protos.Offer> values) {
+          if (offersBuilder_ == null) {
+            ensureOffersIsMutable();
+            super.addAll(values, offers_);
+            onChanged();
+          } else {
+            offersBuilder_.addAllMessages(values);
+          }
+          return this;
+        }
+        /**
+         * <code>repeated .mesos.Offer offers = 1;</code>
+         */
+        public Builder clearOffers() {
+          if (offersBuilder_ == null) {
+            offers_ = java.util.Collections.emptyList();
+            bitField0_ = (bitField0_ & ~0x00000001);
+            onChanged();
+          } else {
+            offersBuilder_.clear();
+          }
+          return this;
+        }
+        /**
+         * <code>repeated .mesos.Offer offers = 1;</code>
+         */
+        public Builder removeOffers(int index) {
+          if (offersBuilder_ == null) {
+            ensureOffersIsMutable();
+            offers_.remove(index);
+            onChanged();
+          } else {
+            offersBuilder_.remove(index);
+          }
+          return this;
+        }
+        /**
+         * <code>repeated .mesos.Offer offers = 1;</code>
+         */
+        public org.apache.mesos.Protos.Offer.Builder getOffersBuilder(
+            int index) {
+          return getOffersFieldBuilder().getBuilder(index);
+        }
+        /**
+         * <code>repeated .mesos.Offer offers = 1;</code>
+         */
+        public org.apache.mesos.Protos.OfferOrBuilder getOffersOrBuilder(
+            int index) {
+          if (offersBuilder_ == null) {
+            return offers_.get(index);  } else {
+            return offersBuilder_.getMessageOrBuilder(index);
+          }
+        }
+        /**
+         * <code>repeated .mesos.Offer offers = 1;</code>
+         */
+        public java.util.List<? extends org.apache.mesos.Protos.OfferOrBuilder> 
+             getOffersOrBuilderList() {
+          if (offersBuilder_ != null) {
+            return offersBuilder_.getMessageOrBuilderList();
+          } else {
+            return java.util.Collections.unmodifiableList(offers_);
+          }
+        }
+        /**
+         * <code>repeated .mesos.Offer offers = 1;</code>
+         */
+        public org.apache.mesos.Protos.Offer.Builder addOffersBuilder() {
+          return getOffersFieldBuilder().addBuilder(
+              org.apache.mesos.Protos.Offer.getDefaultInstance());
+        }
+        /**
+         * <code>repeated .mesos.Offer offers = 1;</code>
+         */
+        public org.apache.mesos.Protos.Offer.Builder addOffersBuilder(
+            int index) {
+          return getOffersFieldBuilder().addBuilder(
+              index, org.apache.mesos.Protos.Offer.getDefaultInstance());
+        }
+        /**
+         * <code>repeated .mesos.Offer offers = 1;</code>
+         */
+        public java.util.List<org.apache.mesos.Protos.Offer.Builder> 
+             getOffersBuilderList() {
+          return getOffersFieldBuilder().getBuilderList();
+        }
+        private com.google.protobuf.RepeatedFieldBuilder<
+            org.apache.mesos.Protos.Offer, org.apache.mesos.Protos.Offer.Builder, org.apache.mesos.Protos.OfferOrBuilder> 
+            getOffersFieldBuilder() {
+          if (offersBuilder_ == null) {
+            offersBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
+                org.apache.mesos.Protos.Offer, org.apache.mesos.Protos.Offer.Builder, org.apache.mesos.Protos.OfferOrBuilder>(
+                    offers_,
+                    ((bitField0_ & 0x00000001) == 0x00000001),
+                    getParentForChildren(),
+                    isClean());
+            offers_ = null;
+          }
+          return offersBuilder_;
+        }
+
+        // @@protoc_insertion_point(builder_scope:mesos.scheduler.Event.Offers)
+      }
+
+      static {
+        defaultInstance = new Offers(true);
+        defaultInstance.initFields();
+      }
+
+      // @@protoc_insertion_point(class_scope:mesos.scheduler.Event.Offers)
+    }
+
+    public interface InverseOffersOrBuilder
+        extends com.google.protobuf.MessageOrBuilder {
+
+      // repeated .mesos.InverseOffer inverse_offers = 1;
+      /**
+       * <code>repeated .mesos.InverseOffer inverse_offers = 1;</code>
+       */
+      java.util.List<org.apache.mesos.Protos.InverseOffer> 
+          getInverseOffersList();
+      /**
+       * <code>repeated .mesos.InverseOffer inverse_offers = 1;</code>
+       */
+      org.apache.mesos.Protos.InverseOffer getInverseOffers(int index);
+      /**
+       * <code>repeated .mesos.InverseOffer inverse_offers = 1;</code>
+       */
+      int getInverseOffersCount();
+      /**
+       * <code>repeated .mesos.InverseOffer inverse_offers = 1;</code>
+       */
+      java.util.List<? extends org.apache.mesos.Protos.InverseOfferOrBuilder> 
+          getInverseOffersOrBuilderList();
+      /**
+       * <code>repeated .mesos.InverseOffer inverse_offers = 1;</code>
+       */
+      org.apache.mesos.Protos.InverseOfferOrBuilder getInverseOffersOrBuilder(
+          int index);
+    }
+    /**
+     * Protobuf type {@code mesos.scheduler.Event.InverseOffers}
+     *
+     * <pre>
+     * Received whenever there are resources requested back from the
+     * scheduler. Each inverse offer specifies the agent, and
+     * optionally specific resources. Accepting or Declining an inverse
+     * offer informs the allocator of the scheduler's ability to release
+     * the specified resources without violating an SLA. If no resources
+     * are specified then all resources on the agent are requested to be
+     * released.
+     * </pre>
+     */
+    public static final class InverseOffers extends
+        com.google.protobuf.GeneratedMessage
+        implements InverseOffersOrBuilder {
+      // Use InverseOffers.newBuilder() to construct.
+      private InverseOffers(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
+        super(builder);
+        this.unknownFields = builder.getUnknownFields();
+      }
+      private InverseOffers(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+      private static final InverseOffers defaultInstance;
+      public static InverseOffers getDefaultInstance() {
+        return defaultInstance;
+      }
+
+      public InverseOffers getDefaultInstanceForType() {
+        return defaultInstance;
+      }
+
+      private final com.google.protobuf.UnknownFieldSet unknownFields;
+      @java.lang.Override
+      public final com.google.protobuf.UnknownFieldSet
+          getUnknownFields() {
+        return this.unknownFields;
+      }
+      private InverseOffers(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        initFields();
+        int mutable_bitField0_ = 0;
+        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+            com.google.protobuf.UnknownFieldSet.newBuilder();
+        try {
+          boolean done = false;
+          while (!done) {
+            int tag = input.readTag();
+            switch (tag) {
+              case 0:
+                done = true;
+                break;
+              default: {
+                if (!parseUnknownField(input, unknownFields,
+                                       extensionRegistry, tag)) {
+                  done = true;
+                }
+                break;
+              }
+              case 10: {
+                if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
+                  inverseOffers_ = new java.util.ArrayList<org.apache.mesos.Protos.InverseOffer>();
+                  mutable_bitField0_ |= 0x00000001;
+                }
+                inverseOffers_

<TRUNCATED>


Mime
View raw message