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

software.amazon.awssdk.services.autoscaling.model.AutoScalingGroup Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Auto Scaling module holds the client classes that are used for communicating with Auto Scaling 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.autoscaling.model;

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

/**
 * 

* Describes an Auto Scaling group. *

*/ @Generated("software.amazon.awssdk:codegen") public final class AutoScalingGroup implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField AUTO_SCALING_GROUP_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("AutoScalingGroupName").getter(getter(AutoScalingGroup::autoScalingGroupName)) .setter(setter(Builder::autoScalingGroupName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AutoScalingGroupName").build()) .build(); private static final SdkField AUTO_SCALING_GROUP_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("AutoScalingGroupARN").getter(getter(AutoScalingGroup::autoScalingGroupARN)) .setter(setter(Builder::autoScalingGroupARN)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AutoScalingGroupARN").build()) .build(); private static final SdkField LAUNCH_CONFIGURATION_NAME_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("LaunchConfigurationName").getter(getter(AutoScalingGroup::launchConfigurationName)) .setter(setter(Builder::launchConfigurationName)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LaunchConfigurationName").build()) .build(); private static final SdkField LAUNCH_TEMPLATE_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("LaunchTemplate") .getter(getter(AutoScalingGroup::launchTemplate)).setter(setter(Builder::launchTemplate)) .constructor(LaunchTemplateSpecification::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LaunchTemplate").build()).build(); private static final SdkField MIXED_INSTANCES_POLICY_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("MixedInstancesPolicy") .getter(getter(AutoScalingGroup::mixedInstancesPolicy)).setter(setter(Builder::mixedInstancesPolicy)) .constructor(MixedInstancesPolicy::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("MixedInstancesPolicy").build()) .build(); private static final SdkField MIN_SIZE_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("MinSize").getter(getter(AutoScalingGroup::minSize)).setter(setter(Builder::minSize)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("MinSize").build()).build(); private static final SdkField MAX_SIZE_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("MaxSize").getter(getter(AutoScalingGroup::maxSize)).setter(setter(Builder::maxSize)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("MaxSize").build()).build(); private static final SdkField DESIRED_CAPACITY_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("DesiredCapacity").getter(getter(AutoScalingGroup::desiredCapacity)) .setter(setter(Builder::desiredCapacity)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DesiredCapacity").build()).build(); private static final SdkField PREDICTED_CAPACITY_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("PredictedCapacity").getter(getter(AutoScalingGroup::predictedCapacity)) .setter(setter(Builder::predictedCapacity)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PredictedCapacity").build()).build(); private static final SdkField DEFAULT_COOLDOWN_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("DefaultCooldown").getter(getter(AutoScalingGroup::defaultCooldown)) .setter(setter(Builder::defaultCooldown)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DefaultCooldown").build()).build(); private static final SdkField> AVAILABILITY_ZONES_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("AvailabilityZones") .getter(getter(AutoScalingGroup::availabilityZones)) .setter(setter(Builder::availabilityZones)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AvailabilityZones").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> LOAD_BALANCER_NAMES_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("LoadBalancerNames") .getter(getter(AutoScalingGroup::loadBalancerNames)) .setter(setter(Builder::loadBalancerNames)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("LoadBalancerNames").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> TARGET_GROUP_AR_NS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("TargetGroupARNs") .getter(getter(AutoScalingGroup::targetGroupARNs)) .setter(setter(Builder::targetGroupARNs)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TargetGroupARNs").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 HEALTH_CHECK_TYPE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("HealthCheckType").getter(getter(AutoScalingGroup::healthCheckType)) .setter(setter(Builder::healthCheckType)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("HealthCheckType").build()).build(); private static final SdkField HEALTH_CHECK_GRACE_PERIOD_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("HealthCheckGracePeriod").getter(getter(AutoScalingGroup::healthCheckGracePeriod)) .setter(setter(Builder::healthCheckGracePeriod)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("HealthCheckGracePeriod").build()) .build(); private static final SdkField> INSTANCES_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("Instances") .getter(getter(AutoScalingGroup::instances)) .setter(setter(Builder::instances)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Instances").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(Instance::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField CREATED_TIME_FIELD = SdkField. builder(MarshallingType.INSTANT) .memberName("CreatedTime").getter(getter(AutoScalingGroup::createdTime)).setter(setter(Builder::createdTime)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CreatedTime").build()).build(); private static final SdkField> SUSPENDED_PROCESSES_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("SuspendedProcesses") .getter(getter(AutoScalingGroup::suspendedProcesses)) .setter(setter(Builder::suspendedProcesses)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SuspendedProcesses").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(SuspendedProcess::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField PLACEMENT_GROUP_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("PlacementGroup").getter(getter(AutoScalingGroup::placementGroup)) .setter(setter(Builder::placementGroup)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PlacementGroup").build()).build(); private static final SdkField VPC_ZONE_IDENTIFIER_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("VPCZoneIdentifier").getter(getter(AutoScalingGroup::vpcZoneIdentifier)) .setter(setter(Builder::vpcZoneIdentifier)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("VPCZoneIdentifier").build()).build(); private static final SdkField> ENABLED_METRICS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("EnabledMetrics") .getter(getter(AutoScalingGroup::enabledMetrics)) .setter(setter(Builder::enabledMetrics)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("EnabledMetrics").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(EnabledMetric::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField STATUS_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Status") .getter(getter(AutoScalingGroup::status)).setter(setter(Builder::status)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Status").build()).build(); private static final SdkField> TAGS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("Tags") .getter(getter(AutoScalingGroup::tags)) .setter(setter(Builder::tags)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Tags").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(TagDescription::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField> TERMINATION_POLICIES_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("TerminationPolicies") .getter(getter(AutoScalingGroup::terminationPolicies)) .setter(setter(Builder::terminationPolicies)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TerminationPolicies").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 NEW_INSTANCES_PROTECTED_FROM_SCALE_IN_FIELD = SdkField . builder(MarshallingType.BOOLEAN) .memberName("NewInstancesProtectedFromScaleIn") .getter(getter(AutoScalingGroup::newInstancesProtectedFromScaleIn)) .setter(setter(Builder::newInstancesProtectedFromScaleIn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("NewInstancesProtectedFromScaleIn") .build()).build(); private static final SdkField SERVICE_LINKED_ROLE_ARN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ServiceLinkedRoleARN").getter(getter(AutoScalingGroup::serviceLinkedRoleARN)) .setter(setter(Builder::serviceLinkedRoleARN)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ServiceLinkedRoleARN").build()) .build(); private static final SdkField MAX_INSTANCE_LIFETIME_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("MaxInstanceLifetime").getter(getter(AutoScalingGroup::maxInstanceLifetime)) .setter(setter(Builder::maxInstanceLifetime)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("MaxInstanceLifetime").build()) .build(); private static final SdkField CAPACITY_REBALANCE_FIELD = SdkField. builder(MarshallingType.BOOLEAN) .memberName("CapacityRebalance").getter(getter(AutoScalingGroup::capacityRebalance)) .setter(setter(Builder::capacityRebalance)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("CapacityRebalance").build()).build(); private static final SdkField WARM_POOL_CONFIGURATION_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("WarmPoolConfiguration") .getter(getter(AutoScalingGroup::warmPoolConfiguration)).setter(setter(Builder::warmPoolConfiguration)) .constructor(WarmPoolConfiguration::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("WarmPoolConfiguration").build()) .build(); private static final SdkField WARM_POOL_SIZE_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("WarmPoolSize").getter(getter(AutoScalingGroup::warmPoolSize)).setter(setter(Builder::warmPoolSize)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("WarmPoolSize").build()).build(); private static final SdkField CONTEXT_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Context") .getter(getter(AutoScalingGroup::context)).setter(setter(Builder::context)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Context").build()).build(); private static final SdkField DESIRED_CAPACITY_TYPE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("DesiredCapacityType").getter(getter(AutoScalingGroup::desiredCapacityType)) .setter(setter(Builder::desiredCapacityType)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DesiredCapacityType").build()) .build(); private static final SdkField DEFAULT_INSTANCE_WARMUP_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("DefaultInstanceWarmup").getter(getter(AutoScalingGroup::defaultInstanceWarmup)) .setter(setter(Builder::defaultInstanceWarmup)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DefaultInstanceWarmup").build()) .build(); private static final SdkField> TRAFFIC_SOURCES_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("TrafficSources") .getter(getter(AutoScalingGroup::trafficSources)) .setter(setter(Builder::trafficSources)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("TrafficSources").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(TrafficSourceIdentifier::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField INSTANCE_MAINTENANCE_POLICY_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("InstanceMaintenancePolicy") .getter(getter(AutoScalingGroup::instanceMaintenancePolicy)).setter(setter(Builder::instanceMaintenancePolicy)) .constructor(InstanceMaintenancePolicy::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("InstanceMaintenancePolicy").build()) .build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(AUTO_SCALING_GROUP_NAME_FIELD, AUTO_SCALING_GROUP_ARN_FIELD, LAUNCH_CONFIGURATION_NAME_FIELD, LAUNCH_TEMPLATE_FIELD, MIXED_INSTANCES_POLICY_FIELD, MIN_SIZE_FIELD, MAX_SIZE_FIELD, DESIRED_CAPACITY_FIELD, PREDICTED_CAPACITY_FIELD, DEFAULT_COOLDOWN_FIELD, AVAILABILITY_ZONES_FIELD, LOAD_BALANCER_NAMES_FIELD, TARGET_GROUP_AR_NS_FIELD, HEALTH_CHECK_TYPE_FIELD, HEALTH_CHECK_GRACE_PERIOD_FIELD, INSTANCES_FIELD, CREATED_TIME_FIELD, SUSPENDED_PROCESSES_FIELD, PLACEMENT_GROUP_FIELD, VPC_ZONE_IDENTIFIER_FIELD, ENABLED_METRICS_FIELD, STATUS_FIELD, TAGS_FIELD, TERMINATION_POLICIES_FIELD, NEW_INSTANCES_PROTECTED_FROM_SCALE_IN_FIELD, SERVICE_LINKED_ROLE_ARN_FIELD, MAX_INSTANCE_LIFETIME_FIELD, CAPACITY_REBALANCE_FIELD, WARM_POOL_CONFIGURATION_FIELD, WARM_POOL_SIZE_FIELD, CONTEXT_FIELD, DESIRED_CAPACITY_TYPE_FIELD, DEFAULT_INSTANCE_WARMUP_FIELD, TRAFFIC_SOURCES_FIELD, INSTANCE_MAINTENANCE_POLICY_FIELD)); private static final long serialVersionUID = 1L; private final String autoScalingGroupName; private final String autoScalingGroupARN; private final String launchConfigurationName; private final LaunchTemplateSpecification launchTemplate; private final MixedInstancesPolicy mixedInstancesPolicy; private final Integer minSize; private final Integer maxSize; private final Integer desiredCapacity; private final Integer predictedCapacity; private final Integer defaultCooldown; private final List availabilityZones; private final List loadBalancerNames; private final List targetGroupARNs; private final String healthCheckType; private final Integer healthCheckGracePeriod; private final List instances; private final Instant createdTime; private final List suspendedProcesses; private final String placementGroup; private final String vpcZoneIdentifier; private final List enabledMetrics; private final String status; private final List tags; private final List terminationPolicies; private final Boolean newInstancesProtectedFromScaleIn; private final String serviceLinkedRoleARN; private final Integer maxInstanceLifetime; private final Boolean capacityRebalance; private final WarmPoolConfiguration warmPoolConfiguration; private final Integer warmPoolSize; private final String context; private final String desiredCapacityType; private final Integer defaultInstanceWarmup; private final List trafficSources; private final InstanceMaintenancePolicy instanceMaintenancePolicy; private AutoScalingGroup(BuilderImpl builder) { this.autoScalingGroupName = builder.autoScalingGroupName; this.autoScalingGroupARN = builder.autoScalingGroupARN; this.launchConfigurationName = builder.launchConfigurationName; this.launchTemplate = builder.launchTemplate; this.mixedInstancesPolicy = builder.mixedInstancesPolicy; this.minSize = builder.minSize; this.maxSize = builder.maxSize; this.desiredCapacity = builder.desiredCapacity; this.predictedCapacity = builder.predictedCapacity; this.defaultCooldown = builder.defaultCooldown; this.availabilityZones = builder.availabilityZones; this.loadBalancerNames = builder.loadBalancerNames; this.targetGroupARNs = builder.targetGroupARNs; this.healthCheckType = builder.healthCheckType; this.healthCheckGracePeriod = builder.healthCheckGracePeriod; this.instances = builder.instances; this.createdTime = builder.createdTime; this.suspendedProcesses = builder.suspendedProcesses; this.placementGroup = builder.placementGroup; this.vpcZoneIdentifier = builder.vpcZoneIdentifier; this.enabledMetrics = builder.enabledMetrics; this.status = builder.status; this.tags = builder.tags; this.terminationPolicies = builder.terminationPolicies; this.newInstancesProtectedFromScaleIn = builder.newInstancesProtectedFromScaleIn; this.serviceLinkedRoleARN = builder.serviceLinkedRoleARN; this.maxInstanceLifetime = builder.maxInstanceLifetime; this.capacityRebalance = builder.capacityRebalance; this.warmPoolConfiguration = builder.warmPoolConfiguration; this.warmPoolSize = builder.warmPoolSize; this.context = builder.context; this.desiredCapacityType = builder.desiredCapacityType; this.defaultInstanceWarmup = builder.defaultInstanceWarmup; this.trafficSources = builder.trafficSources; this.instanceMaintenancePolicy = builder.instanceMaintenancePolicy; } /** *

* The name of the Auto Scaling group. *

* * @return The name of the Auto Scaling group. */ public final String autoScalingGroupName() { return autoScalingGroupName; } /** *

* The Amazon Resource Name (ARN) of the Auto Scaling group. *

* * @return The Amazon Resource Name (ARN) of the Auto Scaling group. */ public final String autoScalingGroupARN() { return autoScalingGroupARN; } /** *

* The name of the associated launch configuration. *

* * @return The name of the associated launch configuration. */ public final String launchConfigurationName() { return launchConfigurationName; } /** *

* The launch template for the group. *

* * @return The launch template for the group. */ public final LaunchTemplateSpecification launchTemplate() { return launchTemplate; } /** *

* The mixed instances policy for the group. *

* * @return The mixed instances policy for the group. */ public final MixedInstancesPolicy mixedInstancesPolicy() { return mixedInstancesPolicy; } /** *

* The minimum size of the group. *

* * @return The minimum size of the group. */ public final Integer minSize() { return minSize; } /** *

* The maximum size of the group. *

* * @return The maximum size of the group. */ public final Integer maxSize() { return maxSize; } /** *

* The desired size of the group. *

* * @return The desired size of the group. */ public final Integer desiredCapacity() { return desiredCapacity; } /** *

* The predicted capacity of the group when it has a predictive scaling policy. *

* * @return The predicted capacity of the group when it has a predictive scaling policy. */ public final Integer predictedCapacity() { return predictedCapacity; } /** *

* The duration of the default cooldown period, in seconds. *

* * @return The duration of the default cooldown period, in seconds. */ public final Integer defaultCooldown() { return defaultCooldown; } /** * For responses, this returns true if the service returned a value for the AvailabilityZones 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 hasAvailabilityZones() { return availabilityZones != null && !(availabilityZones instanceof SdkAutoConstructList); } /** *

* One or more Availability Zones for the group. *

*

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

* * @return One or more Availability Zones for the group. */ public final List availabilityZones() { return availabilityZones; } /** * For responses, this returns true if the service returned a value for the LoadBalancerNames 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 hasLoadBalancerNames() { return loadBalancerNames != null && !(loadBalancerNames instanceof SdkAutoConstructList); } /** *

* One or more load balancers associated with the group. *

*

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

* * @return One or more load balancers associated with the group. */ public final List loadBalancerNames() { return loadBalancerNames; } /** * For responses, this returns true if the service returned a value for the TargetGroupARNs 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 hasTargetGroupARNs() { return targetGroupARNs != null && !(targetGroupARNs instanceof SdkAutoConstructList); } /** *

* The Amazon Resource Names (ARN) of the target groups for your load balancer. *

*

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

* * @return The Amazon Resource Names (ARN) of the target groups for your load balancer. */ public final List targetGroupARNs() { return targetGroupARNs; } /** *

* A comma-separated value string of one or more health check types. *

* * @return A comma-separated value string of one or more health check types. */ public final String healthCheckType() { return healthCheckType; } /** *

* The duration of the health check grace period, in seconds. *

* * @return The duration of the health check grace period, in seconds. */ public final Integer healthCheckGracePeriod() { return healthCheckGracePeriod; } /** * For responses, this returns true if the service returned a value for the Instances 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 hasInstances() { return instances != null && !(instances instanceof SdkAutoConstructList); } /** *

* The EC2 instances associated with the group. *

*

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

* * @return The EC2 instances associated with the group. */ public final List instances() { return instances; } /** *

* The date and time the group was created. *

* * @return The date and time the group was created. */ public final Instant createdTime() { return createdTime; } /** * For responses, this returns true if the service returned a value for the SuspendedProcesses 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 hasSuspendedProcesses() { return suspendedProcesses != null && !(suspendedProcesses instanceof SdkAutoConstructList); } /** *

* The suspended processes associated with the group. *

*

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

* * @return The suspended processes associated with the group. */ public final List suspendedProcesses() { return suspendedProcesses; } /** *

* The name of the placement group into which to launch your instances, if any. *

* * @return The name of the placement group into which to launch your instances, if any. */ public final String placementGroup() { return placementGroup; } /** *

* One or more subnet IDs, if applicable, separated by commas. *

* * @return One or more subnet IDs, if applicable, separated by commas. */ public final String vpcZoneIdentifier() { return vpcZoneIdentifier; } /** * For responses, this returns true if the service returned a value for the EnabledMetrics 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 hasEnabledMetrics() { return enabledMetrics != null && !(enabledMetrics instanceof SdkAutoConstructList); } /** *

* The metrics enabled for the group. *

*

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

* * @return The metrics enabled for the group. */ public final List enabledMetrics() { return enabledMetrics; } /** *

* The current state of the group when the DeleteAutoScalingGroup operation is in progress. *

* * @return The current state of the group when the DeleteAutoScalingGroup operation is in progress. */ public final String status() { return status; } /** * For responses, this returns true if the service returned a value for the Tags 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 hasTags() { return tags != null && !(tags instanceof SdkAutoConstructList); } /** *

* The tags for the group. *

*

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

* * @return The tags for the group. */ public final List tags() { return tags; } /** * For responses, this returns true if the service returned a value for the TerminationPolicies 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 hasTerminationPolicies() { return terminationPolicies != null && !(terminationPolicies instanceof SdkAutoConstructList); } /** *

* The termination policies for the group. *

*

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

* * @return The termination policies for the group. */ public final List terminationPolicies() { return terminationPolicies; } /** *

* Indicates whether newly launched instances are protected from termination by Amazon EC2 Auto Scaling when scaling * in. *

* * @return Indicates whether newly launched instances are protected from termination by Amazon EC2 Auto Scaling when * scaling in. */ public final Boolean newInstancesProtectedFromScaleIn() { return newInstancesProtectedFromScaleIn; } /** *

* The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling group uses to call other Amazon * Web Services on your behalf. *

* * @return The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling group uses to call other * Amazon Web Services on your behalf. */ public final String serviceLinkedRoleARN() { return serviceLinkedRoleARN; } /** *

* The maximum amount of time, in seconds, that an instance can be in service. *

*

* Valid Range: Minimum value of 0. *

* * @return The maximum amount of time, in seconds, that an instance can be in service.

*

* Valid Range: Minimum value of 0. */ public final Integer maxInstanceLifetime() { return maxInstanceLifetime; } /** *

* Indicates whether Capacity Rebalancing is enabled. *

* * @return Indicates whether Capacity Rebalancing is enabled. */ public final Boolean capacityRebalance() { return capacityRebalance; } /** *

* The warm pool for the group. *

* * @return The warm pool for the group. */ public final WarmPoolConfiguration warmPoolConfiguration() { return warmPoolConfiguration; } /** *

* The current size of the warm pool. *

* * @return The current size of the warm pool. */ public final Integer warmPoolSize() { return warmPoolSize; } /** *

* Reserved. *

* * @return Reserved. */ public final String context() { return context; } /** *

* The unit of measurement for the value specified for desired capacity. Amazon EC2 Auto Scaling supports * DesiredCapacityType for attribute-based instance type selection only. *

* * @return The unit of measurement for the value specified for desired capacity. Amazon EC2 Auto Scaling supports * DesiredCapacityType for attribute-based instance type selection only. */ public final String desiredCapacityType() { return desiredCapacityType; } /** *

* The duration of the default instance warmup, in seconds. *

* * @return The duration of the default instance warmup, in seconds. */ public final Integer defaultInstanceWarmup() { return defaultInstanceWarmup; } /** * For responses, this returns true if the service returned a value for the TrafficSources 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 hasTrafficSources() { return trafficSources != null && !(trafficSources instanceof SdkAutoConstructList); } /** *

* The traffic sources associated with this Auto Scaling group. *

*

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

* * @return The traffic sources associated with this Auto Scaling group. */ public final List trafficSources() { return trafficSources; } /** *

* An instance maintenance policy. *

* * @return An instance maintenance policy. */ public final InstanceMaintenancePolicy instanceMaintenancePolicy() { return instanceMaintenancePolicy; } @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(autoScalingGroupName()); hashCode = 31 * hashCode + Objects.hashCode(autoScalingGroupARN()); hashCode = 31 * hashCode + Objects.hashCode(launchConfigurationName()); hashCode = 31 * hashCode + Objects.hashCode(launchTemplate()); hashCode = 31 * hashCode + Objects.hashCode(mixedInstancesPolicy()); hashCode = 31 * hashCode + Objects.hashCode(minSize()); hashCode = 31 * hashCode + Objects.hashCode(maxSize()); hashCode = 31 * hashCode + Objects.hashCode(desiredCapacity()); hashCode = 31 * hashCode + Objects.hashCode(predictedCapacity()); hashCode = 31 * hashCode + Objects.hashCode(defaultCooldown()); hashCode = 31 * hashCode + Objects.hashCode(hasAvailabilityZones() ? availabilityZones() : null); hashCode = 31 * hashCode + Objects.hashCode(hasLoadBalancerNames() ? loadBalancerNames() : null); hashCode = 31 * hashCode + Objects.hashCode(hasTargetGroupARNs() ? targetGroupARNs() : null); hashCode = 31 * hashCode + Objects.hashCode(healthCheckType()); hashCode = 31 * hashCode + Objects.hashCode(healthCheckGracePeriod()); hashCode = 31 * hashCode + Objects.hashCode(hasInstances() ? instances() : null); hashCode = 31 * hashCode + Objects.hashCode(createdTime()); hashCode = 31 * hashCode + Objects.hashCode(hasSuspendedProcesses() ? suspendedProcesses() : null); hashCode = 31 * hashCode + Objects.hashCode(placementGroup()); hashCode = 31 * hashCode + Objects.hashCode(vpcZoneIdentifier()); hashCode = 31 * hashCode + Objects.hashCode(hasEnabledMetrics() ? enabledMetrics() : null); hashCode = 31 * hashCode + Objects.hashCode(status()); hashCode = 31 * hashCode + Objects.hashCode(hasTags() ? tags() : null); hashCode = 31 * hashCode + Objects.hashCode(hasTerminationPolicies() ? terminationPolicies() : null); hashCode = 31 * hashCode + Objects.hashCode(newInstancesProtectedFromScaleIn()); hashCode = 31 * hashCode + Objects.hashCode(serviceLinkedRoleARN()); hashCode = 31 * hashCode + Objects.hashCode(maxInstanceLifetime()); hashCode = 31 * hashCode + Objects.hashCode(capacityRebalance()); hashCode = 31 * hashCode + Objects.hashCode(warmPoolConfiguration()); hashCode = 31 * hashCode + Objects.hashCode(warmPoolSize()); hashCode = 31 * hashCode + Objects.hashCode(context()); hashCode = 31 * hashCode + Objects.hashCode(desiredCapacityType()); hashCode = 31 * hashCode + Objects.hashCode(defaultInstanceWarmup()); hashCode = 31 * hashCode + Objects.hashCode(hasTrafficSources() ? trafficSources() : null); hashCode = 31 * hashCode + Objects.hashCode(instanceMaintenancePolicy()); 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 AutoScalingGroup)) { return false; } AutoScalingGroup other = (AutoScalingGroup) obj; return Objects.equals(autoScalingGroupName(), other.autoScalingGroupName()) && Objects.equals(autoScalingGroupARN(), other.autoScalingGroupARN()) && Objects.equals(launchConfigurationName(), other.launchConfigurationName()) && Objects.equals(launchTemplate(), other.launchTemplate()) && Objects.equals(mixedInstancesPolicy(), other.mixedInstancesPolicy()) && Objects.equals(minSize(), other.minSize()) && Objects.equals(maxSize(), other.maxSize()) && Objects.equals(desiredCapacity(), other.desiredCapacity()) && Objects.equals(predictedCapacity(), other.predictedCapacity()) && Objects.equals(defaultCooldown(), other.defaultCooldown()) && hasAvailabilityZones() == other.hasAvailabilityZones() && Objects.equals(availabilityZones(), other.availabilityZones()) && hasLoadBalancerNames() == other.hasLoadBalancerNames() && Objects.equals(loadBalancerNames(), other.loadBalancerNames()) && hasTargetGroupARNs() == other.hasTargetGroupARNs() && Objects.equals(targetGroupARNs(), other.targetGroupARNs()) && Objects.equals(healthCheckType(), other.healthCheckType()) && Objects.equals(healthCheckGracePeriod(), other.healthCheckGracePeriod()) && hasInstances() == other.hasInstances() && Objects.equals(instances(), other.instances()) && Objects.equals(createdTime(), other.createdTime()) && hasSuspendedProcesses() == other.hasSuspendedProcesses() && Objects.equals(suspendedProcesses(), other.suspendedProcesses()) && Objects.equals(placementGroup(), other.placementGroup()) && Objects.equals(vpcZoneIdentifier(), other.vpcZoneIdentifier()) && hasEnabledMetrics() == other.hasEnabledMetrics() && Objects.equals(enabledMetrics(), other.enabledMetrics()) && Objects.equals(status(), other.status()) && hasTags() == other.hasTags() && Objects.equals(tags(), other.tags()) && hasTerminationPolicies() == other.hasTerminationPolicies() && Objects.equals(terminationPolicies(), other.terminationPolicies()) && Objects.equals(newInstancesProtectedFromScaleIn(), other.newInstancesProtectedFromScaleIn()) && Objects.equals(serviceLinkedRoleARN(), other.serviceLinkedRoleARN()) && Objects.equals(maxInstanceLifetime(), other.maxInstanceLifetime()) && Objects.equals(capacityRebalance(), other.capacityRebalance()) && Objects.equals(warmPoolConfiguration(), other.warmPoolConfiguration()) && Objects.equals(warmPoolSize(), other.warmPoolSize()) && Objects.equals(context(), other.context()) && Objects.equals(desiredCapacityType(), other.desiredCapacityType()) && Objects.equals(defaultInstanceWarmup(), other.defaultInstanceWarmup()) && hasTrafficSources() == other.hasTrafficSources() && Objects.equals(trafficSources(), other.trafficSources()) && Objects.equals(instanceMaintenancePolicy(), other.instanceMaintenancePolicy()); } /** * 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("AutoScalingGroup").add("AutoScalingGroupName", autoScalingGroupName()) .add("AutoScalingGroupARN", autoScalingGroupARN()).add("LaunchConfigurationName", launchConfigurationName()) .add("LaunchTemplate", launchTemplate()).add("MixedInstancesPolicy", mixedInstancesPolicy()) .add("MinSize", minSize()).add("MaxSize", maxSize()).add("DesiredCapacity", desiredCapacity()) .add("PredictedCapacity", predictedCapacity()).add("DefaultCooldown", defaultCooldown()) .add("AvailabilityZones", hasAvailabilityZones() ? availabilityZones() : null) .add("LoadBalancerNames", hasLoadBalancerNames() ? loadBalancerNames() : null) .add("TargetGroupARNs", hasTargetGroupARNs() ? targetGroupARNs() : null) .add("HealthCheckType", healthCheckType()).add("HealthCheckGracePeriod", healthCheckGracePeriod()) .add("Instances", hasInstances() ? instances() : null).add("CreatedTime", createdTime()) .add("SuspendedProcesses", hasSuspendedProcesses() ? suspendedProcesses() : null) .add("PlacementGroup", placementGroup()).add("VPCZoneIdentifier", vpcZoneIdentifier()) .add("EnabledMetrics", hasEnabledMetrics() ? enabledMetrics() : null).add("Status", status()) .add("Tags", hasTags() ? tags() : null) .add("TerminationPolicies", hasTerminationPolicies() ? terminationPolicies() : null) .add("NewInstancesProtectedFromScaleIn", newInstancesProtectedFromScaleIn()) .add("ServiceLinkedRoleARN", serviceLinkedRoleARN()).add("MaxInstanceLifetime", maxInstanceLifetime()) .add("CapacityRebalance", capacityRebalance()).add("WarmPoolConfiguration", warmPoolConfiguration()) .add("WarmPoolSize", warmPoolSize()).add("Context", context()).add("DesiredCapacityType", desiredCapacityType()) .add("DefaultInstanceWarmup", defaultInstanceWarmup()) .add("TrafficSources", hasTrafficSources() ? trafficSources() : null) .add("InstanceMaintenancePolicy", instanceMaintenancePolicy()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "AutoScalingGroupName": return Optional.ofNullable(clazz.cast(autoScalingGroupName())); case "AutoScalingGroupARN": return Optional.ofNullable(clazz.cast(autoScalingGroupARN())); case "LaunchConfigurationName": return Optional.ofNullable(clazz.cast(launchConfigurationName())); case "LaunchTemplate": return Optional.ofNullable(clazz.cast(launchTemplate())); case "MixedInstancesPolicy": return Optional.ofNullable(clazz.cast(mixedInstancesPolicy())); case "MinSize": return Optional.ofNullable(clazz.cast(minSize())); case "MaxSize": return Optional.ofNullable(clazz.cast(maxSize())); case "DesiredCapacity": return Optional.ofNullable(clazz.cast(desiredCapacity())); case "PredictedCapacity": return Optional.ofNullable(clazz.cast(predictedCapacity())); case "DefaultCooldown": return Optional.ofNullable(clazz.cast(defaultCooldown())); case "AvailabilityZones": return Optional.ofNullable(clazz.cast(availabilityZones())); case "LoadBalancerNames": return Optional.ofNullable(clazz.cast(loadBalancerNames())); case "TargetGroupARNs": return Optional.ofNullable(clazz.cast(targetGroupARNs())); case "HealthCheckType": return Optional.ofNullable(clazz.cast(healthCheckType())); case "HealthCheckGracePeriod": return Optional.ofNullable(clazz.cast(healthCheckGracePeriod())); case "Instances": return Optional.ofNullable(clazz.cast(instances())); case "CreatedTime": return Optional.ofNullable(clazz.cast(createdTime())); case "SuspendedProcesses": return Optional.ofNullable(clazz.cast(suspendedProcesses())); case "PlacementGroup": return Optional.ofNullable(clazz.cast(placementGroup())); case "VPCZoneIdentifier": return Optional.ofNullable(clazz.cast(vpcZoneIdentifier())); case "EnabledMetrics": return Optional.ofNullable(clazz.cast(enabledMetrics())); case "Status": return Optional.ofNullable(clazz.cast(status())); case "Tags": return Optional.ofNullable(clazz.cast(tags())); case "TerminationPolicies": return Optional.ofNullable(clazz.cast(terminationPolicies())); case "NewInstancesProtectedFromScaleIn": return Optional.ofNullable(clazz.cast(newInstancesProtectedFromScaleIn())); case "ServiceLinkedRoleARN": return Optional.ofNullable(clazz.cast(serviceLinkedRoleARN())); case "MaxInstanceLifetime": return Optional.ofNullable(clazz.cast(maxInstanceLifetime())); case "CapacityRebalance": return Optional.ofNullable(clazz.cast(capacityRebalance())); case "WarmPoolConfiguration": return Optional.ofNullable(clazz.cast(warmPoolConfiguration())); case "WarmPoolSize": return Optional.ofNullable(clazz.cast(warmPoolSize())); case "Context": return Optional.ofNullable(clazz.cast(context())); case "DesiredCapacityType": return Optional.ofNullable(clazz.cast(desiredCapacityType())); case "DefaultInstanceWarmup": return Optional.ofNullable(clazz.cast(defaultInstanceWarmup())); case "TrafficSources": return Optional.ofNullable(clazz.cast(trafficSources())); case "InstanceMaintenancePolicy": return Optional.ofNullable(clazz.cast(instanceMaintenancePolicy())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((AutoScalingGroup) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* The name of the Auto Scaling group. *

* * @param autoScalingGroupName * The name of the Auto Scaling group. * @return Returns a reference to this object so that method calls can be chained together. */ Builder autoScalingGroupName(String autoScalingGroupName); /** *

* The Amazon Resource Name (ARN) of the Auto Scaling group. *

* * @param autoScalingGroupARN * The Amazon Resource Name (ARN) of the Auto Scaling group. * @return Returns a reference to this object so that method calls can be chained together. */ Builder autoScalingGroupARN(String autoScalingGroupARN); /** *

* The name of the associated launch configuration. *

* * @param launchConfigurationName * The name of the associated launch configuration. * @return Returns a reference to this object so that method calls can be chained together. */ Builder launchConfigurationName(String launchConfigurationName); /** *

* The launch template for the group. *

* * @param launchTemplate * The launch template for the group. * @return Returns a reference to this object so that method calls can be chained together. */ Builder launchTemplate(LaunchTemplateSpecification launchTemplate); /** *

* The launch template for the group. *

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

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

* The mixed instances policy for the group. *

* * @param mixedInstancesPolicy * The mixed instances policy for the group. * @return Returns a reference to this object so that method calls can be chained together. */ Builder mixedInstancesPolicy(MixedInstancesPolicy mixedInstancesPolicy); /** *

* The mixed instances policy for the group. *

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

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

* The minimum size of the group. *

* * @param minSize * The minimum size of the group. * @return Returns a reference to this object so that method calls can be chained together. */ Builder minSize(Integer minSize); /** *

* The maximum size of the group. *

* * @param maxSize * The maximum size of the group. * @return Returns a reference to this object so that method calls can be chained together. */ Builder maxSize(Integer maxSize); /** *

* The desired size of the group. *

* * @param desiredCapacity * The desired size of the group. * @return Returns a reference to this object so that method calls can be chained together. */ Builder desiredCapacity(Integer desiredCapacity); /** *

* The predicted capacity of the group when it has a predictive scaling policy. *

* * @param predictedCapacity * The predicted capacity of the group when it has a predictive scaling policy. * @return Returns a reference to this object so that method calls can be chained together. */ Builder predictedCapacity(Integer predictedCapacity); /** *

* The duration of the default cooldown period, in seconds. *

* * @param defaultCooldown * The duration of the default cooldown period, in seconds. * @return Returns a reference to this object so that method calls can be chained together. */ Builder defaultCooldown(Integer defaultCooldown); /** *

* One or more Availability Zones for the group. *

* * @param availabilityZones * One or more Availability Zones for the group. * @return Returns a reference to this object so that method calls can be chained together. */ Builder availabilityZones(Collection availabilityZones); /** *

* One or more Availability Zones for the group. *

* * @param availabilityZones * One or more Availability Zones for the group. * @return Returns a reference to this object so that method calls can be chained together. */ Builder availabilityZones(String... availabilityZones); /** *

* One or more load balancers associated with the group. *

* * @param loadBalancerNames * One or more load balancers associated with the group. * @return Returns a reference to this object so that method calls can be chained together. */ Builder loadBalancerNames(Collection loadBalancerNames); /** *

* One or more load balancers associated with the group. *

* * @param loadBalancerNames * One or more load balancers associated with the group. * @return Returns a reference to this object so that method calls can be chained together. */ Builder loadBalancerNames(String... loadBalancerNames); /** *

* The Amazon Resource Names (ARN) of the target groups for your load balancer. *

* * @param targetGroupARNs * The Amazon Resource Names (ARN) of the target groups for your load balancer. * @return Returns a reference to this object so that method calls can be chained together. */ Builder targetGroupARNs(Collection targetGroupARNs); /** *

* The Amazon Resource Names (ARN) of the target groups for your load balancer. *

* * @param targetGroupARNs * The Amazon Resource Names (ARN) of the target groups for your load balancer. * @return Returns a reference to this object so that method calls can be chained together. */ Builder targetGroupARNs(String... targetGroupARNs); /** *

* A comma-separated value string of one or more health check types. *

* * @param healthCheckType * A comma-separated value string of one or more health check types. * @return Returns a reference to this object so that method calls can be chained together. */ Builder healthCheckType(String healthCheckType); /** *

* The duration of the health check grace period, in seconds. *

* * @param healthCheckGracePeriod * The duration of the health check grace period, in seconds. * @return Returns a reference to this object so that method calls can be chained together. */ Builder healthCheckGracePeriod(Integer healthCheckGracePeriod); /** *

* The EC2 instances associated with the group. *

* * @param instances * The EC2 instances associated with the group. * @return Returns a reference to this object so that method calls can be chained together. */ Builder instances(Collection instances); /** *

* The EC2 instances associated with the group. *

* * @param instances * The EC2 instances associated with the group. * @return Returns a reference to this object so that method calls can be chained together. */ Builder instances(Instance... instances); /** *

* The EC2 instances associated with the group. *

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

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

* The date and time the group was created. *

* * @param createdTime * The date and time the group was created. * @return Returns a reference to this object so that method calls can be chained together. */ Builder createdTime(Instant createdTime); /** *

* The suspended processes associated with the group. *

* * @param suspendedProcesses * The suspended processes associated with the group. * @return Returns a reference to this object so that method calls can be chained together. */ Builder suspendedProcesses(Collection suspendedProcesses); /** *

* The suspended processes associated with the group. *

* * @param suspendedProcesses * The suspended processes associated with the group. * @return Returns a reference to this object so that method calls can be chained together. */ Builder suspendedProcesses(SuspendedProcess... suspendedProcesses); /** *

* The suspended processes associated with the group. *

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

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

* The name of the placement group into which to launch your instances, if any. *

* * @param placementGroup * The name of the placement group into which to launch your instances, if any. * @return Returns a reference to this object so that method calls can be chained together. */ Builder placementGroup(String placementGroup); /** *

* One or more subnet IDs, if applicable, separated by commas. *

* * @param vpcZoneIdentifier * One or more subnet IDs, if applicable, separated by commas. * @return Returns a reference to this object so that method calls can be chained together. */ Builder vpcZoneIdentifier(String vpcZoneIdentifier); /** *

* The metrics enabled for the group. *

* * @param enabledMetrics * The metrics enabled for the group. * @return Returns a reference to this object so that method calls can be chained together. */ Builder enabledMetrics(Collection enabledMetrics); /** *

* The metrics enabled for the group. *

* * @param enabledMetrics * The metrics enabled for the group. * @return Returns a reference to this object so that method calls can be chained together. */ Builder enabledMetrics(EnabledMetric... enabledMetrics); /** *

* The metrics enabled for the group. *

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

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

* The current state of the group when the DeleteAutoScalingGroup operation is in progress. *

* * @param status * The current state of the group when the DeleteAutoScalingGroup operation is in progress. * @return Returns a reference to this object so that method calls can be chained together. */ Builder status(String status); /** *

* The tags for the group. *

* * @param tags * The tags for the group. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tags(Collection tags); /** *

* The tags for the group. *

* * @param tags * The tags for the group. * @return Returns a reference to this object so that method calls can be chained together. */ Builder tags(TagDescription... tags); /** *

* The tags for the group. *

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

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

* The termination policies for the group. *

* * @param terminationPolicies * The termination policies for the group. * @return Returns a reference to this object so that method calls can be chained together. */ Builder terminationPolicies(Collection terminationPolicies); /** *

* The termination policies for the group. *

* * @param terminationPolicies * The termination policies for the group. * @return Returns a reference to this object so that method calls can be chained together. */ Builder terminationPolicies(String... terminationPolicies); /** *

* Indicates whether newly launched instances are protected from termination by Amazon EC2 Auto Scaling when * scaling in. *

* * @param newInstancesProtectedFromScaleIn * Indicates whether newly launched instances are protected from termination by Amazon EC2 Auto Scaling * when scaling in. * @return Returns a reference to this object so that method calls can be chained together. */ Builder newInstancesProtectedFromScaleIn(Boolean newInstancesProtectedFromScaleIn); /** *

* The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling group uses to call other * Amazon Web Services on your behalf. *

* * @param serviceLinkedRoleARN * The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling group uses to call * other Amazon Web Services on your behalf. * @return Returns a reference to this object so that method calls can be chained together. */ Builder serviceLinkedRoleARN(String serviceLinkedRoleARN); /** *

* The maximum amount of time, in seconds, that an instance can be in service. *

*

* Valid Range: Minimum value of 0. *

* * @param maxInstanceLifetime * The maximum amount of time, in seconds, that an instance can be in service.

*

* Valid Range: Minimum value of 0. * @return Returns a reference to this object so that method calls can be chained together. */ Builder maxInstanceLifetime(Integer maxInstanceLifetime); /** *

* Indicates whether Capacity Rebalancing is enabled. *

* * @param capacityRebalance * Indicates whether Capacity Rebalancing is enabled. * @return Returns a reference to this object so that method calls can be chained together. */ Builder capacityRebalance(Boolean capacityRebalance); /** *

* The warm pool for the group. *

* * @param warmPoolConfiguration * The warm pool for the group. * @return Returns a reference to this object so that method calls can be chained together. */ Builder warmPoolConfiguration(WarmPoolConfiguration warmPoolConfiguration); /** *

* The warm pool for the group. *

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

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

* The current size of the warm pool. *

* * @param warmPoolSize * The current size of the warm pool. * @return Returns a reference to this object so that method calls can be chained together. */ Builder warmPoolSize(Integer warmPoolSize); /** *

* Reserved. *

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

* The unit of measurement for the value specified for desired capacity. Amazon EC2 Auto Scaling supports * DesiredCapacityType for attribute-based instance type selection only. *

* * @param desiredCapacityType * The unit of measurement for the value specified for desired capacity. Amazon EC2 Auto Scaling supports * DesiredCapacityType for attribute-based instance type selection only. * @return Returns a reference to this object so that method calls can be chained together. */ Builder desiredCapacityType(String desiredCapacityType); /** *

* The duration of the default instance warmup, in seconds. *

* * @param defaultInstanceWarmup * The duration of the default instance warmup, in seconds. * @return Returns a reference to this object so that method calls can be chained together. */ Builder defaultInstanceWarmup(Integer defaultInstanceWarmup); /** *

* The traffic sources associated with this Auto Scaling group. *

* * @param trafficSources * The traffic sources associated with this Auto Scaling group. * @return Returns a reference to this object so that method calls can be chained together. */ Builder trafficSources(Collection trafficSources); /** *

* The traffic sources associated with this Auto Scaling group. *

* * @param trafficSources * The traffic sources associated with this Auto Scaling group. * @return Returns a reference to this object so that method calls can be chained together. */ Builder trafficSources(TrafficSourceIdentifier... trafficSources); /** *

* The traffic sources associated with this Auto Scaling group. *

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

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

* An instance maintenance policy. *

* * @param instanceMaintenancePolicy * An instance maintenance policy. * @return Returns a reference to this object so that method calls can be chained together. */ Builder instanceMaintenancePolicy(InstanceMaintenancePolicy instanceMaintenancePolicy); /** *

* An instance maintenance policy. *

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

* When the {@link Consumer} completes, {@link InstanceMaintenancePolicy.Builder#build()} is called immediately * and its result is passed to {@link #instanceMaintenancePolicy(InstanceMaintenancePolicy)}. * * @param instanceMaintenancePolicy * a consumer that will call methods on {@link InstanceMaintenancePolicy.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #instanceMaintenancePolicy(InstanceMaintenancePolicy) */ default Builder instanceMaintenancePolicy(Consumer instanceMaintenancePolicy) { return instanceMaintenancePolicy(InstanceMaintenancePolicy.builder().applyMutation(instanceMaintenancePolicy).build()); } } static final class BuilderImpl implements Builder { private String autoScalingGroupName; private String autoScalingGroupARN; private String launchConfigurationName; private LaunchTemplateSpecification launchTemplate; private MixedInstancesPolicy mixedInstancesPolicy; private Integer minSize; private Integer maxSize; private Integer desiredCapacity; private Integer predictedCapacity; private Integer defaultCooldown; private List availabilityZones = DefaultSdkAutoConstructList.getInstance(); private List loadBalancerNames = DefaultSdkAutoConstructList.getInstance(); private List targetGroupARNs = DefaultSdkAutoConstructList.getInstance(); private String healthCheckType; private Integer healthCheckGracePeriod; private List instances = DefaultSdkAutoConstructList.getInstance(); private Instant createdTime; private List suspendedProcesses = DefaultSdkAutoConstructList.getInstance(); private String placementGroup; private String vpcZoneIdentifier; private List enabledMetrics = DefaultSdkAutoConstructList.getInstance(); private String status; private List tags = DefaultSdkAutoConstructList.getInstance(); private List terminationPolicies = DefaultSdkAutoConstructList.getInstance(); private Boolean newInstancesProtectedFromScaleIn; private String serviceLinkedRoleARN; private Integer maxInstanceLifetime; private Boolean capacityRebalance; private WarmPoolConfiguration warmPoolConfiguration; private Integer warmPoolSize; private String context; private String desiredCapacityType; private Integer defaultInstanceWarmup; private List trafficSources = DefaultSdkAutoConstructList.getInstance(); private InstanceMaintenancePolicy instanceMaintenancePolicy; private BuilderImpl() { } private BuilderImpl(AutoScalingGroup model) { autoScalingGroupName(model.autoScalingGroupName); autoScalingGroupARN(model.autoScalingGroupARN); launchConfigurationName(model.launchConfigurationName); launchTemplate(model.launchTemplate); mixedInstancesPolicy(model.mixedInstancesPolicy); minSize(model.minSize); maxSize(model.maxSize); desiredCapacity(model.desiredCapacity); predictedCapacity(model.predictedCapacity); defaultCooldown(model.defaultCooldown); availabilityZones(model.availabilityZones); loadBalancerNames(model.loadBalancerNames); targetGroupARNs(model.targetGroupARNs); healthCheckType(model.healthCheckType); healthCheckGracePeriod(model.healthCheckGracePeriod); instances(model.instances); createdTime(model.createdTime); suspendedProcesses(model.suspendedProcesses); placementGroup(model.placementGroup); vpcZoneIdentifier(model.vpcZoneIdentifier); enabledMetrics(model.enabledMetrics); status(model.status); tags(model.tags); terminationPolicies(model.terminationPolicies); newInstancesProtectedFromScaleIn(model.newInstancesProtectedFromScaleIn); serviceLinkedRoleARN(model.serviceLinkedRoleARN); maxInstanceLifetime(model.maxInstanceLifetime); capacityRebalance(model.capacityRebalance); warmPoolConfiguration(model.warmPoolConfiguration); warmPoolSize(model.warmPoolSize); context(model.context); desiredCapacityType(model.desiredCapacityType); defaultInstanceWarmup(model.defaultInstanceWarmup); trafficSources(model.trafficSources); instanceMaintenancePolicy(model.instanceMaintenancePolicy); } public final String getAutoScalingGroupName() { return autoScalingGroupName; } public final void setAutoScalingGroupName(String autoScalingGroupName) { this.autoScalingGroupName = autoScalingGroupName; } @Override public final Builder autoScalingGroupName(String autoScalingGroupName) { this.autoScalingGroupName = autoScalingGroupName; return this; } public final String getAutoScalingGroupARN() { return autoScalingGroupARN; } public final void setAutoScalingGroupARN(String autoScalingGroupARN) { this.autoScalingGroupARN = autoScalingGroupARN; } @Override public final Builder autoScalingGroupARN(String autoScalingGroupARN) { this.autoScalingGroupARN = autoScalingGroupARN; return this; } public final String getLaunchConfigurationName() { return launchConfigurationName; } public final void setLaunchConfigurationName(String launchConfigurationName) { this.launchConfigurationName = launchConfigurationName; } @Override public final Builder launchConfigurationName(String launchConfigurationName) { this.launchConfigurationName = launchConfigurationName; return this; } public final LaunchTemplateSpecification.Builder getLaunchTemplate() { return launchTemplate != null ? launchTemplate.toBuilder() : null; } public final void setLaunchTemplate(LaunchTemplateSpecification.BuilderImpl launchTemplate) { this.launchTemplate = launchTemplate != null ? launchTemplate.build() : null; } @Override public final Builder launchTemplate(LaunchTemplateSpecification launchTemplate) { this.launchTemplate = launchTemplate; return this; } public final MixedInstancesPolicy.Builder getMixedInstancesPolicy() { return mixedInstancesPolicy != null ? mixedInstancesPolicy.toBuilder() : null; } public final void setMixedInstancesPolicy(MixedInstancesPolicy.BuilderImpl mixedInstancesPolicy) { this.mixedInstancesPolicy = mixedInstancesPolicy != null ? mixedInstancesPolicy.build() : null; } @Override public final Builder mixedInstancesPolicy(MixedInstancesPolicy mixedInstancesPolicy) { this.mixedInstancesPolicy = mixedInstancesPolicy; return this; } public final Integer getMinSize() { return minSize; } public final void setMinSize(Integer minSize) { this.minSize = minSize; } @Override public final Builder minSize(Integer minSize) { this.minSize = minSize; return this; } public final Integer getMaxSize() { return maxSize; } public final void setMaxSize(Integer maxSize) { this.maxSize = maxSize; } @Override public final Builder maxSize(Integer maxSize) { this.maxSize = maxSize; return this; } public final Integer getDesiredCapacity() { return desiredCapacity; } public final void setDesiredCapacity(Integer desiredCapacity) { this.desiredCapacity = desiredCapacity; } @Override public final Builder desiredCapacity(Integer desiredCapacity) { this.desiredCapacity = desiredCapacity; return this; } public final Integer getPredictedCapacity() { return predictedCapacity; } public final void setPredictedCapacity(Integer predictedCapacity) { this.predictedCapacity = predictedCapacity; } @Override public final Builder predictedCapacity(Integer predictedCapacity) { this.predictedCapacity = predictedCapacity; return this; } public final Integer getDefaultCooldown() { return defaultCooldown; } public final void setDefaultCooldown(Integer defaultCooldown) { this.defaultCooldown = defaultCooldown; } @Override public final Builder defaultCooldown(Integer defaultCooldown) { this.defaultCooldown = defaultCooldown; return this; } public final Collection getAvailabilityZones() { if (availabilityZones instanceof SdkAutoConstructList) { return null; } return availabilityZones; } public final void setAvailabilityZones(Collection availabilityZones) { this.availabilityZones = AvailabilityZonesCopier.copy(availabilityZones); } @Override public final Builder availabilityZones(Collection availabilityZones) { this.availabilityZones = AvailabilityZonesCopier.copy(availabilityZones); return this; } @Override @SafeVarargs public final Builder availabilityZones(String... availabilityZones) { availabilityZones(Arrays.asList(availabilityZones)); return this; } public final Collection getLoadBalancerNames() { if (loadBalancerNames instanceof SdkAutoConstructList) { return null; } return loadBalancerNames; } public final void setLoadBalancerNames(Collection loadBalancerNames) { this.loadBalancerNames = LoadBalancerNamesCopier.copy(loadBalancerNames); } @Override public final Builder loadBalancerNames(Collection loadBalancerNames) { this.loadBalancerNames = LoadBalancerNamesCopier.copy(loadBalancerNames); return this; } @Override @SafeVarargs public final Builder loadBalancerNames(String... loadBalancerNames) { loadBalancerNames(Arrays.asList(loadBalancerNames)); return this; } public final Collection getTargetGroupARNs() { if (targetGroupARNs instanceof SdkAutoConstructList) { return null; } return targetGroupARNs; } public final void setTargetGroupARNs(Collection targetGroupARNs) { this.targetGroupARNs = TargetGroupARNsCopier.copy(targetGroupARNs); } @Override public final Builder targetGroupARNs(Collection targetGroupARNs) { this.targetGroupARNs = TargetGroupARNsCopier.copy(targetGroupARNs); return this; } @Override @SafeVarargs public final Builder targetGroupARNs(String... targetGroupARNs) { targetGroupARNs(Arrays.asList(targetGroupARNs)); return this; } public final String getHealthCheckType() { return healthCheckType; } public final void setHealthCheckType(String healthCheckType) { this.healthCheckType = healthCheckType; } @Override public final Builder healthCheckType(String healthCheckType) { this.healthCheckType = healthCheckType; return this; } public final Integer getHealthCheckGracePeriod() { return healthCheckGracePeriod; } public final void setHealthCheckGracePeriod(Integer healthCheckGracePeriod) { this.healthCheckGracePeriod = healthCheckGracePeriod; } @Override public final Builder healthCheckGracePeriod(Integer healthCheckGracePeriod) { this.healthCheckGracePeriod = healthCheckGracePeriod; return this; } public final List getInstances() { List result = InstancesCopier.copyToBuilder(this.instances); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setInstances(Collection instances) { this.instances = InstancesCopier.copyFromBuilder(instances); } @Override public final Builder instances(Collection instances) { this.instances = InstancesCopier.copy(instances); return this; } @Override @SafeVarargs public final Builder instances(Instance... instances) { instances(Arrays.asList(instances)); return this; } @Override @SafeVarargs public final Builder instances(Consumer... instances) { instances(Stream.of(instances).map(c -> Instance.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } public final Instant getCreatedTime() { return createdTime; } public final void setCreatedTime(Instant createdTime) { this.createdTime = createdTime; } @Override public final Builder createdTime(Instant createdTime) { this.createdTime = createdTime; return this; } public final List getSuspendedProcesses() { List result = SuspendedProcessesCopier.copyToBuilder(this.suspendedProcesses); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setSuspendedProcesses(Collection suspendedProcesses) { this.suspendedProcesses = SuspendedProcessesCopier.copyFromBuilder(suspendedProcesses); } @Override public final Builder suspendedProcesses(Collection suspendedProcesses) { this.suspendedProcesses = SuspendedProcessesCopier.copy(suspendedProcesses); return this; } @Override @SafeVarargs public final Builder suspendedProcesses(SuspendedProcess... suspendedProcesses) { suspendedProcesses(Arrays.asList(suspendedProcesses)); return this; } @Override @SafeVarargs public final Builder suspendedProcesses(Consumer... suspendedProcesses) { suspendedProcesses(Stream.of(suspendedProcesses).map(c -> SuspendedProcess.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final String getPlacementGroup() { return placementGroup; } public final void setPlacementGroup(String placementGroup) { this.placementGroup = placementGroup; } @Override public final Builder placementGroup(String placementGroup) { this.placementGroup = placementGroup; return this; } public final String getVpcZoneIdentifier() { return vpcZoneIdentifier; } public final void setVpcZoneIdentifier(String vpcZoneIdentifier) { this.vpcZoneIdentifier = vpcZoneIdentifier; } @Override public final Builder vpcZoneIdentifier(String vpcZoneIdentifier) { this.vpcZoneIdentifier = vpcZoneIdentifier; return this; } public final List getEnabledMetrics() { List result = EnabledMetricsCopier.copyToBuilder(this.enabledMetrics); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setEnabledMetrics(Collection enabledMetrics) { this.enabledMetrics = EnabledMetricsCopier.copyFromBuilder(enabledMetrics); } @Override public final Builder enabledMetrics(Collection enabledMetrics) { this.enabledMetrics = EnabledMetricsCopier.copy(enabledMetrics); return this; } @Override @SafeVarargs public final Builder enabledMetrics(EnabledMetric... enabledMetrics) { enabledMetrics(Arrays.asList(enabledMetrics)); return this; } @Override @SafeVarargs public final Builder enabledMetrics(Consumer... enabledMetrics) { enabledMetrics(Stream.of(enabledMetrics).map(c -> EnabledMetric.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final String getStatus() { return status; } public final void setStatus(String status) { this.status = status; } @Override public final Builder status(String status) { this.status = status; return this; } public final List getTags() { List result = TagDescriptionListCopier.copyToBuilder(this.tags); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setTags(Collection tags) { this.tags = TagDescriptionListCopier.copyFromBuilder(tags); } @Override public final Builder tags(Collection tags) { this.tags = TagDescriptionListCopier.copy(tags); return this; } @Override @SafeVarargs public final Builder tags(TagDescription... tags) { tags(Arrays.asList(tags)); return this; } @Override @SafeVarargs public final Builder tags(Consumer... tags) { tags(Stream.of(tags).map(c -> TagDescription.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } public final Collection getTerminationPolicies() { if (terminationPolicies instanceof SdkAutoConstructList) { return null; } return terminationPolicies; } public final void setTerminationPolicies(Collection terminationPolicies) { this.terminationPolicies = TerminationPoliciesCopier.copy(terminationPolicies); } @Override public final Builder terminationPolicies(Collection terminationPolicies) { this.terminationPolicies = TerminationPoliciesCopier.copy(terminationPolicies); return this; } @Override @SafeVarargs public final Builder terminationPolicies(String... terminationPolicies) { terminationPolicies(Arrays.asList(terminationPolicies)); return this; } public final Boolean getNewInstancesProtectedFromScaleIn() { return newInstancesProtectedFromScaleIn; } public final void setNewInstancesProtectedFromScaleIn(Boolean newInstancesProtectedFromScaleIn) { this.newInstancesProtectedFromScaleIn = newInstancesProtectedFromScaleIn; } @Override public final Builder newInstancesProtectedFromScaleIn(Boolean newInstancesProtectedFromScaleIn) { this.newInstancesProtectedFromScaleIn = newInstancesProtectedFromScaleIn; return this; } public final String getServiceLinkedRoleARN() { return serviceLinkedRoleARN; } public final void setServiceLinkedRoleARN(String serviceLinkedRoleARN) { this.serviceLinkedRoleARN = serviceLinkedRoleARN; } @Override public final Builder serviceLinkedRoleARN(String serviceLinkedRoleARN) { this.serviceLinkedRoleARN = serviceLinkedRoleARN; return this; } public final Integer getMaxInstanceLifetime() { return maxInstanceLifetime; } public final void setMaxInstanceLifetime(Integer maxInstanceLifetime) { this.maxInstanceLifetime = maxInstanceLifetime; } @Override public final Builder maxInstanceLifetime(Integer maxInstanceLifetime) { this.maxInstanceLifetime = maxInstanceLifetime; return this; } public final Boolean getCapacityRebalance() { return capacityRebalance; } public final void setCapacityRebalance(Boolean capacityRebalance) { this.capacityRebalance = capacityRebalance; } @Override public final Builder capacityRebalance(Boolean capacityRebalance) { this.capacityRebalance = capacityRebalance; return this; } public final WarmPoolConfiguration.Builder getWarmPoolConfiguration() { return warmPoolConfiguration != null ? warmPoolConfiguration.toBuilder() : null; } public final void setWarmPoolConfiguration(WarmPoolConfiguration.BuilderImpl warmPoolConfiguration) { this.warmPoolConfiguration = warmPoolConfiguration != null ? warmPoolConfiguration.build() : null; } @Override public final Builder warmPoolConfiguration(WarmPoolConfiguration warmPoolConfiguration) { this.warmPoolConfiguration = warmPoolConfiguration; return this; } public final Integer getWarmPoolSize() { return warmPoolSize; } public final void setWarmPoolSize(Integer warmPoolSize) { this.warmPoolSize = warmPoolSize; } @Override public final Builder warmPoolSize(Integer warmPoolSize) { this.warmPoolSize = warmPoolSize; return this; } public final String getContext() { return context; } public final void setContext(String context) { this.context = context; } @Override public final Builder context(String context) { this.context = context; return this; } public final String getDesiredCapacityType() { return desiredCapacityType; } public final void setDesiredCapacityType(String desiredCapacityType) { this.desiredCapacityType = desiredCapacityType; } @Override public final Builder desiredCapacityType(String desiredCapacityType) { this.desiredCapacityType = desiredCapacityType; return this; } public final Integer getDefaultInstanceWarmup() { return defaultInstanceWarmup; } public final void setDefaultInstanceWarmup(Integer defaultInstanceWarmup) { this.defaultInstanceWarmup = defaultInstanceWarmup; } @Override public final Builder defaultInstanceWarmup(Integer defaultInstanceWarmup) { this.defaultInstanceWarmup = defaultInstanceWarmup; return this; } public final List getTrafficSources() { List result = TrafficSourcesCopier.copyToBuilder(this.trafficSources); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setTrafficSources(Collection trafficSources) { this.trafficSources = TrafficSourcesCopier.copyFromBuilder(trafficSources); } @Override public final Builder trafficSources(Collection trafficSources) { this.trafficSources = TrafficSourcesCopier.copy(trafficSources); return this; } @Override @SafeVarargs public final Builder trafficSources(TrafficSourceIdentifier... trafficSources) { trafficSources(Arrays.asList(trafficSources)); return this; } @Override @SafeVarargs public final Builder trafficSources(Consumer... trafficSources) { trafficSources(Stream.of(trafficSources).map(c -> TrafficSourceIdentifier.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final InstanceMaintenancePolicy.Builder getInstanceMaintenancePolicy() { return instanceMaintenancePolicy != null ? instanceMaintenancePolicy.toBuilder() : null; } public final void setInstanceMaintenancePolicy(InstanceMaintenancePolicy.BuilderImpl instanceMaintenancePolicy) { this.instanceMaintenancePolicy = instanceMaintenancePolicy != null ? instanceMaintenancePolicy.build() : null; } @Override public final Builder instanceMaintenancePolicy(InstanceMaintenancePolicy instanceMaintenancePolicy) { this.instanceMaintenancePolicy = instanceMaintenancePolicy; return this; } @Override public AutoScalingGroup build() { return new AutoScalingGroup(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy