Class ApiKeys.CreateCallBuilder

java.lang.Object
com.ngrok.services.ApiKeys.CreateCallBuilder
Enclosing class:
ApiKeys

public class ApiKeys.CreateCallBuilder extends Object
A builder object encapsulating state for an unsent Create API call.
  • Method Details

    • description

      public ApiKeys.CreateCallBuilder description(String description)
      human-readable description of what uses the API key to authenticate. optional, max 255 bytes.
      Parameters:
      description - the value of the description parameter as a String
      Returns:
      the call builder instance
    • description

      public ApiKeys.CreateCallBuilder description(Optional<String> description)
      human-readable description of what uses the API key to authenticate. optional, max 255 bytes.
      Parameters:
      description - the value of the description parameter as an Optional of String
      Returns:
      the call builder instance
    • metadata

      public ApiKeys.CreateCallBuilder metadata(String metadata)
      arbitrary user-defined data of this API key. optional, max 4096 bytes
      Parameters:
      metadata - the value of the metadata parameter as a String
      Returns:
      the call builder instance
    • metadata

      public ApiKeys.CreateCallBuilder metadata(Optional<String> metadata)
      arbitrary user-defined data of this API key. optional, max 4096 bytes
      Parameters:
      metadata - the value of the metadata parameter as an Optional of String
      Returns:
      the call builder instance
    • call

      public CompletionStage<ApiKey> call()
      Initiates the API call asynchronously.
      Returns:
      a CompletionStage of ApiKey
    • blockingCall

      public ApiKey blockingCall() throws InterruptedException
      Initiates the API call and blocks until it returns.
      Returns:
      ApiKey
      Throws:
      InterruptedException - if the thread was interrupted during the call