All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.clarifai.grpc.api.TaskWorker 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;

/**
 * 
 * TaskWorker includes information about the workers that will work on this task.
 * 
* * Protobuf type {@code clarifai.api.TaskWorker} */ public final class TaskWorker extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:clarifai.api.TaskWorker) TaskWorkerOrBuilder { private static final long serialVersionUID = 0L; // Use TaskWorker.newBuilder() to construct. private TaskWorker(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private TaskWorker() { strategy_ = 0; userIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; users_ = java.util.Collections.emptyList(); workers_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new TaskWorker(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private TaskWorker( 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.TaskWorkerPartitionedStrategyInfo.Builder subBuilder = null; if (strategyInfoCase_ == 3) { subBuilder = ((com.clarifai.grpc.api.TaskWorkerPartitionedStrategyInfo) strategyInfo_).toBuilder(); } strategyInfo_ = input.readMessage(com.clarifai.grpc.api.TaskWorkerPartitionedStrategyInfo.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((com.clarifai.grpc.api.TaskWorkerPartitionedStrategyInfo) strategyInfo_); strategyInfo_ = subBuilder.buildPartial(); } strategyInfoCase_ = 3; break; } case 34: { 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; } case 58: { if (!((mutable_bitField0_ & 0x00000004) != 0)) { workers_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000004; } workers_.add( input.readMessage(com.clarifai.grpc.api.Worker.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_); } if (((mutable_bitField0_ & 0x00000004) != 0)) { workers_ = java.util.Collections.unmodifiableList(workers_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_TaskWorker_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_TaskWorker_fieldAccessorTable .ensureFieldAccessorsInitialized( com.clarifai.grpc.api.TaskWorker.class, com.clarifai.grpc.api.TaskWorker.Builder.class); } /** * Protobuf enum {@code clarifai.api.TaskWorker.TaskWorkerStrategy} */ public enum TaskWorkerStrategy implements com.google.protobuf.ProtocolMessageEnum { /** * WORKER_STRATEGY_NOT_SET = 0; */ WORKER_STRATEGY_NOT_SET(0), /** *
     * The inputs will be partitioned in several partitions.
     * Each worker will label one or more input partitions.
     * 
* * PARTITIONED = 2; */ PARTITIONED(2), /** *
     * Each worker will label all inputs from input source.
     * 
* * FULL = 3; */ FULL(3), UNRECOGNIZED(-1), ; /** * WORKER_STRATEGY_NOT_SET = 0; */ public static final int WORKER_STRATEGY_NOT_SET_VALUE = 0; /** *
     * The inputs will be partitioned in several partitions.
     * Each worker will label one or more input partitions.
     * 
* * PARTITIONED = 2; */ public static final int PARTITIONED_VALUE = 2; /** *
     * Each worker will label all inputs from input source.
     * 
* * FULL = 3; */ public static final int FULL_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 TaskWorkerStrategy 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 TaskWorkerStrategy forNumber(int value) { switch (value) { case 0: return WORKER_STRATEGY_NOT_SET; case 2: return PARTITIONED; case 3: return FULL; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< TaskWorkerStrategy> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public TaskWorkerStrategy findValueByNumber(int number) { return TaskWorkerStrategy.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.TaskWorker.getDescriptor().getEnumTypes().get(0); } private static final TaskWorkerStrategy[] VALUES = values(); public static TaskWorkerStrategy 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 TaskWorkerStrategy(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:clarifai.api.TaskWorker.TaskWorkerStrategy) } private int strategyInfoCase_ = 0; private java.lang.Object strategyInfo_; public enum StrategyInfoCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { PARTITIONED_STRATEGY_INFO(3), 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 PARTITIONED_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_; /** *
   * Worker strategy.
   * 
* * .clarifai.api.TaskWorker.TaskWorkerStrategy strategy = 1; * @return The enum numeric value on the wire for strategy. */ @java.lang.Override public int getStrategyValue() { return strategy_; } /** *
   * Worker strategy.
   * 
* * .clarifai.api.TaskWorker.TaskWorkerStrategy strategy = 1; * @return The strategy. */ @java.lang.Override public com.clarifai.grpc.api.TaskWorker.TaskWorkerStrategy getStrategy() { @SuppressWarnings("deprecation") com.clarifai.grpc.api.TaskWorker.TaskWorkerStrategy result = com.clarifai.grpc.api.TaskWorker.TaskWorkerStrategy.valueOf(strategy_); return result == null ? com.clarifai.grpc.api.TaskWorker.TaskWorkerStrategy.UNRECOGNIZED : result; } public static final int USER_IDS_FIELD_NUMBER = 2; private com.google.protobuf.LazyStringList userIds_; /** *
   * Who will work on this task.
   * DEPRECATED: Use workers.user.id instead.
   * 
* * repeated string user_ids = 2 [deprecated = true]; * @deprecated clarifai.api.TaskWorker.user_ids is deprecated. * See proto/clarifai/api/resources.proto;l=3132 * @return A list containing the userIds. */ @java.lang.Deprecated public com.google.protobuf.ProtocolStringList getUserIdsList() { return userIds_; } /** *
   * Who will work on this task.
   * DEPRECATED: Use workers.user.id instead.
   * 
* * repeated string user_ids = 2 [deprecated = true]; * @deprecated clarifai.api.TaskWorker.user_ids is deprecated. * See proto/clarifai/api/resources.proto;l=3132 * @return The count of userIds. */ @java.lang.Deprecated public int getUserIdsCount() { return userIds_.size(); } /** *
   * Who will work on this task.
   * DEPRECATED: Use workers.user.id instead.
   * 
* * repeated string user_ids = 2 [deprecated = true]; * @deprecated clarifai.api.TaskWorker.user_ids is deprecated. * See proto/clarifai/api/resources.proto;l=3132 * @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 work on this task.
   * DEPRECATED: Use workers.user.id instead.
   * 
* * repeated string user_ids = 2 [deprecated = true]; * @deprecated clarifai.api.TaskWorker.user_ids is deprecated. * See proto/clarifai/api/resources.proto;l=3132 * @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 = 4; private java.util.List users_; /** *
   * Users who will work on this task.
   * When the 'worker.users' field is additionally requested, then all user
   * info is filled for the workers. Otherwise, only the user 'id' is filled.
   * DEPRECATED: Use workers.user instead.
   * 
* * repeated .clarifai.api.User users = 4 [deprecated = true]; */ @java.lang.Override @java.lang.Deprecated public java.util.List getUsersList() { return users_; } /** *
   * Users who will work on this task.
   * When the 'worker.users' field is additionally requested, then all user
   * info is filled for the workers. Otherwise, only the user 'id' is filled.
   * DEPRECATED: Use workers.user instead.
   * 
* * repeated .clarifai.api.User users = 4 [deprecated = true]; */ @java.lang.Override @java.lang.Deprecated public java.util.List getUsersOrBuilderList() { return users_; } /** *
   * Users who will work on this task.
   * When the 'worker.users' field is additionally requested, then all user
   * info is filled for the workers. Otherwise, only the user 'id' is filled.
   * DEPRECATED: Use workers.user instead.
   * 
* * repeated .clarifai.api.User users = 4 [deprecated = true]; */ @java.lang.Override @java.lang.Deprecated public int getUsersCount() { return users_.size(); } /** *
   * Users who will work on this task.
   * When the 'worker.users' field is additionally requested, then all user
   * info is filled for the workers. Otherwise, only the user 'id' is filled.
   * DEPRECATED: Use workers.user instead.
   * 
* * repeated .clarifai.api.User users = 4 [deprecated = true]; */ @java.lang.Override @java.lang.Deprecated public com.clarifai.grpc.api.User getUsers(int index) { return users_.get(index); } /** *
   * Users who will work on this task.
   * When the 'worker.users' field is additionally requested, then all user
   * info is filled for the workers. Otherwise, only the user 'id' is filled.
   * DEPRECATED: Use workers.user instead.
   * 
* * repeated .clarifai.api.User users = 4 [deprecated = true]; */ @java.lang.Override @java.lang.Deprecated public com.clarifai.grpc.api.UserOrBuilder getUsersOrBuilder( int index) { return users_.get(index); } public static final int PARTITIONED_STRATEGY_INFO_FIELD_NUMBER = 3; /** * .clarifai.api.TaskWorkerPartitionedStrategyInfo partitioned_strategy_info = 3; * @return Whether the partitionedStrategyInfo field is set. */ @java.lang.Override public boolean hasPartitionedStrategyInfo() { return strategyInfoCase_ == 3; } /** * .clarifai.api.TaskWorkerPartitionedStrategyInfo partitioned_strategy_info = 3; * @return The partitionedStrategyInfo. */ @java.lang.Override public com.clarifai.grpc.api.TaskWorkerPartitionedStrategyInfo getPartitionedStrategyInfo() { if (strategyInfoCase_ == 3) { return (com.clarifai.grpc.api.TaskWorkerPartitionedStrategyInfo) strategyInfo_; } return com.clarifai.grpc.api.TaskWorkerPartitionedStrategyInfo.getDefaultInstance(); } /** * .clarifai.api.TaskWorkerPartitionedStrategyInfo partitioned_strategy_info = 3; */ @java.lang.Override public com.clarifai.grpc.api.TaskWorkerPartitionedStrategyInfoOrBuilder getPartitionedStrategyInfoOrBuilder() { if (strategyInfoCase_ == 3) { return (com.clarifai.grpc.api.TaskWorkerPartitionedStrategyInfo) strategyInfo_; } return com.clarifai.grpc.api.TaskWorkerPartitionedStrategyInfo.getDefaultInstance(); } public static final int WORKERS_FIELD_NUMBER = 7; private java.util.List workers_; /** *
   * Workers that will work on this task.
   * For Auto Annotation Tasks:
   *   the worker can be either a model or a workflow;
   *   currently only supports 1 worker.
   * For manual labeling Tasks:
   *   the workers can only be users;
   *   no limitation on number of workers.
   * 
* * repeated .clarifai.api.Worker workers = 7; */ @java.lang.Override public java.util.List getWorkersList() { return workers_; } /** *
   * Workers that will work on this task.
   * For Auto Annotation Tasks:
   *   the worker can be either a model or a workflow;
   *   currently only supports 1 worker.
   * For manual labeling Tasks:
   *   the workers can only be users;
   *   no limitation on number of workers.
   * 
* * repeated .clarifai.api.Worker workers = 7; */ @java.lang.Override public java.util.List getWorkersOrBuilderList() { return workers_; } /** *
   * Workers that will work on this task.
   * For Auto Annotation Tasks:
   *   the worker can be either a model or a workflow;
   *   currently only supports 1 worker.
   * For manual labeling Tasks:
   *   the workers can only be users;
   *   no limitation on number of workers.
   * 
* * repeated .clarifai.api.Worker workers = 7; */ @java.lang.Override public int getWorkersCount() { return workers_.size(); } /** *
   * Workers that will work on this task.
   * For Auto Annotation Tasks:
   *   the worker can be either a model or a workflow;
   *   currently only supports 1 worker.
   * For manual labeling Tasks:
   *   the workers can only be users;
   *   no limitation on number of workers.
   * 
* * repeated .clarifai.api.Worker workers = 7; */ @java.lang.Override public com.clarifai.grpc.api.Worker getWorkers(int index) { return workers_.get(index); } /** *
   * Workers that will work on this task.
   * For Auto Annotation Tasks:
   *   the worker can be either a model or a workflow;
   *   currently only supports 1 worker.
   * For manual labeling Tasks:
   *   the workers can only be users;
   *   no limitation on number of workers.
   * 
* * repeated .clarifai.api.Worker workers = 7; */ @java.lang.Override public com.clarifai.grpc.api.WorkerOrBuilder getWorkersOrBuilder( int index) { return workers_.get(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 (strategy_ != com.clarifai.grpc.api.TaskWorker.TaskWorkerStrategy.WORKER_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.TaskWorkerPartitionedStrategyInfo) strategyInfo_); } for (int i = 0; i < users_.size(); i++) { output.writeMessage(4, users_.get(i)); } for (int i = 0; i < workers_.size(); i++) { output.writeMessage(7, workers_.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.TaskWorker.TaskWorkerStrategy.WORKER_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.TaskWorkerPartitionedStrategyInfo) strategyInfo_); } for (int i = 0; i < users_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, users_.get(i)); } for (int i = 0; i < workers_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(7, workers_.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.TaskWorker)) { return super.equals(obj); } com.clarifai.grpc.api.TaskWorker other = (com.clarifai.grpc.api.TaskWorker) obj; if (strategy_ != other.strategy_) return false; if (!getUserIdsList() .equals(other.getUserIdsList())) return false; if (!getUsersList() .equals(other.getUsersList())) return false; if (!getWorkersList() .equals(other.getWorkersList())) return false; if (!getStrategyInfoCase().equals(other.getStrategyInfoCase())) return false; switch (strategyInfoCase_) { case 3: if (!getPartitionedStrategyInfo() .equals(other.getPartitionedStrategyInfo())) 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(); } if (getWorkersCount() > 0) { hash = (37 * hash) + WORKERS_FIELD_NUMBER; hash = (53 * hash) + getWorkersList().hashCode(); } switch (strategyInfoCase_) { case 3: hash = (37 * hash) + PARTITIONED_STRATEGY_INFO_FIELD_NUMBER; hash = (53 * hash) + getPartitionedStrategyInfo().hashCode(); break; case 0: default: } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.clarifai.grpc.api.TaskWorker parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.clarifai.grpc.api.TaskWorker 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.TaskWorker parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.clarifai.grpc.api.TaskWorker 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.TaskWorker parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.clarifai.grpc.api.TaskWorker parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.clarifai.grpc.api.TaskWorker parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.clarifai.grpc.api.TaskWorker 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.TaskWorker parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.clarifai.grpc.api.TaskWorker 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.TaskWorker parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.clarifai.grpc.api.TaskWorker 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.TaskWorker 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; } /** *
   * TaskWorker includes information about the workers that will work on this task.
   * 
* * Protobuf type {@code clarifai.api.TaskWorker} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:clarifai.api.TaskWorker) com.clarifai.grpc.api.TaskWorkerOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_TaskWorker_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_TaskWorker_fieldAccessorTable .ensureFieldAccessorsInitialized( com.clarifai.grpc.api.TaskWorker.class, com.clarifai.grpc.api.TaskWorker.Builder.class); } // Construct using com.clarifai.grpc.api.TaskWorker.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(); getWorkersFieldBuilder(); } } @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(); } if (workersBuilder_ == null) { workers_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000004); } else { workersBuilder_.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_TaskWorker_descriptor; } @java.lang.Override public com.clarifai.grpc.api.TaskWorker getDefaultInstanceForType() { return com.clarifai.grpc.api.TaskWorker.getDefaultInstance(); } @java.lang.Override public com.clarifai.grpc.api.TaskWorker build() { com.clarifai.grpc.api.TaskWorker result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.clarifai.grpc.api.TaskWorker buildPartial() { com.clarifai.grpc.api.TaskWorker result = new com.clarifai.grpc.api.TaskWorker(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 (partitionedStrategyInfoBuilder_ == null) { result.strategyInfo_ = strategyInfo_; } else { result.strategyInfo_ = partitionedStrategyInfoBuilder_.build(); } } if (workersBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0)) { workers_ = java.util.Collections.unmodifiableList(workers_); bitField0_ = (bitField0_ & ~0x00000004); } result.workers_ = workers_; } else { result.workers_ = workersBuilder_.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.TaskWorker) { return mergeFrom((com.clarifai.grpc.api.TaskWorker)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.clarifai.grpc.api.TaskWorker other) { if (other == com.clarifai.grpc.api.TaskWorker.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_); } } } if (workersBuilder_ == null) { if (!other.workers_.isEmpty()) { if (workers_.isEmpty()) { workers_ = other.workers_; bitField0_ = (bitField0_ & ~0x00000004); } else { ensureWorkersIsMutable(); workers_.addAll(other.workers_); } onChanged(); } } else { if (!other.workers_.isEmpty()) { if (workersBuilder_.isEmpty()) { workersBuilder_.dispose(); workersBuilder_ = null; workers_ = other.workers_; bitField0_ = (bitField0_ & ~0x00000004); workersBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getWorkersFieldBuilder() : null; } else { workersBuilder_.addAllMessages(other.workers_); } } } switch (other.getStrategyInfoCase()) { case PARTITIONED_STRATEGY_INFO: { mergePartitionedStrategyInfo(other.getPartitionedStrategyInfo()); 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.TaskWorker parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.clarifai.grpc.api.TaskWorker) 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; /** *
     * Worker strategy.
     * 
* * .clarifai.api.TaskWorker.TaskWorkerStrategy strategy = 1; * @return The enum numeric value on the wire for strategy. */ @java.lang.Override public int getStrategyValue() { return strategy_; } /** *
     * Worker strategy.
     * 
* * .clarifai.api.TaskWorker.TaskWorkerStrategy 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; } /** *
     * Worker strategy.
     * 
* * .clarifai.api.TaskWorker.TaskWorkerStrategy strategy = 1; * @return The strategy. */ @java.lang.Override public com.clarifai.grpc.api.TaskWorker.TaskWorkerStrategy getStrategy() { @SuppressWarnings("deprecation") com.clarifai.grpc.api.TaskWorker.TaskWorkerStrategy result = com.clarifai.grpc.api.TaskWorker.TaskWorkerStrategy.valueOf(strategy_); return result == null ? com.clarifai.grpc.api.TaskWorker.TaskWorkerStrategy.UNRECOGNIZED : result; } /** *
     * Worker strategy.
     * 
* * .clarifai.api.TaskWorker.TaskWorkerStrategy strategy = 1; * @param value The strategy to set. * @return This builder for chaining. */ public Builder setStrategy(com.clarifai.grpc.api.TaskWorker.TaskWorkerStrategy value) { if (value == null) { throw new NullPointerException(); } strategy_ = value.getNumber(); onChanged(); return this; } /** *
     * Worker strategy.
     * 
* * .clarifai.api.TaskWorker.TaskWorkerStrategy 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 work on this task.
     * DEPRECATED: Use workers.user.id instead.
     * 
* * repeated string user_ids = 2 [deprecated = true]; * @deprecated clarifai.api.TaskWorker.user_ids is deprecated. * See proto/clarifai/api/resources.proto;l=3132 * @return A list containing the userIds. */ @java.lang.Deprecated public com.google.protobuf.ProtocolStringList getUserIdsList() { return userIds_.getUnmodifiableView(); } /** *
     * Who will work on this task.
     * DEPRECATED: Use workers.user.id instead.
     * 
* * repeated string user_ids = 2 [deprecated = true]; * @deprecated clarifai.api.TaskWorker.user_ids is deprecated. * See proto/clarifai/api/resources.proto;l=3132 * @return The count of userIds. */ @java.lang.Deprecated public int getUserIdsCount() { return userIds_.size(); } /** *
     * Who will work on this task.
     * DEPRECATED: Use workers.user.id instead.
     * 
* * repeated string user_ids = 2 [deprecated = true]; * @deprecated clarifai.api.TaskWorker.user_ids is deprecated. * See proto/clarifai/api/resources.proto;l=3132 * @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 work on this task.
     * DEPRECATED: Use workers.user.id instead.
     * 
* * repeated string user_ids = 2 [deprecated = true]; * @deprecated clarifai.api.TaskWorker.user_ids is deprecated. * See proto/clarifai/api/resources.proto;l=3132 * @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 work on this task.
     * DEPRECATED: Use workers.user.id instead.
     * 
* * repeated string user_ids = 2 [deprecated = true]; * @deprecated clarifai.api.TaskWorker.user_ids is deprecated. * See proto/clarifai/api/resources.proto;l=3132 * @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 work on this task.
     * DEPRECATED: Use workers.user.id instead.
     * 
* * repeated string user_ids = 2 [deprecated = true]; * @deprecated clarifai.api.TaskWorker.user_ids is deprecated. * See proto/clarifai/api/resources.proto;l=3132 * @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 work on this task.
     * DEPRECATED: Use workers.user.id instead.
     * 
* * repeated string user_ids = 2 [deprecated = true]; * @deprecated clarifai.api.TaskWorker.user_ids is deprecated. * See proto/clarifai/api/resources.proto;l=3132 * @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 work on this task.
     * DEPRECATED: Use workers.user.id instead.
     * 
* * repeated string user_ids = 2 [deprecated = true]; * @deprecated clarifai.api.TaskWorker.user_ids is deprecated. * See proto/clarifai/api/resources.proto;l=3132 * @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 work on this task.
     * DEPRECATED: Use workers.user.id instead.
     * 
* * repeated string user_ids = 2 [deprecated = true]; * @deprecated clarifai.api.TaskWorker.user_ids is deprecated. * See proto/clarifai/api/resources.proto;l=3132 * @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 work on this task.
     * When the 'worker.users' field is additionally requested, then all user
     * info is filled for the workers. Otherwise, only the user 'id' is filled.
     * DEPRECATED: Use workers.user instead.
     * 
* * repeated .clarifai.api.User users = 4 [deprecated = true]; */ @java.lang.Deprecated public java.util.List getUsersList() { if (usersBuilder_ == null) { return java.util.Collections.unmodifiableList(users_); } else { return usersBuilder_.getMessageList(); } } /** *
     * Users who will work on this task.
     * When the 'worker.users' field is additionally requested, then all user
     * info is filled for the workers. Otherwise, only the user 'id' is filled.
     * DEPRECATED: Use workers.user instead.
     * 
* * repeated .clarifai.api.User users = 4 [deprecated = true]; */ @java.lang.Deprecated public int getUsersCount() { if (usersBuilder_ == null) { return users_.size(); } else { return usersBuilder_.getCount(); } } /** *
     * Users who will work on this task.
     * When the 'worker.users' field is additionally requested, then all user
     * info is filled for the workers. Otherwise, only the user 'id' is filled.
     * DEPRECATED: Use workers.user instead.
     * 
* * repeated .clarifai.api.User users = 4 [deprecated = true]; */ @java.lang.Deprecated public com.clarifai.grpc.api.User getUsers(int index) { if (usersBuilder_ == null) { return users_.get(index); } else { return usersBuilder_.getMessage(index); } } /** *
     * Users who will work on this task.
     * When the 'worker.users' field is additionally requested, then all user
     * info is filled for the workers. Otherwise, only the user 'id' is filled.
     * DEPRECATED: Use workers.user instead.
     * 
* * repeated .clarifai.api.User users = 4 [deprecated = true]; */ @java.lang.Deprecated 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 work on this task.
     * When the 'worker.users' field is additionally requested, then all user
     * info is filled for the workers. Otherwise, only the user 'id' is filled.
     * DEPRECATED: Use workers.user instead.
     * 
* * repeated .clarifai.api.User users = 4 [deprecated = true]; */ @java.lang.Deprecated 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 work on this task.
     * When the 'worker.users' field is additionally requested, then all user
     * info is filled for the workers. Otherwise, only the user 'id' is filled.
     * DEPRECATED: Use workers.user instead.
     * 
* * repeated .clarifai.api.User users = 4 [deprecated = true]; */ @java.lang.Deprecated 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 work on this task.
     * When the 'worker.users' field is additionally requested, then all user
     * info is filled for the workers. Otherwise, only the user 'id' is filled.
     * DEPRECATED: Use workers.user instead.
     * 
* * repeated .clarifai.api.User users = 4 [deprecated = true]; */ @java.lang.Deprecated 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 work on this task.
     * When the 'worker.users' field is additionally requested, then all user
     * info is filled for the workers. Otherwise, only the user 'id' is filled.
     * DEPRECATED: Use workers.user instead.
     * 
* * repeated .clarifai.api.User users = 4 [deprecated = true]; */ @java.lang.Deprecated 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 work on this task.
     * When the 'worker.users' field is additionally requested, then all user
     * info is filled for the workers. Otherwise, only the user 'id' is filled.
     * DEPRECATED: Use workers.user instead.
     * 
* * repeated .clarifai.api.User users = 4 [deprecated = true]; */ @java.lang.Deprecated 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 work on this task.
     * When the 'worker.users' field is additionally requested, then all user
     * info is filled for the workers. Otherwise, only the user 'id' is filled.
     * DEPRECATED: Use workers.user instead.
     * 
* * repeated .clarifai.api.User users = 4 [deprecated = true]; */ @java.lang.Deprecated public Builder addAllUsers( java.lang.Iterable values) { if (usersBuilder_ == null) { ensureUsersIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, users_); onChanged(); } else { usersBuilder_.addAllMessages(values); } return this; } /** *
     * Users who will work on this task.
     * When the 'worker.users' field is additionally requested, then all user
     * info is filled for the workers. Otherwise, only the user 'id' is filled.
     * DEPRECATED: Use workers.user instead.
     * 
* * repeated .clarifai.api.User users = 4 [deprecated = true]; */ @java.lang.Deprecated public Builder clearUsers() { if (usersBuilder_ == null) { users_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { usersBuilder_.clear(); } return this; } /** *
     * Users who will work on this task.
     * When the 'worker.users' field is additionally requested, then all user
     * info is filled for the workers. Otherwise, only the user 'id' is filled.
     * DEPRECATED: Use workers.user instead.
     * 
* * repeated .clarifai.api.User users = 4 [deprecated = true]; */ @java.lang.Deprecated public Builder removeUsers(int index) { if (usersBuilder_ == null) { ensureUsersIsMutable(); users_.remove(index); onChanged(); } else { usersBuilder_.remove(index); } return this; } /** *
     * Users who will work on this task.
     * When the 'worker.users' field is additionally requested, then all user
     * info is filled for the workers. Otherwise, only the user 'id' is filled.
     * DEPRECATED: Use workers.user instead.
     * 
* * repeated .clarifai.api.User users = 4 [deprecated = true]; */ @java.lang.Deprecated public com.clarifai.grpc.api.User.Builder getUsersBuilder( int index) { return getUsersFieldBuilder().getBuilder(index); } /** *
     * Users who will work on this task.
     * When the 'worker.users' field is additionally requested, then all user
     * info is filled for the workers. Otherwise, only the user 'id' is filled.
     * DEPRECATED: Use workers.user instead.
     * 
* * repeated .clarifai.api.User users = 4 [deprecated = true]; */ @java.lang.Deprecated public com.clarifai.grpc.api.UserOrBuilder getUsersOrBuilder( int index) { if (usersBuilder_ == null) { return users_.get(index); } else { return usersBuilder_.getMessageOrBuilder(index); } } /** *
     * Users who will work on this task.
     * When the 'worker.users' field is additionally requested, then all user
     * info is filled for the workers. Otherwise, only the user 'id' is filled.
     * DEPRECATED: Use workers.user instead.
     * 
* * repeated .clarifai.api.User users = 4 [deprecated = true]; */ @java.lang.Deprecated public java.util.List getUsersOrBuilderList() { if (usersBuilder_ != null) { return usersBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(users_); } } /** *
     * Users who will work on this task.
     * When the 'worker.users' field is additionally requested, then all user
     * info is filled for the workers. Otherwise, only the user 'id' is filled.
     * DEPRECATED: Use workers.user instead.
     * 
* * repeated .clarifai.api.User users = 4 [deprecated = true]; */ @java.lang.Deprecated public com.clarifai.grpc.api.User.Builder addUsersBuilder() { return getUsersFieldBuilder().addBuilder( com.clarifai.grpc.api.User.getDefaultInstance()); } /** *
     * Users who will work on this task.
     * When the 'worker.users' field is additionally requested, then all user
     * info is filled for the workers. Otherwise, only the user 'id' is filled.
     * DEPRECATED: Use workers.user instead.
     * 
* * repeated .clarifai.api.User users = 4 [deprecated = true]; */ @java.lang.Deprecated public com.clarifai.grpc.api.User.Builder addUsersBuilder( int index) { return getUsersFieldBuilder().addBuilder( index, com.clarifai.grpc.api.User.getDefaultInstance()); } /** *
     * Users who will work on this task.
     * When the 'worker.users' field is additionally requested, then all user
     * info is filled for the workers. Otherwise, only the user 'id' is filled.
     * DEPRECATED: Use workers.user instead.
     * 
* * repeated .clarifai.api.User users = 4 [deprecated = true]; */ @java.lang.Deprecated 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.TaskWorkerPartitionedStrategyInfo, com.clarifai.grpc.api.TaskWorkerPartitionedStrategyInfo.Builder, com.clarifai.grpc.api.TaskWorkerPartitionedStrategyInfoOrBuilder> partitionedStrategyInfoBuilder_; /** * .clarifai.api.TaskWorkerPartitionedStrategyInfo partitioned_strategy_info = 3; * @return Whether the partitionedStrategyInfo field is set. */ @java.lang.Override public boolean hasPartitionedStrategyInfo() { return strategyInfoCase_ == 3; } /** * .clarifai.api.TaskWorkerPartitionedStrategyInfo partitioned_strategy_info = 3; * @return The partitionedStrategyInfo. */ @java.lang.Override public com.clarifai.grpc.api.TaskWorkerPartitionedStrategyInfo getPartitionedStrategyInfo() { if (partitionedStrategyInfoBuilder_ == null) { if (strategyInfoCase_ == 3) { return (com.clarifai.grpc.api.TaskWorkerPartitionedStrategyInfo) strategyInfo_; } return com.clarifai.grpc.api.TaskWorkerPartitionedStrategyInfo.getDefaultInstance(); } else { if (strategyInfoCase_ == 3) { return partitionedStrategyInfoBuilder_.getMessage(); } return com.clarifai.grpc.api.TaskWorkerPartitionedStrategyInfo.getDefaultInstance(); } } /** * .clarifai.api.TaskWorkerPartitionedStrategyInfo partitioned_strategy_info = 3; */ public Builder setPartitionedStrategyInfo(com.clarifai.grpc.api.TaskWorkerPartitionedStrategyInfo value) { if (partitionedStrategyInfoBuilder_ == null) { if (value == null) { throw new NullPointerException(); } strategyInfo_ = value; onChanged(); } else { partitionedStrategyInfoBuilder_.setMessage(value); } strategyInfoCase_ = 3; return this; } /** * .clarifai.api.TaskWorkerPartitionedStrategyInfo partitioned_strategy_info = 3; */ public Builder setPartitionedStrategyInfo( com.clarifai.grpc.api.TaskWorkerPartitionedStrategyInfo.Builder builderForValue) { if (partitionedStrategyInfoBuilder_ == null) { strategyInfo_ = builderForValue.build(); onChanged(); } else { partitionedStrategyInfoBuilder_.setMessage(builderForValue.build()); } strategyInfoCase_ = 3; return this; } /** * .clarifai.api.TaskWorkerPartitionedStrategyInfo partitioned_strategy_info = 3; */ public Builder mergePartitionedStrategyInfo(com.clarifai.grpc.api.TaskWorkerPartitionedStrategyInfo value) { if (partitionedStrategyInfoBuilder_ == null) { if (strategyInfoCase_ == 3 && strategyInfo_ != com.clarifai.grpc.api.TaskWorkerPartitionedStrategyInfo.getDefaultInstance()) { strategyInfo_ = com.clarifai.grpc.api.TaskWorkerPartitionedStrategyInfo.newBuilder((com.clarifai.grpc.api.TaskWorkerPartitionedStrategyInfo) strategyInfo_) .mergeFrom(value).buildPartial(); } else { strategyInfo_ = value; } onChanged(); } else { if (strategyInfoCase_ == 3) { partitionedStrategyInfoBuilder_.mergeFrom(value); } else { partitionedStrategyInfoBuilder_.setMessage(value); } } strategyInfoCase_ = 3; return this; } /** * .clarifai.api.TaskWorkerPartitionedStrategyInfo partitioned_strategy_info = 3; */ public Builder clearPartitionedStrategyInfo() { if (partitionedStrategyInfoBuilder_ == null) { if (strategyInfoCase_ == 3) { strategyInfoCase_ = 0; strategyInfo_ = null; onChanged(); } } else { if (strategyInfoCase_ == 3) { strategyInfoCase_ = 0; strategyInfo_ = null; } partitionedStrategyInfoBuilder_.clear(); } return this; } /** * .clarifai.api.TaskWorkerPartitionedStrategyInfo partitioned_strategy_info = 3; */ public com.clarifai.grpc.api.TaskWorkerPartitionedStrategyInfo.Builder getPartitionedStrategyInfoBuilder() { return getPartitionedStrategyInfoFieldBuilder().getBuilder(); } /** * .clarifai.api.TaskWorkerPartitionedStrategyInfo partitioned_strategy_info = 3; */ @java.lang.Override public com.clarifai.grpc.api.TaskWorkerPartitionedStrategyInfoOrBuilder getPartitionedStrategyInfoOrBuilder() { if ((strategyInfoCase_ == 3) && (partitionedStrategyInfoBuilder_ != null)) { return partitionedStrategyInfoBuilder_.getMessageOrBuilder(); } else { if (strategyInfoCase_ == 3) { return (com.clarifai.grpc.api.TaskWorkerPartitionedStrategyInfo) strategyInfo_; } return com.clarifai.grpc.api.TaskWorkerPartitionedStrategyInfo.getDefaultInstance(); } } /** * .clarifai.api.TaskWorkerPartitionedStrategyInfo partitioned_strategy_info = 3; */ private com.google.protobuf.SingleFieldBuilderV3< com.clarifai.grpc.api.TaskWorkerPartitionedStrategyInfo, com.clarifai.grpc.api.TaskWorkerPartitionedStrategyInfo.Builder, com.clarifai.grpc.api.TaskWorkerPartitionedStrategyInfoOrBuilder> getPartitionedStrategyInfoFieldBuilder() { if (partitionedStrategyInfoBuilder_ == null) { if (!(strategyInfoCase_ == 3)) { strategyInfo_ = com.clarifai.grpc.api.TaskWorkerPartitionedStrategyInfo.getDefaultInstance(); } partitionedStrategyInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.clarifai.grpc.api.TaskWorkerPartitionedStrategyInfo, com.clarifai.grpc.api.TaskWorkerPartitionedStrategyInfo.Builder, com.clarifai.grpc.api.TaskWorkerPartitionedStrategyInfoOrBuilder>( (com.clarifai.grpc.api.TaskWorkerPartitionedStrategyInfo) strategyInfo_, getParentForChildren(), isClean()); strategyInfo_ = null; } strategyInfoCase_ = 3; onChanged();; return partitionedStrategyInfoBuilder_; } private java.util.List workers_ = java.util.Collections.emptyList(); private void ensureWorkersIsMutable() { if (!((bitField0_ & 0x00000004) != 0)) { workers_ = new java.util.ArrayList(workers_); bitField0_ |= 0x00000004; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.clarifai.grpc.api.Worker, com.clarifai.grpc.api.Worker.Builder, com.clarifai.grpc.api.WorkerOrBuilder> workersBuilder_; /** *
     * Workers that will work on this task.
     * For Auto Annotation Tasks:
     *   the worker can be either a model or a workflow;
     *   currently only supports 1 worker.
     * For manual labeling Tasks:
     *   the workers can only be users;
     *   no limitation on number of workers.
     * 
* * repeated .clarifai.api.Worker workers = 7; */ public java.util.List getWorkersList() { if (workersBuilder_ == null) { return java.util.Collections.unmodifiableList(workers_); } else { return workersBuilder_.getMessageList(); } } /** *
     * Workers that will work on this task.
     * For Auto Annotation Tasks:
     *   the worker can be either a model or a workflow;
     *   currently only supports 1 worker.
     * For manual labeling Tasks:
     *   the workers can only be users;
     *   no limitation on number of workers.
     * 
* * repeated .clarifai.api.Worker workers = 7; */ public int getWorkersCount() { if (workersBuilder_ == null) { return workers_.size(); } else { return workersBuilder_.getCount(); } } /** *
     * Workers that will work on this task.
     * For Auto Annotation Tasks:
     *   the worker can be either a model or a workflow;
     *   currently only supports 1 worker.
     * For manual labeling Tasks:
     *   the workers can only be users;
     *   no limitation on number of workers.
     * 
* * repeated .clarifai.api.Worker workers = 7; */ public com.clarifai.grpc.api.Worker getWorkers(int index) { if (workersBuilder_ == null) { return workers_.get(index); } else { return workersBuilder_.getMessage(index); } } /** *
     * Workers that will work on this task.
     * For Auto Annotation Tasks:
     *   the worker can be either a model or a workflow;
     *   currently only supports 1 worker.
     * For manual labeling Tasks:
     *   the workers can only be users;
     *   no limitation on number of workers.
     * 
* * repeated .clarifai.api.Worker workers = 7; */ public Builder setWorkers( int index, com.clarifai.grpc.api.Worker value) { if (workersBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureWorkersIsMutable(); workers_.set(index, value); onChanged(); } else { workersBuilder_.setMessage(index, value); } return this; } /** *
     * Workers that will work on this task.
     * For Auto Annotation Tasks:
     *   the worker can be either a model or a workflow;
     *   currently only supports 1 worker.
     * For manual labeling Tasks:
     *   the workers can only be users;
     *   no limitation on number of workers.
     * 
* * repeated .clarifai.api.Worker workers = 7; */ public Builder setWorkers( int index, com.clarifai.grpc.api.Worker.Builder builderForValue) { if (workersBuilder_ == null) { ensureWorkersIsMutable(); workers_.set(index, builderForValue.build()); onChanged(); } else { workersBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
     * Workers that will work on this task.
     * For Auto Annotation Tasks:
     *   the worker can be either a model or a workflow;
     *   currently only supports 1 worker.
     * For manual labeling Tasks:
     *   the workers can only be users;
     *   no limitation on number of workers.
     * 
* * repeated .clarifai.api.Worker workers = 7; */ public Builder addWorkers(com.clarifai.grpc.api.Worker value) { if (workersBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureWorkersIsMutable(); workers_.add(value); onChanged(); } else { workersBuilder_.addMessage(value); } return this; } /** *
     * Workers that will work on this task.
     * For Auto Annotation Tasks:
     *   the worker can be either a model or a workflow;
     *   currently only supports 1 worker.
     * For manual labeling Tasks:
     *   the workers can only be users;
     *   no limitation on number of workers.
     * 
* * repeated .clarifai.api.Worker workers = 7; */ public Builder addWorkers( int index, com.clarifai.grpc.api.Worker value) { if (workersBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureWorkersIsMutable(); workers_.add(index, value); onChanged(); } else { workersBuilder_.addMessage(index, value); } return this; } /** *
     * Workers that will work on this task.
     * For Auto Annotation Tasks:
     *   the worker can be either a model or a workflow;
     *   currently only supports 1 worker.
     * For manual labeling Tasks:
     *   the workers can only be users;
     *   no limitation on number of workers.
     * 
* * repeated .clarifai.api.Worker workers = 7; */ public Builder addWorkers( com.clarifai.grpc.api.Worker.Builder builderForValue) { if (workersBuilder_ == null) { ensureWorkersIsMutable(); workers_.add(builderForValue.build()); onChanged(); } else { workersBuilder_.addMessage(builderForValue.build()); } return this; } /** *
     * Workers that will work on this task.
     * For Auto Annotation Tasks:
     *   the worker can be either a model or a workflow;
     *   currently only supports 1 worker.
     * For manual labeling Tasks:
     *   the workers can only be users;
     *   no limitation on number of workers.
     * 
* * repeated .clarifai.api.Worker workers = 7; */ public Builder addWorkers( int index, com.clarifai.grpc.api.Worker.Builder builderForValue) { if (workersBuilder_ == null) { ensureWorkersIsMutable(); workers_.add(index, builderForValue.build()); onChanged(); } else { workersBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
     * Workers that will work on this task.
     * For Auto Annotation Tasks:
     *   the worker can be either a model or a workflow;
     *   currently only supports 1 worker.
     * For manual labeling Tasks:
     *   the workers can only be users;
     *   no limitation on number of workers.
     * 
* * repeated .clarifai.api.Worker workers = 7; */ public Builder addAllWorkers( java.lang.Iterable values) { if (workersBuilder_ == null) { ensureWorkersIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, workers_); onChanged(); } else { workersBuilder_.addAllMessages(values); } return this; } /** *
     * Workers that will work on this task.
     * For Auto Annotation Tasks:
     *   the worker can be either a model or a workflow;
     *   currently only supports 1 worker.
     * For manual labeling Tasks:
     *   the workers can only be users;
     *   no limitation on number of workers.
     * 
* * repeated .clarifai.api.Worker workers = 7; */ public Builder clearWorkers() { if (workersBuilder_ == null) { workers_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); } else { workersBuilder_.clear(); } return this; } /** *
     * Workers that will work on this task.
     * For Auto Annotation Tasks:
     *   the worker can be either a model or a workflow;
     *   currently only supports 1 worker.
     * For manual labeling Tasks:
     *   the workers can only be users;
     *   no limitation on number of workers.
     * 
* * repeated .clarifai.api.Worker workers = 7; */ public Builder removeWorkers(int index) { if (workersBuilder_ == null) { ensureWorkersIsMutable(); workers_.remove(index); onChanged(); } else { workersBuilder_.remove(index); } return this; } /** *
     * Workers that will work on this task.
     * For Auto Annotation Tasks:
     *   the worker can be either a model or a workflow;
     *   currently only supports 1 worker.
     * For manual labeling Tasks:
     *   the workers can only be users;
     *   no limitation on number of workers.
     * 
* * repeated .clarifai.api.Worker workers = 7; */ public com.clarifai.grpc.api.Worker.Builder getWorkersBuilder( int index) { return getWorkersFieldBuilder().getBuilder(index); } /** *
     * Workers that will work on this task.
     * For Auto Annotation Tasks:
     *   the worker can be either a model or a workflow;
     *   currently only supports 1 worker.
     * For manual labeling Tasks:
     *   the workers can only be users;
     *   no limitation on number of workers.
     * 
* * repeated .clarifai.api.Worker workers = 7; */ public com.clarifai.grpc.api.WorkerOrBuilder getWorkersOrBuilder( int index) { if (workersBuilder_ == null) { return workers_.get(index); } else { return workersBuilder_.getMessageOrBuilder(index); } } /** *
     * Workers that will work on this task.
     * For Auto Annotation Tasks:
     *   the worker can be either a model or a workflow;
     *   currently only supports 1 worker.
     * For manual labeling Tasks:
     *   the workers can only be users;
     *   no limitation on number of workers.
     * 
* * repeated .clarifai.api.Worker workers = 7; */ public java.util.List getWorkersOrBuilderList() { if (workersBuilder_ != null) { return workersBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(workers_); } } /** *
     * Workers that will work on this task.
     * For Auto Annotation Tasks:
     *   the worker can be either a model or a workflow;
     *   currently only supports 1 worker.
     * For manual labeling Tasks:
     *   the workers can only be users;
     *   no limitation on number of workers.
     * 
* * repeated .clarifai.api.Worker workers = 7; */ public com.clarifai.grpc.api.Worker.Builder addWorkersBuilder() { return getWorkersFieldBuilder().addBuilder( com.clarifai.grpc.api.Worker.getDefaultInstance()); } /** *
     * Workers that will work on this task.
     * For Auto Annotation Tasks:
     *   the worker can be either a model or a workflow;
     *   currently only supports 1 worker.
     * For manual labeling Tasks:
     *   the workers can only be users;
     *   no limitation on number of workers.
     * 
* * repeated .clarifai.api.Worker workers = 7; */ public com.clarifai.grpc.api.Worker.Builder addWorkersBuilder( int index) { return getWorkersFieldBuilder().addBuilder( index, com.clarifai.grpc.api.Worker.getDefaultInstance()); } /** *
     * Workers that will work on this task.
     * For Auto Annotation Tasks:
     *   the worker can be either a model or a workflow;
     *   currently only supports 1 worker.
     * For manual labeling Tasks:
     *   the workers can only be users;
     *   no limitation on number of workers.
     * 
* * repeated .clarifai.api.Worker workers = 7; */ public java.util.List getWorkersBuilderList() { return getWorkersFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.clarifai.grpc.api.Worker, com.clarifai.grpc.api.Worker.Builder, com.clarifai.grpc.api.WorkerOrBuilder> getWorkersFieldBuilder() { if (workersBuilder_ == null) { workersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.clarifai.grpc.api.Worker, com.clarifai.grpc.api.Worker.Builder, com.clarifai.grpc.api.WorkerOrBuilder>( workers_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); workers_ = null; } return workersBuilder_; } @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.TaskWorker) } // @@protoc_insertion_point(class_scope:clarifai.api.TaskWorker) private static final com.clarifai.grpc.api.TaskWorker DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.clarifai.grpc.api.TaskWorker(); } public static com.clarifai.grpc.api.TaskWorker getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public TaskWorker parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new TaskWorker(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.TaskWorker getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy