com.clarifai.grpc.api.ListDatasetsRequest Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: proto/clarifai/api/service.proto
package com.clarifai.grpc.api;
/**
*
* ListDatasetsRequest
*
*
* Protobuf type {@code clarifai.api.ListDatasetsRequest}
*/
public final class ListDatasetsRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:clarifai.api.ListDatasetsRequest)
ListDatasetsRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use ListDatasetsRequest.newBuilder() to construct.
private ListDatasetsRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ListDatasetsRequest() {
additionalFields_ = com.google.protobuf.LazyStringArrayList.EMPTY;
search_ = "";
id_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ListDatasetsRequest();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ListDatasetsRequest(
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 32: {
starredOnly_ = input.readBool();
break;
}
case 42: {
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 48: {
sortAscending_ = input.readBool();
break;
}
case 56: {
sortBy_ = input.readBool();
sortByCase_ = 7;
break;
}
case 64: {
sortBy_ = input.readBool();
sortByCase_ = 8;
break;
}
case 72: {
sortBy_ = input.readBool();
sortByCase_ = 9;
break;
}
case 80: {
bookmark_ = input.readBool();
break;
}
case 88: {
sortBy_ = input.readBool();
sortByCase_ = 11;
break;
}
case 98: {
java.lang.String s = input.readStringRequireUtf8();
id_ = s;
break;
}
case 106: {
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_ & 0x00000001) != 0)) {
additionalFields_ = additionalFields_.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_ListDatasetsRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Service.internal_static_clarifai_api_ListDatasetsRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.ListDatasetsRequest.class, com.clarifai.grpc.api.ListDatasetsRequest.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_CREATED_AT(7),
SORT_BY_STAR_COUNT(8),
SORT_BY_MODIFIED_AT(9),
SORT_BY_ID(11),
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 7: return SORT_BY_CREATED_AT;
case 8: return SORT_BY_STAR_COUNT;
case 9: return SORT_BY_MODIFIED_AT;
case 11: return SORT_BY_ID;
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 = 5;
private com.google.protobuf.LazyStringList additionalFields_;
/**
* repeated string additional_fields = 5;
* @return A list containing the additionalFields.
*/
public com.google.protobuf.ProtocolStringList
getAdditionalFieldsList() {
return additionalFields_;
}
/**
* repeated string additional_fields = 5;
* @return The count of additionalFields.
*/
public int getAdditionalFieldsCount() {
return additionalFields_.size();
}
/**
* repeated string additional_fields = 5;
* @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);
}
/**
* repeated string additional_fields = 5;
* @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 = 6;
private boolean sortAscending_;
/**
*
* Sorting options:
* Whether to sort in ascending order. If false, will order in descending order.
*
*
* bool sort_ascending = 6;
* @return The sortAscending.
*/
@java.lang.Override
public boolean getSortAscending() {
return sortAscending_;
}
public static final int SORT_BY_CREATED_AT_FIELD_NUMBER = 7;
/**
*
* Whether to order by the created_at time.
*
*
* bool sort_by_created_at = 7;
* @return Whether the sortByCreatedAt field is set.
*/
@java.lang.Override
public boolean hasSortByCreatedAt() {
return sortByCase_ == 7;
}
/**
*
* Whether to order by the created_at time.
*
*
* bool sort_by_created_at = 7;
* @return The sortByCreatedAt.
*/
@java.lang.Override
public boolean getSortByCreatedAt() {
if (sortByCase_ == 7) {
return (java.lang.Boolean) sortBy_;
}
return false;
}
public static final int SORT_BY_STAR_COUNT_FIELD_NUMBER = 8;
/**
*
* Whether to order by the number of users stared the app
*
*
* bool sort_by_star_count = 8;
* @return Whether the sortByStarCount field is set.
*/
@java.lang.Override
public boolean hasSortByStarCount() {
return sortByCase_ == 8;
}
/**
*
* Whether to order by the number of users stared the app
*
*
* bool sort_by_star_count = 8;
* @return The sortByStarCount.
*/
@java.lang.Override
public boolean getSortByStarCount() {
if (sortByCase_ == 8) {
return (java.lang.Boolean) sortBy_;
}
return false;
}
public static final int SORT_BY_MODIFIED_AT_FIELD_NUMBER = 9;
/**
*
* If neither sort option is set to true, will sort by modified_at.
*
*
* bool sort_by_modified_at = 9;
* @return Whether the sortByModifiedAt field is set.
*/
@java.lang.Override
public boolean hasSortByModifiedAt() {
return sortByCase_ == 9;
}
/**
*
* If neither sort option is set to true, will sort by modified_at.
*
*
* bool sort_by_modified_at = 9;
* @return The sortByModifiedAt.
*/
@java.lang.Override
public boolean getSortByModifiedAt() {
if (sortByCase_ == 9) {
return (java.lang.Boolean) sortBy_;
}
return false;
}
public static final int SORT_BY_ID_FIELD_NUMBER = 11;
/**
*
* Whether to order by the external id
*
*
* bool sort_by_id = 11;
* @return Whether the sortById field is set.
*/
@java.lang.Override
public boolean hasSortById() {
return sortByCase_ == 11;
}
/**
*
* Whether to order by the external id
*
*
* bool sort_by_id = 11;
* @return The sortById.
*/
@java.lang.Override
public boolean getSortById() {
if (sortByCase_ == 11) {
return (java.lang.Boolean) sortBy_;
}
return false;
}
public static final int STARRED_ONLY_FIELD_NUMBER = 4;
private boolean starredOnly_;
/**
*
* Filtering options:
*
*
* bool starred_only = 4;
* @return The starredOnly.
*/
@java.lang.Override
public boolean getStarredOnly() {
return starredOnly_;
}
public static final int BOOKMARK_FIELD_NUMBER = 10;
private boolean bookmark_;
/**
*
* Filter datasets by bookmark. If set, only return bookmarked datasets. Otherwise none bookmarked datasets only.
*
*
* bool bookmark = 10;
* @return The bookmark.
*/
@java.lang.Override
public boolean getBookmark() {
return bookmark_;
}
public static final int SEARCH_FIELD_NUMBER = 13;
private volatile java.lang.Object search_;
/**
*
* Searching options:
* Specify a search parameter in order to perform keyword search on the
* following fields of the dataset:
* - id
* - 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 = 13;
* @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 dataset:
* - id
* - 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 = 13;
* @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 ID_FIELD_NUMBER = 12;
private volatile java.lang.Object id_;
/**
*
* Fuzzy filter on dataset ID
* Deprecated: use search instead.
*
*
* string id = 12 [deprecated = true];
* @deprecated clarifai.api.ListDatasetsRequest.id is deprecated.
* See proto/clarifai/api/service.proto;l=4605
* @return The id.
*/
@java.lang.Override
@java.lang.Deprecated public java.lang.String getId() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
}
}
/**
*
* Fuzzy filter on dataset ID
* Deprecated: use search instead.
*
*
* string id = 12 [deprecated = true];
* @deprecated clarifai.api.ListDatasetsRequest.id is deprecated.
* See proto/clarifai/api/service.proto;l=4605
* @return The bytes for id.
*/
@java.lang.Override
@java.lang.Deprecated public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
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 (starredOnly_ != false) {
output.writeBool(4, starredOnly_);
}
for (int i = 0; i < additionalFields_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, additionalFields_.getRaw(i));
}
if (sortAscending_ != false) {
output.writeBool(6, sortAscending_);
}
if (sortByCase_ == 7) {
output.writeBool(
7, (boolean)((java.lang.Boolean) sortBy_));
}
if (sortByCase_ == 8) {
output.writeBool(
8, (boolean)((java.lang.Boolean) sortBy_));
}
if (sortByCase_ == 9) {
output.writeBool(
9, (boolean)((java.lang.Boolean) sortBy_));
}
if (bookmark_ != false) {
output.writeBool(10, bookmark_);
}
if (sortByCase_ == 11) {
output.writeBool(
11, (boolean)((java.lang.Boolean) sortBy_));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 12, id_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(search_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 13, 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 (starredOnly_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(4, starredOnly_);
}
{
int dataSize = 0;
for (int i = 0; i < additionalFields_.size(); i++) {
dataSize += computeStringSizeNoTag(additionalFields_.getRaw(i));
}
size += dataSize;
size += 1 * getAdditionalFieldsList().size();
}
if (sortAscending_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(6, sortAscending_);
}
if (sortByCase_ == 7) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(
7, (boolean)((java.lang.Boolean) sortBy_));
}
if (sortByCase_ == 8) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(
8, (boolean)((java.lang.Boolean) sortBy_));
}
if (sortByCase_ == 9) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(
9, (boolean)((java.lang.Boolean) sortBy_));
}
if (bookmark_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(10, bookmark_);
}
if (sortByCase_ == 11) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(
11, (boolean)((java.lang.Boolean) sortBy_));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, id_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(search_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, 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.ListDatasetsRequest)) {
return super.equals(obj);
}
com.clarifai.grpc.api.ListDatasetsRequest other = (com.clarifai.grpc.api.ListDatasetsRequest) 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 (getStarredOnly()
!= other.getStarredOnly()) return false;
if (getBookmark()
!= other.getBookmark()) return false;
if (!getSearch()
.equals(other.getSearch())) return false;
if (!getId()
.equals(other.getId())) return false;
if (!getSortByCase().equals(other.getSortByCase())) return false;
switch (sortByCase_) {
case 7:
if (getSortByCreatedAt()
!= other.getSortByCreatedAt()) return false;
break;
case 8:
if (getSortByStarCount()
!= other.getSortByStarCount()) return false;
break;
case 9:
if (getSortByModifiedAt()
!= other.getSortByModifiedAt()) return false;
break;
case 11:
if (getSortById()
!= other.getSortById()) 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) + STARRED_ONLY_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getStarredOnly());
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) + ID_FIELD_NUMBER;
hash = (53 * hash) + getId().hashCode();
switch (sortByCase_) {
case 7:
hash = (37 * hash) + SORT_BY_CREATED_AT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getSortByCreatedAt());
break;
case 8:
hash = (37 * hash) + SORT_BY_STAR_COUNT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getSortByStarCount());
break;
case 9:
hash = (37 * hash) + SORT_BY_MODIFIED_AT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getSortByModifiedAt());
break;
case 11:
hash = (37 * hash) + SORT_BY_ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getSortById());
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.clarifai.grpc.api.ListDatasetsRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.ListDatasetsRequest 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.ListDatasetsRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.ListDatasetsRequest 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.ListDatasetsRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.ListDatasetsRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.clarifai.grpc.api.ListDatasetsRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.ListDatasetsRequest 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.ListDatasetsRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.ListDatasetsRequest 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.ListDatasetsRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.ListDatasetsRequest 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.ListDatasetsRequest 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;
}
/**
*
* ListDatasetsRequest
*
*
* Protobuf type {@code clarifai.api.ListDatasetsRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:clarifai.api.ListDatasetsRequest)
com.clarifai.grpc.api.ListDatasetsRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.clarifai.grpc.api.Service.internal_static_clarifai_api_ListDatasetsRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Service.internal_static_clarifai_api_ListDatasetsRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.ListDatasetsRequest.class, com.clarifai.grpc.api.ListDatasetsRequest.Builder.class);
}
// Construct using com.clarifai.grpc.api.ListDatasetsRequest.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;
starredOnly_ = false;
bookmark_ = false;
search_ = "";
id_ = "";
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_ListDatasetsRequest_descriptor;
}
@java.lang.Override
public com.clarifai.grpc.api.ListDatasetsRequest getDefaultInstanceForType() {
return com.clarifai.grpc.api.ListDatasetsRequest.getDefaultInstance();
}
@java.lang.Override
public com.clarifai.grpc.api.ListDatasetsRequest build() {
com.clarifai.grpc.api.ListDatasetsRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.clarifai.grpc.api.ListDatasetsRequest buildPartial() {
com.clarifai.grpc.api.ListDatasetsRequest result = new com.clarifai.grpc.api.ListDatasetsRequest(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_ == 7) {
result.sortBy_ = sortBy_;
}
if (sortByCase_ == 8) {
result.sortBy_ = sortBy_;
}
if (sortByCase_ == 9) {
result.sortBy_ = sortBy_;
}
if (sortByCase_ == 11) {
result.sortBy_ = sortBy_;
}
result.starredOnly_ = starredOnly_;
result.bookmark_ = bookmark_;
result.search_ = search_;
result.id_ = id_;
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.ListDatasetsRequest) {
return mergeFrom((com.clarifai.grpc.api.ListDatasetsRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.clarifai.grpc.api.ListDatasetsRequest other) {
if (other == com.clarifai.grpc.api.ListDatasetsRequest.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.getStarredOnly() != false) {
setStarredOnly(other.getStarredOnly());
}
if (other.getBookmark() != false) {
setBookmark(other.getBookmark());
}
if (!other.getSearch().isEmpty()) {
search_ = other.search_;
onChanged();
}
if (!other.getId().isEmpty()) {
id_ = other.id_;
onChanged();
}
switch (other.getSortByCase()) {
case SORT_BY_CREATED_AT: {
setSortByCreatedAt(other.getSortByCreatedAt());
break;
}
case SORT_BY_STAR_COUNT: {
setSortByStarCount(other.getSortByStarCount());
break;
}
case SORT_BY_MODIFIED_AT: {
setSortByModifiedAt(other.getSortByModifiedAt());
break;
}
case SORT_BY_ID: {
setSortById(other.getSortById());
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.ListDatasetsRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.clarifai.grpc.api.ListDatasetsRequest) 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;
}
}
/**
* repeated string additional_fields = 5;
* @return A list containing the additionalFields.
*/
public com.google.protobuf.ProtocolStringList
getAdditionalFieldsList() {
return additionalFields_.getUnmodifiableView();
}
/**
* repeated string additional_fields = 5;
* @return The count of additionalFields.
*/
public int getAdditionalFieldsCount() {
return additionalFields_.size();
}
/**
* repeated string additional_fields = 5;
* @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);
}
/**
* repeated string additional_fields = 5;
* @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);
}
/**
* repeated string additional_fields = 5;
* @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;
}
/**
* repeated string additional_fields = 5;
* @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;
}
/**
* repeated string additional_fields = 5;
* @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;
}
/**
* repeated string additional_fields = 5;
* @return This builder for chaining.
*/
public Builder clearAdditionalFields() {
additionalFields_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* repeated string additional_fields = 5;
* @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 = 6;
* @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 = 6;
* @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 = 6;
* @return This builder for chaining.
*/
public Builder clearSortAscending() {
sortAscending_ = false;
onChanged();
return this;
}
/**
*
* Whether to order by the created_at time.
*
*
* bool sort_by_created_at = 7;
* @return Whether the sortByCreatedAt field is set.
*/
public boolean hasSortByCreatedAt() {
return sortByCase_ == 7;
}
/**
*
* Whether to order by the created_at time.
*
*
* bool sort_by_created_at = 7;
* @return The sortByCreatedAt.
*/
public boolean getSortByCreatedAt() {
if (sortByCase_ == 7) {
return (java.lang.Boolean) sortBy_;
}
return false;
}
/**
*
* Whether to order by the created_at time.
*
*
* bool sort_by_created_at = 7;
* @param value The sortByCreatedAt to set.
* @return This builder for chaining.
*/
public Builder setSortByCreatedAt(boolean value) {
sortByCase_ = 7;
sortBy_ = value;
onChanged();
return this;
}
/**
*
* Whether to order by the created_at time.
*
*
* bool sort_by_created_at = 7;
* @return This builder for chaining.
*/
public Builder clearSortByCreatedAt() {
if (sortByCase_ == 7) {
sortByCase_ = 0;
sortBy_ = null;
onChanged();
}
return this;
}
/**
*
* Whether to order by the number of users stared the app
*
*
* bool sort_by_star_count = 8;
* @return Whether the sortByStarCount field is set.
*/
public boolean hasSortByStarCount() {
return sortByCase_ == 8;
}
/**
*
* Whether to order by the number of users stared the app
*
*
* bool sort_by_star_count = 8;
* @return The sortByStarCount.
*/
public boolean getSortByStarCount() {
if (sortByCase_ == 8) {
return (java.lang.Boolean) sortBy_;
}
return false;
}
/**
*
* Whether to order by the number of users stared the app
*
*
* bool sort_by_star_count = 8;
* @param value The sortByStarCount to set.
* @return This builder for chaining.
*/
public Builder setSortByStarCount(boolean value) {
sortByCase_ = 8;
sortBy_ = value;
onChanged();
return this;
}
/**
*
* Whether to order by the number of users stared the app
*
*
* bool sort_by_star_count = 8;
* @return This builder for chaining.
*/
public Builder clearSortByStarCount() {
if (sortByCase_ == 8) {
sortByCase_ = 0;
sortBy_ = null;
onChanged();
}
return this;
}
/**
*
* If neither sort option is set to true, will sort by modified_at.
*
*
* bool sort_by_modified_at = 9;
* @return Whether the sortByModifiedAt field is set.
*/
public boolean hasSortByModifiedAt() {
return sortByCase_ == 9;
}
/**
*
* If neither sort option is set to true, will sort by modified_at.
*
*
* bool sort_by_modified_at = 9;
* @return The sortByModifiedAt.
*/
public boolean getSortByModifiedAt() {
if (sortByCase_ == 9) {
return (java.lang.Boolean) sortBy_;
}
return false;
}
/**
*
* If neither sort option is set to true, will sort by modified_at.
*
*
* bool sort_by_modified_at = 9;
* @param value The sortByModifiedAt to set.
* @return This builder for chaining.
*/
public Builder setSortByModifiedAt(boolean value) {
sortByCase_ = 9;
sortBy_ = value;
onChanged();
return this;
}
/**
*
* If neither sort option is set to true, will sort by modified_at.
*
*
* bool sort_by_modified_at = 9;
* @return This builder for chaining.
*/
public Builder clearSortByModifiedAt() {
if (sortByCase_ == 9) {
sortByCase_ = 0;
sortBy_ = null;
onChanged();
}
return this;
}
/**
*
* Whether to order by the external id
*
*
* bool sort_by_id = 11;
* @return Whether the sortById field is set.
*/
public boolean hasSortById() {
return sortByCase_ == 11;
}
/**
*
* Whether to order by the external id
*
*
* bool sort_by_id = 11;
* @return The sortById.
*/
public boolean getSortById() {
if (sortByCase_ == 11) {
return (java.lang.Boolean) sortBy_;
}
return false;
}
/**
*
* Whether to order by the external id
*
*
* bool sort_by_id = 11;
* @param value The sortById to set.
* @return This builder for chaining.
*/
public Builder setSortById(boolean value) {
sortByCase_ = 11;
sortBy_ = value;
onChanged();
return this;
}
/**
*
* Whether to order by the external id
*
*
* bool sort_by_id = 11;
* @return This builder for chaining.
*/
public Builder clearSortById() {
if (sortByCase_ == 11) {
sortByCase_ = 0;
sortBy_ = null;
onChanged();
}
return this;
}
private boolean starredOnly_ ;
/**
*
* Filtering options:
*
*
* bool starred_only = 4;
* @return The starredOnly.
*/
@java.lang.Override
public boolean getStarredOnly() {
return starredOnly_;
}
/**
*
* Filtering options:
*
*
* bool starred_only = 4;
* @param value The starredOnly to set.
* @return This builder for chaining.
*/
public Builder setStarredOnly(boolean value) {
starredOnly_ = value;
onChanged();
return this;
}
/**
*
* Filtering options:
*
*
* bool starred_only = 4;
* @return This builder for chaining.
*/
public Builder clearStarredOnly() {
starredOnly_ = false;
onChanged();
return this;
}
private boolean bookmark_ ;
/**
*
* Filter datasets by bookmark. If set, only return bookmarked datasets. Otherwise none bookmarked datasets only.
*
*
* bool bookmark = 10;
* @return The bookmark.
*/
@java.lang.Override
public boolean getBookmark() {
return bookmark_;
}
/**
*
* Filter datasets by bookmark. If set, only return bookmarked datasets. Otherwise none bookmarked datasets only.
*
*
* bool bookmark = 10;
* @param value The bookmark to set.
* @return This builder for chaining.
*/
public Builder setBookmark(boolean value) {
bookmark_ = value;
onChanged();
return this;
}
/**
*
* Filter datasets by bookmark. If set, only return bookmarked datasets. Otherwise none bookmarked datasets only.
*
*
* bool bookmark = 10;
* @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 dataset:
* - id
* - 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 = 13;
* @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 dataset:
* - id
* - 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 = 13;
* @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 dataset:
* - id
* - 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 = 13;
* @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 dataset:
* - id
* - 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 = 13;
* @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 dataset:
* - id
* - 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 = 13;
* @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 id_ = "";
/**
*
* Fuzzy filter on dataset ID
* Deprecated: use search instead.
*
*
* string id = 12 [deprecated = true];
* @deprecated clarifai.api.ListDatasetsRequest.id is deprecated.
* See proto/clarifai/api/service.proto;l=4605
* @return The id.
*/
@java.lang.Deprecated public java.lang.String getId() {
java.lang.Object ref = id_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Fuzzy filter on dataset ID
* Deprecated: use search instead.
*
*
* string id = 12 [deprecated = true];
* @deprecated clarifai.api.ListDatasetsRequest.id is deprecated.
* See proto/clarifai/api/service.proto;l=4605
* @return The bytes for id.
*/
@java.lang.Deprecated public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Fuzzy filter on dataset ID
* Deprecated: use search instead.
*
*
* string id = 12 [deprecated = true];
* @deprecated clarifai.api.ListDatasetsRequest.id is deprecated.
* See proto/clarifai/api/service.proto;l=4605
* @param value The id to set.
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder setId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
id_ = value;
onChanged();
return this;
}
/**
*
* Fuzzy filter on dataset ID
* Deprecated: use search instead.
*
*
* string id = 12 [deprecated = true];
* @deprecated clarifai.api.ListDatasetsRequest.id is deprecated.
* See proto/clarifai/api/service.proto;l=4605
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder clearId() {
id_ = getDefaultInstance().getId();
onChanged();
return this;
}
/**
*
* Fuzzy filter on dataset ID
* Deprecated: use search instead.
*
*
* string id = 12 [deprecated = true];
* @deprecated clarifai.api.ListDatasetsRequest.id is deprecated.
* See proto/clarifai/api/service.proto;l=4605
* @param value The bytes for id to set.
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder setIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
id_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:clarifai.api.ListDatasetsRequest)
}
// @@protoc_insertion_point(class_scope:clarifai.api.ListDatasetsRequest)
private static final com.clarifai.grpc.api.ListDatasetsRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.clarifai.grpc.api.ListDatasetsRequest();
}
public static com.clarifai.grpc.api.ListDatasetsRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ListDatasetsRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ListDatasetsRequest(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.ListDatasetsRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}