Class ApiClientDraftBuilder

java.lang.Object
com.commercetools.api.models.api_client.ApiClientDraftBuilder
All Implemented Interfaces:
io.vrap.rmf.base.client.Builder<ApiClientDraft>

public class ApiClientDraftBuilder extends Object implements io.vrap.rmf.base.client.Builder<ApiClientDraft>
ApiClientDraftBuilder
Example to create an instance using the builder pattern

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

  • Method Details

    • name

      Name of the APIClient.

      Parameters:
      name - value to be set
      Returns:
      Builder
    • 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

      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

      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

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

      Returns:
      deleteDaysAfterCreation
    • getAccessTokenValiditySeconds

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

      Returns:
      accessTokenValiditySeconds
    • 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

      builds ApiClientDraft with checking for non-null required values
      Specified by:
      build in interface io.vrap.rmf.base.client.Builder<ApiClientDraft>
      Returns:
      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