Package com.google.api.servicecontrol.v1
Enum QuotaOperation.QuotaMode
- java.lang.Object
-
- java.lang.Enum<QuotaOperation.QuotaMode>
-
- com.google.api.servicecontrol.v1.QuotaOperation.QuotaMode
-
- All Implemented Interfaces:
com.google.protobuf.Internal.EnumLite
,com.google.protobuf.ProtocolMessageEnum
,Serializable
,Comparable<QuotaOperation.QuotaMode>
- Enclosing class:
- QuotaOperation
public static enum QuotaOperation.QuotaMode extends Enum<QuotaOperation.QuotaMode> implements com.google.protobuf.ProtocolMessageEnum
Supported quota modes.
Protobuf enumgoogle.api.servicecontrol.v1.QuotaOperation.QuotaMode
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ADJUST_ONLY
The operation allocates quota for the amount specified in the service configuration or specified using the quota metrics.BEST_EFFORT
The operation allocates quota for the amount specified in the service configuration or specified using the quota metrics.CHECK_ONLY
For AllocateQuota request, only checks if there is enough quota available and does not change the available quota.NORMAL
For AllocateQuota request, allocates quota for the amount specified in the service configuration or specified using the quota metrics.QUERY_ONLY
Unimplemented.UNRECOGNIZED
UNSPECIFIED
Guard against implicit default.
-
Field Summary
Fields Modifier and Type Field Description static int
ADJUST_ONLY_VALUE
The operation allocates quota for the amount specified in the service configuration or specified using the quota metrics.static int
BEST_EFFORT_VALUE
The operation allocates quota for the amount specified in the service configuration or specified using the quota metrics.static int
CHECK_ONLY_VALUE
For AllocateQuota request, only checks if there is enough quota available and does not change the available quota.static int
NORMAL_VALUE
For AllocateQuota request, allocates quota for the amount specified in the service configuration or specified using the quota metrics.static int
QUERY_ONLY_VALUE
Unimplemented.static int
UNSPECIFIED_VALUE
Guard against implicit default.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static QuotaOperation.QuotaMode
forNumber(int value)
static com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor()
com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType()
int
getNumber()
com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor()
static com.google.protobuf.Internal.EnumLiteMap<QuotaOperation.QuotaMode>
internalGetValueMap()
static QuotaOperation.QuotaMode
valueOf(int value)
Deprecated.static QuotaOperation.QuotaMode
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
Returns the enum constant of this type with the specified name.static QuotaOperation.QuotaMode
valueOf(String name)
Returns the enum constant of this type with the specified name.static QuotaOperation.QuotaMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
UNSPECIFIED
public static final QuotaOperation.QuotaMode UNSPECIFIED
Guard against implicit default. Must not be used.
UNSPECIFIED = 0;
-
NORMAL
public static final QuotaOperation.QuotaMode NORMAL
For AllocateQuota request, allocates quota for the amount specified in the service configuration or specified using the quota metrics. If the amount is higher than the available quota, allocation error will be returned and no quota will be allocated. If multiple quotas are part of the request, and one fails, none of the quotas are allocated or released.
NORMAL = 1;
-
BEST_EFFORT
public static final QuotaOperation.QuotaMode BEST_EFFORT
The operation allocates quota for the amount specified in the service configuration or specified using the quota metrics. If the amount is higher than the available quota, request does not fail but all available quota will be allocated. For rate quota, BEST_EFFORT will continue to deduct from other groups even if one does not have enough quota. For allocation, it will find the minimum available amount across all groups and deduct that amount from all the affected groups.
BEST_EFFORT = 2;
-
CHECK_ONLY
public static final QuotaOperation.QuotaMode CHECK_ONLY
For AllocateQuota request, only checks if there is enough quota available and does not change the available quota. No lock is placed on the available quota either.
CHECK_ONLY = 3;
-
QUERY_ONLY
public static final QuotaOperation.QuotaMode QUERY_ONLY
Unimplemented. When used in AllocateQuotaRequest, this returns the effective quota limit(s) in the response, and no quota check will be performed. Not supported for other requests, and even for AllocateQuotaRequest, this is currently supported only for allowlisted services.
QUERY_ONLY = 4;
-
ADJUST_ONLY
public static final QuotaOperation.QuotaMode ADJUST_ONLY
The operation allocates quota for the amount specified in the service configuration or specified using the quota metrics. If the requested amount is higher than the available quota, request does not fail and remaining quota would become negative (going over the limit). Not supported for Rate Quota.
ADJUST_ONLY = 5;
-
UNRECOGNIZED
public static final QuotaOperation.QuotaMode UNRECOGNIZED
-
-
Field Detail
-
UNSPECIFIED_VALUE
public static final int UNSPECIFIED_VALUE
Guard against implicit default. Must not be used.
UNSPECIFIED = 0;
- See Also:
- Constant Field Values
-
NORMAL_VALUE
public static final int NORMAL_VALUE
For AllocateQuota request, allocates quota for the amount specified in the service configuration or specified using the quota metrics. If the amount is higher than the available quota, allocation error will be returned and no quota will be allocated. If multiple quotas are part of the request, and one fails, none of the quotas are allocated or released.
NORMAL = 1;
- See Also:
- Constant Field Values
-
BEST_EFFORT_VALUE
public static final int BEST_EFFORT_VALUE
The operation allocates quota for the amount specified in the service configuration or specified using the quota metrics. If the amount is higher than the available quota, request does not fail but all available quota will be allocated. For rate quota, BEST_EFFORT will continue to deduct from other groups even if one does not have enough quota. For allocation, it will find the minimum available amount across all groups and deduct that amount from all the affected groups.
BEST_EFFORT = 2;
- See Also:
- Constant Field Values
-
CHECK_ONLY_VALUE
public static final int CHECK_ONLY_VALUE
For AllocateQuota request, only checks if there is enough quota available and does not change the available quota. No lock is placed on the available quota either.
CHECK_ONLY = 3;
- See Also:
- Constant Field Values
-
QUERY_ONLY_VALUE
public static final int QUERY_ONLY_VALUE
Unimplemented. When used in AllocateQuotaRequest, this returns the effective quota limit(s) in the response, and no quota check will be performed. Not supported for other requests, and even for AllocateQuotaRequest, this is currently supported only for allowlisted services.
QUERY_ONLY = 4;
- See Also:
- Constant Field Values
-
ADJUST_ONLY_VALUE
public static final int ADJUST_ONLY_VALUE
The operation allocates quota for the amount specified in the service configuration or specified using the quota metrics. If the requested amount is higher than the available quota, request does not fail and remaining quota would become negative (going over the limit). Not supported for Rate Quota.
ADJUST_ONLY = 5;
- See Also:
- Constant Field Values
-
-
Method Detail
-
values
public static QuotaOperation.QuotaMode[] 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 (QuotaOperation.QuotaMode c : QuotaOperation.QuotaMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static QuotaOperation.QuotaMode valueOf(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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getNumber
public final int getNumber()
- Specified by:
getNumber
in interfacecom.google.protobuf.Internal.EnumLite
- Specified by:
getNumber
in interfacecom.google.protobuf.ProtocolMessageEnum
-
valueOf
@Deprecated public static QuotaOperation.QuotaMode valueOf(int value)
Deprecated.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:
value
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
forNumber
public static QuotaOperation.QuotaMode forNumber(int value)
- Parameters:
value
- The numeric wire value of the corresponding enum entry.- Returns:
- The enum associated with the given numeric wire value.
-
internalGetValueMap
public static com.google.protobuf.Internal.EnumLiteMap<QuotaOperation.QuotaMode> internalGetValueMap()
-
getValueDescriptor
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
- Specified by:
getValueDescriptor
in interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptorForType
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptor
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
-
valueOf
public static QuotaOperation.QuotaMode valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
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:
desc
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-