software.amazon.awssdk.services.autoscaling.model.AutoScalingGroup Maven / Gradle / Ivy
Show all versions of autoscaling Show documentation
/*
* 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 extends Builder> 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