/* * 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.backup.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 UpdateRecoveryPointLifecycleRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The name of a logical container where backups are stored. Backup vaults are identified by names that are unique * to the account used to create them and the Amazon Web Services Region where they are created. They consist of * lowercase letters, numbers, and hyphens. *
*/ private String backupVaultName; /** *
* An Amazon Resource Name (ARN) that uniquely identifies a recovery point; for example,
* arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45
.
*
* The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. Backup * transitions and expires backups automatically according to the lifecycle that you define. *
** Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, the * “retention” setting must be 90 days greater than the “transition to cold after days” setting. The “transition to * cold after days” setting cannot be changed after a backup has been transitioned to cold. *
*/ private Lifecycle lifecycle; /** ** The name of a logical container where backups are stored. Backup vaults are identified by names that are unique * to the account used to create them and the Amazon Web Services Region where they are created. They consist of * lowercase letters, numbers, and hyphens. *
* * @param backupVaultName * The name of a logical container where backups are stored. Backup vaults are identified by names that are * unique to the account used to create them and the Amazon Web Services Region where they are created. They * consist of lowercase letters, numbers, and hyphens. */ public void setBackupVaultName(String backupVaultName) { this.backupVaultName = backupVaultName; } /** ** The name of a logical container where backups are stored. Backup vaults are identified by names that are unique * to the account used to create them and the Amazon Web Services Region where they are created. They consist of * lowercase letters, numbers, and hyphens. *
* * @return The name of a logical container where backups are stored. Backup vaults are identified by names that are * unique to the account used to create them and the Amazon Web Services Region where they are created. They * consist of lowercase letters, numbers, and hyphens. */ public String getBackupVaultName() { return this.backupVaultName; } /** ** The name of a logical container where backups are stored. Backup vaults are identified by names that are unique * to the account used to create them and the Amazon Web Services Region where they are created. They consist of * lowercase letters, numbers, and hyphens. *
* * @param backupVaultName * The name of a logical container where backups are stored. Backup vaults are identified by names that are * unique to the account used to create them and the Amazon Web Services Region where they are created. They * consist of lowercase letters, numbers, and hyphens. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateRecoveryPointLifecycleRequest withBackupVaultName(String backupVaultName) { setBackupVaultName(backupVaultName); return this; } /** *
* An Amazon Resource Name (ARN) that uniquely identifies a recovery point; for example,
* arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45
.
*
arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45
.
*/
public void setRecoveryPointArn(String recoveryPointArn) {
this.recoveryPointArn = recoveryPointArn;
}
/**
*
* An Amazon Resource Name (ARN) that uniquely identifies a recovery point; for example,
* arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45
.
*
arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45
.
*/
public String getRecoveryPointArn() {
return this.recoveryPointArn;
}
/**
*
* An Amazon Resource Name (ARN) that uniquely identifies a recovery point; for example,
* arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45
.
*
arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateRecoveryPointLifecycleRequest withRecoveryPointArn(String recoveryPointArn) {
setRecoveryPointArn(recoveryPointArn);
return this;
}
/**
* * The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. Backup * transitions and expires backups automatically according to the lifecycle that you define. *
** Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, the * “retention” setting must be 90 days greater than the “transition to cold after days” setting. The “transition to * cold after days” setting cannot be changed after a backup has been transitioned to cold. *
* * @param lifecycle * The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. * Backup transitions and expires backups automatically according to the lifecycle that you define. ** Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, * the “retention” setting must be 90 days greater than the “transition to cold after days” setting. The * “transition to cold after days” setting cannot be changed after a backup has been transitioned to cold. */ public void setLifecycle(Lifecycle lifecycle) { this.lifecycle = lifecycle; } /** *
* The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. Backup * transitions and expires backups automatically according to the lifecycle that you define. *
** Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, the * “retention” setting must be 90 days greater than the “transition to cold after days” setting. The “transition to * cold after days” setting cannot be changed after a backup has been transitioned to cold. *
* * @return The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. * Backup transitions and expires backups automatically according to the lifecycle that you define. ** Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, * the “retention” setting must be 90 days greater than the “transition to cold after days” setting. The * “transition to cold after days” setting cannot be changed after a backup has been transitioned to cold. */ public Lifecycle getLifecycle() { return this.lifecycle; } /** *
* The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. Backup * transitions and expires backups automatically according to the lifecycle that you define. *
** Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, the * “retention” setting must be 90 days greater than the “transition to cold after days” setting. The “transition to * cold after days” setting cannot be changed after a backup has been transitioned to cold. *
* * @param lifecycle * The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. * Backup transitions and expires backups automatically according to the lifecycle that you define. ** Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, * the “retention” setting must be 90 days greater than the “transition to cold after days” setting. The * “transition to cold after days” setting cannot be changed after a backup has been transitioned to cold. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateRecoveryPointLifecycleRequest withLifecycle(Lifecycle lifecycle) { setLifecycle(lifecycle); 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 (getBackupVaultName() != null) sb.append("BackupVaultName: ").append(getBackupVaultName()).append(","); if (getRecoveryPointArn() != null) sb.append("RecoveryPointArn: ").append(getRecoveryPointArn()).append(","); if (getLifecycle() != null) sb.append("Lifecycle: ").append(getLifecycle()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof UpdateRecoveryPointLifecycleRequest == false) return false; UpdateRecoveryPointLifecycleRequest other = (UpdateRecoveryPointLifecycleRequest) obj; if (other.getBackupVaultName() == null ^ this.getBackupVaultName() == null) return false; if (other.getBackupVaultName() != null && other.getBackupVaultName().equals(this.getBackupVaultName()) == false) return false; if (other.getRecoveryPointArn() == null ^ this.getRecoveryPointArn() == null) return false; if (other.getRecoveryPointArn() != null && other.getRecoveryPointArn().equals(this.getRecoveryPointArn()) == false) return false; if (other.getLifecycle() == null ^ this.getLifecycle() == null) return false; if (other.getLifecycle() != null && other.getLifecycle().equals(this.getLifecycle()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getBackupVaultName() == null) ? 0 : getBackupVaultName().hashCode()); hashCode = prime * hashCode + ((getRecoveryPointArn() == null) ? 0 : getRecoveryPointArn().hashCode()); hashCode = prime * hashCode + ((getLifecycle() == null) ? 0 : getLifecycle().hashCode()); return hashCode; } @Override public UpdateRecoveryPointLifecycleRequest clone() { return (UpdateRecoveryPointLifecycleRequest) super.clone(); } }