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

software.amazon.awssdk.services.kafka.model.MutableClusterInfo Maven / Gradle / Ivy

/*
 * Copyright 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 software.amazon.awssdk.services.kafka.model;

import java.io.Serializable;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.ListTrait;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 *
 * 

* Information about cluster attributes that can be updated via update APIs. *

* */ @Generated("software.amazon.awssdk:codegen") public final class MutableClusterInfo implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField> BROKER_EBS_VOLUME_INFO_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("BrokerEBSVolumeInfo") .getter(getter(MutableClusterInfo::brokerEBSVolumeInfo)) .setter(setter(Builder::brokerEBSVolumeInfo)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("brokerEBSVolumeInfo").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(BrokerEBSVolumeInfo::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField CONFIGURATION_INFO_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("ConfigurationInfo") .getter(getter(MutableClusterInfo::configurationInfo)).setter(setter(Builder::configurationInfo)) .constructor(ConfigurationInfo::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("configurationInfo").build()).build(); private static final SdkField NUMBER_OF_BROKER_NODES_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("NumberOfBrokerNodes").getter(getter(MutableClusterInfo::numberOfBrokerNodes)) .setter(setter(Builder::numberOfBrokerNodes)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("numberOfBrokerNodes").build()) .build(); private static final SdkField ENHANCED_MONITORING_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("EnhancedMonitoring").getter(getter(MutableClusterInfo::enhancedMonitoringAsString)) .setter(setter(Builder::enhancedMonitoring)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("enhancedMonitoring").build()) .build(); private static final SdkField OPEN_MONITORING_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("OpenMonitoring") .getter(getter(MutableClusterInfo::openMonitoring)).setter(setter(Builder::openMonitoring)) .constructor(OpenMonitoring::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("openMonitoring").build()).build(); private static final SdkField KAFKA_VERSION_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("KafkaVersion").getter(getter(MutableClusterInfo::kafkaVersion)).setter(setter(Builder::kafkaVersion)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("kafkaVersion").build()).build(); private static final SdkField LOGGING_INFO_FIELD = SdkField. builder(MarshallingType.SDK_POJO) .memberName("LoggingInfo").getter(getter(MutableClusterInfo::loggingInfo)).setter(setter(Builder::loggingInfo)) .constructor(LoggingInfo::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("loggingInfo").build()).build(); private static final SdkField INSTANCE_TYPE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("InstanceType").getter(getter(MutableClusterInfo::instanceType)).setter(setter(Builder::instanceType)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("instanceType").build()).build(); private static final SdkField CLIENT_AUTHENTICATION_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("ClientAuthentication") .getter(getter(MutableClusterInfo::clientAuthentication)).setter(setter(Builder::clientAuthentication)) .constructor(ClientAuthentication::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("clientAuthentication").build()) .build(); private static final SdkField ENCRYPTION_INFO_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("EncryptionInfo") .getter(getter(MutableClusterInfo::encryptionInfo)).setter(setter(Builder::encryptionInfo)) .constructor(EncryptionInfo::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("encryptionInfo").build()).build(); private static final SdkField CONNECTIVITY_INFO_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("ConnectivityInfo") .getter(getter(MutableClusterInfo::connectivityInfo)).setter(setter(Builder::connectivityInfo)) .constructor(ConnectivityInfo::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("connectivityInfo").build()).build(); private static final SdkField STORAGE_MODE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("StorageMode").getter(getter(MutableClusterInfo::storageModeAsString)) .setter(setter(Builder::storageMode)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("storageMode").build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(BROKER_EBS_VOLUME_INFO_FIELD, CONFIGURATION_INFO_FIELD, NUMBER_OF_BROKER_NODES_FIELD, ENHANCED_MONITORING_FIELD, OPEN_MONITORING_FIELD, KAFKA_VERSION_FIELD, LOGGING_INFO_FIELD, INSTANCE_TYPE_FIELD, CLIENT_AUTHENTICATION_FIELD, ENCRYPTION_INFO_FIELD, CONNECTIVITY_INFO_FIELD, STORAGE_MODE_FIELD)); private static final long serialVersionUID = 1L; private final List brokerEBSVolumeInfo; private final ConfigurationInfo configurationInfo; private final Integer numberOfBrokerNodes; private final String enhancedMonitoring; private final OpenMonitoring openMonitoring; private final String kafkaVersion; private final LoggingInfo loggingInfo; private final String instanceType; private final ClientAuthentication clientAuthentication; private final EncryptionInfo encryptionInfo; private final ConnectivityInfo connectivityInfo; private final String storageMode; private MutableClusterInfo(BuilderImpl builder) { this.brokerEBSVolumeInfo = builder.brokerEBSVolumeInfo; this.configurationInfo = builder.configurationInfo; this.numberOfBrokerNodes = builder.numberOfBrokerNodes; this.enhancedMonitoring = builder.enhancedMonitoring; this.openMonitoring = builder.openMonitoring; this.kafkaVersion = builder.kafkaVersion; this.loggingInfo = builder.loggingInfo; this.instanceType = builder.instanceType; this.clientAuthentication = builder.clientAuthentication; this.encryptionInfo = builder.encryptionInfo; this.connectivityInfo = builder.connectivityInfo; this.storageMode = builder.storageMode; } /** * For responses, this returns true if the service returned a value for the BrokerEBSVolumeInfo property. This DOES * NOT check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). * This is useful because the SDK will never return a null collection or map, but you may need to differentiate * between the service returning nothing (or null) and the service returning an empty collection or map. For * requests, this returns true if a value for the property was specified in the request builder, and false if a * value was not specified. */ public final boolean hasBrokerEBSVolumeInfo() { return brokerEBSVolumeInfo != null && !(brokerEBSVolumeInfo instanceof SdkAutoConstructList); } /** * *

* Specifies the size of the EBS volume and the ID of the associated broker. *

* *

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasBrokerEBSVolumeInfo} method. *

* * @return

* Specifies the size of the EBS volume and the ID of the associated broker. *

*/ public final List brokerEBSVolumeInfo() { return brokerEBSVolumeInfo; } /** * *

* Information about the changes in the configuration of the brokers. *

* * @return

* Information about the changes in the configuration of the brokers. *

*/ public final ConfigurationInfo configurationInfo() { return configurationInfo; } /** * *

* The number of broker nodes in the cluster. *

* * @return

* The number of broker nodes in the cluster. *

*/ public final Integer numberOfBrokerNodes() { return numberOfBrokerNodes; } /** * *

* Specifies which Apache Kafka metrics Amazon MSK gathers and sends to Amazon CloudWatch for this cluster. *

* *

* If the service returns an enum value that is not available in the current SDK version, * {@link #enhancedMonitoring} will return {@link EnhancedMonitoring#UNKNOWN_TO_SDK_VERSION}. The raw value returned * by the service is available from {@link #enhancedMonitoringAsString}. *

* * @return

* Specifies which Apache Kafka metrics Amazon MSK gathers and sends to Amazon CloudWatch for this cluster. *

* @see EnhancedMonitoring */ public final EnhancedMonitoring enhancedMonitoring() { return EnhancedMonitoring.fromValue(enhancedMonitoring); } /** * *

* Specifies which Apache Kafka metrics Amazon MSK gathers and sends to Amazon CloudWatch for this cluster. *

* *

* If the service returns an enum value that is not available in the current SDK version, * {@link #enhancedMonitoring} will return {@link EnhancedMonitoring#UNKNOWN_TO_SDK_VERSION}. The raw value returned * by the service is available from {@link #enhancedMonitoringAsString}. *

* * @return

* Specifies which Apache Kafka metrics Amazon MSK gathers and sends to Amazon CloudWatch for this cluster. *

* @see EnhancedMonitoring */ public final String enhancedMonitoringAsString() { return enhancedMonitoring; } /** * *

* The settings for open monitoring. *

* * @return

* The settings for open monitoring. *

*/ public final OpenMonitoring openMonitoring() { return openMonitoring; } /** * *

* The Apache Kafka version. *

* * @return

* The Apache Kafka version. *

*/ public final String kafkaVersion() { return kafkaVersion; } /** * *

* You can configure your MSK cluster to send broker logs to different destination types. This is a container for * the configuration details related to broker logs. *

* * @return

* You can configure your MSK cluster to send broker logs to different destination types. This is a * container for the configuration details related to broker logs. *

*/ public final LoggingInfo loggingInfo() { return loggingInfo; } /** * *

* Information about the Amazon MSK broker type. *

* * @return

* Information about the Amazon MSK broker type. *

*/ public final String instanceType() { return instanceType; } /** * *

* Includes all client authentication information. *

* * @return

* Includes all client authentication information. *

*/ public final ClientAuthentication clientAuthentication() { return clientAuthentication; } /** * *

* Includes all encryption-related information. *

* * @return

* Includes all encryption-related information. *

*/ public final EncryptionInfo encryptionInfo() { return encryptionInfo; } /** * *

* Information about the broker access configuration. *

* * @return

* Information about the broker access configuration. *

*/ public final ConnectivityInfo connectivityInfo() { return connectivityInfo; } /** * *

* This controls storage mode for supported storage tiers. *

* *

* If the service returns an enum value that is not available in the current SDK version, {@link #storageMode} will * return {@link StorageMode#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #storageModeAsString}. *

* * @return

* This controls storage mode for supported storage tiers. *

* @see StorageMode */ public final StorageMode storageMode() { return StorageMode.fromValue(storageMode); } /** * *

* This controls storage mode for supported storage tiers. *

* *

* If the service returns an enum value that is not available in the current SDK version, {@link #storageMode} will * return {@link StorageMode#UNKNOWN_TO_SDK_VERSION}. The raw value returned by the service is available from * {@link #storageModeAsString}. *

* * @return

* This controls storage mode for supported storage tiers. *

* @see StorageMode */ public final String storageModeAsString() { return storageMode; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public final int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(hasBrokerEBSVolumeInfo() ? brokerEBSVolumeInfo() : null); hashCode = 31 * hashCode + Objects.hashCode(configurationInfo()); hashCode = 31 * hashCode + Objects.hashCode(numberOfBrokerNodes()); hashCode = 31 * hashCode + Objects.hashCode(enhancedMonitoringAsString()); hashCode = 31 * hashCode + Objects.hashCode(openMonitoring()); hashCode = 31 * hashCode + Objects.hashCode(kafkaVersion()); hashCode = 31 * hashCode + Objects.hashCode(loggingInfo()); hashCode = 31 * hashCode + Objects.hashCode(instanceType()); hashCode = 31 * hashCode + Objects.hashCode(clientAuthentication()); hashCode = 31 * hashCode + Objects.hashCode(encryptionInfo()); hashCode = 31 * hashCode + Objects.hashCode(connectivityInfo()); hashCode = 31 * hashCode + Objects.hashCode(storageModeAsString()); return hashCode; } @Override public final boolean equals(Object obj) { return equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof MutableClusterInfo)) { return false; } MutableClusterInfo other = (MutableClusterInfo) obj; return hasBrokerEBSVolumeInfo() == other.hasBrokerEBSVolumeInfo() && Objects.equals(brokerEBSVolumeInfo(), other.brokerEBSVolumeInfo()) && Objects.equals(configurationInfo(), other.configurationInfo()) && Objects.equals(numberOfBrokerNodes(), other.numberOfBrokerNodes()) && Objects.equals(enhancedMonitoringAsString(), other.enhancedMonitoringAsString()) && Objects.equals(openMonitoring(), other.openMonitoring()) && Objects.equals(kafkaVersion(), other.kafkaVersion()) && Objects.equals(loggingInfo(), other.loggingInfo()) && Objects.equals(instanceType(), other.instanceType()) && Objects.equals(clientAuthentication(), other.clientAuthentication()) && Objects.equals(encryptionInfo(), other.encryptionInfo()) && Objects.equals(connectivityInfo(), other.connectivityInfo()) && Objects.equals(storageModeAsString(), other.storageModeAsString()); } /** * 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. */ @Override public final String toString() { return ToString.builder("MutableClusterInfo") .add("BrokerEBSVolumeInfo", hasBrokerEBSVolumeInfo() ? brokerEBSVolumeInfo() : null) .add("ConfigurationInfo", configurationInfo()).add("NumberOfBrokerNodes", numberOfBrokerNodes()) .add("EnhancedMonitoring", enhancedMonitoringAsString()).add("OpenMonitoring", openMonitoring()) .add("KafkaVersion", kafkaVersion()).add("LoggingInfo", loggingInfo()).add("InstanceType", instanceType()) .add("ClientAuthentication", clientAuthentication()).add("EncryptionInfo", encryptionInfo()) .add("ConnectivityInfo", connectivityInfo()).add("StorageMode", storageModeAsString()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "BrokerEBSVolumeInfo": return Optional.ofNullable(clazz.cast(brokerEBSVolumeInfo())); case "ConfigurationInfo": return Optional.ofNullable(clazz.cast(configurationInfo())); case "NumberOfBrokerNodes": return Optional.ofNullable(clazz.cast(numberOfBrokerNodes())); case "EnhancedMonitoring": return Optional.ofNullable(clazz.cast(enhancedMonitoringAsString())); case "OpenMonitoring": return Optional.ofNullable(clazz.cast(openMonitoring())); case "KafkaVersion": return Optional.ofNullable(clazz.cast(kafkaVersion())); case "LoggingInfo": return Optional.ofNullable(clazz.cast(loggingInfo())); case "InstanceType": return Optional.ofNullable(clazz.cast(instanceType())); case "ClientAuthentication": return Optional.ofNullable(clazz.cast(clientAuthentication())); case "EncryptionInfo": return Optional.ofNullable(clazz.cast(encryptionInfo())); case "ConnectivityInfo": return Optional.ofNullable(clazz.cast(connectivityInfo())); case "StorageMode": return Optional.ofNullable(clazz.cast(storageModeAsString())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((MutableClusterInfo) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** * *

* Specifies the size of the EBS volume and the ID of the associated broker. *

* * @param brokerEBSVolumeInfo *

* Specifies the size of the EBS volume and the ID of the associated broker. *

* @return Returns a reference to this object so that method calls can be chained together. */ Builder brokerEBSVolumeInfo(Collection brokerEBSVolumeInfo); /** * *

* Specifies the size of the EBS volume and the ID of the associated broker. *

* * @param brokerEBSVolumeInfo *

* Specifies the size of the EBS volume and the ID of the associated broker. *

* @return Returns a reference to this object so that method calls can be chained together. */ Builder brokerEBSVolumeInfo(BrokerEBSVolumeInfo... brokerEBSVolumeInfo); /** * *

* Specifies the size of the EBS volume and the ID of the associated broker. *

* * This is a convenience method that creates an instance of the * {@link software.amazon.awssdk.services.kafka.model.BrokerEBSVolumeInfo.Builder} avoiding the need to create * one manually via {@link software.amazon.awssdk.services.kafka.model.BrokerEBSVolumeInfo#builder()}. * *

* When the {@link Consumer} completes, * {@link software.amazon.awssdk.services.kafka.model.BrokerEBSVolumeInfo.Builder#build()} is called immediately * and its result is passed to {@link #brokerEBSVolumeInfo(List)}. * * @param brokerEBSVolumeInfo * a consumer that will call methods on * {@link software.amazon.awssdk.services.kafka.model.BrokerEBSVolumeInfo.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #brokerEBSVolumeInfo(java.util.Collection) */ Builder brokerEBSVolumeInfo(Consumer... brokerEBSVolumeInfo); /** * *

* Information about the changes in the configuration of the brokers. *

* * @param configurationInfo *

* Information about the changes in the configuration of the brokers. *

* @return Returns a reference to this object so that method calls can be chained together. */ Builder configurationInfo(ConfigurationInfo configurationInfo); /** * *

* Information about the changes in the configuration of the brokers. *

* * This is a convenience method that creates an instance of the {@link ConfigurationInfo.Builder} avoiding the * need to create one manually via {@link ConfigurationInfo#builder()}. * *

* When the {@link Consumer} completes, {@link ConfigurationInfo.Builder#build()} is called immediately and its * result is passed to {@link #configurationInfo(ConfigurationInfo)}. * * @param configurationInfo * a consumer that will call methods on {@link ConfigurationInfo.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #configurationInfo(ConfigurationInfo) */ default Builder configurationInfo(Consumer configurationInfo) { return configurationInfo(ConfigurationInfo.builder().applyMutation(configurationInfo).build()); } /** * *

* 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. */ Builder numberOfBrokerNodes(Integer numberOfBrokerNodes); /** * *

* Specifies which Apache Kafka metrics Amazon MSK gathers and sends to Amazon CloudWatch for this cluster. *

* * @param enhancedMonitoring *

* Specifies which Apache Kafka metrics Amazon MSK gathers and sends to Amazon CloudWatch for this * cluster. *

* @see EnhancedMonitoring * @return Returns a reference to this object so that method calls can be chained together. * @see EnhancedMonitoring */ Builder enhancedMonitoring(String enhancedMonitoring); /** * *

* Specifies which Apache Kafka metrics Amazon MSK gathers and sends to Amazon CloudWatch for this cluster. *

* * @param enhancedMonitoring *

* Specifies which Apache Kafka metrics Amazon MSK gathers and sends to Amazon CloudWatch for this * cluster. *

* @see EnhancedMonitoring * @return Returns a reference to this object so that method calls can be chained together. * @see EnhancedMonitoring */ Builder enhancedMonitoring(EnhancedMonitoring enhancedMonitoring); /** * *

* 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. */ Builder openMonitoring(OpenMonitoring openMonitoring); /** * *

* The settings for open monitoring. *

* * This is a convenience method that creates an instance of the {@link OpenMonitoring.Builder} avoiding the need * to create one manually via {@link OpenMonitoring#builder()}. * *

* When the {@link Consumer} completes, {@link OpenMonitoring.Builder#build()} is called immediately and its * result is passed to {@link #openMonitoring(OpenMonitoring)}. * * @param openMonitoring * a consumer that will call methods on {@link OpenMonitoring.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #openMonitoring(OpenMonitoring) */ default Builder openMonitoring(Consumer openMonitoring) { return openMonitoring(OpenMonitoring.builder().applyMutation(openMonitoring).build()); } /** * *

* The Apache Kafka version. *

* * @param kafkaVersion *

* The Apache Kafka version. *

* @return Returns a reference to this object so that method calls can be chained together. */ Builder kafkaVersion(String kafkaVersion); /** * *

* You can configure your MSK cluster to send broker logs to different destination types. This is a container * for the configuration details related to broker logs. *

* * @param loggingInfo *

* You can configure your MSK cluster to send broker logs to different destination types. This is a * container for the configuration details related to broker logs. *

* @return Returns a reference to this object so that method calls can be chained together. */ Builder loggingInfo(LoggingInfo loggingInfo); /** * *

* You can configure your MSK cluster to send broker logs to different destination types. This is a container * for the configuration details related to broker logs. *

* * This is a convenience method that creates an instance of the {@link LoggingInfo.Builder} avoiding the need to * create one manually via {@link LoggingInfo#builder()}. * *

* When the {@link Consumer} completes, {@link LoggingInfo.Builder#build()} is called immediately and its result * is passed to {@link #loggingInfo(LoggingInfo)}. * * @param loggingInfo * a consumer that will call methods on {@link LoggingInfo.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #loggingInfo(LoggingInfo) */ default Builder loggingInfo(Consumer loggingInfo) { return loggingInfo(LoggingInfo.builder().applyMutation(loggingInfo).build()); } /** * *

* Information about the Amazon MSK broker type. *

* * @param instanceType *

* Information about the Amazon MSK broker type. *

* @return Returns a reference to this object so that method calls can be chained together. */ Builder instanceType(String instanceType); /** * *

* 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. */ Builder clientAuthentication(ClientAuthentication clientAuthentication); /** * *

* Includes all client authentication information. *

* * This is a convenience method that creates an instance of the {@link ClientAuthentication.Builder} avoiding * the need to create one manually via {@link ClientAuthentication#builder()}. * *

* When the {@link Consumer} completes, {@link ClientAuthentication.Builder#build()} is called immediately and * its result is passed to {@link #clientAuthentication(ClientAuthentication)}. * * @param clientAuthentication * a consumer that will call methods on {@link ClientAuthentication.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #clientAuthentication(ClientAuthentication) */ default Builder clientAuthentication(Consumer clientAuthentication) { return clientAuthentication(ClientAuthentication.builder().applyMutation(clientAuthentication).build()); } /** * *

* 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. */ Builder encryptionInfo(EncryptionInfo encryptionInfo); /** * *

* Includes all encryption-related information. *

* * This is a convenience method that creates an instance of the {@link EncryptionInfo.Builder} avoiding the need * to create one manually via {@link EncryptionInfo#builder()}. * *

* When the {@link Consumer} completes, {@link EncryptionInfo.Builder#build()} is called immediately and its * result is passed to {@link #encryptionInfo(EncryptionInfo)}. * * @param encryptionInfo * a consumer that will call methods on {@link EncryptionInfo.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #encryptionInfo(EncryptionInfo) */ default Builder encryptionInfo(Consumer encryptionInfo) { return encryptionInfo(EncryptionInfo.builder().applyMutation(encryptionInfo).build()); } /** * *

* Information about the broker access configuration. *

* * @param connectivityInfo *

* Information about the broker access configuration. *

* @return Returns a reference to this object so that method calls can be chained together. */ Builder connectivityInfo(ConnectivityInfo connectivityInfo); /** * *

* Information about the broker access configuration. *

* * This is a convenience method that creates an instance of the {@link ConnectivityInfo.Builder} avoiding the * need to create one manually via {@link ConnectivityInfo#builder()}. * *

* When the {@link Consumer} completes, {@link ConnectivityInfo.Builder#build()} is called immediately and its * result is passed to {@link #connectivityInfo(ConnectivityInfo)}. * * @param connectivityInfo * a consumer that will call methods on {@link ConnectivityInfo.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #connectivityInfo(ConnectivityInfo) */ default Builder connectivityInfo(Consumer connectivityInfo) { return connectivityInfo(ConnectivityInfo.builder().applyMutation(connectivityInfo).build()); } /** * *

* This controls storage mode for supported storage tiers. *

* * @param storageMode *

* This controls storage mode for supported storage tiers. *

* @see StorageMode * @return Returns a reference to this object so that method calls can be chained together. * @see StorageMode */ Builder storageMode(String storageMode); /** * *

* This controls storage mode for supported storage tiers. *

* * @param storageMode *

* This controls storage mode for supported storage tiers. *

* @see StorageMode * @return Returns a reference to this object so that method calls can be chained together. * @see StorageMode */ Builder storageMode(StorageMode storageMode); } static final class BuilderImpl implements Builder { private List brokerEBSVolumeInfo = DefaultSdkAutoConstructList.getInstance(); private ConfigurationInfo configurationInfo; private Integer numberOfBrokerNodes; private String enhancedMonitoring; private OpenMonitoring openMonitoring; private String kafkaVersion; private LoggingInfo loggingInfo; private String instanceType; private ClientAuthentication clientAuthentication; private EncryptionInfo encryptionInfo; private ConnectivityInfo connectivityInfo; private String storageMode; private BuilderImpl() { } private BuilderImpl(MutableClusterInfo model) { brokerEBSVolumeInfo(model.brokerEBSVolumeInfo); configurationInfo(model.configurationInfo); numberOfBrokerNodes(model.numberOfBrokerNodes); enhancedMonitoring(model.enhancedMonitoring); openMonitoring(model.openMonitoring); kafkaVersion(model.kafkaVersion); loggingInfo(model.loggingInfo); instanceType(model.instanceType); clientAuthentication(model.clientAuthentication); encryptionInfo(model.encryptionInfo); connectivityInfo(model.connectivityInfo); storageMode(model.storageMode); } public final List getBrokerEBSVolumeInfo() { List result = ___listOfBrokerEBSVolumeInfoCopier.copyToBuilder(this.brokerEBSVolumeInfo); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setBrokerEBSVolumeInfo(Collection brokerEBSVolumeInfo) { this.brokerEBSVolumeInfo = ___listOfBrokerEBSVolumeInfoCopier.copyFromBuilder(brokerEBSVolumeInfo); } @Override public final Builder brokerEBSVolumeInfo(Collection brokerEBSVolumeInfo) { this.brokerEBSVolumeInfo = ___listOfBrokerEBSVolumeInfoCopier.copy(brokerEBSVolumeInfo); return this; } @Override @SafeVarargs public final Builder brokerEBSVolumeInfo(BrokerEBSVolumeInfo... brokerEBSVolumeInfo) { brokerEBSVolumeInfo(Arrays.asList(brokerEBSVolumeInfo)); return this; } @Override @SafeVarargs public final Builder brokerEBSVolumeInfo(Consumer... brokerEBSVolumeInfo) { brokerEBSVolumeInfo(Stream.of(brokerEBSVolumeInfo).map(c -> BrokerEBSVolumeInfo.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final ConfigurationInfo.Builder getConfigurationInfo() { return configurationInfo != null ? configurationInfo.toBuilder() : null; } public final void setConfigurationInfo(ConfigurationInfo.BuilderImpl configurationInfo) { this.configurationInfo = configurationInfo != null ? configurationInfo.build() : null; } @Override public final Builder configurationInfo(ConfigurationInfo configurationInfo) { this.configurationInfo = configurationInfo; return this; } public final Integer getNumberOfBrokerNodes() { return numberOfBrokerNodes; } public final void setNumberOfBrokerNodes(Integer numberOfBrokerNodes) { this.numberOfBrokerNodes = numberOfBrokerNodes; } @Override public final Builder numberOfBrokerNodes(Integer numberOfBrokerNodes) { this.numberOfBrokerNodes = numberOfBrokerNodes; return this; } public final String getEnhancedMonitoring() { return enhancedMonitoring; } public final void setEnhancedMonitoring(String enhancedMonitoring) { this.enhancedMonitoring = enhancedMonitoring; } @Override public final Builder enhancedMonitoring(String enhancedMonitoring) { this.enhancedMonitoring = enhancedMonitoring; return this; } @Override public final Builder enhancedMonitoring(EnhancedMonitoring enhancedMonitoring) { this.enhancedMonitoring(enhancedMonitoring == null ? null : enhancedMonitoring.toString()); return this; } public final OpenMonitoring.Builder getOpenMonitoring() { return openMonitoring != null ? openMonitoring.toBuilder() : null; } public final void setOpenMonitoring(OpenMonitoring.BuilderImpl openMonitoring) { this.openMonitoring = openMonitoring != null ? openMonitoring.build() : null; } @Override public final Builder openMonitoring(OpenMonitoring openMonitoring) { this.openMonitoring = openMonitoring; return this; } public final String getKafkaVersion() { return kafkaVersion; } public final void setKafkaVersion(String kafkaVersion) { this.kafkaVersion = kafkaVersion; } @Override public final Builder kafkaVersion(String kafkaVersion) { this.kafkaVersion = kafkaVersion; return this; } public final LoggingInfo.Builder getLoggingInfo() { return loggingInfo != null ? loggingInfo.toBuilder() : null; } public final void setLoggingInfo(LoggingInfo.BuilderImpl loggingInfo) { this.loggingInfo = loggingInfo != null ? loggingInfo.build() : null; } @Override public final Builder loggingInfo(LoggingInfo loggingInfo) { this.loggingInfo = loggingInfo; return this; } public final String getInstanceType() { return instanceType; } public final void setInstanceType(String instanceType) { this.instanceType = instanceType; } @Override public final Builder instanceType(String instanceType) { this.instanceType = instanceType; return this; } public final ClientAuthentication.Builder getClientAuthentication() { return clientAuthentication != null ? clientAuthentication.toBuilder() : null; } public final void setClientAuthentication(ClientAuthentication.BuilderImpl clientAuthentication) { this.clientAuthentication = clientAuthentication != null ? clientAuthentication.build() : null; } @Override public final Builder clientAuthentication(ClientAuthentication clientAuthentication) { this.clientAuthentication = clientAuthentication; return this; } public final EncryptionInfo.Builder getEncryptionInfo() { return encryptionInfo != null ? encryptionInfo.toBuilder() : null; } public final void setEncryptionInfo(EncryptionInfo.BuilderImpl encryptionInfo) { this.encryptionInfo = encryptionInfo != null ? encryptionInfo.build() : null; } @Override public final Builder encryptionInfo(EncryptionInfo encryptionInfo) { this.encryptionInfo = encryptionInfo; return this; } public final ConnectivityInfo.Builder getConnectivityInfo() { return connectivityInfo != null ? connectivityInfo.toBuilder() : null; } public final void setConnectivityInfo(ConnectivityInfo.BuilderImpl connectivityInfo) { this.connectivityInfo = connectivityInfo != null ? connectivityInfo.build() : null; } @Override public final Builder connectivityInfo(ConnectivityInfo connectivityInfo) { this.connectivityInfo = connectivityInfo; return this; } public final String getStorageMode() { return storageMode; } public final void setStorageMode(String storageMode) { this.storageMode = storageMode; } @Override public final Builder storageMode(String storageMode) { this.storageMode = storageMode; return this; } @Override public final Builder storageMode(StorageMode storageMode) { this.storageMode(storageMode == null ? null : storageMode.toString()); return this; } @Override public MutableClusterInfo build() { return new MutableClusterInfo(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy