/* * 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.kafka.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 CreateClusterRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* Information about the broker nodes in the cluster. *
*/ private BrokerNodeGroupInfo brokerNodeGroupInfo; /** ** Includes all client authentication related information. *
*/ private ClientAuthentication clientAuthentication; /** ** The name of the cluster. *
*/ private String clusterName; /** ** Represents the configuration that you want MSK to use for the brokers in a cluster. *
*/ private ConfigurationInfo configurationInfo; /** ** Includes all encryption-related information. *
*/ private EncryptionInfo encryptionInfo; /** ** Specifies the level of monitoring for the MSK cluster. The possible values are DEFAULT, PER_BROKER, * PER_TOPIC_PER_BROKER, and PER_TOPIC_PER_PARTITION. *
*/ private String enhancedMonitoring; /** ** The settings for open monitoring. *
*/ private OpenMonitoringInfo openMonitoring; /** ** The version of Apache Kafka. *
*/ private String kafkaVersion; private LoggingInfo loggingInfo; /** ** The number of broker nodes in the cluster. *
*/ private Integer numberOfBrokerNodes; /** ** Create tags when creating the cluster. *
*/ private java.util.Map* This controls storage mode for supported storage tiers. *
*/ private String storageMode; /** ** Information about the broker nodes in the cluster. *
* * @param brokerNodeGroupInfo ** Information about the broker nodes in the cluster. *
*/ public void setBrokerNodeGroupInfo(BrokerNodeGroupInfo brokerNodeGroupInfo) { this.brokerNodeGroupInfo = brokerNodeGroupInfo; } /** ** Information about the broker nodes in the cluster. *
* * @return* Information about the broker nodes in the cluster. *
*/ public BrokerNodeGroupInfo getBrokerNodeGroupInfo() { return this.brokerNodeGroupInfo; } /** ** Information about the broker nodes in the cluster. *
* * @param brokerNodeGroupInfo ** Information about the broker nodes in the cluster. *
* @return Returns a reference to this object so that method calls can be chained together. */ public CreateClusterRequest withBrokerNodeGroupInfo(BrokerNodeGroupInfo brokerNodeGroupInfo) { setBrokerNodeGroupInfo(brokerNodeGroupInfo); return this; } /** ** Includes all client authentication related information. *
* * @param clientAuthentication ** Includes all client authentication related information. *
*/ public void setClientAuthentication(ClientAuthentication clientAuthentication) { this.clientAuthentication = clientAuthentication; } /** ** Includes all client authentication related information. *
* * @return* Includes all client authentication related information. *
*/ public ClientAuthentication getClientAuthentication() { return this.clientAuthentication; } /** ** Includes all client authentication related information. *
* * @param clientAuthentication ** Includes all client authentication related information. *
* @return Returns a reference to this object so that method calls can be chained together. */ public CreateClusterRequest withClientAuthentication(ClientAuthentication clientAuthentication) { setClientAuthentication(clientAuthentication); return this; } /** ** The name of the cluster. *
* * @param clusterName ** The name of the cluster. *
*/ public void setClusterName(String clusterName) { this.clusterName = clusterName; } /** ** The name of the cluster. *
* * @return* The name of the cluster. *
*/ public String getClusterName() { return this.clusterName; } /** ** The name of the cluster. *
* * @param clusterName ** The name of the cluster. *
* @return Returns a reference to this object so that method calls can be chained together. */ public CreateClusterRequest withClusterName(String clusterName) { setClusterName(clusterName); return this; } /** ** Represents the configuration that you want MSK to use for the brokers in a cluster. *
* * @param configurationInfo ** Represents the configuration that you want MSK to use for the brokers in a cluster. *
*/ public void setConfigurationInfo(ConfigurationInfo configurationInfo) { this.configurationInfo = configurationInfo; } /** ** Represents the configuration that you want MSK to use for the brokers in a cluster. *
* * @return* Represents the configuration that you want MSK to use for the brokers in a cluster. *
*/ public ConfigurationInfo getConfigurationInfo() { return this.configurationInfo; } /** ** Represents the configuration that you want MSK to use for the brokers in a cluster. *
* * @param configurationInfo ** Represents the configuration that you want MSK to use for the brokers in a cluster. *
* @return Returns a reference to this object so that method calls can be chained together. */ public CreateClusterRequest withConfigurationInfo(ConfigurationInfo configurationInfo) { setConfigurationInfo(configurationInfo); return this; } /** ** Includes all encryption-related information. *
* * @param encryptionInfo ** Includes all encryption-related information. *
*/ public void setEncryptionInfo(EncryptionInfo encryptionInfo) { this.encryptionInfo = encryptionInfo; } /** ** Includes all encryption-related information. *
* * @return* Includes all encryption-related information. *
*/ public EncryptionInfo getEncryptionInfo() { return this.encryptionInfo; } /** ** Includes all encryption-related information. *
* * @param encryptionInfo ** Includes all encryption-related information. *
* @return Returns a reference to this object so that method calls can be chained together. */ public CreateClusterRequest withEncryptionInfo(EncryptionInfo encryptionInfo) { setEncryptionInfo(encryptionInfo); return this; } /** ** Specifies the level of monitoring for the MSK cluster. The possible values are DEFAULT, PER_BROKER, * PER_TOPIC_PER_BROKER, and PER_TOPIC_PER_PARTITION. *
* * @param enhancedMonitoring ** Specifies the level of monitoring for the MSK cluster. The possible values are DEFAULT, PER_BROKER, * PER_TOPIC_PER_BROKER, and PER_TOPIC_PER_PARTITION. *
* @see EnhancedMonitoring */ public void setEnhancedMonitoring(String enhancedMonitoring) { this.enhancedMonitoring = enhancedMonitoring; } /** ** Specifies the level of monitoring for the MSK cluster. The possible values are DEFAULT, PER_BROKER, * PER_TOPIC_PER_BROKER, and PER_TOPIC_PER_PARTITION. *
* * @return* Specifies the level of monitoring for the MSK cluster. The possible values are DEFAULT, PER_BROKER, * PER_TOPIC_PER_BROKER, and PER_TOPIC_PER_PARTITION. *
* @see EnhancedMonitoring */ public String getEnhancedMonitoring() { return this.enhancedMonitoring; } /** ** Specifies the level of monitoring for the MSK cluster. The possible values are DEFAULT, PER_BROKER, * PER_TOPIC_PER_BROKER, and PER_TOPIC_PER_PARTITION. *
* * @param enhancedMonitoring ** Specifies the level of monitoring for the MSK cluster. The possible values are DEFAULT, PER_BROKER, * PER_TOPIC_PER_BROKER, and PER_TOPIC_PER_PARTITION. *
* @return Returns a reference to this object so that method calls can be chained together. * @see EnhancedMonitoring */ public CreateClusterRequest withEnhancedMonitoring(String enhancedMonitoring) { setEnhancedMonitoring(enhancedMonitoring); return this; } /** ** Specifies the level of monitoring for the MSK cluster. The possible values are DEFAULT, PER_BROKER, * PER_TOPIC_PER_BROKER, and PER_TOPIC_PER_PARTITION. *
* * @param enhancedMonitoring ** Specifies the level of monitoring for the MSK cluster. The possible values are DEFAULT, PER_BROKER, * PER_TOPIC_PER_BROKER, and PER_TOPIC_PER_PARTITION. *
* @return Returns a reference to this object so that method calls can be chained together. * @see EnhancedMonitoring */ public CreateClusterRequest withEnhancedMonitoring(EnhancedMonitoring enhancedMonitoring) { this.enhancedMonitoring = enhancedMonitoring.toString(); return this; } /** ** The settings for open monitoring. *
* * @param openMonitoring ** The settings for open monitoring. *
*/ public void setOpenMonitoring(OpenMonitoringInfo openMonitoring) { this.openMonitoring = openMonitoring; } /** ** The settings for open monitoring. *
* * @return* The settings for open monitoring. *
*/ public OpenMonitoringInfo getOpenMonitoring() { return this.openMonitoring; } /** ** The settings for open monitoring. *
* * @param openMonitoring ** The settings for open monitoring. *
* @return Returns a reference to this object so that method calls can be chained together. */ public CreateClusterRequest withOpenMonitoring(OpenMonitoringInfo openMonitoring) { setOpenMonitoring(openMonitoring); return this; } /** ** The version of Apache Kafka. *
* * @param kafkaVersion ** The version of Apache Kafka. *
*/ public void setKafkaVersion(String kafkaVersion) { this.kafkaVersion = kafkaVersion; } /** ** The version of Apache Kafka. *
* * @return* The version of Apache Kafka. *
*/ public String getKafkaVersion() { return this.kafkaVersion; } /** ** The version of Apache Kafka. *
* * @param kafkaVersion ** The version of Apache Kafka. *
* @return Returns a reference to this object so that method calls can be chained together. */ public CreateClusterRequest withKafkaVersion(String kafkaVersion) { setKafkaVersion(kafkaVersion); return this; } /** * @param loggingInfo */ public void setLoggingInfo(LoggingInfo loggingInfo) { this.loggingInfo = loggingInfo; } /** * @return */ public LoggingInfo getLoggingInfo() { return this.loggingInfo; } /** * @param loggingInfo * @return Returns a reference to this object so that method calls can be chained together. */ public CreateClusterRequest withLoggingInfo(LoggingInfo loggingInfo) { setLoggingInfo(loggingInfo); return this; } /** ** The number of broker nodes in the cluster. *
* * @param numberOfBrokerNodes ** The number of broker nodes in the cluster. *
*/ public void setNumberOfBrokerNodes(Integer numberOfBrokerNodes) { this.numberOfBrokerNodes = numberOfBrokerNodes; } /** ** The number of broker nodes in the cluster. *
* * @return* The number of broker nodes in the cluster. *
*/ public Integer getNumberOfBrokerNodes() { return this.numberOfBrokerNodes; } /** ** The number of broker nodes in the cluster. *
* * @param numberOfBrokerNodes ** The number of broker nodes in the cluster. *
* @return Returns a reference to this object so that method calls can be chained together. */ public CreateClusterRequest withNumberOfBrokerNodes(Integer numberOfBrokerNodes) { setNumberOfBrokerNodes(numberOfBrokerNodes); return this; } /** ** Create tags when creating the cluster. *
* * @return* Create tags when creating the cluster. *
*/ public java.util.Map* Create tags when creating the cluster. *
* * @param tags ** Create tags when creating the cluster. *
*/ public void setTags(java.util.Map* Create tags when creating the cluster. *
* * @param tags ** Create tags when creating the cluster. *
* @return Returns a reference to this object so that method calls can be chained together. */ public CreateClusterRequest withTags(java.util.Map* This controls storage mode for supported storage tiers. *
* * @param storageMode ** This controls storage mode for supported storage tiers. *
* @see StorageMode */ public void setStorageMode(String storageMode) { this.storageMode = storageMode; } /** ** This controls storage mode for supported storage tiers. *
* * @return* This controls storage mode for supported storage tiers. *
* @see StorageMode */ public String getStorageMode() { return this.storageMode; } /** ** This controls storage mode for supported storage tiers. *
* * @param storageMode ** This controls storage mode for supported storage tiers. *
* @return Returns a reference to this object so that method calls can be chained together. * @see StorageMode */ public CreateClusterRequest withStorageMode(String storageMode) { setStorageMode(storageMode); return this; } /** ** This controls storage mode for supported storage tiers. *
* * @param storageMode ** This controls storage mode for supported storage tiers. *
* @return Returns a reference to this object so that method calls can be chained together. * @see StorageMode */ public CreateClusterRequest withStorageMode(StorageMode storageMode) { this.storageMode = storageMode.toString(); 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 (getBrokerNodeGroupInfo() != null) sb.append("BrokerNodeGroupInfo: ").append(getBrokerNodeGroupInfo()).append(","); if (getClientAuthentication() != null) sb.append("ClientAuthentication: ").append(getClientAuthentication()).append(","); if (getClusterName() != null) sb.append("ClusterName: ").append(getClusterName()).append(","); if (getConfigurationInfo() != null) sb.append("ConfigurationInfo: ").append(getConfigurationInfo()).append(","); if (getEncryptionInfo() != null) sb.append("EncryptionInfo: ").append(getEncryptionInfo()).append(","); if (getEnhancedMonitoring() != null) sb.append("EnhancedMonitoring: ").append(getEnhancedMonitoring()).append(","); if (getOpenMonitoring() != null) sb.append("OpenMonitoring: ").append(getOpenMonitoring()).append(","); if (getKafkaVersion() != null) sb.append("KafkaVersion: ").append(getKafkaVersion()).append(","); if (getLoggingInfo() != null) sb.append("LoggingInfo: ").append(getLoggingInfo()).append(","); if (getNumberOfBrokerNodes() != null) sb.append("NumberOfBrokerNodes: ").append(getNumberOfBrokerNodes()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()).append(","); if (getStorageMode() != null) sb.append("StorageMode: ").append(getStorageMode()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateClusterRequest == false) return false; CreateClusterRequest other = (CreateClusterRequest) obj; if (other.getBrokerNodeGroupInfo() == null ^ this.getBrokerNodeGroupInfo() == null) return false; if (other.getBrokerNodeGroupInfo() != null && other.getBrokerNodeGroupInfo().equals(this.getBrokerNodeGroupInfo()) == false) return false; if (other.getClientAuthentication() == null ^ this.getClientAuthentication() == null) return false; if (other.getClientAuthentication() != null && other.getClientAuthentication().equals(this.getClientAuthentication()) == false) return false; if (other.getClusterName() == null ^ this.getClusterName() == null) return false; if (other.getClusterName() != null && other.getClusterName().equals(this.getClusterName()) == false) return false; if (other.getConfigurationInfo() == null ^ this.getConfigurationInfo() == null) return false; if (other.getConfigurationInfo() != null && other.getConfigurationInfo().equals(this.getConfigurationInfo()) == false) return false; if (other.getEncryptionInfo() == null ^ this.getEncryptionInfo() == null) return false; if (other.getEncryptionInfo() != null && other.getEncryptionInfo().equals(this.getEncryptionInfo()) == false) return false; if (other.getEnhancedMonitoring() == null ^ this.getEnhancedMonitoring() == null) return false; if (other.getEnhancedMonitoring() != null && other.getEnhancedMonitoring().equals(this.getEnhancedMonitoring()) == false) return false; if (other.getOpenMonitoring() == null ^ this.getOpenMonitoring() == null) return false; if (other.getOpenMonitoring() != null && other.getOpenMonitoring().equals(this.getOpenMonitoring()) == false) return false; if (other.getKafkaVersion() == null ^ this.getKafkaVersion() == null) return false; if (other.getKafkaVersion() != null && other.getKafkaVersion().equals(this.getKafkaVersion()) == false) return false; if (other.getLoggingInfo() == null ^ this.getLoggingInfo() == null) return false; if (other.getLoggingInfo() != null && other.getLoggingInfo().equals(this.getLoggingInfo()) == false) return false; if (other.getNumberOfBrokerNodes() == null ^ this.getNumberOfBrokerNodes() == null) return false; if (other.getNumberOfBrokerNodes() != null && other.getNumberOfBrokerNodes().equals(this.getNumberOfBrokerNodes()) == 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.getStorageMode() == null ^ this.getStorageMode() == null) return false; if (other.getStorageMode() != null && other.getStorageMode().equals(this.getStorageMode()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getBrokerNodeGroupInfo() == null) ? 0 : getBrokerNodeGroupInfo().hashCode()); hashCode = prime * hashCode + ((getClientAuthentication() == null) ? 0 : getClientAuthentication().hashCode()); hashCode = prime * hashCode + ((getClusterName() == null) ? 0 : getClusterName().hashCode()); hashCode = prime * hashCode + ((getConfigurationInfo() == null) ? 0 : getConfigurationInfo().hashCode()); hashCode = prime * hashCode + ((getEncryptionInfo() == null) ? 0 : getEncryptionInfo().hashCode()); hashCode = prime * hashCode + ((getEnhancedMonitoring() == null) ? 0 : getEnhancedMonitoring().hashCode()); hashCode = prime * hashCode + ((getOpenMonitoring() == null) ? 0 : getOpenMonitoring().hashCode()); hashCode = prime * hashCode + ((getKafkaVersion() == null) ? 0 : getKafkaVersion().hashCode()); hashCode = prime * hashCode + ((getLoggingInfo() == null) ? 0 : getLoggingInfo().hashCode()); hashCode = prime * hashCode + ((getNumberOfBrokerNodes() == null) ? 0 : getNumberOfBrokerNodes().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); hashCode = prime * hashCode + ((getStorageMode() == null) ? 0 : getStorageMode().hashCode()); return hashCode; } @Override public CreateClusterRequest clone() { return (CreateClusterRequest) super.clone(); } }