public SubmitOptions deepCopy() { return new SubmitOptions(this); }
public java.lang.Object getFieldValue(_Fields field) { switch (field) { case INITIAL_STATUS: return get_initial_status(); case CREDS: return get_creds(); } throw new java.lang.IllegalStateException(); }
/** 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 java.lang.IllegalArgumentException(); } switch (field) { case INITIAL_STATUS: return is_set_initial_status(); case CREDS: return is_set_creds(); } throw new java.lang.IllegalStateException(); }
public void setFieldValue(_Fields field, java.lang.Object value) { switch (field) { case INITIAL_STATUS: if (value == null) { unset_initial_status(); } else { set_initial_status((TopologyInitialStatus)value); } break; case CREDS: if (value == null) { unset_creds(); } else { set_creds((Credentials)value); } break; } }
Credentials tmpCreds = opts.get_creds(); if (tmpCreds != null) { passedCreds = tmpCreds.get_creds(); if (!fullCreds.isEmpty()) { if (opts == null) { opts = new SubmitOptions(TopologyInitialStatus.ACTIVE); opts.set_creds(new Credentials(fullCreds));
String topoId = topoName + "-" + uniqueNum + "-" + Time.currentTimeSecs(); Map<String, String> creds = null; if (options.is_set_creds()) { creds = options.get_creds().get_creds(); switch (options.get_initial_status()) { case INACTIVE: status = TopologyStatus.INACTIVE; break; default: throw new IllegalArgumentException("Inital Status of " + options.get_initial_status() + " is not allowed.");
if (schemeField.type == org.apache.storm.thrift.protocol.TType.I32) { struct.initial_status = org.apache.storm.generated.TopologyInitialStatus.findByValue(iprot.readI32()); struct.set_initial_status_isSet(true); } else { org.apache.storm.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.creds = new Credentials(); struct.creds.read(iprot); struct.set_creds_isSet(true); } else { org.apache.storm.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.validate();
public void write(org.apache.storm.thrift.protocol.TProtocol oprot, SubmitOptions struct) throws org.apache.storm.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.initial_status != null) { oprot.writeFieldBegin(INITIAL_STATUS_FIELD_DESC); oprot.writeI32(struct.initial_status.getValue()); oprot.writeFieldEnd(); } if (struct.creds != null) { if (struct.is_set_creds()) { oprot.writeFieldBegin(CREDS_FIELD_DESC); struct.creds.write(oprot); oprot.writeFieldEnd(); } } oprot.writeFieldStop(); oprot.writeStructEnd(); }
@Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("SubmitOptions("); boolean first = true; sb.append("initial_status:"); if (this.initial_status == null) { sb.append("null"); } else { sb.append(this.initial_status); } first = false; if (is_set_creds()) { if (!first) sb.append(", "); sb.append("creds:"); if (this.creds == null) { sb.append("null"); } else { sb.append(this.creds); } first = false; } sb.append(")"); return sb.toString(); }
public void validate() throws org.apache.storm.thrift.TException { // check for required fields if (!is_set_initial_status()) { throw new org.apache.storm.thrift.protocol.TProtocolException("Required field 'initial_status' is unset! Struct:" + toString()); } // check for sub-struct validity if (creds != null) { creds.validate(); } }
@Override public void read(org.apache.storm.thrift.protocol.TProtocol prot, SubmitOptions struct) throws org.apache.storm.thrift.TException { org.apache.storm.thrift.protocol.TTupleProtocol iprot = (org.apache.storm.thrift.protocol.TTupleProtocol) prot; struct.initial_status = org.apache.storm.generated.TopologyInitialStatus.findByValue(iprot.readI32()); struct.set_initial_status_isSet(true); java.util.BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.creds = new Credentials(); struct.creds.read(iprot); struct.set_creds_isSet(true); } } }
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.storm.thrift.protocol.TCompactProtocol(new org.apache.storm.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.storm.thrift.TException te) { throw new java.io.IOException(te); } }
@Override public boolean equals(java.lang.Object that) { if (that == null) return false; if (that instanceof SubmitOptions) return this.equals((SubmitOptions)that); return false; }
Credentials tmpCreds = opts.get_creds(); if (tmpCreds != null) { passedCreds = tmpCreds.get_creds(); if (!fullCreds.isEmpty()) { if (opts == null) { opts = new SubmitOptions(TopologyInitialStatus.ACTIVE); opts.set_creds(new Credentials(fullCreds));
public void setFieldValue(_Fields field, Object value) { switch (field) { case INITIAL_STATUS: if (value == null) { unset_initial_status(); } else { set_initial_status((TopologyInitialStatus)value); } break; case CREDS: if (value == null) { unset_creds(); } else { set_creds((Credentials)value); } break; } }
if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.initial_status = org.apache.storm.generated.TopologyInitialStatus.findByValue(iprot.readI32()); struct.set_initial_status_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.creds = new Credentials(); struct.creds.read(iprot); struct.set_creds_isSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.validate();
public void write(org.apache.thrift.protocol.TProtocol oprot, SubmitOptions struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.initial_status != null) { oprot.writeFieldBegin(INITIAL_STATUS_FIELD_DESC); oprot.writeI32(struct.initial_status.getValue()); oprot.writeFieldEnd(); } if (struct.creds != null) { if (struct.is_set_creds()) { oprot.writeFieldBegin(CREDS_FIELD_DESC); struct.creds.write(oprot); oprot.writeFieldEnd(); } } oprot.writeFieldStop(); oprot.writeStructEnd(); }
@Override public void write(org.apache.storm.thrift.protocol.TProtocol prot, SubmitOptions struct) throws org.apache.storm.thrift.TException { org.apache.storm.thrift.protocol.TTupleProtocol oprot = (org.apache.storm.thrift.protocol.TTupleProtocol) prot; oprot.writeI32(struct.initial_status.getValue()); java.util.BitSet optionals = new java.util.BitSet(); if (struct.is_set_creds()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.is_set_creds()) { struct.creds.write(oprot); } }
public void validate() throws org.apache.thrift.TException { // check for required fields if (!is_set_initial_status()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'initial_status' is unset! Struct:" + toString()); } // check for sub-struct validity if (creds != null) { creds.validate(); } }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, SubmitOptions struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.initial_status = org.apache.storm.generated.TopologyInitialStatus.findByValue(iprot.readI32()); struct.set_initial_status_isSet(true); BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { struct.creds = new Credentials(); struct.creds.read(iprot); struct.set_creds_isSet(true); } } }