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 Details

    • 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 timestamp value 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 timestamp value 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 CustomerIdentifier is obtained through the ResolveCustomer operation and represents an individual buyer in your application.

      Parameters:
      customerIdentifier - The CustomerIdentifier is obtained through the ResolveCustomer operation 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 0 if not specified.

      Parameters:
      quantity - The quantity of usage consumed by the customer for the given dimension and time. Defaults to 0 if 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 UsageAllocations to submit. The sum of all UsageAllocation quantities must equal the Quantity of the UsageRecord.

      Parameters:
      usageAllocations - The set of UsageAllocations to submit. The sum of all UsageAllocation quantities must equal the Quantity of the UsageRecord.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • usageAllocations

      UsageRecord.Builder usageAllocations(UsageAllocation... usageAllocations)

      The set of UsageAllocations to submit. The sum of all UsageAllocation quantities must equal the Quantity of the UsageRecord.

      Parameters:
      usageAllocations - The set of UsageAllocations to submit. The sum of all UsageAllocation quantities must equal the Quantity of the UsageRecord.
      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 UsageAllocations to submit. The sum of all UsageAllocation quantities must equal the Quantity of the UsageRecord.

      This is a convenience method that creates an instance of the UsageAllocation.Builder avoiding the need to create one manually via UsageAllocation.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to usageAllocations(List<UsageAllocation>).

      Parameters:
      usageAllocations - a consumer that will call methods on UsageAllocation.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also: