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 * </pre> 26 * 27 * Protobuf type {@code google.cloud.compute.v1.InstanceMoveRequest} 28 */ 29 public final class InstanceMoveRequest extends com.google.protobuf.GeneratedMessageV3 30 implements 31 // @@protoc_insertion_point(message_implements:google.cloud.compute.v1.InstanceMoveRequest) 32 InstanceMoveRequestOrBuilder { 33 private static final long serialVersionUID = 0L; 34 // Use InstanceMoveRequest.newBuilder() to construct. InstanceMoveRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)35 private InstanceMoveRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 36 super(builder); 37 } 38 InstanceMoveRequest()39 private InstanceMoveRequest() { 40 destinationZone_ = ""; 41 targetInstance_ = ""; 42 } 43 44 @java.lang.Override 45 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)46 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 47 return new InstanceMoveRequest(); 48 } 49 50 @java.lang.Override getUnknownFields()51 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 52 return this.unknownFields; 53 } 54 getDescriptor()55 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 56 return com.google.cloud.compute.v1.Compute 57 .internal_static_google_cloud_compute_v1_InstanceMoveRequest_descriptor; 58 } 59 60 @java.lang.Override 61 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()62 internalGetFieldAccessorTable() { 63 return com.google.cloud.compute.v1.Compute 64 .internal_static_google_cloud_compute_v1_InstanceMoveRequest_fieldAccessorTable 65 .ensureFieldAccessorsInitialized( 66 com.google.cloud.compute.v1.InstanceMoveRequest.class, 67 com.google.cloud.compute.v1.InstanceMoveRequest.Builder.class); 68 } 69 70 private int bitField0_; 71 public static final int DESTINATION_ZONE_FIELD_NUMBER = 131854653; 72 73 @SuppressWarnings("serial") 74 private volatile java.lang.Object destinationZone_ = ""; 75 /** 76 * 77 * 78 * <pre> 79 * The URL of the destination zone to move the instance. This can be a full or partial URL. For example, the following are all valid URLs to a zone: - https://www.googleapis.com/compute/v1/projects/project/zones/zone - projects/project/zones/zone - zones/zone 80 * </pre> 81 * 82 * <code>optional string destination_zone = 131854653;</code> 83 * 84 * @return Whether the destinationZone field is set. 85 */ 86 @java.lang.Override hasDestinationZone()87 public boolean hasDestinationZone() { 88 return ((bitField0_ & 0x00000001) != 0); 89 } 90 /** 91 * 92 * 93 * <pre> 94 * The URL of the destination zone to move the instance. This can be a full or partial URL. For example, the following are all valid URLs to a zone: - https://www.googleapis.com/compute/v1/projects/project/zones/zone - projects/project/zones/zone - zones/zone 95 * </pre> 96 * 97 * <code>optional string destination_zone = 131854653;</code> 98 * 99 * @return The destinationZone. 100 */ 101 @java.lang.Override getDestinationZone()102 public java.lang.String getDestinationZone() { 103 java.lang.Object ref = destinationZone_; 104 if (ref instanceof java.lang.String) { 105 return (java.lang.String) ref; 106 } else { 107 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 108 java.lang.String s = bs.toStringUtf8(); 109 destinationZone_ = s; 110 return s; 111 } 112 } 113 /** 114 * 115 * 116 * <pre> 117 * The URL of the destination zone to move the instance. This can be a full or partial URL. For example, the following are all valid URLs to a zone: - https://www.googleapis.com/compute/v1/projects/project/zones/zone - projects/project/zones/zone - zones/zone 118 * </pre> 119 * 120 * <code>optional string destination_zone = 131854653;</code> 121 * 122 * @return The bytes for destinationZone. 123 */ 124 @java.lang.Override getDestinationZoneBytes()125 public com.google.protobuf.ByteString getDestinationZoneBytes() { 126 java.lang.Object ref = destinationZone_; 127 if (ref instanceof java.lang.String) { 128 com.google.protobuf.ByteString b = 129 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 130 destinationZone_ = b; 131 return b; 132 } else { 133 return (com.google.protobuf.ByteString) ref; 134 } 135 } 136 137 public static final int TARGET_INSTANCE_FIELD_NUMBER = 289769347; 138 139 @SuppressWarnings("serial") 140 private volatile java.lang.Object targetInstance_ = ""; 141 /** 142 * 143 * 144 * <pre> 145 * The URL of the target instance to move. This can be a full or partial URL. For example, the following are all valid URLs to an instance: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /instances/instance - projects/project/zones/zone/instances/instance - zones/zone/instances/instance 146 * </pre> 147 * 148 * <code>optional string target_instance = 289769347;</code> 149 * 150 * @return Whether the targetInstance field is set. 151 */ 152 @java.lang.Override hasTargetInstance()153 public boolean hasTargetInstance() { 154 return ((bitField0_ & 0x00000002) != 0); 155 } 156 /** 157 * 158 * 159 * <pre> 160 * The URL of the target instance to move. This can be a full or partial URL. For example, the following are all valid URLs to an instance: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /instances/instance - projects/project/zones/zone/instances/instance - zones/zone/instances/instance 161 * </pre> 162 * 163 * <code>optional string target_instance = 289769347;</code> 164 * 165 * @return The targetInstance. 166 */ 167 @java.lang.Override getTargetInstance()168 public java.lang.String getTargetInstance() { 169 java.lang.Object ref = targetInstance_; 170 if (ref instanceof java.lang.String) { 171 return (java.lang.String) ref; 172 } else { 173 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 174 java.lang.String s = bs.toStringUtf8(); 175 targetInstance_ = s; 176 return s; 177 } 178 } 179 /** 180 * 181 * 182 * <pre> 183 * The URL of the target instance to move. This can be a full or partial URL. For example, the following are all valid URLs to an instance: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /instances/instance - projects/project/zones/zone/instances/instance - zones/zone/instances/instance 184 * </pre> 185 * 186 * <code>optional string target_instance = 289769347;</code> 187 * 188 * @return The bytes for targetInstance. 189 */ 190 @java.lang.Override getTargetInstanceBytes()191 public com.google.protobuf.ByteString getTargetInstanceBytes() { 192 java.lang.Object ref = targetInstance_; 193 if (ref instanceof java.lang.String) { 194 com.google.protobuf.ByteString b = 195 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 196 targetInstance_ = b; 197 return b; 198 } else { 199 return (com.google.protobuf.ByteString) ref; 200 } 201 } 202 203 private byte memoizedIsInitialized = -1; 204 205 @java.lang.Override isInitialized()206 public final boolean isInitialized() { 207 byte isInitialized = memoizedIsInitialized; 208 if (isInitialized == 1) return true; 209 if (isInitialized == 0) return false; 210 211 memoizedIsInitialized = 1; 212 return true; 213 } 214 215 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)216 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 217 if (((bitField0_ & 0x00000001) != 0)) { 218 com.google.protobuf.GeneratedMessageV3.writeString(output, 131854653, destinationZone_); 219 } 220 if (((bitField0_ & 0x00000002) != 0)) { 221 com.google.protobuf.GeneratedMessageV3.writeString(output, 289769347, targetInstance_); 222 } 223 getUnknownFields().writeTo(output); 224 } 225 226 @java.lang.Override getSerializedSize()227 public int getSerializedSize() { 228 int size = memoizedSize; 229 if (size != -1) return size; 230 231 size = 0; 232 if (((bitField0_ & 0x00000001) != 0)) { 233 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(131854653, destinationZone_); 234 } 235 if (((bitField0_ & 0x00000002) != 0)) { 236 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(289769347, targetInstance_); 237 } 238 size += getUnknownFields().getSerializedSize(); 239 memoizedSize = size; 240 return size; 241 } 242 243 @java.lang.Override equals(final java.lang.Object obj)244 public boolean equals(final java.lang.Object obj) { 245 if (obj == this) { 246 return true; 247 } 248 if (!(obj instanceof com.google.cloud.compute.v1.InstanceMoveRequest)) { 249 return super.equals(obj); 250 } 251 com.google.cloud.compute.v1.InstanceMoveRequest other = 252 (com.google.cloud.compute.v1.InstanceMoveRequest) obj; 253 254 if (hasDestinationZone() != other.hasDestinationZone()) return false; 255 if (hasDestinationZone()) { 256 if (!getDestinationZone().equals(other.getDestinationZone())) return false; 257 } 258 if (hasTargetInstance() != other.hasTargetInstance()) return false; 259 if (hasTargetInstance()) { 260 if (!getTargetInstance().equals(other.getTargetInstance())) return false; 261 } 262 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 263 return true; 264 } 265 266 @java.lang.Override hashCode()267 public int hashCode() { 268 if (memoizedHashCode != 0) { 269 return memoizedHashCode; 270 } 271 int hash = 41; 272 hash = (19 * hash) + getDescriptor().hashCode(); 273 if (hasDestinationZone()) { 274 hash = (37 * hash) + DESTINATION_ZONE_FIELD_NUMBER; 275 hash = (53 * hash) + getDestinationZone().hashCode(); 276 } 277 if (hasTargetInstance()) { 278 hash = (37 * hash) + TARGET_INSTANCE_FIELD_NUMBER; 279 hash = (53 * hash) + getTargetInstance().hashCode(); 280 } 281 hash = (29 * hash) + getUnknownFields().hashCode(); 282 memoizedHashCode = hash; 283 return hash; 284 } 285 parseFrom(java.nio.ByteBuffer data)286 public static com.google.cloud.compute.v1.InstanceMoveRequest parseFrom(java.nio.ByteBuffer data) 287 throws com.google.protobuf.InvalidProtocolBufferException { 288 return PARSER.parseFrom(data); 289 } 290 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)291 public static com.google.cloud.compute.v1.InstanceMoveRequest parseFrom( 292 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 293 throws com.google.protobuf.InvalidProtocolBufferException { 294 return PARSER.parseFrom(data, extensionRegistry); 295 } 296 parseFrom( com.google.protobuf.ByteString data)297 public static com.google.cloud.compute.v1.InstanceMoveRequest parseFrom( 298 com.google.protobuf.ByteString data) 299 throws com.google.protobuf.InvalidProtocolBufferException { 300 return PARSER.parseFrom(data); 301 } 302 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)303 public static com.google.cloud.compute.v1.InstanceMoveRequest parseFrom( 304 com.google.protobuf.ByteString data, 305 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 306 throws com.google.protobuf.InvalidProtocolBufferException { 307 return PARSER.parseFrom(data, extensionRegistry); 308 } 309 parseFrom(byte[] data)310 public static com.google.cloud.compute.v1.InstanceMoveRequest parseFrom(byte[] data) 311 throws com.google.protobuf.InvalidProtocolBufferException { 312 return PARSER.parseFrom(data); 313 } 314 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)315 public static com.google.cloud.compute.v1.InstanceMoveRequest parseFrom( 316 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 317 throws com.google.protobuf.InvalidProtocolBufferException { 318 return PARSER.parseFrom(data, extensionRegistry); 319 } 320 parseFrom(java.io.InputStream input)321 public static com.google.cloud.compute.v1.InstanceMoveRequest parseFrom(java.io.InputStream input) 322 throws java.io.IOException { 323 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 324 } 325 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)326 public static com.google.cloud.compute.v1.InstanceMoveRequest parseFrom( 327 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 328 throws java.io.IOException { 329 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 330 PARSER, input, extensionRegistry); 331 } 332 parseDelimitedFrom( java.io.InputStream input)333 public static com.google.cloud.compute.v1.InstanceMoveRequest parseDelimitedFrom( 334 java.io.InputStream input) throws java.io.IOException { 335 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 336 } 337 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)338 public static com.google.cloud.compute.v1.InstanceMoveRequest parseDelimitedFrom( 339 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 340 throws java.io.IOException { 341 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 342 PARSER, input, extensionRegistry); 343 } 344 parseFrom( com.google.protobuf.CodedInputStream input)345 public static com.google.cloud.compute.v1.InstanceMoveRequest parseFrom( 346 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 347 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 348 } 349 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)350 public static com.google.cloud.compute.v1.InstanceMoveRequest parseFrom( 351 com.google.protobuf.CodedInputStream input, 352 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 353 throws java.io.IOException { 354 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 355 PARSER, input, extensionRegistry); 356 } 357 358 @java.lang.Override newBuilderForType()359 public Builder newBuilderForType() { 360 return newBuilder(); 361 } 362 newBuilder()363 public static Builder newBuilder() { 364 return DEFAULT_INSTANCE.toBuilder(); 365 } 366 newBuilder(com.google.cloud.compute.v1.InstanceMoveRequest prototype)367 public static Builder newBuilder(com.google.cloud.compute.v1.InstanceMoveRequest prototype) { 368 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 369 } 370 371 @java.lang.Override toBuilder()372 public Builder toBuilder() { 373 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 374 } 375 376 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)377 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 378 Builder builder = new Builder(parent); 379 return builder; 380 } 381 /** 382 * 383 * 384 * <pre> 385 * </pre> 386 * 387 * Protobuf type {@code google.cloud.compute.v1.InstanceMoveRequest} 388 */ 389 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 390 implements 391 // @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.InstanceMoveRequest) 392 com.google.cloud.compute.v1.InstanceMoveRequestOrBuilder { getDescriptor()393 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 394 return com.google.cloud.compute.v1.Compute 395 .internal_static_google_cloud_compute_v1_InstanceMoveRequest_descriptor; 396 } 397 398 @java.lang.Override 399 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()400 internalGetFieldAccessorTable() { 401 return com.google.cloud.compute.v1.Compute 402 .internal_static_google_cloud_compute_v1_InstanceMoveRequest_fieldAccessorTable 403 .ensureFieldAccessorsInitialized( 404 com.google.cloud.compute.v1.InstanceMoveRequest.class, 405 com.google.cloud.compute.v1.InstanceMoveRequest.Builder.class); 406 } 407 408 // Construct using com.google.cloud.compute.v1.InstanceMoveRequest.newBuilder() Builder()409 private Builder() {} 410 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)411 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 412 super(parent); 413 } 414 415 @java.lang.Override clear()416 public Builder clear() { 417 super.clear(); 418 bitField0_ = 0; 419 destinationZone_ = ""; 420 targetInstance_ = ""; 421 return this; 422 } 423 424 @java.lang.Override getDescriptorForType()425 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 426 return com.google.cloud.compute.v1.Compute 427 .internal_static_google_cloud_compute_v1_InstanceMoveRequest_descriptor; 428 } 429 430 @java.lang.Override getDefaultInstanceForType()431 public com.google.cloud.compute.v1.InstanceMoveRequest getDefaultInstanceForType() { 432 return com.google.cloud.compute.v1.InstanceMoveRequest.getDefaultInstance(); 433 } 434 435 @java.lang.Override build()436 public com.google.cloud.compute.v1.InstanceMoveRequest build() { 437 com.google.cloud.compute.v1.InstanceMoveRequest result = buildPartial(); 438 if (!result.isInitialized()) { 439 throw newUninitializedMessageException(result); 440 } 441 return result; 442 } 443 444 @java.lang.Override buildPartial()445 public com.google.cloud.compute.v1.InstanceMoveRequest buildPartial() { 446 com.google.cloud.compute.v1.InstanceMoveRequest result = 447 new com.google.cloud.compute.v1.InstanceMoveRequest(this); 448 if (bitField0_ != 0) { 449 buildPartial0(result); 450 } 451 onBuilt(); 452 return result; 453 } 454 buildPartial0(com.google.cloud.compute.v1.InstanceMoveRequest result)455 private void buildPartial0(com.google.cloud.compute.v1.InstanceMoveRequest result) { 456 int from_bitField0_ = bitField0_; 457 int to_bitField0_ = 0; 458 if (((from_bitField0_ & 0x00000001) != 0)) { 459 result.destinationZone_ = destinationZone_; 460 to_bitField0_ |= 0x00000001; 461 } 462 if (((from_bitField0_ & 0x00000002) != 0)) { 463 result.targetInstance_ = targetInstance_; 464 to_bitField0_ |= 0x00000002; 465 } 466 result.bitField0_ |= to_bitField0_; 467 } 468 469 @java.lang.Override clone()470 public Builder clone() { 471 return super.clone(); 472 } 473 474 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)475 public Builder setField( 476 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 477 return super.setField(field, value); 478 } 479 480 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)481 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 482 return super.clearField(field); 483 } 484 485 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)486 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 487 return super.clearOneof(oneof); 488 } 489 490 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)491 public Builder setRepeatedField( 492 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 493 return super.setRepeatedField(field, index, value); 494 } 495 496 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)497 public Builder addRepeatedField( 498 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 499 return super.addRepeatedField(field, value); 500 } 501 502 @java.lang.Override mergeFrom(com.google.protobuf.Message other)503 public Builder mergeFrom(com.google.protobuf.Message other) { 504 if (other instanceof com.google.cloud.compute.v1.InstanceMoveRequest) { 505 return mergeFrom((com.google.cloud.compute.v1.InstanceMoveRequest) other); 506 } else { 507 super.mergeFrom(other); 508 return this; 509 } 510 } 511 mergeFrom(com.google.cloud.compute.v1.InstanceMoveRequest other)512 public Builder mergeFrom(com.google.cloud.compute.v1.InstanceMoveRequest other) { 513 if (other == com.google.cloud.compute.v1.InstanceMoveRequest.getDefaultInstance()) 514 return this; 515 if (other.hasDestinationZone()) { 516 destinationZone_ = other.destinationZone_; 517 bitField0_ |= 0x00000001; 518 onChanged(); 519 } 520 if (other.hasTargetInstance()) { 521 targetInstance_ = other.targetInstance_; 522 bitField0_ |= 0x00000002; 523 onChanged(); 524 } 525 this.mergeUnknownFields(other.getUnknownFields()); 526 onChanged(); 527 return this; 528 } 529 530 @java.lang.Override isInitialized()531 public final boolean isInitialized() { 532 return true; 533 } 534 535 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)536 public Builder mergeFrom( 537 com.google.protobuf.CodedInputStream input, 538 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 539 throws java.io.IOException { 540 if (extensionRegistry == null) { 541 throw new java.lang.NullPointerException(); 542 } 543 try { 544 boolean done = false; 545 while (!done) { 546 int tag = input.readTag(); 547 switch (tag) { 548 case 0: 549 done = true; 550 break; 551 case 1054837226: 552 { 553 destinationZone_ = input.readStringRequireUtf8(); 554 bitField0_ |= 0x00000001; 555 break; 556 } // case 1054837226 557 case -1976812518: 558 { 559 targetInstance_ = input.readStringRequireUtf8(); 560 bitField0_ |= 0x00000002; 561 break; 562 } // case -1976812518 563 default: 564 { 565 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 566 done = true; // was an endgroup tag 567 } 568 break; 569 } // default: 570 } // switch (tag) 571 } // while (!done) 572 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 573 throw e.unwrapIOException(); 574 } finally { 575 onChanged(); 576 } // finally 577 return this; 578 } 579 580 private int bitField0_; 581 582 private java.lang.Object destinationZone_ = ""; 583 /** 584 * 585 * 586 * <pre> 587 * The URL of the destination zone to move the instance. This can be a full or partial URL. For example, the following are all valid URLs to a zone: - https://www.googleapis.com/compute/v1/projects/project/zones/zone - projects/project/zones/zone - zones/zone 588 * </pre> 589 * 590 * <code>optional string destination_zone = 131854653;</code> 591 * 592 * @return Whether the destinationZone field is set. 593 */ hasDestinationZone()594 public boolean hasDestinationZone() { 595 return ((bitField0_ & 0x00000001) != 0); 596 } 597 /** 598 * 599 * 600 * <pre> 601 * The URL of the destination zone to move the instance. This can be a full or partial URL. For example, the following are all valid URLs to a zone: - https://www.googleapis.com/compute/v1/projects/project/zones/zone - projects/project/zones/zone - zones/zone 602 * </pre> 603 * 604 * <code>optional string destination_zone = 131854653;</code> 605 * 606 * @return The destinationZone. 607 */ getDestinationZone()608 public java.lang.String getDestinationZone() { 609 java.lang.Object ref = destinationZone_; 610 if (!(ref instanceof java.lang.String)) { 611 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 612 java.lang.String s = bs.toStringUtf8(); 613 destinationZone_ = s; 614 return s; 615 } else { 616 return (java.lang.String) ref; 617 } 618 } 619 /** 620 * 621 * 622 * <pre> 623 * The URL of the destination zone to move the instance. This can be a full or partial URL. For example, the following are all valid URLs to a zone: - https://www.googleapis.com/compute/v1/projects/project/zones/zone - projects/project/zones/zone - zones/zone 624 * </pre> 625 * 626 * <code>optional string destination_zone = 131854653;</code> 627 * 628 * @return The bytes for destinationZone. 629 */ getDestinationZoneBytes()630 public com.google.protobuf.ByteString getDestinationZoneBytes() { 631 java.lang.Object ref = destinationZone_; 632 if (ref instanceof String) { 633 com.google.protobuf.ByteString b = 634 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 635 destinationZone_ = b; 636 return b; 637 } else { 638 return (com.google.protobuf.ByteString) ref; 639 } 640 } 641 /** 642 * 643 * 644 * <pre> 645 * The URL of the destination zone to move the instance. This can be a full or partial URL. For example, the following are all valid URLs to a zone: - https://www.googleapis.com/compute/v1/projects/project/zones/zone - projects/project/zones/zone - zones/zone 646 * </pre> 647 * 648 * <code>optional string destination_zone = 131854653;</code> 649 * 650 * @param value The destinationZone to set. 651 * @return This builder for chaining. 652 */ setDestinationZone(java.lang.String value)653 public Builder setDestinationZone(java.lang.String value) { 654 if (value == null) { 655 throw new NullPointerException(); 656 } 657 destinationZone_ = value; 658 bitField0_ |= 0x00000001; 659 onChanged(); 660 return this; 661 } 662 /** 663 * 664 * 665 * <pre> 666 * The URL of the destination zone to move the instance. This can be a full or partial URL. For example, the following are all valid URLs to a zone: - https://www.googleapis.com/compute/v1/projects/project/zones/zone - projects/project/zones/zone - zones/zone 667 * </pre> 668 * 669 * <code>optional string destination_zone = 131854653;</code> 670 * 671 * @return This builder for chaining. 672 */ clearDestinationZone()673 public Builder clearDestinationZone() { 674 destinationZone_ = getDefaultInstance().getDestinationZone(); 675 bitField0_ = (bitField0_ & ~0x00000001); 676 onChanged(); 677 return this; 678 } 679 /** 680 * 681 * 682 * <pre> 683 * The URL of the destination zone to move the instance. This can be a full or partial URL. For example, the following are all valid URLs to a zone: - https://www.googleapis.com/compute/v1/projects/project/zones/zone - projects/project/zones/zone - zones/zone 684 * </pre> 685 * 686 * <code>optional string destination_zone = 131854653;</code> 687 * 688 * @param value The bytes for destinationZone to set. 689 * @return This builder for chaining. 690 */ setDestinationZoneBytes(com.google.protobuf.ByteString value)691 public Builder setDestinationZoneBytes(com.google.protobuf.ByteString value) { 692 if (value == null) { 693 throw new NullPointerException(); 694 } 695 checkByteStringIsUtf8(value); 696 destinationZone_ = value; 697 bitField0_ |= 0x00000001; 698 onChanged(); 699 return this; 700 } 701 702 private java.lang.Object targetInstance_ = ""; 703 /** 704 * 705 * 706 * <pre> 707 * The URL of the target instance to move. This can be a full or partial URL. For example, the following are all valid URLs to an instance: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /instances/instance - projects/project/zones/zone/instances/instance - zones/zone/instances/instance 708 * </pre> 709 * 710 * <code>optional string target_instance = 289769347;</code> 711 * 712 * @return Whether the targetInstance field is set. 713 */ hasTargetInstance()714 public boolean hasTargetInstance() { 715 return ((bitField0_ & 0x00000002) != 0); 716 } 717 /** 718 * 719 * 720 * <pre> 721 * The URL of the target instance to move. This can be a full or partial URL. For example, the following are all valid URLs to an instance: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /instances/instance - projects/project/zones/zone/instances/instance - zones/zone/instances/instance 722 * </pre> 723 * 724 * <code>optional string target_instance = 289769347;</code> 725 * 726 * @return The targetInstance. 727 */ getTargetInstance()728 public java.lang.String getTargetInstance() { 729 java.lang.Object ref = targetInstance_; 730 if (!(ref instanceof java.lang.String)) { 731 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 732 java.lang.String s = bs.toStringUtf8(); 733 targetInstance_ = s; 734 return s; 735 } else { 736 return (java.lang.String) ref; 737 } 738 } 739 /** 740 * 741 * 742 * <pre> 743 * The URL of the target instance to move. This can be a full or partial URL. For example, the following are all valid URLs to an instance: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /instances/instance - projects/project/zones/zone/instances/instance - zones/zone/instances/instance 744 * </pre> 745 * 746 * <code>optional string target_instance = 289769347;</code> 747 * 748 * @return The bytes for targetInstance. 749 */ getTargetInstanceBytes()750 public com.google.protobuf.ByteString getTargetInstanceBytes() { 751 java.lang.Object ref = targetInstance_; 752 if (ref instanceof String) { 753 com.google.protobuf.ByteString b = 754 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 755 targetInstance_ = b; 756 return b; 757 } else { 758 return (com.google.protobuf.ByteString) ref; 759 } 760 } 761 /** 762 * 763 * 764 * <pre> 765 * The URL of the target instance to move. This can be a full or partial URL. For example, the following are all valid URLs to an instance: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /instances/instance - projects/project/zones/zone/instances/instance - zones/zone/instances/instance 766 * </pre> 767 * 768 * <code>optional string target_instance = 289769347;</code> 769 * 770 * @param value The targetInstance to set. 771 * @return This builder for chaining. 772 */ setTargetInstance(java.lang.String value)773 public Builder setTargetInstance(java.lang.String value) { 774 if (value == null) { 775 throw new NullPointerException(); 776 } 777 targetInstance_ = value; 778 bitField0_ |= 0x00000002; 779 onChanged(); 780 return this; 781 } 782 /** 783 * 784 * 785 * <pre> 786 * The URL of the target instance to move. This can be a full or partial URL. For example, the following are all valid URLs to an instance: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /instances/instance - projects/project/zones/zone/instances/instance - zones/zone/instances/instance 787 * </pre> 788 * 789 * <code>optional string target_instance = 289769347;</code> 790 * 791 * @return This builder for chaining. 792 */ clearTargetInstance()793 public Builder clearTargetInstance() { 794 targetInstance_ = getDefaultInstance().getTargetInstance(); 795 bitField0_ = (bitField0_ & ~0x00000002); 796 onChanged(); 797 return this; 798 } 799 /** 800 * 801 * 802 * <pre> 803 * The URL of the target instance to move. This can be a full or partial URL. For example, the following are all valid URLs to an instance: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /instances/instance - projects/project/zones/zone/instances/instance - zones/zone/instances/instance 804 * </pre> 805 * 806 * <code>optional string target_instance = 289769347;</code> 807 * 808 * @param value The bytes for targetInstance to set. 809 * @return This builder for chaining. 810 */ setTargetInstanceBytes(com.google.protobuf.ByteString value)811 public Builder setTargetInstanceBytes(com.google.protobuf.ByteString value) { 812 if (value == null) { 813 throw new NullPointerException(); 814 } 815 checkByteStringIsUtf8(value); 816 targetInstance_ = value; 817 bitField0_ |= 0x00000002; 818 onChanged(); 819 return this; 820 } 821 822 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)823 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 824 return super.setUnknownFields(unknownFields); 825 } 826 827 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)828 public final Builder mergeUnknownFields( 829 final com.google.protobuf.UnknownFieldSet unknownFields) { 830 return super.mergeUnknownFields(unknownFields); 831 } 832 833 // @@protoc_insertion_point(builder_scope:google.cloud.compute.v1.InstanceMoveRequest) 834 } 835 836 // @@protoc_insertion_point(class_scope:google.cloud.compute.v1.InstanceMoveRequest) 837 private static final com.google.cloud.compute.v1.InstanceMoveRequest DEFAULT_INSTANCE; 838 839 static { 840 DEFAULT_INSTANCE = new com.google.cloud.compute.v1.InstanceMoveRequest(); 841 } 842 getDefaultInstance()843 public static com.google.cloud.compute.v1.InstanceMoveRequest getDefaultInstance() { 844 return DEFAULT_INSTANCE; 845 } 846 847 private static final com.google.protobuf.Parser<InstanceMoveRequest> PARSER = 848 new com.google.protobuf.AbstractParser<InstanceMoveRequest>() { 849 @java.lang.Override 850 public InstanceMoveRequest parsePartialFrom( 851 com.google.protobuf.CodedInputStream input, 852 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 853 throws com.google.protobuf.InvalidProtocolBufferException { 854 Builder builder = newBuilder(); 855 try { 856 builder.mergeFrom(input, extensionRegistry); 857 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 858 throw e.setUnfinishedMessage(builder.buildPartial()); 859 } catch (com.google.protobuf.UninitializedMessageException e) { 860 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 861 } catch (java.io.IOException e) { 862 throw new com.google.protobuf.InvalidProtocolBufferException(e) 863 .setUnfinishedMessage(builder.buildPartial()); 864 } 865 return builder.buildPartial(); 866 } 867 }; 868 parser()869 public static com.google.protobuf.Parser<InstanceMoveRequest> parser() { 870 return PARSER; 871 } 872 873 @java.lang.Override getParserForType()874 public com.google.protobuf.Parser<InstanceMoveRequest> getParserForType() { 875 return PARSER; 876 } 877 878 @java.lang.Override getDefaultInstanceForType()879 public com.google.cloud.compute.v1.InstanceMoveRequest getDefaultInstanceForType() { 880 return DEFAULT_INSTANCE; 881 } 882 } 883