@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class UsageRecord extends Object implements Serializable, Cloneable, StructuredPojo
A UsageRecord indicates a quantity of usage for a given product, customer, dimension and time.
Multiple requests with the same UsageRecords as input will be deduplicated to prevent double charges.
| Constructor and Description |
|---|
UsageRecord() |
| Modifier and Type | Method and Description |
|---|---|
UsageRecord |
clone() |
boolean |
equals(Object obj) |
String |
getCustomerIdentifier()
The CustomerIdentifier is obtained through the ResolveCustomer operation and represents an individual buyer in
your application.
|
String |
getDimension()
During the process of registering a product on AWS Marketplace, up to eight dimensions are specified.
|
Integer |
getQuantity()
The quantity of usage consumed by the customer for the given dimension and time.
|
Date |
getTimestamp()
Timestamp, in UTC, for which the usage is being reported.
|
List<UsageAllocation> |
getUsageAllocations()
The set of UsageAllocations to submit.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller) |
void |
setCustomerIdentifier(String customerIdentifier)
The CustomerIdentifier is obtained through the ResolveCustomer operation and represents an individual buyer in
your application.
|
void |
setDimension(String dimension)
During the process of registering a product on AWS Marketplace, up to eight dimensions are specified.
|
void |
setQuantity(Integer quantity)
The quantity of usage consumed by the customer for the given dimension and time.
|
void |
setTimestamp(Date timestamp)
Timestamp, in UTC, for which the usage is being reported.
|
void |
setUsageAllocations(Collection<UsageAllocation> usageAllocations)
The set of UsageAllocations to submit.
|
String |
toString()
Returns a string representation of this object.
|
UsageRecord |
withCustomerIdentifier(String customerIdentifier)
The CustomerIdentifier is obtained through the ResolveCustomer operation and represents an individual buyer in
your application.
|
UsageRecord |
withDimension(String dimension)
During the process of registering a product on AWS Marketplace, up to eight dimensions are specified.
|
UsageRecord |
withQuantity(Integer quantity)
The quantity of usage consumed by the customer for the given dimension and time.
|
UsageRecord |
withTimestamp(Date timestamp)
Timestamp, in UTC, for which the usage is being reported.
|
UsageRecord |
withUsageAllocations(Collection<UsageAllocation> usageAllocations)
The set of UsageAllocations to submit.
|
UsageRecord |
withUsageAllocations(UsageAllocation... usageAllocations)
The set of UsageAllocations to submit.
|
public void setTimestamp(Date timestamp)
Timestamp, in UTC, for which the usage is being reported.
Your application can meter usage for up to one hour in the past. Make sure the timestamp value is not before the start of the software usage.
timestamp - Timestamp, in UTC, for which the usage is being reported.
Your application can meter usage for up to one hour in the past. Make sure the timestamp value is not before the start of the software usage.
public Date getTimestamp()
Timestamp, in UTC, for which the usage is being reported.
Your application can meter usage for up to one hour in the past. Make sure the timestamp value is not before the start of the software usage.
Your application can meter usage for up to one hour in the past. Make sure the timestamp value is not before the start of the software usage.
public UsageRecord withTimestamp(Date timestamp)
Timestamp, in UTC, for which the usage is being reported.
Your application can meter usage for up to one hour in the past. Make sure the timestamp value is not before the start of the software usage.
timestamp - Timestamp, in UTC, for which the usage is being reported.
Your application can meter usage for up to one hour in the past. Make sure the timestamp value is not before the start of the software usage.
public void setCustomerIdentifier(String customerIdentifier)
The CustomerIdentifier is obtained through the ResolveCustomer operation and represents an individual buyer in your application.
customerIdentifier - The CustomerIdentifier is obtained through the ResolveCustomer operation and represents an individual
buyer in your application.public String getCustomerIdentifier()
The CustomerIdentifier is obtained through the ResolveCustomer operation and represents an individual buyer in your application.
public UsageRecord withCustomerIdentifier(String customerIdentifier)
The CustomerIdentifier is obtained through the ResolveCustomer operation and represents an individual buyer in your application.
customerIdentifier - The CustomerIdentifier is obtained through the ResolveCustomer operation and represents an individual
buyer in your application.public void setDimension(String dimension)
During the process of registering a product on AWS Marketplace, up to eight dimensions are specified. These represent different units of value in your application.
dimension - During the process of registering a product on AWS Marketplace, up to eight dimensions are specified.
These represent different units of value in your application.public String getDimension()
During the process of registering a product on AWS Marketplace, up to eight dimensions are specified. These represent different units of value in your application.
public UsageRecord withDimension(String dimension)
During the process of registering a product on AWS Marketplace, up to eight dimensions are specified. These represent different units of value in your application.
dimension - During the process of registering a product on AWS Marketplace, up to eight dimensions are specified.
These represent different units of value in your application.public void setQuantity(Integer quantity)
The quantity of usage consumed by the customer for the given dimension and time. Defaults to 0 if
not specified.
quantity - The quantity of usage consumed by the customer for the given dimension and time. Defaults to
0 if not specified.public Integer getQuantity()
The quantity of usage consumed by the customer for the given dimension and time. Defaults to 0 if
not specified.
0 if not specified.public UsageRecord withQuantity(Integer quantity)
The quantity of usage consumed by the customer for the given dimension and time. Defaults to 0 if
not specified.
quantity - The quantity of usage consumed by the customer for the given dimension and time. Defaults to
0 if not specified.public List<UsageAllocation> getUsageAllocations()
The set of UsageAllocations to submit. The sum of all UsageAllocation quantities must equal the Quantity of the UsageRecord.
public void setUsageAllocations(Collection<UsageAllocation> usageAllocations)
The set of UsageAllocations to submit. The sum of all UsageAllocation quantities must equal the Quantity of the UsageRecord.
usageAllocations - The set of UsageAllocations to submit. The sum of all UsageAllocation quantities must equal the Quantity
of the UsageRecord.public UsageRecord withUsageAllocations(UsageAllocation... usageAllocations)
The set of UsageAllocations to submit. The sum of all UsageAllocation quantities must equal the Quantity of the UsageRecord.
NOTE: This method appends the values to the existing list (if any). Use
setUsageAllocations(java.util.Collection) or withUsageAllocations(java.util.Collection) if you
want to override the existing values.
usageAllocations - The set of UsageAllocations to submit. The sum of all UsageAllocation quantities must equal the Quantity
of the UsageRecord.public UsageRecord withUsageAllocations(Collection<UsageAllocation> usageAllocations)
The set of UsageAllocations to submit. The sum of all UsageAllocation quantities must equal the Quantity of the UsageRecord.
usageAllocations - The set of UsageAllocations to submit. The sum of all UsageAllocation quantities must equal the Quantity
of the UsageRecord.public String toString()
toString in class ObjectObject.toString()public UsageRecord clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
marshall in interface StructuredPojoCopyright © 2021. All rights reserved.