/* * Copyright 2018-2023 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 com.amazonaws.services.securityhub.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *

* Information about the instances distribution. *

* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AwsAutoScalingAutoScalingGroupMixedInstancesPolicyInstancesDistributionDetails implements Serializable, Cloneable, StructuredPojo { /** *

* How to allocate instance types to fulfill On-Demand capacity. The valid value is prioritized. *

*/ private String onDemandAllocationStrategy; /** *

* The minimum amount of the Auto Scaling group's capacity that must be fulfilled by On-Demand Instances. *

*/ private Integer onDemandBaseCapacity; /** *

* The percentage of On-Demand Instances and Spot Instances for additional capacity beyond * OnDemandBaseCapacity. *

*/ private Integer onDemandPercentageAboveBaseCapacity; /** *

* How to allocate instances across Spot Instance pools. Valid values are as follows: *

* */ private String spotAllocationStrategy; /** *

* The number of Spot Instance pools across which to allocate your Spot Instances. *

*/ private Integer spotInstancePools; /** *

* The maximum price per unit hour that you are willing to pay for a Spot Instance. *

*/ private String spotMaxPrice; /** *

* How to allocate instance types to fulfill On-Demand capacity. The valid value is prioritized. *

* * @param onDemandAllocationStrategy * How to allocate instance types to fulfill On-Demand capacity. The valid value is prioritized. */ public void setOnDemandAllocationStrategy(String onDemandAllocationStrategy) { this.onDemandAllocationStrategy = onDemandAllocationStrategy; } /** *

* How to allocate instance types to fulfill On-Demand capacity. The valid value is prioritized. *

* * @return How to allocate instance types to fulfill On-Demand capacity. The valid value is prioritized * . */ public String getOnDemandAllocationStrategy() { return this.onDemandAllocationStrategy; } /** *

* How to allocate instance types to fulfill On-Demand capacity. The valid value is prioritized. *

* * @param onDemandAllocationStrategy * How to allocate instance types to fulfill On-Demand capacity. The valid value is prioritized. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsAutoScalingAutoScalingGroupMixedInstancesPolicyInstancesDistributionDetails withOnDemandAllocationStrategy(String onDemandAllocationStrategy) { setOnDemandAllocationStrategy(onDemandAllocationStrategy); return this; } /** *

* The minimum amount of the Auto Scaling group's capacity that must be fulfilled by On-Demand Instances. *

* * @param onDemandBaseCapacity * The minimum amount of the Auto Scaling group's capacity that must be fulfilled by On-Demand Instances. */ public void setOnDemandBaseCapacity(Integer onDemandBaseCapacity) { this.onDemandBaseCapacity = onDemandBaseCapacity; } /** *

* The minimum amount of the Auto Scaling group's capacity that must be fulfilled by On-Demand Instances. *

* * @return The minimum amount of the Auto Scaling group's capacity that must be fulfilled by On-Demand Instances. */ public Integer getOnDemandBaseCapacity() { return this.onDemandBaseCapacity; } /** *

* The minimum amount of the Auto Scaling group's capacity that must be fulfilled by On-Demand Instances. *

* * @param onDemandBaseCapacity * The minimum amount of the Auto Scaling group's capacity that must be fulfilled by On-Demand Instances. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsAutoScalingAutoScalingGroupMixedInstancesPolicyInstancesDistributionDetails withOnDemandBaseCapacity(Integer onDemandBaseCapacity) { setOnDemandBaseCapacity(onDemandBaseCapacity); return this; } /** *

* The percentage of On-Demand Instances and Spot Instances for additional capacity beyond * OnDemandBaseCapacity. *

* * @param onDemandPercentageAboveBaseCapacity * The percentage of On-Demand Instances and Spot Instances for additional capacity beyond * OnDemandBaseCapacity. */ public void setOnDemandPercentageAboveBaseCapacity(Integer onDemandPercentageAboveBaseCapacity) { this.onDemandPercentageAboveBaseCapacity = onDemandPercentageAboveBaseCapacity; } /** *

* The percentage of On-Demand Instances and Spot Instances for additional capacity beyond * OnDemandBaseCapacity. *

* * @return The percentage of On-Demand Instances and Spot Instances for additional capacity beyond * OnDemandBaseCapacity. */ public Integer getOnDemandPercentageAboveBaseCapacity() { return this.onDemandPercentageAboveBaseCapacity; } /** *

* The percentage of On-Demand Instances and Spot Instances for additional capacity beyond * OnDemandBaseCapacity. *

* * @param onDemandPercentageAboveBaseCapacity * The percentage of On-Demand Instances and Spot Instances for additional capacity beyond * OnDemandBaseCapacity. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsAutoScalingAutoScalingGroupMixedInstancesPolicyInstancesDistributionDetails withOnDemandPercentageAboveBaseCapacity( Integer onDemandPercentageAboveBaseCapacity) { setOnDemandPercentageAboveBaseCapacity(onDemandPercentageAboveBaseCapacity); return this; } /** *

* How to allocate instances across Spot Instance pools. Valid values are as follows: *

* * * @param spotAllocationStrategy * How to allocate instances across Spot Instance pools. Valid values are as follows:

*