All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.backup.model.CreateBackupVaultRequest Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Backup module holds the client classes that are used for communicating with AWS Backup Service

There is a newer version: 1.12.780
Show newest version
/*
 * Copyright 2017-2022 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 CreateBackupVaultRequest 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 * letters, numbers, and hyphens. *

*/ private String backupVaultName; /** *

* Metadata that you can assign to help organize the resources that you create. Each tag is a key-value pair. *

*/ private java.util.Map backupVaultTags; /** *

* The server-side encryption key that is used to protect your backups; for example, * arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab. *

*/ private String encryptionKeyArn; /** *

* A unique string that identifies the request and allows failed requests to be retried without the risk of running * the operation twice. This parameter is optional. *

*

* If used, this parameter must contain 1 to 50 alphanumeric or '-_.' characters. *

*/ private String creatorRequestId; /** *

* 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 * 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 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 * 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 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 * 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 letters, numbers, and hyphens. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateBackupVaultRequest withBackupVaultName(String backupVaultName) { setBackupVaultName(backupVaultName); return this; } /** *

* Metadata that you can assign to help organize the resources that you create. Each tag is a key-value pair. *

* * @return Metadata that you can assign to help organize the resources that you create. Each tag is a key-value * pair. */ public java.util.Map getBackupVaultTags() { return backupVaultTags; } /** *

* Metadata that you can assign to help organize the resources that you create. Each tag is a key-value pair. *

* * @param backupVaultTags * Metadata that you can assign to help organize the resources that you create. Each tag is a key-value pair. */ public void setBackupVaultTags(java.util.Map backupVaultTags) { this.backupVaultTags = backupVaultTags; } /** *

* Metadata that you can assign to help organize the resources that you create. Each tag is a key-value pair. *

* * @param backupVaultTags * Metadata that you can assign to help organize the resources that you create. Each tag is a key-value pair. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateBackupVaultRequest withBackupVaultTags(java.util.Map backupVaultTags) { setBackupVaultTags(backupVaultTags); return this; } /** * Add a single BackupVaultTags entry * * @see CreateBackupVaultRequest#withBackupVaultTags * @returns a reference to this object so that method calls can be chained together. */ public CreateBackupVaultRequest addBackupVaultTagsEntry(String key, String value) { if (null == this.backupVaultTags) { this.backupVaultTags = new java.util.HashMap(); } if (this.backupVaultTags.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.backupVaultTags.put(key, value); return this; } /** * Removes all the entries added into BackupVaultTags. * * @return Returns a reference to this object so that method calls can be chained together. */ public CreateBackupVaultRequest clearBackupVaultTagsEntries() { this.backupVaultTags = null; return this; } /** *

* The server-side encryption key that is used to protect your backups; for example, * arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab. *

* * @param encryptionKeyArn * The server-side encryption key that is used to protect your backups; for example, * arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab. */ public void setEncryptionKeyArn(String encryptionKeyArn) { this.encryptionKeyArn = encryptionKeyArn; } /** *

* The server-side encryption key that is used to protect your backups; for example, * arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab. *

* * @return The server-side encryption key that is used to protect your backups; for example, * arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab. */ public String getEncryptionKeyArn() { return this.encryptionKeyArn; } /** *

* The server-side encryption key that is used to protect your backups; for example, * arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab. *

* * @param encryptionKeyArn * The server-side encryption key that is used to protect your backups; for example, * arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateBackupVaultRequest withEncryptionKeyArn(String encryptionKeyArn) { setEncryptionKeyArn(encryptionKeyArn); return this; } /** *

* A unique string that identifies the request and allows failed requests to be retried without the risk of running * the operation twice. This parameter is optional. *

*

* If used, this parameter must contain 1 to 50 alphanumeric or '-_.' characters. *

* * @param creatorRequestId * A unique string that identifies the request and allows failed requests to be retried without the risk of * running the operation twice. This parameter is optional.

*

* If used, this parameter must contain 1 to 50 alphanumeric or '-_.' characters. */ public void setCreatorRequestId(String creatorRequestId) { this.creatorRequestId = creatorRequestId; } /** *

* A unique string that identifies the request and allows failed requests to be retried without the risk of running * the operation twice. This parameter is optional. *

*

* If used, this parameter must contain 1 to 50 alphanumeric or '-_.' characters. *

* * @return A unique string that identifies the request and allows failed requests to be retried without the risk of * running the operation twice. This parameter is optional.

*

* If used, this parameter must contain 1 to 50 alphanumeric or '-_.' characters. */ public String getCreatorRequestId() { return this.creatorRequestId; } /** *

* A unique string that identifies the request and allows failed requests to be retried without the risk of running * the operation twice. This parameter is optional. *

*

* If used, this parameter must contain 1 to 50 alphanumeric or '-_.' characters. *

* * @param creatorRequestId * A unique string that identifies the request and allows failed requests to be retried without the risk of * running the operation twice. 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 CreateBackupVaultRequest 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 (getBackupVaultName() != null) sb.append("BackupVaultName: ").append(getBackupVaultName()).append(","); if (getBackupVaultTags() != null) sb.append("BackupVaultTags: ").append("***Sensitive Data Redacted***").append(","); if (getEncryptionKeyArn() != null) sb.append("EncryptionKeyArn: ").append(getEncryptionKeyArn()).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 CreateBackupVaultRequest == false) return false; CreateBackupVaultRequest other = (CreateBackupVaultRequest) obj; if (other.getBackupVaultName() == null ^ this.getBackupVaultName() == null) return false; if (other.getBackupVaultName() != null && other.getBackupVaultName().equals(this.getBackupVaultName()) == false) return false; if (other.getBackupVaultTags() == null ^ this.getBackupVaultTags() == null) return false; if (other.getBackupVaultTags() != null && other.getBackupVaultTags().equals(this.getBackupVaultTags()) == false) return false; if (other.getEncryptionKeyArn() == null ^ this.getEncryptionKeyArn() == null) return false; if (other.getEncryptionKeyArn() != null && other.getEncryptionKeyArn().equals(this.getEncryptionKeyArn()) == 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 + ((getBackupVaultName() == null) ? 0 : getBackupVaultName().hashCode()); hashCode = prime * hashCode + ((getBackupVaultTags() == null) ? 0 : getBackupVaultTags().hashCode()); hashCode = prime * hashCode + ((getEncryptionKeyArn() == null) ? 0 : getEncryptionKeyArn().hashCode()); hashCode = prime * hashCode + ((getCreatorRequestId() == null) ? 0 : getCreatorRequestId().hashCode()); return hashCode; } @Override public CreateBackupVaultRequest clone() { return (CreateBackupVaultRequest) super.clone(); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy