com.clarifai.grpc.api.ListModelsRequest Maven / Gradle / Ivy
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: proto/clarifai/api/service.proto
package com.clarifai.grpc.api;
/**
*
* ListModelsRequest
*
*
* Protobuf type {@code clarifai.api.ListModelsRequest}
*/
public final class ListModelsRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:clarifai.api.ListModelsRequest)
ListModelsRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use ListModelsRequest.newBuilder() to construct.
private ListModelsRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ListModelsRequest() {
additionalFields_ = com.google.protobuf.LazyStringArrayList.EMPTY;
modelTypeId_ = "";
inputFields_ = com.google.protobuf.LazyStringArrayList.EMPTY;
outputFields_ = com.google.protobuf.LazyStringArrayList.EMPTY;
license_ = "";
toolkits_ = com.google.protobuf.LazyStringArrayList.EMPTY;
useCases_ = com.google.protobuf.LazyStringArrayList.EMPTY;
languages_ = com.google.protobuf.LazyStringArrayList.EMPTY;
search_ = "";
query_ = "";
name_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ListModelsRequest();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ListModelsRequest(
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: {
com.clarifai.grpc.api.UserAppIDSet.Builder subBuilder = null;
if (userAppId_ != null) {
subBuilder = userAppId_.toBuilder();
}
userAppId_ = input.readMessage(com.clarifai.grpc.api.UserAppIDSet.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(userAppId_);
userAppId_ = subBuilder.buildPartial();
}
break;
}
case 16: {
page_ = input.readUInt32();
break;
}
case 24: {
perPage_ = input.readUInt32();
break;
}
case 42: {
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
case 50: {
java.lang.String s = input.readStringRequireUtf8();
modelTypeId_ = s;
break;
}
case 56: {
trainedOnly_ = input.readBool();
break;
}
case 66: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
inputFields_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000002;
}
inputFields_.add(s);
break;
}
case 74: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000004) != 0)) {
outputFields_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000004;
}
outputFields_.add(s);
break;
}
case 80: {
sortAscending_ = input.readBool();
break;
}
case 88: {
sortBy_ = input.readBool();
sortByCase_ = 11;
break;
}
case 96: {
sortBy_ = input.readBool();
sortByCase_ = 12;
break;
}
case 104: {
sortBy_ = input.readBool();
sortByCase_ = 13;
break;
}
case 114: {
java.lang.String s = input.readStringRequireUtf8();
query_ = s;
break;
}
case 122: {
java.lang.String s = input.readStringRequireUtf8();
license_ = s;
break;
}
case 128: {
featuredOnly_ = input.readBool();
break;
}
case 138: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000008) != 0)) {
toolkits_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000008;
}
toolkits_.add(s);
break;
}
case 146: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000010) != 0)) {
useCases_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000010;
}
useCases_.add(s);
break;
}
case 154: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
additionalFields_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000001;
}
additionalFields_.add(s);
break;
}
case 160: {
starredOnly_ = input.readBool();
break;
}
case 170: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000020) != 0)) {
languages_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000020;
}
languages_.add(s);
break;
}
case 176: {
filterByUserId_ = input.readBool();
break;
}
case 184: {
dontFetchFromMain_ = input.readBool();
break;
}
case 192: {
sortBy_ = input.readBool();
sortByCase_ = 24;
break;
}
case 200: {
sortBy_ = input.readBool();
sortByCase_ = 25;
break;
}
case 208: {
bookmark_ = input.readBool();
break;
}
case 218: {
java.lang.String s = input.readStringRequireUtf8();
search_ = s;
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_ & 0x00000002) != 0)) {
inputFields_ = inputFields_.getUnmodifiableView();
}
if (((mutable_bitField0_ & 0x00000004) != 0)) {
outputFields_ = outputFields_.getUnmodifiableView();
}
if (((mutable_bitField0_ & 0x00000008) != 0)) {
toolkits_ = toolkits_.getUnmodifiableView();
}
if (((mutable_bitField0_ & 0x00000010) != 0)) {
useCases_ = useCases_.getUnmodifiableView();
}
if (((mutable_bitField0_ & 0x00000001) != 0)) {
additionalFields_ = additionalFields_.getUnmodifiableView();
}
if (((mutable_bitField0_ & 0x00000020) != 0)) {
languages_ = languages_.getUnmodifiableView();
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.clarifai.grpc.api.Service.internal_static_clarifai_api_ListModelsRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Service.internal_static_clarifai_api_ListModelsRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.ListModelsRequest.class, com.clarifai.grpc.api.ListModelsRequest.Builder.class);
}
private int sortByCase_ = 0;
private java.lang.Object sortBy_;
public enum SortByCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
SORT_BY_NAME(11),
SORT_BY_NUM_INPUTS(12),
SORT_BY_MODIFIED_AT(13),
SORT_BY_CREATED_AT(24),
SORT_BY_STAR_COUNT(25),
SORTBY_NOT_SET(0);
private final int value;
private SortByCase(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 SortByCase valueOf(int value) {
return forNumber(value);
}
public static SortByCase forNumber(int value) {
switch (value) {
case 11: return SORT_BY_NAME;
case 12: return SORT_BY_NUM_INPUTS;
case 13: return SORT_BY_MODIFIED_AT;
case 24: return SORT_BY_CREATED_AT;
case 25: return SORT_BY_STAR_COUNT;
case 0: return SORTBY_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public SortByCase
getSortByCase() {
return SortByCase.forNumber(
sortByCase_);
}
public static final int USER_APP_ID_FIELD_NUMBER = 1;
private com.clarifai.grpc.api.UserAppIDSet userAppId_;
/**
* .clarifai.api.UserAppIDSet user_app_id = 1;
* @return Whether the userAppId field is set.
*/
@java.lang.Override
public boolean hasUserAppId() {
return userAppId_ != null;
}
/**
* .clarifai.api.UserAppIDSet user_app_id = 1;
* @return The userAppId.
*/
@java.lang.Override
public com.clarifai.grpc.api.UserAppIDSet getUserAppId() {
return userAppId_ == null ? com.clarifai.grpc.api.UserAppIDSet.getDefaultInstance() : userAppId_;
}
/**
* .clarifai.api.UserAppIDSet user_app_id = 1;
*/
@java.lang.Override
public com.clarifai.grpc.api.UserAppIDSetOrBuilder getUserAppIdOrBuilder() {
return getUserAppId();
}
public static final int PAGE_FIELD_NUMBER = 2;
private int page_;
/**
*
* (optional URL parameter) The page number. Pagination is used to split the results into chunks.
* Defaults to 1.
*
*
* uint32 page = 2;
* @return The page.
*/
@java.lang.Override
public int getPage() {
return page_;
}
public static final int PER_PAGE_FIELD_NUMBER = 3;
private int perPage_;
/**
*
* (optional URL parameter) The number of results that will be contained in each page. Defaults
* to 128.
*
*
* uint32 per_page = 3;
* @return The perPage.
*/
@java.lang.Override
public int getPerPage() {
return perPage_;
}
public static final int ADDITIONAL_FIELDS_FIELD_NUMBER = 19;
private com.google.protobuf.LazyStringList additionalFields_;
/**
*
* (optional URL parameter) List of additional fields to be included in the response. Currently supported: all, stars, outputs, presets
*
*
* repeated string additional_fields = 19;
* @return A list containing the additionalFields.
*/
public com.google.protobuf.ProtocolStringList
getAdditionalFieldsList() {
return additionalFields_;
}
/**
*
* (optional URL parameter) List of additional fields to be included in the response. Currently supported: all, stars, outputs, presets
*
*
* repeated string additional_fields = 19;
* @return The count of additionalFields.
*/
public int getAdditionalFieldsCount() {
return additionalFields_.size();
}
/**
*
* (optional URL parameter) List of additional fields to be included in the response. Currently supported: all, stars, outputs, presets
*
*
* repeated string additional_fields = 19;
* @param index The index of the element to return.
* @return The additionalFields at the given index.
*/
public java.lang.String getAdditionalFields(int index) {
return additionalFields_.get(index);
}
/**
*
* (optional URL parameter) List of additional fields to be included in the response. Currently supported: all, stars, outputs, presets
*
*
* repeated string additional_fields = 19;
* @param index The index of the value to return.
* @return The bytes of the additionalFields at the given index.
*/
public com.google.protobuf.ByteString
getAdditionalFieldsBytes(int index) {
return additionalFields_.getByteString(index);
}
public static final int SORT_ASCENDING_FIELD_NUMBER = 10;
private boolean sortAscending_;
/**
*
* Sorting options:
* Whether to sort in ascending order. If false, will order in descending order.
*
*
* bool sort_ascending = 10;
* @return The sortAscending.
*/
@java.lang.Override
public boolean getSortAscending() {
return sortAscending_;
}
public static final int SORT_BY_NAME_FIELD_NUMBER = 11;
/**
*
* Whether to order by the name
*
*
* bool sort_by_name = 11;
* @return Whether the sortByName field is set.
*/
@java.lang.Override
public boolean hasSortByName() {
return sortByCase_ == 11;
}
/**
*
* Whether to order by the name
*
*
* bool sort_by_name = 11;
* @return The sortByName.
*/
@java.lang.Override
public boolean getSortByName() {
if (sortByCase_ == 11) {
return (java.lang.Boolean) sortBy_;
}
return false;
}
public static final int SORT_BY_NUM_INPUTS_FIELD_NUMBER = 12;
/**
*
* Whether to order by the number of training inputs
*
*
* bool sort_by_num_inputs = 12;
* @return Whether the sortByNumInputs field is set.
*/
@java.lang.Override
public boolean hasSortByNumInputs() {
return sortByCase_ == 12;
}
/**
*
* Whether to order by the number of training inputs
*
*
* bool sort_by_num_inputs = 12;
* @return The sortByNumInputs.
*/
@java.lang.Override
public boolean getSortByNumInputs() {
if (sortByCase_ == 12) {
return (java.lang.Boolean) sortBy_;
}
return false;
}
public static final int SORT_BY_MODIFIED_AT_FIELD_NUMBER = 13;
/**
*
* Whether to order by the modified_at time of the latest model version.
* If none of the sort options is set to true, will sort by modified_at.
*
*
* bool sort_by_modified_at = 13;
* @return Whether the sortByModifiedAt field is set.
*/
@java.lang.Override
public boolean hasSortByModifiedAt() {
return sortByCase_ == 13;
}
/**
*
* Whether to order by the modified_at time of the latest model version.
* If none of the sort options is set to true, will sort by modified_at.
*
*
* bool sort_by_modified_at = 13;
* @return The sortByModifiedAt.
*/
@java.lang.Override
public boolean getSortByModifiedAt() {
if (sortByCase_ == 13) {
return (java.lang.Boolean) sortBy_;
}
return false;
}
public static final int SORT_BY_CREATED_AT_FIELD_NUMBER = 24;
/**
*
* Whether to order by the created_at
*
*
* bool sort_by_created_at = 24;
* @return Whether the sortByCreatedAt field is set.
*/
@java.lang.Override
public boolean hasSortByCreatedAt() {
return sortByCase_ == 24;
}
/**
*
* Whether to order by the created_at
*
*
* bool sort_by_created_at = 24;
* @return The sortByCreatedAt.
*/
@java.lang.Override
public boolean getSortByCreatedAt() {
if (sortByCase_ == 24) {
return (java.lang.Boolean) sortBy_;
}
return false;
}
public static final int SORT_BY_STAR_COUNT_FIELD_NUMBER = 25;
/**
*
* Whether to order by count of stars
*
*
* bool sort_by_star_count = 25;
* @return Whether the sortByStarCount field is set.
*/
@java.lang.Override
public boolean hasSortByStarCount() {
return sortByCase_ == 25;
}
/**
*
* Whether to order by count of stars
*
*
* bool sort_by_star_count = 25;
* @return The sortByStarCount.
*/
@java.lang.Override
public boolean getSortByStarCount() {
if (sortByCase_ == 25) {
return (java.lang.Boolean) sortBy_;
}
return false;
}
public static final int MODEL_TYPE_ID_FIELD_NUMBER = 6;
private volatile java.lang.Object modelTypeId_;
/**
*
* Filtering options:
* Filter models by the specific model_type_id. See ListModelTypes for the list of ModelType.Id's
* supported.
*
*
* string model_type_id = 6;
* @return The modelTypeId.
*/
@java.lang.Override
public java.lang.String getModelTypeId() {
java.lang.Object ref = modelTypeId_;
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();
modelTypeId_ = s;
return s;
}
}
/**
*
* Filtering options:
* Filter models by the specific model_type_id. See ListModelTypes for the list of ModelType.Id's
* supported.
*
*
* string model_type_id = 6;
* @return The bytes for modelTypeId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getModelTypeIdBytes() {
java.lang.Object ref = modelTypeId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
modelTypeId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TRAINED_ONLY_FIELD_NUMBER = 7;
private boolean trainedOnly_;
/**
*
* If true, we only return models that have the status MODEL_TRAINED, which includes non-trainable model types.
*
*
* bool trained_only = 7;
* @return The trainedOnly.
*/
@java.lang.Override
public boolean getTrainedOnly() {
return trainedOnly_;
}
public static final int INPUT_FIELDS_FIELD_NUMBER = 8;
private com.google.protobuf.LazyStringList inputFields_;
/**
*
* The list of input fields to the model.
* For example, you can specify 'image', which will return models that make inferences on images like visual-classifier models.
*
*
* repeated string input_fields = 8;
* @return A list containing the inputFields.
*/
public com.google.protobuf.ProtocolStringList
getInputFieldsList() {
return inputFields_;
}
/**
*
* The list of input fields to the model.
* For example, you can specify 'image', which will return models that make inferences on images like visual-classifier models.
*
*
* repeated string input_fields = 8;
* @return The count of inputFields.
*/
public int getInputFieldsCount() {
return inputFields_.size();
}
/**
*
* The list of input fields to the model.
* For example, you can specify 'image', which will return models that make inferences on images like visual-classifier models.
*
*
* repeated string input_fields = 8;
* @param index The index of the element to return.
* @return The inputFields at the given index.
*/
public java.lang.String getInputFields(int index) {
return inputFields_.get(index);
}
/**
*
* The list of input fields to the model.
* For example, you can specify 'image', which will return models that make inferences on images like visual-classifier models.
*
*
* repeated string input_fields = 8;
* @param index The index of the value to return.
* @return The bytes of the inputFields at the given index.
*/
public com.google.protobuf.ByteString
getInputFieldsBytes(int index) {
return inputFields_.getByteString(index);
}
public static final int OUTPUT_FIELDS_FIELD_NUMBER = 9;
private com.google.protobuf.LazyStringList outputFields_;
/**
*
* The list of output fields to the model.
* For example, you can specify 'regions[...].data.concepts', which will return visual-detector models.
*
*
* repeated string output_fields = 9;
* @return A list containing the outputFields.
*/
public com.google.protobuf.ProtocolStringList
getOutputFieldsList() {
return outputFields_;
}
/**
*
* The list of output fields to the model.
* For example, you can specify 'regions[...].data.concepts', which will return visual-detector models.
*
*
* repeated string output_fields = 9;
* @return The count of outputFields.
*/
public int getOutputFieldsCount() {
return outputFields_.size();
}
/**
*
* The list of output fields to the model.
* For example, you can specify 'regions[...].data.concepts', which will return visual-detector models.
*
*
* repeated string output_fields = 9;
* @param index The index of the element to return.
* @return The outputFields at the given index.
*/
public java.lang.String getOutputFields(int index) {
return outputFields_.get(index);
}
/**
*
* The list of output fields to the model.
* For example, you can specify 'regions[...].data.concepts', which will return visual-detector models.
*
*
* repeated string output_fields = 9;
* @param index The index of the value to return.
* @return The bytes of the outputFields at the given index.
*/
public com.google.protobuf.ByteString
getOutputFieldsBytes(int index) {
return outputFields_.getByteString(index);
}
public static final int LICENSE_FIELD_NUMBER = 15;
private volatile java.lang.Object license_;
/**
*
* Filter by the license of the model version
*
*
* string license = 15;
* @return The license.
*/
@java.lang.Override
public java.lang.String getLicense() {
java.lang.Object ref = license_;
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();
license_ = s;
return s;
}
}
/**
*
* Filter by the license of the model version
*
*
* string license = 15;
* @return The bytes for license.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getLicenseBytes() {
java.lang.Object ref = license_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
license_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int FEATURED_ONLY_FIELD_NUMBER = 16;
private boolean featuredOnly_;
/**
*
* If true, we only return models that are handpicked by clarifai staff
*
*
* bool featured_only = 16;
* @return The featuredOnly.
*/
@java.lang.Override
public boolean getFeaturedOnly() {
return featuredOnly_;
}
public static final int STARRED_ONLY_FIELD_NUMBER = 20;
private boolean starredOnly_;
/**
*
* If true, we only return models that are starred by the requesting user
*
*
* bool starred_only = 20;
* @return The starredOnly.
*/
@java.lang.Override
public boolean getStarredOnly() {
return starredOnly_;
}
public static final int TOOLKITS_FIELD_NUMBER = 17;
private com.google.protobuf.LazyStringList toolkits_;
/**
*
* List of toolkit tags to filter by
*
*
* repeated string toolkits = 17;
* @return A list containing the toolkits.
*/
public com.google.protobuf.ProtocolStringList
getToolkitsList() {
return toolkits_;
}
/**
*
* List of toolkit tags to filter by
*
*
* repeated string toolkits = 17;
* @return The count of toolkits.
*/
public int getToolkitsCount() {
return toolkits_.size();
}
/**
*
* List of toolkit tags to filter by
*
*
* repeated string toolkits = 17;
* @param index The index of the element to return.
* @return The toolkits at the given index.
*/
public java.lang.String getToolkits(int index) {
return toolkits_.get(index);
}
/**
*
* List of toolkit tags to filter by
*
*
* repeated string toolkits = 17;
* @param index The index of the value to return.
* @return The bytes of the toolkits at the given index.
*/
public com.google.protobuf.ByteString
getToolkitsBytes(int index) {
return toolkits_.getByteString(index);
}
public static final int USE_CASES_FIELD_NUMBER = 18;
private com.google.protobuf.LazyStringList useCases_;
/**
*
* List of use_case tags to filter by
*
*
* repeated string use_cases = 18;
* @return A list containing the useCases.
*/
public com.google.protobuf.ProtocolStringList
getUseCasesList() {
return useCases_;
}
/**
*
* List of use_case tags to filter by
*
*
* repeated string use_cases = 18;
* @return The count of useCases.
*/
public int getUseCasesCount() {
return useCases_.size();
}
/**
*
* List of use_case tags to filter by
*
*
* repeated string use_cases = 18;
* @param index The index of the element to return.
* @return The useCases at the given index.
*/
public java.lang.String getUseCases(int index) {
return useCases_.get(index);
}
/**
*
* List of use_case tags to filter by
*
*
* repeated string use_cases = 18;
* @param index The index of the value to return.
* @return The bytes of the useCases at the given index.
*/
public com.google.protobuf.ByteString
getUseCasesBytes(int index) {
return useCases_.getByteString(index);
}
public static final int LANGUAGES_FIELD_NUMBER = 21;
private com.google.protobuf.LazyStringList languages_;
/**
*
* List of language tags to filter by
*
*
* repeated string languages = 21;
* @return A list containing the languages.
*/
public com.google.protobuf.ProtocolStringList
getLanguagesList() {
return languages_;
}
/**
*
* List of language tags to filter by
*
*
* repeated string languages = 21;
* @return The count of languages.
*/
public int getLanguagesCount() {
return languages_.size();
}
/**
*
* List of language tags to filter by
*
*
* repeated string languages = 21;
* @param index The index of the element to return.
* @return The languages at the given index.
*/
public java.lang.String getLanguages(int index) {
return languages_.get(index);
}
/**
*
* List of language tags to filter by
*
*
* repeated string languages = 21;
* @param index The index of the value to return.
* @return The bytes of the languages at the given index.
*/
public com.google.protobuf.ByteString
getLanguagesBytes(int index) {
return languages_.getByteString(index);
}
public static final int DONT_FETCH_FROM_MAIN_FIELD_NUMBER = 23;
private boolean dontFetchFromMain_;
/**
*
* Old API behavior resulted in returning clarifai main models when calling ListModels while scoped to an app. While we transition
* away from that, we can use this flag to not always fetch clarifai main models, unless that is the app we are explicitly listing for.
*
*
* bool dont_fetch_from_main = 23;
* @return The dontFetchFromMain.
*/
@java.lang.Override
public boolean getDontFetchFromMain() {
return dontFetchFromMain_;
}
public static final int BOOKMARK_FIELD_NUMBER = 26;
private boolean bookmark_;
/**
*
* Filter models by bookmark. If set, only return bookmarked models. Otherwise none bookmarked models only.
* Note: you can not filter `trained_only` and bookmark at the same time.
* When filter by bookmark, we will return trained and untrained models.
*
*
* bool bookmark = 26;
* @return The bookmark.
*/
@java.lang.Override
public boolean getBookmark() {
return bookmark_;
}
public static final int SEARCH_FIELD_NUMBER = 27;
private volatile java.lang.Object search_;
/**
*
* Searching options:
* Specify a search parameter in order to perform keyword search on the
* following fields of the model:
* - id
* - name
* - description
* - notes
* - user_id (unless user_app_id.user_id is already set)
* Keywords are both normalized for search (so searching for "satisfy" matches "satisfied")
* and used for partial prefix-matching (so searching for "clari" matches "clarifai").
* NOTE: Both the list of fields searched and the exact keyword matching
* rules are subject to change and not guaranteed to be backwards-compatible.
*
*
* string search = 27;
* @return The search.
*/
@java.lang.Override
public java.lang.String getSearch() {
java.lang.Object ref = search_;
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();
search_ = s;
return s;
}
}
/**
*
* Searching options:
* Specify a search parameter in order to perform keyword search on the
* following fields of the model:
* - id
* - name
* - description
* - notes
* - user_id (unless user_app_id.user_id is already set)
* Keywords are both normalized for search (so searching for "satisfy" matches "satisfied")
* and used for partial prefix-matching (so searching for "clari" matches "clarifai").
* NOTE: Both the list of fields searched and the exact keyword matching
* rules are subject to change and not guaranteed to be backwards-compatible.
*
*
* string search = 27;
* @return The bytes for search.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getSearchBytes() {
java.lang.Object ref = search_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
search_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int QUERY_FIELD_NUMBER = 14;
private volatile java.lang.Object query_;
/**
*
* Query name, description and id fields, that can contain the words in the query string. Does NOT support wildcards - full words only. Supports operators "OR" and "-" as NOT.
* Deprecated: use search instead.
*
*
* string query = 14 [deprecated = true];
* @deprecated clarifai.api.ListModelsRequest.query is deprecated.
* See proto/clarifai/api/service.proto;l=5364
* @return The query.
*/
@java.lang.Override
@java.lang.Deprecated public java.lang.String getQuery() {
java.lang.Object ref = query_;
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();
query_ = s;
return s;
}
}
/**
*
* Query name, description and id fields, that can contain the words in the query string. Does NOT support wildcards - full words only. Supports operators "OR" and "-" as NOT.
* Deprecated: use search instead.
*
*
* string query = 14 [deprecated = true];
* @deprecated clarifai.api.ListModelsRequest.query is deprecated.
* See proto/clarifai/api/service.proto;l=5364
* @return The bytes for query.
*/
@java.lang.Override
@java.lang.Deprecated public com.google.protobuf.ByteString
getQueryBytes() {
java.lang.Object ref = query_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
query_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int NAME_FIELD_NUMBER = 5;
private volatile java.lang.Object name_;
/**
*
* Filter by the description and id of the model. This supports wildcard queries like "gen*" to match "general" as an example.
* Deprecated: use search instead.
*
*
* string name = 5 [deprecated = true];
* @deprecated clarifai.api.ListModelsRequest.name is deprecated.
* See proto/clarifai/api/service.proto;l=5367
* @return The name.
*/
@java.lang.Override
@java.lang.Deprecated 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;
}
}
/**
*
* Filter by the description and id of the model. This supports wildcard queries like "gen*" to match "general" as an example.
* Deprecated: use search instead.
*
*
* string name = 5 [deprecated = true];
* @deprecated clarifai.api.ListModelsRequest.name is deprecated.
* See proto/clarifai/api/service.proto;l=5367
* @return The bytes for name.
*/
@java.lang.Override
@java.lang.Deprecated 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 FILTER_BY_USER_ID_FIELD_NUMBER = 22;
private boolean filterByUserId_;
/**
*
* Extends the name filter to include the user_id of the application owner that the model belongs to.
* Deprecated: use search instead of name.
*
*
* bool filter_by_user_id = 22 [deprecated = true];
* @deprecated clarifai.api.ListModelsRequest.filter_by_user_id is deprecated.
* See proto/clarifai/api/service.proto;l=5370
* @return The filterByUserId.
*/
@java.lang.Override
@java.lang.Deprecated public boolean getFilterByUserId() {
return filterByUserId_;
}
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 (userAppId_ != null) {
output.writeMessage(1, getUserAppId());
}
if (page_ != 0) {
output.writeUInt32(2, page_);
}
if (perPage_ != 0) {
output.writeUInt32(3, perPage_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, name_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(modelTypeId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, modelTypeId_);
}
if (trainedOnly_ != false) {
output.writeBool(7, trainedOnly_);
}
for (int i = 0; i < inputFields_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 8, inputFields_.getRaw(i));
}
for (int i = 0; i < outputFields_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 9, outputFields_.getRaw(i));
}
if (sortAscending_ != false) {
output.writeBool(10, sortAscending_);
}
if (sortByCase_ == 11) {
output.writeBool(
11, (boolean)((java.lang.Boolean) sortBy_));
}
if (sortByCase_ == 12) {
output.writeBool(
12, (boolean)((java.lang.Boolean) sortBy_));
}
if (sortByCase_ == 13) {
output.writeBool(
13, (boolean)((java.lang.Boolean) sortBy_));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 14, query_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(license_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 15, license_);
}
if (featuredOnly_ != false) {
output.writeBool(16, featuredOnly_);
}
for (int i = 0; i < toolkits_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 17, toolkits_.getRaw(i));
}
for (int i = 0; i < useCases_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 18, useCases_.getRaw(i));
}
for (int i = 0; i < additionalFields_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 19, additionalFields_.getRaw(i));
}
if (starredOnly_ != false) {
output.writeBool(20, starredOnly_);
}
for (int i = 0; i < languages_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 21, languages_.getRaw(i));
}
if (filterByUserId_ != false) {
output.writeBool(22, filterByUserId_);
}
if (dontFetchFromMain_ != false) {
output.writeBool(23, dontFetchFromMain_);
}
if (sortByCase_ == 24) {
output.writeBool(
24, (boolean)((java.lang.Boolean) sortBy_));
}
if (sortByCase_ == 25) {
output.writeBool(
25, (boolean)((java.lang.Boolean) sortBy_));
}
if (bookmark_ != false) {
output.writeBool(26, bookmark_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(search_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 27, search_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (userAppId_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getUserAppId());
}
if (page_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(2, page_);
}
if (perPage_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(3, perPage_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, name_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(modelTypeId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, modelTypeId_);
}
if (trainedOnly_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(7, trainedOnly_);
}
{
int dataSize = 0;
for (int i = 0; i < inputFields_.size(); i++) {
dataSize += computeStringSizeNoTag(inputFields_.getRaw(i));
}
size += dataSize;
size += 1 * getInputFieldsList().size();
}
{
int dataSize = 0;
for (int i = 0; i < outputFields_.size(); i++) {
dataSize += computeStringSizeNoTag(outputFields_.getRaw(i));
}
size += dataSize;
size += 1 * getOutputFieldsList().size();
}
if (sortAscending_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(10, sortAscending_);
}
if (sortByCase_ == 11) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(
11, (boolean)((java.lang.Boolean) sortBy_));
}
if (sortByCase_ == 12) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(
12, (boolean)((java.lang.Boolean) sortBy_));
}
if (sortByCase_ == 13) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(
13, (boolean)((java.lang.Boolean) sortBy_));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, query_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(license_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, license_);
}
if (featuredOnly_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(16, featuredOnly_);
}
{
int dataSize = 0;
for (int i = 0; i < toolkits_.size(); i++) {
dataSize += computeStringSizeNoTag(toolkits_.getRaw(i));
}
size += dataSize;
size += 2 * getToolkitsList().size();
}
{
int dataSize = 0;
for (int i = 0; i < useCases_.size(); i++) {
dataSize += computeStringSizeNoTag(useCases_.getRaw(i));
}
size += dataSize;
size += 2 * getUseCasesList().size();
}
{
int dataSize = 0;
for (int i = 0; i < additionalFields_.size(); i++) {
dataSize += computeStringSizeNoTag(additionalFields_.getRaw(i));
}
size += dataSize;
size += 2 * getAdditionalFieldsList().size();
}
if (starredOnly_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(20, starredOnly_);
}
{
int dataSize = 0;
for (int i = 0; i < languages_.size(); i++) {
dataSize += computeStringSizeNoTag(languages_.getRaw(i));
}
size += dataSize;
size += 2 * getLanguagesList().size();
}
if (filterByUserId_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(22, filterByUserId_);
}
if (dontFetchFromMain_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(23, dontFetchFromMain_);
}
if (sortByCase_ == 24) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(
24, (boolean)((java.lang.Boolean) sortBy_));
}
if (sortByCase_ == 25) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(
25, (boolean)((java.lang.Boolean) sortBy_));
}
if (bookmark_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(26, bookmark_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(search_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(27, search_);
}
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.ListModelsRequest)) {
return super.equals(obj);
}
com.clarifai.grpc.api.ListModelsRequest other = (com.clarifai.grpc.api.ListModelsRequest) obj;
if (hasUserAppId() != other.hasUserAppId()) return false;
if (hasUserAppId()) {
if (!getUserAppId()
.equals(other.getUserAppId())) return false;
}
if (getPage()
!= other.getPage()) return false;
if (getPerPage()
!= other.getPerPage()) return false;
if (!getAdditionalFieldsList()
.equals(other.getAdditionalFieldsList())) return false;
if (getSortAscending()
!= other.getSortAscending()) return false;
if (!getModelTypeId()
.equals(other.getModelTypeId())) return false;
if (getTrainedOnly()
!= other.getTrainedOnly()) return false;
if (!getInputFieldsList()
.equals(other.getInputFieldsList())) return false;
if (!getOutputFieldsList()
.equals(other.getOutputFieldsList())) return false;
if (!getLicense()
.equals(other.getLicense())) return false;
if (getFeaturedOnly()
!= other.getFeaturedOnly()) return false;
if (getStarredOnly()
!= other.getStarredOnly()) return false;
if (!getToolkitsList()
.equals(other.getToolkitsList())) return false;
if (!getUseCasesList()
.equals(other.getUseCasesList())) return false;
if (!getLanguagesList()
.equals(other.getLanguagesList())) return false;
if (getDontFetchFromMain()
!= other.getDontFetchFromMain()) return false;
if (getBookmark()
!= other.getBookmark()) return false;
if (!getSearch()
.equals(other.getSearch())) return false;
if (!getQuery()
.equals(other.getQuery())) return false;
if (!getName()
.equals(other.getName())) return false;
if (getFilterByUserId()
!= other.getFilterByUserId()) return false;
if (!getSortByCase().equals(other.getSortByCase())) return false;
switch (sortByCase_) {
case 11:
if (getSortByName()
!= other.getSortByName()) return false;
break;
case 12:
if (getSortByNumInputs()
!= other.getSortByNumInputs()) return false;
break;
case 13:
if (getSortByModifiedAt()
!= other.getSortByModifiedAt()) return false;
break;
case 24:
if (getSortByCreatedAt()
!= other.getSortByCreatedAt()) return false;
break;
case 25:
if (getSortByStarCount()
!= other.getSortByStarCount()) 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();
if (hasUserAppId()) {
hash = (37 * hash) + USER_APP_ID_FIELD_NUMBER;
hash = (53 * hash) + getUserAppId().hashCode();
}
hash = (37 * hash) + PAGE_FIELD_NUMBER;
hash = (53 * hash) + getPage();
hash = (37 * hash) + PER_PAGE_FIELD_NUMBER;
hash = (53 * hash) + getPerPage();
if (getAdditionalFieldsCount() > 0) {
hash = (37 * hash) + ADDITIONAL_FIELDS_FIELD_NUMBER;
hash = (53 * hash) + getAdditionalFieldsList().hashCode();
}
hash = (37 * hash) + SORT_ASCENDING_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getSortAscending());
hash = (37 * hash) + MODEL_TYPE_ID_FIELD_NUMBER;
hash = (53 * hash) + getModelTypeId().hashCode();
hash = (37 * hash) + TRAINED_ONLY_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getTrainedOnly());
if (getInputFieldsCount() > 0) {
hash = (37 * hash) + INPUT_FIELDS_FIELD_NUMBER;
hash = (53 * hash) + getInputFieldsList().hashCode();
}
if (getOutputFieldsCount() > 0) {
hash = (37 * hash) + OUTPUT_FIELDS_FIELD_NUMBER;
hash = (53 * hash) + getOutputFieldsList().hashCode();
}
hash = (37 * hash) + LICENSE_FIELD_NUMBER;
hash = (53 * hash) + getLicense().hashCode();
hash = (37 * hash) + FEATURED_ONLY_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getFeaturedOnly());
hash = (37 * hash) + STARRED_ONLY_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getStarredOnly());
if (getToolkitsCount() > 0) {
hash = (37 * hash) + TOOLKITS_FIELD_NUMBER;
hash = (53 * hash) + getToolkitsList().hashCode();
}
if (getUseCasesCount() > 0) {
hash = (37 * hash) + USE_CASES_FIELD_NUMBER;
hash = (53 * hash) + getUseCasesList().hashCode();
}
if (getLanguagesCount() > 0) {
hash = (37 * hash) + LANGUAGES_FIELD_NUMBER;
hash = (53 * hash) + getLanguagesList().hashCode();
}
hash = (37 * hash) + DONT_FETCH_FROM_MAIN_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getDontFetchFromMain());
hash = (37 * hash) + BOOKMARK_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getBookmark());
hash = (37 * hash) + SEARCH_FIELD_NUMBER;
hash = (53 * hash) + getSearch().hashCode();
hash = (37 * hash) + QUERY_FIELD_NUMBER;
hash = (53 * hash) + getQuery().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (37 * hash) + FILTER_BY_USER_ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getFilterByUserId());
switch (sortByCase_) {
case 11:
hash = (37 * hash) + SORT_BY_NAME_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getSortByName());
break;
case 12:
hash = (37 * hash) + SORT_BY_NUM_INPUTS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getSortByNumInputs());
break;
case 13:
hash = (37 * hash) + SORT_BY_MODIFIED_AT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getSortByModifiedAt());
break;
case 24:
hash = (37 * hash) + SORT_BY_CREATED_AT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getSortByCreatedAt());
break;
case 25:
hash = (37 * hash) + SORT_BY_STAR_COUNT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getSortByStarCount());
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.clarifai.grpc.api.ListModelsRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.ListModelsRequest 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.ListModelsRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.ListModelsRequest 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.ListModelsRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.ListModelsRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.clarifai.grpc.api.ListModelsRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.ListModelsRequest 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.ListModelsRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.ListModelsRequest 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.ListModelsRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.ListModelsRequest 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.ListModelsRequest 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;
}
/**
*
* ListModelsRequest
*
*
* Protobuf type {@code clarifai.api.ListModelsRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:clarifai.api.ListModelsRequest)
com.clarifai.grpc.api.ListModelsRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.clarifai.grpc.api.Service.internal_static_clarifai_api_ListModelsRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Service.internal_static_clarifai_api_ListModelsRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.ListModelsRequest.class, com.clarifai.grpc.api.ListModelsRequest.Builder.class);
}
// Construct using com.clarifai.grpc.api.ListModelsRequest.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();
if (userAppIdBuilder_ == null) {
userAppId_ = null;
} else {
userAppId_ = null;
userAppIdBuilder_ = null;
}
page_ = 0;
perPage_ = 0;
additionalFields_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
sortAscending_ = false;
modelTypeId_ = "";
trainedOnly_ = false;
inputFields_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000002);
outputFields_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000004);
license_ = "";
featuredOnly_ = false;
starredOnly_ = false;
toolkits_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000008);
useCases_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000010);
languages_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000020);
dontFetchFromMain_ = false;
bookmark_ = false;
search_ = "";
query_ = "";
name_ = "";
filterByUserId_ = false;
sortByCase_ = 0;
sortBy_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.clarifai.grpc.api.Service.internal_static_clarifai_api_ListModelsRequest_descriptor;
}
@java.lang.Override
public com.clarifai.grpc.api.ListModelsRequest getDefaultInstanceForType() {
return com.clarifai.grpc.api.ListModelsRequest.getDefaultInstance();
}
@java.lang.Override
public com.clarifai.grpc.api.ListModelsRequest build() {
com.clarifai.grpc.api.ListModelsRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.clarifai.grpc.api.ListModelsRequest buildPartial() {
com.clarifai.grpc.api.ListModelsRequest result = new com.clarifai.grpc.api.ListModelsRequest(this);
int from_bitField0_ = bitField0_;
if (userAppIdBuilder_ == null) {
result.userAppId_ = userAppId_;
} else {
result.userAppId_ = userAppIdBuilder_.build();
}
result.page_ = page_;
result.perPage_ = perPage_;
if (((bitField0_ & 0x00000001) != 0)) {
additionalFields_ = additionalFields_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000001);
}
result.additionalFields_ = additionalFields_;
result.sortAscending_ = sortAscending_;
if (sortByCase_ == 11) {
result.sortBy_ = sortBy_;
}
if (sortByCase_ == 12) {
result.sortBy_ = sortBy_;
}
if (sortByCase_ == 13) {
result.sortBy_ = sortBy_;
}
if (sortByCase_ == 24) {
result.sortBy_ = sortBy_;
}
if (sortByCase_ == 25) {
result.sortBy_ = sortBy_;
}
result.modelTypeId_ = modelTypeId_;
result.trainedOnly_ = trainedOnly_;
if (((bitField0_ & 0x00000002) != 0)) {
inputFields_ = inputFields_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000002);
}
result.inputFields_ = inputFields_;
if (((bitField0_ & 0x00000004) != 0)) {
outputFields_ = outputFields_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000004);
}
result.outputFields_ = outputFields_;
result.license_ = license_;
result.featuredOnly_ = featuredOnly_;
result.starredOnly_ = starredOnly_;
if (((bitField0_ & 0x00000008) != 0)) {
toolkits_ = toolkits_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000008);
}
result.toolkits_ = toolkits_;
if (((bitField0_ & 0x00000010) != 0)) {
useCases_ = useCases_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000010);
}
result.useCases_ = useCases_;
if (((bitField0_ & 0x00000020) != 0)) {
languages_ = languages_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000020);
}
result.languages_ = languages_;
result.dontFetchFromMain_ = dontFetchFromMain_;
result.bookmark_ = bookmark_;
result.search_ = search_;
result.query_ = query_;
result.name_ = name_;
result.filterByUserId_ = filterByUserId_;
result.sortByCase_ = sortByCase_;
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.ListModelsRequest) {
return mergeFrom((com.clarifai.grpc.api.ListModelsRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.clarifai.grpc.api.ListModelsRequest other) {
if (other == com.clarifai.grpc.api.ListModelsRequest.getDefaultInstance()) return this;
if (other.hasUserAppId()) {
mergeUserAppId(other.getUserAppId());
}
if (other.getPage() != 0) {
setPage(other.getPage());
}
if (other.getPerPage() != 0) {
setPerPage(other.getPerPage());
}
if (!other.additionalFields_.isEmpty()) {
if (additionalFields_.isEmpty()) {
additionalFields_ = other.additionalFields_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureAdditionalFieldsIsMutable();
additionalFields_.addAll(other.additionalFields_);
}
onChanged();
}
if (other.getSortAscending() != false) {
setSortAscending(other.getSortAscending());
}
if (!other.getModelTypeId().isEmpty()) {
modelTypeId_ = other.modelTypeId_;
onChanged();
}
if (other.getTrainedOnly() != false) {
setTrainedOnly(other.getTrainedOnly());
}
if (!other.inputFields_.isEmpty()) {
if (inputFields_.isEmpty()) {
inputFields_ = other.inputFields_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureInputFieldsIsMutable();
inputFields_.addAll(other.inputFields_);
}
onChanged();
}
if (!other.outputFields_.isEmpty()) {
if (outputFields_.isEmpty()) {
outputFields_ = other.outputFields_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureOutputFieldsIsMutable();
outputFields_.addAll(other.outputFields_);
}
onChanged();
}
if (!other.getLicense().isEmpty()) {
license_ = other.license_;
onChanged();
}
if (other.getFeaturedOnly() != false) {
setFeaturedOnly(other.getFeaturedOnly());
}
if (other.getStarredOnly() != false) {
setStarredOnly(other.getStarredOnly());
}
if (!other.toolkits_.isEmpty()) {
if (toolkits_.isEmpty()) {
toolkits_ = other.toolkits_;
bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensureToolkitsIsMutable();
toolkits_.addAll(other.toolkits_);
}
onChanged();
}
if (!other.useCases_.isEmpty()) {
if (useCases_.isEmpty()) {
useCases_ = other.useCases_;
bitField0_ = (bitField0_ & ~0x00000010);
} else {
ensureUseCasesIsMutable();
useCases_.addAll(other.useCases_);
}
onChanged();
}
if (!other.languages_.isEmpty()) {
if (languages_.isEmpty()) {
languages_ = other.languages_;
bitField0_ = (bitField0_ & ~0x00000020);
} else {
ensureLanguagesIsMutable();
languages_.addAll(other.languages_);
}
onChanged();
}
if (other.getDontFetchFromMain() != false) {
setDontFetchFromMain(other.getDontFetchFromMain());
}
if (other.getBookmark() != false) {
setBookmark(other.getBookmark());
}
if (!other.getSearch().isEmpty()) {
search_ = other.search_;
onChanged();
}
if (!other.getQuery().isEmpty()) {
query_ = other.query_;
onChanged();
}
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (other.getFilterByUserId() != false) {
setFilterByUserId(other.getFilterByUserId());
}
switch (other.getSortByCase()) {
case SORT_BY_NAME: {
setSortByName(other.getSortByName());
break;
}
case SORT_BY_NUM_INPUTS: {
setSortByNumInputs(other.getSortByNumInputs());
break;
}
case SORT_BY_MODIFIED_AT: {
setSortByModifiedAt(other.getSortByModifiedAt());
break;
}
case SORT_BY_CREATED_AT: {
setSortByCreatedAt(other.getSortByCreatedAt());
break;
}
case SORT_BY_STAR_COUNT: {
setSortByStarCount(other.getSortByStarCount());
break;
}
case SORTBY_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.ListModelsRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.clarifai.grpc.api.ListModelsRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int sortByCase_ = 0;
private java.lang.Object sortBy_;
public SortByCase
getSortByCase() {
return SortByCase.forNumber(
sortByCase_);
}
public Builder clearSortBy() {
sortByCase_ = 0;
sortBy_ = null;
onChanged();
return this;
}
private int bitField0_;
private com.clarifai.grpc.api.UserAppIDSet userAppId_;
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.UserAppIDSet, com.clarifai.grpc.api.UserAppIDSet.Builder, com.clarifai.grpc.api.UserAppIDSetOrBuilder> userAppIdBuilder_;
/**
* .clarifai.api.UserAppIDSet user_app_id = 1;
* @return Whether the userAppId field is set.
*/
public boolean hasUserAppId() {
return userAppIdBuilder_ != null || userAppId_ != null;
}
/**
* .clarifai.api.UserAppIDSet user_app_id = 1;
* @return The userAppId.
*/
public com.clarifai.grpc.api.UserAppIDSet getUserAppId() {
if (userAppIdBuilder_ == null) {
return userAppId_ == null ? com.clarifai.grpc.api.UserAppIDSet.getDefaultInstance() : userAppId_;
} else {
return userAppIdBuilder_.getMessage();
}
}
/**
* .clarifai.api.UserAppIDSet user_app_id = 1;
*/
public Builder setUserAppId(com.clarifai.grpc.api.UserAppIDSet value) {
if (userAppIdBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
userAppId_ = value;
onChanged();
} else {
userAppIdBuilder_.setMessage(value);
}
return this;
}
/**
* .clarifai.api.UserAppIDSet user_app_id = 1;
*/
public Builder setUserAppId(
com.clarifai.grpc.api.UserAppIDSet.Builder builderForValue) {
if (userAppIdBuilder_ == null) {
userAppId_ = builderForValue.build();
onChanged();
} else {
userAppIdBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .clarifai.api.UserAppIDSet user_app_id = 1;
*/
public Builder mergeUserAppId(com.clarifai.grpc.api.UserAppIDSet value) {
if (userAppIdBuilder_ == null) {
if (userAppId_ != null) {
userAppId_ =
com.clarifai.grpc.api.UserAppIDSet.newBuilder(userAppId_).mergeFrom(value).buildPartial();
} else {
userAppId_ = value;
}
onChanged();
} else {
userAppIdBuilder_.mergeFrom(value);
}
return this;
}
/**
* .clarifai.api.UserAppIDSet user_app_id = 1;
*/
public Builder clearUserAppId() {
if (userAppIdBuilder_ == null) {
userAppId_ = null;
onChanged();
} else {
userAppId_ = null;
userAppIdBuilder_ = null;
}
return this;
}
/**
* .clarifai.api.UserAppIDSet user_app_id = 1;
*/
public com.clarifai.grpc.api.UserAppIDSet.Builder getUserAppIdBuilder() {
onChanged();
return getUserAppIdFieldBuilder().getBuilder();
}
/**
* .clarifai.api.UserAppIDSet user_app_id = 1;
*/
public com.clarifai.grpc.api.UserAppIDSetOrBuilder getUserAppIdOrBuilder() {
if (userAppIdBuilder_ != null) {
return userAppIdBuilder_.getMessageOrBuilder();
} else {
return userAppId_ == null ?
com.clarifai.grpc.api.UserAppIDSet.getDefaultInstance() : userAppId_;
}
}
/**
* .clarifai.api.UserAppIDSet user_app_id = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.UserAppIDSet, com.clarifai.grpc.api.UserAppIDSet.Builder, com.clarifai.grpc.api.UserAppIDSetOrBuilder>
getUserAppIdFieldBuilder() {
if (userAppIdBuilder_ == null) {
userAppIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.UserAppIDSet, com.clarifai.grpc.api.UserAppIDSet.Builder, com.clarifai.grpc.api.UserAppIDSetOrBuilder>(
getUserAppId(),
getParentForChildren(),
isClean());
userAppId_ = null;
}
return userAppIdBuilder_;
}
private int page_ ;
/**
*
* (optional URL parameter) The page number. Pagination is used to split the results into chunks.
* Defaults to 1.
*
*
* uint32 page = 2;
* @return The page.
*/
@java.lang.Override
public int getPage() {
return page_;
}
/**
*
* (optional URL parameter) The page number. Pagination is used to split the results into chunks.
* Defaults to 1.
*
*
* uint32 page = 2;
* @param value The page to set.
* @return This builder for chaining.
*/
public Builder setPage(int value) {
page_ = value;
onChanged();
return this;
}
/**
*
* (optional URL parameter) The page number. Pagination is used to split the results into chunks.
* Defaults to 1.
*
*
* uint32 page = 2;
* @return This builder for chaining.
*/
public Builder clearPage() {
page_ = 0;
onChanged();
return this;
}
private int perPage_ ;
/**
*
* (optional URL parameter) The number of results that will be contained in each page. Defaults
* to 128.
*
*
* uint32 per_page = 3;
* @return The perPage.
*/
@java.lang.Override
public int getPerPage() {
return perPage_;
}
/**
*
* (optional URL parameter) The number of results that will be contained in each page. Defaults
* to 128.
*
*
* uint32 per_page = 3;
* @param value The perPage to set.
* @return This builder for chaining.
*/
public Builder setPerPage(int value) {
perPage_ = value;
onChanged();
return this;
}
/**
*
* (optional URL parameter) The number of results that will be contained in each page. Defaults
* to 128.
*
*
* uint32 per_page = 3;
* @return This builder for chaining.
*/
public Builder clearPerPage() {
perPage_ = 0;
onChanged();
return this;
}
private com.google.protobuf.LazyStringList additionalFields_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureAdditionalFieldsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
additionalFields_ = new com.google.protobuf.LazyStringArrayList(additionalFields_);
bitField0_ |= 0x00000001;
}
}
/**
*
* (optional URL parameter) List of additional fields to be included in the response. Currently supported: all, stars, outputs, presets
*
*
* repeated string additional_fields = 19;
* @return A list containing the additionalFields.
*/
public com.google.protobuf.ProtocolStringList
getAdditionalFieldsList() {
return additionalFields_.getUnmodifiableView();
}
/**
*
* (optional URL parameter) List of additional fields to be included in the response. Currently supported: all, stars, outputs, presets
*
*
* repeated string additional_fields = 19;
* @return The count of additionalFields.
*/
public int getAdditionalFieldsCount() {
return additionalFields_.size();
}
/**
*
* (optional URL parameter) List of additional fields to be included in the response. Currently supported: all, stars, outputs, presets
*
*
* repeated string additional_fields = 19;
* @param index The index of the element to return.
* @return The additionalFields at the given index.
*/
public java.lang.String getAdditionalFields(int index) {
return additionalFields_.get(index);
}
/**
*
* (optional URL parameter) List of additional fields to be included in the response. Currently supported: all, stars, outputs, presets
*
*
* repeated string additional_fields = 19;
* @param index The index of the value to return.
* @return The bytes of the additionalFields at the given index.
*/
public com.google.protobuf.ByteString
getAdditionalFieldsBytes(int index) {
return additionalFields_.getByteString(index);
}
/**
*
* (optional URL parameter) List of additional fields to be included in the response. Currently supported: all, stars, outputs, presets
*
*
* repeated string additional_fields = 19;
* @param index The index to set the value at.
* @param value The additionalFields to set.
* @return This builder for chaining.
*/
public Builder setAdditionalFields(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureAdditionalFieldsIsMutable();
additionalFields_.set(index, value);
onChanged();
return this;
}
/**
*
* (optional URL parameter) List of additional fields to be included in the response. Currently supported: all, stars, outputs, presets
*
*
* repeated string additional_fields = 19;
* @param value The additionalFields to add.
* @return This builder for chaining.
*/
public Builder addAdditionalFields(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureAdditionalFieldsIsMutable();
additionalFields_.add(value);
onChanged();
return this;
}
/**
*
* (optional URL parameter) List of additional fields to be included in the response. Currently supported: all, stars, outputs, presets
*
*
* repeated string additional_fields = 19;
* @param values The additionalFields to add.
* @return This builder for chaining.
*/
public Builder addAllAdditionalFields(
java.lang.Iterable values) {
ensureAdditionalFieldsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, additionalFields_);
onChanged();
return this;
}
/**
*
* (optional URL parameter) List of additional fields to be included in the response. Currently supported: all, stars, outputs, presets
*
*
* repeated string additional_fields = 19;
* @return This builder for chaining.
*/
public Builder clearAdditionalFields() {
additionalFields_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* (optional URL parameter) List of additional fields to be included in the response. Currently supported: all, stars, outputs, presets
*
*
* repeated string additional_fields = 19;
* @param value The bytes of the additionalFields to add.
* @return This builder for chaining.
*/
public Builder addAdditionalFieldsBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureAdditionalFieldsIsMutable();
additionalFields_.add(value);
onChanged();
return this;
}
private boolean sortAscending_ ;
/**
*
* Sorting options:
* Whether to sort in ascending order. If false, will order in descending order.
*
*
* bool sort_ascending = 10;
* @return The sortAscending.
*/
@java.lang.Override
public boolean getSortAscending() {
return sortAscending_;
}
/**
*
* Sorting options:
* Whether to sort in ascending order. If false, will order in descending order.
*
*
* bool sort_ascending = 10;
* @param value The sortAscending to set.
* @return This builder for chaining.
*/
public Builder setSortAscending(boolean value) {
sortAscending_ = value;
onChanged();
return this;
}
/**
*
* Sorting options:
* Whether to sort in ascending order. If false, will order in descending order.
*
*
* bool sort_ascending = 10;
* @return This builder for chaining.
*/
public Builder clearSortAscending() {
sortAscending_ = false;
onChanged();
return this;
}
/**
*
* Whether to order by the name
*
*
* bool sort_by_name = 11;
* @return Whether the sortByName field is set.
*/
public boolean hasSortByName() {
return sortByCase_ == 11;
}
/**
*
* Whether to order by the name
*
*
* bool sort_by_name = 11;
* @return The sortByName.
*/
public boolean getSortByName() {
if (sortByCase_ == 11) {
return (java.lang.Boolean) sortBy_;
}
return false;
}
/**
*
* Whether to order by the name
*
*
* bool sort_by_name = 11;
* @param value The sortByName to set.
* @return This builder for chaining.
*/
public Builder setSortByName(boolean value) {
sortByCase_ = 11;
sortBy_ = value;
onChanged();
return this;
}
/**
*
* Whether to order by the name
*
*
* bool sort_by_name = 11;
* @return This builder for chaining.
*/
public Builder clearSortByName() {
if (sortByCase_ == 11) {
sortByCase_ = 0;
sortBy_ = null;
onChanged();
}
return this;
}
/**
*
* Whether to order by the number of training inputs
*
*
* bool sort_by_num_inputs = 12;
* @return Whether the sortByNumInputs field is set.
*/
public boolean hasSortByNumInputs() {
return sortByCase_ == 12;
}
/**
*
* Whether to order by the number of training inputs
*
*
* bool sort_by_num_inputs = 12;
* @return The sortByNumInputs.
*/
public boolean getSortByNumInputs() {
if (sortByCase_ == 12) {
return (java.lang.Boolean) sortBy_;
}
return false;
}
/**
*
* Whether to order by the number of training inputs
*
*
* bool sort_by_num_inputs = 12;
* @param value The sortByNumInputs to set.
* @return This builder for chaining.
*/
public Builder setSortByNumInputs(boolean value) {
sortByCase_ = 12;
sortBy_ = value;
onChanged();
return this;
}
/**
*
* Whether to order by the number of training inputs
*
*
* bool sort_by_num_inputs = 12;
* @return This builder for chaining.
*/
public Builder clearSortByNumInputs() {
if (sortByCase_ == 12) {
sortByCase_ = 0;
sortBy_ = null;
onChanged();
}
return this;
}
/**
*
* Whether to order by the modified_at time of the latest model version.
* If none of the sort options is set to true, will sort by modified_at.
*
*
* bool sort_by_modified_at = 13;
* @return Whether the sortByModifiedAt field is set.
*/
public boolean hasSortByModifiedAt() {
return sortByCase_ == 13;
}
/**
*
* Whether to order by the modified_at time of the latest model version.
* If none of the sort options is set to true, will sort by modified_at.
*
*
* bool sort_by_modified_at = 13;
* @return The sortByModifiedAt.
*/
public boolean getSortByModifiedAt() {
if (sortByCase_ == 13) {
return (java.lang.Boolean) sortBy_;
}
return false;
}
/**
*
* Whether to order by the modified_at time of the latest model version.
* If none of the sort options is set to true, will sort by modified_at.
*
*
* bool sort_by_modified_at = 13;
* @param value The sortByModifiedAt to set.
* @return This builder for chaining.
*/
public Builder setSortByModifiedAt(boolean value) {
sortByCase_ = 13;
sortBy_ = value;
onChanged();
return this;
}
/**
*
* Whether to order by the modified_at time of the latest model version.
* If none of the sort options is set to true, will sort by modified_at.
*
*
* bool sort_by_modified_at = 13;
* @return This builder for chaining.
*/
public Builder clearSortByModifiedAt() {
if (sortByCase_ == 13) {
sortByCase_ = 0;
sortBy_ = null;
onChanged();
}
return this;
}
/**
*
* Whether to order by the created_at
*
*
* bool sort_by_created_at = 24;
* @return Whether the sortByCreatedAt field is set.
*/
public boolean hasSortByCreatedAt() {
return sortByCase_ == 24;
}
/**
*
* Whether to order by the created_at
*
*
* bool sort_by_created_at = 24;
* @return The sortByCreatedAt.
*/
public boolean getSortByCreatedAt() {
if (sortByCase_ == 24) {
return (java.lang.Boolean) sortBy_;
}
return false;
}
/**
*
* Whether to order by the created_at
*
*
* bool sort_by_created_at = 24;
* @param value The sortByCreatedAt to set.
* @return This builder for chaining.
*/
public Builder setSortByCreatedAt(boolean value) {
sortByCase_ = 24;
sortBy_ = value;
onChanged();
return this;
}
/**
*
* Whether to order by the created_at
*
*
* bool sort_by_created_at = 24;
* @return This builder for chaining.
*/
public Builder clearSortByCreatedAt() {
if (sortByCase_ == 24) {
sortByCase_ = 0;
sortBy_ = null;
onChanged();
}
return this;
}
/**
*
* Whether to order by count of stars
*
*
* bool sort_by_star_count = 25;
* @return Whether the sortByStarCount field is set.
*/
public boolean hasSortByStarCount() {
return sortByCase_ == 25;
}
/**
*
* Whether to order by count of stars
*
*
* bool sort_by_star_count = 25;
* @return The sortByStarCount.
*/
public boolean getSortByStarCount() {
if (sortByCase_ == 25) {
return (java.lang.Boolean) sortBy_;
}
return false;
}
/**
*
* Whether to order by count of stars
*
*
* bool sort_by_star_count = 25;
* @param value The sortByStarCount to set.
* @return This builder for chaining.
*/
public Builder setSortByStarCount(boolean value) {
sortByCase_ = 25;
sortBy_ = value;
onChanged();
return this;
}
/**
*
* Whether to order by count of stars
*
*
* bool sort_by_star_count = 25;
* @return This builder for chaining.
*/
public Builder clearSortByStarCount() {
if (sortByCase_ == 25) {
sortByCase_ = 0;
sortBy_ = null;
onChanged();
}
return this;
}
private java.lang.Object modelTypeId_ = "";
/**
*
* Filtering options:
* Filter models by the specific model_type_id. See ListModelTypes for the list of ModelType.Id's
* supported.
*
*
* string model_type_id = 6;
* @return The modelTypeId.
*/
public java.lang.String getModelTypeId() {
java.lang.Object ref = modelTypeId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
modelTypeId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Filtering options:
* Filter models by the specific model_type_id. See ListModelTypes for the list of ModelType.Id's
* supported.
*
*
* string model_type_id = 6;
* @return The bytes for modelTypeId.
*/
public com.google.protobuf.ByteString
getModelTypeIdBytes() {
java.lang.Object ref = modelTypeId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
modelTypeId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Filtering options:
* Filter models by the specific model_type_id. See ListModelTypes for the list of ModelType.Id's
* supported.
*
*
* string model_type_id = 6;
* @param value The modelTypeId to set.
* @return This builder for chaining.
*/
public Builder setModelTypeId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
modelTypeId_ = value;
onChanged();
return this;
}
/**
*
* Filtering options:
* Filter models by the specific model_type_id. See ListModelTypes for the list of ModelType.Id's
* supported.
*
*
* string model_type_id = 6;
* @return This builder for chaining.
*/
public Builder clearModelTypeId() {
modelTypeId_ = getDefaultInstance().getModelTypeId();
onChanged();
return this;
}
/**
*
* Filtering options:
* Filter models by the specific model_type_id. See ListModelTypes for the list of ModelType.Id's
* supported.
*
*
* string model_type_id = 6;
* @param value The bytes for modelTypeId to set.
* @return This builder for chaining.
*/
public Builder setModelTypeIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
modelTypeId_ = value;
onChanged();
return this;
}
private boolean trainedOnly_ ;
/**
*
* If true, we only return models that have the status MODEL_TRAINED, which includes non-trainable model types.
*
*
* bool trained_only = 7;
* @return The trainedOnly.
*/
@java.lang.Override
public boolean getTrainedOnly() {
return trainedOnly_;
}
/**
*
* If true, we only return models that have the status MODEL_TRAINED, which includes non-trainable model types.
*
*
* bool trained_only = 7;
* @param value The trainedOnly to set.
* @return This builder for chaining.
*/
public Builder setTrainedOnly(boolean value) {
trainedOnly_ = value;
onChanged();
return this;
}
/**
*
* If true, we only return models that have the status MODEL_TRAINED, which includes non-trainable model types.
*
*
* bool trained_only = 7;
* @return This builder for chaining.
*/
public Builder clearTrainedOnly() {
trainedOnly_ = false;
onChanged();
return this;
}
private com.google.protobuf.LazyStringList inputFields_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureInputFieldsIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
inputFields_ = new com.google.protobuf.LazyStringArrayList(inputFields_);
bitField0_ |= 0x00000002;
}
}
/**
*
* The list of input fields to the model.
* For example, you can specify 'image', which will return models that make inferences on images like visual-classifier models.
*
*
* repeated string input_fields = 8;
* @return A list containing the inputFields.
*/
public com.google.protobuf.ProtocolStringList
getInputFieldsList() {
return inputFields_.getUnmodifiableView();
}
/**
*
* The list of input fields to the model.
* For example, you can specify 'image', which will return models that make inferences on images like visual-classifier models.
*
*
* repeated string input_fields = 8;
* @return The count of inputFields.
*/
public int getInputFieldsCount() {
return inputFields_.size();
}
/**
*
* The list of input fields to the model.
* For example, you can specify 'image', which will return models that make inferences on images like visual-classifier models.
*
*
* repeated string input_fields = 8;
* @param index The index of the element to return.
* @return The inputFields at the given index.
*/
public java.lang.String getInputFields(int index) {
return inputFields_.get(index);
}
/**
*
* The list of input fields to the model.
* For example, you can specify 'image', which will return models that make inferences on images like visual-classifier models.
*
*
* repeated string input_fields = 8;
* @param index The index of the value to return.
* @return The bytes of the inputFields at the given index.
*/
public com.google.protobuf.ByteString
getInputFieldsBytes(int index) {
return inputFields_.getByteString(index);
}
/**
*
* The list of input fields to the model.
* For example, you can specify 'image', which will return models that make inferences on images like visual-classifier models.
*
*
* repeated string input_fields = 8;
* @param index The index to set the value at.
* @param value The inputFields to set.
* @return This builder for chaining.
*/
public Builder setInputFields(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureInputFieldsIsMutable();
inputFields_.set(index, value);
onChanged();
return this;
}
/**
*
* The list of input fields to the model.
* For example, you can specify 'image', which will return models that make inferences on images like visual-classifier models.
*
*
* repeated string input_fields = 8;
* @param value The inputFields to add.
* @return This builder for chaining.
*/
public Builder addInputFields(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureInputFieldsIsMutable();
inputFields_.add(value);
onChanged();
return this;
}
/**
*
* The list of input fields to the model.
* For example, you can specify 'image', which will return models that make inferences on images like visual-classifier models.
*
*
* repeated string input_fields = 8;
* @param values The inputFields to add.
* @return This builder for chaining.
*/
public Builder addAllInputFields(
java.lang.Iterable values) {
ensureInputFieldsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, inputFields_);
onChanged();
return this;
}
/**
*
* The list of input fields to the model.
* For example, you can specify 'image', which will return models that make inferences on images like visual-classifier models.
*
*
* repeated string input_fields = 8;
* @return This builder for chaining.
*/
public Builder clearInputFields() {
inputFields_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
* The list of input fields to the model.
* For example, you can specify 'image', which will return models that make inferences on images like visual-classifier models.
*
*
* repeated string input_fields = 8;
* @param value The bytes of the inputFields to add.
* @return This builder for chaining.
*/
public Builder addInputFieldsBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureInputFieldsIsMutable();
inputFields_.add(value);
onChanged();
return this;
}
private com.google.protobuf.LazyStringList outputFields_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureOutputFieldsIsMutable() {
if (!((bitField0_ & 0x00000004) != 0)) {
outputFields_ = new com.google.protobuf.LazyStringArrayList(outputFields_);
bitField0_ |= 0x00000004;
}
}
/**
*
* The list of output fields to the model.
* For example, you can specify 'regions[...].data.concepts', which will return visual-detector models.
*
*
* repeated string output_fields = 9;
* @return A list containing the outputFields.
*/
public com.google.protobuf.ProtocolStringList
getOutputFieldsList() {
return outputFields_.getUnmodifiableView();
}
/**
*
* The list of output fields to the model.
* For example, you can specify 'regions[...].data.concepts', which will return visual-detector models.
*
*
* repeated string output_fields = 9;
* @return The count of outputFields.
*/
public int getOutputFieldsCount() {
return outputFields_.size();
}
/**
*
* The list of output fields to the model.
* For example, you can specify 'regions[...].data.concepts', which will return visual-detector models.
*
*
* repeated string output_fields = 9;
* @param index The index of the element to return.
* @return The outputFields at the given index.
*/
public java.lang.String getOutputFields(int index) {
return outputFields_.get(index);
}
/**
*
* The list of output fields to the model.
* For example, you can specify 'regions[...].data.concepts', which will return visual-detector models.
*
*
* repeated string output_fields = 9;
* @param index The index of the value to return.
* @return The bytes of the outputFields at the given index.
*/
public com.google.protobuf.ByteString
getOutputFieldsBytes(int index) {
return outputFields_.getByteString(index);
}
/**
*
* The list of output fields to the model.
* For example, you can specify 'regions[...].data.concepts', which will return visual-detector models.
*
*
* repeated string output_fields = 9;
* @param index The index to set the value at.
* @param value The outputFields to set.
* @return This builder for chaining.
*/
public Builder setOutputFields(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureOutputFieldsIsMutable();
outputFields_.set(index, value);
onChanged();
return this;
}
/**
*
* The list of output fields to the model.
* For example, you can specify 'regions[...].data.concepts', which will return visual-detector models.
*
*
* repeated string output_fields = 9;
* @param value The outputFields to add.
* @return This builder for chaining.
*/
public Builder addOutputFields(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureOutputFieldsIsMutable();
outputFields_.add(value);
onChanged();
return this;
}
/**
*
* The list of output fields to the model.
* For example, you can specify 'regions[...].data.concepts', which will return visual-detector models.
*
*
* repeated string output_fields = 9;
* @param values The outputFields to add.
* @return This builder for chaining.
*/
public Builder addAllOutputFields(
java.lang.Iterable values) {
ensureOutputFieldsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, outputFields_);
onChanged();
return this;
}
/**
*
* The list of output fields to the model.
* For example, you can specify 'regions[...].data.concepts', which will return visual-detector models.
*
*
* repeated string output_fields = 9;
* @return This builder for chaining.
*/
public Builder clearOutputFields() {
outputFields_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
* The list of output fields to the model.
* For example, you can specify 'regions[...].data.concepts', which will return visual-detector models.
*
*
* repeated string output_fields = 9;
* @param value The bytes of the outputFields to add.
* @return This builder for chaining.
*/
public Builder addOutputFieldsBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureOutputFieldsIsMutable();
outputFields_.add(value);
onChanged();
return this;
}
private java.lang.Object license_ = "";
/**
*
* Filter by the license of the model version
*
*
* string license = 15;
* @return The license.
*/
public java.lang.String getLicense() {
java.lang.Object ref = license_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
license_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Filter by the license of the model version
*
*
* string license = 15;
* @return The bytes for license.
*/
public com.google.protobuf.ByteString
getLicenseBytes() {
java.lang.Object ref = license_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
license_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Filter by the license of the model version
*
*
* string license = 15;
* @param value The license to set.
* @return This builder for chaining.
*/
public Builder setLicense(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
license_ = value;
onChanged();
return this;
}
/**
*
* Filter by the license of the model version
*
*
* string license = 15;
* @return This builder for chaining.
*/
public Builder clearLicense() {
license_ = getDefaultInstance().getLicense();
onChanged();
return this;
}
/**
*
* Filter by the license of the model version
*
*
* string license = 15;
* @param value The bytes for license to set.
* @return This builder for chaining.
*/
public Builder setLicenseBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
license_ = value;
onChanged();
return this;
}
private boolean featuredOnly_ ;
/**
*
* If true, we only return models that are handpicked by clarifai staff
*
*
* bool featured_only = 16;
* @return The featuredOnly.
*/
@java.lang.Override
public boolean getFeaturedOnly() {
return featuredOnly_;
}
/**
*
* If true, we only return models that are handpicked by clarifai staff
*
*
* bool featured_only = 16;
* @param value The featuredOnly to set.
* @return This builder for chaining.
*/
public Builder setFeaturedOnly(boolean value) {
featuredOnly_ = value;
onChanged();
return this;
}
/**
*
* If true, we only return models that are handpicked by clarifai staff
*
*
* bool featured_only = 16;
* @return This builder for chaining.
*/
public Builder clearFeaturedOnly() {
featuredOnly_ = false;
onChanged();
return this;
}
private boolean starredOnly_ ;
/**
*
* If true, we only return models that are starred by the requesting user
*
*
* bool starred_only = 20;
* @return The starredOnly.
*/
@java.lang.Override
public boolean getStarredOnly() {
return starredOnly_;
}
/**
*
* If true, we only return models that are starred by the requesting user
*
*
* bool starred_only = 20;
* @param value The starredOnly to set.
* @return This builder for chaining.
*/
public Builder setStarredOnly(boolean value) {
starredOnly_ = value;
onChanged();
return this;
}
/**
*
* If true, we only return models that are starred by the requesting user
*
*
* bool starred_only = 20;
* @return This builder for chaining.
*/
public Builder clearStarredOnly() {
starredOnly_ = false;
onChanged();
return this;
}
private com.google.protobuf.LazyStringList toolkits_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureToolkitsIsMutable() {
if (!((bitField0_ & 0x00000008) != 0)) {
toolkits_ = new com.google.protobuf.LazyStringArrayList(toolkits_);
bitField0_ |= 0x00000008;
}
}
/**
*
* List of toolkit tags to filter by
*
*
* repeated string toolkits = 17;
* @return A list containing the toolkits.
*/
public com.google.protobuf.ProtocolStringList
getToolkitsList() {
return toolkits_.getUnmodifiableView();
}
/**
*
* List of toolkit tags to filter by
*
*
* repeated string toolkits = 17;
* @return The count of toolkits.
*/
public int getToolkitsCount() {
return toolkits_.size();
}
/**
*
* List of toolkit tags to filter by
*
*
* repeated string toolkits = 17;
* @param index The index of the element to return.
* @return The toolkits at the given index.
*/
public java.lang.String getToolkits(int index) {
return toolkits_.get(index);
}
/**
*
* List of toolkit tags to filter by
*
*
* repeated string toolkits = 17;
* @param index The index of the value to return.
* @return The bytes of the toolkits at the given index.
*/
public com.google.protobuf.ByteString
getToolkitsBytes(int index) {
return toolkits_.getByteString(index);
}
/**
*
* List of toolkit tags to filter by
*
*
* repeated string toolkits = 17;
* @param index The index to set the value at.
* @param value The toolkits to set.
* @return This builder for chaining.
*/
public Builder setToolkits(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureToolkitsIsMutable();
toolkits_.set(index, value);
onChanged();
return this;
}
/**
*
* List of toolkit tags to filter by
*
*
* repeated string toolkits = 17;
* @param value The toolkits to add.
* @return This builder for chaining.
*/
public Builder addToolkits(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureToolkitsIsMutable();
toolkits_.add(value);
onChanged();
return this;
}
/**
*
* List of toolkit tags to filter by
*
*
* repeated string toolkits = 17;
* @param values The toolkits to add.
* @return This builder for chaining.
*/
public Builder addAllToolkits(
java.lang.Iterable values) {
ensureToolkitsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, toolkits_);
onChanged();
return this;
}
/**
*
* List of toolkit tags to filter by
*
*
* repeated string toolkits = 17;
* @return This builder for chaining.
*/
public Builder clearToolkits() {
toolkits_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
/**
*
* List of toolkit tags to filter by
*
*
* repeated string toolkits = 17;
* @param value The bytes of the toolkits to add.
* @return This builder for chaining.
*/
public Builder addToolkitsBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureToolkitsIsMutable();
toolkits_.add(value);
onChanged();
return this;
}
private com.google.protobuf.LazyStringList useCases_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureUseCasesIsMutable() {
if (!((bitField0_ & 0x00000010) != 0)) {
useCases_ = new com.google.protobuf.LazyStringArrayList(useCases_);
bitField0_ |= 0x00000010;
}
}
/**
*
* List of use_case tags to filter by
*
*
* repeated string use_cases = 18;
* @return A list containing the useCases.
*/
public com.google.protobuf.ProtocolStringList
getUseCasesList() {
return useCases_.getUnmodifiableView();
}
/**
*
* List of use_case tags to filter by
*
*
* repeated string use_cases = 18;
* @return The count of useCases.
*/
public int getUseCasesCount() {
return useCases_.size();
}
/**
*
* List of use_case tags to filter by
*
*
* repeated string use_cases = 18;
* @param index The index of the element to return.
* @return The useCases at the given index.
*/
public java.lang.String getUseCases(int index) {
return useCases_.get(index);
}
/**
*
* List of use_case tags to filter by
*
*
* repeated string use_cases = 18;
* @param index The index of the value to return.
* @return The bytes of the useCases at the given index.
*/
public com.google.protobuf.ByteString
getUseCasesBytes(int index) {
return useCases_.getByteString(index);
}
/**
*
* List of use_case tags to filter by
*
*
* repeated string use_cases = 18;
* @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, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureUseCasesIsMutable();
useCases_.set(index, value);
onChanged();
return this;
}
/**
*
* List of use_case tags to filter by
*
*
* repeated string use_cases = 18;
* @param value The useCases to add.
* @return This builder for chaining.
*/
public Builder addUseCases(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureUseCasesIsMutable();
useCases_.add(value);
onChanged();
return this;
}
/**
*
* List of use_case tags to filter by
*
*
* repeated string use_cases = 18;
* @param values The useCases to add.
* @return This builder for chaining.
*/
public Builder addAllUseCases(
java.lang.Iterable values) {
ensureUseCasesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, useCases_);
onChanged();
return this;
}
/**
*
* List of use_case tags to filter by
*
*
* repeated string use_cases = 18;
* @return This builder for chaining.
*/
public Builder clearUseCases() {
useCases_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
return this;
}
/**
*
* List of use_case tags to filter by
*
*
* repeated string use_cases = 18;
* @param value The bytes of the useCases to add.
* @return This builder for chaining.
*/
public Builder addUseCasesBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureUseCasesIsMutable();
useCases_.add(value);
onChanged();
return this;
}
private com.google.protobuf.LazyStringList languages_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureLanguagesIsMutable() {
if (!((bitField0_ & 0x00000020) != 0)) {
languages_ = new com.google.protobuf.LazyStringArrayList(languages_);
bitField0_ |= 0x00000020;
}
}
/**
*
* List of language tags to filter by
*
*
* repeated string languages = 21;
* @return A list containing the languages.
*/
public com.google.protobuf.ProtocolStringList
getLanguagesList() {
return languages_.getUnmodifiableView();
}
/**
*
* List of language tags to filter by
*
*
* repeated string languages = 21;
* @return The count of languages.
*/
public int getLanguagesCount() {
return languages_.size();
}
/**
*
* List of language tags to filter by
*
*
* repeated string languages = 21;
* @param index The index of the element to return.
* @return The languages at the given index.
*/
public java.lang.String getLanguages(int index) {
return languages_.get(index);
}
/**
*
* List of language tags to filter by
*
*
* repeated string languages = 21;
* @param index The index of the value to return.
* @return The bytes of the languages at the given index.
*/
public com.google.protobuf.ByteString
getLanguagesBytes(int index) {
return languages_.getByteString(index);
}
/**
*
* List of language tags to filter by
*
*
* repeated string languages = 21;
* @param index The index to set the value at.
* @param value The languages to set.
* @return This builder for chaining.
*/
public Builder setLanguages(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureLanguagesIsMutable();
languages_.set(index, value);
onChanged();
return this;
}
/**
*
* List of language tags to filter by
*
*
* repeated string languages = 21;
* @param value The languages to add.
* @return This builder for chaining.
*/
public Builder addLanguages(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureLanguagesIsMutable();
languages_.add(value);
onChanged();
return this;
}
/**
*
* List of language tags to filter by
*
*
* repeated string languages = 21;
* @param values The languages to add.
* @return This builder for chaining.
*/
public Builder addAllLanguages(
java.lang.Iterable values) {
ensureLanguagesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, languages_);
onChanged();
return this;
}
/**
*
* List of language tags to filter by
*
*
* repeated string languages = 21;
* @return This builder for chaining.
*/
public Builder clearLanguages() {
languages_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000020);
onChanged();
return this;
}
/**
*
* List of language tags to filter by
*
*
* repeated string languages = 21;
* @param value The bytes of the languages to add.
* @return This builder for chaining.
*/
public Builder addLanguagesBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureLanguagesIsMutable();
languages_.add(value);
onChanged();
return this;
}
private boolean dontFetchFromMain_ ;
/**
*
* Old API behavior resulted in returning clarifai main models when calling ListModels while scoped to an app. While we transition
* away from that, we can use this flag to not always fetch clarifai main models, unless that is the app we are explicitly listing for.
*
*
* bool dont_fetch_from_main = 23;
* @return The dontFetchFromMain.
*/
@java.lang.Override
public boolean getDontFetchFromMain() {
return dontFetchFromMain_;
}
/**
*
* Old API behavior resulted in returning clarifai main models when calling ListModels while scoped to an app. While we transition
* away from that, we can use this flag to not always fetch clarifai main models, unless that is the app we are explicitly listing for.
*
*
* bool dont_fetch_from_main = 23;
* @param value The dontFetchFromMain to set.
* @return This builder for chaining.
*/
public Builder setDontFetchFromMain(boolean value) {
dontFetchFromMain_ = value;
onChanged();
return this;
}
/**
*
* Old API behavior resulted in returning clarifai main models when calling ListModels while scoped to an app. While we transition
* away from that, we can use this flag to not always fetch clarifai main models, unless that is the app we are explicitly listing for.
*
*
* bool dont_fetch_from_main = 23;
* @return This builder for chaining.
*/
public Builder clearDontFetchFromMain() {
dontFetchFromMain_ = false;
onChanged();
return this;
}
private boolean bookmark_ ;
/**
*
* Filter models by bookmark. If set, only return bookmarked models. Otherwise none bookmarked models only.
* Note: you can not filter `trained_only` and bookmark at the same time.
* When filter by bookmark, we will return trained and untrained models.
*
*
* bool bookmark = 26;
* @return The bookmark.
*/
@java.lang.Override
public boolean getBookmark() {
return bookmark_;
}
/**
*
* Filter models by bookmark. If set, only return bookmarked models. Otherwise none bookmarked models only.
* Note: you can not filter `trained_only` and bookmark at the same time.
* When filter by bookmark, we will return trained and untrained models.
*
*
* bool bookmark = 26;
* @param value The bookmark to set.
* @return This builder for chaining.
*/
public Builder setBookmark(boolean value) {
bookmark_ = value;
onChanged();
return this;
}
/**
*
* Filter models by bookmark. If set, only return bookmarked models. Otherwise none bookmarked models only.
* Note: you can not filter `trained_only` and bookmark at the same time.
* When filter by bookmark, we will return trained and untrained models.
*
*
* bool bookmark = 26;
* @return This builder for chaining.
*/
public Builder clearBookmark() {
bookmark_ = false;
onChanged();
return this;
}
private java.lang.Object search_ = "";
/**
*
* Searching options:
* Specify a search parameter in order to perform keyword search on the
* following fields of the model:
* - id
* - name
* - description
* - notes
* - user_id (unless user_app_id.user_id is already set)
* Keywords are both normalized for search (so searching for "satisfy" matches "satisfied")
* and used for partial prefix-matching (so searching for "clari" matches "clarifai").
* NOTE: Both the list of fields searched and the exact keyword matching
* rules are subject to change and not guaranteed to be backwards-compatible.
*
*
* string search = 27;
* @return The search.
*/
public java.lang.String getSearch() {
java.lang.Object ref = search_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
search_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Searching options:
* Specify a search parameter in order to perform keyword search on the
* following fields of the model:
* - id
* - name
* - description
* - notes
* - user_id (unless user_app_id.user_id is already set)
* Keywords are both normalized for search (so searching for "satisfy" matches "satisfied")
* and used for partial prefix-matching (so searching for "clari" matches "clarifai").
* NOTE: Both the list of fields searched and the exact keyword matching
* rules are subject to change and not guaranteed to be backwards-compatible.
*
*
* string search = 27;
* @return The bytes for search.
*/
public com.google.protobuf.ByteString
getSearchBytes() {
java.lang.Object ref = search_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
search_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Searching options:
* Specify a search parameter in order to perform keyword search on the
* following fields of the model:
* - id
* - name
* - description
* - notes
* - user_id (unless user_app_id.user_id is already set)
* Keywords are both normalized for search (so searching for "satisfy" matches "satisfied")
* and used for partial prefix-matching (so searching for "clari" matches "clarifai").
* NOTE: Both the list of fields searched and the exact keyword matching
* rules are subject to change and not guaranteed to be backwards-compatible.
*
*
* string search = 27;
* @param value The search to set.
* @return This builder for chaining.
*/
public Builder setSearch(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
search_ = value;
onChanged();
return this;
}
/**
*
* Searching options:
* Specify a search parameter in order to perform keyword search on the
* following fields of the model:
* - id
* - name
* - description
* - notes
* - user_id (unless user_app_id.user_id is already set)
* Keywords are both normalized for search (so searching for "satisfy" matches "satisfied")
* and used for partial prefix-matching (so searching for "clari" matches "clarifai").
* NOTE: Both the list of fields searched and the exact keyword matching
* rules are subject to change and not guaranteed to be backwards-compatible.
*
*
* string search = 27;
* @return This builder for chaining.
*/
public Builder clearSearch() {
search_ = getDefaultInstance().getSearch();
onChanged();
return this;
}
/**
*
* Searching options:
* Specify a search parameter in order to perform keyword search on the
* following fields of the model:
* - id
* - name
* - description
* - notes
* - user_id (unless user_app_id.user_id is already set)
* Keywords are both normalized for search (so searching for "satisfy" matches "satisfied")
* and used for partial prefix-matching (so searching for "clari" matches "clarifai").
* NOTE: Both the list of fields searched and the exact keyword matching
* rules are subject to change and not guaranteed to be backwards-compatible.
*
*
* string search = 27;
* @param value The bytes for search to set.
* @return This builder for chaining.
*/
public Builder setSearchBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
search_ = value;
onChanged();
return this;
}
private java.lang.Object query_ = "";
/**
*
* Query name, description and id fields, that can contain the words in the query string. Does NOT support wildcards - full words only. Supports operators "OR" and "-" as NOT.
* Deprecated: use search instead.
*
*
* string query = 14 [deprecated = true];
* @deprecated clarifai.api.ListModelsRequest.query is deprecated.
* See proto/clarifai/api/service.proto;l=5364
* @return The query.
*/
@java.lang.Deprecated public java.lang.String getQuery() {
java.lang.Object ref = query_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
query_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Query name, description and id fields, that can contain the words in the query string. Does NOT support wildcards - full words only. Supports operators "OR" and "-" as NOT.
* Deprecated: use search instead.
*
*
* string query = 14 [deprecated = true];
* @deprecated clarifai.api.ListModelsRequest.query is deprecated.
* See proto/clarifai/api/service.proto;l=5364
* @return The bytes for query.
*/
@java.lang.Deprecated public com.google.protobuf.ByteString
getQueryBytes() {
java.lang.Object ref = query_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
query_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Query name, description and id fields, that can contain the words in the query string. Does NOT support wildcards - full words only. Supports operators "OR" and "-" as NOT.
* Deprecated: use search instead.
*
*
* string query = 14 [deprecated = true];
* @deprecated clarifai.api.ListModelsRequest.query is deprecated.
* See proto/clarifai/api/service.proto;l=5364
* @param value The query to set.
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder setQuery(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
query_ = value;
onChanged();
return this;
}
/**
*
* Query name, description and id fields, that can contain the words in the query string. Does NOT support wildcards - full words only. Supports operators "OR" and "-" as NOT.
* Deprecated: use search instead.
*
*
* string query = 14 [deprecated = true];
* @deprecated clarifai.api.ListModelsRequest.query is deprecated.
* See proto/clarifai/api/service.proto;l=5364
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder clearQuery() {
query_ = getDefaultInstance().getQuery();
onChanged();
return this;
}
/**
*
* Query name, description and id fields, that can contain the words in the query string. Does NOT support wildcards - full words only. Supports operators "OR" and "-" as NOT.
* Deprecated: use search instead.
*
*
* string query = 14 [deprecated = true];
* @deprecated clarifai.api.ListModelsRequest.query is deprecated.
* See proto/clarifai/api/service.proto;l=5364
* @param value The bytes for query to set.
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder setQueryBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
query_ = value;
onChanged();
return this;
}
private java.lang.Object name_ = "";
/**
*
* Filter by the description and id of the model. This supports wildcard queries like "gen*" to match "general" as an example.
* Deprecated: use search instead.
*
*
* string name = 5 [deprecated = true];
* @deprecated clarifai.api.ListModelsRequest.name is deprecated.
* See proto/clarifai/api/service.proto;l=5367
* @return The name.
*/
@java.lang.Deprecated 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;
}
}
/**
*
* Filter by the description and id of the model. This supports wildcard queries like "gen*" to match "general" as an example.
* Deprecated: use search instead.
*
*
* string name = 5 [deprecated = true];
* @deprecated clarifai.api.ListModelsRequest.name is deprecated.
* See proto/clarifai/api/service.proto;l=5367
* @return The bytes for name.
*/
@java.lang.Deprecated 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;
}
}
/**
*
* Filter by the description and id of the model. This supports wildcard queries like "gen*" to match "general" as an example.
* Deprecated: use search instead.
*
*
* string name = 5 [deprecated = true];
* @deprecated clarifai.api.ListModelsRequest.name is deprecated.
* See proto/clarifai/api/service.proto;l=5367
* @param value The name to set.
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
*
* Filter by the description and id of the model. This supports wildcard queries like "gen*" to match "general" as an example.
* Deprecated: use search instead.
*
*
* string name = 5 [deprecated = true];
* @deprecated clarifai.api.ListModelsRequest.name is deprecated.
* See proto/clarifai/api/service.proto;l=5367
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
* Filter by the description and id of the model. This supports wildcard queries like "gen*" to match "general" as an example.
* Deprecated: use search instead.
*
*
* string name = 5 [deprecated = true];
* @deprecated clarifai.api.ListModelsRequest.name is deprecated.
* See proto/clarifai/api/service.proto;l=5367
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
onChanged();
return this;
}
private boolean filterByUserId_ ;
/**
*
* Extends the name filter to include the user_id of the application owner that the model belongs to.
* Deprecated: use search instead of name.
*
*
* bool filter_by_user_id = 22 [deprecated = true];
* @deprecated clarifai.api.ListModelsRequest.filter_by_user_id is deprecated.
* See proto/clarifai/api/service.proto;l=5370
* @return The filterByUserId.
*/
@java.lang.Override
@java.lang.Deprecated public boolean getFilterByUserId() {
return filterByUserId_;
}
/**
*
* Extends the name filter to include the user_id of the application owner that the model belongs to.
* Deprecated: use search instead of name.
*
*
* bool filter_by_user_id = 22 [deprecated = true];
* @deprecated clarifai.api.ListModelsRequest.filter_by_user_id is deprecated.
* See proto/clarifai/api/service.proto;l=5370
* @param value The filterByUserId to set.
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder setFilterByUserId(boolean value) {
filterByUserId_ = value;
onChanged();
return this;
}
/**
*
* Extends the name filter to include the user_id of the application owner that the model belongs to.
* Deprecated: use search instead of name.
*
*
* bool filter_by_user_id = 22 [deprecated = true];
* @deprecated clarifai.api.ListModelsRequest.filter_by_user_id is deprecated.
* See proto/clarifai/api/service.proto;l=5370
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder clearFilterByUserId() {
filterByUserId_ = false;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:clarifai.api.ListModelsRequest)
}
// @@protoc_insertion_point(class_scope:clarifai.api.ListModelsRequest)
private static final com.clarifai.grpc.api.ListModelsRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.clarifai.grpc.api.ListModelsRequest();
}
public static com.clarifai.grpc.api.ListModelsRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ListModelsRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ListModelsRequest(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.ListModelsRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}