
com.amazonaws.services.docdb.model.ModifyDBInstanceRequest 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.docdb.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* Represents the input to ModifyDBInstance.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ModifyDBInstanceRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The DB instance identifier. This value is stored as a lowercase string.
*
*
* Constraints:
*
*
* -
*
* Must match the identifier of an existing DBInstance
.
*
*
*
*/
private String dBInstanceIdentifier;
/**
*
* The new compute and memory capacity of the DB instance; for example, db.r5.large
. Not all DB
* instance classes are available in all AWS Regions.
*
*
* If you modify the DB instance class, an outage occurs during the change. The change is applied during the next
* maintenance window, unless ApplyImmediately
is specified as true
for this request.
*
*
* Default: Uses existing setting.
*
*/
private String dBInstanceClass;
/**
*
* Specifies whether the modifications in this request and any pending modifications are asynchronously applied as
* soon as possible, regardless of the PreferredMaintenanceWindow
setting for the DB instance.
*
*
* If this parameter is set to false
, changes to the DB instance are applied during the next
* maintenance window. Some parameter changes can cause an outage and are applied on the next reboot.
*
*
* Default: false
*
*/
private Boolean applyImmediately;
/**
*
* The weekly time range (in UTC) during which system maintenance can occur, which might result in an outage.
* Changing this parameter doesn't result in an outage except in the following situation, and the change is
* asynchronously applied as soon as possible. If there are pending actions that cause a reboot, and the maintenance
* window is changed to include the current time, changing this parameter causes a reboot of the DB instance. If you
* are moving this window to the current time, there must be at least 30 minutes between the current time and end of
* the window to ensure that pending changes are applied.
*
*
* Default: Uses existing setting.
*
*
* Format: ddd:hh24:mi-ddd:hh24:mi
*
*
* Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun
*
*
* Constraints: Must be at least 30 minutes.
*
*/
private String preferredMaintenanceWindow;
/**
*
* Indicates that minor version upgrades are applied automatically to the DB instance during the maintenance window.
* Changing this parameter doesn't result in an outage except in the following case, and the change is
* asynchronously applied as soon as possible. An outage results if this parameter is set to true
* during the maintenance window, and a newer minor version is available, and Amazon DocumentDB has enabled
* automatic patching for that engine version.
*
*/
private Boolean autoMinorVersionUpgrade;
/**
*
* The new DB instance identifier for the DB instance when renaming a DB instance. When you change the DB instance
* identifier, an instance reboot occurs immediately if you set Apply Immediately
to true
.
* It occurs during the next maintenance window if you set Apply Immediately
to false
.
* This value is stored as a lowercase string.
*
*
* Constraints:
*
*
* -
*
* Must contain from 1 to 63 letters, numbers, or hyphens.
*
*
* -
*
* The first character must be a letter.
*
*
* -
*
* Cannot end with a hyphen or contain two consecutive hyphens.
*
*
*
*
* Example: mydbinstance
*
*/
private String newDBInstanceIdentifier;
/**
*
* A value that specifies the order in which an Amazon DocumentDB replica is promoted to the primary instance after
* a failure of the existing primary instance.
*
*
* Default: 1
*
*
* Valid values: 0-15
*
*/
private Integer promotionTier;
/**
*
* The DB instance identifier. This value is stored as a lowercase string.
*
*
* Constraints:
*
*
* -
*
* Must match the identifier of an existing DBInstance
.
*
*
*
*
* @param dBInstanceIdentifier
* The DB instance identifier. This value is stored as a lowercase string.
*
* Constraints:
*
*
* -
*
* Must match the identifier of an existing DBInstance
.
*
*
*/
public void setDBInstanceIdentifier(String dBInstanceIdentifier) {
this.dBInstanceIdentifier = dBInstanceIdentifier;
}
/**
*
* The DB instance identifier. This value is stored as a lowercase string.
*
*
* Constraints:
*
*
* -
*
* Must match the identifier of an existing DBInstance
.
*
*
*
*
* @return The DB instance identifier. This value is stored as a lowercase string.
*
* Constraints:
*
*
* -
*
* Must match the identifier of an existing DBInstance
.
*
*
*/
public String getDBInstanceIdentifier() {
return this.dBInstanceIdentifier;
}
/**
*
* The DB instance identifier. This value is stored as a lowercase string.
*
*
* Constraints:
*
*
* -
*
* Must match the identifier of an existing DBInstance
.
*
*
*
*
* @param dBInstanceIdentifier
* The DB instance identifier. This value is stored as a lowercase string.
*
* Constraints:
*
*
* -
*
* Must match the identifier of an existing DBInstance
.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ModifyDBInstanceRequest withDBInstanceIdentifier(String dBInstanceIdentifier) {
setDBInstanceIdentifier(dBInstanceIdentifier);
return this;
}
/**
*
* The new compute and memory capacity of the DB instance; for example, db.r5.large
. Not all DB
* instance classes are available in all AWS Regions.
*
*
* If you modify the DB instance class, an outage occurs during the change. The change is applied during the next
* maintenance window, unless ApplyImmediately
is specified as true
for this request.
*
*
* Default: Uses existing setting.
*
*
* @param dBInstanceClass
* The new compute and memory capacity of the DB instance; for example, db.r5.large
. Not all DB
* instance classes are available in all AWS Regions.
*
* If you modify the DB instance class, an outage occurs during the change. The change is applied during the
* next maintenance window, unless ApplyImmediately
is specified as true
for this
* request.
*
*
* Default: Uses existing setting.
*/
public void setDBInstanceClass(String dBInstanceClass) {
this.dBInstanceClass = dBInstanceClass;
}
/**
*
* The new compute and memory capacity of the DB instance; for example, db.r5.large
. Not all DB
* instance classes are available in all AWS Regions.
*
*
* If you modify the DB instance class, an outage occurs during the change. The change is applied during the next
* maintenance window, unless ApplyImmediately
is specified as true
for this request.
*
*
* Default: Uses existing setting.
*
*
* @return The new compute and memory capacity of the DB instance; for example, db.r5.large
. Not all DB
* instance classes are available in all AWS Regions.
*
* If you modify the DB instance class, an outage occurs during the change. The change is applied during the
* next maintenance window, unless ApplyImmediately
is specified as true
for this
* request.
*
*
* Default: Uses existing setting.
*/
public String getDBInstanceClass() {
return this.dBInstanceClass;
}
/**
*
* The new compute and memory capacity of the DB instance; for example, db.r5.large
. Not all DB
* instance classes are available in all AWS Regions.
*
*
* If you modify the DB instance class, an outage occurs during the change. The change is applied during the next
* maintenance window, unless ApplyImmediately
is specified as true
for this request.
*
*
* Default: Uses existing setting.
*
*
* @param dBInstanceClass
* The new compute and memory capacity of the DB instance; for example, db.r5.large
. Not all DB
* instance classes are available in all AWS Regions.
*
* If you modify the DB instance class, an outage occurs during the change. The change is applied during the
* next maintenance window, unless ApplyImmediately
is specified as true
for this
* request.
*
*
* Default: Uses existing setting.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ModifyDBInstanceRequest withDBInstanceClass(String dBInstanceClass) {
setDBInstanceClass(dBInstanceClass);
return this;
}
/**
*
* Specifies whether the modifications in this request and any pending modifications are asynchronously applied as
* soon as possible, regardless of the PreferredMaintenanceWindow
setting for the DB instance.
*
*
* If this parameter is set to false
, changes to the DB instance are applied during the next
* maintenance window. Some parameter changes can cause an outage and are applied on the next reboot.
*
*
* Default: false
*
*
* @param applyImmediately
* Specifies whether the modifications in this request and any pending modifications are asynchronously
* applied as soon as possible, regardless of the PreferredMaintenanceWindow
setting for the DB
* instance.
*
* If this parameter is set to false
, changes to the DB instance are applied during the next
* maintenance window. Some parameter changes can cause an outage and are applied on the next reboot.
*
*
* Default: false
*/
public void setApplyImmediately(Boolean applyImmediately) {
this.applyImmediately = applyImmediately;
}
/**
*
* Specifies whether the modifications in this request and any pending modifications are asynchronously applied as
* soon as possible, regardless of the PreferredMaintenanceWindow
setting for the DB instance.
*
*
* If this parameter is set to false
, changes to the DB instance are applied during the next
* maintenance window. Some parameter changes can cause an outage and are applied on the next reboot.
*
*
* Default: false
*
*
* @return Specifies whether the modifications in this request and any pending modifications are asynchronously
* applied as soon as possible, regardless of the PreferredMaintenanceWindow
setting for the DB
* instance.
*
* If this parameter is set to false
, changes to the DB instance are applied during the next
* maintenance window. Some parameter changes can cause an outage and are applied on the next reboot.
*
*
* Default: false
*/
public Boolean getApplyImmediately() {
return this.applyImmediately;
}
/**
*
* Specifies whether the modifications in this request and any pending modifications are asynchronously applied as
* soon as possible, regardless of the PreferredMaintenanceWindow
setting for the DB instance.
*
*
* If this parameter is set to false
, changes to the DB instance are applied during the next
* maintenance window. Some parameter changes can cause an outage and are applied on the next reboot.
*
*
* Default: false
*
*
* @param applyImmediately
* Specifies whether the modifications in this request and any pending modifications are asynchronously
* applied as soon as possible, regardless of the PreferredMaintenanceWindow
setting for the DB
* instance.
*
* If this parameter is set to false
, changes to the DB instance are applied during the next
* maintenance window. Some parameter changes can cause an outage and are applied on the next reboot.
*
*
* Default: false
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ModifyDBInstanceRequest withApplyImmediately(Boolean applyImmediately) {
setApplyImmediately(applyImmediately);
return this;
}
/**
*
* Specifies whether the modifications in this request and any pending modifications are asynchronously applied as
* soon as possible, regardless of the PreferredMaintenanceWindow
setting for the DB instance.
*
*
* If this parameter is set to false
, changes to the DB instance are applied during the next
* maintenance window. Some parameter changes can cause an outage and are applied on the next reboot.
*
*
* Default: false
*
*
* @return Specifies whether the modifications in this request and any pending modifications are asynchronously
* applied as soon as possible, regardless of the PreferredMaintenanceWindow
setting for the DB
* instance.
*
* If this parameter is set to false
, changes to the DB instance are applied during the next
* maintenance window. Some parameter changes can cause an outage and are applied on the next reboot.
*
*
* Default: false
*/
public Boolean isApplyImmediately() {
return this.applyImmediately;
}
/**
*
* The weekly time range (in UTC) during which system maintenance can occur, which might result in an outage.
* Changing this parameter doesn't result in an outage except in the following situation, and the change is
* asynchronously applied as soon as possible. If there are pending actions that cause a reboot, and the maintenance
* window is changed to include the current time, changing this parameter causes a reboot of the DB instance. If you
* are moving this window to the current time, there must be at least 30 minutes between the current time and end of
* the window to ensure that pending changes are applied.
*
*
* Default: Uses existing setting.
*
*
* Format: ddd:hh24:mi-ddd:hh24:mi
*
*
* Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun
*
*
* Constraints: Must be at least 30 minutes.
*
*
* @param preferredMaintenanceWindow
* The weekly time range (in UTC) during which system maintenance can occur, which might result in an outage.
* Changing this parameter doesn't result in an outage except in the following situation, and the change is
* asynchronously applied as soon as possible. If there are pending actions that cause a reboot, and the
* maintenance window is changed to include the current time, changing this parameter causes a reboot of the
* DB instance. If you are moving this window to the current time, there must be at least 30 minutes between
* the current time and end of the window to ensure that pending changes are applied.
*
* Default: Uses existing setting.
*
*
* Format: ddd:hh24:mi-ddd:hh24:mi
*
*
* Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun
*
*
* Constraints: Must be at least 30 minutes.
*/
public void setPreferredMaintenanceWindow(String preferredMaintenanceWindow) {
this.preferredMaintenanceWindow = preferredMaintenanceWindow;
}
/**
*
* The weekly time range (in UTC) during which system maintenance can occur, which might result in an outage.
* Changing this parameter doesn't result in an outage except in the following situation, and the change is
* asynchronously applied as soon as possible. If there are pending actions that cause a reboot, and the maintenance
* window is changed to include the current time, changing this parameter causes a reboot of the DB instance. If you
* are moving this window to the current time, there must be at least 30 minutes between the current time and end of
* the window to ensure that pending changes are applied.
*
*
* Default: Uses existing setting.
*
*
* Format: ddd:hh24:mi-ddd:hh24:mi
*
*
* Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun
*
*
* Constraints: Must be at least 30 minutes.
*
*
* @return The weekly time range (in UTC) during which system maintenance can occur, which might result in an
* outage. Changing this parameter doesn't result in an outage except in the following situation, and the
* change is asynchronously applied as soon as possible. If there are pending actions that cause a reboot,
* and the maintenance window is changed to include the current time, changing this parameter causes a
* reboot of the DB instance. If you are moving this window to the current time, there must be at least 30
* minutes between the current time and end of the window to ensure that pending changes are applied.
*
* Default: Uses existing setting.
*
*
* Format: ddd:hh24:mi-ddd:hh24:mi
*
*
* Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun
*
*
* Constraints: Must be at least 30 minutes.
*/
public String getPreferredMaintenanceWindow() {
return this.preferredMaintenanceWindow;
}
/**
*
* The weekly time range (in UTC) during which system maintenance can occur, which might result in an outage.
* Changing this parameter doesn't result in an outage except in the following situation, and the change is
* asynchronously applied as soon as possible. If there are pending actions that cause a reboot, and the maintenance
* window is changed to include the current time, changing this parameter causes a reboot of the DB instance. If you
* are moving this window to the current time, there must be at least 30 minutes between the current time and end of
* the window to ensure that pending changes are applied.
*
*
* Default: Uses existing setting.
*
*
* Format: ddd:hh24:mi-ddd:hh24:mi
*
*
* Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun
*
*
* Constraints: Must be at least 30 minutes.
*
*
* @param preferredMaintenanceWindow
* The weekly time range (in UTC) during which system maintenance can occur, which might result in an outage.
* Changing this parameter doesn't result in an outage except in the following situation, and the change is
* asynchronously applied as soon as possible. If there are pending actions that cause a reboot, and the
* maintenance window is changed to include the current time, changing this parameter causes a reboot of the
* DB instance. If you are moving this window to the current time, there must be at least 30 minutes between
* the current time and end of the window to ensure that pending changes are applied.
*
* Default: Uses existing setting.
*
*
* Format: ddd:hh24:mi-ddd:hh24:mi
*
*
* Valid days: Mon, Tue, Wed, Thu, Fri, Sat, Sun
*
*
* Constraints: Must be at least 30 minutes.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ModifyDBInstanceRequest withPreferredMaintenanceWindow(String preferredMaintenanceWindow) {
setPreferredMaintenanceWindow(preferredMaintenanceWindow);
return this;
}
/**
*
* Indicates that minor version upgrades are applied automatically to the DB instance during the maintenance window.
* Changing this parameter doesn't result in an outage except in the following case, and the change is
* asynchronously applied as soon as possible. An outage results if this parameter is set to true
* during the maintenance window, and a newer minor version is available, and Amazon DocumentDB has enabled
* automatic patching for that engine version.
*
*
* @param autoMinorVersionUpgrade
* Indicates that minor version upgrades are applied automatically to the DB instance during the maintenance
* window. Changing this parameter doesn't result in an outage except in the following case, and the change
* is asynchronously applied as soon as possible. An outage results if this parameter is set to
* true
during the maintenance window, and a newer minor version is available, and Amazon
* DocumentDB has enabled automatic patching for that engine version.
*/
public void setAutoMinorVersionUpgrade(Boolean autoMinorVersionUpgrade) {
this.autoMinorVersionUpgrade = autoMinorVersionUpgrade;
}
/**
*
* Indicates that minor version upgrades are applied automatically to the DB instance during the maintenance window.
* Changing this parameter doesn't result in an outage except in the following case, and the change is
* asynchronously applied as soon as possible. An outage results if this parameter is set to true
* during the maintenance window, and a newer minor version is available, and Amazon DocumentDB has enabled
* automatic patching for that engine version.
*
*
* @return Indicates that minor version upgrades are applied automatically to the DB instance during the maintenance
* window. Changing this parameter doesn't result in an outage except in the following case, and the change
* is asynchronously applied as soon as possible. An outage results if this parameter is set to
* true
during the maintenance window, and a newer minor version is available, and Amazon
* DocumentDB has enabled automatic patching for that engine version.
*/
public Boolean getAutoMinorVersionUpgrade() {
return this.autoMinorVersionUpgrade;
}
/**
*
* Indicates that minor version upgrades are applied automatically to the DB instance during the maintenance window.
* Changing this parameter doesn't result in an outage except in the following case, and the change is
* asynchronously applied as soon as possible. An outage results if this parameter is set to true
* during the maintenance window, and a newer minor version is available, and Amazon DocumentDB has enabled
* automatic patching for that engine version.
*
*
* @param autoMinorVersionUpgrade
* Indicates that minor version upgrades are applied automatically to the DB instance during the maintenance
* window. Changing this parameter doesn't result in an outage except in the following case, and the change
* is asynchronously applied as soon as possible. An outage results if this parameter is set to
* true
during the maintenance window, and a newer minor version is available, and Amazon
* DocumentDB has enabled automatic patching for that engine version.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ModifyDBInstanceRequest withAutoMinorVersionUpgrade(Boolean autoMinorVersionUpgrade) {
setAutoMinorVersionUpgrade(autoMinorVersionUpgrade);
return this;
}
/**
*
* Indicates that minor version upgrades are applied automatically to the DB instance during the maintenance window.
* Changing this parameter doesn't result in an outage except in the following case, and the change is
* asynchronously applied as soon as possible. An outage results if this parameter is set to true
* during the maintenance window, and a newer minor version is available, and Amazon DocumentDB has enabled
* automatic patching for that engine version.
*
*
* @return Indicates that minor version upgrades are applied automatically to the DB instance during the maintenance
* window. Changing this parameter doesn't result in an outage except in the following case, and the change
* is asynchronously applied as soon as possible. An outage results if this parameter is set to
* true
during the maintenance window, and a newer minor version is available, and Amazon
* DocumentDB has enabled automatic patching for that engine version.
*/
public Boolean isAutoMinorVersionUpgrade() {
return this.autoMinorVersionUpgrade;
}
/**
*
* The new DB instance identifier for the DB instance when renaming a DB instance. When you change the DB instance
* identifier, an instance reboot occurs immediately if you set Apply Immediately
to true
.
* It occurs during the next maintenance window if you set Apply Immediately
to false
.
* This value is stored as a lowercase string.
*
*
* Constraints:
*
*
* -
*
* Must contain from 1 to 63 letters, numbers, or hyphens.
*
*
* -
*
* The first character must be a letter.
*
*
* -
*
* Cannot end with a hyphen or contain two consecutive hyphens.
*
*
*
*
* Example: mydbinstance
*
*
* @param newDBInstanceIdentifier
* The new DB instance identifier for the DB instance when renaming a DB instance. When you change the DB
* instance identifier, an instance reboot occurs immediately if you set Apply Immediately
to
* true
. It occurs during the next maintenance window if you set Apply Immediately
* to false
. This value is stored as a lowercase string.
*
* Constraints:
*
*
* -
*
* Must contain from 1 to 63 letters, numbers, or hyphens.
*
*
* -
*
* The first character must be a letter.
*
*
* -
*
* Cannot end with a hyphen or contain two consecutive hyphens.
*
*
*
*
* Example: mydbinstance
*/
public void setNewDBInstanceIdentifier(String newDBInstanceIdentifier) {
this.newDBInstanceIdentifier = newDBInstanceIdentifier;
}
/**
*
* The new DB instance identifier for the DB instance when renaming a DB instance. When you change the DB instance
* identifier, an instance reboot occurs immediately if you set Apply Immediately
to true
.
* It occurs during the next maintenance window if you set Apply Immediately
to false
.
* This value is stored as a lowercase string.
*
*
* Constraints:
*
*
* -
*
* Must contain from 1 to 63 letters, numbers, or hyphens.
*
*
* -
*
* The first character must be a letter.
*
*
* -
*
* Cannot end with a hyphen or contain two consecutive hyphens.
*
*
*
*
* Example: mydbinstance
*
*
* @return The new DB instance identifier for the DB instance when renaming a DB instance. When you change the DB
* instance identifier, an instance reboot occurs immediately if you set Apply Immediately
to
* true
. It occurs during the next maintenance window if you set Apply Immediately
* to false
. This value is stored as a lowercase string.
*
* Constraints:
*
*
* -
*
* Must contain from 1 to 63 letters, numbers, or hyphens.
*
*
* -
*
* The first character must be a letter.
*
*
* -
*
* Cannot end with a hyphen or contain two consecutive hyphens.
*
*
*
*
* Example: mydbinstance
*/
public String getNewDBInstanceIdentifier() {
return this.newDBInstanceIdentifier;
}
/**
*
* The new DB instance identifier for the DB instance when renaming a DB instance. When you change the DB instance
* identifier, an instance reboot occurs immediately if you set Apply Immediately
to true
.
* It occurs during the next maintenance window if you set Apply Immediately
to false
.
* This value is stored as a lowercase string.
*
*
* Constraints:
*
*
* -
*
* Must contain from 1 to 63 letters, numbers, or hyphens.
*
*
* -
*
* The first character must be a letter.
*
*
* -
*
* Cannot end with a hyphen or contain two consecutive hyphens.
*
*
*
*
* Example: mydbinstance
*
*
* @param newDBInstanceIdentifier
* The new DB instance identifier for the DB instance when renaming a DB instance. When you change the DB
* instance identifier, an instance reboot occurs immediately if you set Apply Immediately
to
* true
. It occurs during the next maintenance window if you set Apply Immediately
* to false
. This value is stored as a lowercase string.
*
* Constraints:
*
*
* -
*
* Must contain from 1 to 63 letters, numbers, or hyphens.
*
*
* -
*
* The first character must be a letter.
*
*
* -
*
* Cannot end with a hyphen or contain two consecutive hyphens.
*
*
*
*
* Example: mydbinstance
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ModifyDBInstanceRequest withNewDBInstanceIdentifier(String newDBInstanceIdentifier) {
setNewDBInstanceIdentifier(newDBInstanceIdentifier);
return this;
}
/**
*
* A value that specifies the order in which an Amazon DocumentDB replica is promoted to the primary instance after
* a failure of the existing primary instance.
*
*
* Default: 1
*
*
* Valid values: 0-15
*
*
* @param promotionTier
* A value that specifies the order in which an Amazon DocumentDB replica is promoted to the primary instance
* after a failure of the existing primary instance.
*
* Default: 1
*
*
* Valid values: 0-15
*/
public void setPromotionTier(Integer promotionTier) {
this.promotionTier = promotionTier;
}
/**
*
* A value that specifies the order in which an Amazon DocumentDB replica is promoted to the primary instance after
* a failure of the existing primary instance.
*
*
* Default: 1
*
*
* Valid values: 0-15
*
*
* @return A value that specifies the order in which an Amazon DocumentDB replica is promoted to the primary
* instance after a failure of the existing primary instance.
*
* Default: 1
*
*
* Valid values: 0-15
*/
public Integer getPromotionTier() {
return this.promotionTier;
}
/**
*
* A value that specifies the order in which an Amazon DocumentDB replica is promoted to the primary instance after
* a failure of the existing primary instance.
*
*
* Default: 1
*
*
* Valid values: 0-15
*
*
* @param promotionTier
* A value that specifies the order in which an Amazon DocumentDB replica is promoted to the primary instance
* after a failure of the existing primary instance.
*
* Default: 1
*
*
* Valid values: 0-15
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ModifyDBInstanceRequest withPromotionTier(Integer promotionTier) {
setPromotionTier(promotionTier);
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 (getDBInstanceIdentifier() != null)
sb.append("DBInstanceIdentifier: ").append(getDBInstanceIdentifier()).append(",");
if (getDBInstanceClass() != null)
sb.append("DBInstanceClass: ").append(getDBInstanceClass()).append(",");
if (getApplyImmediately() != null)
sb.append("ApplyImmediately: ").append(getApplyImmediately()).append(",");
if (getPreferredMaintenanceWindow() != null)
sb.append("PreferredMaintenanceWindow: ").append(getPreferredMaintenanceWindow()).append(",");
if (getAutoMinorVersionUpgrade() != null)
sb.append("AutoMinorVersionUpgrade: ").append(getAutoMinorVersionUpgrade()).append(",");
if (getNewDBInstanceIdentifier() != null)
sb.append("NewDBInstanceIdentifier: ").append(getNewDBInstanceIdentifier()).append(",");
if (getPromotionTier() != null)
sb.append("PromotionTier: ").append(getPromotionTier());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ModifyDBInstanceRequest == false)
return false;
ModifyDBInstanceRequest other = (ModifyDBInstanceRequest) obj;
if (other.getDBInstanceIdentifier() == null ^ this.getDBInstanceIdentifier() == null)
return false;
if (other.getDBInstanceIdentifier() != null && other.getDBInstanceIdentifier().equals(this.getDBInstanceIdentifier()) == false)
return false;
if (other.getDBInstanceClass() == null ^ this.getDBInstanceClass() == null)
return false;
if (other.getDBInstanceClass() != null && other.getDBInstanceClass().equals(this.getDBInstanceClass()) == false)
return false;
if (other.getApplyImmediately() == null ^ this.getApplyImmediately() == null)
return false;
if (other.getApplyImmediately() != null && other.getApplyImmediately().equals(this.getApplyImmediately()) == false)
return false;
if (other.getPreferredMaintenanceWindow() == null ^ this.getPreferredMaintenanceWindow() == null)
return false;
if (other.getPreferredMaintenanceWindow() != null && other.getPreferredMaintenanceWindow().equals(this.getPreferredMaintenanceWindow()) == false)
return false;
if (other.getAutoMinorVersionUpgrade() == null ^ this.getAutoMinorVersionUpgrade() == null)
return false;
if (other.getAutoMinorVersionUpgrade() != null && other.getAutoMinorVersionUpgrade().equals(this.getAutoMinorVersionUpgrade()) == false)
return false;
if (other.getNewDBInstanceIdentifier() == null ^ this.getNewDBInstanceIdentifier() == null)
return false;
if (other.getNewDBInstanceIdentifier() != null && other.getNewDBInstanceIdentifier().equals(this.getNewDBInstanceIdentifier()) == false)
return false;
if (other.getPromotionTier() == null ^ this.getPromotionTier() == null)
return false;
if (other.getPromotionTier() != null && other.getPromotionTier().equals(this.getPromotionTier()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getDBInstanceIdentifier() == null) ? 0 : getDBInstanceIdentifier().hashCode());
hashCode = prime * hashCode + ((getDBInstanceClass() == null) ? 0 : getDBInstanceClass().hashCode());
hashCode = prime * hashCode + ((getApplyImmediately() == null) ? 0 : getApplyImmediately().hashCode());
hashCode = prime * hashCode + ((getPreferredMaintenanceWindow() == null) ? 0 : getPreferredMaintenanceWindow().hashCode());
hashCode = prime * hashCode + ((getAutoMinorVersionUpgrade() == null) ? 0 : getAutoMinorVersionUpgrade().hashCode());
hashCode = prime * hashCode + ((getNewDBInstanceIdentifier() == null) ? 0 : getNewDBInstanceIdentifier().hashCode());
hashCode = prime * hashCode + ((getPromotionTier() == null) ? 0 : getPromotionTier().hashCode());
return hashCode;
}
@Override
public ModifyDBInstanceRequest clone() {
return (ModifyDBInstanceRequest) super.clone();
}
}