private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } }
public void write(org.apache.thrift.protocol.TProtocol oprot, Event struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.userId != null) { oprot.writeFieldBegin(USER_ID_FIELD_DESC); oprot.writeString(struct.userId); oprot.writeFieldEnd(); } if (struct.tenantId != null) { oprot.writeFieldBegin(TENANT_ID_FIELD_DESC); oprot.writeString(struct.tenantId); oprot.writeFieldEnd(); } if (struct.endpointEvent != null) { oprot.writeFieldBegin(ENDPOINT_EVENT_FIELD_DESC); struct.endpointEvent.write(oprot); oprot.writeFieldEnd(); } if (struct.routeAddress != null) { oprot.writeFieldBegin(ROUTE_ADDRESS_FIELD_DESC); struct.routeAddress.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
struct.routeAddress.write(oprot); oprot.writeFieldEnd();
@Override public void write(org.apache.thrift.protocol.TProtocol prot, Event struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetUserId()) { optionals.set(0); } if (struct.isSetTenantId()) { optionals.set(1); } if (struct.isSetEndpointEvent()) { optionals.set(2); } if (struct.isSetRouteAddress()) { optionals.set(3); } oprot.writeBitSet(optionals, 4); if (struct.isSetUserId()) { oprot.writeString(struct.userId); } if (struct.isSetTenantId()) { oprot.writeString(struct.tenantId); } if (struct.isSetEndpointEvent()) { struct.endpointEvent.write(oprot); } if (struct.isSetRouteAddress()) { struct.routeAddress.write(oprot); } }
struct.routeAddress.write(oprot);