@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof TerminateInstanceInAutoScalingGroupResult == false) return false; TerminateInstanceInAutoScalingGroupResult other = (TerminateInstanceInAutoScalingGroupResult) obj; if (other.getActivity() == null ^ this.getActivity() == null) return false; if (other.getActivity() != null && other.getActivity().equals(this.getActivity()) == false) return false; return true; }
/** * <p> * A scaling activity. * </p> * * @param activity * A scaling activity. * @return Returns a reference to this object so that method calls can be chained together. */ public TerminateInstanceInAutoScalingGroupResult withActivity(Activity activity) { setActivity(activity); return this; }
public TerminateInstanceInAutoScalingGroupResult unmarshall(StaxUnmarshallerContext context) throws Exception { TerminateInstanceInAutoScalingGroupResult terminateInstanceInAutoScalingGroupResult = new TerminateInstanceInAutoScalingGroupResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return terminateInstanceInAutoScalingGroupResult; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("Activity", targetDepth)) { terminateInstanceInAutoScalingGroupResult.setActivity(ActivityStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return terminateInstanceInAutoScalingGroupResult; } } } }
public TerminateInstanceInAutoScalingGroupResult unmarshall(StaxUnmarshallerContext context) throws Exception { TerminateInstanceInAutoScalingGroupResult terminateInstanceInAutoScalingGroupResult = new TerminateInstanceInAutoScalingGroupResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 2; while (true) { int xmlEvent = context.nextEvent(); if (xmlEvent == XmlPullParser.END_DOCUMENT) break; if (xmlEvent == XmlPullParser.START_TAG) { if (context.testExpression("Activity", targetDepth)) { terminateInstanceInAutoScalingGroupResult.setActivity(ActivityStaxUnmarshaller .getInstance().unmarshall(context)); continue; } } else if (xmlEvent == XmlPullParser.END_TAG) { if (context.getCurrentDepth() < originalDepth) { break; } } } return terminateInstanceInAutoScalingGroupResult; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getActivity() == null) ? 0 : getActivity().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 (getActivity() != null) sb.append("Activity: ").append(getActivity()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof TerminateInstanceInAutoScalingGroupResult == false) return false; TerminateInstanceInAutoScalingGroupResult other = (TerminateInstanceInAutoScalingGroupResult) obj; if (other.getActivity() == null ^ this.getActivity() == null) return false; if (other.getActivity() != null && other.getActivity().equals(this.getActivity()) == false) return false; return true; } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getActivity() == null) ? 0 : getActivity().hashCode()); return hashCode; }
/** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getActivity() != null) sb.append("Activity: " + getActivity()); sb.append("}"); return sb.toString(); }