/* * 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; /** *

* The description of the point in time settings applied to the table. *

*/ public class PointInTimeRecoveryDescription implements Serializable { /** *

* The current state of point in time recovery: *

* *

* Constraints:
* Allowed Values: ENABLED, DISABLED */ private String pointInTimeRecoveryStatus; /** *

* Specifies the earliest point in time you can restore your table to. It * You can restore your table to any point in time during the last 35 days. *

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

* LatestRestorableDateTime is typically 5 minutes before the * current time. *

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

* The current state of point in time recovery: *

* *

* Constraints:
* Allowed Values: ENABLED, DISABLED * * @return

* The current state of point in time recovery: *

* * @see PointInTimeRecoveryStatus */ public String getPointInTimeRecoveryStatus() { return pointInTimeRecoveryStatus; } /** *

* The current state of point in time recovery: *

* *

* Constraints:
* Allowed Values: ENABLED, DISABLED * * @param pointInTimeRecoveryStatus

* The current state of point in time recovery: *

* * @see PointInTimeRecoveryStatus */ public void setPointInTimeRecoveryStatus(String pointInTimeRecoveryStatus) { this.pointInTimeRecoveryStatus = pointInTimeRecoveryStatus; } /** *

* The current state of point in time recovery: *

* *

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

* Constraints:
* Allowed Values: ENABLED, DISABLED * * @param pointInTimeRecoveryStatus

* The current state of point in time recovery: *

* * @return A reference to this updated object so that method calls can be * chained together. * @see PointInTimeRecoveryStatus */ public PointInTimeRecoveryDescription withPointInTimeRecoveryStatus( String pointInTimeRecoveryStatus) { this.pointInTimeRecoveryStatus = pointInTimeRecoveryStatus; return this; } /** *

* The current state of point in time recovery: *

* *

* Constraints:
* Allowed Values: ENABLED, DISABLED * * @param pointInTimeRecoveryStatus

* The current state of point in time recovery: *

* * @see PointInTimeRecoveryStatus */ public void setPointInTimeRecoveryStatus(PointInTimeRecoveryStatus pointInTimeRecoveryStatus) { this.pointInTimeRecoveryStatus = pointInTimeRecoveryStatus.toString(); } /** *

* The current state of point in time recovery: *

* *

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

* Constraints:
* Allowed Values: ENABLED, DISABLED * * @param pointInTimeRecoveryStatus

* The current state of point in time recovery: *

* * @return A reference to this updated object so that method calls can be * chained together. * @see PointInTimeRecoveryStatus */ public PointInTimeRecoveryDescription withPointInTimeRecoveryStatus( PointInTimeRecoveryStatus pointInTimeRecoveryStatus) { this.pointInTimeRecoveryStatus = pointInTimeRecoveryStatus.toString(); return this; } /** *

* Specifies the earliest point in time you can restore your table to. It * You can restore your table to any point in time during the last 35 days. *

* * @return

* Specifies the earliest point in time you can restore your table * to. It You can restore your table to any point in time during the * last 35 days. *

*/ public java.util.Date getEarliestRestorableDateTime() { return earliestRestorableDateTime; } /** *

* Specifies the earliest point in time you can restore your table to. It * You can restore your table to any point in time during the last 35 days. *

* * @param earliestRestorableDateTime

* Specifies the earliest point in time you can restore your * table to. It You can restore your table to any point in time * during the last 35 days. *

*/ public void setEarliestRestorableDateTime(java.util.Date earliestRestorableDateTime) { this.earliestRestorableDateTime = earliestRestorableDateTime; } /** *

* Specifies the earliest point in time you can restore your table to. It * You can restore your table to any point in time during the last 35 days. *

*

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

* Specifies the earliest point in time you can restore your * table to. It You can restore your table to any point in time * during the last 35 days. *

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

* LatestRestorableDateTime is typically 5 minutes before the * current time. *

* * @return

* LatestRestorableDateTime is typically 5 minutes * before the current time. *

*/ public java.util.Date getLatestRestorableDateTime() { return latestRestorableDateTime; } /** *

* LatestRestorableDateTime is typically 5 minutes before the * current time. *

* * @param latestRestorableDateTime

* LatestRestorableDateTime is typically 5 minutes * before the current time. *

*/ public void setLatestRestorableDateTime(java.util.Date latestRestorableDateTime) { this.latestRestorableDateTime = latestRestorableDateTime; } /** *

* LatestRestorableDateTime is typically 5 minutes before the * current time. *

*

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

* LatestRestorableDateTime is typically 5 minutes * before the current time. *

* @return A reference to this updated object so that method calls can be * chained together. */ public PointInTimeRecoveryDescription withLatestRestorableDateTime( java.util.Date latestRestorableDateTime) { this.latestRestorableDateTime = latestRestorableDateTime; 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 (getPointInTimeRecoveryStatus() != null) sb.append("PointInTimeRecoveryStatus: " + getPointInTimeRecoveryStatus() + ","); if (getEarliestRestorableDateTime() != null) sb.append("EarliestRestorableDateTime: " + getEarliestRestorableDateTime() + ","); if (getLatestRestorableDateTime() != null) sb.append("LatestRestorableDateTime: " + getLatestRestorableDateTime()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getPointInTimeRecoveryStatus() == null) ? 0 : getPointInTimeRecoveryStatus() .hashCode()); hashCode = prime * hashCode + ((getEarliestRestorableDateTime() == null) ? 0 : getEarliestRestorableDateTime() .hashCode()); hashCode = prime * hashCode + ((getLatestRestorableDateTime() == null) ? 0 : getLatestRestorableDateTime() .hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof PointInTimeRecoveryDescription == false) return false; PointInTimeRecoveryDescription other = (PointInTimeRecoveryDescription) obj; if (other.getPointInTimeRecoveryStatus() == null ^ this.getPointInTimeRecoveryStatus() == null) return false; if (other.getPointInTimeRecoveryStatus() != null && other.getPointInTimeRecoveryStatus().equals(this.getPointInTimeRecoveryStatus()) == false) return false; if (other.getEarliestRestorableDateTime() == null ^ this.getEarliestRestorableDateTime() == null) return false; if (other.getEarliestRestorableDateTime() != null && other.getEarliestRestorableDateTime().equals( this.getEarliestRestorableDateTime()) == false) return false; if (other.getLatestRestorableDateTime() == null ^ this.getLatestRestorableDateTime() == null) return false; if (other.getLatestRestorableDateTime() != null && other.getLatestRestorableDateTime().equals(this.getLatestRestorableDateTime()) == false) return false; return true; } }