com.clarifai.grpc.api.WorkflowNode 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;
/**
*
* WorkflowNode
*
*
* Protobuf type {@code clarifai.api.WorkflowNode}
*/
public final class WorkflowNode extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:clarifai.api.WorkflowNode)
WorkflowNodeOrBuilder {
private static final long serialVersionUID = 0L;
// Use WorkflowNode.newBuilder() to construct.
private WorkflowNode(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private WorkflowNode() {
id_ = "";
nodeInputs_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new WorkflowNode();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private WorkflowNode(
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.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 26: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
nodeInputs_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
nodeInputs_.add(
input.readMessage(com.clarifai.grpc.api.NodeInput.parser(), extensionRegistry));
break;
}
case 32: {
suppressOutput_ = input.readBool();
break;
}
case 42: {
com.clarifai.grpc.api.OutputInfo.Builder subBuilder = null;
if (outputInfoOverride_ != null) {
subBuilder = outputInfoOverride_.toBuilder();
}
outputInfoOverride_ = input.readMessage(com.clarifai.grpc.api.OutputInfo.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(outputInfoOverride_);
outputInfoOverride_ = subBuilder.buildPartial();
}
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)) {
nodeInputs_ = java.util.Collections.unmodifiableList(nodeInputs_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_WorkflowNode_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_WorkflowNode_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.WorkflowNode.class, com.clarifai.grpc.api.WorkflowNode.Builder.class);
}
public static final int ID_FIELD_NUMBER = 1;
private volatile java.lang.Object id_;
/**
*
* An identifier for this node in the graph. This is used when connecting NodeInputs
* together.
*
*
* 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;
}
}
/**
*
* An identifier for this node in the graph. This is used when connecting NodeInputs
* together.
*
*
* 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 MODEL_FIELD_NUMBER = 2;
private com.clarifai.grpc.api.Model model_;
/**
*
* The model that will do the processing at this node. We only vlidate the model.id and
* model.model_version.id fields.
*
*
* .clarifai.api.Model model = 2;
* @return Whether the model field is set.
*/
@java.lang.Override
public boolean hasModel() {
return model_ != null;
}
/**
*
* The model that will do the processing at this node. We only vlidate the model.id and
* model.model_version.id fields.
*
*
* .clarifai.api.Model model = 2;
* @return The model.
*/
@java.lang.Override
public com.clarifai.grpc.api.Model getModel() {
return model_ == null ? com.clarifai.grpc.api.Model.getDefaultInstance() : model_;
}
/**
*
* The model that will do the processing at this node. We only vlidate the model.id and
* model.model_version.id fields.
*
*
* .clarifai.api.Model model = 2;
*/
@java.lang.Override
public com.clarifai.grpc.api.ModelOrBuilder getModelOrBuilder() {
return getModel();
}
public static final int NODE_INPUTS_FIELD_NUMBER = 3;
private java.util.List nodeInputs_;
/**
*
* Each WorkflowNode can connect to multiple input nodes so that we can handle multi-model data
* and more complex workflow operations.
*
*
* repeated .clarifai.api.NodeInput node_inputs = 3;
*/
@java.lang.Override
public java.util.List getNodeInputsList() {
return nodeInputs_;
}
/**
*
* Each WorkflowNode can connect to multiple input nodes so that we can handle multi-model data
* and more complex workflow operations.
*
*
* repeated .clarifai.api.NodeInput node_inputs = 3;
*/
@java.lang.Override
public java.util.List extends com.clarifai.grpc.api.NodeInputOrBuilder>
getNodeInputsOrBuilderList() {
return nodeInputs_;
}
/**
*
* Each WorkflowNode can connect to multiple input nodes so that we can handle multi-model data
* and more complex workflow operations.
*
*
* repeated .clarifai.api.NodeInput node_inputs = 3;
*/
@java.lang.Override
public int getNodeInputsCount() {
return nodeInputs_.size();
}
/**
*
* Each WorkflowNode can connect to multiple input nodes so that we can handle multi-model data
* and more complex workflow operations.
*
*
* repeated .clarifai.api.NodeInput node_inputs = 3;
*/
@java.lang.Override
public com.clarifai.grpc.api.NodeInput getNodeInputs(int index) {
return nodeInputs_.get(index);
}
/**
*
* Each WorkflowNode can connect to multiple input nodes so that we can handle multi-model data
* and more complex workflow operations.
*
*
* repeated .clarifai.api.NodeInput node_inputs = 3;
*/
@java.lang.Override
public com.clarifai.grpc.api.NodeInputOrBuilder getNodeInputsOrBuilder(
int index) {
return nodeInputs_.get(index);
}
public static final int SUPPRESS_OUTPUT_FIELD_NUMBER = 4;
private boolean suppressOutput_;
/**
*
* suppress the output for workflow prediction
*
*
* bool suppress_output = 4;
* @return The suppressOutput.
*/
@java.lang.Override
public boolean getSuppressOutput() {
return suppressOutput_;
}
public static final int OUTPUT_INFO_OVERRIDE_FIELD_NUMBER = 5;
private com.clarifai.grpc.api.OutputInfo outputInfoOverride_;
/**
*
* Used to override the output_info.data and output_info.params of the model specified by the node.
* Values for fields_map, message, and output_config are ignored.
*
*
* .clarifai.api.OutputInfo output_info_override = 5;
* @return Whether the outputInfoOverride field is set.
*/
@java.lang.Override
public boolean hasOutputInfoOverride() {
return outputInfoOverride_ != null;
}
/**
*
* Used to override the output_info.data and output_info.params of the model specified by the node.
* Values for fields_map, message, and output_config are ignored.
*
*
* .clarifai.api.OutputInfo output_info_override = 5;
* @return The outputInfoOverride.
*/
@java.lang.Override
public com.clarifai.grpc.api.OutputInfo getOutputInfoOverride() {
return outputInfoOverride_ == null ? com.clarifai.grpc.api.OutputInfo.getDefaultInstance() : outputInfoOverride_;
}
/**
*
* Used to override the output_info.data and output_info.params of the model specified by the node.
* Values for fields_map, message, and output_config are ignored.
*
*
* .clarifai.api.OutputInfo output_info_override = 5;
*/
@java.lang.Override
public com.clarifai.grpc.api.OutputInfoOrBuilder getOutputInfoOverrideOrBuilder() {
return getOutputInfoOverride();
}
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 (model_ != null) {
output.writeMessage(2, getModel());
}
for (int i = 0; i < nodeInputs_.size(); i++) {
output.writeMessage(3, nodeInputs_.get(i));
}
if (suppressOutput_ != false) {
output.writeBool(4, suppressOutput_);
}
if (outputInfoOverride_ != null) {
output.writeMessage(5, getOutputInfoOverride());
}
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 (model_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getModel());
}
for (int i = 0; i < nodeInputs_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, nodeInputs_.get(i));
}
if (suppressOutput_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(4, suppressOutput_);
}
if (outputInfoOverride_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getOutputInfoOverride());
}
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.WorkflowNode)) {
return super.equals(obj);
}
com.clarifai.grpc.api.WorkflowNode other = (com.clarifai.grpc.api.WorkflowNode) obj;
if (!getId()
.equals(other.getId())) return false;
if (hasModel() != other.hasModel()) return false;
if (hasModel()) {
if (!getModel()
.equals(other.getModel())) return false;
}
if (!getNodeInputsList()
.equals(other.getNodeInputsList())) return false;
if (getSuppressOutput()
!= other.getSuppressOutput()) return false;
if (hasOutputInfoOverride() != other.hasOutputInfoOverride()) return false;
if (hasOutputInfoOverride()) {
if (!getOutputInfoOverride()
.equals(other.getOutputInfoOverride())) 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 (hasModel()) {
hash = (37 * hash) + MODEL_FIELD_NUMBER;
hash = (53 * hash) + getModel().hashCode();
}
if (getNodeInputsCount() > 0) {
hash = (37 * hash) + NODE_INPUTS_FIELD_NUMBER;
hash = (53 * hash) + getNodeInputsList().hashCode();
}
hash = (37 * hash) + SUPPRESS_OUTPUT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getSuppressOutput());
if (hasOutputInfoOverride()) {
hash = (37 * hash) + OUTPUT_INFO_OVERRIDE_FIELD_NUMBER;
hash = (53 * hash) + getOutputInfoOverride().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.clarifai.grpc.api.WorkflowNode parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.WorkflowNode 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.WorkflowNode parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.WorkflowNode 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.WorkflowNode parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.WorkflowNode parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.clarifai.grpc.api.WorkflowNode parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.WorkflowNode 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.WorkflowNode parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.WorkflowNode 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.WorkflowNode parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.WorkflowNode 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.WorkflowNode 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;
}
/**
*
* WorkflowNode
*
*
* Protobuf type {@code clarifai.api.WorkflowNode}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:clarifai.api.WorkflowNode)
com.clarifai.grpc.api.WorkflowNodeOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_WorkflowNode_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_WorkflowNode_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.WorkflowNode.class, com.clarifai.grpc.api.WorkflowNode.Builder.class);
}
// Construct using com.clarifai.grpc.api.WorkflowNode.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getNodeInputsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
id_ = "";
if (modelBuilder_ == null) {
model_ = null;
} else {
model_ = null;
modelBuilder_ = null;
}
if (nodeInputsBuilder_ == null) {
nodeInputs_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
nodeInputsBuilder_.clear();
}
suppressOutput_ = false;
if (outputInfoOverrideBuilder_ == null) {
outputInfoOverride_ = null;
} else {
outputInfoOverride_ = null;
outputInfoOverrideBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_WorkflowNode_descriptor;
}
@java.lang.Override
public com.clarifai.grpc.api.WorkflowNode getDefaultInstanceForType() {
return com.clarifai.grpc.api.WorkflowNode.getDefaultInstance();
}
@java.lang.Override
public com.clarifai.grpc.api.WorkflowNode build() {
com.clarifai.grpc.api.WorkflowNode result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.clarifai.grpc.api.WorkflowNode buildPartial() {
com.clarifai.grpc.api.WorkflowNode result = new com.clarifai.grpc.api.WorkflowNode(this);
int from_bitField0_ = bitField0_;
result.id_ = id_;
if (modelBuilder_ == null) {
result.model_ = model_;
} else {
result.model_ = modelBuilder_.build();
}
if (nodeInputsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
nodeInputs_ = java.util.Collections.unmodifiableList(nodeInputs_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.nodeInputs_ = nodeInputs_;
} else {
result.nodeInputs_ = nodeInputsBuilder_.build();
}
result.suppressOutput_ = suppressOutput_;
if (outputInfoOverrideBuilder_ == null) {
result.outputInfoOverride_ = outputInfoOverride_;
} else {
result.outputInfoOverride_ = outputInfoOverrideBuilder_.build();
}
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.WorkflowNode) {
return mergeFrom((com.clarifai.grpc.api.WorkflowNode)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.clarifai.grpc.api.WorkflowNode other) {
if (other == com.clarifai.grpc.api.WorkflowNode.getDefaultInstance()) return this;
if (!other.getId().isEmpty()) {
id_ = other.id_;
onChanged();
}
if (other.hasModel()) {
mergeModel(other.getModel());
}
if (nodeInputsBuilder_ == null) {
if (!other.nodeInputs_.isEmpty()) {
if (nodeInputs_.isEmpty()) {
nodeInputs_ = other.nodeInputs_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureNodeInputsIsMutable();
nodeInputs_.addAll(other.nodeInputs_);
}
onChanged();
}
} else {
if (!other.nodeInputs_.isEmpty()) {
if (nodeInputsBuilder_.isEmpty()) {
nodeInputsBuilder_.dispose();
nodeInputsBuilder_ = null;
nodeInputs_ = other.nodeInputs_;
bitField0_ = (bitField0_ & ~0x00000001);
nodeInputsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getNodeInputsFieldBuilder() : null;
} else {
nodeInputsBuilder_.addAllMessages(other.nodeInputs_);
}
}
}
if (other.getSuppressOutput() != false) {
setSuppressOutput(other.getSuppressOutput());
}
if (other.hasOutputInfoOverride()) {
mergeOutputInfoOverride(other.getOutputInfoOverride());
}
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.WorkflowNode parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.clarifai.grpc.api.WorkflowNode) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object id_ = "";
/**
*
* An identifier for this node in the graph. This is used when connecting NodeInputs
* together.
*
*
* 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;
}
}
/**
*
* An identifier for this node in the graph. This is used when connecting NodeInputs
* together.
*
*
* 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;
}
}
/**
*
* An identifier for this node in the graph. This is used when connecting NodeInputs
* together.
*
*
* 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;
}
/**
*
* An identifier for this node in the graph. This is used when connecting NodeInputs
* together.
*
*
* string id = 1;
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
onChanged();
return this;
}
/**
*
* An identifier for this node in the graph. This is used when connecting NodeInputs
* together.
*
*
* 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.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 will do the processing at this node. We only vlidate the model.id and
* model.model_version.id fields.
*
*
* .clarifai.api.Model model = 2;
* @return Whether the model field is set.
*/
public boolean hasModel() {
return modelBuilder_ != null || model_ != null;
}
/**
*
* The model that will do the processing at this node. We only vlidate the model.id and
* model.model_version.id fields.
*
*
* .clarifai.api.Model model = 2;
* @return The model.
*/
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 will do the processing at this node. We only vlidate the model.id and
* model.model_version.id fields.
*
*
* .clarifai.api.Model model = 2;
*/
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 will do the processing at this node. We only vlidate the model.id and
* model.model_version.id fields.
*
*
* .clarifai.api.Model model = 2;
*/
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 will do the processing at this node. We only vlidate the model.id and
* model.model_version.id fields.
*
*
* .clarifai.api.Model model = 2;
*/
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 will do the processing at this node. We only vlidate the model.id and
* model.model_version.id fields.
*
*
* .clarifai.api.Model model = 2;
*/
public Builder clearModel() {
if (modelBuilder_ == null) {
model_ = null;
onChanged();
} else {
model_ = null;
modelBuilder_ = null;
}
return this;
}
/**
*
* The model that will do the processing at this node. We only vlidate the model.id and
* model.model_version.id fields.
*
*
* .clarifai.api.Model model = 2;
*/
public com.clarifai.grpc.api.Model.Builder getModelBuilder() {
onChanged();
return getModelFieldBuilder().getBuilder();
}
/**
*
* The model that will do the processing at this node. We only vlidate the model.id and
* model.model_version.id fields.
*
*
* .clarifai.api.Model model = 2;
*/
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 will do the processing at this node. We only vlidate the model.id and
* model.model_version.id fields.
*
*
* .clarifai.api.Model model = 2;
*/
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 java.util.List nodeInputs_ =
java.util.Collections.emptyList();
private void ensureNodeInputsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
nodeInputs_ = new java.util.ArrayList(nodeInputs_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.clarifai.grpc.api.NodeInput, com.clarifai.grpc.api.NodeInput.Builder, com.clarifai.grpc.api.NodeInputOrBuilder> nodeInputsBuilder_;
/**
*
* Each WorkflowNode can connect to multiple input nodes so that we can handle multi-model data
* and more complex workflow operations.
*
*
* repeated .clarifai.api.NodeInput node_inputs = 3;
*/
public java.util.List getNodeInputsList() {
if (nodeInputsBuilder_ == null) {
return java.util.Collections.unmodifiableList(nodeInputs_);
} else {
return nodeInputsBuilder_.getMessageList();
}
}
/**
*
* Each WorkflowNode can connect to multiple input nodes so that we can handle multi-model data
* and more complex workflow operations.
*
*
* repeated .clarifai.api.NodeInput node_inputs = 3;
*/
public int getNodeInputsCount() {
if (nodeInputsBuilder_ == null) {
return nodeInputs_.size();
} else {
return nodeInputsBuilder_.getCount();
}
}
/**
*
* Each WorkflowNode can connect to multiple input nodes so that we can handle multi-model data
* and more complex workflow operations.
*
*
* repeated .clarifai.api.NodeInput node_inputs = 3;
*/
public com.clarifai.grpc.api.NodeInput getNodeInputs(int index) {
if (nodeInputsBuilder_ == null) {
return nodeInputs_.get(index);
} else {
return nodeInputsBuilder_.getMessage(index);
}
}
/**
*
* Each WorkflowNode can connect to multiple input nodes so that we can handle multi-model data
* and more complex workflow operations.
*
*
* repeated .clarifai.api.NodeInput node_inputs = 3;
*/
public Builder setNodeInputs(
int index, com.clarifai.grpc.api.NodeInput value) {
if (nodeInputsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureNodeInputsIsMutable();
nodeInputs_.set(index, value);
onChanged();
} else {
nodeInputsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Each WorkflowNode can connect to multiple input nodes so that we can handle multi-model data
* and more complex workflow operations.
*
*
* repeated .clarifai.api.NodeInput node_inputs = 3;
*/
public Builder setNodeInputs(
int index, com.clarifai.grpc.api.NodeInput.Builder builderForValue) {
if (nodeInputsBuilder_ == null) {
ensureNodeInputsIsMutable();
nodeInputs_.set(index, builderForValue.build());
onChanged();
} else {
nodeInputsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Each WorkflowNode can connect to multiple input nodes so that we can handle multi-model data
* and more complex workflow operations.
*
*
* repeated .clarifai.api.NodeInput node_inputs = 3;
*/
public Builder addNodeInputs(com.clarifai.grpc.api.NodeInput value) {
if (nodeInputsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureNodeInputsIsMutable();
nodeInputs_.add(value);
onChanged();
} else {
nodeInputsBuilder_.addMessage(value);
}
return this;
}
/**
*
* Each WorkflowNode can connect to multiple input nodes so that we can handle multi-model data
* and more complex workflow operations.
*
*
* repeated .clarifai.api.NodeInput node_inputs = 3;
*/
public Builder addNodeInputs(
int index, com.clarifai.grpc.api.NodeInput value) {
if (nodeInputsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureNodeInputsIsMutable();
nodeInputs_.add(index, value);
onChanged();
} else {
nodeInputsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Each WorkflowNode can connect to multiple input nodes so that we can handle multi-model data
* and more complex workflow operations.
*
*
* repeated .clarifai.api.NodeInput node_inputs = 3;
*/
public Builder addNodeInputs(
com.clarifai.grpc.api.NodeInput.Builder builderForValue) {
if (nodeInputsBuilder_ == null) {
ensureNodeInputsIsMutable();
nodeInputs_.add(builderForValue.build());
onChanged();
} else {
nodeInputsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Each WorkflowNode can connect to multiple input nodes so that we can handle multi-model data
* and more complex workflow operations.
*
*
* repeated .clarifai.api.NodeInput node_inputs = 3;
*/
public Builder addNodeInputs(
int index, com.clarifai.grpc.api.NodeInput.Builder builderForValue) {
if (nodeInputsBuilder_ == null) {
ensureNodeInputsIsMutable();
nodeInputs_.add(index, builderForValue.build());
onChanged();
} else {
nodeInputsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Each WorkflowNode can connect to multiple input nodes so that we can handle multi-model data
* and more complex workflow operations.
*
*
* repeated .clarifai.api.NodeInput node_inputs = 3;
*/
public Builder addAllNodeInputs(
java.lang.Iterable extends com.clarifai.grpc.api.NodeInput> values) {
if (nodeInputsBuilder_ == null) {
ensureNodeInputsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, nodeInputs_);
onChanged();
} else {
nodeInputsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Each WorkflowNode can connect to multiple input nodes so that we can handle multi-model data
* and more complex workflow operations.
*
*
* repeated .clarifai.api.NodeInput node_inputs = 3;
*/
public Builder clearNodeInputs() {
if (nodeInputsBuilder_ == null) {
nodeInputs_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
nodeInputsBuilder_.clear();
}
return this;
}
/**
*
* Each WorkflowNode can connect to multiple input nodes so that we can handle multi-model data
* and more complex workflow operations.
*
*
* repeated .clarifai.api.NodeInput node_inputs = 3;
*/
public Builder removeNodeInputs(int index) {
if (nodeInputsBuilder_ == null) {
ensureNodeInputsIsMutable();
nodeInputs_.remove(index);
onChanged();
} else {
nodeInputsBuilder_.remove(index);
}
return this;
}
/**
*
* Each WorkflowNode can connect to multiple input nodes so that we can handle multi-model data
* and more complex workflow operations.
*
*
* repeated .clarifai.api.NodeInput node_inputs = 3;
*/
public com.clarifai.grpc.api.NodeInput.Builder getNodeInputsBuilder(
int index) {
return getNodeInputsFieldBuilder().getBuilder(index);
}
/**
*
* Each WorkflowNode can connect to multiple input nodes so that we can handle multi-model data
* and more complex workflow operations.
*
*
* repeated .clarifai.api.NodeInput node_inputs = 3;
*/
public com.clarifai.grpc.api.NodeInputOrBuilder getNodeInputsOrBuilder(
int index) {
if (nodeInputsBuilder_ == null) {
return nodeInputs_.get(index); } else {
return nodeInputsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Each WorkflowNode can connect to multiple input nodes so that we can handle multi-model data
* and more complex workflow operations.
*
*
* repeated .clarifai.api.NodeInput node_inputs = 3;
*/
public java.util.List extends com.clarifai.grpc.api.NodeInputOrBuilder>
getNodeInputsOrBuilderList() {
if (nodeInputsBuilder_ != null) {
return nodeInputsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(nodeInputs_);
}
}
/**
*
* Each WorkflowNode can connect to multiple input nodes so that we can handle multi-model data
* and more complex workflow operations.
*
*
* repeated .clarifai.api.NodeInput node_inputs = 3;
*/
public com.clarifai.grpc.api.NodeInput.Builder addNodeInputsBuilder() {
return getNodeInputsFieldBuilder().addBuilder(
com.clarifai.grpc.api.NodeInput.getDefaultInstance());
}
/**
*
* Each WorkflowNode can connect to multiple input nodes so that we can handle multi-model data
* and more complex workflow operations.
*
*
* repeated .clarifai.api.NodeInput node_inputs = 3;
*/
public com.clarifai.grpc.api.NodeInput.Builder addNodeInputsBuilder(
int index) {
return getNodeInputsFieldBuilder().addBuilder(
index, com.clarifai.grpc.api.NodeInput.getDefaultInstance());
}
/**
*
* Each WorkflowNode can connect to multiple input nodes so that we can handle multi-model data
* and more complex workflow operations.
*
*
* repeated .clarifai.api.NodeInput node_inputs = 3;
*/
public java.util.List
getNodeInputsBuilderList() {
return getNodeInputsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.clarifai.grpc.api.NodeInput, com.clarifai.grpc.api.NodeInput.Builder, com.clarifai.grpc.api.NodeInputOrBuilder>
getNodeInputsFieldBuilder() {
if (nodeInputsBuilder_ == null) {
nodeInputsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.clarifai.grpc.api.NodeInput, com.clarifai.grpc.api.NodeInput.Builder, com.clarifai.grpc.api.NodeInputOrBuilder>(
nodeInputs_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
nodeInputs_ = null;
}
return nodeInputsBuilder_;
}
private boolean suppressOutput_ ;
/**
*
* suppress the output for workflow prediction
*
*
* bool suppress_output = 4;
* @return The suppressOutput.
*/
@java.lang.Override
public boolean getSuppressOutput() {
return suppressOutput_;
}
/**
*
* suppress the output for workflow prediction
*
*
* bool suppress_output = 4;
* @param value The suppressOutput to set.
* @return This builder for chaining.
*/
public Builder setSuppressOutput(boolean value) {
suppressOutput_ = value;
onChanged();
return this;
}
/**
*
* suppress the output for workflow prediction
*
*
* bool suppress_output = 4;
* @return This builder for chaining.
*/
public Builder clearSuppressOutput() {
suppressOutput_ = false;
onChanged();
return this;
}
private com.clarifai.grpc.api.OutputInfo outputInfoOverride_;
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.OutputInfo, com.clarifai.grpc.api.OutputInfo.Builder, com.clarifai.grpc.api.OutputInfoOrBuilder> outputInfoOverrideBuilder_;
/**
*
* Used to override the output_info.data and output_info.params of the model specified by the node.
* Values for fields_map, message, and output_config are ignored.
*
*
* .clarifai.api.OutputInfo output_info_override = 5;
* @return Whether the outputInfoOverride field is set.
*/
public boolean hasOutputInfoOverride() {
return outputInfoOverrideBuilder_ != null || outputInfoOverride_ != null;
}
/**
*
* Used to override the output_info.data and output_info.params of the model specified by the node.
* Values for fields_map, message, and output_config are ignored.
*
*
* .clarifai.api.OutputInfo output_info_override = 5;
* @return The outputInfoOverride.
*/
public com.clarifai.grpc.api.OutputInfo getOutputInfoOverride() {
if (outputInfoOverrideBuilder_ == null) {
return outputInfoOverride_ == null ? com.clarifai.grpc.api.OutputInfo.getDefaultInstance() : outputInfoOverride_;
} else {
return outputInfoOverrideBuilder_.getMessage();
}
}
/**
*
* Used to override the output_info.data and output_info.params of the model specified by the node.
* Values for fields_map, message, and output_config are ignored.
*
*
* .clarifai.api.OutputInfo output_info_override = 5;
*/
public Builder setOutputInfoOverride(com.clarifai.grpc.api.OutputInfo value) {
if (outputInfoOverrideBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
outputInfoOverride_ = value;
onChanged();
} else {
outputInfoOverrideBuilder_.setMessage(value);
}
return this;
}
/**
*
* Used to override the output_info.data and output_info.params of the model specified by the node.
* Values for fields_map, message, and output_config are ignored.
*
*
* .clarifai.api.OutputInfo output_info_override = 5;
*/
public Builder setOutputInfoOverride(
com.clarifai.grpc.api.OutputInfo.Builder builderForValue) {
if (outputInfoOverrideBuilder_ == null) {
outputInfoOverride_ = builderForValue.build();
onChanged();
} else {
outputInfoOverrideBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Used to override the output_info.data and output_info.params of the model specified by the node.
* Values for fields_map, message, and output_config are ignored.
*
*
* .clarifai.api.OutputInfo output_info_override = 5;
*/
public Builder mergeOutputInfoOverride(com.clarifai.grpc.api.OutputInfo value) {
if (outputInfoOverrideBuilder_ == null) {
if (outputInfoOverride_ != null) {
outputInfoOverride_ =
com.clarifai.grpc.api.OutputInfo.newBuilder(outputInfoOverride_).mergeFrom(value).buildPartial();
} else {
outputInfoOverride_ = value;
}
onChanged();
} else {
outputInfoOverrideBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Used to override the output_info.data and output_info.params of the model specified by the node.
* Values for fields_map, message, and output_config are ignored.
*
*
* .clarifai.api.OutputInfo output_info_override = 5;
*/
public Builder clearOutputInfoOverride() {
if (outputInfoOverrideBuilder_ == null) {
outputInfoOverride_ = null;
onChanged();
} else {
outputInfoOverride_ = null;
outputInfoOverrideBuilder_ = null;
}
return this;
}
/**
*
* Used to override the output_info.data and output_info.params of the model specified by the node.
* Values for fields_map, message, and output_config are ignored.
*
*
* .clarifai.api.OutputInfo output_info_override = 5;
*/
public com.clarifai.grpc.api.OutputInfo.Builder getOutputInfoOverrideBuilder() {
onChanged();
return getOutputInfoOverrideFieldBuilder().getBuilder();
}
/**
*
* Used to override the output_info.data and output_info.params of the model specified by the node.
* Values for fields_map, message, and output_config are ignored.
*
*
* .clarifai.api.OutputInfo output_info_override = 5;
*/
public com.clarifai.grpc.api.OutputInfoOrBuilder getOutputInfoOverrideOrBuilder() {
if (outputInfoOverrideBuilder_ != null) {
return outputInfoOverrideBuilder_.getMessageOrBuilder();
} else {
return outputInfoOverride_ == null ?
com.clarifai.grpc.api.OutputInfo.getDefaultInstance() : outputInfoOverride_;
}
}
/**
*
* Used to override the output_info.data and output_info.params of the model specified by the node.
* Values for fields_map, message, and output_config are ignored.
*
*
* .clarifai.api.OutputInfo output_info_override = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.OutputInfo, com.clarifai.grpc.api.OutputInfo.Builder, com.clarifai.grpc.api.OutputInfoOrBuilder>
getOutputInfoOverrideFieldBuilder() {
if (outputInfoOverrideBuilder_ == null) {
outputInfoOverrideBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.OutputInfo, com.clarifai.grpc.api.OutputInfo.Builder, com.clarifai.grpc.api.OutputInfoOrBuilder>(
getOutputInfoOverride(),
getParentForChildren(),
isClean());
outputInfoOverride_ = null;
}
return outputInfoOverrideBuilder_;
}
@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.WorkflowNode)
}
// @@protoc_insertion_point(class_scope:clarifai.api.WorkflowNode)
private static final com.clarifai.grpc.api.WorkflowNode DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.clarifai.grpc.api.WorkflowNode();
}
public static com.clarifai.grpc.api.WorkflowNode getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public WorkflowNode parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new WorkflowNode(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.WorkflowNode getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}