setType(type); return this;
/** * <p> * The current value for the limit that is specified by <code>Type</code>. * </p> * * @param value * The current value for the limit that is specified by <code>Type</code>. * @return Returns a reference to this object so that method calls can be chained together. */ public HostedZoneLimit withValue(Long value) { setValue(value); return this; }
public HostedZoneLimit unmarshall(StaxUnmarshallerContext context) throws Exception { HostedZoneLimit hostedZoneLimit = new HostedZoneLimit(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return hostedZoneLimit; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("Type", targetDepth)) { hostedZoneLimit.setType(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("Value", targetDepth)) { hostedZoneLimit.setValue(LongStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return hostedZoneLimit; } } } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getLimit() == null) ? 0 : getLimit().hashCode()); hashCode = prime * hashCode + ((getCount() == null) ? 0 : getCount().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetHostedZoneLimitResult == false) return false; GetHostedZoneLimitResult other = (GetHostedZoneLimitResult) obj; if (other.getLimit() == null ^ this.getLimit() == null) return false; if (other.getLimit() != null && other.getLimit().equals(this.getLimit()) == false) return false; if (other.getCount() == null ^ this.getCount() == null) return false; if (other.getCount() != null && other.getCount().equals(this.getCount()) == false) return false; return true; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof HostedZoneLimit == false) return false; HostedZoneLimit other = (HostedZoneLimit) obj; if (other.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == false) return false; if (other.getValue() == null ^ this.getValue() == null) return false; if (other.getValue() != null && other.getValue().equals(this.getValue()) == false) return false; return true; }
/** * 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 (getType() != null) sb.append("Type: ").append(getType()).append(","); if (getValue() != null) sb.append("Value: ").append(getValue()); sb.append("}"); return sb.toString(); }