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