public ErrorInfo deepCopy() { return new ErrorInfo(this); }
public Object getFieldValue(_Fields field) { switch (field) { case ERROR: return get_error(); case ERROR_TIME_SECS: return Integer.valueOf(get_errorTimeSecs()); case ERROR_LEVEL: return get_errorLevel(); case ERROR_CODE: return Integer.valueOf(get_errorCode()); } throw new IllegalStateException(); }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof ErrorInfo) return this.equals((ErrorInfo)that); return false; }
/** * Performs a deep copy on <i>other</i>. */ public ErrorInfo(ErrorInfo other) { __isset_bitfield = other.__isset_bitfield; if (other.is_set_error()) { this.error = other.error; } this.errorTimeSecs = other.errorTimeSecs; if (other.is_set_errorLevel()) { this.errorLevel = other.errorLevel; } this.errorCode = other.errorCode; }
public void setFieldValue(_Fields field, Object value) { switch (field) { case ERROR: if (value == null) { unset_error(); } else { set_error((String)value); } break; case ERROR_TIME_SECS: if (value == null) { unset_error_time_secs(); } else { set_error_time_secs((Integer)value); } break; } }
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case ERROR: return is_set_error(); case ERROR_TIME_SECS: return is_set_errorTimeSecs(); case ERROR_LEVEL: return is_set_errorLevel(); case ERROR_CODE: return is_set_errorCode(); } throw new IllegalStateException(); }
case ERROR: if (value == null) { unset_error(); } else { set_error((String)value); unset_errorTimeSecs(); } else { set_errorTimeSecs((Integer)value); unset_errorLevel(); } else { set_errorLevel((String)value); unset_errorCode(); } else { set_errorCode((Integer)value);
for (backtype.storm.generated.ErrorInfo ei : error.getValue()) { ErrorInfo errorInfo = new ErrorInfo(); errorInfo.setError(ei.get_error()); errorInfo.setErrorTimeSecs(ei.get_error_time_secs()); errorInfo.setHost(ei.get_host()); errorInfo.setPort(ei.get_port());
public void validate() throws org.apache.thrift7.TException { // check for required fields if (!is_set_error()) { throw new org.apache.thrift7.protocol.TProtocolException("Required field 'error' is unset! Struct:" + toString()); } if (!is_set_error_time_secs()) { throw new org.apache.thrift7.protocol.TProtocolException("Required field 'error_time_secs' is unset! Struct:" + toString()); } }
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case ERROR: return is_set_error(); case ERROR_TIME_SECS: return is_set_error_time_secs(); } throw new IllegalStateException(); }
public Object getFieldValue(_Fields field) { switch (field) { case ERROR: return get_error(); case ERROR_TIME_SECS: return Integer.valueOf(get_error_time_secs()); } throw new IllegalStateException(); }
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.error = iprot.readString(); struct.set_error_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.errorTimeSecs = iprot.readI32(); struct.set_errorTimeSecs_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.errorLevel = iprot.readString(); struct.set_errorLevel_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.errorCode = iprot.readI32(); struct.set_errorCode_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.validate();
/** * Performs a deep copy on <i>other</i>. */ public ErrorInfo(ErrorInfo other) { __isset_bit_vector.clear(); __isset_bit_vector.or(other.__isset_bit_vector); if (other.is_set_error()) { this.error = other.error; } this.error_time_secs = other.error_time_secs; }
if (field.type == org.apache.thrift7.protocol.TType.I32) { this.error_time_secs = iprot.readI32(); set_error_time_secs_isSet(true); } else { org.apache.thrift7.protocol.TProtocolUtil.skip(iprot, field.type); validate();
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } }
public void write(org.apache.thrift.protocol.TProtocol oprot, ErrorInfo struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.error != null) { oprot.writeFieldBegin(ERROR_FIELD_DESC); oprot.writeString(struct.error); oprot.writeFieldEnd(); } oprot.writeFieldBegin(ERROR_TIME_SECS_FIELD_DESC); oprot.writeI32(struct.errorTimeSecs); oprot.writeFieldEnd(); if (struct.errorLevel != null) { oprot.writeFieldBegin(ERROR_LEVEL_FIELD_DESC); oprot.writeString(struct.errorLevel); oprot.writeFieldEnd(); } oprot.writeFieldBegin(ERROR_CODE_FIELD_DESC); oprot.writeI32(struct.errorCode); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); }
public void validate() throws org.apache.thrift.TException { // check for required fields if (!is_set_error()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'error' is unset! Struct:" + toString()); } if (!is_set_errorTimeSecs()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'errorTimeSecs' is unset! Struct:" + toString()); } if (!is_set_errorLevel()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'errorLevel' is unset! Struct:" + toString()); } if (!is_set_errorCode()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'errorCode' is unset! Struct:" + toString()); } // check for sub-struct validity }
case ERROR: if (value == null) { unset_error(); } else { set_error((String)value); unset_errorTimeSecs(); } else { set_errorTimeSecs((Integer)value); unset_errorLevel(); } else { set_errorLevel((String)value); unset_errorCode(); } else { set_errorCode((Integer)value);