com.clarifai.grpc.api.ConceptQuery 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;
/**
*
* ConceptQuery
*
*
* Protobuf type {@code clarifai.api.ConceptQuery}
*/
public final class ConceptQuery extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:clarifai.api.ConceptQuery)
ConceptQueryOrBuilder {
private static final long serialVersionUID = 0L;
// Use ConceptQuery.newBuilder() to construct.
private ConceptQuery(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ConceptQuery() {
name_ = "";
language_ = "";
workflowId_ = "";
useCases_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ConceptQuery();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ConceptQuery(
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();
name_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
language_ = s;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
workflowId_ = s;
break;
}
case 32: {
int rawValue = input.readEnum();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
useCases_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
useCases_.add(rawValue);
break;
}
case 34: {
int length = input.readRawVarint32();
int oldLimit = input.pushLimit(length);
while(input.getBytesUntilLimit() > 0) {
int rawValue = input.readEnum();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
useCases_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
useCases_.add(rawValue);
}
input.popLimit(oldLimit);
break;
}
case 42: {
com.clarifai.grpc.api.Model.Builder subBuilder = null;
if (sourceCase_ == 5) {
subBuilder = ((com.clarifai.grpc.api.Model) source_).toBuilder();
}
source_ =
input.readMessage(com.clarifai.grpc.api.Model.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.clarifai.grpc.api.Model) source_);
source_ = subBuilder.buildPartial();
}
sourceCase_ = 5;
break;
}
case 50: {
com.clarifai.grpc.api.Workflow.Builder subBuilder = null;
if (sourceCase_ == 6) {
subBuilder = ((com.clarifai.grpc.api.Workflow) source_).toBuilder();
}
source_ =
input.readMessage(com.clarifai.grpc.api.Workflow.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.clarifai.grpc.api.Workflow) source_);
source_ = subBuilder.buildPartial();
}
sourceCase_ = 6;
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)) {
useCases_ = java.util.Collections.unmodifiableList(useCases_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_ConceptQuery_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_ConceptQuery_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.ConceptQuery.class, com.clarifai.grpc.api.ConceptQuery.Builder.class);
}
private int sourceCase_ = 0;
private java.lang.Object source_;
public enum SourceCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
MODEL(5),
WORKFLOW(6),
SOURCE_NOT_SET(0);
private final int value;
private SourceCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static SourceCase valueOf(int value) {
return forNumber(value);
}
public static SourceCase forNumber(int value) {
switch (value) {
case 5: return MODEL;
case 6: return WORKFLOW;
case 0: return SOURCE_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public SourceCase
getSourceCase() {
return SourceCase.forNumber(
sourceCase_);
}
public static final int NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object name_;
/**
*
* The name of the concept to search.
*
*
* string name = 1;
* @return The name.
*/
@java.lang.Override
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
}
}
/**
*
* The name of the concept to search.
*
*
* string name = 1;
* @return The bytes for name.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int LANGUAGE_FIELD_NUMBER = 2;
private volatile java.lang.Object language_;
/**
*
* The language of the concept name in a search. Defaults to English.
*
*
* string language = 2;
* @return The language.
*/
@java.lang.Override
public java.lang.String getLanguage() {
java.lang.Object ref = language_;
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();
language_ = s;
return s;
}
}
/**
*
* The language of the concept name in a search. Defaults to English.
*
*
* string language = 2;
* @return The bytes for language.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getLanguageBytes() {
java.lang.Object ref = language_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
language_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int WORKFLOW_ID_FIELD_NUMBER = 3;
private volatile java.lang.Object workflowId_;
/**
*
* Deprecated: Use workflow.id instead.
*
*
* string workflow_id = 3 [deprecated = true];
* @deprecated clarifai.api.ConceptQuery.workflow_id is deprecated.
* See proto/clarifai/api/resources.proto;l=495
* @return The workflowId.
*/
@java.lang.Override
@java.lang.Deprecated public java.lang.String getWorkflowId() {
java.lang.Object ref = workflowId_;
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();
workflowId_ = s;
return s;
}
}
/**
*
* Deprecated: Use workflow.id instead.
*
*
* string workflow_id = 3 [deprecated = true];
* @deprecated clarifai.api.ConceptQuery.workflow_id is deprecated.
* See proto/clarifai/api/resources.proto;l=495
* @return The bytes for workflowId.
*/
@java.lang.Override
@java.lang.Deprecated public com.google.protobuf.ByteString
getWorkflowIdBytes() {
java.lang.Object ref = workflowId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
workflowId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int USE_CASES_FIELD_NUMBER = 4;
private java.util.List useCases_;
private static final com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, com.clarifai.grpc.api.WorkflowModelUseCase> useCases_converter_ =
new com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, com.clarifai.grpc.api.WorkflowModelUseCase>() {
public com.clarifai.grpc.api.WorkflowModelUseCase convert(java.lang.Integer from) {
@SuppressWarnings("deprecation")
com.clarifai.grpc.api.WorkflowModelUseCase result = com.clarifai.grpc.api.WorkflowModelUseCase.valueOf(from);
return result == null ? com.clarifai.grpc.api.WorkflowModelUseCase.UNRECOGNIZED : result;
}
};
/**
*
* The concepts must belong to models with specified use cases.
* Multiple values are joined using an OR condition.
*
*
* repeated .clarifai.api.WorkflowModelUseCase use_cases = 4;
* @return A list containing the useCases.
*/
@java.lang.Override
public java.util.List getUseCasesList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, com.clarifai.grpc.api.WorkflowModelUseCase>(useCases_, useCases_converter_);
}
/**
*
* The concepts must belong to models with specified use cases.
* Multiple values are joined using an OR condition.
*
*
* repeated .clarifai.api.WorkflowModelUseCase use_cases = 4;
* @return The count of useCases.
*/
@java.lang.Override
public int getUseCasesCount() {
return useCases_.size();
}
/**
*
* The concepts must belong to models with specified use cases.
* Multiple values are joined using an OR condition.
*
*
* repeated .clarifai.api.WorkflowModelUseCase use_cases = 4;
* @param index The index of the element to return.
* @return The useCases at the given index.
*/
@java.lang.Override
public com.clarifai.grpc.api.WorkflowModelUseCase getUseCases(int index) {
return useCases_converter_.convert(useCases_.get(index));
}
/**
*
* The concepts must belong to models with specified use cases.
* Multiple values are joined using an OR condition.
*
*
* repeated .clarifai.api.WorkflowModelUseCase use_cases = 4;
* @return A list containing the enum numeric values on the wire for useCases.
*/
@java.lang.Override
public java.util.List
getUseCasesValueList() {
return useCases_;
}
/**
*
* The concepts must belong to models with specified use cases.
* Multiple values are joined using an OR condition.
*
*
* repeated .clarifai.api.WorkflowModelUseCase use_cases = 4;
* @param index The index of the value to return.
* @return The enum numeric value on the wire of useCases at the given index.
*/
@java.lang.Override
public int getUseCasesValue(int index) {
return useCases_.get(index);
}
private int useCasesMemoizedSerializedSize;
public static final int MODEL_FIELD_NUMBER = 5;
/**
* .clarifai.api.Model model = 5;
* @return Whether the model field is set.
*/
@java.lang.Override
public boolean hasModel() {
return sourceCase_ == 5;
}
/**
* .clarifai.api.Model model = 5;
* @return The model.
*/
@java.lang.Override
public com.clarifai.grpc.api.Model getModel() {
if (sourceCase_ == 5) {
return (com.clarifai.grpc.api.Model) source_;
}
return com.clarifai.grpc.api.Model.getDefaultInstance();
}
/**
* .clarifai.api.Model model = 5;
*/
@java.lang.Override
public com.clarifai.grpc.api.ModelOrBuilder getModelOrBuilder() {
if (sourceCase_ == 5) {
return (com.clarifai.grpc.api.Model) source_;
}
return com.clarifai.grpc.api.Model.getDefaultInstance();
}
public static final int WORKFLOW_FIELD_NUMBER = 6;
/**
* .clarifai.api.Workflow workflow = 6;
* @return Whether the workflow field is set.
*/
@java.lang.Override
public boolean hasWorkflow() {
return sourceCase_ == 6;
}
/**
* .clarifai.api.Workflow workflow = 6;
* @return The workflow.
*/
@java.lang.Override
public com.clarifai.grpc.api.Workflow getWorkflow() {
if (sourceCase_ == 6) {
return (com.clarifai.grpc.api.Workflow) source_;
}
return com.clarifai.grpc.api.Workflow.getDefaultInstance();
}
/**
* .clarifai.api.Workflow workflow = 6;
*/
@java.lang.Override
public com.clarifai.grpc.api.WorkflowOrBuilder getWorkflowOrBuilder() {
if (sourceCase_ == 6) {
return (com.clarifai.grpc.api.Workflow) source_;
}
return com.clarifai.grpc.api.Workflow.getDefaultInstance();
}
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 {
getSerializedSize();
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(language_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, language_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(workflowId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, workflowId_);
}
if (getUseCasesList().size() > 0) {
output.writeUInt32NoTag(34);
output.writeUInt32NoTag(useCasesMemoizedSerializedSize);
}
for (int i = 0; i < useCases_.size(); i++) {
output.writeEnumNoTag(useCases_.get(i));
}
if (sourceCase_ == 5) {
output.writeMessage(5, (com.clarifai.grpc.api.Model) source_);
}
if (sourceCase_ == 6) {
output.writeMessage(6, (com.clarifai.grpc.api.Workflow) source_);
}
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(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(language_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, language_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(workflowId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, workflowId_);
}
{
int dataSize = 0;
for (int i = 0; i < useCases_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeEnumSizeNoTag(useCases_.get(i));
}
size += dataSize;
if (!getUseCasesList().isEmpty()) { size += 1;
size += com.google.protobuf.CodedOutputStream
.computeUInt32SizeNoTag(dataSize);
}useCasesMemoizedSerializedSize = dataSize;
}
if (sourceCase_ == 5) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, (com.clarifai.grpc.api.Model) source_);
}
if (sourceCase_ == 6) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, (com.clarifai.grpc.api.Workflow) source_);
}
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.ConceptQuery)) {
return super.equals(obj);
}
com.clarifai.grpc.api.ConceptQuery other = (com.clarifai.grpc.api.ConceptQuery) obj;
if (!getName()
.equals(other.getName())) return false;
if (!getLanguage()
.equals(other.getLanguage())) return false;
if (!getWorkflowId()
.equals(other.getWorkflowId())) return false;
if (!useCases_.equals(other.useCases_)) return false;
if (!getSourceCase().equals(other.getSourceCase())) return false;
switch (sourceCase_) {
case 5:
if (!getModel()
.equals(other.getModel())) return false;
break;
case 6:
if (!getWorkflow()
.equals(other.getWorkflow())) return false;
break;
case 0:
default:
}
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) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (37 * hash) + LANGUAGE_FIELD_NUMBER;
hash = (53 * hash) + getLanguage().hashCode();
hash = (37 * hash) + WORKFLOW_ID_FIELD_NUMBER;
hash = (53 * hash) + getWorkflowId().hashCode();
if (getUseCasesCount() > 0) {
hash = (37 * hash) + USE_CASES_FIELD_NUMBER;
hash = (53 * hash) + useCases_.hashCode();
}
switch (sourceCase_) {
case 5:
hash = (37 * hash) + MODEL_FIELD_NUMBER;
hash = (53 * hash) + getModel().hashCode();
break;
case 6:
hash = (37 * hash) + WORKFLOW_FIELD_NUMBER;
hash = (53 * hash) + getWorkflow().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.clarifai.grpc.api.ConceptQuery parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.ConceptQuery 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.ConceptQuery parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.ConceptQuery 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.ConceptQuery parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.ConceptQuery parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.clarifai.grpc.api.ConceptQuery parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.ConceptQuery 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.ConceptQuery parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.ConceptQuery 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.ConceptQuery parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.ConceptQuery 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.ConceptQuery 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;
}
/**
*
* ConceptQuery
*
*
* Protobuf type {@code clarifai.api.ConceptQuery}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:clarifai.api.ConceptQuery)
com.clarifai.grpc.api.ConceptQueryOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_ConceptQuery_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_ConceptQuery_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.ConceptQuery.class, com.clarifai.grpc.api.ConceptQuery.Builder.class);
}
// Construct using com.clarifai.grpc.api.ConceptQuery.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
name_ = "";
language_ = "";
workflowId_ = "";
useCases_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
sourceCase_ = 0;
source_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_ConceptQuery_descriptor;
}
@java.lang.Override
public com.clarifai.grpc.api.ConceptQuery getDefaultInstanceForType() {
return com.clarifai.grpc.api.ConceptQuery.getDefaultInstance();
}
@java.lang.Override
public com.clarifai.grpc.api.ConceptQuery build() {
com.clarifai.grpc.api.ConceptQuery result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.clarifai.grpc.api.ConceptQuery buildPartial() {
com.clarifai.grpc.api.ConceptQuery result = new com.clarifai.grpc.api.ConceptQuery(this);
int from_bitField0_ = bitField0_;
result.name_ = name_;
result.language_ = language_;
result.workflowId_ = workflowId_;
if (((bitField0_ & 0x00000001) != 0)) {
useCases_ = java.util.Collections.unmodifiableList(useCases_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.useCases_ = useCases_;
if (sourceCase_ == 5) {
if (modelBuilder_ == null) {
result.source_ = source_;
} else {
result.source_ = modelBuilder_.build();
}
}
if (sourceCase_ == 6) {
if (workflowBuilder_ == null) {
result.source_ = source_;
} else {
result.source_ = workflowBuilder_.build();
}
}
result.sourceCase_ = sourceCase_;
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.ConceptQuery) {
return mergeFrom((com.clarifai.grpc.api.ConceptQuery)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.clarifai.grpc.api.ConceptQuery other) {
if (other == com.clarifai.grpc.api.ConceptQuery.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (!other.getLanguage().isEmpty()) {
language_ = other.language_;
onChanged();
}
if (!other.getWorkflowId().isEmpty()) {
workflowId_ = other.workflowId_;
onChanged();
}
if (!other.useCases_.isEmpty()) {
if (useCases_.isEmpty()) {
useCases_ = other.useCases_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureUseCasesIsMutable();
useCases_.addAll(other.useCases_);
}
onChanged();
}
switch (other.getSourceCase()) {
case MODEL: {
mergeModel(other.getModel());
break;
}
case WORKFLOW: {
mergeWorkflow(other.getWorkflow());
break;
}
case SOURCE_NOT_SET: {
break;
}
}
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.ConceptQuery parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.clarifai.grpc.api.ConceptQuery) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int sourceCase_ = 0;
private java.lang.Object source_;
public SourceCase
getSourceCase() {
return SourceCase.forNumber(
sourceCase_);
}
public Builder clearSource() {
sourceCase_ = 0;
source_ = null;
onChanged();
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
*
* The name of the concept to search.
*
*
* string name = 1;
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The name of the concept to search.
*
*
* string name = 1;
* @return The bytes for name.
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The name of the concept to search.
*
*
* string name = 1;
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
*
* The name of the concept to search.
*
*
* string name = 1;
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
* The name of the concept to search.
*
*
* string name = 1;
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
onChanged();
return this;
}
private java.lang.Object language_ = "";
/**
*
* The language of the concept name in a search. Defaults to English.
*
*
* string language = 2;
* @return The language.
*/
public java.lang.String getLanguage() {
java.lang.Object ref = language_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
language_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The language of the concept name in a search. Defaults to English.
*
*
* string language = 2;
* @return The bytes for language.
*/
public com.google.protobuf.ByteString
getLanguageBytes() {
java.lang.Object ref = language_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
language_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The language of the concept name in a search. Defaults to English.
*
*
* string language = 2;
* @param value The language to set.
* @return This builder for chaining.
*/
public Builder setLanguage(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
language_ = value;
onChanged();
return this;
}
/**
*
* The language of the concept name in a search. Defaults to English.
*
*
* string language = 2;
* @return This builder for chaining.
*/
public Builder clearLanguage() {
language_ = getDefaultInstance().getLanguage();
onChanged();
return this;
}
/**
*
* The language of the concept name in a search. Defaults to English.
*
*
* string language = 2;
* @param value The bytes for language to set.
* @return This builder for chaining.
*/
public Builder setLanguageBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
language_ = value;
onChanged();
return this;
}
private java.lang.Object workflowId_ = "";
/**
*
* Deprecated: Use workflow.id instead.
*
*
* string workflow_id = 3 [deprecated = true];
* @deprecated clarifai.api.ConceptQuery.workflow_id is deprecated.
* See proto/clarifai/api/resources.proto;l=495
* @return The workflowId.
*/
@java.lang.Deprecated public java.lang.String getWorkflowId() {
java.lang.Object ref = workflowId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
workflowId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Deprecated: Use workflow.id instead.
*
*
* string workflow_id = 3 [deprecated = true];
* @deprecated clarifai.api.ConceptQuery.workflow_id is deprecated.
* See proto/clarifai/api/resources.proto;l=495
* @return The bytes for workflowId.
*/
@java.lang.Deprecated public com.google.protobuf.ByteString
getWorkflowIdBytes() {
java.lang.Object ref = workflowId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
workflowId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Deprecated: Use workflow.id instead.
*
*
* string workflow_id = 3 [deprecated = true];
* @deprecated clarifai.api.ConceptQuery.workflow_id is deprecated.
* See proto/clarifai/api/resources.proto;l=495
* @param value The workflowId to set.
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder setWorkflowId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
workflowId_ = value;
onChanged();
return this;
}
/**
*
* Deprecated: Use workflow.id instead.
*
*
* string workflow_id = 3 [deprecated = true];
* @deprecated clarifai.api.ConceptQuery.workflow_id is deprecated.
* See proto/clarifai/api/resources.proto;l=495
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder clearWorkflowId() {
workflowId_ = getDefaultInstance().getWorkflowId();
onChanged();
return this;
}
/**
*
* Deprecated: Use workflow.id instead.
*
*
* string workflow_id = 3 [deprecated = true];
* @deprecated clarifai.api.ConceptQuery.workflow_id is deprecated.
* See proto/clarifai/api/resources.proto;l=495
* @param value The bytes for workflowId to set.
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder setWorkflowIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
workflowId_ = value;
onChanged();
return this;
}
private java.util.List useCases_ =
java.util.Collections.emptyList();
private void ensureUseCasesIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
useCases_ = new java.util.ArrayList(useCases_);
bitField0_ |= 0x00000001;
}
}
/**
*
* The concepts must belong to models with specified use cases.
* Multiple values are joined using an OR condition.
*
*
* repeated .clarifai.api.WorkflowModelUseCase use_cases = 4;
* @return A list containing the useCases.
*/
public java.util.List getUseCasesList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, com.clarifai.grpc.api.WorkflowModelUseCase>(useCases_, useCases_converter_);
}
/**
*
* The concepts must belong to models with specified use cases.
* Multiple values are joined using an OR condition.
*
*
* repeated .clarifai.api.WorkflowModelUseCase use_cases = 4;
* @return The count of useCases.
*/
public int getUseCasesCount() {
return useCases_.size();
}
/**
*
* The concepts must belong to models with specified use cases.
* Multiple values are joined using an OR condition.
*
*
* repeated .clarifai.api.WorkflowModelUseCase use_cases = 4;
* @param index The index of the element to return.
* @return The useCases at the given index.
*/
public com.clarifai.grpc.api.WorkflowModelUseCase getUseCases(int index) {
return useCases_converter_.convert(useCases_.get(index));
}
/**
*
* The concepts must belong to models with specified use cases.
* Multiple values are joined using an OR condition.
*
*
* repeated .clarifai.api.WorkflowModelUseCase use_cases = 4;
* @param index The index to set the value at.
* @param value The useCases to set.
* @return This builder for chaining.
*/
public Builder setUseCases(
int index, com.clarifai.grpc.api.WorkflowModelUseCase value) {
if (value == null) {
throw new NullPointerException();
}
ensureUseCasesIsMutable();
useCases_.set(index, value.getNumber());
onChanged();
return this;
}
/**
*
* The concepts must belong to models with specified use cases.
* Multiple values are joined using an OR condition.
*
*
* repeated .clarifai.api.WorkflowModelUseCase use_cases = 4;
* @param value The useCases to add.
* @return This builder for chaining.
*/
public Builder addUseCases(com.clarifai.grpc.api.WorkflowModelUseCase value) {
if (value == null) {
throw new NullPointerException();
}
ensureUseCasesIsMutable();
useCases_.add(value.getNumber());
onChanged();
return this;
}
/**
*
* The concepts must belong to models with specified use cases.
* Multiple values are joined using an OR condition.
*
*
* repeated .clarifai.api.WorkflowModelUseCase use_cases = 4;
* @param values The useCases to add.
* @return This builder for chaining.
*/
public Builder addAllUseCases(
java.lang.Iterable extends com.clarifai.grpc.api.WorkflowModelUseCase> values) {
ensureUseCasesIsMutable();
for (com.clarifai.grpc.api.WorkflowModelUseCase value : values) {
useCases_.add(value.getNumber());
}
onChanged();
return this;
}
/**
*
* The concepts must belong to models with specified use cases.
* Multiple values are joined using an OR condition.
*
*
* repeated .clarifai.api.WorkflowModelUseCase use_cases = 4;
* @return This builder for chaining.
*/
public Builder clearUseCases() {
useCases_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* The concepts must belong to models with specified use cases.
* Multiple values are joined using an OR condition.
*
*
* repeated .clarifai.api.WorkflowModelUseCase use_cases = 4;
* @return A list containing the enum numeric values on the wire for useCases.
*/
public java.util.List
getUseCasesValueList() {
return java.util.Collections.unmodifiableList(useCases_);
}
/**
*
* The concepts must belong to models with specified use cases.
* Multiple values are joined using an OR condition.
*
*
* repeated .clarifai.api.WorkflowModelUseCase use_cases = 4;
* @param index The index of the value to return.
* @return The enum numeric value on the wire of useCases at the given index.
*/
public int getUseCasesValue(int index) {
return useCases_.get(index);
}
/**
*
* The concepts must belong to models with specified use cases.
* Multiple values are joined using an OR condition.
*
*
* repeated .clarifai.api.WorkflowModelUseCase use_cases = 4;
* @param index The index to set the value at.
* @param value The enum numeric value on the wire for useCases to set.
* @return This builder for chaining.
*/
public Builder setUseCasesValue(
int index, int value) {
ensureUseCasesIsMutable();
useCases_.set(index, value);
onChanged();
return this;
}
/**
*
* The concepts must belong to models with specified use cases.
* Multiple values are joined using an OR condition.
*
*
* repeated .clarifai.api.WorkflowModelUseCase use_cases = 4;
* @param value The enum numeric value on the wire for useCases to add.
* @return This builder for chaining.
*/
public Builder addUseCasesValue(int value) {
ensureUseCasesIsMutable();
useCases_.add(value);
onChanged();
return this;
}
/**
*
* The concepts must belong to models with specified use cases.
* Multiple values are joined using an OR condition.
*
*
* repeated .clarifai.api.WorkflowModelUseCase use_cases = 4;
* @param values The enum numeric values on the wire for useCases to add.
* @return This builder for chaining.
*/
public Builder addAllUseCasesValue(
java.lang.Iterable values) {
ensureUseCasesIsMutable();
for (int value : values) {
useCases_.add(value);
}
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Model, com.clarifai.grpc.api.Model.Builder, com.clarifai.grpc.api.ModelOrBuilder> modelBuilder_;
/**
* .clarifai.api.Model model = 5;
* @return Whether the model field is set.
*/
@java.lang.Override
public boolean hasModel() {
return sourceCase_ == 5;
}
/**
* .clarifai.api.Model model = 5;
* @return The model.
*/
@java.lang.Override
public com.clarifai.grpc.api.Model getModel() {
if (modelBuilder_ == null) {
if (sourceCase_ == 5) {
return (com.clarifai.grpc.api.Model) source_;
}
return com.clarifai.grpc.api.Model.getDefaultInstance();
} else {
if (sourceCase_ == 5) {
return modelBuilder_.getMessage();
}
return com.clarifai.grpc.api.Model.getDefaultInstance();
}
}
/**
* .clarifai.api.Model model = 5;
*/
public Builder setModel(com.clarifai.grpc.api.Model value) {
if (modelBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
source_ = value;
onChanged();
} else {
modelBuilder_.setMessage(value);
}
sourceCase_ = 5;
return this;
}
/**
* .clarifai.api.Model model = 5;
*/
public Builder setModel(
com.clarifai.grpc.api.Model.Builder builderForValue) {
if (modelBuilder_ == null) {
source_ = builderForValue.build();
onChanged();
} else {
modelBuilder_.setMessage(builderForValue.build());
}
sourceCase_ = 5;
return this;
}
/**
* .clarifai.api.Model model = 5;
*/
public Builder mergeModel(com.clarifai.grpc.api.Model value) {
if (modelBuilder_ == null) {
if (sourceCase_ == 5 &&
source_ != com.clarifai.grpc.api.Model.getDefaultInstance()) {
source_ = com.clarifai.grpc.api.Model.newBuilder((com.clarifai.grpc.api.Model) source_)
.mergeFrom(value).buildPartial();
} else {
source_ = value;
}
onChanged();
} else {
if (sourceCase_ == 5) {
modelBuilder_.mergeFrom(value);
} else {
modelBuilder_.setMessage(value);
}
}
sourceCase_ = 5;
return this;
}
/**
* .clarifai.api.Model model = 5;
*/
public Builder clearModel() {
if (modelBuilder_ == null) {
if (sourceCase_ == 5) {
sourceCase_ = 0;
source_ = null;
onChanged();
}
} else {
if (sourceCase_ == 5) {
sourceCase_ = 0;
source_ = null;
}
modelBuilder_.clear();
}
return this;
}
/**
* .clarifai.api.Model model = 5;
*/
public com.clarifai.grpc.api.Model.Builder getModelBuilder() {
return getModelFieldBuilder().getBuilder();
}
/**
* .clarifai.api.Model model = 5;
*/
@java.lang.Override
public com.clarifai.grpc.api.ModelOrBuilder getModelOrBuilder() {
if ((sourceCase_ == 5) && (modelBuilder_ != null)) {
return modelBuilder_.getMessageOrBuilder();
} else {
if (sourceCase_ == 5) {
return (com.clarifai.grpc.api.Model) source_;
}
return com.clarifai.grpc.api.Model.getDefaultInstance();
}
}
/**
* .clarifai.api.Model model = 5;
*/
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) {
if (!(sourceCase_ == 5)) {
source_ = com.clarifai.grpc.api.Model.getDefaultInstance();
}
modelBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Model, com.clarifai.grpc.api.Model.Builder, com.clarifai.grpc.api.ModelOrBuilder>(
(com.clarifai.grpc.api.Model) source_,
getParentForChildren(),
isClean());
source_ = null;
}
sourceCase_ = 5;
onChanged();;
return modelBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Workflow, com.clarifai.grpc.api.Workflow.Builder, com.clarifai.grpc.api.WorkflowOrBuilder> workflowBuilder_;
/**
* .clarifai.api.Workflow workflow = 6;
* @return Whether the workflow field is set.
*/
@java.lang.Override
public boolean hasWorkflow() {
return sourceCase_ == 6;
}
/**
* .clarifai.api.Workflow workflow = 6;
* @return The workflow.
*/
@java.lang.Override
public com.clarifai.grpc.api.Workflow getWorkflow() {
if (workflowBuilder_ == null) {
if (sourceCase_ == 6) {
return (com.clarifai.grpc.api.Workflow) source_;
}
return com.clarifai.grpc.api.Workflow.getDefaultInstance();
} else {
if (sourceCase_ == 6) {
return workflowBuilder_.getMessage();
}
return com.clarifai.grpc.api.Workflow.getDefaultInstance();
}
}
/**
* .clarifai.api.Workflow workflow = 6;
*/
public Builder setWorkflow(com.clarifai.grpc.api.Workflow value) {
if (workflowBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
source_ = value;
onChanged();
} else {
workflowBuilder_.setMessage(value);
}
sourceCase_ = 6;
return this;
}
/**
* .clarifai.api.Workflow workflow = 6;
*/
public Builder setWorkflow(
com.clarifai.grpc.api.Workflow.Builder builderForValue) {
if (workflowBuilder_ == null) {
source_ = builderForValue.build();
onChanged();
} else {
workflowBuilder_.setMessage(builderForValue.build());
}
sourceCase_ = 6;
return this;
}
/**
* .clarifai.api.Workflow workflow = 6;
*/
public Builder mergeWorkflow(com.clarifai.grpc.api.Workflow value) {
if (workflowBuilder_ == null) {
if (sourceCase_ == 6 &&
source_ != com.clarifai.grpc.api.Workflow.getDefaultInstance()) {
source_ = com.clarifai.grpc.api.Workflow.newBuilder((com.clarifai.grpc.api.Workflow) source_)
.mergeFrom(value).buildPartial();
} else {
source_ = value;
}
onChanged();
} else {
if (sourceCase_ == 6) {
workflowBuilder_.mergeFrom(value);
} else {
workflowBuilder_.setMessage(value);
}
}
sourceCase_ = 6;
return this;
}
/**
* .clarifai.api.Workflow workflow = 6;
*/
public Builder clearWorkflow() {
if (workflowBuilder_ == null) {
if (sourceCase_ == 6) {
sourceCase_ = 0;
source_ = null;
onChanged();
}
} else {
if (sourceCase_ == 6) {
sourceCase_ = 0;
source_ = null;
}
workflowBuilder_.clear();
}
return this;
}
/**
* .clarifai.api.Workflow workflow = 6;
*/
public com.clarifai.grpc.api.Workflow.Builder getWorkflowBuilder() {
return getWorkflowFieldBuilder().getBuilder();
}
/**
* .clarifai.api.Workflow workflow = 6;
*/
@java.lang.Override
public com.clarifai.grpc.api.WorkflowOrBuilder getWorkflowOrBuilder() {
if ((sourceCase_ == 6) && (workflowBuilder_ != null)) {
return workflowBuilder_.getMessageOrBuilder();
} else {
if (sourceCase_ == 6) {
return (com.clarifai.grpc.api.Workflow) source_;
}
return com.clarifai.grpc.api.Workflow.getDefaultInstance();
}
}
/**
* .clarifai.api.Workflow workflow = 6;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Workflow, com.clarifai.grpc.api.Workflow.Builder, com.clarifai.grpc.api.WorkflowOrBuilder>
getWorkflowFieldBuilder() {
if (workflowBuilder_ == null) {
if (!(sourceCase_ == 6)) {
source_ = com.clarifai.grpc.api.Workflow.getDefaultInstance();
}
workflowBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Workflow, com.clarifai.grpc.api.Workflow.Builder, com.clarifai.grpc.api.WorkflowOrBuilder>(
(com.clarifai.grpc.api.Workflow) source_,
getParentForChildren(),
isClean());
source_ = null;
}
sourceCase_ = 6;
onChanged();;
return workflowBuilder_;
}
@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.ConceptQuery)
}
// @@protoc_insertion_point(class_scope:clarifai.api.ConceptQuery)
private static final com.clarifai.grpc.api.ConceptQuery DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.clarifai.grpc.api.ConceptQuery();
}
public static com.clarifai.grpc.api.ConceptQuery getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ConceptQuery parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ConceptQuery(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.ConceptQuery getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}