com.clarifai.grpc.api.InputsUpload 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;
/**
* Protobuf type {@code clarifai.api.InputsUpload}
*/
public final class InputsUpload extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:clarifai.api.InputsUpload)
InputsUploadOrBuilder {
private static final long serialVersionUID = 0L;
// Use InputsUpload.newBuilder() to construct.
private InputsUpload(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private InputsUpload() {
inputsAddJobId_ = "";
appPat_ = "";
inputIdConflictResolution_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new InputsUpload();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private InputsUpload(
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();
inputsAddJobId_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
appPat_ = s;
break;
}
case 26: {
com.clarifai.grpc.api.Upload.Builder subBuilder = null;
if (upload_ != null) {
subBuilder = upload_.toBuilder();
}
upload_ = input.readMessage(com.clarifai.grpc.api.Upload.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(upload_);
upload_ = subBuilder.buildPartial();
}
break;
}
case 32: {
int rawValue = input.readEnum();
inputIdConflictResolution_ = rawValue;
break;
}
case 42: {
com.clarifai.grpc.api.Input.Builder subBuilder = null;
if (inputTemplate_ != null) {
subBuilder = inputTemplate_.toBuilder();
}
inputTemplate_ = input.readMessage(com.clarifai.grpc.api.Input.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(inputTemplate_);
inputTemplate_ = subBuilder.buildPartial();
}
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_InputsUpload_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_InputsUpload_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.InputsUpload.class, com.clarifai.grpc.api.InputsUpload.Builder.class);
}
public static final int INPUTS_ADD_JOB_ID_FIELD_NUMBER = 1;
private volatile java.lang.Object inputsAddJobId_;
/**
*
* Collect statistics about created inputs in job with given ID.
* * If job ID is empty, then job is automatically created with random ID.
* * If job ID is non-empty, then a new job will be created with given ID.
*
*
* string inputs_add_job_id = 1;
* @return The inputsAddJobId.
*/
@java.lang.Override
public java.lang.String getInputsAddJobId() {
java.lang.Object ref = inputsAddJobId_;
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();
inputsAddJobId_ = s;
return s;
}
}
/**
*
* Collect statistics about created inputs in job with given ID.
* * If job ID is empty, then job is automatically created with random ID.
* * If job ID is non-empty, then a new job will be created with given ID.
*
*
* string inputs_add_job_id = 1;
* @return The bytes for inputsAddJobId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getInputsAddJobIdBytes() {
java.lang.Object ref = inputsAddJobId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
inputsAddJobId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int APP_PAT_FIELD_NUMBER = 2;
private volatile java.lang.Object appPat_;
/**
*
* Personal Access Token to the application to which inputs are added
*
*
* string app_pat = 2;
* @return The appPat.
*/
@java.lang.Override
public java.lang.String getAppPat() {
java.lang.Object ref = appPat_;
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();
appPat_ = s;
return s;
}
}
/**
*
* Personal Access Token to the application to which inputs are added
*
*
* string app_pat = 2;
* @return The bytes for appPat.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getAppPatBytes() {
java.lang.Object ref = appPat_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
appPat_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int UPLOAD_FIELD_NUMBER = 3;
private com.clarifai.grpc.api.Upload upload_;
/**
* .clarifai.api.Upload upload = 3;
* @return Whether the upload field is set.
*/
@java.lang.Override
public boolean hasUpload() {
return upload_ != null;
}
/**
* .clarifai.api.Upload upload = 3;
* @return The upload.
*/
@java.lang.Override
public com.clarifai.grpc.api.Upload getUpload() {
return upload_ == null ? com.clarifai.grpc.api.Upload.getDefaultInstance() : upload_;
}
/**
* .clarifai.api.Upload upload = 3;
*/
@java.lang.Override
public com.clarifai.grpc.api.UploadOrBuilder getUploadOrBuilder() {
return getUpload();
}
public static final int INPUT_ID_CONFLICT_RESOLUTION_FIELD_NUMBER = 4;
private int inputIdConflictResolution_;
/**
*
* How to handle input ID conflicts.
*
*
* .clarifai.api.InputIDConflictResolution input_id_conflict_resolution = 4;
* @return The enum numeric value on the wire for inputIdConflictResolution.
*/
@java.lang.Override public int getInputIdConflictResolutionValue() {
return inputIdConflictResolution_;
}
/**
*
* How to handle input ID conflicts.
*
*
* .clarifai.api.InputIDConflictResolution input_id_conflict_resolution = 4;
* @return The inputIdConflictResolution.
*/
@java.lang.Override public com.clarifai.grpc.api.InputIDConflictResolution getInputIdConflictResolution() {
@SuppressWarnings("deprecation")
com.clarifai.grpc.api.InputIDConflictResolution result = com.clarifai.grpc.api.InputIDConflictResolution.valueOf(inputIdConflictResolution_);
return result == null ? com.clarifai.grpc.api.InputIDConflictResolution.UNRECOGNIZED : result;
}
public static final int INPUT_TEMPLATE_FIELD_NUMBER = 5;
private com.clarifai.grpc.api.Input inputTemplate_;
/**
*
* Fields set in the template will also be added to all generated inputs
*
*
* .clarifai.api.Input input_template = 5;
* @return Whether the inputTemplate field is set.
*/
@java.lang.Override
public boolean hasInputTemplate() {
return inputTemplate_ != null;
}
/**
*
* Fields set in the template will also be added to all generated inputs
*
*
* .clarifai.api.Input input_template = 5;
* @return The inputTemplate.
*/
@java.lang.Override
public com.clarifai.grpc.api.Input getInputTemplate() {
return inputTemplate_ == null ? com.clarifai.grpc.api.Input.getDefaultInstance() : inputTemplate_;
}
/**
*
* Fields set in the template will also be added to all generated inputs
*
*
* .clarifai.api.Input input_template = 5;
*/
@java.lang.Override
public com.clarifai.grpc.api.InputOrBuilder getInputTemplateOrBuilder() {
return getInputTemplate();
}
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(inputsAddJobId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, inputsAddJobId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appPat_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, appPat_);
}
if (upload_ != null) {
output.writeMessage(3, getUpload());
}
if (inputIdConflictResolution_ != com.clarifai.grpc.api.InputIDConflictResolution.INPUT_ID_CONFLICT_RESOLUTION_NOT_SET.getNumber()) {
output.writeEnum(4, inputIdConflictResolution_);
}
if (inputTemplate_ != null) {
output.writeMessage(5, getInputTemplate());
}
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(inputsAddJobId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, inputsAddJobId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appPat_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, appPat_);
}
if (upload_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getUpload());
}
if (inputIdConflictResolution_ != com.clarifai.grpc.api.InputIDConflictResolution.INPUT_ID_CONFLICT_RESOLUTION_NOT_SET.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(4, inputIdConflictResolution_);
}
if (inputTemplate_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getInputTemplate());
}
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.InputsUpload)) {
return super.equals(obj);
}
com.clarifai.grpc.api.InputsUpload other = (com.clarifai.grpc.api.InputsUpload) obj;
if (!getInputsAddJobId()
.equals(other.getInputsAddJobId())) return false;
if (!getAppPat()
.equals(other.getAppPat())) return false;
if (hasUpload() != other.hasUpload()) return false;
if (hasUpload()) {
if (!getUpload()
.equals(other.getUpload())) return false;
}
if (inputIdConflictResolution_ != other.inputIdConflictResolution_) return false;
if (hasInputTemplate() != other.hasInputTemplate()) return false;
if (hasInputTemplate()) {
if (!getInputTemplate()
.equals(other.getInputTemplate())) 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) + INPUTS_ADD_JOB_ID_FIELD_NUMBER;
hash = (53 * hash) + getInputsAddJobId().hashCode();
hash = (37 * hash) + APP_PAT_FIELD_NUMBER;
hash = (53 * hash) + getAppPat().hashCode();
if (hasUpload()) {
hash = (37 * hash) + UPLOAD_FIELD_NUMBER;
hash = (53 * hash) + getUpload().hashCode();
}
hash = (37 * hash) + INPUT_ID_CONFLICT_RESOLUTION_FIELD_NUMBER;
hash = (53 * hash) + inputIdConflictResolution_;
if (hasInputTemplate()) {
hash = (37 * hash) + INPUT_TEMPLATE_FIELD_NUMBER;
hash = (53 * hash) + getInputTemplate().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.clarifai.grpc.api.InputsUpload parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.InputsUpload 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.InputsUpload parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.InputsUpload 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.InputsUpload parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.InputsUpload parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.clarifai.grpc.api.InputsUpload parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.InputsUpload 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.InputsUpload parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.InputsUpload 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.InputsUpload parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.InputsUpload 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.InputsUpload 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;
}
/**
* Protobuf type {@code clarifai.api.InputsUpload}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:clarifai.api.InputsUpload)
com.clarifai.grpc.api.InputsUploadOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_InputsUpload_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_InputsUpload_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.InputsUpload.class, com.clarifai.grpc.api.InputsUpload.Builder.class);
}
// Construct using com.clarifai.grpc.api.InputsUpload.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();
inputsAddJobId_ = "";
appPat_ = "";
if (uploadBuilder_ == null) {
upload_ = null;
} else {
upload_ = null;
uploadBuilder_ = null;
}
inputIdConflictResolution_ = 0;
if (inputTemplateBuilder_ == null) {
inputTemplate_ = null;
} else {
inputTemplate_ = null;
inputTemplateBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_InputsUpload_descriptor;
}
@java.lang.Override
public com.clarifai.grpc.api.InputsUpload getDefaultInstanceForType() {
return com.clarifai.grpc.api.InputsUpload.getDefaultInstance();
}
@java.lang.Override
public com.clarifai.grpc.api.InputsUpload build() {
com.clarifai.grpc.api.InputsUpload result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.clarifai.grpc.api.InputsUpload buildPartial() {
com.clarifai.grpc.api.InputsUpload result = new com.clarifai.grpc.api.InputsUpload(this);
result.inputsAddJobId_ = inputsAddJobId_;
result.appPat_ = appPat_;
if (uploadBuilder_ == null) {
result.upload_ = upload_;
} else {
result.upload_ = uploadBuilder_.build();
}
result.inputIdConflictResolution_ = inputIdConflictResolution_;
if (inputTemplateBuilder_ == null) {
result.inputTemplate_ = inputTemplate_;
} else {
result.inputTemplate_ = inputTemplateBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.clarifai.grpc.api.InputsUpload) {
return mergeFrom((com.clarifai.grpc.api.InputsUpload)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.clarifai.grpc.api.InputsUpload other) {
if (other == com.clarifai.grpc.api.InputsUpload.getDefaultInstance()) return this;
if (!other.getInputsAddJobId().isEmpty()) {
inputsAddJobId_ = other.inputsAddJobId_;
onChanged();
}
if (!other.getAppPat().isEmpty()) {
appPat_ = other.appPat_;
onChanged();
}
if (other.hasUpload()) {
mergeUpload(other.getUpload());
}
if (other.inputIdConflictResolution_ != 0) {
setInputIdConflictResolutionValue(other.getInputIdConflictResolutionValue());
}
if (other.hasInputTemplate()) {
mergeInputTemplate(other.getInputTemplate());
}
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.InputsUpload parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.clarifai.grpc.api.InputsUpload) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object inputsAddJobId_ = "";
/**
*
* Collect statistics about created inputs in job with given ID.
* * If job ID is empty, then job is automatically created with random ID.
* * If job ID is non-empty, then a new job will be created with given ID.
*
*
* string inputs_add_job_id = 1;
* @return The inputsAddJobId.
*/
public java.lang.String getInputsAddJobId() {
java.lang.Object ref = inputsAddJobId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
inputsAddJobId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Collect statistics about created inputs in job with given ID.
* * If job ID is empty, then job is automatically created with random ID.
* * If job ID is non-empty, then a new job will be created with given ID.
*
*
* string inputs_add_job_id = 1;
* @return The bytes for inputsAddJobId.
*/
public com.google.protobuf.ByteString
getInputsAddJobIdBytes() {
java.lang.Object ref = inputsAddJobId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
inputsAddJobId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Collect statistics about created inputs in job with given ID.
* * If job ID is empty, then job is automatically created with random ID.
* * If job ID is non-empty, then a new job will be created with given ID.
*
*
* string inputs_add_job_id = 1;
* @param value The inputsAddJobId to set.
* @return This builder for chaining.
*/
public Builder setInputsAddJobId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
inputsAddJobId_ = value;
onChanged();
return this;
}
/**
*
* Collect statistics about created inputs in job with given ID.
* * If job ID is empty, then job is automatically created with random ID.
* * If job ID is non-empty, then a new job will be created with given ID.
*
*
* string inputs_add_job_id = 1;
* @return This builder for chaining.
*/
public Builder clearInputsAddJobId() {
inputsAddJobId_ = getDefaultInstance().getInputsAddJobId();
onChanged();
return this;
}
/**
*
* Collect statistics about created inputs in job with given ID.
* * If job ID is empty, then job is automatically created with random ID.
* * If job ID is non-empty, then a new job will be created with given ID.
*
*
* string inputs_add_job_id = 1;
* @param value The bytes for inputsAddJobId to set.
* @return This builder for chaining.
*/
public Builder setInputsAddJobIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
inputsAddJobId_ = value;
onChanged();
return this;
}
private java.lang.Object appPat_ = "";
/**
*
* Personal Access Token to the application to which inputs are added
*
*
* string app_pat = 2;
* @return The appPat.
*/
public java.lang.String getAppPat() {
java.lang.Object ref = appPat_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
appPat_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Personal Access Token to the application to which inputs are added
*
*
* string app_pat = 2;
* @return The bytes for appPat.
*/
public com.google.protobuf.ByteString
getAppPatBytes() {
java.lang.Object ref = appPat_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
appPat_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Personal Access Token to the application to which inputs are added
*
*
* string app_pat = 2;
* @param value The appPat to set.
* @return This builder for chaining.
*/
public Builder setAppPat(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
appPat_ = value;
onChanged();
return this;
}
/**
*
* Personal Access Token to the application to which inputs are added
*
*
* string app_pat = 2;
* @return This builder for chaining.
*/
public Builder clearAppPat() {
appPat_ = getDefaultInstance().getAppPat();
onChanged();
return this;
}
/**
*
* Personal Access Token to the application to which inputs are added
*
*
* string app_pat = 2;
* @param value The bytes for appPat to set.
* @return This builder for chaining.
*/
public Builder setAppPatBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
appPat_ = value;
onChanged();
return this;
}
private com.clarifai.grpc.api.Upload upload_;
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Upload, com.clarifai.grpc.api.Upload.Builder, com.clarifai.grpc.api.UploadOrBuilder> uploadBuilder_;
/**
* .clarifai.api.Upload upload = 3;
* @return Whether the upload field is set.
*/
public boolean hasUpload() {
return uploadBuilder_ != null || upload_ != null;
}
/**
* .clarifai.api.Upload upload = 3;
* @return The upload.
*/
public com.clarifai.grpc.api.Upload getUpload() {
if (uploadBuilder_ == null) {
return upload_ == null ? com.clarifai.grpc.api.Upload.getDefaultInstance() : upload_;
} else {
return uploadBuilder_.getMessage();
}
}
/**
* .clarifai.api.Upload upload = 3;
*/
public Builder setUpload(com.clarifai.grpc.api.Upload value) {
if (uploadBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
upload_ = value;
onChanged();
} else {
uploadBuilder_.setMessage(value);
}
return this;
}
/**
* .clarifai.api.Upload upload = 3;
*/
public Builder setUpload(
com.clarifai.grpc.api.Upload.Builder builderForValue) {
if (uploadBuilder_ == null) {
upload_ = builderForValue.build();
onChanged();
} else {
uploadBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .clarifai.api.Upload upload = 3;
*/
public Builder mergeUpload(com.clarifai.grpc.api.Upload value) {
if (uploadBuilder_ == null) {
if (upload_ != null) {
upload_ =
com.clarifai.grpc.api.Upload.newBuilder(upload_).mergeFrom(value).buildPartial();
} else {
upload_ = value;
}
onChanged();
} else {
uploadBuilder_.mergeFrom(value);
}
return this;
}
/**
* .clarifai.api.Upload upload = 3;
*/
public Builder clearUpload() {
if (uploadBuilder_ == null) {
upload_ = null;
onChanged();
} else {
upload_ = null;
uploadBuilder_ = null;
}
return this;
}
/**
* .clarifai.api.Upload upload = 3;
*/
public com.clarifai.grpc.api.Upload.Builder getUploadBuilder() {
onChanged();
return getUploadFieldBuilder().getBuilder();
}
/**
* .clarifai.api.Upload upload = 3;
*/
public com.clarifai.grpc.api.UploadOrBuilder getUploadOrBuilder() {
if (uploadBuilder_ != null) {
return uploadBuilder_.getMessageOrBuilder();
} else {
return upload_ == null ?
com.clarifai.grpc.api.Upload.getDefaultInstance() : upload_;
}
}
/**
* .clarifai.api.Upload upload = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Upload, com.clarifai.grpc.api.Upload.Builder, com.clarifai.grpc.api.UploadOrBuilder>
getUploadFieldBuilder() {
if (uploadBuilder_ == null) {
uploadBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Upload, com.clarifai.grpc.api.Upload.Builder, com.clarifai.grpc.api.UploadOrBuilder>(
getUpload(),
getParentForChildren(),
isClean());
upload_ = null;
}
return uploadBuilder_;
}
private int inputIdConflictResolution_ = 0;
/**
*
* How to handle input ID conflicts.
*
*
* .clarifai.api.InputIDConflictResolution input_id_conflict_resolution = 4;
* @return The enum numeric value on the wire for inputIdConflictResolution.
*/
@java.lang.Override public int getInputIdConflictResolutionValue() {
return inputIdConflictResolution_;
}
/**
*
* How to handle input ID conflicts.
*
*
* .clarifai.api.InputIDConflictResolution input_id_conflict_resolution = 4;
* @param value The enum numeric value on the wire for inputIdConflictResolution to set.
* @return This builder for chaining.
*/
public Builder setInputIdConflictResolutionValue(int value) {
inputIdConflictResolution_ = value;
onChanged();
return this;
}
/**
*
* How to handle input ID conflicts.
*
*
* .clarifai.api.InputIDConflictResolution input_id_conflict_resolution = 4;
* @return The inputIdConflictResolution.
*/
@java.lang.Override
public com.clarifai.grpc.api.InputIDConflictResolution getInputIdConflictResolution() {
@SuppressWarnings("deprecation")
com.clarifai.grpc.api.InputIDConflictResolution result = com.clarifai.grpc.api.InputIDConflictResolution.valueOf(inputIdConflictResolution_);
return result == null ? com.clarifai.grpc.api.InputIDConflictResolution.UNRECOGNIZED : result;
}
/**
*
* How to handle input ID conflicts.
*
*
* .clarifai.api.InputIDConflictResolution input_id_conflict_resolution = 4;
* @param value The inputIdConflictResolution to set.
* @return This builder for chaining.
*/
public Builder setInputIdConflictResolution(com.clarifai.grpc.api.InputIDConflictResolution value) {
if (value == null) {
throw new NullPointerException();
}
inputIdConflictResolution_ = value.getNumber();
onChanged();
return this;
}
/**
*
* How to handle input ID conflicts.
*
*
* .clarifai.api.InputIDConflictResolution input_id_conflict_resolution = 4;
* @return This builder for chaining.
*/
public Builder clearInputIdConflictResolution() {
inputIdConflictResolution_ = 0;
onChanged();
return this;
}
private com.clarifai.grpc.api.Input inputTemplate_;
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Input, com.clarifai.grpc.api.Input.Builder, com.clarifai.grpc.api.InputOrBuilder> inputTemplateBuilder_;
/**
*
* Fields set in the template will also be added to all generated inputs
*
*
* .clarifai.api.Input input_template = 5;
* @return Whether the inputTemplate field is set.
*/
public boolean hasInputTemplate() {
return inputTemplateBuilder_ != null || inputTemplate_ != null;
}
/**
*
* Fields set in the template will also be added to all generated inputs
*
*
* .clarifai.api.Input input_template = 5;
* @return The inputTemplate.
*/
public com.clarifai.grpc.api.Input getInputTemplate() {
if (inputTemplateBuilder_ == null) {
return inputTemplate_ == null ? com.clarifai.grpc.api.Input.getDefaultInstance() : inputTemplate_;
} else {
return inputTemplateBuilder_.getMessage();
}
}
/**
*
* Fields set in the template will also be added to all generated inputs
*
*
* .clarifai.api.Input input_template = 5;
*/
public Builder setInputTemplate(com.clarifai.grpc.api.Input value) {
if (inputTemplateBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
inputTemplate_ = value;
onChanged();
} else {
inputTemplateBuilder_.setMessage(value);
}
return this;
}
/**
*
* Fields set in the template will also be added to all generated inputs
*
*
* .clarifai.api.Input input_template = 5;
*/
public Builder setInputTemplate(
com.clarifai.grpc.api.Input.Builder builderForValue) {
if (inputTemplateBuilder_ == null) {
inputTemplate_ = builderForValue.build();
onChanged();
} else {
inputTemplateBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Fields set in the template will also be added to all generated inputs
*
*
* .clarifai.api.Input input_template = 5;
*/
public Builder mergeInputTemplate(com.clarifai.grpc.api.Input value) {
if (inputTemplateBuilder_ == null) {
if (inputTemplate_ != null) {
inputTemplate_ =
com.clarifai.grpc.api.Input.newBuilder(inputTemplate_).mergeFrom(value).buildPartial();
} else {
inputTemplate_ = value;
}
onChanged();
} else {
inputTemplateBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Fields set in the template will also be added to all generated inputs
*
*
* .clarifai.api.Input input_template = 5;
*/
public Builder clearInputTemplate() {
if (inputTemplateBuilder_ == null) {
inputTemplate_ = null;
onChanged();
} else {
inputTemplate_ = null;
inputTemplateBuilder_ = null;
}
return this;
}
/**
*
* Fields set in the template will also be added to all generated inputs
*
*
* .clarifai.api.Input input_template = 5;
*/
public com.clarifai.grpc.api.Input.Builder getInputTemplateBuilder() {
onChanged();
return getInputTemplateFieldBuilder().getBuilder();
}
/**
*
* Fields set in the template will also be added to all generated inputs
*
*
* .clarifai.api.Input input_template = 5;
*/
public com.clarifai.grpc.api.InputOrBuilder getInputTemplateOrBuilder() {
if (inputTemplateBuilder_ != null) {
return inputTemplateBuilder_.getMessageOrBuilder();
} else {
return inputTemplate_ == null ?
com.clarifai.grpc.api.Input.getDefaultInstance() : inputTemplate_;
}
}
/**
*
* Fields set in the template will also be added to all generated inputs
*
*
* .clarifai.api.Input input_template = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Input, com.clarifai.grpc.api.Input.Builder, com.clarifai.grpc.api.InputOrBuilder>
getInputTemplateFieldBuilder() {
if (inputTemplateBuilder_ == null) {
inputTemplateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Input, com.clarifai.grpc.api.Input.Builder, com.clarifai.grpc.api.InputOrBuilder>(
getInputTemplate(),
getParentForChildren(),
isClean());
inputTemplate_ = null;
}
return inputTemplateBuilder_;
}
@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.InputsUpload)
}
// @@protoc_insertion_point(class_scope:clarifai.api.InputsUpload)
private static final com.clarifai.grpc.api.InputsUpload DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.clarifai.grpc.api.InputsUpload();
}
public static com.clarifai.grpc.api.InputsUpload getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public InputsUpload parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new InputsUpload(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.InputsUpload getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}