com.amazonaws.services.databasemigrationservice.model.CreateDataProviderRequest Maven / Gradle / Ivy
/*
* Copyright 2019-2024 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 javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreateDataProviderRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* A user-friendly name for the data provider.
*
*/
private String dataProviderName;
/**
*
* A user-friendly description of the data provider.
*
*/
private String description;
/**
*
* The type of database engine for the data provider. Valid values include "aurora"
,
* "aurora-postgresql"
, "mysql"
, "oracle"
, "postgres"
,
* "sqlserver"
, redshift
, mariadb
, mongodb
, and
* docdb
. A value of "aurora"
represents Amazon Aurora MySQL-Compatible Edition.
*
*/
private String engine;
/**
*
* The settings in JSON format for a data provider.
*
*/
private DataProviderSettings settings;
/**
*
* One or more tags to be assigned to the data provider.
*
*/
private java.util.List tags;
/**
*
* A user-friendly name for the data provider.
*
*
* @param dataProviderName
* A user-friendly name for the data provider.
*/
public void setDataProviderName(String dataProviderName) {
this.dataProviderName = dataProviderName;
}
/**
*
* A user-friendly name for the data provider.
*
*
* @return A user-friendly name for the data provider.
*/
public String getDataProviderName() {
return this.dataProviderName;
}
/**
*
* A user-friendly name for the data provider.
*
*
* @param dataProviderName
* A user-friendly name for the data provider.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDataProviderRequest withDataProviderName(String dataProviderName) {
setDataProviderName(dataProviderName);
return this;
}
/**
*
* A user-friendly description of the data provider.
*
*
* @param description
* A user-friendly description of the data provider.
*/
public void setDescription(String description) {
this.description = description;
}
/**
*
* A user-friendly description of the data provider.
*
*
* @return A user-friendly description of the data provider.
*/
public String getDescription() {
return this.description;
}
/**
*
* A user-friendly description of the data provider.
*
*
* @param description
* A user-friendly description of the data provider.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDataProviderRequest withDescription(String description) {
setDescription(description);
return this;
}
/**
*
* The type of database engine for the data provider. Valid values include "aurora"
,
* "aurora-postgresql"
, "mysql"
, "oracle"
, "postgres"
,
* "sqlserver"
, redshift
, mariadb
, mongodb
, and
* docdb
. A value of "aurora"
represents Amazon Aurora MySQL-Compatible Edition.
*
*
* @param engine
* The type of database engine for the data provider. Valid values include "aurora"
,
* "aurora-postgresql"
, "mysql"
, "oracle"
, "postgres"
,
* "sqlserver"
, redshift
, mariadb
, mongodb
, and
* docdb
. A value of "aurora"
represents Amazon Aurora MySQL-Compatible Edition.
*/
public void setEngine(String engine) {
this.engine = engine;
}
/**
*
* The type of database engine for the data provider. Valid values include "aurora"
,
* "aurora-postgresql"
, "mysql"
, "oracle"
, "postgres"
,
* "sqlserver"
, redshift
, mariadb
, mongodb
, and
* docdb
. A value of "aurora"
represents Amazon Aurora MySQL-Compatible Edition.
*
*
* @return The type of database engine for the data provider. Valid values include "aurora"
,
* "aurora-postgresql"
, "mysql"
, "oracle"
, "postgres"
,
* "sqlserver"
, redshift
, mariadb
, mongodb
, and
* docdb
. A value of "aurora"
represents Amazon Aurora MySQL-Compatible Edition.
*/
public String getEngine() {
return this.engine;
}
/**
*
* The type of database engine for the data provider. Valid values include "aurora"
,
* "aurora-postgresql"
, "mysql"
, "oracle"
, "postgres"
,
* "sqlserver"
, redshift
, mariadb
, mongodb
, and
* docdb
. A value of "aurora"
represents Amazon Aurora MySQL-Compatible Edition.
*
*
* @param engine
* The type of database engine for the data provider. Valid values include "aurora"
,
* "aurora-postgresql"
, "mysql"
, "oracle"
, "postgres"
,
* "sqlserver"
, redshift
, mariadb
, mongodb
, and
* docdb
. A value of "aurora"
represents Amazon Aurora MySQL-Compatible Edition.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDataProviderRequest withEngine(String engine) {
setEngine(engine);
return this;
}
/**
*
* The settings in JSON format for a data provider.
*
*
* @param settings
* The settings in JSON format for a data provider.
*/
public void setSettings(DataProviderSettings settings) {
this.settings = settings;
}
/**
*
* The settings in JSON format for a data provider.
*
*
* @return The settings in JSON format for a data provider.
*/
public DataProviderSettings getSettings() {
return this.settings;
}
/**
*
* The settings in JSON format for a data provider.
*
*
* @param settings
* The settings in JSON format for a data provider.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDataProviderRequest withSettings(DataProviderSettings settings) {
setSettings(settings);
return this;
}
/**
*
* One or more tags to be assigned to the data provider.
*
*
* @return One or more tags to be assigned to the data provider.
*/
public java.util.List getTags() {
return tags;
}
/**
*
* One or more tags to be assigned to the data provider.
*
*
* @param tags
* One or more tags to be assigned to the data provider.
*/
public void setTags(java.util.Collection tags) {
if (tags == null) {
this.tags = null;
return;
}
this.tags = new java.util.ArrayList(tags);
}
/**
*
* One or more tags to be assigned to the data provider.
*
*
* NOTE: 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.
*
*
* @param tags
* One or more tags to be assigned to the data provider.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDataProviderRequest withTags(Tag... tags) {
if (this.tags == null) {
setTags(new java.util.ArrayList(tags.length));
}
for (Tag ele : tags) {
this.tags.add(ele);
}
return this;
}
/**
*
* One or more tags to be assigned to the data provider.
*
*
* @param tags
* One or more tags to be assigned to the data provider.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDataProviderRequest withTags(java.util.Collection tags) {
setTags(tags);
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 (getDataProviderName() != null)
sb.append("DataProviderName: ").append(getDataProviderName()).append(",");
if (getDescription() != null)
sb.append("Description: ").append(getDescription()).append(",");
if (getEngine() != null)
sb.append("Engine: ").append(getEngine()).append(",");
if (getSettings() != null)
sb.append("Settings: ").append(getSettings()).append(",");
if (getTags() != null)
sb.append("Tags: ").append(getTags());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CreateDataProviderRequest == false)
return false;
CreateDataProviderRequest other = (CreateDataProviderRequest) obj;
if (other.getDataProviderName() == null ^ this.getDataProviderName() == null)
return false;
if (other.getDataProviderName() != null && other.getDataProviderName().equals(this.getDataProviderName()) == false)
return false;
if (other.getDescription() == null ^ this.getDescription() == null)
return false;
if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false)
return false;
if (other.getEngine() == null ^ this.getEngine() == null)
return false;
if (other.getEngine() != null && other.getEngine().equals(this.getEngine()) == false)
return false;
if (other.getSettings() == null ^ this.getSettings() == null)
return false;
if (other.getSettings() != null && other.getSettings().equals(this.getSettings()) == 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;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getDataProviderName() == null) ? 0 : getDataProviderName().hashCode());
hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode());
hashCode = prime * hashCode + ((getEngine() == null) ? 0 : getEngine().hashCode());
hashCode = prime * hashCode + ((getSettings() == null) ? 0 : getSettings().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
return hashCode;
}
@Override
public CreateDataProviderRequest clone() {
return (CreateDataProviderRequest) super.clone();
}
}