Class ApiClientBuilder
Example to create an instance using the builder pattern
ApiClient apiClient = ApiClient.builder()
.id("{id}")
.name("{name}")
.scope("{scope}")
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaccessTokenValiditySeconds
(Integer accessTokenValiditySeconds) Expiration time in seconds for each access token obtained by the APIClient.build()
builds ApiClient with checking for non-null required valuesbuilds ApiClient without checking for non-null required valuescreatedAt
(ZonedDateTime createdAt) Date and time (UTC) the APIClient was initially created.deleteAt
(ZonedDateTime deleteAt) If set, the Client will be deleted on (or shortly after) this point in time.Expiration time in seconds for each access token obtained by the APIClient.Date and time (UTC) the APIClient was initially created.If set, the Client will be deleted on (or shortly after) this point in time.getId()
The OAuth2client_id
that can be used to obtain an access token.Date of the last day this APIClient was used to obtain an access token.getName()
Name of the APIClient.Inactivity expiration time in seconds for each refresh token obtained by the APIClient.getScope()
Whitespace-separated list of OAuth scopes that can be used when obtaining an access token.Only shown once in the response of creating the APIClient.The OAuth2client_id
that can be used to obtain an access token.lastUsedAt
(LocalDate lastUsedAt) Date of the last day this APIClient was used to obtain an access token.Name of the APIClient.static ApiClientBuilder
of()
factory method for an instance of ApiClientBuilderstatic ApiClientBuilder
create builder for ApiClient instancerefreshTokenValiditySeconds
(Integer refreshTokenValiditySeconds) Inactivity expiration time in seconds for each refresh token obtained by the APIClient.Whitespace-separated list of OAuth scopes that can be used when obtaining an access token.Only shown once in the response of creating the APIClient.
-
Constructor Details
-
ApiClientBuilder
public ApiClientBuilder()
-
-
Method Details
-
id
The OAuth2
client_id
that can be used to obtain an access token.- Parameters:
id
- value to be set- Returns:
- Builder
-
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
-
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- Returns:
- Builder
-
lastUsedAt
Date of the last day this APIClient was used to obtain an access token.
- Parameters:
lastUsedAt
- value to be set- Returns:
- Builder
-
deleteAt
If set, the Client will be deleted on (or shortly after) this point in time.
- Parameters:
deleteAt
- value to be set- Returns:
- Builder
-
createdAt
Date and time (UTC) the APIClient was initially created.
- Parameters:
createdAt
- value to be set- Returns:
- Builder
-
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- Returns:
- Builder
-
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- Returns:
- Builder
-
getId
The OAuth2
client_id
that can be used to obtain an access token.- Returns:
- id
-
getName
Name of the APIClient.
- Returns:
- name
-
getScope
Whitespace-separated list of OAuth scopes that can be used when obtaining an access token.
- Returns:
- scope
-
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
Date of the last day this APIClient was used to obtain an access token.
- Returns:
- lastUsedAt
-
getDeleteAt
If set, the Client will be deleted on (or shortly after) this point in time.
- Returns:
- deleteAt
-
getCreatedAt
Date and time (UTC) the APIClient was initially created.
- Returns:
- createdAt
-
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
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
-
build
builds ApiClient with checking for non-null required values -
buildUnchecked
builds ApiClient without checking for non-null required values- Returns:
- ApiClient
-
of
factory method for an instance of ApiClientBuilder- Returns:
- builder
-
of
create builder for ApiClient instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-