com.clarifai.grpc.api.Task 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;
/**
*
* Task is the work that needs to be done for labeling the inputs in an app.
*
*
* Protobuf type {@code clarifai.api.Task}
*/
public final class Task extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:clarifai.api.Task)
TaskOrBuilder {
private static final long serialVersionUID = 0L;
// Use Task.newBuilder() to construct.
private Task(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Task() {
id_ = "";
type_ = 0;
description_ = "";
conceptIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
name_ = "";
appId_ = "";
userId_ = "";
labelOrderId_ = "";
concepts_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Task();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Task(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
id_ = s;
break;
}
case 18: {
com.google.protobuf.Timestamp.Builder subBuilder = null;
if (createdAt_ != null) {
subBuilder = createdAt_.toBuilder();
}
createdAt_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(createdAt_);
createdAt_ = subBuilder.buildPartial();
}
break;
}
case 26: {
com.google.protobuf.Timestamp.Builder subBuilder = null;
if (modifiedAt_ != null) {
subBuilder = modifiedAt_.toBuilder();
}
modifiedAt_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(modifiedAt_);
modifiedAt_ = subBuilder.buildPartial();
}
break;
}
case 32: {
int rawValue = input.readEnum();
type_ = rawValue;
break;
}
case 42: {
java.lang.String s = input.readStringRequireUtf8();
description_ = s;
break;
}
case 50: {
com.clarifai.grpc.api.TaskWorker.Builder subBuilder = null;
if (worker_ != null) {
subBuilder = worker_.toBuilder();
}
worker_ = input.readMessage(com.clarifai.grpc.api.TaskWorker.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(worker_);
worker_ = subBuilder.buildPartial();
}
break;
}
case 58: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
conceptIds_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000001;
}
conceptIds_.add(s);
break;
}
case 66: {
com.clarifai.grpc.api.TaskInputSource.Builder subBuilder = null;
if (inputSource_ != null) {
subBuilder = inputSource_.toBuilder();
}
inputSource_ = input.readMessage(com.clarifai.grpc.api.TaskInputSource.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(inputSource_);
inputSource_ = subBuilder.buildPartial();
}
break;
}
case 72: {
sampleMs_ = input.readUInt32();
break;
}
case 82: {
com.clarifai.grpc.api.TaskAIAssistant.Builder subBuilder = null;
if (aiAssistant_ != null) {
subBuilder = aiAssistant_.toBuilder();
}
aiAssistant_ = input.readMessage(com.clarifai.grpc.api.TaskAIAssistant.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(aiAssistant_);
aiAssistant_ = subBuilder.buildPartial();
}
break;
}
case 90: {
com.clarifai.grpc.api.TaskReview.Builder subBuilder = null;
if (review_ != null) {
subBuilder = review_.toBuilder();
}
review_ = input.readMessage(com.clarifai.grpc.api.TaskReview.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(review_);
review_ = subBuilder.buildPartial();
}
break;
}
case 98: {
com.clarifai.grpc.api.status.Status.Builder subBuilder = null;
if (status_ != null) {
subBuilder = status_.toBuilder();
}
status_ = input.readMessage(com.clarifai.grpc.api.status.Status.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(status_);
status_ = subBuilder.buildPartial();
}
break;
}
case 106: {
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
case 114: {
com.clarifai.grpc.api.AiAssistParameters.Builder subBuilder = null;
if (aiAssistParams_ != null) {
subBuilder = aiAssistParams_.toBuilder();
}
aiAssistParams_ = input.readMessage(com.clarifai.grpc.api.AiAssistParameters.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(aiAssistParams_);
aiAssistParams_ = subBuilder.buildPartial();
}
break;
}
case 122: {
com.clarifai.grpc.api.Visibility.Builder subBuilder = null;
if (visibility_ != null) {
subBuilder = visibility_.toBuilder();
}
visibility_ = input.readMessage(com.clarifai.grpc.api.Visibility.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(visibility_);
visibility_ = subBuilder.buildPartial();
}
break;
}
case 130: {
java.lang.String s = input.readStringRequireUtf8();
appId_ = s;
break;
}
case 138: {
java.lang.String s = input.readStringRequireUtf8();
userId_ = s;
break;
}
case 146: {
java.lang.String s = input.readStringRequireUtf8();
labelOrderId_ = s;
break;
}
case 154: {
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
concepts_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
concepts_.add(
input.readMessage(com.clarifai.grpc.api.TaskConcept.parser(), extensionRegistry));
break;
}
case 160: {
deletePreviousAnnotations_ = input.readBool();
break;
}
case 170: {
com.clarifai.grpc.api.TaskMetrics.Builder subBuilder = null;
if (metrics_ != null) {
subBuilder = metrics_.toBuilder();
}
metrics_ = input.readMessage(com.clarifai.grpc.api.TaskMetrics.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(metrics_);
metrics_ = subBuilder.buildPartial();
}
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)) {
conceptIds_ = conceptIds_.getUnmodifiableView();
}
if (((mutable_bitField0_ & 0x00000002) != 0)) {
concepts_ = java.util.Collections.unmodifiableList(concepts_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Task_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Task_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.Task.class, com.clarifai.grpc.api.Task.Builder.class);
}
/**
* Protobuf enum {@code clarifai.api.Task.TaskType}
*/
public enum TaskType
implements com.google.protobuf.ProtocolMessageEnum {
/**
* TYPE_NOT_SET = 0;
*/
TYPE_NOT_SET(0),
/**
*
* Concepts classification tasks annotate concepts for the overall image, frame of video or section of text.
*
*
* CONCEPTS_CLASSIFICATION = 1;
*/
CONCEPTS_CLASSIFICATION(1),
/**
*
* Bounding box detection tasks annotate rectangular bounding box regions around each concept in an image, frame of video or section of text.
*
*
* BOUNDING_BOX_DETECTION = 2;
*/
BOUNDING_BOX_DETECTION(2),
/**
*
* Polygon detection tasks annotate free-form regions around concepts in an image, frame of video or section of text.
*
*
* POLYGON_DETECTION = 3;
*/
POLYGON_DETECTION(3),
UNRECOGNIZED(-1),
;
/**
* TYPE_NOT_SET = 0;
*/
public static final int TYPE_NOT_SET_VALUE = 0;
/**
*
* Concepts classification tasks annotate concepts for the overall image, frame of video or section of text.
*
*
* CONCEPTS_CLASSIFICATION = 1;
*/
public static final int CONCEPTS_CLASSIFICATION_VALUE = 1;
/**
*
* Bounding box detection tasks annotate rectangular bounding box regions around each concept in an image, frame of video or section of text.
*
*
* BOUNDING_BOX_DETECTION = 2;
*/
public static final int BOUNDING_BOX_DETECTION_VALUE = 2;
/**
*
* Polygon detection tasks annotate free-form regions around concepts in an image, frame of video or section of text.
*
*
* POLYGON_DETECTION = 3;
*/
public static final int POLYGON_DETECTION_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 TaskType 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 TaskType forNumber(int value) {
switch (value) {
case 0: return TYPE_NOT_SET;
case 1: return CONCEPTS_CLASSIFICATION;
case 2: return BOUNDING_BOX_DETECTION;
case 3: return POLYGON_DETECTION;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
TaskType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public TaskType findValueByNumber(int number) {
return TaskType.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.Task.getDescriptor().getEnumTypes().get(0);
}
private static final TaskType[] VALUES = values();
public static TaskType 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 TaskType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:clarifai.api.Task.TaskType)
}
public static final int ID_FIELD_NUMBER = 1;
private volatile java.lang.Object id_;
/**
*
* Unique ID for the task.
*
*
* string id = 1;
* @return The id.
*/
@java.lang.Override
public java.lang.String getId() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
}
}
/**
*
* Unique ID for the task.
*
*
* string id = 1;
* @return The bytes for id.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CREATED_AT_FIELD_NUMBER = 2;
private com.google.protobuf.Timestamp createdAt_;
/**
*
* When the task was created.
* The format is https://www.ietf.org/rfc/rfc3339.txt.
* Example: "2006-01-02T15:04:05.999999Z".
*
*
* .google.protobuf.Timestamp created_at = 2;
* @return Whether the createdAt field is set.
*/
@java.lang.Override
public boolean hasCreatedAt() {
return createdAt_ != null;
}
/**
*
* When the task was created.
* The format is https://www.ietf.org/rfc/rfc3339.txt.
* Example: "2006-01-02T15:04:05.999999Z".
*
*
* .google.protobuf.Timestamp created_at = 2;
* @return The createdAt.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getCreatedAt() {
return createdAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_;
}
/**
*
* When the task was created.
* The format is https://www.ietf.org/rfc/rfc3339.txt.
* Example: "2006-01-02T15:04:05.999999Z".
*
*
* .google.protobuf.Timestamp created_at = 2;
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getCreatedAtOrBuilder() {
return getCreatedAt();
}
public static final int MODIFIED_AT_FIELD_NUMBER = 3;
private com.google.protobuf.Timestamp modifiedAt_;
/**
*
* Most recent time when the task was updated.
* The format is https://www.ietf.org/rfc/rfc3339.txt.
* Example: "2006-01-02T15:04:05.999999Z".
*
*
* .google.protobuf.Timestamp modified_at = 3;
* @return Whether the modifiedAt field is set.
*/
@java.lang.Override
public boolean hasModifiedAt() {
return modifiedAt_ != null;
}
/**
*
* Most recent time when the task was updated.
* The format is https://www.ietf.org/rfc/rfc3339.txt.
* Example: "2006-01-02T15:04:05.999999Z".
*
*
* .google.protobuf.Timestamp modified_at = 3;
* @return The modifiedAt.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getModifiedAt() {
return modifiedAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : modifiedAt_;
}
/**
*
* Most recent time when the task was updated.
* The format is https://www.ietf.org/rfc/rfc3339.txt.
* Example: "2006-01-02T15:04:05.999999Z".
*
*
* .google.protobuf.Timestamp modified_at = 3;
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getModifiedAtOrBuilder() {
return getModifiedAt();
}
public static final int TYPE_FIELD_NUMBER = 4;
private int type_;
/**
*
* Task type.
*
*
* .clarifai.api.Task.TaskType type = 4;
* @return The enum numeric value on the wire for type.
*/
@java.lang.Override public int getTypeValue() {
return type_;
}
/**
*
* Task type.
*
*
* .clarifai.api.Task.TaskType type = 4;
* @return The type.
*/
@java.lang.Override public com.clarifai.grpc.api.Task.TaskType getType() {
@SuppressWarnings("deprecation")
com.clarifai.grpc.api.Task.TaskType result = com.clarifai.grpc.api.Task.TaskType.valueOf(type_);
return result == null ? com.clarifai.grpc.api.Task.TaskType.UNRECOGNIZED : result;
}
public static final int DESCRIPTION_FIELD_NUMBER = 5;
private volatile java.lang.Object description_;
/**
*
* Description of the task.
*
*
* string description = 5;
* @return The description.
*/
@java.lang.Override
public java.lang.String getDescription() {
java.lang.Object ref = description_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
description_ = s;
return s;
}
}
/**
*
* Description of the task.
*
*
* string description = 5;
* @return The bytes for description.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int WORKER_FIELD_NUMBER = 6;
private com.clarifai.grpc.api.TaskWorker worker_;
/**
*
* Worker details.
*
*
* .clarifai.api.TaskWorker worker = 6;
* @return Whether the worker field is set.
*/
@java.lang.Override
public boolean hasWorker() {
return worker_ != null;
}
/**
*
* Worker details.
*
*
* .clarifai.api.TaskWorker worker = 6;
* @return The worker.
*/
@java.lang.Override
public com.clarifai.grpc.api.TaskWorker getWorker() {
return worker_ == null ? com.clarifai.grpc.api.TaskWorker.getDefaultInstance() : worker_;
}
/**
*
* Worker details.
*
*
* .clarifai.api.TaskWorker worker = 6;
*/
@java.lang.Override
public com.clarifai.grpc.api.TaskWorkerOrBuilder getWorkerOrBuilder() {
return getWorker();
}
public static final int CONCEPT_IDS_FIELD_NUMBER = 7;
private com.google.protobuf.LazyStringList conceptIds_;
/**
*
* List of concept ids used in the work of this task.
* DEPRECATED: Use task.concepts instead.
*
*
* repeated string concept_ids = 7 [deprecated = true];
* @deprecated clarifai.api.Task.concept_ids is deprecated.
* See proto/clarifai/api/resources.proto;l=3057
* @return A list containing the conceptIds.
*/
@java.lang.Deprecated public com.google.protobuf.ProtocolStringList
getConceptIdsList() {
return conceptIds_;
}
/**
*
* List of concept ids used in the work of this task.
* DEPRECATED: Use task.concepts instead.
*
*
* repeated string concept_ids = 7 [deprecated = true];
* @deprecated clarifai.api.Task.concept_ids is deprecated.
* See proto/clarifai/api/resources.proto;l=3057
* @return The count of conceptIds.
*/
@java.lang.Deprecated public int getConceptIdsCount() {
return conceptIds_.size();
}
/**
*
* List of concept ids used in the work of this task.
* DEPRECATED: Use task.concepts instead.
*
*
* repeated string concept_ids = 7 [deprecated = true];
* @deprecated clarifai.api.Task.concept_ids is deprecated.
* See proto/clarifai/api/resources.proto;l=3057
* @param index The index of the element to return.
* @return The conceptIds at the given index.
*/
@java.lang.Deprecated public java.lang.String getConceptIds(int index) {
return conceptIds_.get(index);
}
/**
*
* List of concept ids used in the work of this task.
* DEPRECATED: Use task.concepts instead.
*
*
* repeated string concept_ids = 7 [deprecated = true];
* @deprecated clarifai.api.Task.concept_ids is deprecated.
* See proto/clarifai/api/resources.proto;l=3057
* @param index The index of the value to return.
* @return The bytes of the conceptIds at the given index.
*/
@java.lang.Deprecated public com.google.protobuf.ByteString
getConceptIdsBytes(int index) {
return conceptIds_.getByteString(index);
}
public static final int INPUT_SOURCE_FIELD_NUMBER = 8;
private com.clarifai.grpc.api.TaskInputSource inputSource_;
/**
*
* List of inputs used in this task will be taken from this source.
*
*
* .clarifai.api.TaskInputSource input_source = 8;
* @return Whether the inputSource field is set.
*/
@java.lang.Override
public boolean hasInputSource() {
return inputSource_ != null;
}
/**
*
* List of inputs used in this task will be taken from this source.
*
*
* .clarifai.api.TaskInputSource input_source = 8;
* @return The inputSource.
*/
@java.lang.Override
public com.clarifai.grpc.api.TaskInputSource getInputSource() {
return inputSource_ == null ? com.clarifai.grpc.api.TaskInputSource.getDefaultInstance() : inputSource_;
}
/**
*
* List of inputs used in this task will be taken from this source.
*
*
* .clarifai.api.TaskInputSource input_source = 8;
*/
@java.lang.Override
public com.clarifai.grpc.api.TaskInputSourceOrBuilder getInputSourceOrBuilder() {
return getInputSource();
}
public static final int SAMPLE_MS_FIELD_NUMBER = 9;
private int sampleMs_;
/**
*
* For model predictions on video: Sample delay for video predicting (1 frame per N milliseconds)
*
*
* uint32 sample_ms = 9;
* @return The sampleMs.
*/
@java.lang.Override
public int getSampleMs() {
return sampleMs_;
}
public static final int AI_ASSISTANT_FIELD_NUMBER = 10;
private com.clarifai.grpc.api.TaskAIAssistant aiAssistant_;
/**
*
* AI assistant details.
*
*
* .clarifai.api.TaskAIAssistant ai_assistant = 10;
* @return Whether the aiAssistant field is set.
*/
@java.lang.Override
public boolean hasAiAssistant() {
return aiAssistant_ != null;
}
/**
*
* AI assistant details.
*
*
* .clarifai.api.TaskAIAssistant ai_assistant = 10;
* @return The aiAssistant.
*/
@java.lang.Override
public com.clarifai.grpc.api.TaskAIAssistant getAiAssistant() {
return aiAssistant_ == null ? com.clarifai.grpc.api.TaskAIAssistant.getDefaultInstance() : aiAssistant_;
}
/**
*
* AI assistant details.
*
*
* .clarifai.api.TaskAIAssistant ai_assistant = 10;
*/
@java.lang.Override
public com.clarifai.grpc.api.TaskAIAssistantOrBuilder getAiAssistantOrBuilder() {
return getAiAssistant();
}
public static final int REVIEW_FIELD_NUMBER = 11;
private com.clarifai.grpc.api.TaskReview review_;
/**
*
* Review details.
*
*
* .clarifai.api.TaskReview review = 11;
* @return Whether the review field is set.
*/
@java.lang.Override
public boolean hasReview() {
return review_ != null;
}
/**
*
* Review details.
*
*
* .clarifai.api.TaskReview review = 11;
* @return The review.
*/
@java.lang.Override
public com.clarifai.grpc.api.TaskReview getReview() {
return review_ == null ? com.clarifai.grpc.api.TaskReview.getDefaultInstance() : review_;
}
/**
*
* Review details.
*
*
* .clarifai.api.TaskReview review = 11;
*/
@java.lang.Override
public com.clarifai.grpc.api.TaskReviewOrBuilder getReviewOrBuilder() {
return getReview();
}
public static final int STATUS_FIELD_NUMBER = 12;
private com.clarifai.grpc.api.status.Status status_;
/**
*
* Status of this task.
*
*
* .clarifai.api.status.Status status = 12;
* @return Whether the status field is set.
*/
@java.lang.Override
public boolean hasStatus() {
return status_ != null;
}
/**
*
* Status of this task.
*
*
* .clarifai.api.status.Status status = 12;
* @return The status.
*/
@java.lang.Override
public com.clarifai.grpc.api.status.Status getStatus() {
return status_ == null ? com.clarifai.grpc.api.status.Status.getDefaultInstance() : status_;
}
/**
*
* Status of this task.
*
*
* .clarifai.api.status.Status status = 12;
*/
@java.lang.Override
public com.clarifai.grpc.api.status.StatusOrBuilder getStatusOrBuilder() {
return getStatus();
}
public static final int NAME_FIELD_NUMBER = 13;
private volatile java.lang.Object name_;
/**
*
* Add a title for this task to quickly recognise it in a list of tasks.
*
*
* string name = 13;
* @return The name.
*/
@java.lang.Override
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
}
}
/**
*
* Add a title for this task to quickly recognise it in a list of tasks.
*
*
* string name = 13;
* @return The bytes for name.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int AI_ASSIST_PARAMS_FIELD_NUMBER = 14;
private com.clarifai.grpc.api.AiAssistParameters aiAssistParams_;
/**
* .clarifai.api.AiAssistParameters ai_assist_params = 14;
* @return Whether the aiAssistParams field is set.
*/
@java.lang.Override
public boolean hasAiAssistParams() {
return aiAssistParams_ != null;
}
/**
* .clarifai.api.AiAssistParameters ai_assist_params = 14;
* @return The aiAssistParams.
*/
@java.lang.Override
public com.clarifai.grpc.api.AiAssistParameters getAiAssistParams() {
return aiAssistParams_ == null ? com.clarifai.grpc.api.AiAssistParameters.getDefaultInstance() : aiAssistParams_;
}
/**
* .clarifai.api.AiAssistParameters ai_assist_params = 14;
*/
@java.lang.Override
public com.clarifai.grpc.api.AiAssistParametersOrBuilder getAiAssistParamsOrBuilder() {
return getAiAssistParams();
}
public static final int VISIBILITY_FIELD_NUMBER = 15;
private com.clarifai.grpc.api.Visibility visibility_;
/**
*
* The visibility field represents whether this message is privately/publicly visible.
* To be visible to the public the App that contains it AND the User that contains the App must
* also be publicly visible.
*
*
* .clarifai.api.Visibility visibility = 15;
* @return Whether the visibility field is set.
*/
@java.lang.Override
public boolean hasVisibility() {
return visibility_ != null;
}
/**
*
* The visibility field represents whether this message is privately/publicly visible.
* To be visible to the public the App that contains it AND the User that contains the App must
* also be publicly visible.
*
*
* .clarifai.api.Visibility visibility = 15;
* @return The visibility.
*/
@java.lang.Override
public com.clarifai.grpc.api.Visibility getVisibility() {
return visibility_ == null ? com.clarifai.grpc.api.Visibility.getDefaultInstance() : visibility_;
}
/**
*
* The visibility field represents whether this message is privately/publicly visible.
* To be visible to the public the App that contains it AND the User that contains the App must
* also be publicly visible.
*
*
* .clarifai.api.Visibility visibility = 15;
*/
@java.lang.Override
public com.clarifai.grpc.api.VisibilityOrBuilder getVisibilityOrBuilder() {
return getVisibility();
}
public static final int APP_ID_FIELD_NUMBER = 16;
private volatile java.lang.Object appId_;
/**
*
* The app the task belongs to.
*
*
* string app_id = 16;
* @return The appId.
*/
@java.lang.Override
public java.lang.String getAppId() {
java.lang.Object ref = appId_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
appId_ = s;
return s;
}
}
/**
*
* The app the task belongs to.
*
*
* string app_id = 16;
* @return The bytes for appId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getAppIdBytes() {
java.lang.Object ref = appId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
appId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int USER_ID_FIELD_NUMBER = 17;
private volatile java.lang.Object userId_;
/**
*
* The user the task belongs to.
*
*
* string user_id = 17;
* @return The userId.
*/
@java.lang.Override
public java.lang.String getUserId() {
java.lang.Object ref = userId_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
userId_ = s;
return s;
}
}
/**
*
* The user the task belongs to.
*
*
* string user_id = 17;
* @return The bytes for userId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getUserIdBytes() {
java.lang.Object ref = userId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
userId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int LABEL_ORDER_ID_FIELD_NUMBER = 18;
private volatile java.lang.Object labelOrderId_;
/**
*
* The label order the task belongs to.
*
*
* string label_order_id = 18;
* @return The labelOrderId.
*/
@java.lang.Override
public java.lang.String getLabelOrderId() {
java.lang.Object ref = labelOrderId_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
labelOrderId_ = s;
return s;
}
}
/**
*
* The label order the task belongs to.
*
*
* string label_order_id = 18;
* @return The bytes for labelOrderId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getLabelOrderIdBytes() {
java.lang.Object ref = labelOrderId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
labelOrderId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CONCEPTS_FIELD_NUMBER = 19;
private java.util.List concepts_;
/**
*
* Ignore Task.concept_ids field if Task.TaskConcept are supplied.
*
*
* repeated .clarifai.api.TaskConcept concepts = 19;
*/
@java.lang.Override
public java.util.List getConceptsList() {
return concepts_;
}
/**
*
* Ignore Task.concept_ids field if Task.TaskConcept are supplied.
*
*
* repeated .clarifai.api.TaskConcept concepts = 19;
*/
@java.lang.Override
public java.util.List extends com.clarifai.grpc.api.TaskConceptOrBuilder>
getConceptsOrBuilderList() {
return concepts_;
}
/**
*
* Ignore Task.concept_ids field if Task.TaskConcept are supplied.
*
*
* repeated .clarifai.api.TaskConcept concepts = 19;
*/
@java.lang.Override
public int getConceptsCount() {
return concepts_.size();
}
/**
*
* Ignore Task.concept_ids field if Task.TaskConcept are supplied.
*
*
* repeated .clarifai.api.TaskConcept concepts = 19;
*/
@java.lang.Override
public com.clarifai.grpc.api.TaskConcept getConcepts(int index) {
return concepts_.get(index);
}
/**
*
* Ignore Task.concept_ids field if Task.TaskConcept are supplied.
*
*
* repeated .clarifai.api.TaskConcept concepts = 19;
*/
@java.lang.Override
public com.clarifai.grpc.api.TaskConceptOrBuilder getConceptsOrBuilder(
int index) {
return concepts_.get(index);
}
public static final int DELETE_PREVIOUS_ANNOTATIONS_FIELD_NUMBER = 20;
private boolean deletePreviousAnnotations_;
/**
*
* Specify whether existing Annotations within the same app that are generated by other auto annotation tasks
* with the specified Concept from the selected Model or Workflow should deleted before executing the Task
*
*
* bool delete_previous_annotations = 20;
* @return The deletePreviousAnnotations.
*/
@java.lang.Override
public boolean getDeletePreviousAnnotations() {
return deletePreviousAnnotations_;
}
public static final int METRICS_FIELD_NUMBER = 21;
private com.clarifai.grpc.api.TaskMetrics metrics_;
/**
*
* Tasks metrics are filled in upon user-request.
*
*
* .clarifai.api.TaskMetrics metrics = 21;
* @return Whether the metrics field is set.
*/
@java.lang.Override
public boolean hasMetrics() {
return metrics_ != null;
}
/**
*
* Tasks metrics are filled in upon user-request.
*
*
* .clarifai.api.TaskMetrics metrics = 21;
* @return The metrics.
*/
@java.lang.Override
public com.clarifai.grpc.api.TaskMetrics getMetrics() {
return metrics_ == null ? com.clarifai.grpc.api.TaskMetrics.getDefaultInstance() : metrics_;
}
/**
*
* Tasks metrics are filled in upon user-request.
*
*
* .clarifai.api.TaskMetrics metrics = 21;
*/
@java.lang.Override
public com.clarifai.grpc.api.TaskMetricsOrBuilder getMetricsOrBuilder() {
return getMetrics();
}
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
}
if (createdAt_ != null) {
output.writeMessage(2, getCreatedAt());
}
if (modifiedAt_ != null) {
output.writeMessage(3, getModifiedAt());
}
if (type_ != com.clarifai.grpc.api.Task.TaskType.TYPE_NOT_SET.getNumber()) {
output.writeEnum(4, type_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, description_);
}
if (worker_ != null) {
output.writeMessage(6, getWorker());
}
for (int i = 0; i < conceptIds_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, conceptIds_.getRaw(i));
}
if (inputSource_ != null) {
output.writeMessage(8, getInputSource());
}
if (sampleMs_ != 0) {
output.writeUInt32(9, sampleMs_);
}
if (aiAssistant_ != null) {
output.writeMessage(10, getAiAssistant());
}
if (review_ != null) {
output.writeMessage(11, getReview());
}
if (status_ != null) {
output.writeMessage(12, getStatus());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 13, name_);
}
if (aiAssistParams_ != null) {
output.writeMessage(14, getAiAssistParams());
}
if (visibility_ != null) {
output.writeMessage(15, getVisibility());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 16, appId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 17, userId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(labelOrderId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 18, labelOrderId_);
}
for (int i = 0; i < concepts_.size(); i++) {
output.writeMessage(19, concepts_.get(i));
}
if (deletePreviousAnnotations_ != false) {
output.writeBool(20, deletePreviousAnnotations_);
}
if (metrics_ != null) {
output.writeMessage(21, getMetrics());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
}
if (createdAt_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getCreatedAt());
}
if (modifiedAt_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getModifiedAt());
}
if (type_ != com.clarifai.grpc.api.Task.TaskType.TYPE_NOT_SET.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(4, type_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, description_);
}
if (worker_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, getWorker());
}
{
int dataSize = 0;
for (int i = 0; i < conceptIds_.size(); i++) {
dataSize += computeStringSizeNoTag(conceptIds_.getRaw(i));
}
size += dataSize;
size += 1 * getConceptIdsList().size();
}
if (inputSource_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(8, getInputSource());
}
if (sampleMs_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(9, sampleMs_);
}
if (aiAssistant_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(10, getAiAssistant());
}
if (review_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(11, getReview());
}
if (status_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(12, getStatus());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, name_);
}
if (aiAssistParams_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(14, getAiAssistParams());
}
if (visibility_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(15, getVisibility());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, appId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, userId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(labelOrderId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(18, labelOrderId_);
}
for (int i = 0; i < concepts_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(19, concepts_.get(i));
}
if (deletePreviousAnnotations_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(20, deletePreviousAnnotations_);
}
if (metrics_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(21, getMetrics());
}
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.Task)) {
return super.equals(obj);
}
com.clarifai.grpc.api.Task other = (com.clarifai.grpc.api.Task) obj;
if (!getId()
.equals(other.getId())) return false;
if (hasCreatedAt() != other.hasCreatedAt()) return false;
if (hasCreatedAt()) {
if (!getCreatedAt()
.equals(other.getCreatedAt())) return false;
}
if (hasModifiedAt() != other.hasModifiedAt()) return false;
if (hasModifiedAt()) {
if (!getModifiedAt()
.equals(other.getModifiedAt())) return false;
}
if (type_ != other.type_) return false;
if (!getDescription()
.equals(other.getDescription())) return false;
if (hasWorker() != other.hasWorker()) return false;
if (hasWorker()) {
if (!getWorker()
.equals(other.getWorker())) return false;
}
if (!getConceptIdsList()
.equals(other.getConceptIdsList())) return false;
if (hasInputSource() != other.hasInputSource()) return false;
if (hasInputSource()) {
if (!getInputSource()
.equals(other.getInputSource())) return false;
}
if (getSampleMs()
!= other.getSampleMs()) return false;
if (hasAiAssistant() != other.hasAiAssistant()) return false;
if (hasAiAssistant()) {
if (!getAiAssistant()
.equals(other.getAiAssistant())) return false;
}
if (hasReview() != other.hasReview()) return false;
if (hasReview()) {
if (!getReview()
.equals(other.getReview())) return false;
}
if (hasStatus() != other.hasStatus()) return false;
if (hasStatus()) {
if (!getStatus()
.equals(other.getStatus())) return false;
}
if (!getName()
.equals(other.getName())) return false;
if (hasAiAssistParams() != other.hasAiAssistParams()) return false;
if (hasAiAssistParams()) {
if (!getAiAssistParams()
.equals(other.getAiAssistParams())) return false;
}
if (hasVisibility() != other.hasVisibility()) return false;
if (hasVisibility()) {
if (!getVisibility()
.equals(other.getVisibility())) return false;
}
if (!getAppId()
.equals(other.getAppId())) return false;
if (!getUserId()
.equals(other.getUserId())) return false;
if (!getLabelOrderId()
.equals(other.getLabelOrderId())) return false;
if (!getConceptsList()
.equals(other.getConceptsList())) return false;
if (getDeletePreviousAnnotations()
!= other.getDeletePreviousAnnotations()) return false;
if (hasMetrics() != other.hasMetrics()) return false;
if (hasMetrics()) {
if (!getMetrics()
.equals(other.getMetrics())) return false;
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + getId().hashCode();
if (hasCreatedAt()) {
hash = (37 * hash) + CREATED_AT_FIELD_NUMBER;
hash = (53 * hash) + getCreatedAt().hashCode();
}
if (hasModifiedAt()) {
hash = (37 * hash) + MODIFIED_AT_FIELD_NUMBER;
hash = (53 * hash) + getModifiedAt().hashCode();
}
hash = (37 * hash) + TYPE_FIELD_NUMBER;
hash = (53 * hash) + type_;
hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
if (hasWorker()) {
hash = (37 * hash) + WORKER_FIELD_NUMBER;
hash = (53 * hash) + getWorker().hashCode();
}
if (getConceptIdsCount() > 0) {
hash = (37 * hash) + CONCEPT_IDS_FIELD_NUMBER;
hash = (53 * hash) + getConceptIdsList().hashCode();
}
if (hasInputSource()) {
hash = (37 * hash) + INPUT_SOURCE_FIELD_NUMBER;
hash = (53 * hash) + getInputSource().hashCode();
}
hash = (37 * hash) + SAMPLE_MS_FIELD_NUMBER;
hash = (53 * hash) + getSampleMs();
if (hasAiAssistant()) {
hash = (37 * hash) + AI_ASSISTANT_FIELD_NUMBER;
hash = (53 * hash) + getAiAssistant().hashCode();
}
if (hasReview()) {
hash = (37 * hash) + REVIEW_FIELD_NUMBER;
hash = (53 * hash) + getReview().hashCode();
}
if (hasStatus()) {
hash = (37 * hash) + STATUS_FIELD_NUMBER;
hash = (53 * hash) + getStatus().hashCode();
}
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
if (hasAiAssistParams()) {
hash = (37 * hash) + AI_ASSIST_PARAMS_FIELD_NUMBER;
hash = (53 * hash) + getAiAssistParams().hashCode();
}
if (hasVisibility()) {
hash = (37 * hash) + VISIBILITY_FIELD_NUMBER;
hash = (53 * hash) + getVisibility().hashCode();
}
hash = (37 * hash) + APP_ID_FIELD_NUMBER;
hash = (53 * hash) + getAppId().hashCode();
hash = (37 * hash) + USER_ID_FIELD_NUMBER;
hash = (53 * hash) + getUserId().hashCode();
hash = (37 * hash) + LABEL_ORDER_ID_FIELD_NUMBER;
hash = (53 * hash) + getLabelOrderId().hashCode();
if (getConceptsCount() > 0) {
hash = (37 * hash) + CONCEPTS_FIELD_NUMBER;
hash = (53 * hash) + getConceptsList().hashCode();
}
hash = (37 * hash) + DELETE_PREVIOUS_ANNOTATIONS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getDeletePreviousAnnotations());
if (hasMetrics()) {
hash = (37 * hash) + METRICS_FIELD_NUMBER;
hash = (53 * hash) + getMetrics().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.clarifai.grpc.api.Task parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.Task 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.Task parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.Task 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.Task parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.Task parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.clarifai.grpc.api.Task parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.Task 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.Task parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.Task 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.Task parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.Task 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.Task 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;
}
/**
*
* Task is the work that needs to be done for labeling the inputs in an app.
*
*
* Protobuf type {@code clarifai.api.Task}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:clarifai.api.Task)
com.clarifai.grpc.api.TaskOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Task_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Task_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.Task.class, com.clarifai.grpc.api.Task.Builder.class);
}
// Construct using com.clarifai.grpc.api.Task.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getConceptsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
id_ = "";
if (createdAtBuilder_ == null) {
createdAt_ = null;
} else {
createdAt_ = null;
createdAtBuilder_ = null;
}
if (modifiedAtBuilder_ == null) {
modifiedAt_ = null;
} else {
modifiedAt_ = null;
modifiedAtBuilder_ = null;
}
type_ = 0;
description_ = "";
if (workerBuilder_ == null) {
worker_ = null;
} else {
worker_ = null;
workerBuilder_ = null;
}
conceptIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
if (inputSourceBuilder_ == null) {
inputSource_ = null;
} else {
inputSource_ = null;
inputSourceBuilder_ = null;
}
sampleMs_ = 0;
if (aiAssistantBuilder_ == null) {
aiAssistant_ = null;
} else {
aiAssistant_ = null;
aiAssistantBuilder_ = null;
}
if (reviewBuilder_ == null) {
review_ = null;
} else {
review_ = null;
reviewBuilder_ = null;
}
if (statusBuilder_ == null) {
status_ = null;
} else {
status_ = null;
statusBuilder_ = null;
}
name_ = "";
if (aiAssistParamsBuilder_ == null) {
aiAssistParams_ = null;
} else {
aiAssistParams_ = null;
aiAssistParamsBuilder_ = null;
}
if (visibilityBuilder_ == null) {
visibility_ = null;
} else {
visibility_ = null;
visibilityBuilder_ = null;
}
appId_ = "";
userId_ = "";
labelOrderId_ = "";
if (conceptsBuilder_ == null) {
concepts_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
} else {
conceptsBuilder_.clear();
}
deletePreviousAnnotations_ = false;
if (metricsBuilder_ == null) {
metrics_ = null;
} else {
metrics_ = null;
metricsBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Task_descriptor;
}
@java.lang.Override
public com.clarifai.grpc.api.Task getDefaultInstanceForType() {
return com.clarifai.grpc.api.Task.getDefaultInstance();
}
@java.lang.Override
public com.clarifai.grpc.api.Task build() {
com.clarifai.grpc.api.Task result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.clarifai.grpc.api.Task buildPartial() {
com.clarifai.grpc.api.Task result = new com.clarifai.grpc.api.Task(this);
int from_bitField0_ = bitField0_;
result.id_ = id_;
if (createdAtBuilder_ == null) {
result.createdAt_ = createdAt_;
} else {
result.createdAt_ = createdAtBuilder_.build();
}
if (modifiedAtBuilder_ == null) {
result.modifiedAt_ = modifiedAt_;
} else {
result.modifiedAt_ = modifiedAtBuilder_.build();
}
result.type_ = type_;
result.description_ = description_;
if (workerBuilder_ == null) {
result.worker_ = worker_;
} else {
result.worker_ = workerBuilder_.build();
}
if (((bitField0_ & 0x00000001) != 0)) {
conceptIds_ = conceptIds_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000001);
}
result.conceptIds_ = conceptIds_;
if (inputSourceBuilder_ == null) {
result.inputSource_ = inputSource_;
} else {
result.inputSource_ = inputSourceBuilder_.build();
}
result.sampleMs_ = sampleMs_;
if (aiAssistantBuilder_ == null) {
result.aiAssistant_ = aiAssistant_;
} else {
result.aiAssistant_ = aiAssistantBuilder_.build();
}
if (reviewBuilder_ == null) {
result.review_ = review_;
} else {
result.review_ = reviewBuilder_.build();
}
if (statusBuilder_ == null) {
result.status_ = status_;
} else {
result.status_ = statusBuilder_.build();
}
result.name_ = name_;
if (aiAssistParamsBuilder_ == null) {
result.aiAssistParams_ = aiAssistParams_;
} else {
result.aiAssistParams_ = aiAssistParamsBuilder_.build();
}
if (visibilityBuilder_ == null) {
result.visibility_ = visibility_;
} else {
result.visibility_ = visibilityBuilder_.build();
}
result.appId_ = appId_;
result.userId_ = userId_;
result.labelOrderId_ = labelOrderId_;
if (conceptsBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
concepts_ = java.util.Collections.unmodifiableList(concepts_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.concepts_ = concepts_;
} else {
result.concepts_ = conceptsBuilder_.build();
}
result.deletePreviousAnnotations_ = deletePreviousAnnotations_;
if (metricsBuilder_ == null) {
result.metrics_ = metrics_;
} else {
result.metrics_ = metricsBuilder_.build();
}
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.Task) {
return mergeFrom((com.clarifai.grpc.api.Task)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.clarifai.grpc.api.Task other) {
if (other == com.clarifai.grpc.api.Task.getDefaultInstance()) return this;
if (!other.getId().isEmpty()) {
id_ = other.id_;
onChanged();
}
if (other.hasCreatedAt()) {
mergeCreatedAt(other.getCreatedAt());
}
if (other.hasModifiedAt()) {
mergeModifiedAt(other.getModifiedAt());
}
if (other.type_ != 0) {
setTypeValue(other.getTypeValue());
}
if (!other.getDescription().isEmpty()) {
description_ = other.description_;
onChanged();
}
if (other.hasWorker()) {
mergeWorker(other.getWorker());
}
if (!other.conceptIds_.isEmpty()) {
if (conceptIds_.isEmpty()) {
conceptIds_ = other.conceptIds_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureConceptIdsIsMutable();
conceptIds_.addAll(other.conceptIds_);
}
onChanged();
}
if (other.hasInputSource()) {
mergeInputSource(other.getInputSource());
}
if (other.getSampleMs() != 0) {
setSampleMs(other.getSampleMs());
}
if (other.hasAiAssistant()) {
mergeAiAssistant(other.getAiAssistant());
}
if (other.hasReview()) {
mergeReview(other.getReview());
}
if (other.hasStatus()) {
mergeStatus(other.getStatus());
}
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (other.hasAiAssistParams()) {
mergeAiAssistParams(other.getAiAssistParams());
}
if (other.hasVisibility()) {
mergeVisibility(other.getVisibility());
}
if (!other.getAppId().isEmpty()) {
appId_ = other.appId_;
onChanged();
}
if (!other.getUserId().isEmpty()) {
userId_ = other.userId_;
onChanged();
}
if (!other.getLabelOrderId().isEmpty()) {
labelOrderId_ = other.labelOrderId_;
onChanged();
}
if (conceptsBuilder_ == null) {
if (!other.concepts_.isEmpty()) {
if (concepts_.isEmpty()) {
concepts_ = other.concepts_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureConceptsIsMutable();
concepts_.addAll(other.concepts_);
}
onChanged();
}
} else {
if (!other.concepts_.isEmpty()) {
if (conceptsBuilder_.isEmpty()) {
conceptsBuilder_.dispose();
conceptsBuilder_ = null;
concepts_ = other.concepts_;
bitField0_ = (bitField0_ & ~0x00000002);
conceptsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getConceptsFieldBuilder() : null;
} else {
conceptsBuilder_.addAllMessages(other.concepts_);
}
}
}
if (other.getDeletePreviousAnnotations() != false) {
setDeletePreviousAnnotations(other.getDeletePreviousAnnotations());
}
if (other.hasMetrics()) {
mergeMetrics(other.getMetrics());
}
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.Task parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.clarifai.grpc.api.Task) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object id_ = "";
/**
*
* Unique ID for the task.
*
*
* string id = 1;
* @return The id.
*/
public java.lang.String getId() {
java.lang.Object ref = id_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Unique ID for the task.
*
*
* string id = 1;
* @return The bytes for id.
*/
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Unique ID for the task.
*
*
* string id = 1;
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
id_ = value;
onChanged();
return this;
}
/**
*
* Unique ID for the task.
*
*
* string id = 1;
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
onChanged();
return this;
}
/**
*
* Unique ID for the task.
*
*
* string id = 1;
* @param value The bytes for id to set.
* @return This builder for chaining.
*/
public Builder setIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
id_ = value;
onChanged();
return this;
}
private com.google.protobuf.Timestamp createdAt_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createdAtBuilder_;
/**
*
* When the task was created.
* The format is https://www.ietf.org/rfc/rfc3339.txt.
* Example: "2006-01-02T15:04:05.999999Z".
*
*
* .google.protobuf.Timestamp created_at = 2;
* @return Whether the createdAt field is set.
*/
public boolean hasCreatedAt() {
return createdAtBuilder_ != null || createdAt_ != null;
}
/**
*
* When the task was created.
* The format is https://www.ietf.org/rfc/rfc3339.txt.
* Example: "2006-01-02T15:04:05.999999Z".
*
*
* .google.protobuf.Timestamp created_at = 2;
* @return The createdAt.
*/
public com.google.protobuf.Timestamp getCreatedAt() {
if (createdAtBuilder_ == null) {
return createdAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_;
} else {
return createdAtBuilder_.getMessage();
}
}
/**
*
* When the task was created.
* The format is https://www.ietf.org/rfc/rfc3339.txt.
* Example: "2006-01-02T15:04:05.999999Z".
*
*
* .google.protobuf.Timestamp created_at = 2;
*/
public Builder setCreatedAt(com.google.protobuf.Timestamp value) {
if (createdAtBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
createdAt_ = value;
onChanged();
} else {
createdAtBuilder_.setMessage(value);
}
return this;
}
/**
*
* When the task was created.
* The format is https://www.ietf.org/rfc/rfc3339.txt.
* Example: "2006-01-02T15:04:05.999999Z".
*
*
* .google.protobuf.Timestamp created_at = 2;
*/
public Builder setCreatedAt(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (createdAtBuilder_ == null) {
createdAt_ = builderForValue.build();
onChanged();
} else {
createdAtBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* When the task was created.
* The format is https://www.ietf.org/rfc/rfc3339.txt.
* Example: "2006-01-02T15:04:05.999999Z".
*
*
* .google.protobuf.Timestamp created_at = 2;
*/
public Builder mergeCreatedAt(com.google.protobuf.Timestamp value) {
if (createdAtBuilder_ == null) {
if (createdAt_ != null) {
createdAt_ =
com.google.protobuf.Timestamp.newBuilder(createdAt_).mergeFrom(value).buildPartial();
} else {
createdAt_ = value;
}
onChanged();
} else {
createdAtBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* When the task was created.
* The format is https://www.ietf.org/rfc/rfc3339.txt.
* Example: "2006-01-02T15:04:05.999999Z".
*
*
* .google.protobuf.Timestamp created_at = 2;
*/
public Builder clearCreatedAt() {
if (createdAtBuilder_ == null) {
createdAt_ = null;
onChanged();
} else {
createdAt_ = null;
createdAtBuilder_ = null;
}
return this;
}
/**
*
* When the task was created.
* The format is https://www.ietf.org/rfc/rfc3339.txt.
* Example: "2006-01-02T15:04:05.999999Z".
*
*
* .google.protobuf.Timestamp created_at = 2;
*/
public com.google.protobuf.Timestamp.Builder getCreatedAtBuilder() {
onChanged();
return getCreatedAtFieldBuilder().getBuilder();
}
/**
*
* When the task was created.
* The format is https://www.ietf.org/rfc/rfc3339.txt.
* Example: "2006-01-02T15:04:05.999999Z".
*
*
* .google.protobuf.Timestamp created_at = 2;
*/
public com.google.protobuf.TimestampOrBuilder getCreatedAtOrBuilder() {
if (createdAtBuilder_ != null) {
return createdAtBuilder_.getMessageOrBuilder();
} else {
return createdAt_ == null ?
com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_;
}
}
/**
*
* When the task was created.
* The format is https://www.ietf.org/rfc/rfc3339.txt.
* Example: "2006-01-02T15:04:05.999999Z".
*
*
* .google.protobuf.Timestamp created_at = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
getCreatedAtFieldBuilder() {
if (createdAtBuilder_ == null) {
createdAtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
getCreatedAt(),
getParentForChildren(),
isClean());
createdAt_ = null;
}
return createdAtBuilder_;
}
private com.google.protobuf.Timestamp modifiedAt_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> modifiedAtBuilder_;
/**
*
* Most recent time when the task was updated.
* The format is https://www.ietf.org/rfc/rfc3339.txt.
* Example: "2006-01-02T15:04:05.999999Z".
*
*
* .google.protobuf.Timestamp modified_at = 3;
* @return Whether the modifiedAt field is set.
*/
public boolean hasModifiedAt() {
return modifiedAtBuilder_ != null || modifiedAt_ != null;
}
/**
*
* Most recent time when the task was updated.
* The format is https://www.ietf.org/rfc/rfc3339.txt.
* Example: "2006-01-02T15:04:05.999999Z".
*
*
* .google.protobuf.Timestamp modified_at = 3;
* @return The modifiedAt.
*/
public com.google.protobuf.Timestamp getModifiedAt() {
if (modifiedAtBuilder_ == null) {
return modifiedAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : modifiedAt_;
} else {
return modifiedAtBuilder_.getMessage();
}
}
/**
*
* Most recent time when the task was updated.
* The format is https://www.ietf.org/rfc/rfc3339.txt.
* Example: "2006-01-02T15:04:05.999999Z".
*
*
* .google.protobuf.Timestamp modified_at = 3;
*/
public Builder setModifiedAt(com.google.protobuf.Timestamp value) {
if (modifiedAtBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
modifiedAt_ = value;
onChanged();
} else {
modifiedAtBuilder_.setMessage(value);
}
return this;
}
/**
*
* Most recent time when the task was updated.
* The format is https://www.ietf.org/rfc/rfc3339.txt.
* Example: "2006-01-02T15:04:05.999999Z".
*
*
* .google.protobuf.Timestamp modified_at = 3;
*/
public Builder setModifiedAt(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (modifiedAtBuilder_ == null) {
modifiedAt_ = builderForValue.build();
onChanged();
} else {
modifiedAtBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Most recent time when the task was updated.
* The format is https://www.ietf.org/rfc/rfc3339.txt.
* Example: "2006-01-02T15:04:05.999999Z".
*
*
* .google.protobuf.Timestamp modified_at = 3;
*/
public Builder mergeModifiedAt(com.google.protobuf.Timestamp value) {
if (modifiedAtBuilder_ == null) {
if (modifiedAt_ != null) {
modifiedAt_ =
com.google.protobuf.Timestamp.newBuilder(modifiedAt_).mergeFrom(value).buildPartial();
} else {
modifiedAt_ = value;
}
onChanged();
} else {
modifiedAtBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Most recent time when the task was updated.
* The format is https://www.ietf.org/rfc/rfc3339.txt.
* Example: "2006-01-02T15:04:05.999999Z".
*
*
* .google.protobuf.Timestamp modified_at = 3;
*/
public Builder clearModifiedAt() {
if (modifiedAtBuilder_ == null) {
modifiedAt_ = null;
onChanged();
} else {
modifiedAt_ = null;
modifiedAtBuilder_ = null;
}
return this;
}
/**
*
* Most recent time when the task was updated.
* The format is https://www.ietf.org/rfc/rfc3339.txt.
* Example: "2006-01-02T15:04:05.999999Z".
*
*
* .google.protobuf.Timestamp modified_at = 3;
*/
public com.google.protobuf.Timestamp.Builder getModifiedAtBuilder() {
onChanged();
return getModifiedAtFieldBuilder().getBuilder();
}
/**
*
* Most recent time when the task was updated.
* The format is https://www.ietf.org/rfc/rfc3339.txt.
* Example: "2006-01-02T15:04:05.999999Z".
*
*
* .google.protobuf.Timestamp modified_at = 3;
*/
public com.google.protobuf.TimestampOrBuilder getModifiedAtOrBuilder() {
if (modifiedAtBuilder_ != null) {
return modifiedAtBuilder_.getMessageOrBuilder();
} else {
return modifiedAt_ == null ?
com.google.protobuf.Timestamp.getDefaultInstance() : modifiedAt_;
}
}
/**
*
* Most recent time when the task was updated.
* The format is https://www.ietf.org/rfc/rfc3339.txt.
* Example: "2006-01-02T15:04:05.999999Z".
*
*
* .google.protobuf.Timestamp modified_at = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
getModifiedAtFieldBuilder() {
if (modifiedAtBuilder_ == null) {
modifiedAtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
getModifiedAt(),
getParentForChildren(),
isClean());
modifiedAt_ = null;
}
return modifiedAtBuilder_;
}
private int type_ = 0;
/**
*
* Task type.
*
*
* .clarifai.api.Task.TaskType type = 4;
* @return The enum numeric value on the wire for type.
*/
@java.lang.Override public int getTypeValue() {
return type_;
}
/**
*
* Task type.
*
*
* .clarifai.api.Task.TaskType type = 4;
* @param value The enum numeric value on the wire for type to set.
* @return This builder for chaining.
*/
public Builder setTypeValue(int value) {
type_ = value;
onChanged();
return this;
}
/**
*
* Task type.
*
*
* .clarifai.api.Task.TaskType type = 4;
* @return The type.
*/
@java.lang.Override
public com.clarifai.grpc.api.Task.TaskType getType() {
@SuppressWarnings("deprecation")
com.clarifai.grpc.api.Task.TaskType result = com.clarifai.grpc.api.Task.TaskType.valueOf(type_);
return result == null ? com.clarifai.grpc.api.Task.TaskType.UNRECOGNIZED : result;
}
/**
*
* Task type.
*
*
* .clarifai.api.Task.TaskType type = 4;
* @param value The type to set.
* @return This builder for chaining.
*/
public Builder setType(com.clarifai.grpc.api.Task.TaskType value) {
if (value == null) {
throw new NullPointerException();
}
type_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Task type.
*
*
* .clarifai.api.Task.TaskType type = 4;
* @return This builder for chaining.
*/
public Builder clearType() {
type_ = 0;
onChanged();
return this;
}
private java.lang.Object description_ = "";
/**
*
* Description of the task.
*
*
* string description = 5;
* @return The description.
*/
public java.lang.String getDescription() {
java.lang.Object ref = description_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
description_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Description of the task.
*
*
* string description = 5;
* @return The bytes for description.
*/
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Description of the task.
*
*
* string description = 5;
* @param value The description to set.
* @return This builder for chaining.
*/
public Builder setDescription(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
description_ = value;
onChanged();
return this;
}
/**
*
* Description of the task.
*
*
* string description = 5;
* @return This builder for chaining.
*/
public Builder clearDescription() {
description_ = getDefaultInstance().getDescription();
onChanged();
return this;
}
/**
*
* Description of the task.
*
*
* string description = 5;
* @param value The bytes for description to set.
* @return This builder for chaining.
*/
public Builder setDescriptionBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
description_ = value;
onChanged();
return this;
}
private com.clarifai.grpc.api.TaskWorker worker_;
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.TaskWorker, com.clarifai.grpc.api.TaskWorker.Builder, com.clarifai.grpc.api.TaskWorkerOrBuilder> workerBuilder_;
/**
*
* Worker details.
*
*
* .clarifai.api.TaskWorker worker = 6;
* @return Whether the worker field is set.
*/
public boolean hasWorker() {
return workerBuilder_ != null || worker_ != null;
}
/**
*
* Worker details.
*
*
* .clarifai.api.TaskWorker worker = 6;
* @return The worker.
*/
public com.clarifai.grpc.api.TaskWorker getWorker() {
if (workerBuilder_ == null) {
return worker_ == null ? com.clarifai.grpc.api.TaskWorker.getDefaultInstance() : worker_;
} else {
return workerBuilder_.getMessage();
}
}
/**
*
* Worker details.
*
*
* .clarifai.api.TaskWorker worker = 6;
*/
public Builder setWorker(com.clarifai.grpc.api.TaskWorker value) {
if (workerBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
worker_ = value;
onChanged();
} else {
workerBuilder_.setMessage(value);
}
return this;
}
/**
*
* Worker details.
*
*
* .clarifai.api.TaskWorker worker = 6;
*/
public Builder setWorker(
com.clarifai.grpc.api.TaskWorker.Builder builderForValue) {
if (workerBuilder_ == null) {
worker_ = builderForValue.build();
onChanged();
} else {
workerBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Worker details.
*
*
* .clarifai.api.TaskWorker worker = 6;
*/
public Builder mergeWorker(com.clarifai.grpc.api.TaskWorker value) {
if (workerBuilder_ == null) {
if (worker_ != null) {
worker_ =
com.clarifai.grpc.api.TaskWorker.newBuilder(worker_).mergeFrom(value).buildPartial();
} else {
worker_ = value;
}
onChanged();
} else {
workerBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Worker details.
*
*
* .clarifai.api.TaskWorker worker = 6;
*/
public Builder clearWorker() {
if (workerBuilder_ == null) {
worker_ = null;
onChanged();
} else {
worker_ = null;
workerBuilder_ = null;
}
return this;
}
/**
*
* Worker details.
*
*
* .clarifai.api.TaskWorker worker = 6;
*/
public com.clarifai.grpc.api.TaskWorker.Builder getWorkerBuilder() {
onChanged();
return getWorkerFieldBuilder().getBuilder();
}
/**
*
* Worker details.
*
*
* .clarifai.api.TaskWorker worker = 6;
*/
public com.clarifai.grpc.api.TaskWorkerOrBuilder getWorkerOrBuilder() {
if (workerBuilder_ != null) {
return workerBuilder_.getMessageOrBuilder();
} else {
return worker_ == null ?
com.clarifai.grpc.api.TaskWorker.getDefaultInstance() : worker_;
}
}
/**
*
* Worker details.
*
*
* .clarifai.api.TaskWorker worker = 6;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.TaskWorker, com.clarifai.grpc.api.TaskWorker.Builder, com.clarifai.grpc.api.TaskWorkerOrBuilder>
getWorkerFieldBuilder() {
if (workerBuilder_ == null) {
workerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.TaskWorker, com.clarifai.grpc.api.TaskWorker.Builder, com.clarifai.grpc.api.TaskWorkerOrBuilder>(
getWorker(),
getParentForChildren(),
isClean());
worker_ = null;
}
return workerBuilder_;
}
private com.google.protobuf.LazyStringList conceptIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureConceptIdsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
conceptIds_ = new com.google.protobuf.LazyStringArrayList(conceptIds_);
bitField0_ |= 0x00000001;
}
}
/**
*
* List of concept ids used in the work of this task.
* DEPRECATED: Use task.concepts instead.
*
*
* repeated string concept_ids = 7 [deprecated = true];
* @deprecated clarifai.api.Task.concept_ids is deprecated.
* See proto/clarifai/api/resources.proto;l=3057
* @return A list containing the conceptIds.
*/
@java.lang.Deprecated public com.google.protobuf.ProtocolStringList
getConceptIdsList() {
return conceptIds_.getUnmodifiableView();
}
/**
*
* List of concept ids used in the work of this task.
* DEPRECATED: Use task.concepts instead.
*
*
* repeated string concept_ids = 7 [deprecated = true];
* @deprecated clarifai.api.Task.concept_ids is deprecated.
* See proto/clarifai/api/resources.proto;l=3057
* @return The count of conceptIds.
*/
@java.lang.Deprecated public int getConceptIdsCount() {
return conceptIds_.size();
}
/**
*
* List of concept ids used in the work of this task.
* DEPRECATED: Use task.concepts instead.
*
*
* repeated string concept_ids = 7 [deprecated = true];
* @deprecated clarifai.api.Task.concept_ids is deprecated.
* See proto/clarifai/api/resources.proto;l=3057
* @param index The index of the element to return.
* @return The conceptIds at the given index.
*/
@java.lang.Deprecated public java.lang.String getConceptIds(int index) {
return conceptIds_.get(index);
}
/**
*
* List of concept ids used in the work of this task.
* DEPRECATED: Use task.concepts instead.
*
*
* repeated string concept_ids = 7 [deprecated = true];
* @deprecated clarifai.api.Task.concept_ids is deprecated.
* See proto/clarifai/api/resources.proto;l=3057
* @param index The index of the value to return.
* @return The bytes of the conceptIds at the given index.
*/
@java.lang.Deprecated public com.google.protobuf.ByteString
getConceptIdsBytes(int index) {
return conceptIds_.getByteString(index);
}
/**
*
* List of concept ids used in the work of this task.
* DEPRECATED: Use task.concepts instead.
*
*
* repeated string concept_ids = 7 [deprecated = true];
* @deprecated clarifai.api.Task.concept_ids is deprecated.
* See proto/clarifai/api/resources.proto;l=3057
* @param index The index to set the value at.
* @param value The conceptIds to set.
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder setConceptIds(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureConceptIdsIsMutable();
conceptIds_.set(index, value);
onChanged();
return this;
}
/**
*
* List of concept ids used in the work of this task.
* DEPRECATED: Use task.concepts instead.
*
*
* repeated string concept_ids = 7 [deprecated = true];
* @deprecated clarifai.api.Task.concept_ids is deprecated.
* See proto/clarifai/api/resources.proto;l=3057
* @param value The conceptIds to add.
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder addConceptIds(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureConceptIdsIsMutable();
conceptIds_.add(value);
onChanged();
return this;
}
/**
*
* List of concept ids used in the work of this task.
* DEPRECATED: Use task.concepts instead.
*
*
* repeated string concept_ids = 7 [deprecated = true];
* @deprecated clarifai.api.Task.concept_ids is deprecated.
* See proto/clarifai/api/resources.proto;l=3057
* @param values The conceptIds to add.
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder addAllConceptIds(
java.lang.Iterable values) {
ensureConceptIdsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, conceptIds_);
onChanged();
return this;
}
/**
*
* List of concept ids used in the work of this task.
* DEPRECATED: Use task.concepts instead.
*
*
* repeated string concept_ids = 7 [deprecated = true];
* @deprecated clarifai.api.Task.concept_ids is deprecated.
* See proto/clarifai/api/resources.proto;l=3057
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder clearConceptIds() {
conceptIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* List of concept ids used in the work of this task.
* DEPRECATED: Use task.concepts instead.
*
*
* repeated string concept_ids = 7 [deprecated = true];
* @deprecated clarifai.api.Task.concept_ids is deprecated.
* See proto/clarifai/api/resources.proto;l=3057
* @param value The bytes of the conceptIds to add.
* @return This builder for chaining.
*/
@java.lang.Deprecated public Builder addConceptIdsBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureConceptIdsIsMutable();
conceptIds_.add(value);
onChanged();
return this;
}
private com.clarifai.grpc.api.TaskInputSource inputSource_;
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.TaskInputSource, com.clarifai.grpc.api.TaskInputSource.Builder, com.clarifai.grpc.api.TaskInputSourceOrBuilder> inputSourceBuilder_;
/**
*
* List of inputs used in this task will be taken from this source.
*
*
* .clarifai.api.TaskInputSource input_source = 8;
* @return Whether the inputSource field is set.
*/
public boolean hasInputSource() {
return inputSourceBuilder_ != null || inputSource_ != null;
}
/**
*
* List of inputs used in this task will be taken from this source.
*
*
* .clarifai.api.TaskInputSource input_source = 8;
* @return The inputSource.
*/
public com.clarifai.grpc.api.TaskInputSource getInputSource() {
if (inputSourceBuilder_ == null) {
return inputSource_ == null ? com.clarifai.grpc.api.TaskInputSource.getDefaultInstance() : inputSource_;
} else {
return inputSourceBuilder_.getMessage();
}
}
/**
*
* List of inputs used in this task will be taken from this source.
*
*
* .clarifai.api.TaskInputSource input_source = 8;
*/
public Builder setInputSource(com.clarifai.grpc.api.TaskInputSource value) {
if (inputSourceBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
inputSource_ = value;
onChanged();
} else {
inputSourceBuilder_.setMessage(value);
}
return this;
}
/**
*
* List of inputs used in this task will be taken from this source.
*
*
* .clarifai.api.TaskInputSource input_source = 8;
*/
public Builder setInputSource(
com.clarifai.grpc.api.TaskInputSource.Builder builderForValue) {
if (inputSourceBuilder_ == null) {
inputSource_ = builderForValue.build();
onChanged();
} else {
inputSourceBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* List of inputs used in this task will be taken from this source.
*
*
* .clarifai.api.TaskInputSource input_source = 8;
*/
public Builder mergeInputSource(com.clarifai.grpc.api.TaskInputSource value) {
if (inputSourceBuilder_ == null) {
if (inputSource_ != null) {
inputSource_ =
com.clarifai.grpc.api.TaskInputSource.newBuilder(inputSource_).mergeFrom(value).buildPartial();
} else {
inputSource_ = value;
}
onChanged();
} else {
inputSourceBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* List of inputs used in this task will be taken from this source.
*
*
* .clarifai.api.TaskInputSource input_source = 8;
*/
public Builder clearInputSource() {
if (inputSourceBuilder_ == null) {
inputSource_ = null;
onChanged();
} else {
inputSource_ = null;
inputSourceBuilder_ = null;
}
return this;
}
/**
*
* List of inputs used in this task will be taken from this source.
*
*
* .clarifai.api.TaskInputSource input_source = 8;
*/
public com.clarifai.grpc.api.TaskInputSource.Builder getInputSourceBuilder() {
onChanged();
return getInputSourceFieldBuilder().getBuilder();
}
/**
*
* List of inputs used in this task will be taken from this source.
*
*
* .clarifai.api.TaskInputSource input_source = 8;
*/
public com.clarifai.grpc.api.TaskInputSourceOrBuilder getInputSourceOrBuilder() {
if (inputSourceBuilder_ != null) {
return inputSourceBuilder_.getMessageOrBuilder();
} else {
return inputSource_ == null ?
com.clarifai.grpc.api.TaskInputSource.getDefaultInstance() : inputSource_;
}
}
/**
*
* List of inputs used in this task will be taken from this source.
*
*
* .clarifai.api.TaskInputSource input_source = 8;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.TaskInputSource, com.clarifai.grpc.api.TaskInputSource.Builder, com.clarifai.grpc.api.TaskInputSourceOrBuilder>
getInputSourceFieldBuilder() {
if (inputSourceBuilder_ == null) {
inputSourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.TaskInputSource, com.clarifai.grpc.api.TaskInputSource.Builder, com.clarifai.grpc.api.TaskInputSourceOrBuilder>(
getInputSource(),
getParentForChildren(),
isClean());
inputSource_ = null;
}
return inputSourceBuilder_;
}
private int sampleMs_ ;
/**
*
* For model predictions on video: Sample delay for video predicting (1 frame per N milliseconds)
*
*
* uint32 sample_ms = 9;
* @return The sampleMs.
*/
@java.lang.Override
public int getSampleMs() {
return sampleMs_;
}
/**
*
* For model predictions on video: Sample delay for video predicting (1 frame per N milliseconds)
*
*
* uint32 sample_ms = 9;
* @param value The sampleMs to set.
* @return This builder for chaining.
*/
public Builder setSampleMs(int value) {
sampleMs_ = value;
onChanged();
return this;
}
/**
*
* For model predictions on video: Sample delay for video predicting (1 frame per N milliseconds)
*
*
* uint32 sample_ms = 9;
* @return This builder for chaining.
*/
public Builder clearSampleMs() {
sampleMs_ = 0;
onChanged();
return this;
}
private com.clarifai.grpc.api.TaskAIAssistant aiAssistant_;
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.TaskAIAssistant, com.clarifai.grpc.api.TaskAIAssistant.Builder, com.clarifai.grpc.api.TaskAIAssistantOrBuilder> aiAssistantBuilder_;
/**
*
* AI assistant details.
*
*
* .clarifai.api.TaskAIAssistant ai_assistant = 10;
* @return Whether the aiAssistant field is set.
*/
public boolean hasAiAssistant() {
return aiAssistantBuilder_ != null || aiAssistant_ != null;
}
/**
*
* AI assistant details.
*
*
* .clarifai.api.TaskAIAssistant ai_assistant = 10;
* @return The aiAssistant.
*/
public com.clarifai.grpc.api.TaskAIAssistant getAiAssistant() {
if (aiAssistantBuilder_ == null) {
return aiAssistant_ == null ? com.clarifai.grpc.api.TaskAIAssistant.getDefaultInstance() : aiAssistant_;
} else {
return aiAssistantBuilder_.getMessage();
}
}
/**
*
* AI assistant details.
*
*
* .clarifai.api.TaskAIAssistant ai_assistant = 10;
*/
public Builder setAiAssistant(com.clarifai.grpc.api.TaskAIAssistant value) {
if (aiAssistantBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
aiAssistant_ = value;
onChanged();
} else {
aiAssistantBuilder_.setMessage(value);
}
return this;
}
/**
*
* AI assistant details.
*
*
* .clarifai.api.TaskAIAssistant ai_assistant = 10;
*/
public Builder setAiAssistant(
com.clarifai.grpc.api.TaskAIAssistant.Builder builderForValue) {
if (aiAssistantBuilder_ == null) {
aiAssistant_ = builderForValue.build();
onChanged();
} else {
aiAssistantBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* AI assistant details.
*
*
* .clarifai.api.TaskAIAssistant ai_assistant = 10;
*/
public Builder mergeAiAssistant(com.clarifai.grpc.api.TaskAIAssistant value) {
if (aiAssistantBuilder_ == null) {
if (aiAssistant_ != null) {
aiAssistant_ =
com.clarifai.grpc.api.TaskAIAssistant.newBuilder(aiAssistant_).mergeFrom(value).buildPartial();
} else {
aiAssistant_ = value;
}
onChanged();
} else {
aiAssistantBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* AI assistant details.
*
*
* .clarifai.api.TaskAIAssistant ai_assistant = 10;
*/
public Builder clearAiAssistant() {
if (aiAssistantBuilder_ == null) {
aiAssistant_ = null;
onChanged();
} else {
aiAssistant_ = null;
aiAssistantBuilder_ = null;
}
return this;
}
/**
*
* AI assistant details.
*
*
* .clarifai.api.TaskAIAssistant ai_assistant = 10;
*/
public com.clarifai.grpc.api.TaskAIAssistant.Builder getAiAssistantBuilder() {
onChanged();
return getAiAssistantFieldBuilder().getBuilder();
}
/**
*
* AI assistant details.
*
*
* .clarifai.api.TaskAIAssistant ai_assistant = 10;
*/
public com.clarifai.grpc.api.TaskAIAssistantOrBuilder getAiAssistantOrBuilder() {
if (aiAssistantBuilder_ != null) {
return aiAssistantBuilder_.getMessageOrBuilder();
} else {
return aiAssistant_ == null ?
com.clarifai.grpc.api.TaskAIAssistant.getDefaultInstance() : aiAssistant_;
}
}
/**
*
* AI assistant details.
*
*
* .clarifai.api.TaskAIAssistant ai_assistant = 10;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.TaskAIAssistant, com.clarifai.grpc.api.TaskAIAssistant.Builder, com.clarifai.grpc.api.TaskAIAssistantOrBuilder>
getAiAssistantFieldBuilder() {
if (aiAssistantBuilder_ == null) {
aiAssistantBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.TaskAIAssistant, com.clarifai.grpc.api.TaskAIAssistant.Builder, com.clarifai.grpc.api.TaskAIAssistantOrBuilder>(
getAiAssistant(),
getParentForChildren(),
isClean());
aiAssistant_ = null;
}
return aiAssistantBuilder_;
}
private com.clarifai.grpc.api.TaskReview review_;
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.TaskReview, com.clarifai.grpc.api.TaskReview.Builder, com.clarifai.grpc.api.TaskReviewOrBuilder> reviewBuilder_;
/**
*
* Review details.
*
*
* .clarifai.api.TaskReview review = 11;
* @return Whether the review field is set.
*/
public boolean hasReview() {
return reviewBuilder_ != null || review_ != null;
}
/**
*
* Review details.
*
*
* .clarifai.api.TaskReview review = 11;
* @return The review.
*/
public com.clarifai.grpc.api.TaskReview getReview() {
if (reviewBuilder_ == null) {
return review_ == null ? com.clarifai.grpc.api.TaskReview.getDefaultInstance() : review_;
} else {
return reviewBuilder_.getMessage();
}
}
/**
*
* Review details.
*
*
* .clarifai.api.TaskReview review = 11;
*/
public Builder setReview(com.clarifai.grpc.api.TaskReview value) {
if (reviewBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
review_ = value;
onChanged();
} else {
reviewBuilder_.setMessage(value);
}
return this;
}
/**
*
* Review details.
*
*
* .clarifai.api.TaskReview review = 11;
*/
public Builder setReview(
com.clarifai.grpc.api.TaskReview.Builder builderForValue) {
if (reviewBuilder_ == null) {
review_ = builderForValue.build();
onChanged();
} else {
reviewBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Review details.
*
*
* .clarifai.api.TaskReview review = 11;
*/
public Builder mergeReview(com.clarifai.grpc.api.TaskReview value) {
if (reviewBuilder_ == null) {
if (review_ != null) {
review_ =
com.clarifai.grpc.api.TaskReview.newBuilder(review_).mergeFrom(value).buildPartial();
} else {
review_ = value;
}
onChanged();
} else {
reviewBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Review details.
*
*
* .clarifai.api.TaskReview review = 11;
*/
public Builder clearReview() {
if (reviewBuilder_ == null) {
review_ = null;
onChanged();
} else {
review_ = null;
reviewBuilder_ = null;
}
return this;
}
/**
*
* Review details.
*
*
* .clarifai.api.TaskReview review = 11;
*/
public com.clarifai.grpc.api.TaskReview.Builder getReviewBuilder() {
onChanged();
return getReviewFieldBuilder().getBuilder();
}
/**
*
* Review details.
*
*
* .clarifai.api.TaskReview review = 11;
*/
public com.clarifai.grpc.api.TaskReviewOrBuilder getReviewOrBuilder() {
if (reviewBuilder_ != null) {
return reviewBuilder_.getMessageOrBuilder();
} else {
return review_ == null ?
com.clarifai.grpc.api.TaskReview.getDefaultInstance() : review_;
}
}
/**
*
* Review details.
*
*
* .clarifai.api.TaskReview review = 11;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.TaskReview, com.clarifai.grpc.api.TaskReview.Builder, com.clarifai.grpc.api.TaskReviewOrBuilder>
getReviewFieldBuilder() {
if (reviewBuilder_ == null) {
reviewBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.TaskReview, com.clarifai.grpc.api.TaskReview.Builder, com.clarifai.grpc.api.TaskReviewOrBuilder>(
getReview(),
getParentForChildren(),
isClean());
review_ = null;
}
return reviewBuilder_;
}
private com.clarifai.grpc.api.status.Status status_;
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.status.Status, com.clarifai.grpc.api.status.Status.Builder, com.clarifai.grpc.api.status.StatusOrBuilder> statusBuilder_;
/**
*
* Status of this task.
*
*
* .clarifai.api.status.Status status = 12;
* @return Whether the status field is set.
*/
public boolean hasStatus() {
return statusBuilder_ != null || status_ != null;
}
/**
*
* Status of this task.
*
*
* .clarifai.api.status.Status status = 12;
* @return The status.
*/
public com.clarifai.grpc.api.status.Status getStatus() {
if (statusBuilder_ == null) {
return status_ == null ? com.clarifai.grpc.api.status.Status.getDefaultInstance() : status_;
} else {
return statusBuilder_.getMessage();
}
}
/**
*
* Status of this task.
*
*
* .clarifai.api.status.Status status = 12;
*/
public Builder setStatus(com.clarifai.grpc.api.status.Status value) {
if (statusBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
status_ = value;
onChanged();
} else {
statusBuilder_.setMessage(value);
}
return this;
}
/**
*
* Status of this task.
*
*
* .clarifai.api.status.Status status = 12;
*/
public Builder setStatus(
com.clarifai.grpc.api.status.Status.Builder builderForValue) {
if (statusBuilder_ == null) {
status_ = builderForValue.build();
onChanged();
} else {
statusBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Status of this task.
*
*
* .clarifai.api.status.Status status = 12;
*/
public Builder mergeStatus(com.clarifai.grpc.api.status.Status value) {
if (statusBuilder_ == null) {
if (status_ != null) {
status_ =
com.clarifai.grpc.api.status.Status.newBuilder(status_).mergeFrom(value).buildPartial();
} else {
status_ = value;
}
onChanged();
} else {
statusBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Status of this task.
*
*
* .clarifai.api.status.Status status = 12;
*/
public Builder clearStatus() {
if (statusBuilder_ == null) {
status_ = null;
onChanged();
} else {
status_ = null;
statusBuilder_ = null;
}
return this;
}
/**
*
* Status of this task.
*
*
* .clarifai.api.status.Status status = 12;
*/
public com.clarifai.grpc.api.status.Status.Builder getStatusBuilder() {
onChanged();
return getStatusFieldBuilder().getBuilder();
}
/**
*
* Status of this task.
*
*
* .clarifai.api.status.Status status = 12;
*/
public com.clarifai.grpc.api.status.StatusOrBuilder getStatusOrBuilder() {
if (statusBuilder_ != null) {
return statusBuilder_.getMessageOrBuilder();
} else {
return status_ == null ?
com.clarifai.grpc.api.status.Status.getDefaultInstance() : status_;
}
}
/**
*
* Status of this task.
*
*
* .clarifai.api.status.Status status = 12;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.status.Status, com.clarifai.grpc.api.status.Status.Builder, com.clarifai.grpc.api.status.StatusOrBuilder>
getStatusFieldBuilder() {
if (statusBuilder_ == null) {
statusBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.status.Status, com.clarifai.grpc.api.status.Status.Builder, com.clarifai.grpc.api.status.StatusOrBuilder>(
getStatus(),
getParentForChildren(),
isClean());
status_ = null;
}
return statusBuilder_;
}
private java.lang.Object name_ = "";
/**
*
* Add a title for this task to quickly recognise it in a list of tasks.
*
*
* string name = 13;
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Add a title for this task to quickly recognise it in a list of tasks.
*
*
* string name = 13;
* @return The bytes for name.
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Add a title for this task to quickly recognise it in a list of tasks.
*
*
* string name = 13;
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
*
* Add a title for this task to quickly recognise it in a list of tasks.
*
*
* string name = 13;
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
* Add a title for this task to quickly recognise it in a list of tasks.
*
*
* string name = 13;
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
onChanged();
return this;
}
private com.clarifai.grpc.api.AiAssistParameters aiAssistParams_;
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.AiAssistParameters, com.clarifai.grpc.api.AiAssistParameters.Builder, com.clarifai.grpc.api.AiAssistParametersOrBuilder> aiAssistParamsBuilder_;
/**
* .clarifai.api.AiAssistParameters ai_assist_params = 14;
* @return Whether the aiAssistParams field is set.
*/
public boolean hasAiAssistParams() {
return aiAssistParamsBuilder_ != null || aiAssistParams_ != null;
}
/**
* .clarifai.api.AiAssistParameters ai_assist_params = 14;
* @return The aiAssistParams.
*/
public com.clarifai.grpc.api.AiAssistParameters getAiAssistParams() {
if (aiAssistParamsBuilder_ == null) {
return aiAssistParams_ == null ? com.clarifai.grpc.api.AiAssistParameters.getDefaultInstance() : aiAssistParams_;
} else {
return aiAssistParamsBuilder_.getMessage();
}
}
/**
* .clarifai.api.AiAssistParameters ai_assist_params = 14;
*/
public Builder setAiAssistParams(com.clarifai.grpc.api.AiAssistParameters value) {
if (aiAssistParamsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
aiAssistParams_ = value;
onChanged();
} else {
aiAssistParamsBuilder_.setMessage(value);
}
return this;
}
/**
* .clarifai.api.AiAssistParameters ai_assist_params = 14;
*/
public Builder setAiAssistParams(
com.clarifai.grpc.api.AiAssistParameters.Builder builderForValue) {
if (aiAssistParamsBuilder_ == null) {
aiAssistParams_ = builderForValue.build();
onChanged();
} else {
aiAssistParamsBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .clarifai.api.AiAssistParameters ai_assist_params = 14;
*/
public Builder mergeAiAssistParams(com.clarifai.grpc.api.AiAssistParameters value) {
if (aiAssistParamsBuilder_ == null) {
if (aiAssistParams_ != null) {
aiAssistParams_ =
com.clarifai.grpc.api.AiAssistParameters.newBuilder(aiAssistParams_).mergeFrom(value).buildPartial();
} else {
aiAssistParams_ = value;
}
onChanged();
} else {
aiAssistParamsBuilder_.mergeFrom(value);
}
return this;
}
/**
* .clarifai.api.AiAssistParameters ai_assist_params = 14;
*/
public Builder clearAiAssistParams() {
if (aiAssistParamsBuilder_ == null) {
aiAssistParams_ = null;
onChanged();
} else {
aiAssistParams_ = null;
aiAssistParamsBuilder_ = null;
}
return this;
}
/**
* .clarifai.api.AiAssistParameters ai_assist_params = 14;
*/
public com.clarifai.grpc.api.AiAssistParameters.Builder getAiAssistParamsBuilder() {
onChanged();
return getAiAssistParamsFieldBuilder().getBuilder();
}
/**
* .clarifai.api.AiAssistParameters ai_assist_params = 14;
*/
public com.clarifai.grpc.api.AiAssistParametersOrBuilder getAiAssistParamsOrBuilder() {
if (aiAssistParamsBuilder_ != null) {
return aiAssistParamsBuilder_.getMessageOrBuilder();
} else {
return aiAssistParams_ == null ?
com.clarifai.grpc.api.AiAssistParameters.getDefaultInstance() : aiAssistParams_;
}
}
/**
* .clarifai.api.AiAssistParameters ai_assist_params = 14;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.AiAssistParameters, com.clarifai.grpc.api.AiAssistParameters.Builder, com.clarifai.grpc.api.AiAssistParametersOrBuilder>
getAiAssistParamsFieldBuilder() {
if (aiAssistParamsBuilder_ == null) {
aiAssistParamsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.AiAssistParameters, com.clarifai.grpc.api.AiAssistParameters.Builder, com.clarifai.grpc.api.AiAssistParametersOrBuilder>(
getAiAssistParams(),
getParentForChildren(),
isClean());
aiAssistParams_ = null;
}
return aiAssistParamsBuilder_;
}
private com.clarifai.grpc.api.Visibility visibility_;
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Visibility, com.clarifai.grpc.api.Visibility.Builder, com.clarifai.grpc.api.VisibilityOrBuilder> visibilityBuilder_;
/**
*
* The visibility field represents whether this message is privately/publicly visible.
* To be visible to the public the App that contains it AND the User that contains the App must
* also be publicly visible.
*
*
* .clarifai.api.Visibility visibility = 15;
* @return Whether the visibility field is set.
*/
public boolean hasVisibility() {
return visibilityBuilder_ != null || visibility_ != null;
}
/**
*
* The visibility field represents whether this message is privately/publicly visible.
* To be visible to the public the App that contains it AND the User that contains the App must
* also be publicly visible.
*
*
* .clarifai.api.Visibility visibility = 15;
* @return The visibility.
*/
public com.clarifai.grpc.api.Visibility getVisibility() {
if (visibilityBuilder_ == null) {
return visibility_ == null ? com.clarifai.grpc.api.Visibility.getDefaultInstance() : visibility_;
} else {
return visibilityBuilder_.getMessage();
}
}
/**
*
* The visibility field represents whether this message is privately/publicly visible.
* To be visible to the public the App that contains it AND the User that contains the App must
* also be publicly visible.
*
*
* .clarifai.api.Visibility visibility = 15;
*/
public Builder setVisibility(com.clarifai.grpc.api.Visibility value) {
if (visibilityBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
visibility_ = value;
onChanged();
} else {
visibilityBuilder_.setMessage(value);
}
return this;
}
/**
*
* The visibility field represents whether this message is privately/publicly visible.
* To be visible to the public the App that contains it AND the User that contains the App must
* also be publicly visible.
*
*
* .clarifai.api.Visibility visibility = 15;
*/
public Builder setVisibility(
com.clarifai.grpc.api.Visibility.Builder builderForValue) {
if (visibilityBuilder_ == null) {
visibility_ = builderForValue.build();
onChanged();
} else {
visibilityBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* The visibility field represents whether this message is privately/publicly visible.
* To be visible to the public the App that contains it AND the User that contains the App must
* also be publicly visible.
*
*
* .clarifai.api.Visibility visibility = 15;
*/
public Builder mergeVisibility(com.clarifai.grpc.api.Visibility value) {
if (visibilityBuilder_ == null) {
if (visibility_ != null) {
visibility_ =
com.clarifai.grpc.api.Visibility.newBuilder(visibility_).mergeFrom(value).buildPartial();
} else {
visibility_ = value;
}
onChanged();
} else {
visibilityBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* The visibility field represents whether this message is privately/publicly visible.
* To be visible to the public the App that contains it AND the User that contains the App must
* also be publicly visible.
*
*
* .clarifai.api.Visibility visibility = 15;
*/
public Builder clearVisibility() {
if (visibilityBuilder_ == null) {
visibility_ = null;
onChanged();
} else {
visibility_ = null;
visibilityBuilder_ = null;
}
return this;
}
/**
*
* The visibility field represents whether this message is privately/publicly visible.
* To be visible to the public the App that contains it AND the User that contains the App must
* also be publicly visible.
*
*
* .clarifai.api.Visibility visibility = 15;
*/
public com.clarifai.grpc.api.Visibility.Builder getVisibilityBuilder() {
onChanged();
return getVisibilityFieldBuilder().getBuilder();
}
/**
*
* The visibility field represents whether this message is privately/publicly visible.
* To be visible to the public the App that contains it AND the User that contains the App must
* also be publicly visible.
*
*
* .clarifai.api.Visibility visibility = 15;
*/
public com.clarifai.grpc.api.VisibilityOrBuilder getVisibilityOrBuilder() {
if (visibilityBuilder_ != null) {
return visibilityBuilder_.getMessageOrBuilder();
} else {
return visibility_ == null ?
com.clarifai.grpc.api.Visibility.getDefaultInstance() : visibility_;
}
}
/**
*
* The visibility field represents whether this message is privately/publicly visible.
* To be visible to the public the App that contains it AND the User that contains the App must
* also be publicly visible.
*
*
* .clarifai.api.Visibility visibility = 15;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Visibility, com.clarifai.grpc.api.Visibility.Builder, com.clarifai.grpc.api.VisibilityOrBuilder>
getVisibilityFieldBuilder() {
if (visibilityBuilder_ == null) {
visibilityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Visibility, com.clarifai.grpc.api.Visibility.Builder, com.clarifai.grpc.api.VisibilityOrBuilder>(
getVisibility(),
getParentForChildren(),
isClean());
visibility_ = null;
}
return visibilityBuilder_;
}
private java.lang.Object appId_ = "";
/**
*
* The app the task belongs to.
*
*
* string app_id = 16;
* @return The appId.
*/
public java.lang.String getAppId() {
java.lang.Object ref = appId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
appId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The app the task belongs to.
*
*
* string app_id = 16;
* @return The bytes for appId.
*/
public com.google.protobuf.ByteString
getAppIdBytes() {
java.lang.Object ref = appId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
appId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The app the task belongs to.
*
*
* string app_id = 16;
* @param value The appId to set.
* @return This builder for chaining.
*/
public Builder setAppId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
appId_ = value;
onChanged();
return this;
}
/**
*
* The app the task belongs to.
*
*
* string app_id = 16;
* @return This builder for chaining.
*/
public Builder clearAppId() {
appId_ = getDefaultInstance().getAppId();
onChanged();
return this;
}
/**
*
* The app the task belongs to.
*
*
* string app_id = 16;
* @param value The bytes for appId to set.
* @return This builder for chaining.
*/
public Builder setAppIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
appId_ = value;
onChanged();
return this;
}
private java.lang.Object userId_ = "";
/**
*
* The user the task belongs to.
*
*
* string user_id = 17;
* @return The userId.
*/
public java.lang.String getUserId() {
java.lang.Object ref = userId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
userId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The user the task belongs to.
*
*
* string user_id = 17;
* @return The bytes for userId.
*/
public com.google.protobuf.ByteString
getUserIdBytes() {
java.lang.Object ref = userId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
userId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The user the task belongs to.
*
*
* string user_id = 17;
* @param value The userId to set.
* @return This builder for chaining.
*/
public Builder setUserId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
userId_ = value;
onChanged();
return this;
}
/**
*
* The user the task belongs to.
*
*
* string user_id = 17;
* @return This builder for chaining.
*/
public Builder clearUserId() {
userId_ = getDefaultInstance().getUserId();
onChanged();
return this;
}
/**
*
* The user the task belongs to.
*
*
* string user_id = 17;
* @param value The bytes for userId to set.
* @return This builder for chaining.
*/
public Builder setUserIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
userId_ = value;
onChanged();
return this;
}
private java.lang.Object labelOrderId_ = "";
/**
*
* The label order the task belongs to.
*
*
* string label_order_id = 18;
* @return The labelOrderId.
*/
public java.lang.String getLabelOrderId() {
java.lang.Object ref = labelOrderId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
labelOrderId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The label order the task belongs to.
*
*
* string label_order_id = 18;
* @return The bytes for labelOrderId.
*/
public com.google.protobuf.ByteString
getLabelOrderIdBytes() {
java.lang.Object ref = labelOrderId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
labelOrderId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The label order the task belongs to.
*
*
* string label_order_id = 18;
* @param value The labelOrderId to set.
* @return This builder for chaining.
*/
public Builder setLabelOrderId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
labelOrderId_ = value;
onChanged();
return this;
}
/**
*
* The label order the task belongs to.
*
*
* string label_order_id = 18;
* @return This builder for chaining.
*/
public Builder clearLabelOrderId() {
labelOrderId_ = getDefaultInstance().getLabelOrderId();
onChanged();
return this;
}
/**
*
* The label order the task belongs to.
*
*
* string label_order_id = 18;
* @param value The bytes for labelOrderId to set.
* @return This builder for chaining.
*/
public Builder setLabelOrderIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
labelOrderId_ = value;
onChanged();
return this;
}
private java.util.List concepts_ =
java.util.Collections.emptyList();
private void ensureConceptsIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
concepts_ = new java.util.ArrayList(concepts_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.clarifai.grpc.api.TaskConcept, com.clarifai.grpc.api.TaskConcept.Builder, com.clarifai.grpc.api.TaskConceptOrBuilder> conceptsBuilder_;
/**
*
* Ignore Task.concept_ids field if Task.TaskConcept are supplied.
*
*
* repeated .clarifai.api.TaskConcept concepts = 19;
*/
public java.util.List getConceptsList() {
if (conceptsBuilder_ == null) {
return java.util.Collections.unmodifiableList(concepts_);
} else {
return conceptsBuilder_.getMessageList();
}
}
/**
*
* Ignore Task.concept_ids field if Task.TaskConcept are supplied.
*
*
* repeated .clarifai.api.TaskConcept concepts = 19;
*/
public int getConceptsCount() {
if (conceptsBuilder_ == null) {
return concepts_.size();
} else {
return conceptsBuilder_.getCount();
}
}
/**
*
* Ignore Task.concept_ids field if Task.TaskConcept are supplied.
*
*
* repeated .clarifai.api.TaskConcept concepts = 19;
*/
public com.clarifai.grpc.api.TaskConcept getConcepts(int index) {
if (conceptsBuilder_ == null) {
return concepts_.get(index);
} else {
return conceptsBuilder_.getMessage(index);
}
}
/**
*
* Ignore Task.concept_ids field if Task.TaskConcept are supplied.
*
*
* repeated .clarifai.api.TaskConcept concepts = 19;
*/
public Builder setConcepts(
int index, com.clarifai.grpc.api.TaskConcept value) {
if (conceptsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureConceptsIsMutable();
concepts_.set(index, value);
onChanged();
} else {
conceptsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Ignore Task.concept_ids field if Task.TaskConcept are supplied.
*
*
* repeated .clarifai.api.TaskConcept concepts = 19;
*/
public Builder setConcepts(
int index, com.clarifai.grpc.api.TaskConcept.Builder builderForValue) {
if (conceptsBuilder_ == null) {
ensureConceptsIsMutable();
concepts_.set(index, builderForValue.build());
onChanged();
} else {
conceptsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Ignore Task.concept_ids field if Task.TaskConcept are supplied.
*
*
* repeated .clarifai.api.TaskConcept concepts = 19;
*/
public Builder addConcepts(com.clarifai.grpc.api.TaskConcept value) {
if (conceptsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureConceptsIsMutable();
concepts_.add(value);
onChanged();
} else {
conceptsBuilder_.addMessage(value);
}
return this;
}
/**
*
* Ignore Task.concept_ids field if Task.TaskConcept are supplied.
*
*
* repeated .clarifai.api.TaskConcept concepts = 19;
*/
public Builder addConcepts(
int index, com.clarifai.grpc.api.TaskConcept value) {
if (conceptsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureConceptsIsMutable();
concepts_.add(index, value);
onChanged();
} else {
conceptsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Ignore Task.concept_ids field if Task.TaskConcept are supplied.
*
*
* repeated .clarifai.api.TaskConcept concepts = 19;
*/
public Builder addConcepts(
com.clarifai.grpc.api.TaskConcept.Builder builderForValue) {
if (conceptsBuilder_ == null) {
ensureConceptsIsMutable();
concepts_.add(builderForValue.build());
onChanged();
} else {
conceptsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Ignore Task.concept_ids field if Task.TaskConcept are supplied.
*
*
* repeated .clarifai.api.TaskConcept concepts = 19;
*/
public Builder addConcepts(
int index, com.clarifai.grpc.api.TaskConcept.Builder builderForValue) {
if (conceptsBuilder_ == null) {
ensureConceptsIsMutable();
concepts_.add(index, builderForValue.build());
onChanged();
} else {
conceptsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Ignore Task.concept_ids field if Task.TaskConcept are supplied.
*
*
* repeated .clarifai.api.TaskConcept concepts = 19;
*/
public Builder addAllConcepts(
java.lang.Iterable extends com.clarifai.grpc.api.TaskConcept> values) {
if (conceptsBuilder_ == null) {
ensureConceptsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, concepts_);
onChanged();
} else {
conceptsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Ignore Task.concept_ids field if Task.TaskConcept are supplied.
*
*
* repeated .clarifai.api.TaskConcept concepts = 19;
*/
public Builder clearConcepts() {
if (conceptsBuilder_ == null) {
concepts_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
conceptsBuilder_.clear();
}
return this;
}
/**
*
* Ignore Task.concept_ids field if Task.TaskConcept are supplied.
*
*
* repeated .clarifai.api.TaskConcept concepts = 19;
*/
public Builder removeConcepts(int index) {
if (conceptsBuilder_ == null) {
ensureConceptsIsMutable();
concepts_.remove(index);
onChanged();
} else {
conceptsBuilder_.remove(index);
}
return this;
}
/**
*
* Ignore Task.concept_ids field if Task.TaskConcept are supplied.
*
*
* repeated .clarifai.api.TaskConcept concepts = 19;
*/
public com.clarifai.grpc.api.TaskConcept.Builder getConceptsBuilder(
int index) {
return getConceptsFieldBuilder().getBuilder(index);
}
/**
*
* Ignore Task.concept_ids field if Task.TaskConcept are supplied.
*
*
* repeated .clarifai.api.TaskConcept concepts = 19;
*/
public com.clarifai.grpc.api.TaskConceptOrBuilder getConceptsOrBuilder(
int index) {
if (conceptsBuilder_ == null) {
return concepts_.get(index); } else {
return conceptsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Ignore Task.concept_ids field if Task.TaskConcept are supplied.
*
*
* repeated .clarifai.api.TaskConcept concepts = 19;
*/
public java.util.List extends com.clarifai.grpc.api.TaskConceptOrBuilder>
getConceptsOrBuilderList() {
if (conceptsBuilder_ != null) {
return conceptsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(concepts_);
}
}
/**
*
* Ignore Task.concept_ids field if Task.TaskConcept are supplied.
*
*
* repeated .clarifai.api.TaskConcept concepts = 19;
*/
public com.clarifai.grpc.api.TaskConcept.Builder addConceptsBuilder() {
return getConceptsFieldBuilder().addBuilder(
com.clarifai.grpc.api.TaskConcept.getDefaultInstance());
}
/**
*
* Ignore Task.concept_ids field if Task.TaskConcept are supplied.
*
*
* repeated .clarifai.api.TaskConcept concepts = 19;
*/
public com.clarifai.grpc.api.TaskConcept.Builder addConceptsBuilder(
int index) {
return getConceptsFieldBuilder().addBuilder(
index, com.clarifai.grpc.api.TaskConcept.getDefaultInstance());
}
/**
*
* Ignore Task.concept_ids field if Task.TaskConcept are supplied.
*
*
* repeated .clarifai.api.TaskConcept concepts = 19;
*/
public java.util.List
getConceptsBuilderList() {
return getConceptsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.clarifai.grpc.api.TaskConcept, com.clarifai.grpc.api.TaskConcept.Builder, com.clarifai.grpc.api.TaskConceptOrBuilder>
getConceptsFieldBuilder() {
if (conceptsBuilder_ == null) {
conceptsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.clarifai.grpc.api.TaskConcept, com.clarifai.grpc.api.TaskConcept.Builder, com.clarifai.grpc.api.TaskConceptOrBuilder>(
concepts_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
concepts_ = null;
}
return conceptsBuilder_;
}
private boolean deletePreviousAnnotations_ ;
/**
*
* Specify whether existing Annotations within the same app that are generated by other auto annotation tasks
* with the specified Concept from the selected Model or Workflow should deleted before executing the Task
*
*
* bool delete_previous_annotations = 20;
* @return The deletePreviousAnnotations.
*/
@java.lang.Override
public boolean getDeletePreviousAnnotations() {
return deletePreviousAnnotations_;
}
/**
*
* Specify whether existing Annotations within the same app that are generated by other auto annotation tasks
* with the specified Concept from the selected Model or Workflow should deleted before executing the Task
*
*
* bool delete_previous_annotations = 20;
* @param value The deletePreviousAnnotations to set.
* @return This builder for chaining.
*/
public Builder setDeletePreviousAnnotations(boolean value) {
deletePreviousAnnotations_ = value;
onChanged();
return this;
}
/**
*
* Specify whether existing Annotations within the same app that are generated by other auto annotation tasks
* with the specified Concept from the selected Model or Workflow should deleted before executing the Task
*
*
* bool delete_previous_annotations = 20;
* @return This builder for chaining.
*/
public Builder clearDeletePreviousAnnotations() {
deletePreviousAnnotations_ = false;
onChanged();
return this;
}
private com.clarifai.grpc.api.TaskMetrics metrics_;
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.TaskMetrics, com.clarifai.grpc.api.TaskMetrics.Builder, com.clarifai.grpc.api.TaskMetricsOrBuilder> metricsBuilder_;
/**
*
* Tasks metrics are filled in upon user-request.
*
*
* .clarifai.api.TaskMetrics metrics = 21;
* @return Whether the metrics field is set.
*/
public boolean hasMetrics() {
return metricsBuilder_ != null || metrics_ != null;
}
/**
*
* Tasks metrics are filled in upon user-request.
*
*
* .clarifai.api.TaskMetrics metrics = 21;
* @return The metrics.
*/
public com.clarifai.grpc.api.TaskMetrics getMetrics() {
if (metricsBuilder_ == null) {
return metrics_ == null ? com.clarifai.grpc.api.TaskMetrics.getDefaultInstance() : metrics_;
} else {
return metricsBuilder_.getMessage();
}
}
/**
*
* Tasks metrics are filled in upon user-request.
*
*
* .clarifai.api.TaskMetrics metrics = 21;
*/
public Builder setMetrics(com.clarifai.grpc.api.TaskMetrics value) {
if (metricsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
metrics_ = value;
onChanged();
} else {
metricsBuilder_.setMessage(value);
}
return this;
}
/**
*
* Tasks metrics are filled in upon user-request.
*
*
* .clarifai.api.TaskMetrics metrics = 21;
*/
public Builder setMetrics(
com.clarifai.grpc.api.TaskMetrics.Builder builderForValue) {
if (metricsBuilder_ == null) {
metrics_ = builderForValue.build();
onChanged();
} else {
metricsBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Tasks metrics are filled in upon user-request.
*
*
* .clarifai.api.TaskMetrics metrics = 21;
*/
public Builder mergeMetrics(com.clarifai.grpc.api.TaskMetrics value) {
if (metricsBuilder_ == null) {
if (metrics_ != null) {
metrics_ =
com.clarifai.grpc.api.TaskMetrics.newBuilder(metrics_).mergeFrom(value).buildPartial();
} else {
metrics_ = value;
}
onChanged();
} else {
metricsBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Tasks metrics are filled in upon user-request.
*
*
* .clarifai.api.TaskMetrics metrics = 21;
*/
public Builder clearMetrics() {
if (metricsBuilder_ == null) {
metrics_ = null;
onChanged();
} else {
metrics_ = null;
metricsBuilder_ = null;
}
return this;
}
/**
*
* Tasks metrics are filled in upon user-request.
*
*
* .clarifai.api.TaskMetrics metrics = 21;
*/
public com.clarifai.grpc.api.TaskMetrics.Builder getMetricsBuilder() {
onChanged();
return getMetricsFieldBuilder().getBuilder();
}
/**
*
* Tasks metrics are filled in upon user-request.
*
*
* .clarifai.api.TaskMetrics metrics = 21;
*/
public com.clarifai.grpc.api.TaskMetricsOrBuilder getMetricsOrBuilder() {
if (metricsBuilder_ != null) {
return metricsBuilder_.getMessageOrBuilder();
} else {
return metrics_ == null ?
com.clarifai.grpc.api.TaskMetrics.getDefaultInstance() : metrics_;
}
}
/**
*
* Tasks metrics are filled in upon user-request.
*
*
* .clarifai.api.TaskMetrics metrics = 21;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.TaskMetrics, com.clarifai.grpc.api.TaskMetrics.Builder, com.clarifai.grpc.api.TaskMetricsOrBuilder>
getMetricsFieldBuilder() {
if (metricsBuilder_ == null) {
metricsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.TaskMetrics, com.clarifai.grpc.api.TaskMetrics.Builder, com.clarifai.grpc.api.TaskMetricsOrBuilder>(
getMetrics(),
getParentForChildren(),
isClean());
metrics_ = null;
}
return metricsBuilder_;
}
@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.Task)
}
// @@protoc_insertion_point(class_scope:clarifai.api.Task)
private static final com.clarifai.grpc.api.Task DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.clarifai.grpc.api.Task();
}
public static com.clarifai.grpc.api.Task getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Task parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Task(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.Task getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}