Enum QuotaOperation.QuotaMode

    • 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;
    • 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 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 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 name
        NullPointerException - if the argument is null