@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(); }
@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; }