Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: proto/clarifai/api/service.proto
package com.clarifai.grpc.api;
/**
*
* GetTaskCountRequest can be used for fetching -
* 1. Task annotation count per user, per status
* 1. Task input (anchor annotations) count per user, per status
*
*
* Protobuf type {@code clarifai.api.GetTaskCountRequest}
*/
public final class GetTaskCountRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:clarifai.api.GetTaskCountRequest)
GetTaskCountRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use GetTaskCountRequest.newBuilder() to construct.
private GetTaskCountRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private GetTaskCountRequest() {
taskId_ = "";
userIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new GetTaskCountRequest();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private GetTaskCountRequest(
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 18: {
java.lang.String s = input.readStringRequireUtf8();
taskId_ = s;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
userIds_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000001;
}
userIds_.add(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)) {
userIds_ = userIds_.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_GetTaskCountRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Service.internal_static_clarifai_api_GetTaskCountRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.GetTaskCountRequest.class, com.clarifai.grpc.api.GetTaskCountRequest.Builder.class);
}
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 TASK_ID_FIELD_NUMBER = 2;
private volatile java.lang.Object taskId_;
/**
*
* task_id for which count per user per status is needed
*
* task_id for which count per user per status is needed
*
*
* string task_id = 2;
* @return The bytes for taskId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getTaskIdBytes() {
java.lang.Object ref = taskId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
taskId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int USER_IDS_FIELD_NUMBER = 3;
private com.google.protobuf.LazyStringList userIds_;
/**
*
* for given task_id, user_ids to filter on (optional)
*
*
* repeated string user_ids = 3;
* @return A list containing the userIds.
*/
public com.google.protobuf.ProtocolStringList
getUserIdsList() {
return userIds_;
}
/**
*
* for given task_id, user_ids to filter on (optional)
*
*
* repeated string user_ids = 3;
* @return The count of userIds.
*/
public int getUserIdsCount() {
return userIds_.size();
}
/**
*
* for given task_id, user_ids to filter on (optional)
*
*
* repeated string user_ids = 3;
* @param index The index of the element to return.
* @return The userIds at the given index.
*/
public java.lang.String getUserIds(int index) {
return userIds_.get(index);
}
/**
*
* for given task_id, user_ids to filter on (optional)
*
*
* repeated string user_ids = 3;
* @param index The index of the value to return.
* @return The bytes of the userIds at the given index.
*/
public com.google.protobuf.ByteString
getUserIdsBytes(int index) {
return userIds_.getByteString(index);
}
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(taskId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, taskId_);
}
for (int i = 0; i < userIds_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, userIds_.getRaw(i));
}
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(taskId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, taskId_);
}
{
int dataSize = 0;
for (int i = 0; i < userIds_.size(); i++) {
dataSize += computeStringSizeNoTag(userIds_.getRaw(i));
}
size += dataSize;
size += 1 * getUserIdsList().size();
}
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.GetTaskCountRequest)) {
return super.equals(obj);
}
com.clarifai.grpc.api.GetTaskCountRequest other = (com.clarifai.grpc.api.GetTaskCountRequest) obj;
if (hasUserAppId() != other.hasUserAppId()) return false;
if (hasUserAppId()) {
if (!getUserAppId()
.equals(other.getUserAppId())) return false;
}
if (!getTaskId()
.equals(other.getTaskId())) return false;
if (!getUserIdsList()
.equals(other.getUserIdsList())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasUserAppId()) {
hash = (37 * hash) + USER_APP_ID_FIELD_NUMBER;
hash = (53 * hash) + getUserAppId().hashCode();
}
hash = (37 * hash) + TASK_ID_FIELD_NUMBER;
hash = (53 * hash) + getTaskId().hashCode();
if (getUserIdsCount() > 0) {
hash = (37 * hash) + USER_IDS_FIELD_NUMBER;
hash = (53 * hash) + getUserIdsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.clarifai.grpc.api.GetTaskCountRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.GetTaskCountRequest 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.GetTaskCountRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.GetTaskCountRequest 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.GetTaskCountRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.GetTaskCountRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.clarifai.grpc.api.GetTaskCountRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.GetTaskCountRequest 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.GetTaskCountRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.GetTaskCountRequest 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.GetTaskCountRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.GetTaskCountRequest 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.GetTaskCountRequest 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;
}
/**
*
* GetTaskCountRequest can be used for fetching -
* 1. Task annotation count per user, per status
* 1. Task input (anchor annotations) count per user, per status
*
* task_id for which count per user per status is needed
*
*
* string task_id = 2;
* @return The bytes for taskId.
*/
public com.google.protobuf.ByteString
getTaskIdBytes() {
java.lang.Object ref = taskId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
taskId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* task_id for which count per user per status is needed
*
*
* string task_id = 2;
* @param value The taskId to set.
* @return This builder for chaining.
*/
public Builder setTaskId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
taskId_ = value;
onChanged();
return this;
}
/**
*
* task_id for which count per user per status is needed
*
*
* string task_id = 2;
* @return This builder for chaining.
*/
public Builder clearTaskId() {
taskId_ = getDefaultInstance().getTaskId();
onChanged();
return this;
}
/**
*
* task_id for which count per user per status is needed
*
*
* string task_id = 2;
* @param value The bytes for taskId to set.
* @return This builder for chaining.
*/
public Builder setTaskIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
taskId_ = value;
onChanged();
return this;
}
private com.google.protobuf.LazyStringList userIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureUserIdsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
userIds_ = new com.google.protobuf.LazyStringArrayList(userIds_);
bitField0_ |= 0x00000001;
}
}
/**
*
* for given task_id, user_ids to filter on (optional)
*
*
* repeated string user_ids = 3;
* @return A list containing the userIds.
*/
public com.google.protobuf.ProtocolStringList
getUserIdsList() {
return userIds_.getUnmodifiableView();
}
/**
*
* for given task_id, user_ids to filter on (optional)
*
*
* repeated string user_ids = 3;
* @return The count of userIds.
*/
public int getUserIdsCount() {
return userIds_.size();
}
/**
*
* for given task_id, user_ids to filter on (optional)
*
*
* repeated string user_ids = 3;
* @param index The index of the element to return.
* @return The userIds at the given index.
*/
public java.lang.String getUserIds(int index) {
return userIds_.get(index);
}
/**
*
* for given task_id, user_ids to filter on (optional)
*
*
* repeated string user_ids = 3;
* @param index The index of the value to return.
* @return The bytes of the userIds at the given index.
*/
public com.google.protobuf.ByteString
getUserIdsBytes(int index) {
return userIds_.getByteString(index);
}
/**
*
* for given task_id, user_ids to filter on (optional)
*
*
* repeated string user_ids = 3;
* @param index The index to set the value at.
* @param value The userIds to set.
* @return This builder for chaining.
*/
public Builder setUserIds(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureUserIdsIsMutable();
userIds_.set(index, value);
onChanged();
return this;
}
/**
*
* for given task_id, user_ids to filter on (optional)
*
*
* repeated string user_ids = 3;
* @param value The userIds to add.
* @return This builder for chaining.
*/
public Builder addUserIds(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureUserIdsIsMutable();
userIds_.add(value);
onChanged();
return this;
}
/**
*
* for given task_id, user_ids to filter on (optional)
*
*
* repeated string user_ids = 3;
* @param values The userIds to add.
* @return This builder for chaining.
*/
public Builder addAllUserIds(
java.lang.Iterable values) {
ensureUserIdsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, userIds_);
onChanged();
return this;
}
/**
*
* for given task_id, user_ids to filter on (optional)
*