com.amazonaws.services.securityhub.model.AwsDynamoDbTableRestoreSummary Maven / Gradle / Ivy
Show all versions of aws-java-sdk-securityhub Show documentation
/*
* Copyright 2018-2023 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.securityhub.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Information about the restore for the table.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AwsDynamoDbTableRestoreSummary implements Serializable, Cloneable, StructuredPojo {
/**
*
* The ARN of the source backup from which the table was restored.
*
*/
private String sourceBackupArn;
/**
*
* The ARN of the source table for the backup.
*
*/
private String sourceTableArn;
/**
*
* Indicates the point in time that the table was restored to.
*
*
* Uses the date-time
format specified in RFC
* 3339 section 5.6, Internet Date/Time Format. The value cannot contain spaces, and date and time should be
* separated by T
. For example, 2020-03-22T13:22:13.933Z
.
*
*/
private String restoreDateTime;
/**
*
* Whether a restore is currently in progress.
*
*/
private Boolean restoreInProgress;
/**
*
* The ARN of the source backup from which the table was restored.
*
*
* @param sourceBackupArn
* The ARN of the source backup from which the table was restored.
*/
public void setSourceBackupArn(String sourceBackupArn) {
this.sourceBackupArn = sourceBackupArn;
}
/**
*
* The ARN of the source backup from which the table was restored.
*
*
* @return The ARN of the source backup from which the table was restored.
*/
public String getSourceBackupArn() {
return this.sourceBackupArn;
}
/**
*
* The ARN of the source backup from which the table was restored.
*
*
* @param sourceBackupArn
* The ARN of the source backup from which the table was restored.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsDynamoDbTableRestoreSummary withSourceBackupArn(String sourceBackupArn) {
setSourceBackupArn(sourceBackupArn);
return this;
}
/**
*
* The ARN of the source table for the backup.
*
*
* @param sourceTableArn
* The ARN of the source table for the backup.
*/
public void setSourceTableArn(String sourceTableArn) {
this.sourceTableArn = sourceTableArn;
}
/**
*
* The ARN of the source table for the backup.
*
*
* @return The ARN of the source table for the backup.
*/
public String getSourceTableArn() {
return this.sourceTableArn;
}
/**
*
* The ARN of the source table for the backup.
*
*
* @param sourceTableArn
* The ARN of the source table for the backup.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsDynamoDbTableRestoreSummary withSourceTableArn(String sourceTableArn) {
setSourceTableArn(sourceTableArn);
return this;
}
/**
*
* Indicates the point in time that the table was restored to.
*
*
* Uses the date-time
format specified in RFC
* 3339 section 5.6, Internet Date/Time Format. The value cannot contain spaces, and date and time should be
* separated by T
. For example, 2020-03-22T13:22:13.933Z
.
*
*
* @param restoreDateTime
* Indicates the point in time that the table was restored to.
*
* Uses the date-time
format specified in RFC 3339 section 5.6, Internet Date/Time
* Format. The value cannot contain spaces, and date and time should be separated by T
. For
* example, 2020-03-22T13:22:13.933Z
.
*/
public void setRestoreDateTime(String restoreDateTime) {
this.restoreDateTime = restoreDateTime;
}
/**
*
* Indicates the point in time that the table was restored to.
*
*
* Uses the date-time
format specified in RFC
* 3339 section 5.6, Internet Date/Time Format. The value cannot contain spaces, and date and time should be
* separated by T
. For example, 2020-03-22T13:22:13.933Z
.
*
*
* @return Indicates the point in time that the table was restored to.
*
* Uses the date-time
format specified in RFC 3339 section 5.6, Internet Date/Time
* Format. The value cannot contain spaces, and date and time should be separated by T
. For
* example, 2020-03-22T13:22:13.933Z
.
*/
public String getRestoreDateTime() {
return this.restoreDateTime;
}
/**
*
* Indicates the point in time that the table was restored to.
*
*
* Uses the date-time
format specified in RFC
* 3339 section 5.6, Internet Date/Time Format. The value cannot contain spaces, and date and time should be
* separated by T
. For example, 2020-03-22T13:22:13.933Z
.
*
*
* @param restoreDateTime
* Indicates the point in time that the table was restored to.
*
* Uses the date-time
format specified in RFC 3339 section 5.6, Internet Date/Time
* Format. The value cannot contain spaces, and date and time should be separated by T
. For
* example, 2020-03-22T13:22:13.933Z
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsDynamoDbTableRestoreSummary withRestoreDateTime(String restoreDateTime) {
setRestoreDateTime(restoreDateTime);
return this;
}
/**
*
* Whether a restore is currently in progress.
*
*
* @param restoreInProgress
* Whether a restore is currently in progress.
*/
public void setRestoreInProgress(Boolean restoreInProgress) {
this.restoreInProgress = restoreInProgress;
}
/**
*
* Whether a restore is currently in progress.
*
*
* @return Whether a restore is currently in progress.
*/
public Boolean getRestoreInProgress() {
return this.restoreInProgress;
}
/**
*
* Whether a restore is currently in progress.
*
*
* @param restoreInProgress
* Whether a restore is currently in progress.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsDynamoDbTableRestoreSummary withRestoreInProgress(Boolean restoreInProgress) {
setRestoreInProgress(restoreInProgress);
return this;
}
/**
*
* Whether a restore is currently in progress.
*
*
* @return Whether a restore is currently in progress.
*/
public Boolean isRestoreInProgress() {
return this.restoreInProgress;
}
/**
* 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 (getSourceBackupArn() != null)
sb.append("SourceBackupArn: ").append(getSourceBackupArn()).append(",");
if (getSourceTableArn() != null)
sb.append("SourceTableArn: ").append(getSourceTableArn()).append(",");
if (getRestoreDateTime() != null)
sb.append("RestoreDateTime: ").append(getRestoreDateTime()).append(",");
if (getRestoreInProgress() != null)
sb.append("RestoreInProgress: ").append(getRestoreInProgress());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof AwsDynamoDbTableRestoreSummary == false)
return false;
AwsDynamoDbTableRestoreSummary other = (AwsDynamoDbTableRestoreSummary) obj;
if (other.getSourceBackupArn() == null ^ this.getSourceBackupArn() == null)
return false;
if (other.getSourceBackupArn() != null && other.getSourceBackupArn().equals(this.getSourceBackupArn()) == false)
return false;
if (other.getSourceTableArn() == null ^ this.getSourceTableArn() == null)
return false;
if (other.getSourceTableArn() != null && other.getSourceTableArn().equals(this.getSourceTableArn()) == false)
return false;
if (other.getRestoreDateTime() == null ^ this.getRestoreDateTime() == null)
return false;
if (other.getRestoreDateTime() != null && other.getRestoreDateTime().equals(this.getRestoreDateTime()) == false)
return false;
if (other.getRestoreInProgress() == null ^ this.getRestoreInProgress() == null)
return false;
if (other.getRestoreInProgress() != null && other.getRestoreInProgress().equals(this.getRestoreInProgress()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getSourceBackupArn() == null) ? 0 : getSourceBackupArn().hashCode());
hashCode = prime * hashCode + ((getSourceTableArn() == null) ? 0 : getSourceTableArn().hashCode());
hashCode = prime * hashCode + ((getRestoreDateTime() == null) ? 0 : getRestoreDateTime().hashCode());
hashCode = prime * hashCode + ((getRestoreInProgress() == null) ? 0 : getRestoreInProgress().hashCode());
return hashCode;
}
@Override
public AwsDynamoDbTableRestoreSummary clone() {
try {
return (AwsDynamoDbTableRestoreSummary) 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.securityhub.model.transform.AwsDynamoDbTableRestoreSummaryMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}