Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 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;
 
 
Container for the parameters to the UpdateTable operation.

Updates the provisioned throughput for the given table, or manages the global secondary indexes on the table.

You can increase or decrease the table's provisioned throughput values within the maximums and minimums listed in the Limits section in the Amazon DynamoDB Developer Guide .

In addition, you can use UpdateTable to add, modify or delete global secondary indexes on the table. For more information, see Managing Global Secondary Indexes in the Amazon DynamoDB Developer Guide .

The table must be in the ACTIVE state for UpdateTable to succeed. UpdateTable is an asynchronous operation; while executing the operation, the table is in the UPDATING state. While the table is in the UPDATING state, the table still has the provisioned throughput from before the call. The table's new provisioned throughput settings go into effect when the table returns to the ACTIVE state; at that point, the UpdateTable operation is complete.

 
 public class UpdateTableRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
An array of attributes that describe the key schema for the table and indexes. If you are adding a new global secondary index to the table, AttributeDefinitions must include the key element(s) of the new index.
 
The name of the table to be updated.

Constraints:
Length: 3 - 255
Pattern: [a-zA-Z0-9_.-]+

 
     private String tableName;

    
Represents the provisioned throughput settings for a specified table or index. The settings can be modified using the UpdateTable operation.

For current minimum and maximum provisioned throughput values, see Limits in the Amazon DynamoDB Developer Guide.

 
     private ProvisionedThroughput provisionedThroughput;

    
An array of one or more global secondary indexes for the table. For each index in the array, you can request one action:
  • Create - add a new global secondary index to the table.

  • Update - modify the provisioned throughput settings of an existing global secondary index.

  • Delete - remove a global secondary index from the table.

 
Default constructor for a new UpdateTableRequest object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.
 
     public UpdateTableRequest() {}
    
    
Constructs a new UpdateTableRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
tableName The name of the table to be updated.
provisionedThroughput Represents the provisioned throughput settings for a specified table or index. The settings can be modified using the UpdateTable operation.

For current minimum and maximum provisioned throughput values, see Limits in the Amazon DynamoDB Developer Guide.

    public UpdateTableRequest(String tableNameProvisionedThroughput provisionedThroughput) {
        setTableName(tableName);
        setProvisionedThroughput(provisionedThroughput);
    }

    
An array of attributes that describe the key schema for the table and indexes. If you are adding a new global secondary index to the table, AttributeDefinitions must include the key element(s) of the new index.

Returns:
An array of attributes that describe the key schema for the table and indexes. If you are adding a new global secondary index to the table, AttributeDefinitions must include the key element(s) of the new index.
        return ;
    }
    
    
An array of attributes that describe the key schema for the table and indexes. If you are adding a new global secondary index to the table, AttributeDefinitions must include the key element(s) of the new index.

Parameters:
attributeDefinitions An array of attributes that describe the key schema for the table and indexes. If you are adding a new global secondary index to the table, AttributeDefinitions must include the key element(s) of the new index.
    public void setAttributeDefinitions(java.util.Collection<AttributeDefinitionattributeDefinitions) {
        if (attributeDefinitions == null) {
            this. = null;
            return;
        }
        attributeDefinitionsCopy.addAll(attributeDefinitions);
        this. = attributeDefinitionsCopy;
    }
    
    
An array of attributes that describe the key schema for the table and indexes. If you are adding a new global secondary index to the table, AttributeDefinitions must include the key element(s) of the new index.

NOTE: This method appends the values to the existing list (if any). Use setAttributeDefinitions(java.util.Collection) or withAttributeDefinitions(java.util.Collection) if you want to override the existing values.

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

Parameters:
attributeDefinitions An array of attributes that describe the key schema for the table and indexes. If you are adding a new global secondary index to the table, AttributeDefinitions must include the key element(s) of the new index.
Returns:
A reference to this updated object so that method calls can be chained together.
    public UpdateTableRequest withAttributeDefinitions(AttributeDefinition... attributeDefinitions) {
        if (getAttributeDefinitions() == nullsetAttributeDefinitions(new java.util.ArrayList<AttributeDefinition>(attributeDefinitions.length));
        for (AttributeDefinition value : attributeDefinitions) {
            getAttributeDefinitions().add(value);
        }
        return this;
    }
    
    
An array of attributes that describe the key schema for the table and indexes. If you are adding a new global secondary index to the table, AttributeDefinitions must include the key element(s) of the new index.

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

Parameters:
attributeDefinitions An array of attributes that describe the key schema for the table and indexes. If you are adding a new global secondary index to the table, AttributeDefinitions must include the key element(s) of the new index.
Returns:
A reference to this updated object so that method calls can be chained together.
        if (attributeDefinitions == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<AttributeDefinitionattributeDefinitionsCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<AttributeDefinition>(attributeDefinitions.size());
            attributeDefinitionsCopy.addAll(attributeDefinitions);
            this. = attributeDefinitionsCopy;
        }
        return this;
    }

    
The name of the table to be updated.

Constraints:
Length: 3 - 255
Pattern: [a-zA-Z0-9_.-]+

Returns:
The name of the table to be updated.
    public String getTableName() {
        return ;
    }
    
    
The name of the table to be updated.

Constraints:
Length: 3 - 255
Pattern: [a-zA-Z0-9_.-]+

Parameters:
tableName The name of the table to be updated.
    public void setTableName(String tableName) {
        this. = tableName;
    }
    
    
The name of the table to be updated.

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

Constraints:
Length: 3 - 255
Pattern: [a-zA-Z0-9_.-]+

Parameters:
tableName The name of the table to be updated.
Returns:
A reference to this updated object so that method calls can be chained together.
    public UpdateTableRequest withTableName(String tableName) {
        this. = tableName;
        return this;
    }

    
Represents the provisioned throughput settings for a specified table or index. The settings can be modified using the UpdateTable operation.

For current minimum and maximum provisioned throughput values, see Limits in the Amazon DynamoDB Developer Guide.

Returns:
Represents the provisioned throughput settings for a specified table or index. The settings can be modified using the UpdateTable operation.

For current minimum and maximum provisioned throughput values, see Limits in the Amazon DynamoDB Developer Guide.

        return ;
    }
    
    
Represents the provisioned throughput settings for a specified table or index. The settings can be modified using the UpdateTable operation.

For current minimum and maximum provisioned throughput values, see Limits in the Amazon DynamoDB Developer Guide.

Parameters:
provisionedThroughput Represents the provisioned throughput settings for a specified table or index. The settings can be modified using the UpdateTable operation.

For current minimum and maximum provisioned throughput values, see Limits in the Amazon DynamoDB Developer Guide.

    public void setProvisionedThroughput(ProvisionedThroughput provisionedThroughput) {
        this. = provisionedThroughput;
    }
    
    
Represents the provisioned throughput settings for a specified table or index. The settings can be modified using the UpdateTable operation.

For current minimum and maximum provisioned throughput values, see Limits in the Amazon DynamoDB Developer Guide.

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

Parameters:
provisionedThroughput Represents the provisioned throughput settings for a specified table or index. The settings can be modified using the UpdateTable operation.

For current minimum and maximum provisioned throughput values, see Limits in the Amazon DynamoDB Developer Guide.

Returns:
A reference to this updated object so that method calls can be chained together.
    public UpdateTableRequest withProvisionedThroughput(ProvisionedThroughput provisionedThroughput) {
        this. = provisionedThroughput;
        return this;
    }

    
An array of one or more global secondary indexes for the table. For each index in the array, you can request one action:
  • Create - add a new global secondary index to the table.

  • Update - modify the provisioned throughput settings of an existing global secondary index.

  • Delete - remove a global secondary index from the table.

Returns:
An array of one or more global secondary indexes for the table. For each index in the array, you can request one action:
  • Create - add a new global secondary index to the table.

  • Update - modify the provisioned throughput settings of an existing global secondary index.

  • Delete - remove a global secondary index from the table.

        return ;
    }
    
    
An array of one or more global secondary indexes for the table. For each index in the array, you can request one action:
  • Create - add a new global secondary index to the table.

  • Update - modify the provisioned throughput settings of an existing global secondary index.

  • Delete - remove a global secondary index from the table.

Parameters:
globalSecondaryIndexUpdates An array of one or more global secondary indexes for the table. For each index in the array, you can request one action:
  • Create - add a new global secondary index to the table.

  • Update - modify the provisioned throughput settings of an existing global secondary index.

  • Delete - remove a global secondary index from the table.

    public void setGlobalSecondaryIndexUpdates(java.util.Collection<GlobalSecondaryIndexUpdateglobalSecondaryIndexUpdates) {
        if (globalSecondaryIndexUpdates == null) {
            this. = null;
            return;
        }
        com.amazonaws.internal.ListWithAutoConstructFlag<GlobalSecondaryIndexUpdateglobalSecondaryIndexUpdatesCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<GlobalSecondaryIndexUpdate>(globalSecondaryIndexUpdates.size());
        globalSecondaryIndexUpdatesCopy.addAll(globalSecondaryIndexUpdates);
        this. = globalSecondaryIndexUpdatesCopy;
    }
    
    
An array of one or more global secondary indexes for the table. For each index in the array, you can request one action:
  • Create - add a new global secondary index to the table.

  • Update - modify the provisioned throughput settings of an existing global secondary index.

  • Delete - remove a global secondary index from the table.

NOTE: This method appends the values to the existing list (if any). Use setGlobalSecondaryIndexUpdates(java.util.Collection) or withGlobalSecondaryIndexUpdates(java.util.Collection) if you want to override the existing values.

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

Parameters:
globalSecondaryIndexUpdates An array of one or more global secondary indexes for the table. For each index in the array, you can request one action:
  • Create - add a new global secondary index to the table.

  • Update - modify the provisioned throughput settings of an existing global secondary index.

  • Delete - remove a global secondary index from the table.

Returns:
A reference to this updated object so that method calls can be chained together.
    public UpdateTableRequest withGlobalSecondaryIndexUpdates(GlobalSecondaryIndexUpdate... globalSecondaryIndexUpdates) {
        if (getGlobalSecondaryIndexUpdates() == nullsetGlobalSecondaryIndexUpdates(new java.util.ArrayList<GlobalSecondaryIndexUpdate>(globalSecondaryIndexUpdates.length));
        for (GlobalSecondaryIndexUpdate value : globalSecondaryIndexUpdates) {
            getGlobalSecondaryIndexUpdates().add(value);
        }
        return this;
    }
    
    
An array of one or more global secondary indexes for the table. For each index in the array, you can request one action:
  • Create - add a new global secondary index to the table.

  • Update - modify the provisioned throughput settings of an existing global secondary index.

  • Delete - remove a global secondary index from the table.

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

Parameters:
globalSecondaryIndexUpdates An array of one or more global secondary indexes for the table. For each index in the array, you can request one action:
  • Create - add a new global secondary index to the table.

  • Update - modify the provisioned throughput settings of an existing global secondary index.

  • Delete - remove a global secondary index from the table.

Returns:
A reference to this updated object so that method calls can be chained together.
        if (globalSecondaryIndexUpdates == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<GlobalSecondaryIndexUpdateglobalSecondaryIndexUpdatesCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<GlobalSecondaryIndexUpdate>(globalSecondaryIndexUpdates.size());
            globalSecondaryIndexUpdatesCopy.addAll(globalSecondaryIndexUpdates);
            this. = globalSecondaryIndexUpdatesCopy;
        }
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getAttributeDefinitions() != nullsb.append("AttributeDefinitions: " + getAttributeDefinitions() + ",");
        if (getTableName() != nullsb.append("TableName: " + getTableName() + ",");
        if (getProvisionedThroughput() != nullsb.append("ProvisionedThroughput: " + getProvisionedThroughput() + ",");
        if (getGlobalSecondaryIndexUpdates() != nullsb.append("GlobalSecondaryIndexUpdates: " + getGlobalSecondaryIndexUpdates() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getAttributeDefinitions() == null) ? 0 : getAttributeDefinitions().hashCode()); 
        hashCode = prime * hashCode + ((getTableName() == null) ? 0 : getTableName().hashCode()); 
        hashCode = prime * hashCode + ((getProvisionedThroughput() == null) ? 0 : getProvisionedThroughput().hashCode()); 
        hashCode = prime * hashCode + ((getGlobalSecondaryIndexUpdates() == null) ? 0 : getGlobalSecondaryIndexUpdates().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof UpdateTableRequest == falsereturn false;
        UpdateTableRequest other = (UpdateTableRequest)obj;
        
        if (other.getAttributeDefinitions() == null ^ this.getAttributeDefinitions() == nullreturn false;
        if (other.getAttributeDefinitions() != null && other.getAttributeDefinitions().equals(this.getAttributeDefinitions()) == falsereturn false
        if (other.getTableName() == null ^ this.getTableName() == nullreturn false;
        if (other.getTableName() != null && other.getTableName().equals(this.getTableName()) == falsereturn false
        if (other.getProvisionedThroughput() == null ^ this.getProvisionedThroughput() == nullreturn false;
        if (other.getProvisionedThroughput() != null && other.getProvisionedThroughput().equals(this.getProvisionedThroughput()) == falsereturn false
        if (other.getGlobalSecondaryIndexUpdates() == null ^ this.getGlobalSecondaryIndexUpdates() == nullreturn false;
        if (other.getGlobalSecondaryIndexUpdates() != null && other.getGlobalSecondaryIndexUpdates().equals(this.getGlobalSecondaryIndexUpdates()) == falsereturn false
        return true;
    }
    
    @Override
    public UpdateTableRequest clone() {
        
            return (UpdateTableRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X