/*
* 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.databasemigrationservice.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
* <p/>
*
* @see <a href="http://docs.aws.amazon.com/goto/WebAPI/dms-2016-01-01/DescribeTableStatistics" target="_top">AWS API
* Documentation</a>
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class DescribeTableStatisticsResult extends com.amazonaws.AmazonWebServiceResult<com.amazonaws.ResponseMetadata> implements Serializable, Cloneable {
/**
* <p>
* The Amazon Resource Name (ARN) of the replication task.
* </p>
*/
private String replicationTaskArn;
/**
* <p>
* The table statistics.
* </p>
*/
private java.util.List<TableStatistics> tableStatistics;
/**
* <p>
* An optional pagination token provided by a previous request. If this parameter is specified, the response
* includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.
* </p>
*/
private String marker;
/**
* <p>
* The Amazon Resource Name (ARN) of the replication task.
* </p>
*
* @param replicationTaskArn
* The Amazon Resource Name (ARN) of the replication task.
*/
public void setReplicationTaskArn(String replicationTaskArn) {
this.replicationTaskArn = replicationTaskArn;
}
/**
* <p>
* The Amazon Resource Name (ARN) of the replication task.
* </p>
*
* @return The Amazon Resource Name (ARN) of the replication task.
*/
public String getReplicationTaskArn() {
return this.replicationTaskArn;
}
/**
* <p>
* The Amazon Resource Name (ARN) of the replication task.
* </p>
*
* @param replicationTaskArn
* The Amazon Resource Name (ARN) of the replication task.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeTableStatisticsResult withReplicationTaskArn(String replicationTaskArn) {
setReplicationTaskArn(replicationTaskArn);
return this;
}
/**
* <p>
* The table statistics.
* </p>
*
* @return The table statistics.
*/
public java.util.List<TableStatistics> getTableStatistics() {
return tableStatistics;
}
/**
* <p>
* The table statistics.
* </p>
*
* @param tableStatistics
* The table statistics.
*/
public void setTableStatistics(java.util.Collection<TableStatistics> tableStatistics) {
if (tableStatistics == null) {
this.tableStatistics = null;
return;
}
this.tableStatistics = new java.util.ArrayList<TableStatistics>(tableStatistics);
}
/**
* <p>
* The table statistics.
* </p>
* <p>
* <b>NOTE:</b> This method appends the values to the existing list (if any). Use
* {@link #setTableStatistics(java.util.Collection)} or {@link #withTableStatistics(java.util.Collection)} if you
* want to override the existing values.
* </p>
*
* @param tableStatistics
* The table statistics.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeTableStatisticsResult withTableStatistics(TableStatistics... tableStatistics) {
if (this.tableStatistics == null) {
setTableStatistics(new java.util.ArrayList<TableStatistics>(tableStatistics.length));
}
for (TableStatistics ele : tableStatistics) {
this.tableStatistics.add(ele);
}
return this;
}
/**
* <p>
* The table statistics.
* </p>
*
* @param tableStatistics
* The table statistics.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeTableStatisticsResult withTableStatistics(java.util.Collection<TableStatistics> tableStatistics) {
setTableStatistics(tableStatistics);
return this;
}
/**
* <p>
* An optional pagination token provided by a previous request. If this parameter is specified, the response
* includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.
* </p>
*
* @param marker
* An optional pagination token provided by a previous request. If this parameter is specified, the response
* includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.
*/
public void setMarker(String marker) {
this.marker = marker;
}
/**
* <p>
* An optional pagination token provided by a previous request. If this parameter is specified, the response
* includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.
* </p>
*
* @return An optional pagination token provided by a previous request. If this parameter is specified, the response
* includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.
*/
public String getMarker() {
return this.marker;
}
/**
* <p>
* An optional pagination token provided by a previous request. If this parameter is specified, the response
* includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.
* </p>
*
* @param marker
* An optional pagination token provided by a previous request. If this parameter is specified, the response
* includes only records beyond the marker, up to the value specified by <code>MaxRecords</code>.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DescribeTableStatisticsResult withMarker(String marker) {
setMarker(marker);
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 (getReplicationTaskArn() != null)
sb.append("ReplicationTaskArn: ").append(getReplicationTaskArn()).append(",");
if (getTableStatistics() != null)
sb.append("TableStatistics: ").append(getTableStatistics()).append(",");
if (getMarker() != null)
sb.append("Marker: ").append(getMarker());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof DescribeTableStatisticsResult == false)
return false;
DescribeTableStatisticsResult other = (DescribeTableStatisticsResult) obj;
if (other.getReplicationTaskArn() == null ^ this.getReplicationTaskArn() == null)
return false;
if (other.getReplicationTaskArn() != null && other.getReplicationTaskArn().equals(this.getReplicationTaskArn()) == false)
return false;
if (other.getTableStatistics() == null ^ this.getTableStatistics() == null)
return false;
if (other.getTableStatistics() != null && other.getTableStatistics().equals(this.getTableStatistics()) == false)
return false;
if (other.getMarker() == null ^ this.getMarker() == null)
return false;
if (other.getMarker() != null && other.getMarker().equals(this.getMarker()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getReplicationTaskArn() == null) ? 0 : getReplicationTaskArn().hashCode());
hashCode = prime * hashCode + ((getTableStatistics() == null) ? 0 : getTableStatistics().hashCode());
hashCode = prime * hashCode + ((getMarker() == null) ? 0 : getMarker().hashCode());
return hashCode;
}
@Override
public DescribeTableStatisticsResult clone() {
try {
return (DescribeTableStatisticsResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}