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 * A request message for Instances.Reset. See the method description for details. 26 * </pre> 27 * 28 * Protobuf type {@code google.cloud.compute.v1.ResetInstanceRequest} 29 */ 30 public final class ResetInstanceRequest extends com.google.protobuf.GeneratedMessageV3 31 implements 32 // @@protoc_insertion_point(message_implements:google.cloud.compute.v1.ResetInstanceRequest) 33 ResetInstanceRequestOrBuilder { 34 private static final long serialVersionUID = 0L; 35 // Use ResetInstanceRequest.newBuilder() to construct. ResetInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36 private ResetInstanceRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 37 super(builder); 38 } 39 ResetInstanceRequest()40 private ResetInstanceRequest() { 41 instance_ = ""; 42 project_ = ""; 43 requestId_ = ""; 44 zone_ = ""; 45 } 46 47 @java.lang.Override 48 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)49 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 50 return new ResetInstanceRequest(); 51 } 52 53 @java.lang.Override getUnknownFields()54 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 55 return this.unknownFields; 56 } 57 getDescriptor()58 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 59 return com.google.cloud.compute.v1.Compute 60 .internal_static_google_cloud_compute_v1_ResetInstanceRequest_descriptor; 61 } 62 63 @java.lang.Override 64 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()65 internalGetFieldAccessorTable() { 66 return com.google.cloud.compute.v1.Compute 67 .internal_static_google_cloud_compute_v1_ResetInstanceRequest_fieldAccessorTable 68 .ensureFieldAccessorsInitialized( 69 com.google.cloud.compute.v1.ResetInstanceRequest.class, 70 com.google.cloud.compute.v1.ResetInstanceRequest.Builder.class); 71 } 72 73 private int bitField0_; 74 public static final int INSTANCE_FIELD_NUMBER = 18257045; 75 76 @SuppressWarnings("serial") 77 private volatile java.lang.Object instance_ = ""; 78 /** 79 * 80 * 81 * <pre> 82 * Name of the instance scoping this request. 83 * </pre> 84 * 85 * <code>string instance = 18257045 [(.google.api.field_behavior) = REQUIRED];</code> 86 * 87 * @return The instance. 88 */ 89 @java.lang.Override getInstance()90 public java.lang.String getInstance() { 91 java.lang.Object ref = instance_; 92 if (ref instanceof java.lang.String) { 93 return (java.lang.String) ref; 94 } else { 95 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 96 java.lang.String s = bs.toStringUtf8(); 97 instance_ = s; 98 return s; 99 } 100 } 101 /** 102 * 103 * 104 * <pre> 105 * Name of the instance scoping this request. 106 * </pre> 107 * 108 * <code>string instance = 18257045 [(.google.api.field_behavior) = REQUIRED];</code> 109 * 110 * @return The bytes for instance. 111 */ 112 @java.lang.Override getInstanceBytes()113 public com.google.protobuf.ByteString getInstanceBytes() { 114 java.lang.Object ref = instance_; 115 if (ref instanceof java.lang.String) { 116 com.google.protobuf.ByteString b = 117 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 118 instance_ = b; 119 return b; 120 } else { 121 return (com.google.protobuf.ByteString) ref; 122 } 123 } 124 125 public static final int PROJECT_FIELD_NUMBER = 227560217; 126 127 @SuppressWarnings("serial") 128 private volatile java.lang.Object project_ = ""; 129 /** 130 * 131 * 132 * <pre> 133 * Project ID for this request. 134 * </pre> 135 * 136 * <code> 137 * string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; 138 * </code> 139 * 140 * @return The project. 141 */ 142 @java.lang.Override getProject()143 public java.lang.String getProject() { 144 java.lang.Object ref = project_; 145 if (ref instanceof java.lang.String) { 146 return (java.lang.String) ref; 147 } else { 148 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 149 java.lang.String s = bs.toStringUtf8(); 150 project_ = s; 151 return s; 152 } 153 } 154 /** 155 * 156 * 157 * <pre> 158 * Project ID for this request. 159 * </pre> 160 * 161 * <code> 162 * string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; 163 * </code> 164 * 165 * @return The bytes for project. 166 */ 167 @java.lang.Override getProjectBytes()168 public com.google.protobuf.ByteString getProjectBytes() { 169 java.lang.Object ref = project_; 170 if (ref instanceof java.lang.String) { 171 com.google.protobuf.ByteString b = 172 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 173 project_ = b; 174 return b; 175 } else { 176 return (com.google.protobuf.ByteString) ref; 177 } 178 } 179 180 public static final int REQUEST_ID_FIELD_NUMBER = 37109963; 181 182 @SuppressWarnings("serial") 183 private volatile java.lang.Object requestId_ = ""; 184 /** 185 * 186 * 187 * <pre> 188 * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). 189 * </pre> 190 * 191 * <code>optional string request_id = 37109963;</code> 192 * 193 * @return Whether the requestId field is set. 194 */ 195 @java.lang.Override hasRequestId()196 public boolean hasRequestId() { 197 return ((bitField0_ & 0x00000001) != 0); 198 } 199 /** 200 * 201 * 202 * <pre> 203 * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). 204 * </pre> 205 * 206 * <code>optional string request_id = 37109963;</code> 207 * 208 * @return The requestId. 209 */ 210 @java.lang.Override getRequestId()211 public java.lang.String getRequestId() { 212 java.lang.Object ref = requestId_; 213 if (ref instanceof java.lang.String) { 214 return (java.lang.String) ref; 215 } else { 216 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 217 java.lang.String s = bs.toStringUtf8(); 218 requestId_ = s; 219 return s; 220 } 221 } 222 /** 223 * 224 * 225 * <pre> 226 * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). 227 * </pre> 228 * 229 * <code>optional string request_id = 37109963;</code> 230 * 231 * @return The bytes for requestId. 232 */ 233 @java.lang.Override getRequestIdBytes()234 public com.google.protobuf.ByteString getRequestIdBytes() { 235 java.lang.Object ref = requestId_; 236 if (ref instanceof java.lang.String) { 237 com.google.protobuf.ByteString b = 238 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 239 requestId_ = b; 240 return b; 241 } else { 242 return (com.google.protobuf.ByteString) ref; 243 } 244 } 245 246 public static final int ZONE_FIELD_NUMBER = 3744684; 247 248 @SuppressWarnings("serial") 249 private volatile java.lang.Object zone_ = ""; 250 /** 251 * 252 * 253 * <pre> 254 * The name of the zone for this request. 255 * </pre> 256 * 257 * <code> 258 * string zone = 3744684 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "zone"]; 259 * </code> 260 * 261 * @return The zone. 262 */ 263 @java.lang.Override getZone()264 public java.lang.String getZone() { 265 java.lang.Object ref = zone_; 266 if (ref instanceof java.lang.String) { 267 return (java.lang.String) ref; 268 } else { 269 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 270 java.lang.String s = bs.toStringUtf8(); 271 zone_ = s; 272 return s; 273 } 274 } 275 /** 276 * 277 * 278 * <pre> 279 * The name of the zone for this request. 280 * </pre> 281 * 282 * <code> 283 * string zone = 3744684 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "zone"]; 284 * </code> 285 * 286 * @return The bytes for zone. 287 */ 288 @java.lang.Override getZoneBytes()289 public com.google.protobuf.ByteString getZoneBytes() { 290 java.lang.Object ref = zone_; 291 if (ref instanceof java.lang.String) { 292 com.google.protobuf.ByteString b = 293 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 294 zone_ = b; 295 return b; 296 } else { 297 return (com.google.protobuf.ByteString) ref; 298 } 299 } 300 301 private byte memoizedIsInitialized = -1; 302 303 @java.lang.Override isInitialized()304 public final boolean isInitialized() { 305 byte isInitialized = memoizedIsInitialized; 306 if (isInitialized == 1) return true; 307 if (isInitialized == 0) return false; 308 309 memoizedIsInitialized = 1; 310 return true; 311 } 312 313 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)314 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 315 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(zone_)) { 316 com.google.protobuf.GeneratedMessageV3.writeString(output, 3744684, zone_); 317 } 318 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instance_)) { 319 com.google.protobuf.GeneratedMessageV3.writeString(output, 18257045, instance_); 320 } 321 if (((bitField0_ & 0x00000001) != 0)) { 322 com.google.protobuf.GeneratedMessageV3.writeString(output, 37109963, requestId_); 323 } 324 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { 325 com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); 326 } 327 getUnknownFields().writeTo(output); 328 } 329 330 @java.lang.Override getSerializedSize()331 public int getSerializedSize() { 332 int size = memoizedSize; 333 if (size != -1) return size; 334 335 size = 0; 336 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(zone_)) { 337 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3744684, zone_); 338 } 339 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instance_)) { 340 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(18257045, instance_); 341 } 342 if (((bitField0_ & 0x00000001) != 0)) { 343 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(37109963, requestId_); 344 } 345 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { 346 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); 347 } 348 size += getUnknownFields().getSerializedSize(); 349 memoizedSize = size; 350 return size; 351 } 352 353 @java.lang.Override equals(final java.lang.Object obj)354 public boolean equals(final java.lang.Object obj) { 355 if (obj == this) { 356 return true; 357 } 358 if (!(obj instanceof com.google.cloud.compute.v1.ResetInstanceRequest)) { 359 return super.equals(obj); 360 } 361 com.google.cloud.compute.v1.ResetInstanceRequest other = 362 (com.google.cloud.compute.v1.ResetInstanceRequest) obj; 363 364 if (!getInstance().equals(other.getInstance())) return false; 365 if (!getProject().equals(other.getProject())) return false; 366 if (hasRequestId() != other.hasRequestId()) return false; 367 if (hasRequestId()) { 368 if (!getRequestId().equals(other.getRequestId())) return false; 369 } 370 if (!getZone().equals(other.getZone())) return false; 371 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 372 return true; 373 } 374 375 @java.lang.Override hashCode()376 public int hashCode() { 377 if (memoizedHashCode != 0) { 378 return memoizedHashCode; 379 } 380 int hash = 41; 381 hash = (19 * hash) + getDescriptor().hashCode(); 382 hash = (37 * hash) + INSTANCE_FIELD_NUMBER; 383 hash = (53 * hash) + getInstance().hashCode(); 384 hash = (37 * hash) + PROJECT_FIELD_NUMBER; 385 hash = (53 * hash) + getProject().hashCode(); 386 if (hasRequestId()) { 387 hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; 388 hash = (53 * hash) + getRequestId().hashCode(); 389 } 390 hash = (37 * hash) + ZONE_FIELD_NUMBER; 391 hash = (53 * hash) + getZone().hashCode(); 392 hash = (29 * hash) + getUnknownFields().hashCode(); 393 memoizedHashCode = hash; 394 return hash; 395 } 396 parseFrom(java.nio.ByteBuffer data)397 public static com.google.cloud.compute.v1.ResetInstanceRequest parseFrom(java.nio.ByteBuffer data) 398 throws com.google.protobuf.InvalidProtocolBufferException { 399 return PARSER.parseFrom(data); 400 } 401 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)402 public static com.google.cloud.compute.v1.ResetInstanceRequest parseFrom( 403 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 404 throws com.google.protobuf.InvalidProtocolBufferException { 405 return PARSER.parseFrom(data, extensionRegistry); 406 } 407 parseFrom( com.google.protobuf.ByteString data)408 public static com.google.cloud.compute.v1.ResetInstanceRequest parseFrom( 409 com.google.protobuf.ByteString data) 410 throws com.google.protobuf.InvalidProtocolBufferException { 411 return PARSER.parseFrom(data); 412 } 413 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)414 public static com.google.cloud.compute.v1.ResetInstanceRequest parseFrom( 415 com.google.protobuf.ByteString data, 416 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 417 throws com.google.protobuf.InvalidProtocolBufferException { 418 return PARSER.parseFrom(data, extensionRegistry); 419 } 420 parseFrom(byte[] data)421 public static com.google.cloud.compute.v1.ResetInstanceRequest parseFrom(byte[] data) 422 throws com.google.protobuf.InvalidProtocolBufferException { 423 return PARSER.parseFrom(data); 424 } 425 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)426 public static com.google.cloud.compute.v1.ResetInstanceRequest parseFrom( 427 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 428 throws com.google.protobuf.InvalidProtocolBufferException { 429 return PARSER.parseFrom(data, extensionRegistry); 430 } 431 parseFrom( java.io.InputStream input)432 public static com.google.cloud.compute.v1.ResetInstanceRequest parseFrom( 433 java.io.InputStream input) throws java.io.IOException { 434 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 435 } 436 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)437 public static com.google.cloud.compute.v1.ResetInstanceRequest parseFrom( 438 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 439 throws java.io.IOException { 440 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 441 PARSER, input, extensionRegistry); 442 } 443 parseDelimitedFrom( java.io.InputStream input)444 public static com.google.cloud.compute.v1.ResetInstanceRequest parseDelimitedFrom( 445 java.io.InputStream input) throws java.io.IOException { 446 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 447 } 448 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)449 public static com.google.cloud.compute.v1.ResetInstanceRequest parseDelimitedFrom( 450 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 451 throws java.io.IOException { 452 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 453 PARSER, input, extensionRegistry); 454 } 455 parseFrom( com.google.protobuf.CodedInputStream input)456 public static com.google.cloud.compute.v1.ResetInstanceRequest parseFrom( 457 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 458 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 459 } 460 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)461 public static com.google.cloud.compute.v1.ResetInstanceRequest parseFrom( 462 com.google.protobuf.CodedInputStream input, 463 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 464 throws java.io.IOException { 465 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 466 PARSER, input, extensionRegistry); 467 } 468 469 @java.lang.Override newBuilderForType()470 public Builder newBuilderForType() { 471 return newBuilder(); 472 } 473 newBuilder()474 public static Builder newBuilder() { 475 return DEFAULT_INSTANCE.toBuilder(); 476 } 477 newBuilder(com.google.cloud.compute.v1.ResetInstanceRequest prototype)478 public static Builder newBuilder(com.google.cloud.compute.v1.ResetInstanceRequest prototype) { 479 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 480 } 481 482 @java.lang.Override toBuilder()483 public Builder toBuilder() { 484 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 485 } 486 487 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)488 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 489 Builder builder = new Builder(parent); 490 return builder; 491 } 492 /** 493 * 494 * 495 * <pre> 496 * A request message for Instances.Reset. See the method description for details. 497 * </pre> 498 * 499 * Protobuf type {@code google.cloud.compute.v1.ResetInstanceRequest} 500 */ 501 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 502 implements 503 // @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.ResetInstanceRequest) 504 com.google.cloud.compute.v1.ResetInstanceRequestOrBuilder { getDescriptor()505 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 506 return com.google.cloud.compute.v1.Compute 507 .internal_static_google_cloud_compute_v1_ResetInstanceRequest_descriptor; 508 } 509 510 @java.lang.Override 511 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()512 internalGetFieldAccessorTable() { 513 return com.google.cloud.compute.v1.Compute 514 .internal_static_google_cloud_compute_v1_ResetInstanceRequest_fieldAccessorTable 515 .ensureFieldAccessorsInitialized( 516 com.google.cloud.compute.v1.ResetInstanceRequest.class, 517 com.google.cloud.compute.v1.ResetInstanceRequest.Builder.class); 518 } 519 520 // Construct using com.google.cloud.compute.v1.ResetInstanceRequest.newBuilder() Builder()521 private Builder() {} 522 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)523 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 524 super(parent); 525 } 526 527 @java.lang.Override clear()528 public Builder clear() { 529 super.clear(); 530 bitField0_ = 0; 531 instance_ = ""; 532 project_ = ""; 533 requestId_ = ""; 534 zone_ = ""; 535 return this; 536 } 537 538 @java.lang.Override getDescriptorForType()539 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 540 return com.google.cloud.compute.v1.Compute 541 .internal_static_google_cloud_compute_v1_ResetInstanceRequest_descriptor; 542 } 543 544 @java.lang.Override getDefaultInstanceForType()545 public com.google.cloud.compute.v1.ResetInstanceRequest getDefaultInstanceForType() { 546 return com.google.cloud.compute.v1.ResetInstanceRequest.getDefaultInstance(); 547 } 548 549 @java.lang.Override build()550 public com.google.cloud.compute.v1.ResetInstanceRequest build() { 551 com.google.cloud.compute.v1.ResetInstanceRequest result = buildPartial(); 552 if (!result.isInitialized()) { 553 throw newUninitializedMessageException(result); 554 } 555 return result; 556 } 557 558 @java.lang.Override buildPartial()559 public com.google.cloud.compute.v1.ResetInstanceRequest buildPartial() { 560 com.google.cloud.compute.v1.ResetInstanceRequest result = 561 new com.google.cloud.compute.v1.ResetInstanceRequest(this); 562 if (bitField0_ != 0) { 563 buildPartial0(result); 564 } 565 onBuilt(); 566 return result; 567 } 568 buildPartial0(com.google.cloud.compute.v1.ResetInstanceRequest result)569 private void buildPartial0(com.google.cloud.compute.v1.ResetInstanceRequest result) { 570 int from_bitField0_ = bitField0_; 571 if (((from_bitField0_ & 0x00000001) != 0)) { 572 result.instance_ = instance_; 573 } 574 if (((from_bitField0_ & 0x00000002) != 0)) { 575 result.project_ = project_; 576 } 577 int to_bitField0_ = 0; 578 if (((from_bitField0_ & 0x00000004) != 0)) { 579 result.requestId_ = requestId_; 580 to_bitField0_ |= 0x00000001; 581 } 582 if (((from_bitField0_ & 0x00000008) != 0)) { 583 result.zone_ = zone_; 584 } 585 result.bitField0_ |= to_bitField0_; 586 } 587 588 @java.lang.Override clone()589 public Builder clone() { 590 return super.clone(); 591 } 592 593 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)594 public Builder setField( 595 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 596 return super.setField(field, value); 597 } 598 599 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)600 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 601 return super.clearField(field); 602 } 603 604 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)605 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 606 return super.clearOneof(oneof); 607 } 608 609 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)610 public Builder setRepeatedField( 611 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 612 return super.setRepeatedField(field, index, value); 613 } 614 615 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)616 public Builder addRepeatedField( 617 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 618 return super.addRepeatedField(field, value); 619 } 620 621 @java.lang.Override mergeFrom(com.google.protobuf.Message other)622 public Builder mergeFrom(com.google.protobuf.Message other) { 623 if (other instanceof com.google.cloud.compute.v1.ResetInstanceRequest) { 624 return mergeFrom((com.google.cloud.compute.v1.ResetInstanceRequest) other); 625 } else { 626 super.mergeFrom(other); 627 return this; 628 } 629 } 630 mergeFrom(com.google.cloud.compute.v1.ResetInstanceRequest other)631 public Builder mergeFrom(com.google.cloud.compute.v1.ResetInstanceRequest other) { 632 if (other == com.google.cloud.compute.v1.ResetInstanceRequest.getDefaultInstance()) 633 return this; 634 if (!other.getInstance().isEmpty()) { 635 instance_ = other.instance_; 636 bitField0_ |= 0x00000001; 637 onChanged(); 638 } 639 if (!other.getProject().isEmpty()) { 640 project_ = other.project_; 641 bitField0_ |= 0x00000002; 642 onChanged(); 643 } 644 if (other.hasRequestId()) { 645 requestId_ = other.requestId_; 646 bitField0_ |= 0x00000004; 647 onChanged(); 648 } 649 if (!other.getZone().isEmpty()) { 650 zone_ = other.zone_; 651 bitField0_ |= 0x00000008; 652 onChanged(); 653 } 654 this.mergeUnknownFields(other.getUnknownFields()); 655 onChanged(); 656 return this; 657 } 658 659 @java.lang.Override isInitialized()660 public final boolean isInitialized() { 661 return true; 662 } 663 664 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)665 public Builder mergeFrom( 666 com.google.protobuf.CodedInputStream input, 667 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 668 throws java.io.IOException { 669 if (extensionRegistry == null) { 670 throw new java.lang.NullPointerException(); 671 } 672 try { 673 boolean done = false; 674 while (!done) { 675 int tag = input.readTag(); 676 switch (tag) { 677 case 0: 678 done = true; 679 break; 680 case 29957474: 681 { 682 zone_ = input.readStringRequireUtf8(); 683 bitField0_ |= 0x00000008; 684 break; 685 } // case 29957474 686 case 146056362: 687 { 688 instance_ = input.readStringRequireUtf8(); 689 bitField0_ |= 0x00000001; 690 break; 691 } // case 146056362 692 case 296879706: 693 { 694 requestId_ = input.readStringRequireUtf8(); 695 bitField0_ |= 0x00000004; 696 break; 697 } // case 296879706 698 case 1820481738: 699 { 700 project_ = input.readStringRequireUtf8(); 701 bitField0_ |= 0x00000002; 702 break; 703 } // case 1820481738 704 default: 705 { 706 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 707 done = true; // was an endgroup tag 708 } 709 break; 710 } // default: 711 } // switch (tag) 712 } // while (!done) 713 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 714 throw e.unwrapIOException(); 715 } finally { 716 onChanged(); 717 } // finally 718 return this; 719 } 720 721 private int bitField0_; 722 723 private java.lang.Object instance_ = ""; 724 /** 725 * 726 * 727 * <pre> 728 * Name of the instance scoping this request. 729 * </pre> 730 * 731 * <code>string instance = 18257045 [(.google.api.field_behavior) = REQUIRED];</code> 732 * 733 * @return The instance. 734 */ getInstance()735 public java.lang.String getInstance() { 736 java.lang.Object ref = instance_; 737 if (!(ref instanceof java.lang.String)) { 738 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 739 java.lang.String s = bs.toStringUtf8(); 740 instance_ = s; 741 return s; 742 } else { 743 return (java.lang.String) ref; 744 } 745 } 746 /** 747 * 748 * 749 * <pre> 750 * Name of the instance scoping this request. 751 * </pre> 752 * 753 * <code>string instance = 18257045 [(.google.api.field_behavior) = REQUIRED];</code> 754 * 755 * @return The bytes for instance. 756 */ getInstanceBytes()757 public com.google.protobuf.ByteString getInstanceBytes() { 758 java.lang.Object ref = instance_; 759 if (ref instanceof String) { 760 com.google.protobuf.ByteString b = 761 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 762 instance_ = b; 763 return b; 764 } else { 765 return (com.google.protobuf.ByteString) ref; 766 } 767 } 768 /** 769 * 770 * 771 * <pre> 772 * Name of the instance scoping this request. 773 * </pre> 774 * 775 * <code>string instance = 18257045 [(.google.api.field_behavior) = REQUIRED];</code> 776 * 777 * @param value The instance to set. 778 * @return This builder for chaining. 779 */ setInstance(java.lang.String value)780 public Builder setInstance(java.lang.String value) { 781 if (value == null) { 782 throw new NullPointerException(); 783 } 784 instance_ = value; 785 bitField0_ |= 0x00000001; 786 onChanged(); 787 return this; 788 } 789 /** 790 * 791 * 792 * <pre> 793 * Name of the instance scoping this request. 794 * </pre> 795 * 796 * <code>string instance = 18257045 [(.google.api.field_behavior) = REQUIRED];</code> 797 * 798 * @return This builder for chaining. 799 */ clearInstance()800 public Builder clearInstance() { 801 instance_ = getDefaultInstance().getInstance(); 802 bitField0_ = (bitField0_ & ~0x00000001); 803 onChanged(); 804 return this; 805 } 806 /** 807 * 808 * 809 * <pre> 810 * Name of the instance scoping this request. 811 * </pre> 812 * 813 * <code>string instance = 18257045 [(.google.api.field_behavior) = REQUIRED];</code> 814 * 815 * @param value The bytes for instance to set. 816 * @return This builder for chaining. 817 */ setInstanceBytes(com.google.protobuf.ByteString value)818 public Builder setInstanceBytes(com.google.protobuf.ByteString value) { 819 if (value == null) { 820 throw new NullPointerException(); 821 } 822 checkByteStringIsUtf8(value); 823 instance_ = value; 824 bitField0_ |= 0x00000001; 825 onChanged(); 826 return this; 827 } 828 829 private java.lang.Object project_ = ""; 830 /** 831 * 832 * 833 * <pre> 834 * Project ID for this request. 835 * </pre> 836 * 837 * <code> 838 * string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; 839 * </code> 840 * 841 * @return The project. 842 */ getProject()843 public java.lang.String getProject() { 844 java.lang.Object ref = project_; 845 if (!(ref instanceof java.lang.String)) { 846 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 847 java.lang.String s = bs.toStringUtf8(); 848 project_ = s; 849 return s; 850 } else { 851 return (java.lang.String) ref; 852 } 853 } 854 /** 855 * 856 * 857 * <pre> 858 * Project ID for this request. 859 * </pre> 860 * 861 * <code> 862 * string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; 863 * </code> 864 * 865 * @return The bytes for project. 866 */ getProjectBytes()867 public com.google.protobuf.ByteString getProjectBytes() { 868 java.lang.Object ref = project_; 869 if (ref instanceof String) { 870 com.google.protobuf.ByteString b = 871 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 872 project_ = b; 873 return b; 874 } else { 875 return (com.google.protobuf.ByteString) ref; 876 } 877 } 878 /** 879 * 880 * 881 * <pre> 882 * Project ID for this request. 883 * </pre> 884 * 885 * <code> 886 * string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; 887 * </code> 888 * 889 * @param value The project to set. 890 * @return This builder for chaining. 891 */ setProject(java.lang.String value)892 public Builder setProject(java.lang.String value) { 893 if (value == null) { 894 throw new NullPointerException(); 895 } 896 project_ = value; 897 bitField0_ |= 0x00000002; 898 onChanged(); 899 return this; 900 } 901 /** 902 * 903 * 904 * <pre> 905 * Project ID for this request. 906 * </pre> 907 * 908 * <code> 909 * string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; 910 * </code> 911 * 912 * @return This builder for chaining. 913 */ clearProject()914 public Builder clearProject() { 915 project_ = getDefaultInstance().getProject(); 916 bitField0_ = (bitField0_ & ~0x00000002); 917 onChanged(); 918 return this; 919 } 920 /** 921 * 922 * 923 * <pre> 924 * Project ID for this request. 925 * </pre> 926 * 927 * <code> 928 * string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; 929 * </code> 930 * 931 * @param value The bytes for project to set. 932 * @return This builder for chaining. 933 */ setProjectBytes(com.google.protobuf.ByteString value)934 public Builder setProjectBytes(com.google.protobuf.ByteString value) { 935 if (value == null) { 936 throw new NullPointerException(); 937 } 938 checkByteStringIsUtf8(value); 939 project_ = value; 940 bitField0_ |= 0x00000002; 941 onChanged(); 942 return this; 943 } 944 945 private java.lang.Object requestId_ = ""; 946 /** 947 * 948 * 949 * <pre> 950 * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). 951 * </pre> 952 * 953 * <code>optional string request_id = 37109963;</code> 954 * 955 * @return Whether the requestId field is set. 956 */ hasRequestId()957 public boolean hasRequestId() { 958 return ((bitField0_ & 0x00000004) != 0); 959 } 960 /** 961 * 962 * 963 * <pre> 964 * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). 965 * </pre> 966 * 967 * <code>optional string request_id = 37109963;</code> 968 * 969 * @return The requestId. 970 */ getRequestId()971 public java.lang.String getRequestId() { 972 java.lang.Object ref = requestId_; 973 if (!(ref instanceof java.lang.String)) { 974 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 975 java.lang.String s = bs.toStringUtf8(); 976 requestId_ = s; 977 return s; 978 } else { 979 return (java.lang.String) ref; 980 } 981 } 982 /** 983 * 984 * 985 * <pre> 986 * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). 987 * </pre> 988 * 989 * <code>optional string request_id = 37109963;</code> 990 * 991 * @return The bytes for requestId. 992 */ getRequestIdBytes()993 public com.google.protobuf.ByteString getRequestIdBytes() { 994 java.lang.Object ref = requestId_; 995 if (ref instanceof String) { 996 com.google.protobuf.ByteString b = 997 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 998 requestId_ = b; 999 return b; 1000 } else { 1001 return (com.google.protobuf.ByteString) ref; 1002 } 1003 } 1004 /** 1005 * 1006 * 1007 * <pre> 1008 * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). 1009 * </pre> 1010 * 1011 * <code>optional string request_id = 37109963;</code> 1012 * 1013 * @param value The requestId to set. 1014 * @return This builder for chaining. 1015 */ setRequestId(java.lang.String value)1016 public Builder setRequestId(java.lang.String value) { 1017 if (value == null) { 1018 throw new NullPointerException(); 1019 } 1020 requestId_ = value; 1021 bitField0_ |= 0x00000004; 1022 onChanged(); 1023 return this; 1024 } 1025 /** 1026 * 1027 * 1028 * <pre> 1029 * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). 1030 * </pre> 1031 * 1032 * <code>optional string request_id = 37109963;</code> 1033 * 1034 * @return This builder for chaining. 1035 */ clearRequestId()1036 public Builder clearRequestId() { 1037 requestId_ = getDefaultInstance().getRequestId(); 1038 bitField0_ = (bitField0_ & ~0x00000004); 1039 onChanged(); 1040 return this; 1041 } 1042 /** 1043 * 1044 * 1045 * <pre> 1046 * An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported ( 00000000-0000-0000-0000-000000000000). 1047 * </pre> 1048 * 1049 * <code>optional string request_id = 37109963;</code> 1050 * 1051 * @param value The bytes for requestId to set. 1052 * @return This builder for chaining. 1053 */ setRequestIdBytes(com.google.protobuf.ByteString value)1054 public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { 1055 if (value == null) { 1056 throw new NullPointerException(); 1057 } 1058 checkByteStringIsUtf8(value); 1059 requestId_ = value; 1060 bitField0_ |= 0x00000004; 1061 onChanged(); 1062 return this; 1063 } 1064 1065 private java.lang.Object zone_ = ""; 1066 /** 1067 * 1068 * 1069 * <pre> 1070 * The name of the zone for this request. 1071 * </pre> 1072 * 1073 * <code> 1074 * string zone = 3744684 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "zone"]; 1075 * </code> 1076 * 1077 * @return The zone. 1078 */ getZone()1079 public java.lang.String getZone() { 1080 java.lang.Object ref = zone_; 1081 if (!(ref instanceof java.lang.String)) { 1082 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1083 java.lang.String s = bs.toStringUtf8(); 1084 zone_ = s; 1085 return s; 1086 } else { 1087 return (java.lang.String) ref; 1088 } 1089 } 1090 /** 1091 * 1092 * 1093 * <pre> 1094 * The name of the zone for this request. 1095 * </pre> 1096 * 1097 * <code> 1098 * string zone = 3744684 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "zone"]; 1099 * </code> 1100 * 1101 * @return The bytes for zone. 1102 */ getZoneBytes()1103 public com.google.protobuf.ByteString getZoneBytes() { 1104 java.lang.Object ref = zone_; 1105 if (ref instanceof String) { 1106 com.google.protobuf.ByteString b = 1107 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1108 zone_ = b; 1109 return b; 1110 } else { 1111 return (com.google.protobuf.ByteString) ref; 1112 } 1113 } 1114 /** 1115 * 1116 * 1117 * <pre> 1118 * The name of the zone for this request. 1119 * </pre> 1120 * 1121 * <code> 1122 * string zone = 3744684 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "zone"]; 1123 * </code> 1124 * 1125 * @param value The zone to set. 1126 * @return This builder for chaining. 1127 */ setZone(java.lang.String value)1128 public Builder setZone(java.lang.String value) { 1129 if (value == null) { 1130 throw new NullPointerException(); 1131 } 1132 zone_ = value; 1133 bitField0_ |= 0x00000008; 1134 onChanged(); 1135 return this; 1136 } 1137 /** 1138 * 1139 * 1140 * <pre> 1141 * The name of the zone for this request. 1142 * </pre> 1143 * 1144 * <code> 1145 * string zone = 3744684 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "zone"]; 1146 * </code> 1147 * 1148 * @return This builder for chaining. 1149 */ clearZone()1150 public Builder clearZone() { 1151 zone_ = getDefaultInstance().getZone(); 1152 bitField0_ = (bitField0_ & ~0x00000008); 1153 onChanged(); 1154 return this; 1155 } 1156 /** 1157 * 1158 * 1159 * <pre> 1160 * The name of the zone for this request. 1161 * </pre> 1162 * 1163 * <code> 1164 * string zone = 3744684 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "zone"]; 1165 * </code> 1166 * 1167 * @param value The bytes for zone to set. 1168 * @return This builder for chaining. 1169 */ setZoneBytes(com.google.protobuf.ByteString value)1170 public Builder setZoneBytes(com.google.protobuf.ByteString value) { 1171 if (value == null) { 1172 throw new NullPointerException(); 1173 } 1174 checkByteStringIsUtf8(value); 1175 zone_ = value; 1176 bitField0_ |= 0x00000008; 1177 onChanged(); 1178 return this; 1179 } 1180 1181 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1182 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 1183 return super.setUnknownFields(unknownFields); 1184 } 1185 1186 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1187 public final Builder mergeUnknownFields( 1188 final com.google.protobuf.UnknownFieldSet unknownFields) { 1189 return super.mergeUnknownFields(unknownFields); 1190 } 1191 1192 // @@protoc_insertion_point(builder_scope:google.cloud.compute.v1.ResetInstanceRequest) 1193 } 1194 1195 // @@protoc_insertion_point(class_scope:google.cloud.compute.v1.ResetInstanceRequest) 1196 private static final com.google.cloud.compute.v1.ResetInstanceRequest DEFAULT_INSTANCE; 1197 1198 static { 1199 DEFAULT_INSTANCE = new com.google.cloud.compute.v1.ResetInstanceRequest(); 1200 } 1201 getDefaultInstance()1202 public static com.google.cloud.compute.v1.ResetInstanceRequest getDefaultInstance() { 1203 return DEFAULT_INSTANCE; 1204 } 1205 1206 private static final com.google.protobuf.Parser<ResetInstanceRequest> PARSER = 1207 new com.google.protobuf.AbstractParser<ResetInstanceRequest>() { 1208 @java.lang.Override 1209 public ResetInstanceRequest parsePartialFrom( 1210 com.google.protobuf.CodedInputStream input, 1211 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1212 throws com.google.protobuf.InvalidProtocolBufferException { 1213 Builder builder = newBuilder(); 1214 try { 1215 builder.mergeFrom(input, extensionRegistry); 1216 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1217 throw e.setUnfinishedMessage(builder.buildPartial()); 1218 } catch (com.google.protobuf.UninitializedMessageException e) { 1219 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 1220 } catch (java.io.IOException e) { 1221 throw new com.google.protobuf.InvalidProtocolBufferException(e) 1222 .setUnfinishedMessage(builder.buildPartial()); 1223 } 1224 return builder.buildPartial(); 1225 } 1226 }; 1227 parser()1228 public static com.google.protobuf.Parser<ResetInstanceRequest> parser() { 1229 return PARSER; 1230 } 1231 1232 @java.lang.Override getParserForType()1233 public com.google.protobuf.Parser<ResetInstanceRequest> getParserForType() { 1234 return PARSER; 1235 } 1236 1237 @java.lang.Override getDefaultInstanceForType()1238 public com.google.cloud.compute.v1.ResetInstanceRequest getDefaultInstanceForType() { 1239 return DEFAULT_INSTANCE; 1240 } 1241 } 1242