com.amazonaws.services.rds.model.ModifyCurrentDBClusterCapacityRequest Maven / Gradle / Ivy
/*
* Copyright 2014-2019 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.rds.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ModifyCurrentDBClusterCapacityRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The DB cluster identifier for the cluster being modified. This parameter is not case-sensitive.
*
*
* Constraints:
*
*
* -
*
* Must match the identifier of an existing DB cluster.
*
*
*
*/
private String dBClusterIdentifier;
/**
*
* The DB cluster capacity.
*
*
* Constraints:
*
*
* -
*
* Value must be 2
, 4
, 8
, 16
, 32
, 64
,
* 128
, or 256
.
*
*
*
*/
private Integer capacity;
/**
*
* The amount of time, in seconds, that Aurora Serverless tries to find a scaling point to perform seamless scaling
* before enforcing the timeout action. The default is 300.
*
*
* -
*
* Value must be from 10 through 600.
*
*
*
*/
private Integer secondsBeforeTimeout;
/**
*
* The action to take when the timeout is reached, either ForceApplyCapacityChange
or
* RollbackCapacityChange
.
*
*
* ForceApplyCapacityChange
, the default, sets the capacity to the specified value as soon as possible.
*
*
* RollbackCapacityChange
ignores the capacity change if a scaling point is not found in the timeout
* period.
*
*/
private String timeoutAction;
/**
*
* The DB cluster identifier for the cluster being modified. This parameter is not case-sensitive.
*
*
* Constraints:
*
*
* -
*
* Must match the identifier of an existing DB cluster.
*
*
*
*
* @param dBClusterIdentifier
* The DB cluster identifier for the cluster being modified. This parameter is not case-sensitive.
*
* Constraints:
*
*
* -
*
* Must match the identifier of an existing DB cluster.
*
*
*/
public void setDBClusterIdentifier(String dBClusterIdentifier) {
this.dBClusterIdentifier = dBClusterIdentifier;
}
/**
*
* The DB cluster identifier for the cluster being modified. This parameter is not case-sensitive.
*
*
* Constraints:
*
*
* -
*
* Must match the identifier of an existing DB cluster.
*
*
*
*
* @return The DB cluster identifier for the cluster being modified. This parameter is not case-sensitive.
*
* Constraints:
*
*
* -
*
* Must match the identifier of an existing DB cluster.
*
*
*/
public String getDBClusterIdentifier() {
return this.dBClusterIdentifier;
}
/**
*
* The DB cluster identifier for the cluster being modified. This parameter is not case-sensitive.
*
*
* Constraints:
*
*
* -
*
* Must match the identifier of an existing DB cluster.
*
*
*
*
* @param dBClusterIdentifier
* The DB cluster identifier for the cluster being modified. This parameter is not case-sensitive.
*
* Constraints:
*
*
* -
*
* Must match the identifier of an existing DB cluster.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ModifyCurrentDBClusterCapacityRequest withDBClusterIdentifier(String dBClusterIdentifier) {
setDBClusterIdentifier(dBClusterIdentifier);
return this;
}
/**
*
* The DB cluster capacity.
*
*
* Constraints:
*
*
* -
*
* Value must be 2
, 4
, 8
, 16
, 32
, 64
,
* 128
, or 256
.
*
*
*
*
* @param capacity
* The DB cluster capacity.
*
* Constraints:
*
*
* -
*
* Value must be 2
, 4
, 8
, 16
, 32
,
* 64
, 128
, or 256
.
*
*
*/
public void setCapacity(Integer capacity) {
this.capacity = capacity;
}
/**
*
* The DB cluster capacity.
*
*
* Constraints:
*
*
* -
*
* Value must be 2
, 4
, 8
, 16
, 32
, 64
,
* 128
, or 256
.
*
*
*
*
* @return The DB cluster capacity.
*
* Constraints:
*
*
* -
*
* Value must be 2
, 4
, 8
, 16
, 32
,
* 64
, 128
, or 256
.
*
*
*/
public Integer getCapacity() {
return this.capacity;
}
/**
*
* The DB cluster capacity.
*
*
* Constraints:
*
*
* -
*
* Value must be 2
, 4
, 8
, 16
, 32
, 64
,
* 128
, or 256
.
*
*
*
*
* @param capacity
* The DB cluster capacity.
*
* Constraints:
*
*
* -
*
* Value must be 2
, 4
, 8
, 16
, 32
,
* 64
, 128
, or 256
.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ModifyCurrentDBClusterCapacityRequest withCapacity(Integer capacity) {
setCapacity(capacity);
return this;
}
/**
*
* The amount of time, in seconds, that Aurora Serverless tries to find a scaling point to perform seamless scaling
* before enforcing the timeout action. The default is 300.
*
*
* -
*
* Value must be from 10 through 600.
*
*
*
*
* @param secondsBeforeTimeout
* The amount of time, in seconds, that Aurora Serverless tries to find a scaling point to perform seamless
* scaling before enforcing the timeout action. The default is 300.
*
* -
*
* Value must be from 10 through 600.
*
*
*/
public void setSecondsBeforeTimeout(Integer secondsBeforeTimeout) {
this.secondsBeforeTimeout = secondsBeforeTimeout;
}
/**
*
* The amount of time, in seconds, that Aurora Serverless tries to find a scaling point to perform seamless scaling
* before enforcing the timeout action. The default is 300.
*
*
* -
*
* Value must be from 10 through 600.
*
*
*
*
* @return The amount of time, in seconds, that Aurora Serverless tries to find a scaling point to perform seamless
* scaling before enforcing the timeout action. The default is 300.
*
* -
*
* Value must be from 10 through 600.
*
*
*/
public Integer getSecondsBeforeTimeout() {
return this.secondsBeforeTimeout;
}
/**
*
* The amount of time, in seconds, that Aurora Serverless tries to find a scaling point to perform seamless scaling
* before enforcing the timeout action. The default is 300.
*
*
* -
*
* Value must be from 10 through 600.
*
*
*
*
* @param secondsBeforeTimeout
* The amount of time, in seconds, that Aurora Serverless tries to find a scaling point to perform seamless
* scaling before enforcing the timeout action. The default is 300.
*
* -
*
* Value must be from 10 through 600.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ModifyCurrentDBClusterCapacityRequest withSecondsBeforeTimeout(Integer secondsBeforeTimeout) {
setSecondsBeforeTimeout(secondsBeforeTimeout);
return this;
}
/**
*
* The action to take when the timeout is reached, either ForceApplyCapacityChange
or
* RollbackCapacityChange
.
*
*
* ForceApplyCapacityChange
, the default, sets the capacity to the specified value as soon as possible.
*
*
* RollbackCapacityChange
ignores the capacity change if a scaling point is not found in the timeout
* period.
*
*
* @param timeoutAction
* The action to take when the timeout is reached, either ForceApplyCapacityChange
or
* RollbackCapacityChange
.
*
* ForceApplyCapacityChange
, the default, sets the capacity to the specified value as soon as
* possible.
*
*
* RollbackCapacityChange
ignores the capacity change if a scaling point is not found in the
* timeout period.
*/
public void setTimeoutAction(String timeoutAction) {
this.timeoutAction = timeoutAction;
}
/**
*
* The action to take when the timeout is reached, either ForceApplyCapacityChange
or
* RollbackCapacityChange
.
*
*
* ForceApplyCapacityChange
, the default, sets the capacity to the specified value as soon as possible.
*
*
* RollbackCapacityChange
ignores the capacity change if a scaling point is not found in the timeout
* period.
*
*
* @return The action to take when the timeout is reached, either ForceApplyCapacityChange
or
* RollbackCapacityChange
.
*
* ForceApplyCapacityChange
, the default, sets the capacity to the specified value as soon as
* possible.
*
*
* RollbackCapacityChange
ignores the capacity change if a scaling point is not found in the
* timeout period.
*/
public String getTimeoutAction() {
return this.timeoutAction;
}
/**
*
* The action to take when the timeout is reached, either ForceApplyCapacityChange
or
* RollbackCapacityChange
.
*
*
* ForceApplyCapacityChange
, the default, sets the capacity to the specified value as soon as possible.
*
*
* RollbackCapacityChange
ignores the capacity change if a scaling point is not found in the timeout
* period.
*
*
* @param timeoutAction
* The action to take when the timeout is reached, either ForceApplyCapacityChange
or
* RollbackCapacityChange
.
*
* ForceApplyCapacityChange
, the default, sets the capacity to the specified value as soon as
* possible.
*
*
* RollbackCapacityChange
ignores the capacity change if a scaling point is not found in the
* timeout period.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ModifyCurrentDBClusterCapacityRequest withTimeoutAction(String timeoutAction) {
setTimeoutAction(timeoutAction);
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 (getDBClusterIdentifier() != null)
sb.append("DBClusterIdentifier: ").append(getDBClusterIdentifier()).append(",");
if (getCapacity() != null)
sb.append("Capacity: ").append(getCapacity()).append(",");
if (getSecondsBeforeTimeout() != null)
sb.append("SecondsBeforeTimeout: ").append(getSecondsBeforeTimeout()).append(",");
if (getTimeoutAction() != null)
sb.append("TimeoutAction: ").append(getTimeoutAction());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ModifyCurrentDBClusterCapacityRequest == false)
return false;
ModifyCurrentDBClusterCapacityRequest other = (ModifyCurrentDBClusterCapacityRequest) obj;
if (other.getDBClusterIdentifier() == null ^ this.getDBClusterIdentifier() == null)
return false;
if (other.getDBClusterIdentifier() != null && other.getDBClusterIdentifier().equals(this.getDBClusterIdentifier()) == false)
return false;
if (other.getCapacity() == null ^ this.getCapacity() == null)
return false;
if (other.getCapacity() != null && other.getCapacity().equals(this.getCapacity()) == false)
return false;
if (other.getSecondsBeforeTimeout() == null ^ this.getSecondsBeforeTimeout() == null)
return false;
if (other.getSecondsBeforeTimeout() != null && other.getSecondsBeforeTimeout().equals(this.getSecondsBeforeTimeout()) == false)
return false;
if (other.getTimeoutAction() == null ^ this.getTimeoutAction() == null)
return false;
if (other.getTimeoutAction() != null && other.getTimeoutAction().equals(this.getTimeoutAction()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getDBClusterIdentifier() == null) ? 0 : getDBClusterIdentifier().hashCode());
hashCode = prime * hashCode + ((getCapacity() == null) ? 0 : getCapacity().hashCode());
hashCode = prime * hashCode + ((getSecondsBeforeTimeout() == null) ? 0 : getSecondsBeforeTimeout().hashCode());
hashCode = prime * hashCode + ((getTimeoutAction() == null) ? 0 : getTimeoutAction().hashCode());
return hashCode;
}
@Override
public ModifyCurrentDBClusterCapacityRequest clone() {
return (ModifyCurrentDBClusterCapacityRequest) super.clone();
}
}