/* * 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.dlm.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* [Snapshot policies only] Specifies a rule for enabling fast snapshot restore for snapshots created by snapshot * policies. You can enable fast snapshot restore based on either a count or a time interval. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class FastRestoreRule implements Serializable, Cloneable, StructuredPojo { /** ** The number of snapshots to be enabled with fast snapshot restore. *
*/ private Integer count; /** ** The amount of time to enable fast snapshot restore. The maximum is 100 years. This is equivalent to 1200 months, * 5200 weeks, or 36500 days. *
*/ private Integer interval; /** ** The unit of time for enabling fast snapshot restore. *
*/ private String intervalUnit; /** ** The Availability Zones in which to enable fast snapshot restore. *
*/ private java.util.List* The number of snapshots to be enabled with fast snapshot restore. *
* * @param count * The number of snapshots to be enabled with fast snapshot restore. */ public void setCount(Integer count) { this.count = count; } /** ** The number of snapshots to be enabled with fast snapshot restore. *
* * @return The number of snapshots to be enabled with fast snapshot restore. */ public Integer getCount() { return this.count; } /** ** The number of snapshots to be enabled with fast snapshot restore. *
* * @param count * The number of snapshots to be enabled with fast snapshot restore. * @return Returns a reference to this object so that method calls can be chained together. */ public FastRestoreRule withCount(Integer count) { setCount(count); return this; } /** ** The amount of time to enable fast snapshot restore. The maximum is 100 years. This is equivalent to 1200 months, * 5200 weeks, or 36500 days. *
* * @param interval * The amount of time to enable fast snapshot restore. The maximum is 100 years. This is equivalent to 1200 * months, 5200 weeks, or 36500 days. */ public void setInterval(Integer interval) { this.interval = interval; } /** ** The amount of time to enable fast snapshot restore. The maximum is 100 years. This is equivalent to 1200 months, * 5200 weeks, or 36500 days. *
* * @return The amount of time to enable fast snapshot restore. The maximum is 100 years. This is equivalent to 1200 * months, 5200 weeks, or 36500 days. */ public Integer getInterval() { return this.interval; } /** ** The amount of time to enable fast snapshot restore. The maximum is 100 years. This is equivalent to 1200 months, * 5200 weeks, or 36500 days. *
* * @param interval * The amount of time to enable fast snapshot restore. The maximum is 100 years. This is equivalent to 1200 * months, 5200 weeks, or 36500 days. * @return Returns a reference to this object so that method calls can be chained together. */ public FastRestoreRule withInterval(Integer interval) { setInterval(interval); return this; } /** ** The unit of time for enabling fast snapshot restore. *
* * @param intervalUnit * The unit of time for enabling fast snapshot restore. * @see RetentionIntervalUnitValues */ public void setIntervalUnit(String intervalUnit) { this.intervalUnit = intervalUnit; } /** ** The unit of time for enabling fast snapshot restore. *
* * @return The unit of time for enabling fast snapshot restore. * @see RetentionIntervalUnitValues */ public String getIntervalUnit() { return this.intervalUnit; } /** ** The unit of time for enabling fast snapshot restore. *
* * @param intervalUnit * The unit of time for enabling fast snapshot restore. * @return Returns a reference to this object so that method calls can be chained together. * @see RetentionIntervalUnitValues */ public FastRestoreRule withIntervalUnit(String intervalUnit) { setIntervalUnit(intervalUnit); return this; } /** ** The unit of time for enabling fast snapshot restore. *
* * @param intervalUnit * The unit of time for enabling fast snapshot restore. * @return Returns a reference to this object so that method calls can be chained together. * @see RetentionIntervalUnitValues */ public FastRestoreRule withIntervalUnit(RetentionIntervalUnitValues intervalUnit) { this.intervalUnit = intervalUnit.toString(); return this; } /** ** The Availability Zones in which to enable fast snapshot restore. *
* * @return The Availability Zones in which to enable fast snapshot restore. */ public java.util.List* The Availability Zones in which to enable fast snapshot restore. *
* * @param availabilityZones * The Availability Zones in which to enable fast snapshot restore. */ public void setAvailabilityZones(java.util.Collection* The Availability Zones in which to enable fast snapshot restore. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setAvailabilityZones(java.util.Collection)} or {@link #withAvailabilityZones(java.util.Collection)} if * you want to override the existing values. *
* * @param availabilityZones * The Availability Zones in which to enable fast snapshot restore. * @return Returns a reference to this object so that method calls can be chained together. */ public FastRestoreRule withAvailabilityZones(String... availabilityZones) { if (this.availabilityZones == null) { setAvailabilityZones(new java.util.ArrayList* The Availability Zones in which to enable fast snapshot restore. *
* * @param availabilityZones * The Availability Zones in which to enable fast snapshot restore. * @return Returns a reference to this object so that method calls can be chained together. */ public FastRestoreRule withAvailabilityZones(java.util.Collection