| /** |
| * Autogenerated by Thrift |
| * |
| * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING |
| */ |
| package com.facebook.thrift.reflection.limited; |
| |
| import java.util.ArrayList; |
| import java.util.AbstractMap; |
| import java.util.HashMap; |
| import java.util.HashSet; |
| import com.facebook.thrift.*; |
| |
| import com.facebook.thrift.protocol.*; |
| import com.facebook.thrift.transport.*; |
| |
| public class Argument implements java.io.Serializable { |
| public short key; |
| public String name; |
| public ThriftType type; |
| |
| public final Isset __isset = new Isset(); |
| public static final class Isset { |
| public boolean key = false; |
| public boolean name = false; |
| public boolean type = false; |
| } |
| |
| public Argument() { |
| } |
| |
| public Argument( |
| short key, |
| String name, |
| ThriftType type) |
| { |
| this(); |
| this.key = key; |
| this.__isset.key = true; |
| this.name = name; |
| this.__isset.name = true; |
| this.type = type; |
| this.__isset.type = true; |
| } |
| |
| public void read(TProtocol iprot) throws TException { |
| TField field; |
| iprot.readStructBegin(); |
| while (true) |
| { |
| field = iprot.readFieldBegin(); |
| if (field.type == TType.STOP) { |
| break; |
| } |
| switch (field.id) |
| { |
| case 1: |
| if (field.type == TType.I16) { |
| this.key = iprot.readI16(); |
| this.__isset.key = true; |
| } else { |
| TProtocolUtil.skip(iprot, field.type); |
| } |
| break; |
| case 2: |
| if (field.type == TType.STRING) { |
| this.name = iprot.readString(); |
| this.__isset.name = true; |
| } else { |
| TProtocolUtil.skip(iprot, field.type); |
| } |
| break; |
| case 3: |
| if (field.type == TType.STRUCT) { |
| this.type = new ThriftType(); |
| this.type.read(iprot); |
| this.__isset.type = true; |
| } else { |
| TProtocolUtil.skip(iprot, field.type); |
| } |
| break; |
| default: |
| TProtocolUtil.skip(iprot, field.type); |
| break; |
| } |
| iprot.readFieldEnd(); |
| } |
| iprot.readStructEnd(); |
| } |
| |
| public void write(TProtocol oprot) throws TException { |
| TStruct struct = new TStruct("Argument"); |
| oprot.writeStructBegin(struct); |
| TField field = new TField(); |
| field.name = "key"; |
| field.type = TType.I16; |
| field.id = 1; |
| oprot.writeFieldBegin(field); |
| oprot.writeI16(this.key); |
| oprot.writeFieldEnd(); |
| if (this.name != null) { |
| field.name = "name"; |
| field.type = TType.STRING; |
| field.id = 2; |
| oprot.writeFieldBegin(field); |
| oprot.writeString(this.name); |
| oprot.writeFieldEnd(); |
| } |
| if (this.type != null) { |
| field.name = "type"; |
| field.type = TType.STRUCT; |
| field.id = 3; |
| oprot.writeFieldBegin(field); |
| this.type.write(oprot); |
| oprot.writeFieldEnd(); |
| } |
| oprot.writeFieldStop(); |
| oprot.writeStructEnd(); |
| } |
| |
| public String toString() { |
| StringBuilder sb = new StringBuilder("Argument("); |
| sb.append("key:"); |
| sb.append(this.key); |
| sb.append(",name:"); |
| sb.append(this.name); |
| sb.append(",type:"); |
| sb.append(this.type.toString()); |
| sb.append(")"); |
| return sb.toString(); |
| } |
| |
| } |
| |