Interface UsageRecord.Builder
-
- All Superinterfaces:
Buildable,CopyableBuilder<UsageRecord.Builder,UsageRecord>,SdkBuilder<UsageRecord.Builder,UsageRecord>,SdkPojo
- Enclosing class:
- UsageRecord
public static interface UsageRecord.Builder extends SdkPojo, CopyableBuilder<UsageRecord.Builder,UsageRecord>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description UsageRecord.BuildercustomerIdentifier(String customerIdentifier)TheCustomerIdentifieris obtained through theResolveCustomeroperation and represents an individual buyer in your application.UsageRecord.Builderdimension(String dimension)During the process of registering a product on AWS Marketplace, dimensions are specified.UsageRecord.Builderquantity(Integer quantity)The quantity of usage consumed by the customer for the given dimension and time.UsageRecord.Buildertimestamp(Instant timestamp)Timestamp, in UTC, for which the usage is being reported.UsageRecord.BuilderusageAllocations(Collection<UsageAllocation> usageAllocations)The set ofUsageAllocationsto submit.UsageRecord.BuilderusageAllocations(Consumer<UsageAllocation.Builder>... usageAllocations)The set ofUsageAllocationsto submit.UsageRecord.BuilderusageAllocations(UsageAllocation... usageAllocations)The set ofUsageAllocationsto submit.-
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
-
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
-
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFields
-
-
-
-
Method Detail
-
timestamp
UsageRecord.Builder timestamp(Instant 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
timestampvalue is not before the start of the software usage.- Parameters:
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
timestampvalue is not before the start of the software usage.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
customerIdentifier
UsageRecord.Builder customerIdentifier(String customerIdentifier)
The
CustomerIdentifieris obtained through theResolveCustomeroperation and represents an individual buyer in your application.- Parameters:
customerIdentifier- TheCustomerIdentifieris obtained through theResolveCustomeroperation and represents an individual buyer in your application.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
dimension
UsageRecord.Builder dimension(String dimension)
During the process of registering a product on AWS Marketplace, dimensions are specified. These represent different units of value in your application.
- Parameters:
dimension- During the process of registering a product on AWS Marketplace, dimensions are specified. These represent different units of value in your application.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
quantity
UsageRecord.Builder quantity(Integer quantity)
The quantity of usage consumed by the customer for the given dimension and time. Defaults to
0if not specified.- Parameters:
quantity- The quantity of usage consumed by the customer for the given dimension and time. Defaults to0if not specified.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
usageAllocations
UsageRecord.Builder usageAllocations(Collection<UsageAllocation> usageAllocations)
The set of
UsageAllocationsto submit. The sum of allUsageAllocationquantities must equal the Quantity of theUsageRecord.- Parameters:
usageAllocations- The set ofUsageAllocationsto submit. The sum of allUsageAllocationquantities must equal the Quantity of theUsageRecord.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
usageAllocations
UsageRecord.Builder usageAllocations(UsageAllocation... usageAllocations)
The set of
UsageAllocationsto submit. The sum of allUsageAllocationquantities must equal the Quantity of theUsageRecord.- Parameters:
usageAllocations- The set ofUsageAllocationsto submit. The sum of allUsageAllocationquantities must equal the Quantity of theUsageRecord.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
usageAllocations
UsageRecord.Builder usageAllocations(Consumer<UsageAllocation.Builder>... usageAllocations)
The set of
This is a convenience method that creates an instance of theUsageAllocationsto submit. The sum of allUsageAllocationquantities must equal the Quantity of theUsageRecord.UsageAllocation.Builderavoiding the need to create one manually viaUsageAllocation.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed to#usageAllocations(List.) - Parameters:
usageAllocations- a consumer that will call methods onUsageAllocation.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
#usageAllocations(java.util.Collection)
-
-