Class Command.Builder

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

    public static final class Command.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Command.Builder>
    implements CommandOrBuilder
     Command describes a step performed as part of the build pipeline.
     
    Protobuf type grafeas.v1beta1.provenance.Command
    • Method Detail

      • getDescriptor

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

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

        public Command.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<Command.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<Command.Builder>
      • getDefaultInstanceForType

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

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

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

        public Command.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<Command.Builder>
      • setField

        public Command.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<Command.Builder>
      • clearField

        public Command.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<Command.Builder>
      • clearOneof

        public Command.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<Command.Builder>
      • setRepeatedField

        public Command.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<Command.Builder>
      • addRepeatedField

        public Command.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<Command.Builder>
      • mergeFrom

        public Command.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<Command.Builder>
      • isInitialized

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

        public Command.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<Command.Builder>
        Throws:
        IOException
      • getName

        public String getName()
         Required. Name of the command, as presented on the command line, or if the
         command is packaged as a Docker container, as presented to `docker pull`.
         
        string name = 1;
        Specified by:
        getName in interface CommandOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         Required. Name of the command, as presented on the command line, or if the
         command is packaged as a Docker container, as presented to `docker pull`.
         
        string name = 1;
        Specified by:
        getNameBytes in interface CommandOrBuilder
        Returns:
        The bytes for name.
      • setName

        public Command.Builder setName​(String value)
         Required. Name of the command, as presented on the command line, or if the
         command is packaged as a Docker container, as presented to `docker pull`.
         
        string name = 1;
        Parameters:
        value - The name to set.
        Returns:
        This builder for chaining.
      • clearName

        public Command.Builder clearName()
         Required. Name of the command, as presented on the command line, or if the
         command is packaged as a Docker container, as presented to `docker pull`.
         
        string name = 1;
        Returns:
        This builder for chaining.
      • setNameBytes

        public Command.Builder setNameBytes​(com.google.protobuf.ByteString value)
         Required. Name of the command, as presented on the command line, or if the
         command is packaged as a Docker container, as presented to `docker pull`.
         
        string name = 1;
        Parameters:
        value - The bytes for name to set.
        Returns:
        This builder for chaining.
      • getEnvList

        public com.google.protobuf.ProtocolStringList getEnvList()
         Environment variables set before running this command.
         
        repeated string env = 2;
        Specified by:
        getEnvList in interface CommandOrBuilder
        Returns:
        A list containing the env.
      • getEnvCount

        public int getEnvCount()
         Environment variables set before running this command.
         
        repeated string env = 2;
        Specified by:
        getEnvCount in interface CommandOrBuilder
        Returns:
        The count of env.
      • getEnv

        public String getEnv​(int index)
         Environment variables set before running this command.
         
        repeated string env = 2;
        Specified by:
        getEnv in interface CommandOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The env at the given index.
      • getEnvBytes

        public com.google.protobuf.ByteString getEnvBytes​(int index)
         Environment variables set before running this command.
         
        repeated string env = 2;
        Specified by:
        getEnvBytes in interface CommandOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the env at the given index.
      • setEnv

        public Command.Builder setEnv​(int index,
                                      String value)
         Environment variables set before running this command.
         
        repeated string env = 2;
        Parameters:
        index - The index to set the value at.
        value - The env to set.
        Returns:
        This builder for chaining.
      • addEnv

        public Command.Builder addEnv​(String value)
         Environment variables set before running this command.
         
        repeated string env = 2;
        Parameters:
        value - The env to add.
        Returns:
        This builder for chaining.
      • addAllEnv

        public Command.Builder addAllEnv​(Iterable<String> values)
         Environment variables set before running this command.
         
        repeated string env = 2;
        Parameters:
        values - The env to add.
        Returns:
        This builder for chaining.
      • clearEnv

        public Command.Builder clearEnv()
         Environment variables set before running this command.
         
        repeated string env = 2;
        Returns:
        This builder for chaining.
      • addEnvBytes

        public Command.Builder addEnvBytes​(com.google.protobuf.ByteString value)
         Environment variables set before running this command.
         
        repeated string env = 2;
        Parameters:
        value - The bytes of the env to add.
        Returns:
        This builder for chaining.
      • getArgsList

        public com.google.protobuf.ProtocolStringList getArgsList()
         Command-line arguments used when executing this command.
         
        repeated string args = 3;
        Specified by:
        getArgsList in interface CommandOrBuilder
        Returns:
        A list containing the args.
      • getArgsCount

        public int getArgsCount()
         Command-line arguments used when executing this command.
         
        repeated string args = 3;
        Specified by:
        getArgsCount in interface CommandOrBuilder
        Returns:
        The count of args.
      • getArgs

        public String getArgs​(int index)
         Command-line arguments used when executing this command.
         
        repeated string args = 3;
        Specified by:
        getArgs in interface CommandOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The args at the given index.
      • getArgsBytes

        public com.google.protobuf.ByteString getArgsBytes​(int index)
         Command-line arguments used when executing this command.
         
        repeated string args = 3;
        Specified by:
        getArgsBytes in interface CommandOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the args at the given index.
      • setArgs

        public Command.Builder setArgs​(int index,
                                       String value)
         Command-line arguments used when executing this command.
         
        repeated string args = 3;
        Parameters:
        index - The index to set the value at.
        value - The args to set.
        Returns:
        This builder for chaining.
      • addArgs

        public Command.Builder addArgs​(String value)
         Command-line arguments used when executing this command.
         
        repeated string args = 3;
        Parameters:
        value - The args to add.
        Returns:
        This builder for chaining.
      • addAllArgs

        public Command.Builder addAllArgs​(Iterable<String> values)
         Command-line arguments used when executing this command.
         
        repeated string args = 3;
        Parameters:
        values - The args to add.
        Returns:
        This builder for chaining.
      • clearArgs

        public Command.Builder clearArgs()
         Command-line arguments used when executing this command.
         
        repeated string args = 3;
        Returns:
        This builder for chaining.
      • addArgsBytes

        public Command.Builder addArgsBytes​(com.google.protobuf.ByteString value)
         Command-line arguments used when executing this command.
         
        repeated string args = 3;
        Parameters:
        value - The bytes of the args to add.
        Returns:
        This builder for chaining.
      • getDir

        public String getDir()
         Working directory (relative to project source root) used when running this
         command.
         
        string dir = 4;
        Specified by:
        getDir in interface CommandOrBuilder
        Returns:
        The dir.
      • getDirBytes

        public com.google.protobuf.ByteString getDirBytes()
         Working directory (relative to project source root) used when running this
         command.
         
        string dir = 4;
        Specified by:
        getDirBytes in interface CommandOrBuilder
        Returns:
        The bytes for dir.
      • setDir

        public Command.Builder setDir​(String value)
         Working directory (relative to project source root) used when running this
         command.
         
        string dir = 4;
        Parameters:
        value - The dir to set.
        Returns:
        This builder for chaining.
      • clearDir

        public Command.Builder clearDir()
         Working directory (relative to project source root) used when running this
         command.
         
        string dir = 4;
        Returns:
        This builder for chaining.
      • setDirBytes

        public Command.Builder setDirBytes​(com.google.protobuf.ByteString value)
         Working directory (relative to project source root) used when running this
         command.
         
        string dir = 4;
        Parameters:
        value - The bytes for dir to set.
        Returns:
        This builder for chaining.
      • getId

        public String getId()
         Optional unique identifier for this command, used in wait_for to reference
         this command as a dependency.
         
        string id = 5;
        Specified by:
        getId in interface CommandOrBuilder
        Returns:
        The id.
      • getIdBytes

        public com.google.protobuf.ByteString getIdBytes()
         Optional unique identifier for this command, used in wait_for to reference
         this command as a dependency.
         
        string id = 5;
        Specified by:
        getIdBytes in interface CommandOrBuilder
        Returns:
        The bytes for id.
      • setId

        public Command.Builder setId​(String value)
         Optional unique identifier for this command, used in wait_for to reference
         this command as a dependency.
         
        string id = 5;
        Parameters:
        value - The id to set.
        Returns:
        This builder for chaining.
      • clearId

        public Command.Builder clearId()
         Optional unique identifier for this command, used in wait_for to reference
         this command as a dependency.
         
        string id = 5;
        Returns:
        This builder for chaining.
      • setIdBytes

        public Command.Builder setIdBytes​(com.google.protobuf.ByteString value)
         Optional unique identifier for this command, used in wait_for to reference
         this command as a dependency.
         
        string id = 5;
        Parameters:
        value - The bytes for id to set.
        Returns:
        This builder for chaining.
      • getWaitForList

        public com.google.protobuf.ProtocolStringList getWaitForList()
         The ID(s) of the command(s) that this command depends on.
         
        repeated string wait_for = 6;
        Specified by:
        getWaitForList in interface CommandOrBuilder
        Returns:
        A list containing the waitFor.
      • getWaitForCount

        public int getWaitForCount()
         The ID(s) of the command(s) that this command depends on.
         
        repeated string wait_for = 6;
        Specified by:
        getWaitForCount in interface CommandOrBuilder
        Returns:
        The count of waitFor.
      • getWaitFor

        public String getWaitFor​(int index)
         The ID(s) of the command(s) that this command depends on.
         
        repeated string wait_for = 6;
        Specified by:
        getWaitFor in interface CommandOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The waitFor at the given index.
      • getWaitForBytes

        public com.google.protobuf.ByteString getWaitForBytes​(int index)
         The ID(s) of the command(s) that this command depends on.
         
        repeated string wait_for = 6;
        Specified by:
        getWaitForBytes in interface CommandOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the waitFor at the given index.
      • setWaitFor

        public Command.Builder setWaitFor​(int index,
                                          String value)
         The ID(s) of the command(s) that this command depends on.
         
        repeated string wait_for = 6;
        Parameters:
        index - The index to set the value at.
        value - The waitFor to set.
        Returns:
        This builder for chaining.
      • addWaitFor

        public Command.Builder addWaitFor​(String value)
         The ID(s) of the command(s) that this command depends on.
         
        repeated string wait_for = 6;
        Parameters:
        value - The waitFor to add.
        Returns:
        This builder for chaining.
      • addAllWaitFor

        public Command.Builder addAllWaitFor​(Iterable<String> values)
         The ID(s) of the command(s) that this command depends on.
         
        repeated string wait_for = 6;
        Parameters:
        values - The waitFor to add.
        Returns:
        This builder for chaining.
      • clearWaitFor

        public Command.Builder clearWaitFor()
         The ID(s) of the command(s) that this command depends on.
         
        repeated string wait_for = 6;
        Returns:
        This builder for chaining.
      • addWaitForBytes

        public Command.Builder addWaitForBytes​(com.google.protobuf.ByteString value)
         The ID(s) of the command(s) that this command depends on.
         
        repeated string wait_for = 6;
        Parameters:
        value - The bytes of the waitFor to add.
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final Command.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<Command.Builder>
      • mergeUnknownFields

        public final Command.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<Command.Builder>