@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. * </p> * * @param state * The current state of the instance. * @return Returns a reference to this object so that method calls can be chained together. * @see InstanceState */ public InstanceStatus withState(String state) { setState(state); return this; }
/** * <p> * The details of the status change reason for the instance. * </p> * * @param stateChangeReason * The details of the status change reason for the instance. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceStatus withStateChangeReason(InstanceStateChangeReason stateChangeReason) { setStateChangeReason(stateChangeReason); return this; }
public InstanceStatus unmarshall(JsonUnmarshallerContext context) throws Exception { InstanceStatus instanceStatus = new InstanceStatus(); if (context.testExpression("State", targetDepth)) { context.nextToken(); instanceStatus.setState(context.getUnmarshaller(String.class).unmarshall(context)); instanceStatus.setStateChangeReason(InstanceStateChangeReasonJsonUnmarshaller.getInstance().unmarshall(context)); instanceStatus.setTimeline(InstanceTimelineJsonUnmarshaller.getInstance().unmarshall(context));
/** * <p> * The current state of the instance. * </p> * * @param state * The current state of the instance. * @see InstanceState */ public void setState(InstanceState state) { withState(state); }
/** * <p> * The timeline of the instance status over time. * </p> * * @param timeline * The timeline of the instance status over time. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceStatus withTimeline(InstanceTimeline timeline) { setTimeline(timeline); return this; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode()); hashCode = prime * hashCode + ((getEc2InstanceId() == null) ? 0 : getEc2InstanceId().hashCode()); hashCode = prime * hashCode + ((getPublicDnsName() == null) ? 0 : getPublicDnsName().hashCode()); hashCode = prime * hashCode + ((getPublicIpAddress() == null) ? 0 : getPublicIpAddress().hashCode()); hashCode = prime * hashCode + ((getPrivateDnsName() == null) ? 0 : getPrivateDnsName().hashCode()); hashCode = prime * hashCode + ((getPrivateIpAddress() == null) ? 0 : getPrivateIpAddress().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getInstanceGroupId() == null) ? 0 : getInstanceGroupId().hashCode()); hashCode = prime * hashCode + ((getInstanceFleetId() == null) ? 0 : getInstanceFleetId().hashCode()); hashCode = prime * hashCode + ((getMarket() == null) ? 0 : getMarket().hashCode()); hashCode = prime * hashCode + ((getInstanceType() == null) ? 0 : getInstanceType().hashCode()); hashCode = prime * hashCode + ((getEbsVolumes() == null) ? 0 : getEbsVolumes().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.getInstanceGroupId() == null ^ this.getInstanceGroupId() == null)
public InstanceStatus unmarshall(JsonUnmarshallerContext context) throws Exception { InstanceStatus instanceStatus = new InstanceStatus(); if (context.testExpression("State", targetDepth)) { context.nextToken(); instanceStatus.setState(context.getUnmarshaller(String.class).unmarshall(context)); instanceStatus.setStateChangeReason(InstanceStateChangeReasonJsonUnmarshaller.getInstance().unmarshall(context)); instanceStatus.setTimeline(InstanceTimelineJsonUnmarshaller.getInstance().unmarshall(context));
/** * <p> * The current state of the instance. * </p> * * @param state * The current state of the instance. * @see InstanceState */ public void setState(InstanceState state) { withState(state); }
/** * <p> * The timeline of the instance status over time. * </p> * * @param timeline * The timeline of the instance status over time. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceStatus withTimeline(InstanceTimeline timeline) { setTimeline(timeline); return this; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode()); hashCode = prime * hashCode + ((getEc2InstanceId() == null) ? 0 : getEc2InstanceId().hashCode()); hashCode = prime * hashCode + ((getPublicDnsName() == null) ? 0 : getPublicDnsName().hashCode()); hashCode = prime * hashCode + ((getPublicIpAddress() == null) ? 0 : getPublicIpAddress().hashCode()); hashCode = prime * hashCode + ((getPrivateDnsName() == null) ? 0 : getPrivateDnsName().hashCode()); hashCode = prime * hashCode + ((getPrivateIpAddress() == null) ? 0 : getPrivateIpAddress().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getInstanceGroupId() == null) ? 0 : getInstanceGroupId().hashCode()); hashCode = prime * hashCode + ((getInstanceFleetId() == null) ? 0 : getInstanceFleetId().hashCode()); hashCode = prime * hashCode + ((getMarket() == null) ? 0 : getMarket().hashCode()); hashCode = prime * hashCode + ((getInstanceType() == null) ? 0 : getInstanceType().hashCode()); hashCode = prime * hashCode + ((getEbsVolumes() == null) ? 0 : getEbsVolumes().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.getInstanceGroupId() == null ^ this.getInstanceGroupId() == null)
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof InstanceStatus == false) return false; InstanceStatus other = (InstanceStatus) 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 details of the status change reason for the instance. * </p> * * @param stateChangeReason * The details of the status change reason for the instance. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceStatus withStateChangeReason(InstanceStateChangeReason stateChangeReason) { setStateChangeReason(stateChangeReason); return this; }
/** * <p> * The current state of the instance. * </p> * * @param state * The current state of the instance. * @return Returns a reference to this object so that method calls can be chained together. * @see InstanceState */ public InstanceStatus withState(String state) { setState(state); 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(InstanceStatus instanceStatus, ProtocolMarshaller protocolMarshaller) { if (instanceStatus == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(instanceStatus.getState(), STATE_BINDING); protocolMarshaller.marshall(instanceStatus.getStateChangeReason(), STATECHANGEREASON_BINDING); protocolMarshaller.marshall(instanceStatus.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 InstanceStatus == false) return false; InstanceStatus other = (InstanceStatus) 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; }