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 enum google.api.servicecontrol.v1.QuotaOperation.QuotaMode
  • Enum Constant Details

    • 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 Details

    • UNSPECIFIED_VALUE

      public static final int UNSPECIFIED_VALUE
       Guard against implicit default. Must not be used.
       
      UNSPECIFIED = 0;
      See Also:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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:
  • Method Details

    • values

      public static QuotaOperation.QuotaMode[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      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 name
      NullPointerException - if the argument is null
    • getNumber

      public final int getNumber()
      Specified by:
      getNumber in interface com.google.protobuf.Internal.EnumLite
      Specified by:
      getNumber in interface com.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 name
      NullPointerException - 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 interface com.google.protobuf.ProtocolMessageEnum
    • getDescriptorForType

      public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.ProtocolMessageEnum
    • getDescriptor

      public static 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 name
      NullPointerException - if the argument is null