com.clarifai.grpc.api.InputsDataSource 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.InputsDataSource}
*/
public final class InputsDataSource extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:clarifai.api.InputsDataSource)
InputsDataSourceOrBuilder {
private static final long serialVersionUID = 0L;
// Use InputsDataSource.newBuilder() to construct.
private InputsDataSource(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private InputsDataSource() {
inputsAddJobId_ = "";
inputIdConflictResolution_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new InputsDataSource();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private InputsDataSource(
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: {
com.clarifai.grpc.api.DataSourceURL.Builder subBuilder = null;
if (url_ != null) {
subBuilder = url_.toBuilder();
}
url_ = input.readMessage(com.clarifai.grpc.api.DataSourceURL.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(url_);
url_ = subBuilder.buildPartial();
}
break;
}
case 24: {
int rawValue = input.readEnum();
inputIdConflictResolution_ = rawValue;
break;
}
case 34: {
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_InputsDataSource_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_InputsDataSource_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.InputsDataSource.class, com.clarifai.grpc.api.InputsDataSource.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.
* On Post call:
* * 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.
* On Post call:
* * 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 URL_FIELD_NUMBER = 2;
private com.clarifai.grpc.api.DataSourceURL url_;
/**
* .clarifai.api.DataSourceURL url = 2;
* @return Whether the url field is set.
*/
@java.lang.Override
public boolean hasUrl() {
return url_ != null;
}
/**
* .clarifai.api.DataSourceURL url = 2;
* @return The url.
*/
@java.lang.Override
public com.clarifai.grpc.api.DataSourceURL getUrl() {
return url_ == null ? com.clarifai.grpc.api.DataSourceURL.getDefaultInstance() : url_;
}
/**
* .clarifai.api.DataSourceURL url = 2;
*/
@java.lang.Override
public com.clarifai.grpc.api.DataSourceURLOrBuilder getUrlOrBuilder() {
return getUrl();
}
public static final int INPUT_ID_CONFLICT_RESOLUTION_FIELD_NUMBER = 3;
private int inputIdConflictResolution_;
/**
*
* How to handle input ID conflicts.
*
*
* .clarifai.api.InputIDConflictResolution input_id_conflict_resolution = 3;
* @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 = 3;
* @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 = 4;
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 = 4;
* @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 = 4;
* @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 = 4;
*/
@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 (url_ != null) {
output.writeMessage(2, getUrl());
}
if (inputIdConflictResolution_ != com.clarifai.grpc.api.InputIDConflictResolution.INPUT_ID_CONFLICT_RESOLUTION_NOT_SET.getNumber()) {
output.writeEnum(3, inputIdConflictResolution_);
}
if (inputTemplate_ != null) {
output.writeMessage(4, 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 (url_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getUrl());
}
if (inputIdConflictResolution_ != com.clarifai.grpc.api.InputIDConflictResolution.INPUT_ID_CONFLICT_RESOLUTION_NOT_SET.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(3, inputIdConflictResolution_);
}
if (inputTemplate_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, 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.InputsDataSource)) {
return super.equals(obj);
}
com.clarifai.grpc.api.InputsDataSource other = (com.clarifai.grpc.api.InputsDataSource) obj;
if (!getInputsAddJobId()
.equals(other.getInputsAddJobId())) return false;
if (hasUrl() != other.hasUrl()) return false;
if (hasUrl()) {
if (!getUrl()
.equals(other.getUrl())) 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();
if (hasUrl()) {
hash = (37 * hash) + URL_FIELD_NUMBER;
hash = (53 * hash) + getUrl().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.InputsDataSource parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.InputsDataSource 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.InputsDataSource parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.InputsDataSource 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.InputsDataSource parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.InputsDataSource parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.clarifai.grpc.api.InputsDataSource parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.InputsDataSource 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.InputsDataSource parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.InputsDataSource 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.InputsDataSource parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.InputsDataSource 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.InputsDataSource 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.InputsDataSource}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:clarifai.api.InputsDataSource)
com.clarifai.grpc.api.InputsDataSourceOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_InputsDataSource_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_InputsDataSource_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.InputsDataSource.class, com.clarifai.grpc.api.InputsDataSource.Builder.class);
}
// Construct using com.clarifai.grpc.api.InputsDataSource.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_ = "";
if (urlBuilder_ == null) {
url_ = null;
} else {
url_ = null;
urlBuilder_ = 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_InputsDataSource_descriptor;
}
@java.lang.Override
public com.clarifai.grpc.api.InputsDataSource getDefaultInstanceForType() {
return com.clarifai.grpc.api.InputsDataSource.getDefaultInstance();
}
@java.lang.Override
public com.clarifai.grpc.api.InputsDataSource build() {
com.clarifai.grpc.api.InputsDataSource result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.clarifai.grpc.api.InputsDataSource buildPartial() {
com.clarifai.grpc.api.InputsDataSource result = new com.clarifai.grpc.api.InputsDataSource(this);
result.inputsAddJobId_ = inputsAddJobId_;
if (urlBuilder_ == null) {
result.url_ = url_;
} else {
result.url_ = urlBuilder_.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.InputsDataSource) {
return mergeFrom((com.clarifai.grpc.api.InputsDataSource)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.clarifai.grpc.api.InputsDataSource other) {
if (other == com.clarifai.grpc.api.InputsDataSource.getDefaultInstance()) return this;
if (!other.getInputsAddJobId().isEmpty()) {
inputsAddJobId_ = other.inputsAddJobId_;
onChanged();
}
if (other.hasUrl()) {
mergeUrl(other.getUrl());
}
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.InputsDataSource parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.clarifai.grpc.api.InputsDataSource) 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.
* On Post call:
* * 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.
* On Post call:
* * 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.
* On Post call:
* * 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.
* On Post call:
* * 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.
* On Post call:
* * 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 com.clarifai.grpc.api.DataSourceURL url_;
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.DataSourceURL, com.clarifai.grpc.api.DataSourceURL.Builder, com.clarifai.grpc.api.DataSourceURLOrBuilder> urlBuilder_;
/**
* .clarifai.api.DataSourceURL url = 2;
* @return Whether the url field is set.
*/
public boolean hasUrl() {
return urlBuilder_ != null || url_ != null;
}
/**
* .clarifai.api.DataSourceURL url = 2;
* @return The url.
*/
public com.clarifai.grpc.api.DataSourceURL getUrl() {
if (urlBuilder_ == null) {
return url_ == null ? com.clarifai.grpc.api.DataSourceURL.getDefaultInstance() : url_;
} else {
return urlBuilder_.getMessage();
}
}
/**
* .clarifai.api.DataSourceURL url = 2;
*/
public Builder setUrl(com.clarifai.grpc.api.DataSourceURL value) {
if (urlBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
url_ = value;
onChanged();
} else {
urlBuilder_.setMessage(value);
}
return this;
}
/**
* .clarifai.api.DataSourceURL url = 2;
*/
public Builder setUrl(
com.clarifai.grpc.api.DataSourceURL.Builder builderForValue) {
if (urlBuilder_ == null) {
url_ = builderForValue.build();
onChanged();
} else {
urlBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .clarifai.api.DataSourceURL url = 2;
*/
public Builder mergeUrl(com.clarifai.grpc.api.DataSourceURL value) {
if (urlBuilder_ == null) {
if (url_ != null) {
url_ =
com.clarifai.grpc.api.DataSourceURL.newBuilder(url_).mergeFrom(value).buildPartial();
} else {
url_ = value;
}
onChanged();
} else {
urlBuilder_.mergeFrom(value);
}
return this;
}
/**
* .clarifai.api.DataSourceURL url = 2;
*/
public Builder clearUrl() {
if (urlBuilder_ == null) {
url_ = null;
onChanged();
} else {
url_ = null;
urlBuilder_ = null;
}
return this;
}
/**
* .clarifai.api.DataSourceURL url = 2;
*/
public com.clarifai.grpc.api.DataSourceURL.Builder getUrlBuilder() {
onChanged();
return getUrlFieldBuilder().getBuilder();
}
/**
* .clarifai.api.DataSourceURL url = 2;
*/
public com.clarifai.grpc.api.DataSourceURLOrBuilder getUrlOrBuilder() {
if (urlBuilder_ != null) {
return urlBuilder_.getMessageOrBuilder();
} else {
return url_ == null ?
com.clarifai.grpc.api.DataSourceURL.getDefaultInstance() : url_;
}
}
/**
* .clarifai.api.DataSourceURL url = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.DataSourceURL, com.clarifai.grpc.api.DataSourceURL.Builder, com.clarifai.grpc.api.DataSourceURLOrBuilder>
getUrlFieldBuilder() {
if (urlBuilder_ == null) {
urlBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.DataSourceURL, com.clarifai.grpc.api.DataSourceURL.Builder, com.clarifai.grpc.api.DataSourceURLOrBuilder>(
getUrl(),
getParentForChildren(),
isClean());
url_ = null;
}
return urlBuilder_;
}
private int inputIdConflictResolution_ = 0;
/**
*
* How to handle input ID conflicts.
*
*
* .clarifai.api.InputIDConflictResolution input_id_conflict_resolution = 3;
* @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 = 3;
* @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 = 3;
* @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 = 3;
* @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 = 3;
* @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 = 4;
* @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 = 4;
* @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 = 4;
*/
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 = 4;
*/
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 = 4;
*/
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 = 4;
*/
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 = 4;
*/
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 = 4;
*/
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 = 4;
*/
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.InputsDataSource)
}
// @@protoc_insertion_point(class_scope:clarifai.api.InputsDataSource)
private static final com.clarifai.grpc.api.InputsDataSource DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.clarifai.grpc.api.InputsDataSource();
}
public static com.clarifai.grpc.api.InputsDataSource getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public InputsDataSource parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new InputsDataSource(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.InputsDataSource getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}