Class EndpointRequestHeaders.Builder

java.lang.Object
com.ngrok.definitions.EndpointRequestHeaders.Builder
Enclosing class:
EndpointRequestHeaders

public static class EndpointRequestHeaders.Builder extends Object
Builder class for EndpointRequestHeaders.
  • Method Details

    • enabled

      public EndpointRequestHeaders.Builder enabled(boolean enabled)
      true if the module will be applied to traffic, false to disable. default true if unspecified
      Parameters:
      enabled - the value of the enabled parameter as a boolean
      Returns:
      this builder instance
    • enabled

      public EndpointRequestHeaders.Builder enabled(Optional<Boolean> enabled)
      true if the module will be applied to traffic, false to disable. default true if unspecified
      Parameters:
      enabled - the value of the enabled parameter as a boolean, wrapped in an Optional
      Returns:
      this builder instance
    • add

      a map of header key to header value that will be injected into the HTTP Request before being sent to the upstream application server
      Parameters:
      add - the value of the add parameter as a Map<String,​String>
      Returns:
      this builder instance
    • add

      a map of header key to header value that will be injected into the HTTP Request before being sent to the upstream application server
      Parameters:
      add - the value of the add parameter as a Map<String,​String>, wrapped in an Optional
      Returns:
      this builder instance
    • remove

      public EndpointRequestHeaders.Builder remove(List<String> remove)
      a list of header names that will be removed from the HTTP Request before being sent to the upstream application server
      Parameters:
      remove - the value of the remove parameter as a List<String>
      Returns:
      this builder instance
    • remove

      public EndpointRequestHeaders.Builder remove(Optional<List<String>> remove)
      a list of header names that will be removed from the HTTP Request before being sent to the upstream application server
      Parameters:
      remove - the value of the remove parameter as a List<String>, wrapped in an Optional
      Returns:
      this builder instance
    • build

      public EndpointRequestHeaders build()
      Constructs the EndpointRequestHeaders instance.
      Returns:
      a new EndpointRequestHeaders