@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDhcpConfigurations() == null) ? 0 : getDhcpConfigurations().hashCode()); hashCode = prime * hashCode + ((getDhcpOptionsId() == null) ? 0 : getDhcpOptionsId().hashCode()); hashCode = prime * hashCode + ((getOwnerId() == null) ? 0 : getOwnerId().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); return hashCode; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDhcpOptions() == null) ? 0 : getDhcpOptions().hashCode()); return hashCode; }
/** * <p> * One or more DHCP options in the set. * </p> * * @param dhcpConfigurations * One or more DHCP options in the set. * @return Returns a reference to this object so that method calls can be chained together. */ public DhcpOptions withDhcpConfigurations(java.util.Collection<DhcpConfiguration> dhcpConfigurations) { setDhcpConfigurations(dhcpConfigurations); return this; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DhcpOptions == false) return false; DhcpOptions other = (DhcpOptions)obj; if (other.getDhcpOptionsId() == null ^ this.getDhcpOptionsId() == null) return false; if (other.getDhcpOptionsId() != null && other.getDhcpOptionsId().equals(this.getDhcpOptionsId()) == false) return false; if (other.getDhcpConfigurations() == null ^ this.getDhcpConfigurations() == null) return false; if (other.getDhcpConfigurations() != null && other.getDhcpConfigurations().equals(this.getDhcpConfigurations()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; return true; }
public DhcpOptions unmarshall(StaxUnmarshallerContext context) throws Exception { DhcpOptions dhcpOptions = new DhcpOptions(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; dhcpOptions.withDhcpConfigurations(new ArrayList<DhcpConfiguration>()); continue; dhcpOptions.withDhcpConfigurations(DhcpConfigurationStaxUnmarshaller.getInstance().unmarshall(context)); continue; dhcpOptions.setDhcpOptionsId(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; dhcpOptions.setOwnerId(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; dhcpOptions.withTags(new ArrayList<Tag>()); continue; dhcpOptions.withTags(TagStaxUnmarshaller.getInstance().unmarshall(context)); continue;
public DhcpOptions unmarshall(StaxUnmarshallerContext context) throws Exception { DhcpOptions dhcpOptions = new DhcpOptions(); 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 dhcpOptions; if (xmlEvent == XmlPullParser.START_TAG) { if (context.testExpression("dhcpOptionsId", targetDepth)) { dhcpOptions.setDhcpOptionsId(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("dhcpConfigurationSet/item", targetDepth)) { dhcpOptions.getDhcpConfigurations().add(DhcpConfigurationStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("tagSet/item", targetDepth)) { dhcpOptions.getTags().add(TagStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent == XmlPullParser.END_TAG) { if (context.getCurrentDepth() < originalDepth) { return dhcpOptions; } } } }
/** * One or more DHCP options in the set. * <p> * Returns a reference to this object so that method calls can be chained together. * * @param dhcpConfigurations One or more DHCP options in the set. * * @return A reference to this updated object so that method calls can be chained * together. */ public DhcpOptions withDhcpConfigurations(DhcpConfiguration... dhcpConfigurations) { if (getDhcpConfigurations() == null) setDhcpConfigurations(new java.util.ArrayList<DhcpConfiguration>(dhcpConfigurations.length)); for (DhcpConfiguration value : dhcpConfigurations) { getDhcpConfigurations().add(value); } return this; }
/** * Any tags assigned to the DHCP options set. * <p> * Returns a reference to this object so that method calls can be chained together. * * @param tags Any tags assigned to the DHCP options set. * * @return A reference to this updated object so that method calls can be chained * together. */ public DhcpOptions withTags(Tag... tags) { if (getTags() == null) setTags(new java.util.ArrayList<Tag>(tags.length)); for (Tag value : tags) { getTags().add(value); } return this; }
/** * <p> * Any tags assigned to the DHCP options set. * </p> * * @param tags * Any tags assigned to the DHCP options set. * @return Returns a reference to this object so that method calls can be chained together. */ public DhcpOptions withTags(java.util.Collection<Tag> tags) { setTags(tags); return this; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateDhcpOptionsResult == false) return false; CreateDhcpOptionsResult other = (CreateDhcpOptionsResult) obj; if (other.getDhcpOptions() == null ^ this.getDhcpOptions() == null) return false; if (other.getDhcpOptions() != null && other.getDhcpOptions().equals(this.getDhcpOptions()) == false) return false; return true; }
/** * <p> * The ID of the set of DHCP options. * </p> * * @param dhcpOptionsId * The ID of the set of DHCP options. * @return Returns a reference to this object so that method calls can be chained together. */ public DhcpOptions withDhcpOptionsId(String dhcpOptionsId) { setDhcpOptionsId(dhcpOptionsId); return this; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDhcpOptionsId() == null) ? 0 : getDhcpOptionsId().hashCode()); hashCode = prime * hashCode + ((getDhcpConfigurations() == null) ? 0 : getDhcpConfigurations().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); return hashCode; }
public DhcpOptions unmarshall(StaxUnmarshallerContext context) throws Exception { DhcpOptions dhcpOptions = new DhcpOptions(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; dhcpOptions.withDhcpConfigurations(new ArrayList<DhcpConfiguration>()); continue; dhcpOptions.withDhcpConfigurations(DhcpConfigurationStaxUnmarshaller.getInstance().unmarshall(context)); continue; dhcpOptions.setDhcpOptionsId(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; dhcpOptions.setOwnerId(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; dhcpOptions.withTags(new ArrayList<Tag>()); continue; dhcpOptions.withTags(TagStaxUnmarshaller.getInstance().unmarshall(context)); continue;
/** * <p> * Any tags assigned to the DHCP options set. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the * existing values. * </p> * * @param tags * Any tags assigned to the DHCP options set. * @return Returns a reference to this object so that method calls can be chained together. */ public DhcpOptions withTags(Tag... tags) { if (this.tags == null) { setTags(new com.amazonaws.internal.SdkInternalList<Tag>(tags.length)); } for (Tag ele : tags) { this.tags.add(ele); } return this; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateDhcpOptionsResult == false) return false; CreateDhcpOptionsResult other = (CreateDhcpOptionsResult)obj; if (other.getDhcpOptions() == null ^ this.getDhcpOptions() == null) return false; if (other.getDhcpOptions() != null && other.getDhcpOptions().equals(this.getDhcpOptions()) == false) return false; return true; }
/** * <p> * The ID of the set of DHCP options. * </p> * * @param dhcpOptionsId * The ID of the set of DHCP options. * @return Returns a reference to this object so that method calls can be chained together. */ public DhcpOptions withDhcpOptionsId(String dhcpOptionsId) { setDhcpOptionsId(dhcpOptionsId); return this; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DhcpOptions == false) return false; DhcpOptions other = (DhcpOptions) obj; if (other.getDhcpConfigurations() == null ^ this.getDhcpConfigurations() == null) return false; if (other.getDhcpConfigurations() != null && other.getDhcpConfigurations().equals(this.getDhcpConfigurations()) == false) return false; if (other.getDhcpOptionsId() == null ^ this.getDhcpOptionsId() == null) return false; if (other.getDhcpOptionsId() != null && other.getDhcpOptionsId().equals(this.getDhcpOptionsId()) == false) return false; if (other.getOwnerId() == null ^ this.getOwnerId() == null) return false; if (other.getOwnerId() != null && other.getOwnerId().equals(this.getOwnerId()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; return true; }
/** * 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 (getDhcpOptionsId() != null) sb.append("DhcpOptionsId: " + getDhcpOptionsId() + ","); if (getDhcpConfigurations() != null) sb.append("DhcpConfigurations: " + getDhcpConfigurations() + ","); if (getTags() != null) sb.append("Tags: " + getTags() ); sb.append("}"); return sb.toString(); }
/** * <p> * One or more DHCP options in the set. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setDhcpConfigurations(java.util.Collection)} or {@link #withDhcpConfigurations(java.util.Collection)} if * you want to override the existing values. * </p> * * @param dhcpConfigurations * One or more DHCP options in the set. * @return Returns a reference to this object so that method calls can be chained together. */ public DhcpOptions withDhcpConfigurations(DhcpConfiguration... dhcpConfigurations) { if (this.dhcpConfigurations == null) { setDhcpConfigurations(new com.amazonaws.internal.SdkInternalList<DhcpConfiguration>(dhcpConfigurations.length)); } for (DhcpConfiguration ele : dhcpConfigurations) { this.dhcpConfigurations.add(ele); } return this; }
/** * <p> * Any tags assigned to the DHCP options set. * </p> * * @param tags * Any tags assigned to the DHCP options set. * @return Returns a reference to this object so that method calls can be chained together. */ public DhcpOptions withTags(java.util.Collection<Tag> tags) { setTags(tags); return this; }