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

software.amazon.awssdk.services.elasticbeanstalk.model.UpdateEnvironmentRequest Maven / Gradle / Ivy

Go to download

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

There is a newer version: 2.29.39
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.elasticbeanstalk.model;

import java.beans.Transient;
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.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;

/**
 * 

* Request to update an environment. *

*/ @Generated("software.amazon.awssdk:codegen") public final class UpdateEnvironmentRequest extends ElasticBeanstalkRequest implements ToCopyableBuilder { private static final SdkField APPLICATION_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ApplicationName").getter(getter(UpdateEnvironmentRequest::applicationName)) .setter(setter(Builder::applicationName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ApplicationName").build()).build(); private static final SdkField ENVIRONMENT_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("EnvironmentId").getter(getter(UpdateEnvironmentRequest::environmentId)) .setter(setter(Builder::environmentId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EnvironmentId").build()).build(); private static final SdkField ENVIRONMENT_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("EnvironmentName").getter(getter(UpdateEnvironmentRequest::environmentName)) .setter(setter(Builder::environmentName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EnvironmentName").build()).build(); private static final SdkField GROUP_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("GroupName").getter(getter(UpdateEnvironmentRequest::groupName)).setter(setter(Builder::groupName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("GroupName").build()).build(); private static final SdkField DESCRIPTION_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("Description").getter(getter(UpdateEnvironmentRequest::description)).setter(setter(Builder::description)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Description").build()).build(); private static final SdkField TIER_FIELD = SdkField. builder(MarshallingType.SDK_POJO) .memberName("Tier").getter(getter(UpdateEnvironmentRequest::tier)).setter(setter(Builder::tier)) .constructor(EnvironmentTier::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Tier").build()).build(); private static final SdkField VERSION_LABEL_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("VersionLabel").getter(getter(UpdateEnvironmentRequest::versionLabel)) .setter(setter(Builder::versionLabel)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("VersionLabel").build()).build(); private static final SdkField TEMPLATE_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("TemplateName").getter(getter(UpdateEnvironmentRequest::templateName)) .setter(setter(Builder::templateName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TemplateName").build()).build(); private static final SdkField SOLUTION_STACK_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("SolutionStackName").getter(getter(UpdateEnvironmentRequest::solutionStackName)) .setter(setter(Builder::solutionStackName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SolutionStackName").build()).build(); private static final SdkField PLATFORM_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("PlatformArn").getter(getter(UpdateEnvironmentRequest::platformArn)).setter(setter(Builder::platformArn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PlatformArn").build()).build(); private static final SdkField> OPTION_SETTINGS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("OptionSettings") .getter(getter(UpdateEnvironmentRequest::optionSettings)) .setter(setter(Builder::optionSettings)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("OptionSettings").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(ConfigurationOptionSetting::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField> OPTIONS_TO_REMOVE_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("OptionsToRemove") .getter(getter(UpdateEnvironmentRequest::optionsToRemove)) .setter(setter(Builder::optionsToRemove)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("OptionsToRemove").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(OptionSpecification::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(APPLICATION_NAME_FIELD, ENVIRONMENT_ID_FIELD, ENVIRONMENT_NAME_FIELD, GROUP_NAME_FIELD, DESCRIPTION_FIELD, TIER_FIELD, VERSION_LABEL_FIELD, TEMPLATE_NAME_FIELD, SOLUTION_STACK_NAME_FIELD, PLATFORM_ARN_FIELD, OPTION_SETTINGS_FIELD, OPTIONS_TO_REMOVE_FIELD)); private final String applicationName; private final String environmentId; private final String environmentName; private final String groupName; private final String description; private final EnvironmentTier tier; private final String versionLabel; private final String templateName; private final String solutionStackName; private final String platformArn; private final List optionSettings; private final List optionsToRemove; private UpdateEnvironmentRequest(BuilderImpl builder) { super(builder); this.applicationName = builder.applicationName; this.environmentId = builder.environmentId; this.environmentName = builder.environmentName; this.groupName = builder.groupName; this.description = builder.description; this.tier = builder.tier; this.versionLabel = builder.versionLabel; this.templateName = builder.templateName; this.solutionStackName = builder.solutionStackName; this.platformArn = builder.platformArn; this.optionSettings = builder.optionSettings; this.optionsToRemove = builder.optionsToRemove; } /** *

* The name of the application with which the environment is associated. *

* * @return The name of the application with which the environment is associated. */ public final String applicationName() { return applicationName; } /** *

* The ID of the environment to update. *

*

* If no environment with this ID exists, AWS Elastic Beanstalk returns an InvalidParameterValue error. *

*

* Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS Elastic * Beanstalk returns MissingRequiredParameter error. *

* * @return The ID of the environment to update.

*

* If no environment with this ID exists, AWS Elastic Beanstalk returns an * InvalidParameterValue error. *

*

* Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS * Elastic Beanstalk returns MissingRequiredParameter error. */ public final String environmentId() { return environmentId; } /** *

* The name of the environment to update. If no environment with this name exists, AWS Elastic Beanstalk returns an * InvalidParameterValue error. *

*

* Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS Elastic * Beanstalk returns MissingRequiredParameter error. *

* * @return The name of the environment to update. If no environment with this name exists, AWS Elastic Beanstalk * returns an InvalidParameterValue error.

*

* Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS * Elastic Beanstalk returns MissingRequiredParameter error. */ public final String environmentName() { return environmentName; } /** *

* The name of the group to which the target environment belongs. Specify a group name only if the environment's * name is specified in an environment manifest and not with the environment name or environment ID parameters. See * Environment * Manifest (env.yaml) for details. *

* * @return The name of the group to which the target environment belongs. Specify a group name only if the * environment's name is specified in an environment manifest and not with the environment name or * environment ID parameters. See Environment * Manifest (env.yaml) for details. */ public final String groupName() { return groupName; } /** *

* If this parameter is specified, AWS Elastic Beanstalk updates the description of this environment. *

* * @return If this parameter is specified, AWS Elastic Beanstalk updates the description of this environment. */ public final String description() { return description; } /** *

* This specifies the tier to use to update the environment. *

*

* Condition: At this time, if you change the tier version, name, or type, AWS Elastic Beanstalk returns * InvalidParameterValue error. *

* * @return This specifies the tier to use to update the environment.

*

* Condition: At this time, if you change the tier version, name, or type, AWS Elastic Beanstalk returns * InvalidParameterValue error. */ public final EnvironmentTier tier() { return tier; } /** *

* If this parameter is specified, AWS Elastic Beanstalk deploys the named application version to the environment. * If no such application version is found, returns an InvalidParameterValue error. *

* * @return If this parameter is specified, AWS Elastic Beanstalk deploys the named application version to the * environment. If no such application version is found, returns an InvalidParameterValue * error. */ public final String versionLabel() { return versionLabel; } /** *

* If this parameter is specified, AWS Elastic Beanstalk deploys this configuration template to the environment. If * no such configuration template is found, AWS Elastic Beanstalk returns an InvalidParameterValue * error. *

* * @return If this parameter is specified, AWS Elastic Beanstalk deploys this configuration template to the * environment. If no such configuration template is found, AWS Elastic Beanstalk returns an * InvalidParameterValue error. */ public final String templateName() { return templateName; } /** *

* This specifies the platform version that the environment will run after the environment is updated. *

* * @return This specifies the platform version that the environment will run after the environment is updated. */ public final String solutionStackName() { return solutionStackName; } /** *

* The ARN of the platform, if used. *

* * @return The ARN of the platform, if used. */ public final String platformArn() { return platformArn; } /** * For responses, this returns true if the service returned a value for the OptionSettings 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 hasOptionSettings() { return optionSettings != null && !(optionSettings instanceof SdkAutoConstructList); } /** *

* If specified, AWS Elastic Beanstalk updates the configuration set associated with the running environment and * sets the specified configuration options to the requested value. *

*

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

* * @return If specified, AWS Elastic Beanstalk updates the configuration set associated with the running environment * and sets the specified configuration options to the requested value. */ public final List optionSettings() { return optionSettings; } /** * For responses, this returns true if the service returned a value for the OptionsToRemove 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 hasOptionsToRemove() { return optionsToRemove != null && !(optionsToRemove instanceof SdkAutoConstructList); } /** *

* A list of custom user-defined configuration options to remove from the configuration set for this environment. *

*

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

* * @return A list of custom user-defined configuration options to remove from the configuration set for this * environment. */ public final List optionsToRemove() { return optionsToRemove; } @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(applicationName()); hashCode = 31 * hashCode + Objects.hashCode(environmentId()); hashCode = 31 * hashCode + Objects.hashCode(environmentName()); hashCode = 31 * hashCode + Objects.hashCode(groupName()); hashCode = 31 * hashCode + Objects.hashCode(description()); hashCode = 31 * hashCode + Objects.hashCode(tier()); hashCode = 31 * hashCode + Objects.hashCode(versionLabel()); hashCode = 31 * hashCode + Objects.hashCode(templateName()); hashCode = 31 * hashCode + Objects.hashCode(solutionStackName()); hashCode = 31 * hashCode + Objects.hashCode(platformArn()); hashCode = 31 * hashCode + Objects.hashCode(hasOptionSettings() ? optionSettings() : null); hashCode = 31 * hashCode + Objects.hashCode(hasOptionsToRemove() ? optionsToRemove() : null); 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 UpdateEnvironmentRequest)) { return false; } UpdateEnvironmentRequest other = (UpdateEnvironmentRequest) obj; return Objects.equals(applicationName(), other.applicationName()) && Objects.equals(environmentId(), other.environmentId()) && Objects.equals(environmentName(), other.environmentName()) && Objects.equals(groupName(), other.groupName()) && Objects.equals(description(), other.description()) && Objects.equals(tier(), other.tier()) && Objects.equals(versionLabel(), other.versionLabel()) && Objects.equals(templateName(), other.templateName()) && Objects.equals(solutionStackName(), other.solutionStackName()) && Objects.equals(platformArn(), other.platformArn()) && hasOptionSettings() == other.hasOptionSettings() && Objects.equals(optionSettings(), other.optionSettings()) && hasOptionsToRemove() == other.hasOptionsToRemove() && Objects.equals(optionsToRemove(), other.optionsToRemove()); } /** * 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("UpdateEnvironmentRequest").add("ApplicationName", applicationName()) .add("EnvironmentId", environmentId()).add("EnvironmentName", environmentName()).add("GroupName", groupName()) .add("Description", description()).add("Tier", tier()).add("VersionLabel", versionLabel()) .add("TemplateName", templateName()).add("SolutionStackName", solutionStackName()) .add("PlatformArn", platformArn()).add("OptionSettings", hasOptionSettings() ? optionSettings() : null) .add("OptionsToRemove", hasOptionsToRemove() ? optionsToRemove() : null).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "ApplicationName": return Optional.ofNullable(clazz.cast(applicationName())); case "EnvironmentId": return Optional.ofNullable(clazz.cast(environmentId())); case "EnvironmentName": return Optional.ofNullable(clazz.cast(environmentName())); case "GroupName": return Optional.ofNullable(clazz.cast(groupName())); case "Description": return Optional.ofNullable(clazz.cast(description())); case "Tier": return Optional.ofNullable(clazz.cast(tier())); case "VersionLabel": return Optional.ofNullable(clazz.cast(versionLabel())); case "TemplateName": return Optional.ofNullable(clazz.cast(templateName())); case "SolutionStackName": return Optional.ofNullable(clazz.cast(solutionStackName())); case "PlatformArn": return Optional.ofNullable(clazz.cast(platformArn())); case "OptionSettings": return Optional.ofNullable(clazz.cast(optionSettings())); case "OptionsToRemove": return Optional.ofNullable(clazz.cast(optionsToRemove())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((UpdateEnvironmentRequest) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends ElasticBeanstalkRequest.Builder, SdkPojo, CopyableBuilder { /** *

* The name of the application with which the environment is associated. *

* * @param applicationName * The name of the application with which the environment is associated. * @return Returns a reference to this object so that method calls can be chained together. */ Builder applicationName(String applicationName); /** *

* The ID of the environment to update. *

*

* If no environment with this ID exists, AWS Elastic Beanstalk returns an InvalidParameterValue * error. *

*

* Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, AWS * Elastic Beanstalk returns MissingRequiredParameter error. *

* * @param environmentId * The ID of the environment to update.

*

* If no environment with this ID exists, AWS Elastic Beanstalk returns an * InvalidParameterValue error. *

*

* Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, * AWS Elastic Beanstalk returns MissingRequiredParameter error. * @return Returns a reference to this object so that method calls can be chained together. */ Builder environmentId(String environmentId); /** *

* The name of the environment to update. If no environment with this name exists, AWS Elastic Beanstalk returns * an InvalidParameterValue error. *

*

* Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, AWS * Elastic Beanstalk returns MissingRequiredParameter error. *

* * @param environmentName * The name of the environment to update. If no environment with this name exists, AWS Elastic Beanstalk * returns an InvalidParameterValue error.

*

* Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, * AWS Elastic Beanstalk returns MissingRequiredParameter error. * @return Returns a reference to this object so that method calls can be chained together. */ Builder environmentName(String environmentName); /** *

* The name of the group to which the target environment belongs. Specify a group name only if the environment's * name is specified in an environment manifest and not with the environment name or environment ID parameters. * See Environment * Manifest (env.yaml) for details. *

* * @param groupName * The name of the group to which the target environment belongs. Specify a group name only if the * environment's name is specified in an environment manifest and not with the environment name or * environment ID parameters. See Environment Manifest (env.yaml) for details. * @return Returns a reference to this object so that method calls can be chained together. */ Builder groupName(String groupName); /** *

* If this parameter is specified, AWS Elastic Beanstalk updates the description of this environment. *

* * @param description * If this parameter is specified, AWS Elastic Beanstalk updates the description of this environment. * @return Returns a reference to this object so that method calls can be chained together. */ Builder description(String description); /** *

* This specifies the tier to use to update the environment. *

*

* Condition: At this time, if you change the tier version, name, or type, AWS Elastic Beanstalk returns * InvalidParameterValue error. *

* * @param tier * This specifies the tier to use to update the environment.

*

* Condition: At this time, if you change the tier version, name, or type, AWS Elastic Beanstalk returns * InvalidParameterValue error. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tier(EnvironmentTier tier); /** *

* This specifies the tier to use to update the environment. *

*

* Condition: At this time, if you change the tier version, name, or type, AWS Elastic Beanstalk returns * InvalidParameterValue error. *

* This is a convenience that creates an instance of the {@link EnvironmentTier.Builder} avoiding the need to * create one manually via {@link EnvironmentTier#builder()}. * * When the {@link Consumer} completes, {@link EnvironmentTier.Builder#build()} is called immediately and its * result is passed to {@link #tier(EnvironmentTier)}. * * @param tier * a consumer that will call methods on {@link EnvironmentTier.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #tier(EnvironmentTier) */ default Builder tier(Consumer tier) { return tier(EnvironmentTier.builder().applyMutation(tier).build()); } /** *

* If this parameter is specified, AWS Elastic Beanstalk deploys the named application version to the * environment. If no such application version is found, returns an InvalidParameterValue error. *

* * @param versionLabel * If this parameter is specified, AWS Elastic Beanstalk deploys the named application version to the * environment. If no such application version is found, returns an InvalidParameterValue * error. * @return Returns a reference to this object so that method calls can be chained together. */ Builder versionLabel(String versionLabel); /** *

* If this parameter is specified, AWS Elastic Beanstalk deploys this configuration template to the environment. * If no such configuration template is found, AWS Elastic Beanstalk returns an * InvalidParameterValue error. *

* * @param templateName * If this parameter is specified, AWS Elastic Beanstalk deploys this configuration template to the * environment. If no such configuration template is found, AWS Elastic Beanstalk returns an * InvalidParameterValue error. * @return Returns a reference to this object so that method calls can be chained together. */ Builder templateName(String templateName); /** *

* This specifies the platform version that the environment will run after the environment is updated. *

* * @param solutionStackName * This specifies the platform version that the environment will run after the environment is updated. * @return Returns a reference to this object so that method calls can be chained together. */ Builder solutionStackName(String solutionStackName); /** *

* The ARN of the platform, if used. *

* * @param platformArn * The ARN of the platform, if used. * @return Returns a reference to this object so that method calls can be chained together. */ Builder platformArn(String platformArn); /** *

* If specified, AWS Elastic Beanstalk updates the configuration set associated with the running environment and * sets the specified configuration options to the requested value. *

* * @param optionSettings * If specified, AWS Elastic Beanstalk updates the configuration set associated with the running * environment and sets the specified configuration options to the requested value. * @return Returns a reference to this object so that method calls can be chained together. */ Builder optionSettings(Collection optionSettings); /** *

* If specified, AWS Elastic Beanstalk updates the configuration set associated with the running environment and * sets the specified configuration options to the requested value. *

* * @param optionSettings * If specified, AWS Elastic Beanstalk updates the configuration set associated with the running * environment and sets the specified configuration options to the requested value. * @return Returns a reference to this object so that method calls can be chained together. */ Builder optionSettings(ConfigurationOptionSetting... optionSettings); /** *

* If specified, AWS Elastic Beanstalk updates the configuration set associated with the running environment and * sets the specified configuration options to the requested value. *

* This is a convenience that creates an instance of the {@link List.Builder} * avoiding the need to create one manually via {@link List#builder()}. * * When the {@link Consumer} completes, {@link List.Builder#build()} is called * immediately and its result is passed to {@link #optionSettings(List)}. * * @param optionSettings * a consumer that will call methods on {@link List.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #optionSettings(List) */ Builder optionSettings(Consumer... optionSettings); /** *

* A list of custom user-defined configuration options to remove from the configuration set for this * environment. *

* * @param optionsToRemove * A list of custom user-defined configuration options to remove from the configuration set for this * environment. * @return Returns a reference to this object so that method calls can be chained together. */ Builder optionsToRemove(Collection optionsToRemove); /** *

* A list of custom user-defined configuration options to remove from the configuration set for this * environment. *

* * @param optionsToRemove * A list of custom user-defined configuration options to remove from the configuration set for this * environment. * @return Returns a reference to this object so that method calls can be chained together. */ Builder optionsToRemove(OptionSpecification... optionsToRemove); /** *

* A list of custom user-defined configuration options to remove from the configuration set for this * environment. *

* This is a convenience that creates an instance of the {@link List.Builder} avoiding the * need to create one manually via {@link List#builder()}. * * When the {@link Consumer} completes, {@link List.Builder#build()} is called immediately * and its result is passed to {@link #optionsToRemove(List)}. * * @param optionsToRemove * a consumer that will call methods on {@link List.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #optionsToRemove(List) */ Builder optionsToRemove(Consumer... optionsToRemove); @Override Builder overrideConfiguration(AwsRequestOverrideConfiguration overrideConfiguration); @Override Builder overrideConfiguration(Consumer builderConsumer); } static final class BuilderImpl extends ElasticBeanstalkRequest.BuilderImpl implements Builder { private String applicationName; private String environmentId; private String environmentName; private String groupName; private String description; private EnvironmentTier tier; private String versionLabel; private String templateName; private String solutionStackName; private String platformArn; private List optionSettings = DefaultSdkAutoConstructList.getInstance(); private List optionsToRemove = DefaultSdkAutoConstructList.getInstance(); private BuilderImpl() { } private BuilderImpl(UpdateEnvironmentRequest model) { super(model); applicationName(model.applicationName); environmentId(model.environmentId); environmentName(model.environmentName); groupName(model.groupName); description(model.description); tier(model.tier); versionLabel(model.versionLabel); templateName(model.templateName); solutionStackName(model.solutionStackName); platformArn(model.platformArn); optionSettings(model.optionSettings); optionsToRemove(model.optionsToRemove); } public final String getApplicationName() { return applicationName; } public final void setApplicationName(String applicationName) { this.applicationName = applicationName; } @Override @Transient public final Builder applicationName(String applicationName) { this.applicationName = applicationName; return this; } public final String getEnvironmentId() { return environmentId; } public final void setEnvironmentId(String environmentId) { this.environmentId = environmentId; } @Override @Transient public final Builder environmentId(String environmentId) { this.environmentId = environmentId; return this; } public final String getEnvironmentName() { return environmentName; } public final void setEnvironmentName(String environmentName) { this.environmentName = environmentName; } @Override @Transient public final Builder environmentName(String environmentName) { this.environmentName = environmentName; return this; } public final String getGroupName() { return groupName; } public final void setGroupName(String groupName) { this.groupName = groupName; } @Override @Transient public final Builder groupName(String groupName) { this.groupName = groupName; return this; } public final String getDescription() { return description; } public final void setDescription(String description) { this.description = description; } @Override @Transient public final Builder description(String description) { this.description = description; return this; } public final EnvironmentTier.Builder getTier() { return tier != null ? tier.toBuilder() : null; } public final void setTier(EnvironmentTier.BuilderImpl tier) { this.tier = tier != null ? tier.build() : null; } @Override @Transient public final Builder tier(EnvironmentTier tier) { this.tier = tier; return this; } public final String getVersionLabel() { return versionLabel; } public final void setVersionLabel(String versionLabel) { this.versionLabel = versionLabel; } @Override @Transient public final Builder versionLabel(String versionLabel) { this.versionLabel = versionLabel; return this; } public final String getTemplateName() { return templateName; } public final void setTemplateName(String templateName) { this.templateName = templateName; } @Override @Transient public final Builder templateName(String templateName) { this.templateName = templateName; return this; } public final String getSolutionStackName() { return solutionStackName; } public final void setSolutionStackName(String solutionStackName) { this.solutionStackName = solutionStackName; } @Override @Transient public final Builder solutionStackName(String solutionStackName) { this.solutionStackName = solutionStackName; return this; } public final String getPlatformArn() { return platformArn; } public final void setPlatformArn(String platformArn) { this.platformArn = platformArn; } @Override @Transient public final Builder platformArn(String platformArn) { this.platformArn = platformArn; return this; } public final List getOptionSettings() { List result = ConfigurationOptionSettingsListCopier .copyToBuilder(this.optionSettings); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setOptionSettings(Collection optionSettings) { this.optionSettings = ConfigurationOptionSettingsListCopier.copyFromBuilder(optionSettings); } @Override @Transient public final Builder optionSettings(Collection optionSettings) { this.optionSettings = ConfigurationOptionSettingsListCopier.copy(optionSettings); return this; } @Override @Transient @SafeVarargs public final Builder optionSettings(ConfigurationOptionSetting... optionSettings) { optionSettings(Arrays.asList(optionSettings)); return this; } @Override @Transient @SafeVarargs public final Builder optionSettings(Consumer... optionSettings) { optionSettings(Stream.of(optionSettings).map(c -> ConfigurationOptionSetting.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final List getOptionsToRemove() { List result = OptionsSpecifierListCopier.copyToBuilder(this.optionsToRemove); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setOptionsToRemove(Collection optionsToRemove) { this.optionsToRemove = OptionsSpecifierListCopier.copyFromBuilder(optionsToRemove); } @Override @Transient public final Builder optionsToRemove(Collection optionsToRemove) { this.optionsToRemove = OptionsSpecifierListCopier.copy(optionsToRemove); return this; } @Override @Transient @SafeVarargs public final Builder optionsToRemove(OptionSpecification... optionsToRemove) { optionsToRemove(Arrays.asList(optionsToRemove)); return this; } @Override @Transient @SafeVarargs public final Builder optionsToRemove(Consumer... optionsToRemove) { optionsToRemove(Stream.of(optionsToRemove).map(c -> OptionSpecification.builder().applyMutation(c).build()) .collect(Collectors.toList())); 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 UpdateEnvironmentRequest build() { return new UpdateEnvironmentRequest(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy