/* * Copyright 2010-2019 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.dynamodbv2.model; import java.io.Serializable; /** *
* Contains the details of the table when the backup was created. *
*/ public class SourceTableDetails implements Serializable { /** ** The name of the table for which the backup was created. *
*
* Constraints:
* Length: 3 - 255
* Pattern: [a-zA-Z0-9_.-]+
*/
private String tableName;
/**
*
* Unique identifier for the table for which the backup was created. *
*
* Constraints:
* Pattern:
* [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}
*/
private String tableId;
/**
*
* ARN of the table for which backup was created. *
*/ private String tableArn; /** ** Size of the table in bytes. Please note this is an approximate value. *
*/ private Long tableSizeBytes; /** ** Schema of the table. *
*/ private java.util.List* Time when the source table was created. *
*/ private java.util.Date tableCreationDateTime; /** ** Read IOPs and Write IOPS on the table when the backup was created. *
*/ private ProvisionedThroughput provisionedThroughput; /** ** Number of items in the table. Please note this is an approximate value. *
*
* Constraints:
* Range: 0 -
*/
private Long itemCount;
/**
*
* The name of the table for which the backup was created. *
*
* Constraints:
* Length: 3 - 255
* Pattern: [a-zA-Z0-9_.-]+
*
* @return
* The name of the table for which the backup was created. *
*/ public String getTableName() { return tableName; } /** ** The name of the table for which the backup was created. *
*
* Constraints:
* Length: 3 - 255
* Pattern: [a-zA-Z0-9_.-]+
*
* @param tableName
* The name of the table for which the backup was created. *
*/ public void setTableName(String tableName) { this.tableName = tableName; } /** ** The name of the table for which the backup was created. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 3 - 255
* Pattern: [a-zA-Z0-9_.-]+
*
* @param tableName
* The name of the table for which the backup was created. *
* @return A reference to this updated object so that method calls can be * chained together. */ public SourceTableDetails withTableName(String tableName) { this.tableName = tableName; return this; } /** ** Unique identifier for the table for which the backup was created. *
*
* Constraints:
* Pattern:
* [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}
*
* @return
* Unique identifier for the table for which the backup was created. *
*/ public String getTableId() { return tableId; } /** ** Unique identifier for the table for which the backup was created. *
*
* Constraints:
* Pattern:
* [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}
*
* @param tableId
* Unique identifier for the table for which the backup was * created. *
*/ public void setTableId(String tableId) { this.tableId = tableId; } /** ** Unique identifier for the table for which the backup was created. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Pattern:
* [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}
*
* @param tableId
* Unique identifier for the table for which the backup was * created. *
* @return A reference to this updated object so that method calls can be * chained together. */ public SourceTableDetails withTableId(String tableId) { this.tableId = tableId; return this; } /** ** ARN of the table for which backup was created. *
* * @return* ARN of the table for which backup was created. *
*/ public String getTableArn() { return tableArn; } /** ** ARN of the table for which backup was created. *
* * @param tableArn* ARN of the table for which backup was created. *
*/ public void setTableArn(String tableArn) { this.tableArn = tableArn; } /** ** ARN of the table for which backup was created. *
** Returns a reference to this object so that method calls can be chained * together. * * @param tableArn
* ARN of the table for which backup was created. *
* @return A reference to this updated object so that method calls can be * chained together. */ public SourceTableDetails withTableArn(String tableArn) { this.tableArn = tableArn; return this; } /** ** Size of the table in bytes. Please note this is an approximate value. *
* * @return* Size of the table in bytes. Please note this is an approximate * value. *
*/ public Long getTableSizeBytes() { return tableSizeBytes; } /** ** Size of the table in bytes. Please note this is an approximate value. *
* * @param tableSizeBytes* Size of the table in bytes. Please note this is an approximate * value. *
*/ public void setTableSizeBytes(Long tableSizeBytes) { this.tableSizeBytes = tableSizeBytes; } /** ** Size of the table in bytes. Please note this is an approximate value. *
** Returns a reference to this object so that method calls can be chained * together. * * @param tableSizeBytes
* Size of the table in bytes. Please note this is an approximate * value. *
* @return A reference to this updated object so that method calls can be * chained together. */ public SourceTableDetails withTableSizeBytes(Long tableSizeBytes) { this.tableSizeBytes = tableSizeBytes; return this; } /** ** Schema of the table. *
* * @return* Schema of the table. *
*/ public java.util.List* Schema of the table. *
* * @param keySchema* Schema of the table. *
*/ public void setKeySchema(java.util.Collection* Schema of the table. *
** Returns a reference to this object so that method calls can be chained * together. * * @param keySchema
* Schema of the table. *
* @return A reference to this updated object so that method calls can be * chained together. */ public SourceTableDetails withKeySchema(KeySchemaElement... keySchema) { if (getKeySchema() == null) { this.keySchema = new java.util.ArrayList* Schema of the table. *
** Returns a reference to this object so that method calls can be chained * together. * * @param keySchema
* Schema of the table. *
* @return A reference to this updated object so that method calls can be * chained together. */ public SourceTableDetails withKeySchema(java.util.Collection* Time when the source table was created. *
* * @return* Time when the source table was created. *
*/ public java.util.Date getTableCreationDateTime() { return tableCreationDateTime; } /** ** Time when the source table was created. *
* * @param tableCreationDateTime* Time when the source table was created. *
*/ public void setTableCreationDateTime(java.util.Date tableCreationDateTime) { this.tableCreationDateTime = tableCreationDateTime; } /** ** Time when the source table was created. *
** Returns a reference to this object so that method calls can be chained * together. * * @param tableCreationDateTime
* Time when the source table was created. *
* @return A reference to this updated object so that method calls can be * chained together. */ public SourceTableDetails withTableCreationDateTime(java.util.Date tableCreationDateTime) { this.tableCreationDateTime = tableCreationDateTime; return this; } /** ** Read IOPs and Write IOPS on the table when the backup was created. *
* * @return* Read IOPs and Write IOPS on the table when the backup was * created. *
*/ public ProvisionedThroughput getProvisionedThroughput() { return provisionedThroughput; } /** ** Read IOPs and Write IOPS on the table when the backup was created. *
* * @param provisionedThroughput* Read IOPs and Write IOPS on the table when the backup was * created. *
*/ public void setProvisionedThroughput(ProvisionedThroughput provisionedThroughput) { this.provisionedThroughput = provisionedThroughput; } /** ** Read IOPs and Write IOPS on the table when the backup was created. *
** Returns a reference to this object so that method calls can be chained * together. * * @param provisionedThroughput
* Read IOPs and Write IOPS on the table when the backup was * created. *
* @return A reference to this updated object so that method calls can be * chained together. */ public SourceTableDetails withProvisionedThroughput(ProvisionedThroughput provisionedThroughput) { this.provisionedThroughput = provisionedThroughput; return this; } /** ** Number of items in the table. Please note this is an approximate value. *
*
* Constraints:
* Range: 0 -
*
* @return
* Number of items in the table. Please note this is an approximate * value. *
*/ public Long getItemCount() { return itemCount; } /** ** Number of items in the table. Please note this is an approximate value. *
*
* Constraints:
* Range: 0 -
*
* @param itemCount
* Number of items in the table. Please note this is an * approximate value. *
*/ public void setItemCount(Long itemCount) { this.itemCount = itemCount; } /** ** Number of items in the table. Please note this is an approximate value. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Range: 0 -
*
* @param itemCount
* Number of items in the table. Please note this is an * approximate value. *
* @return A reference to this updated object so that method calls can be * chained together. */ public SourceTableDetails withItemCount(Long itemCount) { this.itemCount = itemCount; 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 (getTableName() != null) sb.append("TableName: " + getTableName() + ","); if (getTableId() != null) sb.append("TableId: " + getTableId() + ","); if (getTableArn() != null) sb.append("TableArn: " + getTableArn() + ","); if (getTableSizeBytes() != null) sb.append("TableSizeBytes: " + getTableSizeBytes() + ","); if (getKeySchema() != null) sb.append("KeySchema: " + getKeySchema() + ","); if (getTableCreationDateTime() != null) sb.append("TableCreationDateTime: " + getTableCreationDateTime() + ","); if (getProvisionedThroughput() != null) sb.append("ProvisionedThroughput: " + getProvisionedThroughput() + ","); if (getItemCount() != null) sb.append("ItemCount: " + getItemCount()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTableName() == null) ? 0 : getTableName().hashCode()); hashCode = prime * hashCode + ((getTableId() == null) ? 0 : getTableId().hashCode()); hashCode = prime * hashCode + ((getTableArn() == null) ? 0 : getTableArn().hashCode()); hashCode = prime * hashCode + ((getTableSizeBytes() == null) ? 0 : getTableSizeBytes().hashCode()); hashCode = prime * hashCode + ((getKeySchema() == null) ? 0 : getKeySchema().hashCode()); hashCode = prime * hashCode + ((getTableCreationDateTime() == null) ? 0 : getTableCreationDateTime().hashCode()); hashCode = prime * hashCode + ((getProvisionedThroughput() == null) ? 0 : getProvisionedThroughput().hashCode()); hashCode = prime * hashCode + ((getItemCount() == null) ? 0 : getItemCount().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof SourceTableDetails == false) return false; SourceTableDetails other = (SourceTableDetails) obj; if (other.getTableName() == null ^ this.getTableName() == null) return false; if (other.getTableName() != null && other.getTableName().equals(this.getTableName()) == false) return false; if (other.getTableId() == null ^ this.getTableId() == null) return false; if (other.getTableId() != null && other.getTableId().equals(this.getTableId()) == false) return false; if (other.getTableArn() == null ^ this.getTableArn() == null) return false; if (other.getTableArn() != null && other.getTableArn().equals(this.getTableArn()) == false) return false; if (other.getTableSizeBytes() == null ^ this.getTableSizeBytes() == null) return false; if (other.getTableSizeBytes() != null && other.getTableSizeBytes().equals(this.getTableSizeBytes()) == false) return false; if (other.getKeySchema() == null ^ this.getKeySchema() == null) return false; if (other.getKeySchema() != null && other.getKeySchema().equals(this.getKeySchema()) == false) return false; if (other.getTableCreationDateTime() == null ^ this.getTableCreationDateTime() == null) return false; if (other.getTableCreationDateTime() != null && other.getTableCreationDateTime().equals(this.getTableCreationDateTime()) == false) return false; if (other.getProvisionedThroughput() == null ^ this.getProvisionedThroughput() == null) return false; if (other.getProvisionedThroughput() != null && other.getProvisionedThroughput().equals(this.getProvisionedThroughput()) == false) return false; if (other.getItemCount() == null ^ this.getItemCount() == null) return false; if (other.getItemCount() != null && other.getItemCount().equals(this.getItemCount()) == false) return false; return true; } }