Class Source (2.42.0)

publicfinalclass SourceextendsGeneratedMessageV3implementsSourceOrBuilder

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

Protobuf type grafeas.v1beta1.provenance.Source

Implements

SourceOrBuilder

Inherited Members

com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

Static Fields

ADDITIONAL_CONTEXTS_FIELD_NUMBER

publicstaticfinalintADDITIONAL_CONTEXTS_FIELD_NUMBER
Field Value
Type Description
int

ARTIFACT_STORAGE_SOURCE_URI_FIELD_NUMBER

publicstaticfinalintARTIFACT_STORAGE_SOURCE_URI_FIELD_NUMBER
Field Value
Type Description
int

CONTEXT_FIELD_NUMBER

publicstaticfinalintCONTEXT_FIELD_NUMBER
Field Value
Type Description
int

FILE_HASHES_FIELD_NUMBER

publicstaticfinalintFILE_HASHES_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

publicstaticSourcegetDefaultInstance()
Returns
Type Description
Source

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

newBuilder()

publicstaticSource.BuildernewBuilder()
Returns
Type Description
Source.Builder

newBuilder(Source prototype)

publicstaticSource.BuildernewBuilder(Sourceprototype)
Parameter
Name Description
prototype Source
Returns
Type Description
Source.Builder

parseDelimitedFrom(InputStream input)

publicstaticSourceparseDelimitedFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
Source
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticSourceparseDelimitedFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Source
Exceptions
Type Description
IOException

parseFrom(byte[] data)

publicstaticSourceparseFrom(byte[]data)
Parameter
Name Description
data byte[]
Returns
Type Description
Source
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

publicstaticSourceparseFrom(byte[]data,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Source
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

publicstaticSourceparseFrom(ByteStringdata)
Parameter
Name Description
data ByteString
Returns
Type Description
Source
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

publicstaticSourceparseFrom(ByteStringdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Source
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

publicstaticSourceparseFrom(CodedInputStreaminput)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Source
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticSourceparseFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Source
Exceptions
Type Description
IOException

parseFrom(InputStream input)

publicstaticSourceparseFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
Source
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticSourceparseFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Source
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

publicstaticSourceparseFrom(ByteBufferdata)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Source
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

publicstaticSourceparseFrom(ByteBufferdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Source
Exceptions
Type Description
InvalidProtocolBufferException

parser()

publicstaticParser<Source>parser()
Returns
Type Description
Parser<Source>

Methods

containsFileHashes(String key)

publicbooleancontainsFileHashes(Stringkey)

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
Name Description
key String
Returns
Type Description
boolean

equals(Object obj)

publicbooleanequals(Objectobj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getAdditionalContexts(int index)

publicSourceContextgetAdditionalContexts(intindex)

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
Name Description
index int
Returns
Type Description
SourceContext

getAdditionalContextsCount()

publicintgetAdditionalContextsCount()

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
Type Description
int

getAdditionalContextsList()

publicList<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
Type Description
List<SourceContext>

getAdditionalContextsOrBuilder(int index)

publicSourceContextOrBuildergetAdditionalContextsOrBuilder(intindex)

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
Name Description
index int
Returns
Type Description
SourceContextOrBuilder

getAdditionalContextsOrBuilderList()

publicList<?extendsSourceContextOrBuilder>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
Type Description
List<? extends io.grafeas.v1beta1.source.SourceContextOrBuilder>

getArtifactStorageSourceUri()

publicStringgetArtifactStorageSourceUri()

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

string artifact_storage_source_uri = 1;

Returns
Type Description
String

The artifactStorageSourceUri.

getArtifactStorageSourceUriBytes()

publicByteStringgetArtifactStorageSourceUriBytes()

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

string artifact_storage_source_uri = 1;

Returns
Type Description
ByteString

The bytes for artifactStorageSourceUri.

getContext()

publicSourceContextgetContext()

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

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

Returns
Type Description
SourceContext

The context.

getContextOrBuilder()

publicSourceContextOrBuildergetContextOrBuilder()

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

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

Returns
Type Description
SourceContextOrBuilder

getDefaultInstanceForType()

publicSourcegetDefaultInstanceForType()
Returns
Type Description
Source

getFileHashes() (deprecated)

publicMap<String,FileHashes>getFileHashes()

Use #getFileHashesMap() instead.

Returns
Type Description
Map<String,FileHashes>

getFileHashesCount()

publicintgetFileHashesCount()

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
Type Description
int

getFileHashesMap()

publicMap<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
Type Description
Map<String,FileHashes>

getFileHashesOrDefault(String key, FileHashes defaultValue)

publicFileHashesgetFileHashesOrDefault(Stringkey,FileHashesdefaultValue)

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
Name Description
key String
defaultValue FileHashes
Returns
Type Description
FileHashes

getFileHashesOrThrow(String key)

publicFileHashesgetFileHashesOrThrow(Stringkey)

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
Name Description
key String
Returns
Type Description
FileHashes

getParserForType()

publicParser<Source>getParserForType()
Returns
Type Description
Parser<Source>
Overrides

getSerializedSize()

publicintgetSerializedSize()
Returns
Type Description
int
Overrides

getUnknownFields()

publicfinalUnknownFieldSetgetUnknownFields()
Returns
Type Description
UnknownFieldSet
Overrides

hasContext()

publicbooleanhasContext()

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

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

Returns
Type Description
boolean

Whether the context field is set.

hashCode()

publicinthashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapField(int number)

protectedMapFieldinternalGetMapField(intnumber)
Parameter
Name Description
number int
Returns
Type Description
MapField
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

publicSource.BuildernewBuilderForType()
Returns
Type Description
Source.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protectedSource.BuildernewBuilderForType(GeneratedMessageV3.BuilderParentparent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Source.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protectedObjectnewInstance(GeneratedMessageV3.UnusedPrivateParameterunused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

publicSource.BuildertoBuilder()
Returns
Type Description
Source.Builder

writeTo(CodedOutputStream output)

publicvoidwriteTo(CodedOutputStreamoutput)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年11月19日 UTC.