com.amazonaws.services.finspace.model.CreateKxVolumeRequest Maven / Gradle / Ivy
/*
* 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.finspace.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 CreateKxVolumeRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* A token that ensures idempotency. This token expires in 10 minutes.
*
*/
private String clientToken;
/**
*
* A unique identifier for the kdb environment, whose clusters can attach to the volume.
*
*/
private String environmentId;
/**
*
* The type of file system volume. Currently, FinSpace only supports NAS_1
volume type. When you select
* NAS_1
volume type, you must also provide nas1Configuration
.
*
*/
private String volumeType;
/**
*
* A unique identifier for the volume.
*
*/
private String volumeName;
/**
*
* A description of the volume.
*
*/
private String description;
/**
*
* Specifies the configuration for the Network attached storage (NAS_1) file system volume. This parameter is
* required when you choose volumeType
as NAS_1.
*
*/
private KxNAS1Configuration nas1Configuration;
/**
*
* The number of availability zones you want to assign per volume. Currently, FinSpace only supports
* SINGLE
for volumes. This places dataview in a single AZ.
*
*/
private String azMode;
/**
*
* The identifier of the availability zones.
*
*/
private java.util.List availabilityZoneIds;
/**
*
* A list of key-value pairs to label the volume. You can add up to 50 tags to a volume.
*
*/
private java.util.Map tags;
/**
*
* A token that ensures idempotency. This token expires in 10 minutes.
*
*
* @param clientToken
* A token that ensures idempotency. This token expires in 10 minutes.
*/
public void setClientToken(String clientToken) {
this.clientToken = clientToken;
}
/**
*
* A token that ensures idempotency. This token expires in 10 minutes.
*
*
* @return A token that ensures idempotency. This token expires in 10 minutes.
*/
public String getClientToken() {
return this.clientToken;
}
/**
*
* A token that ensures idempotency. This token expires in 10 minutes.
*
*
* @param clientToken
* A token that ensures idempotency. This token expires in 10 minutes.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateKxVolumeRequest withClientToken(String clientToken) {
setClientToken(clientToken);
return this;
}
/**
*
* A unique identifier for the kdb environment, whose clusters can attach to the volume.
*
*
* @param environmentId
* A unique identifier for the kdb environment, whose clusters can attach to the volume.
*/
public void setEnvironmentId(String environmentId) {
this.environmentId = environmentId;
}
/**
*
* A unique identifier for the kdb environment, whose clusters can attach to the volume.
*
*
* @return A unique identifier for the kdb environment, whose clusters can attach to the volume.
*/
public String getEnvironmentId() {
return this.environmentId;
}
/**
*
* A unique identifier for the kdb environment, whose clusters can attach to the volume.
*
*
* @param environmentId
* A unique identifier for the kdb environment, whose clusters can attach to the volume.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateKxVolumeRequest withEnvironmentId(String environmentId) {
setEnvironmentId(environmentId);
return this;
}
/**
*
* The type of file system volume. Currently, FinSpace only supports NAS_1
volume type. When you select
* NAS_1
volume type, you must also provide nas1Configuration
.
*
*
* @param volumeType
* The type of file system volume. Currently, FinSpace only supports NAS_1
volume type. When you
* select NAS_1
volume type, you must also provide nas1Configuration
.
* @see KxVolumeType
*/
public void setVolumeType(String volumeType) {
this.volumeType = volumeType;
}
/**
*
* The type of file system volume. Currently, FinSpace only supports NAS_1
volume type. When you select
* NAS_1
volume type, you must also provide nas1Configuration
.
*
*
* @return The type of file system volume. Currently, FinSpace only supports NAS_1
volume type. When
* you select NAS_1
volume type, you must also provide nas1Configuration
.
* @see KxVolumeType
*/
public String getVolumeType() {
return this.volumeType;
}
/**
*
* The type of file system volume. Currently, FinSpace only supports NAS_1
volume type. When you select
* NAS_1
volume type, you must also provide nas1Configuration
.
*
*
* @param volumeType
* The type of file system volume. Currently, FinSpace only supports NAS_1
volume type. When you
* select NAS_1
volume type, you must also provide nas1Configuration
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see KxVolumeType
*/
public CreateKxVolumeRequest withVolumeType(String volumeType) {
setVolumeType(volumeType);
return this;
}
/**
*
* The type of file system volume. Currently, FinSpace only supports NAS_1
volume type. When you select
* NAS_1
volume type, you must also provide nas1Configuration
.
*
*
* @param volumeType
* The type of file system volume. Currently, FinSpace only supports NAS_1
volume type. When you
* select NAS_1
volume type, you must also provide nas1Configuration
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see KxVolumeType
*/
public CreateKxVolumeRequest withVolumeType(KxVolumeType volumeType) {
this.volumeType = volumeType.toString();
return this;
}
/**
*
* A unique identifier for the volume.
*
*
* @param volumeName
* A unique identifier for the volume.
*/
public void setVolumeName(String volumeName) {
this.volumeName = volumeName;
}
/**
*
* A unique identifier for the volume.
*
*
* @return A unique identifier for the volume.
*/
public String getVolumeName() {
return this.volumeName;
}
/**
*
* A unique identifier for the volume.
*
*
* @param volumeName
* A unique identifier for the volume.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateKxVolumeRequest withVolumeName(String volumeName) {
setVolumeName(volumeName);
return this;
}
/**
*
* A description of the volume.
*
*
* @param description
* A description of the volume.
*/
public void setDescription(String description) {
this.description = description;
}
/**
*
* A description of the volume.
*
*
* @return A description of the volume.
*/
public String getDescription() {
return this.description;
}
/**
*
* A description of the volume.
*
*
* @param description
* A description of the volume.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateKxVolumeRequest withDescription(String description) {
setDescription(description);
return this;
}
/**
*
* Specifies the configuration for the Network attached storage (NAS_1) file system volume. This parameter is
* required when you choose volumeType
as NAS_1.
*
*
* @param nas1Configuration
* Specifies the configuration for the Network attached storage (NAS_1) file system volume. This parameter is
* required when you choose volumeType
as NAS_1.
*/
public void setNas1Configuration(KxNAS1Configuration nas1Configuration) {
this.nas1Configuration = nas1Configuration;
}
/**
*
* Specifies the configuration for the Network attached storage (NAS_1) file system volume. This parameter is
* required when you choose volumeType
as NAS_1.
*
*
* @return Specifies the configuration for the Network attached storage (NAS_1) file system volume. This parameter
* is required when you choose volumeType
as NAS_1.
*/
public KxNAS1Configuration getNas1Configuration() {
return this.nas1Configuration;
}
/**
*
* Specifies the configuration for the Network attached storage (NAS_1) file system volume. This parameter is
* required when you choose volumeType
as NAS_1.
*
*
* @param nas1Configuration
* Specifies the configuration for the Network attached storage (NAS_1) file system volume. This parameter is
* required when you choose volumeType
as NAS_1.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateKxVolumeRequest withNas1Configuration(KxNAS1Configuration nas1Configuration) {
setNas1Configuration(nas1Configuration);
return this;
}
/**
*
* The number of availability zones you want to assign per volume. Currently, FinSpace only supports
* SINGLE
for volumes. This places dataview in a single AZ.
*
*
* @param azMode
* The number of availability zones you want to assign per volume. Currently, FinSpace only supports
* SINGLE
for volumes. This places dataview in a single AZ.
* @see KxAzMode
*/
public void setAzMode(String azMode) {
this.azMode = azMode;
}
/**
*
* The number of availability zones you want to assign per volume. Currently, FinSpace only supports
* SINGLE
for volumes. This places dataview in a single AZ.
*
*
* @return The number of availability zones you want to assign per volume. Currently, FinSpace only supports
* SINGLE
for volumes. This places dataview in a single AZ.
* @see KxAzMode
*/
public String getAzMode() {
return this.azMode;
}
/**
*
* The number of availability zones you want to assign per volume. Currently, FinSpace only supports
* SINGLE
for volumes. This places dataview in a single AZ.
*
*
* @param azMode
* The number of availability zones you want to assign per volume. Currently, FinSpace only supports
* SINGLE
for volumes. This places dataview in a single AZ.
* @return Returns a reference to this object so that method calls can be chained together.
* @see KxAzMode
*/
public CreateKxVolumeRequest withAzMode(String azMode) {
setAzMode(azMode);
return this;
}
/**
*
* The number of availability zones you want to assign per volume. Currently, FinSpace only supports
* SINGLE
for volumes. This places dataview in a single AZ.
*
*
* @param azMode
* The number of availability zones you want to assign per volume. Currently, FinSpace only supports
* SINGLE
for volumes. This places dataview in a single AZ.
* @return Returns a reference to this object so that method calls can be chained together.
* @see KxAzMode
*/
public CreateKxVolumeRequest withAzMode(KxAzMode azMode) {
this.azMode = azMode.toString();
return this;
}
/**
*
* The identifier of the availability zones.
*
*
* @return The identifier of the availability zones.
*/
public java.util.List getAvailabilityZoneIds() {
return availabilityZoneIds;
}
/**
*
* The identifier of the availability zones.
*
*
* @param availabilityZoneIds
* The identifier of the availability zones.
*/
public void setAvailabilityZoneIds(java.util.Collection availabilityZoneIds) {
if (availabilityZoneIds == null) {
this.availabilityZoneIds = null;
return;
}
this.availabilityZoneIds = new java.util.ArrayList(availabilityZoneIds);
}
/**
*
* The identifier of the availability zones.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setAvailabilityZoneIds(java.util.Collection)} or {@link #withAvailabilityZoneIds(java.util.Collection)}
* if you want to override the existing values.
*
*
* @param availabilityZoneIds
* The identifier of the availability zones.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateKxVolumeRequest withAvailabilityZoneIds(String... availabilityZoneIds) {
if (this.availabilityZoneIds == null) {
setAvailabilityZoneIds(new java.util.ArrayList(availabilityZoneIds.length));
}
for (String ele : availabilityZoneIds) {
this.availabilityZoneIds.add(ele);
}
return this;
}
/**
*
* The identifier of the availability zones.
*
*
* @param availabilityZoneIds
* The identifier of the availability zones.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateKxVolumeRequest withAvailabilityZoneIds(java.util.Collection availabilityZoneIds) {
setAvailabilityZoneIds(availabilityZoneIds);
return this;
}
/**
*
* A list of key-value pairs to label the volume. You can add up to 50 tags to a volume.
*
*
* @return A list of key-value pairs to label the volume. You can add up to 50 tags to a volume.
*/
public java.util.Map getTags() {
return tags;
}
/**
*
* A list of key-value pairs to label the volume. You can add up to 50 tags to a volume.
*
*
* @param tags
* A list of key-value pairs to label the volume. You can add up to 50 tags to a volume.
*/
public void setTags(java.util.Map tags) {
this.tags = tags;
}
/**
*
* A list of key-value pairs to label the volume. You can add up to 50 tags to a volume.
*
*
* @param tags
* A list of key-value pairs to label the volume. You can add up to 50 tags to a volume.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateKxVolumeRequest withTags(java.util.Map tags) {
setTags(tags);
return this;
}
/**
* Add a single Tags entry
*
* @see CreateKxVolumeRequest#withTags
* @returns a reference to this object so that method calls can be chained together.
*/
public CreateKxVolumeRequest 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 CreateKxVolumeRequest clearTagsEntries() {
this.tags = null;
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 (getClientToken() != null)
sb.append("ClientToken: ").append(getClientToken()).append(",");
if (getEnvironmentId() != null)
sb.append("EnvironmentId: ").append(getEnvironmentId()).append(",");
if (getVolumeType() != null)
sb.append("VolumeType: ").append(getVolumeType()).append(",");
if (getVolumeName() != null)
sb.append("VolumeName: ").append(getVolumeName()).append(",");
if (getDescription() != null)
sb.append("Description: ").append(getDescription()).append(",");
if (getNas1Configuration() != null)
sb.append("Nas1Configuration: ").append(getNas1Configuration()).append(",");
if (getAzMode() != null)
sb.append("AzMode: ").append(getAzMode()).append(",");
if (getAvailabilityZoneIds() != null)
sb.append("AvailabilityZoneIds: ").append(getAvailabilityZoneIds()).append(",");
if (getTags() != null)
sb.append("Tags: ").append(getTags());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CreateKxVolumeRequest == false)
return false;
CreateKxVolumeRequest other = (CreateKxVolumeRequest) obj;
if (other.getClientToken() == null ^ this.getClientToken() == null)
return false;
if (other.getClientToken() != null && other.getClientToken().equals(this.getClientToken()) == false)
return false;
if (other.getEnvironmentId() == null ^ this.getEnvironmentId() == null)
return false;
if (other.getEnvironmentId() != null && other.getEnvironmentId().equals(this.getEnvironmentId()) == false)
return false;
if (other.getVolumeType() == null ^ this.getVolumeType() == null)
return false;
if (other.getVolumeType() != null && other.getVolumeType().equals(this.getVolumeType()) == false)
return false;
if (other.getVolumeName() == null ^ this.getVolumeName() == null)
return false;
if (other.getVolumeName() != null && other.getVolumeName().equals(this.getVolumeName()) == false)
return false;
if (other.getDescription() == null ^ this.getDescription() == null)
return false;
if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false)
return false;
if (other.getNas1Configuration() == null ^ this.getNas1Configuration() == null)
return false;
if (other.getNas1Configuration() != null && other.getNas1Configuration().equals(this.getNas1Configuration()) == false)
return false;
if (other.getAzMode() == null ^ this.getAzMode() == null)
return false;
if (other.getAzMode() != null && other.getAzMode().equals(this.getAzMode()) == false)
return false;
if (other.getAvailabilityZoneIds() == null ^ this.getAvailabilityZoneIds() == null)
return false;
if (other.getAvailabilityZoneIds() != null && other.getAvailabilityZoneIds().equals(this.getAvailabilityZoneIds()) == false)
return false;
if (other.getTags() == null ^ this.getTags() == null)
return false;
if (other.getTags() != null && other.getTags().equals(this.getTags()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getClientToken() == null) ? 0 : getClientToken().hashCode());
hashCode = prime * hashCode + ((getEnvironmentId() == null) ? 0 : getEnvironmentId().hashCode());
hashCode = prime * hashCode + ((getVolumeType() == null) ? 0 : getVolumeType().hashCode());
hashCode = prime * hashCode + ((getVolumeName() == null) ? 0 : getVolumeName().hashCode());
hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode());
hashCode = prime * hashCode + ((getNas1Configuration() == null) ? 0 : getNas1Configuration().hashCode());
hashCode = prime * hashCode + ((getAzMode() == null) ? 0 : getAzMode().hashCode());
hashCode = prime * hashCode + ((getAvailabilityZoneIds() == null) ? 0 : getAvailabilityZoneIds().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
return hashCode;
}
@Override
public CreateKxVolumeRequest clone() {
return (CreateKxVolumeRequest) super.clone();
}
}