All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.dynamodbv2.model.UpdateTableRequest Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon DynamoDB module holds the client classes that are used for communicating with Amazon DynamoDB Service

There is a newer version: 1.12.778
Show newest version
/*
 * Copyright 2019-2024 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;
import javax.annotation.Generated;

import com.amazonaws.AmazonWebServiceRequest;

/**
 * 

* Represents the input of an UpdateTable operation. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class UpdateTableRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* 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. *

*/ private java.util.List attributeDefinitions; /** *

* The name of the table to be updated. You can also provide the Amazon Resource Name (ARN) of the table in this * parameter. *

*/ private String tableName; /** *

* Controls how you are charged for read and write throughput and how you manage capacity. When switching from * pay-per-request to provisioned capacity, initial provisioned capacity values must be set. The initial provisioned * capacity values are estimated based on the consumed read and write capacity of your table and global secondary * indexes over the past 30 minutes. *

*
    *
  • *

    * PROVISIONED - We recommend using PROVISIONED for predictable workloads. * PROVISIONED sets the billing mode to Provisioned capacity mode. *

    *
  • *
  • *

    * PAY_PER_REQUEST - We recommend using PAY_PER_REQUEST for unpredictable workloads. * PAY_PER_REQUEST sets the billing mode to On-demand * capacity mode. *

    *
  • *
*/ private String billingMode; /** *

* The new provisioned throughput settings for the specified table or index. *

*/ 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. *

    *
  • *
*

* You can create or delete only one global secondary index per UpdateTable operation. *

*

* For more information, see Managing Global * Secondary Indexes in the Amazon DynamoDB Developer Guide. *

*/ private java.util.List globalSecondaryIndexUpdates; /** *

* Represents the DynamoDB Streams configuration for the table. *

* *

* You receive a ValidationException if you try to enable a stream on a table that already has a * stream, or if you try to disable a stream on a table that doesn't have a stream. *

*
*/ private StreamSpecification streamSpecification; /** *

* The new server-side encryption settings for the specified table. *

*/ private SSESpecification sSESpecification; /** *

* A list of replica update actions (create, delete, or update) for the table. *

* *

* For global tables, this property only applies to global tables using Version 2019.11.21 (Current version). *

*
*/ private java.util.List replicaUpdates; /** *

* The table class of the table to be updated. Valid values are STANDARD and * STANDARD_INFREQUENT_ACCESS. *

*/ private String tableClass; /** *

* Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table. *

*/ private Boolean deletionProtectionEnabled; /** *

* Updates the maximum number of read and write units for the specified table in on-demand capacity mode. If you use * this parameter, you must specify MaxReadRequestUnits, MaxWriteRequestUnits, or both. *

*/ private OnDemandThroughput onDemandThroughput; /** * Default constructor for UpdateTableRequest object. Callers should use the setter or fluent setter (with...) * methods to initialize the 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. * * @param tableName * The name of the table to be updated. You can also provide the Amazon Resource Name (ARN) of the table in * this parameter. * @param provisionedThroughput * The new provisioned throughput settings for the specified table or index. */ public UpdateTableRequest(String tableName, ProvisionedThroughput 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. *

* * @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. */ public java.util.List getAttributeDefinitions() { return 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. *

* * @param 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 attributeDefinitions) { if (attributeDefinitions == null) { this.attributeDefinitions = null; return; } this.attributeDefinitions = new java.util.ArrayList(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. *

*

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

* * @param 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. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateTableRequest withAttributeDefinitions(AttributeDefinition... attributeDefinitions) { if (this.attributeDefinitions == null) { setAttributeDefinitions(new java.util.ArrayList(attributeDefinitions.length)); } for (AttributeDefinition ele : attributeDefinitions) { this.attributeDefinitions.add(ele); } 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. *

* * @param 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. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateTableRequest withAttributeDefinitions(java.util.Collection attributeDefinitions) { setAttributeDefinitions(attributeDefinitions); return this; } /** *

* The name of the table to be updated. You can also provide the Amazon Resource Name (ARN) of the table in this * parameter. *

* * @param tableName * The name of the table to be updated. You can also provide the Amazon Resource Name (ARN) of the table in * this parameter. */ public void setTableName(String tableName) { this.tableName = tableName; } /** *

* The name of the table to be updated. You can also provide the Amazon Resource Name (ARN) of the table in this * parameter. *

* * @return The name of the table to be updated. You can also provide the Amazon Resource Name (ARN) of the table in * this parameter. */ public String getTableName() { return this.tableName; } /** *

* The name of the table to be updated. You can also provide the Amazon Resource Name (ARN) of the table in this * parameter. *

* * @param tableName * The name of the table to be updated. You can also provide the Amazon Resource Name (ARN) of the table in * this parameter. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateTableRequest withTableName(String tableName) { setTableName(tableName); return this; } /** *

* Controls how you are charged for read and write throughput and how you manage capacity. When switching from * pay-per-request to provisioned capacity, initial provisioned capacity values must be set. The initial provisioned * capacity values are estimated based on the consumed read and write capacity of your table and global secondary * indexes over the past 30 minutes. *

*
    *
  • *

    * PROVISIONED - We recommend using PROVISIONED for predictable workloads. * PROVISIONED sets the billing mode to Provisioned capacity mode. *

    *
  • *
  • *

    * PAY_PER_REQUEST - We recommend using PAY_PER_REQUEST for unpredictable workloads. * PAY_PER_REQUEST sets the billing mode to On-demand * capacity mode. *

    *
  • *
* * @param billingMode * Controls how you are charged for read and write throughput and how you manage capacity. When switching * from pay-per-request to provisioned capacity, initial provisioned capacity values must be set. The initial * provisioned capacity values are estimated based on the consumed read and write capacity of your table and * global secondary indexes over the past 30 minutes.

*
    *
  • *

    * PROVISIONED - We recommend using PROVISIONED for predictable workloads. * PROVISIONED sets the billing mode to Provisioned capacity mode. *

    *
  • *
  • *

    * PAY_PER_REQUEST - We recommend using PAY_PER_REQUEST for unpredictable * workloads. PAY_PER_REQUEST sets the billing mode to On-demand capacity mode. *

    *
  • * @see BillingMode */ public void setBillingMode(String billingMode) { this.billingMode = billingMode; } /** *

    * Controls how you are charged for read and write throughput and how you manage capacity. When switching from * pay-per-request to provisioned capacity, initial provisioned capacity values must be set. The initial provisioned * capacity values are estimated based on the consumed read and write capacity of your table and global secondary * indexes over the past 30 minutes. *

    *
      *
    • *

      * PROVISIONED - We recommend using PROVISIONED for predictable workloads. * PROVISIONED sets the billing mode to Provisioned capacity mode. *

      *
    • *
    • *

      * PAY_PER_REQUEST - We recommend using PAY_PER_REQUEST for unpredictable workloads. * PAY_PER_REQUEST sets the billing mode to On-demand * capacity mode. *

      *
    • *
    * * @return Controls how you are charged for read and write throughput and how you manage capacity. When switching * from pay-per-request to provisioned capacity, initial provisioned capacity values must be set. The * initial provisioned capacity values are estimated based on the consumed read and write capacity of your * table and global secondary indexes over the past 30 minutes.

    *
      *
    • *

      * PROVISIONED - We recommend using PROVISIONED for predictable workloads. * PROVISIONED sets the billing mode to Provisioned capacity mode. *

      *
    • *
    • *

      * PAY_PER_REQUEST - We recommend using PAY_PER_REQUEST for unpredictable * workloads. PAY_PER_REQUEST sets the billing mode to On-demand capacity mode. *

      *
    • * @see BillingMode */ public String getBillingMode() { return this.billingMode; } /** *

      * Controls how you are charged for read and write throughput and how you manage capacity. When switching from * pay-per-request to provisioned capacity, initial provisioned capacity values must be set. The initial provisioned * capacity values are estimated based on the consumed read and write capacity of your table and global secondary * indexes over the past 30 minutes. *

      *
        *
      • *

        * PROVISIONED - We recommend using PROVISIONED for predictable workloads. * PROVISIONED sets the billing mode to Provisioned capacity mode. *

        *
      • *
      • *

        * PAY_PER_REQUEST - We recommend using PAY_PER_REQUEST for unpredictable workloads. * PAY_PER_REQUEST sets the billing mode to On-demand * capacity mode. *

        *
      • *
      * * @param billingMode * Controls how you are charged for read and write throughput and how you manage capacity. When switching * from pay-per-request to provisioned capacity, initial provisioned capacity values must be set. The initial * provisioned capacity values are estimated based on the consumed read and write capacity of your table and * global secondary indexes over the past 30 minutes.

      *
        *
      • *

        * PROVISIONED - We recommend using PROVISIONED for predictable workloads. * PROVISIONED sets the billing mode to Provisioned capacity mode. *

        *
      • *
      • *

        * PAY_PER_REQUEST - We recommend using PAY_PER_REQUEST for unpredictable * workloads. PAY_PER_REQUEST sets the billing mode to On-demand capacity mode. *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. * @see BillingMode */ public UpdateTableRequest withBillingMode(String billingMode) { setBillingMode(billingMode); return this; } /** *

        * Controls how you are charged for read and write throughput and how you manage capacity. When switching from * pay-per-request to provisioned capacity, initial provisioned capacity values must be set. The initial provisioned * capacity values are estimated based on the consumed read and write capacity of your table and global secondary * indexes over the past 30 minutes. *

        *
          *
        • *

          * PROVISIONED - We recommend using PROVISIONED for predictable workloads. * PROVISIONED sets the billing mode to Provisioned capacity mode. *

          *
        • *
        • *

          * PAY_PER_REQUEST - We recommend using PAY_PER_REQUEST for unpredictable workloads. * PAY_PER_REQUEST sets the billing mode to On-demand * capacity mode. *

          *
        • *
        * * @param billingMode * Controls how you are charged for read and write throughput and how you manage capacity. When switching * from pay-per-request to provisioned capacity, initial provisioned capacity values must be set. The initial * provisioned capacity values are estimated based on the consumed read and write capacity of your table and * global secondary indexes over the past 30 minutes.

        *
          *
        • *

          * PROVISIONED - We recommend using PROVISIONED for predictable workloads. * PROVISIONED sets the billing mode to Provisioned capacity mode. *

          *
        • *
        • *

          * PAY_PER_REQUEST - We recommend using PAY_PER_REQUEST for unpredictable * workloads. PAY_PER_REQUEST sets the billing mode to On-demand capacity mode. *

          *
        • * @return Returns a reference to this object so that method calls can be chained together. * @see BillingMode */ public UpdateTableRequest withBillingMode(BillingMode billingMode) { this.billingMode = billingMode.toString(); return this; } /** *

          * The new provisioned throughput settings for the specified table or index. *

          * * @param provisionedThroughput * The new provisioned throughput settings for the specified table or index. */ public void setProvisionedThroughput(ProvisionedThroughput provisionedThroughput) { this.provisionedThroughput = provisionedThroughput; } /** *

          * The new provisioned throughput settings for the specified table or index. *

          * * @return The new provisioned throughput settings for the specified table or index. */ public ProvisionedThroughput getProvisionedThroughput() { return this.provisionedThroughput; } /** *

          * The new provisioned throughput settings for the specified table or index. *

          * * @param provisionedThroughput * The new provisioned throughput settings for the specified table or index. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateTableRequest withProvisionedThroughput(ProvisionedThroughput provisionedThroughput) { setProvisionedThroughput(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. *

            *
          • *
          *

          * You can create or delete only one global secondary index per UpdateTable operation. *

          *

          * For more information, see Managing Global * Secondary Indexes in the Amazon DynamoDB Developer Guide. *

          * * @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. *

            *
          • *
          *

          * You can create or delete only one global secondary index per UpdateTable operation. *

          *

          * For more information, see Managing * Global Secondary Indexes in the Amazon DynamoDB Developer Guide. */ public java.util.List getGlobalSecondaryIndexUpdates() { return 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. *

            *
          • *
          *

          * You can create or delete only one global secondary index per UpdateTable operation. *

          *

          * For more information, see Managing Global * Secondary Indexes in the Amazon DynamoDB Developer Guide. *

          * * @param 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. *

            *
          • *
          *

          * You can create or delete only one global secondary index per UpdateTable operation. *

          *

          * For more information, see Managing Global * Secondary Indexes in the Amazon DynamoDB Developer Guide. */ public void setGlobalSecondaryIndexUpdates(java.util.Collection globalSecondaryIndexUpdates) { if (globalSecondaryIndexUpdates == null) { this.globalSecondaryIndexUpdates = null; return; } this.globalSecondaryIndexUpdates = new java.util.ArrayList(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. *

            *
          • *
          *

          * You can create or delete only one global secondary index per UpdateTable operation. *

          *

          * For more information, see Managing Global * Secondary Indexes in the Amazon DynamoDB Developer Guide. *

          *

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

          * * @param 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. *

            *
          • *
          *

          * You can create or delete only one global secondary index per UpdateTable operation. *

          *

          * For more information, see Managing Global * Secondary Indexes in the Amazon DynamoDB Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateTableRequest withGlobalSecondaryIndexUpdates(GlobalSecondaryIndexUpdate... globalSecondaryIndexUpdates) { if (this.globalSecondaryIndexUpdates == null) { setGlobalSecondaryIndexUpdates(new java.util.ArrayList(globalSecondaryIndexUpdates.length)); } for (GlobalSecondaryIndexUpdate ele : globalSecondaryIndexUpdates) { this.globalSecondaryIndexUpdates.add(ele); } 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. *

            *
          • *
          *

          * You can create or delete only one global secondary index per UpdateTable operation. *

          *

          * For more information, see Managing Global * Secondary Indexes in the Amazon DynamoDB Developer Guide. *

          * * @param 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. *

            *
          • *
          *

          * You can create or delete only one global secondary index per UpdateTable operation. *

          *

          * For more information, see Managing Global * Secondary Indexes in the Amazon DynamoDB Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateTableRequest withGlobalSecondaryIndexUpdates(java.util.Collection globalSecondaryIndexUpdates) { setGlobalSecondaryIndexUpdates(globalSecondaryIndexUpdates); return this; } /** *

          * Represents the DynamoDB Streams configuration for the table. *

          * *

          * You receive a ValidationException if you try to enable a stream on a table that already has a * stream, or if you try to disable a stream on a table that doesn't have a stream. *

          *
          * * @param streamSpecification * Represents the DynamoDB Streams configuration for the table.

          *

          * You receive a ValidationException if you try to enable a stream on a table that already has a * stream, or if you try to disable a stream on a table that doesn't have a stream. *

          */ public void setStreamSpecification(StreamSpecification streamSpecification) { this.streamSpecification = streamSpecification; } /** *

          * Represents the DynamoDB Streams configuration for the table. *

          * *

          * You receive a ValidationException if you try to enable a stream on a table that already has a * stream, or if you try to disable a stream on a table that doesn't have a stream. *

          *
          * * @return Represents the DynamoDB Streams configuration for the table.

          *

          * You receive a ValidationException if you try to enable a stream on a table that already has * a stream, or if you try to disable a stream on a table that doesn't have a stream. *

          */ public StreamSpecification getStreamSpecification() { return this.streamSpecification; } /** *

          * Represents the DynamoDB Streams configuration for the table. *

          * *

          * You receive a ValidationException if you try to enable a stream on a table that already has a * stream, or if you try to disable a stream on a table that doesn't have a stream. *

          *
          * * @param streamSpecification * Represents the DynamoDB Streams configuration for the table.

          *

          * You receive a ValidationException if you try to enable a stream on a table that already has a * stream, or if you try to disable a stream on a table that doesn't have a stream. *

          * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateTableRequest withStreamSpecification(StreamSpecification streamSpecification) { setStreamSpecification(streamSpecification); return this; } /** *

          * The new server-side encryption settings for the specified table. *

          * * @param sSESpecification * The new server-side encryption settings for the specified table. */ public void setSSESpecification(SSESpecification sSESpecification) { this.sSESpecification = sSESpecification; } /** *

          * The new server-side encryption settings for the specified table. *

          * * @return The new server-side encryption settings for the specified table. */ public SSESpecification getSSESpecification() { return this.sSESpecification; } /** *

          * The new server-side encryption settings for the specified table. *

          * * @param sSESpecification * The new server-side encryption settings for the specified table. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateTableRequest withSSESpecification(SSESpecification sSESpecification) { setSSESpecification(sSESpecification); return this; } /** *

          * A list of replica update actions (create, delete, or update) for the table. *

          * *

          * For global tables, this property only applies to global tables using Version 2019.11.21 (Current version). *

          *
          * * @return A list of replica update actions (create, delete, or update) for the table.

          *

          * For global tables, this property only applies to global tables using Version 2019.11.21 (Current * version). *

          */ public java.util.List getReplicaUpdates() { return replicaUpdates; } /** *

          * A list of replica update actions (create, delete, or update) for the table. *

          * *

          * For global tables, this property only applies to global tables using Version 2019.11.21 (Current version). *

          *
          * * @param replicaUpdates * A list of replica update actions (create, delete, or update) for the table.

          *

          * For global tables, this property only applies to global tables using Version 2019.11.21 (Current version). *

          */ public void setReplicaUpdates(java.util.Collection replicaUpdates) { if (replicaUpdates == null) { this.replicaUpdates = null; return; } this.replicaUpdates = new java.util.ArrayList(replicaUpdates); } /** *

          * A list of replica update actions (create, delete, or update) for the table. *

          * *

          * For global tables, this property only applies to global tables using Version 2019.11.21 (Current version). *

          *
          *

          * NOTE: This method appends the values to the existing list (if any). Use * {@link #setReplicaUpdates(java.util.Collection)} or {@link #withReplicaUpdates(java.util.Collection)} if you want * to override the existing values. *

          * * @param replicaUpdates * A list of replica update actions (create, delete, or update) for the table.

          *

          * For global tables, this property only applies to global tables using Version 2019.11.21 (Current version). *

          * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateTableRequest withReplicaUpdates(ReplicationGroupUpdate... replicaUpdates) { if (this.replicaUpdates == null) { setReplicaUpdates(new java.util.ArrayList(replicaUpdates.length)); } for (ReplicationGroupUpdate ele : replicaUpdates) { this.replicaUpdates.add(ele); } return this; } /** *

          * A list of replica update actions (create, delete, or update) for the table. *

          * *

          * For global tables, this property only applies to global tables using Version 2019.11.21 (Current version). *

          *
          * * @param replicaUpdates * A list of replica update actions (create, delete, or update) for the table.

          *

          * For global tables, this property only applies to global tables using Version 2019.11.21 (Current version). *

          * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateTableRequest withReplicaUpdates(java.util.Collection replicaUpdates) { setReplicaUpdates(replicaUpdates); return this; } /** *

          * The table class of the table to be updated. Valid values are STANDARD and * STANDARD_INFREQUENT_ACCESS. *

          * * @param tableClass * The table class of the table to be updated. Valid values are STANDARD and * STANDARD_INFREQUENT_ACCESS. * @see TableClass */ public void setTableClass(String tableClass) { this.tableClass = tableClass; } /** *

          * The table class of the table to be updated. Valid values are STANDARD and * STANDARD_INFREQUENT_ACCESS. *

          * * @return The table class of the table to be updated. Valid values are STANDARD and * STANDARD_INFREQUENT_ACCESS. * @see TableClass */ public String getTableClass() { return this.tableClass; } /** *

          * The table class of the table to be updated. Valid values are STANDARD and * STANDARD_INFREQUENT_ACCESS. *

          * * @param tableClass * The table class of the table to be updated. Valid values are STANDARD and * STANDARD_INFREQUENT_ACCESS. * @return Returns a reference to this object so that method calls can be chained together. * @see TableClass */ public UpdateTableRequest withTableClass(String tableClass) { setTableClass(tableClass); return this; } /** *

          * The table class of the table to be updated. Valid values are STANDARD and * STANDARD_INFREQUENT_ACCESS. *

          * * @param tableClass * The table class of the table to be updated. Valid values are STANDARD and * STANDARD_INFREQUENT_ACCESS. * @return Returns a reference to this object so that method calls can be chained together. * @see TableClass */ public UpdateTableRequest withTableClass(TableClass tableClass) { this.tableClass = tableClass.toString(); return this; } /** *

          * Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table. *

          * * @param deletionProtectionEnabled * Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table. */ public void setDeletionProtectionEnabled(Boolean deletionProtectionEnabled) { this.deletionProtectionEnabled = deletionProtectionEnabled; } /** *

          * Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table. *

          * * @return Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table. */ public Boolean getDeletionProtectionEnabled() { return this.deletionProtectionEnabled; } /** *

          * Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table. *

          * * @param deletionProtectionEnabled * Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateTableRequest withDeletionProtectionEnabled(Boolean deletionProtectionEnabled) { setDeletionProtectionEnabled(deletionProtectionEnabled); return this; } /** *

          * Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table. *

          * * @return Indicates whether deletion protection is to be enabled (true) or disabled (false) on the table. */ public Boolean isDeletionProtectionEnabled() { return this.deletionProtectionEnabled; } /** *

          * Updates the maximum number of read and write units for the specified table in on-demand capacity mode. If you use * this parameter, you must specify MaxReadRequestUnits, MaxWriteRequestUnits, or both. *

          * * @param onDemandThroughput * Updates the maximum number of read and write units for the specified table in on-demand capacity mode. If * you use this parameter, you must specify MaxReadRequestUnits, * MaxWriteRequestUnits, or both. */ public void setOnDemandThroughput(OnDemandThroughput onDemandThroughput) { this.onDemandThroughput = onDemandThroughput; } /** *

          * Updates the maximum number of read and write units for the specified table in on-demand capacity mode. If you use * this parameter, you must specify MaxReadRequestUnits, MaxWriteRequestUnits, or both. *

          * * @return Updates the maximum number of read and write units for the specified table in on-demand capacity mode. If * you use this parameter, you must specify MaxReadRequestUnits, * MaxWriteRequestUnits, or both. */ public OnDemandThroughput getOnDemandThroughput() { return this.onDemandThroughput; } /** *

          * Updates the maximum number of read and write units for the specified table in on-demand capacity mode. If you use * this parameter, you must specify MaxReadRequestUnits, MaxWriteRequestUnits, or both. *

          * * @param onDemandThroughput * Updates the maximum number of read and write units for the specified table in on-demand capacity mode. If * you use this parameter, you must specify MaxReadRequestUnits, * MaxWriteRequestUnits, or both. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateTableRequest withOnDemandThroughput(OnDemandThroughput onDemandThroughput) { setOnDemandThroughput(onDemandThroughput); 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 (getAttributeDefinitions() != null) sb.append("AttributeDefinitions: ").append(getAttributeDefinitions()).append(","); if (getTableName() != null) sb.append("TableName: ").append(getTableName()).append(","); if (getBillingMode() != null) sb.append("BillingMode: ").append(getBillingMode()).append(","); if (getProvisionedThroughput() != null) sb.append("ProvisionedThroughput: ").append(getProvisionedThroughput()).append(","); if (getGlobalSecondaryIndexUpdates() != null) sb.append("GlobalSecondaryIndexUpdates: ").append(getGlobalSecondaryIndexUpdates()).append(","); if (getStreamSpecification() != null) sb.append("StreamSpecification: ").append(getStreamSpecification()).append(","); if (getSSESpecification() != null) sb.append("SSESpecification: ").append(getSSESpecification()).append(","); if (getReplicaUpdates() != null) sb.append("ReplicaUpdates: ").append(getReplicaUpdates()).append(","); if (getTableClass() != null) sb.append("TableClass: ").append(getTableClass()).append(","); if (getDeletionProtectionEnabled() != null) sb.append("DeletionProtectionEnabled: ").append(getDeletionProtectionEnabled()).append(","); if (getOnDemandThroughput() != null) sb.append("OnDemandThroughput: ").append(getOnDemandThroughput()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof UpdateTableRequest == false) return false; UpdateTableRequest other = (UpdateTableRequest) obj; if (other.getAttributeDefinitions() == null ^ this.getAttributeDefinitions() == null) return false; if (other.getAttributeDefinitions() != null && other.getAttributeDefinitions().equals(this.getAttributeDefinitions()) == false) return false; if (other.getTableName() == null ^ this.getTableName() == null) return false; if (other.getTableName() != null && other.getTableName().equals(this.getTableName()) == false) return false; if (other.getBillingMode() == null ^ this.getBillingMode() == null) return false; if (other.getBillingMode() != null && other.getBillingMode().equals(this.getBillingMode()) == false) return false; if (other.getProvisionedThroughput() == null ^ this.getProvisionedThroughput() == null) return false; if (other.getProvisionedThroughput() != null && other.getProvisionedThroughput().equals(this.getProvisionedThroughput()) == false) return false; if (other.getGlobalSecondaryIndexUpdates() == null ^ this.getGlobalSecondaryIndexUpdates() == null) return false; if (other.getGlobalSecondaryIndexUpdates() != null && other.getGlobalSecondaryIndexUpdates().equals(this.getGlobalSecondaryIndexUpdates()) == false) return false; if (other.getStreamSpecification() == null ^ this.getStreamSpecification() == null) return false; if (other.getStreamSpecification() != null && other.getStreamSpecification().equals(this.getStreamSpecification()) == false) return false; if (other.getSSESpecification() == null ^ this.getSSESpecification() == null) return false; if (other.getSSESpecification() != null && other.getSSESpecification().equals(this.getSSESpecification()) == false) return false; if (other.getReplicaUpdates() == null ^ this.getReplicaUpdates() == null) return false; if (other.getReplicaUpdates() != null && other.getReplicaUpdates().equals(this.getReplicaUpdates()) == false) return false; if (other.getTableClass() == null ^ this.getTableClass() == null) return false; if (other.getTableClass() != null && other.getTableClass().equals(this.getTableClass()) == false) return false; if (other.getDeletionProtectionEnabled() == null ^ this.getDeletionProtectionEnabled() == null) return false; if (other.getDeletionProtectionEnabled() != null && other.getDeletionProtectionEnabled().equals(this.getDeletionProtectionEnabled()) == false) return false; if (other.getOnDemandThroughput() == null ^ this.getOnDemandThroughput() == null) return false; if (other.getOnDemandThroughput() != null && other.getOnDemandThroughput().equals(this.getOnDemandThroughput()) == false) return false; return true; } @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 + ((getBillingMode() == null) ? 0 : getBillingMode().hashCode()); hashCode = prime * hashCode + ((getProvisionedThroughput() == null) ? 0 : getProvisionedThroughput().hashCode()); hashCode = prime * hashCode + ((getGlobalSecondaryIndexUpdates() == null) ? 0 : getGlobalSecondaryIndexUpdates().hashCode()); hashCode = prime * hashCode + ((getStreamSpecification() == null) ? 0 : getStreamSpecification().hashCode()); hashCode = prime * hashCode + ((getSSESpecification() == null) ? 0 : getSSESpecification().hashCode()); hashCode = prime * hashCode + ((getReplicaUpdates() == null) ? 0 : getReplicaUpdates().hashCode()); hashCode = prime * hashCode + ((getTableClass() == null) ? 0 : getTableClass().hashCode()); hashCode = prime * hashCode + ((getDeletionProtectionEnabled() == null) ? 0 : getDeletionProtectionEnabled().hashCode()); hashCode = prime * hashCode + ((getOnDemandThroughput() == null) ? 0 : getOnDemandThroughput().hashCode()); return hashCode; } @Override public UpdateTableRequest clone() { return (UpdateTableRequest) super.clone(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy