com.clarifai.grpc.api.Input 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;
/**
*
* Input
*
*
* Protobuf type {@code clarifai.api.Input}
*/
public final class Input extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:clarifai.api.Input)
InputOrBuilder {
private static final long serialVersionUID = 0L;
// Use Input.newBuilder() to construct.
private Input(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Input() {
id_ = "";
datasetIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Input();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Input(
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.clarifai.grpc.api.Data.Builder subBuilder = null;
if (data_ != null) {
subBuilder = data_.toBuilder();
}
data_ = input.readMessage(com.clarifai.grpc.api.Data.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(data_);
data_ = subBuilder.buildPartial();
}
break;
}
case 34: {
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 42: {
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 50: {
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 58: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
datasetIds_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000001;
}
datasetIds_.add(s);
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)) {
datasetIds_ = datasetIds_.getUnmodifiableView();
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Input_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Input_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.Input.class, com.clarifai.grpc.api.Input.Builder.class);
}
public static final int ID_FIELD_NUMBER = 1;
private volatile java.lang.Object id_;
/**
*
* The ID for the input
*
*
* 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;
}
}
/**
*
* The ID for the input
*
*
* 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 DATA_FIELD_NUMBER = 2;
private com.clarifai.grpc.api.Data data_;
/**
*
* The data passed along in this input.
*
*
* .clarifai.api.Data data = 2;
* @return Whether the data field is set.
*/
@java.lang.Override
public boolean hasData() {
return data_ != null;
}
/**
*
* The data passed along in this input.
*
*
* .clarifai.api.Data data = 2;
* @return The data.
*/
@java.lang.Override
public com.clarifai.grpc.api.Data getData() {
return data_ == null ? com.clarifai.grpc.api.Data.getDefaultInstance() : data_;
}
/**
*
* The data passed along in this input.
*
*
* .clarifai.api.Data data = 2;
*/
@java.lang.Override
public com.clarifai.grpc.api.DataOrBuilder getDataOrBuilder() {
return getData();
}
public static final int CREATED_AT_FIELD_NUMBER = 4;
private com.google.protobuf.Timestamp createdAt_;
/**
*
* When the input was 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 = 4;
* @return Whether the createdAt field is set.
*/
@java.lang.Override
public boolean hasCreatedAt() {
return createdAt_ != null;
}
/**
*
* When the input was 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 = 4;
* @return The createdAt.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getCreatedAt() {
return createdAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_;
}
/**
*
* When the input was 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 = 4;
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getCreatedAtOrBuilder() {
return getCreatedAt();
}
public static final int MODIFIED_AT_FIELD_NUMBER = 5;
private com.google.protobuf.Timestamp modifiedAt_;
/**
*
* When the input was modified.
*
*
* .google.protobuf.Timestamp modified_at = 5;
* @return Whether the modifiedAt field is set.
*/
@java.lang.Override
public boolean hasModifiedAt() {
return modifiedAt_ != null;
}
/**
*
* When the input was modified.
*
*
* .google.protobuf.Timestamp modified_at = 5;
* @return The modifiedAt.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getModifiedAt() {
return modifiedAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : modifiedAt_;
}
/**
*
* When the input was modified.
*
*
* .google.protobuf.Timestamp modified_at = 5;
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getModifiedAtOrBuilder() {
return getModifiedAt();
}
public static final int STATUS_FIELD_NUMBER = 6;
private com.clarifai.grpc.api.status.Status status_;
/**
*
* This is the status at a per Input level which allows for
* partial failures.
*
*
* .clarifai.api.status.Status status = 6;
* @return Whether the status field is set.
*/
@java.lang.Override
public boolean hasStatus() {
return status_ != null;
}
/**
*
* This is the status at a per Input level which allows for
* partial failures.
*
*
* .clarifai.api.status.Status status = 6;
* @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_;
}
/**
*
* This is the status at a per Input level which allows for
* partial failures.
*
*
* .clarifai.api.status.Status status = 6;
*/
@java.lang.Override
public com.clarifai.grpc.api.status.StatusOrBuilder getStatusOrBuilder() {
return getStatus();
}
public static final int DATASET_IDS_FIELD_NUMBER = 7;
private com.google.protobuf.LazyStringList datasetIds_;
/**
*
* List of dataset IDs that this input is part of
* Currently, this field is ONLY used to
* * search inputs part of dataset(s), e.g. in `PostSearches`, `PostInputsSearches` and `PostAnnotationsSearches` endpoints, and
* * to add inputs to dataset(s) in `PostInputs` endpoint.
* Note that this field is ignored for other endpoints, e.g. `GetInput`, `ListInputs` and `PatchInputs`.
*
*
* repeated string dataset_ids = 7;
* @return A list containing the datasetIds.
*/
public com.google.protobuf.ProtocolStringList
getDatasetIdsList() {
return datasetIds_;
}
/**
*
* List of dataset IDs that this input is part of
* Currently, this field is ONLY used to
* * search inputs part of dataset(s), e.g. in `PostSearches`, `PostInputsSearches` and `PostAnnotationsSearches` endpoints, and
* * to add inputs to dataset(s) in `PostInputs` endpoint.
* Note that this field is ignored for other endpoints, e.g. `GetInput`, `ListInputs` and `PatchInputs`.
*
*
* repeated string dataset_ids = 7;
* @return The count of datasetIds.
*/
public int getDatasetIdsCount() {
return datasetIds_.size();
}
/**
*
* List of dataset IDs that this input is part of
* Currently, this field is ONLY used to
* * search inputs part of dataset(s), e.g. in `PostSearches`, `PostInputsSearches` and `PostAnnotationsSearches` endpoints, and
* * to add inputs to dataset(s) in `PostInputs` endpoint.
* Note that this field is ignored for other endpoints, e.g. `GetInput`, `ListInputs` and `PatchInputs`.
*
*
* repeated string dataset_ids = 7;
* @param index The index of the element to return.
* @return The datasetIds at the given index.
*/
public java.lang.String getDatasetIds(int index) {
return datasetIds_.get(index);
}
/**
*
* List of dataset IDs that this input is part of
* Currently, this field is ONLY used to
* * search inputs part of dataset(s), e.g. in `PostSearches`, `PostInputsSearches` and `PostAnnotationsSearches` endpoints, and
* * to add inputs to dataset(s) in `PostInputs` endpoint.
* Note that this field is ignored for other endpoints, e.g. `GetInput`, `ListInputs` and `PatchInputs`.
*
*
* repeated string dataset_ids = 7;
* @param index The index of the value to return.
* @return The bytes of the datasetIds at the given index.
*/
public com.google.protobuf.ByteString
getDatasetIdsBytes(int index) {
return datasetIds_.getByteString(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
}
if (data_ != null) {
output.writeMessage(2, getData());
}
if (createdAt_ != null) {
output.writeMessage(4, getCreatedAt());
}
if (modifiedAt_ != null) {
output.writeMessage(5, getModifiedAt());
}
if (status_ != null) {
output.writeMessage(6, getStatus());
}
for (int i = 0; i < datasetIds_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, datasetIds_.getRaw(i));
}
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 (data_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getData());
}
if (createdAt_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getCreatedAt());
}
if (modifiedAt_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getModifiedAt());
}
if (status_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, getStatus());
}
{
int dataSize = 0;
for (int i = 0; i < datasetIds_.size(); i++) {
dataSize += computeStringSizeNoTag(datasetIds_.getRaw(i));
}
size += dataSize;
size += 1 * getDatasetIdsList().size();
}
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.Input)) {
return super.equals(obj);
}
com.clarifai.grpc.api.Input other = (com.clarifai.grpc.api.Input) obj;
if (!getId()
.equals(other.getId())) return false;
if (hasData() != other.hasData()) return false;
if (hasData()) {
if (!getData()
.equals(other.getData())) 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 (hasStatus() != other.hasStatus()) return false;
if (hasStatus()) {
if (!getStatus()
.equals(other.getStatus())) return false;
}
if (!getDatasetIdsList()
.equals(other.getDatasetIdsList())) 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 (hasData()) {
hash = (37 * hash) + DATA_FIELD_NUMBER;
hash = (53 * hash) + getData().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();
}
if (hasStatus()) {
hash = (37 * hash) + STATUS_FIELD_NUMBER;
hash = (53 * hash) + getStatus().hashCode();
}
if (getDatasetIdsCount() > 0) {
hash = (37 * hash) + DATASET_IDS_FIELD_NUMBER;
hash = (53 * hash) + getDatasetIdsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.clarifai.grpc.api.Input parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.Input 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.Input parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.Input 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.Input parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.Input parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.clarifai.grpc.api.Input parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.Input 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.Input parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.Input 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.Input parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.Input 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.Input 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;
}
/**
*
* Input
*
*
* Protobuf type {@code clarifai.api.Input}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:clarifai.api.Input)
com.clarifai.grpc.api.InputOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Input_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Input_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.Input.class, com.clarifai.grpc.api.Input.Builder.class);
}
// Construct using com.clarifai.grpc.api.Input.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_ = "";
if (dataBuilder_ == null) {
data_ = null;
} else {
data_ = null;
dataBuilder_ = null;
}
if (createdAtBuilder_ == null) {
createdAt_ = null;
} else {
createdAt_ = null;
createdAtBuilder_ = null;
}
if (modifiedAtBuilder_ == null) {
modifiedAt_ = null;
} else {
modifiedAt_ = null;
modifiedAtBuilder_ = null;
}
if (statusBuilder_ == null) {
status_ = null;
} else {
status_ = null;
statusBuilder_ = null;
}
datasetIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Input_descriptor;
}
@java.lang.Override
public com.clarifai.grpc.api.Input getDefaultInstanceForType() {
return com.clarifai.grpc.api.Input.getDefaultInstance();
}
@java.lang.Override
public com.clarifai.grpc.api.Input build() {
com.clarifai.grpc.api.Input result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.clarifai.grpc.api.Input buildPartial() {
com.clarifai.grpc.api.Input result = new com.clarifai.grpc.api.Input(this);
int from_bitField0_ = bitField0_;
result.id_ = id_;
if (dataBuilder_ == null) {
result.data_ = data_;
} else {
result.data_ = dataBuilder_.build();
}
if (createdAtBuilder_ == null) {
result.createdAt_ = createdAt_;
} else {
result.createdAt_ = createdAtBuilder_.build();
}
if (modifiedAtBuilder_ == null) {
result.modifiedAt_ = modifiedAt_;
} else {
result.modifiedAt_ = modifiedAtBuilder_.build();
}
if (statusBuilder_ == null) {
result.status_ = status_;
} else {
result.status_ = statusBuilder_.build();
}
if (((bitField0_ & 0x00000001) != 0)) {
datasetIds_ = datasetIds_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000001);
}
result.datasetIds_ = datasetIds_;
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.Input) {
return mergeFrom((com.clarifai.grpc.api.Input)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.clarifai.grpc.api.Input other) {
if (other == com.clarifai.grpc.api.Input.getDefaultInstance()) return this;
if (!other.getId().isEmpty()) {
id_ = other.id_;
onChanged();
}
if (other.hasData()) {
mergeData(other.getData());
}
if (other.hasCreatedAt()) {
mergeCreatedAt(other.getCreatedAt());
}
if (other.hasModifiedAt()) {
mergeModifiedAt(other.getModifiedAt());
}
if (other.hasStatus()) {
mergeStatus(other.getStatus());
}
if (!other.datasetIds_.isEmpty()) {
if (datasetIds_.isEmpty()) {
datasetIds_ = other.datasetIds_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureDatasetIdsIsMutable();
datasetIds_.addAll(other.datasetIds_);
}
onChanged();
}
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.Input parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.clarifai.grpc.api.Input) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object id_ = "";
/**
*
* The ID for the input
*
*
* 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;
}
}
/**
*
* The ID for the input
*
*
* 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;
}
}
/**
*
* The ID for the input
*
*
* 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;
}
/**
*
* The ID for the input
*
*
* string id = 1;
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
onChanged();
return this;
}
/**
*
* The ID for the input
*
*
* 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.clarifai.grpc.api.Data data_;
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Data, com.clarifai.grpc.api.Data.Builder, com.clarifai.grpc.api.DataOrBuilder> dataBuilder_;
/**
*
* The data passed along in this input.
*
*
* .clarifai.api.Data data = 2;
* @return Whether the data field is set.
*/
public boolean hasData() {
return dataBuilder_ != null || data_ != null;
}
/**
*
* The data passed along in this input.
*
*
* .clarifai.api.Data data = 2;
* @return The data.
*/
public com.clarifai.grpc.api.Data getData() {
if (dataBuilder_ == null) {
return data_ == null ? com.clarifai.grpc.api.Data.getDefaultInstance() : data_;
} else {
return dataBuilder_.getMessage();
}
}
/**
*
* The data passed along in this input.
*
*
* .clarifai.api.Data data = 2;
*/
public Builder setData(com.clarifai.grpc.api.Data value) {
if (dataBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
data_ = value;
onChanged();
} else {
dataBuilder_.setMessage(value);
}
return this;
}
/**
*
* The data passed along in this input.
*
*
* .clarifai.api.Data data = 2;
*/
public Builder setData(
com.clarifai.grpc.api.Data.Builder builderForValue) {
if (dataBuilder_ == null) {
data_ = builderForValue.build();
onChanged();
} else {
dataBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* The data passed along in this input.
*
*
* .clarifai.api.Data data = 2;
*/
public Builder mergeData(com.clarifai.grpc.api.Data value) {
if (dataBuilder_ == null) {
if (data_ != null) {
data_ =
com.clarifai.grpc.api.Data.newBuilder(data_).mergeFrom(value).buildPartial();
} else {
data_ = value;
}
onChanged();
} else {
dataBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* The data passed along in this input.
*
*
* .clarifai.api.Data data = 2;
*/
public Builder clearData() {
if (dataBuilder_ == null) {
data_ = null;
onChanged();
} else {
data_ = null;
dataBuilder_ = null;
}
return this;
}
/**
*
* The data passed along in this input.
*
*
* .clarifai.api.Data data = 2;
*/
public com.clarifai.grpc.api.Data.Builder getDataBuilder() {
onChanged();
return getDataFieldBuilder().getBuilder();
}
/**
*
* The data passed along in this input.
*
*
* .clarifai.api.Data data = 2;
*/
public com.clarifai.grpc.api.DataOrBuilder getDataOrBuilder() {
if (dataBuilder_ != null) {
return dataBuilder_.getMessageOrBuilder();
} else {
return data_ == null ?
com.clarifai.grpc.api.Data.getDefaultInstance() : data_;
}
}
/**
*
* The data passed along in this input.
*
*
* .clarifai.api.Data data = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Data, com.clarifai.grpc.api.Data.Builder, com.clarifai.grpc.api.DataOrBuilder>
getDataFieldBuilder() {
if (dataBuilder_ == null) {
dataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Data, com.clarifai.grpc.api.Data.Builder, com.clarifai.grpc.api.DataOrBuilder>(
getData(),
getParentForChildren(),
isClean());
data_ = null;
}
return dataBuilder_;
}
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 input was 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 = 4;
* @return Whether the createdAt field is set.
*/
public boolean hasCreatedAt() {
return createdAtBuilder_ != null || createdAt_ != null;
}
/**
*
* When the input was 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 = 4;
* @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 input was 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 = 4;
*/
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 input was 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 = 4;
*/
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 input was 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 = 4;
*/
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 input was 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 = 4;
*/
public Builder clearCreatedAt() {
if (createdAtBuilder_ == null) {
createdAt_ = null;
onChanged();
} else {
createdAt_ = null;
createdAtBuilder_ = null;
}
return this;
}
/**
*
* When the input was 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 = 4;
*/
public com.google.protobuf.Timestamp.Builder getCreatedAtBuilder() {
onChanged();
return getCreatedAtFieldBuilder().getBuilder();
}
/**
*
* When the input was 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 = 4;
*/
public com.google.protobuf.TimestampOrBuilder getCreatedAtOrBuilder() {
if (createdAtBuilder_ != null) {
return createdAtBuilder_.getMessageOrBuilder();
} else {
return createdAt_ == null ?
com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_;
}
}
/**
*
* When the input was 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 = 4;
*/
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_;
/**
*
* When the input was modified.
*
*
* .google.protobuf.Timestamp modified_at = 5;
* @return Whether the modifiedAt field is set.
*/
public boolean hasModifiedAt() {
return modifiedAtBuilder_ != null || modifiedAt_ != null;
}
/**
*
* When the input was modified.
*
*
* .google.protobuf.Timestamp modified_at = 5;
* @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();
}
}
/**
*
* When the input was modified.
*
*
* .google.protobuf.Timestamp modified_at = 5;
*/
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;
}
/**
*
* When the input was modified.
*
*
* .google.protobuf.Timestamp modified_at = 5;
*/
public Builder setModifiedAt(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (modifiedAtBuilder_ == null) {
modifiedAt_ = builderForValue.build();
onChanged();
} else {
modifiedAtBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* When the input was modified.
*
*
* .google.protobuf.Timestamp modified_at = 5;
*/
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;
}
/**
*
* When the input was modified.
*
*
* .google.protobuf.Timestamp modified_at = 5;
*/
public Builder clearModifiedAt() {
if (modifiedAtBuilder_ == null) {
modifiedAt_ = null;
onChanged();
} else {
modifiedAt_ = null;
modifiedAtBuilder_ = null;
}
return this;
}
/**
*
* When the input was modified.
*
*
* .google.protobuf.Timestamp modified_at = 5;
*/
public com.google.protobuf.Timestamp.Builder getModifiedAtBuilder() {
onChanged();
return getModifiedAtFieldBuilder().getBuilder();
}
/**
*
* When the input was modified.
*
*
* .google.protobuf.Timestamp modified_at = 5;
*/
public com.google.protobuf.TimestampOrBuilder getModifiedAtOrBuilder() {
if (modifiedAtBuilder_ != null) {
return modifiedAtBuilder_.getMessageOrBuilder();
} else {
return modifiedAt_ == null ?
com.google.protobuf.Timestamp.getDefaultInstance() : modifiedAt_;
}
}
/**
*
* When the input was modified.
*
*
* .google.protobuf.Timestamp modified_at = 5;
*/
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 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_;
/**
*
* This is the status at a per Input level which allows for
* partial failures.
*
*
* .clarifai.api.status.Status status = 6;
* @return Whether the status field is set.
*/
public boolean hasStatus() {
return statusBuilder_ != null || status_ != null;
}
/**
*
* This is the status at a per Input level which allows for
* partial failures.
*
*
* .clarifai.api.status.Status status = 6;
* @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();
}
}
/**
*
* This is the status at a per Input level which allows for
* partial failures.
*
*
* .clarifai.api.status.Status status = 6;
*/
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;
}
/**
*
* This is the status at a per Input level which allows for
* partial failures.
*
*
* .clarifai.api.status.Status status = 6;
*/
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;
}
/**
*
* This is the status at a per Input level which allows for
* partial failures.
*
*
* .clarifai.api.status.Status status = 6;
*/
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;
}
/**
*
* This is the status at a per Input level which allows for
* partial failures.
*
*
* .clarifai.api.status.Status status = 6;
*/
public Builder clearStatus() {
if (statusBuilder_ == null) {
status_ = null;
onChanged();
} else {
status_ = null;
statusBuilder_ = null;
}
return this;
}
/**
*
* This is the status at a per Input level which allows for
* partial failures.
*
*
* .clarifai.api.status.Status status = 6;
*/
public com.clarifai.grpc.api.status.Status.Builder getStatusBuilder() {
onChanged();
return getStatusFieldBuilder().getBuilder();
}
/**
*
* This is the status at a per Input level which allows for
* partial failures.
*
*
* .clarifai.api.status.Status status = 6;
*/
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_;
}
}
/**
*
* This is the status at a per Input level which allows for
* partial failures.
*
*
* .clarifai.api.status.Status status = 6;
*/
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 com.google.protobuf.LazyStringList datasetIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureDatasetIdsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
datasetIds_ = new com.google.protobuf.LazyStringArrayList(datasetIds_);
bitField0_ |= 0x00000001;
}
}
/**
*
* List of dataset IDs that this input is part of
* Currently, this field is ONLY used to
* * search inputs part of dataset(s), e.g. in `PostSearches`, `PostInputsSearches` and `PostAnnotationsSearches` endpoints, and
* * to add inputs to dataset(s) in `PostInputs` endpoint.
* Note that this field is ignored for other endpoints, e.g. `GetInput`, `ListInputs` and `PatchInputs`.
*
*
* repeated string dataset_ids = 7;
* @return A list containing the datasetIds.
*/
public com.google.protobuf.ProtocolStringList
getDatasetIdsList() {
return datasetIds_.getUnmodifiableView();
}
/**
*
* List of dataset IDs that this input is part of
* Currently, this field is ONLY used to
* * search inputs part of dataset(s), e.g. in `PostSearches`, `PostInputsSearches` and `PostAnnotationsSearches` endpoints, and
* * to add inputs to dataset(s) in `PostInputs` endpoint.
* Note that this field is ignored for other endpoints, e.g. `GetInput`, `ListInputs` and `PatchInputs`.
*
*
* repeated string dataset_ids = 7;
* @return The count of datasetIds.
*/
public int getDatasetIdsCount() {
return datasetIds_.size();
}
/**
*
* List of dataset IDs that this input is part of
* Currently, this field is ONLY used to
* * search inputs part of dataset(s), e.g. in `PostSearches`, `PostInputsSearches` and `PostAnnotationsSearches` endpoints, and
* * to add inputs to dataset(s) in `PostInputs` endpoint.
* Note that this field is ignored for other endpoints, e.g. `GetInput`, `ListInputs` and `PatchInputs`.
*
*
* repeated string dataset_ids = 7;
* @param index The index of the element to return.
* @return The datasetIds at the given index.
*/
public java.lang.String getDatasetIds(int index) {
return datasetIds_.get(index);
}
/**
*
* List of dataset IDs that this input is part of
* Currently, this field is ONLY used to
* * search inputs part of dataset(s), e.g. in `PostSearches`, `PostInputsSearches` and `PostAnnotationsSearches` endpoints, and
* * to add inputs to dataset(s) in `PostInputs` endpoint.
* Note that this field is ignored for other endpoints, e.g. `GetInput`, `ListInputs` and `PatchInputs`.
*
*
* repeated string dataset_ids = 7;
* @param index The index of the value to return.
* @return The bytes of the datasetIds at the given index.
*/
public com.google.protobuf.ByteString
getDatasetIdsBytes(int index) {
return datasetIds_.getByteString(index);
}
/**
*
* List of dataset IDs that this input is part of
* Currently, this field is ONLY used to
* * search inputs part of dataset(s), e.g. in `PostSearches`, `PostInputsSearches` and `PostAnnotationsSearches` endpoints, and
* * to add inputs to dataset(s) in `PostInputs` endpoint.
* Note that this field is ignored for other endpoints, e.g. `GetInput`, `ListInputs` and `PatchInputs`.
*
*
* repeated string dataset_ids = 7;
* @param index The index to set the value at.
* @param value The datasetIds to set.
* @return This builder for chaining.
*/
public Builder setDatasetIds(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureDatasetIdsIsMutable();
datasetIds_.set(index, value);
onChanged();
return this;
}
/**
*
* List of dataset IDs that this input is part of
* Currently, this field is ONLY used to
* * search inputs part of dataset(s), e.g. in `PostSearches`, `PostInputsSearches` and `PostAnnotationsSearches` endpoints, and
* * to add inputs to dataset(s) in `PostInputs` endpoint.
* Note that this field is ignored for other endpoints, e.g. `GetInput`, `ListInputs` and `PatchInputs`.
*
*
* repeated string dataset_ids = 7;
* @param value The datasetIds to add.
* @return This builder for chaining.
*/
public Builder addDatasetIds(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureDatasetIdsIsMutable();
datasetIds_.add(value);
onChanged();
return this;
}
/**
*
* List of dataset IDs that this input is part of
* Currently, this field is ONLY used to
* * search inputs part of dataset(s), e.g. in `PostSearches`, `PostInputsSearches` and `PostAnnotationsSearches` endpoints, and
* * to add inputs to dataset(s) in `PostInputs` endpoint.
* Note that this field is ignored for other endpoints, e.g. `GetInput`, `ListInputs` and `PatchInputs`.
*
*
* repeated string dataset_ids = 7;
* @param values The datasetIds to add.
* @return This builder for chaining.
*/
public Builder addAllDatasetIds(
java.lang.Iterable values) {
ensureDatasetIdsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, datasetIds_);
onChanged();
return this;
}
/**
*
* List of dataset IDs that this input is part of
* Currently, this field is ONLY used to
* * search inputs part of dataset(s), e.g. in `PostSearches`, `PostInputsSearches` and `PostAnnotationsSearches` endpoints, and
* * to add inputs to dataset(s) in `PostInputs` endpoint.
* Note that this field is ignored for other endpoints, e.g. `GetInput`, `ListInputs` and `PatchInputs`.
*
*
* repeated string dataset_ids = 7;
* @return This builder for chaining.
*/
public Builder clearDatasetIds() {
datasetIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* List of dataset IDs that this input is part of
* Currently, this field is ONLY used to
* * search inputs part of dataset(s), e.g. in `PostSearches`, `PostInputsSearches` and `PostAnnotationsSearches` endpoints, and
* * to add inputs to dataset(s) in `PostInputs` endpoint.
* Note that this field is ignored for other endpoints, e.g. `GetInput`, `ListInputs` and `PatchInputs`.
*
*
* repeated string dataset_ids = 7;
* @param value The bytes of the datasetIds to add.
* @return This builder for chaining.
*/
public Builder addDatasetIdsBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureDatasetIdsIsMutable();
datasetIds_.add(value);
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.Input)
}
// @@protoc_insertion_point(class_scope:clarifai.api.Input)
private static final com.clarifai.grpc.api.Input DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.clarifai.grpc.api.Input();
}
public static com.clarifai.grpc.api.Input getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Input parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Input(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.Input getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}