Class Source (2.21.0)

public final class Source extends GeneratedMessageV3 implements SourceOrBuilder

Source describes the location of the source used for the build.

Protobuf type grafeas.v1beta1.provenance.Source

Implements

SourceOrBuilder

Static Fields

ADDITIONAL_CONTEXTS_FIELD_NUMBER

public static final int ADDITIONAL_CONTEXTS_FIELD_NUMBER
Field Value
TypeDescription
int

ARTIFACT_STORAGE_SOURCE_URI_FIELD_NUMBER

public static final int ARTIFACT_STORAGE_SOURCE_URI_FIELD_NUMBER
Field Value
TypeDescription
int

CONTEXT_FIELD_NUMBER

public static final int CONTEXT_FIELD_NUMBER
Field Value
TypeDescription
int

FILE_HASHES_FIELD_NUMBER

public static final int FILE_HASHES_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Source getDefaultInstance()
Returns
TypeDescription
Source

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static Source.Builder newBuilder()
Returns
TypeDescription
Source.Builder

newBuilder(Source prototype)

public static Source.Builder newBuilder(Source prototype)
Parameter
NameDescription
prototypeSource
Returns
TypeDescription
Source.Builder

parseDelimitedFrom(InputStream input)

public static Source parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Source
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Source parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Source
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Source parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Source
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Source parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Source
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Source parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Source
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Source parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Source
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Source parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Source
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Source parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Source
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Source parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Source
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Source parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Source
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Source parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Source
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Source parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Source
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Source> parser()
Returns
TypeDescription
Parser<Source>

Methods

containsFileHashes(String key)

public boolean containsFileHashes(String key)

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.v1beta1.provenance.FileHashes> file_hashes = 2;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getAdditionalContexts(int index)

public SourceContext getAdditionalContexts(int 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.v1beta1.source.SourceContext additional_contexts = 4;

Parameter
NameDescription
indexint
Returns
TypeDescription
SourceContext

getAdditionalContextsCount()

public int getAdditionalContextsCount()

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.v1beta1.source.SourceContext additional_contexts = 4;

Returns
TypeDescription
int

getAdditionalContextsList()

public List<SourceContext> getAdditionalContextsList()

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.v1beta1.source.SourceContext additional_contexts = 4;

Returns
TypeDescription
List<SourceContext>

getAdditionalContextsOrBuilder(int index)

public SourceContextOrBuilder getAdditionalContextsOrBuilder(int 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.v1beta1.source.SourceContext additional_contexts = 4;

Parameter
NameDescription
indexint
Returns
TypeDescription
SourceContextOrBuilder

getAdditionalContextsOrBuilderList()

public List<? extends SourceContextOrBuilder> getAdditionalContextsOrBuilderList()

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.v1beta1.source.SourceContext additional_contexts = 4;

Returns
TypeDescription
List<? extends io.grafeas.v1beta1.source.SourceContextOrBuilder>

getArtifactStorageSourceUri()

public String getArtifactStorageSourceUri()

If provided, the input binary artifacts for the build came from this location.

string artifact_storage_source_uri = 1;

Returns
TypeDescription
String

The artifactStorageSourceUri.

getArtifactStorageSourceUriBytes()

public ByteString getArtifactStorageSourceUriBytes()

If provided, the input binary artifacts for the build came from this location.

string artifact_storage_source_uri = 1;

Returns
TypeDescription
ByteString

The bytes for artifactStorageSourceUri.

getContext()

public SourceContext getContext()

If provided, the source code used for the build came from this location.

.grafeas.v1beta1.source.SourceContext context = 3;

Returns
TypeDescription
SourceContext

The context.

getContextOrBuilder()

public SourceContextOrBuilder getContextOrBuilder()

If provided, the source code used for the build came from this location.

.grafeas.v1beta1.source.SourceContext context = 3;

Returns
TypeDescription
SourceContextOrBuilder

getDefaultInstanceForType()

public Source getDefaultInstanceForType()
Returns
TypeDescription
Source

getFileHashes()

public Map<String,FileHashes> getFileHashes()

Use #getFileHashesMap() instead.

Returns
TypeDescription
Map<String,FileHashes>

getFileHashesCount()

public int getFileHashesCount()

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.v1beta1.provenance.FileHashes> file_hashes = 2;

Returns
TypeDescription
int

getFileHashesMap()

public Map<String,FileHashes> getFileHashesMap()

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.v1beta1.provenance.FileHashes> file_hashes = 2;

Returns
TypeDescription
Map<String,FileHashes>

getFileHashesOrDefault(String key, FileHashes defaultValue)

public FileHashes getFileHashesOrDefault(String key, FileHashes defaultValue)

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.v1beta1.provenance.FileHashes> file_hashes = 2;

Parameters
NameDescription
keyString
defaultValueFileHashes
Returns
TypeDescription
FileHashes

getFileHashesOrThrow(String key)

public FileHashes getFileHashesOrThrow(String key)

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.v1beta1.provenance.FileHashes> file_hashes = 2;

Parameter
NameDescription
keyString
Returns
TypeDescription
FileHashes

getParserForType()

public Parser<Source> getParserForType()
Returns
TypeDescription
Parser<Source>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

hasContext()

public boolean hasContext()

If provided, the source code used for the build came from this location.

.grafeas.v1beta1.source.SourceContext context = 3;

Returns
TypeDescription
boolean

Whether the context field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Source.Builder newBuilderForType()
Returns
TypeDescription
Source.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Source.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Source.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Source.Builder toBuilder()
Returns
TypeDescription
Source.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException