@Generated(value="software.amazon.awssdk:codegen") public final class Purchase extends Object implements SdkPojo, Serializable, ToCopyableBuilder<Purchase.Builder,Purchase>
Describes the result of the purchase.
Modifier and Type | Class and Description |
---|---|
static interface |
Purchase.Builder |
Modifier and Type | Method and Description |
---|---|
static Purchase.Builder |
builder() |
CurrencyCodeValues |
currencyCode()
The currency in which the
UpfrontPrice and HourlyPrice amounts are specified. |
String |
currencyCodeAsString()
The currency in which the
UpfrontPrice and HourlyPrice amounts are specified. |
Integer |
duration()
The duration of the reservation's term in seconds.
|
boolean |
equals(Object obj) |
boolean |
equalsBySdkFields(Object obj) |
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
int |
hashCode() |
boolean |
hasHostIdSet()
Returns true if the HostIdSet property was specified by the sender (it may be empty), or false if the sender did
not specify the value (it will be empty).
|
List<String> |
hostIdSet()
The IDs of the Dedicated Hosts associated with the reservation.
|
String |
hostReservationId()
The ID of the reservation.
|
String |
hourlyPrice()
The hourly price of the reservation per hour.
|
String |
instanceFamily()
The instance family on the Dedicated Host that the reservation can be associated with.
|
PaymentOption |
paymentOption()
The payment option for the reservation.
|
String |
paymentOptionAsString()
The payment option for the reservation.
|
List<SdkField<?>> |
sdkFields() |
static Class<? extends Purchase.Builder> |
serializableBuilderClass() |
Purchase.Builder |
toBuilder() |
String |
toString()
Returns a string representation of this object.
|
String |
upfrontPrice()
The upfront price of the reservation.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
copy
public CurrencyCodeValues currencyCode()
The currency in which the UpfrontPrice
and HourlyPrice
amounts are specified. At this
time, the only supported currency is USD
.
If the service returns an enum value that is not available in the current SDK version, currencyCode
will
return CurrencyCodeValues.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available from
currencyCodeAsString()
.
UpfrontPrice
and HourlyPrice
amounts are specified.
At this time, the only supported currency is USD
.CurrencyCodeValues
public String currencyCodeAsString()
The currency in which the UpfrontPrice
and HourlyPrice
amounts are specified. At this
time, the only supported currency is USD
.
If the service returns an enum value that is not available in the current SDK version, currencyCode
will
return CurrencyCodeValues.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available from
currencyCodeAsString()
.
UpfrontPrice
and HourlyPrice
amounts are specified.
At this time, the only supported currency is USD
.CurrencyCodeValues
public Integer duration()
The duration of the reservation's term in seconds.
public boolean hasHostIdSet()
public List<String> hostIdSet()
The IDs of the Dedicated Hosts associated with the reservation.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
You can use hasHostIdSet()
to see if a value was sent in this field.
public String hostReservationId()
The ID of the reservation.
public String hourlyPrice()
The hourly price of the reservation per hour.
public String instanceFamily()
The instance family on the Dedicated Host that the reservation can be associated with.
public PaymentOption paymentOption()
The payment option for the reservation.
If the service returns an enum value that is not available in the current SDK version, paymentOption
will return PaymentOption.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available from
paymentOptionAsString()
.
PaymentOption
public String paymentOptionAsString()
The payment option for the reservation.
If the service returns an enum value that is not available in the current SDK version, paymentOption
will return PaymentOption.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available from
paymentOptionAsString()
.
PaymentOption
public String upfrontPrice()
The upfront price of the reservation.
public Purchase.Builder toBuilder()
toBuilder
in interface ToCopyableBuilder<Purchase.Builder,Purchase>
public static Purchase.Builder builder()
public static Class<? extends Purchase.Builder> serializableBuilderClass()
public boolean equalsBySdkFields(Object obj)
equalsBySdkFields
in interface SdkPojo
public String toString()
Copyright © 2020. All rights reserved.