@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getJobFlowId() == null) ? 0 : getJobFlowId().hashCode()); hashCode = prime * hashCode + ((getSteps() == null) ? 0 : getSteps().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AddJobFlowStepsRequest == false) return false; AddJobFlowStepsRequest other = (AddJobFlowStepsRequest) obj; if (other.getJobFlowId() == null ^ this.getJobFlowId() == null) return false; if (other.getJobFlowId() != null && other.getJobFlowId().equals(this.getJobFlowId()) == false) return false; if (other.getSteps() == null ^ this.getSteps() == null) return false; if (other.getSteps() != null && other.getSteps().equals(this.getSteps()) == false) return false; return true; }
/** * 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 (getJobFlowId() != null) sb.append("JobFlowId: ").append(getJobFlowId()).append(","); if (getSteps() != null) sb.append("Steps: ").append(getSteps()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(AddJobFlowStepsRequest addJobFlowStepsRequest, ProtocolMarshaller protocolMarshaller) { if (addJobFlowStepsRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(addJobFlowStepsRequest.getJobFlowId(), JOBFLOWID_BINDING); protocolMarshaller.marshall(addJobFlowStepsRequest.getSteps(), STEPS_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getJobFlowId() == null) ? 0 : getJobFlowId().hashCode()); hashCode = prime * hashCode + ((getSteps() == null) ? 0 : getSteps().hashCode()); return hashCode; }
/** * 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 (getJobFlowId() != null) sb.append("JobFlowId: ").append(getJobFlowId()).append(","); if (getSteps() != null) sb.append("Steps: ").append(getSteps()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AddJobFlowStepsRequest == false) return false; AddJobFlowStepsRequest other = (AddJobFlowStepsRequest) obj; if (other.getJobFlowId() == null ^ this.getJobFlowId() == null) return false; if (other.getJobFlowId() != null && other.getJobFlowId().equals(this.getJobFlowId()) == false) return false; if (other.getSteps() == null ^ this.getSteps() == null) return false; if (other.getSteps() != null && other.getSteps().equals(this.getSteps()) == false) return false; return true; }
/** * Marshall the given parameter object. */ public void marshall(AddJobFlowStepsRequest addJobFlowStepsRequest, ProtocolMarshaller protocolMarshaller) { if (addJobFlowStepsRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(addJobFlowStepsRequest.getJobFlowId(), JOBFLOWID_BINDING); protocolMarshaller.marshall(addJobFlowStepsRequest.getSteps(), STEPS_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
@Override public List<String> answer(InvocationOnMock invocation) throws Throwable { AddJobFlowStepsRequest addJobFlowStepsRequest = invocation.getArgument(1); assertEquals(clusterId, addJobFlowStepsRequest.getJobFlowId()); List<StepConfig> steps = addJobFlowStepsRequest.getSteps(); assertEquals(1, steps.size()); assertEquals(emrStepConfig, steps.get(0)); // return a single step with the given stepId return Arrays.asList(stepId); } });
MockEmrJobFlow cluster = getClusterById(addJobFlowStepsRequest.getJobFlowId()); if (cluster == null) throw new AmazonServiceException("No Cluster exists with jobFlowId: " + addJobFlowStepsRequest.getJobFlowId());