/* * Copyright 2010-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.iot.model; import java.io.Serializable; /** *

* The rate of increase for a job rollout. This parameter allows you to define * an exponential rate increase for a job rollout. *

*/ public class AwsJobExponentialRolloutRate implements Serializable { /** *

* The minimum number of things that will be notified of a pending job, per * minute, at the start of the job rollout. This is the initial rate of the * rollout. *

*

* Constraints:
* Range: 1 - 1000
*/ private Integer baseRatePerMinute; /** *

* The rate of increase for a job rollout. The number of things notified is * multiplied by this factor. *

*/ private Double incrementFactor; /** *

* The criteria to initiate the increase in rate of rollout for a job. *

*

* Amazon Web Services IoT Core supports up to one digit after the decimal * (for example, 1.5, but not 1.55). *

*/ private AwsJobRateIncreaseCriteria rateIncreaseCriteria; /** *

* The minimum number of things that will be notified of a pending job, per * minute, at the start of the job rollout. This is the initial rate of the * rollout. *

*

* Constraints:
* Range: 1 - 1000
* * @return

* The minimum number of things that will be notified of a pending * job, per minute, at the start of the job rollout. This is the * initial rate of the rollout. *

*/ public Integer getBaseRatePerMinute() { return baseRatePerMinute; } /** *

* The minimum number of things that will be notified of a pending job, per * minute, at the start of the job rollout. This is the initial rate of the * rollout. *

*

* Constraints:
* Range: 1 - 1000
* * @param baseRatePerMinute

* The minimum number of things that will be notified of a * pending job, per minute, at the start of the job rollout. This * is the initial rate of the rollout. *

*/ public void setBaseRatePerMinute(Integer baseRatePerMinute) { this.baseRatePerMinute = baseRatePerMinute; } /** *

* The minimum number of things that will be notified of a pending job, per * minute, at the start of the job rollout. This is the initial rate of the * rollout. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Range: 1 - 1000
* * @param baseRatePerMinute

* The minimum number of things that will be notified of a * pending job, per minute, at the start of the job rollout. This * is the initial rate of the rollout. *

* @return A reference to this updated object so that method calls can be * chained together. */ public AwsJobExponentialRolloutRate withBaseRatePerMinute(Integer baseRatePerMinute) { this.baseRatePerMinute = baseRatePerMinute; return this; } /** *

* The rate of increase for a job rollout. The number of things notified is * multiplied by this factor. *

* * @return

* The rate of increase for a job rollout. The number of things * notified is multiplied by this factor. *

*/ public Double getIncrementFactor() { return incrementFactor; } /** *

* The rate of increase for a job rollout. The number of things notified is * multiplied by this factor. *

* * @param incrementFactor

* The rate of increase for a job rollout. The number of things * notified is multiplied by this factor. *

*/ public void setIncrementFactor(Double incrementFactor) { this.incrementFactor = incrementFactor; } /** *

* The rate of increase for a job rollout. The number of things notified is * multiplied by this factor. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param incrementFactor

* The rate of increase for a job rollout. The number of things * notified is multiplied by this factor. *

* @return A reference to this updated object so that method calls can be * chained together. */ public AwsJobExponentialRolloutRate withIncrementFactor(Double incrementFactor) { this.incrementFactor = incrementFactor; return this; } /** *

* The criteria to initiate the increase in rate of rollout for a job. *

*

* Amazon Web Services IoT Core supports up to one digit after the decimal * (for example, 1.5, but not 1.55). *

* * @return

* The criteria to initiate the increase in rate of rollout for a * job. *

*

* Amazon Web Services IoT Core supports up to one digit after the * decimal (for example, 1.5, but not 1.55). *

*/ public AwsJobRateIncreaseCriteria getRateIncreaseCriteria() { return rateIncreaseCriteria; } /** *

* The criteria to initiate the increase in rate of rollout for a job. *

*

* Amazon Web Services IoT Core supports up to one digit after the decimal * (for example, 1.5, but not 1.55). *

* * @param rateIncreaseCriteria

* The criteria to initiate the increase in rate of rollout for a * job. *

*

* Amazon Web Services IoT Core supports up to one digit after * the decimal (for example, 1.5, but not 1.55). *

*/ public void setRateIncreaseCriteria(AwsJobRateIncreaseCriteria rateIncreaseCriteria) { this.rateIncreaseCriteria = rateIncreaseCriteria; } /** *

* The criteria to initiate the increase in rate of rollout for a job. *

*

* Amazon Web Services IoT Core supports up to one digit after the decimal * (for example, 1.5, but not 1.55). *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param rateIncreaseCriteria

* The criteria to initiate the increase in rate of rollout for a * job. *

*

* Amazon Web Services IoT Core supports up to one digit after * the decimal (for example, 1.5, but not 1.55). *

* @return A reference to this updated object so that method calls can be * chained together. */ public AwsJobExponentialRolloutRate withRateIncreaseCriteria( AwsJobRateIncreaseCriteria rateIncreaseCriteria) { this.rateIncreaseCriteria = rateIncreaseCriteria; return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getBaseRatePerMinute() != null) sb.append("baseRatePerMinute: " + getBaseRatePerMinute() + ","); if (getIncrementFactor() != null) sb.append("incrementFactor: " + getIncrementFactor() + ","); if (getRateIncreaseCriteria() != null) sb.append("rateIncreaseCriteria: " + getRateIncreaseCriteria()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getBaseRatePerMinute() == null) ? 0 : getBaseRatePerMinute().hashCode()); hashCode = prime * hashCode + ((getIncrementFactor() == null) ? 0 : getIncrementFactor().hashCode()); hashCode = prime * hashCode + ((getRateIncreaseCriteria() == null) ? 0 : getRateIncreaseCriteria().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AwsJobExponentialRolloutRate == false) return false; AwsJobExponentialRolloutRate other = (AwsJobExponentialRolloutRate) obj; if (other.getBaseRatePerMinute() == null ^ this.getBaseRatePerMinute() == null) return false; if (other.getBaseRatePerMinute() != null && other.getBaseRatePerMinute().equals(this.getBaseRatePerMinute()) == false) return false; if (other.getIncrementFactor() == null ^ this.getIncrementFactor() == null) return false; if (other.getIncrementFactor() != null && other.getIncrementFactor().equals(this.getIncrementFactor()) == false) return false; if (other.getRateIncreaseCriteria() == null ^ this.getRateIncreaseCriteria() == null) return false; if (other.getRateIncreaseCriteria() != null && other.getRateIncreaseCriteria().equals(this.getRateIncreaseCriteria()) == false) return false; return true; } }