Class IpPolicies.CreateCallBuilder

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

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

    • description

      public IpPolicies.CreateCallBuilder description(String description)
      human-readable description of the source IPs of this IP policy. optional, max 255 bytes.
      Parameters:
      description - the value of the description parameter as a String
      Returns:
      the call builder instance
    • description

      public IpPolicies.CreateCallBuilder description(Optional<String> description)
      human-readable description of the source IPs of this IP policy. optional, max 255 bytes.
      Parameters:
      description - the value of the description parameter as an Optional of String
      Returns:
      the call builder instance
    • metadata

      public IpPolicies.CreateCallBuilder metadata(String metadata)
      arbitrary user-defined machine-readable data of this IP policy. optional, max 4096 bytes.
      Parameters:
      metadata - the value of the metadata parameter as a String
      Returns:
      the call builder instance
    • metadata

      public IpPolicies.CreateCallBuilder metadata(Optional<String> metadata)
      arbitrary user-defined machine-readable data of this IP policy. 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<IpPolicy> call()
      Initiates the API call asynchronously.
      Returns:
      a CompletionStage of IpPolicy
    • blockingCall

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