Class Command.Builder (2.20.0)

public static final class Command.Builder extends GeneratedMessageV3.Builder<Command.Builder> implements CommandOrBuilder

Command describes a step performed as part of the build pipeline.

Protobuf type grafeas.v1beta1.provenance.Command

Implements

CommandOrBuilder

Static Methods

getDescriptor()

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

Methods

addAllArgs(Iterable<String> values)

public Command.Builder addAllArgs(Iterable<String> values)

Command-line arguments used when executing this command.

repeated string args = 3;

Parameter
NameDescription
valuesIterable<String>

The args to add.

Returns
TypeDescription
Command.Builder

This builder for chaining.

addAllEnv(Iterable<String> values)

public Command.Builder addAllEnv(Iterable<String> values)

Environment variables set before running this command.

repeated string env = 2;

Parameter
NameDescription
valuesIterable<String>

The env to add.

Returns
TypeDescription
Command.Builder

This builder for chaining.

addAllWaitFor(Iterable<String> values)

public Command.Builder addAllWaitFor(Iterable<String> values)

The ID(s) of the command(s) that this command depends on.

repeated string wait_for = 6;

Parameter
NameDescription
valuesIterable<String>

The waitFor to add.

Returns
TypeDescription
Command.Builder

This builder for chaining.

addArgs(String value)

public Command.Builder addArgs(String value)

Command-line arguments used when executing this command.

repeated string args = 3;

Parameter
NameDescription
valueString

The args to add.

Returns
TypeDescription
Command.Builder

This builder for chaining.

addArgsBytes(ByteString value)

public Command.Builder addArgsBytes(ByteString value)

Command-line arguments used when executing this command.

repeated string args = 3;

Parameter
NameDescription
valueByteString

The bytes of the args to add.

Returns
TypeDescription
Command.Builder

This builder for chaining.

addEnv(String value)

public Command.Builder addEnv(String value)

Environment variables set before running this command.

repeated string env = 2;

Parameter
NameDescription
valueString

The env to add.

Returns
TypeDescription
Command.Builder

This builder for chaining.

addEnvBytes(ByteString value)

public Command.Builder addEnvBytes(ByteString value)

Environment variables set before running this command.

repeated string env = 2;

Parameter
NameDescription
valueByteString

The bytes of the env to add.

Returns
TypeDescription
Command.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Command.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Command.Builder
Overrides

addWaitFor(String value)

public Command.Builder addWaitFor(String value)

The ID(s) of the command(s) that this command depends on.

repeated string wait_for = 6;

Parameter
NameDescription
valueString

The waitFor to add.

Returns
TypeDescription
Command.Builder

This builder for chaining.

addWaitForBytes(ByteString value)

public Command.Builder addWaitForBytes(ByteString value)

The ID(s) of the command(s) that this command depends on.

repeated string wait_for = 6;

Parameter
NameDescription
valueByteString

The bytes of the waitFor to add.

Returns
TypeDescription
Command.Builder

This builder for chaining.

build()

public Command build()
Returns
TypeDescription
Command

buildPartial()

public Command buildPartial()
Returns
TypeDescription
Command

clear()

public Command.Builder clear()
Returns
TypeDescription
Command.Builder
Overrides

clearArgs()

public Command.Builder clearArgs()

Command-line arguments used when executing this command.

repeated string args = 3;

Returns
TypeDescription
Command.Builder

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
TypeDescription
Command.Builder

This builder for chaining.

clearEnv()

public Command.Builder clearEnv()

Environment variables set before running this command.

repeated string env = 2;

Returns
TypeDescription
Command.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Command.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Command.Builder
Overrides

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
TypeDescription
Command.Builder

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
TypeDescription
Command.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Command.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Command.Builder
Overrides

clearWaitFor()

public Command.Builder clearWaitFor()

The ID(s) of the command(s) that this command depends on.

repeated string wait_for = 6;

Returns
TypeDescription
Command.Builder

This builder for chaining.

clone()

public Command.Builder clone()
Returns
TypeDescription
Command.Builder
Overrides

getArgs(int index)

public String getArgs(int index)

Command-line arguments used when executing this command.

repeated string args = 3;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The args at the given index.

getArgsBytes(int index)

public ByteString getArgsBytes(int index)

Command-line arguments used when executing this command.

repeated string args = 3;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the args at the given index.

getArgsCount()

public int getArgsCount()

Command-line arguments used when executing this command.

repeated string args = 3;

Returns
TypeDescription
int

The count of args.

getArgsList()

public ProtocolStringList getArgsList()

Command-line arguments used when executing this command.

repeated string args = 3;

Returns
TypeDescription
ProtocolStringList

A list containing the args.

getDefaultInstanceForType()

public Command getDefaultInstanceForType()
Returns
TypeDescription
Command

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getDir()

public String getDir()

Working directory (relative to project source root) used when running this command.

string dir = 4;

Returns
TypeDescription
String

The dir.

getDirBytes()

public ByteString getDirBytes()

Working directory (relative to project source root) used when running this command.

string dir = 4;

Returns
TypeDescription
ByteString

The bytes for dir.

getEnv(int index)

public String getEnv(int index)

Environment variables set before running this command.

repeated string env = 2;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The env at the given index.

getEnvBytes(int index)

public ByteString getEnvBytes(int index)

Environment variables set before running this command.

repeated string env = 2;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the env at the given index.

getEnvCount()

public int getEnvCount()

Environment variables set before running this command.

repeated string env = 2;

Returns
TypeDescription
int

The count of env.

getEnvList()

public ProtocolStringList getEnvList()

Environment variables set before running this command.

repeated string env = 2;

Returns
TypeDescription
ProtocolStringList

A list containing the env.

getId()

public String getId()

Optional unique identifier for this command, used in wait_for to reference this command as a dependency.

string id = 5;

Returns
TypeDescription
String

The id.

getIdBytes()

public ByteString getIdBytes()

Optional unique identifier for this command, used in wait_for to reference this command as a dependency.

string id = 5;

Returns
TypeDescription
ByteString

The bytes for id.

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;

Returns
TypeDescription
String

The name.

getNameBytes()

public 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;

Returns
TypeDescription
ByteString

The bytes for name.

getWaitFor(int index)

public String getWaitFor(int index)

The ID(s) of the command(s) that this command depends on.

repeated string wait_for = 6;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The waitFor at the given index.

getWaitForBytes(int index)

public ByteString getWaitForBytes(int index)

The ID(s) of the command(s) that this command depends on.

repeated string wait_for = 6;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the waitFor at the given index.

getWaitForCount()

public int getWaitForCount()

The ID(s) of the command(s) that this command depends on.

repeated string wait_for = 6;

Returns
TypeDescription
int

The count of waitFor.

getWaitForList()

public ProtocolStringList getWaitForList()

The ID(s) of the command(s) that this command depends on.

repeated string wait_for = 6;

Returns
TypeDescription
ProtocolStringList

A list containing the waitFor.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Command.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Command.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Command.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Command.Builder
Overrides

mergeFrom(Command other)

public Command.Builder mergeFrom(Command other)
Parameter
NameDescription
otherCommand
Returns
TypeDescription
Command.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Command.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Command.Builder
Overrides

setArgs(int index, String value)

public Command.Builder setArgs(int index, String value)

Command-line arguments used when executing this command.

repeated string args = 3;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The args to set.

Returns
TypeDescription
Command.Builder

This builder for chaining.

setDir(String value)

public Command.Builder setDir(String value)

Working directory (relative to project source root) used when running this command.

string dir = 4;

Parameter
NameDescription
valueString

The dir to set.

Returns
TypeDescription
Command.Builder

This builder for chaining.

setDirBytes(ByteString value)

public Command.Builder setDirBytes(ByteString value)

Working directory (relative to project source root) used when running this command.

string dir = 4;

Parameter
NameDescription
valueByteString

The bytes for dir to set.

Returns
TypeDescription
Command.Builder

This builder for chaining.

setEnv(int index, String value)

public Command.Builder setEnv(int index, String value)

Environment variables set before running this command.

repeated string env = 2;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The env to set.

Returns
TypeDescription
Command.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Command.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Command.Builder
Overrides

setId(String value)

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;

Parameter
NameDescription
valueString

The id to set.

Returns
TypeDescription
Command.Builder

This builder for chaining.

setIdBytes(ByteString value)

public Command.Builder setIdBytes(ByteString value)

Optional unique identifier for this command, used in wait_for to reference this command as a dependency.

string id = 5;

Parameter
NameDescription
valueByteString

The bytes for id to set.

Returns
TypeDescription
Command.Builder

This builder for chaining.

setName(String value)

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;

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
Command.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Command.Builder setNameBytes(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;

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
Command.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Command.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Command.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final Command.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Command.Builder
Overrides

setWaitFor(int index, String value)

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
NameDescription
indexint

The index to set the value at.

valueString

The waitFor to set.

Returns
TypeDescription
Command.Builder

This builder for chaining.