/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *   https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
/*
 * Autogenerated by Thrift Compiler (0.17.0)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package org.apache.accumulo.core.manager.thrift;

@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public class ManagerMonitorInfo implements org.apache.thrift.TBase<ManagerMonitorInfo, ManagerMonitorInfo._Fields>, java.io.Serializable, Cloneable, Comparable<ManagerMonitorInfo> {
  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ManagerMonitorInfo");

  private static final org.apache.thrift.protocol.TField TABLE_MAP_FIELD_DESC = new org.apache.thrift.protocol.TField("tableMap", org.apache.thrift.protocol.TType.MAP, (short)1);
  private static final org.apache.thrift.protocol.TField T_SERVER_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("tServerInfo", org.apache.thrift.protocol.TType.LIST, (short)2);
  private static final org.apache.thrift.protocol.TField BAD_TSERVERS_FIELD_DESC = new org.apache.thrift.protocol.TField("badTServers", org.apache.thrift.protocol.TType.MAP, (short)3);
  private static final org.apache.thrift.protocol.TField STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("state", org.apache.thrift.protocol.TType.I32, (short)4);
  private static final org.apache.thrift.protocol.TField GOAL_STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("goalState", org.apache.thrift.protocol.TType.I32, (short)5);
  private static final org.apache.thrift.protocol.TField UNASSIGNED_TABLETS_FIELD_DESC = new org.apache.thrift.protocol.TField("unassignedTablets", org.apache.thrift.protocol.TType.I32, (short)6);
  private static final org.apache.thrift.protocol.TField SERVERS_SHUTTING_DOWN_FIELD_DESC = new org.apache.thrift.protocol.TField("serversShuttingDown", org.apache.thrift.protocol.TType.SET, (short)7);
  private static final org.apache.thrift.protocol.TField DEAD_TABLET_SERVERS_FIELD_DESC = new org.apache.thrift.protocol.TField("deadTabletServers", org.apache.thrift.protocol.TType.LIST, (short)8);
  private static final org.apache.thrift.protocol.TField BULK_IMPORTS_FIELD_DESC = new org.apache.thrift.protocol.TField("bulkImports", org.apache.thrift.protocol.TType.LIST, (short)9);

  private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ManagerMonitorInfoStandardSchemeFactory();
  private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ManagerMonitorInfoTupleSchemeFactory();

  public @org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,org.apache.accumulo.core.master.thrift.TableInfo> tableMap; // required
  public @org.apache.thrift.annotation.Nullable java.util.List<org.apache.accumulo.core.master.thrift.TabletServerStatus> tServerInfo; // required
  public @org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.lang.Byte> badTServers; // required
  /**
   * 
   * @see ManagerState
   */
  public @org.apache.thrift.annotation.Nullable ManagerState state; // required
  /**
   * 
   * @see ManagerGoalState
   */
  public @org.apache.thrift.annotation.Nullable ManagerGoalState goalState; // required
  public int unassignedTablets; // required
  public @org.apache.thrift.annotation.Nullable java.util.Set<java.lang.String> serversShuttingDown; // required
  public @org.apache.thrift.annotation.Nullable java.util.List<DeadServer> deadTabletServers; // required
  public @org.apache.thrift.annotation.Nullable java.util.List<org.apache.accumulo.core.master.thrift.BulkImportStatus> bulkImports; // required

  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
  public enum _Fields implements org.apache.thrift.TFieldIdEnum {
    TABLE_MAP((short)1, "tableMap"),
    T_SERVER_INFO((short)2, "tServerInfo"),
    BAD_TSERVERS((short)3, "badTServers"),
    /**
     * 
     * @see ManagerState
     */
    STATE((short)4, "state"),
    /**
     * 
     * @see ManagerGoalState
     */
    GOAL_STATE((short)5, "goalState"),
    UNASSIGNED_TABLETS((short)6, "unassignedTablets"),
    SERVERS_SHUTTING_DOWN((short)7, "serversShuttingDown"),
    DEAD_TABLET_SERVERS((short)8, "deadTabletServers"),
    BULK_IMPORTS((short)9, "bulkImports");

    private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();

    static {
      for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
        byName.put(field.getFieldName(), field);
      }
    }

    /**
     * Find the _Fields constant that matches fieldId, or null if its not found.
     */
    @org.apache.thrift.annotation.Nullable
    public static _Fields findByThriftId(int fieldId) {
      switch(fieldId) {
        case 1: // TABLE_MAP
          return TABLE_MAP;
        case 2: // T_SERVER_INFO
          return T_SERVER_INFO;
        case 3: // BAD_TSERVERS
          return BAD_TSERVERS;
        case 4: // STATE
          return STATE;
        case 5: // GOAL_STATE
          return GOAL_STATE;
        case 6: // UNASSIGNED_TABLETS
          return UNASSIGNED_TABLETS;
        case 7: // SERVERS_SHUTTING_DOWN
          return SERVERS_SHUTTING_DOWN;
        case 8: // DEAD_TABLET_SERVERS
          return DEAD_TABLET_SERVERS;
        case 9: // BULK_IMPORTS
          return BULK_IMPORTS;
        default:
          return null;
      }
    }

    /**
     * Find the _Fields constant that matches fieldId, throwing an exception
     * if it is not found.
     */
    public static _Fields findByThriftIdOrThrow(int fieldId) {
      _Fields fields = findByThriftId(fieldId);
      if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
      return fields;
    }

    /**
     * Find the _Fields constant that matches name, or null if its not found.
     */
    @org.apache.thrift.annotation.Nullable
    public static _Fields findByName(java.lang.String name) {
      return byName.get(name);
    }

    private final short _thriftId;
    private final java.lang.String _fieldName;

    _Fields(short thriftId, java.lang.String fieldName) {
      _thriftId = thriftId;
      _fieldName = fieldName;
    }

    @Override
    public short getThriftFieldId() {
      return _thriftId;
    }

    @Override
    public java.lang.String getFieldName() {
      return _fieldName;
    }
  }

  // isset id assignments
  private static final int __UNASSIGNEDTABLETS_ISSET_ID = 0;
  private byte __isset_bitfield = 0;
  public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
  static {
    java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
    tmpMap.put(_Fields.TABLE_MAP, new org.apache.thrift.meta_data.FieldMetaData("tableMap", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), 
            new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.master.thrift.TableInfo.class))));
    tmpMap.put(_Fields.T_SERVER_INFO, new org.apache.thrift.meta_data.FieldMetaData("tServerInfo", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.master.thrift.TabletServerStatus.class))));
    tmpMap.put(_Fields.BAD_TSERVERS, new org.apache.thrift.meta_data.FieldMetaData("badTServers", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), 
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BYTE))));
    tmpMap.put(_Fields.STATE, new org.apache.thrift.meta_data.FieldMetaData("state", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ManagerState.class)));
    tmpMap.put(_Fields.GOAL_STATE, new org.apache.thrift.meta_data.FieldMetaData("goalState", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ManagerGoalState.class)));
    tmpMap.put(_Fields.UNASSIGNED_TABLETS, new org.apache.thrift.meta_data.FieldMetaData("unassignedTablets", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
    tmpMap.put(_Fields.SERVERS_SHUTTING_DOWN, new org.apache.thrift.meta_data.FieldMetaData("serversShuttingDown", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET, 
            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
    tmpMap.put(_Fields.DEAD_TABLET_SERVERS, new org.apache.thrift.meta_data.FieldMetaData("deadTabletServers", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DeadServer.class))));
    tmpMap.put(_Fields.BULK_IMPORTS, new org.apache.thrift.meta_data.FieldMetaData("bulkImports", org.apache.thrift.TFieldRequirementType.DEFAULT, 
        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
            new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.accumulo.core.master.thrift.BulkImportStatus.class))));
    metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ManagerMonitorInfo.class, metaDataMap);
  }

  public ManagerMonitorInfo() {
  }

  public ManagerMonitorInfo(
    java.util.Map<java.lang.String,org.apache.accumulo.core.master.thrift.TableInfo> tableMap,
    java.util.List<org.apache.accumulo.core.master.thrift.TabletServerStatus> tServerInfo,
    java.util.Map<java.lang.String,java.lang.Byte> badTServers,
    ManagerState state,
    ManagerGoalState goalState,
    int unassignedTablets,
    java.util.Set<java.lang.String> serversShuttingDown,
    java.util.List<DeadServer> deadTabletServers,
    java.util.List<org.apache.accumulo.core.master.thrift.BulkImportStatus> bulkImports)
  {
    this();
    this.tableMap = tableMap;
    this.tServerInfo = tServerInfo;
    this.badTServers = badTServers;
    this.state = state;
    this.goalState = goalState;
    this.unassignedTablets = unassignedTablets;
    setUnassignedTabletsIsSet(true);
    this.serversShuttingDown = serversShuttingDown;
    this.deadTabletServers = deadTabletServers;
    this.bulkImports = bulkImports;
  }

  /**
   * Performs a deep copy on <i>other</i>.
   */
  public ManagerMonitorInfo(ManagerMonitorInfo other) {
    __isset_bitfield = other.__isset_bitfield;
    if (other.isSetTableMap()) {
      java.util.Map<java.lang.String,org.apache.accumulo.core.master.thrift.TableInfo> __this__tableMap = new java.util.HashMap<java.lang.String,org.apache.accumulo.core.master.thrift.TableInfo>(other.tableMap.size());
      for (java.util.Map.Entry<java.lang.String, org.apache.accumulo.core.master.thrift.TableInfo> other_element : other.tableMap.entrySet()) {

        java.lang.String other_element_key = other_element.getKey();
        org.apache.accumulo.core.master.thrift.TableInfo other_element_value = other_element.getValue();

        java.lang.String __this__tableMap_copy_key = other_element_key;

        org.apache.accumulo.core.master.thrift.TableInfo __this__tableMap_copy_value = new org.apache.accumulo.core.master.thrift.TableInfo(other_element_value);

        __this__tableMap.put(__this__tableMap_copy_key, __this__tableMap_copy_value);
      }
      this.tableMap = __this__tableMap;
    }
    if (other.isSetTServerInfo()) {
      java.util.List<org.apache.accumulo.core.master.thrift.TabletServerStatus> __this__tServerInfo = new java.util.ArrayList<org.apache.accumulo.core.master.thrift.TabletServerStatus>(other.tServerInfo.size());
      for (org.apache.accumulo.core.master.thrift.TabletServerStatus other_element : other.tServerInfo) {
        __this__tServerInfo.add(new org.apache.accumulo.core.master.thrift.TabletServerStatus(other_element));
      }
      this.tServerInfo = __this__tServerInfo;
    }
    if (other.isSetBadTServers()) {
      java.util.Map<java.lang.String,java.lang.Byte> __this__badTServers = new java.util.HashMap<java.lang.String,java.lang.Byte>(other.badTServers);
      this.badTServers = __this__badTServers;
    }
    if (other.isSetState()) {
      this.state = other.state;
    }
    if (other.isSetGoalState()) {
      this.goalState = other.goalState;
    }
    this.unassignedTablets = other.unassignedTablets;
    if (other.isSetServersShuttingDown()) {
      java.util.Set<java.lang.String> __this__serversShuttingDown = new java.util.HashSet<java.lang.String>(other.serversShuttingDown);
      this.serversShuttingDown = __this__serversShuttingDown;
    }
    if (other.isSetDeadTabletServers()) {
      java.util.List<DeadServer> __this__deadTabletServers = new java.util.ArrayList<DeadServer>(other.deadTabletServers.size());
      for (DeadServer other_element : other.deadTabletServers) {
        __this__deadTabletServers.add(new DeadServer(other_element));
      }
      this.deadTabletServers = __this__deadTabletServers;
    }
    if (other.isSetBulkImports()) {
      java.util.List<org.apache.accumulo.core.master.thrift.BulkImportStatus> __this__bulkImports = new java.util.ArrayList<org.apache.accumulo.core.master.thrift.BulkImportStatus>(other.bulkImports.size());
      for (org.apache.accumulo.core.master.thrift.BulkImportStatus other_element : other.bulkImports) {
        __this__bulkImports.add(new org.apache.accumulo.core.master.thrift.BulkImportStatus(other_element));
      }
      this.bulkImports = __this__bulkImports;
    }
  }

  @Override
  public ManagerMonitorInfo deepCopy() {
    return new ManagerMonitorInfo(this);
  }

  @Override
  public void clear() {
    this.tableMap = null;
    this.tServerInfo = null;
    this.badTServers = null;
    this.state = null;
    this.goalState = null;
    setUnassignedTabletsIsSet(false);
    this.unassignedTablets = 0;
    this.serversShuttingDown = null;
    this.deadTabletServers = null;
    this.bulkImports = null;
  }

  public int getTableMapSize() {
    return (this.tableMap == null) ? 0 : this.tableMap.size();
  }

  public void putToTableMap(java.lang.String key, org.apache.accumulo.core.master.thrift.TableInfo val) {
    if (this.tableMap == null) {
      this.tableMap = new java.util.HashMap<java.lang.String,org.apache.accumulo.core.master.thrift.TableInfo>();
    }
    this.tableMap.put(key, val);
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.Map<java.lang.String,org.apache.accumulo.core.master.thrift.TableInfo> getTableMap() {
    return this.tableMap;
  }

  public ManagerMonitorInfo setTableMap(@org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,org.apache.accumulo.core.master.thrift.TableInfo> tableMap) {
    this.tableMap = tableMap;
    return this;
  }

  public void unsetTableMap() {
    this.tableMap = null;
  }

  /** Returns true if field tableMap is set (has been assigned a value) and false otherwise */
  public boolean isSetTableMap() {
    return this.tableMap != null;
  }

  public void setTableMapIsSet(boolean value) {
    if (!value) {
      this.tableMap = null;
    }
  }

  public int getTServerInfoSize() {
    return (this.tServerInfo == null) ? 0 : this.tServerInfo.size();
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.Iterator<org.apache.accumulo.core.master.thrift.TabletServerStatus> getTServerInfoIterator() {
    return (this.tServerInfo == null) ? null : this.tServerInfo.iterator();
  }

  public void addToTServerInfo(org.apache.accumulo.core.master.thrift.TabletServerStatus elem) {
    if (this.tServerInfo == null) {
      this.tServerInfo = new java.util.ArrayList<org.apache.accumulo.core.master.thrift.TabletServerStatus>();
    }
    this.tServerInfo.add(elem);
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.List<org.apache.accumulo.core.master.thrift.TabletServerStatus> getTServerInfo() {
    return this.tServerInfo;
  }

  public ManagerMonitorInfo setTServerInfo(@org.apache.thrift.annotation.Nullable java.util.List<org.apache.accumulo.core.master.thrift.TabletServerStatus> tServerInfo) {
    this.tServerInfo = tServerInfo;
    return this;
  }

  public void unsetTServerInfo() {
    this.tServerInfo = null;
  }

  /** Returns true if field tServerInfo is set (has been assigned a value) and false otherwise */
  public boolean isSetTServerInfo() {
    return this.tServerInfo != null;
  }

  public void setTServerInfoIsSet(boolean value) {
    if (!value) {
      this.tServerInfo = null;
    }
  }

  public int getBadTServersSize() {
    return (this.badTServers == null) ? 0 : this.badTServers.size();
  }

  public void putToBadTServers(java.lang.String key, byte val) {
    if (this.badTServers == null) {
      this.badTServers = new java.util.HashMap<java.lang.String,java.lang.Byte>();
    }
    this.badTServers.put(key, val);
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.Map<java.lang.String,java.lang.Byte> getBadTServers() {
    return this.badTServers;
  }

  public ManagerMonitorInfo setBadTServers(@org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.lang.Byte> badTServers) {
    this.badTServers = badTServers;
    return this;
  }

  public void unsetBadTServers() {
    this.badTServers = null;
  }

  /** Returns true if field badTServers is set (has been assigned a value) and false otherwise */
  public boolean isSetBadTServers() {
    return this.badTServers != null;
  }

  public void setBadTServersIsSet(boolean value) {
    if (!value) {
      this.badTServers = null;
    }
  }

  /**
   * 
   * @see ManagerState
   */
  @org.apache.thrift.annotation.Nullable
  public ManagerState getState() {
    return this.state;
  }

  /**
   * 
   * @see ManagerState
   */
  public ManagerMonitorInfo setState(@org.apache.thrift.annotation.Nullable ManagerState state) {
    this.state = state;
    return this;
  }

  public void unsetState() {
    this.state = null;
  }

  /** Returns true if field state is set (has been assigned a value) and false otherwise */
  public boolean isSetState() {
    return this.state != null;
  }

  public void setStateIsSet(boolean value) {
    if (!value) {
      this.state = null;
    }
  }

  /**
   * 
   * @see ManagerGoalState
   */
  @org.apache.thrift.annotation.Nullable
  public ManagerGoalState getGoalState() {
    return this.goalState;
  }

  /**
   * 
   * @see ManagerGoalState
   */
  public ManagerMonitorInfo setGoalState(@org.apache.thrift.annotation.Nullable ManagerGoalState goalState) {
    this.goalState = goalState;
    return this;
  }

  public void unsetGoalState() {
    this.goalState = null;
  }

  /** Returns true if field goalState is set (has been assigned a value) and false otherwise */
  public boolean isSetGoalState() {
    return this.goalState != null;
  }

  public void setGoalStateIsSet(boolean value) {
    if (!value) {
      this.goalState = null;
    }
  }

  public int getUnassignedTablets() {
    return this.unassignedTablets;
  }

  public ManagerMonitorInfo setUnassignedTablets(int unassignedTablets) {
    this.unassignedTablets = unassignedTablets;
    setUnassignedTabletsIsSet(true);
    return this;
  }

  public void unsetUnassignedTablets() {
    __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __UNASSIGNEDTABLETS_ISSET_ID);
  }

  /** Returns true if field unassignedTablets is set (has been assigned a value) and false otherwise */
  public boolean isSetUnassignedTablets() {
    return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __UNASSIGNEDTABLETS_ISSET_ID);
  }

  public void setUnassignedTabletsIsSet(boolean value) {
    __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __UNASSIGNEDTABLETS_ISSET_ID, value);
  }

  public int getServersShuttingDownSize() {
    return (this.serversShuttingDown == null) ? 0 : this.serversShuttingDown.size();
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.Iterator<java.lang.String> getServersShuttingDownIterator() {
    return (this.serversShuttingDown == null) ? null : this.serversShuttingDown.iterator();
  }

  public void addToServersShuttingDown(java.lang.String elem) {
    if (this.serversShuttingDown == null) {
      this.serversShuttingDown = new java.util.HashSet<java.lang.String>();
    }
    this.serversShuttingDown.add(elem);
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.Set<java.lang.String> getServersShuttingDown() {
    return this.serversShuttingDown;
  }

  public ManagerMonitorInfo setServersShuttingDown(@org.apache.thrift.annotation.Nullable java.util.Set<java.lang.String> serversShuttingDown) {
    this.serversShuttingDown = serversShuttingDown;
    return this;
  }

  public void unsetServersShuttingDown() {
    this.serversShuttingDown = null;
  }

  /** Returns true if field serversShuttingDown is set (has been assigned a value) and false otherwise */
  public boolean isSetServersShuttingDown() {
    return this.serversShuttingDown != null;
  }

  public void setServersShuttingDownIsSet(boolean value) {
    if (!value) {
      this.serversShuttingDown = null;
    }
  }

  public int getDeadTabletServersSize() {
    return (this.deadTabletServers == null) ? 0 : this.deadTabletServers.size();
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.Iterator<DeadServer> getDeadTabletServersIterator() {
    return (this.deadTabletServers == null) ? null : this.deadTabletServers.iterator();
  }

  public void addToDeadTabletServers(DeadServer elem) {
    if (this.deadTabletServers == null) {
      this.deadTabletServers = new java.util.ArrayList<DeadServer>();
    }
    this.deadTabletServers.add(elem);
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.List<DeadServer> getDeadTabletServers() {
    return this.deadTabletServers;
  }

  public ManagerMonitorInfo setDeadTabletServers(@org.apache.thrift.annotation.Nullable java.util.List<DeadServer> deadTabletServers) {
    this.deadTabletServers = deadTabletServers;
    return this;
  }

  public void unsetDeadTabletServers() {
    this.deadTabletServers = null;
  }

  /** Returns true if field deadTabletServers is set (has been assigned a value) and false otherwise */
  public boolean isSetDeadTabletServers() {
    return this.deadTabletServers != null;
  }

  public void setDeadTabletServersIsSet(boolean value) {
    if (!value) {
      this.deadTabletServers = null;
    }
  }

  public int getBulkImportsSize() {
    return (this.bulkImports == null) ? 0 : this.bulkImports.size();
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.Iterator<org.apache.accumulo.core.master.thrift.BulkImportStatus> getBulkImportsIterator() {
    return (this.bulkImports == null) ? null : this.bulkImports.iterator();
  }

  public void addToBulkImports(org.apache.accumulo.core.master.thrift.BulkImportStatus elem) {
    if (this.bulkImports == null) {
      this.bulkImports = new java.util.ArrayList<org.apache.accumulo.core.master.thrift.BulkImportStatus>();
    }
    this.bulkImports.add(elem);
  }

  @org.apache.thrift.annotation.Nullable
  public java.util.List<org.apache.accumulo.core.master.thrift.BulkImportStatus> getBulkImports() {
    return this.bulkImports;
  }

  public ManagerMonitorInfo setBulkImports(@org.apache.thrift.annotation.Nullable java.util.List<org.apache.accumulo.core.master.thrift.BulkImportStatus> bulkImports) {
    this.bulkImports = bulkImports;
    return this;
  }

  public void unsetBulkImports() {
    this.bulkImports = null;
  }

  /** Returns true if field bulkImports is set (has been assigned a value) and false otherwise */
  public boolean isSetBulkImports() {
    return this.bulkImports != null;
  }

  public void setBulkImportsIsSet(boolean value) {
    if (!value) {
      this.bulkImports = null;
    }
  }

  @Override
  public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
    switch (field) {
    case TABLE_MAP:
      if (value == null) {
        unsetTableMap();
      } else {
        setTableMap((java.util.Map<java.lang.String,org.apache.accumulo.core.master.thrift.TableInfo>)value);
      }
      break;

    case T_SERVER_INFO:
      if (value == null) {
        unsetTServerInfo();
      } else {
        setTServerInfo((java.util.List<org.apache.accumulo.core.master.thrift.TabletServerStatus>)value);
      }
      break;

    case BAD_TSERVERS:
      if (value == null) {
        unsetBadTServers();
      } else {
        setBadTServers((java.util.Map<java.lang.String,java.lang.Byte>)value);
      }
      break;

    case STATE:
      if (value == null) {
        unsetState();
      } else {
        setState((ManagerState)value);
      }
      break;

    case GOAL_STATE:
      if (value == null) {
        unsetGoalState();
      } else {
        setGoalState((ManagerGoalState)value);
      }
      break;

    case UNASSIGNED_TABLETS:
      if (value == null) {
        unsetUnassignedTablets();
      } else {
        setUnassignedTablets((java.lang.Integer)value);
      }
      break;

    case SERVERS_SHUTTING_DOWN:
      if (value == null) {
        unsetServersShuttingDown();
      } else {
        setServersShuttingDown((java.util.Set<java.lang.String>)value);
      }
      break;

    case DEAD_TABLET_SERVERS:
      if (value == null) {
        unsetDeadTabletServers();
      } else {
        setDeadTabletServers((java.util.List<DeadServer>)value);
      }
      break;

    case BULK_IMPORTS:
      if (value == null) {
        unsetBulkImports();
      } else {
        setBulkImports((java.util.List<org.apache.accumulo.core.master.thrift.BulkImportStatus>)value);
      }
      break;

    }
  }

  @org.apache.thrift.annotation.Nullable
  @Override
  public java.lang.Object getFieldValue(_Fields field) {
    switch (field) {
    case TABLE_MAP:
      return getTableMap();

    case T_SERVER_INFO:
      return getTServerInfo();

    case BAD_TSERVERS:
      return getBadTServers();

    case STATE:
      return getState();

    case GOAL_STATE:
      return getGoalState();

    case UNASSIGNED_TABLETS:
      return getUnassignedTablets();

    case SERVERS_SHUTTING_DOWN:
      return getServersShuttingDown();

    case DEAD_TABLET_SERVERS:
      return getDeadTabletServers();

    case BULK_IMPORTS:
      return getBulkImports();

    }
    throw new java.lang.IllegalStateException();
  }

  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
  @Override
  public boolean isSet(_Fields field) {
    if (field == null) {
      throw new java.lang.IllegalArgumentException();
    }

    switch (field) {
    case TABLE_MAP:
      return isSetTableMap();
    case T_SERVER_INFO:
      return isSetTServerInfo();
    case BAD_TSERVERS:
      return isSetBadTServers();
    case STATE:
      return isSetState();
    case GOAL_STATE:
      return isSetGoalState();
    case UNASSIGNED_TABLETS:
      return isSetUnassignedTablets();
    case SERVERS_SHUTTING_DOWN:
      return isSetServersShuttingDown();
    case DEAD_TABLET_SERVERS:
      return isSetDeadTabletServers();
    case BULK_IMPORTS:
      return isSetBulkImports();
    }
    throw new java.lang.IllegalStateException();
  }

  @Override
  public boolean equals(java.lang.Object that) {
    if (that instanceof ManagerMonitorInfo)
      return this.equals((ManagerMonitorInfo)that);
    return false;
  }

  public boolean equals(ManagerMonitorInfo that) {
    if (that == null)
      return false;
    if (this == that)
      return true;

    boolean this_present_tableMap = true && this.isSetTableMap();
    boolean that_present_tableMap = true && that.isSetTableMap();
    if (this_present_tableMap || that_present_tableMap) {
      if (!(this_present_tableMap && that_present_tableMap))
        return false;
      if (!this.tableMap.equals(that.tableMap))
        return false;
    }

    boolean this_present_tServerInfo = true && this.isSetTServerInfo();
    boolean that_present_tServerInfo = true && that.isSetTServerInfo();
    if (this_present_tServerInfo || that_present_tServerInfo) {
      if (!(this_present_tServerInfo && that_present_tServerInfo))
        return false;
      if (!this.tServerInfo.equals(that.tServerInfo))
        return false;
    }

    boolean this_present_badTServers = true && this.isSetBadTServers();
    boolean that_present_badTServers = true && that.isSetBadTServers();
    if (this_present_badTServers || that_present_badTServers) {
      if (!(this_present_badTServers && that_present_badTServers))
        return false;
      if (!this.badTServers.equals(that.badTServers))
        return false;
    }

    boolean this_present_state = true && this.isSetState();
    boolean that_present_state = true && that.isSetState();
    if (this_present_state || that_present_state) {
      if (!(this_present_state && that_present_state))
        return false;
      if (!this.state.equals(that.state))
        return false;
    }

    boolean this_present_goalState = true && this.isSetGoalState();
    boolean that_present_goalState = true && that.isSetGoalState();
    if (this_present_goalState || that_present_goalState) {
      if (!(this_present_goalState && that_present_goalState))
        return false;
      if (!this.goalState.equals(that.goalState))
        return false;
    }

    boolean this_present_unassignedTablets = true;
    boolean that_present_unassignedTablets = true;
    if (this_present_unassignedTablets || that_present_unassignedTablets) {
      if (!(this_present_unassignedTablets && that_present_unassignedTablets))
        return false;
      if (this.unassignedTablets != that.unassignedTablets)
        return false;
    }

    boolean this_present_serversShuttingDown = true && this.isSetServersShuttingDown();
    boolean that_present_serversShuttingDown = true && that.isSetServersShuttingDown();
    if (this_present_serversShuttingDown || that_present_serversShuttingDown) {
      if (!(this_present_serversShuttingDown && that_present_serversShuttingDown))
        return false;
      if (!this.serversShuttingDown.equals(that.serversShuttingDown))
        return false;
    }

    boolean this_present_deadTabletServers = true && this.isSetDeadTabletServers();
    boolean that_present_deadTabletServers = true && that.isSetDeadTabletServers();
    if (this_present_deadTabletServers || that_present_deadTabletServers) {
      if (!(this_present_deadTabletServers && that_present_deadTabletServers))
        return false;
      if (!this.deadTabletServers.equals(that.deadTabletServers))
        return false;
    }

    boolean this_present_bulkImports = true && this.isSetBulkImports();
    boolean that_present_bulkImports = true && that.isSetBulkImports();
    if (this_present_bulkImports || that_present_bulkImports) {
      if (!(this_present_bulkImports && that_present_bulkImports))
        return false;
      if (!this.bulkImports.equals(that.bulkImports))
        return false;
    }

    return true;
  }

  @Override
  public int hashCode() {
    int hashCode = 1;

    hashCode = hashCode * 8191 + ((isSetTableMap()) ? 131071 : 524287);
    if (isSetTableMap())
      hashCode = hashCode * 8191 + tableMap.hashCode();

    hashCode = hashCode * 8191 + ((isSetTServerInfo()) ? 131071 : 524287);
    if (isSetTServerInfo())
      hashCode = hashCode * 8191 + tServerInfo.hashCode();

    hashCode = hashCode * 8191 + ((isSetBadTServers()) ? 131071 : 524287);
    if (isSetBadTServers())
      hashCode = hashCode * 8191 + badTServers.hashCode();

    hashCode = hashCode * 8191 + ((isSetState()) ? 131071 : 524287);
    if (isSetState())
      hashCode = hashCode * 8191 + state.getValue();

    hashCode = hashCode * 8191 + ((isSetGoalState()) ? 131071 : 524287);
    if (isSetGoalState())
      hashCode = hashCode * 8191 + goalState.getValue();

    hashCode = hashCode * 8191 + unassignedTablets;

    hashCode = hashCode * 8191 + ((isSetServersShuttingDown()) ? 131071 : 524287);
    if (isSetServersShuttingDown())
      hashCode = hashCode * 8191 + serversShuttingDown.hashCode();

    hashCode = hashCode * 8191 + ((isSetDeadTabletServers()) ? 131071 : 524287);
    if (isSetDeadTabletServers())
      hashCode = hashCode * 8191 + deadTabletServers.hashCode();

    hashCode = hashCode * 8191 + ((isSetBulkImports()) ? 131071 : 524287);
    if (isSetBulkImports())
      hashCode = hashCode * 8191 + bulkImports.hashCode();

    return hashCode;
  }

  @Override
  public int compareTo(ManagerMonitorInfo other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison = java.lang.Boolean.compare(isSetTableMap(), other.isSetTableMap());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTableMap()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableMap, other.tableMap);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetTServerInfo(), other.isSetTServerInfo());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTServerInfo()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tServerInfo, other.tServerInfo);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetBadTServers(), other.isSetBadTServers());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetBadTServers()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.badTServers, other.badTServers);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetState(), other.isSetState());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetState()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.state, other.state);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetGoalState(), other.isSetGoalState());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetGoalState()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.goalState, other.goalState);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetUnassignedTablets(), other.isSetUnassignedTablets());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetUnassignedTablets()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.unassignedTablets, other.unassignedTablets);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetServersShuttingDown(), other.isSetServersShuttingDown());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetServersShuttingDown()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serversShuttingDown, other.serversShuttingDown);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetDeadTabletServers(), other.isSetDeadTabletServers());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDeadTabletServers()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deadTabletServers, other.deadTabletServers);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = java.lang.Boolean.compare(isSetBulkImports(), other.isSetBulkImports());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetBulkImports()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bulkImports, other.bulkImports);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }

  @org.apache.thrift.annotation.Nullable
  @Override
  public _Fields fieldForId(int fieldId) {
    return _Fields.findByThriftId(fieldId);
  }

  @Override
  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
    scheme(iprot).read(iprot, this);
  }

  @Override
  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
    scheme(oprot).write(oprot, this);
  }

  @Override
  public java.lang.String toString() {
    java.lang.StringBuilder sb = new java.lang.StringBuilder("ManagerMonitorInfo(");
    boolean first = true;

    sb.append("tableMap:");
    if (this.tableMap == null) {
      sb.append("null");
    } else {
      sb.append(this.tableMap);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("tServerInfo:");
    if (this.tServerInfo == null) {
      sb.append("null");
    } else {
      sb.append(this.tServerInfo);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("badTServers:");
    if (this.badTServers == null) {
      sb.append("null");
    } else {
      sb.append(this.badTServers);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("state:");
    if (this.state == null) {
      sb.append("null");
    } else {
      sb.append(this.state);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("goalState:");
    if (this.goalState == null) {
      sb.append("null");
    } else {
      sb.append(this.goalState);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("unassignedTablets:");
    sb.append(this.unassignedTablets);
    first = false;
    if (!first) sb.append(", ");
    sb.append("serversShuttingDown:");
    if (this.serversShuttingDown == null) {
      sb.append("null");
    } else {
      sb.append(this.serversShuttingDown);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("deadTabletServers:");
    if (this.deadTabletServers == null) {
      sb.append("null");
    } else {
      sb.append(this.deadTabletServers);
    }
    first = false;
    if (!first) sb.append(", ");
    sb.append("bulkImports:");
    if (this.bulkImports == null) {
      sb.append("null");
    } else {
      sb.append(this.bulkImports);
    }
    first = false;
    sb.append(")");
    return sb.toString();
  }

  public void validate() throws org.apache.thrift.TException {
    // check for required fields
    // check for sub-struct validity
  }

  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
    try {
      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
    } catch (org.apache.thrift.TException te) {
      throw new java.io.IOException(te);
    }
  }

  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
    try {
      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
      __isset_bitfield = 0;
      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
    } catch (org.apache.thrift.TException te) {
      throw new java.io.IOException(te);
    }
  }

  private static class ManagerMonitorInfoStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
    @Override
    public ManagerMonitorInfoStandardScheme getScheme() {
      return new ManagerMonitorInfoStandardScheme();
    }
  }

  private static class ManagerMonitorInfoStandardScheme extends org.apache.thrift.scheme.StandardScheme<ManagerMonitorInfo> {

    @Override
    public void read(org.apache.thrift.protocol.TProtocol iprot, ManagerMonitorInfo struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField schemeField;
      iprot.readStructBegin();
      while (true)
      {
        schemeField = iprot.readFieldBegin();
        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (schemeField.id) {
          case 1: // TABLE_MAP
            if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
              {
                org.apache.thrift.protocol.TMap _map8 = iprot.readMapBegin();
                struct.tableMap = new java.util.HashMap<java.lang.String,org.apache.accumulo.core.master.thrift.TableInfo>(2*_map8.size);
                @org.apache.thrift.annotation.Nullable java.lang.String _key9;
                @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.master.thrift.TableInfo _val10;
                for (int _i11 = 0; _i11 < _map8.size; ++_i11)
                {
                  _key9 = iprot.readString();
                  _val10 = new org.apache.accumulo.core.master.thrift.TableInfo();
                  _val10.read(iprot);
                  struct.tableMap.put(_key9, _val10);
                }
                iprot.readMapEnd();
              }
              struct.setTableMapIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // T_SERVER_INFO
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list12 = iprot.readListBegin();
                struct.tServerInfo = new java.util.ArrayList<org.apache.accumulo.core.master.thrift.TabletServerStatus>(_list12.size);
                @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.master.thrift.TabletServerStatus _elem13;
                for (int _i14 = 0; _i14 < _list12.size; ++_i14)
                {
                  _elem13 = new org.apache.accumulo.core.master.thrift.TabletServerStatus();
                  _elem13.read(iprot);
                  struct.tServerInfo.add(_elem13);
                }
                iprot.readListEnd();
              }
              struct.setTServerInfoIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // BAD_TSERVERS
            if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
              {
                org.apache.thrift.protocol.TMap _map15 = iprot.readMapBegin();
                struct.badTServers = new java.util.HashMap<java.lang.String,java.lang.Byte>(2*_map15.size);
                @org.apache.thrift.annotation.Nullable java.lang.String _key16;
                byte _val17;
                for (int _i18 = 0; _i18 < _map15.size; ++_i18)
                {
                  _key16 = iprot.readString();
                  _val17 = iprot.readByte();
                  struct.badTServers.put(_key16, _val17);
                }
                iprot.readMapEnd();
              }
              struct.setBadTServersIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 4: // STATE
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.state = org.apache.accumulo.core.manager.thrift.ManagerState.findByValue(iprot.readI32());
              struct.setStateIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 5: // GOAL_STATE
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.goalState = org.apache.accumulo.core.manager.thrift.ManagerGoalState.findByValue(iprot.readI32());
              struct.setGoalStateIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 6: // UNASSIGNED_TABLETS
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.unassignedTablets = iprot.readI32();
              struct.setUnassignedTabletsIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 7: // SERVERS_SHUTTING_DOWN
            if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
              {
                org.apache.thrift.protocol.TSet _set19 = iprot.readSetBegin();
                struct.serversShuttingDown = new java.util.HashSet<java.lang.String>(2*_set19.size);
                @org.apache.thrift.annotation.Nullable java.lang.String _elem20;
                for (int _i21 = 0; _i21 < _set19.size; ++_i21)
                {
                  _elem20 = iprot.readString();
                  struct.serversShuttingDown.add(_elem20);
                }
                iprot.readSetEnd();
              }
              struct.setServersShuttingDownIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 8: // DEAD_TABLET_SERVERS
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list22 = iprot.readListBegin();
                struct.deadTabletServers = new java.util.ArrayList<DeadServer>(_list22.size);
                @org.apache.thrift.annotation.Nullable DeadServer _elem23;
                for (int _i24 = 0; _i24 < _list22.size; ++_i24)
                {
                  _elem23 = new DeadServer();
                  _elem23.read(iprot);
                  struct.deadTabletServers.add(_elem23);
                }
                iprot.readListEnd();
              }
              struct.setDeadTabletServersIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 9: // BULK_IMPORTS
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list25 = iprot.readListBegin();
                struct.bulkImports = new java.util.ArrayList<org.apache.accumulo.core.master.thrift.BulkImportStatus>(_list25.size);
                @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.master.thrift.BulkImportStatus _elem26;
                for (int _i27 = 0; _i27 < _list25.size; ++_i27)
                {
                  _elem26 = new org.apache.accumulo.core.master.thrift.BulkImportStatus();
                  _elem26.read(iprot);
                  struct.bulkImports.add(_elem26);
                }
                iprot.readListEnd();
              }
              struct.setBulkImportsIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();

      // check for required fields of primitive type, which can't be checked in the validate method
      struct.validate();
    }

    @Override
    public void write(org.apache.thrift.protocol.TProtocol oprot, ManagerMonitorInfo struct) throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.tableMap != null) {
        oprot.writeFieldBegin(TABLE_MAP_FIELD_DESC);
        {
          oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.tableMap.size()));
          for (java.util.Map.Entry<java.lang.String, org.apache.accumulo.core.master.thrift.TableInfo> _iter28 : struct.tableMap.entrySet())
          {
            oprot.writeString(_iter28.getKey());
            _iter28.getValue().write(oprot);
          }
          oprot.writeMapEnd();
        }
        oprot.writeFieldEnd();
      }
      if (struct.tServerInfo != null) {
        oprot.writeFieldBegin(T_SERVER_INFO_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.tServerInfo.size()));
          for (org.apache.accumulo.core.master.thrift.TabletServerStatus _iter29 : struct.tServerInfo)
          {
            _iter29.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      if (struct.badTServers != null) {
        oprot.writeFieldBegin(BAD_TSERVERS_FIELD_DESC);
        {
          oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.BYTE, struct.badTServers.size()));
          for (java.util.Map.Entry<java.lang.String, java.lang.Byte> _iter30 : struct.badTServers.entrySet())
          {
            oprot.writeString(_iter30.getKey());
            oprot.writeByte(_iter30.getValue());
          }
          oprot.writeMapEnd();
        }
        oprot.writeFieldEnd();
      }
      if (struct.state != null) {
        oprot.writeFieldBegin(STATE_FIELD_DESC);
        oprot.writeI32(struct.state.getValue());
        oprot.writeFieldEnd();
      }
      if (struct.goalState != null) {
        oprot.writeFieldBegin(GOAL_STATE_FIELD_DESC);
        oprot.writeI32(struct.goalState.getValue());
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(UNASSIGNED_TABLETS_FIELD_DESC);
      oprot.writeI32(struct.unassignedTablets);
      oprot.writeFieldEnd();
      if (struct.serversShuttingDown != null) {
        oprot.writeFieldBegin(SERVERS_SHUTTING_DOWN_FIELD_DESC);
        {
          oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRING, struct.serversShuttingDown.size()));
          for (java.lang.String _iter31 : struct.serversShuttingDown)
          {
            oprot.writeString(_iter31);
          }
          oprot.writeSetEnd();
        }
        oprot.writeFieldEnd();
      }
      if (struct.deadTabletServers != null) {
        oprot.writeFieldBegin(DEAD_TABLET_SERVERS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.deadTabletServers.size()));
          for (DeadServer _iter32 : struct.deadTabletServers)
          {
            _iter32.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      if (struct.bulkImports != null) {
        oprot.writeFieldBegin(BULK_IMPORTS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.bulkImports.size()));
          for (org.apache.accumulo.core.master.thrift.BulkImportStatus _iter33 : struct.bulkImports)
          {
            _iter33.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

  }

  private static class ManagerMonitorInfoTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
    @Override
    public ManagerMonitorInfoTupleScheme getScheme() {
      return new ManagerMonitorInfoTupleScheme();
    }
  }

  private static class ManagerMonitorInfoTupleScheme extends org.apache.thrift.scheme.TupleScheme<ManagerMonitorInfo> {

    @Override
    public void write(org.apache.thrift.protocol.TProtocol prot, ManagerMonitorInfo struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      java.util.BitSet optionals = new java.util.BitSet();
      if (struct.isSetTableMap()) {
        optionals.set(0);
      }
      if (struct.isSetTServerInfo()) {
        optionals.set(1);
      }
      if (struct.isSetBadTServers()) {
        optionals.set(2);
      }
      if (struct.isSetState()) {
        optionals.set(3);
      }
      if (struct.isSetGoalState()) {
        optionals.set(4);
      }
      if (struct.isSetUnassignedTablets()) {
        optionals.set(5);
      }
      if (struct.isSetServersShuttingDown()) {
        optionals.set(6);
      }
      if (struct.isSetDeadTabletServers()) {
        optionals.set(7);
      }
      if (struct.isSetBulkImports()) {
        optionals.set(8);
      }
      oprot.writeBitSet(optionals, 9);
      if (struct.isSetTableMap()) {
        {
          oprot.writeI32(struct.tableMap.size());
          for (java.util.Map.Entry<java.lang.String, org.apache.accumulo.core.master.thrift.TableInfo> _iter34 : struct.tableMap.entrySet())
          {
            oprot.writeString(_iter34.getKey());
            _iter34.getValue().write(oprot);
          }
        }
      }
      if (struct.isSetTServerInfo()) {
        {
          oprot.writeI32(struct.tServerInfo.size());
          for (org.apache.accumulo.core.master.thrift.TabletServerStatus _iter35 : struct.tServerInfo)
          {
            _iter35.write(oprot);
          }
        }
      }
      if (struct.isSetBadTServers()) {
        {
          oprot.writeI32(struct.badTServers.size());
          for (java.util.Map.Entry<java.lang.String, java.lang.Byte> _iter36 : struct.badTServers.entrySet())
          {
            oprot.writeString(_iter36.getKey());
            oprot.writeByte(_iter36.getValue());
          }
        }
      }
      if (struct.isSetState()) {
        oprot.writeI32(struct.state.getValue());
      }
      if (struct.isSetGoalState()) {
        oprot.writeI32(struct.goalState.getValue());
      }
      if (struct.isSetUnassignedTablets()) {
        oprot.writeI32(struct.unassignedTablets);
      }
      if (struct.isSetServersShuttingDown()) {
        {
          oprot.writeI32(struct.serversShuttingDown.size());
          for (java.lang.String _iter37 : struct.serversShuttingDown)
          {
            oprot.writeString(_iter37);
          }
        }
      }
      if (struct.isSetDeadTabletServers()) {
        {
          oprot.writeI32(struct.deadTabletServers.size());
          for (DeadServer _iter38 : struct.deadTabletServers)
          {
            _iter38.write(oprot);
          }
        }
      }
      if (struct.isSetBulkImports()) {
        {
          oprot.writeI32(struct.bulkImports.size());
          for (org.apache.accumulo.core.master.thrift.BulkImportStatus _iter39 : struct.bulkImports)
          {
            _iter39.write(oprot);
          }
        }
      }
    }

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, ManagerMonitorInfo struct) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
      java.util.BitSet incoming = iprot.readBitSet(9);
      if (incoming.get(0)) {
        {
          org.apache.thrift.protocol.TMap _map40 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT); 
          struct.tableMap = new java.util.HashMap<java.lang.String,org.apache.accumulo.core.master.thrift.TableInfo>(2*_map40.size);
          @org.apache.thrift.annotation.Nullable java.lang.String _key41;
          @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.master.thrift.TableInfo _val42;
          for (int _i43 = 0; _i43 < _map40.size; ++_i43)
          {
            _key41 = iprot.readString();
            _val42 = new org.apache.accumulo.core.master.thrift.TableInfo();
            _val42.read(iprot);
            struct.tableMap.put(_key41, _val42);
          }
        }
        struct.setTableMapIsSet(true);
      }
      if (incoming.get(1)) {
        {
          org.apache.thrift.protocol.TList _list44 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
          struct.tServerInfo = new java.util.ArrayList<org.apache.accumulo.core.master.thrift.TabletServerStatus>(_list44.size);
          @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.master.thrift.TabletServerStatus _elem45;
          for (int _i46 = 0; _i46 < _list44.size; ++_i46)
          {
            _elem45 = new org.apache.accumulo.core.master.thrift.TabletServerStatus();
            _elem45.read(iprot);
            struct.tServerInfo.add(_elem45);
          }
        }
        struct.setTServerInfoIsSet(true);
      }
      if (incoming.get(2)) {
        {
          org.apache.thrift.protocol.TMap _map47 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.BYTE); 
          struct.badTServers = new java.util.HashMap<java.lang.String,java.lang.Byte>(2*_map47.size);
          @org.apache.thrift.annotation.Nullable java.lang.String _key48;
          byte _val49;
          for (int _i50 = 0; _i50 < _map47.size; ++_i50)
          {
            _key48 = iprot.readString();
            _val49 = iprot.readByte();
            struct.badTServers.put(_key48, _val49);
          }
        }
        struct.setBadTServersIsSet(true);
      }
      if (incoming.get(3)) {
        struct.state = org.apache.accumulo.core.manager.thrift.ManagerState.findByValue(iprot.readI32());
        struct.setStateIsSet(true);
      }
      if (incoming.get(4)) {
        struct.goalState = org.apache.accumulo.core.manager.thrift.ManagerGoalState.findByValue(iprot.readI32());
        struct.setGoalStateIsSet(true);
      }
      if (incoming.get(5)) {
        struct.unassignedTablets = iprot.readI32();
        struct.setUnassignedTabletsIsSet(true);
      }
      if (incoming.get(6)) {
        {
          org.apache.thrift.protocol.TSet _set51 = iprot.readSetBegin(org.apache.thrift.protocol.TType.STRING);
          struct.serversShuttingDown = new java.util.HashSet<java.lang.String>(2*_set51.size);
          @org.apache.thrift.annotation.Nullable java.lang.String _elem52;
          for (int _i53 = 0; _i53 < _set51.size; ++_i53)
          {
            _elem52 = iprot.readString();
            struct.serversShuttingDown.add(_elem52);
          }
        }
        struct.setServersShuttingDownIsSet(true);
      }
      if (incoming.get(7)) {
        {
          org.apache.thrift.protocol.TList _list54 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
          struct.deadTabletServers = new java.util.ArrayList<DeadServer>(_list54.size);
          @org.apache.thrift.annotation.Nullable DeadServer _elem55;
          for (int _i56 = 0; _i56 < _list54.size; ++_i56)
          {
            _elem55 = new DeadServer();
            _elem55.read(iprot);
            struct.deadTabletServers.add(_elem55);
          }
        }
        struct.setDeadTabletServersIsSet(true);
      }
      if (incoming.get(8)) {
        {
          org.apache.thrift.protocol.TList _list57 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
          struct.bulkImports = new java.util.ArrayList<org.apache.accumulo.core.master.thrift.BulkImportStatus>(_list57.size);
          @org.apache.thrift.annotation.Nullable org.apache.accumulo.core.master.thrift.BulkImportStatus _elem58;
          for (int _i59 = 0; _i59 < _list57.size; ++_i59)
          {
            _elem58 = new org.apache.accumulo.core.master.thrift.BulkImportStatus();
            _elem58.read(iprot);
            struct.bulkImports.add(_elem58);
          }
        }
        struct.setBulkImportsIsSet(true);
      }
    }
  }

  private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
    return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
  }
  private static void unusedMethod() {}
}

