Interface ApiClient

All Superinterfaces:
Identifiable<ApiClient>

public interface ApiClient extends Identifiable<ApiClient>
ApiClient
Example to create an instance using the builder pattern

     ApiClient apiClient = ApiClient.builder()
             .id("{id}")
             .name("{name}")
             .scope("{scope}")
             .build()
 
  • Method Details

    • getId

      @NotNull @NotNull String getId()

      The OAuth2 client_id that can be used to obtain an access token.

      Specified by:
      getId in interface Identifiable<ApiClient>
      Returns:
      id
    • getName

      @NotNull @NotNull String getName()

      Name of the APIClient.

      Returns:
      name
    • getScope

      @NotNull @NotNull String getScope()

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

      Returns:
      scope
    • getSecret

      String getSecret()

      Only shown once in the response of creating the APIClient. This is the OAuth2 client_secret that can be used to obtain an access token.

      Returns:
      secret
    • getLastUsedAt

      LocalDate getLastUsedAt()

      Date of the last day this APIClient was used to obtain an access token.

      Returns:
      lastUsedAt
    • getDeleteAt

      ZonedDateTime getDeleteAt()

      If set, the Client will be deleted on (or shortly after) this point in time.

      Returns:
      deleteAt
    • getCreatedAt

      ZonedDateTime getCreatedAt()

      Date and time (UTC) the APIClient was initially created.

      Returns:
      createdAt
    • getAccessTokenValiditySeconds

      Integer getAccessTokenValiditySeconds()

      Expiration time in seconds for each access token obtained by the APIClient. Only present when set with the APIClientDraft. If not present the default value applies.

      Returns:
      accessTokenValiditySeconds
    • getRefreshTokenValiditySeconds

      Integer getRefreshTokenValiditySeconds()

      Inactivity expiration time in seconds for each refresh token obtained by the APIClient. Only present when set with the APIClientDraft. If not present the default value applies.

      Returns:
      refreshTokenValiditySeconds
    • setId

      void setId(String id)

      The OAuth2 client_id that can be used to obtain an access token.

      Parameters:
      id - value to be set
    • setName

      void setName(String name)

      Name of the APIClient.

      Parameters:
      name - value to be set
    • setScope

      void setScope(String scope)

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

      Parameters:
      scope - value to be set
    • setSecret

      void setSecret(String secret)

      Only shown once in the response of creating the APIClient. This is the OAuth2 client_secret that can be used to obtain an access token.

      Parameters:
      secret - value to be set
    • setLastUsedAt

      void setLastUsedAt(LocalDate lastUsedAt)

      Date of the last day this APIClient was used to obtain an access token.

      Parameters:
      lastUsedAt - value to be set
    • setDeleteAt

      void setDeleteAt(ZonedDateTime deleteAt)

      If set, the Client will be deleted on (or shortly after) this point in time.

      Parameters:
      deleteAt - value to be set
    • setCreatedAt

      void setCreatedAt(ZonedDateTime createdAt)

      Date and time (UTC) the APIClient was initially created.

      Parameters:
      createdAt - value to be set
    • setAccessTokenValiditySeconds

      void setAccessTokenValiditySeconds(Integer accessTokenValiditySeconds)

      Expiration time in seconds for each access token obtained by the APIClient. Only present when set with the APIClientDraft. If not present the default value applies.

      Parameters:
      accessTokenValiditySeconds - value to be set
    • setRefreshTokenValiditySeconds

      void setRefreshTokenValiditySeconds(Integer refreshTokenValiditySeconds)

      Inactivity expiration time in seconds for each refresh token obtained by the APIClient. Only present when set with the APIClientDraft. If not present the default value applies.

      Parameters:
      refreshTokenValiditySeconds - value to be set
    • of

      static ApiClient of()
      factory method
      Returns:
      instance of ApiClient
    • of

      static ApiClient of(ApiClient template)
      factory method to create a shallow copy ApiClient
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      @Nullable static ApiClient deepCopy(@Nullable ApiClient template)
      factory method to create a deep copy of ApiClient
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static ApiClientBuilder builder()
      builder factory method for ApiClient
      Returns:
      builder
    • builder

      static ApiClientBuilder builder(ApiClient template)
      create builder for ApiClient instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withApiClient

      default <T> T withApiClient(Function<ApiClient,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<ApiClient> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference