@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getSubnets() == null) ? 0 : getSubnets().hashCode()); return hashCode; }
public DescribeSubnetsResult unmarshall(StaxUnmarshallerContext context) throws Exception { DescribeSubnetsResult describeSubnetsResult = new DescribeSubnetsResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return describeSubnetsResult; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("subnetSet", targetDepth)) { describeSubnetsResult.withSubnets(new ArrayList<Subnet>()); continue; } if (context.testExpression("subnetSet/item", targetDepth)) { describeSubnetsResult.withSubnets(SubnetStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return describeSubnetsResult; } } } }
/** * <p> * Information about one or more subnets. * </p> * * @param subnets * Information about one or more subnets. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeSubnetsResult withSubnets(java.util.Collection<Subnet> subnets) { setSubnets(subnets); return this; }
/** * Information about one or more subnets. * <p> * Returns a reference to this object so that method calls can be chained together. * * @param subnets Information about one or more subnets. * * @return A reference to this updated object so that method calls can be chained * together. */ public DescribeSubnetsResult withSubnets(Subnet... subnets) { if (getSubnets() == null) setSubnets(new java.util.ArrayList<Subnet>(subnets.length)); for (Subnet value : subnets) { getSubnets().add(value); } return this; }
public DescribeSubnetsResult unmarshall(StaxUnmarshallerContext context) throws Exception { DescribeSubnetsResult describeSubnetsResult = new DescribeSubnetsResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { int xmlEvent = context.nextEvent(); if (xmlEvent == XmlPullParser.END_DOCUMENT) return describeSubnetsResult; if (xmlEvent == XmlPullParser.START_TAG) { if (context.testExpression("subnetSet/item", targetDepth)) { describeSubnetsResult.getSubnets().add(SubnetStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent == XmlPullParser.END_TAG) { if (context.getCurrentDepth() < originalDepth) { return describeSubnetsResult; } } } }
DescribeSubnetsResult describeSubnetsResult = new DescribeSubnetsResult(); describeSubnetsResult.setSubnets(subnets); return describeSubnetsResult;
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeSubnetsResult == false) return false; DescribeSubnetsResult other = (DescribeSubnetsResult) obj; if (other.getSubnets() == null ^ this.getSubnets() == null) return false; if (other.getSubnets() != null && other.getSubnets().equals(this.getSubnets()) == false) return false; return true; }
public DescribeSubnetsResult describeSubnets(DescribeSubnetsRequest request) { return new DescribeSubnetsResult() .withSubnets( describe(request, "subnetIds", "subnets", Subnet.class)); }
/** * <p> * Information about one or more subnets. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setSubnets(java.util.Collection)} or {@link #withSubnets(java.util.Collection)} if you want to override * the existing values. * </p> * * @param subnets * Information about one or more subnets. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeSubnetsResult withSubnets(Subnet... subnets) { if (this.subnets == null) { setSubnets(new com.amazonaws.internal.SdkInternalList<Subnet>(subnets.length)); } for (Subnet ele : subnets) { this.subnets.add(ele); } 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 (getSubnets() != null) sb.append("Subnets: ").append(getSubnets()); sb.append("}"); return sb.toString(); }
public DescribeSubnetsResult describeSubnets(DescribeSubnetsRequest request) { return new DescribeSubnetsResult().withSubnets(describe(request, "subnetIds", "subnets", Subnet.class, new TypeReference<List<Subnet>>() { })); }
/** * <p> * Information about one or more subnets. * </p> * * @param subnets * Information about one or more subnets. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeSubnetsResult withSubnets(java.util.Collection<Subnet> subnets) { setSubnets(subnets); return this; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeSubnetsResult == false) return false; DescribeSubnetsResult other = (DescribeSubnetsResult)obj; if (other.getSubnets() == null ^ this.getSubnets() == null) return false; if (other.getSubnets() != null && other.getSubnets().equals(this.getSubnets()) == false) return false; return true; }
public DescribeSubnetsResult unmarshall(StaxUnmarshallerContext context) throws Exception { DescribeSubnetsResult describeSubnetsResult = new DescribeSubnetsResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return describeSubnetsResult; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("subnetSet", targetDepth)) { describeSubnetsResult.withSubnets(new ArrayList<Subnet>()); continue; } if (context.testExpression("subnetSet/item", targetDepth)) { describeSubnetsResult.withSubnets(SubnetStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return describeSubnetsResult; } } } }
/** * <p> * Information about one or more subnets. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setSubnets(java.util.Collection)} or {@link #withSubnets(java.util.Collection)} if you want to override * the existing values. * </p> * * @param subnets * Information about one or more subnets. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeSubnetsResult withSubnets(Subnet... subnets) { if (this.subnets == null) { setSubnets(new com.amazonaws.internal.SdkInternalList<Subnet>(subnets.length)); } for (Subnet ele : subnets) { this.subnets.add(ele); } return this; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getSubnets() == null) ? 0 : getSubnets().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 (getSubnets() != null) sb.append("Subnets: " + getSubnets() ); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getSubnets() == null) ? 0 : getSubnets().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeSubnetsResult == false) return false; DescribeSubnetsResult other = (DescribeSubnetsResult) obj; if (other.getSubnets() == null ^ this.getSubnets() == null) return false; if (other.getSubnets() != null && other.getSubnets().equals(this.getSubnets()) == 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 (getSubnets() != null) sb.append("Subnets: ").append(getSubnets()); sb.append("}"); return sb.toString(); }