/* * 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.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 CreateWorkgroupRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The base data warehouse capacity of the workgroup in Redshift Processing Units (RPUs). *
*/ private Integer baseCapacity; /** *
* An array of parameters to set for advanced control over a database. The options are auto_mv
,
* datestyle
, enable_case_sensitivity_identifier
,
* enable_user_activity_logging
, query_group
, search_path
, and query
* monitoring metrics that let you define performance boundaries. For more information about query monitoring rules
* and available metrics, see Query monitoring metrics for Amazon Redshift Serverless.
*
* The value that specifies whether to turn on enhanced virtual private cloud (VPC) routing, which forces Amazon * Redshift Serverless to route traffic through your VPC instead of over the internet. *
*/ private Boolean enhancedVpcRouting; /** ** The name of the namespace to associate with the workgroup. *
*/ private String namespaceName; /** ** The custom port to use when connecting to a workgroup. Valid port ranges are 5431-5455 and 8191-8215. The default * is 5439. *
*/ private Integer port; /** ** A value that specifies whether the workgroup can be accessed from a public network. *
*/ private Boolean publiclyAccessible; /** ** An array of security group IDs to associate with the workgroup. *
*/ private java.util.List* An array of VPC subnet IDs to associate with the workgroup. *
*/ private java.util.List* A array of tag instances. *
*/ private java.util.List* The name of the created workgroup. *
*/ private String workgroupName; /** ** The base data warehouse capacity of the workgroup in Redshift Processing Units (RPUs). *
* * @param baseCapacity * The base data warehouse capacity of the workgroup in Redshift Processing Units (RPUs). */ public void setBaseCapacity(Integer baseCapacity) { this.baseCapacity = baseCapacity; } /** ** The base data warehouse capacity of the workgroup in Redshift Processing Units (RPUs). *
* * @return The base data warehouse capacity of the workgroup in Redshift Processing Units (RPUs). */ public Integer getBaseCapacity() { return this.baseCapacity; } /** ** The base data warehouse capacity of the workgroup in Redshift Processing Units (RPUs). *
* * @param baseCapacity * The base data warehouse capacity of the workgroup in Redshift Processing Units (RPUs). * @return Returns a reference to this object so that method calls can be chained together. */ public CreateWorkgroupRequest withBaseCapacity(Integer baseCapacity) { setBaseCapacity(baseCapacity); return this; } /** *
* An array of parameters to set for advanced control over a database. The options are auto_mv
,
* datestyle
, enable_case_sensitivity_identifier
,
* enable_user_activity_logging
, query_group
, search_path
, and query
* monitoring metrics that let you define performance boundaries. For more information about query monitoring rules
* and available metrics, see Query monitoring metrics for Amazon Redshift Serverless.
*
auto_mv
,
* datestyle
, enable_case_sensitivity_identifier
,
* enable_user_activity_logging
, query_group
, search_path
, and query
* monitoring metrics that let you define performance boundaries. For more information about query
* monitoring rules and available metrics, see Query monitoring metrics for Amazon Redshift Serverless.
*/
public java.util.List
* An array of parameters to set for advanced control over a database. The options are auto_mv
,
* datestyle
, enable_case_sensitivity_identifier
,
* enable_user_activity_logging
, query_group
, search_path
, and query
* monitoring metrics that let you define performance boundaries. For more information about query monitoring rules
* and available metrics, see Query monitoring metrics for Amazon Redshift Serverless.
*
auto_mv
,
* datestyle
, enable_case_sensitivity_identifier
,
* enable_user_activity_logging
, query_group
, search_path
, and query
* monitoring metrics that let you define performance boundaries. For more information about query monitoring
* rules and available metrics, see Query monitoring metrics for Amazon Redshift Serverless.
*/
public void setConfigParameters(java.util.Collection
* An array of parameters to set for advanced control over a database. The options are auto_mv
,
* datestyle
, enable_case_sensitivity_identifier
,
* enable_user_activity_logging
, query_group
, search_path
, and query
* monitoring metrics that let you define performance boundaries. For more information about query monitoring rules
* and available metrics, see Query monitoring metrics for Amazon Redshift Serverless.
*
* NOTE: This method appends the values to the existing list (if any). Use * {@link #setConfigParameters(java.util.Collection)} or {@link #withConfigParameters(java.util.Collection)} if you * want to override the existing values. *
* * @param configParameters * An array of parameters to set for advanced control over a database. The options areauto_mv
,
* datestyle
, enable_case_sensitivity_identifier
,
* enable_user_activity_logging
, query_group
, search_path
, and query
* monitoring metrics that let you define performance boundaries. For more information about query monitoring
* rules and available metrics, see Query monitoring metrics for Amazon Redshift Serverless.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateWorkgroupRequest withConfigParameters(ConfigParameter... configParameters) {
if (this.configParameters == null) {
setConfigParameters(new java.util.ArrayList
* An array of parameters to set for advanced control over a database. The options are auto_mv
,
* datestyle
, enable_case_sensitivity_identifier
,
* enable_user_activity_logging
, query_group
, search_path
, and query
* monitoring metrics that let you define performance boundaries. For more information about query monitoring rules
* and available metrics, see Query monitoring metrics for Amazon Redshift Serverless.
*
auto_mv
,
* datestyle
, enable_case_sensitivity_identifier
,
* enable_user_activity_logging
, query_group
, search_path
, and query
* monitoring metrics that let you define performance boundaries. For more information about query monitoring
* rules and available metrics, see Query monitoring metrics for Amazon Redshift Serverless.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateWorkgroupRequest withConfigParameters(java.util.Collection* The value that specifies whether to turn on enhanced virtual private cloud (VPC) routing, which forces Amazon * Redshift Serverless to route traffic through your VPC instead of over the internet. *
* * @param enhancedVpcRouting * The value that specifies whether to turn on enhanced virtual private cloud (VPC) routing, which forces * Amazon Redshift Serverless to route traffic through your VPC instead of over the internet. */ public void setEnhancedVpcRouting(Boolean enhancedVpcRouting) { this.enhancedVpcRouting = enhancedVpcRouting; } /** ** The value that specifies whether to turn on enhanced virtual private cloud (VPC) routing, which forces Amazon * Redshift Serverless to route traffic through your VPC instead of over the internet. *
* * @return The value that specifies whether to turn on enhanced virtual private cloud (VPC) routing, which forces * Amazon Redshift Serverless to route traffic through your VPC instead of over the internet. */ public Boolean getEnhancedVpcRouting() { return this.enhancedVpcRouting; } /** ** The value that specifies whether to turn on enhanced virtual private cloud (VPC) routing, which forces Amazon * Redshift Serverless to route traffic through your VPC instead of over the internet. *
* * @param enhancedVpcRouting * The value that specifies whether to turn on enhanced virtual private cloud (VPC) routing, which forces * Amazon Redshift Serverless to route traffic through your VPC instead of over the internet. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateWorkgroupRequest withEnhancedVpcRouting(Boolean enhancedVpcRouting) { setEnhancedVpcRouting(enhancedVpcRouting); return this; } /** ** The value that specifies whether to turn on enhanced virtual private cloud (VPC) routing, which forces Amazon * Redshift Serverless to route traffic through your VPC instead of over the internet. *
* * @return The value that specifies whether to turn on enhanced virtual private cloud (VPC) routing, which forces * Amazon Redshift Serverless to route traffic through your VPC instead of over the internet. */ public Boolean isEnhancedVpcRouting() { return this.enhancedVpcRouting; } /** ** The name of the namespace to associate with the workgroup. *
* * @param namespaceName * The name of the namespace to associate with the workgroup. */ public void setNamespaceName(String namespaceName) { this.namespaceName = namespaceName; } /** ** The name of the namespace to associate with the workgroup. *
* * @return The name of the namespace to associate with the workgroup. */ public String getNamespaceName() { return this.namespaceName; } /** ** The name of the namespace to associate with the workgroup. *
* * @param namespaceName * The name of the namespace to associate with the workgroup. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateWorkgroupRequest withNamespaceName(String namespaceName) { setNamespaceName(namespaceName); return this; } /** ** The custom port to use when connecting to a workgroup. Valid port ranges are 5431-5455 and 8191-8215. The default * is 5439. *
* * @param port * The custom port to use when connecting to a workgroup. Valid port ranges are 5431-5455 and 8191-8215. The * default is 5439. */ public void setPort(Integer port) { this.port = port; } /** ** The custom port to use when connecting to a workgroup. Valid port ranges are 5431-5455 and 8191-8215. The default * is 5439. *
* * @return The custom port to use when connecting to a workgroup. Valid port ranges are 5431-5455 and 8191-8215. The * default is 5439. */ public Integer getPort() { return this.port; } /** ** The custom port to use when connecting to a workgroup. Valid port ranges are 5431-5455 and 8191-8215. The default * is 5439. *
* * @param port * The custom port to use when connecting to a workgroup. Valid port ranges are 5431-5455 and 8191-8215. The * default is 5439. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateWorkgroupRequest withPort(Integer port) { setPort(port); return this; } /** ** A value that specifies whether the workgroup can be accessed from a public network. *
* * @param publiclyAccessible * A value that specifies whether the workgroup can be accessed from a public network. */ public void setPubliclyAccessible(Boolean publiclyAccessible) { this.publiclyAccessible = publiclyAccessible; } /** ** A value that specifies whether the workgroup can be accessed from a public network. *
* * @return A value that specifies whether the workgroup can be accessed from a public network. */ public Boolean getPubliclyAccessible() { return this.publiclyAccessible; } /** ** A value that specifies whether the workgroup can be accessed from a public network. *
* * @param publiclyAccessible * A value that specifies whether the workgroup can be accessed from a public network. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateWorkgroupRequest withPubliclyAccessible(Boolean publiclyAccessible) { setPubliclyAccessible(publiclyAccessible); return this; } /** ** A value that specifies whether the workgroup can be accessed from a public network. *
* * @return A value that specifies whether the workgroup can be accessed from a public network. */ public Boolean isPubliclyAccessible() { return this.publiclyAccessible; } /** ** An array of security group IDs to associate with the workgroup. *
* * @return An array of security group IDs to associate with the workgroup. */ public java.util.List* An array of security group IDs to associate with the workgroup. *
* * @param securityGroupIds * An array of security group IDs to associate with the workgroup. */ public void setSecurityGroupIds(java.util.Collection* An array of security group IDs to associate with the workgroup. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setSecurityGroupIds(java.util.Collection)} or {@link #withSecurityGroupIds(java.util.Collection)} if you * want to override the existing values. *
* * @param securityGroupIds * An array of security group IDs to associate with the workgroup. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateWorkgroupRequest withSecurityGroupIds(String... securityGroupIds) { if (this.securityGroupIds == null) { setSecurityGroupIds(new java.util.ArrayList* An array of security group IDs to associate with the workgroup. *
* * @param securityGroupIds * An array of security group IDs to associate with the workgroup. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateWorkgroupRequest withSecurityGroupIds(java.util.Collection* An array of VPC subnet IDs to associate with the workgroup. *
* * @return An array of VPC subnet IDs to associate with the workgroup. */ public java.util.List* An array of VPC subnet IDs to associate with the workgroup. *
* * @param subnetIds * An array of VPC subnet IDs to associate with the workgroup. */ public void setSubnetIds(java.util.Collection* An array of VPC subnet IDs to associate with the workgroup. *
** 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 * An array of VPC subnet IDs to associate with the workgroup. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateWorkgroupRequest withSubnetIds(String... subnetIds) { if (this.subnetIds == null) { setSubnetIds(new java.util.ArrayList* An array of VPC subnet IDs to associate with the workgroup. *
* * @param subnetIds * An array of VPC subnet IDs to associate with the workgroup. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateWorkgroupRequest withSubnetIds(java.util.Collection* A array of tag instances. *
* * @return A array of tag instances. */ public java.util.List* A array of tag instances. *
* * @param tags * A array of tag instances. */ public void setTags(java.util.Collection* A array 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 array of tag instances. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateWorkgroupRequest withTags(Tag... tags) { if (this.tags == null) { setTags(new java.util.ArrayList* A array of tag instances. *
* * @param tags * A array of tag instances. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateWorkgroupRequest withTags(java.util.Collection* The name of the created workgroup. *
* * @param workgroupName * The name of the created workgroup. */ public void setWorkgroupName(String workgroupName) { this.workgroupName = workgroupName; } /** ** The name of the created workgroup. *
* * @return The name of the created workgroup. */ public String getWorkgroupName() { return this.workgroupName; } /** ** The name of the created workgroup. *
* * @param workgroupName * The name of the created workgroup. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateWorkgroupRequest withWorkgroupName(String workgroupName) { setWorkgroupName(workgroupName); 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 (getBaseCapacity() != null) sb.append("BaseCapacity: ").append(getBaseCapacity()).append(","); if (getConfigParameters() != null) sb.append("ConfigParameters: ").append(getConfigParameters()).append(","); if (getEnhancedVpcRouting() != null) sb.append("EnhancedVpcRouting: ").append(getEnhancedVpcRouting()).append(","); if (getNamespaceName() != null) sb.append("NamespaceName: ").append(getNamespaceName()).append(","); if (getPort() != null) sb.append("Port: ").append(getPort()).append(","); if (getPubliclyAccessible() != null) sb.append("PubliclyAccessible: ").append(getPubliclyAccessible()).append(","); if (getSecurityGroupIds() != null) sb.append("SecurityGroupIds: ").append(getSecurityGroupIds()).append(","); if (getSubnetIds() != null) sb.append("SubnetIds: ").append(getSubnetIds()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()).append(","); if (getWorkgroupName() != null) sb.append("WorkgroupName: ").append(getWorkgroupName()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateWorkgroupRequest == false) return false; CreateWorkgroupRequest other = (CreateWorkgroupRequest) obj; if (other.getBaseCapacity() == null ^ this.getBaseCapacity() == null) return false; if (other.getBaseCapacity() != null && other.getBaseCapacity().equals(this.getBaseCapacity()) == false) return false; if (other.getConfigParameters() == null ^ this.getConfigParameters() == null) return false; if (other.getConfigParameters() != null && other.getConfigParameters().equals(this.getConfigParameters()) == false) return false; if (other.getEnhancedVpcRouting() == null ^ this.getEnhancedVpcRouting() == null) return false; if (other.getEnhancedVpcRouting() != null && other.getEnhancedVpcRouting().equals(this.getEnhancedVpcRouting()) == 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.getPort() == null ^ this.getPort() == null) return false; if (other.getPort() != null && other.getPort().equals(this.getPort()) == false) return false; if (other.getPubliclyAccessible() == null ^ this.getPubliclyAccessible() == null) return false; if (other.getPubliclyAccessible() != null && other.getPubliclyAccessible().equals(this.getPubliclyAccessible()) == false) return false; if (other.getSecurityGroupIds() == null ^ this.getSecurityGroupIds() == null) return false; if (other.getSecurityGroupIds() != null && other.getSecurityGroupIds().equals(this.getSecurityGroupIds()) == 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.getWorkgroupName() == null ^ this.getWorkgroupName() == null) return false; if (other.getWorkgroupName() != null && other.getWorkgroupName().equals(this.getWorkgroupName()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getBaseCapacity() == null) ? 0 : getBaseCapacity().hashCode()); hashCode = prime * hashCode + ((getConfigParameters() == null) ? 0 : getConfigParameters().hashCode()); hashCode = prime * hashCode + ((getEnhancedVpcRouting() == null) ? 0 : getEnhancedVpcRouting().hashCode()); hashCode = prime * hashCode + ((getNamespaceName() == null) ? 0 : getNamespaceName().hashCode()); hashCode = prime * hashCode + ((getPort() == null) ? 0 : getPort().hashCode()); hashCode = prime * hashCode + ((getPubliclyAccessible() == null) ? 0 : getPubliclyAccessible().hashCode()); hashCode = prime * hashCode + ((getSecurityGroupIds() == null) ? 0 : getSecurityGroupIds().hashCode()); hashCode = prime * hashCode + ((getSubnetIds() == null) ? 0 : getSubnetIds().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); hashCode = prime * hashCode + ((getWorkgroupName() == null) ? 0 : getWorkgroupName().hashCode()); return hashCode; } @Override public CreateWorkgroupRequest clone() { return (CreateWorkgroupRequest) super.clone(); } }