com.clarifai.grpc.api.TaskReview Maven / Gradle / Ivy
The newest version!
// 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=3238
* @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=3238
* @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=3238
* @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=3238
* @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.
*
*
* repeated .clarifai.api.User users = 5;
*/
@java.lang.Override
public java.util.List getUsersList() {
return 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.
*
*
* repeated .clarifai.api.User users = 5;
*/
@java.lang.Override
public java.util.List extends com.clarifai.grpc.api.UserOrBuilder>
getUsersOrBuilderList() {
return 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.
*
*
* 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.
*
*
* repeated .clarifai.api.User users = 5;
*/
@java.lang.Override
public com.clarifai.grpc.api.User getUsers(int index) {
return users_.get(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;
*/
@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;
}
/**
*
* TaskReview
*
*
* Protobuf type {@code clarifai.api.TaskReview}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:clarifai.api.TaskReview)
com.clarifai.grpc.api.TaskReviewOrBuilder {
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);
}
// Construct using com.clarifai.grpc.api.TaskReview.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getUsersFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
strategy_ = 0;
userIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
if (usersBuilder_ == null) {
users_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
} else {
usersBuilder_.clear();
}
strategyInfoCase_ = 0;
strategyInfo_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_TaskReview_descriptor;
}
@java.lang.Override
public com.clarifai.grpc.api.TaskReview getDefaultInstanceForType() {
return com.clarifai.grpc.api.TaskReview.getDefaultInstance();
}
@java.lang.Override
public com.clarifai.grpc.api.TaskReview build() {
com.clarifai.grpc.api.TaskReview result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.clarifai.grpc.api.TaskReview buildPartial() {
com.clarifai.grpc.api.TaskReview result = new com.clarifai.grpc.api.TaskReview(this);
int from_bitField0_ = bitField0_;
result.strategy_ = strategy_;
if (((bitField0_ & 0x00000001) != 0)) {
userIds_ = userIds_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000001);
}
result.userIds_ = userIds_;
if (usersBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
users_ = java.util.Collections.unmodifiableList(users_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.users_ = users_;
} else {
result.users_ = usersBuilder_.build();
}
if (strategyInfoCase_ == 3) {
if (manualStrategyInfoBuilder_ == null) {
result.strategyInfo_ = strategyInfo_;
} else {
result.strategyInfo_ = manualStrategyInfoBuilder_.build();
}
}
if (strategyInfoCase_ == 4) {
if (consensusStrategyInfoBuilder_ == null) {
result.strategyInfo_ = strategyInfo_;
} else {
result.strategyInfo_ = consensusStrategyInfoBuilder_.build();
}
}
result.strategyInfoCase_ = strategyInfoCase_;
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.TaskReview) {
return mergeFrom((com.clarifai.grpc.api.TaskReview)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.clarifai.grpc.api.TaskReview other) {
if (other == com.clarifai.grpc.api.TaskReview.getDefaultInstance()) return this;
if (other.strategy_ != 0) {
setStrategyValue(other.getStrategyValue());
}
if (!other.userIds_.isEmpty()) {
if (userIds_.isEmpty()) {
userIds_ = other.userIds_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureUserIdsIsMutable();
userIds_.addAll(other.userIds_);
}
onChanged();
}
if (usersBuilder_ == null) {
if (!other.users_.isEmpty()) {
if (users_.isEmpty()) {
users_ = other.users_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureUsersIsMutable();
users_.addAll(other.users_);
}
onChanged();
}
} else {
if (!other.users_.isEmpty()) {
if (usersBuilder_.isEmpty()) {
usersBuilder_.dispose();
usersBuilder_ = null;
users_ = other.users_;
bitField0_ = (bitField0_ & ~0x00000002);
usersBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getUsersFieldBuilder() : null;
} else {
usersBuilder_.addAllMessages(other.users_);
}
}
}
switch (other.getStrategyInfoCase()) {
case MANUAL_STRATEGY_INFO: {
mergeManualStrategyInfo(other.getManualStrategyInfo());
break;
}
case CONSENSUS_STRATEGY_INFO: {
mergeConsensusStrategyInfo(other.getConsensusStrategyInfo());
break;
}
case STRATEGYINFO_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.TaskReview parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.clarifai.grpc.api.TaskReview) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int strategyInfoCase_ = 0;
private java.lang.Object strategyInfo_;
public StrategyInfoCase
getStrategyInfoCase() {
return StrategyInfoCase.forNumber(
strategyInfoCase_);
}
public Builder clearStrategyInfo() {
strategyInfoCase_ = 0;
strategyInfo_ = null;
onChanged();
return this;
}
private int bitField0_;
private int strategy_ = 0;
/**
*
* 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;
* @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;
}
/**
*
* Task review strategy.
*
*
* .clarifai.api.TaskReview.TaskReviewStrategy strategy = 1;
* @return This builder for chaining.
*/
public Builder clearStrategy() {
strategy_ = 0;
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;
}
}
/**
*
* 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=3238
* @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=3238
* @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=3238
* @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=3238
* @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=3238
* @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=3238
* @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=3238
* @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=3238
* @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=3238
* @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.
*
*
* repeated .clarifai.api.User users = 5;
*/
public java.util.List getUsersList() {
if (usersBuilder_ == null) {
return java.util.Collections.unmodifiableList(users_);
} else {
return usersBuilder_.getMessageList();
}
}
/**
*
* 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.
*
*
* repeated .clarifai.api.User users = 5;
*/
public com.clarifai.grpc.api.User getUsers(int index) {
if (usersBuilder_ == null) {
return users_.get(index);
} else {
return usersBuilder_.getMessage(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 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.
*
*
* repeated .clarifai.api.User users = 5;
*/
public Builder setUsers(
int index, com.clarifai.grpc.api.User.Builder builderForValue) {
if (usersBuilder_ == null) {
ensureUsersIsMutable();
users_.set(index, builderForValue.build());
onChanged();
} else {
usersBuilder_.setMessage(index, builderForValue.build());
}
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(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.
*
*
* repeated .clarifai.api.User users = 5;
*/
public Builder addUsers(
com.clarifai.grpc.api.User.Builder builderForValue) {
if (usersBuilder_ == null) {
ensureUsersIsMutable();
users_.add(builderForValue.build());
onChanged();
} else {
usersBuilder_.addMessage(builderForValue.build());
}
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.Builder builderForValue) {
if (usersBuilder_ == null) {
ensureUsersIsMutable();
users_.add(index, builderForValue.build());
onChanged();
} else {
usersBuilder_.addMessage(index, builderForValue.build());
}
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 addAllUsers(
java.lang.Iterable extends com.clarifai.grpc.api.User> values) {
if (usersBuilder_ == null) {
ensureUsersIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, users_);
onChanged();
} else {
usersBuilder_.addAllMessages(values);
}
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 clearUsers() {
if (usersBuilder_ == null) {
users_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
usersBuilder_.clear();
}
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 removeUsers(int index) {
if (usersBuilder_ == null) {
ensureUsersIsMutable();
users_.remove(index);
onChanged();
} else {
usersBuilder_.remove(index);
}
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 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.
*
*
* repeated .clarifai.api.User users = 5;
*/
public java.util.List extends com.clarifai.grpc.api.UserOrBuilder>
getUsersOrBuilderList() {
if (usersBuilder_ != null) {
return usersBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(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.
*
*
* repeated .clarifai.api.User users = 5;
*/
public com.clarifai.grpc.api.User.Builder addUsersBuilder() {
return getUsersFieldBuilder().addBuilder(
com.clarifai.grpc.api.User.getDefaultInstance());
}
/**
*
* 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 addUsersBuilder(
int index) {
return getUsersFieldBuilder().addBuilder(
index, com.clarifai.grpc.api.User.getDefaultInstance());
}
/**
*
* 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 java.util.List
getUsersBuilderList() {
return getUsersFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.clarifai.grpc.api.User, com.clarifai.grpc.api.User.Builder, com.clarifai.grpc.api.UserOrBuilder>
getUsersFieldBuilder() {
if (usersBuilder_ == null) {
usersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.clarifai.grpc.api.User, com.clarifai.grpc.api.User.Builder, com.clarifai.grpc.api.UserOrBuilder>(
users_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
users_ = null;
}
return usersBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.TaskReviewManualStrategyInfo, com.clarifai.grpc.api.TaskReviewManualStrategyInfo.Builder, com.clarifai.grpc.api.TaskReviewManualStrategyInfoOrBuilder> manualStrategyInfoBuilder_;
/**
* .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 (manualStrategyInfoBuilder_ == null) {
if (strategyInfoCase_ == 3) {
return (com.clarifai.grpc.api.TaskReviewManualStrategyInfo) strategyInfo_;
}
return com.clarifai.grpc.api.TaskReviewManualStrategyInfo.getDefaultInstance();
} else {
if (strategyInfoCase_ == 3) {
return manualStrategyInfoBuilder_.getMessage();
}
return com.clarifai.grpc.api.TaskReviewManualStrategyInfo.getDefaultInstance();
}
}
/**
* .clarifai.api.TaskReviewManualStrategyInfo manual_strategy_info = 3;
*/
public Builder setManualStrategyInfo(com.clarifai.grpc.api.TaskReviewManualStrategyInfo value) {
if (manualStrategyInfoBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
strategyInfo_ = value;
onChanged();
} else {
manualStrategyInfoBuilder_.setMessage(value);
}
strategyInfoCase_ = 3;
return this;
}
/**
* .clarifai.api.TaskReviewManualStrategyInfo manual_strategy_info = 3;
*/
public Builder setManualStrategyInfo(
com.clarifai.grpc.api.TaskReviewManualStrategyInfo.Builder builderForValue) {
if (manualStrategyInfoBuilder_ == null) {
strategyInfo_ = builderForValue.build();
onChanged();
} else {
manualStrategyInfoBuilder_.setMessage(builderForValue.build());
}
strategyInfoCase_ = 3;
return this;
}
/**
* .clarifai.api.TaskReviewManualStrategyInfo manual_strategy_info = 3;
*/
public Builder mergeManualStrategyInfo(com.clarifai.grpc.api.TaskReviewManualStrategyInfo value) {
if (manualStrategyInfoBuilder_ == null) {
if (strategyInfoCase_ == 3 &&
strategyInfo_ != com.clarifai.grpc.api.TaskReviewManualStrategyInfo.getDefaultInstance()) {
strategyInfo_ = com.clarifai.grpc.api.TaskReviewManualStrategyInfo.newBuilder((com.clarifai.grpc.api.TaskReviewManualStrategyInfo) strategyInfo_)
.mergeFrom(value).buildPartial();
} else {
strategyInfo_ = value;
}
onChanged();
} else {
if (strategyInfoCase_ == 3) {
manualStrategyInfoBuilder_.mergeFrom(value);
} else {
manualStrategyInfoBuilder_.setMessage(value);
}
}
strategyInfoCase_ = 3;
return this;
}
/**
* .clarifai.api.TaskReviewManualStrategyInfo manual_strategy_info = 3;
*/
public Builder clearManualStrategyInfo() {
if (manualStrategyInfoBuilder_ == null) {
if (strategyInfoCase_ == 3) {
strategyInfoCase_ = 0;
strategyInfo_ = null;
onChanged();
}
} else {
if (strategyInfoCase_ == 3) {
strategyInfoCase_ = 0;
strategyInfo_ = null;
}
manualStrategyInfoBuilder_.clear();
}
return this;
}
/**
* .clarifai.api.TaskReviewManualStrategyInfo manual_strategy_info = 3;
*/
public com.clarifai.grpc.api.TaskReviewManualStrategyInfo.Builder getManualStrategyInfoBuilder() {
return getManualStrategyInfoFieldBuilder().getBuilder();
}
/**
* .clarifai.api.TaskReviewManualStrategyInfo manual_strategy_info = 3;
*/
@java.lang.Override
public com.clarifai.grpc.api.TaskReviewManualStrategyInfoOrBuilder getManualStrategyInfoOrBuilder() {
if ((strategyInfoCase_ == 3) && (manualStrategyInfoBuilder_ != null)) {
return manualStrategyInfoBuilder_.getMessageOrBuilder();
} else {
if (strategyInfoCase_ == 3) {
return (com.clarifai.grpc.api.TaskReviewManualStrategyInfo) strategyInfo_;
}
return com.clarifai.grpc.api.TaskReviewManualStrategyInfo.getDefaultInstance();
}
}
/**
* .clarifai.api.TaskReviewManualStrategyInfo manual_strategy_info = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.TaskReviewManualStrategyInfo, com.clarifai.grpc.api.TaskReviewManualStrategyInfo.Builder, com.clarifai.grpc.api.TaskReviewManualStrategyInfoOrBuilder>
getManualStrategyInfoFieldBuilder() {
if (manualStrategyInfoBuilder_ == null) {
if (!(strategyInfoCase_ == 3)) {
strategyInfo_ = com.clarifai.grpc.api.TaskReviewManualStrategyInfo.getDefaultInstance();
}
manualStrategyInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.TaskReviewManualStrategyInfo, com.clarifai.grpc.api.TaskReviewManualStrategyInfo.Builder, com.clarifai.grpc.api.TaskReviewManualStrategyInfoOrBuilder>(
(com.clarifai.grpc.api.TaskReviewManualStrategyInfo) strategyInfo_,
getParentForChildren(),
isClean());
strategyInfo_ = null;
}
strategyInfoCase_ = 3;
onChanged();;
return manualStrategyInfoBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.TaskReviewConsensusStrategyInfo, com.clarifai.grpc.api.TaskReviewConsensusStrategyInfo.Builder, com.clarifai.grpc.api.TaskReviewConsensusStrategyInfoOrBuilder> consensusStrategyInfoBuilder_;
/**
* .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 (consensusStrategyInfoBuilder_ == null) {
if (strategyInfoCase_ == 4) {
return (com.clarifai.grpc.api.TaskReviewConsensusStrategyInfo) strategyInfo_;
}
return com.clarifai.grpc.api.TaskReviewConsensusStrategyInfo.getDefaultInstance();
} else {
if (strategyInfoCase_ == 4) {
return consensusStrategyInfoBuilder_.getMessage();
}
return com.clarifai.grpc.api.TaskReviewConsensusStrategyInfo.getDefaultInstance();
}
}
/**
* .clarifai.api.TaskReviewConsensusStrategyInfo consensus_strategy_info = 4;
*/
public Builder setConsensusStrategyInfo(com.clarifai.grpc.api.TaskReviewConsensusStrategyInfo value) {
if (consensusStrategyInfoBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
strategyInfo_ = value;
onChanged();
} else {
consensusStrategyInfoBuilder_.setMessage(value);
}
strategyInfoCase_ = 4;
return this;
}
/**
* .clarifai.api.TaskReviewConsensusStrategyInfo consensus_strategy_info = 4;
*/
public Builder setConsensusStrategyInfo(
com.clarifai.grpc.api.TaskReviewConsensusStrategyInfo.Builder builderForValue) {
if (consensusStrategyInfoBuilder_ == null) {
strategyInfo_ = builderForValue.build();
onChanged();
} else {
consensusStrategyInfoBuilder_.setMessage(builderForValue.build());
}
strategyInfoCase_ = 4;
return this;
}
/**
* .clarifai.api.TaskReviewConsensusStrategyInfo consensus_strategy_info = 4;
*/
public Builder mergeConsensusStrategyInfo(com.clarifai.grpc.api.TaskReviewConsensusStrategyInfo value) {
if (consensusStrategyInfoBuilder_ == null) {
if (strategyInfoCase_ == 4 &&
strategyInfo_ != com.clarifai.grpc.api.TaskReviewConsensusStrategyInfo.getDefaultInstance()) {
strategyInfo_ = com.clarifai.grpc.api.TaskReviewConsensusStrategyInfo.newBuilder((com.clarifai.grpc.api.TaskReviewConsensusStrategyInfo) strategyInfo_)
.mergeFrom(value).buildPartial();
} else {
strategyInfo_ = value;
}
onChanged();
} else {
if (strategyInfoCase_ == 4) {
consensusStrategyInfoBuilder_.mergeFrom(value);
} else {
consensusStrategyInfoBuilder_.setMessage(value);
}
}
strategyInfoCase_ = 4;
return this;
}
/**
* .clarifai.api.TaskReviewConsensusStrategyInfo consensus_strategy_info = 4;
*/
public Builder clearConsensusStrategyInfo() {
if (consensusStrategyInfoBuilder_ == null) {
if (strategyInfoCase_ == 4) {
strategyInfoCase_ = 0;
strategyInfo_ = null;
onChanged();
}
} else {
if (strategyInfoCase_ == 4) {
strategyInfoCase_ = 0;
strategyInfo_ = null;
}
consensusStrategyInfoBuilder_.clear();
}
return this;
}
/**
* .clarifai.api.TaskReviewConsensusStrategyInfo consensus_strategy_info = 4;
*/
public com.clarifai.grpc.api.TaskReviewConsensusStrategyInfo.Builder getConsensusStrategyInfoBuilder() {
return getConsensusStrategyInfoFieldBuilder().getBuilder();
}
/**
* .clarifai.api.TaskReviewConsensusStrategyInfo consensus_strategy_info = 4;
*/
@java.lang.Override
public com.clarifai.grpc.api.TaskReviewConsensusStrategyInfoOrBuilder getConsensusStrategyInfoOrBuilder() {
if ((strategyInfoCase_ == 4) && (consensusStrategyInfoBuilder_ != null)) {
return consensusStrategyInfoBuilder_.getMessageOrBuilder();
} else {
if (strategyInfoCase_ == 4) {
return (com.clarifai.grpc.api.TaskReviewConsensusStrategyInfo) strategyInfo_;
}
return com.clarifai.grpc.api.TaskReviewConsensusStrategyInfo.getDefaultInstance();
}
}
/**
* .clarifai.api.TaskReviewConsensusStrategyInfo consensus_strategy_info = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.TaskReviewConsensusStrategyInfo, com.clarifai.grpc.api.TaskReviewConsensusStrategyInfo.Builder, com.clarifai.grpc.api.TaskReviewConsensusStrategyInfoOrBuilder>
getConsensusStrategyInfoFieldBuilder() {
if (consensusStrategyInfoBuilder_ == null) {
if (!(strategyInfoCase_ == 4)) {
strategyInfo_ = com.clarifai.grpc.api.TaskReviewConsensusStrategyInfo.getDefaultInstance();
}
consensusStrategyInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.TaskReviewConsensusStrategyInfo, com.clarifai.grpc.api.TaskReviewConsensusStrategyInfo.Builder, com.clarifai.grpc.api.TaskReviewConsensusStrategyInfoOrBuilder>(
(com.clarifai.grpc.api.TaskReviewConsensusStrategyInfo) strategyInfo_,
getParentForChildren(),
isClean());
strategyInfo_ = null;
}
strategyInfoCase_ = 4;
onChanged();;
return consensusStrategyInfoBuilder_;
}
@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.TaskReview)
}
// @@protoc_insertion_point(class_scope:clarifai.api.TaskReview)
private static final com.clarifai.grpc.api.TaskReview DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.clarifai.grpc.api.TaskReview();
}
public static com.clarifai.grpc.api.TaskReview getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public TaskReview parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new TaskReview(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.TaskReview getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}