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

software.amazon.awssdk.services.mq.model.UpdateBrokerRequest Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AmazonMQ module holds the client classes that are used for communicating with AmazonMQ Service

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.mq.model;

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 software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.awscore.AwsRequestOverrideConfiguration;
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;

/**
 * 

* Updates the broker using the specified properties. *

*/ @Generated("software.amazon.awssdk:codegen") public final class UpdateBrokerRequest extends MqRequest implements ToCopyableBuilder { private static final SdkField AUTHENTICATION_STRATEGY_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("AuthenticationStrategy").getter(getter(UpdateBrokerRequest::authenticationStrategyAsString)) .setter(setter(Builder::authenticationStrategy)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("authenticationStrategy").build()) .build(); private static final SdkField AUTO_MINOR_VERSION_UPGRADE_FIELD = SdkField. builder(MarshallingType.BOOLEAN) .memberName("AutoMinorVersionUpgrade").getter(getter(UpdateBrokerRequest::autoMinorVersionUpgrade)) .setter(setter(Builder::autoMinorVersionUpgrade)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("autoMinorVersionUpgrade").build()) .build(); private static final SdkField BROKER_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("BrokerId").getter(getter(UpdateBrokerRequest::brokerId)).setter(setter(Builder::brokerId)) .traits(LocationTrait.builder().location(MarshallLocation.PATH).locationName("broker-id").build()).build(); private static final SdkField CONFIGURATION_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("Configuration") .getter(getter(UpdateBrokerRequest::configuration)).setter(setter(Builder::configuration)) .constructor(ConfigurationId::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("configuration").build()).build(); private static final SdkField ENGINE_VERSION_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("EngineVersion").getter(getter(UpdateBrokerRequest::engineVersion)) .setter(setter(Builder::engineVersion)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("engineVersion").build()).build(); private static final SdkField HOST_INSTANCE_TYPE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("HostInstanceType").getter(getter(UpdateBrokerRequest::hostInstanceType)) .setter(setter(Builder::hostInstanceType)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("hostInstanceType").build()).build(); private static final SdkField LDAP_SERVER_METADATA_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("LdapServerMetadata") .getter(getter(UpdateBrokerRequest::ldapServerMetadata)).setter(setter(Builder::ldapServerMetadata)) .constructor(LdapServerMetadataInput::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ldapServerMetadata").build()) .build(); private static final SdkField LOGS_FIELD = SdkField. builder(MarshallingType.SDK_POJO).memberName("Logs") .getter(getter(UpdateBrokerRequest::logs)).setter(setter(Builder::logs)).constructor(Logs::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("logs").build()).build(); private static final SdkField MAINTENANCE_WINDOW_START_TIME_FIELD = SdkField . builder(MarshallingType.SDK_POJO) .memberName("MaintenanceWindowStartTime") .getter(getter(UpdateBrokerRequest::maintenanceWindowStartTime)) .setter(setter(Builder::maintenanceWindowStartTime)) .constructor(WeeklyStartTime::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("maintenanceWindowStartTime").build()) .build(); private static final SdkField> SECURITY_GROUPS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("SecurityGroups") .getter(getter(UpdateBrokerRequest::securityGroups)) .setter(setter(Builder::securityGroups)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("securityGroups").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.STRING) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField DATA_REPLICATION_MODE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("DataReplicationMode").getter(getter(UpdateBrokerRequest::dataReplicationModeAsString)) .setter(setter(Builder::dataReplicationMode)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("dataReplicationMode").build()) .build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(AUTHENTICATION_STRATEGY_FIELD, AUTO_MINOR_VERSION_UPGRADE_FIELD, BROKER_ID_FIELD, CONFIGURATION_FIELD, ENGINE_VERSION_FIELD, HOST_INSTANCE_TYPE_FIELD, LDAP_SERVER_METADATA_FIELD, LOGS_FIELD, MAINTENANCE_WINDOW_START_TIME_FIELD, SECURITY_GROUPS_FIELD, DATA_REPLICATION_MODE_FIELD)); private final String authenticationStrategy; private final Boolean autoMinorVersionUpgrade; private final String brokerId; private final ConfigurationId configuration; private final String engineVersion; private final String hostInstanceType; private final LdapServerMetadataInput ldapServerMetadata; private final Logs logs; private final WeeklyStartTime maintenanceWindowStartTime; private final List securityGroups; private final String dataReplicationMode; private UpdateBrokerRequest(BuilderImpl builder) { super(builder); this.authenticationStrategy = builder.authenticationStrategy; this.autoMinorVersionUpgrade = builder.autoMinorVersionUpgrade; this.brokerId = builder.brokerId; this.configuration = builder.configuration; this.engineVersion = builder.engineVersion; this.hostInstanceType = builder.hostInstanceType; this.ldapServerMetadata = builder.ldapServerMetadata; this.logs = builder.logs; this.maintenanceWindowStartTime = builder.maintenanceWindowStartTime; this.securityGroups = builder.securityGroups; this.dataReplicationMode = builder.dataReplicationMode; } /** *

* Optional. The authentication strategy used to secure the broker. The default is SIMPLE. *

*

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

* * @return Optional. The authentication strategy used to secure the broker. The default is SIMPLE. * @see AuthenticationStrategy */ public final AuthenticationStrategy authenticationStrategy() { return AuthenticationStrategy.fromValue(authenticationStrategy); } /** *

* Optional. The authentication strategy used to secure the broker. The default is SIMPLE. *

*

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

* * @return Optional. The authentication strategy used to secure the broker. The default is SIMPLE. * @see AuthenticationStrategy */ public final String authenticationStrategyAsString() { return authenticationStrategy; } /** *

* Enables automatic upgrades to new patch versions for brokers as new versions are released and supported by Amazon * MQ. Automatic upgrades occur during the scheduled maintenance window or after a manual broker reboot. *

* *

* Must be set to true for ActiveMQ brokers version 5.18 and above and for RabbitMQ brokers version 3.13 and above. *

*
* * @return Enables automatic upgrades to new patch versions for brokers as new versions are released and supported * by Amazon MQ. Automatic upgrades occur during the scheduled maintenance window or after a manual broker * reboot.

*

* Must be set to true for ActiveMQ brokers version 5.18 and above and for RabbitMQ brokers version 3.13 and * above. *

*/ public final Boolean autoMinorVersionUpgrade() { return autoMinorVersionUpgrade; } /** *

* The unique ID that Amazon MQ generates for the broker. *

* * @return The unique ID that Amazon MQ generates for the broker. */ public final String brokerId() { return brokerId; } /** *

* A list of information about the configuration. *

* * @return A list of information about the configuration. */ public final ConfigurationId configuration() { return configuration; } /** *

* The broker engine version. For more information, see the ActiveMQ * version management and the RabbitMQ * version management sections in the Amazon MQ Developer Guide. *

* *

* When upgrading to ActiveMQ version 5.18 and above or RabbitMQ version 3.13 and above, you must have * autoMinorVersionUpgrade set to true for the broker. *

*
* * @return The broker engine version. For more information, see the ActiveMQ version management and the RabbitMQ version management sections in the Amazon MQ Developer Guide.

*

* When upgrading to ActiveMQ version 5.18 and above or RabbitMQ version 3.13 and above, you must have * autoMinorVersionUpgrade set to true for the broker. *

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

* The broker's host instance type to upgrade to. For a list of supported instance types, see Broker * instance types. *

* * @return The broker's host instance type to upgrade to. For a list of supported instance types, see Broker instance types. */ public final String hostInstanceType() { return hostInstanceType; } /** *

* Optional. The metadata of the LDAP server used to authenticate and authorize connections to the broker. Does not * apply to RabbitMQ brokers. *

* * @return Optional. The metadata of the LDAP server used to authenticate and authorize connections to the broker. * Does not apply to RabbitMQ brokers. */ public final LdapServerMetadataInput ldapServerMetadata() { return ldapServerMetadata; } /** *

* Enables Amazon CloudWatch logging for brokers. *

* * @return Enables Amazon CloudWatch logging for brokers. */ public final Logs logs() { return logs; } /** *

* The parameters that determine the WeeklyStartTime. *

* * @return The parameters that determine the WeeklyStartTime. */ public final WeeklyStartTime maintenanceWindowStartTime() { return maintenanceWindowStartTime; } /** * For responses, this returns true if the service returned a value for the SecurityGroups 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 hasSecurityGroups() { return securityGroups != null && !(securityGroups instanceof SdkAutoConstructList); } /** *

* The list of security groups (1 minimum, 5 maximum) that authorizes connections to brokers. *

*

* 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 #hasSecurityGroups} method. *

* * @return The list of security groups (1 minimum, 5 maximum) that authorizes connections to brokers. */ public final List securityGroups() { return securityGroups; } /** *

* Defines whether this broker is a part of a data replication pair. *

*

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

* * @return Defines whether this broker is a part of a data replication pair. * @see DataReplicationMode */ public final DataReplicationMode dataReplicationMode() { return DataReplicationMode.fromValue(dataReplicationMode); } /** *

* Defines whether this broker is a part of a data replication pair. *

*

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

* * @return Defines whether this broker is a part of a data replication pair. * @see DataReplicationMode */ public final String dataReplicationModeAsString() { return dataReplicationMode; } @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 + super.hashCode(); hashCode = 31 * hashCode + Objects.hashCode(authenticationStrategyAsString()); hashCode = 31 * hashCode + Objects.hashCode(autoMinorVersionUpgrade()); hashCode = 31 * hashCode + Objects.hashCode(brokerId()); hashCode = 31 * hashCode + Objects.hashCode(configuration()); hashCode = 31 * hashCode + Objects.hashCode(engineVersion()); hashCode = 31 * hashCode + Objects.hashCode(hostInstanceType()); hashCode = 31 * hashCode + Objects.hashCode(ldapServerMetadata()); hashCode = 31 * hashCode + Objects.hashCode(logs()); hashCode = 31 * hashCode + Objects.hashCode(maintenanceWindowStartTime()); hashCode = 31 * hashCode + Objects.hashCode(hasSecurityGroups() ? securityGroups() : null); hashCode = 31 * hashCode + Objects.hashCode(dataReplicationModeAsString()); return hashCode; } @Override public final boolean equals(Object obj) { return super.equals(obj) && equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof UpdateBrokerRequest)) { return false; } UpdateBrokerRequest other = (UpdateBrokerRequest) obj; return Objects.equals(authenticationStrategyAsString(), other.authenticationStrategyAsString()) && Objects.equals(autoMinorVersionUpgrade(), other.autoMinorVersionUpgrade()) && Objects.equals(brokerId(), other.brokerId()) && Objects.equals(configuration(), other.configuration()) && Objects.equals(engineVersion(), other.engineVersion()) && Objects.equals(hostInstanceType(), other.hostInstanceType()) && Objects.equals(ldapServerMetadata(), other.ldapServerMetadata()) && Objects.equals(logs(), other.logs()) && Objects.equals(maintenanceWindowStartTime(), other.maintenanceWindowStartTime()) && hasSecurityGroups() == other.hasSecurityGroups() && Objects.equals(securityGroups(), other.securityGroups()) && Objects.equals(dataReplicationModeAsString(), other.dataReplicationModeAsString()); } /** * 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("UpdateBrokerRequest").add("AuthenticationStrategy", authenticationStrategyAsString()) .add("AutoMinorVersionUpgrade", autoMinorVersionUpgrade()).add("BrokerId", brokerId()) .add("Configuration", configuration()).add("EngineVersion", engineVersion()) .add("HostInstanceType", hostInstanceType()).add("LdapServerMetadata", ldapServerMetadata()).add("Logs", logs()) .add("MaintenanceWindowStartTime", maintenanceWindowStartTime()) .add("SecurityGroups", hasSecurityGroups() ? securityGroups() : null) .add("DataReplicationMode", dataReplicationModeAsString()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "AuthenticationStrategy": return Optional.ofNullable(clazz.cast(authenticationStrategyAsString())); case "AutoMinorVersionUpgrade": return Optional.ofNullable(clazz.cast(autoMinorVersionUpgrade())); case "BrokerId": return Optional.ofNullable(clazz.cast(brokerId())); case "Configuration": return Optional.ofNullable(clazz.cast(configuration())); case "EngineVersion": return Optional.ofNullable(clazz.cast(engineVersion())); case "HostInstanceType": return Optional.ofNullable(clazz.cast(hostInstanceType())); case "LdapServerMetadata": return Optional.ofNullable(clazz.cast(ldapServerMetadata())); case "Logs": return Optional.ofNullable(clazz.cast(logs())); case "MaintenanceWindowStartTime": return Optional.ofNullable(clazz.cast(maintenanceWindowStartTime())); case "SecurityGroups": return Optional.ofNullable(clazz.cast(securityGroups())); case "DataReplicationMode": return Optional.ofNullable(clazz.cast(dataReplicationModeAsString())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((UpdateBrokerRequest) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends MqRequest.Builder, SdkPojo, CopyableBuilder { /** *

* Optional. The authentication strategy used to secure the broker. The default is SIMPLE. *

* * @param authenticationStrategy * Optional. The authentication strategy used to secure the broker. The default is SIMPLE. * @see AuthenticationStrategy * @return Returns a reference to this object so that method calls can be chained together. * @see AuthenticationStrategy */ Builder authenticationStrategy(String authenticationStrategy); /** *

* Optional. The authentication strategy used to secure the broker. The default is SIMPLE. *

* * @param authenticationStrategy * Optional. The authentication strategy used to secure the broker. The default is SIMPLE. * @see AuthenticationStrategy * @return Returns a reference to this object so that method calls can be chained together. * @see AuthenticationStrategy */ Builder authenticationStrategy(AuthenticationStrategy authenticationStrategy); /** *

* Enables automatic upgrades to new patch versions for brokers as new versions are released and supported by * Amazon MQ. Automatic upgrades occur during the scheduled maintenance window or after a manual broker reboot. *

* *

* Must be set to true for ActiveMQ brokers version 5.18 and above and for RabbitMQ brokers version 3.13 and * above. *

*
* * @param autoMinorVersionUpgrade * Enables automatic upgrades to new patch versions for brokers as new versions are released and * supported by Amazon MQ. Automatic upgrades occur during the scheduled maintenance window or after a * manual broker reboot.

*

* Must be set to true for ActiveMQ brokers version 5.18 and above and for RabbitMQ brokers version 3.13 * and above. *

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

* The unique ID that Amazon MQ generates for the broker. *

* * @param brokerId * The unique ID that Amazon MQ generates for the broker. * @return Returns a reference to this object so that method calls can be chained together. */ Builder brokerId(String brokerId); /** *

* A list of information about the configuration. *

* * @param configuration * A list of information about the configuration. * @return Returns a reference to this object so that method calls can be chained together. */ Builder configuration(ConfigurationId configuration); /** *

* A list of information about the configuration. *

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

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

* The broker engine version. For more information, see the ActiveMQ version management and the RabbitMQ version management sections in the Amazon MQ Developer Guide. *

* *

* When upgrading to ActiveMQ version 5.18 and above or RabbitMQ version 3.13 and above, you must have * autoMinorVersionUpgrade set to true for the broker. *

*
* * @param engineVersion * The broker engine version. For more information, see the ActiveMQ version management and the RabbitMQ version management sections in the Amazon MQ Developer Guide.

*

* When upgrading to ActiveMQ version 5.18 and above or RabbitMQ version 3.13 and above, you must have * autoMinorVersionUpgrade set to true for the broker. *

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

* The broker's host instance type to upgrade to. For a list of supported instance types, see Broker * instance types. *

* * @param hostInstanceType * The broker's host instance type to upgrade to. For a list of supported instance types, see Broker instance types. * @return Returns a reference to this object so that method calls can be chained together. */ Builder hostInstanceType(String hostInstanceType); /** *

* Optional. The metadata of the LDAP server used to authenticate and authorize connections to the broker. Does * not apply to RabbitMQ brokers. *

* * @param ldapServerMetadata * Optional. The metadata of the LDAP server used to authenticate and authorize connections to the * broker. Does not apply to RabbitMQ brokers. * @return Returns a reference to this object so that method calls can be chained together. */ Builder ldapServerMetadata(LdapServerMetadataInput ldapServerMetadata); /** *

* Optional. The metadata of the LDAP server used to authenticate and authorize connections to the broker. Does * not apply to RabbitMQ brokers. *

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

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

* Enables Amazon CloudWatch logging for brokers. *

* * @param logs * Enables Amazon CloudWatch logging for brokers. * @return Returns a reference to this object so that method calls can be chained together. */ Builder logs(Logs logs); /** *

* Enables Amazon CloudWatch logging for brokers. *

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

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

* The parameters that determine the WeeklyStartTime. *

* * @param maintenanceWindowStartTime * The parameters that determine the WeeklyStartTime. * @return Returns a reference to this object so that method calls can be chained together. */ Builder maintenanceWindowStartTime(WeeklyStartTime maintenanceWindowStartTime); /** *

* The parameters that determine the WeeklyStartTime. *

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

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

* The list of security groups (1 minimum, 5 maximum) that authorizes connections to brokers. *

* * @param securityGroups * The list of security groups (1 minimum, 5 maximum) that authorizes connections to brokers. * @return Returns a reference to this object so that method calls can be chained together. */ Builder securityGroups(Collection securityGroups); /** *

* The list of security groups (1 minimum, 5 maximum) that authorizes connections to brokers. *

* * @param securityGroups * The list of security groups (1 minimum, 5 maximum) that authorizes connections to brokers. * @return Returns a reference to this object so that method calls can be chained together. */ Builder securityGroups(String... securityGroups); /** *

* Defines whether this broker is a part of a data replication pair. *

* * @param dataReplicationMode * Defines whether this broker is a part of a data replication pair. * @see DataReplicationMode * @return Returns a reference to this object so that method calls can be chained together. * @see DataReplicationMode */ Builder dataReplicationMode(String dataReplicationMode); /** *

* Defines whether this broker is a part of a data replication pair. *

* * @param dataReplicationMode * Defines whether this broker is a part of a data replication pair. * @see DataReplicationMode * @return Returns a reference to this object so that method calls can be chained together. * @see DataReplicationMode */ Builder dataReplicationMode(DataReplicationMode dataReplicationMode); @Override Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration); @Override Builder overrideConfiguration(Consumer builderConsumer); } static final class BuilderImpl extends MqRequest.BuilderImpl implements Builder { private String authenticationStrategy; private Boolean autoMinorVersionUpgrade; private String brokerId; private ConfigurationId configuration; private String engineVersion; private String hostInstanceType; private LdapServerMetadataInput ldapServerMetadata; private Logs logs; private WeeklyStartTime maintenanceWindowStartTime; private List securityGroups = DefaultSdkAutoConstructList.getInstance(); private String dataReplicationMode; private BuilderImpl() { } private BuilderImpl(UpdateBrokerRequest model) { super(model); authenticationStrategy(model.authenticationStrategy); autoMinorVersionUpgrade(model.autoMinorVersionUpgrade); brokerId(model.brokerId); configuration(model.configuration); engineVersion(model.engineVersion); hostInstanceType(model.hostInstanceType); ldapServerMetadata(model.ldapServerMetadata); logs(model.logs); maintenanceWindowStartTime(model.maintenanceWindowStartTime); securityGroups(model.securityGroups); dataReplicationMode(model.dataReplicationMode); } public final String getAuthenticationStrategy() { return authenticationStrategy; } public final void setAuthenticationStrategy(String authenticationStrategy) { this.authenticationStrategy = authenticationStrategy; } @Override public final Builder authenticationStrategy(String authenticationStrategy) { this.authenticationStrategy = authenticationStrategy; return this; } @Override public final Builder authenticationStrategy(AuthenticationStrategy authenticationStrategy) { this.authenticationStrategy(authenticationStrategy == null ? null : authenticationStrategy.toString()); return this; } public final Boolean getAutoMinorVersionUpgrade() { return autoMinorVersionUpgrade; } public final void setAutoMinorVersionUpgrade(Boolean autoMinorVersionUpgrade) { this.autoMinorVersionUpgrade = autoMinorVersionUpgrade; } @Override public final Builder autoMinorVersionUpgrade(Boolean autoMinorVersionUpgrade) { this.autoMinorVersionUpgrade = autoMinorVersionUpgrade; return this; } public final String getBrokerId() { return brokerId; } public final void setBrokerId(String brokerId) { this.brokerId = brokerId; } @Override public final Builder brokerId(String brokerId) { this.brokerId = brokerId; return this; } public final ConfigurationId.Builder getConfiguration() { return configuration != null ? configuration.toBuilder() : null; } public final void setConfiguration(ConfigurationId.BuilderImpl configuration) { this.configuration = configuration != null ? configuration.build() : null; } @Override public final Builder configuration(ConfigurationId configuration) { this.configuration = configuration; return this; } public final String getEngineVersion() { return engineVersion; } public final void setEngineVersion(String engineVersion) { this.engineVersion = engineVersion; } @Override public final Builder engineVersion(String engineVersion) { this.engineVersion = engineVersion; return this; } public final String getHostInstanceType() { return hostInstanceType; } public final void setHostInstanceType(String hostInstanceType) { this.hostInstanceType = hostInstanceType; } @Override public final Builder hostInstanceType(String hostInstanceType) { this.hostInstanceType = hostInstanceType; return this; } public final LdapServerMetadataInput.Builder getLdapServerMetadata() { return ldapServerMetadata != null ? ldapServerMetadata.toBuilder() : null; } public final void setLdapServerMetadata(LdapServerMetadataInput.BuilderImpl ldapServerMetadata) { this.ldapServerMetadata = ldapServerMetadata != null ? ldapServerMetadata.build() : null; } @Override public final Builder ldapServerMetadata(LdapServerMetadataInput ldapServerMetadata) { this.ldapServerMetadata = ldapServerMetadata; return this; } public final Logs.Builder getLogs() { return logs != null ? logs.toBuilder() : null; } public final void setLogs(Logs.BuilderImpl logs) { this.logs = logs != null ? logs.build() : null; } @Override public final Builder logs(Logs logs) { this.logs = logs; return this; } public final WeeklyStartTime.Builder getMaintenanceWindowStartTime() { return maintenanceWindowStartTime != null ? maintenanceWindowStartTime.toBuilder() : null; } public final void setMaintenanceWindowStartTime(WeeklyStartTime.BuilderImpl maintenanceWindowStartTime) { this.maintenanceWindowStartTime = maintenanceWindowStartTime != null ? maintenanceWindowStartTime.build() : null; } @Override public final Builder maintenanceWindowStartTime(WeeklyStartTime maintenanceWindowStartTime) { this.maintenanceWindowStartTime = maintenanceWindowStartTime; return this; } public final Collection getSecurityGroups() { if (securityGroups instanceof SdkAutoConstructList) { return null; } return securityGroups; } public final void setSecurityGroups(Collection securityGroups) { this.securityGroups = ___listOf__stringCopier.copy(securityGroups); } @Override public final Builder securityGroups(Collection securityGroups) { this.securityGroups = ___listOf__stringCopier.copy(securityGroups); return this; } @Override @SafeVarargs public final Builder securityGroups(String... securityGroups) { securityGroups(Arrays.asList(securityGroups)); return this; } public final String getDataReplicationMode() { return dataReplicationMode; } public final void setDataReplicationMode(String dataReplicationMode) { this.dataReplicationMode = dataReplicationMode; } @Override public final Builder dataReplicationMode(String dataReplicationMode) { this.dataReplicationMode = dataReplicationMode; return this; } @Override public final Builder dataReplicationMode(DataReplicationMode dataReplicationMode) { this.dataReplicationMode(dataReplicationMode == null ? null : dataReplicationMode.toString()); return this; } @Override public Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration) { super.overrideConfiguration(overrideConfiguration); return this; } @Override public Builder overrideConfiguration(Consumer builderConsumer) { super.overrideConfiguration(builderConsumer); return this; } @Override public UpdateBrokerRequest build() { return new UpdateBrokerRequest(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy