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