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

com.amazonaws.services.keyspaces.model.CapacitySpecification Maven / Gradle / Ivy

Go to download

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

The 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.keyspaces.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Amazon Keyspaces has two read/write capacity modes for processing reads and writes on your tables: *

*
    *
  • *

    * On-demand (default) *

    *
  • *
  • *

    * Provisioned *

    *
  • *
*

* The read/write capacity mode that you choose controls how you are charged for read and write throughput and how table * throughput capacity is managed. *

*

* For more information, see Read/write capacity modes * in the Amazon Keyspaces Developer Guide. *

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

* The read/write throughput capacity mode for a table. The options are: *

*
    *
  • *

    * throughputMode:PAY_PER_REQUEST and *

    *
  • *
  • *

    * throughputMode:PROVISIONED - Provisioned capacity mode requires readCapacityUnits and * writeCapacityUnits as input. *

    *
  • *
*

* The default is throughput_mode:PAY_PER_REQUEST. *

*

* For more information, see Read/write capacity * modes in the Amazon Keyspaces Developer Guide. *

*/ private String throughputMode; /** *

* The throughput capacity specified for read operations defined in read capacity units * (RCUs). *

*/ private Long readCapacityUnits; /** *

* The throughput capacity specified for write operations defined in write capacity units * (WCUs). *

*/ private Long writeCapacityUnits; /** *

* The read/write throughput capacity mode for a table. The options are: *

*
    *
  • *

    * throughputMode:PAY_PER_REQUEST and *

    *
  • *
  • *

    * throughputMode:PROVISIONED - Provisioned capacity mode requires readCapacityUnits and * writeCapacityUnits as input. *

    *
  • *
*

* The default is throughput_mode:PAY_PER_REQUEST. *

*

* For more information, see Read/write capacity * modes in the Amazon Keyspaces Developer Guide. *

* * @param throughputMode * The read/write throughput capacity mode for a table. The options are:

*
    *
  • *

    * throughputMode:PAY_PER_REQUEST and *

    *
  • *
  • *

    * throughputMode:PROVISIONED - Provisioned capacity mode requires * readCapacityUnits and writeCapacityUnits as input. *

    *
  • *
*

* The default is throughput_mode:PAY_PER_REQUEST. *

*

* For more information, see Read/write * capacity modes in the Amazon Keyspaces Developer Guide. * @see ThroughputMode */ public void setThroughputMode(String throughputMode) { this.throughputMode = throughputMode; } /** *

* The read/write throughput capacity mode for a table. The options are: *

*
    *
  • *

    * throughputMode:PAY_PER_REQUEST and *

    *
  • *
  • *

    * throughputMode:PROVISIONED - Provisioned capacity mode requires readCapacityUnits and * writeCapacityUnits as input. *

    *
  • *
*

* The default is throughput_mode:PAY_PER_REQUEST. *

*

* For more information, see Read/write capacity * modes in the Amazon Keyspaces Developer Guide. *

* * @return The read/write throughput capacity mode for a table. The options are:

*
    *
  • *

    * throughputMode:PAY_PER_REQUEST and *

    *
  • *
  • *

    * throughputMode:PROVISIONED - Provisioned capacity mode requires * readCapacityUnits and writeCapacityUnits as input. *

    *
  • *
*

* The default is throughput_mode:PAY_PER_REQUEST. *

*

* For more information, see Read/write * capacity modes in the Amazon Keyspaces Developer Guide. * @see ThroughputMode */ public String getThroughputMode() { return this.throughputMode; } /** *

* The read/write throughput capacity mode for a table. The options are: *

*
    *
  • *

    * throughputMode:PAY_PER_REQUEST and *

    *
  • *
  • *

    * throughputMode:PROVISIONED - Provisioned capacity mode requires readCapacityUnits and * writeCapacityUnits as input. *

    *
  • *
*

* The default is throughput_mode:PAY_PER_REQUEST. *

*

* For more information, see Read/write capacity * modes in the Amazon Keyspaces Developer Guide. *

* * @param throughputMode * The read/write throughput capacity mode for a table. The options are:

*
    *
  • *

    * throughputMode:PAY_PER_REQUEST and *

    *
  • *
  • *

    * throughputMode:PROVISIONED - Provisioned capacity mode requires * readCapacityUnits and writeCapacityUnits as input. *

    *
  • *
*

* The default is throughput_mode:PAY_PER_REQUEST. *

*

* For more information, see Read/write * capacity modes in the Amazon Keyspaces Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. * @see ThroughputMode */ public CapacitySpecification withThroughputMode(String throughputMode) { setThroughputMode(throughputMode); return this; } /** *

* The read/write throughput capacity mode for a table. The options are: *

*
    *
  • *

    * throughputMode:PAY_PER_REQUEST and *

    *
  • *
  • *

    * throughputMode:PROVISIONED - Provisioned capacity mode requires readCapacityUnits and * writeCapacityUnits as input. *

    *
  • *
*

* The default is throughput_mode:PAY_PER_REQUEST. *

*

* For more information, see Read/write capacity * modes in the Amazon Keyspaces Developer Guide. *

* * @param throughputMode * The read/write throughput capacity mode for a table. The options are:

*
    *
  • *

    * throughputMode:PAY_PER_REQUEST and *

    *
  • *
  • *

    * throughputMode:PROVISIONED - Provisioned capacity mode requires * readCapacityUnits and writeCapacityUnits as input. *

    *
  • *
*

* The default is throughput_mode:PAY_PER_REQUEST. *

*

* For more information, see Read/write * capacity modes in the Amazon Keyspaces Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. * @see ThroughputMode */ public CapacitySpecification withThroughputMode(ThroughputMode throughputMode) { this.throughputMode = throughputMode.toString(); return this; } /** *

* The throughput capacity specified for read operations defined in read capacity units * (RCUs). *

* * @param readCapacityUnits * The throughput capacity specified for read operations defined in * read capacity units (RCUs). */ public void setReadCapacityUnits(Long readCapacityUnits) { this.readCapacityUnits = readCapacityUnits; } /** *

* The throughput capacity specified for read operations defined in read capacity units * (RCUs). *

* * @return The throughput capacity specified for read operations defined in * read capacity units (RCUs). */ public Long getReadCapacityUnits() { return this.readCapacityUnits; } /** *

* The throughput capacity specified for read operations defined in read capacity units * (RCUs). *

* * @param readCapacityUnits * The throughput capacity specified for read operations defined in * read capacity units (RCUs). * @return Returns a reference to this object so that method calls can be chained together. */ public CapacitySpecification withReadCapacityUnits(Long readCapacityUnits) { setReadCapacityUnits(readCapacityUnits); return this; } /** *

* The throughput capacity specified for write operations defined in write capacity units * (WCUs). *

* * @param writeCapacityUnits * The throughput capacity specified for write operations defined in * write capacity units (WCUs). */ public void setWriteCapacityUnits(Long writeCapacityUnits) { this.writeCapacityUnits = writeCapacityUnits; } /** *

* The throughput capacity specified for write operations defined in write capacity units * (WCUs). *

* * @return The throughput capacity specified for write operations defined in * write capacity units (WCUs). */ public Long getWriteCapacityUnits() { return this.writeCapacityUnits; } /** *

* The throughput capacity specified for write operations defined in write capacity units * (WCUs). *

* * @param writeCapacityUnits * The throughput capacity specified for write operations defined in * write capacity units (WCUs). * @return Returns a reference to this object so that method calls can be chained together. */ public CapacitySpecification withWriteCapacityUnits(Long writeCapacityUnits) { setWriteCapacityUnits(writeCapacityUnits); 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 (getThroughputMode() != null) sb.append("ThroughputMode: ").append(getThroughputMode()).append(","); if (getReadCapacityUnits() != null) sb.append("ReadCapacityUnits: ").append(getReadCapacityUnits()).append(","); if (getWriteCapacityUnits() != null) sb.append("WriteCapacityUnits: ").append(getWriteCapacityUnits()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CapacitySpecification == false) return false; CapacitySpecification other = (CapacitySpecification) obj; if (other.getThroughputMode() == null ^ this.getThroughputMode() == null) return false; if (other.getThroughputMode() != null && other.getThroughputMode().equals(this.getThroughputMode()) == false) return false; if (other.getReadCapacityUnits() == null ^ this.getReadCapacityUnits() == null) return false; if (other.getReadCapacityUnits() != null && other.getReadCapacityUnits().equals(this.getReadCapacityUnits()) == false) return false; if (other.getWriteCapacityUnits() == null ^ this.getWriteCapacityUnits() == null) return false; if (other.getWriteCapacityUnits() != null && other.getWriteCapacityUnits().equals(this.getWriteCapacityUnits()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getThroughputMode() == null) ? 0 : getThroughputMode().hashCode()); hashCode = prime * hashCode + ((getReadCapacityUnits() == null) ? 0 : getReadCapacityUnits().hashCode()); hashCode = prime * hashCode + ((getWriteCapacityUnits() == null) ? 0 : getWriteCapacityUnits().hashCode()); return hashCode; } @Override public CapacitySpecification clone() { try { return (CapacitySpecification) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.keyspaces.model.transform.CapacitySpecificationMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy