/** * <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; }
/** * <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; }
/** * 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; }
/** * <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; }
/** * <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; }
describeSubnetsResult.setSubnets(subnets); return describeSubnetsResult;