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

com.amazonaws.services.docdbelastic.model.RestoreClusterFromSnapshotRequest Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon DocumentDB Elastic Clusters module holds the client classes that are used for communicating with Amazon DocumentDB Elastic Clusters Service

There is a newer version: 1.12.778
Show newest version
/*
 * Copyright 2019-2024 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.docdbelastic.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 RestoreClusterFromSnapshotRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {

    /**
     * 

* The name of the elastic cluster. *

*/ private String clusterName; /** *

* The KMS key identifier to use to encrypt the new Amazon DocumentDB elastic clusters cluster. *

*

* The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a * cluster using the same Amazon account that owns this KMS encryption key, you can use the KMS key alias instead of * the ARN as the KMS encryption key. *

*

* If an encryption key is not specified here, Amazon DocumentDB uses the default encryption key that KMS creates * for your account. Your account has a different default encryption key for each Amazon Region. *

*/ private String kmsKeyId; /** *

* The capacity of each shard in the new restored elastic cluster. *

*/ private Integer shardCapacity; /** *

* The number of replica instances applying to all shards in the elastic cluster. A shardInstanceCount * value of 1 means there is one writer instance, and any additional instances are replicas that can be used for * reads and to improve availability. *

*/ private Integer shardInstanceCount; /** *

* The ARN identifier of the elastic cluster snapshot. *

*/ private String snapshotArn; /** *

* The Amazon EC2 subnet IDs for the elastic cluster. *

*/ private java.util.List subnetIds; /** *

* A list of the tag names to be assigned to the restored elastic cluster, in the form of an array of key-value * pairs in which the key is the tag name and the value is the key value. *

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

* A list of EC2 VPC security groups to associate with the elastic cluster. *

*/ private java.util.List vpcSecurityGroupIds; /** *

* The name of the elastic cluster. *

* * @param clusterName * The name of the elastic cluster. */ public void setClusterName(String clusterName) { this.clusterName = clusterName; } /** *

* The name of the elastic cluster. *

* * @return The name of the elastic cluster. */ public String getClusterName() { return this.clusterName; } /** *

* The name of the elastic cluster. *

* * @param clusterName * The name of the elastic cluster. * @return Returns a reference to this object so that method calls can be chained together. */ public RestoreClusterFromSnapshotRequest withClusterName(String clusterName) { setClusterName(clusterName); return this; } /** *

* The KMS key identifier to use to encrypt the new Amazon DocumentDB elastic clusters cluster. *

*

* The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a * cluster using the same Amazon account that owns this KMS encryption key, you can use the KMS key alias instead of * the ARN as the KMS encryption key. *

*

* If an encryption key is not specified here, Amazon DocumentDB uses the default encryption key that KMS creates * for your account. Your account has a different default encryption key for each Amazon Region. *

* * @param kmsKeyId * The KMS key identifier to use to encrypt the new Amazon DocumentDB elastic clusters cluster.

*

* The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a * cluster using the same Amazon account that owns this KMS encryption key, you can use the KMS key alias * instead of the ARN as the KMS encryption key. *

*

* If an encryption key is not specified here, Amazon DocumentDB uses the default encryption key that KMS * creates for your account. Your account has a different default encryption key for each Amazon Region. */ public void setKmsKeyId(String kmsKeyId) { this.kmsKeyId = kmsKeyId; } /** *

* The KMS key identifier to use to encrypt the new Amazon DocumentDB elastic clusters cluster. *

*

* The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a * cluster using the same Amazon account that owns this KMS encryption key, you can use the KMS key alias instead of * the ARN as the KMS encryption key. *

*

* If an encryption key is not specified here, Amazon DocumentDB uses the default encryption key that KMS creates * for your account. Your account has a different default encryption key for each Amazon Region. *

* * @return The KMS key identifier to use to encrypt the new Amazon DocumentDB elastic clusters cluster.

*

* The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating * a cluster using the same Amazon account that owns this KMS encryption key, you can use the KMS key alias * instead of the ARN as the KMS encryption key. *

*

* If an encryption key is not specified here, Amazon DocumentDB uses the default encryption key that KMS * creates for your account. Your account has a different default encryption key for each Amazon Region. */ public String getKmsKeyId() { return this.kmsKeyId; } /** *

* The KMS key identifier to use to encrypt the new Amazon DocumentDB elastic clusters cluster. *

*

* The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a * cluster using the same Amazon account that owns this KMS encryption key, you can use the KMS key alias instead of * the ARN as the KMS encryption key. *

*

* If an encryption key is not specified here, Amazon DocumentDB uses the default encryption key that KMS creates * for your account. Your account has a different default encryption key for each Amazon Region. *

* * @param kmsKeyId * The KMS key identifier to use to encrypt the new Amazon DocumentDB elastic clusters cluster.

*

* The KMS key identifier is the Amazon Resource Name (ARN) for the KMS encryption key. If you are creating a * cluster using the same Amazon account that owns this KMS encryption key, you can use the KMS key alias * instead of the ARN as the KMS encryption key. *

*

* If an encryption key is not specified here, Amazon DocumentDB uses the default encryption key that KMS * creates for your account. Your account has a different default encryption key for each Amazon Region. * @return Returns a reference to this object so that method calls can be chained together. */ public RestoreClusterFromSnapshotRequest withKmsKeyId(String kmsKeyId) { setKmsKeyId(kmsKeyId); return this; } /** *

* The capacity of each shard in the new restored elastic cluster. *

* * @param shardCapacity * The capacity of each shard in the new restored elastic cluster. */ public void setShardCapacity(Integer shardCapacity) { this.shardCapacity = shardCapacity; } /** *

* The capacity of each shard in the new restored elastic cluster. *

* * @return The capacity of each shard in the new restored elastic cluster. */ public Integer getShardCapacity() { return this.shardCapacity; } /** *

* The capacity of each shard in the new restored elastic cluster. *

* * @param shardCapacity * The capacity of each shard in the new restored elastic cluster. * @return Returns a reference to this object so that method calls can be chained together. */ public RestoreClusterFromSnapshotRequest withShardCapacity(Integer shardCapacity) { setShardCapacity(shardCapacity); return this; } /** *

* The number of replica instances applying to all shards in the elastic cluster. A shardInstanceCount * value of 1 means there is one writer instance, and any additional instances are replicas that can be used for * reads and to improve availability. *

* * @param shardInstanceCount * The number of replica instances applying to all shards in the elastic cluster. A * shardInstanceCount value of 1 means there is one writer instance, and any additional * instances are replicas that can be used for reads and to improve availability. */ public void setShardInstanceCount(Integer shardInstanceCount) { this.shardInstanceCount = shardInstanceCount; } /** *

* The number of replica instances applying to all shards in the elastic cluster. A shardInstanceCount * value of 1 means there is one writer instance, and any additional instances are replicas that can be used for * reads and to improve availability. *

* * @return The number of replica instances applying to all shards in the elastic cluster. A * shardInstanceCount value of 1 means there is one writer instance, and any additional * instances are replicas that can be used for reads and to improve availability. */ public Integer getShardInstanceCount() { return this.shardInstanceCount; } /** *

* The number of replica instances applying to all shards in the elastic cluster. A shardInstanceCount * value of 1 means there is one writer instance, and any additional instances are replicas that can be used for * reads and to improve availability. *

* * @param shardInstanceCount * The number of replica instances applying to all shards in the elastic cluster. A * shardInstanceCount value of 1 means there is one writer instance, and any additional * instances are replicas that can be used for reads and to improve availability. * @return Returns a reference to this object so that method calls can be chained together. */ public RestoreClusterFromSnapshotRequest withShardInstanceCount(Integer shardInstanceCount) { setShardInstanceCount(shardInstanceCount); return this; } /** *

* The ARN identifier of the elastic cluster snapshot. *

* * @param snapshotArn * The ARN identifier of the elastic cluster snapshot. */ public void setSnapshotArn(String snapshotArn) { this.snapshotArn = snapshotArn; } /** *

* The ARN identifier of the elastic cluster snapshot. *

* * @return The ARN identifier of the elastic cluster snapshot. */ public String getSnapshotArn() { return this.snapshotArn; } /** *

* The ARN identifier of the elastic cluster snapshot. *

* * @param snapshotArn * The ARN identifier of the elastic cluster snapshot. * @return Returns a reference to this object so that method calls can be chained together. */ public RestoreClusterFromSnapshotRequest withSnapshotArn(String snapshotArn) { setSnapshotArn(snapshotArn); return this; } /** *

* The Amazon EC2 subnet IDs for the elastic cluster. *

* * @return The Amazon EC2 subnet IDs for the elastic cluster. */ public java.util.List getSubnetIds() { return subnetIds; } /** *

* The Amazon EC2 subnet IDs for the elastic cluster. *

* * @param subnetIds * The Amazon EC2 subnet IDs for the elastic cluster. */ public void setSubnetIds(java.util.Collection subnetIds) { if (subnetIds == null) { this.subnetIds = null; return; } this.subnetIds = new java.util.ArrayList(subnetIds); } /** *

* The Amazon EC2 subnet IDs for the elastic cluster. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setSubnetIds(java.util.Collection)} or {@link #withSubnetIds(java.util.Collection)} if you want to * override the existing values. *

* * @param subnetIds * The Amazon EC2 subnet IDs for the elastic cluster. * @return Returns a reference to this object so that method calls can be chained together. */ public RestoreClusterFromSnapshotRequest withSubnetIds(String... subnetIds) { if (this.subnetIds == null) { setSubnetIds(new java.util.ArrayList(subnetIds.length)); } for (String ele : subnetIds) { this.subnetIds.add(ele); } return this; } /** *

* The Amazon EC2 subnet IDs for the elastic cluster. *

* * @param subnetIds * The Amazon EC2 subnet IDs for the elastic cluster. * @return Returns a reference to this object so that method calls can be chained together. */ public RestoreClusterFromSnapshotRequest withSubnetIds(java.util.Collection subnetIds) { setSubnetIds(subnetIds); return this; } /** *

* A list of the tag names to be assigned to the restored elastic cluster, in the form of an array of key-value * pairs in which the key is the tag name and the value is the key value. *

* * @return A list of the tag names to be assigned to the restored elastic cluster, in the form of an array of * key-value pairs in which the key is the tag name and the value is the key value. */ public java.util.Map getTags() { return tags; } /** *

* A list of the tag names to be assigned to the restored elastic cluster, in the form of an array of key-value * pairs in which the key is the tag name and the value is the key value. *

* * @param tags * A list of the tag names to be assigned to the restored elastic cluster, in the form of an array of * key-value pairs in which the key is the tag name and the value is the key value. */ public void setTags(java.util.Map tags) { this.tags = tags; } /** *

* A list of the tag names to be assigned to the restored elastic cluster, in the form of an array of key-value * pairs in which the key is the tag name and the value is the key value. *

* * @param tags * A list of the tag names to be assigned to the restored elastic cluster, in the form of an array of * key-value pairs in which the key is the tag name and the value is the key value. * @return Returns a reference to this object so that method calls can be chained together. */ public RestoreClusterFromSnapshotRequest withTags(java.util.Map tags) { setTags(tags); return this; } /** * Add a single Tags entry * * @see RestoreClusterFromSnapshotRequest#withTags * @returns a reference to this object so that method calls can be chained together. */ public RestoreClusterFromSnapshotRequest addTagsEntry(String key, String value) { if (null == this.tags) { this.tags = new java.util.HashMap(); } if (this.tags.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.tags.put(key, value); return this; } /** * Removes all the entries added into Tags. * * @return Returns a reference to this object so that method calls can be chained together. */ public RestoreClusterFromSnapshotRequest clearTagsEntries() { this.tags = null; return this; } /** *

* A list of EC2 VPC security groups to associate with the elastic cluster. *

* * @return A list of EC2 VPC security groups to associate with the elastic cluster. */ public java.util.List getVpcSecurityGroupIds() { return vpcSecurityGroupIds; } /** *

* A list of EC2 VPC security groups to associate with the elastic cluster. *

* * @param vpcSecurityGroupIds * A list of EC2 VPC security groups to associate with the elastic cluster. */ public void setVpcSecurityGroupIds(java.util.Collection vpcSecurityGroupIds) { if (vpcSecurityGroupIds == null) { this.vpcSecurityGroupIds = null; return; } this.vpcSecurityGroupIds = new java.util.ArrayList(vpcSecurityGroupIds); } /** *

* A list of EC2 VPC security groups to associate with the elastic cluster. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setVpcSecurityGroupIds(java.util.Collection)} or {@link #withVpcSecurityGroupIds(java.util.Collection)} * if you want to override the existing values. *

* * @param vpcSecurityGroupIds * A list of EC2 VPC security groups to associate with the elastic cluster. * @return Returns a reference to this object so that method calls can be chained together. */ public RestoreClusterFromSnapshotRequest withVpcSecurityGroupIds(String... vpcSecurityGroupIds) { if (this.vpcSecurityGroupIds == null) { setVpcSecurityGroupIds(new java.util.ArrayList(vpcSecurityGroupIds.length)); } for (String ele : vpcSecurityGroupIds) { this.vpcSecurityGroupIds.add(ele); } return this; } /** *

* A list of EC2 VPC security groups to associate with the elastic cluster. *

* * @param vpcSecurityGroupIds * A list of EC2 VPC security groups to associate with the elastic cluster. * @return Returns a reference to this object so that method calls can be chained together. */ public RestoreClusterFromSnapshotRequest withVpcSecurityGroupIds(java.util.Collection vpcSecurityGroupIds) { setVpcSecurityGroupIds(vpcSecurityGroupIds); 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 (getClusterName() != null) sb.append("ClusterName: ").append(getClusterName()).append(","); if (getKmsKeyId() != null) sb.append("KmsKeyId: ").append(getKmsKeyId()).append(","); if (getShardCapacity() != null) sb.append("ShardCapacity: ").append(getShardCapacity()).append(","); if (getShardInstanceCount() != null) sb.append("ShardInstanceCount: ").append(getShardInstanceCount()).append(","); if (getSnapshotArn() != null) sb.append("SnapshotArn: ").append(getSnapshotArn()).append(","); if (getSubnetIds() != null) sb.append("SubnetIds: ").append(getSubnetIds()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()).append(","); if (getVpcSecurityGroupIds() != null) sb.append("VpcSecurityGroupIds: ").append(getVpcSecurityGroupIds()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof RestoreClusterFromSnapshotRequest == false) return false; RestoreClusterFromSnapshotRequest other = (RestoreClusterFromSnapshotRequest) obj; if (other.getClusterName() == null ^ this.getClusterName() == null) return false; if (other.getClusterName() != null && other.getClusterName().equals(this.getClusterName()) == false) return false; if (other.getKmsKeyId() == null ^ this.getKmsKeyId() == null) return false; if (other.getKmsKeyId() != null && other.getKmsKeyId().equals(this.getKmsKeyId()) == false) return false; if (other.getShardCapacity() == null ^ this.getShardCapacity() == null) return false; if (other.getShardCapacity() != null && other.getShardCapacity().equals(this.getShardCapacity()) == false) return false; if (other.getShardInstanceCount() == null ^ this.getShardInstanceCount() == null) return false; if (other.getShardInstanceCount() != null && other.getShardInstanceCount().equals(this.getShardInstanceCount()) == false) return false; if (other.getSnapshotArn() == null ^ this.getSnapshotArn() == null) return false; if (other.getSnapshotArn() != null && other.getSnapshotArn().equals(this.getSnapshotArn()) == false) return false; if (other.getSubnetIds() == null ^ this.getSubnetIds() == null) return false; if (other.getSubnetIds() != null && other.getSubnetIds().equals(this.getSubnetIds()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; if (other.getVpcSecurityGroupIds() == null ^ this.getVpcSecurityGroupIds() == null) return false; if (other.getVpcSecurityGroupIds() != null && other.getVpcSecurityGroupIds().equals(this.getVpcSecurityGroupIds()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getClusterName() == null) ? 0 : getClusterName().hashCode()); hashCode = prime * hashCode + ((getKmsKeyId() == null) ? 0 : getKmsKeyId().hashCode()); hashCode = prime * hashCode + ((getShardCapacity() == null) ? 0 : getShardCapacity().hashCode()); hashCode = prime * hashCode + ((getShardInstanceCount() == null) ? 0 : getShardInstanceCount().hashCode()); hashCode = prime * hashCode + ((getSnapshotArn() == null) ? 0 : getSnapshotArn().hashCode()); hashCode = prime * hashCode + ((getSubnetIds() == null) ? 0 : getSubnetIds().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); hashCode = prime * hashCode + ((getVpcSecurityGroupIds() == null) ? 0 : getVpcSecurityGroupIds().hashCode()); return hashCode; } @Override public RestoreClusterFromSnapshotRequest clone() { return (RestoreClusterFromSnapshotRequest) super.clone(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy