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

com.amazonaws.services.redshiftserverless.model.CreateNamespaceRequest Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.12.780
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.redshiftserverless.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 CreateNamespaceRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {

    /**
     * 

* The ID of the Key Management Service (KMS) key used to encrypt and store the namespace's admin credentials * secret. You can only use this parameter if manageAdminPassword is true. *

*/ private String adminPasswordSecretKmsKeyId; /** *

* The password of the administrator for the first database created in the namespace. *

*

* You can't use adminUserPassword if manageAdminPassword is true. *

*/ private String adminUserPassword; /** *

* The username of the administrator for the first database created in the namespace. *

*/ private String adminUsername; /** *

* The name of the first database created in the namespace. *

*/ private String dbName; /** *

* The Amazon Resource Name (ARN) of the IAM role to set as a default in the namespace. *

*/ private String defaultIamRoleArn; /** *

* A list of IAM roles to associate with the namespace. *

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

* The ID of the Amazon Web Services Key Management Service key used to encrypt your data. *

*/ private String kmsKeyId; /** *

* The types of logs the namespace can export. Available export types are userlog, * connectionlog, and useractivitylog. *

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

* If true, Amazon Redshift uses Secrets Manager to manage the namespace's admin credentials. You can't * use adminUserPassword if manageAdminPassword is true. If * manageAdminPassword is false or not set, Amazon Redshift uses adminUserPassword for the * admin user account's password. *

*/ private Boolean manageAdminPassword; /** *

* The name of the namespace. *

*/ private String namespaceName; /** *

* The ARN for the Redshift application that integrates with IAM Identity Center. *

*/ private String redshiftIdcApplicationArn; /** *

* A list of tag instances. *

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

* The ID of the Key Management Service (KMS) key used to encrypt and store the namespace's admin credentials * secret. You can only use this parameter if manageAdminPassword is true. *

* * @param adminPasswordSecretKmsKeyId * The ID of the Key Management Service (KMS) key used to encrypt and store the namespace's admin credentials * secret. You can only use this parameter if manageAdminPassword is true. */ public void setAdminPasswordSecretKmsKeyId(String adminPasswordSecretKmsKeyId) { this.adminPasswordSecretKmsKeyId = adminPasswordSecretKmsKeyId; } /** *

* The ID of the Key Management Service (KMS) key used to encrypt and store the namespace's admin credentials * secret. You can only use this parameter if manageAdminPassword is true. *

* * @return The ID of the Key Management Service (KMS) key used to encrypt and store the namespace's admin * credentials secret. You can only use this parameter if manageAdminPassword is true. */ public String getAdminPasswordSecretKmsKeyId() { return this.adminPasswordSecretKmsKeyId; } /** *

* The ID of the Key Management Service (KMS) key used to encrypt and store the namespace's admin credentials * secret. You can only use this parameter if manageAdminPassword is true. *

* * @param adminPasswordSecretKmsKeyId * The ID of the Key Management Service (KMS) key used to encrypt and store the namespace's admin credentials * secret. You can only use this parameter if manageAdminPassword is true. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateNamespaceRequest withAdminPasswordSecretKmsKeyId(String adminPasswordSecretKmsKeyId) { setAdminPasswordSecretKmsKeyId(adminPasswordSecretKmsKeyId); return this; } /** *

* The password of the administrator for the first database created in the namespace. *

*

* You can't use adminUserPassword if manageAdminPassword is true. *

* * @param adminUserPassword * The password of the administrator for the first database created in the namespace.

*

* You can't use adminUserPassword if manageAdminPassword is true. */ public void setAdminUserPassword(String adminUserPassword) { this.adminUserPassword = adminUserPassword; } /** *

* The password of the administrator for the first database created in the namespace. *

*

* You can't use adminUserPassword if manageAdminPassword is true. *

* * @return The password of the administrator for the first database created in the namespace.

*

* You can't use adminUserPassword if manageAdminPassword is true. */ public String getAdminUserPassword() { return this.adminUserPassword; } /** *

* The password of the administrator for the first database created in the namespace. *

*

* You can't use adminUserPassword if manageAdminPassword is true. *

* * @param adminUserPassword * The password of the administrator for the first database created in the namespace.

*

* You can't use adminUserPassword if manageAdminPassword is true. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateNamespaceRequest withAdminUserPassword(String adminUserPassword) { setAdminUserPassword(adminUserPassword); return this; } /** *

* The username of the administrator for the first database created in the namespace. *

* * @param adminUsername * The username of the administrator for the first database created in the namespace. */ public void setAdminUsername(String adminUsername) { this.adminUsername = adminUsername; } /** *

* The username of the administrator for the first database created in the namespace. *

* * @return The username of the administrator for the first database created in the namespace. */ public String getAdminUsername() { return this.adminUsername; } /** *

* The username of the administrator for the first database created in the namespace. *

* * @param adminUsername * The username of the administrator for the first database created in the namespace. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateNamespaceRequest withAdminUsername(String adminUsername) { setAdminUsername(adminUsername); return this; } /** *

* The name of the first database created in the namespace. *

* * @param dbName * The name of the first database created in the namespace. */ public void setDbName(String dbName) { this.dbName = dbName; } /** *

* The name of the first database created in the namespace. *

* * @return The name of the first database created in the namespace. */ public String getDbName() { return this.dbName; } /** *

* The name of the first database created in the namespace. *

* * @param dbName * The name of the first database created in the namespace. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateNamespaceRequest withDbName(String dbName) { setDbName(dbName); return this; } /** *

* The Amazon Resource Name (ARN) of the IAM role to set as a default in the namespace. *

* * @param defaultIamRoleArn * The Amazon Resource Name (ARN) of the IAM role to set as a default in the namespace. */ public void setDefaultIamRoleArn(String defaultIamRoleArn) { this.defaultIamRoleArn = defaultIamRoleArn; } /** *

* The Amazon Resource Name (ARN) of the IAM role to set as a default in the namespace. *

* * @return The Amazon Resource Name (ARN) of the IAM role to set as a default in the namespace. */ public String getDefaultIamRoleArn() { return this.defaultIamRoleArn; } /** *

* The Amazon Resource Name (ARN) of the IAM role to set as a default in the namespace. *

* * @param defaultIamRoleArn * The Amazon Resource Name (ARN) of the IAM role to set as a default in the namespace. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateNamespaceRequest withDefaultIamRoleArn(String defaultIamRoleArn) { setDefaultIamRoleArn(defaultIamRoleArn); return this; } /** *

* A list of IAM roles to associate with the namespace. *

* * @return A list of IAM roles to associate with the namespace. */ public java.util.List getIamRoles() { return iamRoles; } /** *

* A list of IAM roles to associate with the namespace. *

* * @param iamRoles * A list of IAM roles to associate with the namespace. */ public void setIamRoles(java.util.Collection iamRoles) { if (iamRoles == null) { this.iamRoles = null; return; } this.iamRoles = new java.util.ArrayList(iamRoles); } /** *

* A list of IAM roles to associate with the namespace. *

*

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

* * @param iamRoles * A list of IAM roles to associate with the namespace. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateNamespaceRequest withIamRoles(String... iamRoles) { if (this.iamRoles == null) { setIamRoles(new java.util.ArrayList(iamRoles.length)); } for (String ele : iamRoles) { this.iamRoles.add(ele); } return this; } /** *

* A list of IAM roles to associate with the namespace. *

* * @param iamRoles * A list of IAM roles to associate with the namespace. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateNamespaceRequest withIamRoles(java.util.Collection iamRoles) { setIamRoles(iamRoles); return this; } /** *

* The ID of the Amazon Web Services Key Management Service key used to encrypt your data. *

* * @param kmsKeyId * The ID of the Amazon Web Services Key Management Service key used to encrypt your data. */ public void setKmsKeyId(String kmsKeyId) { this.kmsKeyId = kmsKeyId; } /** *

* The ID of the Amazon Web Services Key Management Service key used to encrypt your data. *

* * @return The ID of the Amazon Web Services Key Management Service key used to encrypt your data. */ public String getKmsKeyId() { return this.kmsKeyId; } /** *

* The ID of the Amazon Web Services Key Management Service key used to encrypt your data. *

* * @param kmsKeyId * The ID of the Amazon Web Services Key Management Service key used to encrypt your data. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateNamespaceRequest withKmsKeyId(String kmsKeyId) { setKmsKeyId(kmsKeyId); return this; } /** *

* The types of logs the namespace can export. Available export types are userlog, * connectionlog, and useractivitylog. *

* * @return The types of logs the namespace can export. Available export types are userlog, * connectionlog, and useractivitylog. * @see LogExport */ public java.util.List getLogExports() { return logExports; } /** *

* The types of logs the namespace can export. Available export types are userlog, * connectionlog, and useractivitylog. *

* * @param logExports * The types of logs the namespace can export. Available export types are userlog, * connectionlog, and useractivitylog. * @see LogExport */ public void setLogExports(java.util.Collection logExports) { if (logExports == null) { this.logExports = null; return; } this.logExports = new java.util.ArrayList(logExports); } /** *

* The types of logs the namespace can export. Available export types are userlog, * connectionlog, and useractivitylog. *

*

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

* * @param logExports * The types of logs the namespace can export. Available export types are userlog, * connectionlog, and useractivitylog. * @return Returns a reference to this object so that method calls can be chained together. * @see LogExport */ public CreateNamespaceRequest withLogExports(String... logExports) { if (this.logExports == null) { setLogExports(new java.util.ArrayList(logExports.length)); } for (String ele : logExports) { this.logExports.add(ele); } return this; } /** *

* The types of logs the namespace can export. Available export types are userlog, * connectionlog, and useractivitylog. *

* * @param logExports * The types of logs the namespace can export. Available export types are userlog, * connectionlog, and useractivitylog. * @return Returns a reference to this object so that method calls can be chained together. * @see LogExport */ public CreateNamespaceRequest withLogExports(java.util.Collection logExports) { setLogExports(logExports); return this; } /** *

* The types of logs the namespace can export. Available export types are userlog, * connectionlog, and useractivitylog. *

* * @param logExports * The types of logs the namespace can export. Available export types are userlog, * connectionlog, and useractivitylog. * @return Returns a reference to this object so that method calls can be chained together. * @see LogExport */ public CreateNamespaceRequest withLogExports(LogExport... logExports) { java.util.ArrayList logExportsCopy = new java.util.ArrayList(logExports.length); for (LogExport value : logExports) { logExportsCopy.add(value.toString()); } if (getLogExports() == null) { setLogExports(logExportsCopy); } else { getLogExports().addAll(logExportsCopy); } return this; } /** *

* If true, Amazon Redshift uses Secrets Manager to manage the namespace's admin credentials. You can't * use adminUserPassword if manageAdminPassword is true. If * manageAdminPassword is false or not set, Amazon Redshift uses adminUserPassword for the * admin user account's password. *

* * @param manageAdminPassword * If true, Amazon Redshift uses Secrets Manager to manage the namespace's admin credentials. * You can't use adminUserPassword if manageAdminPassword is true. If * manageAdminPassword is false or not set, Amazon Redshift uses adminUserPassword * for the admin user account's password. */ public void setManageAdminPassword(Boolean manageAdminPassword) { this.manageAdminPassword = manageAdminPassword; } /** *

* If true, Amazon Redshift uses Secrets Manager to manage the namespace's admin credentials. You can't * use adminUserPassword if manageAdminPassword is true. If * manageAdminPassword is false or not set, Amazon Redshift uses adminUserPassword for the * admin user account's password. *

* * @return If true, Amazon Redshift uses Secrets Manager to manage the namespace's admin credentials. * You can't use adminUserPassword if manageAdminPassword is true. If * manageAdminPassword is false or not set, Amazon Redshift uses adminUserPassword * for the admin user account's password. */ public Boolean getManageAdminPassword() { return this.manageAdminPassword; } /** *

* If true, Amazon Redshift uses Secrets Manager to manage the namespace's admin credentials. You can't * use adminUserPassword if manageAdminPassword is true. If * manageAdminPassword is false or not set, Amazon Redshift uses adminUserPassword for the * admin user account's password. *

* * @param manageAdminPassword * If true, Amazon Redshift uses Secrets Manager to manage the namespace's admin credentials. * You can't use adminUserPassword if manageAdminPassword is true. If * manageAdminPassword is false or not set, Amazon Redshift uses adminUserPassword * for the admin user account's password. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateNamespaceRequest withManageAdminPassword(Boolean manageAdminPassword) { setManageAdminPassword(manageAdminPassword); return this; } /** *

* If true, Amazon Redshift uses Secrets Manager to manage the namespace's admin credentials. You can't * use adminUserPassword if manageAdminPassword is true. If * manageAdminPassword is false or not set, Amazon Redshift uses adminUserPassword for the * admin user account's password. *

* * @return If true, Amazon Redshift uses Secrets Manager to manage the namespace's admin credentials. * You can't use adminUserPassword if manageAdminPassword is true. If * manageAdminPassword is false or not set, Amazon Redshift uses adminUserPassword * for the admin user account's password. */ public Boolean isManageAdminPassword() { return this.manageAdminPassword; } /** *

* The name of the namespace. *

* * @param namespaceName * The name of the namespace. */ public void setNamespaceName(String namespaceName) { this.namespaceName = namespaceName; } /** *

* The name of the namespace. *

* * @return The name of the namespace. */ public String getNamespaceName() { return this.namespaceName; } /** *

* The name of the namespace. *

* * @param namespaceName * The name of the namespace. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateNamespaceRequest withNamespaceName(String namespaceName) { setNamespaceName(namespaceName); return this; } /** *

* The ARN for the Redshift application that integrates with IAM Identity Center. *

* * @param redshiftIdcApplicationArn * The ARN for the Redshift application that integrates with IAM Identity Center. */ public void setRedshiftIdcApplicationArn(String redshiftIdcApplicationArn) { this.redshiftIdcApplicationArn = redshiftIdcApplicationArn; } /** *

* The ARN for the Redshift application that integrates with IAM Identity Center. *

* * @return The ARN for the Redshift application that integrates with IAM Identity Center. */ public String getRedshiftIdcApplicationArn() { return this.redshiftIdcApplicationArn; } /** *

* The ARN for the Redshift application that integrates with IAM Identity Center. *

* * @param redshiftIdcApplicationArn * The ARN for the Redshift application that integrates with IAM Identity Center. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateNamespaceRequest withRedshiftIdcApplicationArn(String redshiftIdcApplicationArn) { setRedshiftIdcApplicationArn(redshiftIdcApplicationArn); return this; } /** *

* A list of tag instances. *

* * @return A list of tag instances. */ public java.util.List getTags() { return tags; } /** *

* A list of tag instances. *

* * @param tags * A list of tag instances. */ public void setTags(java.util.Collection tags) { if (tags == null) { this.tags = null; return; } this.tags = new java.util.ArrayList(tags); } /** *

* A list of tag instances. *

*

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

* * @param tags * A list of tag instances. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateNamespaceRequest withTags(Tag... tags) { if (this.tags == null) { setTags(new java.util.ArrayList(tags.length)); } for (Tag ele : tags) { this.tags.add(ele); } return this; } /** *

* A list of tag instances. *

* * @param tags * A list of tag instances. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateNamespaceRequest withTags(java.util.Collection tags) { setTags(tags); 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 (getAdminPasswordSecretKmsKeyId() != null) sb.append("AdminPasswordSecretKmsKeyId: ").append(getAdminPasswordSecretKmsKeyId()).append(","); if (getAdminUserPassword() != null) sb.append("AdminUserPassword: ").append("***Sensitive Data Redacted***").append(","); if (getAdminUsername() != null) sb.append("AdminUsername: ").append("***Sensitive Data Redacted***").append(","); if (getDbName() != null) sb.append("DbName: ").append(getDbName()).append(","); if (getDefaultIamRoleArn() != null) sb.append("DefaultIamRoleArn: ").append(getDefaultIamRoleArn()).append(","); if (getIamRoles() != null) sb.append("IamRoles: ").append(getIamRoles()).append(","); if (getKmsKeyId() != null) sb.append("KmsKeyId: ").append(getKmsKeyId()).append(","); if (getLogExports() != null) sb.append("LogExports: ").append(getLogExports()).append(","); if (getManageAdminPassword() != null) sb.append("ManageAdminPassword: ").append(getManageAdminPassword()).append(","); if (getNamespaceName() != null) sb.append("NamespaceName: ").append(getNamespaceName()).append(","); if (getRedshiftIdcApplicationArn() != null) sb.append("RedshiftIdcApplicationArn: ").append(getRedshiftIdcApplicationArn()).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 CreateNamespaceRequest == false) return false; CreateNamespaceRequest other = (CreateNamespaceRequest) obj; if (other.getAdminPasswordSecretKmsKeyId() == null ^ this.getAdminPasswordSecretKmsKeyId() == null) return false; if (other.getAdminPasswordSecretKmsKeyId() != null && other.getAdminPasswordSecretKmsKeyId().equals(this.getAdminPasswordSecretKmsKeyId()) == false) return false; if (other.getAdminUserPassword() == null ^ this.getAdminUserPassword() == null) return false; if (other.getAdminUserPassword() != null && other.getAdminUserPassword().equals(this.getAdminUserPassword()) == false) return false; if (other.getAdminUsername() == null ^ this.getAdminUsername() == null) return false; if (other.getAdminUsername() != null && other.getAdminUsername().equals(this.getAdminUsername()) == false) return false; if (other.getDbName() == null ^ this.getDbName() == null) return false; if (other.getDbName() != null && other.getDbName().equals(this.getDbName()) == false) return false; if (other.getDefaultIamRoleArn() == null ^ this.getDefaultIamRoleArn() == null) return false; if (other.getDefaultIamRoleArn() != null && other.getDefaultIamRoleArn().equals(this.getDefaultIamRoleArn()) == false) return false; if (other.getIamRoles() == null ^ this.getIamRoles() == null) return false; if (other.getIamRoles() != null && other.getIamRoles().equals(this.getIamRoles()) == 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.getLogExports() == null ^ this.getLogExports() == null) return false; if (other.getLogExports() != null && other.getLogExports().equals(this.getLogExports()) == false) return false; if (other.getManageAdminPassword() == null ^ this.getManageAdminPassword() == null) return false; if (other.getManageAdminPassword() != null && other.getManageAdminPassword().equals(this.getManageAdminPassword()) == false) return false; if (other.getNamespaceName() == null ^ this.getNamespaceName() == null) return false; if (other.getNamespaceName() != null && other.getNamespaceName().equals(this.getNamespaceName()) == false) return false; if (other.getRedshiftIdcApplicationArn() == null ^ this.getRedshiftIdcApplicationArn() == null) return false; if (other.getRedshiftIdcApplicationArn() != null && other.getRedshiftIdcApplicationArn().equals(this.getRedshiftIdcApplicationArn()) == 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 + ((getAdminPasswordSecretKmsKeyId() == null) ? 0 : getAdminPasswordSecretKmsKeyId().hashCode()); hashCode = prime * hashCode + ((getAdminUserPassword() == null) ? 0 : getAdminUserPassword().hashCode()); hashCode = prime * hashCode + ((getAdminUsername() == null) ? 0 : getAdminUsername().hashCode()); hashCode = prime * hashCode + ((getDbName() == null) ? 0 : getDbName().hashCode()); hashCode = prime * hashCode + ((getDefaultIamRoleArn() == null) ? 0 : getDefaultIamRoleArn().hashCode()); hashCode = prime * hashCode + ((getIamRoles() == null) ? 0 : getIamRoles().hashCode()); hashCode = prime * hashCode + ((getKmsKeyId() == null) ? 0 : getKmsKeyId().hashCode()); hashCode = prime * hashCode + ((getLogExports() == null) ? 0 : getLogExports().hashCode()); hashCode = prime * hashCode + ((getManageAdminPassword() == null) ? 0 : getManageAdminPassword().hashCode()); hashCode = prime * hashCode + ((getNamespaceName() == null) ? 0 : getNamespaceName().hashCode()); hashCode = prime * hashCode + ((getRedshiftIdcApplicationArn() == null) ? 0 : getRedshiftIdcApplicationArn().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); return hashCode; } @Override public CreateNamespaceRequest clone() { return (CreateNamespaceRequest) super.clone(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy