public void write(org.apache.thrift.protocol.TProtocol oprot, BlobChunk struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.chunk != null) { oprot.writeFieldBegin(CHUNK_FIELD_DESC); oprot.writeBinary(struct.chunk); oprot.writeFieldEnd(); } oprot.writeFieldBegin(LAST_FIELD_DESC); oprot.writeBool(struct.last); oprot.writeFieldEnd(); if (struct.isSetLobId()) { oprot.writeFieldBegin(LOB_ID_FIELD_DESC); oprot.writeI32(struct.lobId); oprot.writeFieldEnd(); } if (struct.isSetOffset()) { oprot.writeFieldBegin(OFFSET_FIELD_DESC); oprot.writeI64(struct.offset); oprot.writeFieldEnd(); } if (struct.isSetTotalLength()) { oprot.writeFieldBegin(TOTAL_LENGTH_FIELD_DESC); oprot.writeI64(struct.totalLength); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
throw new org.apache.thrift.protocol.TProtocolException("Required field 'last' was not found in serialized data! Struct: " + toString()); struct.validate();
public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (decimal_val != null) { decimal_val.validate(); } if (date_val != null) { date_val.validate(); } if (time_val != null) { time_val.validate(); } if (timestamp_val != null) { timestamp_val.validate(); } if (blob_val != null) { blob_val.validate(); } if (clob_val != null) { clob_val.validate(); } if (pdx_val != null) { pdx_val.validate(); } if (json_val != null) { json_val.validate(); } }