@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getHourlyPrice() == null) ? 0 : getHourlyPrice().hashCode()); hashCode = prime * hashCode + ((getRemainingTotalValue() == null) ? 0 : getRemainingTotalValue().hashCode()); hashCode = prime * hashCode + ((getRemainingUpfrontValue() == null) ? 0 : getRemainingUpfrontValue().hashCode()); return hashCode; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getReservationValue() == null) ? 0 : getReservationValue().hashCode()); hashCode = prime * hashCode + ((getReservedInstanceId() == null) ? 0 : getReservedInstanceId().hashCode()); return hashCode; }
/** * <p> * The hourly rate of the reservation. * </p> * * @param hourlyPrice * The hourly rate of the reservation. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservationValue withHourlyPrice(String hourlyPrice) { setHourlyPrice(hourlyPrice); return this; }
public ReservationValue unmarshall(StaxUnmarshallerContext context) throws Exception { ReservationValue reservationValue = new ReservationValue(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return reservationValue; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("hourlyPrice", targetDepth)) { reservationValue.setHourlyPrice(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("remainingTotalValue", targetDepth)) { reservationValue.setRemainingTotalValue(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("remainingUpfrontValue", targetDepth)) { reservationValue.setRemainingUpfrontValue(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return reservationValue; } } } }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ReservedInstanceReservationValue == false) return false; ReservedInstanceReservationValue other = (ReservedInstanceReservationValue) obj; if (other.getReservationValue() == null ^ this.getReservationValue() == null) return false; if (other.getReservationValue() != null && other.getReservationValue().equals(this.getReservationValue()) == false) return false; if (other.getReservedInstanceId() == null ^ this.getReservedInstanceId() == null) return false; if (other.getReservedInstanceId() != null && other.getReservedInstanceId().equals(this.getReservedInstanceId()) == false) return false; return true; }
/** * <p> * The remaining upfront cost of the reservation. * </p> * * @param remainingUpfrontValue * The remaining upfront cost of the reservation. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservationValue withRemainingUpfrontValue(String remainingUpfrontValue) { setRemainingUpfrontValue(remainingUpfrontValue); return this; }
/** * <p> * The balance of the total value (the sum of remainingUpfrontValue + hourlyPrice * number of hours remaining). * </p> * * @param remainingTotalValue * The balance of the total value (the sum of remainingUpfrontValue + hourlyPrice * number of hours * remaining). * @return Returns a reference to this object so that method calls can be chained together. */ public ReservationValue withRemainingTotalValue(String remainingTotalValue) { setRemainingTotalValue(remainingTotalValue); return this; }
public ReservationValue unmarshall(StaxUnmarshallerContext context) throws Exception { ReservationValue reservationValue = new ReservationValue(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; if (context.isStartOfDocument()) targetDepth += 1; while (true) { XMLEvent xmlEvent = context.nextEvent(); if (xmlEvent.isEndDocument()) return reservationValue; if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) { if (context.testExpression("hourlyPrice", targetDepth)) { reservationValue.setHourlyPrice(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("remainingTotalValue", targetDepth)) { reservationValue.setRemainingTotalValue(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } if (context.testExpression("remainingUpfrontValue", targetDepth)) { reservationValue.setRemainingUpfrontValue(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; } } else if (xmlEvent.isEndElement()) { if (context.getCurrentDepth() < originalDepth) { return reservationValue; } } } }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof TargetReservationValue == false) return false; TargetReservationValue other = (TargetReservationValue) obj; if (other.getReservationValue() == null ^ this.getReservationValue() == null) return false; if (other.getReservationValue() != null && other.getReservationValue().equals(this.getReservationValue()) == false) return false; if (other.getTargetConfiguration() == null ^ this.getTargetConfiguration() == null) return false; if (other.getTargetConfiguration() != null && other.getTargetConfiguration().equals(this.getTargetConfiguration()) == false) return false; return true; }
/** * <p> * The remaining upfront cost of the reservation. * </p> * * @param remainingUpfrontValue * The remaining upfront cost of the reservation. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservationValue withRemainingUpfrontValue(String remainingUpfrontValue) { setRemainingUpfrontValue(remainingUpfrontValue); return this; }
/** * <p> * The balance of the total value (the sum of remainingUpfrontValue + hourlyPrice * number of hours remaining). * </p> * * @param remainingTotalValue * The balance of the total value (the sum of remainingUpfrontValue + hourlyPrice * number of hours * remaining). * @return Returns a reference to this object so that method calls can be chained together. */ public ReservationValue withRemainingTotalValue(String remainingTotalValue) { setRemainingTotalValue(remainingTotalValue); return this; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ReservationValue == false) return false; ReservationValue other = (ReservationValue) obj; if (other.getHourlyPrice() == null ^ this.getHourlyPrice() == null) return false; if (other.getHourlyPrice() != null && other.getHourlyPrice().equals(this.getHourlyPrice()) == false) return false; if (other.getRemainingTotalValue() == null ^ this.getRemainingTotalValue() == null) return false; if (other.getRemainingTotalValue() != null && other.getRemainingTotalValue().equals(this.getRemainingTotalValue()) == false) return false; if (other.getRemainingUpfrontValue() == null ^ this.getRemainingUpfrontValue() == null) return false; if (other.getRemainingUpfrontValue() != null && other.getRemainingUpfrontValue().equals(this.getRemainingUpfrontValue()) == false) return false; return true; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCurrencyCode() == null) ? 0 : getCurrencyCode().hashCode()); hashCode = prime * hashCode + ((getIsValidExchange() == null) ? 0 : getIsValidExchange().hashCode()); hashCode = prime * hashCode + ((getOutputReservedInstancesWillExpireAt() == null) ? 0 : getOutputReservedInstancesWillExpireAt().hashCode()); hashCode = prime * hashCode + ((getPaymentDue() == null) ? 0 : getPaymentDue().hashCode()); hashCode = prime * hashCode + ((getReservedInstanceValueRollup() == null) ? 0 : getReservedInstanceValueRollup().hashCode()); hashCode = prime * hashCode + ((getReservedInstanceValueSet() == null) ? 0 : getReservedInstanceValueSet().hashCode()); hashCode = prime * hashCode + ((getTargetConfigurationValueRollup() == null) ? 0 : getTargetConfigurationValueRollup().hashCode()); hashCode = prime * hashCode + ((getTargetConfigurationValueSet() == null) ? 0 : getTargetConfigurationValueSet().hashCode()); hashCode = prime * hashCode + ((getValidationFailureReason() == null) ? 0 : getValidationFailureReason().hashCode()); return hashCode; }
if (other.getReservedInstanceValueRollup() == null ^ this.getReservedInstanceValueRollup() == null) return false; if (other.getReservedInstanceValueRollup() != null && other.getReservedInstanceValueRollup().equals(this.getReservedInstanceValueRollup()) == false) return false; if (other.getReservedInstanceValueSet() == null ^ this.getReservedInstanceValueSet() == null) return false; if (other.getTargetConfigurationValueRollup() != null && other.getTargetConfigurationValueRollup().equals(this.getTargetConfigurationValueRollup()) == false) return false; if (other.getTargetConfigurationValueSet() == null ^ this.getTargetConfigurationValueSet() == null)
/** * <p> * The hourly rate of the reservation. * </p> * * @param hourlyPrice * The hourly rate of the reservation. * @return Returns a reference to this object so that method calls can be chained together. */ public ReservationValue withHourlyPrice(String hourlyPrice) { setHourlyPrice(hourlyPrice); 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 (getHourlyPrice() != null) sb.append("HourlyPrice: ").append(getHourlyPrice()).append(","); if (getRemainingTotalValue() != null) sb.append("RemainingTotalValue: ").append(getRemainingTotalValue()).append(","); if (getRemainingUpfrontValue() != null) sb.append("RemainingUpfrontValue: ").append(getRemainingUpfrontValue()); sb.append("}"); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getReservationValue() == null) ? 0 : getReservationValue().hashCode()); hashCode = prime * hashCode + ((getTargetConfiguration() == null) ? 0 : getTargetConfiguration().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ReservedInstanceReservationValue == false) return false; ReservedInstanceReservationValue other = (ReservedInstanceReservationValue) obj; if (other.getReservationValue() == null ^ this.getReservationValue() == null) return false; if (other.getReservationValue() != null && other.getReservationValue().equals(this.getReservationValue()) == false) return false; if (other.getReservedInstanceId() == null ^ this.getReservedInstanceId() == null) return false; if (other.getReservedInstanceId() != null && other.getReservedInstanceId().equals(this.getReservedInstanceId()) == false) return false; return true; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getHourlyPrice() == null) ? 0 : getHourlyPrice().hashCode()); hashCode = prime * hashCode + ((getRemainingTotalValue() == null) ? 0 : getRemainingTotalValue().hashCode()); hashCode = prime * hashCode + ((getRemainingUpfrontValue() == null) ? 0 : getRemainingUpfrontValue().hashCode()); return hashCode; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getReservationValue() == null) ? 0 : getReservationValue().hashCode()); hashCode = prime * hashCode + ((getReservedInstanceId() == null) ? 0 : getReservedInstanceId().hashCode()); return hashCode; }