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

com.amazonaws.services.securityhub.model.AwsEcsServiceCapacityProviderStrategyDetails Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.12.780
Show newest version
/*
 * Copyright 2016-2021 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;

/**
 * 

* Strategy item for the capacity provider strategy that the service uses. *

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

* The minimum number of tasks to run on the capacity provider. Only one strategy item can specify a value for * Base. *

*

* The value must be between 0 and 100000. *

*/ private Integer base; /** *

* The short name of the capacity provider. *

*/ private String capacityProvider; /** *

* The relative percentage of the total number of tasks that should use the capacity provider. *

*

* If no weight is specified, the default value is 0. At least one capacity provider must have a weight greater than * 0. *

*

* The value can be between 0 and 1000. *

*/ private Integer weight; /** *

* The minimum number of tasks to run on the capacity provider. Only one strategy item can specify a value for * Base. *

*

* The value must be between 0 and 100000. *

* * @param base * The minimum number of tasks to run on the capacity provider. Only one strategy item can specify a value * for Base.

*

* The value must be between 0 and 100000. */ public void setBase(Integer base) { this.base = base; } /** *

* The minimum number of tasks to run on the capacity provider. Only one strategy item can specify a value for * Base. *

*

* The value must be between 0 and 100000. *

* * @return The minimum number of tasks to run on the capacity provider. Only one strategy item can specify a value * for Base.

*

* The value must be between 0 and 100000. */ public Integer getBase() { return this.base; } /** *

* The minimum number of tasks to run on the capacity provider. Only one strategy item can specify a value for * Base. *

*

* The value must be between 0 and 100000. *

* * @param base * The minimum number of tasks to run on the capacity provider. Only one strategy item can specify a value * for Base.

*

* The value must be between 0 and 100000. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEcsServiceCapacityProviderStrategyDetails withBase(Integer base) { setBase(base); return this; } /** *

* The short name of the capacity provider. *

* * @param capacityProvider * The short name of the capacity provider. */ public void setCapacityProvider(String capacityProvider) { this.capacityProvider = capacityProvider; } /** *

* The short name of the capacity provider. *

* * @return The short name of the capacity provider. */ public String getCapacityProvider() { return this.capacityProvider; } /** *

* The short name of the capacity provider. *

* * @param capacityProvider * The short name of the capacity provider. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEcsServiceCapacityProviderStrategyDetails withCapacityProvider(String capacityProvider) { setCapacityProvider(capacityProvider); return this; } /** *

* The relative percentage of the total number of tasks that should use the capacity provider. *

*

* If no weight is specified, the default value is 0. At least one capacity provider must have a weight greater than * 0. *

*

* The value can be between 0 and 1000. *

* * @param weight * The relative percentage of the total number of tasks that should use the capacity provider.

*

* If no weight is specified, the default value is 0. At least one capacity provider must have a weight * greater than 0. *

*

* The value can be between 0 and 1000. */ public void setWeight(Integer weight) { this.weight = weight; } /** *

* The relative percentage of the total number of tasks that should use the capacity provider. *

*

* If no weight is specified, the default value is 0. At least one capacity provider must have a weight greater than * 0. *

*

* The value can be between 0 and 1000. *

* * @return The relative percentage of the total number of tasks that should use the capacity provider.

*

* If no weight is specified, the default value is 0. At least one capacity provider must have a weight * greater than 0. *

*

* The value can be between 0 and 1000. */ public Integer getWeight() { return this.weight; } /** *

* The relative percentage of the total number of tasks that should use the capacity provider. *

*

* If no weight is specified, the default value is 0. At least one capacity provider must have a weight greater than * 0. *

*

* The value can be between 0 and 1000. *

* * @param weight * The relative percentage of the total number of tasks that should use the capacity provider.

*

* If no weight is specified, the default value is 0. At least one capacity provider must have a weight * greater than 0. *

*

* The value can be between 0 and 1000. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEcsServiceCapacityProviderStrategyDetails withWeight(Integer weight) { setWeight(weight); return this; } /** * 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. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getBase() != null) sb.append("Base: ").append(getBase()).append(","); if (getCapacityProvider() != null) sb.append("CapacityProvider: ").append(getCapacityProvider()).append(","); if (getWeight() != null) sb.append("Weight: ").append(getWeight()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AwsEcsServiceCapacityProviderStrategyDetails == false) return false; AwsEcsServiceCapacityProviderStrategyDetails other = (AwsEcsServiceCapacityProviderStrategyDetails) obj; if (other.getBase() == null ^ this.getBase() == null) return false; if (other.getBase() != null && other.getBase().equals(this.getBase()) == false) return false; if (other.getCapacityProvider() == null ^ this.getCapacityProvider() == null) return false; if (other.getCapacityProvider() != null && other.getCapacityProvider().equals(this.getCapacityProvider()) == false) return false; if (other.getWeight() == null ^ this.getWeight() == null) return false; if (other.getWeight() != null && other.getWeight().equals(this.getWeight()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getBase() == null) ? 0 : getBase().hashCode()); hashCode = prime * hashCode + ((getCapacityProvider() == null) ? 0 : getCapacityProvider().hashCode()); hashCode = prime * hashCode + ((getWeight() == null) ? 0 : getWeight().hashCode()); return hashCode; } @Override public AwsEcsServiceCapacityProviderStrategyDetails clone() { try { return (AwsEcsServiceCapacityProviderStrategyDetails) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.securityhub.model.transform.AwsEcsServiceCapacityProviderStrategyDetailsMarshaller.getInstance().marshall(this, protocolMarshaller); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy