com.clarifai.grpc.api.Collector 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;
/**
*
* Collector is a data pathway from a CollectorSource to an app to collect data automatically.
* For example, a CollectorSource
*
*
* Protobuf type {@code clarifai.api.Collector}
*/
public final class Collector extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:clarifai.api.Collector)
CollectorOrBuilder {
private static final long serialVersionUID = 0L;
// Use Collector.newBuilder() to construct.
private Collector(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Collector() {
id_ = "";
description_ = "";
preQueueWorkflowId_ = "";
postQueueWorkflowId_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Collector();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Collector(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
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: {
java.lang.String s = input.readStringRequireUtf8();
description_ = s;
break;
}
case 26: {
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 34: {
java.lang.String s = input.readStringRequireUtf8();
preQueueWorkflowId_ = s;
break;
}
case 42: {
java.lang.String s = input.readStringRequireUtf8();
postQueueWorkflowId_ = s;
break;
}
case 50: {
com.clarifai.grpc.api.CollectorSource.Builder subBuilder = null;
if (collectorSource_ != null) {
subBuilder = collectorSource_.toBuilder();
}
collectorSource_ = input.readMessage(com.clarifai.grpc.api.CollectorSource.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(collectorSource_);
collectorSource_ = subBuilder.buildPartial();
}
break;
}
case 58: {
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 69: {
preQueueRandomSample_ = input.readFloat();
break;
}
case 72: {
collectOutputs_ = input.readBool();
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 {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Collector_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Collector_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.Collector.class, com.clarifai.grpc.api.Collector.Builder.class);
}
public static final int ID_FIELD_NUMBER = 1;
private volatile java.lang.Object id_;
/**
*
* Unique ID for the collector.
*
*
* 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 collector.
*
*
* 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 DESCRIPTION_FIELD_NUMBER = 2;
private volatile java.lang.Object description_;
/**
*
* Human readable description for the collector.
*
*
* string description = 2;
* @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;
}
}
/**
*
* Human readable description for the collector.
*
*
* string description = 2;
* @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 CREATED_AT_FIELD_NUMBER = 3;
private com.google.protobuf.Timestamp createdAt_;
/**
*
* When the collector is created. We follow the XXXX timestamp
* format. We use https://www.ietf.org/rfc/rfc3339.txt format:
* "2006-01-02T15:04:05.999999Z" so you can expect results like
* the following from the API:
* "2017-04-11T21:50:50.223962Z"
*
*
* .google.protobuf.Timestamp created_at = 3;
* @return Whether the createdAt field is set.
*/
@java.lang.Override
public boolean hasCreatedAt() {
return createdAt_ != null;
}
/**
*
* When the collector is created. We follow the XXXX timestamp
* format. We use https://www.ietf.org/rfc/rfc3339.txt format:
* "2006-01-02T15:04:05.999999Z" so you can expect results like
* the following from the API:
* "2017-04-11T21:50:50.223962Z"
*
*
* .google.protobuf.Timestamp created_at = 3;
* @return The createdAt.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getCreatedAt() {
return createdAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_;
}
/**
*
* When the collector is created. We follow the XXXX timestamp
* format. We use https://www.ietf.org/rfc/rfc3339.txt format:
* "2006-01-02T15:04:05.999999Z" so you can expect results like
* the following from the API:
* "2017-04-11T21:50:50.223962Z"
*
*
* .google.protobuf.Timestamp created_at = 3;
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getCreatedAtOrBuilder() {
return getCreatedAt();
}
public static final int PRE_QUEUE_WORKFLOW_ID_FIELD_NUMBER = 4;
private volatile java.lang.Object preQueueWorkflowId_;
/**
*
* This is a workflow to run inline in model predict calls. It should ONLY have very fast and
* light-weight models in it as it will effect the speed of the predictions being made.
* This workflow's purpose is to filter down the inputs to queue for the collector to process.
* The input to this workflow is going to be the OUTPUT of the model, not the input to the model
* since we want to encourage having fast workflows that can also take advantage of the model
* outputs to make deciions (for example: thresholding based on concepts). If the workflow
* output has any field that is non-empty then the input will be queued for the collector
* to process with the post_queue_workflow_id.
* As a simpler alternative, pre_queue_random_sample can be set to just use random sampling instead.
*
*
* string pre_queue_workflow_id = 4;
* @return The preQueueWorkflowId.
*/
@java.lang.Override
public java.lang.String getPreQueueWorkflowId() {
java.lang.Object ref = preQueueWorkflowId_;
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();
preQueueWorkflowId_ = s;
return s;
}
}
/**
*
* This is a workflow to run inline in model predict calls. It should ONLY have very fast and
* light-weight models in it as it will effect the speed of the predictions being made.
* This workflow's purpose is to filter down the inputs to queue for the collector to process.
* The input to this workflow is going to be the OUTPUT of the model, not the input to the model
* since we want to encourage having fast workflows that can also take advantage of the model
* outputs to make deciions (for example: thresholding based on concepts). If the workflow
* output has any field that is non-empty then the input will be queued for the collector
* to process with the post_queue_workflow_id.
* As a simpler alternative, pre_queue_random_sample can be set to just use random sampling instead.
*
*
* string pre_queue_workflow_id = 4;
* @return The bytes for preQueueWorkflowId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getPreQueueWorkflowIdBytes() {
java.lang.Object ref = preQueueWorkflowId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
preQueueWorkflowId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PRE_QUEUE_RANDOM_SAMPLE_FIELD_NUMBER = 8;
private float preQueueRandomSample_;
/**
*
* Instead of needing to create a new workflow for pre_queue_workflow_id, if just random sampling
* of the model inputs is required, then pre_queue_random_sample can be set to a value from (0-1]
* to denote the fraction of inputs to collect.
*
*
* float pre_queue_random_sample = 8;
* @return The preQueueRandomSample.
*/
@java.lang.Override
public float getPreQueueRandomSample() {
return preQueueRandomSample_;
}
public static final int POST_QUEUE_WORKFLOW_ID_FIELD_NUMBER = 5;
private volatile java.lang.Object postQueueWorkflowId_;
/**
*
* A workflow to run to after the collector is processing the queued input. This workflow
* uses the original input to the model as input to the workflow so that you can run additional
* models as well on that input to decide whether to queue the model or not. If the workflow
* output has any field that is non-empty then it will be passed on to POST /inputs to
* the destination app.
*
*
* string post_queue_workflow_id = 5;
* @return The postQueueWorkflowId.
*/
@java.lang.Override
public java.lang.String getPostQueueWorkflowId() {
java.lang.Object ref = postQueueWorkflowId_;
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();
postQueueWorkflowId_ = s;
return s;
}
}
/**
*
* A workflow to run to after the collector is processing the queued input. This workflow
* uses the original input to the model as input to the workflow so that you can run additional
* models as well on that input to decide whether to queue the model or not. If the workflow
* output has any field that is non-empty then it will be passed on to POST /inputs to
* the destination app.
*
*
* string post_queue_workflow_id = 5;
* @return The bytes for postQueueWorkflowId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getPostQueueWorkflowIdBytes() {
java.lang.Object ref = postQueueWorkflowId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
postQueueWorkflowId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int COLLECTOR_SOURCE_FIELD_NUMBER = 6;
private com.clarifai.grpc.api.CollectorSource collectorSource_;
/**
*
* The source of the collector to feed data into this app.
* Note(zeiler): if we wanted more than one source per collector we could make this it's own
* object and introduce /collectors/{collector_id}/sources
* We will keep it simple for now and have just one source per collector since a user can make
* more than one collector in the same app anyways.
*
*
* .clarifai.api.CollectorSource collector_source = 6;
* @return Whether the collectorSource field is set.
*/
@java.lang.Override
public boolean hasCollectorSource() {
return collectorSource_ != null;
}
/**
*
* The source of the collector to feed data into this app.
* Note(zeiler): if we wanted more than one source per collector we could make this it's own
* object and introduce /collectors/{collector_id}/sources
* We will keep it simple for now and have just one source per collector since a user can make
* more than one collector in the same app anyways.
*
*
* .clarifai.api.CollectorSource collector_source = 6;
* @return The collectorSource.
*/
@java.lang.Override
public com.clarifai.grpc.api.CollectorSource getCollectorSource() {
return collectorSource_ == null ? com.clarifai.grpc.api.CollectorSource.getDefaultInstance() : collectorSource_;
}
/**
*
* The source of the collector to feed data into this app.
* Note(zeiler): if we wanted more than one source per collector we could make this it's own
* object and introduce /collectors/{collector_id}/sources
* We will keep it simple for now and have just one source per collector since a user can make
* more than one collector in the same app anyways.
*
*
* .clarifai.api.CollectorSource collector_source = 6;
*/
@java.lang.Override
public com.clarifai.grpc.api.CollectorSourceOrBuilder getCollectorSourceOrBuilder() {
return getCollectorSource();
}
public static final int STATUS_FIELD_NUMBER = 7;
private com.clarifai.grpc.api.status.Status status_;
/**
*
* Status for the collector. This allows you to pause a collector without having to delete it as
* an example.
*
*
* .clarifai.api.status.Status status = 7;
* @return Whether the status field is set.
*/
@java.lang.Override
public boolean hasStatus() {
return status_ != null;
}
/**
*
* Status for the collector. This allows you to pause a collector without having to delete it as
* an example.
*
*
* .clarifai.api.status.Status status = 7;
* @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 for the collector. This allows you to pause a collector without having to delete it as
* an example.
*
*
* .clarifai.api.status.Status status = 7;
*/
@java.lang.Override
public com.clarifai.grpc.api.status.StatusOrBuilder getStatusOrBuilder() {
return getStatus();
}
public static final int COLLECT_OUTPUTS_FIELD_NUMBER = 9;
private boolean collectOutputs_;
/**
*
* Whether to collect outputs or not. Default is false. If selected, outputs from the
* original model predict call will be posted as annotations along with the input with success status.
*
*
* bool collect_outputs = 9;
* @return The collectOutputs.
*/
@java.lang.Override
public boolean getCollectOutputs() {
return collectOutputs_;
}
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_);
}
if (createdAt_ != null) {
output.writeMessage(3, getCreatedAt());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(preQueueWorkflowId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, preQueueWorkflowId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(postQueueWorkflowId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, postQueueWorkflowId_);
}
if (collectorSource_ != null) {
output.writeMessage(6, getCollectorSource());
}
if (status_ != null) {
output.writeMessage(7, getStatus());
}
if (java.lang.Float.floatToRawIntBits(preQueueRandomSample_) != 0) {
output.writeFloat(8, preQueueRandomSample_);
}
if (collectOutputs_ != false) {
output.writeBool(9, collectOutputs_);
}
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_);
}
if (createdAt_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getCreatedAt());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(preQueueWorkflowId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, preQueueWorkflowId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(postQueueWorkflowId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, postQueueWorkflowId_);
}
if (collectorSource_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, getCollectorSource());
}
if (status_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, getStatus());
}
if (java.lang.Float.floatToRawIntBits(preQueueRandomSample_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(8, preQueueRandomSample_);
}
if (collectOutputs_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(9, collectOutputs_);
}
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.Collector)) {
return super.equals(obj);
}
com.clarifai.grpc.api.Collector other = (com.clarifai.grpc.api.Collector) obj;
if (!getId()
.equals(other.getId())) return false;
if (!getDescription()
.equals(other.getDescription())) return false;
if (hasCreatedAt() != other.hasCreatedAt()) return false;
if (hasCreatedAt()) {
if (!getCreatedAt()
.equals(other.getCreatedAt())) return false;
}
if (!getPreQueueWorkflowId()
.equals(other.getPreQueueWorkflowId())) return false;
if (java.lang.Float.floatToIntBits(getPreQueueRandomSample())
!= java.lang.Float.floatToIntBits(
other.getPreQueueRandomSample())) return false;
if (!getPostQueueWorkflowId()
.equals(other.getPostQueueWorkflowId())) return false;
if (hasCollectorSource() != other.hasCollectorSource()) return false;
if (hasCollectorSource()) {
if (!getCollectorSource()
.equals(other.getCollectorSource())) return false;
}
if (hasStatus() != other.hasStatus()) return false;
if (hasStatus()) {
if (!getStatus()
.equals(other.getStatus())) return false;
}
if (getCollectOutputs()
!= other.getCollectOutputs()) 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();
hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
if (hasCreatedAt()) {
hash = (37 * hash) + CREATED_AT_FIELD_NUMBER;
hash = (53 * hash) + getCreatedAt().hashCode();
}
hash = (37 * hash) + PRE_QUEUE_WORKFLOW_ID_FIELD_NUMBER;
hash = (53 * hash) + getPreQueueWorkflowId().hashCode();
hash = (37 * hash) + PRE_QUEUE_RANDOM_SAMPLE_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(
getPreQueueRandomSample());
hash = (37 * hash) + POST_QUEUE_WORKFLOW_ID_FIELD_NUMBER;
hash = (53 * hash) + getPostQueueWorkflowId().hashCode();
if (hasCollectorSource()) {
hash = (37 * hash) + COLLECTOR_SOURCE_FIELD_NUMBER;
hash = (53 * hash) + getCollectorSource().hashCode();
}
if (hasStatus()) {
hash = (37 * hash) + STATUS_FIELD_NUMBER;
hash = (53 * hash) + getStatus().hashCode();
}
hash = (37 * hash) + COLLECT_OUTPUTS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getCollectOutputs());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.clarifai.grpc.api.Collector parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.Collector 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.Collector parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.Collector 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.Collector parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.Collector parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.clarifai.grpc.api.Collector parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.Collector 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.Collector parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.Collector 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.Collector parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.Collector 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.Collector 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;
}
/**
*
* Collector is a data pathway from a CollectorSource to an app to collect data automatically.
* For example, a CollectorSource
*
*
* Protobuf type {@code clarifai.api.Collector}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:clarifai.api.Collector)
com.clarifai.grpc.api.CollectorOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Collector_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Collector_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.Collector.class, com.clarifai.grpc.api.Collector.Builder.class);
}
// Construct using com.clarifai.grpc.api.Collector.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
id_ = "";
description_ = "";
if (createdAtBuilder_ == null) {
createdAt_ = null;
} else {
createdAt_ = null;
createdAtBuilder_ = null;
}
preQueueWorkflowId_ = "";
preQueueRandomSample_ = 0F;
postQueueWorkflowId_ = "";
if (collectorSourceBuilder_ == null) {
collectorSource_ = null;
} else {
collectorSource_ = null;
collectorSourceBuilder_ = null;
}
if (statusBuilder_ == null) {
status_ = null;
} else {
status_ = null;
statusBuilder_ = null;
}
collectOutputs_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Collector_descriptor;
}
@java.lang.Override
public com.clarifai.grpc.api.Collector getDefaultInstanceForType() {
return com.clarifai.grpc.api.Collector.getDefaultInstance();
}
@java.lang.Override
public com.clarifai.grpc.api.Collector build() {
com.clarifai.grpc.api.Collector result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.clarifai.grpc.api.Collector buildPartial() {
com.clarifai.grpc.api.Collector result = new com.clarifai.grpc.api.Collector(this);
result.id_ = id_;
result.description_ = description_;
if (createdAtBuilder_ == null) {
result.createdAt_ = createdAt_;
} else {
result.createdAt_ = createdAtBuilder_.build();
}
result.preQueueWorkflowId_ = preQueueWorkflowId_;
result.preQueueRandomSample_ = preQueueRandomSample_;
result.postQueueWorkflowId_ = postQueueWorkflowId_;
if (collectorSourceBuilder_ == null) {
result.collectorSource_ = collectorSource_;
} else {
result.collectorSource_ = collectorSourceBuilder_.build();
}
if (statusBuilder_ == null) {
result.status_ = status_;
} else {
result.status_ = statusBuilder_.build();
}
result.collectOutputs_ = collectOutputs_;
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.Collector) {
return mergeFrom((com.clarifai.grpc.api.Collector)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.clarifai.grpc.api.Collector other) {
if (other == com.clarifai.grpc.api.Collector.getDefaultInstance()) return this;
if (!other.getId().isEmpty()) {
id_ = other.id_;
onChanged();
}
if (!other.getDescription().isEmpty()) {
description_ = other.description_;
onChanged();
}
if (other.hasCreatedAt()) {
mergeCreatedAt(other.getCreatedAt());
}
if (!other.getPreQueueWorkflowId().isEmpty()) {
preQueueWorkflowId_ = other.preQueueWorkflowId_;
onChanged();
}
if (other.getPreQueueRandomSample() != 0F) {
setPreQueueRandomSample(other.getPreQueueRandomSample());
}
if (!other.getPostQueueWorkflowId().isEmpty()) {
postQueueWorkflowId_ = other.postQueueWorkflowId_;
onChanged();
}
if (other.hasCollectorSource()) {
mergeCollectorSource(other.getCollectorSource());
}
if (other.hasStatus()) {
mergeStatus(other.getStatus());
}
if (other.getCollectOutputs() != false) {
setCollectOutputs(other.getCollectOutputs());
}
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.Collector parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.clarifai.grpc.api.Collector) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object id_ = "";
/**
*
* Unique ID for the collector.
*
*
* 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 collector.
*
*
* 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 collector.
*
*
* 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 collector.
*
*
* string id = 1;
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
onChanged();
return this;
}
/**
*
* Unique ID for the collector.
*
*
* 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 java.lang.Object description_ = "";
/**
*
* Human readable description for the collector.
*
*
* string description = 2;
* @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;
}
}
/**
*
* Human readable description for the collector.
*
*
* string description = 2;
* @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;
}
}
/**
*
* Human readable description for the collector.
*
*
* string description = 2;
* @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;
}
/**
*
* Human readable description for the collector.
*
*
* string description = 2;
* @return This builder for chaining.
*/
public Builder clearDescription() {
description_ = getDefaultInstance().getDescription();
onChanged();
return this;
}
/**
*
* Human readable description for the collector.
*
*
* string description = 2;
* @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.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 collector is created. We follow the XXXX timestamp
* format. We use https://www.ietf.org/rfc/rfc3339.txt format:
* "2006-01-02T15:04:05.999999Z" so you can expect results like
* the following from the API:
* "2017-04-11T21:50:50.223962Z"
*
*
* .google.protobuf.Timestamp created_at = 3;
* @return Whether the createdAt field is set.
*/
public boolean hasCreatedAt() {
return createdAtBuilder_ != null || createdAt_ != null;
}
/**
*
* When the collector is created. We follow the XXXX timestamp
* format. We use https://www.ietf.org/rfc/rfc3339.txt format:
* "2006-01-02T15:04:05.999999Z" so you can expect results like
* the following from the API:
* "2017-04-11T21:50:50.223962Z"
*
*
* .google.protobuf.Timestamp created_at = 3;
* @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 collector is created. We follow the XXXX timestamp
* format. We use https://www.ietf.org/rfc/rfc3339.txt format:
* "2006-01-02T15:04:05.999999Z" so you can expect results like
* the following from the API:
* "2017-04-11T21:50:50.223962Z"
*
*
* .google.protobuf.Timestamp created_at = 3;
*/
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 collector is created. We follow the XXXX timestamp
* format. We use https://www.ietf.org/rfc/rfc3339.txt format:
* "2006-01-02T15:04:05.999999Z" so you can expect results like
* the following from the API:
* "2017-04-11T21:50:50.223962Z"
*
*
* .google.protobuf.Timestamp created_at = 3;
*/
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 collector is created. We follow the XXXX timestamp
* format. We use https://www.ietf.org/rfc/rfc3339.txt format:
* "2006-01-02T15:04:05.999999Z" so you can expect results like
* the following from the API:
* "2017-04-11T21:50:50.223962Z"
*
*
* .google.protobuf.Timestamp created_at = 3;
*/
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 collector is created. We follow the XXXX timestamp
* format. We use https://www.ietf.org/rfc/rfc3339.txt format:
* "2006-01-02T15:04:05.999999Z" so you can expect results like
* the following from the API:
* "2017-04-11T21:50:50.223962Z"
*
*
* .google.protobuf.Timestamp created_at = 3;
*/
public Builder clearCreatedAt() {
if (createdAtBuilder_ == null) {
createdAt_ = null;
onChanged();
} else {
createdAt_ = null;
createdAtBuilder_ = null;
}
return this;
}
/**
*
* When the collector is created. We follow the XXXX timestamp
* format. We use https://www.ietf.org/rfc/rfc3339.txt format:
* "2006-01-02T15:04:05.999999Z" so you can expect results like
* the following from the API:
* "2017-04-11T21:50:50.223962Z"
*
*
* .google.protobuf.Timestamp created_at = 3;
*/
public com.google.protobuf.Timestamp.Builder getCreatedAtBuilder() {
onChanged();
return getCreatedAtFieldBuilder().getBuilder();
}
/**
*
* When the collector is created. We follow the XXXX timestamp
* format. We use https://www.ietf.org/rfc/rfc3339.txt format:
* "2006-01-02T15:04:05.999999Z" so you can expect results like
* the following from the API:
* "2017-04-11T21:50:50.223962Z"
*
*
* .google.protobuf.Timestamp created_at = 3;
*/
public com.google.protobuf.TimestampOrBuilder getCreatedAtOrBuilder() {
if (createdAtBuilder_ != null) {
return createdAtBuilder_.getMessageOrBuilder();
} else {
return createdAt_ == null ?
com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_;
}
}
/**
*
* When the collector is created. We follow the XXXX timestamp
* format. We use https://www.ietf.org/rfc/rfc3339.txt format:
* "2006-01-02T15:04:05.999999Z" so you can expect results like
* the following from the API:
* "2017-04-11T21:50:50.223962Z"
*
*
* .google.protobuf.Timestamp created_at = 3;
*/
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 java.lang.Object preQueueWorkflowId_ = "";
/**
*
* This is a workflow to run inline in model predict calls. It should ONLY have very fast and
* light-weight models in it as it will effect the speed of the predictions being made.
* This workflow's purpose is to filter down the inputs to queue for the collector to process.
* The input to this workflow is going to be the OUTPUT of the model, not the input to the model
* since we want to encourage having fast workflows that can also take advantage of the model
* outputs to make deciions (for example: thresholding based on concepts). If the workflow
* output has any field that is non-empty then the input will be queued for the collector
* to process with the post_queue_workflow_id.
* As a simpler alternative, pre_queue_random_sample can be set to just use random sampling instead.
*
*
* string pre_queue_workflow_id = 4;
* @return The preQueueWorkflowId.
*/
public java.lang.String getPreQueueWorkflowId() {
java.lang.Object ref = preQueueWorkflowId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
preQueueWorkflowId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* This is a workflow to run inline in model predict calls. It should ONLY have very fast and
* light-weight models in it as it will effect the speed of the predictions being made.
* This workflow's purpose is to filter down the inputs to queue for the collector to process.
* The input to this workflow is going to be the OUTPUT of the model, not the input to the model
* since we want to encourage having fast workflows that can also take advantage of the model
* outputs to make deciions (for example: thresholding based on concepts). If the workflow
* output has any field that is non-empty then the input will be queued for the collector
* to process with the post_queue_workflow_id.
* As a simpler alternative, pre_queue_random_sample can be set to just use random sampling instead.
*
*
* string pre_queue_workflow_id = 4;
* @return The bytes for preQueueWorkflowId.
*/
public com.google.protobuf.ByteString
getPreQueueWorkflowIdBytes() {
java.lang.Object ref = preQueueWorkflowId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
preQueueWorkflowId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* This is a workflow to run inline in model predict calls. It should ONLY have very fast and
* light-weight models in it as it will effect the speed of the predictions being made.
* This workflow's purpose is to filter down the inputs to queue for the collector to process.
* The input to this workflow is going to be the OUTPUT of the model, not the input to the model
* since we want to encourage having fast workflows that can also take advantage of the model
* outputs to make deciions (for example: thresholding based on concepts). If the workflow
* output has any field that is non-empty then the input will be queued for the collector
* to process with the post_queue_workflow_id.
* As a simpler alternative, pre_queue_random_sample can be set to just use random sampling instead.
*
*
* string pre_queue_workflow_id = 4;
* @param value The preQueueWorkflowId to set.
* @return This builder for chaining.
*/
public Builder setPreQueueWorkflowId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
preQueueWorkflowId_ = value;
onChanged();
return this;
}
/**
*
* This is a workflow to run inline in model predict calls. It should ONLY have very fast and
* light-weight models in it as it will effect the speed of the predictions being made.
* This workflow's purpose is to filter down the inputs to queue for the collector to process.
* The input to this workflow is going to be the OUTPUT of the model, not the input to the model
* since we want to encourage having fast workflows that can also take advantage of the model
* outputs to make deciions (for example: thresholding based on concepts). If the workflow
* output has any field that is non-empty then the input will be queued for the collector
* to process with the post_queue_workflow_id.
* As a simpler alternative, pre_queue_random_sample can be set to just use random sampling instead.
*
*
* string pre_queue_workflow_id = 4;
* @return This builder for chaining.
*/
public Builder clearPreQueueWorkflowId() {
preQueueWorkflowId_ = getDefaultInstance().getPreQueueWorkflowId();
onChanged();
return this;
}
/**
*
* This is a workflow to run inline in model predict calls. It should ONLY have very fast and
* light-weight models in it as it will effect the speed of the predictions being made.
* This workflow's purpose is to filter down the inputs to queue for the collector to process.
* The input to this workflow is going to be the OUTPUT of the model, not the input to the model
* since we want to encourage having fast workflows that can also take advantage of the model
* outputs to make deciions (for example: thresholding based on concepts). If the workflow
* output has any field that is non-empty then the input will be queued for the collector
* to process with the post_queue_workflow_id.
* As a simpler alternative, pre_queue_random_sample can be set to just use random sampling instead.
*
*
* string pre_queue_workflow_id = 4;
* @param value The bytes for preQueueWorkflowId to set.
* @return This builder for chaining.
*/
public Builder setPreQueueWorkflowIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
preQueueWorkflowId_ = value;
onChanged();
return this;
}
private float preQueueRandomSample_ ;
/**
*
* Instead of needing to create a new workflow for pre_queue_workflow_id, if just random sampling
* of the model inputs is required, then pre_queue_random_sample can be set to a value from (0-1]
* to denote the fraction of inputs to collect.
*
*
* float pre_queue_random_sample = 8;
* @return The preQueueRandomSample.
*/
@java.lang.Override
public float getPreQueueRandomSample() {
return preQueueRandomSample_;
}
/**
*
* Instead of needing to create a new workflow for pre_queue_workflow_id, if just random sampling
* of the model inputs is required, then pre_queue_random_sample can be set to a value from (0-1]
* to denote the fraction of inputs to collect.
*
*
* float pre_queue_random_sample = 8;
* @param value The preQueueRandomSample to set.
* @return This builder for chaining.
*/
public Builder setPreQueueRandomSample(float value) {
preQueueRandomSample_ = value;
onChanged();
return this;
}
/**
*
* Instead of needing to create a new workflow for pre_queue_workflow_id, if just random sampling
* of the model inputs is required, then pre_queue_random_sample can be set to a value from (0-1]
* to denote the fraction of inputs to collect.
*
*
* float pre_queue_random_sample = 8;
* @return This builder for chaining.
*/
public Builder clearPreQueueRandomSample() {
preQueueRandomSample_ = 0F;
onChanged();
return this;
}
private java.lang.Object postQueueWorkflowId_ = "";
/**
*
* A workflow to run to after the collector is processing the queued input. This workflow
* uses the original input to the model as input to the workflow so that you can run additional
* models as well on that input to decide whether to queue the model or not. If the workflow
* output has any field that is non-empty then it will be passed on to POST /inputs to
* the destination app.
*
*
* string post_queue_workflow_id = 5;
* @return The postQueueWorkflowId.
*/
public java.lang.String getPostQueueWorkflowId() {
java.lang.Object ref = postQueueWorkflowId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
postQueueWorkflowId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* A workflow to run to after the collector is processing the queued input. This workflow
* uses the original input to the model as input to the workflow so that you can run additional
* models as well on that input to decide whether to queue the model or not. If the workflow
* output has any field that is non-empty then it will be passed on to POST /inputs to
* the destination app.
*
*
* string post_queue_workflow_id = 5;
* @return The bytes for postQueueWorkflowId.
*/
public com.google.protobuf.ByteString
getPostQueueWorkflowIdBytes() {
java.lang.Object ref = postQueueWorkflowId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
postQueueWorkflowId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* A workflow to run to after the collector is processing the queued input. This workflow
* uses the original input to the model as input to the workflow so that you can run additional
* models as well on that input to decide whether to queue the model or not. If the workflow
* output has any field that is non-empty then it will be passed on to POST /inputs to
* the destination app.
*
*
* string post_queue_workflow_id = 5;
* @param value The postQueueWorkflowId to set.
* @return This builder for chaining.
*/
public Builder setPostQueueWorkflowId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
postQueueWorkflowId_ = value;
onChanged();
return this;
}
/**
*
* A workflow to run to after the collector is processing the queued input. This workflow
* uses the original input to the model as input to the workflow so that you can run additional
* models as well on that input to decide whether to queue the model or not. If the workflow
* output has any field that is non-empty then it will be passed on to POST /inputs to
* the destination app.
*
*
* string post_queue_workflow_id = 5;
* @return This builder for chaining.
*/
public Builder clearPostQueueWorkflowId() {
postQueueWorkflowId_ = getDefaultInstance().getPostQueueWorkflowId();
onChanged();
return this;
}
/**
*
* A workflow to run to after the collector is processing the queued input. This workflow
* uses the original input to the model as input to the workflow so that you can run additional
* models as well on that input to decide whether to queue the model or not. If the workflow
* output has any field that is non-empty then it will be passed on to POST /inputs to
* the destination app.
*
*
* string post_queue_workflow_id = 5;
* @param value The bytes for postQueueWorkflowId to set.
* @return This builder for chaining.
*/
public Builder setPostQueueWorkflowIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
postQueueWorkflowId_ = value;
onChanged();
return this;
}
private com.clarifai.grpc.api.CollectorSource collectorSource_;
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.CollectorSource, com.clarifai.grpc.api.CollectorSource.Builder, com.clarifai.grpc.api.CollectorSourceOrBuilder> collectorSourceBuilder_;
/**
*
* The source of the collector to feed data into this app.
* Note(zeiler): if we wanted more than one source per collector we could make this it's own
* object and introduce /collectors/{collector_id}/sources
* We will keep it simple for now and have just one source per collector since a user can make
* more than one collector in the same app anyways.
*
*
* .clarifai.api.CollectorSource collector_source = 6;
* @return Whether the collectorSource field is set.
*/
public boolean hasCollectorSource() {
return collectorSourceBuilder_ != null || collectorSource_ != null;
}
/**
*
* The source of the collector to feed data into this app.
* Note(zeiler): if we wanted more than one source per collector we could make this it's own
* object and introduce /collectors/{collector_id}/sources
* We will keep it simple for now and have just one source per collector since a user can make
* more than one collector in the same app anyways.
*
*
* .clarifai.api.CollectorSource collector_source = 6;
* @return The collectorSource.
*/
public com.clarifai.grpc.api.CollectorSource getCollectorSource() {
if (collectorSourceBuilder_ == null) {
return collectorSource_ == null ? com.clarifai.grpc.api.CollectorSource.getDefaultInstance() : collectorSource_;
} else {
return collectorSourceBuilder_.getMessage();
}
}
/**
*
* The source of the collector to feed data into this app.
* Note(zeiler): if we wanted more than one source per collector we could make this it's own
* object and introduce /collectors/{collector_id}/sources
* We will keep it simple for now and have just one source per collector since a user can make
* more than one collector in the same app anyways.
*
*
* .clarifai.api.CollectorSource collector_source = 6;
*/
public Builder setCollectorSource(com.clarifai.grpc.api.CollectorSource value) {
if (collectorSourceBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
collectorSource_ = value;
onChanged();
} else {
collectorSourceBuilder_.setMessage(value);
}
return this;
}
/**
*
* The source of the collector to feed data into this app.
* Note(zeiler): if we wanted more than one source per collector we could make this it's own
* object and introduce /collectors/{collector_id}/sources
* We will keep it simple for now and have just one source per collector since a user can make
* more than one collector in the same app anyways.
*
*
* .clarifai.api.CollectorSource collector_source = 6;
*/
public Builder setCollectorSource(
com.clarifai.grpc.api.CollectorSource.Builder builderForValue) {
if (collectorSourceBuilder_ == null) {
collectorSource_ = builderForValue.build();
onChanged();
} else {
collectorSourceBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* The source of the collector to feed data into this app.
* Note(zeiler): if we wanted more than one source per collector we could make this it's own
* object and introduce /collectors/{collector_id}/sources
* We will keep it simple for now and have just one source per collector since a user can make
* more than one collector in the same app anyways.
*
*
* .clarifai.api.CollectorSource collector_source = 6;
*/
public Builder mergeCollectorSource(com.clarifai.grpc.api.CollectorSource value) {
if (collectorSourceBuilder_ == null) {
if (collectorSource_ != null) {
collectorSource_ =
com.clarifai.grpc.api.CollectorSource.newBuilder(collectorSource_).mergeFrom(value).buildPartial();
} else {
collectorSource_ = value;
}
onChanged();
} else {
collectorSourceBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* The source of the collector to feed data into this app.
* Note(zeiler): if we wanted more than one source per collector we could make this it's own
* object and introduce /collectors/{collector_id}/sources
* We will keep it simple for now and have just one source per collector since a user can make
* more than one collector in the same app anyways.
*
*
* .clarifai.api.CollectorSource collector_source = 6;
*/
public Builder clearCollectorSource() {
if (collectorSourceBuilder_ == null) {
collectorSource_ = null;
onChanged();
} else {
collectorSource_ = null;
collectorSourceBuilder_ = null;
}
return this;
}
/**
*
* The source of the collector to feed data into this app.
* Note(zeiler): if we wanted more than one source per collector we could make this it's own
* object and introduce /collectors/{collector_id}/sources
* We will keep it simple for now and have just one source per collector since a user can make
* more than one collector in the same app anyways.
*
*
* .clarifai.api.CollectorSource collector_source = 6;
*/
public com.clarifai.grpc.api.CollectorSource.Builder getCollectorSourceBuilder() {
onChanged();
return getCollectorSourceFieldBuilder().getBuilder();
}
/**
*
* The source of the collector to feed data into this app.
* Note(zeiler): if we wanted more than one source per collector we could make this it's own
* object and introduce /collectors/{collector_id}/sources
* We will keep it simple for now and have just one source per collector since a user can make
* more than one collector in the same app anyways.
*
*
* .clarifai.api.CollectorSource collector_source = 6;
*/
public com.clarifai.grpc.api.CollectorSourceOrBuilder getCollectorSourceOrBuilder() {
if (collectorSourceBuilder_ != null) {
return collectorSourceBuilder_.getMessageOrBuilder();
} else {
return collectorSource_ == null ?
com.clarifai.grpc.api.CollectorSource.getDefaultInstance() : collectorSource_;
}
}
/**
*
* The source of the collector to feed data into this app.
* Note(zeiler): if we wanted more than one source per collector we could make this it's own
* object and introduce /collectors/{collector_id}/sources
* We will keep it simple for now and have just one source per collector since a user can make
* more than one collector in the same app anyways.
*
*
* .clarifai.api.CollectorSource collector_source = 6;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.CollectorSource, com.clarifai.grpc.api.CollectorSource.Builder, com.clarifai.grpc.api.CollectorSourceOrBuilder>
getCollectorSourceFieldBuilder() {
if (collectorSourceBuilder_ == null) {
collectorSourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.CollectorSource, com.clarifai.grpc.api.CollectorSource.Builder, com.clarifai.grpc.api.CollectorSourceOrBuilder>(
getCollectorSource(),
getParentForChildren(),
isClean());
collectorSource_ = null;
}
return collectorSourceBuilder_;
}
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 for the collector. This allows you to pause a collector without having to delete it as
* an example.
*
*
* .clarifai.api.status.Status status = 7;
* @return Whether the status field is set.
*/
public boolean hasStatus() {
return statusBuilder_ != null || status_ != null;
}
/**
*
* Status for the collector. This allows you to pause a collector without having to delete it as
* an example.
*
*
* .clarifai.api.status.Status status = 7;
* @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 for the collector. This allows you to pause a collector without having to delete it as
* an example.
*
*
* .clarifai.api.status.Status status = 7;
*/
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 for the collector. This allows you to pause a collector without having to delete it as
* an example.
*
*
* .clarifai.api.status.Status status = 7;
*/
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 for the collector. This allows you to pause a collector without having to delete it as
* an example.
*
*
* .clarifai.api.status.Status status = 7;
*/
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 for the collector. This allows you to pause a collector without having to delete it as
* an example.
*
*
* .clarifai.api.status.Status status = 7;
*/
public Builder clearStatus() {
if (statusBuilder_ == null) {
status_ = null;
onChanged();
} else {
status_ = null;
statusBuilder_ = null;
}
return this;
}
/**
*
* Status for the collector. This allows you to pause a collector without having to delete it as
* an example.
*
*
* .clarifai.api.status.Status status = 7;
*/
public com.clarifai.grpc.api.status.Status.Builder getStatusBuilder() {
onChanged();
return getStatusFieldBuilder().getBuilder();
}
/**
*
* Status for the collector. This allows you to pause a collector without having to delete it as
* an example.
*
*
* .clarifai.api.status.Status status = 7;
*/
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 for the collector. This allows you to pause a collector without having to delete it as
* an example.
*
*
* .clarifai.api.status.Status status = 7;
*/
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 boolean collectOutputs_ ;
/**
*
* Whether to collect outputs or not. Default is false. If selected, outputs from the
* original model predict call will be posted as annotations along with the input with success status.
*
*
* bool collect_outputs = 9;
* @return The collectOutputs.
*/
@java.lang.Override
public boolean getCollectOutputs() {
return collectOutputs_;
}
/**
*
* Whether to collect outputs or not. Default is false. If selected, outputs from the
* original model predict call will be posted as annotations along with the input with success status.
*
*
* bool collect_outputs = 9;
* @param value The collectOutputs to set.
* @return This builder for chaining.
*/
public Builder setCollectOutputs(boolean value) {
collectOutputs_ = value;
onChanged();
return this;
}
/**
*
* Whether to collect outputs or not. Default is false. If selected, outputs from the
* original model predict call will be posted as annotations along with the input with success status.
*
*
* bool collect_outputs = 9;
* @return This builder for chaining.
*/
public Builder clearCollectOutputs() {
collectOutputs_ = false;
onChanged();
return this;
}
@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.Collector)
}
// @@protoc_insertion_point(class_scope:clarifai.api.Collector)
private static final com.clarifai.grpc.api.Collector DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.clarifai.grpc.api.Collector();
}
public static com.clarifai.grpc.api.Collector getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Collector parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Collector(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.Collector getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}