/* * 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; /** *
* Provides details about an Backup backup plan and an array of BackupRule
objects, each of which specifies
* a backup rule.
*
* Uniquely identifies the backup plan to be associated with the selection of resources. *
*/ private AwsBackupBackupPlanBackupPlanDetails backupPlan; /** ** An Amazon Resource Name (ARN) that uniquely identifies the backup plan. *
*/ private String backupPlanArn; /** ** A unique ID for the backup plan. *
*/ private String backupPlanId; /** ** Unique, randomly generated, Unicode, UTF-8 encoded strings. Version IDs cannot be edited. *
*/ private String versionId; /** ** Uniquely identifies the backup plan to be associated with the selection of resources. *
* * @param backupPlan * Uniquely identifies the backup plan to be associated with the selection of resources. */ public void setBackupPlan(AwsBackupBackupPlanBackupPlanDetails backupPlan) { this.backupPlan = backupPlan; } /** ** Uniquely identifies the backup plan to be associated with the selection of resources. *
* * @return Uniquely identifies the backup plan to be associated with the selection of resources. */ public AwsBackupBackupPlanBackupPlanDetails getBackupPlan() { return this.backupPlan; } /** ** Uniquely identifies the backup plan to be associated with the selection of resources. *
* * @param backupPlan * Uniquely identifies the backup plan to be associated with the selection of resources. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsBackupBackupPlanDetails withBackupPlan(AwsBackupBackupPlanBackupPlanDetails backupPlan) { setBackupPlan(backupPlan); return this; } /** ** An Amazon Resource Name (ARN) that uniquely identifies the backup plan. *
* * @param backupPlanArn * An Amazon Resource Name (ARN) that uniquely identifies the backup plan. */ public void setBackupPlanArn(String backupPlanArn) { this.backupPlanArn = backupPlanArn; } /** ** An Amazon Resource Name (ARN) that uniquely identifies the backup plan. *
* * @return An Amazon Resource Name (ARN) that uniquely identifies the backup plan. */ public String getBackupPlanArn() { return this.backupPlanArn; } /** ** An Amazon Resource Name (ARN) that uniquely identifies the backup plan. *
* * @param backupPlanArn * An Amazon Resource Name (ARN) that uniquely identifies the backup plan. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsBackupBackupPlanDetails withBackupPlanArn(String backupPlanArn) { setBackupPlanArn(backupPlanArn); return this; } /** ** A unique ID for the backup plan. *
* * @param backupPlanId * A unique ID for the backup plan. */ public void setBackupPlanId(String backupPlanId) { this.backupPlanId = backupPlanId; } /** ** A unique ID for the backup plan. *
* * @return A unique ID for the backup plan. */ public String getBackupPlanId() { return this.backupPlanId; } /** ** A unique ID for the backup plan. *
* * @param backupPlanId * A unique ID for the backup plan. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsBackupBackupPlanDetails withBackupPlanId(String backupPlanId) { setBackupPlanId(backupPlanId); return this; } /** ** Unique, randomly generated, Unicode, UTF-8 encoded strings. Version IDs cannot be edited. *
* * @param versionId * Unique, randomly generated, Unicode, UTF-8 encoded strings. Version IDs cannot be edited. */ public void setVersionId(String versionId) { this.versionId = versionId; } /** ** Unique, randomly generated, Unicode, UTF-8 encoded strings. Version IDs cannot be edited. *
* * @return Unique, randomly generated, Unicode, UTF-8 encoded strings. Version IDs cannot be edited. */ public String getVersionId() { return this.versionId; } /** ** Unique, randomly generated, Unicode, UTF-8 encoded strings. Version IDs cannot be edited. *
* * @param versionId * Unique, randomly generated, Unicode, UTF-8 encoded strings. Version IDs cannot be edited. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsBackupBackupPlanDetails withVersionId(String versionId) { setVersionId(versionId); 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 (getBackupPlan() != null) sb.append("BackupPlan: ").append(getBackupPlan()).append(","); if (getBackupPlanArn() != null) sb.append("BackupPlanArn: ").append(getBackupPlanArn()).append(","); if (getBackupPlanId() != null) sb.append("BackupPlanId: ").append(getBackupPlanId()).append(","); if (getVersionId() != null) sb.append("VersionId: ").append(getVersionId()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AwsBackupBackupPlanDetails == false) return false; AwsBackupBackupPlanDetails other = (AwsBackupBackupPlanDetails) obj; if (other.getBackupPlan() == null ^ this.getBackupPlan() == null) return false; if (other.getBackupPlan() != null && other.getBackupPlan().equals(this.getBackupPlan()) == false) return false; if (other.getBackupPlanArn() == null ^ this.getBackupPlanArn() == null) return false; if (other.getBackupPlanArn() != null && other.getBackupPlanArn().equals(this.getBackupPlanArn()) == false) return false; if (other.getBackupPlanId() == null ^ this.getBackupPlanId() == null) return false; if (other.getBackupPlanId() != null && other.getBackupPlanId().equals(this.getBackupPlanId()) == false) return false; if (other.getVersionId() == null ^ this.getVersionId() == null) return false; if (other.getVersionId() != null && other.getVersionId().equals(this.getVersionId()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getBackupPlan() == null) ? 0 : getBackupPlan().hashCode()); hashCode = prime * hashCode + ((getBackupPlanArn() == null) ? 0 : getBackupPlanArn().hashCode()); hashCode = prime * hashCode + ((getBackupPlanId() == null) ? 0 : getBackupPlanId().hashCode()); hashCode = prime * hashCode + ((getVersionId() == null) ? 0 : getVersionId().hashCode()); return hashCode; } @Override public AwsBackupBackupPlanDetails clone() { try { return (AwsBackupBackupPlanDetails) 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.AwsBackupBackupPlanDetailsMarshaller.getInstance().marshall(this, protocolMarshaller); } }