@Override
  public ProtobufMessageHandler getObjectFromMessage(CodedInputStream cis) throws IOException {
    TableSchema.Builder builder = TableSchema.newBuilder();
    RestUtil.mergeFrom(builder, cis);
    this.setName(builder.getName());
    for (TableSchema.Attribute attr : builder.getAttrsList()) {
      this.addAttribute(attr.getName(), attr.getValue());
    }
    if (builder.hasReadOnly()) {
      this.addAttribute(TableDescriptorBuilder.READONLY, builder.getReadOnly());
    }
    for (ColumnSchema family : builder.getColumnsList()) {
      ColumnSchemaModel familyModel = new ColumnSchemaModel();
      familyModel.setName(family.getName());
      for (ColumnSchema.Attribute attr : family.getAttrsList()) {
        familyModel.addAttribute(attr.getName(), attr.getValue());
      }
      if (family.hasTtl()) {
        familyModel.addAttribute(ColumnFamilyDescriptorBuilder.TTL, family.getTtl());
      }
      if (family.hasMaxVersions()) {
        familyModel.addAttribute(HConstants.VERSIONS, family.getMaxVersions());
      }
      if (family.hasCompression()) {
        familyModel.addAttribute(ColumnFamilyDescriptorBuilder.COMPRESSION,
          family.getCompression());
      }
      this.addColumnFamily(familyModel);
    }
    return this;
  }
@param value desired value of READONLY attribute
hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/TableSchemaModel.java