public void write(org.apache.thrift.protocol.TProtocol prot, getCounters_result struct) throws org.apache.thrift.TException {
        TTupleProtocol oprot = (TTupleProtocol) prot;
        BitSet optionals = new BitSet();
        if (struct.isSetSuccess()) {
          optionals.set(0);
        }
        oprot.writeBitSet(optionals, 1);
        if (struct.isSetSuccess()) {
          {
            oprot.writeI32(struct.success.size());
            for (Map.Entry<String, Long> _iter5 : struct.success.entrySet())
            {
              oprot.writeString(_iter5.getKey());
              oprot.writeI64(_iter5.getValue());
            }
          }
        }
      }