com.amazonaws.services.dynamodbv2.model.RestoreTableFromBackupRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-dynamodb 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.dynamodbv2.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class RestoreTableFromBackupRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The name of the new table to which the backup must be restored.
*
*/
private String targetTableName;
/**
*
* The Amazon Resource Name (ARN) associated with the backup.
*
*/
private String backupArn;
/**
*
* The billing mode of the restored table.
*
*/
private String billingModeOverride;
/**
*
* List of global secondary indexes for the restored table. The indexes provided should match existing secondary
* indexes. You can choose to exclude some or all of the indexes at the time of restore.
*
*/
private java.util.List globalSecondaryIndexOverride;
/**
*
* List of local secondary indexes for the restored table. The indexes provided should match existing secondary
* indexes. You can choose to exclude some or all of the indexes at the time of restore.
*
*/
private java.util.List localSecondaryIndexOverride;
/**
*
* Provisioned throughput settings for the restored table.
*
*/
private ProvisionedThroughput provisionedThroughputOverride;
private OnDemandThroughput onDemandThroughputOverride;
/**
*
* The new server-side encryption settings for the restored table.
*
*/
private SSESpecification sSESpecificationOverride;
/**
*
* The name of the new table to which the backup must be restored.
*
*
* @param targetTableName
* The name of the new table to which the backup must be restored.
*/
public void setTargetTableName(String targetTableName) {
this.targetTableName = targetTableName;
}
/**
*
* The name of the new table to which the backup must be restored.
*
*
* @return The name of the new table to which the backup must be restored.
*/
public String getTargetTableName() {
return this.targetTableName;
}
/**
*
* The name of the new table to which the backup must be restored.
*
*
* @param targetTableName
* The name of the new table to which the backup must be restored.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RestoreTableFromBackupRequest withTargetTableName(String targetTableName) {
setTargetTableName(targetTableName);
return this;
}
/**
*
* The Amazon Resource Name (ARN) associated with the backup.
*
*
* @param backupArn
* The Amazon Resource Name (ARN) associated with the backup.
*/
public void setBackupArn(String backupArn) {
this.backupArn = backupArn;
}
/**
*
* The Amazon Resource Name (ARN) associated with the backup.
*
*
* @return The Amazon Resource Name (ARN) associated with the backup.
*/
public String getBackupArn() {
return this.backupArn;
}
/**
*
* The Amazon Resource Name (ARN) associated with the backup.
*
*
* @param backupArn
* The Amazon Resource Name (ARN) associated with the backup.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RestoreTableFromBackupRequest withBackupArn(String backupArn) {
setBackupArn(backupArn);
return this;
}
/**
*
* The billing mode of the restored table.
*
*
* @param billingModeOverride
* The billing mode of the restored table.
* @see BillingMode
*/
public void setBillingModeOverride(String billingModeOverride) {
this.billingModeOverride = billingModeOverride;
}
/**
*
* The billing mode of the restored table.
*
*
* @return The billing mode of the restored table.
* @see BillingMode
*/
public String getBillingModeOverride() {
return this.billingModeOverride;
}
/**
*
* The billing mode of the restored table.
*
*
* @param billingModeOverride
* The billing mode of the restored table.
* @return Returns a reference to this object so that method calls can be chained together.
* @see BillingMode
*/
public RestoreTableFromBackupRequest withBillingModeOverride(String billingModeOverride) {
setBillingModeOverride(billingModeOverride);
return this;
}
/**
*
* The billing mode of the restored table.
*
*
* @param billingModeOverride
* The billing mode of the restored table.
* @return Returns a reference to this object so that method calls can be chained together.
* @see BillingMode
*/
public RestoreTableFromBackupRequest withBillingModeOverride(BillingMode billingModeOverride) {
this.billingModeOverride = billingModeOverride.toString();
return this;
}
/**
*
* List of global secondary indexes for the restored table. The indexes provided should match existing secondary
* indexes. You can choose to exclude some or all of the indexes at the time of restore.
*
*
* @return List of global secondary indexes for the restored table. The indexes provided should match existing
* secondary indexes. You can choose to exclude some or all of the indexes at the time of restore.
*/
public java.util.List getGlobalSecondaryIndexOverride() {
return globalSecondaryIndexOverride;
}
/**
*
* List of global secondary indexes for the restored table. The indexes provided should match existing secondary
* indexes. You can choose to exclude some or all of the indexes at the time of restore.
*
*
* @param globalSecondaryIndexOverride
* List of global secondary indexes for the restored table. The indexes provided should match existing
* secondary indexes. You can choose to exclude some or all of the indexes at the time of restore.
*/
public void setGlobalSecondaryIndexOverride(java.util.Collection globalSecondaryIndexOverride) {
if (globalSecondaryIndexOverride == null) {
this.globalSecondaryIndexOverride = null;
return;
}
this.globalSecondaryIndexOverride = new java.util.ArrayList(globalSecondaryIndexOverride);
}
/**
*
* List of global secondary indexes for the restored table. The indexes provided should match existing secondary
* indexes. You can choose to exclude some or all of the indexes at the time of restore.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setGlobalSecondaryIndexOverride(java.util.Collection)} or
* {@link #withGlobalSecondaryIndexOverride(java.util.Collection)} if you want to override the existing values.
*
*
* @param globalSecondaryIndexOverride
* List of global secondary indexes for the restored table. The indexes provided should match existing
* secondary indexes. You can choose to exclude some or all of the indexes at the time of restore.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RestoreTableFromBackupRequest withGlobalSecondaryIndexOverride(GlobalSecondaryIndex... globalSecondaryIndexOverride) {
if (this.globalSecondaryIndexOverride == null) {
setGlobalSecondaryIndexOverride(new java.util.ArrayList(globalSecondaryIndexOverride.length));
}
for (GlobalSecondaryIndex ele : globalSecondaryIndexOverride) {
this.globalSecondaryIndexOverride.add(ele);
}
return this;
}
/**
*
* List of global secondary indexes for the restored table. The indexes provided should match existing secondary
* indexes. You can choose to exclude some or all of the indexes at the time of restore.
*
*
* @param globalSecondaryIndexOverride
* List of global secondary indexes for the restored table. The indexes provided should match existing
* secondary indexes. You can choose to exclude some or all of the indexes at the time of restore.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RestoreTableFromBackupRequest withGlobalSecondaryIndexOverride(java.util.Collection globalSecondaryIndexOverride) {
setGlobalSecondaryIndexOverride(globalSecondaryIndexOverride);
return this;
}
/**
*
* List of local secondary indexes for the restored table. The indexes provided should match existing secondary
* indexes. You can choose to exclude some or all of the indexes at the time of restore.
*
*
* @return List of local secondary indexes for the restored table. The indexes provided should match existing
* secondary indexes. You can choose to exclude some or all of the indexes at the time of restore.
*/
public java.util.List getLocalSecondaryIndexOverride() {
return localSecondaryIndexOverride;
}
/**
*
* List of local secondary indexes for the restored table. The indexes provided should match existing secondary
* indexes. You can choose to exclude some or all of the indexes at the time of restore.
*
*
* @param localSecondaryIndexOverride
* List of local secondary indexes for the restored table. The indexes provided should match existing
* secondary indexes. You can choose to exclude some or all of the indexes at the time of restore.
*/
public void setLocalSecondaryIndexOverride(java.util.Collection localSecondaryIndexOverride) {
if (localSecondaryIndexOverride == null) {
this.localSecondaryIndexOverride = null;
return;
}
this.localSecondaryIndexOverride = new java.util.ArrayList(localSecondaryIndexOverride);
}
/**
*
* List of local secondary indexes for the restored table. The indexes provided should match existing secondary
* indexes. You can choose to exclude some or all of the indexes at the time of restore.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setLocalSecondaryIndexOverride(java.util.Collection)} or
* {@link #withLocalSecondaryIndexOverride(java.util.Collection)} if you want to override the existing values.
*
*
* @param localSecondaryIndexOverride
* List of local secondary indexes for the restored table. The indexes provided should match existing
* secondary indexes. You can choose to exclude some or all of the indexes at the time of restore.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RestoreTableFromBackupRequest withLocalSecondaryIndexOverride(LocalSecondaryIndex... localSecondaryIndexOverride) {
if (this.localSecondaryIndexOverride == null) {
setLocalSecondaryIndexOverride(new java.util.ArrayList(localSecondaryIndexOverride.length));
}
for (LocalSecondaryIndex ele : localSecondaryIndexOverride) {
this.localSecondaryIndexOverride.add(ele);
}
return this;
}
/**
*
* List of local secondary indexes for the restored table. The indexes provided should match existing secondary
* indexes. You can choose to exclude some or all of the indexes at the time of restore.
*
*
* @param localSecondaryIndexOverride
* List of local secondary indexes for the restored table. The indexes provided should match existing
* secondary indexes. You can choose to exclude some or all of the indexes at the time of restore.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RestoreTableFromBackupRequest withLocalSecondaryIndexOverride(java.util.Collection localSecondaryIndexOverride) {
setLocalSecondaryIndexOverride(localSecondaryIndexOverride);
return this;
}
/**
*
* Provisioned throughput settings for the restored table.
*
*
* @param provisionedThroughputOverride
* Provisioned throughput settings for the restored table.
*/
public void setProvisionedThroughputOverride(ProvisionedThroughput provisionedThroughputOverride) {
this.provisionedThroughputOverride = provisionedThroughputOverride;
}
/**
*
* Provisioned throughput settings for the restored table.
*
*
* @return Provisioned throughput settings for the restored table.
*/
public ProvisionedThroughput getProvisionedThroughputOverride() {
return this.provisionedThroughputOverride;
}
/**
*
* Provisioned throughput settings for the restored table.
*
*
* @param provisionedThroughputOverride
* Provisioned throughput settings for the restored table.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RestoreTableFromBackupRequest withProvisionedThroughputOverride(ProvisionedThroughput provisionedThroughputOverride) {
setProvisionedThroughputOverride(provisionedThroughputOverride);
return this;
}
/**
* @param onDemandThroughputOverride
*/
public void setOnDemandThroughputOverride(OnDemandThroughput onDemandThroughputOverride) {
this.onDemandThroughputOverride = onDemandThroughputOverride;
}
/**
* @return
*/
public OnDemandThroughput getOnDemandThroughputOverride() {
return this.onDemandThroughputOverride;
}
/**
* @param onDemandThroughputOverride
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RestoreTableFromBackupRequest withOnDemandThroughputOverride(OnDemandThroughput onDemandThroughputOverride) {
setOnDemandThroughputOverride(onDemandThroughputOverride);
return this;
}
/**
*
* The new server-side encryption settings for the restored table.
*
*
* @param sSESpecificationOverride
* The new server-side encryption settings for the restored table.
*/
public void setSSESpecificationOverride(SSESpecification sSESpecificationOverride) {
this.sSESpecificationOverride = sSESpecificationOverride;
}
/**
*
* The new server-side encryption settings for the restored table.
*
*
* @return The new server-side encryption settings for the restored table.
*/
public SSESpecification getSSESpecificationOverride() {
return this.sSESpecificationOverride;
}
/**
*
* The new server-side encryption settings for the restored table.
*
*
* @param sSESpecificationOverride
* The new server-side encryption settings for the restored table.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RestoreTableFromBackupRequest withSSESpecificationOverride(SSESpecification sSESpecificationOverride) {
setSSESpecificationOverride(sSESpecificationOverride);
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 (getTargetTableName() != null)
sb.append("TargetTableName: ").append(getTargetTableName()).append(",");
if (getBackupArn() != null)
sb.append("BackupArn: ").append(getBackupArn()).append(",");
if (getBillingModeOverride() != null)
sb.append("BillingModeOverride: ").append(getBillingModeOverride()).append(",");
if (getGlobalSecondaryIndexOverride() != null)
sb.append("GlobalSecondaryIndexOverride: ").append(getGlobalSecondaryIndexOverride()).append(",");
if (getLocalSecondaryIndexOverride() != null)
sb.append("LocalSecondaryIndexOverride: ").append(getLocalSecondaryIndexOverride()).append(",");
if (getProvisionedThroughputOverride() != null)
sb.append("ProvisionedThroughputOverride: ").append(getProvisionedThroughputOverride()).append(",");
if (getOnDemandThroughputOverride() != null)
sb.append("OnDemandThroughputOverride: ").append(getOnDemandThroughputOverride()).append(",");
if (getSSESpecificationOverride() != null)
sb.append("SSESpecificationOverride: ").append(getSSESpecificationOverride());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof RestoreTableFromBackupRequest == false)
return false;
RestoreTableFromBackupRequest other = (RestoreTableFromBackupRequest) obj;
if (other.getTargetTableName() == null ^ this.getTargetTableName() == null)
return false;
if (other.getTargetTableName() != null && other.getTargetTableName().equals(this.getTargetTableName()) == 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.getBillingModeOverride() == null ^ this.getBillingModeOverride() == null)
return false;
if (other.getBillingModeOverride() != null && other.getBillingModeOverride().equals(this.getBillingModeOverride()) == false)
return false;
if (other.getGlobalSecondaryIndexOverride() == null ^ this.getGlobalSecondaryIndexOverride() == null)
return false;
if (other.getGlobalSecondaryIndexOverride() != null && other.getGlobalSecondaryIndexOverride().equals(this.getGlobalSecondaryIndexOverride()) == false)
return false;
if (other.getLocalSecondaryIndexOverride() == null ^ this.getLocalSecondaryIndexOverride() == null)
return false;
if (other.getLocalSecondaryIndexOverride() != null && other.getLocalSecondaryIndexOverride().equals(this.getLocalSecondaryIndexOverride()) == false)
return false;
if (other.getProvisionedThroughputOverride() == null ^ this.getProvisionedThroughputOverride() == null)
return false;
if (other.getProvisionedThroughputOverride() != null
&& other.getProvisionedThroughputOverride().equals(this.getProvisionedThroughputOverride()) == false)
return false;
if (other.getOnDemandThroughputOverride() == null ^ this.getOnDemandThroughputOverride() == null)
return false;
if (other.getOnDemandThroughputOverride() != null && other.getOnDemandThroughputOverride().equals(this.getOnDemandThroughputOverride()) == false)
return false;
if (other.getSSESpecificationOverride() == null ^ this.getSSESpecificationOverride() == null)
return false;
if (other.getSSESpecificationOverride() != null && other.getSSESpecificationOverride().equals(this.getSSESpecificationOverride()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getTargetTableName() == null) ? 0 : getTargetTableName().hashCode());
hashCode = prime * hashCode + ((getBackupArn() == null) ? 0 : getBackupArn().hashCode());
hashCode = prime * hashCode + ((getBillingModeOverride() == null) ? 0 : getBillingModeOverride().hashCode());
hashCode = prime * hashCode + ((getGlobalSecondaryIndexOverride() == null) ? 0 : getGlobalSecondaryIndexOverride().hashCode());
hashCode = prime * hashCode + ((getLocalSecondaryIndexOverride() == null) ? 0 : getLocalSecondaryIndexOverride().hashCode());
hashCode = prime * hashCode + ((getProvisionedThroughputOverride() == null) ? 0 : getProvisionedThroughputOverride().hashCode());
hashCode = prime * hashCode + ((getOnDemandThroughputOverride() == null) ? 0 : getOnDemandThroughputOverride().hashCode());
hashCode = prime * hashCode + ((getSSESpecificationOverride() == null) ? 0 : getSSESpecificationOverride().hashCode());
return hashCode;
}
@Override
public RestoreTableFromBackupRequest clone() {
return (RestoreTableFromBackupRequest) super.clone();
}
}