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/compute/v1/compute.proto 18 19 package com.google.cloud.compute.v1; 20 21 /** 22 * 23 * 24 * <pre> 25 * Represents an Autoscaler resource. Google Compute Engine has two Autoscaler resources: * [Zonal](/compute/docs/reference/rest/v1/autoscalers) * [Regional](/compute/docs/reference/rest/v1/regionAutoscalers) Use autoscalers to automatically add or delete instances from a managed instance group according to your defined autoscaling policy. For more information, read Autoscaling Groups of Instances. For zonal managed instance groups resource, use the autoscaler resource. For regional managed instance groups, use the regionAutoscalers resource. 26 * </pre> 27 * 28 * Protobuf type {@code google.cloud.compute.v1.Autoscaler} 29 */ 30 public final class Autoscaler extends com.google.protobuf.GeneratedMessageV3 31 implements 32 // @@protoc_insertion_point(message_implements:google.cloud.compute.v1.Autoscaler) 33 AutoscalerOrBuilder { 34 private static final long serialVersionUID = 0L; 35 // Use Autoscaler.newBuilder() to construct. Autoscaler(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36 private Autoscaler(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 37 super(builder); 38 } 39 Autoscaler()40 private Autoscaler() { 41 creationTimestamp_ = ""; 42 description_ = ""; 43 kind_ = ""; 44 name_ = ""; 45 region_ = ""; 46 selfLink_ = ""; 47 status_ = ""; 48 statusDetails_ = java.util.Collections.emptyList(); 49 target_ = ""; 50 zone_ = ""; 51 } 52 53 @java.lang.Override 54 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)55 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 56 return new Autoscaler(); 57 } 58 59 @java.lang.Override getUnknownFields()60 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 61 return this.unknownFields; 62 } 63 getDescriptor()64 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 65 return com.google.cloud.compute.v1.Compute 66 .internal_static_google_cloud_compute_v1_Autoscaler_descriptor; 67 } 68 69 @SuppressWarnings({"rawtypes"}) 70 @java.lang.Override internalGetMapField(int number)71 protected com.google.protobuf.MapField internalGetMapField(int number) { 72 switch (number) { 73 case 465950178: 74 return internalGetScalingScheduleStatus(); 75 default: 76 throw new RuntimeException("Invalid map field number: " + number); 77 } 78 } 79 80 @java.lang.Override 81 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()82 internalGetFieldAccessorTable() { 83 return com.google.cloud.compute.v1.Compute 84 .internal_static_google_cloud_compute_v1_Autoscaler_fieldAccessorTable 85 .ensureFieldAccessorsInitialized( 86 com.google.cloud.compute.v1.Autoscaler.class, 87 com.google.cloud.compute.v1.Autoscaler.Builder.class); 88 } 89 90 /** 91 * 92 * 93 * <pre> 94 * [Output Only] The status of the autoscaler configuration. Current set of possible values: - PENDING: Autoscaler backend hasn't read new/updated configuration. - DELETING: Configuration is being deleted. - ACTIVE: Configuration is acknowledged to be effective. Some warnings might be present in the statusDetails field. - ERROR: Configuration has errors. Actionable for users. Details are present in the statusDetails field. New values might be added in the future. 95 * </pre> 96 * 97 * Protobuf enum {@code google.cloud.compute.v1.Autoscaler.Status} 98 */ 99 public enum Status implements com.google.protobuf.ProtocolMessageEnum { 100 /** 101 * 102 * 103 * <pre> 104 * A value indicating that the enum field is not set. 105 * </pre> 106 * 107 * <code>UNDEFINED_STATUS = 0;</code> 108 */ 109 UNDEFINED_STATUS(0), 110 /** 111 * 112 * 113 * <pre> 114 * Configuration is acknowledged to be effective 115 * </pre> 116 * 117 * <code>ACTIVE = 314733318;</code> 118 */ 119 ACTIVE(314733318), 120 /** 121 * 122 * 123 * <pre> 124 * Configuration is being deleted 125 * </pre> 126 * 127 * <code>DELETING = 528602024;</code> 128 */ 129 DELETING(528602024), 130 /** 131 * 132 * 133 * <pre> 134 * Configuration has errors. Actionable for users. 135 * </pre> 136 * 137 * <code>ERROR = 66247144;</code> 138 */ 139 ERROR(66247144), 140 /** 141 * 142 * 143 * <pre> 144 * Autoscaler backend hasn't read new/updated configuration 145 * </pre> 146 * 147 * <code>PENDING = 35394935;</code> 148 */ 149 PENDING(35394935), 150 UNRECOGNIZED(-1), 151 ; 152 153 /** 154 * 155 * 156 * <pre> 157 * A value indicating that the enum field is not set. 158 * </pre> 159 * 160 * <code>UNDEFINED_STATUS = 0;</code> 161 */ 162 public static final int UNDEFINED_STATUS_VALUE = 0; 163 /** 164 * 165 * 166 * <pre> 167 * Configuration is acknowledged to be effective 168 * </pre> 169 * 170 * <code>ACTIVE = 314733318;</code> 171 */ 172 public static final int ACTIVE_VALUE = 314733318; 173 /** 174 * 175 * 176 * <pre> 177 * Configuration is being deleted 178 * </pre> 179 * 180 * <code>DELETING = 528602024;</code> 181 */ 182 public static final int DELETING_VALUE = 528602024; 183 /** 184 * 185 * 186 * <pre> 187 * Configuration has errors. Actionable for users. 188 * </pre> 189 * 190 * <code>ERROR = 66247144;</code> 191 */ 192 public static final int ERROR_VALUE = 66247144; 193 /** 194 * 195 * 196 * <pre> 197 * Autoscaler backend hasn't read new/updated configuration 198 * </pre> 199 * 200 * <code>PENDING = 35394935;</code> 201 */ 202 public static final int PENDING_VALUE = 35394935; 203 getNumber()204 public final int getNumber() { 205 if (this == UNRECOGNIZED) { 206 throw new java.lang.IllegalArgumentException( 207 "Can't get the number of an unknown enum value."); 208 } 209 return value; 210 } 211 212 /** 213 * @param value The numeric wire value of the corresponding enum entry. 214 * @return The enum associated with the given numeric wire value. 215 * @deprecated Use {@link #forNumber(int)} instead. 216 */ 217 @java.lang.Deprecated valueOf(int value)218 public static Status valueOf(int value) { 219 return forNumber(value); 220 } 221 222 /** 223 * @param value The numeric wire value of the corresponding enum entry. 224 * @return The enum associated with the given numeric wire value. 225 */ forNumber(int value)226 public static Status forNumber(int value) { 227 switch (value) { 228 case 0: 229 return UNDEFINED_STATUS; 230 case 314733318: 231 return ACTIVE; 232 case 528602024: 233 return DELETING; 234 case 66247144: 235 return ERROR; 236 case 35394935: 237 return PENDING; 238 default: 239 return null; 240 } 241 } 242 internalGetValueMap()243 public static com.google.protobuf.Internal.EnumLiteMap<Status> internalGetValueMap() { 244 return internalValueMap; 245 } 246 247 private static final com.google.protobuf.Internal.EnumLiteMap<Status> internalValueMap = 248 new com.google.protobuf.Internal.EnumLiteMap<Status>() { 249 public Status findValueByNumber(int number) { 250 return Status.forNumber(number); 251 } 252 }; 253 getValueDescriptor()254 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 255 if (this == UNRECOGNIZED) { 256 throw new java.lang.IllegalStateException( 257 "Can't get the descriptor of an unrecognized enum value."); 258 } 259 return getDescriptor().getValues().get(ordinal()); 260 } 261 getDescriptorForType()262 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 263 return getDescriptor(); 264 } 265 getDescriptor()266 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 267 return com.google.cloud.compute.v1.Autoscaler.getDescriptor().getEnumTypes().get(0); 268 } 269 270 private static final Status[] VALUES = values(); 271 valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)272 public static Status valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 273 if (desc.getType() != getDescriptor()) { 274 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 275 } 276 if (desc.getIndex() == -1) { 277 return UNRECOGNIZED; 278 } 279 return VALUES[desc.getIndex()]; 280 } 281 282 private final int value; 283 Status(int value)284 private Status(int value) { 285 this.value = value; 286 } 287 288 // @@protoc_insertion_point(enum_scope:google.cloud.compute.v1.Autoscaler.Status) 289 } 290 291 private int bitField0_; 292 public static final int AUTOSCALING_POLICY_FIELD_NUMBER = 221950041; 293 private com.google.cloud.compute.v1.AutoscalingPolicy autoscalingPolicy_; 294 /** 295 * 296 * 297 * <pre> 298 * The configuration parameters for the autoscaling algorithm. You can define one or more signals for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization. If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%. 299 * </pre> 300 * 301 * <code>optional .google.cloud.compute.v1.AutoscalingPolicy autoscaling_policy = 221950041; 302 * </code> 303 * 304 * @return Whether the autoscalingPolicy field is set. 305 */ 306 @java.lang.Override hasAutoscalingPolicy()307 public boolean hasAutoscalingPolicy() { 308 return ((bitField0_ & 0x00000001) != 0); 309 } 310 /** 311 * 312 * 313 * <pre> 314 * The configuration parameters for the autoscaling algorithm. You can define one or more signals for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization. If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%. 315 * </pre> 316 * 317 * <code>optional .google.cloud.compute.v1.AutoscalingPolicy autoscaling_policy = 221950041; 318 * </code> 319 * 320 * @return The autoscalingPolicy. 321 */ 322 @java.lang.Override getAutoscalingPolicy()323 public com.google.cloud.compute.v1.AutoscalingPolicy getAutoscalingPolicy() { 324 return autoscalingPolicy_ == null 325 ? com.google.cloud.compute.v1.AutoscalingPolicy.getDefaultInstance() 326 : autoscalingPolicy_; 327 } 328 /** 329 * 330 * 331 * <pre> 332 * The configuration parameters for the autoscaling algorithm. You can define one or more signals for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization. If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%. 333 * </pre> 334 * 335 * <code>optional .google.cloud.compute.v1.AutoscalingPolicy autoscaling_policy = 221950041; 336 * </code> 337 */ 338 @java.lang.Override getAutoscalingPolicyOrBuilder()339 public com.google.cloud.compute.v1.AutoscalingPolicyOrBuilder getAutoscalingPolicyOrBuilder() { 340 return autoscalingPolicy_ == null 341 ? com.google.cloud.compute.v1.AutoscalingPolicy.getDefaultInstance() 342 : autoscalingPolicy_; 343 } 344 345 public static final int CREATION_TIMESTAMP_FIELD_NUMBER = 30525366; 346 347 @SuppressWarnings("serial") 348 private volatile java.lang.Object creationTimestamp_ = ""; 349 /** 350 * 351 * 352 * <pre> 353 * [Output Only] Creation timestamp in RFC3339 text format. 354 * </pre> 355 * 356 * <code>optional string creation_timestamp = 30525366;</code> 357 * 358 * @return Whether the creationTimestamp field is set. 359 */ 360 @java.lang.Override hasCreationTimestamp()361 public boolean hasCreationTimestamp() { 362 return ((bitField0_ & 0x00000002) != 0); 363 } 364 /** 365 * 366 * 367 * <pre> 368 * [Output Only] Creation timestamp in RFC3339 text format. 369 * </pre> 370 * 371 * <code>optional string creation_timestamp = 30525366;</code> 372 * 373 * @return The creationTimestamp. 374 */ 375 @java.lang.Override getCreationTimestamp()376 public java.lang.String getCreationTimestamp() { 377 java.lang.Object ref = creationTimestamp_; 378 if (ref instanceof java.lang.String) { 379 return (java.lang.String) ref; 380 } else { 381 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 382 java.lang.String s = bs.toStringUtf8(); 383 creationTimestamp_ = s; 384 return s; 385 } 386 } 387 /** 388 * 389 * 390 * <pre> 391 * [Output Only] Creation timestamp in RFC3339 text format. 392 * </pre> 393 * 394 * <code>optional string creation_timestamp = 30525366;</code> 395 * 396 * @return The bytes for creationTimestamp. 397 */ 398 @java.lang.Override getCreationTimestampBytes()399 public com.google.protobuf.ByteString getCreationTimestampBytes() { 400 java.lang.Object ref = creationTimestamp_; 401 if (ref instanceof java.lang.String) { 402 com.google.protobuf.ByteString b = 403 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 404 creationTimestamp_ = b; 405 return b; 406 } else { 407 return (com.google.protobuf.ByteString) ref; 408 } 409 } 410 411 public static final int DESCRIPTION_FIELD_NUMBER = 422937596; 412 413 @SuppressWarnings("serial") 414 private volatile java.lang.Object description_ = ""; 415 /** 416 * 417 * 418 * <pre> 419 * An optional description of this resource. Provide this property when you create the resource. 420 * </pre> 421 * 422 * <code>optional string description = 422937596;</code> 423 * 424 * @return Whether the description field is set. 425 */ 426 @java.lang.Override hasDescription()427 public boolean hasDescription() { 428 return ((bitField0_ & 0x00000004) != 0); 429 } 430 /** 431 * 432 * 433 * <pre> 434 * An optional description of this resource. Provide this property when you create the resource. 435 * </pre> 436 * 437 * <code>optional string description = 422937596;</code> 438 * 439 * @return The description. 440 */ 441 @java.lang.Override getDescription()442 public java.lang.String getDescription() { 443 java.lang.Object ref = description_; 444 if (ref instanceof java.lang.String) { 445 return (java.lang.String) ref; 446 } else { 447 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 448 java.lang.String s = bs.toStringUtf8(); 449 description_ = s; 450 return s; 451 } 452 } 453 /** 454 * 455 * 456 * <pre> 457 * An optional description of this resource. Provide this property when you create the resource. 458 * </pre> 459 * 460 * <code>optional string description = 422937596;</code> 461 * 462 * @return The bytes for description. 463 */ 464 @java.lang.Override getDescriptionBytes()465 public com.google.protobuf.ByteString getDescriptionBytes() { 466 java.lang.Object ref = description_; 467 if (ref instanceof java.lang.String) { 468 com.google.protobuf.ByteString b = 469 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 470 description_ = b; 471 return b; 472 } else { 473 return (com.google.protobuf.ByteString) ref; 474 } 475 } 476 477 public static final int ID_FIELD_NUMBER = 3355; 478 private long id_ = 0L; 479 /** 480 * 481 * 482 * <pre> 483 * [Output Only] The unique identifier for the resource. This identifier is defined by the server. 484 * </pre> 485 * 486 * <code>optional uint64 id = 3355;</code> 487 * 488 * @return Whether the id field is set. 489 */ 490 @java.lang.Override hasId()491 public boolean hasId() { 492 return ((bitField0_ & 0x00000008) != 0); 493 } 494 /** 495 * 496 * 497 * <pre> 498 * [Output Only] The unique identifier for the resource. This identifier is defined by the server. 499 * </pre> 500 * 501 * <code>optional uint64 id = 3355;</code> 502 * 503 * @return The id. 504 */ 505 @java.lang.Override getId()506 public long getId() { 507 return id_; 508 } 509 510 public static final int KIND_FIELD_NUMBER = 3292052; 511 512 @SuppressWarnings("serial") 513 private volatile java.lang.Object kind_ = ""; 514 /** 515 * 516 * 517 * <pre> 518 * [Output Only] Type of the resource. Always compute#autoscaler for autoscalers. 519 * </pre> 520 * 521 * <code>optional string kind = 3292052;</code> 522 * 523 * @return Whether the kind field is set. 524 */ 525 @java.lang.Override hasKind()526 public boolean hasKind() { 527 return ((bitField0_ & 0x00000010) != 0); 528 } 529 /** 530 * 531 * 532 * <pre> 533 * [Output Only] Type of the resource. Always compute#autoscaler for autoscalers. 534 * </pre> 535 * 536 * <code>optional string kind = 3292052;</code> 537 * 538 * @return The kind. 539 */ 540 @java.lang.Override getKind()541 public java.lang.String getKind() { 542 java.lang.Object ref = kind_; 543 if (ref instanceof java.lang.String) { 544 return (java.lang.String) ref; 545 } else { 546 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 547 java.lang.String s = bs.toStringUtf8(); 548 kind_ = s; 549 return s; 550 } 551 } 552 /** 553 * 554 * 555 * <pre> 556 * [Output Only] Type of the resource. Always compute#autoscaler for autoscalers. 557 * </pre> 558 * 559 * <code>optional string kind = 3292052;</code> 560 * 561 * @return The bytes for kind. 562 */ 563 @java.lang.Override getKindBytes()564 public com.google.protobuf.ByteString getKindBytes() { 565 java.lang.Object ref = kind_; 566 if (ref instanceof java.lang.String) { 567 com.google.protobuf.ByteString b = 568 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 569 kind_ = b; 570 return b; 571 } else { 572 return (com.google.protobuf.ByteString) ref; 573 } 574 } 575 576 public static final int NAME_FIELD_NUMBER = 3373707; 577 578 @SuppressWarnings("serial") 579 private volatile java.lang.Object name_ = ""; 580 /** 581 * 582 * 583 * <pre> 584 * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 585 * </pre> 586 * 587 * <code>optional string name = 3373707;</code> 588 * 589 * @return Whether the name field is set. 590 */ 591 @java.lang.Override hasName()592 public boolean hasName() { 593 return ((bitField0_ & 0x00000020) != 0); 594 } 595 /** 596 * 597 * 598 * <pre> 599 * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 600 * </pre> 601 * 602 * <code>optional string name = 3373707;</code> 603 * 604 * @return The name. 605 */ 606 @java.lang.Override getName()607 public java.lang.String getName() { 608 java.lang.Object ref = name_; 609 if (ref instanceof java.lang.String) { 610 return (java.lang.String) ref; 611 } else { 612 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 613 java.lang.String s = bs.toStringUtf8(); 614 name_ = s; 615 return s; 616 } 617 } 618 /** 619 * 620 * 621 * <pre> 622 * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 623 * </pre> 624 * 625 * <code>optional string name = 3373707;</code> 626 * 627 * @return The bytes for name. 628 */ 629 @java.lang.Override getNameBytes()630 public com.google.protobuf.ByteString getNameBytes() { 631 java.lang.Object ref = name_; 632 if (ref instanceof java.lang.String) { 633 com.google.protobuf.ByteString b = 634 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 635 name_ = b; 636 return b; 637 } else { 638 return (com.google.protobuf.ByteString) ref; 639 } 640 } 641 642 public static final int RECOMMENDED_SIZE_FIELD_NUMBER = 257915749; 643 private int recommendedSize_ = 0; 644 /** 645 * 646 * 647 * <pre> 648 * [Output Only] Target recommended MIG size (number of instances) computed by autoscaler. Autoscaler calculates the recommended MIG size even when the autoscaling policy mode is different from ON. This field is empty when autoscaler is not connected to an existing managed instance group or autoscaler did not generate its prediction. 649 * </pre> 650 * 651 * <code>optional int32 recommended_size = 257915749;</code> 652 * 653 * @return Whether the recommendedSize field is set. 654 */ 655 @java.lang.Override hasRecommendedSize()656 public boolean hasRecommendedSize() { 657 return ((bitField0_ & 0x00000040) != 0); 658 } 659 /** 660 * 661 * 662 * <pre> 663 * [Output Only] Target recommended MIG size (number of instances) computed by autoscaler. Autoscaler calculates the recommended MIG size even when the autoscaling policy mode is different from ON. This field is empty when autoscaler is not connected to an existing managed instance group or autoscaler did not generate its prediction. 664 * </pre> 665 * 666 * <code>optional int32 recommended_size = 257915749;</code> 667 * 668 * @return The recommendedSize. 669 */ 670 @java.lang.Override getRecommendedSize()671 public int getRecommendedSize() { 672 return recommendedSize_; 673 } 674 675 public static final int REGION_FIELD_NUMBER = 138946292; 676 677 @SuppressWarnings("serial") 678 private volatile java.lang.Object region_ = ""; 679 /** 680 * 681 * 682 * <pre> 683 * [Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope). 684 * </pre> 685 * 686 * <code>optional string region = 138946292;</code> 687 * 688 * @return Whether the region field is set. 689 */ 690 @java.lang.Override hasRegion()691 public boolean hasRegion() { 692 return ((bitField0_ & 0x00000080) != 0); 693 } 694 /** 695 * 696 * 697 * <pre> 698 * [Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope). 699 * </pre> 700 * 701 * <code>optional string region = 138946292;</code> 702 * 703 * @return The region. 704 */ 705 @java.lang.Override getRegion()706 public java.lang.String getRegion() { 707 java.lang.Object ref = region_; 708 if (ref instanceof java.lang.String) { 709 return (java.lang.String) ref; 710 } else { 711 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 712 java.lang.String s = bs.toStringUtf8(); 713 region_ = s; 714 return s; 715 } 716 } 717 /** 718 * 719 * 720 * <pre> 721 * [Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope). 722 * </pre> 723 * 724 * <code>optional string region = 138946292;</code> 725 * 726 * @return The bytes for region. 727 */ 728 @java.lang.Override getRegionBytes()729 public com.google.protobuf.ByteString getRegionBytes() { 730 java.lang.Object ref = region_; 731 if (ref instanceof java.lang.String) { 732 com.google.protobuf.ByteString b = 733 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 734 region_ = b; 735 return b; 736 } else { 737 return (com.google.protobuf.ByteString) ref; 738 } 739 } 740 741 public static final int SCALING_SCHEDULE_STATUS_FIELD_NUMBER = 465950178; 742 743 private static final class ScalingScheduleStatusDefaultEntryHolder { 744 static final com.google.protobuf.MapEntry< 745 java.lang.String, com.google.cloud.compute.v1.ScalingScheduleStatus> 746 defaultEntry = 747 com.google.protobuf.MapEntry 748 .<java.lang.String, com.google.cloud.compute.v1.ScalingScheduleStatus> 749 newDefaultInstance( 750 com.google.cloud.compute.v1.Compute 751 .internal_static_google_cloud_compute_v1_Autoscaler_ScalingScheduleStatusEntry_descriptor, 752 com.google.protobuf.WireFormat.FieldType.STRING, 753 "", 754 com.google.protobuf.WireFormat.FieldType.MESSAGE, 755 com.google.cloud.compute.v1.ScalingScheduleStatus.getDefaultInstance()); 756 } 757 758 @SuppressWarnings("serial") 759 private com.google.protobuf.MapField< 760 java.lang.String, com.google.cloud.compute.v1.ScalingScheduleStatus> 761 scalingScheduleStatus_; 762 763 private com.google.protobuf.MapField< 764 java.lang.String, com.google.cloud.compute.v1.ScalingScheduleStatus> internalGetScalingScheduleStatus()765 internalGetScalingScheduleStatus() { 766 if (scalingScheduleStatus_ == null) { 767 return com.google.protobuf.MapField.emptyMapField( 768 ScalingScheduleStatusDefaultEntryHolder.defaultEntry); 769 } 770 return scalingScheduleStatus_; 771 } 772 getScalingScheduleStatusCount()773 public int getScalingScheduleStatusCount() { 774 return internalGetScalingScheduleStatus().getMap().size(); 775 } 776 /** 777 * 778 * 779 * <pre> 780 * [Output Only] Status information of existing scaling schedules. 781 * </pre> 782 * 783 * <code> 784 * map<string, .google.cloud.compute.v1.ScalingScheduleStatus> scaling_schedule_status = 465950178; 785 * </code> 786 */ 787 @java.lang.Override containsScalingScheduleStatus(java.lang.String key)788 public boolean containsScalingScheduleStatus(java.lang.String key) { 789 if (key == null) { 790 throw new NullPointerException("map key"); 791 } 792 return internalGetScalingScheduleStatus().getMap().containsKey(key); 793 } 794 /** Use {@link #getScalingScheduleStatusMap()} instead. */ 795 @java.lang.Override 796 @java.lang.Deprecated 797 public java.util.Map<java.lang.String, com.google.cloud.compute.v1.ScalingScheduleStatus> getScalingScheduleStatus()798 getScalingScheduleStatus() { 799 return getScalingScheduleStatusMap(); 800 } 801 /** 802 * 803 * 804 * <pre> 805 * [Output Only] Status information of existing scaling schedules. 806 * </pre> 807 * 808 * <code> 809 * map<string, .google.cloud.compute.v1.ScalingScheduleStatus> scaling_schedule_status = 465950178; 810 * </code> 811 */ 812 @java.lang.Override 813 public java.util.Map<java.lang.String, com.google.cloud.compute.v1.ScalingScheduleStatus> getScalingScheduleStatusMap()814 getScalingScheduleStatusMap() { 815 return internalGetScalingScheduleStatus().getMap(); 816 } 817 /** 818 * 819 * 820 * <pre> 821 * [Output Only] Status information of existing scaling schedules. 822 * </pre> 823 * 824 * <code> 825 * map<string, .google.cloud.compute.v1.ScalingScheduleStatus> scaling_schedule_status = 465950178; 826 * </code> 827 */ 828 @java.lang.Override 829 public /* nullable */ com.google.cloud.compute.v1.ScalingScheduleStatus getScalingScheduleStatusOrDefault( java.lang.String key, com.google.cloud.compute.v1.ScalingScheduleStatus defaultValue)830 getScalingScheduleStatusOrDefault( 831 java.lang.String key, 832 /* nullable */ 833 com.google.cloud.compute.v1.ScalingScheduleStatus defaultValue) { 834 if (key == null) { 835 throw new NullPointerException("map key"); 836 } 837 java.util.Map<java.lang.String, com.google.cloud.compute.v1.ScalingScheduleStatus> map = 838 internalGetScalingScheduleStatus().getMap(); 839 return map.containsKey(key) ? map.get(key) : defaultValue; 840 } 841 /** 842 * 843 * 844 * <pre> 845 * [Output Only] Status information of existing scaling schedules. 846 * </pre> 847 * 848 * <code> 849 * map<string, .google.cloud.compute.v1.ScalingScheduleStatus> scaling_schedule_status = 465950178; 850 * </code> 851 */ 852 @java.lang.Override getScalingScheduleStatusOrThrow( java.lang.String key)853 public com.google.cloud.compute.v1.ScalingScheduleStatus getScalingScheduleStatusOrThrow( 854 java.lang.String key) { 855 if (key == null) { 856 throw new NullPointerException("map key"); 857 } 858 java.util.Map<java.lang.String, com.google.cloud.compute.v1.ScalingScheduleStatus> map = 859 internalGetScalingScheduleStatus().getMap(); 860 if (!map.containsKey(key)) { 861 throw new java.lang.IllegalArgumentException(); 862 } 863 return map.get(key); 864 } 865 866 public static final int SELF_LINK_FIELD_NUMBER = 456214797; 867 868 @SuppressWarnings("serial") 869 private volatile java.lang.Object selfLink_ = ""; 870 /** 871 * 872 * 873 * <pre> 874 * [Output Only] Server-defined URL for the resource. 875 * </pre> 876 * 877 * <code>optional string self_link = 456214797;</code> 878 * 879 * @return Whether the selfLink field is set. 880 */ 881 @java.lang.Override hasSelfLink()882 public boolean hasSelfLink() { 883 return ((bitField0_ & 0x00000100) != 0); 884 } 885 /** 886 * 887 * 888 * <pre> 889 * [Output Only] Server-defined URL for the resource. 890 * </pre> 891 * 892 * <code>optional string self_link = 456214797;</code> 893 * 894 * @return The selfLink. 895 */ 896 @java.lang.Override getSelfLink()897 public java.lang.String getSelfLink() { 898 java.lang.Object ref = selfLink_; 899 if (ref instanceof java.lang.String) { 900 return (java.lang.String) ref; 901 } else { 902 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 903 java.lang.String s = bs.toStringUtf8(); 904 selfLink_ = s; 905 return s; 906 } 907 } 908 /** 909 * 910 * 911 * <pre> 912 * [Output Only] Server-defined URL for the resource. 913 * </pre> 914 * 915 * <code>optional string self_link = 456214797;</code> 916 * 917 * @return The bytes for selfLink. 918 */ 919 @java.lang.Override getSelfLinkBytes()920 public com.google.protobuf.ByteString getSelfLinkBytes() { 921 java.lang.Object ref = selfLink_; 922 if (ref instanceof java.lang.String) { 923 com.google.protobuf.ByteString b = 924 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 925 selfLink_ = b; 926 return b; 927 } else { 928 return (com.google.protobuf.ByteString) ref; 929 } 930 } 931 932 public static final int STATUS_FIELD_NUMBER = 181260274; 933 934 @SuppressWarnings("serial") 935 private volatile java.lang.Object status_ = ""; 936 /** 937 * 938 * 939 * <pre> 940 * [Output Only] The status of the autoscaler configuration. Current set of possible values: - PENDING: Autoscaler backend hasn't read new/updated configuration. - DELETING: Configuration is being deleted. - ACTIVE: Configuration is acknowledged to be effective. Some warnings might be present in the statusDetails field. - ERROR: Configuration has errors. Actionable for users. Details are present in the statusDetails field. New values might be added in the future. 941 * Check the Status enum for the list of possible values. 942 * </pre> 943 * 944 * <code>optional string status = 181260274;</code> 945 * 946 * @return Whether the status field is set. 947 */ 948 @java.lang.Override hasStatus()949 public boolean hasStatus() { 950 return ((bitField0_ & 0x00000200) != 0); 951 } 952 /** 953 * 954 * 955 * <pre> 956 * [Output Only] The status of the autoscaler configuration. Current set of possible values: - PENDING: Autoscaler backend hasn't read new/updated configuration. - DELETING: Configuration is being deleted. - ACTIVE: Configuration is acknowledged to be effective. Some warnings might be present in the statusDetails field. - ERROR: Configuration has errors. Actionable for users. Details are present in the statusDetails field. New values might be added in the future. 957 * Check the Status enum for the list of possible values. 958 * </pre> 959 * 960 * <code>optional string status = 181260274;</code> 961 * 962 * @return The status. 963 */ 964 @java.lang.Override getStatus()965 public java.lang.String getStatus() { 966 java.lang.Object ref = status_; 967 if (ref instanceof java.lang.String) { 968 return (java.lang.String) ref; 969 } else { 970 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 971 java.lang.String s = bs.toStringUtf8(); 972 status_ = s; 973 return s; 974 } 975 } 976 /** 977 * 978 * 979 * <pre> 980 * [Output Only] The status of the autoscaler configuration. Current set of possible values: - PENDING: Autoscaler backend hasn't read new/updated configuration. - DELETING: Configuration is being deleted. - ACTIVE: Configuration is acknowledged to be effective. Some warnings might be present in the statusDetails field. - ERROR: Configuration has errors. Actionable for users. Details are present in the statusDetails field. New values might be added in the future. 981 * Check the Status enum for the list of possible values. 982 * </pre> 983 * 984 * <code>optional string status = 181260274;</code> 985 * 986 * @return The bytes for status. 987 */ 988 @java.lang.Override getStatusBytes()989 public com.google.protobuf.ByteString getStatusBytes() { 990 java.lang.Object ref = status_; 991 if (ref instanceof java.lang.String) { 992 com.google.protobuf.ByteString b = 993 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 994 status_ = b; 995 return b; 996 } else { 997 return (com.google.protobuf.ByteString) ref; 998 } 999 } 1000 1001 public static final int STATUS_DETAILS_FIELD_NUMBER = 363353845; 1002 1003 @SuppressWarnings("serial") 1004 private java.util.List<com.google.cloud.compute.v1.AutoscalerStatusDetails> statusDetails_; 1005 /** 1006 * 1007 * 1008 * <pre> 1009 * [Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter. 1010 * </pre> 1011 * 1012 * <code>repeated .google.cloud.compute.v1.AutoscalerStatusDetails status_details = 363353845; 1013 * </code> 1014 */ 1015 @java.lang.Override 1016 public java.util.List<com.google.cloud.compute.v1.AutoscalerStatusDetails> getStatusDetailsList()1017 getStatusDetailsList() { 1018 return statusDetails_; 1019 } 1020 /** 1021 * 1022 * 1023 * <pre> 1024 * [Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter. 1025 * </pre> 1026 * 1027 * <code>repeated .google.cloud.compute.v1.AutoscalerStatusDetails status_details = 363353845; 1028 * </code> 1029 */ 1030 @java.lang.Override 1031 public java.util.List<? extends com.google.cloud.compute.v1.AutoscalerStatusDetailsOrBuilder> getStatusDetailsOrBuilderList()1032 getStatusDetailsOrBuilderList() { 1033 return statusDetails_; 1034 } 1035 /** 1036 * 1037 * 1038 * <pre> 1039 * [Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter. 1040 * </pre> 1041 * 1042 * <code>repeated .google.cloud.compute.v1.AutoscalerStatusDetails status_details = 363353845; 1043 * </code> 1044 */ 1045 @java.lang.Override getStatusDetailsCount()1046 public int getStatusDetailsCount() { 1047 return statusDetails_.size(); 1048 } 1049 /** 1050 * 1051 * 1052 * <pre> 1053 * [Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter. 1054 * </pre> 1055 * 1056 * <code>repeated .google.cloud.compute.v1.AutoscalerStatusDetails status_details = 363353845; 1057 * </code> 1058 */ 1059 @java.lang.Override getStatusDetails(int index)1060 public com.google.cloud.compute.v1.AutoscalerStatusDetails getStatusDetails(int index) { 1061 return statusDetails_.get(index); 1062 } 1063 /** 1064 * 1065 * 1066 * <pre> 1067 * [Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter. 1068 * </pre> 1069 * 1070 * <code>repeated .google.cloud.compute.v1.AutoscalerStatusDetails status_details = 363353845; 1071 * </code> 1072 */ 1073 @java.lang.Override getStatusDetailsOrBuilder( int index)1074 public com.google.cloud.compute.v1.AutoscalerStatusDetailsOrBuilder getStatusDetailsOrBuilder( 1075 int index) { 1076 return statusDetails_.get(index); 1077 } 1078 1079 public static final int TARGET_FIELD_NUMBER = 192835985; 1080 1081 @SuppressWarnings("serial") 1082 private volatile java.lang.Object target_ = ""; 1083 /** 1084 * 1085 * 1086 * <pre> 1087 * URL of the managed instance group that this autoscaler will scale. This field is required when creating an autoscaler. 1088 * </pre> 1089 * 1090 * <code>optional string target = 192835985;</code> 1091 * 1092 * @return Whether the target field is set. 1093 */ 1094 @java.lang.Override hasTarget()1095 public boolean hasTarget() { 1096 return ((bitField0_ & 0x00000400) != 0); 1097 } 1098 /** 1099 * 1100 * 1101 * <pre> 1102 * URL of the managed instance group that this autoscaler will scale. This field is required when creating an autoscaler. 1103 * </pre> 1104 * 1105 * <code>optional string target = 192835985;</code> 1106 * 1107 * @return The target. 1108 */ 1109 @java.lang.Override getTarget()1110 public java.lang.String getTarget() { 1111 java.lang.Object ref = target_; 1112 if (ref instanceof java.lang.String) { 1113 return (java.lang.String) ref; 1114 } else { 1115 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1116 java.lang.String s = bs.toStringUtf8(); 1117 target_ = s; 1118 return s; 1119 } 1120 } 1121 /** 1122 * 1123 * 1124 * <pre> 1125 * URL of the managed instance group that this autoscaler will scale. This field is required when creating an autoscaler. 1126 * </pre> 1127 * 1128 * <code>optional string target = 192835985;</code> 1129 * 1130 * @return The bytes for target. 1131 */ 1132 @java.lang.Override getTargetBytes()1133 public com.google.protobuf.ByteString getTargetBytes() { 1134 java.lang.Object ref = target_; 1135 if (ref instanceof java.lang.String) { 1136 com.google.protobuf.ByteString b = 1137 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1138 target_ = b; 1139 return b; 1140 } else { 1141 return (com.google.protobuf.ByteString) ref; 1142 } 1143 } 1144 1145 public static final int ZONE_FIELD_NUMBER = 3744684; 1146 1147 @SuppressWarnings("serial") 1148 private volatile java.lang.Object zone_ = ""; 1149 /** 1150 * 1151 * 1152 * <pre> 1153 * [Output Only] URL of the zone where the instance group resides (for autoscalers living in zonal scope). 1154 * </pre> 1155 * 1156 * <code>optional string zone = 3744684;</code> 1157 * 1158 * @return Whether the zone field is set. 1159 */ 1160 @java.lang.Override hasZone()1161 public boolean hasZone() { 1162 return ((bitField0_ & 0x00000800) != 0); 1163 } 1164 /** 1165 * 1166 * 1167 * <pre> 1168 * [Output Only] URL of the zone where the instance group resides (for autoscalers living in zonal scope). 1169 * </pre> 1170 * 1171 * <code>optional string zone = 3744684;</code> 1172 * 1173 * @return The zone. 1174 */ 1175 @java.lang.Override getZone()1176 public java.lang.String getZone() { 1177 java.lang.Object ref = zone_; 1178 if (ref instanceof java.lang.String) { 1179 return (java.lang.String) ref; 1180 } else { 1181 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1182 java.lang.String s = bs.toStringUtf8(); 1183 zone_ = s; 1184 return s; 1185 } 1186 } 1187 /** 1188 * 1189 * 1190 * <pre> 1191 * [Output Only] URL of the zone where the instance group resides (for autoscalers living in zonal scope). 1192 * </pre> 1193 * 1194 * <code>optional string zone = 3744684;</code> 1195 * 1196 * @return The bytes for zone. 1197 */ 1198 @java.lang.Override getZoneBytes()1199 public com.google.protobuf.ByteString getZoneBytes() { 1200 java.lang.Object ref = zone_; 1201 if (ref instanceof java.lang.String) { 1202 com.google.protobuf.ByteString b = 1203 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1204 zone_ = b; 1205 return b; 1206 } else { 1207 return (com.google.protobuf.ByteString) ref; 1208 } 1209 } 1210 1211 private byte memoizedIsInitialized = -1; 1212 1213 @java.lang.Override isInitialized()1214 public final boolean isInitialized() { 1215 byte isInitialized = memoizedIsInitialized; 1216 if (isInitialized == 1) return true; 1217 if (isInitialized == 0) return false; 1218 1219 memoizedIsInitialized = 1; 1220 return true; 1221 } 1222 1223 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)1224 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 1225 if (((bitField0_ & 0x00000008) != 0)) { 1226 output.writeUInt64(3355, id_); 1227 } 1228 if (((bitField0_ & 0x00000010) != 0)) { 1229 com.google.protobuf.GeneratedMessageV3.writeString(output, 3292052, kind_); 1230 } 1231 if (((bitField0_ & 0x00000020) != 0)) { 1232 com.google.protobuf.GeneratedMessageV3.writeString(output, 3373707, name_); 1233 } 1234 if (((bitField0_ & 0x00000800) != 0)) { 1235 com.google.protobuf.GeneratedMessageV3.writeString(output, 3744684, zone_); 1236 } 1237 if (((bitField0_ & 0x00000002) != 0)) { 1238 com.google.protobuf.GeneratedMessageV3.writeString(output, 30525366, creationTimestamp_); 1239 } 1240 if (((bitField0_ & 0x00000080) != 0)) { 1241 com.google.protobuf.GeneratedMessageV3.writeString(output, 138946292, region_); 1242 } 1243 if (((bitField0_ & 0x00000200) != 0)) { 1244 com.google.protobuf.GeneratedMessageV3.writeString(output, 181260274, status_); 1245 } 1246 if (((bitField0_ & 0x00000400) != 0)) { 1247 com.google.protobuf.GeneratedMessageV3.writeString(output, 192835985, target_); 1248 } 1249 if (((bitField0_ & 0x00000001) != 0)) { 1250 output.writeMessage(221950041, getAutoscalingPolicy()); 1251 } 1252 if (((bitField0_ & 0x00000040) != 0)) { 1253 output.writeInt32(257915749, recommendedSize_); 1254 } 1255 for (int i = 0; i < statusDetails_.size(); i++) { 1256 output.writeMessage(363353845, statusDetails_.get(i)); 1257 } 1258 if (((bitField0_ & 0x00000004) != 0)) { 1259 com.google.protobuf.GeneratedMessageV3.writeString(output, 422937596, description_); 1260 } 1261 if (((bitField0_ & 0x00000100) != 0)) { 1262 com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); 1263 } 1264 com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( 1265 output, 1266 internalGetScalingScheduleStatus(), 1267 ScalingScheduleStatusDefaultEntryHolder.defaultEntry, 1268 465950178); 1269 getUnknownFields().writeTo(output); 1270 } 1271 1272 @java.lang.Override getSerializedSize()1273 public int getSerializedSize() { 1274 int size = memoizedSize; 1275 if (size != -1) return size; 1276 1277 size = 0; 1278 if (((bitField0_ & 0x00000008) != 0)) { 1279 size += com.google.protobuf.CodedOutputStream.computeUInt64Size(3355, id_); 1280 } 1281 if (((bitField0_ & 0x00000010) != 0)) { 1282 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3292052, kind_); 1283 } 1284 if (((bitField0_ & 0x00000020) != 0)) { 1285 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3373707, name_); 1286 } 1287 if (((bitField0_ & 0x00000800) != 0)) { 1288 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3744684, zone_); 1289 } 1290 if (((bitField0_ & 0x00000002) != 0)) { 1291 size += 1292 com.google.protobuf.GeneratedMessageV3.computeStringSize(30525366, creationTimestamp_); 1293 } 1294 if (((bitField0_ & 0x00000080) != 0)) { 1295 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(138946292, region_); 1296 } 1297 if (((bitField0_ & 0x00000200) != 0)) { 1298 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(181260274, status_); 1299 } 1300 if (((bitField0_ & 0x00000400) != 0)) { 1301 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(192835985, target_); 1302 } 1303 if (((bitField0_ & 0x00000001) != 0)) { 1304 size += 1305 com.google.protobuf.CodedOutputStream.computeMessageSize( 1306 221950041, getAutoscalingPolicy()); 1307 } 1308 if (((bitField0_ & 0x00000040) != 0)) { 1309 size += com.google.protobuf.CodedOutputStream.computeInt32Size(257915749, recommendedSize_); 1310 } 1311 for (int i = 0; i < statusDetails_.size(); i++) { 1312 size += 1313 com.google.protobuf.CodedOutputStream.computeMessageSize( 1314 363353845, statusDetails_.get(i)); 1315 } 1316 if (((bitField0_ & 0x00000004) != 0)) { 1317 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(422937596, description_); 1318 } 1319 if (((bitField0_ & 0x00000100) != 0)) { 1320 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); 1321 } 1322 for (java.util.Map.Entry<java.lang.String, com.google.cloud.compute.v1.ScalingScheduleStatus> 1323 entry : internalGetScalingScheduleStatus().getMap().entrySet()) { 1324 com.google.protobuf.MapEntry< 1325 java.lang.String, com.google.cloud.compute.v1.ScalingScheduleStatus> 1326 scalingScheduleStatus__ = 1327 ScalingScheduleStatusDefaultEntryHolder.defaultEntry 1328 .newBuilderForType() 1329 .setKey(entry.getKey()) 1330 .setValue(entry.getValue()) 1331 .build(); 1332 size += 1333 com.google.protobuf.CodedOutputStream.computeMessageSize( 1334 465950178, scalingScheduleStatus__); 1335 } 1336 size += getUnknownFields().getSerializedSize(); 1337 memoizedSize = size; 1338 return size; 1339 } 1340 1341 @java.lang.Override equals(final java.lang.Object obj)1342 public boolean equals(final java.lang.Object obj) { 1343 if (obj == this) { 1344 return true; 1345 } 1346 if (!(obj instanceof com.google.cloud.compute.v1.Autoscaler)) { 1347 return super.equals(obj); 1348 } 1349 com.google.cloud.compute.v1.Autoscaler other = (com.google.cloud.compute.v1.Autoscaler) obj; 1350 1351 if (hasAutoscalingPolicy() != other.hasAutoscalingPolicy()) return false; 1352 if (hasAutoscalingPolicy()) { 1353 if (!getAutoscalingPolicy().equals(other.getAutoscalingPolicy())) return false; 1354 } 1355 if (hasCreationTimestamp() != other.hasCreationTimestamp()) return false; 1356 if (hasCreationTimestamp()) { 1357 if (!getCreationTimestamp().equals(other.getCreationTimestamp())) return false; 1358 } 1359 if (hasDescription() != other.hasDescription()) return false; 1360 if (hasDescription()) { 1361 if (!getDescription().equals(other.getDescription())) return false; 1362 } 1363 if (hasId() != other.hasId()) return false; 1364 if (hasId()) { 1365 if (getId() != other.getId()) return false; 1366 } 1367 if (hasKind() != other.hasKind()) return false; 1368 if (hasKind()) { 1369 if (!getKind().equals(other.getKind())) return false; 1370 } 1371 if (hasName() != other.hasName()) return false; 1372 if (hasName()) { 1373 if (!getName().equals(other.getName())) return false; 1374 } 1375 if (hasRecommendedSize() != other.hasRecommendedSize()) return false; 1376 if (hasRecommendedSize()) { 1377 if (getRecommendedSize() != other.getRecommendedSize()) return false; 1378 } 1379 if (hasRegion() != other.hasRegion()) return false; 1380 if (hasRegion()) { 1381 if (!getRegion().equals(other.getRegion())) return false; 1382 } 1383 if (!internalGetScalingScheduleStatus().equals(other.internalGetScalingScheduleStatus())) 1384 return false; 1385 if (hasSelfLink() != other.hasSelfLink()) return false; 1386 if (hasSelfLink()) { 1387 if (!getSelfLink().equals(other.getSelfLink())) return false; 1388 } 1389 if (hasStatus() != other.hasStatus()) return false; 1390 if (hasStatus()) { 1391 if (!getStatus().equals(other.getStatus())) return false; 1392 } 1393 if (!getStatusDetailsList().equals(other.getStatusDetailsList())) return false; 1394 if (hasTarget() != other.hasTarget()) return false; 1395 if (hasTarget()) { 1396 if (!getTarget().equals(other.getTarget())) return false; 1397 } 1398 if (hasZone() != other.hasZone()) return false; 1399 if (hasZone()) { 1400 if (!getZone().equals(other.getZone())) return false; 1401 } 1402 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 1403 return true; 1404 } 1405 1406 @java.lang.Override hashCode()1407 public int hashCode() { 1408 if (memoizedHashCode != 0) { 1409 return memoizedHashCode; 1410 } 1411 int hash = 41; 1412 hash = (19 * hash) + getDescriptor().hashCode(); 1413 if (hasAutoscalingPolicy()) { 1414 hash = (37 * hash) + AUTOSCALING_POLICY_FIELD_NUMBER; 1415 hash = (53 * hash) + getAutoscalingPolicy().hashCode(); 1416 } 1417 if (hasCreationTimestamp()) { 1418 hash = (37 * hash) + CREATION_TIMESTAMP_FIELD_NUMBER; 1419 hash = (53 * hash) + getCreationTimestamp().hashCode(); 1420 } 1421 if (hasDescription()) { 1422 hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; 1423 hash = (53 * hash) + getDescription().hashCode(); 1424 } 1425 if (hasId()) { 1426 hash = (37 * hash) + ID_FIELD_NUMBER; 1427 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getId()); 1428 } 1429 if (hasKind()) { 1430 hash = (37 * hash) + KIND_FIELD_NUMBER; 1431 hash = (53 * hash) + getKind().hashCode(); 1432 } 1433 if (hasName()) { 1434 hash = (37 * hash) + NAME_FIELD_NUMBER; 1435 hash = (53 * hash) + getName().hashCode(); 1436 } 1437 if (hasRecommendedSize()) { 1438 hash = (37 * hash) + RECOMMENDED_SIZE_FIELD_NUMBER; 1439 hash = (53 * hash) + getRecommendedSize(); 1440 } 1441 if (hasRegion()) { 1442 hash = (37 * hash) + REGION_FIELD_NUMBER; 1443 hash = (53 * hash) + getRegion().hashCode(); 1444 } 1445 if (!internalGetScalingScheduleStatus().getMap().isEmpty()) { 1446 hash = (37 * hash) + SCALING_SCHEDULE_STATUS_FIELD_NUMBER; 1447 hash = (53 * hash) + internalGetScalingScheduleStatus().hashCode(); 1448 } 1449 if (hasSelfLink()) { 1450 hash = (37 * hash) + SELF_LINK_FIELD_NUMBER; 1451 hash = (53 * hash) + getSelfLink().hashCode(); 1452 } 1453 if (hasStatus()) { 1454 hash = (37 * hash) + STATUS_FIELD_NUMBER; 1455 hash = (53 * hash) + getStatus().hashCode(); 1456 } 1457 if (getStatusDetailsCount() > 0) { 1458 hash = (37 * hash) + STATUS_DETAILS_FIELD_NUMBER; 1459 hash = (53 * hash) + getStatusDetailsList().hashCode(); 1460 } 1461 if (hasTarget()) { 1462 hash = (37 * hash) + TARGET_FIELD_NUMBER; 1463 hash = (53 * hash) + getTarget().hashCode(); 1464 } 1465 if (hasZone()) { 1466 hash = (37 * hash) + ZONE_FIELD_NUMBER; 1467 hash = (53 * hash) + getZone().hashCode(); 1468 } 1469 hash = (29 * hash) + getUnknownFields().hashCode(); 1470 memoizedHashCode = hash; 1471 return hash; 1472 } 1473 parseFrom(java.nio.ByteBuffer data)1474 public static com.google.cloud.compute.v1.Autoscaler parseFrom(java.nio.ByteBuffer data) 1475 throws com.google.protobuf.InvalidProtocolBufferException { 1476 return PARSER.parseFrom(data); 1477 } 1478 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1479 public static com.google.cloud.compute.v1.Autoscaler parseFrom( 1480 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1481 throws com.google.protobuf.InvalidProtocolBufferException { 1482 return PARSER.parseFrom(data, extensionRegistry); 1483 } 1484 parseFrom( com.google.protobuf.ByteString data)1485 public static com.google.cloud.compute.v1.Autoscaler parseFrom( 1486 com.google.protobuf.ByteString data) 1487 throws com.google.protobuf.InvalidProtocolBufferException { 1488 return PARSER.parseFrom(data); 1489 } 1490 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1491 public static com.google.cloud.compute.v1.Autoscaler parseFrom( 1492 com.google.protobuf.ByteString data, 1493 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1494 throws com.google.protobuf.InvalidProtocolBufferException { 1495 return PARSER.parseFrom(data, extensionRegistry); 1496 } 1497 parseFrom(byte[] data)1498 public static com.google.cloud.compute.v1.Autoscaler parseFrom(byte[] data) 1499 throws com.google.protobuf.InvalidProtocolBufferException { 1500 return PARSER.parseFrom(data); 1501 } 1502 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1503 public static com.google.cloud.compute.v1.Autoscaler parseFrom( 1504 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1505 throws com.google.protobuf.InvalidProtocolBufferException { 1506 return PARSER.parseFrom(data, extensionRegistry); 1507 } 1508 parseFrom(java.io.InputStream input)1509 public static com.google.cloud.compute.v1.Autoscaler parseFrom(java.io.InputStream input) 1510 throws java.io.IOException { 1511 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 1512 } 1513 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1514 public static com.google.cloud.compute.v1.Autoscaler parseFrom( 1515 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1516 throws java.io.IOException { 1517 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 1518 PARSER, input, extensionRegistry); 1519 } 1520 parseDelimitedFrom(java.io.InputStream input)1521 public static com.google.cloud.compute.v1.Autoscaler parseDelimitedFrom(java.io.InputStream input) 1522 throws java.io.IOException { 1523 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 1524 } 1525 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1526 public static com.google.cloud.compute.v1.Autoscaler parseDelimitedFrom( 1527 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1528 throws java.io.IOException { 1529 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 1530 PARSER, input, extensionRegistry); 1531 } 1532 parseFrom( com.google.protobuf.CodedInputStream input)1533 public static com.google.cloud.compute.v1.Autoscaler parseFrom( 1534 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 1535 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 1536 } 1537 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1538 public static com.google.cloud.compute.v1.Autoscaler parseFrom( 1539 com.google.protobuf.CodedInputStream input, 1540 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1541 throws java.io.IOException { 1542 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 1543 PARSER, input, extensionRegistry); 1544 } 1545 1546 @java.lang.Override newBuilderForType()1547 public Builder newBuilderForType() { 1548 return newBuilder(); 1549 } 1550 newBuilder()1551 public static Builder newBuilder() { 1552 return DEFAULT_INSTANCE.toBuilder(); 1553 } 1554 newBuilder(com.google.cloud.compute.v1.Autoscaler prototype)1555 public static Builder newBuilder(com.google.cloud.compute.v1.Autoscaler prototype) { 1556 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 1557 } 1558 1559 @java.lang.Override toBuilder()1560 public Builder toBuilder() { 1561 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 1562 } 1563 1564 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1565 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 1566 Builder builder = new Builder(parent); 1567 return builder; 1568 } 1569 /** 1570 * 1571 * 1572 * <pre> 1573 * Represents an Autoscaler resource. Google Compute Engine has two Autoscaler resources: * [Zonal](/compute/docs/reference/rest/v1/autoscalers) * [Regional](/compute/docs/reference/rest/v1/regionAutoscalers) Use autoscalers to automatically add or delete instances from a managed instance group according to your defined autoscaling policy. For more information, read Autoscaling Groups of Instances. For zonal managed instance groups resource, use the autoscaler resource. For regional managed instance groups, use the regionAutoscalers resource. 1574 * </pre> 1575 * 1576 * Protobuf type {@code google.cloud.compute.v1.Autoscaler} 1577 */ 1578 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 1579 implements 1580 // @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.Autoscaler) 1581 com.google.cloud.compute.v1.AutoscalerOrBuilder { getDescriptor()1582 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 1583 return com.google.cloud.compute.v1.Compute 1584 .internal_static_google_cloud_compute_v1_Autoscaler_descriptor; 1585 } 1586 1587 @SuppressWarnings({"rawtypes"}) internalGetMapField(int number)1588 protected com.google.protobuf.MapField internalGetMapField(int number) { 1589 switch (number) { 1590 case 465950178: 1591 return internalGetScalingScheduleStatus(); 1592 default: 1593 throw new RuntimeException("Invalid map field number: " + number); 1594 } 1595 } 1596 1597 @SuppressWarnings({"rawtypes"}) internalGetMutableMapField(int number)1598 protected com.google.protobuf.MapField internalGetMutableMapField(int number) { 1599 switch (number) { 1600 case 465950178: 1601 return internalGetMutableScalingScheduleStatus(); 1602 default: 1603 throw new RuntimeException("Invalid map field number: " + number); 1604 } 1605 } 1606 1607 @java.lang.Override 1608 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()1609 internalGetFieldAccessorTable() { 1610 return com.google.cloud.compute.v1.Compute 1611 .internal_static_google_cloud_compute_v1_Autoscaler_fieldAccessorTable 1612 .ensureFieldAccessorsInitialized( 1613 com.google.cloud.compute.v1.Autoscaler.class, 1614 com.google.cloud.compute.v1.Autoscaler.Builder.class); 1615 } 1616 1617 // Construct using com.google.cloud.compute.v1.Autoscaler.newBuilder() Builder()1618 private Builder() { 1619 maybeForceBuilderInitialization(); 1620 } 1621 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1622 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 1623 super(parent); 1624 maybeForceBuilderInitialization(); 1625 } 1626 maybeForceBuilderInitialization()1627 private void maybeForceBuilderInitialization() { 1628 if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { 1629 getAutoscalingPolicyFieldBuilder(); 1630 getStatusDetailsFieldBuilder(); 1631 } 1632 } 1633 1634 @java.lang.Override clear()1635 public Builder clear() { 1636 super.clear(); 1637 bitField0_ = 0; 1638 autoscalingPolicy_ = null; 1639 if (autoscalingPolicyBuilder_ != null) { 1640 autoscalingPolicyBuilder_.dispose(); 1641 autoscalingPolicyBuilder_ = null; 1642 } 1643 creationTimestamp_ = ""; 1644 description_ = ""; 1645 id_ = 0L; 1646 kind_ = ""; 1647 name_ = ""; 1648 recommendedSize_ = 0; 1649 region_ = ""; 1650 internalGetMutableScalingScheduleStatus().clear(); 1651 selfLink_ = ""; 1652 status_ = ""; 1653 if (statusDetailsBuilder_ == null) { 1654 statusDetails_ = java.util.Collections.emptyList(); 1655 } else { 1656 statusDetails_ = null; 1657 statusDetailsBuilder_.clear(); 1658 } 1659 bitField0_ = (bitField0_ & ~0x00000800); 1660 target_ = ""; 1661 zone_ = ""; 1662 return this; 1663 } 1664 1665 @java.lang.Override getDescriptorForType()1666 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 1667 return com.google.cloud.compute.v1.Compute 1668 .internal_static_google_cloud_compute_v1_Autoscaler_descriptor; 1669 } 1670 1671 @java.lang.Override getDefaultInstanceForType()1672 public com.google.cloud.compute.v1.Autoscaler getDefaultInstanceForType() { 1673 return com.google.cloud.compute.v1.Autoscaler.getDefaultInstance(); 1674 } 1675 1676 @java.lang.Override build()1677 public com.google.cloud.compute.v1.Autoscaler build() { 1678 com.google.cloud.compute.v1.Autoscaler result = buildPartial(); 1679 if (!result.isInitialized()) { 1680 throw newUninitializedMessageException(result); 1681 } 1682 return result; 1683 } 1684 1685 @java.lang.Override buildPartial()1686 public com.google.cloud.compute.v1.Autoscaler buildPartial() { 1687 com.google.cloud.compute.v1.Autoscaler result = 1688 new com.google.cloud.compute.v1.Autoscaler(this); 1689 buildPartialRepeatedFields(result); 1690 if (bitField0_ != 0) { 1691 buildPartial0(result); 1692 } 1693 onBuilt(); 1694 return result; 1695 } 1696 buildPartialRepeatedFields(com.google.cloud.compute.v1.Autoscaler result)1697 private void buildPartialRepeatedFields(com.google.cloud.compute.v1.Autoscaler result) { 1698 if (statusDetailsBuilder_ == null) { 1699 if (((bitField0_ & 0x00000800) != 0)) { 1700 statusDetails_ = java.util.Collections.unmodifiableList(statusDetails_); 1701 bitField0_ = (bitField0_ & ~0x00000800); 1702 } 1703 result.statusDetails_ = statusDetails_; 1704 } else { 1705 result.statusDetails_ = statusDetailsBuilder_.build(); 1706 } 1707 } 1708 buildPartial0(com.google.cloud.compute.v1.Autoscaler result)1709 private void buildPartial0(com.google.cloud.compute.v1.Autoscaler result) { 1710 int from_bitField0_ = bitField0_; 1711 int to_bitField0_ = 0; 1712 if (((from_bitField0_ & 0x00000001) != 0)) { 1713 result.autoscalingPolicy_ = 1714 autoscalingPolicyBuilder_ == null 1715 ? autoscalingPolicy_ 1716 : autoscalingPolicyBuilder_.build(); 1717 to_bitField0_ |= 0x00000001; 1718 } 1719 if (((from_bitField0_ & 0x00000002) != 0)) { 1720 result.creationTimestamp_ = creationTimestamp_; 1721 to_bitField0_ |= 0x00000002; 1722 } 1723 if (((from_bitField0_ & 0x00000004) != 0)) { 1724 result.description_ = description_; 1725 to_bitField0_ |= 0x00000004; 1726 } 1727 if (((from_bitField0_ & 0x00000008) != 0)) { 1728 result.id_ = id_; 1729 to_bitField0_ |= 0x00000008; 1730 } 1731 if (((from_bitField0_ & 0x00000010) != 0)) { 1732 result.kind_ = kind_; 1733 to_bitField0_ |= 0x00000010; 1734 } 1735 if (((from_bitField0_ & 0x00000020) != 0)) { 1736 result.name_ = name_; 1737 to_bitField0_ |= 0x00000020; 1738 } 1739 if (((from_bitField0_ & 0x00000040) != 0)) { 1740 result.recommendedSize_ = recommendedSize_; 1741 to_bitField0_ |= 0x00000040; 1742 } 1743 if (((from_bitField0_ & 0x00000080) != 0)) { 1744 result.region_ = region_; 1745 to_bitField0_ |= 0x00000080; 1746 } 1747 if (((from_bitField0_ & 0x00000100) != 0)) { 1748 result.scalingScheduleStatus_ = internalGetScalingScheduleStatus(); 1749 result.scalingScheduleStatus_.makeImmutable(); 1750 } 1751 if (((from_bitField0_ & 0x00000200) != 0)) { 1752 result.selfLink_ = selfLink_; 1753 to_bitField0_ |= 0x00000100; 1754 } 1755 if (((from_bitField0_ & 0x00000400) != 0)) { 1756 result.status_ = status_; 1757 to_bitField0_ |= 0x00000200; 1758 } 1759 if (((from_bitField0_ & 0x00001000) != 0)) { 1760 result.target_ = target_; 1761 to_bitField0_ |= 0x00000400; 1762 } 1763 if (((from_bitField0_ & 0x00002000) != 0)) { 1764 result.zone_ = zone_; 1765 to_bitField0_ |= 0x00000800; 1766 } 1767 result.bitField0_ |= to_bitField0_; 1768 } 1769 1770 @java.lang.Override clone()1771 public Builder clone() { 1772 return super.clone(); 1773 } 1774 1775 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1776 public Builder setField( 1777 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1778 return super.setField(field, value); 1779 } 1780 1781 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1782 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 1783 return super.clearField(field); 1784 } 1785 1786 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1787 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 1788 return super.clearOneof(oneof); 1789 } 1790 1791 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1792 public Builder setRepeatedField( 1793 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 1794 return super.setRepeatedField(field, index, value); 1795 } 1796 1797 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1798 public Builder addRepeatedField( 1799 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1800 return super.addRepeatedField(field, value); 1801 } 1802 1803 @java.lang.Override mergeFrom(com.google.protobuf.Message other)1804 public Builder mergeFrom(com.google.protobuf.Message other) { 1805 if (other instanceof com.google.cloud.compute.v1.Autoscaler) { 1806 return mergeFrom((com.google.cloud.compute.v1.Autoscaler) other); 1807 } else { 1808 super.mergeFrom(other); 1809 return this; 1810 } 1811 } 1812 mergeFrom(com.google.cloud.compute.v1.Autoscaler other)1813 public Builder mergeFrom(com.google.cloud.compute.v1.Autoscaler other) { 1814 if (other == com.google.cloud.compute.v1.Autoscaler.getDefaultInstance()) return this; 1815 if (other.hasAutoscalingPolicy()) { 1816 mergeAutoscalingPolicy(other.getAutoscalingPolicy()); 1817 } 1818 if (other.hasCreationTimestamp()) { 1819 creationTimestamp_ = other.creationTimestamp_; 1820 bitField0_ |= 0x00000002; 1821 onChanged(); 1822 } 1823 if (other.hasDescription()) { 1824 description_ = other.description_; 1825 bitField0_ |= 0x00000004; 1826 onChanged(); 1827 } 1828 if (other.hasId()) { 1829 setId(other.getId()); 1830 } 1831 if (other.hasKind()) { 1832 kind_ = other.kind_; 1833 bitField0_ |= 0x00000010; 1834 onChanged(); 1835 } 1836 if (other.hasName()) { 1837 name_ = other.name_; 1838 bitField0_ |= 0x00000020; 1839 onChanged(); 1840 } 1841 if (other.hasRecommendedSize()) { 1842 setRecommendedSize(other.getRecommendedSize()); 1843 } 1844 if (other.hasRegion()) { 1845 region_ = other.region_; 1846 bitField0_ |= 0x00000080; 1847 onChanged(); 1848 } 1849 internalGetMutableScalingScheduleStatus().mergeFrom(other.internalGetScalingScheduleStatus()); 1850 bitField0_ |= 0x00000100; 1851 if (other.hasSelfLink()) { 1852 selfLink_ = other.selfLink_; 1853 bitField0_ |= 0x00000200; 1854 onChanged(); 1855 } 1856 if (other.hasStatus()) { 1857 status_ = other.status_; 1858 bitField0_ |= 0x00000400; 1859 onChanged(); 1860 } 1861 if (statusDetailsBuilder_ == null) { 1862 if (!other.statusDetails_.isEmpty()) { 1863 if (statusDetails_.isEmpty()) { 1864 statusDetails_ = other.statusDetails_; 1865 bitField0_ = (bitField0_ & ~0x00000800); 1866 } else { 1867 ensureStatusDetailsIsMutable(); 1868 statusDetails_.addAll(other.statusDetails_); 1869 } 1870 onChanged(); 1871 } 1872 } else { 1873 if (!other.statusDetails_.isEmpty()) { 1874 if (statusDetailsBuilder_.isEmpty()) { 1875 statusDetailsBuilder_.dispose(); 1876 statusDetailsBuilder_ = null; 1877 statusDetails_ = other.statusDetails_; 1878 bitField0_ = (bitField0_ & ~0x00000800); 1879 statusDetailsBuilder_ = 1880 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders 1881 ? getStatusDetailsFieldBuilder() 1882 : null; 1883 } else { 1884 statusDetailsBuilder_.addAllMessages(other.statusDetails_); 1885 } 1886 } 1887 } 1888 if (other.hasTarget()) { 1889 target_ = other.target_; 1890 bitField0_ |= 0x00001000; 1891 onChanged(); 1892 } 1893 if (other.hasZone()) { 1894 zone_ = other.zone_; 1895 bitField0_ |= 0x00002000; 1896 onChanged(); 1897 } 1898 this.mergeUnknownFields(other.getUnknownFields()); 1899 onChanged(); 1900 return this; 1901 } 1902 1903 @java.lang.Override isInitialized()1904 public final boolean isInitialized() { 1905 return true; 1906 } 1907 1908 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1909 public Builder mergeFrom( 1910 com.google.protobuf.CodedInputStream input, 1911 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1912 throws java.io.IOException { 1913 if (extensionRegistry == null) { 1914 throw new java.lang.NullPointerException(); 1915 } 1916 try { 1917 boolean done = false; 1918 while (!done) { 1919 int tag = input.readTag(); 1920 switch (tag) { 1921 case 0: 1922 done = true; 1923 break; 1924 case 26840: 1925 { 1926 id_ = input.readUInt64(); 1927 bitField0_ |= 0x00000008; 1928 break; 1929 } // case 26840 1930 case 26336418: 1931 { 1932 kind_ = input.readStringRequireUtf8(); 1933 bitField0_ |= 0x00000010; 1934 break; 1935 } // case 26336418 1936 case 26989658: 1937 { 1938 name_ = input.readStringRequireUtf8(); 1939 bitField0_ |= 0x00000020; 1940 break; 1941 } // case 26989658 1942 case 29957474: 1943 { 1944 zone_ = input.readStringRequireUtf8(); 1945 bitField0_ |= 0x00002000; 1946 break; 1947 } // case 29957474 1948 case 244202930: 1949 { 1950 creationTimestamp_ = input.readStringRequireUtf8(); 1951 bitField0_ |= 0x00000002; 1952 break; 1953 } // case 244202930 1954 case 1111570338: 1955 { 1956 region_ = input.readStringRequireUtf8(); 1957 bitField0_ |= 0x00000080; 1958 break; 1959 } // case 1111570338 1960 case 1450082194: 1961 { 1962 status_ = input.readStringRequireUtf8(); 1963 bitField0_ |= 0x00000400; 1964 break; 1965 } // case 1450082194 1966 case 1542687882: 1967 { 1968 target_ = input.readStringRequireUtf8(); 1969 bitField0_ |= 0x00001000; 1970 break; 1971 } // case 1542687882 1972 case 1775600330: 1973 { 1974 input.readMessage( 1975 getAutoscalingPolicyFieldBuilder().getBuilder(), extensionRegistry); 1976 bitField0_ |= 0x00000001; 1977 break; 1978 } // case 1775600330 1979 case 2063325992: 1980 { 1981 recommendedSize_ = input.readInt32(); 1982 bitField0_ |= 0x00000040; 1983 break; 1984 } // case 2063325992 1985 case -1388136534: 1986 { 1987 com.google.cloud.compute.v1.AutoscalerStatusDetails m = 1988 input.readMessage( 1989 com.google.cloud.compute.v1.AutoscalerStatusDetails.parser(), 1990 extensionRegistry); 1991 if (statusDetailsBuilder_ == null) { 1992 ensureStatusDetailsIsMutable(); 1993 statusDetails_.add(m); 1994 } else { 1995 statusDetailsBuilder_.addMessage(m); 1996 } 1997 break; 1998 } // case -1388136534 1999 case -911466526: 2000 { 2001 description_ = input.readStringRequireUtf8(); 2002 bitField0_ |= 0x00000004; 2003 break; 2004 } // case -911466526 2005 case -645248918: 2006 { 2007 selfLink_ = input.readStringRequireUtf8(); 2008 bitField0_ |= 0x00000200; 2009 break; 2010 } // case -645248918 2011 case -567365870: 2012 { 2013 com.google.protobuf.MapEntry< 2014 java.lang.String, com.google.cloud.compute.v1.ScalingScheduleStatus> 2015 scalingScheduleStatus__ = 2016 input.readMessage( 2017 ScalingScheduleStatusDefaultEntryHolder.defaultEntry.getParserForType(), 2018 extensionRegistry); 2019 internalGetMutableScalingScheduleStatus() 2020 .getMutableMap() 2021 .put(scalingScheduleStatus__.getKey(), scalingScheduleStatus__.getValue()); 2022 bitField0_ |= 0x00000100; 2023 break; 2024 } // case -567365870 2025 default: 2026 { 2027 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 2028 done = true; // was an endgroup tag 2029 } 2030 break; 2031 } // default: 2032 } // switch (tag) 2033 } // while (!done) 2034 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 2035 throw e.unwrapIOException(); 2036 } finally { 2037 onChanged(); 2038 } // finally 2039 return this; 2040 } 2041 2042 private int bitField0_; 2043 2044 private com.google.cloud.compute.v1.AutoscalingPolicy autoscalingPolicy_; 2045 private com.google.protobuf.SingleFieldBuilderV3< 2046 com.google.cloud.compute.v1.AutoscalingPolicy, 2047 com.google.cloud.compute.v1.AutoscalingPolicy.Builder, 2048 com.google.cloud.compute.v1.AutoscalingPolicyOrBuilder> 2049 autoscalingPolicyBuilder_; 2050 /** 2051 * 2052 * 2053 * <pre> 2054 * The configuration parameters for the autoscaling algorithm. You can define one or more signals for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization. If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%. 2055 * </pre> 2056 * 2057 * <code>optional .google.cloud.compute.v1.AutoscalingPolicy autoscaling_policy = 221950041; 2058 * </code> 2059 * 2060 * @return Whether the autoscalingPolicy field is set. 2061 */ hasAutoscalingPolicy()2062 public boolean hasAutoscalingPolicy() { 2063 return ((bitField0_ & 0x00000001) != 0); 2064 } 2065 /** 2066 * 2067 * 2068 * <pre> 2069 * The configuration parameters for the autoscaling algorithm. You can define one or more signals for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization. If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%. 2070 * </pre> 2071 * 2072 * <code>optional .google.cloud.compute.v1.AutoscalingPolicy autoscaling_policy = 221950041; 2073 * </code> 2074 * 2075 * @return The autoscalingPolicy. 2076 */ getAutoscalingPolicy()2077 public com.google.cloud.compute.v1.AutoscalingPolicy getAutoscalingPolicy() { 2078 if (autoscalingPolicyBuilder_ == null) { 2079 return autoscalingPolicy_ == null 2080 ? com.google.cloud.compute.v1.AutoscalingPolicy.getDefaultInstance() 2081 : autoscalingPolicy_; 2082 } else { 2083 return autoscalingPolicyBuilder_.getMessage(); 2084 } 2085 } 2086 /** 2087 * 2088 * 2089 * <pre> 2090 * The configuration parameters for the autoscaling algorithm. You can define one or more signals for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization. If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%. 2091 * </pre> 2092 * 2093 * <code>optional .google.cloud.compute.v1.AutoscalingPolicy autoscaling_policy = 221950041; 2094 * </code> 2095 */ setAutoscalingPolicy(com.google.cloud.compute.v1.AutoscalingPolicy value)2096 public Builder setAutoscalingPolicy(com.google.cloud.compute.v1.AutoscalingPolicy value) { 2097 if (autoscalingPolicyBuilder_ == null) { 2098 if (value == null) { 2099 throw new NullPointerException(); 2100 } 2101 autoscalingPolicy_ = value; 2102 } else { 2103 autoscalingPolicyBuilder_.setMessage(value); 2104 } 2105 bitField0_ |= 0x00000001; 2106 onChanged(); 2107 return this; 2108 } 2109 /** 2110 * 2111 * 2112 * <pre> 2113 * The configuration parameters for the autoscaling algorithm. You can define one or more signals for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization. If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%. 2114 * </pre> 2115 * 2116 * <code>optional .google.cloud.compute.v1.AutoscalingPolicy autoscaling_policy = 221950041; 2117 * </code> 2118 */ setAutoscalingPolicy( com.google.cloud.compute.v1.AutoscalingPolicy.Builder builderForValue)2119 public Builder setAutoscalingPolicy( 2120 com.google.cloud.compute.v1.AutoscalingPolicy.Builder builderForValue) { 2121 if (autoscalingPolicyBuilder_ == null) { 2122 autoscalingPolicy_ = builderForValue.build(); 2123 } else { 2124 autoscalingPolicyBuilder_.setMessage(builderForValue.build()); 2125 } 2126 bitField0_ |= 0x00000001; 2127 onChanged(); 2128 return this; 2129 } 2130 /** 2131 * 2132 * 2133 * <pre> 2134 * The configuration parameters for the autoscaling algorithm. You can define one or more signals for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization. If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%. 2135 * </pre> 2136 * 2137 * <code>optional .google.cloud.compute.v1.AutoscalingPolicy autoscaling_policy = 221950041; 2138 * </code> 2139 */ mergeAutoscalingPolicy(com.google.cloud.compute.v1.AutoscalingPolicy value)2140 public Builder mergeAutoscalingPolicy(com.google.cloud.compute.v1.AutoscalingPolicy value) { 2141 if (autoscalingPolicyBuilder_ == null) { 2142 if (((bitField0_ & 0x00000001) != 0) 2143 && autoscalingPolicy_ != null 2144 && autoscalingPolicy_ 2145 != com.google.cloud.compute.v1.AutoscalingPolicy.getDefaultInstance()) { 2146 getAutoscalingPolicyBuilder().mergeFrom(value); 2147 } else { 2148 autoscalingPolicy_ = value; 2149 } 2150 } else { 2151 autoscalingPolicyBuilder_.mergeFrom(value); 2152 } 2153 bitField0_ |= 0x00000001; 2154 onChanged(); 2155 return this; 2156 } 2157 /** 2158 * 2159 * 2160 * <pre> 2161 * The configuration parameters for the autoscaling algorithm. You can define one or more signals for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization. If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%. 2162 * </pre> 2163 * 2164 * <code>optional .google.cloud.compute.v1.AutoscalingPolicy autoscaling_policy = 221950041; 2165 * </code> 2166 */ clearAutoscalingPolicy()2167 public Builder clearAutoscalingPolicy() { 2168 bitField0_ = (bitField0_ & ~0x00000001); 2169 autoscalingPolicy_ = null; 2170 if (autoscalingPolicyBuilder_ != null) { 2171 autoscalingPolicyBuilder_.dispose(); 2172 autoscalingPolicyBuilder_ = null; 2173 } 2174 onChanged(); 2175 return this; 2176 } 2177 /** 2178 * 2179 * 2180 * <pre> 2181 * The configuration parameters for the autoscaling algorithm. You can define one or more signals for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization. If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%. 2182 * </pre> 2183 * 2184 * <code>optional .google.cloud.compute.v1.AutoscalingPolicy autoscaling_policy = 221950041; 2185 * </code> 2186 */ getAutoscalingPolicyBuilder()2187 public com.google.cloud.compute.v1.AutoscalingPolicy.Builder getAutoscalingPolicyBuilder() { 2188 bitField0_ |= 0x00000001; 2189 onChanged(); 2190 return getAutoscalingPolicyFieldBuilder().getBuilder(); 2191 } 2192 /** 2193 * 2194 * 2195 * <pre> 2196 * The configuration parameters for the autoscaling algorithm. You can define one or more signals for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization. If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%. 2197 * </pre> 2198 * 2199 * <code>optional .google.cloud.compute.v1.AutoscalingPolicy autoscaling_policy = 221950041; 2200 * </code> 2201 */ getAutoscalingPolicyOrBuilder()2202 public com.google.cloud.compute.v1.AutoscalingPolicyOrBuilder getAutoscalingPolicyOrBuilder() { 2203 if (autoscalingPolicyBuilder_ != null) { 2204 return autoscalingPolicyBuilder_.getMessageOrBuilder(); 2205 } else { 2206 return autoscalingPolicy_ == null 2207 ? com.google.cloud.compute.v1.AutoscalingPolicy.getDefaultInstance() 2208 : autoscalingPolicy_; 2209 } 2210 } 2211 /** 2212 * 2213 * 2214 * <pre> 2215 * The configuration parameters for the autoscaling algorithm. You can define one or more signals for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization. If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%. 2216 * </pre> 2217 * 2218 * <code>optional .google.cloud.compute.v1.AutoscalingPolicy autoscaling_policy = 221950041; 2219 * </code> 2220 */ 2221 private com.google.protobuf.SingleFieldBuilderV3< 2222 com.google.cloud.compute.v1.AutoscalingPolicy, 2223 com.google.cloud.compute.v1.AutoscalingPolicy.Builder, 2224 com.google.cloud.compute.v1.AutoscalingPolicyOrBuilder> getAutoscalingPolicyFieldBuilder()2225 getAutoscalingPolicyFieldBuilder() { 2226 if (autoscalingPolicyBuilder_ == null) { 2227 autoscalingPolicyBuilder_ = 2228 new com.google.protobuf.SingleFieldBuilderV3< 2229 com.google.cloud.compute.v1.AutoscalingPolicy, 2230 com.google.cloud.compute.v1.AutoscalingPolicy.Builder, 2231 com.google.cloud.compute.v1.AutoscalingPolicyOrBuilder>( 2232 getAutoscalingPolicy(), getParentForChildren(), isClean()); 2233 autoscalingPolicy_ = null; 2234 } 2235 return autoscalingPolicyBuilder_; 2236 } 2237 2238 private java.lang.Object creationTimestamp_ = ""; 2239 /** 2240 * 2241 * 2242 * <pre> 2243 * [Output Only] Creation timestamp in RFC3339 text format. 2244 * </pre> 2245 * 2246 * <code>optional string creation_timestamp = 30525366;</code> 2247 * 2248 * @return Whether the creationTimestamp field is set. 2249 */ hasCreationTimestamp()2250 public boolean hasCreationTimestamp() { 2251 return ((bitField0_ & 0x00000002) != 0); 2252 } 2253 /** 2254 * 2255 * 2256 * <pre> 2257 * [Output Only] Creation timestamp in RFC3339 text format. 2258 * </pre> 2259 * 2260 * <code>optional string creation_timestamp = 30525366;</code> 2261 * 2262 * @return The creationTimestamp. 2263 */ getCreationTimestamp()2264 public java.lang.String getCreationTimestamp() { 2265 java.lang.Object ref = creationTimestamp_; 2266 if (!(ref instanceof java.lang.String)) { 2267 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 2268 java.lang.String s = bs.toStringUtf8(); 2269 creationTimestamp_ = s; 2270 return s; 2271 } else { 2272 return (java.lang.String) ref; 2273 } 2274 } 2275 /** 2276 * 2277 * 2278 * <pre> 2279 * [Output Only] Creation timestamp in RFC3339 text format. 2280 * </pre> 2281 * 2282 * <code>optional string creation_timestamp = 30525366;</code> 2283 * 2284 * @return The bytes for creationTimestamp. 2285 */ getCreationTimestampBytes()2286 public com.google.protobuf.ByteString getCreationTimestampBytes() { 2287 java.lang.Object ref = creationTimestamp_; 2288 if (ref instanceof String) { 2289 com.google.protobuf.ByteString b = 2290 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 2291 creationTimestamp_ = b; 2292 return b; 2293 } else { 2294 return (com.google.protobuf.ByteString) ref; 2295 } 2296 } 2297 /** 2298 * 2299 * 2300 * <pre> 2301 * [Output Only] Creation timestamp in RFC3339 text format. 2302 * </pre> 2303 * 2304 * <code>optional string creation_timestamp = 30525366;</code> 2305 * 2306 * @param value The creationTimestamp to set. 2307 * @return This builder for chaining. 2308 */ setCreationTimestamp(java.lang.String value)2309 public Builder setCreationTimestamp(java.lang.String value) { 2310 if (value == null) { 2311 throw new NullPointerException(); 2312 } 2313 creationTimestamp_ = value; 2314 bitField0_ |= 0x00000002; 2315 onChanged(); 2316 return this; 2317 } 2318 /** 2319 * 2320 * 2321 * <pre> 2322 * [Output Only] Creation timestamp in RFC3339 text format. 2323 * </pre> 2324 * 2325 * <code>optional string creation_timestamp = 30525366;</code> 2326 * 2327 * @return This builder for chaining. 2328 */ clearCreationTimestamp()2329 public Builder clearCreationTimestamp() { 2330 creationTimestamp_ = getDefaultInstance().getCreationTimestamp(); 2331 bitField0_ = (bitField0_ & ~0x00000002); 2332 onChanged(); 2333 return this; 2334 } 2335 /** 2336 * 2337 * 2338 * <pre> 2339 * [Output Only] Creation timestamp in RFC3339 text format. 2340 * </pre> 2341 * 2342 * <code>optional string creation_timestamp = 30525366;</code> 2343 * 2344 * @param value The bytes for creationTimestamp to set. 2345 * @return This builder for chaining. 2346 */ setCreationTimestampBytes(com.google.protobuf.ByteString value)2347 public Builder setCreationTimestampBytes(com.google.protobuf.ByteString value) { 2348 if (value == null) { 2349 throw new NullPointerException(); 2350 } 2351 checkByteStringIsUtf8(value); 2352 creationTimestamp_ = value; 2353 bitField0_ |= 0x00000002; 2354 onChanged(); 2355 return this; 2356 } 2357 2358 private java.lang.Object description_ = ""; 2359 /** 2360 * 2361 * 2362 * <pre> 2363 * An optional description of this resource. Provide this property when you create the resource. 2364 * </pre> 2365 * 2366 * <code>optional string description = 422937596;</code> 2367 * 2368 * @return Whether the description field is set. 2369 */ hasDescription()2370 public boolean hasDescription() { 2371 return ((bitField0_ & 0x00000004) != 0); 2372 } 2373 /** 2374 * 2375 * 2376 * <pre> 2377 * An optional description of this resource. Provide this property when you create the resource. 2378 * </pre> 2379 * 2380 * <code>optional string description = 422937596;</code> 2381 * 2382 * @return The description. 2383 */ getDescription()2384 public java.lang.String getDescription() { 2385 java.lang.Object ref = description_; 2386 if (!(ref instanceof java.lang.String)) { 2387 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 2388 java.lang.String s = bs.toStringUtf8(); 2389 description_ = s; 2390 return s; 2391 } else { 2392 return (java.lang.String) ref; 2393 } 2394 } 2395 /** 2396 * 2397 * 2398 * <pre> 2399 * An optional description of this resource. Provide this property when you create the resource. 2400 * </pre> 2401 * 2402 * <code>optional string description = 422937596;</code> 2403 * 2404 * @return The bytes for description. 2405 */ getDescriptionBytes()2406 public com.google.protobuf.ByteString getDescriptionBytes() { 2407 java.lang.Object ref = description_; 2408 if (ref instanceof String) { 2409 com.google.protobuf.ByteString b = 2410 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 2411 description_ = b; 2412 return b; 2413 } else { 2414 return (com.google.protobuf.ByteString) ref; 2415 } 2416 } 2417 /** 2418 * 2419 * 2420 * <pre> 2421 * An optional description of this resource. Provide this property when you create the resource. 2422 * </pre> 2423 * 2424 * <code>optional string description = 422937596;</code> 2425 * 2426 * @param value The description to set. 2427 * @return This builder for chaining. 2428 */ setDescription(java.lang.String value)2429 public Builder setDescription(java.lang.String value) { 2430 if (value == null) { 2431 throw new NullPointerException(); 2432 } 2433 description_ = value; 2434 bitField0_ |= 0x00000004; 2435 onChanged(); 2436 return this; 2437 } 2438 /** 2439 * 2440 * 2441 * <pre> 2442 * An optional description of this resource. Provide this property when you create the resource. 2443 * </pre> 2444 * 2445 * <code>optional string description = 422937596;</code> 2446 * 2447 * @return This builder for chaining. 2448 */ clearDescription()2449 public Builder clearDescription() { 2450 description_ = getDefaultInstance().getDescription(); 2451 bitField0_ = (bitField0_ & ~0x00000004); 2452 onChanged(); 2453 return this; 2454 } 2455 /** 2456 * 2457 * 2458 * <pre> 2459 * An optional description of this resource. Provide this property when you create the resource. 2460 * </pre> 2461 * 2462 * <code>optional string description = 422937596;</code> 2463 * 2464 * @param value The bytes for description to set. 2465 * @return This builder for chaining. 2466 */ setDescriptionBytes(com.google.protobuf.ByteString value)2467 public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { 2468 if (value == null) { 2469 throw new NullPointerException(); 2470 } 2471 checkByteStringIsUtf8(value); 2472 description_ = value; 2473 bitField0_ |= 0x00000004; 2474 onChanged(); 2475 return this; 2476 } 2477 2478 private long id_; 2479 /** 2480 * 2481 * 2482 * <pre> 2483 * [Output Only] The unique identifier for the resource. This identifier is defined by the server. 2484 * </pre> 2485 * 2486 * <code>optional uint64 id = 3355;</code> 2487 * 2488 * @return Whether the id field is set. 2489 */ 2490 @java.lang.Override hasId()2491 public boolean hasId() { 2492 return ((bitField0_ & 0x00000008) != 0); 2493 } 2494 /** 2495 * 2496 * 2497 * <pre> 2498 * [Output Only] The unique identifier for the resource. This identifier is defined by the server. 2499 * </pre> 2500 * 2501 * <code>optional uint64 id = 3355;</code> 2502 * 2503 * @return The id. 2504 */ 2505 @java.lang.Override getId()2506 public long getId() { 2507 return id_; 2508 } 2509 /** 2510 * 2511 * 2512 * <pre> 2513 * [Output Only] The unique identifier for the resource. This identifier is defined by the server. 2514 * </pre> 2515 * 2516 * <code>optional uint64 id = 3355;</code> 2517 * 2518 * @param value The id to set. 2519 * @return This builder for chaining. 2520 */ setId(long value)2521 public Builder setId(long value) { 2522 2523 id_ = value; 2524 bitField0_ |= 0x00000008; 2525 onChanged(); 2526 return this; 2527 } 2528 /** 2529 * 2530 * 2531 * <pre> 2532 * [Output Only] The unique identifier for the resource. This identifier is defined by the server. 2533 * </pre> 2534 * 2535 * <code>optional uint64 id = 3355;</code> 2536 * 2537 * @return This builder for chaining. 2538 */ clearId()2539 public Builder clearId() { 2540 bitField0_ = (bitField0_ & ~0x00000008); 2541 id_ = 0L; 2542 onChanged(); 2543 return this; 2544 } 2545 2546 private java.lang.Object kind_ = ""; 2547 /** 2548 * 2549 * 2550 * <pre> 2551 * [Output Only] Type of the resource. Always compute#autoscaler for autoscalers. 2552 * </pre> 2553 * 2554 * <code>optional string kind = 3292052;</code> 2555 * 2556 * @return Whether the kind field is set. 2557 */ hasKind()2558 public boolean hasKind() { 2559 return ((bitField0_ & 0x00000010) != 0); 2560 } 2561 /** 2562 * 2563 * 2564 * <pre> 2565 * [Output Only] Type of the resource. Always compute#autoscaler for autoscalers. 2566 * </pre> 2567 * 2568 * <code>optional string kind = 3292052;</code> 2569 * 2570 * @return The kind. 2571 */ getKind()2572 public java.lang.String getKind() { 2573 java.lang.Object ref = kind_; 2574 if (!(ref instanceof java.lang.String)) { 2575 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 2576 java.lang.String s = bs.toStringUtf8(); 2577 kind_ = s; 2578 return s; 2579 } else { 2580 return (java.lang.String) ref; 2581 } 2582 } 2583 /** 2584 * 2585 * 2586 * <pre> 2587 * [Output Only] Type of the resource. Always compute#autoscaler for autoscalers. 2588 * </pre> 2589 * 2590 * <code>optional string kind = 3292052;</code> 2591 * 2592 * @return The bytes for kind. 2593 */ getKindBytes()2594 public com.google.protobuf.ByteString getKindBytes() { 2595 java.lang.Object ref = kind_; 2596 if (ref instanceof String) { 2597 com.google.protobuf.ByteString b = 2598 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 2599 kind_ = b; 2600 return b; 2601 } else { 2602 return (com.google.protobuf.ByteString) ref; 2603 } 2604 } 2605 /** 2606 * 2607 * 2608 * <pre> 2609 * [Output Only] Type of the resource. Always compute#autoscaler for autoscalers. 2610 * </pre> 2611 * 2612 * <code>optional string kind = 3292052;</code> 2613 * 2614 * @param value The kind to set. 2615 * @return This builder for chaining. 2616 */ setKind(java.lang.String value)2617 public Builder setKind(java.lang.String value) { 2618 if (value == null) { 2619 throw new NullPointerException(); 2620 } 2621 kind_ = value; 2622 bitField0_ |= 0x00000010; 2623 onChanged(); 2624 return this; 2625 } 2626 /** 2627 * 2628 * 2629 * <pre> 2630 * [Output Only] Type of the resource. Always compute#autoscaler for autoscalers. 2631 * </pre> 2632 * 2633 * <code>optional string kind = 3292052;</code> 2634 * 2635 * @return This builder for chaining. 2636 */ clearKind()2637 public Builder clearKind() { 2638 kind_ = getDefaultInstance().getKind(); 2639 bitField0_ = (bitField0_ & ~0x00000010); 2640 onChanged(); 2641 return this; 2642 } 2643 /** 2644 * 2645 * 2646 * <pre> 2647 * [Output Only] Type of the resource. Always compute#autoscaler for autoscalers. 2648 * </pre> 2649 * 2650 * <code>optional string kind = 3292052;</code> 2651 * 2652 * @param value The bytes for kind to set. 2653 * @return This builder for chaining. 2654 */ setKindBytes(com.google.protobuf.ByteString value)2655 public Builder setKindBytes(com.google.protobuf.ByteString value) { 2656 if (value == null) { 2657 throw new NullPointerException(); 2658 } 2659 checkByteStringIsUtf8(value); 2660 kind_ = value; 2661 bitField0_ |= 0x00000010; 2662 onChanged(); 2663 return this; 2664 } 2665 2666 private java.lang.Object name_ = ""; 2667 /** 2668 * 2669 * 2670 * <pre> 2671 * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 2672 * </pre> 2673 * 2674 * <code>optional string name = 3373707;</code> 2675 * 2676 * @return Whether the name field is set. 2677 */ hasName()2678 public boolean hasName() { 2679 return ((bitField0_ & 0x00000020) != 0); 2680 } 2681 /** 2682 * 2683 * 2684 * <pre> 2685 * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 2686 * </pre> 2687 * 2688 * <code>optional string name = 3373707;</code> 2689 * 2690 * @return The name. 2691 */ getName()2692 public java.lang.String getName() { 2693 java.lang.Object ref = name_; 2694 if (!(ref instanceof java.lang.String)) { 2695 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 2696 java.lang.String s = bs.toStringUtf8(); 2697 name_ = s; 2698 return s; 2699 } else { 2700 return (java.lang.String) ref; 2701 } 2702 } 2703 /** 2704 * 2705 * 2706 * <pre> 2707 * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 2708 * </pre> 2709 * 2710 * <code>optional string name = 3373707;</code> 2711 * 2712 * @return The bytes for name. 2713 */ getNameBytes()2714 public com.google.protobuf.ByteString getNameBytes() { 2715 java.lang.Object ref = name_; 2716 if (ref instanceof String) { 2717 com.google.protobuf.ByteString b = 2718 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 2719 name_ = b; 2720 return b; 2721 } else { 2722 return (com.google.protobuf.ByteString) ref; 2723 } 2724 } 2725 /** 2726 * 2727 * 2728 * <pre> 2729 * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 2730 * </pre> 2731 * 2732 * <code>optional string name = 3373707;</code> 2733 * 2734 * @param value The name to set. 2735 * @return This builder for chaining. 2736 */ setName(java.lang.String value)2737 public Builder setName(java.lang.String value) { 2738 if (value == null) { 2739 throw new NullPointerException(); 2740 } 2741 name_ = value; 2742 bitField0_ |= 0x00000020; 2743 onChanged(); 2744 return this; 2745 } 2746 /** 2747 * 2748 * 2749 * <pre> 2750 * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 2751 * </pre> 2752 * 2753 * <code>optional string name = 3373707;</code> 2754 * 2755 * @return This builder for chaining. 2756 */ clearName()2757 public Builder clearName() { 2758 name_ = getDefaultInstance().getName(); 2759 bitField0_ = (bitField0_ & ~0x00000020); 2760 onChanged(); 2761 return this; 2762 } 2763 /** 2764 * 2765 * 2766 * <pre> 2767 * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 2768 * </pre> 2769 * 2770 * <code>optional string name = 3373707;</code> 2771 * 2772 * @param value The bytes for name to set. 2773 * @return This builder for chaining. 2774 */ setNameBytes(com.google.protobuf.ByteString value)2775 public Builder setNameBytes(com.google.protobuf.ByteString value) { 2776 if (value == null) { 2777 throw new NullPointerException(); 2778 } 2779 checkByteStringIsUtf8(value); 2780 name_ = value; 2781 bitField0_ |= 0x00000020; 2782 onChanged(); 2783 return this; 2784 } 2785 2786 private int recommendedSize_; 2787 /** 2788 * 2789 * 2790 * <pre> 2791 * [Output Only] Target recommended MIG size (number of instances) computed by autoscaler. Autoscaler calculates the recommended MIG size even when the autoscaling policy mode is different from ON. This field is empty when autoscaler is not connected to an existing managed instance group or autoscaler did not generate its prediction. 2792 * </pre> 2793 * 2794 * <code>optional int32 recommended_size = 257915749;</code> 2795 * 2796 * @return Whether the recommendedSize field is set. 2797 */ 2798 @java.lang.Override hasRecommendedSize()2799 public boolean hasRecommendedSize() { 2800 return ((bitField0_ & 0x00000040) != 0); 2801 } 2802 /** 2803 * 2804 * 2805 * <pre> 2806 * [Output Only] Target recommended MIG size (number of instances) computed by autoscaler. Autoscaler calculates the recommended MIG size even when the autoscaling policy mode is different from ON. This field is empty when autoscaler is not connected to an existing managed instance group or autoscaler did not generate its prediction. 2807 * </pre> 2808 * 2809 * <code>optional int32 recommended_size = 257915749;</code> 2810 * 2811 * @return The recommendedSize. 2812 */ 2813 @java.lang.Override getRecommendedSize()2814 public int getRecommendedSize() { 2815 return recommendedSize_; 2816 } 2817 /** 2818 * 2819 * 2820 * <pre> 2821 * [Output Only] Target recommended MIG size (number of instances) computed by autoscaler. Autoscaler calculates the recommended MIG size even when the autoscaling policy mode is different from ON. This field is empty when autoscaler is not connected to an existing managed instance group or autoscaler did not generate its prediction. 2822 * </pre> 2823 * 2824 * <code>optional int32 recommended_size = 257915749;</code> 2825 * 2826 * @param value The recommendedSize to set. 2827 * @return This builder for chaining. 2828 */ setRecommendedSize(int value)2829 public Builder setRecommendedSize(int value) { 2830 2831 recommendedSize_ = value; 2832 bitField0_ |= 0x00000040; 2833 onChanged(); 2834 return this; 2835 } 2836 /** 2837 * 2838 * 2839 * <pre> 2840 * [Output Only] Target recommended MIG size (number of instances) computed by autoscaler. Autoscaler calculates the recommended MIG size even when the autoscaling policy mode is different from ON. This field is empty when autoscaler is not connected to an existing managed instance group or autoscaler did not generate its prediction. 2841 * </pre> 2842 * 2843 * <code>optional int32 recommended_size = 257915749;</code> 2844 * 2845 * @return This builder for chaining. 2846 */ clearRecommendedSize()2847 public Builder clearRecommendedSize() { 2848 bitField0_ = (bitField0_ & ~0x00000040); 2849 recommendedSize_ = 0; 2850 onChanged(); 2851 return this; 2852 } 2853 2854 private java.lang.Object region_ = ""; 2855 /** 2856 * 2857 * 2858 * <pre> 2859 * [Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope). 2860 * </pre> 2861 * 2862 * <code>optional string region = 138946292;</code> 2863 * 2864 * @return Whether the region field is set. 2865 */ hasRegion()2866 public boolean hasRegion() { 2867 return ((bitField0_ & 0x00000080) != 0); 2868 } 2869 /** 2870 * 2871 * 2872 * <pre> 2873 * [Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope). 2874 * </pre> 2875 * 2876 * <code>optional string region = 138946292;</code> 2877 * 2878 * @return The region. 2879 */ getRegion()2880 public java.lang.String getRegion() { 2881 java.lang.Object ref = region_; 2882 if (!(ref instanceof java.lang.String)) { 2883 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 2884 java.lang.String s = bs.toStringUtf8(); 2885 region_ = s; 2886 return s; 2887 } else { 2888 return (java.lang.String) ref; 2889 } 2890 } 2891 /** 2892 * 2893 * 2894 * <pre> 2895 * [Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope). 2896 * </pre> 2897 * 2898 * <code>optional string region = 138946292;</code> 2899 * 2900 * @return The bytes for region. 2901 */ getRegionBytes()2902 public com.google.protobuf.ByteString getRegionBytes() { 2903 java.lang.Object ref = region_; 2904 if (ref instanceof String) { 2905 com.google.protobuf.ByteString b = 2906 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 2907 region_ = b; 2908 return b; 2909 } else { 2910 return (com.google.protobuf.ByteString) ref; 2911 } 2912 } 2913 /** 2914 * 2915 * 2916 * <pre> 2917 * [Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope). 2918 * </pre> 2919 * 2920 * <code>optional string region = 138946292;</code> 2921 * 2922 * @param value The region to set. 2923 * @return This builder for chaining. 2924 */ setRegion(java.lang.String value)2925 public Builder setRegion(java.lang.String value) { 2926 if (value == null) { 2927 throw new NullPointerException(); 2928 } 2929 region_ = value; 2930 bitField0_ |= 0x00000080; 2931 onChanged(); 2932 return this; 2933 } 2934 /** 2935 * 2936 * 2937 * <pre> 2938 * [Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope). 2939 * </pre> 2940 * 2941 * <code>optional string region = 138946292;</code> 2942 * 2943 * @return This builder for chaining. 2944 */ clearRegion()2945 public Builder clearRegion() { 2946 region_ = getDefaultInstance().getRegion(); 2947 bitField0_ = (bitField0_ & ~0x00000080); 2948 onChanged(); 2949 return this; 2950 } 2951 /** 2952 * 2953 * 2954 * <pre> 2955 * [Output Only] URL of the region where the instance group resides (for autoscalers living in regional scope). 2956 * </pre> 2957 * 2958 * <code>optional string region = 138946292;</code> 2959 * 2960 * @param value The bytes for region to set. 2961 * @return This builder for chaining. 2962 */ setRegionBytes(com.google.protobuf.ByteString value)2963 public Builder setRegionBytes(com.google.protobuf.ByteString value) { 2964 if (value == null) { 2965 throw new NullPointerException(); 2966 } 2967 checkByteStringIsUtf8(value); 2968 region_ = value; 2969 bitField0_ |= 0x00000080; 2970 onChanged(); 2971 return this; 2972 } 2973 2974 private com.google.protobuf.MapField< 2975 java.lang.String, com.google.cloud.compute.v1.ScalingScheduleStatus> 2976 scalingScheduleStatus_; 2977 2978 private com.google.protobuf.MapField< 2979 java.lang.String, com.google.cloud.compute.v1.ScalingScheduleStatus> internalGetScalingScheduleStatus()2980 internalGetScalingScheduleStatus() { 2981 if (scalingScheduleStatus_ == null) { 2982 return com.google.protobuf.MapField.emptyMapField( 2983 ScalingScheduleStatusDefaultEntryHolder.defaultEntry); 2984 } 2985 return scalingScheduleStatus_; 2986 } 2987 2988 private com.google.protobuf.MapField< 2989 java.lang.String, com.google.cloud.compute.v1.ScalingScheduleStatus> internalGetMutableScalingScheduleStatus()2990 internalGetMutableScalingScheduleStatus() { 2991 if (scalingScheduleStatus_ == null) { 2992 scalingScheduleStatus_ = 2993 com.google.protobuf.MapField.newMapField( 2994 ScalingScheduleStatusDefaultEntryHolder.defaultEntry); 2995 } 2996 if (!scalingScheduleStatus_.isMutable()) { 2997 scalingScheduleStatus_ = scalingScheduleStatus_.copy(); 2998 } 2999 bitField0_ |= 0x00000100; 3000 onChanged(); 3001 return scalingScheduleStatus_; 3002 } 3003 getScalingScheduleStatusCount()3004 public int getScalingScheduleStatusCount() { 3005 return internalGetScalingScheduleStatus().getMap().size(); 3006 } 3007 /** 3008 * 3009 * 3010 * <pre> 3011 * [Output Only] Status information of existing scaling schedules. 3012 * </pre> 3013 * 3014 * <code> 3015 * map<string, .google.cloud.compute.v1.ScalingScheduleStatus> scaling_schedule_status = 465950178; 3016 * </code> 3017 */ 3018 @java.lang.Override containsScalingScheduleStatus(java.lang.String key)3019 public boolean containsScalingScheduleStatus(java.lang.String key) { 3020 if (key == null) { 3021 throw new NullPointerException("map key"); 3022 } 3023 return internalGetScalingScheduleStatus().getMap().containsKey(key); 3024 } 3025 /** Use {@link #getScalingScheduleStatusMap()} instead. */ 3026 @java.lang.Override 3027 @java.lang.Deprecated 3028 public java.util.Map<java.lang.String, com.google.cloud.compute.v1.ScalingScheduleStatus> getScalingScheduleStatus()3029 getScalingScheduleStatus() { 3030 return getScalingScheduleStatusMap(); 3031 } 3032 /** 3033 * 3034 * 3035 * <pre> 3036 * [Output Only] Status information of existing scaling schedules. 3037 * </pre> 3038 * 3039 * <code> 3040 * map<string, .google.cloud.compute.v1.ScalingScheduleStatus> scaling_schedule_status = 465950178; 3041 * </code> 3042 */ 3043 @java.lang.Override 3044 public java.util.Map<java.lang.String, com.google.cloud.compute.v1.ScalingScheduleStatus> getScalingScheduleStatusMap()3045 getScalingScheduleStatusMap() { 3046 return internalGetScalingScheduleStatus().getMap(); 3047 } 3048 /** 3049 * 3050 * 3051 * <pre> 3052 * [Output Only] Status information of existing scaling schedules. 3053 * </pre> 3054 * 3055 * <code> 3056 * map<string, .google.cloud.compute.v1.ScalingScheduleStatus> scaling_schedule_status = 465950178; 3057 * </code> 3058 */ 3059 @java.lang.Override 3060 public /* nullable */ com.google.cloud.compute.v1.ScalingScheduleStatus getScalingScheduleStatusOrDefault( java.lang.String key, com.google.cloud.compute.v1.ScalingScheduleStatus defaultValue)3061 getScalingScheduleStatusOrDefault( 3062 java.lang.String key, 3063 /* nullable */ 3064 com.google.cloud.compute.v1.ScalingScheduleStatus defaultValue) { 3065 if (key == null) { 3066 throw new NullPointerException("map key"); 3067 } 3068 java.util.Map<java.lang.String, com.google.cloud.compute.v1.ScalingScheduleStatus> map = 3069 internalGetScalingScheduleStatus().getMap(); 3070 return map.containsKey(key) ? map.get(key) : defaultValue; 3071 } 3072 /** 3073 * 3074 * 3075 * <pre> 3076 * [Output Only] Status information of existing scaling schedules. 3077 * </pre> 3078 * 3079 * <code> 3080 * map<string, .google.cloud.compute.v1.ScalingScheduleStatus> scaling_schedule_status = 465950178; 3081 * </code> 3082 */ 3083 @java.lang.Override getScalingScheduleStatusOrThrow( java.lang.String key)3084 public com.google.cloud.compute.v1.ScalingScheduleStatus getScalingScheduleStatusOrThrow( 3085 java.lang.String key) { 3086 if (key == null) { 3087 throw new NullPointerException("map key"); 3088 } 3089 java.util.Map<java.lang.String, com.google.cloud.compute.v1.ScalingScheduleStatus> map = 3090 internalGetScalingScheduleStatus().getMap(); 3091 if (!map.containsKey(key)) { 3092 throw new java.lang.IllegalArgumentException(); 3093 } 3094 return map.get(key); 3095 } 3096 clearScalingScheduleStatus()3097 public Builder clearScalingScheduleStatus() { 3098 bitField0_ = (bitField0_ & ~0x00000100); 3099 internalGetMutableScalingScheduleStatus().getMutableMap().clear(); 3100 return this; 3101 } 3102 /** 3103 * 3104 * 3105 * <pre> 3106 * [Output Only] Status information of existing scaling schedules. 3107 * </pre> 3108 * 3109 * <code> 3110 * map<string, .google.cloud.compute.v1.ScalingScheduleStatus> scaling_schedule_status = 465950178; 3111 * </code> 3112 */ removeScalingScheduleStatus(java.lang.String key)3113 public Builder removeScalingScheduleStatus(java.lang.String key) { 3114 if (key == null) { 3115 throw new NullPointerException("map key"); 3116 } 3117 internalGetMutableScalingScheduleStatus().getMutableMap().remove(key); 3118 return this; 3119 } 3120 /** Use alternate mutation accessors instead. */ 3121 @java.lang.Deprecated 3122 public java.util.Map<java.lang.String, com.google.cloud.compute.v1.ScalingScheduleStatus> getMutableScalingScheduleStatus()3123 getMutableScalingScheduleStatus() { 3124 bitField0_ |= 0x00000100; 3125 return internalGetMutableScalingScheduleStatus().getMutableMap(); 3126 } 3127 /** 3128 * 3129 * 3130 * <pre> 3131 * [Output Only] Status information of existing scaling schedules. 3132 * </pre> 3133 * 3134 * <code> 3135 * map<string, .google.cloud.compute.v1.ScalingScheduleStatus> scaling_schedule_status = 465950178; 3136 * </code> 3137 */ putScalingScheduleStatus( java.lang.String key, com.google.cloud.compute.v1.ScalingScheduleStatus value)3138 public Builder putScalingScheduleStatus( 3139 java.lang.String key, com.google.cloud.compute.v1.ScalingScheduleStatus value) { 3140 if (key == null) { 3141 throw new NullPointerException("map key"); 3142 } 3143 if (value == null) { 3144 throw new NullPointerException("map value"); 3145 } 3146 internalGetMutableScalingScheduleStatus().getMutableMap().put(key, value); 3147 bitField0_ |= 0x00000100; 3148 return this; 3149 } 3150 /** 3151 * 3152 * 3153 * <pre> 3154 * [Output Only] Status information of existing scaling schedules. 3155 * </pre> 3156 * 3157 * <code> 3158 * map<string, .google.cloud.compute.v1.ScalingScheduleStatus> scaling_schedule_status = 465950178; 3159 * </code> 3160 */ putAllScalingScheduleStatus( java.util.Map<java.lang.String, com.google.cloud.compute.v1.ScalingScheduleStatus> values)3161 public Builder putAllScalingScheduleStatus( 3162 java.util.Map<java.lang.String, com.google.cloud.compute.v1.ScalingScheduleStatus> values) { 3163 internalGetMutableScalingScheduleStatus().getMutableMap().putAll(values); 3164 bitField0_ |= 0x00000100; 3165 return this; 3166 } 3167 3168 private java.lang.Object selfLink_ = ""; 3169 /** 3170 * 3171 * 3172 * <pre> 3173 * [Output Only] Server-defined URL for the resource. 3174 * </pre> 3175 * 3176 * <code>optional string self_link = 456214797;</code> 3177 * 3178 * @return Whether the selfLink field is set. 3179 */ hasSelfLink()3180 public boolean hasSelfLink() { 3181 return ((bitField0_ & 0x00000200) != 0); 3182 } 3183 /** 3184 * 3185 * 3186 * <pre> 3187 * [Output Only] Server-defined URL for the resource. 3188 * </pre> 3189 * 3190 * <code>optional string self_link = 456214797;</code> 3191 * 3192 * @return The selfLink. 3193 */ getSelfLink()3194 public java.lang.String getSelfLink() { 3195 java.lang.Object ref = selfLink_; 3196 if (!(ref instanceof java.lang.String)) { 3197 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 3198 java.lang.String s = bs.toStringUtf8(); 3199 selfLink_ = s; 3200 return s; 3201 } else { 3202 return (java.lang.String) ref; 3203 } 3204 } 3205 /** 3206 * 3207 * 3208 * <pre> 3209 * [Output Only] Server-defined URL for the resource. 3210 * </pre> 3211 * 3212 * <code>optional string self_link = 456214797;</code> 3213 * 3214 * @return The bytes for selfLink. 3215 */ getSelfLinkBytes()3216 public com.google.protobuf.ByteString getSelfLinkBytes() { 3217 java.lang.Object ref = selfLink_; 3218 if (ref instanceof String) { 3219 com.google.protobuf.ByteString b = 3220 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 3221 selfLink_ = b; 3222 return b; 3223 } else { 3224 return (com.google.protobuf.ByteString) ref; 3225 } 3226 } 3227 /** 3228 * 3229 * 3230 * <pre> 3231 * [Output Only] Server-defined URL for the resource. 3232 * </pre> 3233 * 3234 * <code>optional string self_link = 456214797;</code> 3235 * 3236 * @param value The selfLink to set. 3237 * @return This builder for chaining. 3238 */ setSelfLink(java.lang.String value)3239 public Builder setSelfLink(java.lang.String value) { 3240 if (value == null) { 3241 throw new NullPointerException(); 3242 } 3243 selfLink_ = value; 3244 bitField0_ |= 0x00000200; 3245 onChanged(); 3246 return this; 3247 } 3248 /** 3249 * 3250 * 3251 * <pre> 3252 * [Output Only] Server-defined URL for the resource. 3253 * </pre> 3254 * 3255 * <code>optional string self_link = 456214797;</code> 3256 * 3257 * @return This builder for chaining. 3258 */ clearSelfLink()3259 public Builder clearSelfLink() { 3260 selfLink_ = getDefaultInstance().getSelfLink(); 3261 bitField0_ = (bitField0_ & ~0x00000200); 3262 onChanged(); 3263 return this; 3264 } 3265 /** 3266 * 3267 * 3268 * <pre> 3269 * [Output Only] Server-defined URL for the resource. 3270 * </pre> 3271 * 3272 * <code>optional string self_link = 456214797;</code> 3273 * 3274 * @param value The bytes for selfLink to set. 3275 * @return This builder for chaining. 3276 */ setSelfLinkBytes(com.google.protobuf.ByteString value)3277 public Builder setSelfLinkBytes(com.google.protobuf.ByteString value) { 3278 if (value == null) { 3279 throw new NullPointerException(); 3280 } 3281 checkByteStringIsUtf8(value); 3282 selfLink_ = value; 3283 bitField0_ |= 0x00000200; 3284 onChanged(); 3285 return this; 3286 } 3287 3288 private java.lang.Object status_ = ""; 3289 /** 3290 * 3291 * 3292 * <pre> 3293 * [Output Only] The status of the autoscaler configuration. Current set of possible values: - PENDING: Autoscaler backend hasn't read new/updated configuration. - DELETING: Configuration is being deleted. - ACTIVE: Configuration is acknowledged to be effective. Some warnings might be present in the statusDetails field. - ERROR: Configuration has errors. Actionable for users. Details are present in the statusDetails field. New values might be added in the future. 3294 * Check the Status enum for the list of possible values. 3295 * </pre> 3296 * 3297 * <code>optional string status = 181260274;</code> 3298 * 3299 * @return Whether the status field is set. 3300 */ hasStatus()3301 public boolean hasStatus() { 3302 return ((bitField0_ & 0x00000400) != 0); 3303 } 3304 /** 3305 * 3306 * 3307 * <pre> 3308 * [Output Only] The status of the autoscaler configuration. Current set of possible values: - PENDING: Autoscaler backend hasn't read new/updated configuration. - DELETING: Configuration is being deleted. - ACTIVE: Configuration is acknowledged to be effective. Some warnings might be present in the statusDetails field. - ERROR: Configuration has errors. Actionable for users. Details are present in the statusDetails field. New values might be added in the future. 3309 * Check the Status enum for the list of possible values. 3310 * </pre> 3311 * 3312 * <code>optional string status = 181260274;</code> 3313 * 3314 * @return The status. 3315 */ getStatus()3316 public java.lang.String getStatus() { 3317 java.lang.Object ref = status_; 3318 if (!(ref instanceof java.lang.String)) { 3319 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 3320 java.lang.String s = bs.toStringUtf8(); 3321 status_ = s; 3322 return s; 3323 } else { 3324 return (java.lang.String) ref; 3325 } 3326 } 3327 /** 3328 * 3329 * 3330 * <pre> 3331 * [Output Only] The status of the autoscaler configuration. Current set of possible values: - PENDING: Autoscaler backend hasn't read new/updated configuration. - DELETING: Configuration is being deleted. - ACTIVE: Configuration is acknowledged to be effective. Some warnings might be present in the statusDetails field. - ERROR: Configuration has errors. Actionable for users. Details are present in the statusDetails field. New values might be added in the future. 3332 * Check the Status enum for the list of possible values. 3333 * </pre> 3334 * 3335 * <code>optional string status = 181260274;</code> 3336 * 3337 * @return The bytes for status. 3338 */ getStatusBytes()3339 public com.google.protobuf.ByteString getStatusBytes() { 3340 java.lang.Object ref = status_; 3341 if (ref instanceof String) { 3342 com.google.protobuf.ByteString b = 3343 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 3344 status_ = b; 3345 return b; 3346 } else { 3347 return (com.google.protobuf.ByteString) ref; 3348 } 3349 } 3350 /** 3351 * 3352 * 3353 * <pre> 3354 * [Output Only] The status of the autoscaler configuration. Current set of possible values: - PENDING: Autoscaler backend hasn't read new/updated configuration. - DELETING: Configuration is being deleted. - ACTIVE: Configuration is acknowledged to be effective. Some warnings might be present in the statusDetails field. - ERROR: Configuration has errors. Actionable for users. Details are present in the statusDetails field. New values might be added in the future. 3355 * Check the Status enum for the list of possible values. 3356 * </pre> 3357 * 3358 * <code>optional string status = 181260274;</code> 3359 * 3360 * @param value The status to set. 3361 * @return This builder for chaining. 3362 */ setStatus(java.lang.String value)3363 public Builder setStatus(java.lang.String value) { 3364 if (value == null) { 3365 throw new NullPointerException(); 3366 } 3367 status_ = value; 3368 bitField0_ |= 0x00000400; 3369 onChanged(); 3370 return this; 3371 } 3372 /** 3373 * 3374 * 3375 * <pre> 3376 * [Output Only] The status of the autoscaler configuration. Current set of possible values: - PENDING: Autoscaler backend hasn't read new/updated configuration. - DELETING: Configuration is being deleted. - ACTIVE: Configuration is acknowledged to be effective. Some warnings might be present in the statusDetails field. - ERROR: Configuration has errors. Actionable for users. Details are present in the statusDetails field. New values might be added in the future. 3377 * Check the Status enum for the list of possible values. 3378 * </pre> 3379 * 3380 * <code>optional string status = 181260274;</code> 3381 * 3382 * @return This builder for chaining. 3383 */ clearStatus()3384 public Builder clearStatus() { 3385 status_ = getDefaultInstance().getStatus(); 3386 bitField0_ = (bitField0_ & ~0x00000400); 3387 onChanged(); 3388 return this; 3389 } 3390 /** 3391 * 3392 * 3393 * <pre> 3394 * [Output Only] The status of the autoscaler configuration. Current set of possible values: - PENDING: Autoscaler backend hasn't read new/updated configuration. - DELETING: Configuration is being deleted. - ACTIVE: Configuration is acknowledged to be effective. Some warnings might be present in the statusDetails field. - ERROR: Configuration has errors. Actionable for users. Details are present in the statusDetails field. New values might be added in the future. 3395 * Check the Status enum for the list of possible values. 3396 * </pre> 3397 * 3398 * <code>optional string status = 181260274;</code> 3399 * 3400 * @param value The bytes for status to set. 3401 * @return This builder for chaining. 3402 */ setStatusBytes(com.google.protobuf.ByteString value)3403 public Builder setStatusBytes(com.google.protobuf.ByteString value) { 3404 if (value == null) { 3405 throw new NullPointerException(); 3406 } 3407 checkByteStringIsUtf8(value); 3408 status_ = value; 3409 bitField0_ |= 0x00000400; 3410 onChanged(); 3411 return this; 3412 } 3413 3414 private java.util.List<com.google.cloud.compute.v1.AutoscalerStatusDetails> statusDetails_ = 3415 java.util.Collections.emptyList(); 3416 ensureStatusDetailsIsMutable()3417 private void ensureStatusDetailsIsMutable() { 3418 if (!((bitField0_ & 0x00000800) != 0)) { 3419 statusDetails_ = 3420 new java.util.ArrayList<com.google.cloud.compute.v1.AutoscalerStatusDetails>( 3421 statusDetails_); 3422 bitField0_ |= 0x00000800; 3423 } 3424 } 3425 3426 private com.google.protobuf.RepeatedFieldBuilderV3< 3427 com.google.cloud.compute.v1.AutoscalerStatusDetails, 3428 com.google.cloud.compute.v1.AutoscalerStatusDetails.Builder, 3429 com.google.cloud.compute.v1.AutoscalerStatusDetailsOrBuilder> 3430 statusDetailsBuilder_; 3431 3432 /** 3433 * 3434 * 3435 * <pre> 3436 * [Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter. 3437 * </pre> 3438 * 3439 * <code>repeated .google.cloud.compute.v1.AutoscalerStatusDetails status_details = 363353845; 3440 * </code> 3441 */ 3442 public java.util.List<com.google.cloud.compute.v1.AutoscalerStatusDetails> getStatusDetailsList()3443 getStatusDetailsList() { 3444 if (statusDetailsBuilder_ == null) { 3445 return java.util.Collections.unmodifiableList(statusDetails_); 3446 } else { 3447 return statusDetailsBuilder_.getMessageList(); 3448 } 3449 } 3450 /** 3451 * 3452 * 3453 * <pre> 3454 * [Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter. 3455 * </pre> 3456 * 3457 * <code>repeated .google.cloud.compute.v1.AutoscalerStatusDetails status_details = 363353845; 3458 * </code> 3459 */ getStatusDetailsCount()3460 public int getStatusDetailsCount() { 3461 if (statusDetailsBuilder_ == null) { 3462 return statusDetails_.size(); 3463 } else { 3464 return statusDetailsBuilder_.getCount(); 3465 } 3466 } 3467 /** 3468 * 3469 * 3470 * <pre> 3471 * [Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter. 3472 * </pre> 3473 * 3474 * <code>repeated .google.cloud.compute.v1.AutoscalerStatusDetails status_details = 363353845; 3475 * </code> 3476 */ getStatusDetails(int index)3477 public com.google.cloud.compute.v1.AutoscalerStatusDetails getStatusDetails(int index) { 3478 if (statusDetailsBuilder_ == null) { 3479 return statusDetails_.get(index); 3480 } else { 3481 return statusDetailsBuilder_.getMessage(index); 3482 } 3483 } 3484 /** 3485 * 3486 * 3487 * <pre> 3488 * [Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter. 3489 * </pre> 3490 * 3491 * <code>repeated .google.cloud.compute.v1.AutoscalerStatusDetails status_details = 363353845; 3492 * </code> 3493 */ setStatusDetails( int index, com.google.cloud.compute.v1.AutoscalerStatusDetails value)3494 public Builder setStatusDetails( 3495 int index, com.google.cloud.compute.v1.AutoscalerStatusDetails value) { 3496 if (statusDetailsBuilder_ == null) { 3497 if (value == null) { 3498 throw new NullPointerException(); 3499 } 3500 ensureStatusDetailsIsMutable(); 3501 statusDetails_.set(index, value); 3502 onChanged(); 3503 } else { 3504 statusDetailsBuilder_.setMessage(index, value); 3505 } 3506 return this; 3507 } 3508 /** 3509 * 3510 * 3511 * <pre> 3512 * [Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter. 3513 * </pre> 3514 * 3515 * <code>repeated .google.cloud.compute.v1.AutoscalerStatusDetails status_details = 363353845; 3516 * </code> 3517 */ setStatusDetails( int index, com.google.cloud.compute.v1.AutoscalerStatusDetails.Builder builderForValue)3518 public Builder setStatusDetails( 3519 int index, com.google.cloud.compute.v1.AutoscalerStatusDetails.Builder builderForValue) { 3520 if (statusDetailsBuilder_ == null) { 3521 ensureStatusDetailsIsMutable(); 3522 statusDetails_.set(index, builderForValue.build()); 3523 onChanged(); 3524 } else { 3525 statusDetailsBuilder_.setMessage(index, builderForValue.build()); 3526 } 3527 return this; 3528 } 3529 /** 3530 * 3531 * 3532 * <pre> 3533 * [Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter. 3534 * </pre> 3535 * 3536 * <code>repeated .google.cloud.compute.v1.AutoscalerStatusDetails status_details = 363353845; 3537 * </code> 3538 */ addStatusDetails(com.google.cloud.compute.v1.AutoscalerStatusDetails value)3539 public Builder addStatusDetails(com.google.cloud.compute.v1.AutoscalerStatusDetails value) { 3540 if (statusDetailsBuilder_ == null) { 3541 if (value == null) { 3542 throw new NullPointerException(); 3543 } 3544 ensureStatusDetailsIsMutable(); 3545 statusDetails_.add(value); 3546 onChanged(); 3547 } else { 3548 statusDetailsBuilder_.addMessage(value); 3549 } 3550 return this; 3551 } 3552 /** 3553 * 3554 * 3555 * <pre> 3556 * [Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter. 3557 * </pre> 3558 * 3559 * <code>repeated .google.cloud.compute.v1.AutoscalerStatusDetails status_details = 363353845; 3560 * </code> 3561 */ addStatusDetails( int index, com.google.cloud.compute.v1.AutoscalerStatusDetails value)3562 public Builder addStatusDetails( 3563 int index, com.google.cloud.compute.v1.AutoscalerStatusDetails value) { 3564 if (statusDetailsBuilder_ == null) { 3565 if (value == null) { 3566 throw new NullPointerException(); 3567 } 3568 ensureStatusDetailsIsMutable(); 3569 statusDetails_.add(index, value); 3570 onChanged(); 3571 } else { 3572 statusDetailsBuilder_.addMessage(index, value); 3573 } 3574 return this; 3575 } 3576 /** 3577 * 3578 * 3579 * <pre> 3580 * [Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter. 3581 * </pre> 3582 * 3583 * <code>repeated .google.cloud.compute.v1.AutoscalerStatusDetails status_details = 363353845; 3584 * </code> 3585 */ addStatusDetails( com.google.cloud.compute.v1.AutoscalerStatusDetails.Builder builderForValue)3586 public Builder addStatusDetails( 3587 com.google.cloud.compute.v1.AutoscalerStatusDetails.Builder builderForValue) { 3588 if (statusDetailsBuilder_ == null) { 3589 ensureStatusDetailsIsMutable(); 3590 statusDetails_.add(builderForValue.build()); 3591 onChanged(); 3592 } else { 3593 statusDetailsBuilder_.addMessage(builderForValue.build()); 3594 } 3595 return this; 3596 } 3597 /** 3598 * 3599 * 3600 * <pre> 3601 * [Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter. 3602 * </pre> 3603 * 3604 * <code>repeated .google.cloud.compute.v1.AutoscalerStatusDetails status_details = 363353845; 3605 * </code> 3606 */ addStatusDetails( int index, com.google.cloud.compute.v1.AutoscalerStatusDetails.Builder builderForValue)3607 public Builder addStatusDetails( 3608 int index, com.google.cloud.compute.v1.AutoscalerStatusDetails.Builder builderForValue) { 3609 if (statusDetailsBuilder_ == null) { 3610 ensureStatusDetailsIsMutable(); 3611 statusDetails_.add(index, builderForValue.build()); 3612 onChanged(); 3613 } else { 3614 statusDetailsBuilder_.addMessage(index, builderForValue.build()); 3615 } 3616 return this; 3617 } 3618 /** 3619 * 3620 * 3621 * <pre> 3622 * [Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter. 3623 * </pre> 3624 * 3625 * <code>repeated .google.cloud.compute.v1.AutoscalerStatusDetails status_details = 363353845; 3626 * </code> 3627 */ addAllStatusDetails( java.lang.Iterable<? extends com.google.cloud.compute.v1.AutoscalerStatusDetails> values)3628 public Builder addAllStatusDetails( 3629 java.lang.Iterable<? extends com.google.cloud.compute.v1.AutoscalerStatusDetails> values) { 3630 if (statusDetailsBuilder_ == null) { 3631 ensureStatusDetailsIsMutable(); 3632 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, statusDetails_); 3633 onChanged(); 3634 } else { 3635 statusDetailsBuilder_.addAllMessages(values); 3636 } 3637 return this; 3638 } 3639 /** 3640 * 3641 * 3642 * <pre> 3643 * [Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter. 3644 * </pre> 3645 * 3646 * <code>repeated .google.cloud.compute.v1.AutoscalerStatusDetails status_details = 363353845; 3647 * </code> 3648 */ clearStatusDetails()3649 public Builder clearStatusDetails() { 3650 if (statusDetailsBuilder_ == null) { 3651 statusDetails_ = java.util.Collections.emptyList(); 3652 bitField0_ = (bitField0_ & ~0x00000800); 3653 onChanged(); 3654 } else { 3655 statusDetailsBuilder_.clear(); 3656 } 3657 return this; 3658 } 3659 /** 3660 * 3661 * 3662 * <pre> 3663 * [Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter. 3664 * </pre> 3665 * 3666 * <code>repeated .google.cloud.compute.v1.AutoscalerStatusDetails status_details = 363353845; 3667 * </code> 3668 */ removeStatusDetails(int index)3669 public Builder removeStatusDetails(int index) { 3670 if (statusDetailsBuilder_ == null) { 3671 ensureStatusDetailsIsMutable(); 3672 statusDetails_.remove(index); 3673 onChanged(); 3674 } else { 3675 statusDetailsBuilder_.remove(index); 3676 } 3677 return this; 3678 } 3679 /** 3680 * 3681 * 3682 * <pre> 3683 * [Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter. 3684 * </pre> 3685 * 3686 * <code>repeated .google.cloud.compute.v1.AutoscalerStatusDetails status_details = 363353845; 3687 * </code> 3688 */ getStatusDetailsBuilder( int index)3689 public com.google.cloud.compute.v1.AutoscalerStatusDetails.Builder getStatusDetailsBuilder( 3690 int index) { 3691 return getStatusDetailsFieldBuilder().getBuilder(index); 3692 } 3693 /** 3694 * 3695 * 3696 * <pre> 3697 * [Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter. 3698 * </pre> 3699 * 3700 * <code>repeated .google.cloud.compute.v1.AutoscalerStatusDetails status_details = 363353845; 3701 * </code> 3702 */ getStatusDetailsOrBuilder( int index)3703 public com.google.cloud.compute.v1.AutoscalerStatusDetailsOrBuilder getStatusDetailsOrBuilder( 3704 int index) { 3705 if (statusDetailsBuilder_ == null) { 3706 return statusDetails_.get(index); 3707 } else { 3708 return statusDetailsBuilder_.getMessageOrBuilder(index); 3709 } 3710 } 3711 /** 3712 * 3713 * 3714 * <pre> 3715 * [Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter. 3716 * </pre> 3717 * 3718 * <code>repeated .google.cloud.compute.v1.AutoscalerStatusDetails status_details = 363353845; 3719 * </code> 3720 */ 3721 public java.util.List<? extends com.google.cloud.compute.v1.AutoscalerStatusDetailsOrBuilder> getStatusDetailsOrBuilderList()3722 getStatusDetailsOrBuilderList() { 3723 if (statusDetailsBuilder_ != null) { 3724 return statusDetailsBuilder_.getMessageOrBuilderList(); 3725 } else { 3726 return java.util.Collections.unmodifiableList(statusDetails_); 3727 } 3728 } 3729 /** 3730 * 3731 * 3732 * <pre> 3733 * [Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter. 3734 * </pre> 3735 * 3736 * <code>repeated .google.cloud.compute.v1.AutoscalerStatusDetails status_details = 363353845; 3737 * </code> 3738 */ addStatusDetailsBuilder()3739 public com.google.cloud.compute.v1.AutoscalerStatusDetails.Builder addStatusDetailsBuilder() { 3740 return getStatusDetailsFieldBuilder() 3741 .addBuilder(com.google.cloud.compute.v1.AutoscalerStatusDetails.getDefaultInstance()); 3742 } 3743 /** 3744 * 3745 * 3746 * <pre> 3747 * [Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter. 3748 * </pre> 3749 * 3750 * <code>repeated .google.cloud.compute.v1.AutoscalerStatusDetails status_details = 363353845; 3751 * </code> 3752 */ addStatusDetailsBuilder( int index)3753 public com.google.cloud.compute.v1.AutoscalerStatusDetails.Builder addStatusDetailsBuilder( 3754 int index) { 3755 return getStatusDetailsFieldBuilder() 3756 .addBuilder( 3757 index, com.google.cloud.compute.v1.AutoscalerStatusDetails.getDefaultInstance()); 3758 } 3759 /** 3760 * 3761 * 3762 * <pre> 3763 * [Output Only] Human-readable details about the current state of the autoscaler. Read the documentation for Commonly returned status messages for examples of status messages you might encounter. 3764 * </pre> 3765 * 3766 * <code>repeated .google.cloud.compute.v1.AutoscalerStatusDetails status_details = 363353845; 3767 * </code> 3768 */ 3769 public java.util.List<com.google.cloud.compute.v1.AutoscalerStatusDetails.Builder> getStatusDetailsBuilderList()3770 getStatusDetailsBuilderList() { 3771 return getStatusDetailsFieldBuilder().getBuilderList(); 3772 } 3773 3774 private com.google.protobuf.RepeatedFieldBuilderV3< 3775 com.google.cloud.compute.v1.AutoscalerStatusDetails, 3776 com.google.cloud.compute.v1.AutoscalerStatusDetails.Builder, 3777 com.google.cloud.compute.v1.AutoscalerStatusDetailsOrBuilder> getStatusDetailsFieldBuilder()3778 getStatusDetailsFieldBuilder() { 3779 if (statusDetailsBuilder_ == null) { 3780 statusDetailsBuilder_ = 3781 new com.google.protobuf.RepeatedFieldBuilderV3< 3782 com.google.cloud.compute.v1.AutoscalerStatusDetails, 3783 com.google.cloud.compute.v1.AutoscalerStatusDetails.Builder, 3784 com.google.cloud.compute.v1.AutoscalerStatusDetailsOrBuilder>( 3785 statusDetails_, 3786 ((bitField0_ & 0x00000800) != 0), 3787 getParentForChildren(), 3788 isClean()); 3789 statusDetails_ = null; 3790 } 3791 return statusDetailsBuilder_; 3792 } 3793 3794 private java.lang.Object target_ = ""; 3795 /** 3796 * 3797 * 3798 * <pre> 3799 * URL of the managed instance group that this autoscaler will scale. This field is required when creating an autoscaler. 3800 * </pre> 3801 * 3802 * <code>optional string target = 192835985;</code> 3803 * 3804 * @return Whether the target field is set. 3805 */ hasTarget()3806 public boolean hasTarget() { 3807 return ((bitField0_ & 0x00001000) != 0); 3808 } 3809 /** 3810 * 3811 * 3812 * <pre> 3813 * URL of the managed instance group that this autoscaler will scale. This field is required when creating an autoscaler. 3814 * </pre> 3815 * 3816 * <code>optional string target = 192835985;</code> 3817 * 3818 * @return The target. 3819 */ getTarget()3820 public java.lang.String getTarget() { 3821 java.lang.Object ref = target_; 3822 if (!(ref instanceof java.lang.String)) { 3823 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 3824 java.lang.String s = bs.toStringUtf8(); 3825 target_ = s; 3826 return s; 3827 } else { 3828 return (java.lang.String) ref; 3829 } 3830 } 3831 /** 3832 * 3833 * 3834 * <pre> 3835 * URL of the managed instance group that this autoscaler will scale. This field is required when creating an autoscaler. 3836 * </pre> 3837 * 3838 * <code>optional string target = 192835985;</code> 3839 * 3840 * @return The bytes for target. 3841 */ getTargetBytes()3842 public com.google.protobuf.ByteString getTargetBytes() { 3843 java.lang.Object ref = target_; 3844 if (ref instanceof String) { 3845 com.google.protobuf.ByteString b = 3846 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 3847 target_ = b; 3848 return b; 3849 } else { 3850 return (com.google.protobuf.ByteString) ref; 3851 } 3852 } 3853 /** 3854 * 3855 * 3856 * <pre> 3857 * URL of the managed instance group that this autoscaler will scale. This field is required when creating an autoscaler. 3858 * </pre> 3859 * 3860 * <code>optional string target = 192835985;</code> 3861 * 3862 * @param value The target to set. 3863 * @return This builder for chaining. 3864 */ setTarget(java.lang.String value)3865 public Builder setTarget(java.lang.String value) { 3866 if (value == null) { 3867 throw new NullPointerException(); 3868 } 3869 target_ = value; 3870 bitField0_ |= 0x00001000; 3871 onChanged(); 3872 return this; 3873 } 3874 /** 3875 * 3876 * 3877 * <pre> 3878 * URL of the managed instance group that this autoscaler will scale. This field is required when creating an autoscaler. 3879 * </pre> 3880 * 3881 * <code>optional string target = 192835985;</code> 3882 * 3883 * @return This builder for chaining. 3884 */ clearTarget()3885 public Builder clearTarget() { 3886 target_ = getDefaultInstance().getTarget(); 3887 bitField0_ = (bitField0_ & ~0x00001000); 3888 onChanged(); 3889 return this; 3890 } 3891 /** 3892 * 3893 * 3894 * <pre> 3895 * URL of the managed instance group that this autoscaler will scale. This field is required when creating an autoscaler. 3896 * </pre> 3897 * 3898 * <code>optional string target = 192835985;</code> 3899 * 3900 * @param value The bytes for target to set. 3901 * @return This builder for chaining. 3902 */ setTargetBytes(com.google.protobuf.ByteString value)3903 public Builder setTargetBytes(com.google.protobuf.ByteString value) { 3904 if (value == null) { 3905 throw new NullPointerException(); 3906 } 3907 checkByteStringIsUtf8(value); 3908 target_ = value; 3909 bitField0_ |= 0x00001000; 3910 onChanged(); 3911 return this; 3912 } 3913 3914 private java.lang.Object zone_ = ""; 3915 /** 3916 * 3917 * 3918 * <pre> 3919 * [Output Only] URL of the zone where the instance group resides (for autoscalers living in zonal scope). 3920 * </pre> 3921 * 3922 * <code>optional string zone = 3744684;</code> 3923 * 3924 * @return Whether the zone field is set. 3925 */ hasZone()3926 public boolean hasZone() { 3927 return ((bitField0_ & 0x00002000) != 0); 3928 } 3929 /** 3930 * 3931 * 3932 * <pre> 3933 * [Output Only] URL of the zone where the instance group resides (for autoscalers living in zonal scope). 3934 * </pre> 3935 * 3936 * <code>optional string zone = 3744684;</code> 3937 * 3938 * @return The zone. 3939 */ getZone()3940 public java.lang.String getZone() { 3941 java.lang.Object ref = zone_; 3942 if (!(ref instanceof java.lang.String)) { 3943 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 3944 java.lang.String s = bs.toStringUtf8(); 3945 zone_ = s; 3946 return s; 3947 } else { 3948 return (java.lang.String) ref; 3949 } 3950 } 3951 /** 3952 * 3953 * 3954 * <pre> 3955 * [Output Only] URL of the zone where the instance group resides (for autoscalers living in zonal scope). 3956 * </pre> 3957 * 3958 * <code>optional string zone = 3744684;</code> 3959 * 3960 * @return The bytes for zone. 3961 */ getZoneBytes()3962 public com.google.protobuf.ByteString getZoneBytes() { 3963 java.lang.Object ref = zone_; 3964 if (ref instanceof String) { 3965 com.google.protobuf.ByteString b = 3966 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 3967 zone_ = b; 3968 return b; 3969 } else { 3970 return (com.google.protobuf.ByteString) ref; 3971 } 3972 } 3973 /** 3974 * 3975 * 3976 * <pre> 3977 * [Output Only] URL of the zone where the instance group resides (for autoscalers living in zonal scope). 3978 * </pre> 3979 * 3980 * <code>optional string zone = 3744684;</code> 3981 * 3982 * @param value The zone to set. 3983 * @return This builder for chaining. 3984 */ setZone(java.lang.String value)3985 public Builder setZone(java.lang.String value) { 3986 if (value == null) { 3987 throw new NullPointerException(); 3988 } 3989 zone_ = value; 3990 bitField0_ |= 0x00002000; 3991 onChanged(); 3992 return this; 3993 } 3994 /** 3995 * 3996 * 3997 * <pre> 3998 * [Output Only] URL of the zone where the instance group resides (for autoscalers living in zonal scope). 3999 * </pre> 4000 * 4001 * <code>optional string zone = 3744684;</code> 4002 * 4003 * @return This builder for chaining. 4004 */ clearZone()4005 public Builder clearZone() { 4006 zone_ = getDefaultInstance().getZone(); 4007 bitField0_ = (bitField0_ & ~0x00002000); 4008 onChanged(); 4009 return this; 4010 } 4011 /** 4012 * 4013 * 4014 * <pre> 4015 * [Output Only] URL of the zone where the instance group resides (for autoscalers living in zonal scope). 4016 * </pre> 4017 * 4018 * <code>optional string zone = 3744684;</code> 4019 * 4020 * @param value The bytes for zone to set. 4021 * @return This builder for chaining. 4022 */ setZoneBytes(com.google.protobuf.ByteString value)4023 public Builder setZoneBytes(com.google.protobuf.ByteString value) { 4024 if (value == null) { 4025 throw new NullPointerException(); 4026 } 4027 checkByteStringIsUtf8(value); 4028 zone_ = value; 4029 bitField0_ |= 0x00002000; 4030 onChanged(); 4031 return this; 4032 } 4033 4034 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)4035 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 4036 return super.setUnknownFields(unknownFields); 4037 } 4038 4039 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)4040 public final Builder mergeUnknownFields( 4041 final com.google.protobuf.UnknownFieldSet unknownFields) { 4042 return super.mergeUnknownFields(unknownFields); 4043 } 4044 4045 // @@protoc_insertion_point(builder_scope:google.cloud.compute.v1.Autoscaler) 4046 } 4047 4048 // @@protoc_insertion_point(class_scope:google.cloud.compute.v1.Autoscaler) 4049 private static final com.google.cloud.compute.v1.Autoscaler DEFAULT_INSTANCE; 4050 4051 static { 4052 DEFAULT_INSTANCE = new com.google.cloud.compute.v1.Autoscaler(); 4053 } 4054 getDefaultInstance()4055 public static com.google.cloud.compute.v1.Autoscaler getDefaultInstance() { 4056 return DEFAULT_INSTANCE; 4057 } 4058 4059 private static final com.google.protobuf.Parser<Autoscaler> PARSER = 4060 new com.google.protobuf.AbstractParser<Autoscaler>() { 4061 @java.lang.Override 4062 public Autoscaler parsePartialFrom( 4063 com.google.protobuf.CodedInputStream input, 4064 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 4065 throws com.google.protobuf.InvalidProtocolBufferException { 4066 Builder builder = newBuilder(); 4067 try { 4068 builder.mergeFrom(input, extensionRegistry); 4069 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 4070 throw e.setUnfinishedMessage(builder.buildPartial()); 4071 } catch (com.google.protobuf.UninitializedMessageException e) { 4072 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 4073 } catch (java.io.IOException e) { 4074 throw new com.google.protobuf.InvalidProtocolBufferException(e) 4075 .setUnfinishedMessage(builder.buildPartial()); 4076 } 4077 return builder.buildPartial(); 4078 } 4079 }; 4080 parser()4081 public static com.google.protobuf.Parser<Autoscaler> parser() { 4082 return PARSER; 4083 } 4084 4085 @java.lang.Override getParserForType()4086 public com.google.protobuf.Parser<Autoscaler> getParserForType() { 4087 return PARSER; 4088 } 4089 4090 @java.lang.Override getDefaultInstanceForType()4091 public com.google.cloud.compute.v1.Autoscaler getDefaultInstanceForType() { 4092 return DEFAULT_INSTANCE; 4093 } 4094 } 4095