Class ValidationRequest

java.lang.Object
dev.demeng.sentinel.client.license.validation.ValidationRequest

public final class ValidationRequest extends Object
Request parameters for a license validation call.

Use builder() to construct an instance. The product must be identified in one of two mutually exclusive ways: either by setting ValidationRequest.Builder.product(String), or by setting both ValidationRequest.Builder.listingPlatform(String) and ValidationRequest.Builder.listingResourceId(String) (used to resolve a product through one of its platform listings). This XOR rule is enforced by the server.

If server is not set, it defaults to the machine fingerprint generated by MachineFingerprint.generate().

  • Method Details

    • builder

      public static ValidationRequest.Builder builder()
      Creates a new ValidationRequest.Builder for constructing a ValidationRequest.
      Returns:
      a new builder instance
    • getKey

      public @Nullable String getKey()
      Returns:
      the license key, or null if not set
    • getProduct

      public @Nullable String getProduct()
      Returns:
      the product identifier, or null if the product is being identified by platform listing instead
    • getServer

      public String getServer()
      Returns:
      the server identifier (defaults to the machine fingerprint if not explicitly set)
    • getIp

      public @Nullable String getIp()
      Returns:
      the client IP address, or null if not set
    • getConnectionPlatform

      public @Nullable String getConnectionPlatform()
      Returns:
      the connection platform (e.g. "discord"), or null if not set
    • getConnectionValue

      public @Nullable String getConnectionValue()
      Returns:
      the connection value (e.g. a user ID), or null if not set
    • getListingPlatform

      public @Nullable String getListingPlatform()
      Returns:
      the platform on which the product is listed (e.g. "Spigot"), or null if the product is being identified by name instead
    • getListingResourceId

      public @Nullable String getListingResourceId()
      Returns:
      the platform-side resource ID for the listing (e.g. a Spigot resource ID), or null if the product is being identified by name instead