Class HttpDestinationBuilder

java.lang.Object
com.commercetools.api.models.extension.HttpDestinationBuilder
All Implemented Interfaces:
Builder<HttpDestination>
Direct Known Subclasses:
ExtensionHttpDestinationBuilder

public class HttpDestinationBuilder extends Object implements Builder<HttpDestination>
HttpDestinationBuilder
Example to create an instance using the builder pattern

     HttpDestination httpDestination = HttpDestination.builder()
             .url("{url}")
             .build()
 
  • Constructor Details

    • HttpDestinationBuilder

      public HttpDestinationBuilder()
  • Method Details

    • url

      public HttpDestinationBuilder url(String url)

      URL to the target destination. If the Project is hosted in the China (AWS, Ningxia) Region, verify that the URL is not blocked due to firewall restrictions.

      Parameters:
      url - value to be set
      Returns:
      Builder
    • authentication

      public HttpDestinationBuilder authentication(@Nullable HttpDestinationAuthentication authentication)

      Authentication methods (such as Basic or Bearer).

      Parameters:
      authentication - value to be set
      Returns:
      Builder
    • authentication

      Authentication methods (such as Basic or Bearer).

      Parameters:
      builder - function to build the authentication value
      Returns:
      Builder
    • getUrl

      public String getUrl()

      URL to the target destination. If the Project is hosted in the China (AWS, Ningxia) Region, verify that the URL is not blocked due to firewall restrictions.

      Returns:
      url
    • getAuthentication

      @Nullable public HttpDestinationAuthentication getAuthentication()

      Authentication methods (such as Basic or Bearer).

      Returns:
      authentication
    • build

      public HttpDestination build()
      builds HttpDestination with checking for non-null required values
      Specified by:
      build in interface Builder<HttpDestination>
      Returns:
      HttpDestination
    • buildUnchecked

      public HttpDestination buildUnchecked()
      builds HttpDestination without checking for non-null required values
      Returns:
      HttpDestination
    • of

      public static HttpDestinationBuilder of()
      factory method for an instance of HttpDestinationBuilder
      Returns:
      builder
    • of

      public static HttpDestinationBuilder of(HttpDestination template)
      create builder for HttpDestination instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder