/** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getId() != null) sb.append("Id: ").append(getId()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getConfig() != null) sb.append("Config: ").append(getConfig()).append(","); if (getActionOnFailure() != null) sb.append("ActionOnFailure: ").append(getActionOnFailure()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getConfig() == null) ? 0 : getConfig().hashCode()); hashCode = prime * hashCode + ((getActionOnFailure() == null) ? 0 : getActionOnFailure().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); return hashCode; }
/** * Marshall the given parameter object. */ public void marshall(StepSummary stepSummary, ProtocolMarshaller protocolMarshaller) { if (stepSummary == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(stepSummary.getId(), ID_BINDING); protocolMarshaller.marshall(stepSummary.getName(), NAME_BINDING); protocolMarshaller.marshall(stepSummary.getConfig(), CONFIG_BINDING); protocolMarshaller.marshall(stepSummary.getActionOnFailure(), ACTIONONFAILURE_BINDING); protocolMarshaller.marshall(stepSummary.getStatus(), STATUS_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getConfig() == null ^ this.getConfig() == null) return false; if (other.getConfig() != null && other.getConfig().equals(this.getConfig()) == false) return false; if (other.getActionOnFailure() == null ^ this.getActionOnFailure() == null)
/** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getId() != null) sb.append("Id: ").append(getId()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getConfig() != null) sb.append("Config: ").append(getConfig()).append(","); if (getActionOnFailure() != null) sb.append("ActionOnFailure: ").append(getActionOnFailure()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getConfig() == null) ? 0 : getConfig().hashCode()); hashCode = prime * hashCode + ((getActionOnFailure() == null) ? 0 : getActionOnFailure().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); return hashCode; }
/** * Marshall the given parameter object. */ public void marshall(StepSummary stepSummary, ProtocolMarshaller protocolMarshaller) { if (stepSummary == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(stepSummary.getId(), ID_BINDING); protocolMarshaller.marshall(stepSummary.getName(), NAME_BINDING); protocolMarshaller.marshall(stepSummary.getConfig(), CONFIG_BINDING); protocolMarshaller.marshall(stepSummary.getActionOnFailure(), ACTIONONFAILURE_BINDING); protocolMarshaller.marshall(stepSummary.getStatus(), STATUS_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getConfig() == null ^ this.getConfig() == null) return false; if (other.getConfig() != null && other.getConfig().equals(this.getConfig()) == false) return false; if (other.getActionOnFailure() == null ^ this.getActionOnFailure() == null)
/** * Builds EmrStep object from the EMR step. Fills in details if verbose=true. * * @param stepSummary The step summary * @param verbose The verbose flag * * @return EmrStep */ private EmrStep buildEmrStepFromAwsStep(StepSummary stepSummary, boolean verbose) { EmrStep emrStep = new EmrStep(); emrStep.setId(stepSummary.getId()); emrStep.setStepName(stepSummary.getName()); emrStep.setStatus(stepSummary.getStatus().getState()); if (verbose) { emrStep.setJarLocation(stepSummary.getConfig().getJar()); emrStep.setMainClass(stepSummary.getConfig().getMainClass()); emrStep.setScriptArguments(stepSummary.getConfig().getArgs()); emrStep.setContinueOnError(stepSummary.getActionOnFailure()); } return emrStep; }
/** * Builds EmrStep object from the EMR step. Fills in details if verbose=true. * * @param stepSummary The step summary * @param verbose The verbose flag * * @return EmrStep */ private EmrStep buildEmrStepFromAwsStep(StepSummary stepSummary, boolean verbose) { EmrStep emrStep = new EmrStep(); emrStep.setId(stepSummary.getId()); emrStep.setStepName(stepSummary.getName()); emrStep.setStatus(stepSummary.getStatus().getState()); if (verbose) { emrStep.setJarLocation(stepSummary.getConfig().getJar()); emrStep.setMainClass(stepSummary.getConfig().getMainClass()); emrStep.setScriptArguments(stepSummary.getConfig().getArgs()); emrStep.setContinueOnError(stepSummary.getActionOnFailure()); } return emrStep; }