/* * 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 details for the backup. *

*/ public class BackupSummary implements Serializable { /** *

* Name of the table. *

*

* Constraints:
* Length: 3 - 255
* Pattern: [a-zA-Z0-9_.-]+
*/ private String tableName; /** *

* Unique identifier for the table. *

*

* 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 associated with the table. *

*/ private String tableArn; /** *

* ARN associated with the backup. *

*

* Constraints:
* Length: 37 - 1024
*/ private String backupArn; /** *

* Name of the specified backup. *

*

* Constraints:
* Length: 3 - 255
* Pattern: [a-zA-Z0-9_.-]+
*/ private String backupName; /** *

* Time at which the backup was created. *

*/ private java.util.Date backupCreationDateTime; /** *

* Time at which the automatic on-demand backup created by DynamoDB will * expire. This SYSTEM on-demand backup expires automatically * 35 days after its creation. *

*/ private java.util.Date backupExpiryDateTime; /** *

* Backup can be in one of the following states: CREATING, ACTIVE, DELETED. *

*

* Constraints:
* Allowed Values: CREATING, DELETED, AVAILABLE */ private String backupStatus; /** *

* BackupType: *

* *

* Constraints:
* Allowed Values: USER, SYSTEM */ private String backupType; /** *

* Size of the backup in bytes. *

*

* Constraints:
* Range: 0 -
*/ private Long backupSizeBytes; /** *

* Name of the table. *

*

* Constraints:
* Length: 3 - 255
* Pattern: [a-zA-Z0-9_.-]+
* * @return

* Name of the table. *

*/ public String getTableName() { return tableName; } /** *

* Name of the table. *

*

* Constraints:
* Length: 3 - 255
* Pattern: [a-zA-Z0-9_.-]+
* * @param tableName

* Name of the table. *

*/ public void setTableName(String tableName) { this.tableName = tableName; } /** *

* Name of the table. *

*

* 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

* Name of the table. *

* @return A reference to this updated object so that method calls can be * chained together. */ public BackupSummary withTableName(String tableName) { this.tableName = tableName; return this; } /** *

* Unique identifier for the table. *

*

* 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. *

*/ public String getTableId() { return tableId; } /** *

* Unique identifier for the table. *

*

* 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. *

*/ public void setTableId(String tableId) { this.tableId = tableId; } /** *

* Unique identifier for the table. *

*

* 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. *

* @return A reference to this updated object so that method calls can be * chained together. */ public BackupSummary withTableId(String tableId) { this.tableId = tableId; return this; } /** *

* ARN associated with the table. *

* * @return

* ARN associated with the table. *

*/ public String getTableArn() { return tableArn; } /** *

* ARN associated with the table. *

* * @param tableArn

* ARN associated with the table. *

*/ public void setTableArn(String tableArn) { this.tableArn = tableArn; } /** *

* ARN associated with the table. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param tableArn

* ARN associated with the table. *

* @return A reference to this updated object so that method calls can be * chained together. */ public BackupSummary withTableArn(String tableArn) { this.tableArn = tableArn; return this; } /** *

* ARN associated with the backup. *

*

* Constraints:
* Length: 37 - 1024
* * @return

* ARN associated with the backup. *

*/ public String getBackupArn() { return backupArn; } /** *

* ARN associated with the backup. *

*

* Constraints:
* Length: 37 - 1024
* * @param backupArn

* ARN associated with the backup. *

*/ public void setBackupArn(String backupArn) { this.backupArn = backupArn; } /** *

* ARN associated with the backup. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: 37 - 1024
* * @param backupArn

* ARN associated with the backup. *

* @return A reference to this updated object so that method calls can be * chained together. */ public BackupSummary withBackupArn(String backupArn) { this.backupArn = backupArn; return this; } /** *

* Name of the specified backup. *

*

* Constraints:
* Length: 3 - 255
* Pattern: [a-zA-Z0-9_.-]+
* * @return

* Name of the specified backup. *

*/ public String getBackupName() { return backupName; } /** *

* Name of the specified backup. *

*

* Constraints:
* Length: 3 - 255
* Pattern: [a-zA-Z0-9_.-]+
* * @param backupName

* Name of the specified backup. *

*/ public void setBackupName(String backupName) { this.backupName = backupName; } /** *

* Name of the specified backup. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: 3 - 255
* Pattern: [a-zA-Z0-9_.-]+
* * @param backupName

* Name of the specified backup. *

* @return A reference to this updated object so that method calls can be * chained together. */ public BackupSummary withBackupName(String backupName) { this.backupName = backupName; return this; } /** *

* Time at which the backup was created. *

* * @return

* Time at which the backup was created. *

*/ public java.util.Date getBackupCreationDateTime() { return backupCreationDateTime; } /** *

* Time at which the backup was created. *

* * @param backupCreationDateTime

* Time at which the backup was created. *

*/ public void setBackupCreationDateTime(java.util.Date backupCreationDateTime) { this.backupCreationDateTime = backupCreationDateTime; } /** *

* Time at which the backup was created. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param backupCreationDateTime

* Time at which the backup was created. *

* @return A reference to this updated object so that method calls can be * chained together. */ public BackupSummary withBackupCreationDateTime(java.util.Date backupCreationDateTime) { this.backupCreationDateTime = backupCreationDateTime; return this; } /** *

* Time at which the automatic on-demand backup created by DynamoDB will * expire. This SYSTEM on-demand backup expires automatically * 35 days after its creation. *

* * @return

* Time at which the automatic on-demand backup created by DynamoDB * will expire. This SYSTEM on-demand backup expires * automatically 35 days after its creation. *

*/ public java.util.Date getBackupExpiryDateTime() { return backupExpiryDateTime; } /** *

* Time at which the automatic on-demand backup created by DynamoDB will * expire. This SYSTEM on-demand backup expires automatically * 35 days after its creation. *

* * @param backupExpiryDateTime

* Time at which the automatic on-demand backup created by * DynamoDB will expire. This SYSTEM on-demand * backup expires automatically 35 days after its creation. *

*/ public void setBackupExpiryDateTime(java.util.Date backupExpiryDateTime) { this.backupExpiryDateTime = backupExpiryDateTime; } /** *

* Time at which the automatic on-demand backup created by DynamoDB will * expire. This SYSTEM on-demand backup expires automatically * 35 days after its creation. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param backupExpiryDateTime

* Time at which the automatic on-demand backup created by * DynamoDB will expire. This SYSTEM on-demand * backup expires automatically 35 days after its creation. *

* @return A reference to this updated object so that method calls can be * chained together. */ public BackupSummary withBackupExpiryDateTime(java.util.Date backupExpiryDateTime) { this.backupExpiryDateTime = backupExpiryDateTime; return this; } /** *

* Backup can be in one of the following states: CREATING, ACTIVE, DELETED. *

*

* Constraints:
* Allowed Values: CREATING, DELETED, AVAILABLE * * @return

* Backup can be in one of the following states: CREATING, ACTIVE, * DELETED. *

* @see BackupStatus */ public String getBackupStatus() { return backupStatus; } /** *

* Backup can be in one of the following states: CREATING, ACTIVE, DELETED. *

*

* Constraints:
* Allowed Values: CREATING, DELETED, AVAILABLE * * @param backupStatus

* Backup can be in one of the following states: CREATING, * ACTIVE, DELETED. *

* @see BackupStatus */ public void setBackupStatus(String backupStatus) { this.backupStatus = backupStatus; } /** *

* Backup can be in one of the following states: CREATING, ACTIVE, DELETED. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Allowed Values: CREATING, DELETED, AVAILABLE * * @param backupStatus

* Backup can be in one of the following states: CREATING, * ACTIVE, DELETED. *

* @return A reference to this updated object so that method calls can be * chained together. * @see BackupStatus */ public BackupSummary withBackupStatus(String backupStatus) { this.backupStatus = backupStatus; return this; } /** *

* Backup can be in one of the following states: CREATING, ACTIVE, DELETED. *

*

* Constraints:
* Allowed Values: CREATING, DELETED, AVAILABLE * * @param backupStatus

* Backup can be in one of the following states: CREATING, * ACTIVE, DELETED. *

* @see BackupStatus */ public void setBackupStatus(BackupStatus backupStatus) { this.backupStatus = backupStatus.toString(); } /** *

* Backup can be in one of the following states: CREATING, ACTIVE, DELETED. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Allowed Values: CREATING, DELETED, AVAILABLE * * @param backupStatus

* Backup can be in one of the following states: CREATING, * ACTIVE, DELETED. *

* @return A reference to this updated object so that method calls can be * chained together. * @see BackupStatus */ public BackupSummary withBackupStatus(BackupStatus backupStatus) { this.backupStatus = backupStatus.toString(); return this; } /** *

* BackupType: *

* *

* Constraints:
* Allowed Values: USER, SYSTEM * * @return

* BackupType: *

* * @see BackupType */ public String getBackupType() { return backupType; } /** *

* BackupType: *

* *

* Constraints:
* Allowed Values: USER, SYSTEM * * @param backupType

* BackupType: *

* * @see BackupType */ public void setBackupType(String backupType) { this.backupType = backupType; } /** *

* BackupType: *

* *

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Allowed Values: USER, SYSTEM * * @param backupType

* BackupType: *

* * @return A reference to this updated object so that method calls can be * chained together. * @see BackupType */ public BackupSummary withBackupType(String backupType) { this.backupType = backupType; return this; } /** *

* BackupType: *

* *

* Constraints:
* Allowed Values: USER, SYSTEM * * @param backupType

* BackupType: *

* * @see BackupType */ public void setBackupType(BackupType backupType) { this.backupType = backupType.toString(); } /** *

* BackupType: *

* *

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Allowed Values: USER, SYSTEM * * @param backupType

* BackupType: *

* * @return A reference to this updated object so that method calls can be * chained together. * @see BackupType */ public BackupSummary withBackupType(BackupType backupType) { this.backupType = backupType.toString(); return this; } /** *

* Size of the backup in bytes. *

*

* Constraints:
* Range: 0 -
* * @return

* Size of the backup in bytes. *

*/ public Long getBackupSizeBytes() { return backupSizeBytes; } /** *

* Size of the backup in bytes. *

*

* Constraints:
* Range: 0 -
* * @param backupSizeBytes

* Size of the backup in bytes. *

*/ public void setBackupSizeBytes(Long backupSizeBytes) { this.backupSizeBytes = backupSizeBytes; } /** *

* Size of the backup in bytes. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Range: 0 -
* * @param backupSizeBytes

* Size of the backup in bytes. *

* @return A reference to this updated object so that method calls can be * chained together. */ public BackupSummary withBackupSizeBytes(Long backupSizeBytes) { this.backupSizeBytes = backupSizeBytes; 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 (getBackupArn() != null) sb.append("BackupArn: " + getBackupArn() + ","); if (getBackupName() != null) sb.append("BackupName: " + getBackupName() + ","); if (getBackupCreationDateTime() != null) sb.append("BackupCreationDateTime: " + getBackupCreationDateTime() + ","); if (getBackupExpiryDateTime() != null) sb.append("BackupExpiryDateTime: " + getBackupExpiryDateTime() + ","); if (getBackupStatus() != null) sb.append("BackupStatus: " + getBackupStatus() + ","); if (getBackupType() != null) sb.append("BackupType: " + getBackupType() + ","); if (getBackupSizeBytes() != null) sb.append("BackupSizeBytes: " + getBackupSizeBytes()); 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 + ((getBackupArn() == null) ? 0 : getBackupArn().hashCode()); hashCode = prime * hashCode + ((getBackupName() == null) ? 0 : getBackupName().hashCode()); hashCode = prime * hashCode + ((getBackupCreationDateTime() == null) ? 0 : getBackupCreationDateTime() .hashCode()); hashCode = prime * hashCode + ((getBackupExpiryDateTime() == null) ? 0 : getBackupExpiryDateTime().hashCode()); hashCode = prime * hashCode + ((getBackupStatus() == null) ? 0 : getBackupStatus().hashCode()); hashCode = prime * hashCode + ((getBackupType() == null) ? 0 : getBackupType().hashCode()); hashCode = prime * hashCode + ((getBackupSizeBytes() == null) ? 0 : getBackupSizeBytes().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof BackupSummary == false) return false; BackupSummary other = (BackupSummary) 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.getBackupArn() == null ^ this.getBackupArn() == null) return false; if (other.getBackupArn() != null && other.getBackupArn().equals(this.getBackupArn()) == false) return false; if (other.getBackupName() == null ^ this.getBackupName() == null) return false; if (other.getBackupName() != null && other.getBackupName().equals(this.getBackupName()) == false) return false; if (other.getBackupCreationDateTime() == null ^ this.getBackupCreationDateTime() == null) return false; if (other.getBackupCreationDateTime() != null && other.getBackupCreationDateTime().equals(this.getBackupCreationDateTime()) == false) return false; if (other.getBackupExpiryDateTime() == null ^ this.getBackupExpiryDateTime() == null) return false; if (other.getBackupExpiryDateTime() != null && other.getBackupExpiryDateTime().equals(this.getBackupExpiryDateTime()) == false) return false; if (other.getBackupStatus() == null ^ this.getBackupStatus() == null) return false; if (other.getBackupStatus() != null && other.getBackupStatus().equals(this.getBackupStatus()) == false) return false; if (other.getBackupType() == null ^ this.getBackupType() == null) return false; if (other.getBackupType() != null && other.getBackupType().equals(this.getBackupType()) == false) return false; if (other.getBackupSizeBytes() == null ^ this.getBackupSizeBytes() == null) return false; if (other.getBackupSizeBytes() != null && other.getBackupSizeBytes().equals(this.getBackupSizeBytes()) == false) return false; return true; } }