@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCreationDateTime() == null) ? 0 : getCreationDateTime().hashCode()); hashCode = prime * hashCode + ((getReadyDateTime() == null) ? 0 : getReadyDateTime().hashCode()); hashCode = prime * hashCode + ((getEndDateTime() == null) ? 0 : getEndDateTime().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 (getCreationDateTime() != null) sb.append("CreationDateTime: ").append(getCreationDateTime()).append(","); if (getReadyDateTime() != null) sb.append("ReadyDateTime: ").append(getReadyDateTime()).append(","); if (getEndDateTime() != null) sb.append("EndDateTime: ").append(getEndDateTime()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ClusterTimeline == false) return false; ClusterTimeline other = (ClusterTimeline) obj; if (other.getCreationDateTime() == null ^ this.getCreationDateTime() == null) return false; if (other.getCreationDateTime() != null && other.getCreationDateTime().equals(this.getCreationDateTime()) == false) return false; if (other.getReadyDateTime() == null ^ this.getReadyDateTime() == null) return false; if (other.getReadyDateTime() != null && other.getReadyDateTime().equals(this.getReadyDateTime()) == false) return false; if (other.getEndDateTime() == null ^ this.getEndDateTime() == null) return false; if (other.getEndDateTime() != null && other.getEndDateTime().equals(this.getEndDateTime()) == false) return false; return true; }
/** * Marshall the given parameter object. */ public void marshall(ClusterTimeline clusterTimeline, ProtocolMarshaller protocolMarshaller) { if (clusterTimeline == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(clusterTimeline.getCreationDateTime(), CREATIONDATETIME_BINDING); protocolMarshaller.marshall(clusterTimeline.getReadyDateTime(), READYDATETIME_BINDING); protocolMarshaller.marshall(clusterTimeline.getEndDateTime(), ENDDATETIME_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 + ((getCreationDateTime() == null) ? 0 : getCreationDateTime().hashCode()); hashCode = prime * hashCode + ((getReadyDateTime() == null) ? 0 : getReadyDateTime().hashCode()); hashCode = prime * hashCode + ((getEndDateTime() == null) ? 0 : getEndDateTime().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 (getCreationDateTime() != null) sb.append("CreationDateTime: ").append(getCreationDateTime()).append(","); if (getReadyDateTime() != null) sb.append("ReadyDateTime: ").append(getReadyDateTime()).append(","); if (getEndDateTime() != null) sb.append("EndDateTime: ").append(getEndDateTime()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ClusterTimeline == false) return false; ClusterTimeline other = (ClusterTimeline) obj; if (other.getCreationDateTime() == null ^ this.getCreationDateTime() == null) return false; if (other.getCreationDateTime() != null && other.getCreationDateTime().equals(this.getCreationDateTime()) == false) return false; if (other.getReadyDateTime() == null ^ this.getReadyDateTime() == null) return false; if (other.getReadyDateTime() != null && other.getReadyDateTime().equals(this.getReadyDateTime()) == false) return false; if (other.getEndDateTime() == null ^ this.getEndDateTime() == null) return false; if (other.getEndDateTime() != null && other.getEndDateTime().equals(this.getEndDateTime()) == false) return false; return true; }
/** * Marshall the given parameter object. */ public void marshall(ClusterTimeline clusterTimeline, ProtocolMarshaller protocolMarshaller) { if (clusterTimeline == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(clusterTimeline.getCreationDateTime(), CREATIONDATETIME_BINDING); protocolMarshaller.marshall(clusterTimeline.getReadyDateTime(), READYDATETIME_BINDING); protocolMarshaller.marshall(clusterTimeline.getEndDateTime(), ENDDATETIME_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
/** * Updates EMR cluster model object with the specified EMR cluster status information. * * @param emrCluster the EMR cluster * @param clusterStatus the EMR cluster status information */ private void setEmrClusterStatus(EmrCluster emrCluster, ClusterStatus clusterStatus) { // Log cluster status information. LOGGER.info("emrClusterId=\"{}\" emrClusterStatus={}", emrCluster.getId(), jsonHelper.objectToJson(clusterStatus)); // Update the EMR cluster with the status information. emrCluster.setStatus(clusterStatus.getState()); emrCluster .setStatusChangeReason(new StatusChangeReason(clusterStatus.getStateChangeReason().getCode(), clusterStatus.getStateChangeReason().getMessage())); emrCluster.setStatusTimeline(new StatusTimeline(toXmlGregorianCalendar(clusterStatus.getTimeline().getCreationDateTime()), toXmlGregorianCalendar(clusterStatus.getTimeline().getReadyDateTime()), toXmlGregorianCalendar(clusterStatus.getTimeline().getEndDateTime()))); } }
/** * Updates EMR cluster model object with the specified EMR cluster status information. * * @param emrCluster the EMR cluster * @param clusterStatus the EMR cluster status information */ private void setEmrClusterStatus(EmrCluster emrCluster, ClusterStatus clusterStatus) { // Log cluster status information. LOGGER.info("emrClusterId=\"{}\" emrClusterStatus={}", emrCluster.getId(), jsonHelper.objectToJson(clusterStatus)); // Update the EMR cluster with the status information. emrCluster.setStatus(clusterStatus.getState()); emrCluster .setStatusChangeReason(new StatusChangeReason(clusterStatus.getStateChangeReason().getCode(), clusterStatus.getStateChangeReason().getMessage())); emrCluster.setStatusTimeline(new StatusTimeline(toXmlGregorianCalendar(clusterStatus.getTimeline().getCreationDateTime()), toXmlGregorianCalendar(clusterStatus.getTimeline().getReadyDateTime()), toXmlGregorianCalendar(clusterStatus.getTimeline().getEndDateTime()))); } }