Class Source.Builder

  • All Implemented Interfaces:
    com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, SourceOrBuilder, Cloneable
    Enclosing class:
    Source

    public static final class Source.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Source.Builder>
    implements SourceOrBuilder
     Source describes the location of the source used for the build.
     
    Protobuf type grafeas.v1beta1.provenance.Source
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetMapField

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3.Builder<Source.Builder>
      • internalGetMutableMapField

        protected com.google.protobuf.MapField internalGetMutableMapField​(int number)
        Overrides:
        internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<Source.Builder>
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<Source.Builder>
      • clear

        public Source.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<Source.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<Source.Builder>
      • getDefaultInstanceForType

        public Source getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public Source build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public Source buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • clone

        public Source.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<Source.Builder>
      • setField

        public Source.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                       Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<Source.Builder>
      • clearField

        public Source.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Source.Builder>
      • clearOneof

        public Source.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Source.Builder>
      • setRepeatedField

        public Source.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                               int index,
                                               Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Source.Builder>
      • addRepeatedField

        public Source.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                               Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Source.Builder>
      • mergeFrom

        public Source.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Source.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Source.Builder>
      • mergeFrom

        public Source.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                 throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Source.Builder>
        Throws:
        IOException
      • getArtifactStorageSourceUri

        public String getArtifactStorageSourceUri()
         If provided, the input binary artifacts for the build came from this
         location.
         
        string artifact_storage_source_uri = 1;
        Specified by:
        getArtifactStorageSourceUri in interface SourceOrBuilder
        Returns:
        The artifactStorageSourceUri.
      • getArtifactStorageSourceUriBytes

        public com.google.protobuf.ByteString getArtifactStorageSourceUriBytes()
         If provided, the input binary artifacts for the build came from this
         location.
         
        string artifact_storage_source_uri = 1;
        Specified by:
        getArtifactStorageSourceUriBytes in interface SourceOrBuilder
        Returns:
        The bytes for artifactStorageSourceUri.
      • setArtifactStorageSourceUri

        public Source.Builder setArtifactStorageSourceUri​(String value)
         If provided, the input binary artifacts for the build came from this
         location.
         
        string artifact_storage_source_uri = 1;
        Parameters:
        value - The artifactStorageSourceUri to set.
        Returns:
        This builder for chaining.
      • clearArtifactStorageSourceUri

        public Source.Builder clearArtifactStorageSourceUri()
         If provided, the input binary artifacts for the build came from this
         location.
         
        string artifact_storage_source_uri = 1;
        Returns:
        This builder for chaining.
      • setArtifactStorageSourceUriBytes

        public Source.Builder setArtifactStorageSourceUriBytes​(com.google.protobuf.ByteString value)
         If provided, the input binary artifacts for the build came from this
         location.
         
        string artifact_storage_source_uri = 1;
        Parameters:
        value - The bytes for artifactStorageSourceUri to set.
        Returns:
        This builder for chaining.
      • getFileHashesCount

        public int getFileHashesCount()
        Description copied from interface: SourceOrBuilder
         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;
        Specified by:
        getFileHashesCount in interface SourceOrBuilder
      • containsFileHashes

        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;
        Specified by:
        containsFileHashes in interface SourceOrBuilder
      • 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;
        Specified by:
        getFileHashesMap in interface SourceOrBuilder
      • getFileHashesOrDefault

        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;
        Specified by:
        getFileHashesOrDefault in interface SourceOrBuilder
      • getFileHashesOrThrow

        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;
        Specified by:
        getFileHashesOrThrow in interface SourceOrBuilder
      • removeFileHashes

        public Source.Builder removeFileHashes​(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;
      • putFileHashes

        public Source.Builder putFileHashes​(String key,
                                            FileHashes value)
         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;
      • putAllFileHashes

        public Source.Builder putAllFileHashes​(Map<String,​FileHashes> values)
         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;
      • hasContext

        public boolean hasContext()
         If provided, the source code used for the build came from this location.
         
        .grafeas.v1beta1.source.SourceContext context = 3;
        Specified by:
        hasContext in interface SourceOrBuilder
        Returns:
        Whether the context field is set.
      • getContext

        public SourceContext getContext()
         If provided, the source code used for the build came from this location.
         
        .grafeas.v1beta1.source.SourceContext context = 3;
        Specified by:
        getContext in interface SourceOrBuilder
        Returns:
        The context.
      • setContext

        public Source.Builder setContext​(SourceContext value)
         If provided, the source code used for the build came from this location.
         
        .grafeas.v1beta1.source.SourceContext context = 3;
      • setContext

        public Source.Builder setContext​(SourceContext.Builder builderForValue)
         If provided, the source code used for the build came from this location.
         
        .grafeas.v1beta1.source.SourceContext context = 3;
      • mergeContext

        public Source.Builder mergeContext​(SourceContext value)
         If provided, the source code used for the build came from this location.
         
        .grafeas.v1beta1.source.SourceContext context = 3;
      • clearContext

        public Source.Builder clearContext()
         If provided, the source code used for the build came from this location.
         
        .grafeas.v1beta1.source.SourceContext context = 3;
      • getContextBuilder

        public SourceContext.Builder getContextBuilder()
         If provided, the source code used for the build came from this location.
         
        .grafeas.v1beta1.source.SourceContext context = 3;
      • 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;
        Specified by:
        getAdditionalContextsList in interface SourceOrBuilder
      • 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;
        Specified by:
        getAdditionalContextsCount in interface SourceOrBuilder
      • getAdditionalContexts

        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;
        Specified by:
        getAdditionalContexts in interface SourceOrBuilder
      • setAdditionalContexts

        public Source.Builder setAdditionalContexts​(int index,
                                                    SourceContext value)
         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;
      • setAdditionalContexts

        public Source.Builder setAdditionalContexts​(int index,
                                                    SourceContext.Builder builderForValue)
         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;
      • addAdditionalContexts

        public Source.Builder addAdditionalContexts​(SourceContext value)
         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;
      • addAdditionalContexts

        public Source.Builder addAdditionalContexts​(int index,
                                                    SourceContext value)
         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;
      • addAdditionalContexts

        public Source.Builder addAdditionalContexts​(SourceContext.Builder builderForValue)
         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;
      • addAdditionalContexts

        public Source.Builder addAdditionalContexts​(int index,
                                                    SourceContext.Builder builderForValue)
         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;
      • addAllAdditionalContexts

        public Source.Builder addAllAdditionalContexts​(Iterable<? extends SourceContext> values)
         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;
      • clearAdditionalContexts

        public Source.Builder clearAdditionalContexts()
         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;
      • removeAdditionalContexts

        public Source.Builder removeAdditionalContexts​(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;
      • getAdditionalContextsBuilder

        public SourceContext.Builder getAdditionalContextsBuilder​(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;
      • getAdditionalContextsOrBuilder

        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;
        Specified by:
        getAdditionalContextsOrBuilder in interface SourceOrBuilder
      • 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;
        Specified by:
        getAdditionalContextsOrBuilderList in interface SourceOrBuilder
      • addAdditionalContextsBuilder

        public SourceContext.Builder addAdditionalContextsBuilder()
         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;
      • addAdditionalContextsBuilder

        public SourceContext.Builder addAdditionalContextsBuilder​(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;
      • getAdditionalContextsBuilderList

        public List<SourceContext.Builder> getAdditionalContextsBuilderList()
         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;
      • setUnknownFields

        public final Source.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Source.Builder>
      • mergeUnknownFields

        public final Source.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Source.Builder>