/* * Copyright 2019 The Grafeas Authors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: grafeas/v1/build.proto package io.grafeas.v1; /** * * *
 * Details of a build occurrence.
 * 
* * Protobuf type {@code grafeas.v1.BuildOccurrence} */ public final class BuildOccurrence extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:grafeas.v1.BuildOccurrence) BuildOccurrenceOrBuilder { private static final long serialVersionUID = 0L; // Use BuildOccurrence.newBuilder() to construct. private BuildOccurrence(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private BuildOccurrence() { provenanceBytes_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new BuildOccurrence(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.grafeas.v1.Build.internal_static_grafeas_v1_BuildOccurrence_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.grafeas.v1.Build.internal_static_grafeas_v1_BuildOccurrence_fieldAccessorTable .ensureFieldAccessorsInitialized( io.grafeas.v1.BuildOccurrence.class, io.grafeas.v1.BuildOccurrence.Builder.class); } public static final int PROVENANCE_FIELD_NUMBER = 1; private io.grafeas.v1.BuildProvenance provenance_; /** * * *
   * The actual provenance for the build.
   * 
* * .grafeas.v1.BuildProvenance provenance = 1; * * @return Whether the provenance field is set. */ @java.lang.Override public boolean hasProvenance() { return provenance_ != null; } /** * * *
   * The actual provenance for the build.
   * 
* * .grafeas.v1.BuildProvenance provenance = 1; * * @return The provenance. */ @java.lang.Override public io.grafeas.v1.BuildProvenance getProvenance() { return provenance_ == null ? io.grafeas.v1.BuildProvenance.getDefaultInstance() : provenance_; } /** * * *
   * The actual provenance for the build.
   * 
* * .grafeas.v1.BuildProvenance provenance = 1; */ @java.lang.Override public io.grafeas.v1.BuildProvenanceOrBuilder getProvenanceOrBuilder() { return provenance_ == null ? io.grafeas.v1.BuildProvenance.getDefaultInstance() : provenance_; } public static final int PROVENANCE_BYTES_FIELD_NUMBER = 2; @SuppressWarnings("serial") private volatile java.lang.Object provenanceBytes_ = ""; /** * * *
   * Serialized JSON representation of the provenance, used in generating the
   * build signature in the corresponding build note. After verifying the
   * signature, `provenance_bytes` can be unmarshalled and compared to the
   * provenance to confirm that it is unchanged. A base64-encoded string
   * representation of the provenance bytes is used for the signature in order
   * to interoperate with openssl which expects this format for signature
   * verification.
   * The serialized form is captured both to avoid ambiguity in how the
   * provenance is marshalled to json as well to prevent incompatibilities with
   * future changes.
   * 
* * string provenance_bytes = 2; * * @return The provenanceBytes. */ @java.lang.Override public java.lang.String getProvenanceBytes() { java.lang.Object ref = provenanceBytes_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); provenanceBytes_ = s; return s; } } /** * * *
   * Serialized JSON representation of the provenance, used in generating the
   * build signature in the corresponding build note. After verifying the
   * signature, `provenance_bytes` can be unmarshalled and compared to the
   * provenance to confirm that it is unchanged. A base64-encoded string
   * representation of the provenance bytes is used for the signature in order
   * to interoperate with openssl which expects this format for signature
   * verification.
   * The serialized form is captured both to avoid ambiguity in how the
   * provenance is marshalled to json as well to prevent incompatibilities with
   * future changes.
   * 
* * string provenance_bytes = 2; * * @return The bytes for provenanceBytes. */ @java.lang.Override public com.google.protobuf.ByteString getProvenanceBytesBytes() { java.lang.Object ref = provenanceBytes_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); provenanceBytes_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int INTOTO_PROVENANCE_FIELD_NUMBER = 3; private io.grafeas.v1.InTotoProvenance intotoProvenance_; /** * * *
   * Deprecated. See InTotoStatement for the replacement.
   * In-toto Provenance representation as defined in spec.
   * 
* * .grafeas.v1.InTotoProvenance intoto_provenance = 3; * * @return Whether the intotoProvenance field is set. */ @java.lang.Override public boolean hasIntotoProvenance() { return intotoProvenance_ != null; } /** * * *
   * Deprecated. See InTotoStatement for the replacement.
   * In-toto Provenance representation as defined in spec.
   * 
* * .grafeas.v1.InTotoProvenance intoto_provenance = 3; * * @return The intotoProvenance. */ @java.lang.Override public io.grafeas.v1.InTotoProvenance getIntotoProvenance() { return intotoProvenance_ == null ? io.grafeas.v1.InTotoProvenance.getDefaultInstance() : intotoProvenance_; } /** * * *
   * Deprecated. See InTotoStatement for the replacement.
   * In-toto Provenance representation as defined in spec.
   * 
* * .grafeas.v1.InTotoProvenance intoto_provenance = 3; */ @java.lang.Override public io.grafeas.v1.InTotoProvenanceOrBuilder getIntotoProvenanceOrBuilder() { return intotoProvenance_ == null ? io.grafeas.v1.InTotoProvenance.getDefaultInstance() : intotoProvenance_; } public static final int INTOTO_STATEMENT_FIELD_NUMBER = 4; private io.grafeas.v1.InTotoStatement intotoStatement_; /** * * *
   * In-toto Statement representation as defined in spec.
   * The intoto_statement can contain any type of provenance. The serialized
   * payload of the statement can be stored and signed in the Occurrence's
   * envelope.
   * 
* * .grafeas.v1.InTotoStatement intoto_statement = 4; * * @return Whether the intotoStatement field is set. */ @java.lang.Override public boolean hasIntotoStatement() { return intotoStatement_ != null; } /** * * *
   * In-toto Statement representation as defined in spec.
   * The intoto_statement can contain any type of provenance. The serialized
   * payload of the statement can be stored and signed in the Occurrence's
   * envelope.
   * 
* * .grafeas.v1.InTotoStatement intoto_statement = 4; * * @return The intotoStatement. */ @java.lang.Override public io.grafeas.v1.InTotoStatement getIntotoStatement() { return intotoStatement_ == null ? io.grafeas.v1.InTotoStatement.getDefaultInstance() : intotoStatement_; } /** * * *
   * In-toto Statement representation as defined in spec.
   * The intoto_statement can contain any type of provenance. The serialized
   * payload of the statement can be stored and signed in the Occurrence's
   * envelope.
   * 
* * .grafeas.v1.InTotoStatement intoto_statement = 4; */ @java.lang.Override public io.grafeas.v1.InTotoStatementOrBuilder getIntotoStatementOrBuilder() { return intotoStatement_ == null ? io.grafeas.v1.InTotoStatement.getDefaultInstance() : intotoStatement_; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (provenance_ != null) { output.writeMessage(1, getProvenance()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(provenanceBytes_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, provenanceBytes_); } if (intotoProvenance_ != null) { output.writeMessage(3, getIntotoProvenance()); } if (intotoStatement_ != null) { output.writeMessage(4, getIntotoStatement()); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (provenance_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getProvenance()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(provenanceBytes_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, provenanceBytes_); } if (intotoProvenance_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getIntotoProvenance()); } if (intotoStatement_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getIntotoStatement()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof io.grafeas.v1.BuildOccurrence)) { return super.equals(obj); } io.grafeas.v1.BuildOccurrence other = (io.grafeas.v1.BuildOccurrence) obj; if (hasProvenance() != other.hasProvenance()) return false; if (hasProvenance()) { if (!getProvenance().equals(other.getProvenance())) return false; } if (!getProvenanceBytes().equals(other.getProvenanceBytes())) return false; if (hasIntotoProvenance() != other.hasIntotoProvenance()) return false; if (hasIntotoProvenance()) { if (!getIntotoProvenance().equals(other.getIntotoProvenance())) return false; } if (hasIntotoStatement() != other.hasIntotoStatement()) return false; if (hasIntotoStatement()) { if (!getIntotoStatement().equals(other.getIntotoStatement())) return false; } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasProvenance()) { hash = (37 * hash) + PROVENANCE_FIELD_NUMBER; hash = (53 * hash) + getProvenance().hashCode(); } hash = (37 * hash) + PROVENANCE_BYTES_FIELD_NUMBER; hash = (53 * hash) + getProvenanceBytes().hashCode(); if (hasIntotoProvenance()) { hash = (37 * hash) + INTOTO_PROVENANCE_FIELD_NUMBER; hash = (53 * hash) + getIntotoProvenance().hashCode(); } if (hasIntotoStatement()) { hash = (37 * hash) + INTOTO_STATEMENT_FIELD_NUMBER; hash = (53 * hash) + getIntotoStatement().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static io.grafeas.v1.BuildOccurrence parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.grafeas.v1.BuildOccurrence parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.grafeas.v1.BuildOccurrence parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.grafeas.v1.BuildOccurrence parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.grafeas.v1.BuildOccurrence parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.grafeas.v1.BuildOccurrence parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.grafeas.v1.BuildOccurrence parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static io.grafeas.v1.BuildOccurrence parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } public static io.grafeas.v1.BuildOccurrence parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static io.grafeas.v1.BuildOccurrence parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static io.grafeas.v1.BuildOccurrence parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static io.grafeas.v1.BuildOccurrence parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(io.grafeas.v1.BuildOccurrence prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * * *
   * Details of a build occurrence.
   * 
* * Protobuf type {@code grafeas.v1.BuildOccurrence} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:grafeas.v1.BuildOccurrence) io.grafeas.v1.BuildOccurrenceOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.grafeas.v1.Build.internal_static_grafeas_v1_BuildOccurrence_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.grafeas.v1.Build.internal_static_grafeas_v1_BuildOccurrence_fieldAccessorTable .ensureFieldAccessorsInitialized( io.grafeas.v1.BuildOccurrence.class, io.grafeas.v1.BuildOccurrence.Builder.class); } // Construct using io.grafeas.v1.BuildOccurrence.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; provenance_ = null; if (provenanceBuilder_ != null) { provenanceBuilder_.dispose(); provenanceBuilder_ = null; } provenanceBytes_ = ""; intotoProvenance_ = null; if (intotoProvenanceBuilder_ != null) { intotoProvenanceBuilder_.dispose(); intotoProvenanceBuilder_ = null; } intotoStatement_ = null; if (intotoStatementBuilder_ != null) { intotoStatementBuilder_.dispose(); intotoStatementBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return io.grafeas.v1.Build.internal_static_grafeas_v1_BuildOccurrence_descriptor; } @java.lang.Override public io.grafeas.v1.BuildOccurrence getDefaultInstanceForType() { return io.grafeas.v1.BuildOccurrence.getDefaultInstance(); } @java.lang.Override public io.grafeas.v1.BuildOccurrence build() { io.grafeas.v1.BuildOccurrence result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.grafeas.v1.BuildOccurrence buildPartial() { io.grafeas.v1.BuildOccurrence result = new io.grafeas.v1.BuildOccurrence(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(io.grafeas.v1.BuildOccurrence result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.provenance_ = provenanceBuilder_ == null ? provenance_ : provenanceBuilder_.build(); } if (((from_bitField0_ & 0x00000002) != 0)) { result.provenanceBytes_ = provenanceBytes_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.intotoProvenance_ = intotoProvenanceBuilder_ == null ? intotoProvenance_ : intotoProvenanceBuilder_.build(); } if (((from_bitField0_ & 0x00000008) != 0)) { result.intotoStatement_ = intotoStatementBuilder_ == null ? intotoStatement_ : intotoStatementBuilder_.build(); } } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.grafeas.v1.BuildOccurrence) { return mergeFrom((io.grafeas.v1.BuildOccurrence) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(io.grafeas.v1.BuildOccurrence other) { if (other == io.grafeas.v1.BuildOccurrence.getDefaultInstance()) return this; if (other.hasProvenance()) { mergeProvenance(other.getProvenance()); } if (!other.getProvenanceBytes().isEmpty()) { provenanceBytes_ = other.provenanceBytes_; bitField0_ |= 0x00000002; onChanged(); } if (other.hasIntotoProvenance()) { mergeIntotoProvenance(other.getIntotoProvenance()); } if (other.hasIntotoStatement()) { mergeIntotoStatement(other.getIntotoStatement()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { input.readMessage(getProvenanceFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { provenanceBytes_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 18 case 26: { input.readMessage( getIntotoProvenanceFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 case 34: { input.readMessage(getIntotoStatementFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private io.grafeas.v1.BuildProvenance provenance_; private com.google.protobuf.SingleFieldBuilderV3< io.grafeas.v1.BuildProvenance, io.grafeas.v1.BuildProvenance.Builder, io.grafeas.v1.BuildProvenanceOrBuilder> provenanceBuilder_; /** * * *
     * The actual provenance for the build.
     * 
* * .grafeas.v1.BuildProvenance provenance = 1; * * @return Whether the provenance field is set. */ public boolean hasProvenance() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
     * The actual provenance for the build.
     * 
* * .grafeas.v1.BuildProvenance provenance = 1; * * @return The provenance. */ public io.grafeas.v1.BuildProvenance getProvenance() { if (provenanceBuilder_ == null) { return provenance_ == null ? io.grafeas.v1.BuildProvenance.getDefaultInstance() : provenance_; } else { return provenanceBuilder_.getMessage(); } } /** * * *
     * The actual provenance for the build.
     * 
* * .grafeas.v1.BuildProvenance provenance = 1; */ public Builder setProvenance(io.grafeas.v1.BuildProvenance value) { if (provenanceBuilder_ == null) { if (value == null) { throw new NullPointerException(); } provenance_ = value; } else { provenanceBuilder_.setMessage(value); } bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
     * The actual provenance for the build.
     * 
* * .grafeas.v1.BuildProvenance provenance = 1; */ public Builder setProvenance(io.grafeas.v1.BuildProvenance.Builder builderForValue) { if (provenanceBuilder_ == null) { provenance_ = builderForValue.build(); } else { provenanceBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
     * The actual provenance for the build.
     * 
* * .grafeas.v1.BuildProvenance provenance = 1; */ public Builder mergeProvenance(io.grafeas.v1.BuildProvenance value) { if (provenanceBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0) && provenance_ != null && provenance_ != io.grafeas.v1.BuildProvenance.getDefaultInstance()) { getProvenanceBuilder().mergeFrom(value); } else { provenance_ = value; } } else { provenanceBuilder_.mergeFrom(value); } bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
     * The actual provenance for the build.
     * 
* * .grafeas.v1.BuildProvenance provenance = 1; */ public Builder clearProvenance() { bitField0_ = (bitField0_ & ~0x00000001); provenance_ = null; if (provenanceBuilder_ != null) { provenanceBuilder_.dispose(); provenanceBuilder_ = null; } onChanged(); return this; } /** * * *
     * The actual provenance for the build.
     * 
* * .grafeas.v1.BuildProvenance provenance = 1; */ public io.grafeas.v1.BuildProvenance.Builder getProvenanceBuilder() { bitField0_ |= 0x00000001; onChanged(); return getProvenanceFieldBuilder().getBuilder(); } /** * * *
     * The actual provenance for the build.
     * 
* * .grafeas.v1.BuildProvenance provenance = 1; */ public io.grafeas.v1.BuildProvenanceOrBuilder getProvenanceOrBuilder() { if (provenanceBuilder_ != null) { return provenanceBuilder_.getMessageOrBuilder(); } else { return provenance_ == null ? io.grafeas.v1.BuildProvenance.getDefaultInstance() : provenance_; } } /** * * *
     * The actual provenance for the build.
     * 
* * .grafeas.v1.BuildProvenance provenance = 1; */ private com.google.protobuf.SingleFieldBuilderV3< io.grafeas.v1.BuildProvenance, io.grafeas.v1.BuildProvenance.Builder, io.grafeas.v1.BuildProvenanceOrBuilder> getProvenanceFieldBuilder() { if (provenanceBuilder_ == null) { provenanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.grafeas.v1.BuildProvenance, io.grafeas.v1.BuildProvenance.Builder, io.grafeas.v1.BuildProvenanceOrBuilder>( getProvenance(), getParentForChildren(), isClean()); provenance_ = null; } return provenanceBuilder_; } private java.lang.Object provenanceBytes_ = ""; /** * * *
     * Serialized JSON representation of the provenance, used in generating the
     * build signature in the corresponding build note. After verifying the
     * signature, `provenance_bytes` can be unmarshalled and compared to the
     * provenance to confirm that it is unchanged. A base64-encoded string
     * representation of the provenance bytes is used for the signature in order
     * to interoperate with openssl which expects this format for signature
     * verification.
     * The serialized form is captured both to avoid ambiguity in how the
     * provenance is marshalled to json as well to prevent incompatibilities with
     * future changes.
     * 
* * string provenance_bytes = 2; * * @return The provenanceBytes. */ public java.lang.String getProvenanceBytes() { java.lang.Object ref = provenanceBytes_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); provenanceBytes_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Serialized JSON representation of the provenance, used in generating the
     * build signature in the corresponding build note. After verifying the
     * signature, `provenance_bytes` can be unmarshalled and compared to the
     * provenance to confirm that it is unchanged. A base64-encoded string
     * representation of the provenance bytes is used for the signature in order
     * to interoperate with openssl which expects this format for signature
     * verification.
     * The serialized form is captured both to avoid ambiguity in how the
     * provenance is marshalled to json as well to prevent incompatibilities with
     * future changes.
     * 
* * string provenance_bytes = 2; * * @return The bytes for provenanceBytes. */ public com.google.protobuf.ByteString getProvenanceBytesBytes() { java.lang.Object ref = provenanceBytes_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); provenanceBytes_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Serialized JSON representation of the provenance, used in generating the
     * build signature in the corresponding build note. After verifying the
     * signature, `provenance_bytes` can be unmarshalled and compared to the
     * provenance to confirm that it is unchanged. A base64-encoded string
     * representation of the provenance bytes is used for the signature in order
     * to interoperate with openssl which expects this format for signature
     * verification.
     * The serialized form is captured both to avoid ambiguity in how the
     * provenance is marshalled to json as well to prevent incompatibilities with
     * future changes.
     * 
* * string provenance_bytes = 2; * * @param value The provenanceBytes to set. * @return This builder for chaining. */ public Builder setProvenanceBytes(java.lang.String value) { if (value == null) { throw new NullPointerException(); } provenanceBytes_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
     * Serialized JSON representation of the provenance, used in generating the
     * build signature in the corresponding build note. After verifying the
     * signature, `provenance_bytes` can be unmarshalled and compared to the
     * provenance to confirm that it is unchanged. A base64-encoded string
     * representation of the provenance bytes is used for the signature in order
     * to interoperate with openssl which expects this format for signature
     * verification.
     * The serialized form is captured both to avoid ambiguity in how the
     * provenance is marshalled to json as well to prevent incompatibilities with
     * future changes.
     * 
* * string provenance_bytes = 2; * * @return This builder for chaining. */ public Builder clearProvenanceBytes() { provenanceBytes_ = getDefaultInstance().getProvenanceBytes(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * * *
     * Serialized JSON representation of the provenance, used in generating the
     * build signature in the corresponding build note. After verifying the
     * signature, `provenance_bytes` can be unmarshalled and compared to the
     * provenance to confirm that it is unchanged. A base64-encoded string
     * representation of the provenance bytes is used for the signature in order
     * to interoperate with openssl which expects this format for signature
     * verification.
     * The serialized form is captured both to avoid ambiguity in how the
     * provenance is marshalled to json as well to prevent incompatibilities with
     * future changes.
     * 
* * string provenance_bytes = 2; * * @param value The bytes for provenanceBytes to set. * @return This builder for chaining. */ public Builder setProvenanceBytesBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); provenanceBytes_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } private io.grafeas.v1.InTotoProvenance intotoProvenance_; private com.google.protobuf.SingleFieldBuilderV3< io.grafeas.v1.InTotoProvenance, io.grafeas.v1.InTotoProvenance.Builder, io.grafeas.v1.InTotoProvenanceOrBuilder> intotoProvenanceBuilder_; /** * * *
     * Deprecated. See InTotoStatement for the replacement.
     * In-toto Provenance representation as defined in spec.
     * 
* * .grafeas.v1.InTotoProvenance intoto_provenance = 3; * * @return Whether the intotoProvenance field is set. */ public boolean hasIntotoProvenance() { return ((bitField0_ & 0x00000004) != 0); } /** * * *
     * Deprecated. See InTotoStatement for the replacement.
     * In-toto Provenance representation as defined in spec.
     * 
* * .grafeas.v1.InTotoProvenance intoto_provenance = 3; * * @return The intotoProvenance. */ public io.grafeas.v1.InTotoProvenance getIntotoProvenance() { if (intotoProvenanceBuilder_ == null) { return intotoProvenance_ == null ? io.grafeas.v1.InTotoProvenance.getDefaultInstance() : intotoProvenance_; } else { return intotoProvenanceBuilder_.getMessage(); } } /** * * *
     * Deprecated. See InTotoStatement for the replacement.
     * In-toto Provenance representation as defined in spec.
     * 
* * .grafeas.v1.InTotoProvenance intoto_provenance = 3; */ public Builder setIntotoProvenance(io.grafeas.v1.InTotoProvenance value) { if (intotoProvenanceBuilder_ == null) { if (value == null) { throw new NullPointerException(); } intotoProvenance_ = value; } else { intotoProvenanceBuilder_.setMessage(value); } bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * Deprecated. See InTotoStatement for the replacement.
     * In-toto Provenance representation as defined in spec.
     * 
* * .grafeas.v1.InTotoProvenance intoto_provenance = 3; */ public Builder setIntotoProvenance(io.grafeas.v1.InTotoProvenance.Builder builderForValue) { if (intotoProvenanceBuilder_ == null) { intotoProvenance_ = builderForValue.build(); } else { intotoProvenanceBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * Deprecated. See InTotoStatement for the replacement.
     * In-toto Provenance representation as defined in spec.
     * 
* * .grafeas.v1.InTotoProvenance intoto_provenance = 3; */ public Builder mergeIntotoProvenance(io.grafeas.v1.InTotoProvenance value) { if (intotoProvenanceBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0) && intotoProvenance_ != null && intotoProvenance_ != io.grafeas.v1.InTotoProvenance.getDefaultInstance()) { getIntotoProvenanceBuilder().mergeFrom(value); } else { intotoProvenance_ = value; } } else { intotoProvenanceBuilder_.mergeFrom(value); } bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * Deprecated. See InTotoStatement for the replacement.
     * In-toto Provenance representation as defined in spec.
     * 
* * .grafeas.v1.InTotoProvenance intoto_provenance = 3; */ public Builder clearIntotoProvenance() { bitField0_ = (bitField0_ & ~0x00000004); intotoProvenance_ = null; if (intotoProvenanceBuilder_ != null) { intotoProvenanceBuilder_.dispose(); intotoProvenanceBuilder_ = null; } onChanged(); return this; } /** * * *
     * Deprecated. See InTotoStatement for the replacement.
     * In-toto Provenance representation as defined in spec.
     * 
* * .grafeas.v1.InTotoProvenance intoto_provenance = 3; */ public io.grafeas.v1.InTotoProvenance.Builder getIntotoProvenanceBuilder() { bitField0_ |= 0x00000004; onChanged(); return getIntotoProvenanceFieldBuilder().getBuilder(); } /** * * *
     * Deprecated. See InTotoStatement for the replacement.
     * In-toto Provenance representation as defined in spec.
     * 
* * .grafeas.v1.InTotoProvenance intoto_provenance = 3; */ public io.grafeas.v1.InTotoProvenanceOrBuilder getIntotoProvenanceOrBuilder() { if (intotoProvenanceBuilder_ != null) { return intotoProvenanceBuilder_.getMessageOrBuilder(); } else { return intotoProvenance_ == null ? io.grafeas.v1.InTotoProvenance.getDefaultInstance() : intotoProvenance_; } } /** * * *
     * Deprecated. See InTotoStatement for the replacement.
     * In-toto Provenance representation as defined in spec.
     * 
* * .grafeas.v1.InTotoProvenance intoto_provenance = 3; */ private com.google.protobuf.SingleFieldBuilderV3< io.grafeas.v1.InTotoProvenance, io.grafeas.v1.InTotoProvenance.Builder, io.grafeas.v1.InTotoProvenanceOrBuilder> getIntotoProvenanceFieldBuilder() { if (intotoProvenanceBuilder_ == null) { intotoProvenanceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.grafeas.v1.InTotoProvenance, io.grafeas.v1.InTotoProvenance.Builder, io.grafeas.v1.InTotoProvenanceOrBuilder>( getIntotoProvenance(), getParentForChildren(), isClean()); intotoProvenance_ = null; } return intotoProvenanceBuilder_; } private io.grafeas.v1.InTotoStatement intotoStatement_; private com.google.protobuf.SingleFieldBuilderV3< io.grafeas.v1.InTotoStatement, io.grafeas.v1.InTotoStatement.Builder, io.grafeas.v1.InTotoStatementOrBuilder> intotoStatementBuilder_; /** * * *
     * In-toto Statement representation as defined in spec.
     * The intoto_statement can contain any type of provenance. The serialized
     * payload of the statement can be stored and signed in the Occurrence's
     * envelope.
     * 
* * .grafeas.v1.InTotoStatement intoto_statement = 4; * * @return Whether the intotoStatement field is set. */ public boolean hasIntotoStatement() { return ((bitField0_ & 0x00000008) != 0); } /** * * *
     * In-toto Statement representation as defined in spec.
     * The intoto_statement can contain any type of provenance. The serialized
     * payload of the statement can be stored and signed in the Occurrence's
     * envelope.
     * 
* * .grafeas.v1.InTotoStatement intoto_statement = 4; * * @return The intotoStatement. */ public io.grafeas.v1.InTotoStatement getIntotoStatement() { if (intotoStatementBuilder_ == null) { return intotoStatement_ == null ? io.grafeas.v1.InTotoStatement.getDefaultInstance() : intotoStatement_; } else { return intotoStatementBuilder_.getMessage(); } } /** * * *
     * In-toto Statement representation as defined in spec.
     * The intoto_statement can contain any type of provenance. The serialized
     * payload of the statement can be stored and signed in the Occurrence's
     * envelope.
     * 
* * .grafeas.v1.InTotoStatement intoto_statement = 4; */ public Builder setIntotoStatement(io.grafeas.v1.InTotoStatement value) { if (intotoStatementBuilder_ == null) { if (value == null) { throw new NullPointerException(); } intotoStatement_ = value; } else { intotoStatementBuilder_.setMessage(value); } bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
     * In-toto Statement representation as defined in spec.
     * The intoto_statement can contain any type of provenance. The serialized
     * payload of the statement can be stored and signed in the Occurrence's
     * envelope.
     * 
* * .grafeas.v1.InTotoStatement intoto_statement = 4; */ public Builder setIntotoStatement(io.grafeas.v1.InTotoStatement.Builder builderForValue) { if (intotoStatementBuilder_ == null) { intotoStatement_ = builderForValue.build(); } else { intotoStatementBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
     * In-toto Statement representation as defined in spec.
     * The intoto_statement can contain any type of provenance. The serialized
     * payload of the statement can be stored and signed in the Occurrence's
     * envelope.
     * 
* * .grafeas.v1.InTotoStatement intoto_statement = 4; */ public Builder mergeIntotoStatement(io.grafeas.v1.InTotoStatement value) { if (intotoStatementBuilder_ == null) { if (((bitField0_ & 0x00000008) != 0) && intotoStatement_ != null && intotoStatement_ != io.grafeas.v1.InTotoStatement.getDefaultInstance()) { getIntotoStatementBuilder().mergeFrom(value); } else { intotoStatement_ = value; } } else { intotoStatementBuilder_.mergeFrom(value); } bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
     * In-toto Statement representation as defined in spec.
     * The intoto_statement can contain any type of provenance. The serialized
     * payload of the statement can be stored and signed in the Occurrence's
     * envelope.
     * 
* * .grafeas.v1.InTotoStatement intoto_statement = 4; */ public Builder clearIntotoStatement() { bitField0_ = (bitField0_ & ~0x00000008); intotoStatement_ = null; if (intotoStatementBuilder_ != null) { intotoStatementBuilder_.dispose(); intotoStatementBuilder_ = null; } onChanged(); return this; } /** * * *
     * In-toto Statement representation as defined in spec.
     * The intoto_statement can contain any type of provenance. The serialized
     * payload of the statement can be stored and signed in the Occurrence's
     * envelope.
     * 
* * .grafeas.v1.InTotoStatement intoto_statement = 4; */ public io.grafeas.v1.InTotoStatement.Builder getIntotoStatementBuilder() { bitField0_ |= 0x00000008; onChanged(); return getIntotoStatementFieldBuilder().getBuilder(); } /** * * *
     * In-toto Statement representation as defined in spec.
     * The intoto_statement can contain any type of provenance. The serialized
     * payload of the statement can be stored and signed in the Occurrence's
     * envelope.
     * 
* * .grafeas.v1.InTotoStatement intoto_statement = 4; */ public io.grafeas.v1.InTotoStatementOrBuilder getIntotoStatementOrBuilder() { if (intotoStatementBuilder_ != null) { return intotoStatementBuilder_.getMessageOrBuilder(); } else { return intotoStatement_ == null ? io.grafeas.v1.InTotoStatement.getDefaultInstance() : intotoStatement_; } } /** * * *
     * In-toto Statement representation as defined in spec.
     * The intoto_statement can contain any type of provenance. The serialized
     * payload of the statement can be stored and signed in the Occurrence's
     * envelope.
     * 
* * .grafeas.v1.InTotoStatement intoto_statement = 4; */ private com.google.protobuf.SingleFieldBuilderV3< io.grafeas.v1.InTotoStatement, io.grafeas.v1.InTotoStatement.Builder, io.grafeas.v1.InTotoStatementOrBuilder> getIntotoStatementFieldBuilder() { if (intotoStatementBuilder_ == null) { intotoStatementBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.grafeas.v1.InTotoStatement, io.grafeas.v1.InTotoStatement.Builder, io.grafeas.v1.InTotoStatementOrBuilder>( getIntotoStatement(), getParentForChildren(), isClean()); intotoStatement_ = null; } return intotoStatementBuilder_; } @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:grafeas.v1.BuildOccurrence) } // @@protoc_insertion_point(class_scope:grafeas.v1.BuildOccurrence) private static final io.grafeas.v1.BuildOccurrence DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new io.grafeas.v1.BuildOccurrence(); } public static io.grafeas.v1.BuildOccurrence getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public BuildOccurrence parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public io.grafeas.v1.BuildOccurrence getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }