/* * 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.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *

* Provisioned cluster request. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ProvisionedRequest implements Serializable, Cloneable, StructuredPojo { /** *

* Information about the brokers. *

*/ private BrokerNodeGroupInfo brokerNodeGroupInfo; /** *

* Includes all client authentication information. *

*/ private ClientAuthentication clientAuthentication; /** *

* Represents the configuration that you want Amazon 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 Apache Kafka version that you want for the cluster. *

*/ private String kafkaVersion; /** *

* Log delivery information for the cluster. *

*/ private LoggingInfo loggingInfo; /** *

* The number of broker nodes in the cluster. *

*/ private Integer numberOfBrokerNodes; /** *

* This controls storage mode for supported storage tiers. *

*/ private String storageMode; /** *

* Information about the brokers. *

* * @param brokerNodeGroupInfo *

* Information about the brokers. *

*/ public void setBrokerNodeGroupInfo(BrokerNodeGroupInfo brokerNodeGroupInfo) { this.brokerNodeGroupInfo = brokerNodeGroupInfo; } /** *

* Information about the brokers. *

* * @return

* Information about the brokers. *

*/ public BrokerNodeGroupInfo getBrokerNodeGroupInfo() { return this.brokerNodeGroupInfo; } /** *

* Information about the brokers. *

* * @param brokerNodeGroupInfo *

* Information about the brokers. *

* @return Returns a reference to this object so that method calls can be chained together. */ public ProvisionedRequest withBrokerNodeGroupInfo(BrokerNodeGroupInfo brokerNodeGroupInfo) { setBrokerNodeGroupInfo(brokerNodeGroupInfo); return this; } /** *

* Includes all client authentication information. *

* * @param clientAuthentication *

* Includes all client authentication information. *

*/ public void setClientAuthentication(ClientAuthentication clientAuthentication) { this.clientAuthentication = clientAuthentication; } /** *

* Includes all client authentication information. *

* * @return

* Includes all client authentication information. *

*/ public ClientAuthentication getClientAuthentication() { return this.clientAuthentication; } /** *

* Includes all client authentication information. *

* * @param clientAuthentication *

* Includes all client authentication information. *

* @return Returns a reference to this object so that method calls can be chained together. */ public ProvisionedRequest withClientAuthentication(ClientAuthentication clientAuthentication) { setClientAuthentication(clientAuthentication); return this; } /** *

* Represents the configuration that you want Amazon MSK to use for the brokers in a cluster. *

* * @param configurationInfo *

* Represents the configuration that you want Amazon MSK to use for the brokers in a cluster. *

*/ public void setConfigurationInfo(ConfigurationInfo configurationInfo) { this.configurationInfo = configurationInfo; } /** *

* Represents the configuration that you want Amazon MSK to use for the brokers in a cluster. *

* * @return

* Represents the configuration that you want Amazon MSK to use for the brokers in a cluster. *

*/ public ConfigurationInfo getConfigurationInfo() { return this.configurationInfo; } /** *

* Represents the configuration that you want Amazon MSK to use for the brokers in a cluster. *

* * @param configurationInfo *

* Represents the configuration that you want Amazon 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 ProvisionedRequest 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 ProvisionedRequest 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 ProvisionedRequest 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 ProvisionedRequest 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 ProvisionedRequest withOpenMonitoring(OpenMonitoringInfo openMonitoring) { setOpenMonitoring(openMonitoring); return this; } /** *

* The Apache Kafka version that you want for the cluster. *

* * @param kafkaVersion *

* The Apache Kafka version that you want for the cluster. *

*/ public void setKafkaVersion(String kafkaVersion) { this.kafkaVersion = kafkaVersion; } /** *

* The Apache Kafka version that you want for the cluster. *

* * @return

* The Apache Kafka version that you want for the cluster. *

*/ public String getKafkaVersion() { return this.kafkaVersion; } /** *

* The Apache Kafka version that you want for the cluster. *

* * @param kafkaVersion *

* The Apache Kafka version that you want for the cluster. *

* @return Returns a reference to this object so that method calls can be chained together. */ public ProvisionedRequest withKafkaVersion(String kafkaVersion) { setKafkaVersion(kafkaVersion); return this; } /** *

* Log delivery information for the cluster. *

* * @param loggingInfo *

* Log delivery information for the cluster. *

*/ public void setLoggingInfo(LoggingInfo loggingInfo) { this.loggingInfo = loggingInfo; } /** *

* Log delivery information for the cluster. *

* * @return

* Log delivery information for the cluster. *

*/ public LoggingInfo getLoggingInfo() { return this.loggingInfo; } /** *

* Log delivery information for the cluster. *

* * @param loggingInfo *

* Log delivery information for the cluster. *

* @return Returns a reference to this object so that method calls can be chained together. */ public ProvisionedRequest 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 ProvisionedRequest withNumberOfBrokerNodes(Integer numberOfBrokerNodes) { setNumberOfBrokerNodes(numberOfBrokerNodes); return this; } /** *

* 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 ProvisionedRequest 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 ProvisionedRequest 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 (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 (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 ProvisionedRequest == false) return false; ProvisionedRequest other = (ProvisionedRequest) 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.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.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 + ((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 + ((getStorageMode() == null) ? 0 : getStorageMode().hashCode()); return hashCode; } @Override public ProvisionedRequest clone() { try { return (ProvisionedRequest) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.kafka.model.transform.ProvisionedRequestMarshaller.getInstance().marshall(this, protocolMarshaller); } }