
com.amazonaws.services.databasemigrationservice.model.ModifyEndpointRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-dms Show documentation
/*
* Copyright 2010-2016 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.databasemigrationservice.model;
import java.io.Serializable;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
*/
public class ModifyEndpointRequest extends AmazonWebServiceRequest implements
Serializable, Cloneable {
/**
*
* The Amazon Resource Name (ARN) string that uniquely identifies the
* endpoint.
*
*/
private String endpointArn;
/**
*
* The database endpoint identifier. Identifiers must begin with a letter;
* must contain only ASCII letters, digits, and hyphens; and must not end
* with a hyphen or contain two consecutive hyphens.
*
*/
private String endpointIdentifier;
/**
*
* The type of endpoint.
*
*/
private String endpointType;
/**
*
* The type of engine for the endpoint. Valid values include MYSQL, ORACLE,
* POSTGRES.
*
*/
private String engineName;
/**
*
* The user name to be used to login to the endpoint database.
*
*/
private String username;
/**
*
* The password to be used to login to the endpoint database.
*
*/
private String password;
/**
*
* The name of the server where the endpoint database resides.
*
*/
private String serverName;
/**
*
* The port used by the endpoint database.
*
*/
private Integer port;
/**
*
* The name of the endpoint database.
*
*/
private String databaseName;
/**
*
* Additional attributes associated with the connection.
*
*/
private String extraConnectionAttributes;
/**
*
* The Amazon Resource Name (ARN) string that uniquely identifies the
* endpoint.
*
*
* @param endpointArn
* The Amazon Resource Name (ARN) string that uniquely identifies the
* endpoint.
*/
public void setEndpointArn(String endpointArn) {
this.endpointArn = endpointArn;
}
/**
*
* The Amazon Resource Name (ARN) string that uniquely identifies the
* endpoint.
*
*
* @return The Amazon Resource Name (ARN) string that uniquely identifies
* the endpoint.
*/
public String getEndpointArn() {
return this.endpointArn;
}
/**
*
* The Amazon Resource Name (ARN) string that uniquely identifies the
* endpoint.
*
*
* @param endpointArn
* The Amazon Resource Name (ARN) string that uniquely identifies the
* endpoint.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public ModifyEndpointRequest withEndpointArn(String endpointArn) {
setEndpointArn(endpointArn);
return this;
}
/**
*
* The database endpoint identifier. Identifiers must begin with a letter;
* must contain only ASCII letters, digits, and hyphens; and must not end
* with a hyphen or contain two consecutive hyphens.
*
*
* @param endpointIdentifier
* The database endpoint identifier. Identifiers must begin with a
* letter; must contain only ASCII letters, digits, and hyphens; and
* must not end with a hyphen or contain two consecutive hyphens.
*/
public void setEndpointIdentifier(String endpointIdentifier) {
this.endpointIdentifier = endpointIdentifier;
}
/**
*
* The database endpoint identifier. Identifiers must begin with a letter;
* must contain only ASCII letters, digits, and hyphens; and must not end
* with a hyphen or contain two consecutive hyphens.
*
*
* @return The database endpoint identifier. Identifiers must begin with a
* letter; must contain only ASCII letters, digits, and hyphens; and
* must not end with a hyphen or contain two consecutive hyphens.
*/
public String getEndpointIdentifier() {
return this.endpointIdentifier;
}
/**
*
* The database endpoint identifier. Identifiers must begin with a letter;
* must contain only ASCII letters, digits, and hyphens; and must not end
* with a hyphen or contain two consecutive hyphens.
*
*
* @param endpointIdentifier
* The database endpoint identifier. Identifiers must begin with a
* letter; must contain only ASCII letters, digits, and hyphens; and
* must not end with a hyphen or contain two consecutive hyphens.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public ModifyEndpointRequest withEndpointIdentifier(
String endpointIdentifier) {
setEndpointIdentifier(endpointIdentifier);
return this;
}
/**
*
* The type of endpoint.
*
*
* @param endpointType
* The type of endpoint.
* @see ReplicationEndpointTypeValue
*/
public void setEndpointType(String endpointType) {
this.endpointType = endpointType;
}
/**
*
* The type of endpoint.
*
*
* @return The type of endpoint.
* @see ReplicationEndpointTypeValue
*/
public String getEndpointType() {
return this.endpointType;
}
/**
*
* The type of endpoint.
*
*
* @param endpointType
* The type of endpoint.
* @return Returns a reference to this object so that method calls can be
* chained together.
* @see ReplicationEndpointTypeValue
*/
public ModifyEndpointRequest withEndpointType(String endpointType) {
setEndpointType(endpointType);
return this;
}
/**
*
* The type of endpoint.
*
*
* @param endpointType
* The type of endpoint.
* @see ReplicationEndpointTypeValue
*/
public void setEndpointType(ReplicationEndpointTypeValue endpointType) {
this.endpointType = endpointType.toString();
}
/**
*
* The type of endpoint.
*
*
* @param endpointType
* The type of endpoint.
* @return Returns a reference to this object so that method calls can be
* chained together.
* @see ReplicationEndpointTypeValue
*/
public ModifyEndpointRequest withEndpointType(
ReplicationEndpointTypeValue endpointType) {
setEndpointType(endpointType);
return this;
}
/**
*
* The type of engine for the endpoint. Valid values include MYSQL, ORACLE,
* POSTGRES.
*
*
* @param engineName
* The type of engine for the endpoint. Valid values include MYSQL,
* ORACLE, POSTGRES.
*/
public void setEngineName(String engineName) {
this.engineName = engineName;
}
/**
*
* The type of engine for the endpoint. Valid values include MYSQL, ORACLE,
* POSTGRES.
*
*
* @return The type of engine for the endpoint. Valid values include MYSQL,
* ORACLE, POSTGRES.
*/
public String getEngineName() {
return this.engineName;
}
/**
*
* The type of engine for the endpoint. Valid values include MYSQL, ORACLE,
* POSTGRES.
*
*
* @param engineName
* The type of engine for the endpoint. Valid values include MYSQL,
* ORACLE, POSTGRES.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public ModifyEndpointRequest withEngineName(String engineName) {
setEngineName(engineName);
return this;
}
/**
*
* The user name to be used to login to the endpoint database.
*
*
* @param username
* The user name to be used to login to the endpoint database.
*/
public void setUsername(String username) {
this.username = username;
}
/**
*
* The user name to be used to login to the endpoint database.
*
*
* @return The user name to be used to login to the endpoint database.
*/
public String getUsername() {
return this.username;
}
/**
*
* The user name to be used to login to the endpoint database.
*
*
* @param username
* The user name to be used to login to the endpoint database.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public ModifyEndpointRequest withUsername(String username) {
setUsername(username);
return this;
}
/**
*
* The password to be used to login to the endpoint database.
*
*
* @param password
* The password to be used to login to the endpoint database.
*/
public void setPassword(String password) {
this.password = password;
}
/**
*
* The password to be used to login to the endpoint database.
*
*
* @return The password to be used to login to the endpoint database.
*/
public String getPassword() {
return this.password;
}
/**
*
* The password to be used to login to the endpoint database.
*
*
* @param password
* The password to be used to login to the endpoint database.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public ModifyEndpointRequest withPassword(String password) {
setPassword(password);
return this;
}
/**
*
* The name of the server where the endpoint database resides.
*
*
* @param serverName
* The name of the server where the endpoint database resides.
*/
public void setServerName(String serverName) {
this.serverName = serverName;
}
/**
*
* The name of the server where the endpoint database resides.
*
*
* @return The name of the server where the endpoint database resides.
*/
public String getServerName() {
return this.serverName;
}
/**
*
* The name of the server where the endpoint database resides.
*
*
* @param serverName
* The name of the server where the endpoint database resides.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public ModifyEndpointRequest withServerName(String serverName) {
setServerName(serverName);
return this;
}
/**
*
* The port used by the endpoint database.
*
*
* @param port
* The port used by the endpoint database.
*/
public void setPort(Integer port) {
this.port = port;
}
/**
*
* The port used by the endpoint database.
*
*
* @return The port used by the endpoint database.
*/
public Integer getPort() {
return this.port;
}
/**
*
* The port used by the endpoint database.
*
*
* @param port
* The port used by the endpoint database.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public ModifyEndpointRequest withPort(Integer port) {
setPort(port);
return this;
}
/**
*
* The name of the endpoint database.
*
*
* @param databaseName
* The name of the endpoint database.
*/
public void setDatabaseName(String databaseName) {
this.databaseName = databaseName;
}
/**
*
* The name of the endpoint database.
*
*
* @return The name of the endpoint database.
*/
public String getDatabaseName() {
return this.databaseName;
}
/**
*
* The name of the endpoint database.
*
*
* @param databaseName
* The name of the endpoint database.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public ModifyEndpointRequest withDatabaseName(String databaseName) {
setDatabaseName(databaseName);
return this;
}
/**
*
* Additional attributes associated with the connection.
*
*
* @param extraConnectionAttributes
* Additional attributes associated with the connection.
*/
public void setExtraConnectionAttributes(String extraConnectionAttributes) {
this.extraConnectionAttributes = extraConnectionAttributes;
}
/**
*
* Additional attributes associated with the connection.
*
*
* @return Additional attributes associated with the connection.
*/
public String getExtraConnectionAttributes() {
return this.extraConnectionAttributes;
}
/**
*
* Additional attributes associated with the connection.
*
*
* @param extraConnectionAttributes
* Additional attributes associated with the connection.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public ModifyEndpointRequest withExtraConnectionAttributes(
String extraConnectionAttributes) {
setExtraConnectionAttributes(extraConnectionAttributes);
return this;
}
/**
* 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 (getEndpointArn() != null)
sb.append("EndpointArn: " + getEndpointArn() + ",");
if (getEndpointIdentifier() != null)
sb.append("EndpointIdentifier: " + getEndpointIdentifier() + ",");
if (getEndpointType() != null)
sb.append("EndpointType: " + getEndpointType() + ",");
if (getEngineName() != null)
sb.append("EngineName: " + getEngineName() + ",");
if (getUsername() != null)
sb.append("Username: " + getUsername() + ",");
if (getPassword() != null)
sb.append("Password: " + getPassword() + ",");
if (getServerName() != null)
sb.append("ServerName: " + getServerName() + ",");
if (getPort() != null)
sb.append("Port: " + getPort() + ",");
if (getDatabaseName() != null)
sb.append("DatabaseName: " + getDatabaseName() + ",");
if (getExtraConnectionAttributes() != null)
sb.append("ExtraConnectionAttributes: "
+ getExtraConnectionAttributes());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ModifyEndpointRequest == false)
return false;
ModifyEndpointRequest other = (ModifyEndpointRequest) obj;
if (other.getEndpointArn() == null ^ this.getEndpointArn() == null)
return false;
if (other.getEndpointArn() != null
&& other.getEndpointArn().equals(this.getEndpointArn()) == false)
return false;
if (other.getEndpointIdentifier() == null
^ this.getEndpointIdentifier() == null)
return false;
if (other.getEndpointIdentifier() != null
&& other.getEndpointIdentifier().equals(
this.getEndpointIdentifier()) == false)
return false;
if (other.getEndpointType() == null ^ this.getEndpointType() == null)
return false;
if (other.getEndpointType() != null
&& other.getEndpointType().equals(this.getEndpointType()) == false)
return false;
if (other.getEngineName() == null ^ this.getEngineName() == null)
return false;
if (other.getEngineName() != null
&& other.getEngineName().equals(this.getEngineName()) == false)
return false;
if (other.getUsername() == null ^ this.getUsername() == null)
return false;
if (other.getUsername() != null
&& other.getUsername().equals(this.getUsername()) == false)
return false;
if (other.getPassword() == null ^ this.getPassword() == null)
return false;
if (other.getPassword() != null
&& other.getPassword().equals(this.getPassword()) == false)
return false;
if (other.getServerName() == null ^ this.getServerName() == null)
return false;
if (other.getServerName() != null
&& other.getServerName().equals(this.getServerName()) == false)
return false;
if (other.getPort() == null ^ this.getPort() == null)
return false;
if (other.getPort() != null
&& other.getPort().equals(this.getPort()) == false)
return false;
if (other.getDatabaseName() == null ^ this.getDatabaseName() == null)
return false;
if (other.getDatabaseName() != null
&& other.getDatabaseName().equals(this.getDatabaseName()) == false)
return false;
if (other.getExtraConnectionAttributes() == null
^ this.getExtraConnectionAttributes() == null)
return false;
if (other.getExtraConnectionAttributes() != null
&& other.getExtraConnectionAttributes().equals(
this.getExtraConnectionAttributes()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime
* hashCode
+ ((getEndpointArn() == null) ? 0 : getEndpointArn().hashCode());
hashCode = prime
* hashCode
+ ((getEndpointIdentifier() == null) ? 0
: getEndpointIdentifier().hashCode());
hashCode = prime
* hashCode
+ ((getEndpointType() == null) ? 0 : getEndpointType()
.hashCode());
hashCode = prime * hashCode
+ ((getEngineName() == null) ? 0 : getEngineName().hashCode());
hashCode = prime * hashCode
+ ((getUsername() == null) ? 0 : getUsername().hashCode());
hashCode = prime * hashCode
+ ((getPassword() == null) ? 0 : getPassword().hashCode());
hashCode = prime * hashCode
+ ((getServerName() == null) ? 0 : getServerName().hashCode());
hashCode = prime * hashCode
+ ((getPort() == null) ? 0 : getPort().hashCode());
hashCode = prime
* hashCode
+ ((getDatabaseName() == null) ? 0 : getDatabaseName()
.hashCode());
hashCode = prime
* hashCode
+ ((getExtraConnectionAttributes() == null) ? 0
: getExtraConnectionAttributes().hashCode());
return hashCode;
}
@Override
public ModifyEndpointRequest clone() {
return (ModifyEndpointRequest) super.clone();
}
}