All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.api.serviceusage.v1beta1.QuotaBucket Maven / Gradle / Ivy

The newest version!
/*
 * Copyright 2024 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/api/serviceusage/v1beta1/resources.proto

// Protobuf Java Version: 3.25.5
package com.google.api.serviceusage.v1beta1;

/**
 *
 *
 * 
 * A quota bucket is a quota provisioning unit for a specific set of dimensions.
 * 
* * Protobuf type {@code google.api.serviceusage.v1beta1.QuotaBucket} */ public final class QuotaBucket extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.api.serviceusage.v1beta1.QuotaBucket) QuotaBucketOrBuilder { private static final long serialVersionUID = 0L; // Use QuotaBucket.newBuilder() to construct. private QuotaBucket(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private QuotaBucket() {} @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new QuotaBucket(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.api.serviceusage.v1beta1.ResourcesProto .internal_static_google_api_serviceusage_v1beta1_QuotaBucket_descriptor; } @SuppressWarnings({"rawtypes"}) @java.lang.Override protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 6: return internalGetDimensions(); default: throw new RuntimeException("Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.api.serviceusage.v1beta1.ResourcesProto .internal_static_google_api_serviceusage_v1beta1_QuotaBucket_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.api.serviceusage.v1beta1.QuotaBucket.class, com.google.api.serviceusage.v1beta1.QuotaBucket.Builder.class); } private int bitField0_; public static final int EFFECTIVE_LIMIT_FIELD_NUMBER = 1; private long effectiveLimit_ = 0L; /** * * *
   * The effective limit of this quota bucket. Equal to default_limit if there
   * are no overrides.
   * 
* * int64 effective_limit = 1; * * @return The effectiveLimit. */ @java.lang.Override public long getEffectiveLimit() { return effectiveLimit_; } public static final int DEFAULT_LIMIT_FIELD_NUMBER = 2; private long defaultLimit_ = 0L; /** * * *
   * The default limit of this quota bucket, as specified by the service
   * configuration.
   * 
* * int64 default_limit = 2; * * @return The defaultLimit. */ @java.lang.Override public long getDefaultLimit() { return defaultLimit_; } public static final int PRODUCER_OVERRIDE_FIELD_NUMBER = 3; private com.google.api.serviceusage.v1beta1.QuotaOverride producerOverride_; /** * * *
   * Producer override on this quota bucket.
   * 
* * .google.api.serviceusage.v1beta1.QuotaOverride producer_override = 3; * * @return Whether the producerOverride field is set. */ @java.lang.Override public boolean hasProducerOverride() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
   * Producer override on this quota bucket.
   * 
* * .google.api.serviceusage.v1beta1.QuotaOverride producer_override = 3; * * @return The producerOverride. */ @java.lang.Override public com.google.api.serviceusage.v1beta1.QuotaOverride getProducerOverride() { return producerOverride_ == null ? com.google.api.serviceusage.v1beta1.QuotaOverride.getDefaultInstance() : producerOverride_; } /** * * *
   * Producer override on this quota bucket.
   * 
* * .google.api.serviceusage.v1beta1.QuotaOverride producer_override = 3; */ @java.lang.Override public com.google.api.serviceusage.v1beta1.QuotaOverrideOrBuilder getProducerOverrideOrBuilder() { return producerOverride_ == null ? com.google.api.serviceusage.v1beta1.QuotaOverride.getDefaultInstance() : producerOverride_; } public static final int CONSUMER_OVERRIDE_FIELD_NUMBER = 4; private com.google.api.serviceusage.v1beta1.QuotaOverride consumerOverride_; /** * * *
   * Consumer override on this quota bucket.
   * 
* * .google.api.serviceusage.v1beta1.QuotaOverride consumer_override = 4; * * @return Whether the consumerOverride field is set. */ @java.lang.Override public boolean hasConsumerOverride() { return ((bitField0_ & 0x00000002) != 0); } /** * * *
   * Consumer override on this quota bucket.
   * 
* * .google.api.serviceusage.v1beta1.QuotaOverride consumer_override = 4; * * @return The consumerOverride. */ @java.lang.Override public com.google.api.serviceusage.v1beta1.QuotaOverride getConsumerOverride() { return consumerOverride_ == null ? com.google.api.serviceusage.v1beta1.QuotaOverride.getDefaultInstance() : consumerOverride_; } /** * * *
   * Consumer override on this quota bucket.
   * 
* * .google.api.serviceusage.v1beta1.QuotaOverride consumer_override = 4; */ @java.lang.Override public com.google.api.serviceusage.v1beta1.QuotaOverrideOrBuilder getConsumerOverrideOrBuilder() { return consumerOverride_ == null ? com.google.api.serviceusage.v1beta1.QuotaOverride.getDefaultInstance() : consumerOverride_; } public static final int ADMIN_OVERRIDE_FIELD_NUMBER = 5; private com.google.api.serviceusage.v1beta1.QuotaOverride adminOverride_; /** * * *
   * Admin override on this quota bucket.
   * 
* * .google.api.serviceusage.v1beta1.QuotaOverride admin_override = 5; * * @return Whether the adminOverride field is set. */ @java.lang.Override public boolean hasAdminOverride() { return ((bitField0_ & 0x00000004) != 0); } /** * * *
   * Admin override on this quota bucket.
   * 
* * .google.api.serviceusage.v1beta1.QuotaOverride admin_override = 5; * * @return The adminOverride. */ @java.lang.Override public com.google.api.serviceusage.v1beta1.QuotaOverride getAdminOverride() { return adminOverride_ == null ? com.google.api.serviceusage.v1beta1.QuotaOverride.getDefaultInstance() : adminOverride_; } /** * * *
   * Admin override on this quota bucket.
   * 
* * .google.api.serviceusage.v1beta1.QuotaOverride admin_override = 5; */ @java.lang.Override public com.google.api.serviceusage.v1beta1.QuotaOverrideOrBuilder getAdminOverrideOrBuilder() { return adminOverride_ == null ? com.google.api.serviceusage.v1beta1.QuotaOverride.getDefaultInstance() : adminOverride_; } public static final int PRODUCER_QUOTA_POLICY_FIELD_NUMBER = 7; private com.google.api.serviceusage.v1beta1.ProducerQuotaPolicy producerQuotaPolicy_; /** * * *
   * Producer policy inherited from the closet ancestor of the current consumer.
   * 
* * .google.api.serviceusage.v1beta1.ProducerQuotaPolicy producer_quota_policy = 7; * * @return Whether the producerQuotaPolicy field is set. */ @java.lang.Override public boolean hasProducerQuotaPolicy() { return ((bitField0_ & 0x00000008) != 0); } /** * * *
   * Producer policy inherited from the closet ancestor of the current consumer.
   * 
* * .google.api.serviceusage.v1beta1.ProducerQuotaPolicy producer_quota_policy = 7; * * @return The producerQuotaPolicy. */ @java.lang.Override public com.google.api.serviceusage.v1beta1.ProducerQuotaPolicy getProducerQuotaPolicy() { return producerQuotaPolicy_ == null ? com.google.api.serviceusage.v1beta1.ProducerQuotaPolicy.getDefaultInstance() : producerQuotaPolicy_; } /** * * *
   * Producer policy inherited from the closet ancestor of the current consumer.
   * 
* * .google.api.serviceusage.v1beta1.ProducerQuotaPolicy producer_quota_policy = 7; */ @java.lang.Override public com.google.api.serviceusage.v1beta1.ProducerQuotaPolicyOrBuilder getProducerQuotaPolicyOrBuilder() { return producerQuotaPolicy_ == null ? com.google.api.serviceusage.v1beta1.ProducerQuotaPolicy.getDefaultInstance() : producerQuotaPolicy_; } public static final int DIMENSIONS_FIELD_NUMBER = 6; private static final class DimensionsDefaultEntryHolder { static final com.google.protobuf.MapEntry defaultEntry = com.google.protobuf.MapEntry.newDefaultInstance( com.google.api.serviceusage.v1beta1.ResourcesProto .internal_static_google_api_serviceusage_v1beta1_QuotaBucket_DimensionsEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.STRING, ""); } @SuppressWarnings("serial") private com.google.protobuf.MapField dimensions_; private com.google.protobuf.MapField internalGetDimensions() { if (dimensions_ == null) { return com.google.protobuf.MapField.emptyMapField(DimensionsDefaultEntryHolder.defaultEntry); } return dimensions_; } public int getDimensionsCount() { return internalGetDimensions().getMap().size(); } /** * * *
   * 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; */ @java.lang.Override public boolean containsDimensions(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetDimensions().getMap().containsKey(key); } /** Use {@link #getDimensionsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getDimensions() { return 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; */ @java.lang.Override public java.util.Map getDimensionsMap() { return internalGetDimensions().getMap(); } /** * * *
   * 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; */ @java.lang.Override public /* nullable */ java.lang.String getDimensionsOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetDimensions().getMap(); return map.containsKey(key) ? map.get(key) : 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; */ @java.lang.Override public java.lang.String getDimensionsOrThrow(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetDimensions().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (effectiveLimit_ != 0L) { output.writeInt64(1, effectiveLimit_); } if (defaultLimit_ != 0L) { output.writeInt64(2, defaultLimit_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getProducerOverride()); } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(4, getConsumerOverride()); } if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(5, getAdminOverride()); } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetDimensions(), DimensionsDefaultEntryHolder.defaultEntry, 6); if (((bitField0_ & 0x00000008) != 0)) { output.writeMessage(7, getProducerQuotaPolicy()); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (effectiveLimit_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, effectiveLimit_); } if (defaultLimit_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, defaultLimit_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getProducerOverride()); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getConsumerOverride()); } if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getAdminOverride()); } for (java.util.Map.Entry entry : internalGetDimensions().getMap().entrySet()) { com.google.protobuf.MapEntry dimensions__ = DimensionsDefaultEntryHolder.defaultEntry .newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, dimensions__); } if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getProducerQuotaPolicy()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.api.serviceusage.v1beta1.QuotaBucket)) { return super.equals(obj); } com.google.api.serviceusage.v1beta1.QuotaBucket other = (com.google.api.serviceusage.v1beta1.QuotaBucket) obj; if (getEffectiveLimit() != other.getEffectiveLimit()) return false; if (getDefaultLimit() != other.getDefaultLimit()) return false; if (hasProducerOverride() != other.hasProducerOverride()) return false; if (hasProducerOverride()) { if (!getProducerOverride().equals(other.getProducerOverride())) return false; } if (hasConsumerOverride() != other.hasConsumerOverride()) return false; if (hasConsumerOverride()) { if (!getConsumerOverride().equals(other.getConsumerOverride())) return false; } if (hasAdminOverride() != other.hasAdminOverride()) return false; if (hasAdminOverride()) { if (!getAdminOverride().equals(other.getAdminOverride())) return false; } if (hasProducerQuotaPolicy() != other.hasProducerQuotaPolicy()) return false; if (hasProducerQuotaPolicy()) { if (!getProducerQuotaPolicy().equals(other.getProducerQuotaPolicy())) return false; } if (!internalGetDimensions().equals(other.internalGetDimensions())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + EFFECTIVE_LIMIT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getEffectiveLimit()); hash = (37 * hash) + DEFAULT_LIMIT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getDefaultLimit()); if (hasProducerOverride()) { hash = (37 * hash) + PRODUCER_OVERRIDE_FIELD_NUMBER; hash = (53 * hash) + getProducerOverride().hashCode(); } if (hasConsumerOverride()) { hash = (37 * hash) + CONSUMER_OVERRIDE_FIELD_NUMBER; hash = (53 * hash) + getConsumerOverride().hashCode(); } if (hasAdminOverride()) { hash = (37 * hash) + ADMIN_OVERRIDE_FIELD_NUMBER; hash = (53 * hash) + getAdminOverride().hashCode(); } if (hasProducerQuotaPolicy()) { hash = (37 * hash) + PRODUCER_QUOTA_POLICY_FIELD_NUMBER; hash = (53 * hash) + getProducerQuotaPolicy().hashCode(); } if (!internalGetDimensions().getMap().isEmpty()) { hash = (37 * hash) + DIMENSIONS_FIELD_NUMBER; hash = (53 * hash) + internalGetDimensions().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.api.serviceusage.v1beta1.QuotaBucket parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.api.serviceusage.v1beta1.QuotaBucket parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.api.serviceusage.v1beta1.QuotaBucket parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.api.serviceusage.v1beta1.QuotaBucket parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.api.serviceusage.v1beta1.QuotaBucket parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.api.serviceusage.v1beta1.QuotaBucket parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.api.serviceusage.v1beta1.QuotaBucket parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.api.serviceusage.v1beta1.QuotaBucket parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.api.serviceusage.v1beta1.QuotaBucket parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.api.serviceusage.v1beta1.QuotaBucket parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.api.serviceusage.v1beta1.QuotaBucket parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.api.serviceusage.v1beta1.QuotaBucket parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.google.api.serviceusage.v1beta1.QuotaBucket prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * * *
   * A quota bucket is a quota provisioning unit for a specific set of dimensions.
   * 
* * Protobuf type {@code google.api.serviceusage.v1beta1.QuotaBucket} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.api.serviceusage.v1beta1.QuotaBucket) com.google.api.serviceusage.v1beta1.QuotaBucketOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.api.serviceusage.v1beta1.ResourcesProto .internal_static_google_api_serviceusage_v1beta1_QuotaBucket_descriptor; } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 6: return internalGetDimensions(); default: throw new RuntimeException("Invalid map field number: " + number); } } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( int number) { switch (number) { case 6: return internalGetMutableDimensions(); default: throw new RuntimeException("Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.api.serviceusage.v1beta1.ResourcesProto .internal_static_google_api_serviceusage_v1beta1_QuotaBucket_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.api.serviceusage.v1beta1.QuotaBucket.class, com.google.api.serviceusage.v1beta1.QuotaBucket.Builder.class); } // Construct using com.google.api.serviceusage.v1beta1.QuotaBucket.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getProducerOverrideFieldBuilder(); getConsumerOverrideFieldBuilder(); getAdminOverrideFieldBuilder(); getProducerQuotaPolicyFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; effectiveLimit_ = 0L; defaultLimit_ = 0L; producerOverride_ = null; if (producerOverrideBuilder_ != null) { producerOverrideBuilder_.dispose(); producerOverrideBuilder_ = null; } consumerOverride_ = null; if (consumerOverrideBuilder_ != null) { consumerOverrideBuilder_.dispose(); consumerOverrideBuilder_ = null; } adminOverride_ = null; if (adminOverrideBuilder_ != null) { adminOverrideBuilder_.dispose(); adminOverrideBuilder_ = null; } producerQuotaPolicy_ = null; if (producerQuotaPolicyBuilder_ != null) { producerQuotaPolicyBuilder_.dispose(); producerQuotaPolicyBuilder_ = null; } internalGetMutableDimensions().clear(); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.api.serviceusage.v1beta1.ResourcesProto .internal_static_google_api_serviceusage_v1beta1_QuotaBucket_descriptor; } @java.lang.Override public com.google.api.serviceusage.v1beta1.QuotaBucket getDefaultInstanceForType() { return com.google.api.serviceusage.v1beta1.QuotaBucket.getDefaultInstance(); } @java.lang.Override public com.google.api.serviceusage.v1beta1.QuotaBucket build() { com.google.api.serviceusage.v1beta1.QuotaBucket result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.api.serviceusage.v1beta1.QuotaBucket buildPartial() { com.google.api.serviceusage.v1beta1.QuotaBucket result = new com.google.api.serviceusage.v1beta1.QuotaBucket(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(com.google.api.serviceusage.v1beta1.QuotaBucket result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.effectiveLimit_ = effectiveLimit_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.defaultLimit_ = defaultLimit_; } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000004) != 0)) { result.producerOverride_ = producerOverrideBuilder_ == null ? producerOverride_ : producerOverrideBuilder_.build(); to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000008) != 0)) { result.consumerOverride_ = consumerOverrideBuilder_ == null ? consumerOverride_ : consumerOverrideBuilder_.build(); to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000010) != 0)) { result.adminOverride_ = adminOverrideBuilder_ == null ? adminOverride_ : adminOverrideBuilder_.build(); to_bitField0_ |= 0x00000004; } if (((from_bitField0_ & 0x00000020) != 0)) { result.producerQuotaPolicy_ = producerQuotaPolicyBuilder_ == null ? producerQuotaPolicy_ : producerQuotaPolicyBuilder_.build(); to_bitField0_ |= 0x00000008; } if (((from_bitField0_ & 0x00000040) != 0)) { result.dimensions_ = internalGetDimensions(); result.dimensions_.makeImmutable(); } result.bitField0_ |= to_bitField0_; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.api.serviceusage.v1beta1.QuotaBucket) { return mergeFrom((com.google.api.serviceusage.v1beta1.QuotaBucket) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.api.serviceusage.v1beta1.QuotaBucket other) { if (other == com.google.api.serviceusage.v1beta1.QuotaBucket.getDefaultInstance()) return this; if (other.getEffectiveLimit() != 0L) { setEffectiveLimit(other.getEffectiveLimit()); } if (other.getDefaultLimit() != 0L) { setDefaultLimit(other.getDefaultLimit()); } if (other.hasProducerOverride()) { mergeProducerOverride(other.getProducerOverride()); } if (other.hasConsumerOverride()) { mergeConsumerOverride(other.getConsumerOverride()); } if (other.hasAdminOverride()) { mergeAdminOverride(other.getAdminOverride()); } if (other.hasProducerQuotaPolicy()) { mergeProducerQuotaPolicy(other.getProducerQuotaPolicy()); } internalGetMutableDimensions().mergeFrom(other.internalGetDimensions()); bitField0_ |= 0x00000040; this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { effectiveLimit_ = input.readInt64(); bitField0_ |= 0x00000001; break; } // case 8 case 16: { defaultLimit_ = input.readInt64(); bitField0_ |= 0x00000002; break; } // case 16 case 26: { input.readMessage( getProducerOverrideFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 case 34: { input.readMessage( getConsumerOverrideFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 case 42: { input.readMessage(getAdminOverrideFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000010; break; } // case 42 case 50: { com.google.protobuf.MapEntry dimensions__ = input.readMessage( DimensionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); internalGetMutableDimensions() .getMutableMap() .put(dimensions__.getKey(), dimensions__.getValue()); bitField0_ |= 0x00000040; break; } // case 50 case 58: { input.readMessage( getProducerQuotaPolicyFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000020; break; } // case 58 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private long effectiveLimit_; /** * * *
     * The effective limit of this quota bucket. Equal to default_limit if there
     * are no overrides.
     * 
* * int64 effective_limit = 1; * * @return The effectiveLimit. */ @java.lang.Override public long getEffectiveLimit() { return effectiveLimit_; } /** * * *
     * The effective limit of this quota bucket. Equal to default_limit if there
     * are no overrides.
     * 
* * int64 effective_limit = 1; * * @param value The effectiveLimit to set. * @return This builder for chaining. */ public Builder setEffectiveLimit(long value) { effectiveLimit_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
     * The effective limit of this quota bucket. Equal to default_limit if there
     * are no overrides.
     * 
* * int64 effective_limit = 1; * * @return This builder for chaining. */ public Builder clearEffectiveLimit() { bitField0_ = (bitField0_ & ~0x00000001); effectiveLimit_ = 0L; onChanged(); return this; } private long defaultLimit_; /** * * *
     * The default limit of this quota bucket, as specified by the service
     * configuration.
     * 
* * int64 default_limit = 2; * * @return The defaultLimit. */ @java.lang.Override public long getDefaultLimit() { return defaultLimit_; } /** * * *
     * The default limit of this quota bucket, as specified by the service
     * configuration.
     * 
* * int64 default_limit = 2; * * @param value The defaultLimit to set. * @return This builder for chaining. */ public Builder setDefaultLimit(long value) { defaultLimit_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
     * The default limit of this quota bucket, as specified by the service
     * configuration.
     * 
* * int64 default_limit = 2; * * @return This builder for chaining. */ public Builder clearDefaultLimit() { bitField0_ = (bitField0_ & ~0x00000002); defaultLimit_ = 0L; onChanged(); return this; } private com.google.api.serviceusage.v1beta1.QuotaOverride producerOverride_; private com.google.protobuf.SingleFieldBuilderV3< com.google.api.serviceusage.v1beta1.QuotaOverride, com.google.api.serviceusage.v1beta1.QuotaOverride.Builder, com.google.api.serviceusage.v1beta1.QuotaOverrideOrBuilder> producerOverrideBuilder_; /** * * *
     * Producer override on this quota bucket.
     * 
* * .google.api.serviceusage.v1beta1.QuotaOverride producer_override = 3; * * @return Whether the producerOverride field is set. */ public boolean hasProducerOverride() { return ((bitField0_ & 0x00000004) != 0); } /** * * *
     * Producer override on this quota bucket.
     * 
* * .google.api.serviceusage.v1beta1.QuotaOverride producer_override = 3; * * @return The producerOverride. */ public com.google.api.serviceusage.v1beta1.QuotaOverride getProducerOverride() { if (producerOverrideBuilder_ == null) { return producerOverride_ == null ? com.google.api.serviceusage.v1beta1.QuotaOverride.getDefaultInstance() : producerOverride_; } else { return producerOverrideBuilder_.getMessage(); } } /** * * *
     * Producer override on this quota bucket.
     * 
* * .google.api.serviceusage.v1beta1.QuotaOverride producer_override = 3; */ public Builder setProducerOverride(com.google.api.serviceusage.v1beta1.QuotaOverride value) { if (producerOverrideBuilder_ == null) { if (value == null) { throw new NullPointerException(); } producerOverride_ = value; } else { producerOverrideBuilder_.setMessage(value); } bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * Producer override on this quota bucket.
     * 
* * .google.api.serviceusage.v1beta1.QuotaOverride producer_override = 3; */ public Builder setProducerOverride( com.google.api.serviceusage.v1beta1.QuotaOverride.Builder builderForValue) { if (producerOverrideBuilder_ == null) { producerOverride_ = builderForValue.build(); } else { producerOverrideBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * Producer override on this quota bucket.
     * 
* * .google.api.serviceusage.v1beta1.QuotaOverride producer_override = 3; */ public Builder mergeProducerOverride(com.google.api.serviceusage.v1beta1.QuotaOverride value) { if (producerOverrideBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0) && producerOverride_ != null && producerOverride_ != com.google.api.serviceusage.v1beta1.QuotaOverride.getDefaultInstance()) { getProducerOverrideBuilder().mergeFrom(value); } else { producerOverride_ = value; } } else { producerOverrideBuilder_.mergeFrom(value); } if (producerOverride_ != null) { bitField0_ |= 0x00000004; onChanged(); } return this; } /** * * *
     * Producer override on this quota bucket.
     * 
* * .google.api.serviceusage.v1beta1.QuotaOverride producer_override = 3; */ public Builder clearProducerOverride() { bitField0_ = (bitField0_ & ~0x00000004); producerOverride_ = null; if (producerOverrideBuilder_ != null) { producerOverrideBuilder_.dispose(); producerOverrideBuilder_ = null; } onChanged(); return this; } /** * * *
     * Producer override on this quota bucket.
     * 
* * .google.api.serviceusage.v1beta1.QuotaOverride producer_override = 3; */ public com.google.api.serviceusage.v1beta1.QuotaOverride.Builder getProducerOverrideBuilder() { bitField0_ |= 0x00000004; onChanged(); return getProducerOverrideFieldBuilder().getBuilder(); } /** * * *
     * Producer override on this quota bucket.
     * 
* * .google.api.serviceusage.v1beta1.QuotaOverride producer_override = 3; */ public com.google.api.serviceusage.v1beta1.QuotaOverrideOrBuilder getProducerOverrideOrBuilder() { if (producerOverrideBuilder_ != null) { return producerOverrideBuilder_.getMessageOrBuilder(); } else { return producerOverride_ == null ? com.google.api.serviceusage.v1beta1.QuotaOverride.getDefaultInstance() : producerOverride_; } } /** * * *
     * Producer override on this quota bucket.
     * 
* * .google.api.serviceusage.v1beta1.QuotaOverride producer_override = 3; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.api.serviceusage.v1beta1.QuotaOverride, com.google.api.serviceusage.v1beta1.QuotaOverride.Builder, com.google.api.serviceusage.v1beta1.QuotaOverrideOrBuilder> getProducerOverrideFieldBuilder() { if (producerOverrideBuilder_ == null) { producerOverrideBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.api.serviceusage.v1beta1.QuotaOverride, com.google.api.serviceusage.v1beta1.QuotaOverride.Builder, com.google.api.serviceusage.v1beta1.QuotaOverrideOrBuilder>( getProducerOverride(), getParentForChildren(), isClean()); producerOverride_ = null; } return producerOverrideBuilder_; } private com.google.api.serviceusage.v1beta1.QuotaOverride consumerOverride_; private com.google.protobuf.SingleFieldBuilderV3< com.google.api.serviceusage.v1beta1.QuotaOverride, com.google.api.serviceusage.v1beta1.QuotaOverride.Builder, com.google.api.serviceusage.v1beta1.QuotaOverrideOrBuilder> consumerOverrideBuilder_; /** * * *
     * Consumer override on this quota bucket.
     * 
* * .google.api.serviceusage.v1beta1.QuotaOverride consumer_override = 4; * * @return Whether the consumerOverride field is set. */ public boolean hasConsumerOverride() { return ((bitField0_ & 0x00000008) != 0); } /** * * *
     * Consumer override on this quota bucket.
     * 
* * .google.api.serviceusage.v1beta1.QuotaOverride consumer_override = 4; * * @return The consumerOverride. */ public com.google.api.serviceusage.v1beta1.QuotaOverride getConsumerOverride() { if (consumerOverrideBuilder_ == null) { return consumerOverride_ == null ? com.google.api.serviceusage.v1beta1.QuotaOverride.getDefaultInstance() : consumerOverride_; } else { return consumerOverrideBuilder_.getMessage(); } } /** * * *
     * Consumer override on this quota bucket.
     * 
* * .google.api.serviceusage.v1beta1.QuotaOverride consumer_override = 4; */ public Builder setConsumerOverride(com.google.api.serviceusage.v1beta1.QuotaOverride value) { if (consumerOverrideBuilder_ == null) { if (value == null) { throw new NullPointerException(); } consumerOverride_ = value; } else { consumerOverrideBuilder_.setMessage(value); } bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
     * Consumer override on this quota bucket.
     * 
* * .google.api.serviceusage.v1beta1.QuotaOverride consumer_override = 4; */ public Builder setConsumerOverride( com.google.api.serviceusage.v1beta1.QuotaOverride.Builder builderForValue) { if (consumerOverrideBuilder_ == null) { consumerOverride_ = builderForValue.build(); } else { consumerOverrideBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
     * Consumer override on this quota bucket.
     * 
* * .google.api.serviceusage.v1beta1.QuotaOverride consumer_override = 4; */ public Builder mergeConsumerOverride(com.google.api.serviceusage.v1beta1.QuotaOverride value) { if (consumerOverrideBuilder_ == null) { if (((bitField0_ & 0x00000008) != 0) && consumerOverride_ != null && consumerOverride_ != com.google.api.serviceusage.v1beta1.QuotaOverride.getDefaultInstance()) { getConsumerOverrideBuilder().mergeFrom(value); } else { consumerOverride_ = value; } } else { consumerOverrideBuilder_.mergeFrom(value); } if (consumerOverride_ != null) { bitField0_ |= 0x00000008; onChanged(); } return this; } /** * * *
     * Consumer override on this quota bucket.
     * 
* * .google.api.serviceusage.v1beta1.QuotaOverride consumer_override = 4; */ public Builder clearConsumerOverride() { bitField0_ = (bitField0_ & ~0x00000008); consumerOverride_ = null; if (consumerOverrideBuilder_ != null) { consumerOverrideBuilder_.dispose(); consumerOverrideBuilder_ = null; } onChanged(); return this; } /** * * *
     * Consumer override on this quota bucket.
     * 
* * .google.api.serviceusage.v1beta1.QuotaOverride consumer_override = 4; */ public com.google.api.serviceusage.v1beta1.QuotaOverride.Builder getConsumerOverrideBuilder() { bitField0_ |= 0x00000008; onChanged(); return getConsumerOverrideFieldBuilder().getBuilder(); } /** * * *
     * Consumer override on this quota bucket.
     * 
* * .google.api.serviceusage.v1beta1.QuotaOverride consumer_override = 4; */ public com.google.api.serviceusage.v1beta1.QuotaOverrideOrBuilder getConsumerOverrideOrBuilder() { if (consumerOverrideBuilder_ != null) { return consumerOverrideBuilder_.getMessageOrBuilder(); } else { return consumerOverride_ == null ? com.google.api.serviceusage.v1beta1.QuotaOverride.getDefaultInstance() : consumerOverride_; } } /** * * *
     * Consumer override on this quota bucket.
     * 
* * .google.api.serviceusage.v1beta1.QuotaOverride consumer_override = 4; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.api.serviceusage.v1beta1.QuotaOverride, com.google.api.serviceusage.v1beta1.QuotaOverride.Builder, com.google.api.serviceusage.v1beta1.QuotaOverrideOrBuilder> getConsumerOverrideFieldBuilder() { if (consumerOverrideBuilder_ == null) { consumerOverrideBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.api.serviceusage.v1beta1.QuotaOverride, com.google.api.serviceusage.v1beta1.QuotaOverride.Builder, com.google.api.serviceusage.v1beta1.QuotaOverrideOrBuilder>( getConsumerOverride(), getParentForChildren(), isClean()); consumerOverride_ = null; } return consumerOverrideBuilder_; } private com.google.api.serviceusage.v1beta1.QuotaOverride adminOverride_; private com.google.protobuf.SingleFieldBuilderV3< com.google.api.serviceusage.v1beta1.QuotaOverride, com.google.api.serviceusage.v1beta1.QuotaOverride.Builder, com.google.api.serviceusage.v1beta1.QuotaOverrideOrBuilder> adminOverrideBuilder_; /** * * *
     * Admin override on this quota bucket.
     * 
* * .google.api.serviceusage.v1beta1.QuotaOverride admin_override = 5; * * @return Whether the adminOverride field is set. */ public boolean hasAdminOverride() { return ((bitField0_ & 0x00000010) != 0); } /** * * *
     * Admin override on this quota bucket.
     * 
* * .google.api.serviceusage.v1beta1.QuotaOverride admin_override = 5; * * @return The adminOverride. */ public com.google.api.serviceusage.v1beta1.QuotaOverride getAdminOverride() { if (adminOverrideBuilder_ == null) { return adminOverride_ == null ? com.google.api.serviceusage.v1beta1.QuotaOverride.getDefaultInstance() : adminOverride_; } else { return adminOverrideBuilder_.getMessage(); } } /** * * *
     * Admin override on this quota bucket.
     * 
* * .google.api.serviceusage.v1beta1.QuotaOverride admin_override = 5; */ public Builder setAdminOverride(com.google.api.serviceusage.v1beta1.QuotaOverride value) { if (adminOverrideBuilder_ == null) { if (value == null) { throw new NullPointerException(); } adminOverride_ = value; } else { adminOverrideBuilder_.setMessage(value); } bitField0_ |= 0x00000010; onChanged(); return this; } /** * * *
     * Admin override on this quota bucket.
     * 
* * .google.api.serviceusage.v1beta1.QuotaOverride admin_override = 5; */ public Builder setAdminOverride( com.google.api.serviceusage.v1beta1.QuotaOverride.Builder builderForValue) { if (adminOverrideBuilder_ == null) { adminOverride_ = builderForValue.build(); } else { adminOverrideBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000010; onChanged(); return this; } /** * * *
     * Admin override on this quota bucket.
     * 
* * .google.api.serviceusage.v1beta1.QuotaOverride admin_override = 5; */ public Builder mergeAdminOverride(com.google.api.serviceusage.v1beta1.QuotaOverride value) { if (adminOverrideBuilder_ == null) { if (((bitField0_ & 0x00000010) != 0) && adminOverride_ != null && adminOverride_ != com.google.api.serviceusage.v1beta1.QuotaOverride.getDefaultInstance()) { getAdminOverrideBuilder().mergeFrom(value); } else { adminOverride_ = value; } } else { adminOverrideBuilder_.mergeFrom(value); } if (adminOverride_ != null) { bitField0_ |= 0x00000010; onChanged(); } return this; } /** * * *
     * Admin override on this quota bucket.
     * 
* * .google.api.serviceusage.v1beta1.QuotaOverride admin_override = 5; */ public Builder clearAdminOverride() { bitField0_ = (bitField0_ & ~0x00000010); adminOverride_ = null; if (adminOverrideBuilder_ != null) { adminOverrideBuilder_.dispose(); adminOverrideBuilder_ = null; } onChanged(); return this; } /** * * *
     * Admin override on this quota bucket.
     * 
* * .google.api.serviceusage.v1beta1.QuotaOverride admin_override = 5; */ public com.google.api.serviceusage.v1beta1.QuotaOverride.Builder getAdminOverrideBuilder() { bitField0_ |= 0x00000010; onChanged(); return getAdminOverrideFieldBuilder().getBuilder(); } /** * * *
     * Admin override on this quota bucket.
     * 
* * .google.api.serviceusage.v1beta1.QuotaOverride admin_override = 5; */ public com.google.api.serviceusage.v1beta1.QuotaOverrideOrBuilder getAdminOverrideOrBuilder() { if (adminOverrideBuilder_ != null) { return adminOverrideBuilder_.getMessageOrBuilder(); } else { return adminOverride_ == null ? com.google.api.serviceusage.v1beta1.QuotaOverride.getDefaultInstance() : adminOverride_; } } /** * * *
     * Admin override on this quota bucket.
     * 
* * .google.api.serviceusage.v1beta1.QuotaOverride admin_override = 5; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.api.serviceusage.v1beta1.QuotaOverride, com.google.api.serviceusage.v1beta1.QuotaOverride.Builder, com.google.api.serviceusage.v1beta1.QuotaOverrideOrBuilder> getAdminOverrideFieldBuilder() { if (adminOverrideBuilder_ == null) { adminOverrideBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.api.serviceusage.v1beta1.QuotaOverride, com.google.api.serviceusage.v1beta1.QuotaOverride.Builder, com.google.api.serviceusage.v1beta1.QuotaOverrideOrBuilder>( getAdminOverride(), getParentForChildren(), isClean()); adminOverride_ = null; } return adminOverrideBuilder_; } private com.google.api.serviceusage.v1beta1.ProducerQuotaPolicy producerQuotaPolicy_; private com.google.protobuf.SingleFieldBuilderV3< com.google.api.serviceusage.v1beta1.ProducerQuotaPolicy, com.google.api.serviceusage.v1beta1.ProducerQuotaPolicy.Builder, com.google.api.serviceusage.v1beta1.ProducerQuotaPolicyOrBuilder> producerQuotaPolicyBuilder_; /** * * *
     * Producer policy inherited from the closet ancestor of the current consumer.
     * 
* * .google.api.serviceusage.v1beta1.ProducerQuotaPolicy producer_quota_policy = 7; * * @return Whether the producerQuotaPolicy field is set. */ public boolean hasProducerQuotaPolicy() { return ((bitField0_ & 0x00000020) != 0); } /** * * *
     * Producer policy inherited from the closet ancestor of the current consumer.
     * 
* * .google.api.serviceusage.v1beta1.ProducerQuotaPolicy producer_quota_policy = 7; * * @return The producerQuotaPolicy. */ public com.google.api.serviceusage.v1beta1.ProducerQuotaPolicy getProducerQuotaPolicy() { if (producerQuotaPolicyBuilder_ == null) { return producerQuotaPolicy_ == null ? com.google.api.serviceusage.v1beta1.ProducerQuotaPolicy.getDefaultInstance() : producerQuotaPolicy_; } else { return producerQuotaPolicyBuilder_.getMessage(); } } /** * * *
     * Producer policy inherited from the closet ancestor of the current consumer.
     * 
* * .google.api.serviceusage.v1beta1.ProducerQuotaPolicy producer_quota_policy = 7; */ public Builder setProducerQuotaPolicy( com.google.api.serviceusage.v1beta1.ProducerQuotaPolicy value) { if (producerQuotaPolicyBuilder_ == null) { if (value == null) { throw new NullPointerException(); } producerQuotaPolicy_ = value; } else { producerQuotaPolicyBuilder_.setMessage(value); } bitField0_ |= 0x00000020; onChanged(); return this; } /** * * *
     * Producer policy inherited from the closet ancestor of the current consumer.
     * 
* * .google.api.serviceusage.v1beta1.ProducerQuotaPolicy producer_quota_policy = 7; */ public Builder setProducerQuotaPolicy( com.google.api.serviceusage.v1beta1.ProducerQuotaPolicy.Builder builderForValue) { if (producerQuotaPolicyBuilder_ == null) { producerQuotaPolicy_ = builderForValue.build(); } else { producerQuotaPolicyBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000020; onChanged(); return this; } /** * * *
     * Producer policy inherited from the closet ancestor of the current consumer.
     * 
* * .google.api.serviceusage.v1beta1.ProducerQuotaPolicy producer_quota_policy = 7; */ public Builder mergeProducerQuotaPolicy( com.google.api.serviceusage.v1beta1.ProducerQuotaPolicy value) { if (producerQuotaPolicyBuilder_ == null) { if (((bitField0_ & 0x00000020) != 0) && producerQuotaPolicy_ != null && producerQuotaPolicy_ != com.google.api.serviceusage.v1beta1.ProducerQuotaPolicy.getDefaultInstance()) { getProducerQuotaPolicyBuilder().mergeFrom(value); } else { producerQuotaPolicy_ = value; } } else { producerQuotaPolicyBuilder_.mergeFrom(value); } if (producerQuotaPolicy_ != null) { bitField0_ |= 0x00000020; onChanged(); } return this; } /** * * *
     * Producer policy inherited from the closet ancestor of the current consumer.
     * 
* * .google.api.serviceusage.v1beta1.ProducerQuotaPolicy producer_quota_policy = 7; */ public Builder clearProducerQuotaPolicy() { bitField0_ = (bitField0_ & ~0x00000020); producerQuotaPolicy_ = null; if (producerQuotaPolicyBuilder_ != null) { producerQuotaPolicyBuilder_.dispose(); producerQuotaPolicyBuilder_ = null; } onChanged(); return this; } /** * * *
     * Producer policy inherited from the closet ancestor of the current consumer.
     * 
* * .google.api.serviceusage.v1beta1.ProducerQuotaPolicy producer_quota_policy = 7; */ public com.google.api.serviceusage.v1beta1.ProducerQuotaPolicy.Builder getProducerQuotaPolicyBuilder() { bitField0_ |= 0x00000020; onChanged(); return getProducerQuotaPolicyFieldBuilder().getBuilder(); } /** * * *
     * Producer policy inherited from the closet ancestor of the current consumer.
     * 
* * .google.api.serviceusage.v1beta1.ProducerQuotaPolicy producer_quota_policy = 7; */ public com.google.api.serviceusage.v1beta1.ProducerQuotaPolicyOrBuilder getProducerQuotaPolicyOrBuilder() { if (producerQuotaPolicyBuilder_ != null) { return producerQuotaPolicyBuilder_.getMessageOrBuilder(); } else { return producerQuotaPolicy_ == null ? com.google.api.serviceusage.v1beta1.ProducerQuotaPolicy.getDefaultInstance() : producerQuotaPolicy_; } } /** * * *
     * Producer policy inherited from the closet ancestor of the current consumer.
     * 
* * .google.api.serviceusage.v1beta1.ProducerQuotaPolicy producer_quota_policy = 7; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.api.serviceusage.v1beta1.ProducerQuotaPolicy, com.google.api.serviceusage.v1beta1.ProducerQuotaPolicy.Builder, com.google.api.serviceusage.v1beta1.ProducerQuotaPolicyOrBuilder> getProducerQuotaPolicyFieldBuilder() { if (producerQuotaPolicyBuilder_ == null) { producerQuotaPolicyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.api.serviceusage.v1beta1.ProducerQuotaPolicy, com.google.api.serviceusage.v1beta1.ProducerQuotaPolicy.Builder, com.google.api.serviceusage.v1beta1.ProducerQuotaPolicyOrBuilder>( getProducerQuotaPolicy(), getParentForChildren(), isClean()); producerQuotaPolicy_ = null; } return producerQuotaPolicyBuilder_; } private com.google.protobuf.MapField dimensions_; private com.google.protobuf.MapField internalGetDimensions() { if (dimensions_ == null) { return com.google.protobuf.MapField.emptyMapField( DimensionsDefaultEntryHolder.defaultEntry); } return dimensions_; } private com.google.protobuf.MapField internalGetMutableDimensions() { if (dimensions_ == null) { dimensions_ = com.google.protobuf.MapField.newMapField(DimensionsDefaultEntryHolder.defaultEntry); } if (!dimensions_.isMutable()) { dimensions_ = dimensions_.copy(); } bitField0_ |= 0x00000040; onChanged(); return dimensions_; } public int getDimensionsCount() { return internalGetDimensions().getMap().size(); } /** * * *
     * 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; */ @java.lang.Override public boolean containsDimensions(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetDimensions().getMap().containsKey(key); } /** Use {@link #getDimensionsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getDimensions() { return 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; */ @java.lang.Override public java.util.Map getDimensionsMap() { return internalGetDimensions().getMap(); } /** * * *
     * 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; */ @java.lang.Override public /* nullable */ java.lang.String getDimensionsOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetDimensions().getMap(); return map.containsKey(key) ? map.get(key) : 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; */ @java.lang.Override public java.lang.String getDimensionsOrThrow(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetDimensions().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public Builder clearDimensions() { bitField0_ = (bitField0_ & ~0x00000040); internalGetMutableDimensions().getMutableMap().clear(); return this; } /** * * *
     * 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; */ public Builder removeDimensions(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } internalGetMutableDimensions().getMutableMap().remove(key); return this; } /** Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableDimensions() { bitField0_ |= 0x00000040; return internalGetMutableDimensions().getMutableMap(); } /** * * *
     * 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; */ public Builder putDimensions(java.lang.String key, java.lang.String value) { if (key == null) { throw new NullPointerException("map key"); } if (value == null) { throw new NullPointerException("map value"); } internalGetMutableDimensions().getMutableMap().put(key, value); bitField0_ |= 0x00000040; return this; } /** * * *
     * 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; */ public Builder putAllDimensions(java.util.Map values) { internalGetMutableDimensions().getMutableMap().putAll(values); bitField0_ |= 0x00000040; return this; } @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.api.serviceusage.v1beta1.QuotaBucket) } // @@protoc_insertion_point(class_scope:google.api.serviceusage.v1beta1.QuotaBucket) private static final com.google.api.serviceusage.v1beta1.QuotaBucket DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.api.serviceusage.v1beta1.QuotaBucket(); } public static com.google.api.serviceusage.v1beta1.QuotaBucket getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public QuotaBucket parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.api.serviceusage.v1beta1.QuotaBucket getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy