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

com.amazonaws.services.memorydb.model.ReservedNode Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon MemoryDB module holds the client classes that are used for communicating with Amazon MemoryDB 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.memorydb.model;

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

/**
 * 

* Represents the output of a PurchaseReservedNodesOffering operation. *

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

* A customer-specified identifier to track this reservation. *

*/ private String reservationId; /** *

* The ID of the reserved node offering to purchase. *

*/ private String reservedNodesOfferingId; /** *

* The node type for the reserved nodes. *

*/ private String nodeType; /** *

* The time the reservation started. *

*/ private java.util.Date startTime; /** *

* The duration of the reservation in seconds. *

*/ private Integer duration; /** *

* The fixed price charged for this reserved node. *

*/ private Double fixedPrice; /** *

* The number of nodes that have been reserved. *

*/ private Integer nodeCount; /** *

* The offering type of this reserved node. *

*/ private String offeringType; /** *

* The state of the reserved node. *

*/ private String state; /** *

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

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

* The Amazon Resource Name (ARN) of the reserved node. *

*/ private String aRN; /** *

* A customer-specified identifier to track this reservation. *

* * @param reservationId * A customer-specified identifier to track this reservation. */ public void setReservationId(String reservationId) { this.reservationId = reservationId; } /** *

* A customer-specified identifier to track this reservation. *

* * @return A customer-specified identifier to track this reservation. */ public String getReservationId() { return this.reservationId; } /** *

* A customer-specified identifier to track this reservation. *

* * @param reservationId * A customer-specified identifier to track this reservation. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedNode withReservationId(String reservationId) { setReservationId(reservationId); return this; } /** *

* The ID of the reserved node offering to purchase. *

* * @param reservedNodesOfferingId * The ID of the reserved node offering to purchase. */ public void setReservedNodesOfferingId(String reservedNodesOfferingId) { this.reservedNodesOfferingId = reservedNodesOfferingId; } /** *

* The ID of the reserved node offering to purchase. *

* * @return The ID of the reserved node offering to purchase. */ public String getReservedNodesOfferingId() { return this.reservedNodesOfferingId; } /** *

* The ID of the reserved node offering to purchase. *

* * @param reservedNodesOfferingId * The ID of the reserved node offering to purchase. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedNode withReservedNodesOfferingId(String reservedNodesOfferingId) { setReservedNodesOfferingId(reservedNodesOfferingId); return this; } /** *

* The node type for the reserved nodes. *

* * @param nodeType * The node type for the reserved nodes. */ public void setNodeType(String nodeType) { this.nodeType = nodeType; } /** *

* The node type for the reserved nodes. *

* * @return The node type for the reserved nodes. */ public String getNodeType() { return this.nodeType; } /** *

* The node type for the reserved nodes. *

* * @param nodeType * The node type for the reserved nodes. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedNode withNodeType(String nodeType) { setNodeType(nodeType); return this; } /** *

* The time the reservation started. *

* * @param startTime * The time the reservation started. */ public void setStartTime(java.util.Date startTime) { this.startTime = startTime; } /** *

* The time the reservation started. *

* * @return The time the reservation started. */ public java.util.Date getStartTime() { return this.startTime; } /** *

* The time the reservation started. *

* * @param startTime * The time the reservation started. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedNode withStartTime(java.util.Date startTime) { setStartTime(startTime); return this; } /** *

* The duration of the reservation in seconds. *

* * @param duration * The duration of the reservation in seconds. */ public void setDuration(Integer duration) { this.duration = duration; } /** *

* The duration of the reservation in seconds. *

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

* The duration of the reservation in seconds. *

* * @param duration * The duration of the reservation in seconds. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedNode withDuration(Integer duration) { setDuration(duration); return this; } /** *

* The fixed price charged for this reserved node. *

* * @param fixedPrice * The fixed price charged for this reserved node. */ public void setFixedPrice(Double fixedPrice) { this.fixedPrice = fixedPrice; } /** *

* The fixed price charged for this reserved node. *

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

* The fixed price charged for this reserved node. *

* * @param fixedPrice * The fixed price charged for this reserved node. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedNode withFixedPrice(Double fixedPrice) { setFixedPrice(fixedPrice); return this; } /** *

* The number of nodes that have been reserved. *

* * @param nodeCount * The number of nodes that have been reserved. */ public void setNodeCount(Integer nodeCount) { this.nodeCount = nodeCount; } /** *

* The number of nodes that have been reserved. *

* * @return The number of nodes that have been reserved. */ public Integer getNodeCount() { return this.nodeCount; } /** *

* The number of nodes that have been reserved. *

* * @param nodeCount * The number of nodes that have been reserved. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedNode withNodeCount(Integer nodeCount) { setNodeCount(nodeCount); return this; } /** *

* The offering type of this reserved node. *

* * @param offeringType * The offering type of this reserved node. */ public void setOfferingType(String offeringType) { this.offeringType = offeringType; } /** *

* The offering type of this reserved node. *

* * @return The offering type of this reserved node. */ public String getOfferingType() { return this.offeringType; } /** *

* The offering type of this reserved node. *

* * @param offeringType * The offering type of this reserved node. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedNode withOfferingType(String offeringType) { setOfferingType(offeringType); return this; } /** *

* The state of the reserved node. *

* * @param state * The state of the reserved node. */ public void setState(String state) { this.state = state; } /** *

* The state of the reserved node. *

* * @return The state of the reserved node. */ public String getState() { return this.state; } /** *

* The state of the reserved node. *

* * @param state * The state of the reserved node. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedNode withState(String state) { setState(state); return this; } /** *

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

* * @return The recurring price charged to run this reserved node. */ public java.util.List getRecurringCharges() { return recurringCharges; } /** *

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

* * @param recurringCharges * The recurring price charged to run this reserved node. */ public void setRecurringCharges(java.util.Collection recurringCharges) { if (recurringCharges == null) { this.recurringCharges = null; return; } this.recurringCharges = new java.util.ArrayList(recurringCharges); } /** *

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

*

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

* * @param recurringCharges * The recurring price charged to run this reserved node. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedNode withRecurringCharges(RecurringCharge... recurringCharges) { if (this.recurringCharges == null) { setRecurringCharges(new java.util.ArrayList(recurringCharges.length)); } for (RecurringCharge ele : recurringCharges) { this.recurringCharges.add(ele); } return this; } /** *

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

* * @param recurringCharges * The recurring price charged to run this reserved node. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedNode withRecurringCharges(java.util.Collection recurringCharges) { setRecurringCharges(recurringCharges); return this; } /** *

* The Amazon Resource Name (ARN) of the reserved node. *

* * @param aRN * The Amazon Resource Name (ARN) of the reserved node. */ public void setARN(String aRN) { this.aRN = aRN; } /** *

* The Amazon Resource Name (ARN) of the reserved node. *

* * @return The Amazon Resource Name (ARN) of the reserved node. */ public String getARN() { return this.aRN; } /** *

* The Amazon Resource Name (ARN) of the reserved node. *

* * @param aRN * The Amazon Resource Name (ARN) of the reserved node. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservedNode withARN(String aRN) { setARN(aRN); 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 (getReservationId() != null) sb.append("ReservationId: ").append(getReservationId()).append(","); if (getReservedNodesOfferingId() != null) sb.append("ReservedNodesOfferingId: ").append(getReservedNodesOfferingId()).append(","); if (getNodeType() != null) sb.append("NodeType: ").append(getNodeType()).append(","); if (getStartTime() != null) sb.append("StartTime: ").append(getStartTime()).append(","); if (getDuration() != null) sb.append("Duration: ").append(getDuration()).append(","); if (getFixedPrice() != null) sb.append("FixedPrice: ").append(getFixedPrice()).append(","); if (getNodeCount() != null) sb.append("NodeCount: ").append(getNodeCount()).append(","); if (getOfferingType() != null) sb.append("OfferingType: ").append(getOfferingType()).append(","); if (getState() != null) sb.append("State: ").append(getState()).append(","); if (getRecurringCharges() != null) sb.append("RecurringCharges: ").append(getRecurringCharges()).append(","); if (getARN() != null) sb.append("ARN: ").append(getARN()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ReservedNode == false) return false; ReservedNode other = (ReservedNode) obj; if (other.getReservationId() == null ^ this.getReservationId() == null) return false; if (other.getReservationId() != null && other.getReservationId().equals(this.getReservationId()) == false) return false; if (other.getReservedNodesOfferingId() == null ^ this.getReservedNodesOfferingId() == null) return false; if (other.getReservedNodesOfferingId() != null && other.getReservedNodesOfferingId().equals(this.getReservedNodesOfferingId()) == false) return false; if (other.getNodeType() == null ^ this.getNodeType() == null) return false; if (other.getNodeType() != null && other.getNodeType().equals(this.getNodeType()) == false) return false; if (other.getStartTime() == null ^ this.getStartTime() == null) return false; if (other.getStartTime() != null && other.getStartTime().equals(this.getStartTime()) == false) return false; if (other.getDuration() == null ^ this.getDuration() == null) return false; if (other.getDuration() != null && other.getDuration().equals(this.getDuration()) == false) return false; if (other.getFixedPrice() == null ^ this.getFixedPrice() == null) return false; if (other.getFixedPrice() != null && other.getFixedPrice().equals(this.getFixedPrice()) == false) return false; if (other.getNodeCount() == null ^ this.getNodeCount() == null) return false; if (other.getNodeCount() != null && other.getNodeCount().equals(this.getNodeCount()) == false) return false; if (other.getOfferingType() == null ^ this.getOfferingType() == null) return false; if (other.getOfferingType() != null && other.getOfferingType().equals(this.getOfferingType()) == false) return false; if (other.getState() == null ^ this.getState() == null) return false; if (other.getState() != null && other.getState().equals(this.getState()) == false) return false; if (other.getRecurringCharges() == null ^ this.getRecurringCharges() == null) return false; if (other.getRecurringCharges() != null && other.getRecurringCharges().equals(this.getRecurringCharges()) == false) return false; if (other.getARN() == null ^ this.getARN() == null) return false; if (other.getARN() != null && other.getARN().equals(this.getARN()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getReservationId() == null) ? 0 : getReservationId().hashCode()); hashCode = prime * hashCode + ((getReservedNodesOfferingId() == null) ? 0 : getReservedNodesOfferingId().hashCode()); hashCode = prime * hashCode + ((getNodeType() == null) ? 0 : getNodeType().hashCode()); hashCode = prime * hashCode + ((getStartTime() == null) ? 0 : getStartTime().hashCode()); hashCode = prime * hashCode + ((getDuration() == null) ? 0 : getDuration().hashCode()); hashCode = prime * hashCode + ((getFixedPrice() == null) ? 0 : getFixedPrice().hashCode()); hashCode = prime * hashCode + ((getNodeCount() == null) ? 0 : getNodeCount().hashCode()); hashCode = prime * hashCode + ((getOfferingType() == null) ? 0 : getOfferingType().hashCode()); hashCode = prime * hashCode + ((getState() == null) ? 0 : getState().hashCode()); hashCode = prime * hashCode + ((getRecurringCharges() == null) ? 0 : getRecurringCharges().hashCode()); hashCode = prime * hashCode + ((getARN() == null) ? 0 : getARN().hashCode()); return hashCode; } @Override public ReservedNode clone() { try { return (ReservedNode) 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.memorydb.model.transform.ReservedNodeMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy