Command.java
/*
* Copyright 2019 The Grafeas Authors. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: grafeas/v1/provenance.proto
package io.grafeas.v1;
/**
*
*
* <pre>
* Command describes a step performed as part of the build pipeline.
* </pre>
*
* Protobuf type {@code grafeas.v1.Command}
*/
public final class Command extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:grafeas.v1.Command)
CommandOrBuilder {
private static final long serialVersionUID = 0L;
// Use Command.newBuilder() to construct.
private Command(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private Command() {
name_ = "";
env_ = com.google.protobuf.LazyStringArrayList.EMPTY;
args_ = com.google.protobuf.LazyStringArrayList.EMPTY;
dir_ = "";
id_ = "";
waitFor_ = com.google.protobuf.LazyStringArrayList.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Command();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Command_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Command_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.grafeas.v1.Command.class, io.grafeas.v1.Command.Builder.class);
}
public static final int NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object name_;
/**
*
*
* <pre>
* 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`.
* </pre>
*
* <code>string name = 1;</code>
*
* @return The name.
*/
@java.lang.Override
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
}
}
/**
*
*
* <pre>
* 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`.
* </pre>
*
* <code>string name = 1;</code>
*
* @return The bytes for name.
*/
@java.lang.Override
public com.google.protobuf.ByteString getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ENV_FIELD_NUMBER = 2;
private com.google.protobuf.LazyStringList env_;
/**
*
*
* <pre>
* Environment variables set before running this command.
* </pre>
*
* <code>repeated string env = 2;</code>
*
* @return A list containing the env.
*/
public com.google.protobuf.ProtocolStringList getEnvList() {
return env_;
}
/**
*
*
* <pre>
* Environment variables set before running this command.
* </pre>
*
* <code>repeated string env = 2;</code>
*
* @return The count of env.
*/
public int getEnvCount() {
return env_.size();
}
/**
*
*
* <pre>
* Environment variables set before running this command.
* </pre>
*
* <code>repeated string env = 2;</code>
*
* @param index The index of the element to return.
* @return The env at the given index.
*/
public java.lang.String getEnv(int index) {
return env_.get(index);
}
/**
*
*
* <pre>
* Environment variables set before running this command.
* </pre>
*
* <code>repeated string env = 2;</code>
*
* @param index The index of the value to return.
* @return The bytes of the env at the given index.
*/
public com.google.protobuf.ByteString getEnvBytes(int index) {
return env_.getByteString(index);
}
public static final int ARGS_FIELD_NUMBER = 3;
private com.google.protobuf.LazyStringList args_;
/**
*
*
* <pre>
* Command-line arguments used when executing this command.
* </pre>
*
* <code>repeated string args = 3;</code>
*
* @return A list containing the args.
*/
public com.google.protobuf.ProtocolStringList getArgsList() {
return args_;
}
/**
*
*
* <pre>
* Command-line arguments used when executing this command.
* </pre>
*
* <code>repeated string args = 3;</code>
*
* @return The count of args.
*/
public int getArgsCount() {
return args_.size();
}
/**
*
*
* <pre>
* Command-line arguments used when executing this command.
* </pre>
*
* <code>repeated string args = 3;</code>
*
* @param index The index of the element to return.
* @return The args at the given index.
*/
public java.lang.String getArgs(int index) {
return args_.get(index);
}
/**
*
*
* <pre>
* Command-line arguments used when executing this command.
* </pre>
*
* <code>repeated string args = 3;</code>
*
* @param index The index of the value to return.
* @return The bytes of the args at the given index.
*/
public com.google.protobuf.ByteString getArgsBytes(int index) {
return args_.getByteString(index);
}
public static final int DIR_FIELD_NUMBER = 4;
private volatile java.lang.Object dir_;
/**
*
*
* <pre>
* Working directory (relative to project source root) used when running this
* command.
* </pre>
*
* <code>string dir = 4;</code>
*
* @return The dir.
*/
@java.lang.Override
public java.lang.String getDir() {
java.lang.Object ref = dir_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
dir_ = s;
return s;
}
}
/**
*
*
* <pre>
* Working directory (relative to project source root) used when running this
* command.
* </pre>
*
* <code>string dir = 4;</code>
*
* @return The bytes for dir.
*/
@java.lang.Override
public com.google.protobuf.ByteString getDirBytes() {
java.lang.Object ref = dir_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
dir_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ID_FIELD_NUMBER = 5;
private volatile java.lang.Object id_;
/**
*
*
* <pre>
* Optional unique identifier for this command, used in wait_for to reference
* this command as a dependency.
* </pre>
*
* <code>string id = 5;</code>
*
* @return The id.
*/
@java.lang.Override
public java.lang.String getId() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
}
}
/**
*
*
* <pre>
* Optional unique identifier for this command, used in wait_for to reference
* this command as a dependency.
* </pre>
*
* <code>string id = 5;</code>
*
* @return The bytes for id.
*/
@java.lang.Override
public com.google.protobuf.ByteString getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int WAIT_FOR_FIELD_NUMBER = 6;
private com.google.protobuf.LazyStringList waitFor_;
/**
*
*
* <pre>
* The ID(s) of the command(s) that this command depends on.
* </pre>
*
* <code>repeated string wait_for = 6;</code>
*
* @return A list containing the waitFor.
*/
public com.google.protobuf.ProtocolStringList getWaitForList() {
return waitFor_;
}
/**
*
*
* <pre>
* The ID(s) of the command(s) that this command depends on.
* </pre>
*
* <code>repeated string wait_for = 6;</code>
*
* @return The count of waitFor.
*/
public int getWaitForCount() {
return waitFor_.size();
}
/**
*
*
* <pre>
* The ID(s) of the command(s) that this command depends on.
* </pre>
*
* <code>repeated string wait_for = 6;</code>
*
* @param index The index of the element to return.
* @return The waitFor at the given index.
*/
public java.lang.String getWaitFor(int index) {
return waitFor_.get(index);
}
/**
*
*
* <pre>
* The ID(s) of the command(s) that this command depends on.
* </pre>
*
* <code>repeated string wait_for = 6;</code>
*
* @param index The index of the value to return.
* @return The bytes of the waitFor at the given index.
*/
public com.google.protobuf.ByteString getWaitForBytes(int index) {
return waitFor_.getByteString(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
for (int i = 0; i < env_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, env_.getRaw(i));
}
for (int i = 0; i < args_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, args_.getRaw(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dir_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, dir_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, id_);
}
for (int i = 0; i < waitFor_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, waitFor_.getRaw(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
{
int dataSize = 0;
for (int i = 0; i < env_.size(); i++) {
dataSize += computeStringSizeNoTag(env_.getRaw(i));
}
size += dataSize;
size += 1 * getEnvList().size();
}
{
int dataSize = 0;
for (int i = 0; i < args_.size(); i++) {
dataSize += computeStringSizeNoTag(args_.getRaw(i));
}
size += dataSize;
size += 1 * getArgsList().size();
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dir_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, dir_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, id_);
}
{
int dataSize = 0;
for (int i = 0; i < waitFor_.size(); i++) {
dataSize += computeStringSizeNoTag(waitFor_.getRaw(i));
}
size += dataSize;
size += 1 * getWaitForList().size();
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.grafeas.v1.Command)) {
return super.equals(obj);
}
io.grafeas.v1.Command other = (io.grafeas.v1.Command) obj;
if (!getName().equals(other.getName())) return false;
if (!getEnvList().equals(other.getEnvList())) return false;
if (!getArgsList().equals(other.getArgsList())) return false;
if (!getDir().equals(other.getDir())) return false;
if (!getId().equals(other.getId())) return false;
if (!getWaitForList().equals(other.getWaitForList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
if (getEnvCount() > 0) {
hash = (37 * hash) + ENV_FIELD_NUMBER;
hash = (53 * hash) + getEnvList().hashCode();
}
if (getArgsCount() > 0) {
hash = (37 * hash) + ARGS_FIELD_NUMBER;
hash = (53 * hash) + getArgsList().hashCode();
}
hash = (37 * hash) + DIR_FIELD_NUMBER;
hash = (53 * hash) + getDir().hashCode();
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + getId().hashCode();
if (getWaitForCount() > 0) {
hash = (37 * hash) + WAIT_FOR_FIELD_NUMBER;
hash = (53 * hash) + getWaitForList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.grafeas.v1.Command parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grafeas.v1.Command parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grafeas.v1.Command parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grafeas.v1.Command parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grafeas.v1.Command parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.grafeas.v1.Command parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.grafeas.v1.Command parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.grafeas.v1.Command parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static io.grafeas.v1.Command parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static io.grafeas.v1.Command parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static io.grafeas.v1.Command parseFrom(com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static io.grafeas.v1.Command parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.grafeas.v1.Command prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
* <pre>
* Command describes a step performed as part of the build pipeline.
* </pre>
*
* Protobuf type {@code grafeas.v1.Command}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
implements
// @@protoc_insertion_point(builder_implements:grafeas.v1.Command)
io.grafeas.v1.CommandOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Command_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Command_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.grafeas.v1.Command.class, io.grafeas.v1.Command.Builder.class);
}
// Construct using io.grafeas.v1.Command.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
name_ = "";
env_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
args_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000002);
dir_ = "";
id_ = "";
waitFor_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return io.grafeas.v1.Provenance.internal_static_grafeas_v1_Command_descriptor;
}
@java.lang.Override
public io.grafeas.v1.Command getDefaultInstanceForType() {
return io.grafeas.v1.Command.getDefaultInstance();
}
@java.lang.Override
public io.grafeas.v1.Command build() {
io.grafeas.v1.Command result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.grafeas.v1.Command buildPartial() {
io.grafeas.v1.Command result = new io.grafeas.v1.Command(this);
int from_bitField0_ = bitField0_;
result.name_ = name_;
if (((bitField0_ & 0x00000001) != 0)) {
env_ = env_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000001);
}
result.env_ = env_;
if (((bitField0_ & 0x00000002) != 0)) {
args_ = args_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000002);
}
result.args_ = args_;
result.dir_ = dir_;
result.id_ = id_;
if (((bitField0_ & 0x00000004) != 0)) {
waitFor_ = waitFor_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000004);
}
result.waitFor_ = waitFor_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.grafeas.v1.Command) {
return mergeFrom((io.grafeas.v1.Command) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.grafeas.v1.Command other) {
if (other == io.grafeas.v1.Command.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (!other.env_.isEmpty()) {
if (env_.isEmpty()) {
env_ = other.env_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureEnvIsMutable();
env_.addAll(other.env_);
}
onChanged();
}
if (!other.args_.isEmpty()) {
if (args_.isEmpty()) {
args_ = other.args_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureArgsIsMutable();
args_.addAll(other.args_);
}
onChanged();
}
if (!other.getDir().isEmpty()) {
dir_ = other.dir_;
onChanged();
}
if (!other.getId().isEmpty()) {
id_ = other.id_;
onChanged();
}
if (!other.waitFor_.isEmpty()) {
if (waitFor_.isEmpty()) {
waitFor_ = other.waitFor_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureWaitForIsMutable();
waitFor_.addAll(other.waitFor_);
}
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
name_ = input.readStringRequireUtf8();
break;
} // case 10
case 18:
{
java.lang.String s = input.readStringRequireUtf8();
ensureEnvIsMutable();
env_.add(s);
break;
} // case 18
case 26:
{
java.lang.String s = input.readStringRequireUtf8();
ensureArgsIsMutable();
args_.add(s);
break;
} // case 26
case 34:
{
dir_ = input.readStringRequireUtf8();
break;
} // case 34
case 42:
{
id_ = input.readStringRequireUtf8();
break;
} // case 42
case 50:
{
java.lang.String s = input.readStringRequireUtf8();
ensureWaitForIsMutable();
waitFor_.add(s);
break;
} // case 50
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
*
*
* <pre>
* 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`.
* </pre>
*
* <code>string name = 1;</code>
*
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
* <pre>
* 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`.
* </pre>
*
* <code>string name = 1;</code>
*
* @return The bytes for name.
*/
public com.google.protobuf.ByteString getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
* <pre>
* 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`.
* </pre>
*
* <code>string name = 1;</code>
*
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
*
*
* <pre>
* 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`.
* </pre>
*
* <code>string name = 1;</code>
*
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
*
* <pre>
* 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`.
* </pre>
*
* <code>string name = 1;</code>
*
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
onChanged();
return this;
}
private com.google.protobuf.LazyStringList env_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureEnvIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
env_ = new com.google.protobuf.LazyStringArrayList(env_);
bitField0_ |= 0x00000001;
}
}
/**
*
*
* <pre>
* Environment variables set before running this command.
* </pre>
*
* <code>repeated string env = 2;</code>
*
* @return A list containing the env.
*/
public com.google.protobuf.ProtocolStringList getEnvList() {
return env_.getUnmodifiableView();
}
/**
*
*
* <pre>
* Environment variables set before running this command.
* </pre>
*
* <code>repeated string env = 2;</code>
*
* @return The count of env.
*/
public int getEnvCount() {
return env_.size();
}
/**
*
*
* <pre>
* Environment variables set before running this command.
* </pre>
*
* <code>repeated string env = 2;</code>
*
* @param index The index of the element to return.
* @return The env at the given index.
*/
public java.lang.String getEnv(int index) {
return env_.get(index);
}
/**
*
*
* <pre>
* Environment variables set before running this command.
* </pre>
*
* <code>repeated string env = 2;</code>
*
* @param index The index of the value to return.
* @return The bytes of the env at the given index.
*/
public com.google.protobuf.ByteString getEnvBytes(int index) {
return env_.getByteString(index);
}
/**
*
*
* <pre>
* Environment variables set before running this command.
* </pre>
*
* <code>repeated string env = 2;</code>
*
* @param index The index to set the value at.
* @param value The env to set.
* @return This builder for chaining.
*/
public Builder setEnv(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureEnvIsMutable();
env_.set(index, value);
onChanged();
return this;
}
/**
*
*
* <pre>
* Environment variables set before running this command.
* </pre>
*
* <code>repeated string env = 2;</code>
*
* @param value The env to add.
* @return This builder for chaining.
*/
public Builder addEnv(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureEnvIsMutable();
env_.add(value);
onChanged();
return this;
}
/**
*
*
* <pre>
* Environment variables set before running this command.
* </pre>
*
* <code>repeated string env = 2;</code>
*
* @param values The env to add.
* @return This builder for chaining.
*/
public Builder addAllEnv(java.lang.Iterable<java.lang.String> values) {
ensureEnvIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, env_);
onChanged();
return this;
}
/**
*
*
* <pre>
* Environment variables set before running this command.
* </pre>
*
* <code>repeated string env = 2;</code>
*
* @return This builder for chaining.
*/
public Builder clearEnv() {
env_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
* <pre>
* Environment variables set before running this command.
* </pre>
*
* <code>repeated string env = 2;</code>
*
* @param value The bytes of the env to add.
* @return This builder for chaining.
*/
public Builder addEnvBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureEnvIsMutable();
env_.add(value);
onChanged();
return this;
}
private com.google.protobuf.LazyStringList args_ =
com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureArgsIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
args_ = new com.google.protobuf.LazyStringArrayList(args_);
bitField0_ |= 0x00000002;
}
}
/**
*
*
* <pre>
* Command-line arguments used when executing this command.
* </pre>
*
* <code>repeated string args = 3;</code>
*
* @return A list containing the args.
*/
public com.google.protobuf.ProtocolStringList getArgsList() {
return args_.getUnmodifiableView();
}
/**
*
*
* <pre>
* Command-line arguments used when executing this command.
* </pre>
*
* <code>repeated string args = 3;</code>
*
* @return The count of args.
*/
public int getArgsCount() {
return args_.size();
}
/**
*
*
* <pre>
* Command-line arguments used when executing this command.
* </pre>
*
* <code>repeated string args = 3;</code>
*
* @param index The index of the element to return.
* @return The args at the given index.
*/
public java.lang.String getArgs(int index) {
return args_.get(index);
}
/**
*
*
* <pre>
* Command-line arguments used when executing this command.
* </pre>
*
* <code>repeated string args = 3;</code>
*
* @param index The index of the value to return.
* @return The bytes of the args at the given index.
*/
public com.google.protobuf.ByteString getArgsBytes(int index) {
return args_.getByteString(index);
}
/**
*
*
* <pre>
* Command-line arguments used when executing this command.
* </pre>
*
* <code>repeated string args = 3;</code>
*
* @param index The index to set the value at.
* @param value The args to set.
* @return This builder for chaining.
*/
public Builder setArgs(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureArgsIsMutable();
args_.set(index, value);
onChanged();
return this;
}
/**
*
*
* <pre>
* Command-line arguments used when executing this command.
* </pre>
*
* <code>repeated string args = 3;</code>
*
* @param value The args to add.
* @return This builder for chaining.
*/
public Builder addArgs(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureArgsIsMutable();
args_.add(value);
onChanged();
return this;
}
/**
*
*
* <pre>
* Command-line arguments used when executing this command.
* </pre>
*
* <code>repeated string args = 3;</code>
*
* @param values The args to add.
* @return This builder for chaining.
*/
public Builder addAllArgs(java.lang.Iterable<java.lang.String> values) {
ensureArgsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, args_);
onChanged();
return this;
}
/**
*
*
* <pre>
* Command-line arguments used when executing this command.
* </pre>
*
* <code>repeated string args = 3;</code>
*
* @return This builder for chaining.
*/
public Builder clearArgs() {
args_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
* <pre>
* Command-line arguments used when executing this command.
* </pre>
*
* <code>repeated string args = 3;</code>
*
* @param value The bytes of the args to add.
* @return This builder for chaining.
*/
public Builder addArgsBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureArgsIsMutable();
args_.add(value);
onChanged();
return this;
}
private java.lang.Object dir_ = "";
/**
*
*
* <pre>
* Working directory (relative to project source root) used when running this
* command.
* </pre>
*
* <code>string dir = 4;</code>
*
* @return The dir.
*/
public java.lang.String getDir() {
java.lang.Object ref = dir_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
dir_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
* <pre>
* Working directory (relative to project source root) used when running this
* command.
* </pre>
*
* <code>string dir = 4;</code>
*
* @return The bytes for dir.
*/
public com.google.protobuf.ByteString getDirBytes() {
java.lang.Object ref = dir_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
dir_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
* <pre>
* Working directory (relative to project source root) used when running this
* command.
* </pre>
*
* <code>string dir = 4;</code>
*
* @param value The dir to set.
* @return This builder for chaining.
*/
public Builder setDir(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
dir_ = value;
onChanged();
return this;
}
/**
*
*
* <pre>
* Working directory (relative to project source root) used when running this
* command.
* </pre>
*
* <code>string dir = 4;</code>
*
* @return This builder for chaining.
*/
public Builder clearDir() {
dir_ = getDefaultInstance().getDir();
onChanged();
return this;
}
/**
*
*
* <pre>
* Working directory (relative to project source root) used when running this
* command.
* </pre>
*
* <code>string dir = 4;</code>
*
* @param value The bytes for dir to set.
* @return This builder for chaining.
*/
public Builder setDirBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
dir_ = value;
onChanged();
return this;
}
private java.lang.Object id_ = "";
/**
*
*
* <pre>
* Optional unique identifier for this command, used in wait_for to reference
* this command as a dependency.
* </pre>
*
* <code>string id = 5;</code>
*
* @return The id.
*/
public java.lang.String getId() {
java.lang.Object ref = id_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
* <pre>
* Optional unique identifier for this command, used in wait_for to reference
* this command as a dependency.
* </pre>
*
* <code>string id = 5;</code>
*
* @return The bytes for id.
*/
public com.google.protobuf.ByteString getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
* <pre>
* Optional unique identifier for this command, used in wait_for to reference
* this command as a dependency.
* </pre>
*
* <code>string id = 5;</code>
*
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
id_ = value;
onChanged();
return this;
}
/**
*
*
* <pre>
* Optional unique identifier for this command, used in wait_for to reference
* this command as a dependency.
* </pre>
*
* <code>string id = 5;</code>
*
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
onChanged();
return this;
}
/**
*
*
* <pre>
* Optional unique identifier for this command, used in wait_for to reference
* this command as a dependency.
* </pre>
*
* <code>string id = 5;</code>
*
* @param value The bytes for id to set.
* @return This builder for chaining.
*/
public Builder setIdBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
id_ = value;
onChanged();
return this;
}
private com.google.protobuf.LazyStringList waitFor_ =
com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureWaitForIsMutable() {
if (!((bitField0_ & 0x00000004) != 0)) {
waitFor_ = new com.google.protobuf.LazyStringArrayList(waitFor_);
bitField0_ |= 0x00000004;
}
}
/**
*
*
* <pre>
* The ID(s) of the command(s) that this command depends on.
* </pre>
*
* <code>repeated string wait_for = 6;</code>
*
* @return A list containing the waitFor.
*/
public com.google.protobuf.ProtocolStringList getWaitForList() {
return waitFor_.getUnmodifiableView();
}
/**
*
*
* <pre>
* The ID(s) of the command(s) that this command depends on.
* </pre>
*
* <code>repeated string wait_for = 6;</code>
*
* @return The count of waitFor.
*/
public int getWaitForCount() {
return waitFor_.size();
}
/**
*
*
* <pre>
* The ID(s) of the command(s) that this command depends on.
* </pre>
*
* <code>repeated string wait_for = 6;</code>
*
* @param index The index of the element to return.
* @return The waitFor at the given index.
*/
public java.lang.String getWaitFor(int index) {
return waitFor_.get(index);
}
/**
*
*
* <pre>
* The ID(s) of the command(s) that this command depends on.
* </pre>
*
* <code>repeated string wait_for = 6;</code>
*
* @param index The index of the value to return.
* @return The bytes of the waitFor at the given index.
*/
public com.google.protobuf.ByteString getWaitForBytes(int index) {
return waitFor_.getByteString(index);
}
/**
*
*
* <pre>
* The ID(s) of the command(s) that this command depends on.
* </pre>
*
* <code>repeated string wait_for = 6;</code>
*
* @param index The index to set the value at.
* @param value The waitFor to set.
* @return This builder for chaining.
*/
public Builder setWaitFor(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureWaitForIsMutable();
waitFor_.set(index, value);
onChanged();
return this;
}
/**
*
*
* <pre>
* The ID(s) of the command(s) that this command depends on.
* </pre>
*
* <code>repeated string wait_for = 6;</code>
*
* @param value The waitFor to add.
* @return This builder for chaining.
*/
public Builder addWaitFor(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureWaitForIsMutable();
waitFor_.add(value);
onChanged();
return this;
}
/**
*
*
* <pre>
* The ID(s) of the command(s) that this command depends on.
* </pre>
*
* <code>repeated string wait_for = 6;</code>
*
* @param values The waitFor to add.
* @return This builder for chaining.
*/
public Builder addAllWaitFor(java.lang.Iterable<java.lang.String> values) {
ensureWaitForIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, waitFor_);
onChanged();
return this;
}
/**
*
*
* <pre>
* The ID(s) of the command(s) that this command depends on.
* </pre>
*
* <code>repeated string wait_for = 6;</code>
*
* @return This builder for chaining.
*/
public Builder clearWaitFor() {
waitFor_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
*
* <pre>
* The ID(s) of the command(s) that this command depends on.
* </pre>
*
* <code>repeated string wait_for = 6;</code>
*
* @param value The bytes of the waitFor to add.
* @return This builder for chaining.
*/
public Builder addWaitForBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureWaitForIsMutable();
waitFor_.add(value);
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:grafeas.v1.Command)
}
// @@protoc_insertion_point(class_scope:grafeas.v1.Command)
private static final io.grafeas.v1.Command DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.grafeas.v1.Command();
}
public static io.grafeas.v1.Command getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<Command> PARSER =
new com.google.protobuf.AbstractParser<Command>() {
@java.lang.Override
public Command parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser<Command> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<Command> getParserForType() {
return PARSER;
}
@java.lang.Override
public io.grafeas.v1.Command getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}