@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateInternetGatewayResult == false) return false; CreateInternetGatewayResult other = (CreateInternetGatewayResult) obj; if (other.getInternetGateway() == null ^ this.getInternetGateway() == null) return false; if (other.getInternetGateway() != null && other.getInternetGateway().equals(this.getInternetGateway()) == false) return false; return true; }
/** * <p> * Information about the internet gateway. * </p> * * @param internetGateway * Information about the internet gateway. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateInternetGatewayResult withInternetGateway(InternetGateway internetGateway) { setInternetGateway(internetGateway); return this; }
public CreateInternetGatewayResult unmarshall(StaxUnmarshallerContext context) throws Exception { CreateInternetGatewayResult createInternetGatewayResult = new CreateInternetGatewayResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return createInternetGatewayResult; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("internetGateway", targetDepth)) { createInternetGatewayResult.setInternetGateway(InternetGatewayStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return createInternetGatewayResult; } } } }
public CreateInternetGatewayResult unmarshall(StaxUnmarshallerContext context) throws Exception { CreateInternetGatewayResult createInternetGatewayResult = new CreateInternetGatewayResult(); 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 createInternetGatewayResult; if (xmlEvent == XmlPullParser.START_TAG) { if (context.testExpression("internetGateway", targetDepth)) { createInternetGatewayResult.setInternetGateway(InternetGatewayStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent == XmlPullParser.END_TAG) { if (context.getCurrentDepth() < originalDepth) { return createInternetGatewayResult; } } } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getInternetGateway() == null) ? 0 : getInternetGateway().hashCode()); return hashCode; }
public CreateInternetGatewayResult unmarshall(StaxUnmarshallerContext context) throws Exception { CreateInternetGatewayResult createInternetGatewayResult = new CreateInternetGatewayResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return createInternetGatewayResult; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("internetGateway", targetDepth)) { createInternetGatewayResult.setInternetGateway(InternetGatewayStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return createInternetGatewayResult; } } } }
/** * <p> * Information about the internet gateway. * </p> * * @param internetGateway * Information about the internet gateway. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateInternetGatewayResult withInternetGateway(InternetGateway internetGateway) { setInternetGateway(internetGateway); 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 (getInternetGateway() != null) sb.append("InternetGateway: ").append(getInternetGateway()); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateInternetGatewayResult == false) return false; CreateInternetGatewayResult other = (CreateInternetGatewayResult)obj; if (other.getInternetGateway() == null ^ this.getInternetGateway() == null) return false; if (other.getInternetGateway() != null && other.getInternetGateway().equals(this.getInternetGateway()) == false) return false; return true; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getInternetGateway() == null) ? 0 : getInternetGateway().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 (getInternetGateway() != null) sb.append("InternetGateway: " + getInternetGateway() ); sb.append("}"); return sb.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateInternetGatewayResult == false) return false; CreateInternetGatewayResult other = (CreateInternetGatewayResult) obj; if (other.getInternetGateway() == null ^ this.getInternetGateway() == null) return false; if (other.getInternetGateway() != null && other.getInternetGateway().equals(this.getInternetGateway()) == false) return false; return true; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getInternetGateway() == null) ? 0 : getInternetGateway().hashCode()); return hashCode; }
/** * 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 (getInternetGateway() != null) sb.append("InternetGateway: ").append(getInternetGateway()); sb.append("}"); return sb.toString(); }
/** * Creates an internetGateway and returns the id it was created with. * * @param ec2Client * @return InternetGatewayId */ public String createInternetGateway(AmazonEC2 ec2Client) { String gatewayId = null; CreateInternetGatewayRequest request = new CreateInternetGatewayRequest(); CreateInternetGatewayResult result = ec2Client.createInternetGateway(request); if (result != null && result.getInternetGateway() != null) { gatewayId = result.getInternetGateway().getInternetGatewayId(); } return gatewayId; }