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