Class ExternalOAuthBuilder

java.lang.Object
com.commercetools.api.models.project.ExternalOAuthBuilder
All Implemented Interfaces:
Builder<ExternalOAuth>

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

     ExternalOAuth externalOAuth = ExternalOAuth.builder()
             .url("{url}")
             .authorizationHeader("{authorizationHeader}")
             .build()
 
  • Constructor Details

    • ExternalOAuthBuilder

      public ExternalOAuthBuilder()
  • Method Details

    • url

      public ExternalOAuthBuilder url(String url)

      URL with authorization header. 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
    • authorizationHeader

      public ExternalOAuthBuilder authorizationHeader(String authorizationHeader)

      Must not contain any leading or trailing whitespaces. Partially hidden on retrieval.

      Parameters:
      authorizationHeader - value to be set
      Returns:
      Builder
    • getUrl

      public String getUrl()

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

      Returns:
      url
    • getAuthorizationHeader

      public String getAuthorizationHeader()

      Must not contain any leading or trailing whitespaces. Partially hidden on retrieval.

      Returns:
      authorizationHeader
    • build

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

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

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

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