com.amazonaws.services.appsync.model.RelationalDatabaseDataSourceConfig Maven / Gradle / Ivy
Show all versions of aws-java-sdk-appsync Show documentation
/*
* 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.appsync.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Describes a relational database data source configuration.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class RelationalDatabaseDataSourceConfig implements Serializable, Cloneable, StructuredPojo {
/**
*
* Source type for the relational database.
*
*
* -
*
* RDS_HTTP_ENDPOINT: The relational database source type is an Amazon Relational Database Service (Amazon
* RDS) HTTP endpoint.
*
*
*
*/
private String relationalDatabaseSourceType;
/**
*
* Amazon RDS HTTP endpoint settings.
*
*/
private RdsHttpEndpointConfig rdsHttpEndpointConfig;
/**
*
* Source type for the relational database.
*
*
* -
*
* RDS_HTTP_ENDPOINT: The relational database source type is an Amazon Relational Database Service (Amazon
* RDS) HTTP endpoint.
*
*
*
*
* @param relationalDatabaseSourceType
* Source type for the relational database.
*
* -
*
* RDS_HTTP_ENDPOINT: The relational database source type is an Amazon Relational Database Service
* (Amazon RDS) HTTP endpoint.
*
*
* @see RelationalDatabaseSourceType
*/
public void setRelationalDatabaseSourceType(String relationalDatabaseSourceType) {
this.relationalDatabaseSourceType = relationalDatabaseSourceType;
}
/**
*
* Source type for the relational database.
*
*
* -
*
* RDS_HTTP_ENDPOINT: The relational database source type is an Amazon Relational Database Service (Amazon
* RDS) HTTP endpoint.
*
*
*
*
* @return Source type for the relational database.
*
* -
*
* RDS_HTTP_ENDPOINT: The relational database source type is an Amazon Relational Database Service
* (Amazon RDS) HTTP endpoint.
*
*
* @see RelationalDatabaseSourceType
*/
public String getRelationalDatabaseSourceType() {
return this.relationalDatabaseSourceType;
}
/**
*
* Source type for the relational database.
*
*
* -
*
* RDS_HTTP_ENDPOINT: The relational database source type is an Amazon Relational Database Service (Amazon
* RDS) HTTP endpoint.
*
*
*
*
* @param relationalDatabaseSourceType
* Source type for the relational database.
*
* -
*
* RDS_HTTP_ENDPOINT: The relational database source type is an Amazon Relational Database Service
* (Amazon RDS) HTTP endpoint.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see RelationalDatabaseSourceType
*/
public RelationalDatabaseDataSourceConfig withRelationalDatabaseSourceType(String relationalDatabaseSourceType) {
setRelationalDatabaseSourceType(relationalDatabaseSourceType);
return this;
}
/**
*
* Source type for the relational database.
*
*
* -
*
* RDS_HTTP_ENDPOINT: The relational database source type is an Amazon Relational Database Service (Amazon
* RDS) HTTP endpoint.
*
*
*
*
* @param relationalDatabaseSourceType
* Source type for the relational database.
*
* -
*
* RDS_HTTP_ENDPOINT: The relational database source type is an Amazon Relational Database Service
* (Amazon RDS) HTTP endpoint.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see RelationalDatabaseSourceType
*/
public RelationalDatabaseDataSourceConfig withRelationalDatabaseSourceType(RelationalDatabaseSourceType relationalDatabaseSourceType) {
this.relationalDatabaseSourceType = relationalDatabaseSourceType.toString();
return this;
}
/**
*
* Amazon RDS HTTP endpoint settings.
*
*
* @param rdsHttpEndpointConfig
* Amazon RDS HTTP endpoint settings.
*/
public void setRdsHttpEndpointConfig(RdsHttpEndpointConfig rdsHttpEndpointConfig) {
this.rdsHttpEndpointConfig = rdsHttpEndpointConfig;
}
/**
*
* Amazon RDS HTTP endpoint settings.
*
*
* @return Amazon RDS HTTP endpoint settings.
*/
public RdsHttpEndpointConfig getRdsHttpEndpointConfig() {
return this.rdsHttpEndpointConfig;
}
/**
*
* Amazon RDS HTTP endpoint settings.
*
*
* @param rdsHttpEndpointConfig
* Amazon RDS HTTP endpoint settings.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RelationalDatabaseDataSourceConfig withRdsHttpEndpointConfig(RdsHttpEndpointConfig rdsHttpEndpointConfig) {
setRdsHttpEndpointConfig(rdsHttpEndpointConfig);
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 (getRelationalDatabaseSourceType() != null)
sb.append("RelationalDatabaseSourceType: ").append(getRelationalDatabaseSourceType()).append(",");
if (getRdsHttpEndpointConfig() != null)
sb.append("RdsHttpEndpointConfig: ").append(getRdsHttpEndpointConfig());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof RelationalDatabaseDataSourceConfig == false)
return false;
RelationalDatabaseDataSourceConfig other = (RelationalDatabaseDataSourceConfig) obj;
if (other.getRelationalDatabaseSourceType() == null ^ this.getRelationalDatabaseSourceType() == null)
return false;
if (other.getRelationalDatabaseSourceType() != null && other.getRelationalDatabaseSourceType().equals(this.getRelationalDatabaseSourceType()) == false)
return false;
if (other.getRdsHttpEndpointConfig() == null ^ this.getRdsHttpEndpointConfig() == null)
return false;
if (other.getRdsHttpEndpointConfig() != null && other.getRdsHttpEndpointConfig().equals(this.getRdsHttpEndpointConfig()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getRelationalDatabaseSourceType() == null) ? 0 : getRelationalDatabaseSourceType().hashCode());
hashCode = prime * hashCode + ((getRdsHttpEndpointConfig() == null) ? 0 : getRdsHttpEndpointConfig().hashCode());
return hashCode;
}
@Override
public RelationalDatabaseDataSourceConfig clone() {
try {
return (RelationalDatabaseDataSourceConfig) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.appsync.model.transform.RelationalDatabaseDataSourceConfigMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}