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/cloud/bigquery/reservation/v1/reservation.proto 18 19 package com.google.cloud.bigquery.reservation.v1; 20 21 /** 22 * 23 * 24 * <pre> 25 * A reservation is a mechanism used to guarantee slots to users. 26 * </pre> 27 * 28 * Protobuf type {@code google.cloud.bigquery.reservation.v1.Reservation} 29 */ 30 public final class Reservation extends com.google.protobuf.GeneratedMessageV3 31 implements 32 // @@protoc_insertion_point(message_implements:google.cloud.bigquery.reservation.v1.Reservation) 33 ReservationOrBuilder { 34 private static final long serialVersionUID = 0L; 35 // Use Reservation.newBuilder() to construct. Reservation(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36 private Reservation(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 37 super(builder); 38 } 39 Reservation()40 private Reservation() { 41 name_ = ""; 42 edition_ = 0; 43 } 44 45 @java.lang.Override 46 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)47 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 48 return new Reservation(); 49 } 50 51 @java.lang.Override getUnknownFields()52 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 53 return this.unknownFields; 54 } 55 getDescriptor()56 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 57 return com.google.cloud.bigquery.reservation.v1.ReservationProto 58 .internal_static_google_cloud_bigquery_reservation_v1_Reservation_descriptor; 59 } 60 61 @java.lang.Override 62 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()63 internalGetFieldAccessorTable() { 64 return com.google.cloud.bigquery.reservation.v1.ReservationProto 65 .internal_static_google_cloud_bigquery_reservation_v1_Reservation_fieldAccessorTable 66 .ensureFieldAccessorsInitialized( 67 com.google.cloud.bigquery.reservation.v1.Reservation.class, 68 com.google.cloud.bigquery.reservation.v1.Reservation.Builder.class); 69 } 70 71 public interface AutoscaleOrBuilder 72 extends 73 // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.reservation.v1.Reservation.Autoscale) 74 com.google.protobuf.MessageOrBuilder { 75 76 /** 77 * 78 * 79 * <pre> 80 * Output only. The slot capacity added to this reservation when autoscale 81 * happens. Will be between [0, max_slots]. 82 * </pre> 83 * 84 * <code>int64 current_slots = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 85 * 86 * @return The currentSlots. 87 */ getCurrentSlots()88 long getCurrentSlots(); 89 90 /** 91 * 92 * 93 * <pre> 94 * Number of slots to be scaled when needed. 95 * </pre> 96 * 97 * <code>int64 max_slots = 2;</code> 98 * 99 * @return The maxSlots. 100 */ getMaxSlots()101 long getMaxSlots(); 102 } 103 /** 104 * 105 * 106 * <pre> 107 * Auto scaling settings. 108 * </pre> 109 * 110 * Protobuf type {@code google.cloud.bigquery.reservation.v1.Reservation.Autoscale} 111 */ 112 public static final class Autoscale extends com.google.protobuf.GeneratedMessageV3 113 implements 114 // @@protoc_insertion_point(message_implements:google.cloud.bigquery.reservation.v1.Reservation.Autoscale) 115 AutoscaleOrBuilder { 116 private static final long serialVersionUID = 0L; 117 // Use Autoscale.newBuilder() to construct. Autoscale(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)118 private Autoscale(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 119 super(builder); 120 } 121 Autoscale()122 private Autoscale() {} 123 124 @java.lang.Override 125 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)126 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 127 return new Autoscale(); 128 } 129 130 @java.lang.Override getUnknownFields()131 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 132 return this.unknownFields; 133 } 134 getDescriptor()135 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 136 return com.google.cloud.bigquery.reservation.v1.ReservationProto 137 .internal_static_google_cloud_bigquery_reservation_v1_Reservation_Autoscale_descriptor; 138 } 139 140 @java.lang.Override 141 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()142 internalGetFieldAccessorTable() { 143 return com.google.cloud.bigquery.reservation.v1.ReservationProto 144 .internal_static_google_cloud_bigquery_reservation_v1_Reservation_Autoscale_fieldAccessorTable 145 .ensureFieldAccessorsInitialized( 146 com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale.class, 147 com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale.Builder.class); 148 } 149 150 public static final int CURRENT_SLOTS_FIELD_NUMBER = 1; 151 private long currentSlots_ = 0L; 152 /** 153 * 154 * 155 * <pre> 156 * Output only. The slot capacity added to this reservation when autoscale 157 * happens. Will be between [0, max_slots]. 158 * </pre> 159 * 160 * <code>int64 current_slots = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 161 * 162 * @return The currentSlots. 163 */ 164 @java.lang.Override getCurrentSlots()165 public long getCurrentSlots() { 166 return currentSlots_; 167 } 168 169 public static final int MAX_SLOTS_FIELD_NUMBER = 2; 170 private long maxSlots_ = 0L; 171 /** 172 * 173 * 174 * <pre> 175 * Number of slots to be scaled when needed. 176 * </pre> 177 * 178 * <code>int64 max_slots = 2;</code> 179 * 180 * @return The maxSlots. 181 */ 182 @java.lang.Override getMaxSlots()183 public long getMaxSlots() { 184 return maxSlots_; 185 } 186 187 private byte memoizedIsInitialized = -1; 188 189 @java.lang.Override isInitialized()190 public final boolean isInitialized() { 191 byte isInitialized = memoizedIsInitialized; 192 if (isInitialized == 1) return true; 193 if (isInitialized == 0) return false; 194 195 memoizedIsInitialized = 1; 196 return true; 197 } 198 199 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)200 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 201 if (currentSlots_ != 0L) { 202 output.writeInt64(1, currentSlots_); 203 } 204 if (maxSlots_ != 0L) { 205 output.writeInt64(2, maxSlots_); 206 } 207 getUnknownFields().writeTo(output); 208 } 209 210 @java.lang.Override getSerializedSize()211 public int getSerializedSize() { 212 int size = memoizedSize; 213 if (size != -1) return size; 214 215 size = 0; 216 if (currentSlots_ != 0L) { 217 size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, currentSlots_); 218 } 219 if (maxSlots_ != 0L) { 220 size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, maxSlots_); 221 } 222 size += getUnknownFields().getSerializedSize(); 223 memoizedSize = size; 224 return size; 225 } 226 227 @java.lang.Override equals(final java.lang.Object obj)228 public boolean equals(final java.lang.Object obj) { 229 if (obj == this) { 230 return true; 231 } 232 if (!(obj instanceof com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale)) { 233 return super.equals(obj); 234 } 235 com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale other = 236 (com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale) obj; 237 238 if (getCurrentSlots() != other.getCurrentSlots()) return false; 239 if (getMaxSlots() != other.getMaxSlots()) return false; 240 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 241 return true; 242 } 243 244 @java.lang.Override hashCode()245 public int hashCode() { 246 if (memoizedHashCode != 0) { 247 return memoizedHashCode; 248 } 249 int hash = 41; 250 hash = (19 * hash) + getDescriptor().hashCode(); 251 hash = (37 * hash) + CURRENT_SLOTS_FIELD_NUMBER; 252 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCurrentSlots()); 253 hash = (37 * hash) + MAX_SLOTS_FIELD_NUMBER; 254 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMaxSlots()); 255 hash = (29 * hash) + getUnknownFields().hashCode(); 256 memoizedHashCode = hash; 257 return hash; 258 } 259 parseFrom( java.nio.ByteBuffer data)260 public static com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale parseFrom( 261 java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { 262 return PARSER.parseFrom(data); 263 } 264 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)265 public static com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale parseFrom( 266 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 267 throws com.google.protobuf.InvalidProtocolBufferException { 268 return PARSER.parseFrom(data, extensionRegistry); 269 } 270 parseFrom( com.google.protobuf.ByteString data)271 public static com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale parseFrom( 272 com.google.protobuf.ByteString data) 273 throws com.google.protobuf.InvalidProtocolBufferException { 274 return PARSER.parseFrom(data); 275 } 276 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)277 public static com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale parseFrom( 278 com.google.protobuf.ByteString data, 279 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 280 throws com.google.protobuf.InvalidProtocolBufferException { 281 return PARSER.parseFrom(data, extensionRegistry); 282 } 283 parseFrom( byte[] data)284 public static com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale parseFrom( 285 byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { 286 return PARSER.parseFrom(data); 287 } 288 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)289 public static com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale parseFrom( 290 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 291 throws com.google.protobuf.InvalidProtocolBufferException { 292 return PARSER.parseFrom(data, extensionRegistry); 293 } 294 parseFrom( java.io.InputStream input)295 public static com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale parseFrom( 296 java.io.InputStream input) throws java.io.IOException { 297 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 298 } 299 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)300 public static com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale parseFrom( 301 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 302 throws java.io.IOException { 303 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 304 PARSER, input, extensionRegistry); 305 } 306 parseDelimitedFrom( java.io.InputStream input)307 public static com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale parseDelimitedFrom( 308 java.io.InputStream input) throws java.io.IOException { 309 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 310 } 311 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)312 public static com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale parseDelimitedFrom( 313 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 314 throws java.io.IOException { 315 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 316 PARSER, input, extensionRegistry); 317 } 318 parseFrom( com.google.protobuf.CodedInputStream input)319 public static com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale parseFrom( 320 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 321 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 322 } 323 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)324 public static com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale parseFrom( 325 com.google.protobuf.CodedInputStream input, 326 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 327 throws java.io.IOException { 328 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 329 PARSER, input, extensionRegistry); 330 } 331 332 @java.lang.Override newBuilderForType()333 public Builder newBuilderForType() { 334 return newBuilder(); 335 } 336 newBuilder()337 public static Builder newBuilder() { 338 return DEFAULT_INSTANCE.toBuilder(); 339 } 340 newBuilder( com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale prototype)341 public static Builder newBuilder( 342 com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale prototype) { 343 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 344 } 345 346 @java.lang.Override toBuilder()347 public Builder toBuilder() { 348 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 349 } 350 351 @java.lang.Override newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)352 protected Builder newBuilderForType( 353 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 354 Builder builder = new Builder(parent); 355 return builder; 356 } 357 /** 358 * 359 * 360 * <pre> 361 * Auto scaling settings. 362 * </pre> 363 * 364 * Protobuf type {@code google.cloud.bigquery.reservation.v1.Reservation.Autoscale} 365 */ 366 public static final class Builder 367 extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 368 implements 369 // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.reservation.v1.Reservation.Autoscale) 370 com.google.cloud.bigquery.reservation.v1.Reservation.AutoscaleOrBuilder { getDescriptor()371 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 372 return com.google.cloud.bigquery.reservation.v1.ReservationProto 373 .internal_static_google_cloud_bigquery_reservation_v1_Reservation_Autoscale_descriptor; 374 } 375 376 @java.lang.Override 377 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()378 internalGetFieldAccessorTable() { 379 return com.google.cloud.bigquery.reservation.v1.ReservationProto 380 .internal_static_google_cloud_bigquery_reservation_v1_Reservation_Autoscale_fieldAccessorTable 381 .ensureFieldAccessorsInitialized( 382 com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale.class, 383 com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale.Builder.class); 384 } 385 386 // Construct using com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale.newBuilder() Builder()387 private Builder() {} 388 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)389 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 390 super(parent); 391 } 392 393 @java.lang.Override clear()394 public Builder clear() { 395 super.clear(); 396 bitField0_ = 0; 397 currentSlots_ = 0L; 398 maxSlots_ = 0L; 399 return this; 400 } 401 402 @java.lang.Override getDescriptorForType()403 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 404 return com.google.cloud.bigquery.reservation.v1.ReservationProto 405 .internal_static_google_cloud_bigquery_reservation_v1_Reservation_Autoscale_descriptor; 406 } 407 408 @java.lang.Override 409 public com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale getDefaultInstanceForType()410 getDefaultInstanceForType() { 411 return com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale.getDefaultInstance(); 412 } 413 414 @java.lang.Override build()415 public com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale build() { 416 com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale result = buildPartial(); 417 if (!result.isInitialized()) { 418 throw newUninitializedMessageException(result); 419 } 420 return result; 421 } 422 423 @java.lang.Override buildPartial()424 public com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale buildPartial() { 425 com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale result = 426 new com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale(this); 427 if (bitField0_ != 0) { 428 buildPartial0(result); 429 } 430 onBuilt(); 431 return result; 432 } 433 buildPartial0( com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale result)434 private void buildPartial0( 435 com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale result) { 436 int from_bitField0_ = bitField0_; 437 if (((from_bitField0_ & 0x00000001) != 0)) { 438 result.currentSlots_ = currentSlots_; 439 } 440 if (((from_bitField0_ & 0x00000002) != 0)) { 441 result.maxSlots_ = maxSlots_; 442 } 443 } 444 445 @java.lang.Override clone()446 public Builder clone() { 447 return super.clone(); 448 } 449 450 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)451 public Builder setField( 452 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 453 return super.setField(field, value); 454 } 455 456 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)457 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 458 return super.clearField(field); 459 } 460 461 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)462 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 463 return super.clearOneof(oneof); 464 } 465 466 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)467 public Builder setRepeatedField( 468 com.google.protobuf.Descriptors.FieldDescriptor field, 469 int index, 470 java.lang.Object value) { 471 return super.setRepeatedField(field, index, value); 472 } 473 474 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)475 public Builder addRepeatedField( 476 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 477 return super.addRepeatedField(field, value); 478 } 479 480 @java.lang.Override mergeFrom(com.google.protobuf.Message other)481 public Builder mergeFrom(com.google.protobuf.Message other) { 482 if (other instanceof com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale) { 483 return mergeFrom((com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale) other); 484 } else { 485 super.mergeFrom(other); 486 return this; 487 } 488 } 489 mergeFrom( com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale other)490 public Builder mergeFrom( 491 com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale other) { 492 if (other 493 == com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale.getDefaultInstance()) 494 return this; 495 if (other.getCurrentSlots() != 0L) { 496 setCurrentSlots(other.getCurrentSlots()); 497 } 498 if (other.getMaxSlots() != 0L) { 499 setMaxSlots(other.getMaxSlots()); 500 } 501 this.mergeUnknownFields(other.getUnknownFields()); 502 onChanged(); 503 return this; 504 } 505 506 @java.lang.Override isInitialized()507 public final boolean isInitialized() { 508 return true; 509 } 510 511 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)512 public Builder mergeFrom( 513 com.google.protobuf.CodedInputStream input, 514 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 515 throws java.io.IOException { 516 if (extensionRegistry == null) { 517 throw new java.lang.NullPointerException(); 518 } 519 try { 520 boolean done = false; 521 while (!done) { 522 int tag = input.readTag(); 523 switch (tag) { 524 case 0: 525 done = true; 526 break; 527 case 8: 528 { 529 currentSlots_ = input.readInt64(); 530 bitField0_ |= 0x00000001; 531 break; 532 } // case 8 533 case 16: 534 { 535 maxSlots_ = input.readInt64(); 536 bitField0_ |= 0x00000002; 537 break; 538 } // case 16 539 default: 540 { 541 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 542 done = true; // was an endgroup tag 543 } 544 break; 545 } // default: 546 } // switch (tag) 547 } // while (!done) 548 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 549 throw e.unwrapIOException(); 550 } finally { 551 onChanged(); 552 } // finally 553 return this; 554 } 555 556 private int bitField0_; 557 558 private long currentSlots_; 559 /** 560 * 561 * 562 * <pre> 563 * Output only. The slot capacity added to this reservation when autoscale 564 * happens. Will be between [0, max_slots]. 565 * </pre> 566 * 567 * <code>int64 current_slots = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 568 * 569 * @return The currentSlots. 570 */ 571 @java.lang.Override getCurrentSlots()572 public long getCurrentSlots() { 573 return currentSlots_; 574 } 575 /** 576 * 577 * 578 * <pre> 579 * Output only. The slot capacity added to this reservation when autoscale 580 * happens. Will be between [0, max_slots]. 581 * </pre> 582 * 583 * <code>int64 current_slots = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 584 * 585 * @param value The currentSlots to set. 586 * @return This builder for chaining. 587 */ setCurrentSlots(long value)588 public Builder setCurrentSlots(long value) { 589 590 currentSlots_ = value; 591 bitField0_ |= 0x00000001; 592 onChanged(); 593 return this; 594 } 595 /** 596 * 597 * 598 * <pre> 599 * Output only. The slot capacity added to this reservation when autoscale 600 * happens. Will be between [0, max_slots]. 601 * </pre> 602 * 603 * <code>int64 current_slots = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code> 604 * 605 * @return This builder for chaining. 606 */ clearCurrentSlots()607 public Builder clearCurrentSlots() { 608 bitField0_ = (bitField0_ & ~0x00000001); 609 currentSlots_ = 0L; 610 onChanged(); 611 return this; 612 } 613 614 private long maxSlots_; 615 /** 616 * 617 * 618 * <pre> 619 * Number of slots to be scaled when needed. 620 * </pre> 621 * 622 * <code>int64 max_slots = 2;</code> 623 * 624 * @return The maxSlots. 625 */ 626 @java.lang.Override getMaxSlots()627 public long getMaxSlots() { 628 return maxSlots_; 629 } 630 /** 631 * 632 * 633 * <pre> 634 * Number of slots to be scaled when needed. 635 * </pre> 636 * 637 * <code>int64 max_slots = 2;</code> 638 * 639 * @param value The maxSlots to set. 640 * @return This builder for chaining. 641 */ setMaxSlots(long value)642 public Builder setMaxSlots(long value) { 643 644 maxSlots_ = value; 645 bitField0_ |= 0x00000002; 646 onChanged(); 647 return this; 648 } 649 /** 650 * 651 * 652 * <pre> 653 * Number of slots to be scaled when needed. 654 * </pre> 655 * 656 * <code>int64 max_slots = 2;</code> 657 * 658 * @return This builder for chaining. 659 */ clearMaxSlots()660 public Builder clearMaxSlots() { 661 bitField0_ = (bitField0_ & ~0x00000002); 662 maxSlots_ = 0L; 663 onChanged(); 664 return this; 665 } 666 667 @java.lang.Override setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)668 public final Builder setUnknownFields( 669 final com.google.protobuf.UnknownFieldSet unknownFields) { 670 return super.setUnknownFields(unknownFields); 671 } 672 673 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)674 public final Builder mergeUnknownFields( 675 final com.google.protobuf.UnknownFieldSet unknownFields) { 676 return super.mergeUnknownFields(unknownFields); 677 } 678 679 // @@protoc_insertion_point(builder_scope:google.cloud.bigquery.reservation.v1.Reservation.Autoscale) 680 } 681 682 // @@protoc_insertion_point(class_scope:google.cloud.bigquery.reservation.v1.Reservation.Autoscale) 683 private static final com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale 684 DEFAULT_INSTANCE; 685 686 static { 687 DEFAULT_INSTANCE = new com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale(); 688 } 689 690 public static com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale getDefaultInstance()691 getDefaultInstance() { 692 return DEFAULT_INSTANCE; 693 } 694 695 private static final com.google.protobuf.Parser<Autoscale> PARSER = 696 new com.google.protobuf.AbstractParser<Autoscale>() { 697 @java.lang.Override 698 public Autoscale parsePartialFrom( 699 com.google.protobuf.CodedInputStream input, 700 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 701 throws com.google.protobuf.InvalidProtocolBufferException { 702 Builder builder = newBuilder(); 703 try { 704 builder.mergeFrom(input, extensionRegistry); 705 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 706 throw e.setUnfinishedMessage(builder.buildPartial()); 707 } catch (com.google.protobuf.UninitializedMessageException e) { 708 throw e.asInvalidProtocolBufferException() 709 .setUnfinishedMessage(builder.buildPartial()); 710 } catch (java.io.IOException e) { 711 throw new com.google.protobuf.InvalidProtocolBufferException(e) 712 .setUnfinishedMessage(builder.buildPartial()); 713 } 714 return builder.buildPartial(); 715 } 716 }; 717 parser()718 public static com.google.protobuf.Parser<Autoscale> parser() { 719 return PARSER; 720 } 721 722 @java.lang.Override getParserForType()723 public com.google.protobuf.Parser<Autoscale> getParserForType() { 724 return PARSER; 725 } 726 727 @java.lang.Override 728 public com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale getDefaultInstanceForType()729 getDefaultInstanceForType() { 730 return DEFAULT_INSTANCE; 731 } 732 } 733 734 public static final int NAME_FIELD_NUMBER = 1; 735 736 @SuppressWarnings("serial") 737 private volatile java.lang.Object name_ = ""; 738 /** 739 * 740 * 741 * <pre> 742 * The resource name of the reservation, e.g., 743 * `projects/*/locations/*/reservations/team1-prod`. 744 * The reservation_id must only contain lower case alphanumeric characters or 745 * dashes. It must start with a letter and must not end with a dash. Its 746 * maximum length is 64 characters. 747 * </pre> 748 * 749 * <code>string name = 1;</code> 750 * 751 * @return The name. 752 */ 753 @java.lang.Override getName()754 public java.lang.String getName() { 755 java.lang.Object ref = name_; 756 if (ref instanceof java.lang.String) { 757 return (java.lang.String) ref; 758 } else { 759 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 760 java.lang.String s = bs.toStringUtf8(); 761 name_ = s; 762 return s; 763 } 764 } 765 /** 766 * 767 * 768 * <pre> 769 * The resource name of the reservation, e.g., 770 * `projects/*/locations/*/reservations/team1-prod`. 771 * The reservation_id must only contain lower case alphanumeric characters or 772 * dashes. It must start with a letter and must not end with a dash. Its 773 * maximum length is 64 characters. 774 * </pre> 775 * 776 * <code>string name = 1;</code> 777 * 778 * @return The bytes for name. 779 */ 780 @java.lang.Override getNameBytes()781 public com.google.protobuf.ByteString getNameBytes() { 782 java.lang.Object ref = name_; 783 if (ref instanceof java.lang.String) { 784 com.google.protobuf.ByteString b = 785 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 786 name_ = b; 787 return b; 788 } else { 789 return (com.google.protobuf.ByteString) ref; 790 } 791 } 792 793 public static final int SLOT_CAPACITY_FIELD_NUMBER = 2; 794 private long slotCapacity_ = 0L; 795 /** 796 * 797 * 798 * <pre> 799 * Minimum slots available to this reservation. A slot is a unit of 800 * computational power in BigQuery, and serves as the unit of parallelism. 801 * Queries using this reservation might use more slots during runtime if 802 * ignore_idle_slots is set to false. 803 * If total slot_capacity of the reservation and its siblings 804 * exceeds the total slot_count of all capacity commitments, the request will 805 * fail with `google.rpc.Code.RESOURCE_EXHAUSTED`. 806 * NOTE: for reservations in US or EU multi-regions, slot capacity constraints 807 * are checked separately for default and auxiliary regions. See 808 * multi_region_auxiliary flag for more details. 809 * </pre> 810 * 811 * <code>int64 slot_capacity = 2;</code> 812 * 813 * @return The slotCapacity. 814 */ 815 @java.lang.Override getSlotCapacity()816 public long getSlotCapacity() { 817 return slotCapacity_; 818 } 819 820 public static final int IGNORE_IDLE_SLOTS_FIELD_NUMBER = 4; 821 private boolean ignoreIdleSlots_ = false; 822 /** 823 * 824 * 825 * <pre> 826 * If false, any query or pipeline job using this reservation will use idle 827 * slots from other reservations within the same admin project. If true, a 828 * query or pipeline job using this reservation will execute with the slot 829 * capacity specified in the slot_capacity field at most. 830 * </pre> 831 * 832 * <code>bool ignore_idle_slots = 4;</code> 833 * 834 * @return The ignoreIdleSlots. 835 */ 836 @java.lang.Override getIgnoreIdleSlots()837 public boolean getIgnoreIdleSlots() { 838 return ignoreIdleSlots_; 839 } 840 841 public static final int AUTOSCALE_FIELD_NUMBER = 7; 842 private com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale autoscale_; 843 /** 844 * 845 * 846 * <pre> 847 * The configuration parameters for the auto scaling feature. Note this is an 848 * alpha feature. 849 * </pre> 850 * 851 * <code>.google.cloud.bigquery.reservation.v1.Reservation.Autoscale autoscale = 7;</code> 852 * 853 * @return Whether the autoscale field is set. 854 */ 855 @java.lang.Override hasAutoscale()856 public boolean hasAutoscale() { 857 return autoscale_ != null; 858 } 859 /** 860 * 861 * 862 * <pre> 863 * The configuration parameters for the auto scaling feature. Note this is an 864 * alpha feature. 865 * </pre> 866 * 867 * <code>.google.cloud.bigquery.reservation.v1.Reservation.Autoscale autoscale = 7;</code> 868 * 869 * @return The autoscale. 870 */ 871 @java.lang.Override getAutoscale()872 public com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale getAutoscale() { 873 return autoscale_ == null 874 ? com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale.getDefaultInstance() 875 : autoscale_; 876 } 877 /** 878 * 879 * 880 * <pre> 881 * The configuration parameters for the auto scaling feature. Note this is an 882 * alpha feature. 883 * </pre> 884 * 885 * <code>.google.cloud.bigquery.reservation.v1.Reservation.Autoscale autoscale = 7;</code> 886 */ 887 @java.lang.Override 888 public com.google.cloud.bigquery.reservation.v1.Reservation.AutoscaleOrBuilder getAutoscaleOrBuilder()889 getAutoscaleOrBuilder() { 890 return autoscale_ == null 891 ? com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale.getDefaultInstance() 892 : autoscale_; 893 } 894 895 public static final int CONCURRENCY_FIELD_NUMBER = 16; 896 private long concurrency_ = 0L; 897 /** 898 * 899 * 900 * <pre> 901 * Job concurrency target which sets a soft upper bound on the number of jobs 902 * that can run concurrently in this reservation. This is a soft target due to 903 * asynchronous nature of the system and various optimizations for small 904 * queries. 905 * Default value is 0 which means that concurrency target will be 906 * automatically computed by the system. 907 * NOTE: this field is exposed as `target_job_concurrency` in the Information 908 * Schema, DDL and BQ CLI. 909 * </pre> 910 * 911 * <code>int64 concurrency = 16;</code> 912 * 913 * @return The concurrency. 914 */ 915 @java.lang.Override getConcurrency()916 public long getConcurrency() { 917 return concurrency_; 918 } 919 920 public static final int CREATION_TIME_FIELD_NUMBER = 8; 921 private com.google.protobuf.Timestamp creationTime_; 922 /** 923 * 924 * 925 * <pre> 926 * Output only. Creation time of the reservation. 927 * </pre> 928 * 929 * <code> 930 * .google.protobuf.Timestamp creation_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; 931 * </code> 932 * 933 * @return Whether the creationTime field is set. 934 */ 935 @java.lang.Override hasCreationTime()936 public boolean hasCreationTime() { 937 return creationTime_ != null; 938 } 939 /** 940 * 941 * 942 * <pre> 943 * Output only. Creation time of the reservation. 944 * </pre> 945 * 946 * <code> 947 * .google.protobuf.Timestamp creation_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; 948 * </code> 949 * 950 * @return The creationTime. 951 */ 952 @java.lang.Override getCreationTime()953 public com.google.protobuf.Timestamp getCreationTime() { 954 return creationTime_ == null 955 ? com.google.protobuf.Timestamp.getDefaultInstance() 956 : creationTime_; 957 } 958 /** 959 * 960 * 961 * <pre> 962 * Output only. Creation time of the reservation. 963 * </pre> 964 * 965 * <code> 966 * .google.protobuf.Timestamp creation_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; 967 * </code> 968 */ 969 @java.lang.Override getCreationTimeOrBuilder()970 public com.google.protobuf.TimestampOrBuilder getCreationTimeOrBuilder() { 971 return creationTime_ == null 972 ? com.google.protobuf.Timestamp.getDefaultInstance() 973 : creationTime_; 974 } 975 976 public static final int UPDATE_TIME_FIELD_NUMBER = 9; 977 private com.google.protobuf.Timestamp updateTime_; 978 /** 979 * 980 * 981 * <pre> 982 * Output only. Last update time of the reservation. 983 * </pre> 984 * 985 * <code>.google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; 986 * </code> 987 * 988 * @return Whether the updateTime field is set. 989 */ 990 @java.lang.Override hasUpdateTime()991 public boolean hasUpdateTime() { 992 return updateTime_ != null; 993 } 994 /** 995 * 996 * 997 * <pre> 998 * Output only. Last update time of the reservation. 999 * </pre> 1000 * 1001 * <code>.google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1002 * </code> 1003 * 1004 * @return The updateTime. 1005 */ 1006 @java.lang.Override getUpdateTime()1007 public com.google.protobuf.Timestamp getUpdateTime() { 1008 return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; 1009 } 1010 /** 1011 * 1012 * 1013 * <pre> 1014 * Output only. Last update time of the reservation. 1015 * </pre> 1016 * 1017 * <code>.google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; 1018 * </code> 1019 */ 1020 @java.lang.Override getUpdateTimeOrBuilder()1021 public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { 1022 return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; 1023 } 1024 1025 public static final int MULTI_REGION_AUXILIARY_FIELD_NUMBER = 14; 1026 private boolean multiRegionAuxiliary_ = false; 1027 /** 1028 * 1029 * 1030 * <pre> 1031 * Applicable only for reservations located within one of the BigQuery 1032 * multi-regions (US or EU). 1033 * If set to true, this reservation is placed in the organization's 1034 * secondary region which is designated for disaster recovery purposes. 1035 * If false, this reservation is placed in the organization's default region. 1036 * NOTE: this is a preview feature. Project must be allow-listed in order to 1037 * set this field. 1038 * </pre> 1039 * 1040 * <code>bool multi_region_auxiliary = 14;</code> 1041 * 1042 * @return The multiRegionAuxiliary. 1043 */ 1044 @java.lang.Override getMultiRegionAuxiliary()1045 public boolean getMultiRegionAuxiliary() { 1046 return multiRegionAuxiliary_; 1047 } 1048 1049 public static final int EDITION_FIELD_NUMBER = 17; 1050 private int edition_ = 0; 1051 /** 1052 * 1053 * 1054 * <pre> 1055 * Edition of the reservation. 1056 * </pre> 1057 * 1058 * <code>.google.cloud.bigquery.reservation.v1.Edition edition = 17;</code> 1059 * 1060 * @return The enum numeric value on the wire for edition. 1061 */ 1062 @java.lang.Override getEditionValue()1063 public int getEditionValue() { 1064 return edition_; 1065 } 1066 /** 1067 * 1068 * 1069 * <pre> 1070 * Edition of the reservation. 1071 * </pre> 1072 * 1073 * <code>.google.cloud.bigquery.reservation.v1.Edition edition = 17;</code> 1074 * 1075 * @return The edition. 1076 */ 1077 @java.lang.Override getEdition()1078 public com.google.cloud.bigquery.reservation.v1.Edition getEdition() { 1079 com.google.cloud.bigquery.reservation.v1.Edition result = 1080 com.google.cloud.bigquery.reservation.v1.Edition.forNumber(edition_); 1081 return result == null ? com.google.cloud.bigquery.reservation.v1.Edition.UNRECOGNIZED : result; 1082 } 1083 1084 private byte memoizedIsInitialized = -1; 1085 1086 @java.lang.Override isInitialized()1087 public final boolean isInitialized() { 1088 byte isInitialized = memoizedIsInitialized; 1089 if (isInitialized == 1) return true; 1090 if (isInitialized == 0) return false; 1091 1092 memoizedIsInitialized = 1; 1093 return true; 1094 } 1095 1096 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)1097 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 1098 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { 1099 com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); 1100 } 1101 if (slotCapacity_ != 0L) { 1102 output.writeInt64(2, slotCapacity_); 1103 } 1104 if (ignoreIdleSlots_ != false) { 1105 output.writeBool(4, ignoreIdleSlots_); 1106 } 1107 if (autoscale_ != null) { 1108 output.writeMessage(7, getAutoscale()); 1109 } 1110 if (creationTime_ != null) { 1111 output.writeMessage(8, getCreationTime()); 1112 } 1113 if (updateTime_ != null) { 1114 output.writeMessage(9, getUpdateTime()); 1115 } 1116 if (multiRegionAuxiliary_ != false) { 1117 output.writeBool(14, multiRegionAuxiliary_); 1118 } 1119 if (concurrency_ != 0L) { 1120 output.writeInt64(16, concurrency_); 1121 } 1122 if (edition_ 1123 != com.google.cloud.bigquery.reservation.v1.Edition.EDITION_UNSPECIFIED.getNumber()) { 1124 output.writeEnum(17, edition_); 1125 } 1126 getUnknownFields().writeTo(output); 1127 } 1128 1129 @java.lang.Override getSerializedSize()1130 public int getSerializedSize() { 1131 int size = memoizedSize; 1132 if (size != -1) return size; 1133 1134 size = 0; 1135 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { 1136 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); 1137 } 1138 if (slotCapacity_ != 0L) { 1139 size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, slotCapacity_); 1140 } 1141 if (ignoreIdleSlots_ != false) { 1142 size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, ignoreIdleSlots_); 1143 } 1144 if (autoscale_ != null) { 1145 size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getAutoscale()); 1146 } 1147 if (creationTime_ != null) { 1148 size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getCreationTime()); 1149 } 1150 if (updateTime_ != null) { 1151 size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getUpdateTime()); 1152 } 1153 if (multiRegionAuxiliary_ != false) { 1154 size += com.google.protobuf.CodedOutputStream.computeBoolSize(14, multiRegionAuxiliary_); 1155 } 1156 if (concurrency_ != 0L) { 1157 size += com.google.protobuf.CodedOutputStream.computeInt64Size(16, concurrency_); 1158 } 1159 if (edition_ 1160 != com.google.cloud.bigquery.reservation.v1.Edition.EDITION_UNSPECIFIED.getNumber()) { 1161 size += com.google.protobuf.CodedOutputStream.computeEnumSize(17, edition_); 1162 } 1163 size += getUnknownFields().getSerializedSize(); 1164 memoizedSize = size; 1165 return size; 1166 } 1167 1168 @java.lang.Override equals(final java.lang.Object obj)1169 public boolean equals(final java.lang.Object obj) { 1170 if (obj == this) { 1171 return true; 1172 } 1173 if (!(obj instanceof com.google.cloud.bigquery.reservation.v1.Reservation)) { 1174 return super.equals(obj); 1175 } 1176 com.google.cloud.bigquery.reservation.v1.Reservation other = 1177 (com.google.cloud.bigquery.reservation.v1.Reservation) obj; 1178 1179 if (!getName().equals(other.getName())) return false; 1180 if (getSlotCapacity() != other.getSlotCapacity()) return false; 1181 if (getIgnoreIdleSlots() != other.getIgnoreIdleSlots()) return false; 1182 if (hasAutoscale() != other.hasAutoscale()) return false; 1183 if (hasAutoscale()) { 1184 if (!getAutoscale().equals(other.getAutoscale())) return false; 1185 } 1186 if (getConcurrency() != other.getConcurrency()) return false; 1187 if (hasCreationTime() != other.hasCreationTime()) return false; 1188 if (hasCreationTime()) { 1189 if (!getCreationTime().equals(other.getCreationTime())) return false; 1190 } 1191 if (hasUpdateTime() != other.hasUpdateTime()) return false; 1192 if (hasUpdateTime()) { 1193 if (!getUpdateTime().equals(other.getUpdateTime())) return false; 1194 } 1195 if (getMultiRegionAuxiliary() != other.getMultiRegionAuxiliary()) return false; 1196 if (edition_ != other.edition_) return false; 1197 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 1198 return true; 1199 } 1200 1201 @java.lang.Override hashCode()1202 public int hashCode() { 1203 if (memoizedHashCode != 0) { 1204 return memoizedHashCode; 1205 } 1206 int hash = 41; 1207 hash = (19 * hash) + getDescriptor().hashCode(); 1208 hash = (37 * hash) + NAME_FIELD_NUMBER; 1209 hash = (53 * hash) + getName().hashCode(); 1210 hash = (37 * hash) + SLOT_CAPACITY_FIELD_NUMBER; 1211 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSlotCapacity()); 1212 hash = (37 * hash) + IGNORE_IDLE_SLOTS_FIELD_NUMBER; 1213 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIgnoreIdleSlots()); 1214 if (hasAutoscale()) { 1215 hash = (37 * hash) + AUTOSCALE_FIELD_NUMBER; 1216 hash = (53 * hash) + getAutoscale().hashCode(); 1217 } 1218 hash = (37 * hash) + CONCURRENCY_FIELD_NUMBER; 1219 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getConcurrency()); 1220 if (hasCreationTime()) { 1221 hash = (37 * hash) + CREATION_TIME_FIELD_NUMBER; 1222 hash = (53 * hash) + getCreationTime().hashCode(); 1223 } 1224 if (hasUpdateTime()) { 1225 hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; 1226 hash = (53 * hash) + getUpdateTime().hashCode(); 1227 } 1228 hash = (37 * hash) + MULTI_REGION_AUXILIARY_FIELD_NUMBER; 1229 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getMultiRegionAuxiliary()); 1230 hash = (37 * hash) + EDITION_FIELD_NUMBER; 1231 hash = (53 * hash) + edition_; 1232 hash = (29 * hash) + getUnknownFields().hashCode(); 1233 memoizedHashCode = hash; 1234 return hash; 1235 } 1236 parseFrom( java.nio.ByteBuffer data)1237 public static com.google.cloud.bigquery.reservation.v1.Reservation parseFrom( 1238 java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { 1239 return PARSER.parseFrom(data); 1240 } 1241 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1242 public static com.google.cloud.bigquery.reservation.v1.Reservation parseFrom( 1243 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1244 throws com.google.protobuf.InvalidProtocolBufferException { 1245 return PARSER.parseFrom(data, extensionRegistry); 1246 } 1247 parseFrom( com.google.protobuf.ByteString data)1248 public static com.google.cloud.bigquery.reservation.v1.Reservation parseFrom( 1249 com.google.protobuf.ByteString data) 1250 throws com.google.protobuf.InvalidProtocolBufferException { 1251 return PARSER.parseFrom(data); 1252 } 1253 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1254 public static com.google.cloud.bigquery.reservation.v1.Reservation parseFrom( 1255 com.google.protobuf.ByteString data, 1256 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1257 throws com.google.protobuf.InvalidProtocolBufferException { 1258 return PARSER.parseFrom(data, extensionRegistry); 1259 } 1260 parseFrom(byte[] data)1261 public static com.google.cloud.bigquery.reservation.v1.Reservation parseFrom(byte[] data) 1262 throws com.google.protobuf.InvalidProtocolBufferException { 1263 return PARSER.parseFrom(data); 1264 } 1265 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1266 public static com.google.cloud.bigquery.reservation.v1.Reservation parseFrom( 1267 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1268 throws com.google.protobuf.InvalidProtocolBufferException { 1269 return PARSER.parseFrom(data, extensionRegistry); 1270 } 1271 parseFrom( java.io.InputStream input)1272 public static com.google.cloud.bigquery.reservation.v1.Reservation parseFrom( 1273 java.io.InputStream input) throws java.io.IOException { 1274 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 1275 } 1276 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1277 public static com.google.cloud.bigquery.reservation.v1.Reservation parseFrom( 1278 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1279 throws java.io.IOException { 1280 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 1281 PARSER, input, extensionRegistry); 1282 } 1283 parseDelimitedFrom( java.io.InputStream input)1284 public static com.google.cloud.bigquery.reservation.v1.Reservation parseDelimitedFrom( 1285 java.io.InputStream input) throws java.io.IOException { 1286 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 1287 } 1288 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1289 public static com.google.cloud.bigquery.reservation.v1.Reservation parseDelimitedFrom( 1290 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1291 throws java.io.IOException { 1292 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 1293 PARSER, input, extensionRegistry); 1294 } 1295 parseFrom( com.google.protobuf.CodedInputStream input)1296 public static com.google.cloud.bigquery.reservation.v1.Reservation parseFrom( 1297 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 1298 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 1299 } 1300 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1301 public static com.google.cloud.bigquery.reservation.v1.Reservation parseFrom( 1302 com.google.protobuf.CodedInputStream input, 1303 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1304 throws java.io.IOException { 1305 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 1306 PARSER, input, extensionRegistry); 1307 } 1308 1309 @java.lang.Override newBuilderForType()1310 public Builder newBuilderForType() { 1311 return newBuilder(); 1312 } 1313 newBuilder()1314 public static Builder newBuilder() { 1315 return DEFAULT_INSTANCE.toBuilder(); 1316 } 1317 newBuilder(com.google.cloud.bigquery.reservation.v1.Reservation prototype)1318 public static Builder newBuilder(com.google.cloud.bigquery.reservation.v1.Reservation prototype) { 1319 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 1320 } 1321 1322 @java.lang.Override toBuilder()1323 public Builder toBuilder() { 1324 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 1325 } 1326 1327 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1328 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 1329 Builder builder = new Builder(parent); 1330 return builder; 1331 } 1332 /** 1333 * 1334 * 1335 * <pre> 1336 * A reservation is a mechanism used to guarantee slots to users. 1337 * </pre> 1338 * 1339 * Protobuf type {@code google.cloud.bigquery.reservation.v1.Reservation} 1340 */ 1341 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 1342 implements 1343 // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.reservation.v1.Reservation) 1344 com.google.cloud.bigquery.reservation.v1.ReservationOrBuilder { getDescriptor()1345 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 1346 return com.google.cloud.bigquery.reservation.v1.ReservationProto 1347 .internal_static_google_cloud_bigquery_reservation_v1_Reservation_descriptor; 1348 } 1349 1350 @java.lang.Override 1351 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()1352 internalGetFieldAccessorTable() { 1353 return com.google.cloud.bigquery.reservation.v1.ReservationProto 1354 .internal_static_google_cloud_bigquery_reservation_v1_Reservation_fieldAccessorTable 1355 .ensureFieldAccessorsInitialized( 1356 com.google.cloud.bigquery.reservation.v1.Reservation.class, 1357 com.google.cloud.bigquery.reservation.v1.Reservation.Builder.class); 1358 } 1359 1360 // Construct using com.google.cloud.bigquery.reservation.v1.Reservation.newBuilder() Builder()1361 private Builder() {} 1362 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1363 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 1364 super(parent); 1365 } 1366 1367 @java.lang.Override clear()1368 public Builder clear() { 1369 super.clear(); 1370 bitField0_ = 0; 1371 name_ = ""; 1372 slotCapacity_ = 0L; 1373 ignoreIdleSlots_ = false; 1374 autoscale_ = null; 1375 if (autoscaleBuilder_ != null) { 1376 autoscaleBuilder_.dispose(); 1377 autoscaleBuilder_ = null; 1378 } 1379 concurrency_ = 0L; 1380 creationTime_ = null; 1381 if (creationTimeBuilder_ != null) { 1382 creationTimeBuilder_.dispose(); 1383 creationTimeBuilder_ = null; 1384 } 1385 updateTime_ = null; 1386 if (updateTimeBuilder_ != null) { 1387 updateTimeBuilder_.dispose(); 1388 updateTimeBuilder_ = null; 1389 } 1390 multiRegionAuxiliary_ = false; 1391 edition_ = 0; 1392 return this; 1393 } 1394 1395 @java.lang.Override getDescriptorForType()1396 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 1397 return com.google.cloud.bigquery.reservation.v1.ReservationProto 1398 .internal_static_google_cloud_bigquery_reservation_v1_Reservation_descriptor; 1399 } 1400 1401 @java.lang.Override getDefaultInstanceForType()1402 public com.google.cloud.bigquery.reservation.v1.Reservation getDefaultInstanceForType() { 1403 return com.google.cloud.bigquery.reservation.v1.Reservation.getDefaultInstance(); 1404 } 1405 1406 @java.lang.Override build()1407 public com.google.cloud.bigquery.reservation.v1.Reservation build() { 1408 com.google.cloud.bigquery.reservation.v1.Reservation result = buildPartial(); 1409 if (!result.isInitialized()) { 1410 throw newUninitializedMessageException(result); 1411 } 1412 return result; 1413 } 1414 1415 @java.lang.Override buildPartial()1416 public com.google.cloud.bigquery.reservation.v1.Reservation buildPartial() { 1417 com.google.cloud.bigquery.reservation.v1.Reservation result = 1418 new com.google.cloud.bigquery.reservation.v1.Reservation(this); 1419 if (bitField0_ != 0) { 1420 buildPartial0(result); 1421 } 1422 onBuilt(); 1423 return result; 1424 } 1425 buildPartial0(com.google.cloud.bigquery.reservation.v1.Reservation result)1426 private void buildPartial0(com.google.cloud.bigquery.reservation.v1.Reservation result) { 1427 int from_bitField0_ = bitField0_; 1428 if (((from_bitField0_ & 0x00000001) != 0)) { 1429 result.name_ = name_; 1430 } 1431 if (((from_bitField0_ & 0x00000002) != 0)) { 1432 result.slotCapacity_ = slotCapacity_; 1433 } 1434 if (((from_bitField0_ & 0x00000004) != 0)) { 1435 result.ignoreIdleSlots_ = ignoreIdleSlots_; 1436 } 1437 if (((from_bitField0_ & 0x00000008) != 0)) { 1438 result.autoscale_ = autoscaleBuilder_ == null ? autoscale_ : autoscaleBuilder_.build(); 1439 } 1440 if (((from_bitField0_ & 0x00000010) != 0)) { 1441 result.concurrency_ = concurrency_; 1442 } 1443 if (((from_bitField0_ & 0x00000020) != 0)) { 1444 result.creationTime_ = 1445 creationTimeBuilder_ == null ? creationTime_ : creationTimeBuilder_.build(); 1446 } 1447 if (((from_bitField0_ & 0x00000040) != 0)) { 1448 result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); 1449 } 1450 if (((from_bitField0_ & 0x00000080) != 0)) { 1451 result.multiRegionAuxiliary_ = multiRegionAuxiliary_; 1452 } 1453 if (((from_bitField0_ & 0x00000100) != 0)) { 1454 result.edition_ = edition_; 1455 } 1456 } 1457 1458 @java.lang.Override clone()1459 public Builder clone() { 1460 return super.clone(); 1461 } 1462 1463 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1464 public Builder setField( 1465 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1466 return super.setField(field, value); 1467 } 1468 1469 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1470 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 1471 return super.clearField(field); 1472 } 1473 1474 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1475 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 1476 return super.clearOneof(oneof); 1477 } 1478 1479 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1480 public Builder setRepeatedField( 1481 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 1482 return super.setRepeatedField(field, index, value); 1483 } 1484 1485 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1486 public Builder addRepeatedField( 1487 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1488 return super.addRepeatedField(field, value); 1489 } 1490 1491 @java.lang.Override mergeFrom(com.google.protobuf.Message other)1492 public Builder mergeFrom(com.google.protobuf.Message other) { 1493 if (other instanceof com.google.cloud.bigquery.reservation.v1.Reservation) { 1494 return mergeFrom((com.google.cloud.bigquery.reservation.v1.Reservation) other); 1495 } else { 1496 super.mergeFrom(other); 1497 return this; 1498 } 1499 } 1500 mergeFrom(com.google.cloud.bigquery.reservation.v1.Reservation other)1501 public Builder mergeFrom(com.google.cloud.bigquery.reservation.v1.Reservation other) { 1502 if (other == com.google.cloud.bigquery.reservation.v1.Reservation.getDefaultInstance()) 1503 return this; 1504 if (!other.getName().isEmpty()) { 1505 name_ = other.name_; 1506 bitField0_ |= 0x00000001; 1507 onChanged(); 1508 } 1509 if (other.getSlotCapacity() != 0L) { 1510 setSlotCapacity(other.getSlotCapacity()); 1511 } 1512 if (other.getIgnoreIdleSlots() != false) { 1513 setIgnoreIdleSlots(other.getIgnoreIdleSlots()); 1514 } 1515 if (other.hasAutoscale()) { 1516 mergeAutoscale(other.getAutoscale()); 1517 } 1518 if (other.getConcurrency() != 0L) { 1519 setConcurrency(other.getConcurrency()); 1520 } 1521 if (other.hasCreationTime()) { 1522 mergeCreationTime(other.getCreationTime()); 1523 } 1524 if (other.hasUpdateTime()) { 1525 mergeUpdateTime(other.getUpdateTime()); 1526 } 1527 if (other.getMultiRegionAuxiliary() != false) { 1528 setMultiRegionAuxiliary(other.getMultiRegionAuxiliary()); 1529 } 1530 if (other.edition_ != 0) { 1531 setEditionValue(other.getEditionValue()); 1532 } 1533 this.mergeUnknownFields(other.getUnknownFields()); 1534 onChanged(); 1535 return this; 1536 } 1537 1538 @java.lang.Override isInitialized()1539 public final boolean isInitialized() { 1540 return true; 1541 } 1542 1543 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1544 public Builder mergeFrom( 1545 com.google.protobuf.CodedInputStream input, 1546 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1547 throws java.io.IOException { 1548 if (extensionRegistry == null) { 1549 throw new java.lang.NullPointerException(); 1550 } 1551 try { 1552 boolean done = false; 1553 while (!done) { 1554 int tag = input.readTag(); 1555 switch (tag) { 1556 case 0: 1557 done = true; 1558 break; 1559 case 10: 1560 { 1561 name_ = input.readStringRequireUtf8(); 1562 bitField0_ |= 0x00000001; 1563 break; 1564 } // case 10 1565 case 16: 1566 { 1567 slotCapacity_ = input.readInt64(); 1568 bitField0_ |= 0x00000002; 1569 break; 1570 } // case 16 1571 case 32: 1572 { 1573 ignoreIdleSlots_ = input.readBool(); 1574 bitField0_ |= 0x00000004; 1575 break; 1576 } // case 32 1577 case 58: 1578 { 1579 input.readMessage(getAutoscaleFieldBuilder().getBuilder(), extensionRegistry); 1580 bitField0_ |= 0x00000008; 1581 break; 1582 } // case 58 1583 case 66: 1584 { 1585 input.readMessage(getCreationTimeFieldBuilder().getBuilder(), extensionRegistry); 1586 bitField0_ |= 0x00000020; 1587 break; 1588 } // case 66 1589 case 74: 1590 { 1591 input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); 1592 bitField0_ |= 0x00000040; 1593 break; 1594 } // case 74 1595 case 112: 1596 { 1597 multiRegionAuxiliary_ = input.readBool(); 1598 bitField0_ |= 0x00000080; 1599 break; 1600 } // case 112 1601 case 128: 1602 { 1603 concurrency_ = input.readInt64(); 1604 bitField0_ |= 0x00000010; 1605 break; 1606 } // case 128 1607 case 136: 1608 { 1609 edition_ = input.readEnum(); 1610 bitField0_ |= 0x00000100; 1611 break; 1612 } // case 136 1613 default: 1614 { 1615 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 1616 done = true; // was an endgroup tag 1617 } 1618 break; 1619 } // default: 1620 } // switch (tag) 1621 } // while (!done) 1622 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1623 throw e.unwrapIOException(); 1624 } finally { 1625 onChanged(); 1626 } // finally 1627 return this; 1628 } 1629 1630 private int bitField0_; 1631 1632 private java.lang.Object name_ = ""; 1633 /** 1634 * 1635 * 1636 * <pre> 1637 * The resource name of the reservation, e.g., 1638 * `projects/*/locations/*/reservations/team1-prod`. 1639 * The reservation_id must only contain lower case alphanumeric characters or 1640 * dashes. It must start with a letter and must not end with a dash. Its 1641 * maximum length is 64 characters. 1642 * </pre> 1643 * 1644 * <code>string name = 1;</code> 1645 * 1646 * @return The name. 1647 */ getName()1648 public java.lang.String getName() { 1649 java.lang.Object ref = name_; 1650 if (!(ref instanceof java.lang.String)) { 1651 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1652 java.lang.String s = bs.toStringUtf8(); 1653 name_ = s; 1654 return s; 1655 } else { 1656 return (java.lang.String) ref; 1657 } 1658 } 1659 /** 1660 * 1661 * 1662 * <pre> 1663 * The resource name of the reservation, e.g., 1664 * `projects/*/locations/*/reservations/team1-prod`. 1665 * The reservation_id must only contain lower case alphanumeric characters or 1666 * dashes. It must start with a letter and must not end with a dash. Its 1667 * maximum length is 64 characters. 1668 * </pre> 1669 * 1670 * <code>string name = 1;</code> 1671 * 1672 * @return The bytes for name. 1673 */ getNameBytes()1674 public com.google.protobuf.ByteString getNameBytes() { 1675 java.lang.Object ref = name_; 1676 if (ref instanceof String) { 1677 com.google.protobuf.ByteString b = 1678 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1679 name_ = b; 1680 return b; 1681 } else { 1682 return (com.google.protobuf.ByteString) ref; 1683 } 1684 } 1685 /** 1686 * 1687 * 1688 * <pre> 1689 * The resource name of the reservation, e.g., 1690 * `projects/*/locations/*/reservations/team1-prod`. 1691 * The reservation_id must only contain lower case alphanumeric characters or 1692 * dashes. It must start with a letter and must not end with a dash. Its 1693 * maximum length is 64 characters. 1694 * </pre> 1695 * 1696 * <code>string name = 1;</code> 1697 * 1698 * @param value The name to set. 1699 * @return This builder for chaining. 1700 */ setName(java.lang.String value)1701 public Builder setName(java.lang.String value) { 1702 if (value == null) { 1703 throw new NullPointerException(); 1704 } 1705 name_ = value; 1706 bitField0_ |= 0x00000001; 1707 onChanged(); 1708 return this; 1709 } 1710 /** 1711 * 1712 * 1713 * <pre> 1714 * The resource name of the reservation, e.g., 1715 * `projects/*/locations/*/reservations/team1-prod`. 1716 * The reservation_id must only contain lower case alphanumeric characters or 1717 * dashes. It must start with a letter and must not end with a dash. Its 1718 * maximum length is 64 characters. 1719 * </pre> 1720 * 1721 * <code>string name = 1;</code> 1722 * 1723 * @return This builder for chaining. 1724 */ clearName()1725 public Builder clearName() { 1726 name_ = getDefaultInstance().getName(); 1727 bitField0_ = (bitField0_ & ~0x00000001); 1728 onChanged(); 1729 return this; 1730 } 1731 /** 1732 * 1733 * 1734 * <pre> 1735 * The resource name of the reservation, e.g., 1736 * `projects/*/locations/*/reservations/team1-prod`. 1737 * The reservation_id must only contain lower case alphanumeric characters or 1738 * dashes. It must start with a letter and must not end with a dash. Its 1739 * maximum length is 64 characters. 1740 * </pre> 1741 * 1742 * <code>string name = 1;</code> 1743 * 1744 * @param value The bytes for name to set. 1745 * @return This builder for chaining. 1746 */ setNameBytes(com.google.protobuf.ByteString value)1747 public Builder setNameBytes(com.google.protobuf.ByteString value) { 1748 if (value == null) { 1749 throw new NullPointerException(); 1750 } 1751 checkByteStringIsUtf8(value); 1752 name_ = value; 1753 bitField0_ |= 0x00000001; 1754 onChanged(); 1755 return this; 1756 } 1757 1758 private long slotCapacity_; 1759 /** 1760 * 1761 * 1762 * <pre> 1763 * Minimum slots available to this reservation. A slot is a unit of 1764 * computational power in BigQuery, and serves as the unit of parallelism. 1765 * Queries using this reservation might use more slots during runtime if 1766 * ignore_idle_slots is set to false. 1767 * If total slot_capacity of the reservation and its siblings 1768 * exceeds the total slot_count of all capacity commitments, the request will 1769 * fail with `google.rpc.Code.RESOURCE_EXHAUSTED`. 1770 * NOTE: for reservations in US or EU multi-regions, slot capacity constraints 1771 * are checked separately for default and auxiliary regions. See 1772 * multi_region_auxiliary flag for more details. 1773 * </pre> 1774 * 1775 * <code>int64 slot_capacity = 2;</code> 1776 * 1777 * @return The slotCapacity. 1778 */ 1779 @java.lang.Override getSlotCapacity()1780 public long getSlotCapacity() { 1781 return slotCapacity_; 1782 } 1783 /** 1784 * 1785 * 1786 * <pre> 1787 * Minimum slots available to this reservation. A slot is a unit of 1788 * computational power in BigQuery, and serves as the unit of parallelism. 1789 * Queries using this reservation might use more slots during runtime if 1790 * ignore_idle_slots is set to false. 1791 * If total slot_capacity of the reservation and its siblings 1792 * exceeds the total slot_count of all capacity commitments, the request will 1793 * fail with `google.rpc.Code.RESOURCE_EXHAUSTED`. 1794 * NOTE: for reservations in US or EU multi-regions, slot capacity constraints 1795 * are checked separately for default and auxiliary regions. See 1796 * multi_region_auxiliary flag for more details. 1797 * </pre> 1798 * 1799 * <code>int64 slot_capacity = 2;</code> 1800 * 1801 * @param value The slotCapacity to set. 1802 * @return This builder for chaining. 1803 */ setSlotCapacity(long value)1804 public Builder setSlotCapacity(long value) { 1805 1806 slotCapacity_ = value; 1807 bitField0_ |= 0x00000002; 1808 onChanged(); 1809 return this; 1810 } 1811 /** 1812 * 1813 * 1814 * <pre> 1815 * Minimum slots available to this reservation. A slot is a unit of 1816 * computational power in BigQuery, and serves as the unit of parallelism. 1817 * Queries using this reservation might use more slots during runtime if 1818 * ignore_idle_slots is set to false. 1819 * If total slot_capacity of the reservation and its siblings 1820 * exceeds the total slot_count of all capacity commitments, the request will 1821 * fail with `google.rpc.Code.RESOURCE_EXHAUSTED`. 1822 * NOTE: for reservations in US or EU multi-regions, slot capacity constraints 1823 * are checked separately for default and auxiliary regions. See 1824 * multi_region_auxiliary flag for more details. 1825 * </pre> 1826 * 1827 * <code>int64 slot_capacity = 2;</code> 1828 * 1829 * @return This builder for chaining. 1830 */ clearSlotCapacity()1831 public Builder clearSlotCapacity() { 1832 bitField0_ = (bitField0_ & ~0x00000002); 1833 slotCapacity_ = 0L; 1834 onChanged(); 1835 return this; 1836 } 1837 1838 private boolean ignoreIdleSlots_; 1839 /** 1840 * 1841 * 1842 * <pre> 1843 * If false, any query or pipeline job using this reservation will use idle 1844 * slots from other reservations within the same admin project. If true, a 1845 * query or pipeline job using this reservation will execute with the slot 1846 * capacity specified in the slot_capacity field at most. 1847 * </pre> 1848 * 1849 * <code>bool ignore_idle_slots = 4;</code> 1850 * 1851 * @return The ignoreIdleSlots. 1852 */ 1853 @java.lang.Override getIgnoreIdleSlots()1854 public boolean getIgnoreIdleSlots() { 1855 return ignoreIdleSlots_; 1856 } 1857 /** 1858 * 1859 * 1860 * <pre> 1861 * If false, any query or pipeline job using this reservation will use idle 1862 * slots from other reservations within the same admin project. If true, a 1863 * query or pipeline job using this reservation will execute with the slot 1864 * capacity specified in the slot_capacity field at most. 1865 * </pre> 1866 * 1867 * <code>bool ignore_idle_slots = 4;</code> 1868 * 1869 * @param value The ignoreIdleSlots to set. 1870 * @return This builder for chaining. 1871 */ setIgnoreIdleSlots(boolean value)1872 public Builder setIgnoreIdleSlots(boolean value) { 1873 1874 ignoreIdleSlots_ = value; 1875 bitField0_ |= 0x00000004; 1876 onChanged(); 1877 return this; 1878 } 1879 /** 1880 * 1881 * 1882 * <pre> 1883 * If false, any query or pipeline job using this reservation will use idle 1884 * slots from other reservations within the same admin project. If true, a 1885 * query or pipeline job using this reservation will execute with the slot 1886 * capacity specified in the slot_capacity field at most. 1887 * </pre> 1888 * 1889 * <code>bool ignore_idle_slots = 4;</code> 1890 * 1891 * @return This builder for chaining. 1892 */ clearIgnoreIdleSlots()1893 public Builder clearIgnoreIdleSlots() { 1894 bitField0_ = (bitField0_ & ~0x00000004); 1895 ignoreIdleSlots_ = false; 1896 onChanged(); 1897 return this; 1898 } 1899 1900 private com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale autoscale_; 1901 private com.google.protobuf.SingleFieldBuilderV3< 1902 com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale, 1903 com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale.Builder, 1904 com.google.cloud.bigquery.reservation.v1.Reservation.AutoscaleOrBuilder> 1905 autoscaleBuilder_; 1906 /** 1907 * 1908 * 1909 * <pre> 1910 * The configuration parameters for the auto scaling feature. Note this is an 1911 * alpha feature. 1912 * </pre> 1913 * 1914 * <code>.google.cloud.bigquery.reservation.v1.Reservation.Autoscale autoscale = 7;</code> 1915 * 1916 * @return Whether the autoscale field is set. 1917 */ hasAutoscale()1918 public boolean hasAutoscale() { 1919 return ((bitField0_ & 0x00000008) != 0); 1920 } 1921 /** 1922 * 1923 * 1924 * <pre> 1925 * The configuration parameters for the auto scaling feature. Note this is an 1926 * alpha feature. 1927 * </pre> 1928 * 1929 * <code>.google.cloud.bigquery.reservation.v1.Reservation.Autoscale autoscale = 7;</code> 1930 * 1931 * @return The autoscale. 1932 */ getAutoscale()1933 public com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale getAutoscale() { 1934 if (autoscaleBuilder_ == null) { 1935 return autoscale_ == null 1936 ? com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale.getDefaultInstance() 1937 : autoscale_; 1938 } else { 1939 return autoscaleBuilder_.getMessage(); 1940 } 1941 } 1942 /** 1943 * 1944 * 1945 * <pre> 1946 * The configuration parameters for the auto scaling feature. Note this is an 1947 * alpha feature. 1948 * </pre> 1949 * 1950 * <code>.google.cloud.bigquery.reservation.v1.Reservation.Autoscale autoscale = 7;</code> 1951 */ setAutoscale( com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale value)1952 public Builder setAutoscale( 1953 com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale value) { 1954 if (autoscaleBuilder_ == null) { 1955 if (value == null) { 1956 throw new NullPointerException(); 1957 } 1958 autoscale_ = value; 1959 } else { 1960 autoscaleBuilder_.setMessage(value); 1961 } 1962 bitField0_ |= 0x00000008; 1963 onChanged(); 1964 return this; 1965 } 1966 /** 1967 * 1968 * 1969 * <pre> 1970 * The configuration parameters for the auto scaling feature. Note this is an 1971 * alpha feature. 1972 * </pre> 1973 * 1974 * <code>.google.cloud.bigquery.reservation.v1.Reservation.Autoscale autoscale = 7;</code> 1975 */ setAutoscale( com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale.Builder builderForValue)1976 public Builder setAutoscale( 1977 com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale.Builder builderForValue) { 1978 if (autoscaleBuilder_ == null) { 1979 autoscale_ = builderForValue.build(); 1980 } else { 1981 autoscaleBuilder_.setMessage(builderForValue.build()); 1982 } 1983 bitField0_ |= 0x00000008; 1984 onChanged(); 1985 return this; 1986 } 1987 /** 1988 * 1989 * 1990 * <pre> 1991 * The configuration parameters for the auto scaling feature. Note this is an 1992 * alpha feature. 1993 * </pre> 1994 * 1995 * <code>.google.cloud.bigquery.reservation.v1.Reservation.Autoscale autoscale = 7;</code> 1996 */ mergeAutoscale( com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale value)1997 public Builder mergeAutoscale( 1998 com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale value) { 1999 if (autoscaleBuilder_ == null) { 2000 if (((bitField0_ & 0x00000008) != 0) 2001 && autoscale_ != null 2002 && autoscale_ 2003 != com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale 2004 .getDefaultInstance()) { 2005 getAutoscaleBuilder().mergeFrom(value); 2006 } else { 2007 autoscale_ = value; 2008 } 2009 } else { 2010 autoscaleBuilder_.mergeFrom(value); 2011 } 2012 bitField0_ |= 0x00000008; 2013 onChanged(); 2014 return this; 2015 } 2016 /** 2017 * 2018 * 2019 * <pre> 2020 * The configuration parameters for the auto scaling feature. Note this is an 2021 * alpha feature. 2022 * </pre> 2023 * 2024 * <code>.google.cloud.bigquery.reservation.v1.Reservation.Autoscale autoscale = 7;</code> 2025 */ clearAutoscale()2026 public Builder clearAutoscale() { 2027 bitField0_ = (bitField0_ & ~0x00000008); 2028 autoscale_ = null; 2029 if (autoscaleBuilder_ != null) { 2030 autoscaleBuilder_.dispose(); 2031 autoscaleBuilder_ = null; 2032 } 2033 onChanged(); 2034 return this; 2035 } 2036 /** 2037 * 2038 * 2039 * <pre> 2040 * The configuration parameters for the auto scaling feature. Note this is an 2041 * alpha feature. 2042 * </pre> 2043 * 2044 * <code>.google.cloud.bigquery.reservation.v1.Reservation.Autoscale autoscale = 7;</code> 2045 */ 2046 public com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale.Builder getAutoscaleBuilder()2047 getAutoscaleBuilder() { 2048 bitField0_ |= 0x00000008; 2049 onChanged(); 2050 return getAutoscaleFieldBuilder().getBuilder(); 2051 } 2052 /** 2053 * 2054 * 2055 * <pre> 2056 * The configuration parameters for the auto scaling feature. Note this is an 2057 * alpha feature. 2058 * </pre> 2059 * 2060 * <code>.google.cloud.bigquery.reservation.v1.Reservation.Autoscale autoscale = 7;</code> 2061 */ 2062 public com.google.cloud.bigquery.reservation.v1.Reservation.AutoscaleOrBuilder getAutoscaleOrBuilder()2063 getAutoscaleOrBuilder() { 2064 if (autoscaleBuilder_ != null) { 2065 return autoscaleBuilder_.getMessageOrBuilder(); 2066 } else { 2067 return autoscale_ == null 2068 ? com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale.getDefaultInstance() 2069 : autoscale_; 2070 } 2071 } 2072 /** 2073 * 2074 * 2075 * <pre> 2076 * The configuration parameters for the auto scaling feature. Note this is an 2077 * alpha feature. 2078 * </pre> 2079 * 2080 * <code>.google.cloud.bigquery.reservation.v1.Reservation.Autoscale autoscale = 7;</code> 2081 */ 2082 private com.google.protobuf.SingleFieldBuilderV3< 2083 com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale, 2084 com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale.Builder, 2085 com.google.cloud.bigquery.reservation.v1.Reservation.AutoscaleOrBuilder> getAutoscaleFieldBuilder()2086 getAutoscaleFieldBuilder() { 2087 if (autoscaleBuilder_ == null) { 2088 autoscaleBuilder_ = 2089 new com.google.protobuf.SingleFieldBuilderV3< 2090 com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale, 2091 com.google.cloud.bigquery.reservation.v1.Reservation.Autoscale.Builder, 2092 com.google.cloud.bigquery.reservation.v1.Reservation.AutoscaleOrBuilder>( 2093 getAutoscale(), getParentForChildren(), isClean()); 2094 autoscale_ = null; 2095 } 2096 return autoscaleBuilder_; 2097 } 2098 2099 private long concurrency_; 2100 /** 2101 * 2102 * 2103 * <pre> 2104 * Job concurrency target which sets a soft upper bound on the number of jobs 2105 * that can run concurrently in this reservation. This is a soft target due to 2106 * asynchronous nature of the system and various optimizations for small 2107 * queries. 2108 * Default value is 0 which means that concurrency target will be 2109 * automatically computed by the system. 2110 * NOTE: this field is exposed as `target_job_concurrency` in the Information 2111 * Schema, DDL and BQ CLI. 2112 * </pre> 2113 * 2114 * <code>int64 concurrency = 16;</code> 2115 * 2116 * @return The concurrency. 2117 */ 2118 @java.lang.Override getConcurrency()2119 public long getConcurrency() { 2120 return concurrency_; 2121 } 2122 /** 2123 * 2124 * 2125 * <pre> 2126 * Job concurrency target which sets a soft upper bound on the number of jobs 2127 * that can run concurrently in this reservation. This is a soft target due to 2128 * asynchronous nature of the system and various optimizations for small 2129 * queries. 2130 * Default value is 0 which means that concurrency target will be 2131 * automatically computed by the system. 2132 * NOTE: this field is exposed as `target_job_concurrency` in the Information 2133 * Schema, DDL and BQ CLI. 2134 * </pre> 2135 * 2136 * <code>int64 concurrency = 16;</code> 2137 * 2138 * @param value The concurrency to set. 2139 * @return This builder for chaining. 2140 */ setConcurrency(long value)2141 public Builder setConcurrency(long value) { 2142 2143 concurrency_ = value; 2144 bitField0_ |= 0x00000010; 2145 onChanged(); 2146 return this; 2147 } 2148 /** 2149 * 2150 * 2151 * <pre> 2152 * Job concurrency target which sets a soft upper bound on the number of jobs 2153 * that can run concurrently in this reservation. This is a soft target due to 2154 * asynchronous nature of the system and various optimizations for small 2155 * queries. 2156 * Default value is 0 which means that concurrency target will be 2157 * automatically computed by the system. 2158 * NOTE: this field is exposed as `target_job_concurrency` in the Information 2159 * Schema, DDL and BQ CLI. 2160 * </pre> 2161 * 2162 * <code>int64 concurrency = 16;</code> 2163 * 2164 * @return This builder for chaining. 2165 */ clearConcurrency()2166 public Builder clearConcurrency() { 2167 bitField0_ = (bitField0_ & ~0x00000010); 2168 concurrency_ = 0L; 2169 onChanged(); 2170 return this; 2171 } 2172 2173 private com.google.protobuf.Timestamp creationTime_; 2174 private com.google.protobuf.SingleFieldBuilderV3< 2175 com.google.protobuf.Timestamp, 2176 com.google.protobuf.Timestamp.Builder, 2177 com.google.protobuf.TimestampOrBuilder> 2178 creationTimeBuilder_; 2179 /** 2180 * 2181 * 2182 * <pre> 2183 * Output only. Creation time of the reservation. 2184 * </pre> 2185 * 2186 * <code> 2187 * .google.protobuf.Timestamp creation_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2188 * </code> 2189 * 2190 * @return Whether the creationTime field is set. 2191 */ hasCreationTime()2192 public boolean hasCreationTime() { 2193 return ((bitField0_ & 0x00000020) != 0); 2194 } 2195 /** 2196 * 2197 * 2198 * <pre> 2199 * Output only. Creation time of the reservation. 2200 * </pre> 2201 * 2202 * <code> 2203 * .google.protobuf.Timestamp creation_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2204 * </code> 2205 * 2206 * @return The creationTime. 2207 */ getCreationTime()2208 public com.google.protobuf.Timestamp getCreationTime() { 2209 if (creationTimeBuilder_ == null) { 2210 return creationTime_ == null 2211 ? com.google.protobuf.Timestamp.getDefaultInstance() 2212 : creationTime_; 2213 } else { 2214 return creationTimeBuilder_.getMessage(); 2215 } 2216 } 2217 /** 2218 * 2219 * 2220 * <pre> 2221 * Output only. Creation time of the reservation. 2222 * </pre> 2223 * 2224 * <code> 2225 * .google.protobuf.Timestamp creation_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2226 * </code> 2227 */ setCreationTime(com.google.protobuf.Timestamp value)2228 public Builder setCreationTime(com.google.protobuf.Timestamp value) { 2229 if (creationTimeBuilder_ == null) { 2230 if (value == null) { 2231 throw new NullPointerException(); 2232 } 2233 creationTime_ = value; 2234 } else { 2235 creationTimeBuilder_.setMessage(value); 2236 } 2237 bitField0_ |= 0x00000020; 2238 onChanged(); 2239 return this; 2240 } 2241 /** 2242 * 2243 * 2244 * <pre> 2245 * Output only. Creation time of the reservation. 2246 * </pre> 2247 * 2248 * <code> 2249 * .google.protobuf.Timestamp creation_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2250 * </code> 2251 */ setCreationTime(com.google.protobuf.Timestamp.Builder builderForValue)2252 public Builder setCreationTime(com.google.protobuf.Timestamp.Builder builderForValue) { 2253 if (creationTimeBuilder_ == null) { 2254 creationTime_ = builderForValue.build(); 2255 } else { 2256 creationTimeBuilder_.setMessage(builderForValue.build()); 2257 } 2258 bitField0_ |= 0x00000020; 2259 onChanged(); 2260 return this; 2261 } 2262 /** 2263 * 2264 * 2265 * <pre> 2266 * Output only. Creation time of the reservation. 2267 * </pre> 2268 * 2269 * <code> 2270 * .google.protobuf.Timestamp creation_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2271 * </code> 2272 */ mergeCreationTime(com.google.protobuf.Timestamp value)2273 public Builder mergeCreationTime(com.google.protobuf.Timestamp value) { 2274 if (creationTimeBuilder_ == null) { 2275 if (((bitField0_ & 0x00000020) != 0) 2276 && creationTime_ != null 2277 && creationTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { 2278 getCreationTimeBuilder().mergeFrom(value); 2279 } else { 2280 creationTime_ = value; 2281 } 2282 } else { 2283 creationTimeBuilder_.mergeFrom(value); 2284 } 2285 bitField0_ |= 0x00000020; 2286 onChanged(); 2287 return this; 2288 } 2289 /** 2290 * 2291 * 2292 * <pre> 2293 * Output only. Creation time of the reservation. 2294 * </pre> 2295 * 2296 * <code> 2297 * .google.protobuf.Timestamp creation_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2298 * </code> 2299 */ clearCreationTime()2300 public Builder clearCreationTime() { 2301 bitField0_ = (bitField0_ & ~0x00000020); 2302 creationTime_ = null; 2303 if (creationTimeBuilder_ != null) { 2304 creationTimeBuilder_.dispose(); 2305 creationTimeBuilder_ = null; 2306 } 2307 onChanged(); 2308 return this; 2309 } 2310 /** 2311 * 2312 * 2313 * <pre> 2314 * Output only. Creation time of the reservation. 2315 * </pre> 2316 * 2317 * <code> 2318 * .google.protobuf.Timestamp creation_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2319 * </code> 2320 */ getCreationTimeBuilder()2321 public com.google.protobuf.Timestamp.Builder getCreationTimeBuilder() { 2322 bitField0_ |= 0x00000020; 2323 onChanged(); 2324 return getCreationTimeFieldBuilder().getBuilder(); 2325 } 2326 /** 2327 * 2328 * 2329 * <pre> 2330 * Output only. Creation time of the reservation. 2331 * </pre> 2332 * 2333 * <code> 2334 * .google.protobuf.Timestamp creation_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2335 * </code> 2336 */ getCreationTimeOrBuilder()2337 public com.google.protobuf.TimestampOrBuilder getCreationTimeOrBuilder() { 2338 if (creationTimeBuilder_ != null) { 2339 return creationTimeBuilder_.getMessageOrBuilder(); 2340 } else { 2341 return creationTime_ == null 2342 ? com.google.protobuf.Timestamp.getDefaultInstance() 2343 : creationTime_; 2344 } 2345 } 2346 /** 2347 * 2348 * 2349 * <pre> 2350 * Output only. Creation time of the reservation. 2351 * </pre> 2352 * 2353 * <code> 2354 * .google.protobuf.Timestamp creation_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2355 * </code> 2356 */ 2357 private com.google.protobuf.SingleFieldBuilderV3< 2358 com.google.protobuf.Timestamp, 2359 com.google.protobuf.Timestamp.Builder, 2360 com.google.protobuf.TimestampOrBuilder> getCreationTimeFieldBuilder()2361 getCreationTimeFieldBuilder() { 2362 if (creationTimeBuilder_ == null) { 2363 creationTimeBuilder_ = 2364 new com.google.protobuf.SingleFieldBuilderV3< 2365 com.google.protobuf.Timestamp, 2366 com.google.protobuf.Timestamp.Builder, 2367 com.google.protobuf.TimestampOrBuilder>( 2368 getCreationTime(), getParentForChildren(), isClean()); 2369 creationTime_ = null; 2370 } 2371 return creationTimeBuilder_; 2372 } 2373 2374 private com.google.protobuf.Timestamp updateTime_; 2375 private com.google.protobuf.SingleFieldBuilderV3< 2376 com.google.protobuf.Timestamp, 2377 com.google.protobuf.Timestamp.Builder, 2378 com.google.protobuf.TimestampOrBuilder> 2379 updateTimeBuilder_; 2380 /** 2381 * 2382 * 2383 * <pre> 2384 * Output only. Last update time of the reservation. 2385 * </pre> 2386 * 2387 * <code> 2388 * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2389 * </code> 2390 * 2391 * @return Whether the updateTime field is set. 2392 */ hasUpdateTime()2393 public boolean hasUpdateTime() { 2394 return ((bitField0_ & 0x00000040) != 0); 2395 } 2396 /** 2397 * 2398 * 2399 * <pre> 2400 * Output only. Last update time of the reservation. 2401 * </pre> 2402 * 2403 * <code> 2404 * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2405 * </code> 2406 * 2407 * @return The updateTime. 2408 */ getUpdateTime()2409 public com.google.protobuf.Timestamp getUpdateTime() { 2410 if (updateTimeBuilder_ == null) { 2411 return updateTime_ == null 2412 ? com.google.protobuf.Timestamp.getDefaultInstance() 2413 : updateTime_; 2414 } else { 2415 return updateTimeBuilder_.getMessage(); 2416 } 2417 } 2418 /** 2419 * 2420 * 2421 * <pre> 2422 * Output only. Last update time of the reservation. 2423 * </pre> 2424 * 2425 * <code> 2426 * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2427 * </code> 2428 */ setUpdateTime(com.google.protobuf.Timestamp value)2429 public Builder setUpdateTime(com.google.protobuf.Timestamp value) { 2430 if (updateTimeBuilder_ == null) { 2431 if (value == null) { 2432 throw new NullPointerException(); 2433 } 2434 updateTime_ = value; 2435 } else { 2436 updateTimeBuilder_.setMessage(value); 2437 } 2438 bitField0_ |= 0x00000040; 2439 onChanged(); 2440 return this; 2441 } 2442 /** 2443 * 2444 * 2445 * <pre> 2446 * Output only. Last update time of the reservation. 2447 * </pre> 2448 * 2449 * <code> 2450 * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2451 * </code> 2452 */ setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue)2453 public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { 2454 if (updateTimeBuilder_ == null) { 2455 updateTime_ = builderForValue.build(); 2456 } else { 2457 updateTimeBuilder_.setMessage(builderForValue.build()); 2458 } 2459 bitField0_ |= 0x00000040; 2460 onChanged(); 2461 return this; 2462 } 2463 /** 2464 * 2465 * 2466 * <pre> 2467 * Output only. Last update time of the reservation. 2468 * </pre> 2469 * 2470 * <code> 2471 * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2472 * </code> 2473 */ mergeUpdateTime(com.google.protobuf.Timestamp value)2474 public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { 2475 if (updateTimeBuilder_ == null) { 2476 if (((bitField0_ & 0x00000040) != 0) 2477 && updateTime_ != null 2478 && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { 2479 getUpdateTimeBuilder().mergeFrom(value); 2480 } else { 2481 updateTime_ = value; 2482 } 2483 } else { 2484 updateTimeBuilder_.mergeFrom(value); 2485 } 2486 bitField0_ |= 0x00000040; 2487 onChanged(); 2488 return this; 2489 } 2490 /** 2491 * 2492 * 2493 * <pre> 2494 * Output only. Last update time of the reservation. 2495 * </pre> 2496 * 2497 * <code> 2498 * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2499 * </code> 2500 */ clearUpdateTime()2501 public Builder clearUpdateTime() { 2502 bitField0_ = (bitField0_ & ~0x00000040); 2503 updateTime_ = null; 2504 if (updateTimeBuilder_ != null) { 2505 updateTimeBuilder_.dispose(); 2506 updateTimeBuilder_ = null; 2507 } 2508 onChanged(); 2509 return this; 2510 } 2511 /** 2512 * 2513 * 2514 * <pre> 2515 * Output only. Last update time of the reservation. 2516 * </pre> 2517 * 2518 * <code> 2519 * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2520 * </code> 2521 */ getUpdateTimeBuilder()2522 public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { 2523 bitField0_ |= 0x00000040; 2524 onChanged(); 2525 return getUpdateTimeFieldBuilder().getBuilder(); 2526 } 2527 /** 2528 * 2529 * 2530 * <pre> 2531 * Output only. Last update time of the reservation. 2532 * </pre> 2533 * 2534 * <code> 2535 * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2536 * </code> 2537 */ getUpdateTimeOrBuilder()2538 public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { 2539 if (updateTimeBuilder_ != null) { 2540 return updateTimeBuilder_.getMessageOrBuilder(); 2541 } else { 2542 return updateTime_ == null 2543 ? com.google.protobuf.Timestamp.getDefaultInstance() 2544 : updateTime_; 2545 } 2546 } 2547 /** 2548 * 2549 * 2550 * <pre> 2551 * Output only. Last update time of the reservation. 2552 * </pre> 2553 * 2554 * <code> 2555 * .google.protobuf.Timestamp update_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; 2556 * </code> 2557 */ 2558 private com.google.protobuf.SingleFieldBuilderV3< 2559 com.google.protobuf.Timestamp, 2560 com.google.protobuf.Timestamp.Builder, 2561 com.google.protobuf.TimestampOrBuilder> getUpdateTimeFieldBuilder()2562 getUpdateTimeFieldBuilder() { 2563 if (updateTimeBuilder_ == null) { 2564 updateTimeBuilder_ = 2565 new com.google.protobuf.SingleFieldBuilderV3< 2566 com.google.protobuf.Timestamp, 2567 com.google.protobuf.Timestamp.Builder, 2568 com.google.protobuf.TimestampOrBuilder>( 2569 getUpdateTime(), getParentForChildren(), isClean()); 2570 updateTime_ = null; 2571 } 2572 return updateTimeBuilder_; 2573 } 2574 2575 private boolean multiRegionAuxiliary_; 2576 /** 2577 * 2578 * 2579 * <pre> 2580 * Applicable only for reservations located within one of the BigQuery 2581 * multi-regions (US or EU). 2582 * If set to true, this reservation is placed in the organization's 2583 * secondary region which is designated for disaster recovery purposes. 2584 * If false, this reservation is placed in the organization's default region. 2585 * NOTE: this is a preview feature. Project must be allow-listed in order to 2586 * set this field. 2587 * </pre> 2588 * 2589 * <code>bool multi_region_auxiliary = 14;</code> 2590 * 2591 * @return The multiRegionAuxiliary. 2592 */ 2593 @java.lang.Override getMultiRegionAuxiliary()2594 public boolean getMultiRegionAuxiliary() { 2595 return multiRegionAuxiliary_; 2596 } 2597 /** 2598 * 2599 * 2600 * <pre> 2601 * Applicable only for reservations located within one of the BigQuery 2602 * multi-regions (US or EU). 2603 * If set to true, this reservation is placed in the organization's 2604 * secondary region which is designated for disaster recovery purposes. 2605 * If false, this reservation is placed in the organization's default region. 2606 * NOTE: this is a preview feature. Project must be allow-listed in order to 2607 * set this field. 2608 * </pre> 2609 * 2610 * <code>bool multi_region_auxiliary = 14;</code> 2611 * 2612 * @param value The multiRegionAuxiliary to set. 2613 * @return This builder for chaining. 2614 */ setMultiRegionAuxiliary(boolean value)2615 public Builder setMultiRegionAuxiliary(boolean value) { 2616 2617 multiRegionAuxiliary_ = value; 2618 bitField0_ |= 0x00000080; 2619 onChanged(); 2620 return this; 2621 } 2622 /** 2623 * 2624 * 2625 * <pre> 2626 * Applicable only for reservations located within one of the BigQuery 2627 * multi-regions (US or EU). 2628 * If set to true, this reservation is placed in the organization's 2629 * secondary region which is designated for disaster recovery purposes. 2630 * If false, this reservation is placed in the organization's default region. 2631 * NOTE: this is a preview feature. Project must be allow-listed in order to 2632 * set this field. 2633 * </pre> 2634 * 2635 * <code>bool multi_region_auxiliary = 14;</code> 2636 * 2637 * @return This builder for chaining. 2638 */ clearMultiRegionAuxiliary()2639 public Builder clearMultiRegionAuxiliary() { 2640 bitField0_ = (bitField0_ & ~0x00000080); 2641 multiRegionAuxiliary_ = false; 2642 onChanged(); 2643 return this; 2644 } 2645 2646 private int edition_ = 0; 2647 /** 2648 * 2649 * 2650 * <pre> 2651 * Edition of the reservation. 2652 * </pre> 2653 * 2654 * <code>.google.cloud.bigquery.reservation.v1.Edition edition = 17;</code> 2655 * 2656 * @return The enum numeric value on the wire for edition. 2657 */ 2658 @java.lang.Override getEditionValue()2659 public int getEditionValue() { 2660 return edition_; 2661 } 2662 /** 2663 * 2664 * 2665 * <pre> 2666 * Edition of the reservation. 2667 * </pre> 2668 * 2669 * <code>.google.cloud.bigquery.reservation.v1.Edition edition = 17;</code> 2670 * 2671 * @param value The enum numeric value on the wire for edition to set. 2672 * @return This builder for chaining. 2673 */ setEditionValue(int value)2674 public Builder setEditionValue(int value) { 2675 edition_ = value; 2676 bitField0_ |= 0x00000100; 2677 onChanged(); 2678 return this; 2679 } 2680 /** 2681 * 2682 * 2683 * <pre> 2684 * Edition of the reservation. 2685 * </pre> 2686 * 2687 * <code>.google.cloud.bigquery.reservation.v1.Edition edition = 17;</code> 2688 * 2689 * @return The edition. 2690 */ 2691 @java.lang.Override getEdition()2692 public com.google.cloud.bigquery.reservation.v1.Edition getEdition() { 2693 com.google.cloud.bigquery.reservation.v1.Edition result = 2694 com.google.cloud.bigquery.reservation.v1.Edition.forNumber(edition_); 2695 return result == null 2696 ? com.google.cloud.bigquery.reservation.v1.Edition.UNRECOGNIZED 2697 : result; 2698 } 2699 /** 2700 * 2701 * 2702 * <pre> 2703 * Edition of the reservation. 2704 * </pre> 2705 * 2706 * <code>.google.cloud.bigquery.reservation.v1.Edition edition = 17;</code> 2707 * 2708 * @param value The edition to set. 2709 * @return This builder for chaining. 2710 */ setEdition(com.google.cloud.bigquery.reservation.v1.Edition value)2711 public Builder setEdition(com.google.cloud.bigquery.reservation.v1.Edition value) { 2712 if (value == null) { 2713 throw new NullPointerException(); 2714 } 2715 bitField0_ |= 0x00000100; 2716 edition_ = value.getNumber(); 2717 onChanged(); 2718 return this; 2719 } 2720 /** 2721 * 2722 * 2723 * <pre> 2724 * Edition of the reservation. 2725 * </pre> 2726 * 2727 * <code>.google.cloud.bigquery.reservation.v1.Edition edition = 17;</code> 2728 * 2729 * @return This builder for chaining. 2730 */ clearEdition()2731 public Builder clearEdition() { 2732 bitField0_ = (bitField0_ & ~0x00000100); 2733 edition_ = 0; 2734 onChanged(); 2735 return this; 2736 } 2737 2738 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)2739 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 2740 return super.setUnknownFields(unknownFields); 2741 } 2742 2743 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)2744 public final Builder mergeUnknownFields( 2745 final com.google.protobuf.UnknownFieldSet unknownFields) { 2746 return super.mergeUnknownFields(unknownFields); 2747 } 2748 2749 // @@protoc_insertion_point(builder_scope:google.cloud.bigquery.reservation.v1.Reservation) 2750 } 2751 2752 // @@protoc_insertion_point(class_scope:google.cloud.bigquery.reservation.v1.Reservation) 2753 private static final com.google.cloud.bigquery.reservation.v1.Reservation DEFAULT_INSTANCE; 2754 2755 static { 2756 DEFAULT_INSTANCE = new com.google.cloud.bigquery.reservation.v1.Reservation(); 2757 } 2758 getDefaultInstance()2759 public static com.google.cloud.bigquery.reservation.v1.Reservation getDefaultInstance() { 2760 return DEFAULT_INSTANCE; 2761 } 2762 2763 private static final com.google.protobuf.Parser<Reservation> PARSER = 2764 new com.google.protobuf.AbstractParser<Reservation>() { 2765 @java.lang.Override 2766 public Reservation parsePartialFrom( 2767 com.google.protobuf.CodedInputStream input, 2768 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 2769 throws com.google.protobuf.InvalidProtocolBufferException { 2770 Builder builder = newBuilder(); 2771 try { 2772 builder.mergeFrom(input, extensionRegistry); 2773 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 2774 throw e.setUnfinishedMessage(builder.buildPartial()); 2775 } catch (com.google.protobuf.UninitializedMessageException e) { 2776 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 2777 } catch (java.io.IOException e) { 2778 throw new com.google.protobuf.InvalidProtocolBufferException(e) 2779 .setUnfinishedMessage(builder.buildPartial()); 2780 } 2781 return builder.buildPartial(); 2782 } 2783 }; 2784 parser()2785 public static com.google.protobuf.Parser<Reservation> parser() { 2786 return PARSER; 2787 } 2788 2789 @java.lang.Override getParserForType()2790 public com.google.protobuf.Parser<Reservation> getParserForType() { 2791 return PARSER; 2792 } 2793 2794 @java.lang.Override getDefaultInstanceForType()2795 public com.google.cloud.bigquery.reservation.v1.Reservation getDefaultInstanceForType() { 2796 return DEFAULT_INSTANCE; 2797 } 2798 } 2799