@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getSubnetIdentifier() == null) ? 0 : getSubnetIdentifier().hashCode()); hashCode = prime * hashCode + ((getSubnetAvailabilityZone() == null) ? 0 : getSubnetAvailabilityZone().hashCode()); return hashCode; }
/** * <p> * The Availability Zone associated with the subnet. * </p> * * @param subnetAvailabilityZone * The Availability Zone associated with the subnet. * @return Returns a reference to this object so that method calls can be chained together. */ public Subnet withSubnetAvailabilityZone(AvailabilityZone subnetAvailabilityZone) { setSubnetAvailabilityZone(subnetAvailabilityZone); return this; }
/** * <p> * The unique identifier for the subnet. * </p> * * @param subnetIdentifier * The unique identifier for the subnet. * @return Returns a reference to this object so that method calls can be chained together. */ public Subnet withSubnetIdentifier(String subnetIdentifier) { setSubnetIdentifier(subnetIdentifier); return this; }
public Subnet unmarshall(StaxUnmarshallerContext context) throws Exception { Subnet subnet = new Subnet(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return subnet; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("SubnetIdentifier", targetDepth)) { subnet.setSubnetIdentifier(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("SubnetAvailabilityZone", targetDepth)) { subnet.setSubnetAvailabilityZone(AvailabilityZoneStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return subnet; } } } }
public Subnet unmarshall(StaxUnmarshallerContext context) throws Exception { Subnet subnet = new Subnet(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return subnet; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("SubnetIdentifier", targetDepth)) { subnet.setSubnetIdentifier(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("SubnetAvailabilityZone", targetDepth)) { subnet.setSubnetAvailabilityZone(AvailabilityZoneStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return subnet; } } } }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Subnet == false) return false; Subnet other = (Subnet) obj; if (other.getSubnetIdentifier() == null ^ this.getSubnetIdentifier() == null) return false; if (other.getSubnetIdentifier() != null && other.getSubnetIdentifier().equals(this.getSubnetIdentifier()) == false) return false; if (other.getSubnetAvailabilityZone() == null ^ this.getSubnetAvailabilityZone() == null) return false; if (other.getSubnetAvailabilityZone() != null && other.getSubnetAvailabilityZone().equals(this.getSubnetAvailabilityZone()) == false) return false; return true; }
/** * <p> * The unique identifier for the subnet. * </p> * * @param subnetIdentifier * The unique identifier for the subnet. * @return Returns a reference to this object so that method calls can be chained together. */ public Subnet withSubnetIdentifier(String subnetIdentifier) { setSubnetIdentifier(subnetIdentifier); return this; }
/** * <p> * The Availability Zone associated with the subnet. * </p> * * @param subnetAvailabilityZone * The Availability Zone associated with the subnet. * @return Returns a reference to this object so that method calls can be chained together. */ public Subnet withSubnetAvailabilityZone(AvailabilityZone subnetAvailabilityZone) { setSubnetAvailabilityZone(subnetAvailabilityZone); 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 (getSubnetIdentifier() != null) sb.append("SubnetIdentifier: ").append(getSubnetIdentifier()).append(","); if (getSubnetAvailabilityZone() != null) sb.append("SubnetAvailabilityZone: ").append(getSubnetAvailabilityZone()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getSubnetIdentifier() == null) ? 0 : getSubnetIdentifier().hashCode()); hashCode = prime * hashCode + ((getSubnetAvailabilityZone() == null) ? 0 : getSubnetAvailabilityZone().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Subnet == false) return false; Subnet other = (Subnet) obj; if (other.getSubnetIdentifier() == null ^ this.getSubnetIdentifier() == null) return false; if (other.getSubnetIdentifier() != null && other.getSubnetIdentifier().equals(this.getSubnetIdentifier()) == false) return false; if (other.getSubnetAvailabilityZone() == null ^ this.getSubnetAvailabilityZone() == null) return false; if (other.getSubnetAvailabilityZone() != null && other.getSubnetAvailabilityZone().equals(this.getSubnetAvailabilityZone()) == 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 (getSubnetIdentifier() != null) sb.append("SubnetIdentifier: ").append(getSubnetIdentifier()).append(","); if (getSubnetAvailabilityZone() != null) sb.append("SubnetAvailabilityZone: ").append(getSubnetAvailabilityZone()); sb.append("}"); return sb.toString(); }