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