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