/* * 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/provenance.proto package io.grafeas.v1; /** * * *
* Source describes the location of the source used for the build. ** * Protobuf type {@code grafeas.v1.Source} */ public final class Source extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:grafeas.v1.Source) SourceOrBuilder { private static final long serialVersionUID = 0L; // Use Source.newBuilder() to construct. private Source(com.google.protobuf.GeneratedMessageV3.Builder> builder) { super(builder); } private Source() { artifactStorageSourceUri_ = ""; additionalContexts_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new Source(); } @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.Provenance.internal_static_grafeas_v1_Source_descriptor; } @SuppressWarnings({"rawtypes"}) @java.lang.Override protected com.google.protobuf.MapField internalGetMapField(int number) { switch (number) { case 2: return internalGetFileHashes(); default: throw new RuntimeException("Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Source_fieldAccessorTable .ensureFieldAccessorsInitialized( io.grafeas.v1.Source.class, io.grafeas.v1.Source.Builder.class); } public static final int ARTIFACT_STORAGE_SOURCE_URI_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object artifactStorageSourceUri_ = ""; /** * * *
* If provided, the input binary artifacts for the build came from this * location. ** *
string artifact_storage_source_uri = 1;
*
* @return The artifactStorageSourceUri.
*/
@java.lang.Override
public java.lang.String getArtifactStorageSourceUri() {
java.lang.Object ref = artifactStorageSourceUri_;
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();
artifactStorageSourceUri_ = s;
return s;
}
}
/**
*
*
* * If provided, the input binary artifacts for the build came from this * location. ** *
string artifact_storage_source_uri = 1;
*
* @return The bytes for artifactStorageSourceUri.
*/
@java.lang.Override
public com.google.protobuf.ByteString getArtifactStorageSourceUriBytes() {
java.lang.Object ref = artifactStorageSourceUri_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
artifactStorageSourceUri_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int FILE_HASHES_FIELD_NUMBER = 2;
private static final class FileHashesDefaultEntryHolder {
static final com.google.protobuf.MapEntry* Hash(es) of the build source, which can be used to verify that the original * source integrity was maintained in the build. * The keys to this map are file paths used as build source and the values * contain the hash values for those files. * If the build source came in a single package such as a gzipped tarfile * (.tar.gz), the FileHash will be for the single path to that file. ** *
map<string, .grafeas.v1.FileHashes> file_hashes = 2;
*/
@java.lang.Override
public boolean containsFileHashes(java.lang.String key) {
if (key == null) {
throw new NullPointerException("map key");
}
return internalGetFileHashes().getMap().containsKey(key);
}
/** Use {@link #getFileHashesMap()} instead. */
@java.lang.Override
@java.lang.Deprecated
public java.util.Map* Hash(es) of the build source, which can be used to verify that the original * source integrity was maintained in the build. * The keys to this map are file paths used as build source and the values * contain the hash values for those files. * If the build source came in a single package such as a gzipped tarfile * (.tar.gz), the FileHash will be for the single path to that file. ** *
map<string, .grafeas.v1.FileHashes> file_hashes = 2;
*/
@java.lang.Override
public java.util.Map* Hash(es) of the build source, which can be used to verify that the original * source integrity was maintained in the build. * The keys to this map are file paths used as build source and the values * contain the hash values for those files. * If the build source came in a single package such as a gzipped tarfile * (.tar.gz), the FileHash will be for the single path to that file. ** *
map<string, .grafeas.v1.FileHashes> file_hashes = 2;
*/
@java.lang.Override
public /* nullable */ io.grafeas.v1.FileHashes getFileHashesOrDefault(
java.lang.String key,
/* nullable */
io.grafeas.v1.FileHashes defaultValue) {
if (key == null) {
throw new NullPointerException("map key");
}
java.util.Map* Hash(es) of the build source, which can be used to verify that the original * source integrity was maintained in the build. * The keys to this map are file paths used as build source and the values * contain the hash values for those files. * If the build source came in a single package such as a gzipped tarfile * (.tar.gz), the FileHash will be for the single path to that file. ** *
map<string, .grafeas.v1.FileHashes> file_hashes = 2;
*/
@java.lang.Override
public io.grafeas.v1.FileHashes getFileHashesOrThrow(java.lang.String key) {
if (key == null) {
throw new NullPointerException("map key");
}
java.util.Map* If provided, the source code used for the build came from this location. ** *
.grafeas.v1.SourceContext context = 3;
*
* @return Whether the context field is set.
*/
@java.lang.Override
public boolean hasContext() {
return context_ != null;
}
/**
*
*
* * If provided, the source code used for the build came from this location. ** *
.grafeas.v1.SourceContext context = 3;
*
* @return The context.
*/
@java.lang.Override
public io.grafeas.v1.SourceContext getContext() {
return context_ == null ? io.grafeas.v1.SourceContext.getDefaultInstance() : context_;
}
/**
*
*
* * If provided, the source code used for the build came from this location. ** *
.grafeas.v1.SourceContext context = 3;
*/
@java.lang.Override
public io.grafeas.v1.SourceContextOrBuilder getContextOrBuilder() {
return context_ == null ? io.grafeas.v1.SourceContext.getDefaultInstance() : context_;
}
public static final int ADDITIONAL_CONTEXTS_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private java.util.List* If provided, some of the source code used for the build may be found in * these locations, in the case where the source repository had multiple * remotes or submodules. This list will not include the context specified in * the context field. ** *
repeated .grafeas.v1.SourceContext additional_contexts = 4;
*/
@java.lang.Override
public java.util.List* If provided, some of the source code used for the build may be found in * these locations, in the case where the source repository had multiple * remotes or submodules. This list will not include the context specified in * the context field. ** *
repeated .grafeas.v1.SourceContext additional_contexts = 4;
*/
@java.lang.Override
public java.util.List extends io.grafeas.v1.SourceContextOrBuilder>
getAdditionalContextsOrBuilderList() {
return additionalContexts_;
}
/**
*
*
* * If provided, some of the source code used for the build may be found in * these locations, in the case where the source repository had multiple * remotes or submodules. This list will not include the context specified in * the context field. ** *
repeated .grafeas.v1.SourceContext additional_contexts = 4;
*/
@java.lang.Override
public int getAdditionalContextsCount() {
return additionalContexts_.size();
}
/**
*
*
* * If provided, some of the source code used for the build may be found in * these locations, in the case where the source repository had multiple * remotes or submodules. This list will not include the context specified in * the context field. ** *
repeated .grafeas.v1.SourceContext additional_contexts = 4;
*/
@java.lang.Override
public io.grafeas.v1.SourceContext getAdditionalContexts(int index) {
return additionalContexts_.get(index);
}
/**
*
*
* * If provided, some of the source code used for the build may be found in * these locations, in the case where the source repository had multiple * remotes or submodules. This list will not include the context specified in * the context field. ** *
repeated .grafeas.v1.SourceContext additional_contexts = 4;
*/
@java.lang.Override
public io.grafeas.v1.SourceContextOrBuilder getAdditionalContextsOrBuilder(int index) {
return additionalContexts_.get(index);
}
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(artifactStorageSourceUri_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, artifactStorageSourceUri_);
}
com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
output, internalGetFileHashes(), FileHashesDefaultEntryHolder.defaultEntry, 2);
if (context_ != null) {
output.writeMessage(3, getContext());
}
for (int i = 0; i < additionalContexts_.size(); i++) {
output.writeMessage(4, additionalContexts_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(artifactStorageSourceUri_)) {
size +=
com.google.protobuf.GeneratedMessageV3.computeStringSize(1, artifactStorageSourceUri_);
}
for (java.util.Map.Entry* Source describes the location of the source used for the build. ** * Protobuf type {@code grafeas.v1.Source} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
* If provided, the input binary artifacts for the build came from this
* location.
*
*
* string artifact_storage_source_uri = 1;
*
* @return The artifactStorageSourceUri.
*/
public java.lang.String getArtifactStorageSourceUri() {
java.lang.Object ref = artifactStorageSourceUri_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
artifactStorageSourceUri_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* If provided, the input binary artifacts for the build came from this
* location.
*
*
* string artifact_storage_source_uri = 1;
*
* @return The bytes for artifactStorageSourceUri.
*/
public com.google.protobuf.ByteString getArtifactStorageSourceUriBytes() {
java.lang.Object ref = artifactStorageSourceUri_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
artifactStorageSourceUri_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* If provided, the input binary artifacts for the build came from this
* location.
*
*
* string artifact_storage_source_uri = 1;
*
* @param value The artifactStorageSourceUri to set.
* @return This builder for chaining.
*/
public Builder setArtifactStorageSourceUri(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
artifactStorageSourceUri_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* If provided, the input binary artifacts for the build came from this
* location.
*
*
* string artifact_storage_source_uri = 1;
*
* @return This builder for chaining.
*/
public Builder clearArtifactStorageSourceUri() {
artifactStorageSourceUri_ = getDefaultInstance().getArtifactStorageSourceUri();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* If provided, the input binary artifacts for the build came from this
* location.
*
*
* string artifact_storage_source_uri = 1;
*
* @param value The bytes for artifactStorageSourceUri to set.
* @return This builder for chaining.
*/
public Builder setArtifactStorageSourceUriBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
artifactStorageSourceUri_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private com.google.protobuf.MapField
* Hash(es) of the build source, which can be used to verify that the original
* source integrity was maintained in the build.
* The keys to this map are file paths used as build source and the values
* contain the hash values for those files.
* If the build source came in a single package such as a gzipped tarfile
* (.tar.gz), the FileHash will be for the single path to that file.
*
*
* map<string, .grafeas.v1.FileHashes> file_hashes = 2;
*/
@java.lang.Override
public boolean containsFileHashes(java.lang.String key) {
if (key == null) {
throw new NullPointerException("map key");
}
return internalGetFileHashes().getMap().containsKey(key);
}
/** Use {@link #getFileHashesMap()} instead. */
@java.lang.Override
@java.lang.Deprecated
public java.util.Map
* Hash(es) of the build source, which can be used to verify that the original
* source integrity was maintained in the build.
* The keys to this map are file paths used as build source and the values
* contain the hash values for those files.
* If the build source came in a single package such as a gzipped tarfile
* (.tar.gz), the FileHash will be for the single path to that file.
*
*
* map<string, .grafeas.v1.FileHashes> file_hashes = 2;
*/
@java.lang.Override
public java.util.Map
* Hash(es) of the build source, which can be used to verify that the original
* source integrity was maintained in the build.
* The keys to this map are file paths used as build source and the values
* contain the hash values for those files.
* If the build source came in a single package such as a gzipped tarfile
* (.tar.gz), the FileHash will be for the single path to that file.
*
*
* map<string, .grafeas.v1.FileHashes> file_hashes = 2;
*/
@java.lang.Override
public /* nullable */ io.grafeas.v1.FileHashes getFileHashesOrDefault(
java.lang.String key,
/* nullable */
io.grafeas.v1.FileHashes defaultValue) {
if (key == null) {
throw new NullPointerException("map key");
}
java.util.Map
* Hash(es) of the build source, which can be used to verify that the original
* source integrity was maintained in the build.
* The keys to this map are file paths used as build source and the values
* contain the hash values for those files.
* If the build source came in a single package such as a gzipped tarfile
* (.tar.gz), the FileHash will be for the single path to that file.
*
*
* map<string, .grafeas.v1.FileHashes> file_hashes = 2;
*/
@java.lang.Override
public io.grafeas.v1.FileHashes getFileHashesOrThrow(java.lang.String key) {
if (key == null) {
throw new NullPointerException("map key");
}
java.util.Map
* Hash(es) of the build source, which can be used to verify that the original
* source integrity was maintained in the build.
* The keys to this map are file paths used as build source and the values
* contain the hash values for those files.
* If the build source came in a single package such as a gzipped tarfile
* (.tar.gz), the FileHash will be for the single path to that file.
*
*
* map<string, .grafeas.v1.FileHashes> file_hashes = 2;
*/
public Builder removeFileHashes(java.lang.String key) {
if (key == null) {
throw new NullPointerException("map key");
}
internalGetMutableFileHashes().getMutableMap().remove(key);
return this;
}
/** Use alternate mutation accessors instead. */
@java.lang.Deprecated
public java.util.Map
* Hash(es) of the build source, which can be used to verify that the original
* source integrity was maintained in the build.
* The keys to this map are file paths used as build source and the values
* contain the hash values for those files.
* If the build source came in a single package such as a gzipped tarfile
* (.tar.gz), the FileHash will be for the single path to that file.
*
*
* map<string, .grafeas.v1.FileHashes> file_hashes = 2;
*/
public Builder putFileHashes(java.lang.String key, io.grafeas.v1.FileHashes value) {
if (key == null) {
throw new NullPointerException("map key");
}
if (value == null) {
throw new NullPointerException("map value");
}
internalGetMutableFileHashes().getMutableMap().put(key, value);
bitField0_ |= 0x00000002;
return this;
}
/**
*
*
*
* Hash(es) of the build source, which can be used to verify that the original
* source integrity was maintained in the build.
* The keys to this map are file paths used as build source and the values
* contain the hash values for those files.
* If the build source came in a single package such as a gzipped tarfile
* (.tar.gz), the FileHash will be for the single path to that file.
*
*
* map<string, .grafeas.v1.FileHashes> file_hashes = 2;
*/
public Builder putAllFileHashes(
java.util.Map
* If provided, the source code used for the build came from this location.
*
*
* .grafeas.v1.SourceContext context = 3;
*
* @return Whether the context field is set.
*/
public boolean hasContext() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* If provided, the source code used for the build came from this location.
*
*
* .grafeas.v1.SourceContext context = 3;
*
* @return The context.
*/
public io.grafeas.v1.SourceContext getContext() {
if (contextBuilder_ == null) {
return context_ == null ? io.grafeas.v1.SourceContext.getDefaultInstance() : context_;
} else {
return contextBuilder_.getMessage();
}
}
/**
*
*
*
* If provided, the source code used for the build came from this location.
*
*
* .grafeas.v1.SourceContext context = 3;
*/
public Builder setContext(io.grafeas.v1.SourceContext value) {
if (contextBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
context_ = value;
} else {
contextBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* If provided, the source code used for the build came from this location.
*
*
* .grafeas.v1.SourceContext context = 3;
*/
public Builder setContext(io.grafeas.v1.SourceContext.Builder builderForValue) {
if (contextBuilder_ == null) {
context_ = builderForValue.build();
} else {
contextBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* If provided, the source code used for the build came from this location.
*
*
* .grafeas.v1.SourceContext context = 3;
*/
public Builder mergeContext(io.grafeas.v1.SourceContext value) {
if (contextBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)
&& context_ != null
&& context_ != io.grafeas.v1.SourceContext.getDefaultInstance()) {
getContextBuilder().mergeFrom(value);
} else {
context_ = value;
}
} else {
contextBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* If provided, the source code used for the build came from this location.
*
*
* .grafeas.v1.SourceContext context = 3;
*/
public Builder clearContext() {
bitField0_ = (bitField0_ & ~0x00000004);
context_ = null;
if (contextBuilder_ != null) {
contextBuilder_.dispose();
contextBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* If provided, the source code used for the build came from this location.
*
*
* .grafeas.v1.SourceContext context = 3;
*/
public io.grafeas.v1.SourceContext.Builder getContextBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getContextFieldBuilder().getBuilder();
}
/**
*
*
*
* If provided, the source code used for the build came from this location.
*
*
* .grafeas.v1.SourceContext context = 3;
*/
public io.grafeas.v1.SourceContextOrBuilder getContextOrBuilder() {
if (contextBuilder_ != null) {
return contextBuilder_.getMessageOrBuilder();
} else {
return context_ == null ? io.grafeas.v1.SourceContext.getDefaultInstance() : context_;
}
}
/**
*
*
*
* If provided, the source code used for the build came from this location.
*
*
* .grafeas.v1.SourceContext context = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1.SourceContext,
io.grafeas.v1.SourceContext.Builder,
io.grafeas.v1.SourceContextOrBuilder>
getContextFieldBuilder() {
if (contextBuilder_ == null) {
contextBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
io.grafeas.v1.SourceContext,
io.grafeas.v1.SourceContext.Builder,
io.grafeas.v1.SourceContextOrBuilder>(
getContext(), getParentForChildren(), isClean());
context_ = null;
}
return contextBuilder_;
}
private java.util.List
* If provided, some of the source code used for the build may be found in
* these locations, in the case where the source repository had multiple
* remotes or submodules. This list will not include the context specified in
* the context field.
*
*
* repeated .grafeas.v1.SourceContext additional_contexts = 4;
*/
public java.util.List
* If provided, some of the source code used for the build may be found in
* these locations, in the case where the source repository had multiple
* remotes or submodules. This list will not include the context specified in
* the context field.
*
*
* repeated .grafeas.v1.SourceContext additional_contexts = 4;
*/
public int getAdditionalContextsCount() {
if (additionalContextsBuilder_ == null) {
return additionalContexts_.size();
} else {
return additionalContextsBuilder_.getCount();
}
}
/**
*
*
*
* If provided, some of the source code used for the build may be found in
* these locations, in the case where the source repository had multiple
* remotes or submodules. This list will not include the context specified in
* the context field.
*
*
* repeated .grafeas.v1.SourceContext additional_contexts = 4;
*/
public io.grafeas.v1.SourceContext getAdditionalContexts(int index) {
if (additionalContextsBuilder_ == null) {
return additionalContexts_.get(index);
} else {
return additionalContextsBuilder_.getMessage(index);
}
}
/**
*
*
*
* If provided, some of the source code used for the build may be found in
* these locations, in the case where the source repository had multiple
* remotes or submodules. This list will not include the context specified in
* the context field.
*
*
* repeated .grafeas.v1.SourceContext additional_contexts = 4;
*/
public Builder setAdditionalContexts(int index, io.grafeas.v1.SourceContext value) {
if (additionalContextsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAdditionalContextsIsMutable();
additionalContexts_.set(index, value);
onChanged();
} else {
additionalContextsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* If provided, some of the source code used for the build may be found in
* these locations, in the case where the source repository had multiple
* remotes or submodules. This list will not include the context specified in
* the context field.
*
*
* repeated .grafeas.v1.SourceContext additional_contexts = 4;
*/
public Builder setAdditionalContexts(
int index, io.grafeas.v1.SourceContext.Builder builderForValue) {
if (additionalContextsBuilder_ == null) {
ensureAdditionalContextsIsMutable();
additionalContexts_.set(index, builderForValue.build());
onChanged();
} else {
additionalContextsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* If provided, some of the source code used for the build may be found in
* these locations, in the case where the source repository had multiple
* remotes or submodules. This list will not include the context specified in
* the context field.
*
*
* repeated .grafeas.v1.SourceContext additional_contexts = 4;
*/
public Builder addAdditionalContexts(io.grafeas.v1.SourceContext value) {
if (additionalContextsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAdditionalContextsIsMutable();
additionalContexts_.add(value);
onChanged();
} else {
additionalContextsBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* If provided, some of the source code used for the build may be found in
* these locations, in the case where the source repository had multiple
* remotes or submodules. This list will not include the context specified in
* the context field.
*
*
* repeated .grafeas.v1.SourceContext additional_contexts = 4;
*/
public Builder addAdditionalContexts(int index, io.grafeas.v1.SourceContext value) {
if (additionalContextsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAdditionalContextsIsMutable();
additionalContexts_.add(index, value);
onChanged();
} else {
additionalContextsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* If provided, some of the source code used for the build may be found in
* these locations, in the case where the source repository had multiple
* remotes or submodules. This list will not include the context specified in
* the context field.
*
*
* repeated .grafeas.v1.SourceContext additional_contexts = 4;
*/
public Builder addAdditionalContexts(io.grafeas.v1.SourceContext.Builder builderForValue) {
if (additionalContextsBuilder_ == null) {
ensureAdditionalContextsIsMutable();
additionalContexts_.add(builderForValue.build());
onChanged();
} else {
additionalContextsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* If provided, some of the source code used for the build may be found in
* these locations, in the case where the source repository had multiple
* remotes or submodules. This list will not include the context specified in
* the context field.
*
*
* repeated .grafeas.v1.SourceContext additional_contexts = 4;
*/
public Builder addAdditionalContexts(
int index, io.grafeas.v1.SourceContext.Builder builderForValue) {
if (additionalContextsBuilder_ == null) {
ensureAdditionalContextsIsMutable();
additionalContexts_.add(index, builderForValue.build());
onChanged();
} else {
additionalContextsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* If provided, some of the source code used for the build may be found in
* these locations, in the case where the source repository had multiple
* remotes or submodules. This list will not include the context specified in
* the context field.
*
*
* repeated .grafeas.v1.SourceContext additional_contexts = 4;
*/
public Builder addAllAdditionalContexts(
java.lang.Iterable extends io.grafeas.v1.SourceContext> values) {
if (additionalContextsBuilder_ == null) {
ensureAdditionalContextsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, additionalContexts_);
onChanged();
} else {
additionalContextsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* If provided, some of the source code used for the build may be found in
* these locations, in the case where the source repository had multiple
* remotes or submodules. This list will not include the context specified in
* the context field.
*
*
* repeated .grafeas.v1.SourceContext additional_contexts = 4;
*/
public Builder clearAdditionalContexts() {
if (additionalContextsBuilder_ == null) {
additionalContexts_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
} else {
additionalContextsBuilder_.clear();
}
return this;
}
/**
*
*
*
* If provided, some of the source code used for the build may be found in
* these locations, in the case where the source repository had multiple
* remotes or submodules. This list will not include the context specified in
* the context field.
*
*
* repeated .grafeas.v1.SourceContext additional_contexts = 4;
*/
public Builder removeAdditionalContexts(int index) {
if (additionalContextsBuilder_ == null) {
ensureAdditionalContextsIsMutable();
additionalContexts_.remove(index);
onChanged();
} else {
additionalContextsBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* If provided, some of the source code used for the build may be found in
* these locations, in the case where the source repository had multiple
* remotes or submodules. This list will not include the context specified in
* the context field.
*
*
* repeated .grafeas.v1.SourceContext additional_contexts = 4;
*/
public io.grafeas.v1.SourceContext.Builder getAdditionalContextsBuilder(int index) {
return getAdditionalContextsFieldBuilder().getBuilder(index);
}
/**
*
*
*
* If provided, some of the source code used for the build may be found in
* these locations, in the case where the source repository had multiple
* remotes or submodules. This list will not include the context specified in
* the context field.
*
*
* repeated .grafeas.v1.SourceContext additional_contexts = 4;
*/
public io.grafeas.v1.SourceContextOrBuilder getAdditionalContextsOrBuilder(int index) {
if (additionalContextsBuilder_ == null) {
return additionalContexts_.get(index);
} else {
return additionalContextsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* If provided, some of the source code used for the build may be found in
* these locations, in the case where the source repository had multiple
* remotes or submodules. This list will not include the context specified in
* the context field.
*
*
* repeated .grafeas.v1.SourceContext additional_contexts = 4;
*/
public java.util.List extends io.grafeas.v1.SourceContextOrBuilder>
getAdditionalContextsOrBuilderList() {
if (additionalContextsBuilder_ != null) {
return additionalContextsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(additionalContexts_);
}
}
/**
*
*
*
* If provided, some of the source code used for the build may be found in
* these locations, in the case where the source repository had multiple
* remotes or submodules. This list will not include the context specified in
* the context field.
*
*
* repeated .grafeas.v1.SourceContext additional_contexts = 4;
*/
public io.grafeas.v1.SourceContext.Builder addAdditionalContextsBuilder() {
return getAdditionalContextsFieldBuilder()
.addBuilder(io.grafeas.v1.SourceContext.getDefaultInstance());
}
/**
*
*
*
* If provided, some of the source code used for the build may be found in
* these locations, in the case where the source repository had multiple
* remotes or submodules. This list will not include the context specified in
* the context field.
*
*
* repeated .grafeas.v1.SourceContext additional_contexts = 4;
*/
public io.grafeas.v1.SourceContext.Builder addAdditionalContextsBuilder(int index) {
return getAdditionalContextsFieldBuilder()
.addBuilder(index, io.grafeas.v1.SourceContext.getDefaultInstance());
}
/**
*
*
*
* If provided, some of the source code used for the build may be found in
* these locations, in the case where the source repository had multiple
* remotes or submodules. This list will not include the context specified in
* the context field.
*
*
* repeated .grafeas.v1.SourceContext additional_contexts = 4;
*/
public java.util.List