Class QuotaBucket

  • All Implemented Interfaces:
    QuotaBucketOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class QuotaBucket
    extends com.google.protobuf.GeneratedMessageV3
    implements QuotaBucketOrBuilder
     A quota bucket is a quota provisioning unit for a specific set of dimensions.
     
    Protobuf type google.api.serviceusage.v1beta1.QuotaBucket
    See Also:
    Serialized Form
    • Field Detail

      • EFFECTIVE_LIMIT_FIELD_NUMBER

        public static final int EFFECTIVE_LIMIT_FIELD_NUMBER
        See Also:
        Constant Field Values
      • DEFAULT_LIMIT_FIELD_NUMBER

        public static final int DEFAULT_LIMIT_FIELD_NUMBER
        See Also:
        Constant Field Values
      • PRODUCER_OVERRIDE_FIELD_NUMBER

        public static final int PRODUCER_OVERRIDE_FIELD_NUMBER
        See Also:
        Constant Field Values
      • CONSUMER_OVERRIDE_FIELD_NUMBER

        public static final int CONSUMER_OVERRIDE_FIELD_NUMBER
        See Also:
        Constant Field Values
      • ADMIN_OVERRIDE_FIELD_NUMBER

        public static final int ADMIN_OVERRIDE_FIELD_NUMBER
        See Also:
        Constant Field Values
      • DIMENSIONS_FIELD_NUMBER

        public static final int DIMENSIONS_FIELD_NUMBER
        See Also:
        Constant Field Values
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetMapField

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • getEffectiveLimit

        public long getEffectiveLimit()
         The effective limit of this quota bucket. Equal to default_limit if there
         are no overrides.
         
        int64 effective_limit = 1;
        Specified by:
        getEffectiveLimit in interface QuotaBucketOrBuilder
        Returns:
        The effectiveLimit.
      • getDefaultLimit

        public long getDefaultLimit()
         The default limit of this quota bucket, as specified by the service
         configuration.
         
        int64 default_limit = 2;
        Specified by:
        getDefaultLimit in interface QuotaBucketOrBuilder
        Returns:
        The defaultLimit.
      • hasProducerOverride

        public boolean hasProducerOverride()
         Producer override on this quota bucket.
         
        .google.api.serviceusage.v1beta1.QuotaOverride producer_override = 3;
        Specified by:
        hasProducerOverride in interface QuotaBucketOrBuilder
        Returns:
        Whether the producerOverride field is set.
      • getProducerOverride

        public QuotaOverride getProducerOverride()
         Producer override on this quota bucket.
         
        .google.api.serviceusage.v1beta1.QuotaOverride producer_override = 3;
        Specified by:
        getProducerOverride in interface QuotaBucketOrBuilder
        Returns:
        The producerOverride.
      • hasConsumerOverride

        public boolean hasConsumerOverride()
         Consumer override on this quota bucket.
         
        .google.api.serviceusage.v1beta1.QuotaOverride consumer_override = 4;
        Specified by:
        hasConsumerOverride in interface QuotaBucketOrBuilder
        Returns:
        Whether the consumerOverride field is set.
      • getConsumerOverride

        public QuotaOverride getConsumerOverride()
         Consumer override on this quota bucket.
         
        .google.api.serviceusage.v1beta1.QuotaOverride consumer_override = 4;
        Specified by:
        getConsumerOverride in interface QuotaBucketOrBuilder
        Returns:
        The consumerOverride.
      • hasAdminOverride

        public boolean hasAdminOverride()
         Admin override on this quota bucket.
         
        .google.api.serviceusage.v1beta1.QuotaOverride admin_override = 5;
        Specified by:
        hasAdminOverride in interface QuotaBucketOrBuilder
        Returns:
        Whether the adminOverride field is set.
      • getAdminOverride

        public QuotaOverride getAdminOverride()
         Admin override on this quota bucket.
         
        .google.api.serviceusage.v1beta1.QuotaOverride admin_override = 5;
        Specified by:
        getAdminOverride in interface QuotaBucketOrBuilder
        Returns:
        The adminOverride.
      • getDimensionsCount

        public int getDimensionsCount()
        Description copied from interface: QuotaBucketOrBuilder
         The dimensions of this quota bucket.
        
         If this map is empty, this is the global bucket, which is the default quota
         value applied to all requests that do not have a more specific override.
        
         If this map is nonempty, the default limit, effective limit, and quota
         overrides apply only to requests that have the dimensions given in the map.
        
         For example, if the map has key `region` and value `us-east-1`, then the
         specified effective limit is only effective in that region, and the
         specified overrides apply only in that region.
         
        map<string, string> dimensions = 6;
        Specified by:
        getDimensionsCount in interface QuotaBucketOrBuilder
      • containsDimensions

        public boolean containsDimensions​(String key)
         The dimensions of this quota bucket.
        
         If this map is empty, this is the global bucket, which is the default quota
         value applied to all requests that do not have a more specific override.
        
         If this map is nonempty, the default limit, effective limit, and quota
         overrides apply only to requests that have the dimensions given in the map.
        
         For example, if the map has key `region` and value `us-east-1`, then the
         specified effective limit is only effective in that region, and the
         specified overrides apply only in that region.
         
        map<string, string> dimensions = 6;
        Specified by:
        containsDimensions in interface QuotaBucketOrBuilder
      • getDimensionsMap

        public Map<String,​String> getDimensionsMap()
         The dimensions of this quota bucket.
        
         If this map is empty, this is the global bucket, which is the default quota
         value applied to all requests that do not have a more specific override.
        
         If this map is nonempty, the default limit, effective limit, and quota
         overrides apply only to requests that have the dimensions given in the map.
        
         For example, if the map has key `region` and value `us-east-1`, then the
         specified effective limit is only effective in that region, and the
         specified overrides apply only in that region.
         
        map<string, string> dimensions = 6;
        Specified by:
        getDimensionsMap in interface QuotaBucketOrBuilder
      • getDimensionsOrDefault

        public String getDimensionsOrDefault​(String key,
                                             String defaultValue)
         The dimensions of this quota bucket.
        
         If this map is empty, this is the global bucket, which is the default quota
         value applied to all requests that do not have a more specific override.
        
         If this map is nonempty, the default limit, effective limit, and quota
         overrides apply only to requests that have the dimensions given in the map.
        
         For example, if the map has key `region` and value `us-east-1`, then the
         specified effective limit is only effective in that region, and the
         specified overrides apply only in that region.
         
        map<string, string> dimensions = 6;
        Specified by:
        getDimensionsOrDefault in interface QuotaBucketOrBuilder
      • getDimensionsOrThrow

        public String getDimensionsOrThrow​(String key)
         The dimensions of this quota bucket.
        
         If this map is empty, this is the global bucket, which is the default quota
         value applied to all requests that do not have a more specific override.
        
         If this map is nonempty, the default limit, effective limit, and quota
         overrides apply only to requests that have the dimensions given in the map.
        
         For example, if the map has key `region` and value `us-east-1`, then the
         specified effective limit is only effective in that region, and the
         specified overrides apply only in that region.
         
        map<string, string> dimensions = 6;
        Specified by:
        getDimensionsOrThrow in interface QuotaBucketOrBuilder
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static QuotaBucket parseFrom​(ByteBuffer data)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static QuotaBucket parseFrom​(ByteBuffer data,
                                            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static QuotaBucket parseFrom​(com.google.protobuf.ByteString data)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static QuotaBucket parseFrom​(com.google.protobuf.ByteString data,
                                            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static QuotaBucket parseFrom​(byte[] data)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static QuotaBucket parseFrom​(byte[] data,
                                            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                     throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static QuotaBucket parseFrom​(com.google.protobuf.CodedInputStream input,
                                            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                     throws IOException
        Throws:
        IOException
      • newBuilderForType

        public QuotaBucket.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public QuotaBucket.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected QuotaBucket.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstance

        public static QuotaBucket getDefaultInstance()
      • parser

        public static com.google.protobuf.Parser<QuotaBucket> parser()
      • getParserForType

        public com.google.protobuf.Parser<QuotaBucket> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public QuotaBucket getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder