@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetTrafficPolicyResult == false) return false; GetTrafficPolicyResult other = (GetTrafficPolicyResult) obj; if (other.getTrafficPolicy() == null ^ this.getTrafficPolicy() == null) return false; if (other.getTrafficPolicy() != null && other.getTrafficPolicy().equals(this.getTrafficPolicy()) == false) return false; return true; }
/** * <p> * A complex type that contains settings for the specified traffic policy. * </p> * * @param trafficPolicy * A complex type that contains settings for the specified traffic policy. * @return Returns a reference to this object so that method calls can be chained together. */ public GetTrafficPolicyResult withTrafficPolicy(TrafficPolicy trafficPolicy) { setTrafficPolicy(trafficPolicy); return this; }
public GetTrafficPolicyResult unmarshall(StaxUnmarshallerContext context) throws Exception { GetTrafficPolicyResult getTrafficPolicyResult = new GetTrafficPolicyResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return getTrafficPolicyResult; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("TrafficPolicy", targetDepth)) { getTrafficPolicyResult.setTrafficPolicy(TrafficPolicyStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return getTrafficPolicyResult; } } } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTrafficPolicy() == null) ? 0 : getTrafficPolicy().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 (getTrafficPolicy() != null) sb.append("TrafficPolicy: ").append(getTrafficPolicy()); sb.append("}"); return sb.toString(); }