public void write(org.apache.thrift.protocol.TProtocol oprot, Query struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.path != null) { oprot.writeFieldBegin(PATH_FIELD_DESC); oprot.writeString(struct.path); oprot.writeFieldEnd(); } if (struct.type != null) { oprot.writeFieldBegin(TYPE_FIELD_DESC); oprot.writeI32(struct.type.getValue()); oprot.writeFieldEnd(); } if (struct.expressions != null) { oprot.writeFieldBegin(EXPRESSIONS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.expressions.size())); for (String _iter51 : struct.expressions) { oprot.writeString(_iter51); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
public void write(org.apache.thrift.protocol.TProtocol oprot, Query struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.path != null) { oprot.writeFieldBegin(PATH_FIELD_DESC); oprot.writeString(struct.path); oprot.writeFieldEnd(); } if (struct.type != null) { oprot.writeFieldBegin(TYPE_FIELD_DESC); oprot.writeI32(struct.type.getValue()); oprot.writeFieldEnd(); } if (struct.expressions != null) { oprot.writeFieldBegin(EXPRESSIONS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.expressions.size())); for (String _iter43 : struct.expressions) { oprot.writeString(_iter43); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
struct.validate();
public void validate() throws org.apache.thrift.TException { // check for required fields if (name == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString()); } // alas, we cannot check 'enabled' because it's a primitive and you chose the non-beans generator. if (repositoryName == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'repositoryName' was not present! Struct: " + toString()); } if (query == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'query' was not present! Struct: " + toString()); } // check for sub-struct validity if (query != null) { query.validate(); } if (comment != null) { comment.validate(); } }
public void validate() throws org.apache.thrift.TException { // check for required fields if (name == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString()); } // alas, we cannot check 'enabled' because it's a primitive and you chose the non-beans generator. if (repositoryName == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'repositoryName' was not present! Struct: " + toString()); } if (query == null) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'query' was not present! Struct: " + toString()); } // check for sub-struct validity if (query != null) { query.validate(); } if (comment != null) { comment.validate(); } }