Package com.google.auth
Enum CredentialTypeForMetrics
- java.lang.Object
-
- java.lang.Enum<CredentialTypeForMetrics>
-
- com.google.auth.CredentialTypeForMetrics
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<CredentialTypeForMetrics>
public enum CredentialTypeForMetrics extends java.lang.Enum<CredentialTypeForMetrics>
Defines the different types of credentials that can be used for metrics.Each credential type is associated with a label that is used for reporting purposes. Add new enum constant only when corresponding configs established.
Credentials with type
CredentialTypeForMetrics.DO_NOT_SEND
is default value for credential implementations that do not set type specifically. It is not expected to send metrics.- See Also:
getLabel()
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DO_NOT_SEND
IMPERSONATED_CREDENTIALS
SERVICE_ACCOUNT_CREDENTIALS_AT
SERVICE_ACCOUNT_CREDENTIALS_JWT
USER_CREDENTIALS
VM_CREDENTIALS
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
label
-
Constructor Summary
Constructors Modifier Constructor Description private
CredentialTypeForMetrics(java.lang.String label)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getLabel()
static CredentialTypeForMetrics
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static CredentialTypeForMetrics[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
USER_CREDENTIALS
public static final CredentialTypeForMetrics USER_CREDENTIALS
-
SERVICE_ACCOUNT_CREDENTIALS_AT
public static final CredentialTypeForMetrics SERVICE_ACCOUNT_CREDENTIALS_AT
-
SERVICE_ACCOUNT_CREDENTIALS_JWT
public static final CredentialTypeForMetrics SERVICE_ACCOUNT_CREDENTIALS_JWT
-
VM_CREDENTIALS
public static final CredentialTypeForMetrics VM_CREDENTIALS
-
IMPERSONATED_CREDENTIALS
public static final CredentialTypeForMetrics IMPERSONATED_CREDENTIALS
-
DO_NOT_SEND
public static final CredentialTypeForMetrics DO_NOT_SEND
-
-
Method Detail
-
values
public static CredentialTypeForMetrics[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (CredentialTypeForMetrics c : CredentialTypeForMetrics.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CredentialTypeForMetrics valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getLabel
public java.lang.String getLabel()
-
-