write method

void write(
  1. TProtocol oprot
)
override

Writes the objects out to the oprot protocol.

Implementation

write(TProtocol oprot) {
  validate();

  oprot.writeStructBegin(_STRUCT_DESC);
  oprot.writeFieldBegin(_ERROR_CODE_FIELD_DESC);
  oprot.writeI32(this.error_code);
  oprot.writeFieldEnd();
  if (isSetError_msg()) {
    if (this.error_msg != null) {
      oprot.writeFieldBegin(_ERROR_MSG_FIELD_DESC);
      oprot.writeBinary(this.error_msg);
      oprot.writeFieldEnd();
    }
  }
  if (isSetSession_id()) {
    oprot.writeFieldBegin(_SESSION_ID_FIELD_DESC);
    oprot.writeI64(this.session_id);
    oprot.writeFieldEnd();
  }
  if (isSetTime_zone_offset_seconds()) {
    oprot.writeFieldBegin(_TIME_ZONE_OFFSET_SECONDS_FIELD_DESC);
    oprot.writeI32(this.time_zone_offset_seconds);
    oprot.writeFieldEnd();
  }
  if (isSetTime_zone_name()) {
    if (this.time_zone_name != null) {
      oprot.writeFieldBegin(_TIME_ZONE_NAME_FIELD_DESC);
      oprot.writeBinary(this.time_zone_name);
      oprot.writeFieldEnd();
    }
  }
  oprot.writeFieldStop();
  oprot.writeStructEnd();
}