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/resources.proto
package com.clarifai.grpc.api;
/**
*
* TaskReview
*
*
* Protobuf type {@code clarifai.api.TaskReview}
*/
public final class TaskReview extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:clarifai.api.TaskReview)
TaskReviewOrBuilder {
private static final long serialVersionUID = 0L;
// Use TaskReview.newBuilder() to construct.
private TaskReview(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private TaskReview() {
strategy_ = 0;
userIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
users_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new TaskReview();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private TaskReview(
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 8: {
int rawValue = input.readEnum();
strategy_ = rawValue;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
userIds_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000001;
}
userIds_.add(s);
break;
}
case 26: {
com.clarifai.grpc.api.TaskReviewManualStrategyInfo.Builder subBuilder = null;
if (strategyInfoCase_ == 3) {
subBuilder = ((com.clarifai.grpc.api.TaskReviewManualStrategyInfo) strategyInfo_).toBuilder();
}
strategyInfo_ =
input.readMessage(com.clarifai.grpc.api.TaskReviewManualStrategyInfo.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.clarifai.grpc.api.TaskReviewManualStrategyInfo) strategyInfo_);
strategyInfo_ = subBuilder.buildPartial();
}
strategyInfoCase_ = 3;
break;
}
case 34: {
com.clarifai.grpc.api.TaskReviewConsensusStrategyInfo.Builder subBuilder = null;
if (strategyInfoCase_ == 4) {
subBuilder = ((com.clarifai.grpc.api.TaskReviewConsensusStrategyInfo) strategyInfo_).toBuilder();
}
strategyInfo_ =
input.readMessage(com.clarifai.grpc.api.TaskReviewConsensusStrategyInfo.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.clarifai.grpc.api.TaskReviewConsensusStrategyInfo) strategyInfo_);
strategyInfo_ = subBuilder.buildPartial();
}
strategyInfoCase_ = 4;
break;
}
case 42: {
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
users_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
users_.add(
input.readMessage(com.clarifai.grpc.api.User.parser(), extensionRegistry));
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();
}
if (((mutable_bitField0_ & 0x00000002) != 0)) {
users_ = java.util.Collections.unmodifiableList(users_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_TaskReview_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_TaskReview_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.TaskReview.class, com.clarifai.grpc.api.TaskReview.Builder.class);
}
/**
* Protobuf enum {@code clarifai.api.TaskReview.TaskReviewStrategy}
*/
public enum TaskReviewStrategy
implements com.google.protobuf.ProtocolMessageEnum {
/**
* TASK_REVIEW_STRATEGY_NOT_SET = 0;
*/
TASK_REVIEW_STRATEGY_NOT_SET(0),
/**
*
* No review is needed.
*
*
* NONE = 1;
*/
NONE(1),
/**
*
* Manual review strategy.
*
*
* MANUAL = 2;
*/
MANUAL(2),
/**
*
* Consensus review strategy.
*
*
* CONSENSUS = 3;
*/
CONSENSUS(3),
UNRECOGNIZED(-1),
;
/**
* TASK_REVIEW_STRATEGY_NOT_SET = 0;
*/
public static final int TASK_REVIEW_STRATEGY_NOT_SET_VALUE = 0;
/**
*
* No review is needed.
*
*
* NONE = 1;
*/
public static final int NONE_VALUE = 1;
/**
*
* Manual review strategy.
*
*
* MANUAL = 2;
*/
public static final int MANUAL_VALUE = 2;
/**
*
* Consensus review strategy.
*
*
* CONSENSUS = 3;
*/
public static final int CONSENSUS_VALUE = 3;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static TaskReviewStrategy valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static TaskReviewStrategy forNumber(int value) {
switch (value) {
case 0: return TASK_REVIEW_STRATEGY_NOT_SET;
case 1: return NONE;
case 2: return MANUAL;
case 3: return CONSENSUS;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
TaskReviewStrategy> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public TaskReviewStrategy findValueByNumber(int number) {
return TaskReviewStrategy.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return com.clarifai.grpc.api.TaskReview.getDescriptor().getEnumTypes().get(0);
}
private static final TaskReviewStrategy[] VALUES = values();
public static TaskReviewStrategy valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private TaskReviewStrategy(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:clarifai.api.TaskReview.TaskReviewStrategy)
}
private int strategyInfoCase_ = 0;
private java.lang.Object strategyInfo_;
public enum StrategyInfoCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
MANUAL_STRATEGY_INFO(3),
CONSENSUS_STRATEGY_INFO(4),
STRATEGYINFO_NOT_SET(0);
private final int value;
private StrategyInfoCase(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 StrategyInfoCase valueOf(int value) {
return forNumber(value);
}
public static StrategyInfoCase forNumber(int value) {
switch (value) {
case 3: return MANUAL_STRATEGY_INFO;
case 4: return CONSENSUS_STRATEGY_INFO;
case 0: return STRATEGYINFO_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public StrategyInfoCase
getStrategyInfoCase() {
return StrategyInfoCase.forNumber(
strategyInfoCase_);
}
public static final int STRATEGY_FIELD_NUMBER = 1;
private int strategy_;
/**
*
* Task review strategy.
*
*
* .clarifai.api.TaskReview.TaskReviewStrategy strategy = 1;
* @return The enum numeric value on the wire for strategy.
*/
@java.lang.Override public int getStrategyValue() {
return strategy_;
}
/**
*
* Task review strategy.
*
*
* .clarifai.api.TaskReview.TaskReviewStrategy strategy = 1;
* @return The strategy.
*/
@java.lang.Override public com.clarifai.grpc.api.TaskReview.TaskReviewStrategy getStrategy() {
@SuppressWarnings("deprecation")
com.clarifai.grpc.api.TaskReview.TaskReviewStrategy result = com.clarifai.grpc.api.TaskReview.TaskReviewStrategy.valueOf(strategy_);
return result == null ? com.clarifai.grpc.api.TaskReview.TaskReviewStrategy.UNRECOGNIZED : result;
}
public static final int USER_IDS_FIELD_NUMBER = 2;
private com.google.protobuf.LazyStringList userIds_;
/**
*
* Who will review this task.
* DEPRECATED: Use users.id instead.
*
*
* repeated string user_ids = 2 [deprecated = true];
* @deprecated clarifai.api.TaskReview.user_ids is deprecated.
* See proto/clarifai/api/resources.proto;l=3156
* @return A list containing the userIds.
*/
@java.lang.Deprecated public com.google.protobuf.ProtocolStringList
getUserIdsList() {
return userIds_;
}
/**
*
* Who will review this task.
* DEPRECATED: Use users.id instead.
*
*
* repeated string user_ids = 2 [deprecated = true];
* @deprecated clarifai.api.TaskReview.user_ids is deprecated.
* See proto/clarifai/api/resources.proto;l=3156
* @return The count of userIds.
*/
@java.lang.Deprecated public int getUserIdsCount() {
return userIds_.size();
}
/**
*
* Who will review this task.
* DEPRECATED: Use users.id instead.
*
*
* repeated string user_ids = 2 [deprecated = true];
* @deprecated clarifai.api.TaskReview.user_ids is deprecated.
* See proto/clarifai/api/resources.proto;l=3156
* @param index The index of the element to return.
* @return The userIds at the given index.
*/
@java.lang.Deprecated public java.lang.String getUserIds(int index) {
return userIds_.get(index);
}
/**
*
* Who will review this task.
* DEPRECATED: Use users.id instead.
*
*
* repeated string user_ids = 2 [deprecated = true];
* @deprecated clarifai.api.TaskReview.user_ids is deprecated.
* See proto/clarifai/api/resources.proto;l=3156
* @param index The index of the value to return.
* @return The bytes of the userIds at the given index.
*/
@java.lang.Deprecated public com.google.protobuf.ByteString
getUserIdsBytes(int index) {
return userIds_.getByteString(index);
}
public static final int USERS_FIELD_NUMBER = 5;
private java.util.List users_;
/**
*
* Users who will review this task.
* When the 'review.users' field is additionally requested, then all user
* info is filled for the reviewers. Otherwise, only the user 'id' is filled.
*
* Users who will review this task.
* When the 'review.users' field is additionally requested, then all user
* info is filled for the reviewers. Otherwise, only the user 'id' is filled.
*
* Users who will review this task.
* When the 'review.users' field is additionally requested, then all user
* info is filled for the reviewers. Otherwise, only the user 'id' is filled.
*
*
* repeated .clarifai.api.User users = 5;
*/
@java.lang.Override
public int getUsersCount() {
return users_.size();
}
/**
*
* Users who will review this task.
* When the 'review.users' field is additionally requested, then all user
* info is filled for the reviewers. Otherwise, only the user 'id' is filled.
*
* Users who will review this task.
* When the 'review.users' field is additionally requested, then all user
* info is filled for the reviewers. Otherwise, only the user 'id' is filled.
*
*
* repeated .clarifai.api.User users = 5;
*/
@java.lang.Override
public com.clarifai.grpc.api.UserOrBuilder getUsersOrBuilder(
int index) {
return users_.get(index);
}
public static final int MANUAL_STRATEGY_INFO_FIELD_NUMBER = 3;
/**
* .clarifai.api.TaskReviewManualStrategyInfo manual_strategy_info = 3;
* @return Whether the manualStrategyInfo field is set.
*/
@java.lang.Override
public boolean hasManualStrategyInfo() {
return strategyInfoCase_ == 3;
}
/**
* .clarifai.api.TaskReviewManualStrategyInfo manual_strategy_info = 3;
* @return The manualStrategyInfo.
*/
@java.lang.Override
public com.clarifai.grpc.api.TaskReviewManualStrategyInfo getManualStrategyInfo() {
if (strategyInfoCase_ == 3) {
return (com.clarifai.grpc.api.TaskReviewManualStrategyInfo) strategyInfo_;
}
return com.clarifai.grpc.api.TaskReviewManualStrategyInfo.getDefaultInstance();
}
/**
* .clarifai.api.TaskReviewManualStrategyInfo manual_strategy_info = 3;
*/
@java.lang.Override
public com.clarifai.grpc.api.TaskReviewManualStrategyInfoOrBuilder getManualStrategyInfoOrBuilder() {
if (strategyInfoCase_ == 3) {
return (com.clarifai.grpc.api.TaskReviewManualStrategyInfo) strategyInfo_;
}
return com.clarifai.grpc.api.TaskReviewManualStrategyInfo.getDefaultInstance();
}
public static final int CONSENSUS_STRATEGY_INFO_FIELD_NUMBER = 4;
/**
* .clarifai.api.TaskReviewConsensusStrategyInfo consensus_strategy_info = 4;
* @return Whether the consensusStrategyInfo field is set.
*/
@java.lang.Override
public boolean hasConsensusStrategyInfo() {
return strategyInfoCase_ == 4;
}
/**
* .clarifai.api.TaskReviewConsensusStrategyInfo consensus_strategy_info = 4;
* @return The consensusStrategyInfo.
*/
@java.lang.Override
public com.clarifai.grpc.api.TaskReviewConsensusStrategyInfo getConsensusStrategyInfo() {
if (strategyInfoCase_ == 4) {
return (com.clarifai.grpc.api.TaskReviewConsensusStrategyInfo) strategyInfo_;
}
return com.clarifai.grpc.api.TaskReviewConsensusStrategyInfo.getDefaultInstance();
}
/**
* .clarifai.api.TaskReviewConsensusStrategyInfo consensus_strategy_info = 4;
*/
@java.lang.Override
public com.clarifai.grpc.api.TaskReviewConsensusStrategyInfoOrBuilder getConsensusStrategyInfoOrBuilder() {
if (strategyInfoCase_ == 4) {
return (com.clarifai.grpc.api.TaskReviewConsensusStrategyInfo) strategyInfo_;
}
return com.clarifai.grpc.api.TaskReviewConsensusStrategyInfo.getDefaultInstance();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (strategy_ != com.clarifai.grpc.api.TaskReview.TaskReviewStrategy.TASK_REVIEW_STRATEGY_NOT_SET.getNumber()) {
output.writeEnum(1, strategy_);
}
for (int i = 0; i < userIds_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, userIds_.getRaw(i));
}
if (strategyInfoCase_ == 3) {
output.writeMessage(3, (com.clarifai.grpc.api.TaskReviewManualStrategyInfo) strategyInfo_);
}
if (strategyInfoCase_ == 4) {
output.writeMessage(4, (com.clarifai.grpc.api.TaskReviewConsensusStrategyInfo) strategyInfo_);
}
for (int i = 0; i < users_.size(); i++) {
output.writeMessage(5, users_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (strategy_ != com.clarifai.grpc.api.TaskReview.TaskReviewStrategy.TASK_REVIEW_STRATEGY_NOT_SET.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, strategy_);
}
{
int dataSize = 0;
for (int i = 0; i < userIds_.size(); i++) {
dataSize += computeStringSizeNoTag(userIds_.getRaw(i));
}
size += dataSize;
size += 1 * getUserIdsList().size();
}
if (strategyInfoCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, (com.clarifai.grpc.api.TaskReviewManualStrategyInfo) strategyInfo_);
}
if (strategyInfoCase_ == 4) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, (com.clarifai.grpc.api.TaskReviewConsensusStrategyInfo) strategyInfo_);
}
for (int i = 0; i < users_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, users_.get(i));
}
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.TaskReview)) {
return super.equals(obj);
}
com.clarifai.grpc.api.TaskReview other = (com.clarifai.grpc.api.TaskReview) obj;
if (strategy_ != other.strategy_) return false;
if (!getUserIdsList()
.equals(other.getUserIdsList())) return false;
if (!getUsersList()
.equals(other.getUsersList())) return false;
if (!getStrategyInfoCase().equals(other.getStrategyInfoCase())) return false;
switch (strategyInfoCase_) {
case 3:
if (!getManualStrategyInfo()
.equals(other.getManualStrategyInfo())) return false;
break;
case 4:
if (!getConsensusStrategyInfo()
.equals(other.getConsensusStrategyInfo())) return false;
break;
case 0:
default:
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + STRATEGY_FIELD_NUMBER;
hash = (53 * hash) + strategy_;
if (getUserIdsCount() > 0) {
hash = (37 * hash) + USER_IDS_FIELD_NUMBER;
hash = (53 * hash) + getUserIdsList().hashCode();
}
if (getUsersCount() > 0) {
hash = (37 * hash) + USERS_FIELD_NUMBER;
hash = (53 * hash) + getUsersList().hashCode();
}
switch (strategyInfoCase_) {
case 3:
hash = (37 * hash) + MANUAL_STRATEGY_INFO_FIELD_NUMBER;
hash = (53 * hash) + getManualStrategyInfo().hashCode();
break;
case 4:
hash = (37 * hash) + CONSENSUS_STRATEGY_INFO_FIELD_NUMBER;
hash = (53 * hash) + getConsensusStrategyInfo().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.clarifai.grpc.api.TaskReview parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.TaskReview 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.TaskReview parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.TaskReview 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.TaskReview parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.TaskReview parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.clarifai.grpc.api.TaskReview parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.TaskReview 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.TaskReview parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.TaskReview 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.TaskReview parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.TaskReview 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.TaskReview 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;
}
/**
*
*
* .clarifai.api.TaskReview.TaskReviewStrategy strategy = 1;
* @return The enum numeric value on the wire for strategy.
*/
@java.lang.Override public int getStrategyValue() {
return strategy_;
}
/**
*
* Task review strategy.
*
*
* .clarifai.api.TaskReview.TaskReviewStrategy strategy = 1;
* @param value The enum numeric value on the wire for strategy to set.
* @return This builder for chaining.
*/
public Builder setStrategyValue(int value) {
strategy_ = value;
onChanged();
return this;
}
/**
*
* Task review strategy.
*
*
* .clarifai.api.TaskReview.TaskReviewStrategy strategy = 1;
* @return The strategy.
*/
@java.lang.Override
public com.clarifai.grpc.api.TaskReview.TaskReviewStrategy getStrategy() {
@SuppressWarnings("deprecation")
com.clarifai.grpc.api.TaskReview.TaskReviewStrategy result = com.clarifai.grpc.api.TaskReview.TaskReviewStrategy.valueOf(strategy_);
return result == null ? com.clarifai.grpc.api.TaskReview.TaskReviewStrategy.UNRECOGNIZED : result;
}
/**
*
* Task review strategy.
*
*
* .clarifai.api.TaskReview.TaskReviewStrategy strategy = 1;
* @param value The strategy to set.
* @return This builder for chaining.
*/
public Builder setStrategy(com.clarifai.grpc.api.TaskReview.TaskReviewStrategy value) {
if (value == null) {
throw new NullPointerException();
}
strategy_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Who will review this task.
* DEPRECATED: Use users.id instead.
*
*
* repeated string user_ids = 2 [deprecated = true];
* @deprecated clarifai.api.TaskReview.user_ids is deprecated.
* See proto/clarifai/api/resources.proto;l=3156
* @return A list containing the userIds.
*/
@java.lang.Deprecated public com.google.protobuf.ProtocolStringList
getUserIdsList() {
return userIds_.getUnmodifiableView();
}
/**
*
* Who will review this task.
* DEPRECATED: Use users.id instead.
*
*
* repeated string user_ids = 2 [deprecated = true];
* @deprecated clarifai.api.TaskReview.user_ids is deprecated.
* See proto/clarifai/api/resources.proto;l=3156
* @return The count of userIds.
*/
@java.lang.Deprecated public int getUserIdsCount() {
return userIds_.size();
}
/**
*
* Who will review this task.
* DEPRECATED: Use users.id instead.
*
*
* repeated string user_ids = 2 [deprecated = true];
* @deprecated clarifai.api.TaskReview.user_ids is deprecated.
* See proto/clarifai/api/resources.proto;l=3156
* @param index The index of the element to return.
* @return The userIds at the given index.
*/
@java.lang.Deprecated public java.lang.String getUserIds(int index) {
return userIds_.get(index);
}
/**
*
* Who will review this task.
* DEPRECATED: Use users.id instead.
*
*
* repeated string user_ids = 2 [deprecated = true];
* @deprecated clarifai.api.TaskReview.user_ids is deprecated.
* See proto/clarifai/api/resources.proto;l=3156
* @param index The index of the value to return.
* @return The bytes of the userIds at the given index.
*/
@java.lang.Deprecated public com.google.protobuf.ByteString
getUserIdsBytes(int index) {
return userIds_.getByteString(index);
}
/**
*
* Who will review this task.
* DEPRECATED: Use users.id instead.
*
*
* repeated string user_ids = 2 [deprecated = true];
* @deprecated clarifai.api.TaskReview.user_ids is deprecated.
* See proto/clarifai/api/resources.proto;l=3156
* @param index The index to set the value at.
* @param value The userIds to set.
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder setUserIds(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureUserIdsIsMutable();
userIds_.set(index, value);
onChanged();
return this;
}
/**
*
* Who will review this task.
* DEPRECATED: Use users.id instead.
*
*
* repeated string user_ids = 2 [deprecated = true];
* @deprecated clarifai.api.TaskReview.user_ids is deprecated.
* See proto/clarifai/api/resources.proto;l=3156
* @param value The userIds to add.
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder addUserIds(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureUserIdsIsMutable();
userIds_.add(value);
onChanged();
return this;
}
/**
*
* Who will review this task.
* DEPRECATED: Use users.id instead.
*
*
* repeated string user_ids = 2 [deprecated = true];
* @deprecated clarifai.api.TaskReview.user_ids is deprecated.
* See proto/clarifai/api/resources.proto;l=3156
* @param values The userIds to add.
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder addAllUserIds(
java.lang.Iterable values) {
ensureUserIdsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, userIds_);
onChanged();
return this;
}
/**
*
* Who will review this task.
* DEPRECATED: Use users.id instead.
*
*
* repeated string user_ids = 2 [deprecated = true];
* @deprecated clarifai.api.TaskReview.user_ids is deprecated.
* See proto/clarifai/api/resources.proto;l=3156
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder clearUserIds() {
userIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* Who will review this task.
* DEPRECATED: Use users.id instead.
*
*
* repeated string user_ids = 2 [deprecated = true];
* @deprecated clarifai.api.TaskReview.user_ids is deprecated.
* See proto/clarifai/api/resources.proto;l=3156
* @param value The bytes of the userIds to add.
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder addUserIdsBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureUserIdsIsMutable();
userIds_.add(value);
onChanged();
return this;
}
private java.util.List users_ =
java.util.Collections.emptyList();
private void ensureUsersIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
users_ = new java.util.ArrayList(users_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.clarifai.grpc.api.User, com.clarifai.grpc.api.User.Builder, com.clarifai.grpc.api.UserOrBuilder> usersBuilder_;
/**
*
* Users who will review this task.
* When the 'review.users' field is additionally requested, then all user
* info is filled for the reviewers. Otherwise, only the user 'id' is filled.
*
* Users who will review this task.
* When the 'review.users' field is additionally requested, then all user
* info is filled for the reviewers. Otherwise, only the user 'id' is filled.
*
*
* repeated .clarifai.api.User users = 5;
*/
public int getUsersCount() {
if (usersBuilder_ == null) {
return users_.size();
} else {
return usersBuilder_.getCount();
}
}
/**
*
* Users who will review this task.
* When the 'review.users' field is additionally requested, then all user
* info is filled for the reviewers. Otherwise, only the user 'id' is filled.
*
* Users who will review this task.
* When the 'review.users' field is additionally requested, then all user
* info is filled for the reviewers. Otherwise, only the user 'id' is filled.
*
*
* repeated .clarifai.api.User users = 5;
*/
public Builder setUsers(
int index, com.clarifai.grpc.api.User value) {
if (usersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureUsersIsMutable();
users_.set(index, value);
onChanged();
} else {
usersBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Users who will review this task.
* When the 'review.users' field is additionally requested, then all user
* info is filled for the reviewers. Otherwise, only the user 'id' is filled.
*
* Users who will review this task.
* When the 'review.users' field is additionally requested, then all user
* info is filled for the reviewers. Otherwise, only the user 'id' is filled.
*
*
* repeated .clarifai.api.User users = 5;
*/
public Builder addUsers(com.clarifai.grpc.api.User value) {
if (usersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureUsersIsMutable();
users_.add(value);
onChanged();
} else {
usersBuilder_.addMessage(value);
}
return this;
}
/**
*
* Users who will review this task.
* When the 'review.users' field is additionally requested, then all user
* info is filled for the reviewers. Otherwise, only the user 'id' is filled.
*
*
* repeated .clarifai.api.User users = 5;
*/
public Builder addUsers(
int index, com.clarifai.grpc.api.User value) {
if (usersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureUsersIsMutable();
users_.add(index, value);
onChanged();
} else {
usersBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Users who will review this task.
* When the 'review.users' field is additionally requested, then all user
* info is filled for the reviewers. Otherwise, only the user 'id' is filled.
*
* Users who will review this task.
* When the 'review.users' field is additionally requested, then all user
* info is filled for the reviewers. Otherwise, only the user 'id' is filled.
*
* Users who will review this task.
* When the 'review.users' field is additionally requested, then all user
* info is filled for the reviewers. Otherwise, only the user 'id' is filled.
*
* Users who will review this task.
* When the 'review.users' field is additionally requested, then all user
* info is filled for the reviewers. Otherwise, only the user 'id' is filled.
*
* Users who will review this task.
* When the 'review.users' field is additionally requested, then all user
* info is filled for the reviewers. Otherwise, only the user 'id' is filled.
*
* Users who will review this task.
* When the 'review.users' field is additionally requested, then all user
* info is filled for the reviewers. Otherwise, only the user 'id' is filled.
*
*
* repeated .clarifai.api.User users = 5;
*/
public com.clarifai.grpc.api.User.Builder getUsersBuilder(
int index) {
return getUsersFieldBuilder().getBuilder(index);
}
/**
*
* Users who will review this task.
* When the 'review.users' field is additionally requested, then all user
* info is filled for the reviewers. Otherwise, only the user 'id' is filled.
*
*
* repeated .clarifai.api.User users = 5;
*/
public com.clarifai.grpc.api.UserOrBuilder getUsersOrBuilder(
int index) {
if (usersBuilder_ == null) {
return users_.get(index); } else {
return usersBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Users who will review this task.
* When the 'review.users' field is additionally requested, then all user
* info is filled for the reviewers. Otherwise, only the user 'id' is filled.
*
* Users who will review this task.
* When the 'review.users' field is additionally requested, then all user
* info is filled for the reviewers. Otherwise, only the user 'id' is filled.
*
* Users who will review this task.
* When the 'review.users' field is additionally requested, then all user
* info is filled for the reviewers. Otherwise, only the user 'id' is filled.
*
* Users who will review this task.
* When the 'review.users' field is additionally requested, then all user
* info is filled for the reviewers. Otherwise, only the user 'id' is filled.
*