@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getState() == null) ? 0 : getState().hashCode()); hashCode = prime * hashCode + ((getStateChangeReason() == null) ? 0 : getStateChangeReason().hashCode()); hashCode = prime * hashCode + ((getTimeline() == null) ? 0 : getTimeline().hashCode()); return hashCode; }
/** * <p> * The current state of the instance group. * </p> * * @param state * The current state of the instance group. * @return Returns a reference to this object so that method calls can be chained together. * @see InstanceGroupState */ public InstanceGroupStatus withState(String state) { setState(state); return this; }
/** * <p> * The status change reason details for the instance group. * </p> * * @param stateChangeReason * The status change reason details for the instance group. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceGroupStatus withStateChangeReason(InstanceGroupStateChangeReason stateChangeReason) { setStateChangeReason(stateChangeReason); return this; }
public InstanceGroupStatus unmarshall(JsonUnmarshallerContext context) throws Exception { InstanceGroupStatus instanceGroupStatus = new InstanceGroupStatus(); if (context.testExpression("State", targetDepth)) { context.nextToken(); instanceGroupStatus.setState(context.getUnmarshaller(String.class).unmarshall(context)); instanceGroupStatus.setStateChangeReason(InstanceGroupStateChangeReasonJsonUnmarshaller.getInstance().unmarshall(context)); instanceGroupStatus.setTimeline(InstanceGroupTimelineJsonUnmarshaller.getInstance().unmarshall(context));
/** * <p> * The timeline of the instance group status over time. * </p> * * @param timeline * The timeline of the instance group status over time. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceGroupStatus withTimeline(InstanceGroupTimeline timeline) { setTimeline(timeline); return this; }
/** * <p> * The current state of the instance group. * </p> * * @param state * The current state of the instance group. * @see InstanceGroupState */ public void setState(InstanceGroupState state) { withState(state); }
@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 + ((getMarket() == null) ? 0 : getMarket().hashCode()); hashCode = prime * hashCode + ((getInstanceGroupType() == null) ? 0 : getInstanceGroupType().hashCode()); hashCode = prime * hashCode + ((getBidPrice() == null) ? 0 : getBidPrice().hashCode()); hashCode = prime * hashCode + ((getInstanceType() == null) ? 0 : getInstanceType().hashCode()); hashCode = prime * hashCode + ((getRequestedInstanceCount() == null) ? 0 : getRequestedInstanceCount().hashCode()); hashCode = prime * hashCode + ((getRunningInstanceCount() == null) ? 0 : getRunningInstanceCount().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getConfigurations() == null) ? 0 : getConfigurations().hashCode()); hashCode = prime * hashCode + ((getEbsBlockDevices() == null) ? 0 : getEbsBlockDevices().hashCode()); hashCode = prime * hashCode + ((getEbsOptimized() == null) ? 0 : getEbsOptimized().hashCode()); hashCode = prime * hashCode + ((getShrinkPolicy() == null) ? 0 : getShrinkPolicy().hashCode()); hashCode = prime * hashCode + ((getAutoScalingPolicy() == null) ? 0 : getAutoScalingPolicy().hashCode()); return hashCode; }
if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getConfigurations() == null ^ this.getConfigurations() == null)
public InstanceGroupStatus unmarshall(JsonUnmarshallerContext context) throws Exception { InstanceGroupStatus instanceGroupStatus = new InstanceGroupStatus(); if (context.testExpression("State", targetDepth)) { context.nextToken(); instanceGroupStatus.setState(context.getUnmarshaller(String.class).unmarshall(context)); instanceGroupStatus.setStateChangeReason(InstanceGroupStateChangeReasonJsonUnmarshaller.getInstance().unmarshall(context)); instanceGroupStatus.setTimeline(InstanceGroupTimelineJsonUnmarshaller.getInstance().unmarshall(context));
/** * <p> * The timeline of the instance group status over time. * </p> * * @param timeline * The timeline of the instance group status over time. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceGroupStatus withTimeline(InstanceGroupTimeline timeline) { setTimeline(timeline); return this; }
/** * <p> * The current state of the instance group. * </p> * * @param state * The current state of the instance group. * @see InstanceGroupState */ public void setState(InstanceGroupState state) { withState(state); }
@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 + ((getMarket() == null) ? 0 : getMarket().hashCode()); hashCode = prime * hashCode + ((getInstanceGroupType() == null) ? 0 : getInstanceGroupType().hashCode()); hashCode = prime * hashCode + ((getBidPrice() == null) ? 0 : getBidPrice().hashCode()); hashCode = prime * hashCode + ((getInstanceType() == null) ? 0 : getInstanceType().hashCode()); hashCode = prime * hashCode + ((getRequestedInstanceCount() == null) ? 0 : getRequestedInstanceCount().hashCode()); hashCode = prime * hashCode + ((getRunningInstanceCount() == null) ? 0 : getRunningInstanceCount().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getConfigurations() == null) ? 0 : getConfigurations().hashCode()); hashCode = prime * hashCode + ((getEbsBlockDevices() == null) ? 0 : getEbsBlockDevices().hashCode()); hashCode = prime * hashCode + ((getEbsOptimized() == null) ? 0 : getEbsOptimized().hashCode()); hashCode = prime * hashCode + ((getShrinkPolicy() == null) ? 0 : getShrinkPolicy().hashCode()); hashCode = prime * hashCode + ((getAutoScalingPolicy() == null) ? 0 : getAutoScalingPolicy().hashCode()); return hashCode; }
if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getConfigurations() == null ^ this.getConfigurations() == null)
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof InstanceGroupStatus == false) return false; InstanceGroupStatus other = (InstanceGroupStatus) obj; if (other.getState() == null ^ this.getState() == null) return false; if (other.getState() != null && other.getState().equals(this.getState()) == false) return false; if (other.getStateChangeReason() == null ^ this.getStateChangeReason() == null) return false; if (other.getStateChangeReason() != null && other.getStateChangeReason().equals(this.getStateChangeReason()) == false) return false; if (other.getTimeline() == null ^ this.getTimeline() == null) return false; if (other.getTimeline() != null && other.getTimeline().equals(this.getTimeline()) == false) return false; return true; }
/** * <p> * The current state of the instance group. * </p> * * @param state * The current state of the instance group. * @return Returns a reference to this object so that method calls can be chained together. * @see InstanceGroupState */ public InstanceGroupStatus withState(String state) { setState(state); return this; }
/** * <p> * The status change reason details for the instance group. * </p> * * @param stateChangeReason * The status change reason details for the instance group. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceGroupStatus withStateChangeReason(InstanceGroupStateChangeReason stateChangeReason) { setStateChangeReason(stateChangeReason); return this; }
/** * 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 (getState() != null) sb.append("State: ").append(getState()).append(","); if (getStateChangeReason() != null) sb.append("StateChangeReason: ").append(getStateChangeReason()).append(","); if (getTimeline() != null) sb.append("Timeline: ").append(getTimeline()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(InstanceGroupStatus instanceGroupStatus, ProtocolMarshaller protocolMarshaller) { if (instanceGroupStatus == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(instanceGroupStatus.getState(), STATE_BINDING); protocolMarshaller.marshall(instanceGroupStatus.getStateChangeReason(), STATECHANGEREASON_BINDING); protocolMarshaller.marshall(instanceGroupStatus.getTimeline(), TIMELINE_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 + ((getState() == null) ? 0 : getState().hashCode()); hashCode = prime * hashCode + ((getStateChangeReason() == null) ? 0 : getStateChangeReason().hashCode()); hashCode = prime * hashCode + ((getTimeline() == null) ? 0 : getTimeline().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof InstanceGroupStatus == false) return false; InstanceGroupStatus other = (InstanceGroupStatus) obj; if (other.getState() == null ^ this.getState() == null) return false; if (other.getState() != null && other.getState().equals(this.getState()) == false) return false; if (other.getStateChangeReason() == null ^ this.getStateChangeReason() == null) return false; if (other.getStateChangeReason() != null && other.getStateChangeReason().equals(this.getStateChangeReason()) == false) return false; if (other.getTimeline() == null ^ this.getTimeline() == null) return false; if (other.getTimeline() != null && other.getTimeline().equals(this.getTimeline()) == false) return false; return true; }