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