write method
Writes the objects out to the oprot
protocol.
Implementation
write(TProtocol oprot) {
validate();
oprot.writeStructBegin(_STRUCT_DESC);
oprot.writeFieldBegin(_SPACE_ID_FIELD_DESC);
oprot.writeI32(this.space_id);
oprot.writeFieldEnd();
if (this.index_name != null) {
oprot.writeFieldBegin(_INDEX_NAME_FIELD_DESC);
oprot.writeBinary(this.index_name);
oprot.writeFieldEnd();
}
if (this.edge_name != null) {
oprot.writeFieldBegin(_EDGE_NAME_FIELD_DESC);
oprot.writeBinary(this.edge_name);
oprot.writeFieldEnd();
}
if (this.fields != null) {
oprot.writeFieldBegin(_FIELDS_FIELD_DESC);
{
oprot.writeListBegin(new TList(TType.STRUCT, this.fields?.length));
for (var elem189 in this.fields ?? []) {
elem189.write(oprot);
}
oprot.writeListEnd();
}
oprot.writeFieldEnd();
}
oprot.writeFieldBegin(_IF_NOT_EXISTS_FIELD_DESC);
oprot.writeBool(this.if_not_exists);
oprot.writeFieldEnd();
if (isSetComment()) {
if (this.comment != null) {
oprot.writeFieldBegin(_COMMENT_FIELD_DESC);
oprot.writeBinary(this.comment);
oprot.writeFieldEnd();
}
}
if (isSetIndex_params()) {
if (this.index_params != null) {
oprot.writeFieldBegin(_INDEX_PARAMS_FIELD_DESC);
this.index_params?.write(oprot);
oprot.writeFieldEnd();
}
}
oprot.writeFieldStop();
oprot.writeStructEnd();
}