SecretManagerClient constructor
SecretManagerClient({})
Creates a Secret Manager client.
Implementation
SecretManagerClient({
super.serviceAccountJson,
super.authToken,
this.location,
super.httpClient,
}) {
final bool hasServiceAccount = serviceAccountJson?.isNotEmpty == true;
final bool hasAuthToken = authToken?.isNotEmpty == true;
if (hasServiceAccount && hasAuthToken) {
throw ArgumentError(
'Cannot provide both serviceAccountJson and authToken. Please provide '
'only one authentication method, or neither to use Application Default '
'Credentials.',
);
}
}