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 Subnetworks.Patch. See the method description for details. 26 * </pre> 27 * 28 * Protobuf type {@code google.cloud.compute.v1.PatchSubnetworkRequest} 29 */ 30 public final class PatchSubnetworkRequest extends com.google.protobuf.GeneratedMessageV3 31 implements 32 // @@protoc_insertion_point(message_implements:google.cloud.compute.v1.PatchSubnetworkRequest) 33 PatchSubnetworkRequestOrBuilder { 34 private static final long serialVersionUID = 0L; 35 // Use PatchSubnetworkRequest.newBuilder() to construct. PatchSubnetworkRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36 private PatchSubnetworkRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 37 super(builder); 38 } 39 PatchSubnetworkRequest()40 private PatchSubnetworkRequest() { 41 project_ = ""; 42 region_ = ""; 43 requestId_ = ""; 44 subnetwork_ = ""; 45 } 46 47 @java.lang.Override 48 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)49 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 50 return new PatchSubnetworkRequest(); 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_PatchSubnetworkRequest_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_PatchSubnetworkRequest_fieldAccessorTable 68 .ensureFieldAccessorsInitialized( 69 com.google.cloud.compute.v1.PatchSubnetworkRequest.class, 70 com.google.cloud.compute.v1.PatchSubnetworkRequest.Builder.class); 71 } 72 73 private int bitField0_; 74 public static final int DRAIN_TIMEOUT_SECONDS_FIELD_NUMBER = 357707098; 75 private int drainTimeoutSeconds_ = 0; 76 /** 77 * 78 * 79 * <pre> 80 * The drain timeout specifies the upper bound in seconds on the amount of time allowed to drain connections from the current ACTIVE subnetwork to the current BACKUP subnetwork. The drain timeout is only applicable when the following conditions are true: - the subnetwork being patched has purpose = INTERNAL_HTTPS_LOAD_BALANCER - the subnetwork being patched has role = BACKUP - the patch request is setting the role to ACTIVE. Note that after this patch operation the roles of the ACTIVE and BACKUP subnetworks will be swapped. 81 * </pre> 82 * 83 * <code>optional int32 drain_timeout_seconds = 357707098;</code> 84 * 85 * @return Whether the drainTimeoutSeconds field is set. 86 */ 87 @java.lang.Override hasDrainTimeoutSeconds()88 public boolean hasDrainTimeoutSeconds() { 89 return ((bitField0_ & 0x00000001) != 0); 90 } 91 /** 92 * 93 * 94 * <pre> 95 * The drain timeout specifies the upper bound in seconds on the amount of time allowed to drain connections from the current ACTIVE subnetwork to the current BACKUP subnetwork. The drain timeout is only applicable when the following conditions are true: - the subnetwork being patched has purpose = INTERNAL_HTTPS_LOAD_BALANCER - the subnetwork being patched has role = BACKUP - the patch request is setting the role to ACTIVE. Note that after this patch operation the roles of the ACTIVE and BACKUP subnetworks will be swapped. 96 * </pre> 97 * 98 * <code>optional int32 drain_timeout_seconds = 357707098;</code> 99 * 100 * @return The drainTimeoutSeconds. 101 */ 102 @java.lang.Override getDrainTimeoutSeconds()103 public int getDrainTimeoutSeconds() { 104 return drainTimeoutSeconds_; 105 } 106 107 public static final int PROJECT_FIELD_NUMBER = 227560217; 108 109 @SuppressWarnings("serial") 110 private volatile java.lang.Object project_ = ""; 111 /** 112 * 113 * 114 * <pre> 115 * Project ID for this request. 116 * </pre> 117 * 118 * <code> 119 * string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; 120 * </code> 121 * 122 * @return The project. 123 */ 124 @java.lang.Override getProject()125 public java.lang.String getProject() { 126 java.lang.Object ref = project_; 127 if (ref instanceof java.lang.String) { 128 return (java.lang.String) ref; 129 } else { 130 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 131 java.lang.String s = bs.toStringUtf8(); 132 project_ = s; 133 return s; 134 } 135 } 136 /** 137 * 138 * 139 * <pre> 140 * Project ID for this request. 141 * </pre> 142 * 143 * <code> 144 * string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; 145 * </code> 146 * 147 * @return The bytes for project. 148 */ 149 @java.lang.Override getProjectBytes()150 public com.google.protobuf.ByteString getProjectBytes() { 151 java.lang.Object ref = project_; 152 if (ref instanceof java.lang.String) { 153 com.google.protobuf.ByteString b = 154 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 155 project_ = b; 156 return b; 157 } else { 158 return (com.google.protobuf.ByteString) ref; 159 } 160 } 161 162 public static final int REGION_FIELD_NUMBER = 138946292; 163 164 @SuppressWarnings("serial") 165 private volatile java.lang.Object region_ = ""; 166 /** 167 * 168 * 169 * <pre> 170 * Name of the region scoping this request. 171 * </pre> 172 * 173 * <code> 174 * string region = 138946292 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "region"]; 175 * </code> 176 * 177 * @return The region. 178 */ 179 @java.lang.Override getRegion()180 public java.lang.String getRegion() { 181 java.lang.Object ref = region_; 182 if (ref instanceof java.lang.String) { 183 return (java.lang.String) ref; 184 } else { 185 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 186 java.lang.String s = bs.toStringUtf8(); 187 region_ = s; 188 return s; 189 } 190 } 191 /** 192 * 193 * 194 * <pre> 195 * Name of the region scoping this request. 196 * </pre> 197 * 198 * <code> 199 * string region = 138946292 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "region"]; 200 * </code> 201 * 202 * @return The bytes for region. 203 */ 204 @java.lang.Override getRegionBytes()205 public com.google.protobuf.ByteString getRegionBytes() { 206 java.lang.Object ref = region_; 207 if (ref instanceof java.lang.String) { 208 com.google.protobuf.ByteString b = 209 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 210 region_ = b; 211 return b; 212 } else { 213 return (com.google.protobuf.ByteString) ref; 214 } 215 } 216 217 public static final int REQUEST_ID_FIELD_NUMBER = 37109963; 218 219 @SuppressWarnings("serial") 220 private volatile java.lang.Object requestId_ = ""; 221 /** 222 * 223 * 224 * <pre> 225 * 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). 226 * </pre> 227 * 228 * <code>optional string request_id = 37109963;</code> 229 * 230 * @return Whether the requestId field is set. 231 */ 232 @java.lang.Override hasRequestId()233 public boolean hasRequestId() { 234 return ((bitField0_ & 0x00000002) != 0); 235 } 236 /** 237 * 238 * 239 * <pre> 240 * 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). 241 * </pre> 242 * 243 * <code>optional string request_id = 37109963;</code> 244 * 245 * @return The requestId. 246 */ 247 @java.lang.Override getRequestId()248 public java.lang.String getRequestId() { 249 java.lang.Object ref = requestId_; 250 if (ref instanceof java.lang.String) { 251 return (java.lang.String) ref; 252 } else { 253 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 254 java.lang.String s = bs.toStringUtf8(); 255 requestId_ = s; 256 return s; 257 } 258 } 259 /** 260 * 261 * 262 * <pre> 263 * 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). 264 * </pre> 265 * 266 * <code>optional string request_id = 37109963;</code> 267 * 268 * @return The bytes for requestId. 269 */ 270 @java.lang.Override getRequestIdBytes()271 public com.google.protobuf.ByteString getRequestIdBytes() { 272 java.lang.Object ref = requestId_; 273 if (ref instanceof java.lang.String) { 274 com.google.protobuf.ByteString b = 275 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 276 requestId_ = b; 277 return b; 278 } else { 279 return (com.google.protobuf.ByteString) ref; 280 } 281 } 282 283 public static final int SUBNETWORK_FIELD_NUMBER = 307827694; 284 285 @SuppressWarnings("serial") 286 private volatile java.lang.Object subnetwork_ = ""; 287 /** 288 * 289 * 290 * <pre> 291 * Name of the Subnetwork resource to patch. 292 * </pre> 293 * 294 * <code>string subnetwork = 307827694 [(.google.api.field_behavior) = REQUIRED];</code> 295 * 296 * @return The subnetwork. 297 */ 298 @java.lang.Override getSubnetwork()299 public java.lang.String getSubnetwork() { 300 java.lang.Object ref = subnetwork_; 301 if (ref instanceof java.lang.String) { 302 return (java.lang.String) ref; 303 } else { 304 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 305 java.lang.String s = bs.toStringUtf8(); 306 subnetwork_ = s; 307 return s; 308 } 309 } 310 /** 311 * 312 * 313 * <pre> 314 * Name of the Subnetwork resource to patch. 315 * </pre> 316 * 317 * <code>string subnetwork = 307827694 [(.google.api.field_behavior) = REQUIRED];</code> 318 * 319 * @return The bytes for subnetwork. 320 */ 321 @java.lang.Override getSubnetworkBytes()322 public com.google.protobuf.ByteString getSubnetworkBytes() { 323 java.lang.Object ref = subnetwork_; 324 if (ref instanceof java.lang.String) { 325 com.google.protobuf.ByteString b = 326 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 327 subnetwork_ = b; 328 return b; 329 } else { 330 return (com.google.protobuf.ByteString) ref; 331 } 332 } 333 334 public static final int SUBNETWORK_RESOURCE_FIELD_NUMBER = 42233151; 335 private com.google.cloud.compute.v1.Subnetwork subnetworkResource_; 336 /** 337 * 338 * 339 * <pre> 340 * The body resource for this request 341 * </pre> 342 * 343 * <code> 344 * .google.cloud.compute.v1.Subnetwork subnetwork_resource = 42233151 [(.google.api.field_behavior) = REQUIRED]; 345 * </code> 346 * 347 * @return Whether the subnetworkResource field is set. 348 */ 349 @java.lang.Override hasSubnetworkResource()350 public boolean hasSubnetworkResource() { 351 return subnetworkResource_ != null; 352 } 353 /** 354 * 355 * 356 * <pre> 357 * The body resource for this request 358 * </pre> 359 * 360 * <code> 361 * .google.cloud.compute.v1.Subnetwork subnetwork_resource = 42233151 [(.google.api.field_behavior) = REQUIRED]; 362 * </code> 363 * 364 * @return The subnetworkResource. 365 */ 366 @java.lang.Override getSubnetworkResource()367 public com.google.cloud.compute.v1.Subnetwork getSubnetworkResource() { 368 return subnetworkResource_ == null 369 ? com.google.cloud.compute.v1.Subnetwork.getDefaultInstance() 370 : subnetworkResource_; 371 } 372 /** 373 * 374 * 375 * <pre> 376 * The body resource for this request 377 * </pre> 378 * 379 * <code> 380 * .google.cloud.compute.v1.Subnetwork subnetwork_resource = 42233151 [(.google.api.field_behavior) = REQUIRED]; 381 * </code> 382 */ 383 @java.lang.Override getSubnetworkResourceOrBuilder()384 public com.google.cloud.compute.v1.SubnetworkOrBuilder getSubnetworkResourceOrBuilder() { 385 return subnetworkResource_ == null 386 ? com.google.cloud.compute.v1.Subnetwork.getDefaultInstance() 387 : subnetworkResource_; 388 } 389 390 private byte memoizedIsInitialized = -1; 391 392 @java.lang.Override isInitialized()393 public final boolean isInitialized() { 394 byte isInitialized = memoizedIsInitialized; 395 if (isInitialized == 1) return true; 396 if (isInitialized == 0) return false; 397 398 memoizedIsInitialized = 1; 399 return true; 400 } 401 402 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)403 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 404 if (((bitField0_ & 0x00000002) != 0)) { 405 com.google.protobuf.GeneratedMessageV3.writeString(output, 37109963, requestId_); 406 } 407 if (subnetworkResource_ != null) { 408 output.writeMessage(42233151, getSubnetworkResource()); 409 } 410 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) { 411 com.google.protobuf.GeneratedMessageV3.writeString(output, 138946292, region_); 412 } 413 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { 414 com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); 415 } 416 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subnetwork_)) { 417 com.google.protobuf.GeneratedMessageV3.writeString(output, 307827694, subnetwork_); 418 } 419 if (((bitField0_ & 0x00000001) != 0)) { 420 output.writeInt32(357707098, drainTimeoutSeconds_); 421 } 422 getUnknownFields().writeTo(output); 423 } 424 425 @java.lang.Override getSerializedSize()426 public int getSerializedSize() { 427 int size = memoizedSize; 428 if (size != -1) return size; 429 430 size = 0; 431 if (((bitField0_ & 0x00000002) != 0)) { 432 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(37109963, requestId_); 433 } 434 if (subnetworkResource_ != null) { 435 size += 436 com.google.protobuf.CodedOutputStream.computeMessageSize( 437 42233151, getSubnetworkResource()); 438 } 439 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(region_)) { 440 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(138946292, region_); 441 } 442 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { 443 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); 444 } 445 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subnetwork_)) { 446 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(307827694, subnetwork_); 447 } 448 if (((bitField0_ & 0x00000001) != 0)) { 449 size += 450 com.google.protobuf.CodedOutputStream.computeInt32Size(357707098, drainTimeoutSeconds_); 451 } 452 size += getUnknownFields().getSerializedSize(); 453 memoizedSize = size; 454 return size; 455 } 456 457 @java.lang.Override equals(final java.lang.Object obj)458 public boolean equals(final java.lang.Object obj) { 459 if (obj == this) { 460 return true; 461 } 462 if (!(obj instanceof com.google.cloud.compute.v1.PatchSubnetworkRequest)) { 463 return super.equals(obj); 464 } 465 com.google.cloud.compute.v1.PatchSubnetworkRequest other = 466 (com.google.cloud.compute.v1.PatchSubnetworkRequest) obj; 467 468 if (hasDrainTimeoutSeconds() != other.hasDrainTimeoutSeconds()) return false; 469 if (hasDrainTimeoutSeconds()) { 470 if (getDrainTimeoutSeconds() != other.getDrainTimeoutSeconds()) return false; 471 } 472 if (!getProject().equals(other.getProject())) return false; 473 if (!getRegion().equals(other.getRegion())) return false; 474 if (hasRequestId() != other.hasRequestId()) return false; 475 if (hasRequestId()) { 476 if (!getRequestId().equals(other.getRequestId())) return false; 477 } 478 if (!getSubnetwork().equals(other.getSubnetwork())) return false; 479 if (hasSubnetworkResource() != other.hasSubnetworkResource()) return false; 480 if (hasSubnetworkResource()) { 481 if (!getSubnetworkResource().equals(other.getSubnetworkResource())) return false; 482 } 483 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 484 return true; 485 } 486 487 @java.lang.Override hashCode()488 public int hashCode() { 489 if (memoizedHashCode != 0) { 490 return memoizedHashCode; 491 } 492 int hash = 41; 493 hash = (19 * hash) + getDescriptor().hashCode(); 494 if (hasDrainTimeoutSeconds()) { 495 hash = (37 * hash) + DRAIN_TIMEOUT_SECONDS_FIELD_NUMBER; 496 hash = (53 * hash) + getDrainTimeoutSeconds(); 497 } 498 hash = (37 * hash) + PROJECT_FIELD_NUMBER; 499 hash = (53 * hash) + getProject().hashCode(); 500 hash = (37 * hash) + REGION_FIELD_NUMBER; 501 hash = (53 * hash) + getRegion().hashCode(); 502 if (hasRequestId()) { 503 hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; 504 hash = (53 * hash) + getRequestId().hashCode(); 505 } 506 hash = (37 * hash) + SUBNETWORK_FIELD_NUMBER; 507 hash = (53 * hash) + getSubnetwork().hashCode(); 508 if (hasSubnetworkResource()) { 509 hash = (37 * hash) + SUBNETWORK_RESOURCE_FIELD_NUMBER; 510 hash = (53 * hash) + getSubnetworkResource().hashCode(); 511 } 512 hash = (29 * hash) + getUnknownFields().hashCode(); 513 memoizedHashCode = hash; 514 return hash; 515 } 516 parseFrom( java.nio.ByteBuffer data)517 public static com.google.cloud.compute.v1.PatchSubnetworkRequest parseFrom( 518 java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { 519 return PARSER.parseFrom(data); 520 } 521 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)522 public static com.google.cloud.compute.v1.PatchSubnetworkRequest parseFrom( 523 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 524 throws com.google.protobuf.InvalidProtocolBufferException { 525 return PARSER.parseFrom(data, extensionRegistry); 526 } 527 parseFrom( com.google.protobuf.ByteString data)528 public static com.google.cloud.compute.v1.PatchSubnetworkRequest parseFrom( 529 com.google.protobuf.ByteString data) 530 throws com.google.protobuf.InvalidProtocolBufferException { 531 return PARSER.parseFrom(data); 532 } 533 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)534 public static com.google.cloud.compute.v1.PatchSubnetworkRequest parseFrom( 535 com.google.protobuf.ByteString data, 536 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 537 throws com.google.protobuf.InvalidProtocolBufferException { 538 return PARSER.parseFrom(data, extensionRegistry); 539 } 540 parseFrom(byte[] data)541 public static com.google.cloud.compute.v1.PatchSubnetworkRequest parseFrom(byte[] data) 542 throws com.google.protobuf.InvalidProtocolBufferException { 543 return PARSER.parseFrom(data); 544 } 545 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)546 public static com.google.cloud.compute.v1.PatchSubnetworkRequest parseFrom( 547 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 548 throws com.google.protobuf.InvalidProtocolBufferException { 549 return PARSER.parseFrom(data, extensionRegistry); 550 } 551 parseFrom( java.io.InputStream input)552 public static com.google.cloud.compute.v1.PatchSubnetworkRequest parseFrom( 553 java.io.InputStream input) throws java.io.IOException { 554 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 555 } 556 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)557 public static com.google.cloud.compute.v1.PatchSubnetworkRequest parseFrom( 558 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 559 throws java.io.IOException { 560 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 561 PARSER, input, extensionRegistry); 562 } 563 parseDelimitedFrom( java.io.InputStream input)564 public static com.google.cloud.compute.v1.PatchSubnetworkRequest parseDelimitedFrom( 565 java.io.InputStream input) throws java.io.IOException { 566 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 567 } 568 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)569 public static com.google.cloud.compute.v1.PatchSubnetworkRequest parseDelimitedFrom( 570 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 571 throws java.io.IOException { 572 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 573 PARSER, input, extensionRegistry); 574 } 575 parseFrom( com.google.protobuf.CodedInputStream input)576 public static com.google.cloud.compute.v1.PatchSubnetworkRequest parseFrom( 577 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 578 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 579 } 580 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)581 public static com.google.cloud.compute.v1.PatchSubnetworkRequest parseFrom( 582 com.google.protobuf.CodedInputStream input, 583 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 584 throws java.io.IOException { 585 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 586 PARSER, input, extensionRegistry); 587 } 588 589 @java.lang.Override newBuilderForType()590 public Builder newBuilderForType() { 591 return newBuilder(); 592 } 593 newBuilder()594 public static Builder newBuilder() { 595 return DEFAULT_INSTANCE.toBuilder(); 596 } 597 newBuilder(com.google.cloud.compute.v1.PatchSubnetworkRequest prototype)598 public static Builder newBuilder(com.google.cloud.compute.v1.PatchSubnetworkRequest prototype) { 599 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 600 } 601 602 @java.lang.Override toBuilder()603 public Builder toBuilder() { 604 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 605 } 606 607 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)608 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 609 Builder builder = new Builder(parent); 610 return builder; 611 } 612 /** 613 * 614 * 615 * <pre> 616 * A request message for Subnetworks.Patch. See the method description for details. 617 * </pre> 618 * 619 * Protobuf type {@code google.cloud.compute.v1.PatchSubnetworkRequest} 620 */ 621 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 622 implements 623 // @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.PatchSubnetworkRequest) 624 com.google.cloud.compute.v1.PatchSubnetworkRequestOrBuilder { getDescriptor()625 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 626 return com.google.cloud.compute.v1.Compute 627 .internal_static_google_cloud_compute_v1_PatchSubnetworkRequest_descriptor; 628 } 629 630 @java.lang.Override 631 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()632 internalGetFieldAccessorTable() { 633 return com.google.cloud.compute.v1.Compute 634 .internal_static_google_cloud_compute_v1_PatchSubnetworkRequest_fieldAccessorTable 635 .ensureFieldAccessorsInitialized( 636 com.google.cloud.compute.v1.PatchSubnetworkRequest.class, 637 com.google.cloud.compute.v1.PatchSubnetworkRequest.Builder.class); 638 } 639 640 // Construct using com.google.cloud.compute.v1.PatchSubnetworkRequest.newBuilder() Builder()641 private Builder() {} 642 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)643 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 644 super(parent); 645 } 646 647 @java.lang.Override clear()648 public Builder clear() { 649 super.clear(); 650 bitField0_ = 0; 651 drainTimeoutSeconds_ = 0; 652 project_ = ""; 653 region_ = ""; 654 requestId_ = ""; 655 subnetwork_ = ""; 656 subnetworkResource_ = null; 657 if (subnetworkResourceBuilder_ != null) { 658 subnetworkResourceBuilder_.dispose(); 659 subnetworkResourceBuilder_ = null; 660 } 661 return this; 662 } 663 664 @java.lang.Override getDescriptorForType()665 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 666 return com.google.cloud.compute.v1.Compute 667 .internal_static_google_cloud_compute_v1_PatchSubnetworkRequest_descriptor; 668 } 669 670 @java.lang.Override getDefaultInstanceForType()671 public com.google.cloud.compute.v1.PatchSubnetworkRequest getDefaultInstanceForType() { 672 return com.google.cloud.compute.v1.PatchSubnetworkRequest.getDefaultInstance(); 673 } 674 675 @java.lang.Override build()676 public com.google.cloud.compute.v1.PatchSubnetworkRequest build() { 677 com.google.cloud.compute.v1.PatchSubnetworkRequest result = buildPartial(); 678 if (!result.isInitialized()) { 679 throw newUninitializedMessageException(result); 680 } 681 return result; 682 } 683 684 @java.lang.Override buildPartial()685 public com.google.cloud.compute.v1.PatchSubnetworkRequest buildPartial() { 686 com.google.cloud.compute.v1.PatchSubnetworkRequest result = 687 new com.google.cloud.compute.v1.PatchSubnetworkRequest(this); 688 if (bitField0_ != 0) { 689 buildPartial0(result); 690 } 691 onBuilt(); 692 return result; 693 } 694 buildPartial0(com.google.cloud.compute.v1.PatchSubnetworkRequest result)695 private void buildPartial0(com.google.cloud.compute.v1.PatchSubnetworkRequest result) { 696 int from_bitField0_ = bitField0_; 697 int to_bitField0_ = 0; 698 if (((from_bitField0_ & 0x00000001) != 0)) { 699 result.drainTimeoutSeconds_ = drainTimeoutSeconds_; 700 to_bitField0_ |= 0x00000001; 701 } 702 if (((from_bitField0_ & 0x00000002) != 0)) { 703 result.project_ = project_; 704 } 705 if (((from_bitField0_ & 0x00000004) != 0)) { 706 result.region_ = region_; 707 } 708 if (((from_bitField0_ & 0x00000008) != 0)) { 709 result.requestId_ = requestId_; 710 to_bitField0_ |= 0x00000002; 711 } 712 if (((from_bitField0_ & 0x00000010) != 0)) { 713 result.subnetwork_ = subnetwork_; 714 } 715 if (((from_bitField0_ & 0x00000020) != 0)) { 716 result.subnetworkResource_ = 717 subnetworkResourceBuilder_ == null 718 ? subnetworkResource_ 719 : subnetworkResourceBuilder_.build(); 720 } 721 result.bitField0_ |= to_bitField0_; 722 } 723 724 @java.lang.Override clone()725 public Builder clone() { 726 return super.clone(); 727 } 728 729 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)730 public Builder setField( 731 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 732 return super.setField(field, value); 733 } 734 735 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)736 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 737 return super.clearField(field); 738 } 739 740 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)741 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 742 return super.clearOneof(oneof); 743 } 744 745 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)746 public Builder setRepeatedField( 747 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 748 return super.setRepeatedField(field, index, value); 749 } 750 751 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)752 public Builder addRepeatedField( 753 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 754 return super.addRepeatedField(field, value); 755 } 756 757 @java.lang.Override mergeFrom(com.google.protobuf.Message other)758 public Builder mergeFrom(com.google.protobuf.Message other) { 759 if (other instanceof com.google.cloud.compute.v1.PatchSubnetworkRequest) { 760 return mergeFrom((com.google.cloud.compute.v1.PatchSubnetworkRequest) other); 761 } else { 762 super.mergeFrom(other); 763 return this; 764 } 765 } 766 mergeFrom(com.google.cloud.compute.v1.PatchSubnetworkRequest other)767 public Builder mergeFrom(com.google.cloud.compute.v1.PatchSubnetworkRequest other) { 768 if (other == com.google.cloud.compute.v1.PatchSubnetworkRequest.getDefaultInstance()) 769 return this; 770 if (other.hasDrainTimeoutSeconds()) { 771 setDrainTimeoutSeconds(other.getDrainTimeoutSeconds()); 772 } 773 if (!other.getProject().isEmpty()) { 774 project_ = other.project_; 775 bitField0_ |= 0x00000002; 776 onChanged(); 777 } 778 if (!other.getRegion().isEmpty()) { 779 region_ = other.region_; 780 bitField0_ |= 0x00000004; 781 onChanged(); 782 } 783 if (other.hasRequestId()) { 784 requestId_ = other.requestId_; 785 bitField0_ |= 0x00000008; 786 onChanged(); 787 } 788 if (!other.getSubnetwork().isEmpty()) { 789 subnetwork_ = other.subnetwork_; 790 bitField0_ |= 0x00000010; 791 onChanged(); 792 } 793 if (other.hasSubnetworkResource()) { 794 mergeSubnetworkResource(other.getSubnetworkResource()); 795 } 796 this.mergeUnknownFields(other.getUnknownFields()); 797 onChanged(); 798 return this; 799 } 800 801 @java.lang.Override isInitialized()802 public final boolean isInitialized() { 803 return true; 804 } 805 806 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)807 public Builder mergeFrom( 808 com.google.protobuf.CodedInputStream input, 809 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 810 throws java.io.IOException { 811 if (extensionRegistry == null) { 812 throw new java.lang.NullPointerException(); 813 } 814 try { 815 boolean done = false; 816 while (!done) { 817 int tag = input.readTag(); 818 switch (tag) { 819 case 0: 820 done = true; 821 break; 822 case 296879706: 823 { 824 requestId_ = input.readStringRequireUtf8(); 825 bitField0_ |= 0x00000008; 826 break; 827 } // case 296879706 828 case 337865210: 829 { 830 input.readMessage( 831 getSubnetworkResourceFieldBuilder().getBuilder(), extensionRegistry); 832 bitField0_ |= 0x00000020; 833 break; 834 } // case 337865210 835 case 1111570338: 836 { 837 region_ = input.readStringRequireUtf8(); 838 bitField0_ |= 0x00000004; 839 break; 840 } // case 1111570338 841 case 1820481738: 842 { 843 project_ = input.readStringRequireUtf8(); 844 bitField0_ |= 0x00000002; 845 break; 846 } // case 1820481738 847 case -1832345742: 848 { 849 subnetwork_ = input.readStringRequireUtf8(); 850 bitField0_ |= 0x00000010; 851 break; 852 } // case -1832345742 853 case -1433310512: 854 { 855 drainTimeoutSeconds_ = input.readInt32(); 856 bitField0_ |= 0x00000001; 857 break; 858 } // case -1433310512 859 default: 860 { 861 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 862 done = true; // was an endgroup tag 863 } 864 break; 865 } // default: 866 } // switch (tag) 867 } // while (!done) 868 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 869 throw e.unwrapIOException(); 870 } finally { 871 onChanged(); 872 } // finally 873 return this; 874 } 875 876 private int bitField0_; 877 878 private int drainTimeoutSeconds_; 879 /** 880 * 881 * 882 * <pre> 883 * The drain timeout specifies the upper bound in seconds on the amount of time allowed to drain connections from the current ACTIVE subnetwork to the current BACKUP subnetwork. The drain timeout is only applicable when the following conditions are true: - the subnetwork being patched has purpose = INTERNAL_HTTPS_LOAD_BALANCER - the subnetwork being patched has role = BACKUP - the patch request is setting the role to ACTIVE. Note that after this patch operation the roles of the ACTIVE and BACKUP subnetworks will be swapped. 884 * </pre> 885 * 886 * <code>optional int32 drain_timeout_seconds = 357707098;</code> 887 * 888 * @return Whether the drainTimeoutSeconds field is set. 889 */ 890 @java.lang.Override hasDrainTimeoutSeconds()891 public boolean hasDrainTimeoutSeconds() { 892 return ((bitField0_ & 0x00000001) != 0); 893 } 894 /** 895 * 896 * 897 * <pre> 898 * The drain timeout specifies the upper bound in seconds on the amount of time allowed to drain connections from the current ACTIVE subnetwork to the current BACKUP subnetwork. The drain timeout is only applicable when the following conditions are true: - the subnetwork being patched has purpose = INTERNAL_HTTPS_LOAD_BALANCER - the subnetwork being patched has role = BACKUP - the patch request is setting the role to ACTIVE. Note that after this patch operation the roles of the ACTIVE and BACKUP subnetworks will be swapped. 899 * </pre> 900 * 901 * <code>optional int32 drain_timeout_seconds = 357707098;</code> 902 * 903 * @return The drainTimeoutSeconds. 904 */ 905 @java.lang.Override getDrainTimeoutSeconds()906 public int getDrainTimeoutSeconds() { 907 return drainTimeoutSeconds_; 908 } 909 /** 910 * 911 * 912 * <pre> 913 * The drain timeout specifies the upper bound in seconds on the amount of time allowed to drain connections from the current ACTIVE subnetwork to the current BACKUP subnetwork. The drain timeout is only applicable when the following conditions are true: - the subnetwork being patched has purpose = INTERNAL_HTTPS_LOAD_BALANCER - the subnetwork being patched has role = BACKUP - the patch request is setting the role to ACTIVE. Note that after this patch operation the roles of the ACTIVE and BACKUP subnetworks will be swapped. 914 * </pre> 915 * 916 * <code>optional int32 drain_timeout_seconds = 357707098;</code> 917 * 918 * @param value The drainTimeoutSeconds to set. 919 * @return This builder for chaining. 920 */ setDrainTimeoutSeconds(int value)921 public Builder setDrainTimeoutSeconds(int value) { 922 923 drainTimeoutSeconds_ = value; 924 bitField0_ |= 0x00000001; 925 onChanged(); 926 return this; 927 } 928 /** 929 * 930 * 931 * <pre> 932 * The drain timeout specifies the upper bound in seconds on the amount of time allowed to drain connections from the current ACTIVE subnetwork to the current BACKUP subnetwork. The drain timeout is only applicable when the following conditions are true: - the subnetwork being patched has purpose = INTERNAL_HTTPS_LOAD_BALANCER - the subnetwork being patched has role = BACKUP - the patch request is setting the role to ACTIVE. Note that after this patch operation the roles of the ACTIVE and BACKUP subnetworks will be swapped. 933 * </pre> 934 * 935 * <code>optional int32 drain_timeout_seconds = 357707098;</code> 936 * 937 * @return This builder for chaining. 938 */ clearDrainTimeoutSeconds()939 public Builder clearDrainTimeoutSeconds() { 940 bitField0_ = (bitField0_ & ~0x00000001); 941 drainTimeoutSeconds_ = 0; 942 onChanged(); 943 return this; 944 } 945 946 private java.lang.Object project_ = ""; 947 /** 948 * 949 * 950 * <pre> 951 * Project ID for this request. 952 * </pre> 953 * 954 * <code> 955 * string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; 956 * </code> 957 * 958 * @return The project. 959 */ getProject()960 public java.lang.String getProject() { 961 java.lang.Object ref = project_; 962 if (!(ref instanceof java.lang.String)) { 963 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 964 java.lang.String s = bs.toStringUtf8(); 965 project_ = s; 966 return s; 967 } else { 968 return (java.lang.String) ref; 969 } 970 } 971 /** 972 * 973 * 974 * <pre> 975 * Project ID for this request. 976 * </pre> 977 * 978 * <code> 979 * string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; 980 * </code> 981 * 982 * @return The bytes for project. 983 */ getProjectBytes()984 public com.google.protobuf.ByteString getProjectBytes() { 985 java.lang.Object ref = project_; 986 if (ref instanceof String) { 987 com.google.protobuf.ByteString b = 988 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 989 project_ = b; 990 return b; 991 } else { 992 return (com.google.protobuf.ByteString) ref; 993 } 994 } 995 /** 996 * 997 * 998 * <pre> 999 * Project ID for this request. 1000 * </pre> 1001 * 1002 * <code> 1003 * string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; 1004 * </code> 1005 * 1006 * @param value The project to set. 1007 * @return This builder for chaining. 1008 */ setProject(java.lang.String value)1009 public Builder setProject(java.lang.String value) { 1010 if (value == null) { 1011 throw new NullPointerException(); 1012 } 1013 project_ = value; 1014 bitField0_ |= 0x00000002; 1015 onChanged(); 1016 return this; 1017 } 1018 /** 1019 * 1020 * 1021 * <pre> 1022 * Project ID for this request. 1023 * </pre> 1024 * 1025 * <code> 1026 * string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; 1027 * </code> 1028 * 1029 * @return This builder for chaining. 1030 */ clearProject()1031 public Builder clearProject() { 1032 project_ = getDefaultInstance().getProject(); 1033 bitField0_ = (bitField0_ & ~0x00000002); 1034 onChanged(); 1035 return this; 1036 } 1037 /** 1038 * 1039 * 1040 * <pre> 1041 * Project ID for this request. 1042 * </pre> 1043 * 1044 * <code> 1045 * string project = 227560217 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "project"]; 1046 * </code> 1047 * 1048 * @param value The bytes for project to set. 1049 * @return This builder for chaining. 1050 */ setProjectBytes(com.google.protobuf.ByteString value)1051 public Builder setProjectBytes(com.google.protobuf.ByteString value) { 1052 if (value == null) { 1053 throw new NullPointerException(); 1054 } 1055 checkByteStringIsUtf8(value); 1056 project_ = value; 1057 bitField0_ |= 0x00000002; 1058 onChanged(); 1059 return this; 1060 } 1061 1062 private java.lang.Object region_ = ""; 1063 /** 1064 * 1065 * 1066 * <pre> 1067 * Name of the region scoping this request. 1068 * </pre> 1069 * 1070 * <code> 1071 * string region = 138946292 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "region"]; 1072 * </code> 1073 * 1074 * @return The region. 1075 */ getRegion()1076 public java.lang.String getRegion() { 1077 java.lang.Object ref = region_; 1078 if (!(ref instanceof java.lang.String)) { 1079 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1080 java.lang.String s = bs.toStringUtf8(); 1081 region_ = s; 1082 return s; 1083 } else { 1084 return (java.lang.String) ref; 1085 } 1086 } 1087 /** 1088 * 1089 * 1090 * <pre> 1091 * Name of the region scoping this request. 1092 * </pre> 1093 * 1094 * <code> 1095 * string region = 138946292 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "region"]; 1096 * </code> 1097 * 1098 * @return The bytes for region. 1099 */ getRegionBytes()1100 public com.google.protobuf.ByteString getRegionBytes() { 1101 java.lang.Object ref = region_; 1102 if (ref instanceof String) { 1103 com.google.protobuf.ByteString b = 1104 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1105 region_ = b; 1106 return b; 1107 } else { 1108 return (com.google.protobuf.ByteString) ref; 1109 } 1110 } 1111 /** 1112 * 1113 * 1114 * <pre> 1115 * Name of the region scoping this request. 1116 * </pre> 1117 * 1118 * <code> 1119 * string region = 138946292 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "region"]; 1120 * </code> 1121 * 1122 * @param value The region to set. 1123 * @return This builder for chaining. 1124 */ setRegion(java.lang.String value)1125 public Builder setRegion(java.lang.String value) { 1126 if (value == null) { 1127 throw new NullPointerException(); 1128 } 1129 region_ = value; 1130 bitField0_ |= 0x00000004; 1131 onChanged(); 1132 return this; 1133 } 1134 /** 1135 * 1136 * 1137 * <pre> 1138 * Name of the region scoping this request. 1139 * </pre> 1140 * 1141 * <code> 1142 * string region = 138946292 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "region"]; 1143 * </code> 1144 * 1145 * @return This builder for chaining. 1146 */ clearRegion()1147 public Builder clearRegion() { 1148 region_ = getDefaultInstance().getRegion(); 1149 bitField0_ = (bitField0_ & ~0x00000004); 1150 onChanged(); 1151 return this; 1152 } 1153 /** 1154 * 1155 * 1156 * <pre> 1157 * Name of the region scoping this request. 1158 * </pre> 1159 * 1160 * <code> 1161 * string region = 138946292 [(.google.api.field_behavior) = REQUIRED, (.google.cloud.operation_request_field) = "region"]; 1162 * </code> 1163 * 1164 * @param value The bytes for region to set. 1165 * @return This builder for chaining. 1166 */ setRegionBytes(com.google.protobuf.ByteString value)1167 public Builder setRegionBytes(com.google.protobuf.ByteString value) { 1168 if (value == null) { 1169 throw new NullPointerException(); 1170 } 1171 checkByteStringIsUtf8(value); 1172 region_ = value; 1173 bitField0_ |= 0x00000004; 1174 onChanged(); 1175 return this; 1176 } 1177 1178 private java.lang.Object requestId_ = ""; 1179 /** 1180 * 1181 * 1182 * <pre> 1183 * 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). 1184 * </pre> 1185 * 1186 * <code>optional string request_id = 37109963;</code> 1187 * 1188 * @return Whether the requestId field is set. 1189 */ hasRequestId()1190 public boolean hasRequestId() { 1191 return ((bitField0_ & 0x00000008) != 0); 1192 } 1193 /** 1194 * 1195 * 1196 * <pre> 1197 * 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). 1198 * </pre> 1199 * 1200 * <code>optional string request_id = 37109963;</code> 1201 * 1202 * @return The requestId. 1203 */ getRequestId()1204 public java.lang.String getRequestId() { 1205 java.lang.Object ref = requestId_; 1206 if (!(ref instanceof java.lang.String)) { 1207 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1208 java.lang.String s = bs.toStringUtf8(); 1209 requestId_ = s; 1210 return s; 1211 } else { 1212 return (java.lang.String) ref; 1213 } 1214 } 1215 /** 1216 * 1217 * 1218 * <pre> 1219 * 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). 1220 * </pre> 1221 * 1222 * <code>optional string request_id = 37109963;</code> 1223 * 1224 * @return The bytes for requestId. 1225 */ getRequestIdBytes()1226 public com.google.protobuf.ByteString getRequestIdBytes() { 1227 java.lang.Object ref = requestId_; 1228 if (ref instanceof String) { 1229 com.google.protobuf.ByteString b = 1230 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1231 requestId_ = b; 1232 return b; 1233 } else { 1234 return (com.google.protobuf.ByteString) ref; 1235 } 1236 } 1237 /** 1238 * 1239 * 1240 * <pre> 1241 * 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). 1242 * </pre> 1243 * 1244 * <code>optional string request_id = 37109963;</code> 1245 * 1246 * @param value The requestId to set. 1247 * @return This builder for chaining. 1248 */ setRequestId(java.lang.String value)1249 public Builder setRequestId(java.lang.String value) { 1250 if (value == null) { 1251 throw new NullPointerException(); 1252 } 1253 requestId_ = value; 1254 bitField0_ |= 0x00000008; 1255 onChanged(); 1256 return this; 1257 } 1258 /** 1259 * 1260 * 1261 * <pre> 1262 * 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). 1263 * </pre> 1264 * 1265 * <code>optional string request_id = 37109963;</code> 1266 * 1267 * @return This builder for chaining. 1268 */ clearRequestId()1269 public Builder clearRequestId() { 1270 requestId_ = getDefaultInstance().getRequestId(); 1271 bitField0_ = (bitField0_ & ~0x00000008); 1272 onChanged(); 1273 return this; 1274 } 1275 /** 1276 * 1277 * 1278 * <pre> 1279 * 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). 1280 * </pre> 1281 * 1282 * <code>optional string request_id = 37109963;</code> 1283 * 1284 * @param value The bytes for requestId to set. 1285 * @return This builder for chaining. 1286 */ setRequestIdBytes(com.google.protobuf.ByteString value)1287 public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { 1288 if (value == null) { 1289 throw new NullPointerException(); 1290 } 1291 checkByteStringIsUtf8(value); 1292 requestId_ = value; 1293 bitField0_ |= 0x00000008; 1294 onChanged(); 1295 return this; 1296 } 1297 1298 private java.lang.Object subnetwork_ = ""; 1299 /** 1300 * 1301 * 1302 * <pre> 1303 * Name of the Subnetwork resource to patch. 1304 * </pre> 1305 * 1306 * <code>string subnetwork = 307827694 [(.google.api.field_behavior) = REQUIRED];</code> 1307 * 1308 * @return The subnetwork. 1309 */ getSubnetwork()1310 public java.lang.String getSubnetwork() { 1311 java.lang.Object ref = subnetwork_; 1312 if (!(ref instanceof java.lang.String)) { 1313 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1314 java.lang.String s = bs.toStringUtf8(); 1315 subnetwork_ = s; 1316 return s; 1317 } else { 1318 return (java.lang.String) ref; 1319 } 1320 } 1321 /** 1322 * 1323 * 1324 * <pre> 1325 * Name of the Subnetwork resource to patch. 1326 * </pre> 1327 * 1328 * <code>string subnetwork = 307827694 [(.google.api.field_behavior) = REQUIRED];</code> 1329 * 1330 * @return The bytes for subnetwork. 1331 */ getSubnetworkBytes()1332 public com.google.protobuf.ByteString getSubnetworkBytes() { 1333 java.lang.Object ref = subnetwork_; 1334 if (ref instanceof String) { 1335 com.google.protobuf.ByteString b = 1336 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1337 subnetwork_ = b; 1338 return b; 1339 } else { 1340 return (com.google.protobuf.ByteString) ref; 1341 } 1342 } 1343 /** 1344 * 1345 * 1346 * <pre> 1347 * Name of the Subnetwork resource to patch. 1348 * </pre> 1349 * 1350 * <code>string subnetwork = 307827694 [(.google.api.field_behavior) = REQUIRED];</code> 1351 * 1352 * @param value The subnetwork to set. 1353 * @return This builder for chaining. 1354 */ setSubnetwork(java.lang.String value)1355 public Builder setSubnetwork(java.lang.String value) { 1356 if (value == null) { 1357 throw new NullPointerException(); 1358 } 1359 subnetwork_ = value; 1360 bitField0_ |= 0x00000010; 1361 onChanged(); 1362 return this; 1363 } 1364 /** 1365 * 1366 * 1367 * <pre> 1368 * Name of the Subnetwork resource to patch. 1369 * </pre> 1370 * 1371 * <code>string subnetwork = 307827694 [(.google.api.field_behavior) = REQUIRED];</code> 1372 * 1373 * @return This builder for chaining. 1374 */ clearSubnetwork()1375 public Builder clearSubnetwork() { 1376 subnetwork_ = getDefaultInstance().getSubnetwork(); 1377 bitField0_ = (bitField0_ & ~0x00000010); 1378 onChanged(); 1379 return this; 1380 } 1381 /** 1382 * 1383 * 1384 * <pre> 1385 * Name of the Subnetwork resource to patch. 1386 * </pre> 1387 * 1388 * <code>string subnetwork = 307827694 [(.google.api.field_behavior) = REQUIRED];</code> 1389 * 1390 * @param value The bytes for subnetwork to set. 1391 * @return This builder for chaining. 1392 */ setSubnetworkBytes(com.google.protobuf.ByteString value)1393 public Builder setSubnetworkBytes(com.google.protobuf.ByteString value) { 1394 if (value == null) { 1395 throw new NullPointerException(); 1396 } 1397 checkByteStringIsUtf8(value); 1398 subnetwork_ = value; 1399 bitField0_ |= 0x00000010; 1400 onChanged(); 1401 return this; 1402 } 1403 1404 private com.google.cloud.compute.v1.Subnetwork subnetworkResource_; 1405 private com.google.protobuf.SingleFieldBuilderV3< 1406 com.google.cloud.compute.v1.Subnetwork, 1407 com.google.cloud.compute.v1.Subnetwork.Builder, 1408 com.google.cloud.compute.v1.SubnetworkOrBuilder> 1409 subnetworkResourceBuilder_; 1410 /** 1411 * 1412 * 1413 * <pre> 1414 * The body resource for this request 1415 * </pre> 1416 * 1417 * <code> 1418 * .google.cloud.compute.v1.Subnetwork subnetwork_resource = 42233151 [(.google.api.field_behavior) = REQUIRED]; 1419 * </code> 1420 * 1421 * @return Whether the subnetworkResource field is set. 1422 */ hasSubnetworkResource()1423 public boolean hasSubnetworkResource() { 1424 return ((bitField0_ & 0x00000020) != 0); 1425 } 1426 /** 1427 * 1428 * 1429 * <pre> 1430 * The body resource for this request 1431 * </pre> 1432 * 1433 * <code> 1434 * .google.cloud.compute.v1.Subnetwork subnetwork_resource = 42233151 [(.google.api.field_behavior) = REQUIRED]; 1435 * </code> 1436 * 1437 * @return The subnetworkResource. 1438 */ getSubnetworkResource()1439 public com.google.cloud.compute.v1.Subnetwork getSubnetworkResource() { 1440 if (subnetworkResourceBuilder_ == null) { 1441 return subnetworkResource_ == null 1442 ? com.google.cloud.compute.v1.Subnetwork.getDefaultInstance() 1443 : subnetworkResource_; 1444 } else { 1445 return subnetworkResourceBuilder_.getMessage(); 1446 } 1447 } 1448 /** 1449 * 1450 * 1451 * <pre> 1452 * The body resource for this request 1453 * </pre> 1454 * 1455 * <code> 1456 * .google.cloud.compute.v1.Subnetwork subnetwork_resource = 42233151 [(.google.api.field_behavior) = REQUIRED]; 1457 * </code> 1458 */ setSubnetworkResource(com.google.cloud.compute.v1.Subnetwork value)1459 public Builder setSubnetworkResource(com.google.cloud.compute.v1.Subnetwork value) { 1460 if (subnetworkResourceBuilder_ == null) { 1461 if (value == null) { 1462 throw new NullPointerException(); 1463 } 1464 subnetworkResource_ = value; 1465 } else { 1466 subnetworkResourceBuilder_.setMessage(value); 1467 } 1468 bitField0_ |= 0x00000020; 1469 onChanged(); 1470 return this; 1471 } 1472 /** 1473 * 1474 * 1475 * <pre> 1476 * The body resource for this request 1477 * </pre> 1478 * 1479 * <code> 1480 * .google.cloud.compute.v1.Subnetwork subnetwork_resource = 42233151 [(.google.api.field_behavior) = REQUIRED]; 1481 * </code> 1482 */ setSubnetworkResource( com.google.cloud.compute.v1.Subnetwork.Builder builderForValue)1483 public Builder setSubnetworkResource( 1484 com.google.cloud.compute.v1.Subnetwork.Builder builderForValue) { 1485 if (subnetworkResourceBuilder_ == null) { 1486 subnetworkResource_ = builderForValue.build(); 1487 } else { 1488 subnetworkResourceBuilder_.setMessage(builderForValue.build()); 1489 } 1490 bitField0_ |= 0x00000020; 1491 onChanged(); 1492 return this; 1493 } 1494 /** 1495 * 1496 * 1497 * <pre> 1498 * The body resource for this request 1499 * </pre> 1500 * 1501 * <code> 1502 * .google.cloud.compute.v1.Subnetwork subnetwork_resource = 42233151 [(.google.api.field_behavior) = REQUIRED]; 1503 * </code> 1504 */ mergeSubnetworkResource(com.google.cloud.compute.v1.Subnetwork value)1505 public Builder mergeSubnetworkResource(com.google.cloud.compute.v1.Subnetwork value) { 1506 if (subnetworkResourceBuilder_ == null) { 1507 if (((bitField0_ & 0x00000020) != 0) 1508 && subnetworkResource_ != null 1509 && subnetworkResource_ != com.google.cloud.compute.v1.Subnetwork.getDefaultInstance()) { 1510 getSubnetworkResourceBuilder().mergeFrom(value); 1511 } else { 1512 subnetworkResource_ = value; 1513 } 1514 } else { 1515 subnetworkResourceBuilder_.mergeFrom(value); 1516 } 1517 bitField0_ |= 0x00000020; 1518 onChanged(); 1519 return this; 1520 } 1521 /** 1522 * 1523 * 1524 * <pre> 1525 * The body resource for this request 1526 * </pre> 1527 * 1528 * <code> 1529 * .google.cloud.compute.v1.Subnetwork subnetwork_resource = 42233151 [(.google.api.field_behavior) = REQUIRED]; 1530 * </code> 1531 */ clearSubnetworkResource()1532 public Builder clearSubnetworkResource() { 1533 bitField0_ = (bitField0_ & ~0x00000020); 1534 subnetworkResource_ = null; 1535 if (subnetworkResourceBuilder_ != null) { 1536 subnetworkResourceBuilder_.dispose(); 1537 subnetworkResourceBuilder_ = null; 1538 } 1539 onChanged(); 1540 return this; 1541 } 1542 /** 1543 * 1544 * 1545 * <pre> 1546 * The body resource for this request 1547 * </pre> 1548 * 1549 * <code> 1550 * .google.cloud.compute.v1.Subnetwork subnetwork_resource = 42233151 [(.google.api.field_behavior) = REQUIRED]; 1551 * </code> 1552 */ getSubnetworkResourceBuilder()1553 public com.google.cloud.compute.v1.Subnetwork.Builder getSubnetworkResourceBuilder() { 1554 bitField0_ |= 0x00000020; 1555 onChanged(); 1556 return getSubnetworkResourceFieldBuilder().getBuilder(); 1557 } 1558 /** 1559 * 1560 * 1561 * <pre> 1562 * The body resource for this request 1563 * </pre> 1564 * 1565 * <code> 1566 * .google.cloud.compute.v1.Subnetwork subnetwork_resource = 42233151 [(.google.api.field_behavior) = REQUIRED]; 1567 * </code> 1568 */ getSubnetworkResourceOrBuilder()1569 public com.google.cloud.compute.v1.SubnetworkOrBuilder getSubnetworkResourceOrBuilder() { 1570 if (subnetworkResourceBuilder_ != null) { 1571 return subnetworkResourceBuilder_.getMessageOrBuilder(); 1572 } else { 1573 return subnetworkResource_ == null 1574 ? com.google.cloud.compute.v1.Subnetwork.getDefaultInstance() 1575 : subnetworkResource_; 1576 } 1577 } 1578 /** 1579 * 1580 * 1581 * <pre> 1582 * The body resource for this request 1583 * </pre> 1584 * 1585 * <code> 1586 * .google.cloud.compute.v1.Subnetwork subnetwork_resource = 42233151 [(.google.api.field_behavior) = REQUIRED]; 1587 * </code> 1588 */ 1589 private com.google.protobuf.SingleFieldBuilderV3< 1590 com.google.cloud.compute.v1.Subnetwork, 1591 com.google.cloud.compute.v1.Subnetwork.Builder, 1592 com.google.cloud.compute.v1.SubnetworkOrBuilder> getSubnetworkResourceFieldBuilder()1593 getSubnetworkResourceFieldBuilder() { 1594 if (subnetworkResourceBuilder_ == null) { 1595 subnetworkResourceBuilder_ = 1596 new com.google.protobuf.SingleFieldBuilderV3< 1597 com.google.cloud.compute.v1.Subnetwork, 1598 com.google.cloud.compute.v1.Subnetwork.Builder, 1599 com.google.cloud.compute.v1.SubnetworkOrBuilder>( 1600 getSubnetworkResource(), getParentForChildren(), isClean()); 1601 subnetworkResource_ = null; 1602 } 1603 return subnetworkResourceBuilder_; 1604 } 1605 1606 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1607 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 1608 return super.setUnknownFields(unknownFields); 1609 } 1610 1611 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1612 public final Builder mergeUnknownFields( 1613 final com.google.protobuf.UnknownFieldSet unknownFields) { 1614 return super.mergeUnknownFields(unknownFields); 1615 } 1616 1617 // @@protoc_insertion_point(builder_scope:google.cloud.compute.v1.PatchSubnetworkRequest) 1618 } 1619 1620 // @@protoc_insertion_point(class_scope:google.cloud.compute.v1.PatchSubnetworkRequest) 1621 private static final com.google.cloud.compute.v1.PatchSubnetworkRequest DEFAULT_INSTANCE; 1622 1623 static { 1624 DEFAULT_INSTANCE = new com.google.cloud.compute.v1.PatchSubnetworkRequest(); 1625 } 1626 getDefaultInstance()1627 public static com.google.cloud.compute.v1.PatchSubnetworkRequest getDefaultInstance() { 1628 return DEFAULT_INSTANCE; 1629 } 1630 1631 private static final com.google.protobuf.Parser<PatchSubnetworkRequest> PARSER = 1632 new com.google.protobuf.AbstractParser<PatchSubnetworkRequest>() { 1633 @java.lang.Override 1634 public PatchSubnetworkRequest parsePartialFrom( 1635 com.google.protobuf.CodedInputStream input, 1636 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1637 throws com.google.protobuf.InvalidProtocolBufferException { 1638 Builder builder = newBuilder(); 1639 try { 1640 builder.mergeFrom(input, extensionRegistry); 1641 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1642 throw e.setUnfinishedMessage(builder.buildPartial()); 1643 } catch (com.google.protobuf.UninitializedMessageException e) { 1644 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 1645 } catch (java.io.IOException e) { 1646 throw new com.google.protobuf.InvalidProtocolBufferException(e) 1647 .setUnfinishedMessage(builder.buildPartial()); 1648 } 1649 return builder.buildPartial(); 1650 } 1651 }; 1652 parser()1653 public static com.google.protobuf.Parser<PatchSubnetworkRequest> parser() { 1654 return PARSER; 1655 } 1656 1657 @java.lang.Override getParserForType()1658 public com.google.protobuf.Parser<PatchSubnetworkRequest> getParserForType() { 1659 return PARSER; 1660 } 1661 1662 @java.lang.Override getDefaultInstanceForType()1663 public com.google.cloud.compute.v1.PatchSubnetworkRequest getDefaultInstanceForType() { 1664 return DEFAULT_INSTANCE; 1665 } 1666 } 1667