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

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

Go to download

The AWS Java SDK for Kafka module holds the client classes that are used for communicating with Kafka.

There is a newer version: 2.29.15
Show newest version
/*
 * 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.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 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.LocationTrait;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 *
 * 

* Provisioned cluster. *

* */ @Generated("software.amazon.awssdk:codegen") public final class Provisioned implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField BROKER_NODE_GROUP_INFO_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("BrokerNodeGroupInfo") .getter(getter(Provisioned::brokerNodeGroupInfo)).setter(setter(Builder::brokerNodeGroupInfo)) .constructor(BrokerNodeGroupInfo::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("brokerNodeGroupInfo").build()) .build(); private static final SdkField CURRENT_BROKER_SOFTWARE_INFO_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("CurrentBrokerSoftwareInfo") .getter(getter(Provisioned::currentBrokerSoftwareInfo)).setter(setter(Builder::currentBrokerSoftwareInfo)) .constructor(BrokerSoftwareInfo::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("currentBrokerSoftwareInfo").build()) .build(); private static final SdkField CLIENT_AUTHENTICATION_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("ClientAuthentication") .getter(getter(Provisioned::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(Provisioned::encryptionInfo)).setter(setter(Builder::encryptionInfo)) .constructor(EncryptionInfo::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("encryptionInfo").build()).build(); private static final SdkField ENHANCED_MONITORING_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("EnhancedMonitoring").getter(getter(Provisioned::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(Provisioned::openMonitoring)).setter(setter(Builder::openMonitoring)) .constructor(OpenMonitoringInfo::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("openMonitoring").build()).build(); private static final SdkField LOGGING_INFO_FIELD = SdkField. builder(MarshallingType.SDK_POJO) .memberName("LoggingInfo").getter(getter(Provisioned::loggingInfo)).setter(setter(Builder::loggingInfo)) .constructor(LoggingInfo::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("loggingInfo").build()).build(); private static final SdkField NUMBER_OF_BROKER_NODES_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("NumberOfBrokerNodes").getter(getter(Provisioned::numberOfBrokerNodes)) .setter(setter(Builder::numberOfBrokerNodes)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("numberOfBrokerNodes").build()) .build(); private static final SdkField ZOOKEEPER_CONNECT_STRING_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ZookeeperConnectString").getter(getter(Provisioned::zookeeperConnectString)) .setter(setter(Builder::zookeeperConnectString)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("zookeeperConnectString").build()) .build(); private static final SdkField ZOOKEEPER_CONNECT_STRING_TLS_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ZookeeperConnectStringTls").getter(getter(Provisioned::zookeeperConnectStringTls)) .setter(setter(Builder::zookeeperConnectStringTls)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("zookeeperConnectStringTls").build()) .build(); private static final SdkField STORAGE_MODE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("StorageMode").getter(getter(Provisioned::storageModeAsString)).setter(setter(Builder::storageMode)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("storageMode").build()).build(); private static final SdkField CUSTOMER_ACTION_STATUS_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("CustomerActionStatus").getter(getter(Provisioned::customerActionStatusAsString)) .setter(setter(Builder::customerActionStatus)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("customerActionStatus").build()) .build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(BROKER_NODE_GROUP_INFO_FIELD, CURRENT_BROKER_SOFTWARE_INFO_FIELD, CLIENT_AUTHENTICATION_FIELD, ENCRYPTION_INFO_FIELD, ENHANCED_MONITORING_FIELD, OPEN_MONITORING_FIELD, LOGGING_INFO_FIELD, NUMBER_OF_BROKER_NODES_FIELD, ZOOKEEPER_CONNECT_STRING_FIELD, ZOOKEEPER_CONNECT_STRING_TLS_FIELD, STORAGE_MODE_FIELD, CUSTOMER_ACTION_STATUS_FIELD)); private static final long serialVersionUID = 1L; private final BrokerNodeGroupInfo brokerNodeGroupInfo; private final BrokerSoftwareInfo currentBrokerSoftwareInfo; private final ClientAuthentication clientAuthentication; private final EncryptionInfo encryptionInfo; private final String enhancedMonitoring; private final OpenMonitoringInfo openMonitoring; private final LoggingInfo loggingInfo; private final Integer numberOfBrokerNodes; private final String zookeeperConnectString; private final String zookeeperConnectStringTls; private final String storageMode; private final String customerActionStatus; private Provisioned(BuilderImpl builder) { this.brokerNodeGroupInfo = builder.brokerNodeGroupInfo; this.currentBrokerSoftwareInfo = builder.currentBrokerSoftwareInfo; this.clientAuthentication = builder.clientAuthentication; this.encryptionInfo = builder.encryptionInfo; this.enhancedMonitoring = builder.enhancedMonitoring; this.openMonitoring = builder.openMonitoring; this.loggingInfo = builder.loggingInfo; this.numberOfBrokerNodes = builder.numberOfBrokerNodes; this.zookeeperConnectString = builder.zookeeperConnectString; this.zookeeperConnectStringTls = builder.zookeeperConnectStringTls; this.storageMode = builder.storageMode; this.customerActionStatus = builder.customerActionStatus; } /** * *

* Information about the brokers. *

* * @return

* Information about the brokers. *

*/ public final BrokerNodeGroupInfo brokerNodeGroupInfo() { return brokerNodeGroupInfo; } /** * *

* Information about the Apache Kafka version deployed on the brokers. *

* * @return

* Information about the Apache Kafka version deployed on the brokers. *

*/ public final BrokerSoftwareInfo currentBrokerSoftwareInfo() { return currentBrokerSoftwareInfo; } /** * *

* 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; } /** * *

* 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. *

* *

* 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 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 final EnhancedMonitoring enhancedMonitoring() { return EnhancedMonitoring.fromValue(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. *

* *

* 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 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 final String enhancedMonitoringAsString() { return enhancedMonitoring; } /** * *

* The settings for open monitoring. *

* * @return

* The settings for open monitoring. *

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

* Log delivery information for the cluster. *

* * @return

* Log delivery information for the cluster. *

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

* The number of broker nodes in the cluster. *

* * @return

* The number of broker nodes in the cluster. *

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

* The connection string to use to connect to the Apache ZooKeeper cluster. *

* * @return

* The connection string to use to connect to the Apache ZooKeeper cluster. *

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

* The connection string to use to connect to the Apache ZooKeeper cluster on a TLS port. *

* * @return

* The connection string to use to connect to the Apache ZooKeeper cluster on a TLS port. *

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

* 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; } /** * *

* Determines if there is an action required from the customer. *

* *

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

* * @return

* Determines if there is an action required from the customer. *

* @see CustomerActionStatus */ public final CustomerActionStatus customerActionStatus() { return CustomerActionStatus.fromValue(customerActionStatus); } /** * *

* Determines if there is an action required from the customer. *

* *

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

* * @return

* Determines if there is an action required from the customer. *

* @see CustomerActionStatus */ public final String customerActionStatusAsString() { return customerActionStatus; } @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(brokerNodeGroupInfo()); hashCode = 31 * hashCode + Objects.hashCode(currentBrokerSoftwareInfo()); hashCode = 31 * hashCode + Objects.hashCode(clientAuthentication()); hashCode = 31 * hashCode + Objects.hashCode(encryptionInfo()); hashCode = 31 * hashCode + Objects.hashCode(enhancedMonitoringAsString()); hashCode = 31 * hashCode + Objects.hashCode(openMonitoring()); hashCode = 31 * hashCode + Objects.hashCode(loggingInfo()); hashCode = 31 * hashCode + Objects.hashCode(numberOfBrokerNodes()); hashCode = 31 * hashCode + Objects.hashCode(zookeeperConnectString()); hashCode = 31 * hashCode + Objects.hashCode(zookeeperConnectStringTls()); hashCode = 31 * hashCode + Objects.hashCode(storageModeAsString()); hashCode = 31 * hashCode + Objects.hashCode(customerActionStatusAsString()); 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 Provisioned)) { return false; } Provisioned other = (Provisioned) obj; return Objects.equals(brokerNodeGroupInfo(), other.brokerNodeGroupInfo()) && Objects.equals(currentBrokerSoftwareInfo(), other.currentBrokerSoftwareInfo()) && Objects.equals(clientAuthentication(), other.clientAuthentication()) && Objects.equals(encryptionInfo(), other.encryptionInfo()) && Objects.equals(enhancedMonitoringAsString(), other.enhancedMonitoringAsString()) && Objects.equals(openMonitoring(), other.openMonitoring()) && Objects.equals(loggingInfo(), other.loggingInfo()) && Objects.equals(numberOfBrokerNodes(), other.numberOfBrokerNodes()) && Objects.equals(zookeeperConnectString(), other.zookeeperConnectString()) && Objects.equals(zookeeperConnectStringTls(), other.zookeeperConnectStringTls()) && Objects.equals(storageModeAsString(), other.storageModeAsString()) && Objects.equals(customerActionStatusAsString(), other.customerActionStatusAsString()); } /** * 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("Provisioned").add("BrokerNodeGroupInfo", brokerNodeGroupInfo()) .add("CurrentBrokerSoftwareInfo", currentBrokerSoftwareInfo()) .add("ClientAuthentication", clientAuthentication()).add("EncryptionInfo", encryptionInfo()) .add("EnhancedMonitoring", enhancedMonitoringAsString()).add("OpenMonitoring", openMonitoring()) .add("LoggingInfo", loggingInfo()).add("NumberOfBrokerNodes", numberOfBrokerNodes()) .add("ZookeeperConnectString", zookeeperConnectString()) .add("ZookeeperConnectStringTls", zookeeperConnectStringTls()).add("StorageMode", storageModeAsString()) .add("CustomerActionStatus", customerActionStatusAsString()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "BrokerNodeGroupInfo": return Optional.ofNullable(clazz.cast(brokerNodeGroupInfo())); case "CurrentBrokerSoftwareInfo": return Optional.ofNullable(clazz.cast(currentBrokerSoftwareInfo())); case "ClientAuthentication": return Optional.ofNullable(clazz.cast(clientAuthentication())); case "EncryptionInfo": return Optional.ofNullable(clazz.cast(encryptionInfo())); case "EnhancedMonitoring": return Optional.ofNullable(clazz.cast(enhancedMonitoringAsString())); case "OpenMonitoring": return Optional.ofNullable(clazz.cast(openMonitoring())); case "LoggingInfo": return Optional.ofNullable(clazz.cast(loggingInfo())); case "NumberOfBrokerNodes": return Optional.ofNullable(clazz.cast(numberOfBrokerNodes())); case "ZookeeperConnectString": return Optional.ofNullable(clazz.cast(zookeeperConnectString())); case "ZookeeperConnectStringTls": return Optional.ofNullable(clazz.cast(zookeeperConnectStringTls())); case "StorageMode": return Optional.ofNullable(clazz.cast(storageModeAsString())); case "CustomerActionStatus": return Optional.ofNullable(clazz.cast(customerActionStatusAsString())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((Provisioned) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** * *

* 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. */ Builder brokerNodeGroupInfo(BrokerNodeGroupInfo brokerNodeGroupInfo); /** * *

* Information about the brokers. *

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

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

* Information about the Apache Kafka version deployed on the brokers. *

* * @param currentBrokerSoftwareInfo *

* Information about the Apache Kafka version deployed on the brokers. *

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

* Information about the Apache Kafka version deployed on the brokers. *

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

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

* 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()); } /** * *

* 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 * @return Returns a reference to this object so that method calls can be chained together. * @see EnhancedMonitoring */ Builder enhancedMonitoring(String 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. *

* @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(OpenMonitoringInfo openMonitoring); /** * *

* The settings for open monitoring. *

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

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

* 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. */ Builder loggingInfo(LoggingInfo loggingInfo); /** * *

* Log delivery information for the cluster. *

* * 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()); } /** * *

* 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); /** * *

* The connection string to use to connect to the Apache ZooKeeper cluster. *

* * @param zookeeperConnectString *

* The connection string to use to connect to the Apache ZooKeeper cluster. *

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

* The connection string to use to connect to the Apache ZooKeeper cluster on a TLS port. *

* * @param zookeeperConnectStringTls *

* The connection string to use to connect to the Apache ZooKeeper cluster on a TLS port. *

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

* 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); /** * *

* Determines if there is an action required from the customer. *

* * @param customerActionStatus *

* Determines if there is an action required from the customer. *

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

* Determines if there is an action required from the customer. *

* * @param customerActionStatus *

* Determines if there is an action required from the customer. *

* @see CustomerActionStatus * @return Returns a reference to this object so that method calls can be chained together. * @see CustomerActionStatus */ Builder customerActionStatus(CustomerActionStatus customerActionStatus); } static final class BuilderImpl implements Builder { private BrokerNodeGroupInfo brokerNodeGroupInfo; private BrokerSoftwareInfo currentBrokerSoftwareInfo; private ClientAuthentication clientAuthentication; private EncryptionInfo encryptionInfo; private String enhancedMonitoring; private OpenMonitoringInfo openMonitoring; private LoggingInfo loggingInfo; private Integer numberOfBrokerNodes; private String zookeeperConnectString; private String zookeeperConnectStringTls; private String storageMode; private String customerActionStatus; private BuilderImpl() { } private BuilderImpl(Provisioned model) { brokerNodeGroupInfo(model.brokerNodeGroupInfo); currentBrokerSoftwareInfo(model.currentBrokerSoftwareInfo); clientAuthentication(model.clientAuthentication); encryptionInfo(model.encryptionInfo); enhancedMonitoring(model.enhancedMonitoring); openMonitoring(model.openMonitoring); loggingInfo(model.loggingInfo); numberOfBrokerNodes(model.numberOfBrokerNodes); zookeeperConnectString(model.zookeeperConnectString); zookeeperConnectStringTls(model.zookeeperConnectStringTls); storageMode(model.storageMode); customerActionStatus(model.customerActionStatus); } public final BrokerNodeGroupInfo.Builder getBrokerNodeGroupInfo() { return brokerNodeGroupInfo != null ? brokerNodeGroupInfo.toBuilder() : null; } public final void setBrokerNodeGroupInfo(BrokerNodeGroupInfo.BuilderImpl brokerNodeGroupInfo) { this.brokerNodeGroupInfo = brokerNodeGroupInfo != null ? brokerNodeGroupInfo.build() : null; } @Override public final Builder brokerNodeGroupInfo(BrokerNodeGroupInfo brokerNodeGroupInfo) { this.brokerNodeGroupInfo = brokerNodeGroupInfo; return this; } public final BrokerSoftwareInfo.Builder getCurrentBrokerSoftwareInfo() { return currentBrokerSoftwareInfo != null ? currentBrokerSoftwareInfo.toBuilder() : null; } public final void setCurrentBrokerSoftwareInfo(BrokerSoftwareInfo.BuilderImpl currentBrokerSoftwareInfo) { this.currentBrokerSoftwareInfo = currentBrokerSoftwareInfo != null ? currentBrokerSoftwareInfo.build() : null; } @Override public final Builder currentBrokerSoftwareInfo(BrokerSoftwareInfo currentBrokerSoftwareInfo) { this.currentBrokerSoftwareInfo = currentBrokerSoftwareInfo; 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 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 OpenMonitoringInfo.Builder getOpenMonitoring() { return openMonitoring != null ? openMonitoring.toBuilder() : null; } public final void setOpenMonitoring(OpenMonitoringInfo.BuilderImpl openMonitoring) { this.openMonitoring = openMonitoring != null ? openMonitoring.build() : null; } @Override public final Builder openMonitoring(OpenMonitoringInfo openMonitoring) { this.openMonitoring = openMonitoring; 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 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 getZookeeperConnectString() { return zookeeperConnectString; } public final void setZookeeperConnectString(String zookeeperConnectString) { this.zookeeperConnectString = zookeeperConnectString; } @Override public final Builder zookeeperConnectString(String zookeeperConnectString) { this.zookeeperConnectString = zookeeperConnectString; return this; } public final String getZookeeperConnectStringTls() { return zookeeperConnectStringTls; } public final void setZookeeperConnectStringTls(String zookeeperConnectStringTls) { this.zookeeperConnectStringTls = zookeeperConnectStringTls; } @Override public final Builder zookeeperConnectStringTls(String zookeeperConnectStringTls) { this.zookeeperConnectStringTls = zookeeperConnectStringTls; 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; } public final String getCustomerActionStatus() { return customerActionStatus; } public final void setCustomerActionStatus(String customerActionStatus) { this.customerActionStatus = customerActionStatus; } @Override public final Builder customerActionStatus(String customerActionStatus) { this.customerActionStatus = customerActionStatus; return this; } @Override public final Builder customerActionStatus(CustomerActionStatus customerActionStatus) { this.customerActionStatus(customerActionStatus == null ? null : customerActionStatus.toString()); return this; } @Override public Provisioned build() { return new Provisioned(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy