
com.amazonaws.services.rds.model.VpnDetails Maven / Gradle / Ivy
/*
* Copyright 2016-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.rds.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* Information about the virtual private network (VPN) between the VMware vSphere cluster and the Amazon Web Services
* website.
*
*
* For more information about RDS on VMware, see the RDS on VMware User
* Guide.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class VpnDetails implements Serializable, Cloneable {
/**
*
* The ID of the VPN.
*
*/
private String vpnId;
/**
*
* The IP address of network traffic from your on-premises data center. A custom AZ receives the network traffic.
*
*/
private String vpnTunnelOriginatorIP;
/**
*
* The IP address of network traffic from Amazon Web Services to your on-premises data center.
*
*/
private String vpnGatewayIp;
/**
*
* The preshared key (PSK) for the VPN.
*
*/
private String vpnPSK;
/**
*
* The name of the VPN.
*
*/
private String vpnName;
/**
*
* The state of the VPN.
*
*/
private String vpnState;
/**
*
* The ID of the VPN.
*
*
* @param vpnId
* The ID of the VPN.
*/
public void setVpnId(String vpnId) {
this.vpnId = vpnId;
}
/**
*
* The ID of the VPN.
*
*
* @return The ID of the VPN.
*/
public String getVpnId() {
return this.vpnId;
}
/**
*
* The ID of the VPN.
*
*
* @param vpnId
* The ID of the VPN.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public VpnDetails withVpnId(String vpnId) {
setVpnId(vpnId);
return this;
}
/**
*
* The IP address of network traffic from your on-premises data center. A custom AZ receives the network traffic.
*
*
* @param vpnTunnelOriginatorIP
* The IP address of network traffic from your on-premises data center. A custom AZ receives the network
* traffic.
*/
public void setVpnTunnelOriginatorIP(String vpnTunnelOriginatorIP) {
this.vpnTunnelOriginatorIP = vpnTunnelOriginatorIP;
}
/**
*
* The IP address of network traffic from your on-premises data center. A custom AZ receives the network traffic.
*
*
* @return The IP address of network traffic from your on-premises data center. A custom AZ receives the network
* traffic.
*/
public String getVpnTunnelOriginatorIP() {
return this.vpnTunnelOriginatorIP;
}
/**
*
* The IP address of network traffic from your on-premises data center. A custom AZ receives the network traffic.
*
*
* @param vpnTunnelOriginatorIP
* The IP address of network traffic from your on-premises data center. A custom AZ receives the network
* traffic.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public VpnDetails withVpnTunnelOriginatorIP(String vpnTunnelOriginatorIP) {
setVpnTunnelOriginatorIP(vpnTunnelOriginatorIP);
return this;
}
/**
*
* The IP address of network traffic from Amazon Web Services to your on-premises data center.
*
*
* @param vpnGatewayIp
* The IP address of network traffic from Amazon Web Services to your on-premises data center.
*/
public void setVpnGatewayIp(String vpnGatewayIp) {
this.vpnGatewayIp = vpnGatewayIp;
}
/**
*
* The IP address of network traffic from Amazon Web Services to your on-premises data center.
*
*
* @return The IP address of network traffic from Amazon Web Services to your on-premises data center.
*/
public String getVpnGatewayIp() {
return this.vpnGatewayIp;
}
/**
*
* The IP address of network traffic from Amazon Web Services to your on-premises data center.
*
*
* @param vpnGatewayIp
* The IP address of network traffic from Amazon Web Services to your on-premises data center.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public VpnDetails withVpnGatewayIp(String vpnGatewayIp) {
setVpnGatewayIp(vpnGatewayIp);
return this;
}
/**
*
* The preshared key (PSK) for the VPN.
*
*
* @param vpnPSK
* The preshared key (PSK) for the VPN.
*/
public void setVpnPSK(String vpnPSK) {
this.vpnPSK = vpnPSK;
}
/**
*
* The preshared key (PSK) for the VPN.
*
*
* @return The preshared key (PSK) for the VPN.
*/
public String getVpnPSK() {
return this.vpnPSK;
}
/**
*
* The preshared key (PSK) for the VPN.
*
*
* @param vpnPSK
* The preshared key (PSK) for the VPN.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public VpnDetails withVpnPSK(String vpnPSK) {
setVpnPSK(vpnPSK);
return this;
}
/**
*
* The name of the VPN.
*
*
* @param vpnName
* The name of the VPN.
*/
public void setVpnName(String vpnName) {
this.vpnName = vpnName;
}
/**
*
* The name of the VPN.
*
*
* @return The name of the VPN.
*/
public String getVpnName() {
return this.vpnName;
}
/**
*
* The name of the VPN.
*
*
* @param vpnName
* The name of the VPN.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public VpnDetails withVpnName(String vpnName) {
setVpnName(vpnName);
return this;
}
/**
*
* The state of the VPN.
*
*
* @param vpnState
* The state of the VPN.
*/
public void setVpnState(String vpnState) {
this.vpnState = vpnState;
}
/**
*
* The state of the VPN.
*
*
* @return The state of the VPN.
*/
public String getVpnState() {
return this.vpnState;
}
/**
*
* The state of the VPN.
*
*
* @param vpnState
* The state of the VPN.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public VpnDetails withVpnState(String vpnState) {
setVpnState(vpnState);
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 (getVpnId() != null)
sb.append("VpnId: ").append(getVpnId()).append(",");
if (getVpnTunnelOriginatorIP() != null)
sb.append("VpnTunnelOriginatorIP: ").append(getVpnTunnelOriginatorIP()).append(",");
if (getVpnGatewayIp() != null)
sb.append("VpnGatewayIp: ").append(getVpnGatewayIp()).append(",");
if (getVpnPSK() != null)
sb.append("VpnPSK: ").append("***Sensitive Data Redacted***").append(",");
if (getVpnName() != null)
sb.append("VpnName: ").append(getVpnName()).append(",");
if (getVpnState() != null)
sb.append("VpnState: ").append(getVpnState());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof VpnDetails == false)
return false;
VpnDetails other = (VpnDetails) obj;
if (other.getVpnId() == null ^ this.getVpnId() == null)
return false;
if (other.getVpnId() != null && other.getVpnId().equals(this.getVpnId()) == false)
return false;
if (other.getVpnTunnelOriginatorIP() == null ^ this.getVpnTunnelOriginatorIP() == null)
return false;
if (other.getVpnTunnelOriginatorIP() != null && other.getVpnTunnelOriginatorIP().equals(this.getVpnTunnelOriginatorIP()) == false)
return false;
if (other.getVpnGatewayIp() == null ^ this.getVpnGatewayIp() == null)
return false;
if (other.getVpnGatewayIp() != null && other.getVpnGatewayIp().equals(this.getVpnGatewayIp()) == false)
return false;
if (other.getVpnPSK() == null ^ this.getVpnPSK() == null)
return false;
if (other.getVpnPSK() != null && other.getVpnPSK().equals(this.getVpnPSK()) == false)
return false;
if (other.getVpnName() == null ^ this.getVpnName() == null)
return false;
if (other.getVpnName() != null && other.getVpnName().equals(this.getVpnName()) == false)
return false;
if (other.getVpnState() == null ^ this.getVpnState() == null)
return false;
if (other.getVpnState() != null && other.getVpnState().equals(this.getVpnState()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getVpnId() == null) ? 0 : getVpnId().hashCode());
hashCode = prime * hashCode + ((getVpnTunnelOriginatorIP() == null) ? 0 : getVpnTunnelOriginatorIP().hashCode());
hashCode = prime * hashCode + ((getVpnGatewayIp() == null) ? 0 : getVpnGatewayIp().hashCode());
hashCode = prime * hashCode + ((getVpnPSK() == null) ? 0 : getVpnPSK().hashCode());
hashCode = prime * hashCode + ((getVpnName() == null) ? 0 : getVpnName().hashCode());
hashCode = prime * hashCode + ((getVpnState() == null) ? 0 : getVpnState().hashCode());
return hashCode;
}
@Override
public VpnDetails clone() {
try {
return (VpnDetails) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}