All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.clarifai.grpc.api.ConceptQuery Maven / Gradle / Ivy

// 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; } 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); } 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_; /** *
   * The id of workflow. If no id is provided, then application base workflow is used.
   * 
* * string workflow_id = 3; * @return The workflowId. */ @java.lang.Override 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; } } /** *
   * The id of workflow. If no id is provided, then application base workflow is used.
   * 
* * string workflow_id = 3; * @return The bytes for workflowId. */ @java.lang.Override 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 workflow 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 workflow 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 workflow 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 workflow 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 workflow 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; 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)); } 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; } 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 (!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(); } 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); 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_; 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(); } 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 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_ = ""; /** *
     * The id of workflow. If no id is provided, then application base workflow is used.
     * 
* * string workflow_id = 3; * @return The workflowId. */ 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; } } /** *
     * The id of workflow. If no id is provided, then application base workflow is used.
     * 
* * string workflow_id = 3; * @return The bytes for workflowId. */ 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; } } /** *
     * The id of workflow. If no id is provided, then application base workflow is used.
     * 
* * string workflow_id = 3; * @param value The workflowId to set. * @return This builder for chaining. */ public Builder setWorkflowId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } workflowId_ = value; onChanged(); return this; } /** *
     * The id of workflow. If no id is provided, then application base workflow is used.
     * 
* * string workflow_id = 3; * @return This builder for chaining. */ public Builder clearWorkflowId() { workflowId_ = getDefaultInstance().getWorkflowId(); onChanged(); return this; } /** *
     * The id of workflow. If no id is provided, then application base workflow is used.
     * 
* * string workflow_id = 3; * @param value The bytes for workflowId to set. * @return This builder for chaining. */ 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 workflow 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 workflow 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 workflow 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 workflow 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 workflow 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 workflow 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 values) { ensureUseCasesIsMutable(); for (com.clarifai.grpc.api.WorkflowModelUseCase value : values) { useCases_.add(value.getNumber()); } onChanged(); return this; } /** *
     * The concepts must belong to workflow 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 workflow 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 workflow 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 workflow 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 workflow 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 workflow 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; } @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; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy