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

software.amazon.awssdk.services.elasticache.model.ReservedCacheNodesOffering Maven / Gradle / Ivy

Go to download

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

There is a newer version: 2.29.39
Show newest version
/*
 * Copyright 2012-2017 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 software.amazon.awssdk.services.elasticache.model;

import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import javax.annotation.Generated;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* Describes all of the attributes of a reserved cache node offering. *

*/ @Generated("software.amazon.awssdk:codegen") public class ReservedCacheNodesOffering implements ToCopyableBuilder { private final String reservedCacheNodesOfferingId; private final String cacheNodeType; private final Integer duration; private final Double fixedPrice; private final Double usagePrice; private final String productDescription; private final String offeringType; private final List recurringCharges; private ReservedCacheNodesOffering(BuilderImpl builder) { this.reservedCacheNodesOfferingId = builder.reservedCacheNodesOfferingId; this.cacheNodeType = builder.cacheNodeType; this.duration = builder.duration; this.fixedPrice = builder.fixedPrice; this.usagePrice = builder.usagePrice; this.productDescription = builder.productDescription; this.offeringType = builder.offeringType; this.recurringCharges = builder.recurringCharges; } /** *

* A unique identifier for the reserved cache node offering. *

* * @return A unique identifier for the reserved cache node offering. */ public String reservedCacheNodesOfferingId() { return reservedCacheNodesOfferingId; } /** *

* The cache node type for the reserved cache node. *

*

* Valid node types are as follows: *

*
    *
  • *

    * General purpose: *

    *
      *
    • *

      * Current generation: cache.t2.micro, cache.t2.small, cache.t2.medium, * cache.m3.medium, cache.m3.large, cache.m3.xlarge, * cache.m3.2xlarge, cache.m4.large, cache.m4.xlarge, * cache.m4.2xlarge, cache.m4.4xlarge, cache.m4.10xlarge *

      *
    • *
    • *

      * Previous generation: cache.t1.micro, cache.m1.small, cache.m1.medium, * cache.m1.large, cache.m1.xlarge *

      *
    • *
    *
  • *
  • *

    * Compute optimized: cache.c1.xlarge *

    *
  • *
  • *

    * Memory optimized: *

    *
      *
    • *

      * Current generation: cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, * cache.r3.4xlarge, cache.r3.8xlarge *

      *
    • *
    • *

      * Previous generation: cache.m2.xlarge, cache.m2.2xlarge, cache.m2.4xlarge *

      *
    • *
    *
  • *
*

* Notes: *

*
    *
  • *

    * All T2 instances are created in an Amazon Virtual Private Cloud (Amazon VPC). *

    *
  • *
  • *

    * Redis backup/restore is not supported for Redis (cluster mode disabled) T1 and T2 instances. Backup/restore is * supported on Redis (cluster mode enabled) T2 instances. *

    *
  • *
  • *

    * Redis Append-only files (AOF) functionality is not supported for T1 or T2 instances. *

    *
  • *
*

* For a complete listing of node types and specifications, see Amazon ElastiCache Product Features and Details and either * Cache Node Type-Specific Parameters for Memcached or Cache Node Type-Specific Parameters for Redis. *

* * @return The cache node type for the reserved cache node.

*

* Valid node types are as follows: *

*
    *
  • *

    * General purpose: *

    *
      *
    • *

      * Current generation: cache.t2.micro, cache.t2.small, * cache.t2.medium, cache.m3.medium, cache.m3.large, * cache.m3.xlarge, cache.m3.2xlarge, cache.m4.large, * cache.m4.xlarge, cache.m4.2xlarge, cache.m4.4xlarge, * cache.m4.10xlarge *

      *
    • *
    • *

      * Previous generation: cache.t1.micro, cache.m1.small, * cache.m1.medium, cache.m1.large, cache.m1.xlarge *

      *
    • *
    *
  • *
  • *

    * Compute optimized: cache.c1.xlarge *

    *
  • *
  • *

    * Memory optimized: *

    *
      *
    • *

      * Current generation: cache.r3.large, cache.r3.xlarge, * cache.r3.2xlarge, cache.r3.4xlarge, cache.r3.8xlarge *

      *
    • *
    • *

      * Previous generation: cache.m2.xlarge, cache.m2.2xlarge, * cache.m2.4xlarge *

      *
    • *
    *
  • *
*

* Notes: *

*
    *
  • *

    * All T2 instances are created in an Amazon Virtual Private Cloud (Amazon VPC). *

    *
  • *
  • *

    * Redis backup/restore is not supported for Redis (cluster mode disabled) T1 and T2 instances. * Backup/restore is supported on Redis (cluster mode enabled) T2 instances. *

    *
  • *
  • *

    * Redis Append-only files (AOF) functionality is not supported for T1 or T2 instances. *

    *
  • *
*

* For a complete listing of node types and specifications, see Amazon ElastiCache Product Features and Details and * either Cache Node Type-Specific Parameters for Memcached or Cache Node Type-Specific Parameters for Redis. */ public String cacheNodeType() { return cacheNodeType; } /** *

* The duration of the offering. in seconds. *

* * @return The duration of the offering. in seconds. */ public Integer duration() { return duration; } /** *

* The fixed price charged for this offering. *

* * @return The fixed price charged for this offering. */ public Double fixedPrice() { return fixedPrice; } /** *

* The hourly price charged for this offering. *

* * @return The hourly price charged for this offering. */ public Double usagePrice() { return usagePrice; } /** *

* The cache engine used by the offering. *

* * @return The cache engine used by the offering. */ public String productDescription() { return productDescription; } /** *

* The offering type. *

* * @return The offering type. */ public String offeringType() { return offeringType; } /** *

* The recurring price charged to run this reserved cache node. *

*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

* * @return The recurring price charged to run this reserved cache node. */ public List recurringCharges() { return recurringCharges; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + ((reservedCacheNodesOfferingId() == null) ? 0 : reservedCacheNodesOfferingId().hashCode()); hashCode = 31 * hashCode + ((cacheNodeType() == null) ? 0 : cacheNodeType().hashCode()); hashCode = 31 * hashCode + ((duration() == null) ? 0 : duration().hashCode()); hashCode = 31 * hashCode + ((fixedPrice() == null) ? 0 : fixedPrice().hashCode()); hashCode = 31 * hashCode + ((usagePrice() == null) ? 0 : usagePrice().hashCode()); hashCode = 31 * hashCode + ((productDescription() == null) ? 0 : productDescription().hashCode()); hashCode = 31 * hashCode + ((offeringType() == null) ? 0 : offeringType().hashCode()); hashCode = 31 * hashCode + ((recurringCharges() == null) ? 0 : recurringCharges().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof ReservedCacheNodesOffering)) { return false; } ReservedCacheNodesOffering other = (ReservedCacheNodesOffering) obj; if (other.reservedCacheNodesOfferingId() == null ^ this.reservedCacheNodesOfferingId() == null) { return false; } if (other.reservedCacheNodesOfferingId() != null && !other.reservedCacheNodesOfferingId().equals(this.reservedCacheNodesOfferingId())) { return false; } if (other.cacheNodeType() == null ^ this.cacheNodeType() == null) { return false; } if (other.cacheNodeType() != null && !other.cacheNodeType().equals(this.cacheNodeType())) { return false; } if (other.duration() == null ^ this.duration() == null) { return false; } if (other.duration() != null && !other.duration().equals(this.duration())) { return false; } if (other.fixedPrice() == null ^ this.fixedPrice() == null) { return false; } if (other.fixedPrice() != null && !other.fixedPrice().equals(this.fixedPrice())) { return false; } if (other.usagePrice() == null ^ this.usagePrice() == null) { return false; } if (other.usagePrice() != null && !other.usagePrice().equals(this.usagePrice())) { return false; } if (other.productDescription() == null ^ this.productDescription() == null) { return false; } if (other.productDescription() != null && !other.productDescription().equals(this.productDescription())) { return false; } if (other.offeringType() == null ^ this.offeringType() == null) { return false; } if (other.offeringType() != null && !other.offeringType().equals(this.offeringType())) { return false; } if (other.recurringCharges() == null ^ this.recurringCharges() == null) { return false; } if (other.recurringCharges() != null && !other.recurringCharges().equals(this.recurringCharges())) { return false; } return true; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (reservedCacheNodesOfferingId() != null) { sb.append("ReservedCacheNodesOfferingId: ").append(reservedCacheNodesOfferingId()).append(","); } if (cacheNodeType() != null) { sb.append("CacheNodeType: ").append(cacheNodeType()).append(","); } if (duration() != null) { sb.append("Duration: ").append(duration()).append(","); } if (fixedPrice() != null) { sb.append("FixedPrice: ").append(fixedPrice()).append(","); } if (usagePrice() != null) { sb.append("UsagePrice: ").append(usagePrice()).append(","); } if (productDescription() != null) { sb.append("ProductDescription: ").append(productDescription()).append(","); } if (offeringType() != null) { sb.append("OfferingType: ").append(offeringType()).append(","); } if (recurringCharges() != null) { sb.append("RecurringCharges: ").append(recurringCharges()).append(","); } sb.append("}"); return sb.toString(); } public interface Builder extends CopyableBuilder { /** *

* A unique identifier for the reserved cache node offering. *

* * @param reservedCacheNodesOfferingId * A unique identifier for the reserved cache node offering. * @return Returns a reference to this object so that method calls can be chained together. */ Builder reservedCacheNodesOfferingId(String reservedCacheNodesOfferingId); /** *

* The cache node type for the reserved cache node. *

*

* Valid node types are as follows: *

*
    *
  • *

    * General purpose: *

    *
      *
    • *

      * Current generation: cache.t2.micro, cache.t2.small, cache.t2.medium, * cache.m3.medium, cache.m3.large, cache.m3.xlarge, * cache.m3.2xlarge, cache.m4.large, cache.m4.xlarge, * cache.m4.2xlarge, cache.m4.4xlarge, cache.m4.10xlarge *

      *
    • *
    • *

      * Previous generation: cache.t1.micro, cache.m1.small, cache.m1.medium, * cache.m1.large, cache.m1.xlarge *

      *
    • *
    *
  • *
  • *

    * Compute optimized: cache.c1.xlarge *

    *
  • *
  • *

    * Memory optimized: *

    *
      *
    • *

      * Current generation: cache.r3.large, cache.r3.xlarge, cache.r3.2xlarge, * cache.r3.4xlarge, cache.r3.8xlarge *

      *
    • *
    • *

      * Previous generation: cache.m2.xlarge, cache.m2.2xlarge, * cache.m2.4xlarge *

      *
    • *
    *
  • *
*

* Notes: *

*
    *
  • *

    * All T2 instances are created in an Amazon Virtual Private Cloud (Amazon VPC). *

    *
  • *
  • *

    * Redis backup/restore is not supported for Redis (cluster mode disabled) T1 and T2 instances. Backup/restore * is supported on Redis (cluster mode enabled) T2 instances. *

    *
  • *
  • *

    * Redis Append-only files (AOF) functionality is not supported for T1 or T2 instances. *

    *
  • *
*

* For a complete listing of node types and specifications, see Amazon ElastiCache Product Features and Details and * either Cache Node Type-Specific Parameters for Memcached or Cache Node Type-Specific Parameters for Redis. *

* * @param cacheNodeType * The cache node type for the reserved cache node.

*

* Valid node types are as follows: *

*
    *
  • *

    * General purpose: *

    *
      *
    • *

      * Current generation: cache.t2.micro, cache.t2.small, * cache.t2.medium, cache.m3.medium, cache.m3.large, * cache.m3.xlarge, cache.m3.2xlarge, cache.m4.large, * cache.m4.xlarge, cache.m4.2xlarge, cache.m4.4xlarge, * cache.m4.10xlarge *

      *
    • *
    • *

      * Previous generation: cache.t1.micro, cache.m1.small, * cache.m1.medium, cache.m1.large, cache.m1.xlarge *

      *
    • *
    *
  • *
  • *

    * Compute optimized: cache.c1.xlarge *

    *
  • *
  • *

    * Memory optimized: *

    *
      *
    • *

      * Current generation: cache.r3.large, cache.r3.xlarge, * cache.r3.2xlarge, cache.r3.4xlarge, cache.r3.8xlarge *

      *
    • *
    • *

      * Previous generation: cache.m2.xlarge, cache.m2.2xlarge, * cache.m2.4xlarge *

      *
    • *
    *
  • *
*

* Notes: *

*
    *
  • *

    * All T2 instances are created in an Amazon Virtual Private Cloud (Amazon VPC). *

    *
  • *
  • *

    * Redis backup/restore is not supported for Redis (cluster mode disabled) T1 and T2 instances. * Backup/restore is supported on Redis (cluster mode enabled) T2 instances. *

    *
  • *
  • *

    * Redis Append-only files (AOF) functionality is not supported for T1 or T2 instances. *

    *
  • *
*

* For a complete listing of node types and specifications, see Amazon ElastiCache Product Features and Details * and either Cache Node Type-Specific Parameters for Memcached or Cache Node Type-Specific Parameters for Redis. * @return Returns a reference to this object so that method calls can be chained together. */ Builder cacheNodeType(String cacheNodeType); /** *

* The duration of the offering. in seconds. *

* * @param duration * The duration of the offering. in seconds. * @return Returns a reference to this object so that method calls can be chained together. */ Builder duration(Integer duration); /** *

* The fixed price charged for this offering. *

* * @param fixedPrice * The fixed price charged for this offering. * @return Returns a reference to this object so that method calls can be chained together. */ Builder fixedPrice(Double fixedPrice); /** *

* The hourly price charged for this offering. *

* * @param usagePrice * The hourly price charged for this offering. * @return Returns a reference to this object so that method calls can be chained together. */ Builder usagePrice(Double usagePrice); /** *

* The cache engine used by the offering. *

* * @param productDescription * The cache engine used by the offering. * @return Returns a reference to this object so that method calls can be chained together. */ Builder productDescription(String productDescription); /** *

* The offering type. *

* * @param offeringType * The offering type. * @return Returns a reference to this object so that method calls can be chained together. */ Builder offeringType(String offeringType); /** *

* The recurring price charged to run this reserved cache node. *

* * @param recurringCharges * The recurring price charged to run this reserved cache node. * @return Returns a reference to this object so that method calls can be chained together. */ Builder recurringCharges(Collection recurringCharges); /** *

* The recurring price charged to run this reserved cache node. *

* * @param recurringCharges * The recurring price charged to run this reserved cache node. * @return Returns a reference to this object so that method calls can be chained together. */ Builder recurringCharges(RecurringCharge... recurringCharges); } private static final class BuilderImpl implements Builder { private String reservedCacheNodesOfferingId; private String cacheNodeType; private Integer duration; private Double fixedPrice; private Double usagePrice; private String productDescription; private String offeringType; private List recurringCharges; private BuilderImpl() { } private BuilderImpl(ReservedCacheNodesOffering model) { setReservedCacheNodesOfferingId(model.reservedCacheNodesOfferingId); setCacheNodeType(model.cacheNodeType); setDuration(model.duration); setFixedPrice(model.fixedPrice); setUsagePrice(model.usagePrice); setProductDescription(model.productDescription); setOfferingType(model.offeringType); setRecurringCharges(model.recurringCharges); } public final String getReservedCacheNodesOfferingId() { return reservedCacheNodesOfferingId; } @Override public final Builder reservedCacheNodesOfferingId(String reservedCacheNodesOfferingId) { this.reservedCacheNodesOfferingId = reservedCacheNodesOfferingId; return this; } public final void setReservedCacheNodesOfferingId(String reservedCacheNodesOfferingId) { this.reservedCacheNodesOfferingId = reservedCacheNodesOfferingId; } public final String getCacheNodeType() { return cacheNodeType; } @Override public final Builder cacheNodeType(String cacheNodeType) { this.cacheNodeType = cacheNodeType; return this; } public final void setCacheNodeType(String cacheNodeType) { this.cacheNodeType = cacheNodeType; } public final Integer getDuration() { return duration; } @Override public final Builder duration(Integer duration) { this.duration = duration; return this; } public final void setDuration(Integer duration) { this.duration = duration; } public final Double getFixedPrice() { return fixedPrice; } @Override public final Builder fixedPrice(Double fixedPrice) { this.fixedPrice = fixedPrice; return this; } public final void setFixedPrice(Double fixedPrice) { this.fixedPrice = fixedPrice; } public final Double getUsagePrice() { return usagePrice; } @Override public final Builder usagePrice(Double usagePrice) { this.usagePrice = usagePrice; return this; } public final void setUsagePrice(Double usagePrice) { this.usagePrice = usagePrice; } public final String getProductDescription() { return productDescription; } @Override public final Builder productDescription(String productDescription) { this.productDescription = productDescription; return this; } public final void setProductDescription(String productDescription) { this.productDescription = productDescription; } public final String getOfferingType() { return offeringType; } @Override public final Builder offeringType(String offeringType) { this.offeringType = offeringType; return this; } public final void setOfferingType(String offeringType) { this.offeringType = offeringType; } public final Collection getRecurringCharges() { return recurringCharges; } @Override public final Builder recurringCharges(Collection recurringCharges) { this.recurringCharges = RecurringChargeListCopier.copy(recurringCharges); return this; } @Override @SafeVarargs public final Builder recurringCharges(RecurringCharge... recurringCharges) { recurringCharges(Arrays.asList(recurringCharges)); return this; } public final void setRecurringCharges(Collection recurringCharges) { this.recurringCharges = RecurringChargeListCopier.copy(recurringCharges); } @Override public ReservedCacheNodesOffering build() { return new ReservedCacheNodesOffering(this); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy