com.clarifai.grpc.api.WorkflowResult Maven / Gradle / Ivy
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: proto/clarifai/api/resources.proto
package com.clarifai.grpc.api;
/**
*
* WorkflowResult
* One result per input in the workflow.
*
*
* Protobuf type {@code clarifai.api.WorkflowResult}
*/
public final class WorkflowResult extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:clarifai.api.WorkflowResult)
WorkflowResultOrBuilder {
private static final long serialVersionUID = 0L;
// Use WorkflowResult.newBuilder() to construct.
private WorkflowResult(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private WorkflowResult() {
id_ = "";
outputs_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new WorkflowResult();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private WorkflowResult(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
id_ = s;
break;
}
case 18: {
com.clarifai.grpc.api.status.Status.Builder subBuilder = null;
if (status_ != null) {
subBuilder = status_.toBuilder();
}
status_ = input.readMessage(com.clarifai.grpc.api.status.Status.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(status_);
status_ = subBuilder.buildPartial();
}
break;
}
case 26: {
com.google.protobuf.Timestamp.Builder subBuilder = null;
if (createdAt_ != null) {
subBuilder = createdAt_.toBuilder();
}
createdAt_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(createdAt_);
createdAt_ = subBuilder.buildPartial();
}
break;
}
case 34: {
com.clarifai.grpc.api.Model.Builder subBuilder = null;
if (model_ != null) {
subBuilder = model_.toBuilder();
}
model_ = input.readMessage(com.clarifai.grpc.api.Model.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(model_);
model_ = subBuilder.buildPartial();
}
break;
}
case 42: {
com.clarifai.grpc.api.Input.Builder subBuilder = null;
if (input_ != null) {
subBuilder = input_.toBuilder();
}
input_ = input.readMessage(com.clarifai.grpc.api.Input.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(input_);
input_ = subBuilder.buildPartial();
}
break;
}
case 50: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
outputs_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
outputs_.add(
input.readMessage(com.clarifai.grpc.api.Output.parser(), extensionRegistry));
break;
}
case 56: {
suppressOutput_ = input.readBool();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
outputs_ = java.util.Collections.unmodifiableList(outputs_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_WorkflowResult_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_WorkflowResult_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.WorkflowResult.class, com.clarifai.grpc.api.WorkflowResult.Builder.class);
}
public static final int ID_FIELD_NUMBER = 1;
private volatile java.lang.Object id_;
/**
* string id = 1;
* @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;
}
}
/**
* string id = 1;
* @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 STATUS_FIELD_NUMBER = 2;
private com.clarifai.grpc.api.status.Status status_;
/**
* .clarifai.api.status.Status status = 2;
* @return Whether the status field is set.
*/
@java.lang.Override
public boolean hasStatus() {
return status_ != null;
}
/**
* .clarifai.api.status.Status status = 2;
* @return The status.
*/
@java.lang.Override
public com.clarifai.grpc.api.status.Status getStatus() {
return status_ == null ? com.clarifai.grpc.api.status.Status.getDefaultInstance() : status_;
}
/**
* .clarifai.api.status.Status status = 2;
*/
@java.lang.Override
public com.clarifai.grpc.api.status.StatusOrBuilder getStatusOrBuilder() {
return getStatus();
}
public static final int CREATED_AT_FIELD_NUMBER = 3;
private com.google.protobuf.Timestamp createdAt_;
/**
*
* When the object was created. We follow the XXXX timestamp
* format. We use https://www.ietf.org/rfc/rfc3339.txt format:
* "2006-01-02T15:04:05.999999Z" so you can expect results like
* the following from the API:
* "2017-04-11T21:50:50.223962Z"
*
*
* .google.protobuf.Timestamp created_at = 3;
* @return Whether the createdAt field is set.
*/
@java.lang.Override
public boolean hasCreatedAt() {
return createdAt_ != null;
}
/**
*
* When the object was created. We follow the XXXX timestamp
* format. We use https://www.ietf.org/rfc/rfc3339.txt format:
* "2006-01-02T15:04:05.999999Z" so you can expect results like
* the following from the API:
* "2017-04-11T21:50:50.223962Z"
*
*
* .google.protobuf.Timestamp created_at = 3;
* @return The createdAt.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getCreatedAt() {
return createdAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_;
}
/**
*
* When the object was created. We follow the XXXX timestamp
* format. We use https://www.ietf.org/rfc/rfc3339.txt format:
* "2006-01-02T15:04:05.999999Z" so you can expect results like
* the following from the API:
* "2017-04-11T21:50:50.223962Z"
*
*
* .google.protobuf.Timestamp created_at = 3;
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getCreatedAtOrBuilder() {
return getCreatedAt();
}
public static final int MODEL_FIELD_NUMBER = 4;
private com.clarifai.grpc.api.Model model_;
/**
*
* The model that this WorkflowResult is for.
* DEPRECATED: not sure why there ever was a model here because each output shows the model
* that process this given input.
*
*
* .clarifai.api.Model model = 4 [deprecated = true];
* @deprecated clarifai.api.WorkflowResult.model is deprecated.
* See proto/clarifai/api/resources.proto;l=2884
* @return Whether the model field is set.
*/
@java.lang.Override
@java.lang.Deprecated public boolean hasModel() {
return model_ != null;
}
/**
*
* The model that this WorkflowResult is for.
* DEPRECATED: not sure why there ever was a model here because each output shows the model
* that process this given input.
*
*
* .clarifai.api.Model model = 4 [deprecated = true];
* @deprecated clarifai.api.WorkflowResult.model is deprecated.
* See proto/clarifai/api/resources.proto;l=2884
* @return The model.
*/
@java.lang.Override
@java.lang.Deprecated public com.clarifai.grpc.api.Model getModel() {
return model_ == null ? com.clarifai.grpc.api.Model.getDefaultInstance() : model_;
}
/**
*
* The model that this WorkflowResult is for.
* DEPRECATED: not sure why there ever was a model here because each output shows the model
* that process this given input.
*
*
* .clarifai.api.Model model = 4 [deprecated = true];
*/
@java.lang.Override
@java.lang.Deprecated public com.clarifai.grpc.api.ModelOrBuilder getModelOrBuilder() {
return getModel();
}
public static final int INPUT_FIELD_NUMBER = 5;
private com.clarifai.grpc.api.Input input_;
/**
*
* The input that ran through the workflow to generate the outputs in this WorkflowResult.
*
*
* .clarifai.api.Input input = 5;
* @return Whether the input field is set.
*/
@java.lang.Override
public boolean hasInput() {
return input_ != null;
}
/**
*
* The input that ran through the workflow to generate the outputs in this WorkflowResult.
*
*
* .clarifai.api.Input input = 5;
* @return The input.
*/
@java.lang.Override
public com.clarifai.grpc.api.Input getInput() {
return input_ == null ? com.clarifai.grpc.api.Input.getDefaultInstance() : input_;
}
/**
*
* The input that ran through the workflow to generate the outputs in this WorkflowResult.
*
*
* .clarifai.api.Input input = 5;
*/
@java.lang.Override
public com.clarifai.grpc.api.InputOrBuilder getInputOrBuilder() {
return getInput();
}
public static final int OUTPUTS_FIELD_NUMBER = 6;
private java.util.List outputs_;
/**
*
* For each model in the workflow we return an Output.
*
*
* repeated .clarifai.api.Output outputs = 6;
*/
@java.lang.Override
public java.util.List getOutputsList() {
return outputs_;
}
/**
*
* For each model in the workflow we return an Output.
*
*
* repeated .clarifai.api.Output outputs = 6;
*/
@java.lang.Override
public java.util.List extends com.clarifai.grpc.api.OutputOrBuilder>
getOutputsOrBuilderList() {
return outputs_;
}
/**
*
* For each model in the workflow we return an Output.
*
*
* repeated .clarifai.api.Output outputs = 6;
*/
@java.lang.Override
public int getOutputsCount() {
return outputs_.size();
}
/**
*
* For each model in the workflow we return an Output.
*
*
* repeated .clarifai.api.Output outputs = 6;
*/
@java.lang.Override
public com.clarifai.grpc.api.Output getOutputs(int index) {
return outputs_.get(index);
}
/**
*
* For each model in the workflow we return an Output.
*
*
* repeated .clarifai.api.Output outputs = 6;
*/
@java.lang.Override
public com.clarifai.grpc.api.OutputOrBuilder getOutputsOrBuilder(
int index) {
return outputs_.get(index);
}
public static final int SUPPRESS_OUTPUT_FIELD_NUMBER = 7;
private boolean suppressOutput_;
/**
*
* Indicate if the output of this model is suppressed.
*
*
* bool suppress_output = 7;
* @return The suppressOutput.
*/
@java.lang.Override
public boolean getSuppressOutput() {
return suppressOutput_;
}
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(id_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
}
if (status_ != null) {
output.writeMessage(2, getStatus());
}
if (createdAt_ != null) {
output.writeMessage(3, getCreatedAt());
}
if (model_ != null) {
output.writeMessage(4, getModel());
}
if (input_ != null) {
output.writeMessage(5, getInput());
}
for (int i = 0; i < outputs_.size(); i++) {
output.writeMessage(6, outputs_.get(i));
}
if (suppressOutput_ != false) {
output.writeBool(7, suppressOutput_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
}
if (status_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getStatus());
}
if (createdAt_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getCreatedAt());
}
if (model_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getModel());
}
if (input_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getInput());
}
for (int i = 0; i < outputs_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, outputs_.get(i));
}
if (suppressOutput_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(7, suppressOutput_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.clarifai.grpc.api.WorkflowResult)) {
return super.equals(obj);
}
com.clarifai.grpc.api.WorkflowResult other = (com.clarifai.grpc.api.WorkflowResult) obj;
if (!getId()
.equals(other.getId())) return false;
if (hasStatus() != other.hasStatus()) return false;
if (hasStatus()) {
if (!getStatus()
.equals(other.getStatus())) return false;
}
if (hasCreatedAt() != other.hasCreatedAt()) return false;
if (hasCreatedAt()) {
if (!getCreatedAt()
.equals(other.getCreatedAt())) return false;
}
if (hasModel() != other.hasModel()) return false;
if (hasModel()) {
if (!getModel()
.equals(other.getModel())) return false;
}
if (hasInput() != other.hasInput()) return false;
if (hasInput()) {
if (!getInput()
.equals(other.getInput())) return false;
}
if (!getOutputsList()
.equals(other.getOutputsList())) return false;
if (getSuppressOutput()
!= other.getSuppressOutput()) return false;
if (!unknownFields.equals(other.unknownFields)) 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) + ID_FIELD_NUMBER;
hash = (53 * hash) + getId().hashCode();
if (hasStatus()) {
hash = (37 * hash) + STATUS_FIELD_NUMBER;
hash = (53 * hash) + getStatus().hashCode();
}
if (hasCreatedAt()) {
hash = (37 * hash) + CREATED_AT_FIELD_NUMBER;
hash = (53 * hash) + getCreatedAt().hashCode();
}
if (hasModel()) {
hash = (37 * hash) + MODEL_FIELD_NUMBER;
hash = (53 * hash) + getModel().hashCode();
}
if (hasInput()) {
hash = (37 * hash) + INPUT_FIELD_NUMBER;
hash = (53 * hash) + getInput().hashCode();
}
if (getOutputsCount() > 0) {
hash = (37 * hash) + OUTPUTS_FIELD_NUMBER;
hash = (53 * hash) + getOutputsList().hashCode();
}
hash = (37 * hash) + SUPPRESS_OUTPUT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getSuppressOutput());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.clarifai.grpc.api.WorkflowResult parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.WorkflowResult parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.clarifai.grpc.api.WorkflowResult parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.WorkflowResult parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.clarifai.grpc.api.WorkflowResult parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.WorkflowResult parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.clarifai.grpc.api.WorkflowResult parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.WorkflowResult 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 com.clarifai.grpc.api.WorkflowResult parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.WorkflowResult 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 com.clarifai.grpc.api.WorkflowResult parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.WorkflowResult 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(com.clarifai.grpc.api.WorkflowResult 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;
}
/**
*
* WorkflowResult
* One result per input in the workflow.
*
*
* Protobuf type {@code clarifai.api.WorkflowResult}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:clarifai.api.WorkflowResult)
com.clarifai.grpc.api.WorkflowResultOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_WorkflowResult_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_WorkflowResult_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.WorkflowResult.class, com.clarifai.grpc.api.WorkflowResult.Builder.class);
}
// Construct using com.clarifai.grpc.api.WorkflowResult.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getOutputsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
id_ = "";
if (statusBuilder_ == null) {
status_ = null;
} else {
status_ = null;
statusBuilder_ = null;
}
if (createdAtBuilder_ == null) {
createdAt_ = null;
} else {
createdAt_ = null;
createdAtBuilder_ = null;
}
if (modelBuilder_ == null) {
model_ = null;
} else {
model_ = null;
modelBuilder_ = null;
}
if (inputBuilder_ == null) {
input_ = null;
} else {
input_ = null;
inputBuilder_ = null;
}
if (outputsBuilder_ == null) {
outputs_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
outputsBuilder_.clear();
}
suppressOutput_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_WorkflowResult_descriptor;
}
@java.lang.Override
public com.clarifai.grpc.api.WorkflowResult getDefaultInstanceForType() {
return com.clarifai.grpc.api.WorkflowResult.getDefaultInstance();
}
@java.lang.Override
public com.clarifai.grpc.api.WorkflowResult build() {
com.clarifai.grpc.api.WorkflowResult result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.clarifai.grpc.api.WorkflowResult buildPartial() {
com.clarifai.grpc.api.WorkflowResult result = new com.clarifai.grpc.api.WorkflowResult(this);
int from_bitField0_ = bitField0_;
result.id_ = id_;
if (statusBuilder_ == null) {
result.status_ = status_;
} else {
result.status_ = statusBuilder_.build();
}
if (createdAtBuilder_ == null) {
result.createdAt_ = createdAt_;
} else {
result.createdAt_ = createdAtBuilder_.build();
}
if (modelBuilder_ == null) {
result.model_ = model_;
} else {
result.model_ = modelBuilder_.build();
}
if (inputBuilder_ == null) {
result.input_ = input_;
} else {
result.input_ = inputBuilder_.build();
}
if (outputsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
outputs_ = java.util.Collections.unmodifiableList(outputs_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.outputs_ = outputs_;
} else {
result.outputs_ = outputsBuilder_.build();
}
result.suppressOutput_ = suppressOutput_;
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 com.clarifai.grpc.api.WorkflowResult) {
return mergeFrom((com.clarifai.grpc.api.WorkflowResult)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.clarifai.grpc.api.WorkflowResult other) {
if (other == com.clarifai.grpc.api.WorkflowResult.getDefaultInstance()) return this;
if (!other.getId().isEmpty()) {
id_ = other.id_;
onChanged();
}
if (other.hasStatus()) {
mergeStatus(other.getStatus());
}
if (other.hasCreatedAt()) {
mergeCreatedAt(other.getCreatedAt());
}
if (other.hasModel()) {
mergeModel(other.getModel());
}
if (other.hasInput()) {
mergeInput(other.getInput());
}
if (outputsBuilder_ == null) {
if (!other.outputs_.isEmpty()) {
if (outputs_.isEmpty()) {
outputs_ = other.outputs_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureOutputsIsMutable();
outputs_.addAll(other.outputs_);
}
onChanged();
}
} else {
if (!other.outputs_.isEmpty()) {
if (outputsBuilder_.isEmpty()) {
outputsBuilder_.dispose();
outputsBuilder_ = null;
outputs_ = other.outputs_;
bitField0_ = (bitField0_ & ~0x00000001);
outputsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getOutputsFieldBuilder() : null;
} else {
outputsBuilder_.addAllMessages(other.outputs_);
}
}
}
if (other.getSuppressOutput() != false) {
setSuppressOutput(other.getSuppressOutput());
}
this.mergeUnknownFields(other.unknownFields);
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 {
com.clarifai.grpc.api.WorkflowResult parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.clarifai.grpc.api.WorkflowResult) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object id_ = "";
/**
* string id = 1;
* @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;
}
}
/**
* string id = 1;
* @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;
}
}
/**
* string id = 1;
* @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;
}
/**
* string id = 1;
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
onChanged();
return this;
}
/**
* string id = 1;
* @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.clarifai.grpc.api.status.Status status_;
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.status.Status, com.clarifai.grpc.api.status.Status.Builder, com.clarifai.grpc.api.status.StatusOrBuilder> statusBuilder_;
/**
* .clarifai.api.status.Status status = 2;
* @return Whether the status field is set.
*/
public boolean hasStatus() {
return statusBuilder_ != null || status_ != null;
}
/**
* .clarifai.api.status.Status status = 2;
* @return The status.
*/
public com.clarifai.grpc.api.status.Status getStatus() {
if (statusBuilder_ == null) {
return status_ == null ? com.clarifai.grpc.api.status.Status.getDefaultInstance() : status_;
} else {
return statusBuilder_.getMessage();
}
}
/**
* .clarifai.api.status.Status status = 2;
*/
public Builder setStatus(com.clarifai.grpc.api.status.Status value) {
if (statusBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
status_ = value;
onChanged();
} else {
statusBuilder_.setMessage(value);
}
return this;
}
/**
* .clarifai.api.status.Status status = 2;
*/
public Builder setStatus(
com.clarifai.grpc.api.status.Status.Builder builderForValue) {
if (statusBuilder_ == null) {
status_ = builderForValue.build();
onChanged();
} else {
statusBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .clarifai.api.status.Status status = 2;
*/
public Builder mergeStatus(com.clarifai.grpc.api.status.Status value) {
if (statusBuilder_ == null) {
if (status_ != null) {
status_ =
com.clarifai.grpc.api.status.Status.newBuilder(status_).mergeFrom(value).buildPartial();
} else {
status_ = value;
}
onChanged();
} else {
statusBuilder_.mergeFrom(value);
}
return this;
}
/**
* .clarifai.api.status.Status status = 2;
*/
public Builder clearStatus() {
if (statusBuilder_ == null) {
status_ = null;
onChanged();
} else {
status_ = null;
statusBuilder_ = null;
}
return this;
}
/**
* .clarifai.api.status.Status status = 2;
*/
public com.clarifai.grpc.api.status.Status.Builder getStatusBuilder() {
onChanged();
return getStatusFieldBuilder().getBuilder();
}
/**
* .clarifai.api.status.Status status = 2;
*/
public com.clarifai.grpc.api.status.StatusOrBuilder getStatusOrBuilder() {
if (statusBuilder_ != null) {
return statusBuilder_.getMessageOrBuilder();
} else {
return status_ == null ?
com.clarifai.grpc.api.status.Status.getDefaultInstance() : status_;
}
}
/**
* .clarifai.api.status.Status status = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.status.Status, com.clarifai.grpc.api.status.Status.Builder, com.clarifai.grpc.api.status.StatusOrBuilder>
getStatusFieldBuilder() {
if (statusBuilder_ == null) {
statusBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.status.Status, com.clarifai.grpc.api.status.Status.Builder, com.clarifai.grpc.api.status.StatusOrBuilder>(
getStatus(),
getParentForChildren(),
isClean());
status_ = null;
}
return statusBuilder_;
}
private com.google.protobuf.Timestamp createdAt_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createdAtBuilder_;
/**
*
* When the object was created. We follow the XXXX timestamp
* format. We use https://www.ietf.org/rfc/rfc3339.txt format:
* "2006-01-02T15:04:05.999999Z" so you can expect results like
* the following from the API:
* "2017-04-11T21:50:50.223962Z"
*
*
* .google.protobuf.Timestamp created_at = 3;
* @return Whether the createdAt field is set.
*/
public boolean hasCreatedAt() {
return createdAtBuilder_ != null || createdAt_ != null;
}
/**
*
* When the object was created. We follow the XXXX timestamp
* format. We use https://www.ietf.org/rfc/rfc3339.txt format:
* "2006-01-02T15:04:05.999999Z" so you can expect results like
* the following from the API:
* "2017-04-11T21:50:50.223962Z"
*
*
* .google.protobuf.Timestamp created_at = 3;
* @return The createdAt.
*/
public com.google.protobuf.Timestamp getCreatedAt() {
if (createdAtBuilder_ == null) {
return createdAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_;
} else {
return createdAtBuilder_.getMessage();
}
}
/**
*
* When the object was created. We follow the XXXX timestamp
* format. We use https://www.ietf.org/rfc/rfc3339.txt format:
* "2006-01-02T15:04:05.999999Z" so you can expect results like
* the following from the API:
* "2017-04-11T21:50:50.223962Z"
*
*
* .google.protobuf.Timestamp created_at = 3;
*/
public Builder setCreatedAt(com.google.protobuf.Timestamp value) {
if (createdAtBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
createdAt_ = value;
onChanged();
} else {
createdAtBuilder_.setMessage(value);
}
return this;
}
/**
*
* When the object was created. We follow the XXXX timestamp
* format. We use https://www.ietf.org/rfc/rfc3339.txt format:
* "2006-01-02T15:04:05.999999Z" so you can expect results like
* the following from the API:
* "2017-04-11T21:50:50.223962Z"
*
*
* .google.protobuf.Timestamp created_at = 3;
*/
public Builder setCreatedAt(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (createdAtBuilder_ == null) {
createdAt_ = builderForValue.build();
onChanged();
} else {
createdAtBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* When the object was created. We follow the XXXX timestamp
* format. We use https://www.ietf.org/rfc/rfc3339.txt format:
* "2006-01-02T15:04:05.999999Z" so you can expect results like
* the following from the API:
* "2017-04-11T21:50:50.223962Z"
*
*
* .google.protobuf.Timestamp created_at = 3;
*/
public Builder mergeCreatedAt(com.google.protobuf.Timestamp value) {
if (createdAtBuilder_ == null) {
if (createdAt_ != null) {
createdAt_ =
com.google.protobuf.Timestamp.newBuilder(createdAt_).mergeFrom(value).buildPartial();
} else {
createdAt_ = value;
}
onChanged();
} else {
createdAtBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* When the object was created. We follow the XXXX timestamp
* format. We use https://www.ietf.org/rfc/rfc3339.txt format:
* "2006-01-02T15:04:05.999999Z" so you can expect results like
* the following from the API:
* "2017-04-11T21:50:50.223962Z"
*
*
* .google.protobuf.Timestamp created_at = 3;
*/
public Builder clearCreatedAt() {
if (createdAtBuilder_ == null) {
createdAt_ = null;
onChanged();
} else {
createdAt_ = null;
createdAtBuilder_ = null;
}
return this;
}
/**
*
* When the object was created. We follow the XXXX timestamp
* format. We use https://www.ietf.org/rfc/rfc3339.txt format:
* "2006-01-02T15:04:05.999999Z" so you can expect results like
* the following from the API:
* "2017-04-11T21:50:50.223962Z"
*
*
* .google.protobuf.Timestamp created_at = 3;
*/
public com.google.protobuf.Timestamp.Builder getCreatedAtBuilder() {
onChanged();
return getCreatedAtFieldBuilder().getBuilder();
}
/**
*
* When the object was created. We follow the XXXX timestamp
* format. We use https://www.ietf.org/rfc/rfc3339.txt format:
* "2006-01-02T15:04:05.999999Z" so you can expect results like
* the following from the API:
* "2017-04-11T21:50:50.223962Z"
*
*
* .google.protobuf.Timestamp created_at = 3;
*/
public com.google.protobuf.TimestampOrBuilder getCreatedAtOrBuilder() {
if (createdAtBuilder_ != null) {
return createdAtBuilder_.getMessageOrBuilder();
} else {
return createdAt_ == null ?
com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_;
}
}
/**
*
* When the object was created. We follow the XXXX timestamp
* format. We use https://www.ietf.org/rfc/rfc3339.txt format:
* "2006-01-02T15:04:05.999999Z" so you can expect results like
* the following from the API:
* "2017-04-11T21:50:50.223962Z"
*
*
* .google.protobuf.Timestamp created_at = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
getCreatedAtFieldBuilder() {
if (createdAtBuilder_ == null) {
createdAtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
getCreatedAt(),
getParentForChildren(),
isClean());
createdAt_ = null;
}
return createdAtBuilder_;
}
private com.clarifai.grpc.api.Model model_;
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Model, com.clarifai.grpc.api.Model.Builder, com.clarifai.grpc.api.ModelOrBuilder> modelBuilder_;
/**
*
* The model that this WorkflowResult is for.
* DEPRECATED: not sure why there ever was a model here because each output shows the model
* that process this given input.
*
*
* .clarifai.api.Model model = 4 [deprecated = true];
* @deprecated clarifai.api.WorkflowResult.model is deprecated.
* See proto/clarifai/api/resources.proto;l=2884
* @return Whether the model field is set.
*/
@java.lang.Deprecated public boolean hasModel() {
return modelBuilder_ != null || model_ != null;
}
/**
*
* The model that this WorkflowResult is for.
* DEPRECATED: not sure why there ever was a model here because each output shows the model
* that process this given input.
*
*
* .clarifai.api.Model model = 4 [deprecated = true];
* @deprecated clarifai.api.WorkflowResult.model is deprecated.
* See proto/clarifai/api/resources.proto;l=2884
* @return The model.
*/
@java.lang.Deprecated public com.clarifai.grpc.api.Model getModel() {
if (modelBuilder_ == null) {
return model_ == null ? com.clarifai.grpc.api.Model.getDefaultInstance() : model_;
} else {
return modelBuilder_.getMessage();
}
}
/**
*
* The model that this WorkflowResult is for.
* DEPRECATED: not sure why there ever was a model here because each output shows the model
* that process this given input.
*
*
* .clarifai.api.Model model = 4 [deprecated = true];
*/
@java.lang.Deprecated public Builder setModel(com.clarifai.grpc.api.Model value) {
if (modelBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
model_ = value;
onChanged();
} else {
modelBuilder_.setMessage(value);
}
return this;
}
/**
*
* The model that this WorkflowResult is for.
* DEPRECATED: not sure why there ever was a model here because each output shows the model
* that process this given input.
*
*
* .clarifai.api.Model model = 4 [deprecated = true];
*/
@java.lang.Deprecated public Builder setModel(
com.clarifai.grpc.api.Model.Builder builderForValue) {
if (modelBuilder_ == null) {
model_ = builderForValue.build();
onChanged();
} else {
modelBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* The model that this WorkflowResult is for.
* DEPRECATED: not sure why there ever was a model here because each output shows the model
* that process this given input.
*
*
* .clarifai.api.Model model = 4 [deprecated = true];
*/
@java.lang.Deprecated public Builder mergeModel(com.clarifai.grpc.api.Model value) {
if (modelBuilder_ == null) {
if (model_ != null) {
model_ =
com.clarifai.grpc.api.Model.newBuilder(model_).mergeFrom(value).buildPartial();
} else {
model_ = value;
}
onChanged();
} else {
modelBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* The model that this WorkflowResult is for.
* DEPRECATED: not sure why there ever was a model here because each output shows the model
* that process this given input.
*
*
* .clarifai.api.Model model = 4 [deprecated = true];
*/
@java.lang.Deprecated public Builder clearModel() {
if (modelBuilder_ == null) {
model_ = null;
onChanged();
} else {
model_ = null;
modelBuilder_ = null;
}
return this;
}
/**
*
* The model that this WorkflowResult is for.
* DEPRECATED: not sure why there ever was a model here because each output shows the model
* that process this given input.
*
*
* .clarifai.api.Model model = 4 [deprecated = true];
*/
@java.lang.Deprecated public com.clarifai.grpc.api.Model.Builder getModelBuilder() {
onChanged();
return getModelFieldBuilder().getBuilder();
}
/**
*
* The model that this WorkflowResult is for.
* DEPRECATED: not sure why there ever was a model here because each output shows the model
* that process this given input.
*
*
* .clarifai.api.Model model = 4 [deprecated = true];
*/
@java.lang.Deprecated public com.clarifai.grpc.api.ModelOrBuilder getModelOrBuilder() {
if (modelBuilder_ != null) {
return modelBuilder_.getMessageOrBuilder();
} else {
return model_ == null ?
com.clarifai.grpc.api.Model.getDefaultInstance() : model_;
}
}
/**
*
* The model that this WorkflowResult is for.
* DEPRECATED: not sure why there ever was a model here because each output shows the model
* that process this given input.
*
*
* .clarifai.api.Model model = 4 [deprecated = true];
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Model, com.clarifai.grpc.api.Model.Builder, com.clarifai.grpc.api.ModelOrBuilder>
getModelFieldBuilder() {
if (modelBuilder_ == null) {
modelBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Model, com.clarifai.grpc.api.Model.Builder, com.clarifai.grpc.api.ModelOrBuilder>(
getModel(),
getParentForChildren(),
isClean());
model_ = null;
}
return modelBuilder_;
}
private com.clarifai.grpc.api.Input input_;
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Input, com.clarifai.grpc.api.Input.Builder, com.clarifai.grpc.api.InputOrBuilder> inputBuilder_;
/**
*
* The input that ran through the workflow to generate the outputs in this WorkflowResult.
*
*
* .clarifai.api.Input input = 5;
* @return Whether the input field is set.
*/
public boolean hasInput() {
return inputBuilder_ != null || input_ != null;
}
/**
*
* The input that ran through the workflow to generate the outputs in this WorkflowResult.
*
*
* .clarifai.api.Input input = 5;
* @return The input.
*/
public com.clarifai.grpc.api.Input getInput() {
if (inputBuilder_ == null) {
return input_ == null ? com.clarifai.grpc.api.Input.getDefaultInstance() : input_;
} else {
return inputBuilder_.getMessage();
}
}
/**
*
* The input that ran through the workflow to generate the outputs in this WorkflowResult.
*
*
* .clarifai.api.Input input = 5;
*/
public Builder setInput(com.clarifai.grpc.api.Input value) {
if (inputBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
input_ = value;
onChanged();
} else {
inputBuilder_.setMessage(value);
}
return this;
}
/**
*
* The input that ran through the workflow to generate the outputs in this WorkflowResult.
*
*
* .clarifai.api.Input input = 5;
*/
public Builder setInput(
com.clarifai.grpc.api.Input.Builder builderForValue) {
if (inputBuilder_ == null) {
input_ = builderForValue.build();
onChanged();
} else {
inputBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* The input that ran through the workflow to generate the outputs in this WorkflowResult.
*
*
* .clarifai.api.Input input = 5;
*/
public Builder mergeInput(com.clarifai.grpc.api.Input value) {
if (inputBuilder_ == null) {
if (input_ != null) {
input_ =
com.clarifai.grpc.api.Input.newBuilder(input_).mergeFrom(value).buildPartial();
} else {
input_ = value;
}
onChanged();
} else {
inputBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* The input that ran through the workflow to generate the outputs in this WorkflowResult.
*
*
* .clarifai.api.Input input = 5;
*/
public Builder clearInput() {
if (inputBuilder_ == null) {
input_ = null;
onChanged();
} else {
input_ = null;
inputBuilder_ = null;
}
return this;
}
/**
*
* The input that ran through the workflow to generate the outputs in this WorkflowResult.
*
*
* .clarifai.api.Input input = 5;
*/
public com.clarifai.grpc.api.Input.Builder getInputBuilder() {
onChanged();
return getInputFieldBuilder().getBuilder();
}
/**
*
* The input that ran through the workflow to generate the outputs in this WorkflowResult.
*
*
* .clarifai.api.Input input = 5;
*/
public com.clarifai.grpc.api.InputOrBuilder getInputOrBuilder() {
if (inputBuilder_ != null) {
return inputBuilder_.getMessageOrBuilder();
} else {
return input_ == null ?
com.clarifai.grpc.api.Input.getDefaultInstance() : input_;
}
}
/**
*
* The input that ran through the workflow to generate the outputs in this WorkflowResult.
*
*
* .clarifai.api.Input input = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Input, com.clarifai.grpc.api.Input.Builder, com.clarifai.grpc.api.InputOrBuilder>
getInputFieldBuilder() {
if (inputBuilder_ == null) {
inputBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Input, com.clarifai.grpc.api.Input.Builder, com.clarifai.grpc.api.InputOrBuilder>(
getInput(),
getParentForChildren(),
isClean());
input_ = null;
}
return inputBuilder_;
}
private java.util.List outputs_ =
java.util.Collections.emptyList();
private void ensureOutputsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
outputs_ = new java.util.ArrayList(outputs_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.clarifai.grpc.api.Output, com.clarifai.grpc.api.Output.Builder, com.clarifai.grpc.api.OutputOrBuilder> outputsBuilder_;
/**
*
* For each model in the workflow we return an Output.
*
*
* repeated .clarifai.api.Output outputs = 6;
*/
public java.util.List getOutputsList() {
if (outputsBuilder_ == null) {
return java.util.Collections.unmodifiableList(outputs_);
} else {
return outputsBuilder_.getMessageList();
}
}
/**
*
* For each model in the workflow we return an Output.
*
*
* repeated .clarifai.api.Output outputs = 6;
*/
public int getOutputsCount() {
if (outputsBuilder_ == null) {
return outputs_.size();
} else {
return outputsBuilder_.getCount();
}
}
/**
*
* For each model in the workflow we return an Output.
*
*
* repeated .clarifai.api.Output outputs = 6;
*/
public com.clarifai.grpc.api.Output getOutputs(int index) {
if (outputsBuilder_ == null) {
return outputs_.get(index);
} else {
return outputsBuilder_.getMessage(index);
}
}
/**
*
* For each model in the workflow we return an Output.
*
*
* repeated .clarifai.api.Output outputs = 6;
*/
public Builder setOutputs(
int index, com.clarifai.grpc.api.Output value) {
if (outputsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureOutputsIsMutable();
outputs_.set(index, value);
onChanged();
} else {
outputsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* For each model in the workflow we return an Output.
*
*
* repeated .clarifai.api.Output outputs = 6;
*/
public Builder setOutputs(
int index, com.clarifai.grpc.api.Output.Builder builderForValue) {
if (outputsBuilder_ == null) {
ensureOutputsIsMutable();
outputs_.set(index, builderForValue.build());
onChanged();
} else {
outputsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* For each model in the workflow we return an Output.
*
*
* repeated .clarifai.api.Output outputs = 6;
*/
public Builder addOutputs(com.clarifai.grpc.api.Output value) {
if (outputsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureOutputsIsMutable();
outputs_.add(value);
onChanged();
} else {
outputsBuilder_.addMessage(value);
}
return this;
}
/**
*
* For each model in the workflow we return an Output.
*
*
* repeated .clarifai.api.Output outputs = 6;
*/
public Builder addOutputs(
int index, com.clarifai.grpc.api.Output value) {
if (outputsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureOutputsIsMutable();
outputs_.add(index, value);
onChanged();
} else {
outputsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* For each model in the workflow we return an Output.
*
*
* repeated .clarifai.api.Output outputs = 6;
*/
public Builder addOutputs(
com.clarifai.grpc.api.Output.Builder builderForValue) {
if (outputsBuilder_ == null) {
ensureOutputsIsMutable();
outputs_.add(builderForValue.build());
onChanged();
} else {
outputsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* For each model in the workflow we return an Output.
*
*
* repeated .clarifai.api.Output outputs = 6;
*/
public Builder addOutputs(
int index, com.clarifai.grpc.api.Output.Builder builderForValue) {
if (outputsBuilder_ == null) {
ensureOutputsIsMutable();
outputs_.add(index, builderForValue.build());
onChanged();
} else {
outputsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* For each model in the workflow we return an Output.
*
*
* repeated .clarifai.api.Output outputs = 6;
*/
public Builder addAllOutputs(
java.lang.Iterable extends com.clarifai.grpc.api.Output> values) {
if (outputsBuilder_ == null) {
ensureOutputsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, outputs_);
onChanged();
} else {
outputsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* For each model in the workflow we return an Output.
*
*
* repeated .clarifai.api.Output outputs = 6;
*/
public Builder clearOutputs() {
if (outputsBuilder_ == null) {
outputs_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
outputsBuilder_.clear();
}
return this;
}
/**
*
* For each model in the workflow we return an Output.
*
*
* repeated .clarifai.api.Output outputs = 6;
*/
public Builder removeOutputs(int index) {
if (outputsBuilder_ == null) {
ensureOutputsIsMutable();
outputs_.remove(index);
onChanged();
} else {
outputsBuilder_.remove(index);
}
return this;
}
/**
*
* For each model in the workflow we return an Output.
*
*
* repeated .clarifai.api.Output outputs = 6;
*/
public com.clarifai.grpc.api.Output.Builder getOutputsBuilder(
int index) {
return getOutputsFieldBuilder().getBuilder(index);
}
/**
*
* For each model in the workflow we return an Output.
*
*
* repeated .clarifai.api.Output outputs = 6;
*/
public com.clarifai.grpc.api.OutputOrBuilder getOutputsOrBuilder(
int index) {
if (outputsBuilder_ == null) {
return outputs_.get(index); } else {
return outputsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* For each model in the workflow we return an Output.
*
*
* repeated .clarifai.api.Output outputs = 6;
*/
public java.util.List extends com.clarifai.grpc.api.OutputOrBuilder>
getOutputsOrBuilderList() {
if (outputsBuilder_ != null) {
return outputsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(outputs_);
}
}
/**
*
* For each model in the workflow we return an Output.
*
*
* repeated .clarifai.api.Output outputs = 6;
*/
public com.clarifai.grpc.api.Output.Builder addOutputsBuilder() {
return getOutputsFieldBuilder().addBuilder(
com.clarifai.grpc.api.Output.getDefaultInstance());
}
/**
*
* For each model in the workflow we return an Output.
*
*
* repeated .clarifai.api.Output outputs = 6;
*/
public com.clarifai.grpc.api.Output.Builder addOutputsBuilder(
int index) {
return getOutputsFieldBuilder().addBuilder(
index, com.clarifai.grpc.api.Output.getDefaultInstance());
}
/**
*
* For each model in the workflow we return an Output.
*
*
* repeated .clarifai.api.Output outputs = 6;
*/
public java.util.List
getOutputsBuilderList() {
return getOutputsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.clarifai.grpc.api.Output, com.clarifai.grpc.api.Output.Builder, com.clarifai.grpc.api.OutputOrBuilder>
getOutputsFieldBuilder() {
if (outputsBuilder_ == null) {
outputsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.clarifai.grpc.api.Output, com.clarifai.grpc.api.Output.Builder, com.clarifai.grpc.api.OutputOrBuilder>(
outputs_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
outputs_ = null;
}
return outputsBuilder_;
}
private boolean suppressOutput_ ;
/**
*
* Indicate if the output of this model is suppressed.
*
*
* bool suppress_output = 7;
* @return The suppressOutput.
*/
@java.lang.Override
public boolean getSuppressOutput() {
return suppressOutput_;
}
/**
*
* Indicate if the output of this model is suppressed.
*
*
* bool suppress_output = 7;
* @param value The suppressOutput to set.
* @return This builder for chaining.
*/
public Builder setSuppressOutput(boolean value) {
suppressOutput_ = value;
onChanged();
return this;
}
/**
*
* Indicate if the output of this model is suppressed.
*
*
* bool suppress_output = 7;
* @return This builder for chaining.
*/
public Builder clearSuppressOutput() {
suppressOutput_ = false;
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:clarifai.api.WorkflowResult)
}
// @@protoc_insertion_point(class_scope:clarifai.api.WorkflowResult)
private static final com.clarifai.grpc.api.WorkflowResult DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.clarifai.grpc.api.WorkflowResult();
}
public static com.clarifai.grpc.api.WorkflowResult getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public WorkflowResult parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new WorkflowResult(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.clarifai.grpc.api.WorkflowResult getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}