Sets the service authentication credentials. If no credentials are set, GoogleCredentials#getApplicationDefault() will be used to attempt getting credentials from
the environment. Use NoCredentials#getInstance() to skip authentication, this is
typically useful when using local service emulators.
Parameter
Name
Description
credentials
com.google.auth.Credentials
authentication credentials, should not be null
Returns
Type
Description
B
the builder
setHeaderProvider(HeaderProvider headerProvider)
public B setHeaderProvider(HeaderProvider headerProvider)
Sets the static header provider. The header provider will be called during client
construction only once. The headers returned by the provider will be cached and supplied as
is for each request issued by the constructed client. Some reserved headers can be overridden
(e.g. Content-Type) or merged with the default value (e.g. User-Agent) by the underlying
transport layer.
Universe Domain is the domain for Google Cloud Services. A Google Cloud endpoint follows the
format of {ServiceName}.{UniverseDomain}. For example, speech.googleapis.com would have a
Universe Domain value of googleapis.com and cloudasset.test.com would have a Universe
Domain of test.com.
If this value is not set, the resolved UniverseDomain will default to googleapis.com.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-11-26 UTC."],[],[]]