public void write(org.apache.thrift.protocol.TProtocol oprot, HostAddress struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.hostName != null) { oprot.writeFieldBegin(HOST_NAME_FIELD_DESC); oprot.writeString(struct.hostName); oprot.writeFieldEnd(); } oprot.writeFieldBegin(PORT_FIELD_DESC); oprot.writeI32(struct.port); oprot.writeFieldEnd(); if (struct.ipAddress != null) { if (struct.isSetIpAddress()) { oprot.writeFieldBegin(IP_ADDRESS_FIELD_DESC); oprot.writeString(struct.ipAddress); oprot.writeFieldEnd(); } } if (struct.serverType != null) { if (struct.isSetServerType()) { oprot.writeFieldBegin(SERVER_TYPE_FIELD_DESC); oprot.writeI32(struct.serverType.getValue()); oprot.writeFieldEnd(); } } oprot.writeFieldStop(); oprot.writeStructEnd(); } }
for (ServerType _iter381 : struct.serverTypes) oprot.writeI32(_iter381.getValue());
for (ServerType _iter357 : struct.serverTypes) oprot.writeI32(_iter357.getValue());
@Override public void write(org.apache.thrift.protocol.TProtocol prot, HostAddress struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol)prot; oprot.writeString(struct.hostName); oprot.writeI32(struct.port); BitSet optionals = new BitSet(); if (struct.isSetIpAddress()) { optionals.set(0); } if (struct.isSetServerType()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetIpAddress()) { oprot.writeString(struct.ipAddress); } if (struct.isSetServerType()) { oprot.writeI32(struct.serverType.getValue()); } }
for (ServerType _iter384 : struct.serverTypes) oprot.writeI32(_iter384.getValue());
for (ServerType _iter360 : struct.serverTypes) oprot.writeI32(_iter360.getValue());