public static class ClientCredential.ClientCredentialBuilder extends Object implements org.apache.commons.lang3.builder.Builder<ClientCredential>
| Constructor and Description |
|---|
ClientCredentialBuilder()
Creates a new builder.
|
| Modifier and Type | Method and Description |
|---|---|
ClientCredential.ClientCredentialBuilder |
accessToken(String accessToken)
Sets an access token representing authorizations a client has for OPEN API service.
|
ClientCredential |
build()
Returns a newly-created immutable client credential.
|
ClientCredential.ClientCredentialBuilder |
clientSecret(String clientSecret)
Sets a secret associated with a client token.
|
ClientCredential.ClientCredentialBuilder |
clientToken(String clientToken)
Sets a token representing an OPEN API service client.
|
ClientCredential.ClientCredentialBuilder |
headersToSign(Set<String> headersToSign)
Adds all of
headersToSign into the builder's internal collection. |
ClientCredential.ClientCredentialBuilder |
headerToSign(String headerName)
Adds
headerName into the builder's internal collection. |
ClientCredential.ClientCredentialBuilder |
host(String host)
Sets a hostname to be used when making OPEN API requests with this credential.
|
ClientCredential.ClientCredentialBuilder |
maxBodySize(int maxBodySize)
Sets the maximum body size that will be used for producing request signatures.
|
public ClientCredentialBuilder()
ClientCredential.builder().public ClientCredential.ClientCredentialBuilder clientToken(String clientToken)
clientToken - a client tokenpublic ClientCredential.ClientCredentialBuilder clientSecret(String clientSecret)
clientSecret - a client secretpublic ClientCredential.ClientCredentialBuilder accessToken(String accessToken)
accessToken - an access tokenpublic ClientCredential.ClientCredentialBuilder headersToSign(Set<String> headersToSign)
Adds all of headersToSign into the builder's internal collection. This can be
called multiple times to continue adding them. The set passed in is not stored directly,
a copy is made instead.
NOTE: All header names are lower-cased for storage. In HTTP, header names are case-insensitive anyway, and EdgeGrid does not support multiple headers with the same name. Forcing to lowercase here improves our chance of detecting bad requests early.
headersToSign - a Set of header namespublic ClientCredential.ClientCredentialBuilder headerToSign(String headerName)
Adds headerName into the builder's internal collection. This can be called
multiple times to continue adding them.
NOTE: All header names are lower-cased for storage. In HTTP, header names are case-insensitive anyway, and EdgeGrid does not support multiple headers with the same name. Forcing to lowercase here improves our chance of detecting bad requests early.
headerName - a header namepublic ClientCredential.ClientCredentialBuilder host(String host)
host - a host namepublic ClientCredential.ClientCredentialBuilder maxBodySize(int maxBodySize)
maxBodySize - a number of bytespublic ClientCredential build()
build in interface org.apache.commons.lang3.builder.Builder<ClientCredential>Copyright © 2016–2018. All rights reserved.