Class ApiClientDraftBuilder

java.lang.Object
com.commercetools.api.models.api_client.ApiClientDraftBuilder
All Implemented Interfaces:
Builder<ApiClientDraft>

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

     ApiClientDraft apiClientDraft = ApiClientDraft.builder()
             .name("{name}")
             .scope("{scope}")
             .build()
 
  • Constructor Details

    • ApiClientDraftBuilder

      public ApiClientDraftBuilder()
  • Method Details

    • name

      public ApiClientDraftBuilder name(String name)

      Name of the APIClient.

      Parameters:
      name - value to be set
      Returns:
      Builder
    • scope

      public ApiClientDraftBuilder scope(String scope)

      Whitespace-separated list of OAuth scopes that can be used when obtaining an access token.

      Parameters:
      scope - value to be set
      Returns:
      Builder
    • deleteDaysAfterCreation

      public ApiClientDraftBuilder deleteDaysAfterCreation(@Nullable Long deleteDaysAfterCreation)

      If set, the Client will be deleted after the specified amount of days.

      Parameters:
      deleteDaysAfterCreation - value to be set
      Returns:
      Builder
    • accessTokenValiditySeconds

      public ApiClientDraftBuilder accessTokenValiditySeconds(@Nullable Integer accessTokenValiditySeconds)

      Expiration time in seconds for each access token obtained by the APIClient. If not set the default value applies.

      Parameters:
      accessTokenValiditySeconds - value to be set
      Returns:
      Builder
    • refreshTokenValiditySeconds

      public ApiClientDraftBuilder refreshTokenValiditySeconds(@Nullable Integer refreshTokenValiditySeconds)

      Inactivity expiration time in seconds for each refresh token obtained by the APIClient. The expiration time for refresh tokens is restarted each time the token is used. If not set the default value applies.

      Parameters:
      refreshTokenValiditySeconds - value to be set
      Returns:
      Builder
    • getName

      public String getName()

      Name of the APIClient.

      Returns:
      name
    • getScope

      public String getScope()

      Whitespace-separated list of OAuth scopes that can be used when obtaining an access token.

      Returns:
      scope
    • getDeleteDaysAfterCreation

      @Nullable public Long getDeleteDaysAfterCreation()

      If set, the Client will be deleted after the specified amount of days.

      Returns:
      deleteDaysAfterCreation
    • getAccessTokenValiditySeconds

      @Nullable public Integer getAccessTokenValiditySeconds()

      Expiration time in seconds for each access token obtained by the APIClient. If not set the default value applies.

      Returns:
      accessTokenValiditySeconds
    • getRefreshTokenValiditySeconds

      @Nullable public Integer getRefreshTokenValiditySeconds()

      Inactivity expiration time in seconds for each refresh token obtained by the APIClient. The expiration time for refresh tokens is restarted each time the token is used. If not set the default value applies.

      Returns:
      refreshTokenValiditySeconds
    • build

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

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

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

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