Class OciRequestBase<T extends OciRequestBase<T>>

Type Parameters:
T - type of the request
All Implemented Interfaces:
ApiRequest<T>
Direct Known Subclasses:
CreateSecret.Request, Decrypt.Request, DeleteSecret.Request, Encrypt.Request, GenerateAutonomousDatabaseWallet.Request, GetBucket.Request, GetKey.Request, GetSecret.Request, GetSecretBundle.Request, GetVault.Request, ObjectRequest, PostMetricData.Request, Sign.Request, Verify.Request

public abstract class OciRequestBase<T extends OciRequestBase<T>> extends ApiJsonRequest<T>
A base for OCI requests that acts as a builder. Adds support for retryToken.
  • Constructor Details

    • OciRequestBase

      protected OciRequestBase()
  • Method Details

    • retryToken

      public T retryToken(String retryToken)
      Retry token to support idempotent request when updating data.
      Parameters:
      retryToken - retry token
      Returns:
      updated request
    • hostPrefix

      public T hostPrefix(String hostPrefix)
      Host prefix to use. This is intended for API implementation and allows override of the default host prefix (for example in Vault API, we may use two different prefixes).
      Parameters:
      hostPrefix - host prefix
      Returns:
      updated request
    • hostFormat

      public T hostFormat(String hostFormat)
      Host format to use. Domain specific APIs must define a host format for each request.
      Parameters:
      hostFormat - host format
      Returns:
      updated request
    • endpoint

      public T endpoint(String endpoint)
      Override the endpoint to use for this request.
      Parameters:
      endpoint - full endpoint to override the default
      Returns:
      updated builder
    • add

      protected T add(String name, Instant instant)
      Add a timestamp to the JSON. Uses the timestamp as defined in OCI API.
      Parameters:
      name - name of the property
      instant - instant value
      Returns:
      updated request
    • endpoint

      public Optional<String> endpoint()
      Endpoint (if configured).
      Returns:
      configured endpoint or empty