com.amazonaws.services.appsync.model.DynamodbDataSourceConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws-java-sdk-appsync Show documentation
Show all versions of aws-java-sdk-appsync Show documentation
The AWS Java SDK for AWS AppSync module holds the client classes that are used for communicating with AWS AppSync Service
/*
* Copyright 2012-2017 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 DynamoDB data source configuration.
*
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class DynamodbDataSourceConfig implements Serializable, Cloneable, StructuredPojo {
/**
*
* The table name.
*
*/
private String tableName;
/**
*
* The AWS region.
*
*/
private String awsRegion;
/**
*
* Set to TRUE to use Amazon Cognito credentials with this data source.
*
*/
private Boolean useCallerCredentials;
/**
*
* The table name.
*
*
* @param tableName
* The table name.
*/
public void setTableName(String tableName) {
this.tableName = tableName;
}
/**
*
* The table name.
*
*
* @return The table name.
*/
public String getTableName() {
return this.tableName;
}
/**
*
* The table name.
*
*
* @param tableName
* The table name.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DynamodbDataSourceConfig withTableName(String tableName) {
setTableName(tableName);
return this;
}
/**
*
* The AWS region.
*
*
* @param awsRegion
* The AWS region.
*/
public void setAwsRegion(String awsRegion) {
this.awsRegion = awsRegion;
}
/**
*
* The AWS region.
*
*
* @return The AWS region.
*/
public String getAwsRegion() {
return this.awsRegion;
}
/**
*
* The AWS region.
*
*
* @param awsRegion
* The AWS region.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DynamodbDataSourceConfig withAwsRegion(String awsRegion) {
setAwsRegion(awsRegion);
return this;
}
/**
*
* Set to TRUE to use Amazon Cognito credentials with this data source.
*
*
* @param useCallerCredentials
* Set to TRUE to use Amazon Cognito credentials with this data source.
*/
public void setUseCallerCredentials(Boolean useCallerCredentials) {
this.useCallerCredentials = useCallerCredentials;
}
/**
*
* Set to TRUE to use Amazon Cognito credentials with this data source.
*
*
* @return Set to TRUE to use Amazon Cognito credentials with this data source.
*/
public Boolean getUseCallerCredentials() {
return this.useCallerCredentials;
}
/**
*
* Set to TRUE to use Amazon Cognito credentials with this data source.
*
*
* @param useCallerCredentials
* Set to TRUE to use Amazon Cognito credentials with this data source.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DynamodbDataSourceConfig withUseCallerCredentials(Boolean useCallerCredentials) {
setUseCallerCredentials(useCallerCredentials);
return this;
}
/**
*
* Set to TRUE to use Amazon Cognito credentials with this data source.
*
*
* @return Set to TRUE to use Amazon Cognito credentials with this data source.
*/
public Boolean isUseCallerCredentials() {
return this.useCallerCredentials;
}
/**
* 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 (getTableName() != null)
sb.append("TableName: ").append(getTableName()).append(",");
if (getAwsRegion() != null)
sb.append("AwsRegion: ").append(getAwsRegion()).append(",");
if (getUseCallerCredentials() != null)
sb.append("UseCallerCredentials: ").append(getUseCallerCredentials());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof DynamodbDataSourceConfig == false)
return false;
DynamodbDataSourceConfig other = (DynamodbDataSourceConfig) obj;
if (other.getTableName() == null ^ this.getTableName() == null)
return false;
if (other.getTableName() != null && other.getTableName().equals(this.getTableName()) == false)
return false;
if (other.getAwsRegion() == null ^ this.getAwsRegion() == null)
return false;
if (other.getAwsRegion() != null && other.getAwsRegion().equals(this.getAwsRegion()) == false)
return false;
if (other.getUseCallerCredentials() == null ^ this.getUseCallerCredentials() == null)
return false;
if (other.getUseCallerCredentials() != null && other.getUseCallerCredentials().equals(this.getUseCallerCredentials()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getTableName() == null) ? 0 : getTableName().hashCode());
hashCode = prime * hashCode + ((getAwsRegion() == null) ? 0 : getAwsRegion().hashCode());
hashCode = prime * hashCode + ((getUseCallerCredentials() == null) ? 0 : getUseCallerCredentials().hashCode());
return hashCode;
}
@Override
public DynamodbDataSourceConfig clone() {
try {
return (DynamodbDataSourceConfig) 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.DynamodbDataSourceConfigMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy