com.clarifai.grpc.api.PretrainedModelConfig Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: proto/clarifai/api/resources.proto
package com.clarifai.grpc.api;
/**
*
* PretrainedModelConfig
*
*
* Protobuf type {@code clarifai.api.PretrainedModelConfig}
*/
public final class PretrainedModelConfig extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:clarifai.api.PretrainedModelConfig)
PretrainedModelConfigOrBuilder {
private static final long serialVersionUID = 0L;
// Use PretrainedModelConfig.newBuilder() to construct.
private PretrainedModelConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private PretrainedModelConfig() {
modelZipUrl_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new PretrainedModelConfig();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private PretrainedModelConfig(
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 26: {
com.google.protobuf.Struct.Builder subBuilder = null;
if (inputFieldsMap_ != null) {
subBuilder = inputFieldsMap_.toBuilder();
}
inputFieldsMap_ = input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(inputFieldsMap_);
inputFieldsMap_ = subBuilder.buildPartial();
}
break;
}
case 34: {
com.google.protobuf.Struct.Builder subBuilder = null;
if (outputFieldsMap_ != null) {
subBuilder = outputFieldsMap_.toBuilder();
}
outputFieldsMap_ = input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(outputFieldsMap_);
outputFieldsMap_ = subBuilder.buildPartial();
}
break;
}
case 50: {
java.lang.String s = input.readStringRequireUtf8();
modelZipUrl_ = 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 {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_PretrainedModelConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_PretrainedModelConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.PretrainedModelConfig.class, com.clarifai.grpc.api.PretrainedModelConfig.Builder.class);
}
public static final int INPUT_FIELDS_MAP_FIELD_NUMBER = 3;
private com.google.protobuf.Struct inputFieldsMap_;
/**
*
* This is the internal id of the pretrained model.
* Map from the api.Data field names to the Triton config.pbtxt input.
*
*
* .google.protobuf.Struct input_fields_map = 3;
* @return Whether the inputFieldsMap field is set.
*/
@java.lang.Override
public boolean hasInputFieldsMap() {
return inputFieldsMap_ != null;
}
/**
*
* This is the internal id of the pretrained model.
* Map from the api.Data field names to the Triton config.pbtxt input.
*
*
* .google.protobuf.Struct input_fields_map = 3;
* @return The inputFieldsMap.
*/
@java.lang.Override
public com.google.protobuf.Struct getInputFieldsMap() {
return inputFieldsMap_ == null ? com.google.protobuf.Struct.getDefaultInstance() : inputFieldsMap_;
}
/**
*
* This is the internal id of the pretrained model.
* Map from the api.Data field names to the Triton config.pbtxt input.
*
*
* .google.protobuf.Struct input_fields_map = 3;
*/
@java.lang.Override
public com.google.protobuf.StructOrBuilder getInputFieldsMapOrBuilder() {
return getInputFieldsMap();
}
public static final int OUTPUT_FIELDS_MAP_FIELD_NUMBER = 4;
private com.google.protobuf.Struct outputFieldsMap_;
/**
*
* Map from the api.Data field names to the Triton config.pbtxt output.
*
*
* .google.protobuf.Struct output_fields_map = 4;
* @return Whether the outputFieldsMap field is set.
*/
@java.lang.Override
public boolean hasOutputFieldsMap() {
return outputFieldsMap_ != null;
}
/**
*
* Map from the api.Data field names to the Triton config.pbtxt output.
*
*
* .google.protobuf.Struct output_fields_map = 4;
* @return The outputFieldsMap.
*/
@java.lang.Override
public com.google.protobuf.Struct getOutputFieldsMap() {
return outputFieldsMap_ == null ? com.google.protobuf.Struct.getDefaultInstance() : outputFieldsMap_;
}
/**
*
* Map from the api.Data field names to the Triton config.pbtxt output.
*
*
* .google.protobuf.Struct output_fields_map = 4;
*/
@java.lang.Override
public com.google.protobuf.StructOrBuilder getOutputFieldsMapOrBuilder() {
return getOutputFieldsMap();
}
public static final int MODEL_ZIP_URL_FIELD_NUMBER = 6;
private volatile java.lang.Object modelZipUrl_;
/**
*
* Url to a zipped up model in triton format with the following files and folders at the root:
* config.pbtxt
* version 1 folder that contains model files (onnx graph, torch script, python BE model, and etc.)
*
*
* string model_zip_url = 6;
* @return The modelZipUrl.
*/
@java.lang.Override
public java.lang.String getModelZipUrl() {
java.lang.Object ref = modelZipUrl_;
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();
modelZipUrl_ = s;
return s;
}
}
/**
*
* Url to a zipped up model in triton format with the following files and folders at the root:
* config.pbtxt
* version 1 folder that contains model files (onnx graph, torch script, python BE model, and etc.)
*
*
* string model_zip_url = 6;
* @return The bytes for modelZipUrl.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getModelZipUrlBytes() {
java.lang.Object ref = modelZipUrl_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
modelZipUrl_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
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 (inputFieldsMap_ != null) {
output.writeMessage(3, getInputFieldsMap());
}
if (outputFieldsMap_ != null) {
output.writeMessage(4, getOutputFieldsMap());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(modelZipUrl_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, modelZipUrl_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (inputFieldsMap_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getInputFieldsMap());
}
if (outputFieldsMap_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getOutputFieldsMap());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(modelZipUrl_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, modelZipUrl_);
}
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.PretrainedModelConfig)) {
return super.equals(obj);
}
com.clarifai.grpc.api.PretrainedModelConfig other = (com.clarifai.grpc.api.PretrainedModelConfig) obj;
if (hasInputFieldsMap() != other.hasInputFieldsMap()) return false;
if (hasInputFieldsMap()) {
if (!getInputFieldsMap()
.equals(other.getInputFieldsMap())) return false;
}
if (hasOutputFieldsMap() != other.hasOutputFieldsMap()) return false;
if (hasOutputFieldsMap()) {
if (!getOutputFieldsMap()
.equals(other.getOutputFieldsMap())) return false;
}
if (!getModelZipUrl()
.equals(other.getModelZipUrl())) 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();
if (hasInputFieldsMap()) {
hash = (37 * hash) + INPUT_FIELDS_MAP_FIELD_NUMBER;
hash = (53 * hash) + getInputFieldsMap().hashCode();
}
if (hasOutputFieldsMap()) {
hash = (37 * hash) + OUTPUT_FIELDS_MAP_FIELD_NUMBER;
hash = (53 * hash) + getOutputFieldsMap().hashCode();
}
hash = (37 * hash) + MODEL_ZIP_URL_FIELD_NUMBER;
hash = (53 * hash) + getModelZipUrl().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.clarifai.grpc.api.PretrainedModelConfig parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.PretrainedModelConfig 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.PretrainedModelConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.PretrainedModelConfig 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.PretrainedModelConfig parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.PretrainedModelConfig parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.clarifai.grpc.api.PretrainedModelConfig parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.PretrainedModelConfig 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.PretrainedModelConfig parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.PretrainedModelConfig 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.PretrainedModelConfig parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.PretrainedModelConfig 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.PretrainedModelConfig 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;
}
/**
*
* PretrainedModelConfig
*
*
* Protobuf type {@code clarifai.api.PretrainedModelConfig}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:clarifai.api.PretrainedModelConfig)
com.clarifai.grpc.api.PretrainedModelConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_PretrainedModelConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_PretrainedModelConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.PretrainedModelConfig.class, com.clarifai.grpc.api.PretrainedModelConfig.Builder.class);
}
// Construct using com.clarifai.grpc.api.PretrainedModelConfig.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();
if (inputFieldsMapBuilder_ == null) {
inputFieldsMap_ = null;
} else {
inputFieldsMap_ = null;
inputFieldsMapBuilder_ = null;
}
if (outputFieldsMapBuilder_ == null) {
outputFieldsMap_ = null;
} else {
outputFieldsMap_ = null;
outputFieldsMapBuilder_ = null;
}
modelZipUrl_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_PretrainedModelConfig_descriptor;
}
@java.lang.Override
public com.clarifai.grpc.api.PretrainedModelConfig getDefaultInstanceForType() {
return com.clarifai.grpc.api.PretrainedModelConfig.getDefaultInstance();
}
@java.lang.Override
public com.clarifai.grpc.api.PretrainedModelConfig build() {
com.clarifai.grpc.api.PretrainedModelConfig result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.clarifai.grpc.api.PretrainedModelConfig buildPartial() {
com.clarifai.grpc.api.PretrainedModelConfig result = new com.clarifai.grpc.api.PretrainedModelConfig(this);
if (inputFieldsMapBuilder_ == null) {
result.inputFieldsMap_ = inputFieldsMap_;
} else {
result.inputFieldsMap_ = inputFieldsMapBuilder_.build();
}
if (outputFieldsMapBuilder_ == null) {
result.outputFieldsMap_ = outputFieldsMap_;
} else {
result.outputFieldsMap_ = outputFieldsMapBuilder_.build();
}
result.modelZipUrl_ = modelZipUrl_;
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.PretrainedModelConfig) {
return mergeFrom((com.clarifai.grpc.api.PretrainedModelConfig)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.clarifai.grpc.api.PretrainedModelConfig other) {
if (other == com.clarifai.grpc.api.PretrainedModelConfig.getDefaultInstance()) return this;
if (other.hasInputFieldsMap()) {
mergeInputFieldsMap(other.getInputFieldsMap());
}
if (other.hasOutputFieldsMap()) {
mergeOutputFieldsMap(other.getOutputFieldsMap());
}
if (!other.getModelZipUrl().isEmpty()) {
modelZipUrl_ = other.modelZipUrl_;
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.PretrainedModelConfig parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.clarifai.grpc.api.PretrainedModelConfig) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private com.google.protobuf.Struct inputFieldsMap_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> inputFieldsMapBuilder_;
/**
*
* This is the internal id of the pretrained model.
* Map from the api.Data field names to the Triton config.pbtxt input.
*
*
* .google.protobuf.Struct input_fields_map = 3;
* @return Whether the inputFieldsMap field is set.
*/
public boolean hasInputFieldsMap() {
return inputFieldsMapBuilder_ != null || inputFieldsMap_ != null;
}
/**
*
* This is the internal id of the pretrained model.
* Map from the api.Data field names to the Triton config.pbtxt input.
*
*
* .google.protobuf.Struct input_fields_map = 3;
* @return The inputFieldsMap.
*/
public com.google.protobuf.Struct getInputFieldsMap() {
if (inputFieldsMapBuilder_ == null) {
return inputFieldsMap_ == null ? com.google.protobuf.Struct.getDefaultInstance() : inputFieldsMap_;
} else {
return inputFieldsMapBuilder_.getMessage();
}
}
/**
*
* This is the internal id of the pretrained model.
* Map from the api.Data field names to the Triton config.pbtxt input.
*
*
* .google.protobuf.Struct input_fields_map = 3;
*/
public Builder setInputFieldsMap(com.google.protobuf.Struct value) {
if (inputFieldsMapBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
inputFieldsMap_ = value;
onChanged();
} else {
inputFieldsMapBuilder_.setMessage(value);
}
return this;
}
/**
*
* This is the internal id of the pretrained model.
* Map from the api.Data field names to the Triton config.pbtxt input.
*
*
* .google.protobuf.Struct input_fields_map = 3;
*/
public Builder setInputFieldsMap(
com.google.protobuf.Struct.Builder builderForValue) {
if (inputFieldsMapBuilder_ == null) {
inputFieldsMap_ = builderForValue.build();
onChanged();
} else {
inputFieldsMapBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* This is the internal id of the pretrained model.
* Map from the api.Data field names to the Triton config.pbtxt input.
*
*
* .google.protobuf.Struct input_fields_map = 3;
*/
public Builder mergeInputFieldsMap(com.google.protobuf.Struct value) {
if (inputFieldsMapBuilder_ == null) {
if (inputFieldsMap_ != null) {
inputFieldsMap_ =
com.google.protobuf.Struct.newBuilder(inputFieldsMap_).mergeFrom(value).buildPartial();
} else {
inputFieldsMap_ = value;
}
onChanged();
} else {
inputFieldsMapBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* This is the internal id of the pretrained model.
* Map from the api.Data field names to the Triton config.pbtxt input.
*
*
* .google.protobuf.Struct input_fields_map = 3;
*/
public Builder clearInputFieldsMap() {
if (inputFieldsMapBuilder_ == null) {
inputFieldsMap_ = null;
onChanged();
} else {
inputFieldsMap_ = null;
inputFieldsMapBuilder_ = null;
}
return this;
}
/**
*
* This is the internal id of the pretrained model.
* Map from the api.Data field names to the Triton config.pbtxt input.
*
*
* .google.protobuf.Struct input_fields_map = 3;
*/
public com.google.protobuf.Struct.Builder getInputFieldsMapBuilder() {
onChanged();
return getInputFieldsMapFieldBuilder().getBuilder();
}
/**
*
* This is the internal id of the pretrained model.
* Map from the api.Data field names to the Triton config.pbtxt input.
*
*
* .google.protobuf.Struct input_fields_map = 3;
*/
public com.google.protobuf.StructOrBuilder getInputFieldsMapOrBuilder() {
if (inputFieldsMapBuilder_ != null) {
return inputFieldsMapBuilder_.getMessageOrBuilder();
} else {
return inputFieldsMap_ == null ?
com.google.protobuf.Struct.getDefaultInstance() : inputFieldsMap_;
}
}
/**
*
* This is the internal id of the pretrained model.
* Map from the api.Data field names to the Triton config.pbtxt input.
*
*
* .google.protobuf.Struct input_fields_map = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>
getInputFieldsMapFieldBuilder() {
if (inputFieldsMapBuilder_ == null) {
inputFieldsMapBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>(
getInputFieldsMap(),
getParentForChildren(),
isClean());
inputFieldsMap_ = null;
}
return inputFieldsMapBuilder_;
}
private com.google.protobuf.Struct outputFieldsMap_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> outputFieldsMapBuilder_;
/**
*
* Map from the api.Data field names to the Triton config.pbtxt output.
*
*
* .google.protobuf.Struct output_fields_map = 4;
* @return Whether the outputFieldsMap field is set.
*/
public boolean hasOutputFieldsMap() {
return outputFieldsMapBuilder_ != null || outputFieldsMap_ != null;
}
/**
*
* Map from the api.Data field names to the Triton config.pbtxt output.
*
*
* .google.protobuf.Struct output_fields_map = 4;
* @return The outputFieldsMap.
*/
public com.google.protobuf.Struct getOutputFieldsMap() {
if (outputFieldsMapBuilder_ == null) {
return outputFieldsMap_ == null ? com.google.protobuf.Struct.getDefaultInstance() : outputFieldsMap_;
} else {
return outputFieldsMapBuilder_.getMessage();
}
}
/**
*
* Map from the api.Data field names to the Triton config.pbtxt output.
*
*
* .google.protobuf.Struct output_fields_map = 4;
*/
public Builder setOutputFieldsMap(com.google.protobuf.Struct value) {
if (outputFieldsMapBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
outputFieldsMap_ = value;
onChanged();
} else {
outputFieldsMapBuilder_.setMessage(value);
}
return this;
}
/**
*
* Map from the api.Data field names to the Triton config.pbtxt output.
*
*
* .google.protobuf.Struct output_fields_map = 4;
*/
public Builder setOutputFieldsMap(
com.google.protobuf.Struct.Builder builderForValue) {
if (outputFieldsMapBuilder_ == null) {
outputFieldsMap_ = builderForValue.build();
onChanged();
} else {
outputFieldsMapBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Map from the api.Data field names to the Triton config.pbtxt output.
*
*
* .google.protobuf.Struct output_fields_map = 4;
*/
public Builder mergeOutputFieldsMap(com.google.protobuf.Struct value) {
if (outputFieldsMapBuilder_ == null) {
if (outputFieldsMap_ != null) {
outputFieldsMap_ =
com.google.protobuf.Struct.newBuilder(outputFieldsMap_).mergeFrom(value).buildPartial();
} else {
outputFieldsMap_ = value;
}
onChanged();
} else {
outputFieldsMapBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Map from the api.Data field names to the Triton config.pbtxt output.
*
*
* .google.protobuf.Struct output_fields_map = 4;
*/
public Builder clearOutputFieldsMap() {
if (outputFieldsMapBuilder_ == null) {
outputFieldsMap_ = null;
onChanged();
} else {
outputFieldsMap_ = null;
outputFieldsMapBuilder_ = null;
}
return this;
}
/**
*
* Map from the api.Data field names to the Triton config.pbtxt output.
*
*
* .google.protobuf.Struct output_fields_map = 4;
*/
public com.google.protobuf.Struct.Builder getOutputFieldsMapBuilder() {
onChanged();
return getOutputFieldsMapFieldBuilder().getBuilder();
}
/**
*
* Map from the api.Data field names to the Triton config.pbtxt output.
*
*
* .google.protobuf.Struct output_fields_map = 4;
*/
public com.google.protobuf.StructOrBuilder getOutputFieldsMapOrBuilder() {
if (outputFieldsMapBuilder_ != null) {
return outputFieldsMapBuilder_.getMessageOrBuilder();
} else {
return outputFieldsMap_ == null ?
com.google.protobuf.Struct.getDefaultInstance() : outputFieldsMap_;
}
}
/**
*
* Map from the api.Data field names to the Triton config.pbtxt output.
*
*
* .google.protobuf.Struct output_fields_map = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>
getOutputFieldsMapFieldBuilder() {
if (outputFieldsMapBuilder_ == null) {
outputFieldsMapBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>(
getOutputFieldsMap(),
getParentForChildren(),
isClean());
outputFieldsMap_ = null;
}
return outputFieldsMapBuilder_;
}
private java.lang.Object modelZipUrl_ = "";
/**
*
* Url to a zipped up model in triton format with the following files and folders at the root:
* config.pbtxt
* version 1 folder that contains model files (onnx graph, torch script, python BE model, and etc.)
*
*
* string model_zip_url = 6;
* @return The modelZipUrl.
*/
public java.lang.String getModelZipUrl() {
java.lang.Object ref = modelZipUrl_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
modelZipUrl_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Url to a zipped up model in triton format with the following files and folders at the root:
* config.pbtxt
* version 1 folder that contains model files (onnx graph, torch script, python BE model, and etc.)
*
*
* string model_zip_url = 6;
* @return The bytes for modelZipUrl.
*/
public com.google.protobuf.ByteString
getModelZipUrlBytes() {
java.lang.Object ref = modelZipUrl_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
modelZipUrl_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Url to a zipped up model in triton format with the following files and folders at the root:
* config.pbtxt
* version 1 folder that contains model files (onnx graph, torch script, python BE model, and etc.)
*
*
* string model_zip_url = 6;
* @param value The modelZipUrl to set.
* @return This builder for chaining.
*/
public Builder setModelZipUrl(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
modelZipUrl_ = value;
onChanged();
return this;
}
/**
*
* Url to a zipped up model in triton format with the following files and folders at the root:
* config.pbtxt
* version 1 folder that contains model files (onnx graph, torch script, python BE model, and etc.)
*
*
* string model_zip_url = 6;
* @return This builder for chaining.
*/
public Builder clearModelZipUrl() {
modelZipUrl_ = getDefaultInstance().getModelZipUrl();
onChanged();
return this;
}
/**
*
* Url to a zipped up model in triton format with the following files and folders at the root:
* config.pbtxt
* version 1 folder that contains model files (onnx graph, torch script, python BE model, and etc.)
*
*
* string model_zip_url = 6;
* @param value The bytes for modelZipUrl to set.
* @return This builder for chaining.
*/
public Builder setModelZipUrlBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
modelZipUrl_ = 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.PretrainedModelConfig)
}
// @@protoc_insertion_point(class_scope:clarifai.api.PretrainedModelConfig)
private static final com.clarifai.grpc.api.PretrainedModelConfig DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.clarifai.grpc.api.PretrainedModelConfig();
}
public static com.clarifai.grpc.api.PretrainedModelConfig getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public PretrainedModelConfig parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new PretrainedModelConfig(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.PretrainedModelConfig getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}