1 /* 2 * Copyright 2020 Google LLC 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * https://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 // Generated by the protocol buffer compiler. DO NOT EDIT! 17 // source: google/api/serviceusage/v1beta1/resources.proto 18 19 package com.google.api.serviceusage.v1beta1; 20 21 /** 22 * 23 * 24 * <pre> 25 * Consumer quota settings for a quota limit. 26 * </pre> 27 * 28 * Protobuf type {@code google.api.serviceusage.v1beta1.ConsumerQuotaLimit} 29 */ 30 public final class ConsumerQuotaLimit extends com.google.protobuf.GeneratedMessageV3 31 implements 32 // @@protoc_insertion_point(message_implements:google.api.serviceusage.v1beta1.ConsumerQuotaLimit) 33 ConsumerQuotaLimitOrBuilder { 34 private static final long serialVersionUID = 0L; 35 // Use ConsumerQuotaLimit.newBuilder() to construct. ConsumerQuotaLimit(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36 private ConsumerQuotaLimit(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 37 super(builder); 38 } 39 ConsumerQuotaLimit()40 private ConsumerQuotaLimit() { 41 name_ = ""; 42 metric_ = ""; 43 unit_ = ""; 44 quotaBuckets_ = java.util.Collections.emptyList(); 45 } 46 47 @java.lang.Override 48 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)49 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 50 return new ConsumerQuotaLimit(); 51 } 52 53 @java.lang.Override getUnknownFields()54 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 55 return this.unknownFields; 56 } 57 getDescriptor()58 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 59 return com.google.api.serviceusage.v1beta1.ResourcesProto 60 .internal_static_google_api_serviceusage_v1beta1_ConsumerQuotaLimit_descriptor; 61 } 62 63 @java.lang.Override 64 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()65 internalGetFieldAccessorTable() { 66 return com.google.api.serviceusage.v1beta1.ResourcesProto 67 .internal_static_google_api_serviceusage_v1beta1_ConsumerQuotaLimit_fieldAccessorTable 68 .ensureFieldAccessorsInitialized( 69 com.google.api.serviceusage.v1beta1.ConsumerQuotaLimit.class, 70 com.google.api.serviceusage.v1beta1.ConsumerQuotaLimit.Builder.class); 71 } 72 73 public static final int NAME_FIELD_NUMBER = 1; 74 75 @SuppressWarnings("serial") 76 private volatile java.lang.Object name_ = ""; 77 /** 78 * 79 * 80 * <pre> 81 * The resource name of the quota limit. 82 * An example name would be: 83 * `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion` 84 * The resource name is intended to be opaque and should not be parsed for 85 * its component strings, since its representation could change in the future. 86 * </pre> 87 * 88 * <code>string name = 1;</code> 89 * 90 * @return The name. 91 */ 92 @java.lang.Override getName()93 public java.lang.String getName() { 94 java.lang.Object ref = name_; 95 if (ref instanceof java.lang.String) { 96 return (java.lang.String) ref; 97 } else { 98 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 99 java.lang.String s = bs.toStringUtf8(); 100 name_ = s; 101 return s; 102 } 103 } 104 /** 105 * 106 * 107 * <pre> 108 * The resource name of the quota limit. 109 * An example name would be: 110 * `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion` 111 * The resource name is intended to be opaque and should not be parsed for 112 * its component strings, since its representation could change in the future. 113 * </pre> 114 * 115 * <code>string name = 1;</code> 116 * 117 * @return The bytes for name. 118 */ 119 @java.lang.Override getNameBytes()120 public com.google.protobuf.ByteString getNameBytes() { 121 java.lang.Object ref = name_; 122 if (ref instanceof java.lang.String) { 123 com.google.protobuf.ByteString b = 124 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 125 name_ = b; 126 return b; 127 } else { 128 return (com.google.protobuf.ByteString) ref; 129 } 130 } 131 132 public static final int METRIC_FIELD_NUMBER = 8; 133 134 @SuppressWarnings("serial") 135 private volatile java.lang.Object metric_ = ""; 136 /** 137 * 138 * 139 * <pre> 140 * The name of the parent metric of this limit. 141 * An example name would be: 142 * `compute.googleapis.com/cpus` 143 * </pre> 144 * 145 * <code>string metric = 8;</code> 146 * 147 * @return The metric. 148 */ 149 @java.lang.Override getMetric()150 public java.lang.String getMetric() { 151 java.lang.Object ref = metric_; 152 if (ref instanceof java.lang.String) { 153 return (java.lang.String) ref; 154 } else { 155 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 156 java.lang.String s = bs.toStringUtf8(); 157 metric_ = s; 158 return s; 159 } 160 } 161 /** 162 * 163 * 164 * <pre> 165 * The name of the parent metric of this limit. 166 * An example name would be: 167 * `compute.googleapis.com/cpus` 168 * </pre> 169 * 170 * <code>string metric = 8;</code> 171 * 172 * @return The bytes for metric. 173 */ 174 @java.lang.Override getMetricBytes()175 public com.google.protobuf.ByteString getMetricBytes() { 176 java.lang.Object ref = metric_; 177 if (ref instanceof java.lang.String) { 178 com.google.protobuf.ByteString b = 179 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 180 metric_ = b; 181 return b; 182 } else { 183 return (com.google.protobuf.ByteString) ref; 184 } 185 } 186 187 public static final int UNIT_FIELD_NUMBER = 2; 188 189 @SuppressWarnings("serial") 190 private volatile java.lang.Object unit_ = ""; 191 /** 192 * 193 * 194 * <pre> 195 * The limit unit. 196 * An example unit would be 197 * `1/{project}/{region}` 198 * Note that `{project}` and `{region}` are not placeholders in this example; 199 * the literal characters `{` and `}` occur in the string. 200 * </pre> 201 * 202 * <code>string unit = 2;</code> 203 * 204 * @return The unit. 205 */ 206 @java.lang.Override getUnit()207 public java.lang.String getUnit() { 208 java.lang.Object ref = unit_; 209 if (ref instanceof java.lang.String) { 210 return (java.lang.String) ref; 211 } else { 212 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 213 java.lang.String s = bs.toStringUtf8(); 214 unit_ = s; 215 return s; 216 } 217 } 218 /** 219 * 220 * 221 * <pre> 222 * The limit unit. 223 * An example unit would be 224 * `1/{project}/{region}` 225 * Note that `{project}` and `{region}` are not placeholders in this example; 226 * the literal characters `{` and `}` occur in the string. 227 * </pre> 228 * 229 * <code>string unit = 2;</code> 230 * 231 * @return The bytes for unit. 232 */ 233 @java.lang.Override getUnitBytes()234 public com.google.protobuf.ByteString getUnitBytes() { 235 java.lang.Object ref = unit_; 236 if (ref instanceof java.lang.String) { 237 com.google.protobuf.ByteString b = 238 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 239 unit_ = b; 240 return b; 241 } else { 242 return (com.google.protobuf.ByteString) ref; 243 } 244 } 245 246 public static final int IS_PRECISE_FIELD_NUMBER = 3; 247 private boolean isPrecise_ = false; 248 /** 249 * 250 * 251 * <pre> 252 * Whether this limit is precise or imprecise. 253 * </pre> 254 * 255 * <code>bool is_precise = 3;</code> 256 * 257 * @return The isPrecise. 258 */ 259 @java.lang.Override getIsPrecise()260 public boolean getIsPrecise() { 261 return isPrecise_; 262 } 263 264 public static final int ALLOWS_ADMIN_OVERRIDES_FIELD_NUMBER = 7; 265 private boolean allowsAdminOverrides_ = false; 266 /** 267 * 268 * 269 * <pre> 270 * Whether admin overrides are allowed on this limit 271 * </pre> 272 * 273 * <code>bool allows_admin_overrides = 7;</code> 274 * 275 * @return The allowsAdminOverrides. 276 */ 277 @java.lang.Override getAllowsAdminOverrides()278 public boolean getAllowsAdminOverrides() { 279 return allowsAdminOverrides_; 280 } 281 282 public static final int QUOTA_BUCKETS_FIELD_NUMBER = 9; 283 284 @SuppressWarnings("serial") 285 private java.util.List<com.google.api.serviceusage.v1beta1.QuotaBucket> quotaBuckets_; 286 /** 287 * 288 * 289 * <pre> 290 * Summary of the enforced quota buckets, organized by quota dimension, 291 * ordered from least specific to most specific (for example, the global 292 * default bucket, with no quota dimensions, will always appear first). 293 * </pre> 294 * 295 * <code>repeated .google.api.serviceusage.v1beta1.QuotaBucket quota_buckets = 9;</code> 296 */ 297 @java.lang.Override getQuotaBucketsList()298 public java.util.List<com.google.api.serviceusage.v1beta1.QuotaBucket> getQuotaBucketsList() { 299 return quotaBuckets_; 300 } 301 /** 302 * 303 * 304 * <pre> 305 * Summary of the enforced quota buckets, organized by quota dimension, 306 * ordered from least specific to most specific (for example, the global 307 * default bucket, with no quota dimensions, will always appear first). 308 * </pre> 309 * 310 * <code>repeated .google.api.serviceusage.v1beta1.QuotaBucket quota_buckets = 9;</code> 311 */ 312 @java.lang.Override 313 public java.util.List<? extends com.google.api.serviceusage.v1beta1.QuotaBucketOrBuilder> getQuotaBucketsOrBuilderList()314 getQuotaBucketsOrBuilderList() { 315 return quotaBuckets_; 316 } 317 /** 318 * 319 * 320 * <pre> 321 * Summary of the enforced quota buckets, organized by quota dimension, 322 * ordered from least specific to most specific (for example, the global 323 * default bucket, with no quota dimensions, will always appear first). 324 * </pre> 325 * 326 * <code>repeated .google.api.serviceusage.v1beta1.QuotaBucket quota_buckets = 9;</code> 327 */ 328 @java.lang.Override getQuotaBucketsCount()329 public int getQuotaBucketsCount() { 330 return quotaBuckets_.size(); 331 } 332 /** 333 * 334 * 335 * <pre> 336 * Summary of the enforced quota buckets, organized by quota dimension, 337 * ordered from least specific to most specific (for example, the global 338 * default bucket, with no quota dimensions, will always appear first). 339 * </pre> 340 * 341 * <code>repeated .google.api.serviceusage.v1beta1.QuotaBucket quota_buckets = 9;</code> 342 */ 343 @java.lang.Override getQuotaBuckets(int index)344 public com.google.api.serviceusage.v1beta1.QuotaBucket getQuotaBuckets(int index) { 345 return quotaBuckets_.get(index); 346 } 347 /** 348 * 349 * 350 * <pre> 351 * Summary of the enforced quota buckets, organized by quota dimension, 352 * ordered from least specific to most specific (for example, the global 353 * default bucket, with no quota dimensions, will always appear first). 354 * </pre> 355 * 356 * <code>repeated .google.api.serviceusage.v1beta1.QuotaBucket quota_buckets = 9;</code> 357 */ 358 @java.lang.Override getQuotaBucketsOrBuilder( int index)359 public com.google.api.serviceusage.v1beta1.QuotaBucketOrBuilder getQuotaBucketsOrBuilder( 360 int index) { 361 return quotaBuckets_.get(index); 362 } 363 364 private byte memoizedIsInitialized = -1; 365 366 @java.lang.Override isInitialized()367 public final boolean isInitialized() { 368 byte isInitialized = memoizedIsInitialized; 369 if (isInitialized == 1) return true; 370 if (isInitialized == 0) return false; 371 372 memoizedIsInitialized = 1; 373 return true; 374 } 375 376 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)377 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 378 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { 379 com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); 380 } 381 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(unit_)) { 382 com.google.protobuf.GeneratedMessageV3.writeString(output, 2, unit_); 383 } 384 if (isPrecise_ != false) { 385 output.writeBool(3, isPrecise_); 386 } 387 if (allowsAdminOverrides_ != false) { 388 output.writeBool(7, allowsAdminOverrides_); 389 } 390 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(metric_)) { 391 com.google.protobuf.GeneratedMessageV3.writeString(output, 8, metric_); 392 } 393 for (int i = 0; i < quotaBuckets_.size(); i++) { 394 output.writeMessage(9, quotaBuckets_.get(i)); 395 } 396 getUnknownFields().writeTo(output); 397 } 398 399 @java.lang.Override getSerializedSize()400 public int getSerializedSize() { 401 int size = memoizedSize; 402 if (size != -1) return size; 403 404 size = 0; 405 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { 406 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); 407 } 408 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(unit_)) { 409 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, unit_); 410 } 411 if (isPrecise_ != false) { 412 size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, isPrecise_); 413 } 414 if (allowsAdminOverrides_ != false) { 415 size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, allowsAdminOverrides_); 416 } 417 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(metric_)) { 418 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, metric_); 419 } 420 for (int i = 0; i < quotaBuckets_.size(); i++) { 421 size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, quotaBuckets_.get(i)); 422 } 423 size += getUnknownFields().getSerializedSize(); 424 memoizedSize = size; 425 return size; 426 } 427 428 @java.lang.Override equals(final java.lang.Object obj)429 public boolean equals(final java.lang.Object obj) { 430 if (obj == this) { 431 return true; 432 } 433 if (!(obj instanceof com.google.api.serviceusage.v1beta1.ConsumerQuotaLimit)) { 434 return super.equals(obj); 435 } 436 com.google.api.serviceusage.v1beta1.ConsumerQuotaLimit other = 437 (com.google.api.serviceusage.v1beta1.ConsumerQuotaLimit) obj; 438 439 if (!getName().equals(other.getName())) return false; 440 if (!getMetric().equals(other.getMetric())) return false; 441 if (!getUnit().equals(other.getUnit())) return false; 442 if (getIsPrecise() != other.getIsPrecise()) return false; 443 if (getAllowsAdminOverrides() != other.getAllowsAdminOverrides()) return false; 444 if (!getQuotaBucketsList().equals(other.getQuotaBucketsList())) return false; 445 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 446 return true; 447 } 448 449 @java.lang.Override hashCode()450 public int hashCode() { 451 if (memoizedHashCode != 0) { 452 return memoizedHashCode; 453 } 454 int hash = 41; 455 hash = (19 * hash) + getDescriptor().hashCode(); 456 hash = (37 * hash) + NAME_FIELD_NUMBER; 457 hash = (53 * hash) + getName().hashCode(); 458 hash = (37 * hash) + METRIC_FIELD_NUMBER; 459 hash = (53 * hash) + getMetric().hashCode(); 460 hash = (37 * hash) + UNIT_FIELD_NUMBER; 461 hash = (53 * hash) + getUnit().hashCode(); 462 hash = (37 * hash) + IS_PRECISE_FIELD_NUMBER; 463 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsPrecise()); 464 hash = (37 * hash) + ALLOWS_ADMIN_OVERRIDES_FIELD_NUMBER; 465 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowsAdminOverrides()); 466 if (getQuotaBucketsCount() > 0) { 467 hash = (37 * hash) + QUOTA_BUCKETS_FIELD_NUMBER; 468 hash = (53 * hash) + getQuotaBucketsList().hashCode(); 469 } 470 hash = (29 * hash) + getUnknownFields().hashCode(); 471 memoizedHashCode = hash; 472 return hash; 473 } 474 parseFrom( java.nio.ByteBuffer data)475 public static com.google.api.serviceusage.v1beta1.ConsumerQuotaLimit parseFrom( 476 java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { 477 return PARSER.parseFrom(data); 478 } 479 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)480 public static com.google.api.serviceusage.v1beta1.ConsumerQuotaLimit parseFrom( 481 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 482 throws com.google.protobuf.InvalidProtocolBufferException { 483 return PARSER.parseFrom(data, extensionRegistry); 484 } 485 parseFrom( com.google.protobuf.ByteString data)486 public static com.google.api.serviceusage.v1beta1.ConsumerQuotaLimit parseFrom( 487 com.google.protobuf.ByteString data) 488 throws com.google.protobuf.InvalidProtocolBufferException { 489 return PARSER.parseFrom(data); 490 } 491 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)492 public static com.google.api.serviceusage.v1beta1.ConsumerQuotaLimit parseFrom( 493 com.google.protobuf.ByteString data, 494 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 495 throws com.google.protobuf.InvalidProtocolBufferException { 496 return PARSER.parseFrom(data, extensionRegistry); 497 } 498 parseFrom(byte[] data)499 public static com.google.api.serviceusage.v1beta1.ConsumerQuotaLimit parseFrom(byte[] data) 500 throws com.google.protobuf.InvalidProtocolBufferException { 501 return PARSER.parseFrom(data); 502 } 503 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)504 public static com.google.api.serviceusage.v1beta1.ConsumerQuotaLimit parseFrom( 505 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 506 throws com.google.protobuf.InvalidProtocolBufferException { 507 return PARSER.parseFrom(data, extensionRegistry); 508 } 509 parseFrom( java.io.InputStream input)510 public static com.google.api.serviceusage.v1beta1.ConsumerQuotaLimit parseFrom( 511 java.io.InputStream input) throws java.io.IOException { 512 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 513 } 514 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)515 public static com.google.api.serviceusage.v1beta1.ConsumerQuotaLimit parseFrom( 516 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 517 throws java.io.IOException { 518 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 519 PARSER, input, extensionRegistry); 520 } 521 parseDelimitedFrom( java.io.InputStream input)522 public static com.google.api.serviceusage.v1beta1.ConsumerQuotaLimit parseDelimitedFrom( 523 java.io.InputStream input) throws java.io.IOException { 524 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 525 } 526 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)527 public static com.google.api.serviceusage.v1beta1.ConsumerQuotaLimit parseDelimitedFrom( 528 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 529 throws java.io.IOException { 530 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 531 PARSER, input, extensionRegistry); 532 } 533 parseFrom( com.google.protobuf.CodedInputStream input)534 public static com.google.api.serviceusage.v1beta1.ConsumerQuotaLimit parseFrom( 535 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 536 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 537 } 538 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)539 public static com.google.api.serviceusage.v1beta1.ConsumerQuotaLimit parseFrom( 540 com.google.protobuf.CodedInputStream input, 541 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 542 throws java.io.IOException { 543 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 544 PARSER, input, extensionRegistry); 545 } 546 547 @java.lang.Override newBuilderForType()548 public Builder newBuilderForType() { 549 return newBuilder(); 550 } 551 newBuilder()552 public static Builder newBuilder() { 553 return DEFAULT_INSTANCE.toBuilder(); 554 } 555 newBuilder( com.google.api.serviceusage.v1beta1.ConsumerQuotaLimit prototype)556 public static Builder newBuilder( 557 com.google.api.serviceusage.v1beta1.ConsumerQuotaLimit prototype) { 558 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 559 } 560 561 @java.lang.Override toBuilder()562 public Builder toBuilder() { 563 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 564 } 565 566 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)567 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 568 Builder builder = new Builder(parent); 569 return builder; 570 } 571 /** 572 * 573 * 574 * <pre> 575 * Consumer quota settings for a quota limit. 576 * </pre> 577 * 578 * Protobuf type {@code google.api.serviceusage.v1beta1.ConsumerQuotaLimit} 579 */ 580 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 581 implements 582 // @@protoc_insertion_point(builder_implements:google.api.serviceusage.v1beta1.ConsumerQuotaLimit) 583 com.google.api.serviceusage.v1beta1.ConsumerQuotaLimitOrBuilder { getDescriptor()584 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 585 return com.google.api.serviceusage.v1beta1.ResourcesProto 586 .internal_static_google_api_serviceusage_v1beta1_ConsumerQuotaLimit_descriptor; 587 } 588 589 @java.lang.Override 590 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()591 internalGetFieldAccessorTable() { 592 return com.google.api.serviceusage.v1beta1.ResourcesProto 593 .internal_static_google_api_serviceusage_v1beta1_ConsumerQuotaLimit_fieldAccessorTable 594 .ensureFieldAccessorsInitialized( 595 com.google.api.serviceusage.v1beta1.ConsumerQuotaLimit.class, 596 com.google.api.serviceusage.v1beta1.ConsumerQuotaLimit.Builder.class); 597 } 598 599 // Construct using com.google.api.serviceusage.v1beta1.ConsumerQuotaLimit.newBuilder() Builder()600 private Builder() {} 601 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)602 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 603 super(parent); 604 } 605 606 @java.lang.Override clear()607 public Builder clear() { 608 super.clear(); 609 bitField0_ = 0; 610 name_ = ""; 611 metric_ = ""; 612 unit_ = ""; 613 isPrecise_ = false; 614 allowsAdminOverrides_ = false; 615 if (quotaBucketsBuilder_ == null) { 616 quotaBuckets_ = java.util.Collections.emptyList(); 617 } else { 618 quotaBuckets_ = null; 619 quotaBucketsBuilder_.clear(); 620 } 621 bitField0_ = (bitField0_ & ~0x00000020); 622 return this; 623 } 624 625 @java.lang.Override getDescriptorForType()626 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 627 return com.google.api.serviceusage.v1beta1.ResourcesProto 628 .internal_static_google_api_serviceusage_v1beta1_ConsumerQuotaLimit_descriptor; 629 } 630 631 @java.lang.Override getDefaultInstanceForType()632 public com.google.api.serviceusage.v1beta1.ConsumerQuotaLimit getDefaultInstanceForType() { 633 return com.google.api.serviceusage.v1beta1.ConsumerQuotaLimit.getDefaultInstance(); 634 } 635 636 @java.lang.Override build()637 public com.google.api.serviceusage.v1beta1.ConsumerQuotaLimit build() { 638 com.google.api.serviceusage.v1beta1.ConsumerQuotaLimit result = buildPartial(); 639 if (!result.isInitialized()) { 640 throw newUninitializedMessageException(result); 641 } 642 return result; 643 } 644 645 @java.lang.Override buildPartial()646 public com.google.api.serviceusage.v1beta1.ConsumerQuotaLimit buildPartial() { 647 com.google.api.serviceusage.v1beta1.ConsumerQuotaLimit result = 648 new com.google.api.serviceusage.v1beta1.ConsumerQuotaLimit(this); 649 buildPartialRepeatedFields(result); 650 if (bitField0_ != 0) { 651 buildPartial0(result); 652 } 653 onBuilt(); 654 return result; 655 } 656 buildPartialRepeatedFields( com.google.api.serviceusage.v1beta1.ConsumerQuotaLimit result)657 private void buildPartialRepeatedFields( 658 com.google.api.serviceusage.v1beta1.ConsumerQuotaLimit result) { 659 if (quotaBucketsBuilder_ == null) { 660 if (((bitField0_ & 0x00000020) != 0)) { 661 quotaBuckets_ = java.util.Collections.unmodifiableList(quotaBuckets_); 662 bitField0_ = (bitField0_ & ~0x00000020); 663 } 664 result.quotaBuckets_ = quotaBuckets_; 665 } else { 666 result.quotaBuckets_ = quotaBucketsBuilder_.build(); 667 } 668 } 669 buildPartial0(com.google.api.serviceusage.v1beta1.ConsumerQuotaLimit result)670 private void buildPartial0(com.google.api.serviceusage.v1beta1.ConsumerQuotaLimit result) { 671 int from_bitField0_ = bitField0_; 672 if (((from_bitField0_ & 0x00000001) != 0)) { 673 result.name_ = name_; 674 } 675 if (((from_bitField0_ & 0x00000002) != 0)) { 676 result.metric_ = metric_; 677 } 678 if (((from_bitField0_ & 0x00000004) != 0)) { 679 result.unit_ = unit_; 680 } 681 if (((from_bitField0_ & 0x00000008) != 0)) { 682 result.isPrecise_ = isPrecise_; 683 } 684 if (((from_bitField0_ & 0x00000010) != 0)) { 685 result.allowsAdminOverrides_ = allowsAdminOverrides_; 686 } 687 } 688 689 @java.lang.Override clone()690 public Builder clone() { 691 return super.clone(); 692 } 693 694 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)695 public Builder setField( 696 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 697 return super.setField(field, value); 698 } 699 700 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)701 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 702 return super.clearField(field); 703 } 704 705 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)706 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 707 return super.clearOneof(oneof); 708 } 709 710 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)711 public Builder setRepeatedField( 712 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 713 return super.setRepeatedField(field, index, value); 714 } 715 716 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)717 public Builder addRepeatedField( 718 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 719 return super.addRepeatedField(field, value); 720 } 721 722 @java.lang.Override mergeFrom(com.google.protobuf.Message other)723 public Builder mergeFrom(com.google.protobuf.Message other) { 724 if (other instanceof com.google.api.serviceusage.v1beta1.ConsumerQuotaLimit) { 725 return mergeFrom((com.google.api.serviceusage.v1beta1.ConsumerQuotaLimit) other); 726 } else { 727 super.mergeFrom(other); 728 return this; 729 } 730 } 731 mergeFrom(com.google.api.serviceusage.v1beta1.ConsumerQuotaLimit other)732 public Builder mergeFrom(com.google.api.serviceusage.v1beta1.ConsumerQuotaLimit other) { 733 if (other == com.google.api.serviceusage.v1beta1.ConsumerQuotaLimit.getDefaultInstance()) 734 return this; 735 if (!other.getName().isEmpty()) { 736 name_ = other.name_; 737 bitField0_ |= 0x00000001; 738 onChanged(); 739 } 740 if (!other.getMetric().isEmpty()) { 741 metric_ = other.metric_; 742 bitField0_ |= 0x00000002; 743 onChanged(); 744 } 745 if (!other.getUnit().isEmpty()) { 746 unit_ = other.unit_; 747 bitField0_ |= 0x00000004; 748 onChanged(); 749 } 750 if (other.getIsPrecise() != false) { 751 setIsPrecise(other.getIsPrecise()); 752 } 753 if (other.getAllowsAdminOverrides() != false) { 754 setAllowsAdminOverrides(other.getAllowsAdminOverrides()); 755 } 756 if (quotaBucketsBuilder_ == null) { 757 if (!other.quotaBuckets_.isEmpty()) { 758 if (quotaBuckets_.isEmpty()) { 759 quotaBuckets_ = other.quotaBuckets_; 760 bitField0_ = (bitField0_ & ~0x00000020); 761 } else { 762 ensureQuotaBucketsIsMutable(); 763 quotaBuckets_.addAll(other.quotaBuckets_); 764 } 765 onChanged(); 766 } 767 } else { 768 if (!other.quotaBuckets_.isEmpty()) { 769 if (quotaBucketsBuilder_.isEmpty()) { 770 quotaBucketsBuilder_.dispose(); 771 quotaBucketsBuilder_ = null; 772 quotaBuckets_ = other.quotaBuckets_; 773 bitField0_ = (bitField0_ & ~0x00000020); 774 quotaBucketsBuilder_ = 775 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders 776 ? getQuotaBucketsFieldBuilder() 777 : null; 778 } else { 779 quotaBucketsBuilder_.addAllMessages(other.quotaBuckets_); 780 } 781 } 782 } 783 this.mergeUnknownFields(other.getUnknownFields()); 784 onChanged(); 785 return this; 786 } 787 788 @java.lang.Override isInitialized()789 public final boolean isInitialized() { 790 return true; 791 } 792 793 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)794 public Builder mergeFrom( 795 com.google.protobuf.CodedInputStream input, 796 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 797 throws java.io.IOException { 798 if (extensionRegistry == null) { 799 throw new java.lang.NullPointerException(); 800 } 801 try { 802 boolean done = false; 803 while (!done) { 804 int tag = input.readTag(); 805 switch (tag) { 806 case 0: 807 done = true; 808 break; 809 case 10: 810 { 811 name_ = input.readStringRequireUtf8(); 812 bitField0_ |= 0x00000001; 813 break; 814 } // case 10 815 case 18: 816 { 817 unit_ = input.readStringRequireUtf8(); 818 bitField0_ |= 0x00000004; 819 break; 820 } // case 18 821 case 24: 822 { 823 isPrecise_ = input.readBool(); 824 bitField0_ |= 0x00000008; 825 break; 826 } // case 24 827 case 56: 828 { 829 allowsAdminOverrides_ = input.readBool(); 830 bitField0_ |= 0x00000010; 831 break; 832 } // case 56 833 case 66: 834 { 835 metric_ = input.readStringRequireUtf8(); 836 bitField0_ |= 0x00000002; 837 break; 838 } // case 66 839 case 74: 840 { 841 com.google.api.serviceusage.v1beta1.QuotaBucket m = 842 input.readMessage( 843 com.google.api.serviceusage.v1beta1.QuotaBucket.parser(), 844 extensionRegistry); 845 if (quotaBucketsBuilder_ == null) { 846 ensureQuotaBucketsIsMutable(); 847 quotaBuckets_.add(m); 848 } else { 849 quotaBucketsBuilder_.addMessage(m); 850 } 851 break; 852 } // case 74 853 default: 854 { 855 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 856 done = true; // was an endgroup tag 857 } 858 break; 859 } // default: 860 } // switch (tag) 861 } // while (!done) 862 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 863 throw e.unwrapIOException(); 864 } finally { 865 onChanged(); 866 } // finally 867 return this; 868 } 869 870 private int bitField0_; 871 872 private java.lang.Object name_ = ""; 873 /** 874 * 875 * 876 * <pre> 877 * The resource name of the quota limit. 878 * An example name would be: 879 * `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion` 880 * The resource name is intended to be opaque and should not be parsed for 881 * its component strings, since its representation could change in the future. 882 * </pre> 883 * 884 * <code>string name = 1;</code> 885 * 886 * @return The name. 887 */ getName()888 public java.lang.String getName() { 889 java.lang.Object ref = name_; 890 if (!(ref instanceof java.lang.String)) { 891 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 892 java.lang.String s = bs.toStringUtf8(); 893 name_ = s; 894 return s; 895 } else { 896 return (java.lang.String) ref; 897 } 898 } 899 /** 900 * 901 * 902 * <pre> 903 * The resource name of the quota limit. 904 * An example name would be: 905 * `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion` 906 * The resource name is intended to be opaque and should not be parsed for 907 * its component strings, since its representation could change in the future. 908 * </pre> 909 * 910 * <code>string name = 1;</code> 911 * 912 * @return The bytes for name. 913 */ getNameBytes()914 public com.google.protobuf.ByteString getNameBytes() { 915 java.lang.Object ref = name_; 916 if (ref instanceof String) { 917 com.google.protobuf.ByteString b = 918 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 919 name_ = b; 920 return b; 921 } else { 922 return (com.google.protobuf.ByteString) ref; 923 } 924 } 925 /** 926 * 927 * 928 * <pre> 929 * The resource name of the quota limit. 930 * An example name would be: 931 * `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion` 932 * The resource name is intended to be opaque and should not be parsed for 933 * its component strings, since its representation could change in the future. 934 * </pre> 935 * 936 * <code>string name = 1;</code> 937 * 938 * @param value The name to set. 939 * @return This builder for chaining. 940 */ setName(java.lang.String value)941 public Builder setName(java.lang.String value) { 942 if (value == null) { 943 throw new NullPointerException(); 944 } 945 name_ = value; 946 bitField0_ |= 0x00000001; 947 onChanged(); 948 return this; 949 } 950 /** 951 * 952 * 953 * <pre> 954 * The resource name of the quota limit. 955 * An example name would be: 956 * `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion` 957 * The resource name is intended to be opaque and should not be parsed for 958 * its component strings, since its representation could change in the future. 959 * </pre> 960 * 961 * <code>string name = 1;</code> 962 * 963 * @return This builder for chaining. 964 */ clearName()965 public Builder clearName() { 966 name_ = getDefaultInstance().getName(); 967 bitField0_ = (bitField0_ & ~0x00000001); 968 onChanged(); 969 return this; 970 } 971 /** 972 * 973 * 974 * <pre> 975 * The resource name of the quota limit. 976 * An example name would be: 977 * `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion` 978 * The resource name is intended to be opaque and should not be parsed for 979 * its component strings, since its representation could change in the future. 980 * </pre> 981 * 982 * <code>string name = 1;</code> 983 * 984 * @param value The bytes for name to set. 985 * @return This builder for chaining. 986 */ setNameBytes(com.google.protobuf.ByteString value)987 public Builder setNameBytes(com.google.protobuf.ByteString value) { 988 if (value == null) { 989 throw new NullPointerException(); 990 } 991 checkByteStringIsUtf8(value); 992 name_ = value; 993 bitField0_ |= 0x00000001; 994 onChanged(); 995 return this; 996 } 997 998 private java.lang.Object metric_ = ""; 999 /** 1000 * 1001 * 1002 * <pre> 1003 * The name of the parent metric of this limit. 1004 * An example name would be: 1005 * `compute.googleapis.com/cpus` 1006 * </pre> 1007 * 1008 * <code>string metric = 8;</code> 1009 * 1010 * @return The metric. 1011 */ getMetric()1012 public java.lang.String getMetric() { 1013 java.lang.Object ref = metric_; 1014 if (!(ref instanceof java.lang.String)) { 1015 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1016 java.lang.String s = bs.toStringUtf8(); 1017 metric_ = s; 1018 return s; 1019 } else { 1020 return (java.lang.String) ref; 1021 } 1022 } 1023 /** 1024 * 1025 * 1026 * <pre> 1027 * The name of the parent metric of this limit. 1028 * An example name would be: 1029 * `compute.googleapis.com/cpus` 1030 * </pre> 1031 * 1032 * <code>string metric = 8;</code> 1033 * 1034 * @return The bytes for metric. 1035 */ getMetricBytes()1036 public com.google.protobuf.ByteString getMetricBytes() { 1037 java.lang.Object ref = metric_; 1038 if (ref instanceof String) { 1039 com.google.protobuf.ByteString b = 1040 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1041 metric_ = b; 1042 return b; 1043 } else { 1044 return (com.google.protobuf.ByteString) ref; 1045 } 1046 } 1047 /** 1048 * 1049 * 1050 * <pre> 1051 * The name of the parent metric of this limit. 1052 * An example name would be: 1053 * `compute.googleapis.com/cpus` 1054 * </pre> 1055 * 1056 * <code>string metric = 8;</code> 1057 * 1058 * @param value The metric to set. 1059 * @return This builder for chaining. 1060 */ setMetric(java.lang.String value)1061 public Builder setMetric(java.lang.String value) { 1062 if (value == null) { 1063 throw new NullPointerException(); 1064 } 1065 metric_ = value; 1066 bitField0_ |= 0x00000002; 1067 onChanged(); 1068 return this; 1069 } 1070 /** 1071 * 1072 * 1073 * <pre> 1074 * The name of the parent metric of this limit. 1075 * An example name would be: 1076 * `compute.googleapis.com/cpus` 1077 * </pre> 1078 * 1079 * <code>string metric = 8;</code> 1080 * 1081 * @return This builder for chaining. 1082 */ clearMetric()1083 public Builder clearMetric() { 1084 metric_ = getDefaultInstance().getMetric(); 1085 bitField0_ = (bitField0_ & ~0x00000002); 1086 onChanged(); 1087 return this; 1088 } 1089 /** 1090 * 1091 * 1092 * <pre> 1093 * The name of the parent metric of this limit. 1094 * An example name would be: 1095 * `compute.googleapis.com/cpus` 1096 * </pre> 1097 * 1098 * <code>string metric = 8;</code> 1099 * 1100 * @param value The bytes for metric to set. 1101 * @return This builder for chaining. 1102 */ setMetricBytes(com.google.protobuf.ByteString value)1103 public Builder setMetricBytes(com.google.protobuf.ByteString value) { 1104 if (value == null) { 1105 throw new NullPointerException(); 1106 } 1107 checkByteStringIsUtf8(value); 1108 metric_ = value; 1109 bitField0_ |= 0x00000002; 1110 onChanged(); 1111 return this; 1112 } 1113 1114 private java.lang.Object unit_ = ""; 1115 /** 1116 * 1117 * 1118 * <pre> 1119 * The limit unit. 1120 * An example unit would be 1121 * `1/{project}/{region}` 1122 * Note that `{project}` and `{region}` are not placeholders in this example; 1123 * the literal characters `{` and `}` occur in the string. 1124 * </pre> 1125 * 1126 * <code>string unit = 2;</code> 1127 * 1128 * @return The unit. 1129 */ getUnit()1130 public java.lang.String getUnit() { 1131 java.lang.Object ref = unit_; 1132 if (!(ref instanceof java.lang.String)) { 1133 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1134 java.lang.String s = bs.toStringUtf8(); 1135 unit_ = s; 1136 return s; 1137 } else { 1138 return (java.lang.String) ref; 1139 } 1140 } 1141 /** 1142 * 1143 * 1144 * <pre> 1145 * The limit unit. 1146 * An example unit would be 1147 * `1/{project}/{region}` 1148 * Note that `{project}` and `{region}` are not placeholders in this example; 1149 * the literal characters `{` and `}` occur in the string. 1150 * </pre> 1151 * 1152 * <code>string unit = 2;</code> 1153 * 1154 * @return The bytes for unit. 1155 */ getUnitBytes()1156 public com.google.protobuf.ByteString getUnitBytes() { 1157 java.lang.Object ref = unit_; 1158 if (ref instanceof String) { 1159 com.google.protobuf.ByteString b = 1160 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1161 unit_ = b; 1162 return b; 1163 } else { 1164 return (com.google.protobuf.ByteString) ref; 1165 } 1166 } 1167 /** 1168 * 1169 * 1170 * <pre> 1171 * The limit unit. 1172 * An example unit would be 1173 * `1/{project}/{region}` 1174 * Note that `{project}` and `{region}` are not placeholders in this example; 1175 * the literal characters `{` and `}` occur in the string. 1176 * </pre> 1177 * 1178 * <code>string unit = 2;</code> 1179 * 1180 * @param value The unit to set. 1181 * @return This builder for chaining. 1182 */ setUnit(java.lang.String value)1183 public Builder setUnit(java.lang.String value) { 1184 if (value == null) { 1185 throw new NullPointerException(); 1186 } 1187 unit_ = value; 1188 bitField0_ |= 0x00000004; 1189 onChanged(); 1190 return this; 1191 } 1192 /** 1193 * 1194 * 1195 * <pre> 1196 * The limit unit. 1197 * An example unit would be 1198 * `1/{project}/{region}` 1199 * Note that `{project}` and `{region}` are not placeholders in this example; 1200 * the literal characters `{` and `}` occur in the string. 1201 * </pre> 1202 * 1203 * <code>string unit = 2;</code> 1204 * 1205 * @return This builder for chaining. 1206 */ clearUnit()1207 public Builder clearUnit() { 1208 unit_ = getDefaultInstance().getUnit(); 1209 bitField0_ = (bitField0_ & ~0x00000004); 1210 onChanged(); 1211 return this; 1212 } 1213 /** 1214 * 1215 * 1216 * <pre> 1217 * The limit unit. 1218 * An example unit would be 1219 * `1/{project}/{region}` 1220 * Note that `{project}` and `{region}` are not placeholders in this example; 1221 * the literal characters `{` and `}` occur in the string. 1222 * </pre> 1223 * 1224 * <code>string unit = 2;</code> 1225 * 1226 * @param value The bytes for unit to set. 1227 * @return This builder for chaining. 1228 */ setUnitBytes(com.google.protobuf.ByteString value)1229 public Builder setUnitBytes(com.google.protobuf.ByteString value) { 1230 if (value == null) { 1231 throw new NullPointerException(); 1232 } 1233 checkByteStringIsUtf8(value); 1234 unit_ = value; 1235 bitField0_ |= 0x00000004; 1236 onChanged(); 1237 return this; 1238 } 1239 1240 private boolean isPrecise_; 1241 /** 1242 * 1243 * 1244 * <pre> 1245 * Whether this limit is precise or imprecise. 1246 * </pre> 1247 * 1248 * <code>bool is_precise = 3;</code> 1249 * 1250 * @return The isPrecise. 1251 */ 1252 @java.lang.Override getIsPrecise()1253 public boolean getIsPrecise() { 1254 return isPrecise_; 1255 } 1256 /** 1257 * 1258 * 1259 * <pre> 1260 * Whether this limit is precise or imprecise. 1261 * </pre> 1262 * 1263 * <code>bool is_precise = 3;</code> 1264 * 1265 * @param value The isPrecise to set. 1266 * @return This builder for chaining. 1267 */ setIsPrecise(boolean value)1268 public Builder setIsPrecise(boolean value) { 1269 1270 isPrecise_ = value; 1271 bitField0_ |= 0x00000008; 1272 onChanged(); 1273 return this; 1274 } 1275 /** 1276 * 1277 * 1278 * <pre> 1279 * Whether this limit is precise or imprecise. 1280 * </pre> 1281 * 1282 * <code>bool is_precise = 3;</code> 1283 * 1284 * @return This builder for chaining. 1285 */ clearIsPrecise()1286 public Builder clearIsPrecise() { 1287 bitField0_ = (bitField0_ & ~0x00000008); 1288 isPrecise_ = false; 1289 onChanged(); 1290 return this; 1291 } 1292 1293 private boolean allowsAdminOverrides_; 1294 /** 1295 * 1296 * 1297 * <pre> 1298 * Whether admin overrides are allowed on this limit 1299 * </pre> 1300 * 1301 * <code>bool allows_admin_overrides = 7;</code> 1302 * 1303 * @return The allowsAdminOverrides. 1304 */ 1305 @java.lang.Override getAllowsAdminOverrides()1306 public boolean getAllowsAdminOverrides() { 1307 return allowsAdminOverrides_; 1308 } 1309 /** 1310 * 1311 * 1312 * <pre> 1313 * Whether admin overrides are allowed on this limit 1314 * </pre> 1315 * 1316 * <code>bool allows_admin_overrides = 7;</code> 1317 * 1318 * @param value The allowsAdminOverrides to set. 1319 * @return This builder for chaining. 1320 */ setAllowsAdminOverrides(boolean value)1321 public Builder setAllowsAdminOverrides(boolean value) { 1322 1323 allowsAdminOverrides_ = value; 1324 bitField0_ |= 0x00000010; 1325 onChanged(); 1326 return this; 1327 } 1328 /** 1329 * 1330 * 1331 * <pre> 1332 * Whether admin overrides are allowed on this limit 1333 * </pre> 1334 * 1335 * <code>bool allows_admin_overrides = 7;</code> 1336 * 1337 * @return This builder for chaining. 1338 */ clearAllowsAdminOverrides()1339 public Builder clearAllowsAdminOverrides() { 1340 bitField0_ = (bitField0_ & ~0x00000010); 1341 allowsAdminOverrides_ = false; 1342 onChanged(); 1343 return this; 1344 } 1345 1346 private java.util.List<com.google.api.serviceusage.v1beta1.QuotaBucket> quotaBuckets_ = 1347 java.util.Collections.emptyList(); 1348 ensureQuotaBucketsIsMutable()1349 private void ensureQuotaBucketsIsMutable() { 1350 if (!((bitField0_ & 0x00000020) != 0)) { 1351 quotaBuckets_ = 1352 new java.util.ArrayList<com.google.api.serviceusage.v1beta1.QuotaBucket>(quotaBuckets_); 1353 bitField0_ |= 0x00000020; 1354 } 1355 } 1356 1357 private com.google.protobuf.RepeatedFieldBuilderV3< 1358 com.google.api.serviceusage.v1beta1.QuotaBucket, 1359 com.google.api.serviceusage.v1beta1.QuotaBucket.Builder, 1360 com.google.api.serviceusage.v1beta1.QuotaBucketOrBuilder> 1361 quotaBucketsBuilder_; 1362 1363 /** 1364 * 1365 * 1366 * <pre> 1367 * Summary of the enforced quota buckets, organized by quota dimension, 1368 * ordered from least specific to most specific (for example, the global 1369 * default bucket, with no quota dimensions, will always appear first). 1370 * </pre> 1371 * 1372 * <code>repeated .google.api.serviceusage.v1beta1.QuotaBucket quota_buckets = 9;</code> 1373 */ getQuotaBucketsList()1374 public java.util.List<com.google.api.serviceusage.v1beta1.QuotaBucket> getQuotaBucketsList() { 1375 if (quotaBucketsBuilder_ == null) { 1376 return java.util.Collections.unmodifiableList(quotaBuckets_); 1377 } else { 1378 return quotaBucketsBuilder_.getMessageList(); 1379 } 1380 } 1381 /** 1382 * 1383 * 1384 * <pre> 1385 * Summary of the enforced quota buckets, organized by quota dimension, 1386 * ordered from least specific to most specific (for example, the global 1387 * default bucket, with no quota dimensions, will always appear first). 1388 * </pre> 1389 * 1390 * <code>repeated .google.api.serviceusage.v1beta1.QuotaBucket quota_buckets = 9;</code> 1391 */ getQuotaBucketsCount()1392 public int getQuotaBucketsCount() { 1393 if (quotaBucketsBuilder_ == null) { 1394 return quotaBuckets_.size(); 1395 } else { 1396 return quotaBucketsBuilder_.getCount(); 1397 } 1398 } 1399 /** 1400 * 1401 * 1402 * <pre> 1403 * Summary of the enforced quota buckets, organized by quota dimension, 1404 * ordered from least specific to most specific (for example, the global 1405 * default bucket, with no quota dimensions, will always appear first). 1406 * </pre> 1407 * 1408 * <code>repeated .google.api.serviceusage.v1beta1.QuotaBucket quota_buckets = 9;</code> 1409 */ getQuotaBuckets(int index)1410 public com.google.api.serviceusage.v1beta1.QuotaBucket getQuotaBuckets(int index) { 1411 if (quotaBucketsBuilder_ == null) { 1412 return quotaBuckets_.get(index); 1413 } else { 1414 return quotaBucketsBuilder_.getMessage(index); 1415 } 1416 } 1417 /** 1418 * 1419 * 1420 * <pre> 1421 * Summary of the enforced quota buckets, organized by quota dimension, 1422 * ordered from least specific to most specific (for example, the global 1423 * default bucket, with no quota dimensions, will always appear first). 1424 * </pre> 1425 * 1426 * <code>repeated .google.api.serviceusage.v1beta1.QuotaBucket quota_buckets = 9;</code> 1427 */ setQuotaBuckets( int index, com.google.api.serviceusage.v1beta1.QuotaBucket value)1428 public Builder setQuotaBuckets( 1429 int index, com.google.api.serviceusage.v1beta1.QuotaBucket value) { 1430 if (quotaBucketsBuilder_ == null) { 1431 if (value == null) { 1432 throw new NullPointerException(); 1433 } 1434 ensureQuotaBucketsIsMutable(); 1435 quotaBuckets_.set(index, value); 1436 onChanged(); 1437 } else { 1438 quotaBucketsBuilder_.setMessage(index, value); 1439 } 1440 return this; 1441 } 1442 /** 1443 * 1444 * 1445 * <pre> 1446 * Summary of the enforced quota buckets, organized by quota dimension, 1447 * ordered from least specific to most specific (for example, the global 1448 * default bucket, with no quota dimensions, will always appear first). 1449 * </pre> 1450 * 1451 * <code>repeated .google.api.serviceusage.v1beta1.QuotaBucket quota_buckets = 9;</code> 1452 */ setQuotaBuckets( int index, com.google.api.serviceusage.v1beta1.QuotaBucket.Builder builderForValue)1453 public Builder setQuotaBuckets( 1454 int index, com.google.api.serviceusage.v1beta1.QuotaBucket.Builder builderForValue) { 1455 if (quotaBucketsBuilder_ == null) { 1456 ensureQuotaBucketsIsMutable(); 1457 quotaBuckets_.set(index, builderForValue.build()); 1458 onChanged(); 1459 } else { 1460 quotaBucketsBuilder_.setMessage(index, builderForValue.build()); 1461 } 1462 return this; 1463 } 1464 /** 1465 * 1466 * 1467 * <pre> 1468 * Summary of the enforced quota buckets, organized by quota dimension, 1469 * ordered from least specific to most specific (for example, the global 1470 * default bucket, with no quota dimensions, will always appear first). 1471 * </pre> 1472 * 1473 * <code>repeated .google.api.serviceusage.v1beta1.QuotaBucket quota_buckets = 9;</code> 1474 */ addQuotaBuckets(com.google.api.serviceusage.v1beta1.QuotaBucket value)1475 public Builder addQuotaBuckets(com.google.api.serviceusage.v1beta1.QuotaBucket value) { 1476 if (quotaBucketsBuilder_ == null) { 1477 if (value == null) { 1478 throw new NullPointerException(); 1479 } 1480 ensureQuotaBucketsIsMutable(); 1481 quotaBuckets_.add(value); 1482 onChanged(); 1483 } else { 1484 quotaBucketsBuilder_.addMessage(value); 1485 } 1486 return this; 1487 } 1488 /** 1489 * 1490 * 1491 * <pre> 1492 * Summary of the enforced quota buckets, organized by quota dimension, 1493 * ordered from least specific to most specific (for example, the global 1494 * default bucket, with no quota dimensions, will always appear first). 1495 * </pre> 1496 * 1497 * <code>repeated .google.api.serviceusage.v1beta1.QuotaBucket quota_buckets = 9;</code> 1498 */ addQuotaBuckets( int index, com.google.api.serviceusage.v1beta1.QuotaBucket value)1499 public Builder addQuotaBuckets( 1500 int index, com.google.api.serviceusage.v1beta1.QuotaBucket value) { 1501 if (quotaBucketsBuilder_ == null) { 1502 if (value == null) { 1503 throw new NullPointerException(); 1504 } 1505 ensureQuotaBucketsIsMutable(); 1506 quotaBuckets_.add(index, value); 1507 onChanged(); 1508 } else { 1509 quotaBucketsBuilder_.addMessage(index, value); 1510 } 1511 return this; 1512 } 1513 /** 1514 * 1515 * 1516 * <pre> 1517 * Summary of the enforced quota buckets, organized by quota dimension, 1518 * ordered from least specific to most specific (for example, the global 1519 * default bucket, with no quota dimensions, will always appear first). 1520 * </pre> 1521 * 1522 * <code>repeated .google.api.serviceusage.v1beta1.QuotaBucket quota_buckets = 9;</code> 1523 */ addQuotaBuckets( com.google.api.serviceusage.v1beta1.QuotaBucket.Builder builderForValue)1524 public Builder addQuotaBuckets( 1525 com.google.api.serviceusage.v1beta1.QuotaBucket.Builder builderForValue) { 1526 if (quotaBucketsBuilder_ == null) { 1527 ensureQuotaBucketsIsMutable(); 1528 quotaBuckets_.add(builderForValue.build()); 1529 onChanged(); 1530 } else { 1531 quotaBucketsBuilder_.addMessage(builderForValue.build()); 1532 } 1533 return this; 1534 } 1535 /** 1536 * 1537 * 1538 * <pre> 1539 * Summary of the enforced quota buckets, organized by quota dimension, 1540 * ordered from least specific to most specific (for example, the global 1541 * default bucket, with no quota dimensions, will always appear first). 1542 * </pre> 1543 * 1544 * <code>repeated .google.api.serviceusage.v1beta1.QuotaBucket quota_buckets = 9;</code> 1545 */ addQuotaBuckets( int index, com.google.api.serviceusage.v1beta1.QuotaBucket.Builder builderForValue)1546 public Builder addQuotaBuckets( 1547 int index, com.google.api.serviceusage.v1beta1.QuotaBucket.Builder builderForValue) { 1548 if (quotaBucketsBuilder_ == null) { 1549 ensureQuotaBucketsIsMutable(); 1550 quotaBuckets_.add(index, builderForValue.build()); 1551 onChanged(); 1552 } else { 1553 quotaBucketsBuilder_.addMessage(index, builderForValue.build()); 1554 } 1555 return this; 1556 } 1557 /** 1558 * 1559 * 1560 * <pre> 1561 * Summary of the enforced quota buckets, organized by quota dimension, 1562 * ordered from least specific to most specific (for example, the global 1563 * default bucket, with no quota dimensions, will always appear first). 1564 * </pre> 1565 * 1566 * <code>repeated .google.api.serviceusage.v1beta1.QuotaBucket quota_buckets = 9;</code> 1567 */ addAllQuotaBuckets( java.lang.Iterable<? extends com.google.api.serviceusage.v1beta1.QuotaBucket> values)1568 public Builder addAllQuotaBuckets( 1569 java.lang.Iterable<? extends com.google.api.serviceusage.v1beta1.QuotaBucket> values) { 1570 if (quotaBucketsBuilder_ == null) { 1571 ensureQuotaBucketsIsMutable(); 1572 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, quotaBuckets_); 1573 onChanged(); 1574 } else { 1575 quotaBucketsBuilder_.addAllMessages(values); 1576 } 1577 return this; 1578 } 1579 /** 1580 * 1581 * 1582 * <pre> 1583 * Summary of the enforced quota buckets, organized by quota dimension, 1584 * ordered from least specific to most specific (for example, the global 1585 * default bucket, with no quota dimensions, will always appear first). 1586 * </pre> 1587 * 1588 * <code>repeated .google.api.serviceusage.v1beta1.QuotaBucket quota_buckets = 9;</code> 1589 */ clearQuotaBuckets()1590 public Builder clearQuotaBuckets() { 1591 if (quotaBucketsBuilder_ == null) { 1592 quotaBuckets_ = java.util.Collections.emptyList(); 1593 bitField0_ = (bitField0_ & ~0x00000020); 1594 onChanged(); 1595 } else { 1596 quotaBucketsBuilder_.clear(); 1597 } 1598 return this; 1599 } 1600 /** 1601 * 1602 * 1603 * <pre> 1604 * Summary of the enforced quota buckets, organized by quota dimension, 1605 * ordered from least specific to most specific (for example, the global 1606 * default bucket, with no quota dimensions, will always appear first). 1607 * </pre> 1608 * 1609 * <code>repeated .google.api.serviceusage.v1beta1.QuotaBucket quota_buckets = 9;</code> 1610 */ removeQuotaBuckets(int index)1611 public Builder removeQuotaBuckets(int index) { 1612 if (quotaBucketsBuilder_ == null) { 1613 ensureQuotaBucketsIsMutable(); 1614 quotaBuckets_.remove(index); 1615 onChanged(); 1616 } else { 1617 quotaBucketsBuilder_.remove(index); 1618 } 1619 return this; 1620 } 1621 /** 1622 * 1623 * 1624 * <pre> 1625 * Summary of the enforced quota buckets, organized by quota dimension, 1626 * ordered from least specific to most specific (for example, the global 1627 * default bucket, with no quota dimensions, will always appear first). 1628 * </pre> 1629 * 1630 * <code>repeated .google.api.serviceusage.v1beta1.QuotaBucket quota_buckets = 9;</code> 1631 */ getQuotaBucketsBuilder( int index)1632 public com.google.api.serviceusage.v1beta1.QuotaBucket.Builder getQuotaBucketsBuilder( 1633 int index) { 1634 return getQuotaBucketsFieldBuilder().getBuilder(index); 1635 } 1636 /** 1637 * 1638 * 1639 * <pre> 1640 * Summary of the enforced quota buckets, organized by quota dimension, 1641 * ordered from least specific to most specific (for example, the global 1642 * default bucket, with no quota dimensions, will always appear first). 1643 * </pre> 1644 * 1645 * <code>repeated .google.api.serviceusage.v1beta1.QuotaBucket quota_buckets = 9;</code> 1646 */ getQuotaBucketsOrBuilder( int index)1647 public com.google.api.serviceusage.v1beta1.QuotaBucketOrBuilder getQuotaBucketsOrBuilder( 1648 int index) { 1649 if (quotaBucketsBuilder_ == null) { 1650 return quotaBuckets_.get(index); 1651 } else { 1652 return quotaBucketsBuilder_.getMessageOrBuilder(index); 1653 } 1654 } 1655 /** 1656 * 1657 * 1658 * <pre> 1659 * Summary of the enforced quota buckets, organized by quota dimension, 1660 * ordered from least specific to most specific (for example, the global 1661 * default bucket, with no quota dimensions, will always appear first). 1662 * </pre> 1663 * 1664 * <code>repeated .google.api.serviceusage.v1beta1.QuotaBucket quota_buckets = 9;</code> 1665 */ 1666 public java.util.List<? extends com.google.api.serviceusage.v1beta1.QuotaBucketOrBuilder> getQuotaBucketsOrBuilderList()1667 getQuotaBucketsOrBuilderList() { 1668 if (quotaBucketsBuilder_ != null) { 1669 return quotaBucketsBuilder_.getMessageOrBuilderList(); 1670 } else { 1671 return java.util.Collections.unmodifiableList(quotaBuckets_); 1672 } 1673 } 1674 /** 1675 * 1676 * 1677 * <pre> 1678 * Summary of the enforced quota buckets, organized by quota dimension, 1679 * ordered from least specific to most specific (for example, the global 1680 * default bucket, with no quota dimensions, will always appear first). 1681 * </pre> 1682 * 1683 * <code>repeated .google.api.serviceusage.v1beta1.QuotaBucket quota_buckets = 9;</code> 1684 */ addQuotaBucketsBuilder()1685 public com.google.api.serviceusage.v1beta1.QuotaBucket.Builder addQuotaBucketsBuilder() { 1686 return getQuotaBucketsFieldBuilder() 1687 .addBuilder(com.google.api.serviceusage.v1beta1.QuotaBucket.getDefaultInstance()); 1688 } 1689 /** 1690 * 1691 * 1692 * <pre> 1693 * Summary of the enforced quota buckets, organized by quota dimension, 1694 * ordered from least specific to most specific (for example, the global 1695 * default bucket, with no quota dimensions, will always appear first). 1696 * </pre> 1697 * 1698 * <code>repeated .google.api.serviceusage.v1beta1.QuotaBucket quota_buckets = 9;</code> 1699 */ addQuotaBucketsBuilder( int index)1700 public com.google.api.serviceusage.v1beta1.QuotaBucket.Builder addQuotaBucketsBuilder( 1701 int index) { 1702 return getQuotaBucketsFieldBuilder() 1703 .addBuilder(index, com.google.api.serviceusage.v1beta1.QuotaBucket.getDefaultInstance()); 1704 } 1705 /** 1706 * 1707 * 1708 * <pre> 1709 * Summary of the enforced quota buckets, organized by quota dimension, 1710 * ordered from least specific to most specific (for example, the global 1711 * default bucket, with no quota dimensions, will always appear first). 1712 * </pre> 1713 * 1714 * <code>repeated .google.api.serviceusage.v1beta1.QuotaBucket quota_buckets = 9;</code> 1715 */ 1716 public java.util.List<com.google.api.serviceusage.v1beta1.QuotaBucket.Builder> getQuotaBucketsBuilderList()1717 getQuotaBucketsBuilderList() { 1718 return getQuotaBucketsFieldBuilder().getBuilderList(); 1719 } 1720 1721 private com.google.protobuf.RepeatedFieldBuilderV3< 1722 com.google.api.serviceusage.v1beta1.QuotaBucket, 1723 com.google.api.serviceusage.v1beta1.QuotaBucket.Builder, 1724 com.google.api.serviceusage.v1beta1.QuotaBucketOrBuilder> getQuotaBucketsFieldBuilder()1725 getQuotaBucketsFieldBuilder() { 1726 if (quotaBucketsBuilder_ == null) { 1727 quotaBucketsBuilder_ = 1728 new com.google.protobuf.RepeatedFieldBuilderV3< 1729 com.google.api.serviceusage.v1beta1.QuotaBucket, 1730 com.google.api.serviceusage.v1beta1.QuotaBucket.Builder, 1731 com.google.api.serviceusage.v1beta1.QuotaBucketOrBuilder>( 1732 quotaBuckets_, ((bitField0_ & 0x00000020) != 0), getParentForChildren(), isClean()); 1733 quotaBuckets_ = null; 1734 } 1735 return quotaBucketsBuilder_; 1736 } 1737 1738 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1739 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 1740 return super.setUnknownFields(unknownFields); 1741 } 1742 1743 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1744 public final Builder mergeUnknownFields( 1745 final com.google.protobuf.UnknownFieldSet unknownFields) { 1746 return super.mergeUnknownFields(unknownFields); 1747 } 1748 1749 // @@protoc_insertion_point(builder_scope:google.api.serviceusage.v1beta1.ConsumerQuotaLimit) 1750 } 1751 1752 // @@protoc_insertion_point(class_scope:google.api.serviceusage.v1beta1.ConsumerQuotaLimit) 1753 private static final com.google.api.serviceusage.v1beta1.ConsumerQuotaLimit DEFAULT_INSTANCE; 1754 1755 static { 1756 DEFAULT_INSTANCE = new com.google.api.serviceusage.v1beta1.ConsumerQuotaLimit(); 1757 } 1758 getDefaultInstance()1759 public static com.google.api.serviceusage.v1beta1.ConsumerQuotaLimit getDefaultInstance() { 1760 return DEFAULT_INSTANCE; 1761 } 1762 1763 private static final com.google.protobuf.Parser<ConsumerQuotaLimit> PARSER = 1764 new com.google.protobuf.AbstractParser<ConsumerQuotaLimit>() { 1765 @java.lang.Override 1766 public ConsumerQuotaLimit parsePartialFrom( 1767 com.google.protobuf.CodedInputStream input, 1768 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1769 throws com.google.protobuf.InvalidProtocolBufferException { 1770 Builder builder = newBuilder(); 1771 try { 1772 builder.mergeFrom(input, extensionRegistry); 1773 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1774 throw e.setUnfinishedMessage(builder.buildPartial()); 1775 } catch (com.google.protobuf.UninitializedMessageException e) { 1776 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 1777 } catch (java.io.IOException e) { 1778 throw new com.google.protobuf.InvalidProtocolBufferException(e) 1779 .setUnfinishedMessage(builder.buildPartial()); 1780 } 1781 return builder.buildPartial(); 1782 } 1783 }; 1784 parser()1785 public static com.google.protobuf.Parser<ConsumerQuotaLimit> parser() { 1786 return PARSER; 1787 } 1788 1789 @java.lang.Override getParserForType()1790 public com.google.protobuf.Parser<ConsumerQuotaLimit> getParserForType() { 1791 return PARSER; 1792 } 1793 1794 @java.lang.Override getDefaultInstanceForType()1795 public com.google.api.serviceusage.v1beta1.ConsumerQuotaLimit getDefaultInstanceForType() { 1796 return DEFAULT_INSTANCE; 1797 } 1798 } 1799