@Override
    public void write(org.apache.thrift.protocol.TProtocol prot, TScan 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.isSetStartRow()) {
        optionals.set(0);
      }
      if (struct.isSetStopRow()) {
        optionals.set(1);
      }
      if (struct.isSetColumns()) {
        optionals.set(2);
      }
      if (struct.isSetCaching()) {
        optionals.set(3);
      }
      if (struct.isSetMaxVersions()) {
        optionals.set(4);
      }
      if (struct.isSetTimeRange()) {
        optionals.set(5);
      }
      if (struct.isSetFilterString()) {
        optionals.set(6);
      }
      if (struct.isSetBatchSize()) {
        optionals.set(7);
      }
      if (struct.isSetAttributes()) {
        optionals.set(8);
      }
      if (struct.isSetAuthorizations()) {
        optionals.set(9);
      }
      if (struct.isSetReversed()) {
        optionals.set(10);
      }
      if (struct.isSetCacheBlocks()) {
        optionals.set(11);
      }
      if (struct.isSetColFamTimeRangeMap()) {
        optionals.set(12);
      }
      if (struct.isSetReadType()) {
        optionals.set(13);
      }
      if (struct.isSetLimit()) {
        optionals.set(14);
      }
      if (struct.isSetConsistency()) {
        optionals.set(15);
      }
      if (struct.isSetTargetReplicaId()) {
        optionals.set(16);
      }
      if (struct.isSetFilterBytes()) {
        optionals.set(17);
      }
      oprot.writeBitSet(optionals, 18);
      if (struct.isSetStartRow()) {
        oprot.writeBinary(struct.startRow);
      }
      if (struct.isSetStopRow()) {
        oprot.writeBinary(struct.stopRow);
      }
      if (struct.isSetColumns()) {
        {
          oprot.writeI32(struct.columns.size());
          for (TColumn _iter120 : struct.columns)
          {
            _iter120.write(oprot);
          }
        }
      }
      if (struct.isSetCaching()) {
        oprot.writeI32(struct.caching);
      }
      if (struct.isSetMaxVersions()) {
        oprot.writeI32(struct.maxVersions);
      }
      if (struct.isSetTimeRange()) {
        struct.timeRange.write(oprot);
      }
      if (struct.isSetFilterString()) {
        oprot.writeBinary(struct.filterString);
      }
      if (struct.isSetBatchSize()) {
        oprot.writeI32(struct.batchSize);
      }
      if (struct.isSetAttributes()) {
        {
          oprot.writeI32(struct.attributes.size());
          for (java.util.Map.Entry<java.nio.ByteBuffer, java.nio.ByteBuffer> _iter121 : struct.attributes.entrySet())
          {
            oprot.writeBinary(_iter121.getKey());
            oprot.writeBinary(_iter121.getValue());
          }
        }
      }
      if (struct.isSetAuthorizations()) {
        struct.authorizations.write(oprot);
      }
      if (struct.isSetReversed()) {
        oprot.writeBool(struct.reversed);
      }
      if (struct.isSetCacheBlocks()) {
        oprot.writeBool(struct.cacheBlocks);
      }
      if (struct.isSetColFamTimeRangeMap()) {
        {
          oprot.writeI32(struct.colFamTimeRangeMap.size());
          for (java.util.Map.Entry<java.nio.ByteBuffer, TTimeRange> _iter122 : struct.colFamTimeRangeMap.entrySet())
          {
            oprot.writeBinary(_iter122.getKey());
            _iter122.getValue().write(oprot);
          }
        }
      }
      if (struct.isSetReadType()) {
        oprot.writeI32(struct.readType.getValue());
      }
      if (struct.isSetLimit()) {
        oprot.writeI32(struct.limit);
      }
      if (struct.isSetConsistency()) {
        oprot.writeI32(struct.consistency.getValue());
      }
      if (struct.isSetTargetReplicaId()) {
        oprot.writeI32(struct.targetReplicaId);
      }
      if (struct.isSetFilterBytes()) {
        oprot.writeBinary(struct.filterBytes);
      }
    }
Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise
hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TScan.java