def read(self, iprot):
    iprot.readStructBegin()
    while True:
        (fname, ftype, fid) = iprot.readFieldBegin()
        if (ftype == TType.STOP):
            break
        if (fid == 1):
            if (ftype == TType.I32):
                self.an_id = iprot.readI32()
            else:
                iprot.skip(ftype)
        elif (fid == 2):
            if (ftype == TType.STRING):
                self.a_string = iprot.readString()
            else:
                iprot.skip(ftype)
        else:
            iprot.skip(ftype)
        iprot.readFieldEnd()
    iprot.readStructEnd()
    self.validate()
def read(self, iprot):
    iprot.readStructBegin()
    while True:
        (fname, ftype, fid) = iprot.readFieldBegin()
        if (ftype == TType.STOP):
            break
        if (fid == 1):
            if (ftype == TType.I32):
                self.an_id = iprot.readI32()
            else:
                iprot.skip(ftype)
        elif (fid == 2):
            if (ftype == TType.STRING):
                self.a_string = iprot.readString()
            else:
                iprot.skip(ftype)
        else:
            iprot.skip(ftype)
        iprot.readFieldEnd()
    iprot.readStructEnd()
    self.validate()