Class IpRestrictions.UpdateCallBuilder

java.lang.Object
com.ngrok.services.IpRestrictions.UpdateCallBuilder
Enclosing class:
IpRestrictions

public class IpRestrictions.UpdateCallBuilder extends Object
A builder object encapsulating state for an unsent Update API call.
  • Method Details

    • description

      public IpRestrictions.UpdateCallBuilder description(String description)
      human-readable description of this IP restriction. optional, max 255 bytes.
      Parameters:
      description - the value of the description parameter as a String
      Returns:
      the call builder instance
    • description

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

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

      public IpRestrictions.UpdateCallBuilder metadata(Optional<String> metadata)
      arbitrary user-defined machine-readable data of this IP restriction. optional, max 4096 bytes.
      Parameters:
      metadata - the value of the metadata parameter as an Optional of String
      Returns:
      the call builder instance
    • enforced

      public IpRestrictions.UpdateCallBuilder enforced(boolean enforced)
      true if the IP restriction will be enforced. if false, only warnings will be issued
      Parameters:
      enforced - the value of the enforced parameter as a boolean
      Returns:
      the call builder instance
    • enforced

      public IpRestrictions.UpdateCallBuilder enforced(Optional<Boolean> enforced)
      true if the IP restriction will be enforced. if false, only warnings will be issued
      Parameters:
      enforced - the value of the enforced parameter as an Optional of boolean
      Returns:
      the call builder instance
    • ipPolicyIds

      public IpRestrictions.UpdateCallBuilder ipPolicyIds(List<String> ipPolicyIds)
      the set of IP policy identifiers that are used to enforce the restriction
      Parameters:
      ipPolicyIds - the value of the ip_policy_ids parameter as a List of String
      Returns:
      the call builder instance
    • ipPolicyIds

      public IpRestrictions.UpdateCallBuilder ipPolicyIds(Optional<List<String>> ipPolicyIds)
      the set of IP policy identifiers that are used to enforce the restriction
      Parameters:
      ipPolicyIds - the value of the ip_policy_ids parameter as an Optional of List of String
      Returns:
      the call builder instance
    • call

      Initiates the API call asynchronously.
      Returns:
      a CompletionStage of IpRestriction
    • blockingCall

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