Class SettlementRecord

java.lang.Object
software.amazon.awssdk.services.wafv2.model.SettlementRecord
All Implemented Interfaces:
Serializable, SdkPojo, ToCopyableBuilder<SettlementRecord.Builder,SettlementRecord>

@Generated("software.amazon.awssdk:codegen") public final class SettlementRecord extends Object implements SdkPojo, Serializable, ToCopyableBuilder<SettlementRecord.Builder,SettlementRecord>

A single settlement transaction record for AI bot monetization. Contains details about the payment including timestamp, amount, status, and the parties involved.

See Also:
  • Method Details

    • timestamp

      public final Instant timestamp()

      The timestamp when the settlement was recorded.

      Returns:
      The timestamp when the settlement was recorded.
    • payerAddress

      public final String payerAddress()

      The blockchain wallet address of the paying AI agent.

      Returns:
      The blockchain wallet address of the paying AI agent.
    • walletAddress

      public final String walletAddress()

      Your receiving wallet address.

      Returns:
      Your receiving wallet address.
    • status

      public final SettlementStatus status()

      The status of the settlement. Possible values:

      • SETTLED - The payment was successfully settled on the blockchain and the transfer from the payer's wallet to the publisher's wallet is confirmed. The TransactionId field contains the on-chain transaction hash. Content is served to the client.

      • PENDING - The blockchain transaction has been submitted but not yet confirmed on-chain. This is a transient state that automatically resolves to either SETTLED or FAILED. No action is required. While pending, content is not served and the API returns a 402 response. Clients can retry the request.

      • FAILED - The payment settlement was attempted but failed. Possible causes include insufficient funds, an expired payment authorization, or a reverted blockchain transaction. The failureReason field contains a machine-readable error code. Content is not served.

      • SERVICE_ERROR - Settlement could not be completed due to an internal service issue or an issue with the payment network. Content is not served. The client's payment authorization remains valid and the request can be retried.

      • SKIPPED_ORIGIN_ERROR - The origin returned a non-2xx response, so settlement was intentionally skipped. The client is not charged.

      • DUPLICATE - A prior request with the same payment payload has already been settled. This status typically appears when a previous attempt timed out but the payment was ultimately processed. The client is not charged again.

      If the service returns an enum value that is not available in the current SDK version, status will return SettlementStatus.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from statusAsString().

      Returns:
      The status of the settlement. Possible values:

      • SETTLED - The payment was successfully settled on the blockchain and the transfer from the payer's wallet to the publisher's wallet is confirmed. The TransactionId field contains the on-chain transaction hash. Content is served to the client.

      • PENDING - The blockchain transaction has been submitted but not yet confirmed on-chain. This is a transient state that automatically resolves to either SETTLED or FAILED. No action is required. While pending, content is not served and the API returns a 402 response. Clients can retry the request.

      • FAILED - The payment settlement was attempted but failed. Possible causes include insufficient funds, an expired payment authorization, or a reverted blockchain transaction. The failureReason field contains a machine-readable error code. Content is not served.

      • SERVICE_ERROR - Settlement could not be completed due to an internal service issue or an issue with the payment network. Content is not served. The client's payment authorization remains valid and the request can be retried.

      • SKIPPED_ORIGIN_ERROR - The origin returned a non-2xx response, so settlement was intentionally skipped. The client is not charged.

      • DUPLICATE - A prior request with the same payment payload has already been settled. This status typically appears when a previous attempt timed out but the payment was ultimately processed. The client is not charged again.

      See Also:
    • statusAsString

      public final String statusAsString()

      The status of the settlement. Possible values:

      • SETTLED - The payment was successfully settled on the blockchain and the transfer from the payer's wallet to the publisher's wallet is confirmed. The TransactionId field contains the on-chain transaction hash. Content is served to the client.

      • PENDING - The blockchain transaction has been submitted but not yet confirmed on-chain. This is a transient state that automatically resolves to either SETTLED or FAILED. No action is required. While pending, content is not served and the API returns a 402 response. Clients can retry the request.

      • FAILED - The payment settlement was attempted but failed. Possible causes include insufficient funds, an expired payment authorization, or a reverted blockchain transaction. The failureReason field contains a machine-readable error code. Content is not served.

      • SERVICE_ERROR - Settlement could not be completed due to an internal service issue or an issue with the payment network. Content is not served. The client's payment authorization remains valid and the request can be retried.

      • SKIPPED_ORIGIN_ERROR - The origin returned a non-2xx response, so settlement was intentionally skipped. The client is not charged.

      • DUPLICATE - A prior request with the same payment payload has already been settled. This status typically appears when a previous attempt timed out but the payment was ultimately processed. The client is not charged again.

      If the service returns an enum value that is not available in the current SDK version, status will return SettlementStatus.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from statusAsString().

      Returns:
      The status of the settlement. Possible values:

      • SETTLED - The payment was successfully settled on the blockchain and the transfer from the payer's wallet to the publisher's wallet is confirmed. The TransactionId field contains the on-chain transaction hash. Content is served to the client.

      • PENDING - The blockchain transaction has been submitted but not yet confirmed on-chain. This is a transient state that automatically resolves to either SETTLED or FAILED. No action is required. While pending, content is not served and the API returns a 402 response. Clients can retry the request.

      • FAILED - The payment settlement was attempted but failed. Possible causes include insufficient funds, an expired payment authorization, or a reverted blockchain transaction. The failureReason field contains a machine-readable error code. Content is not served.

      • SERVICE_ERROR - Settlement could not be completed due to an internal service issue or an issue with the payment network. Content is not served. The client's payment authorization remains valid and the request can be retried.

      • SKIPPED_ORIGIN_ERROR - The origin returned a non-2xx response, so settlement was intentionally skipped. The client is not charged.

      • DUPLICATE - A prior request with the same payment payload has already been settled. This status typically appears when a previous attempt timed out but the payment was ultimately processed. The client is not charged again.

      See Also:
    • amount

      public final String amount()

      The payment amount in the specified currency.

      Returns:
      The payment amount in the specified currency.
    • currency

      public final Currency currency()

      The currency of the payment amount.

      If the service returns an enum value that is not available in the current SDK version, currency will return Currency.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from currencyAsString().

      Returns:
      The currency of the payment amount.
      See Also:
    • currencyAsString

      public final String currencyAsString()

      The currency of the payment amount.

      If the service returns an enum value that is not available in the current SDK version, currency will return Currency.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from currencyAsString().

      Returns:
      The currency of the payment amount.
      See Also:
    • network

      public final String network()

      The blockchain network on which the settlement occurred.

      Returns:
      The blockchain network on which the settlement occurred.
    • transactionId

      public final String transactionId()

      The blockchain transaction identifier. You can use this to verify the transaction on a blockchain explorer.

      Returns:
      The blockchain transaction identifier. You can use this to verify the transaction on a blockchain explorer.
    • requestId

      public final String requestId()

      The WAF request ID associated with this settlement.

      Returns:
      The WAF request ID associated with this settlement.
    • sourceName

      public final String sourceName()

      The name of the AI bot that made the payment.

      Returns:
      The name of the AI bot that made the payment.
    • organization

      public final String organization()

      The organization associated with the AI bot.

      Returns:
      The organization associated with the AI bot.
    • sourceCategory

      public final String sourceCategory()

      The category of the AI bot source.

      Returns:
      The category of the AI bot source.
    • intent

      public final String intent()

      The declared intent of the AI bot request.

      Returns:
      The declared intent of the AI bot request.
    • verified

      public final Boolean verified()

      Whether the AI bot's identity was verified.

      Returns:
      Whether the AI bot's identity was verified.
    • contentPath

      public final String contentPath()

      The content path that was accessed.

      Returns:
      The content path that was accessed.
    • webAclArn

      public final String webAclArn()

      The ARN of the web ACL that processed the request.

      Returns:
      The ARN of the web ACL that processed the request.
    • requestTimestamp

      public final Instant requestTimestamp()

      The timestamp of the original web request.

      Returns:
      The timestamp of the original web request.
    • toBuilder

      public SettlementRecord.Builder toBuilder()
      Description copied from interface: ToCopyableBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<SettlementRecord.Builder,SettlementRecord>
      Returns:
      a builder for type T
    • builder

      public static SettlementRecord.Builder builder()
    • serializableBuilderClass

      public static Class<? extends SettlementRecord.Builder> serializableBuilderClass()
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equalsBySdkFields

      public final boolean equalsBySdkFields(Object obj)
      Description copied from interface: SdkPojo
      Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in an SdkPojo class, and is generated based on a service model.

      If an SdkPojo class does not have any inherited fields, equalsBySdkFields and equals are essentially the same.

      Specified by:
      equalsBySdkFields in interface SdkPojo
      Parameters:
      obj - the object to be compared with
      Returns:
      true if the other object equals to this object by sdk fields, false otherwise.
    • toString

      public final String toString()
      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.
      Overrides:
      toString in class Object
    • getValueForField

      public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
    • sdkFields

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
      Returns:
      List of SdkField in this POJO. May be empty list but should never be null.
    • sdkFieldNameToField

      public final Map<String,SdkField<?>> sdkFieldNameToField()
      Specified by:
      sdkFieldNameToField in interface SdkPojo
      Returns:
      The mapping between the field name and its corresponding field.