/** * Autogenerated by Thrift * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.HashMap; import java.util.Set; import java.util.HashSet; import java.util.Collections; import java.util.BitSet; import java.util.Arrays; import com.facebook.thrift.*; import com.facebook.thrift.annotations.*; import com.facebook.thrift.async.*; import com.facebook.thrift.meta_data.*; import com.facebook.thrift.server.*; import com.facebook.thrift.transport.*; import com.facebook.thrift.protocol.*; @SuppressWarnings({ "unused", "serial" }) public class TerseException extends Exception implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("TerseException"); private static final TField MSG_FIELD_DESC = new TField("msg", TType.STRING, (short)1); public final String msg; public static final int MSG = 1; public TerseException( String msg) { this.msg = msg; } /** * Performs a deep copy on other. */ public TerseException(TerseException other) { if (other.isSetMsg()) { this.msg = TBaseHelper.deepCopy(other.msg); } else { this.msg = null; } } public TerseException deepCopy() { return new TerseException(this); } public String getMsg() { return this.msg; } // Returns true if field msg is set (has been assigned a value) and false otherwise public boolean isSetMsg() { return this.msg != null; } @Override public boolean equals(Object _that) { if (_that == null) return false; if (this == _that) return true; if (!(_that instanceof TerseException)) return false; TerseException that = (TerseException)_that; if (!TBaseHelper.equalsNobinary(this.isSetMsg(), that.isSetMsg(), this.msg, that.msg)) { return false; } return true; } @Override public int hashCode() { return Arrays.deepHashCode(new Object[] {msg}); } // This is required to satisfy the TBase interface, but can't be implemented on immutable struture. public void read(TProtocol iprot) throws TException { throw new TException("unimplemented in android immutable structure"); } public static TerseException deserialize(TProtocol iprot) throws TException { String tmp_msg = null; TField __field; iprot.readStructBegin(); while (true) { __field = iprot.readFieldBegin(); if (__field.type == TType.STOP) { break; } switch (__field.id) { case MSG: if (__field.type == TType.STRING) { tmp_msg = iprot.readString(); } else { TProtocolUtil.skip(iprot, __field.type); } break; default: TProtocolUtil.skip(iprot, __field.type); break; } iprot.readFieldEnd(); } iprot.readStructEnd(); TerseException _that; _that = new TerseException( tmp_msg ); _that.validate(); return _that; } public void write(TProtocol oprot) throws TException { validate(); oprot.writeStructBegin(STRUCT_DESC); if (this.msg != null) { oprot.writeFieldBegin(MSG_FIELD_DESC); oprot.writeString(this.msg); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } @Override public String toString() { return toString(1, true); } @Override public String toString(int indent, boolean prettyPrint) { return TBaseHelper.toStringHelper(this, indent, prettyPrint); } public void validate() throws TException { // check for required fields } }