com.amazonaws.services.dynamodbv2.model.ReplicaSettingsUpdate Maven / Gradle / Ivy
/*
* Copyright 2010-2018 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.dynamodbv2.model;
import java.io.Serializable;
/**
*
* Represents the settings for a global table in a region that will be modified.
*
*/
public class ReplicaSettingsUpdate implements Serializable {
/**
*
* The region of the replica to be added.
*
*/
private String regionName;
/**
*
* The maximum number of strongly consistent reads consumed per second
* before DynamoDB returns a ThrottlingException
. For more
* information, see Specifying Read and Write Requirements in the Amazon DynamoDB
* Developer Guide.
*
*
* Constraints:
* Range: 1 -
*/
private Long replicaProvisionedReadCapacityUnits;
/**
*
* Autoscaling settings for managing a global table replica's read capacity
* units.
*
*/
private AutoScalingSettingsUpdate replicaProvisionedReadCapacityAutoScalingSettingsUpdate;
/**
*
* Represents the settings of a global secondary index for a global table
* that will be modified.
*
*/
private java.util.List replicaGlobalSecondaryIndexSettingsUpdate;
/**
*
* The region of the replica to be added.
*
*
* @return
* The region of the replica to be added.
*
*/
public String getRegionName() {
return regionName;
}
/**
*
* The region of the replica to be added.
*
*
* @param regionName
* The region of the replica to be added.
*
*/
public void setRegionName(String regionName) {
this.regionName = regionName;
}
/**
*
* The region of the replica to be added.
*
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param regionName
* The region of the replica to be added.
*
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public ReplicaSettingsUpdate withRegionName(String regionName) {
this.regionName = regionName;
return this;
}
/**
*
* The maximum number of strongly consistent reads consumed per second
* before DynamoDB returns a ThrottlingException
. For more
* information, see Specifying Read and Write Requirements in the Amazon DynamoDB
* Developer Guide.
*
*
* Constraints:
* Range: 1 -
*
* @return
* The maximum number of strongly consistent reads consumed per
* second before DynamoDB returns a ThrottlingException
* . For more information, see Specifying Read and Write Requirements in the Amazon
* DynamoDB Developer Guide.
*
*/
public Long getReplicaProvisionedReadCapacityUnits() {
return replicaProvisionedReadCapacityUnits;
}
/**
*
* The maximum number of strongly consistent reads consumed per second
* before DynamoDB returns a ThrottlingException
. For more
* information, see Specifying Read and Write Requirements in the Amazon DynamoDB
* Developer Guide.
*
*
* Constraints:
* Range: 1 -
*
* @param replicaProvisionedReadCapacityUnits
* The maximum number of strongly consistent reads consumed per
* second before DynamoDB returns a
* ThrottlingException
. For more information, see Specifying Read and Write Requirements in the Amazon
* DynamoDB Developer Guide.
*
*/
public void setReplicaProvisionedReadCapacityUnits(Long replicaProvisionedReadCapacityUnits) {
this.replicaProvisionedReadCapacityUnits = replicaProvisionedReadCapacityUnits;
}
/**
*
* The maximum number of strongly consistent reads consumed per second
* before DynamoDB returns a ThrottlingException
. For more
* information, see Specifying Read and Write Requirements in the Amazon DynamoDB
* Developer Guide.
*
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* Constraints:
* Range: 1 -
*
* @param replicaProvisionedReadCapacityUnits
* The maximum number of strongly consistent reads consumed per
* second before DynamoDB returns a
* ThrottlingException
. For more information, see Specifying Read and Write Requirements in the Amazon
* DynamoDB Developer Guide.
*
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public ReplicaSettingsUpdate withReplicaProvisionedReadCapacityUnits(
Long replicaProvisionedReadCapacityUnits) {
this.replicaProvisionedReadCapacityUnits = replicaProvisionedReadCapacityUnits;
return this;
}
/**
*
* Autoscaling settings for managing a global table replica's read capacity
* units.
*
*
* @return
* Autoscaling settings for managing a global table replica's read
* capacity units.
*
*/
public AutoScalingSettingsUpdate getReplicaProvisionedReadCapacityAutoScalingSettingsUpdate() {
return replicaProvisionedReadCapacityAutoScalingSettingsUpdate;
}
/**
*
* Autoscaling settings for managing a global table replica's read capacity
* units.
*
*
* @param replicaProvisionedReadCapacityAutoScalingSettingsUpdate
* Autoscaling settings for managing a global table replica's
* read capacity units.
*
*/
public void setReplicaProvisionedReadCapacityAutoScalingSettingsUpdate(
AutoScalingSettingsUpdate replicaProvisionedReadCapacityAutoScalingSettingsUpdate) {
this.replicaProvisionedReadCapacityAutoScalingSettingsUpdate = replicaProvisionedReadCapacityAutoScalingSettingsUpdate;
}
/**
*
* Autoscaling settings for managing a global table replica's read capacity
* units.
*
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param replicaProvisionedReadCapacityAutoScalingSettingsUpdate
* Autoscaling settings for managing a global table replica's
* read capacity units.
*
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public ReplicaSettingsUpdate withReplicaProvisionedReadCapacityAutoScalingSettingsUpdate(
AutoScalingSettingsUpdate replicaProvisionedReadCapacityAutoScalingSettingsUpdate) {
this.replicaProvisionedReadCapacityAutoScalingSettingsUpdate = replicaProvisionedReadCapacityAutoScalingSettingsUpdate;
return this;
}
/**
*
* Represents the settings of a global secondary index for a global table
* that will be modified.
*
*
* @return
* Represents the settings of a global secondary index for a global
* table that will be modified.
*
*/
public java.util.List getReplicaGlobalSecondaryIndexSettingsUpdate() {
return replicaGlobalSecondaryIndexSettingsUpdate;
}
/**
*
* Represents the settings of a global secondary index for a global table
* that will be modified.
*
*
* @param replicaGlobalSecondaryIndexSettingsUpdate
* Represents the settings of a global secondary index for a
* global table that will be modified.
*
*/
public void setReplicaGlobalSecondaryIndexSettingsUpdate(
java.util.Collection replicaGlobalSecondaryIndexSettingsUpdate) {
if (replicaGlobalSecondaryIndexSettingsUpdate == null) {
this.replicaGlobalSecondaryIndexSettingsUpdate = null;
return;
}
this.replicaGlobalSecondaryIndexSettingsUpdate = new java.util.ArrayList(
replicaGlobalSecondaryIndexSettingsUpdate);
}
/**
*
* Represents the settings of a global secondary index for a global table
* that will be modified.
*
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param replicaGlobalSecondaryIndexSettingsUpdate
* Represents the settings of a global secondary index for a
* global table that will be modified.
*
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public ReplicaSettingsUpdate withReplicaGlobalSecondaryIndexSettingsUpdate(
ReplicaGlobalSecondaryIndexSettingsUpdate... replicaGlobalSecondaryIndexSettingsUpdate) {
if (getReplicaGlobalSecondaryIndexSettingsUpdate() == null) {
this.replicaGlobalSecondaryIndexSettingsUpdate = new java.util.ArrayList(
replicaGlobalSecondaryIndexSettingsUpdate.length);
}
for (ReplicaGlobalSecondaryIndexSettingsUpdate value : replicaGlobalSecondaryIndexSettingsUpdate) {
this.replicaGlobalSecondaryIndexSettingsUpdate.add(value);
}
return this;
}
/**
*
* Represents the settings of a global secondary index for a global table
* that will be modified.
*
*
* Returns a reference to this object so that method calls can be chained
* together.
*
* @param replicaGlobalSecondaryIndexSettingsUpdate
* Represents the settings of a global secondary index for a
* global table that will be modified.
*
* @return A reference to this updated object so that method calls can be
* chained together.
*/
public ReplicaSettingsUpdate withReplicaGlobalSecondaryIndexSettingsUpdate(
java.util.Collection replicaGlobalSecondaryIndexSettingsUpdate) {
setReplicaGlobalSecondaryIndexSettingsUpdate(replicaGlobalSecondaryIndexSettingsUpdate);
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 (getRegionName() != null)
sb.append("RegionName: " + getRegionName() + ",");
if (getReplicaProvisionedReadCapacityUnits() != null)
sb.append("ReplicaProvisionedReadCapacityUnits: "
+ getReplicaProvisionedReadCapacityUnits() + ",");
if (getReplicaProvisionedReadCapacityAutoScalingSettingsUpdate() != null)
sb.append("ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate: "
+ getReplicaProvisionedReadCapacityAutoScalingSettingsUpdate() + ",");
if (getReplicaGlobalSecondaryIndexSettingsUpdate() != null)
sb.append("ReplicaGlobalSecondaryIndexSettingsUpdate: "
+ getReplicaGlobalSecondaryIndexSettingsUpdate());
sb.append("}");
return sb.toString();
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getRegionName() == null) ? 0 : getRegionName().hashCode());
hashCode = prime
* hashCode
+ ((getReplicaProvisionedReadCapacityUnits() == null) ? 0
: getReplicaProvisionedReadCapacityUnits().hashCode());
hashCode = prime
* hashCode
+ ((getReplicaProvisionedReadCapacityAutoScalingSettingsUpdate() == null) ? 0
: getReplicaProvisionedReadCapacityAutoScalingSettingsUpdate().hashCode());
hashCode = prime
* hashCode
+ ((getReplicaGlobalSecondaryIndexSettingsUpdate() == null) ? 0
: getReplicaGlobalSecondaryIndexSettingsUpdate().hashCode());
return hashCode;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ReplicaSettingsUpdate == false)
return false;
ReplicaSettingsUpdate other = (ReplicaSettingsUpdate) obj;
if (other.getRegionName() == null ^ this.getRegionName() == null)
return false;
if (other.getRegionName() != null
&& other.getRegionName().equals(this.getRegionName()) == false)
return false;
if (other.getReplicaProvisionedReadCapacityUnits() == null
^ this.getReplicaProvisionedReadCapacityUnits() == null)
return false;
if (other.getReplicaProvisionedReadCapacityUnits() != null
&& other.getReplicaProvisionedReadCapacityUnits().equals(
this.getReplicaProvisionedReadCapacityUnits()) == false)
return false;
if (other.getReplicaProvisionedReadCapacityAutoScalingSettingsUpdate() == null
^ this.getReplicaProvisionedReadCapacityAutoScalingSettingsUpdate() == null)
return false;
if (other.getReplicaProvisionedReadCapacityAutoScalingSettingsUpdate() != null
&& other.getReplicaProvisionedReadCapacityAutoScalingSettingsUpdate().equals(
this.getReplicaProvisionedReadCapacityAutoScalingSettingsUpdate()) == false)
return false;
if (other.getReplicaGlobalSecondaryIndexSettingsUpdate() == null
^ this.getReplicaGlobalSecondaryIndexSettingsUpdate() == null)
return false;
if (other.getReplicaGlobalSecondaryIndexSettingsUpdate() != null
&& other.getReplicaGlobalSecondaryIndexSettingsUpdate().equals(
this.getReplicaGlobalSecondaryIndexSettingsUpdate()) == false)
return false;
return true;
}
}