/* * 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 CreateBackupPlanRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* Specifies the body of a backup plan. Includes a BackupPlanName
and one or more sets of
* Rules
.
*
* To help organize your resources, you can assign your own metadata to the resources that you create. Each tag is a * key-value pair. The specified tags are assigned to all backups created with this plan. *
*/ private java.util.Map
* Identifies the request and allows failed requests to be retried without the risk of running the operation twice.
* If the request includes a CreatorRequestId
that matches an existing backup plan, that plan is
* returned. This parameter is optional.
*
* If used, this parameter must contain 1 to 50 alphanumeric or '-_.' characters. *
*/ private String creatorRequestId; /** *
* Specifies the body of a backup plan. Includes a BackupPlanName
and one or more sets of
* Rules
.
*
BackupPlanName
and one or more sets of
* Rules
.
*/
public void setBackupPlan(BackupPlanInput backupPlan) {
this.backupPlan = backupPlan;
}
/**
*
* Specifies the body of a backup plan. Includes a BackupPlanName
and one or more sets of
* Rules
.
*
BackupPlanName
and one or more sets of
* Rules
.
*/
public BackupPlanInput getBackupPlan() {
return this.backupPlan;
}
/**
*
* Specifies the body of a backup plan. Includes a BackupPlanName
and one or more sets of
* Rules
.
*
BackupPlanName
and one or more sets of
* Rules
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateBackupPlanRequest withBackupPlan(BackupPlanInput backupPlan) {
setBackupPlan(backupPlan);
return this;
}
/**
* * To help organize your resources, you can assign your own metadata to the resources that you create. Each tag is a * key-value pair. The specified tags are assigned to all backups created with this plan. *
* * @return To help organize your resources, you can assign your own metadata to the resources that you create. Each * tag is a key-value pair. The specified tags are assigned to all backups created with this plan. */ public java.util.Map* To help organize your resources, you can assign your own metadata to the resources that you create. Each tag is a * key-value pair. The specified tags are assigned to all backups created with this plan. *
* * @param backupPlanTags * To help organize your resources, you can assign your own metadata to the resources that you create. Each * tag is a key-value pair. The specified tags are assigned to all backups created with this plan. */ public void setBackupPlanTags(java.util.Map* To help organize your resources, you can assign your own metadata to the resources that you create. Each tag is a * key-value pair. The specified tags are assigned to all backups created with this plan. *
* * @param backupPlanTags * To help organize your resources, you can assign your own metadata to the resources that you create. Each * tag is a key-value pair. The specified tags are assigned to all backups created with this plan. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateBackupPlanRequest withBackupPlanTags(java.util.Map
* Identifies the request and allows failed requests to be retried without the risk of running the operation twice.
* If the request includes a CreatorRequestId
that matches an existing backup plan, that plan is
* returned. This parameter is optional.
*
* If used, this parameter must contain 1 to 50 alphanumeric or '-_.' characters. *
* * @param creatorRequestId * Identifies the request and allows failed requests to be retried without the risk of running the operation * twice. If the request includes aCreatorRequestId
that matches an existing backup plan, that
* plan is returned. This parameter is optional.
* * If used, this parameter must contain 1 to 50 alphanumeric or '-_.' characters. */ public void setCreatorRequestId(String creatorRequestId) { this.creatorRequestId = creatorRequestId; } /** *
* Identifies the request and allows failed requests to be retried without the risk of running the operation twice.
* If the request includes a CreatorRequestId
that matches an existing backup plan, that plan is
* returned. This parameter is optional.
*
* If used, this parameter must contain 1 to 50 alphanumeric or '-_.' characters. *
* * @return Identifies the request and allows failed requests to be retried without the risk of running the operation * twice. If the request includes aCreatorRequestId
that matches an existing backup plan, that
* plan is returned. This parameter is optional.
* * If used, this parameter must contain 1 to 50 alphanumeric or '-_.' characters. */ public String getCreatorRequestId() { return this.creatorRequestId; } /** *
* Identifies the request and allows failed requests to be retried without the risk of running the operation twice.
* If the request includes a CreatorRequestId
that matches an existing backup plan, that plan is
* returned. This parameter is optional.
*
* If used, this parameter must contain 1 to 50 alphanumeric or '-_.' characters. *
* * @param creatorRequestId * Identifies the request and allows failed requests to be retried without the risk of running the operation * twice. If the request includes aCreatorRequestId
that matches an existing backup plan, that
* plan is returned. This parameter is optional.
* * If used, this parameter must contain 1 to 50 alphanumeric or '-_.' characters. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateBackupPlanRequest withCreatorRequestId(String creatorRequestId) { setCreatorRequestId(creatorRequestId); 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 (getBackupPlanTags() != null) sb.append("BackupPlanTags: ").append("***Sensitive Data Redacted***").append(","); if (getCreatorRequestId() != null) sb.append("CreatorRequestId: ").append(getCreatorRequestId()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateBackupPlanRequest == false) return false; CreateBackupPlanRequest other = (CreateBackupPlanRequest) obj; if (other.getBackupPlan() == null ^ this.getBackupPlan() == null) return false; if (other.getBackupPlan() != null && other.getBackupPlan().equals(this.getBackupPlan()) == false) return false; if (other.getBackupPlanTags() == null ^ this.getBackupPlanTags() == null) return false; if (other.getBackupPlanTags() != null && other.getBackupPlanTags().equals(this.getBackupPlanTags()) == false) return false; if (other.getCreatorRequestId() == null ^ this.getCreatorRequestId() == null) return false; if (other.getCreatorRequestId() != null && other.getCreatorRequestId().equals(this.getCreatorRequestId()) == 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 + ((getBackupPlanTags() == null) ? 0 : getBackupPlanTags().hashCode()); hashCode = prime * hashCode + ((getCreatorRequestId() == null) ? 0 : getCreatorRequestId().hashCode()); return hashCode; } @Override public CreateBackupPlanRequest clone() { return (CreateBackupPlanRequest) super.clone(); } }