
com.clarifai.grpc.api.Model Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: proto/clarifai/api/resources.proto
package com.clarifai.grpc.api;
/**
*
* This is the Model object which represents a created model in the platform.
* Each model has a particular type denoted by the model_type_id.
* When creating a Model with PostModels the following happens:
* - if the ModelType is trainable, then a new ModelVersion is created that is
* - UNTRAINED status by default
* - TRAINED status if a ModelVersion was included with PretrainedModelConfig in PostModels
* - if the ModelType is not trainable, then a new ModelVersion is created with TRAINED status.
* To modify config settings like OutputInfo for the Model you an use PatchModels. This will
* also create a new ModelVersion, potentially UNTRAINED following the same rules as above.
* The fields that are patchable include Model.name, Model.display_name and Model.output_info
* (except the Model.output_info.type and Model.output_info.type_ext).
*
*
* Protobuf type {@code clarifai.api.Model}
*/
public final class Model extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:clarifai.api.Model)
ModelOrBuilder {
private static final long serialVersionUID = 0L;
// Use Model.newBuilder() to construct.
private Model(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Model() {
id_ = "";
name_ = "";
appId_ = "";
displayName_ = "";
userId_ = "";
modelTypeId_ = "";
description_ = "";
notes_ = "";
toolkits_ = com.google.protobuf.LazyStringArrayList.EMPTY;
useCases_ = com.google.protobuf.LazyStringArrayList.EMPTY;
languages_ = com.google.protobuf.LazyStringArrayList.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Model();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Model(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
id_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
case 26: {
com.google.protobuf.Timestamp.Builder subBuilder = null;
if (createdAt_ != null) {
subBuilder = createdAt_.toBuilder();
}
createdAt_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(createdAt_);
createdAt_ = subBuilder.buildPartial();
}
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
appId_ = s;
break;
}
case 42: {
com.clarifai.grpc.api.OutputInfo.Builder subBuilder = null;
if (outputInfo_ != null) {
subBuilder = outputInfo_.toBuilder();
}
outputInfo_ = input.readMessage(com.clarifai.grpc.api.OutputInfo.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(outputInfo_);
outputInfo_ = subBuilder.buildPartial();
}
break;
}
case 50: {
com.clarifai.grpc.api.ModelVersion.Builder subBuilder = null;
if (modelVersion_ != null) {
subBuilder = modelVersion_.toBuilder();
}
modelVersion_ = input.readMessage(com.clarifai.grpc.api.ModelVersion.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(modelVersion_);
modelVersion_ = subBuilder.buildPartial();
}
break;
}
case 58: {
java.lang.String s = input.readStringRequireUtf8();
displayName_ = s;
break;
}
case 74: {
java.lang.String s = input.readStringRequireUtf8();
userId_ = s;
break;
}
case 98: {
com.clarifai.grpc.api.InputInfo.Builder subBuilder = null;
if (inputInfo_ != null) {
subBuilder = inputInfo_.toBuilder();
}
inputInfo_ = input.readMessage(com.clarifai.grpc.api.InputInfo.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(inputInfo_);
inputInfo_ = subBuilder.buildPartial();
}
break;
}
case 106: {
com.clarifai.grpc.api.TrainInfo.Builder subBuilder = null;
if (trainInfo_ != null) {
subBuilder = trainInfo_.toBuilder();
}
trainInfo_ = input.readMessage(com.clarifai.grpc.api.TrainInfo.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(trainInfo_);
trainInfo_ = subBuilder.buildPartial();
}
break;
}
case 114: {
java.lang.String s = input.readStringRequireUtf8();
modelTypeId_ = s;
break;
}
case 122: {
com.clarifai.grpc.api.Visibility.Builder subBuilder = null;
if (visibility_ != null) {
subBuilder = visibility_.toBuilder();
}
visibility_ = input.readMessage(com.clarifai.grpc.api.Visibility.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(visibility_);
visibility_ = subBuilder.buildPartial();
}
break;
}
case 130: {
java.lang.String s = input.readStringRequireUtf8();
description_ = s;
break;
}
case 138: {
com.google.protobuf.Struct.Builder subBuilder = null;
if (metadata_ != null) {
subBuilder = metadata_.toBuilder();
}
metadata_ = input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(metadata_);
metadata_ = subBuilder.buildPartial();
}
break;
}
case 146: {
java.lang.String s = input.readStringRequireUtf8();
notes_ = s;
break;
}
case 154: {
com.google.protobuf.Timestamp.Builder subBuilder = null;
if (modifiedAt_ != null) {
subBuilder = modifiedAt_.toBuilder();
}
modifiedAt_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(modifiedAt_);
modifiedAt_ = subBuilder.buildPartial();
}
break;
}
case 162: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
toolkits_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000001;
}
toolkits_.add(s);
break;
}
case 170: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
useCases_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000002;
}
useCases_.add(s);
break;
}
case 176: {
isStarred_ = input.readBool();
break;
}
case 184: {
starCount_ = input.readInt32();
break;
}
case 194: {
com.clarifai.grpc.api.ImportInfo.Builder subBuilder = null;
if (importInfo_ != null) {
subBuilder = importInfo_.toBuilder();
}
importInfo_ = input.readMessage(com.clarifai.grpc.api.ImportInfo.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(importInfo_);
importInfo_ = subBuilder.buildPartial();
}
break;
}
case 202: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000004) != 0)) {
languages_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000004;
}
languages_.add(s);
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
toolkits_ = toolkits_.getUnmodifiableView();
}
if (((mutable_bitField0_ & 0x00000002) != 0)) {
useCases_ = useCases_.getUnmodifiableView();
}
if (((mutable_bitField0_ & 0x00000004) != 0)) {
languages_ = languages_.getUnmodifiableView();
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Model_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Model_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.Model.class, com.clarifai.grpc.api.Model.Builder.class);
}
public static final int ID_FIELD_NUMBER = 1;
private volatile java.lang.Object id_;
/**
*
* The model's ID. Must be unique within a particular app and URL-friendly.
*
*
* string id = 1;
* @return The id.
*/
public java.lang.String getId() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
}
}
/**
*
* The model's ID. Must be unique within a particular app and URL-friendly.
*
*
* string id = 1;
* @return The bytes for id.
*/
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int NAME_FIELD_NUMBER = 2;
private volatile java.lang.Object name_;
/**
*
* A nicer-to-read name for the model. Can have spaces and special characters.
*
*
* string name = 2;
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
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();
name_ = s;
return s;
}
}
/**
*
* A nicer-to-read name for the model. Can have spaces and special characters.
*
*
* string name = 2;
* @return The bytes for name.
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CREATED_AT_FIELD_NUMBER = 3;
private com.google.protobuf.Timestamp createdAt_;
/**
*
* When the model was created. We follow the XXXX timestamp
* format. We use https://www.ietf.org/rfc/rfc3339.txt format:
* "2006-01-02T15:04:05.999999Z" so you can expect results like
* the following from the API:
* "2017-04-11T21:50:50.223962Z"
*
*
* .google.protobuf.Timestamp created_at = 3;
* @return Whether the createdAt field is set.
*/
public boolean hasCreatedAt() {
return createdAt_ != null;
}
/**
*
* When the model was created. We follow the XXXX timestamp
* format. We use https://www.ietf.org/rfc/rfc3339.txt format:
* "2006-01-02T15:04:05.999999Z" so you can expect results like
* the following from the API:
* "2017-04-11T21:50:50.223962Z"
*
*
* .google.protobuf.Timestamp created_at = 3;
* @return The createdAt.
*/
public com.google.protobuf.Timestamp getCreatedAt() {
return createdAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_;
}
/**
*
* When the model was created. We follow the XXXX timestamp
* format. We use https://www.ietf.org/rfc/rfc3339.txt format:
* "2006-01-02T15:04:05.999999Z" so you can expect results like
* the following from the API:
* "2017-04-11T21:50:50.223962Z"
*
*
* .google.protobuf.Timestamp created_at = 3;
*/
public com.google.protobuf.TimestampOrBuilder getCreatedAtOrBuilder() {
return getCreatedAt();
}
public static final int MODIFIED_AT_FIELD_NUMBER = 19;
private com.google.protobuf.Timestamp modifiedAt_;
/**
*
* When was the most recent model version created at
*
*
* .google.protobuf.Timestamp modified_at = 19;
* @return Whether the modifiedAt field is set.
*/
public boolean hasModifiedAt() {
return modifiedAt_ != null;
}
/**
*
* When was the most recent model version created at
*
*
* .google.protobuf.Timestamp modified_at = 19;
* @return The modifiedAt.
*/
public com.google.protobuf.Timestamp getModifiedAt() {
return modifiedAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : modifiedAt_;
}
/**
*
* When was the most recent model version created at
*
*
* .google.protobuf.Timestamp modified_at = 19;
*/
public com.google.protobuf.TimestampOrBuilder getModifiedAtOrBuilder() {
return getModifiedAt();
}
public static final int APP_ID_FIELD_NUMBER = 4;
private volatile java.lang.Object appId_;
/**
*
* The app the model belongs to.
*
*
* string app_id = 4 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @return The appId.
*/
public java.lang.String getAppId() {
java.lang.Object ref = appId_;
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();
appId_ = s;
return s;
}
}
/**
*
* The app the model belongs to.
*
*
* string app_id = 4 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @return The bytes for appId.
*/
public com.google.protobuf.ByteString
getAppIdBytes() {
java.lang.Object ref = appId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
appId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int OUTPUT_INFO_FIELD_NUMBER = 5;
private com.clarifai.grpc.api.OutputInfo outputInfo_;
/**
*
* Info about the model's output and configuration.
*
*
* .clarifai.api.OutputInfo output_info = 5;
* @return Whether the outputInfo field is set.
*/
public boolean hasOutputInfo() {
return outputInfo_ != null;
}
/**
*
* Info about the model's output and configuration.
*
*
* .clarifai.api.OutputInfo output_info = 5;
* @return The outputInfo.
*/
public com.clarifai.grpc.api.OutputInfo getOutputInfo() {
return outputInfo_ == null ? com.clarifai.grpc.api.OutputInfo.getDefaultInstance() : outputInfo_;
}
/**
*
* Info about the model's output and configuration.
*
*
* .clarifai.api.OutputInfo output_info = 5;
*/
public com.clarifai.grpc.api.OutputInfoOrBuilder getOutputInfoOrBuilder() {
return getOutputInfo();
}
public static final int MODEL_VERSION_FIELD_NUMBER = 6;
private com.clarifai.grpc.api.ModelVersion modelVersion_;
/**
*
* A particular version of the model, e.g., to specify the version when creating a workflow.
*
*
* .clarifai.api.ModelVersion model_version = 6;
* @return Whether the modelVersion field is set.
*/
public boolean hasModelVersion() {
return modelVersion_ != null;
}
/**
*
* A particular version of the model, e.g., to specify the version when creating a workflow.
*
*
* .clarifai.api.ModelVersion model_version = 6;
* @return The modelVersion.
*/
public com.clarifai.grpc.api.ModelVersion getModelVersion() {
return modelVersion_ == null ? com.clarifai.grpc.api.ModelVersion.getDefaultInstance() : modelVersion_;
}
/**
*
* A particular version of the model, e.g., to specify the version when creating a workflow.
*
*
* .clarifai.api.ModelVersion model_version = 6;
*/
public com.clarifai.grpc.api.ModelVersionOrBuilder getModelVersionOrBuilder() {
return getModelVersion();
}
public static final int DISPLAY_NAME_FIELD_NUMBER = 7;
private volatile java.lang.Object displayName_;
/**
*
* An even nicer-to-read name for public Clarifai models where we're not happy with the name but
* need a temporary workaround while we check what depends on these names.
*
*
* string display_name = 7;
* @return The displayName.
*/
public java.lang.String getDisplayName() {
java.lang.Object ref = displayName_;
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();
displayName_ = s;
return s;
}
}
/**
*
* An even nicer-to-read name for public Clarifai models where we're not happy with the name but
* need a temporary workaround while we check what depends on these names.
*
*
* string display_name = 7;
* @return The bytes for displayName.
*/
public com.google.protobuf.ByteString
getDisplayNameBytes() {
java.lang.Object ref = displayName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
displayName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int USER_ID_FIELD_NUMBER = 9;
private volatile java.lang.Object userId_;
/**
*
* The user id that the model belongs to.
*
*
* string user_id = 9;
* @return The userId.
*/
public java.lang.String getUserId() {
java.lang.Object ref = userId_;
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();
userId_ = s;
return s;
}
}
/**
*
* The user id that the model belongs to.
*
*
* string user_id = 9;
* @return The bytes for userId.
*/
public com.google.protobuf.ByteString
getUserIdBytes() {
java.lang.Object ref = userId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
userId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int INPUT_INFO_FIELD_NUMBER = 12;
private com.clarifai.grpc.api.InputInfo inputInfo_;
/**
*
* Info about the models' input and configuration of them.
*
*
* .clarifai.api.InputInfo input_info = 12;
* @return Whether the inputInfo field is set.
*/
public boolean hasInputInfo() {
return inputInfo_ != null;
}
/**
*
* Info about the models' input and configuration of them.
*
*
* .clarifai.api.InputInfo input_info = 12;
* @return The inputInfo.
*/
public com.clarifai.grpc.api.InputInfo getInputInfo() {
return inputInfo_ == null ? com.clarifai.grpc.api.InputInfo.getDefaultInstance() : inputInfo_;
}
/**
*
* Info about the models' input and configuration of them.
*
*
* .clarifai.api.InputInfo input_info = 12;
*/
public com.clarifai.grpc.api.InputInfoOrBuilder getInputInfoOrBuilder() {
return getInputInfo();
}
public static final int TRAIN_INFO_FIELD_NUMBER = 13;
private com.clarifai.grpc.api.TrainInfo trainInfo_;
/**
*
* Configuration for the training process of this model.
*
*
* .clarifai.api.TrainInfo train_info = 13;
* @return Whether the trainInfo field is set.
*/
public boolean hasTrainInfo() {
return trainInfo_ != null;
}
/**
*
* Configuration for the training process of this model.
*
*
* .clarifai.api.TrainInfo train_info = 13;
* @return The trainInfo.
*/
public com.clarifai.grpc.api.TrainInfo getTrainInfo() {
return trainInfo_ == null ? com.clarifai.grpc.api.TrainInfo.getDefaultInstance() : trainInfo_;
}
/**
*
* Configuration for the training process of this model.
*
*
* .clarifai.api.TrainInfo train_info = 13;
*/
public com.clarifai.grpc.api.TrainInfoOrBuilder getTrainInfoOrBuilder() {
return getTrainInfo();
}
public static final int MODEL_TYPE_ID_FIELD_NUMBER = 14;
private volatile java.lang.Object modelTypeId_;
/**
*
* The ModelType.Id that is used for this model. This is used for all versions and you cannot
* change model_type_id between versions of the same model.
*
*
* string model_type_id = 14;
* @return The modelTypeId.
*/
public java.lang.String getModelTypeId() {
java.lang.Object ref = modelTypeId_;
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();
modelTypeId_ = s;
return s;
}
}
/**
*
* The ModelType.Id that is used for this model. This is used for all versions and you cannot
* change model_type_id between versions of the same model.
*
*
* string model_type_id = 14;
* @return The bytes for modelTypeId.
*/
public com.google.protobuf.ByteString
getModelTypeIdBytes() {
java.lang.Object ref = modelTypeId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
modelTypeId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int VISIBILITY_FIELD_NUMBER = 15;
private com.clarifai.grpc.api.Visibility visibility_;
/**
*
* The visibility field represents whether this message is privately/publicly visible.
* To be visible to the public the App that contains it AND the User that contains the App must
* also be publicly visible.
*
*
* .clarifai.api.Visibility visibility = 15;
* @return Whether the visibility field is set.
*/
public boolean hasVisibility() {
return visibility_ != null;
}
/**
*
* The visibility field represents whether this message is privately/publicly visible.
* To be visible to the public the App that contains it AND the User that contains the App must
* also be publicly visible.
*
*
* .clarifai.api.Visibility visibility = 15;
* @return The visibility.
*/
public com.clarifai.grpc.api.Visibility getVisibility() {
return visibility_ == null ? com.clarifai.grpc.api.Visibility.getDefaultInstance() : visibility_;
}
/**
*
* The visibility field represents whether this message is privately/publicly visible.
* To be visible to the public the App that contains it AND the User that contains the App must
* also be publicly visible.
*
*
* .clarifai.api.Visibility visibility = 15;
*/
public com.clarifai.grpc.api.VisibilityOrBuilder getVisibilityOrBuilder() {
return getVisibility();
}
public static final int DESCRIPTION_FIELD_NUMBER = 16;
private volatile java.lang.Object description_;
/**
*
* Short description about this model
*
*
* string description = 16;
* @return The description.
*/
public java.lang.String getDescription() {
java.lang.Object ref = description_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
description_ = s;
return s;
}
}
/**
*
* Short description about this model
*
*
* string description = 16;
* @return The bytes for description.
*/
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int METADATA_FIELD_NUMBER = 17;
private com.google.protobuf.Struct metadata_;
/**
*
* To handle arbitrary json metadata you can use a struct field:
* https://github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto
*
*
* .google.protobuf.Struct metadata = 17;
* @return Whether the metadata field is set.
*/
public boolean hasMetadata() {
return metadata_ != null;
}
/**
*
* To handle arbitrary json metadata you can use a struct field:
* https://github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto
*
*
* .google.protobuf.Struct metadata = 17;
* @return The metadata.
*/
public com.google.protobuf.Struct getMetadata() {
return metadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : metadata_;
}
/**
*
* To handle arbitrary json metadata you can use a struct field:
* https://github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto
*
*
* .google.protobuf.Struct metadata = 17;
*/
public com.google.protobuf.StructOrBuilder getMetadataOrBuilder() {
return getMetadata();
}
public static final int NOTES_FIELD_NUMBER = 18;
private volatile java.lang.Object notes_;
/**
*
* Notes for the model
* This field should be used for in-depth notes and supports up to 64Kbs.
*
*
* string notes = 18;
* @return The notes.
*/
public java.lang.String getNotes() {
java.lang.Object ref = notes_;
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();
notes_ = s;
return s;
}
}
/**
*
* Notes for the model
* This field should be used for in-depth notes and supports up to 64Kbs.
*
*
* string notes = 18;
* @return The bytes for notes.
*/
public com.google.protobuf.ByteString
getNotesBytes() {
java.lang.Object ref = notes_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
notes_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TOOLKITS_FIELD_NUMBER = 20;
private com.google.protobuf.LazyStringList toolkits_;
/**
*
* Tags from toolkits category
*
*
* repeated string toolkits = 20 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @return A list containing the toolkits.
*/
public com.google.protobuf.ProtocolStringList
getToolkitsList() {
return toolkits_;
}
/**
*
* Tags from toolkits category
*
*
* repeated string toolkits = 20 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @return The count of toolkits.
*/
public int getToolkitsCount() {
return toolkits_.size();
}
/**
*
* Tags from toolkits category
*
*
* repeated string toolkits = 20 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @param index The index of the element to return.
* @return The toolkits at the given index.
*/
public java.lang.String getToolkits(int index) {
return toolkits_.get(index);
}
/**
*
* Tags from toolkits category
*
*
* repeated string toolkits = 20 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @param index The index of the value to return.
* @return The bytes of the toolkits at the given index.
*/
public com.google.protobuf.ByteString
getToolkitsBytes(int index) {
return toolkits_.getByteString(index);
}
public static final int USE_CASES_FIELD_NUMBER = 21;
private com.google.protobuf.LazyStringList useCases_;
/**
*
* Tags from use_cases category
*
*
* repeated string use_cases = 21 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @return A list containing the useCases.
*/
public com.google.protobuf.ProtocolStringList
getUseCasesList() {
return useCases_;
}
/**
*
* Tags from use_cases category
*
*
* repeated string use_cases = 21 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @return The count of useCases.
*/
public int getUseCasesCount() {
return useCases_.size();
}
/**
*
* Tags from use_cases category
*
*
* repeated string use_cases = 21 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @param index The index of the element to return.
* @return The useCases at the given index.
*/
public java.lang.String getUseCases(int index) {
return useCases_.get(index);
}
/**
*
* Tags from use_cases category
*
*
* repeated string use_cases = 21 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @param index The index of the value to return.
* @return The bytes of the useCases at the given index.
*/
public com.google.protobuf.ByteString
getUseCasesBytes(int index) {
return useCases_.getByteString(index);
}
public static final int LANGUAGES_FIELD_NUMBER = 25;
private com.google.protobuf.LazyStringList languages_;
/**
*
* Tags from languages category.
*
*
* repeated string languages = 25 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @return A list containing the languages.
*/
public com.google.protobuf.ProtocolStringList
getLanguagesList() {
return languages_;
}
/**
*
* Tags from languages category.
*
*
* repeated string languages = 25 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @return The count of languages.
*/
public int getLanguagesCount() {
return languages_.size();
}
/**
*
* Tags from languages category.
*
*
* repeated string languages = 25 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @param index The index of the element to return.
* @return The languages at the given index.
*/
public java.lang.String getLanguages(int index) {
return languages_.get(index);
}
/**
*
* Tags from languages category.
*
*
* repeated string languages = 25 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @param index The index of the value to return.
* @return The bytes of the languages at the given index.
*/
public com.google.protobuf.ByteString
getLanguagesBytes(int index) {
return languages_.getByteString(index);
}
public static final int IS_STARRED_FIELD_NUMBER = 22;
private boolean isStarred_;
/**
*
* Is starred by the requesting user (only showed on get/list requests)
* Please use PostModelStars/DeleteModelStars endpoints to star/unstar a model
*
*
* bool is_starred = 22;
* @return The isStarred.
*/
public boolean getIsStarred() {
return isStarred_;
}
public static final int STAR_COUNT_FIELD_NUMBER = 23;
private int starCount_;
/**
*
* How many users have starred the model (only showed on get/list requests)
* Computed value, not editable
*
*
* int32 star_count = 23;
* @return The starCount.
*/
public int getStarCount() {
return starCount_;
}
public static final int IMPORT_INFO_FIELD_NUMBER = 24;
private com.clarifai.grpc.api.ImportInfo importInfo_;
/**
*
* Configuration used to import model from third-party toolkits
*
*
* .clarifai.api.ImportInfo import_info = 24;
* @return Whether the importInfo field is set.
*/
public boolean hasImportInfo() {
return importInfo_ != null;
}
/**
*
* Configuration used to import model from third-party toolkits
*
*
* .clarifai.api.ImportInfo import_info = 24;
* @return The importInfo.
*/
public com.clarifai.grpc.api.ImportInfo getImportInfo() {
return importInfo_ == null ? com.clarifai.grpc.api.ImportInfo.getDefaultInstance() : importInfo_;
}
/**
*
* Configuration used to import model from third-party toolkits
*
*
* .clarifai.api.ImportInfo import_info = 24;
*/
public com.clarifai.grpc.api.ImportInfoOrBuilder getImportInfoOrBuilder() {
return getImportInfo();
}
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 (!getIdBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
}
if (!getNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_);
}
if (createdAt_ != null) {
output.writeMessage(3, getCreatedAt());
}
if (!getAppIdBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, appId_);
}
if (outputInfo_ != null) {
output.writeMessage(5, getOutputInfo());
}
if (modelVersion_ != null) {
output.writeMessage(6, getModelVersion());
}
if (!getDisplayNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, displayName_);
}
if (!getUserIdBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 9, userId_);
}
if (inputInfo_ != null) {
output.writeMessage(12, getInputInfo());
}
if (trainInfo_ != null) {
output.writeMessage(13, getTrainInfo());
}
if (!getModelTypeIdBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 14, modelTypeId_);
}
if (visibility_ != null) {
output.writeMessage(15, getVisibility());
}
if (!getDescriptionBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 16, description_);
}
if (metadata_ != null) {
output.writeMessage(17, getMetadata());
}
if (!getNotesBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 18, notes_);
}
if (modifiedAt_ != null) {
output.writeMessage(19, getModifiedAt());
}
for (int i = 0; i < toolkits_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 20, toolkits_.getRaw(i));
}
for (int i = 0; i < useCases_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 21, useCases_.getRaw(i));
}
if (isStarred_ != false) {
output.writeBool(22, isStarred_);
}
if (starCount_ != 0) {
output.writeInt32(23, starCount_);
}
if (importInfo_ != null) {
output.writeMessage(24, getImportInfo());
}
for (int i = 0; i < languages_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 25, languages_.getRaw(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getIdBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
}
if (!getNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_);
}
if (createdAt_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getCreatedAt());
}
if (!getAppIdBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, appId_);
}
if (outputInfo_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getOutputInfo());
}
if (modelVersion_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, getModelVersion());
}
if (!getDisplayNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, displayName_);
}
if (!getUserIdBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, userId_);
}
if (inputInfo_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(12, getInputInfo());
}
if (trainInfo_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(13, getTrainInfo());
}
if (!getModelTypeIdBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, modelTypeId_);
}
if (visibility_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(15, getVisibility());
}
if (!getDescriptionBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, description_);
}
if (metadata_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(17, getMetadata());
}
if (!getNotesBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(18, notes_);
}
if (modifiedAt_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(19, getModifiedAt());
}
{
int dataSize = 0;
for (int i = 0; i < toolkits_.size(); i++) {
dataSize += computeStringSizeNoTag(toolkits_.getRaw(i));
}
size += dataSize;
size += 2 * getToolkitsList().size();
}
{
int dataSize = 0;
for (int i = 0; i < useCases_.size(); i++) {
dataSize += computeStringSizeNoTag(useCases_.getRaw(i));
}
size += dataSize;
size += 2 * getUseCasesList().size();
}
if (isStarred_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(22, isStarred_);
}
if (starCount_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(23, starCount_);
}
if (importInfo_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(24, getImportInfo());
}
{
int dataSize = 0;
for (int i = 0; i < languages_.size(); i++) {
dataSize += computeStringSizeNoTag(languages_.getRaw(i));
}
size += dataSize;
size += 2 * getLanguagesList().size();
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.clarifai.grpc.api.Model)) {
return super.equals(obj);
}
com.clarifai.grpc.api.Model other = (com.clarifai.grpc.api.Model) obj;
if (!getId()
.equals(other.getId())) return false;
if (!getName()
.equals(other.getName())) return false;
if (hasCreatedAt() != other.hasCreatedAt()) return false;
if (hasCreatedAt()) {
if (!getCreatedAt()
.equals(other.getCreatedAt())) return false;
}
if (hasModifiedAt() != other.hasModifiedAt()) return false;
if (hasModifiedAt()) {
if (!getModifiedAt()
.equals(other.getModifiedAt())) return false;
}
if (!getAppId()
.equals(other.getAppId())) return false;
if (hasOutputInfo() != other.hasOutputInfo()) return false;
if (hasOutputInfo()) {
if (!getOutputInfo()
.equals(other.getOutputInfo())) return false;
}
if (hasModelVersion() != other.hasModelVersion()) return false;
if (hasModelVersion()) {
if (!getModelVersion()
.equals(other.getModelVersion())) return false;
}
if (!getDisplayName()
.equals(other.getDisplayName())) return false;
if (!getUserId()
.equals(other.getUserId())) return false;
if (hasInputInfo() != other.hasInputInfo()) return false;
if (hasInputInfo()) {
if (!getInputInfo()
.equals(other.getInputInfo())) return false;
}
if (hasTrainInfo() != other.hasTrainInfo()) return false;
if (hasTrainInfo()) {
if (!getTrainInfo()
.equals(other.getTrainInfo())) return false;
}
if (!getModelTypeId()
.equals(other.getModelTypeId())) return false;
if (hasVisibility() != other.hasVisibility()) return false;
if (hasVisibility()) {
if (!getVisibility()
.equals(other.getVisibility())) return false;
}
if (!getDescription()
.equals(other.getDescription())) return false;
if (hasMetadata() != other.hasMetadata()) return false;
if (hasMetadata()) {
if (!getMetadata()
.equals(other.getMetadata())) return false;
}
if (!getNotes()
.equals(other.getNotes())) return false;
if (!getToolkitsList()
.equals(other.getToolkitsList())) return false;
if (!getUseCasesList()
.equals(other.getUseCasesList())) return false;
if (!getLanguagesList()
.equals(other.getLanguagesList())) return false;
if (getIsStarred()
!= other.getIsStarred()) return false;
if (getStarCount()
!= other.getStarCount()) return false;
if (hasImportInfo() != other.hasImportInfo()) return false;
if (hasImportInfo()) {
if (!getImportInfo()
.equals(other.getImportInfo())) return false;
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + getId().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
if (hasCreatedAt()) {
hash = (37 * hash) + CREATED_AT_FIELD_NUMBER;
hash = (53 * hash) + getCreatedAt().hashCode();
}
if (hasModifiedAt()) {
hash = (37 * hash) + MODIFIED_AT_FIELD_NUMBER;
hash = (53 * hash) + getModifiedAt().hashCode();
}
hash = (37 * hash) + APP_ID_FIELD_NUMBER;
hash = (53 * hash) + getAppId().hashCode();
if (hasOutputInfo()) {
hash = (37 * hash) + OUTPUT_INFO_FIELD_NUMBER;
hash = (53 * hash) + getOutputInfo().hashCode();
}
if (hasModelVersion()) {
hash = (37 * hash) + MODEL_VERSION_FIELD_NUMBER;
hash = (53 * hash) + getModelVersion().hashCode();
}
hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER;
hash = (53 * hash) + getDisplayName().hashCode();
hash = (37 * hash) + USER_ID_FIELD_NUMBER;
hash = (53 * hash) + getUserId().hashCode();
if (hasInputInfo()) {
hash = (37 * hash) + INPUT_INFO_FIELD_NUMBER;
hash = (53 * hash) + getInputInfo().hashCode();
}
if (hasTrainInfo()) {
hash = (37 * hash) + TRAIN_INFO_FIELD_NUMBER;
hash = (53 * hash) + getTrainInfo().hashCode();
}
hash = (37 * hash) + MODEL_TYPE_ID_FIELD_NUMBER;
hash = (53 * hash) + getModelTypeId().hashCode();
if (hasVisibility()) {
hash = (37 * hash) + VISIBILITY_FIELD_NUMBER;
hash = (53 * hash) + getVisibility().hashCode();
}
hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
if (hasMetadata()) {
hash = (37 * hash) + METADATA_FIELD_NUMBER;
hash = (53 * hash) + getMetadata().hashCode();
}
hash = (37 * hash) + NOTES_FIELD_NUMBER;
hash = (53 * hash) + getNotes().hashCode();
if (getToolkitsCount() > 0) {
hash = (37 * hash) + TOOLKITS_FIELD_NUMBER;
hash = (53 * hash) + getToolkitsList().hashCode();
}
if (getUseCasesCount() > 0) {
hash = (37 * hash) + USE_CASES_FIELD_NUMBER;
hash = (53 * hash) + getUseCasesList().hashCode();
}
if (getLanguagesCount() > 0) {
hash = (37 * hash) + LANGUAGES_FIELD_NUMBER;
hash = (53 * hash) + getLanguagesList().hashCode();
}
hash = (37 * hash) + IS_STARRED_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getIsStarred());
hash = (37 * hash) + STAR_COUNT_FIELD_NUMBER;
hash = (53 * hash) + getStarCount();
if (hasImportInfo()) {
hash = (37 * hash) + IMPORT_INFO_FIELD_NUMBER;
hash = (53 * hash) + getImportInfo().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.clarifai.grpc.api.Model parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.Model 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.Model parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.Model 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.Model parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.Model parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.clarifai.grpc.api.Model parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.Model 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.Model parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.Model 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.Model parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.Model 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.Model 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;
}
/**
*
* This is the Model object which represents a created model in the platform.
* Each model has a particular type denoted by the model_type_id.
* When creating a Model with PostModels the following happens:
* - if the ModelType is trainable, then a new ModelVersion is created that is
* - UNTRAINED status by default
* - TRAINED status if a ModelVersion was included with PretrainedModelConfig in PostModels
* - if the ModelType is not trainable, then a new ModelVersion is created with TRAINED status.
* To modify config settings like OutputInfo for the Model you an use PatchModels. This will
* also create a new ModelVersion, potentially UNTRAINED following the same rules as above.
* The fields that are patchable include Model.name, Model.display_name and Model.output_info
* (except the Model.output_info.type and Model.output_info.type_ext).
*
*
* Protobuf type {@code clarifai.api.Model}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:clarifai.api.Model)
com.clarifai.grpc.api.ModelOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Model_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Model_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.Model.class, com.clarifai.grpc.api.Model.Builder.class);
}
// Construct using com.clarifai.grpc.api.Model.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
id_ = "";
name_ = "";
if (createdAtBuilder_ == null) {
createdAt_ = null;
} else {
createdAt_ = null;
createdAtBuilder_ = null;
}
if (modifiedAtBuilder_ == null) {
modifiedAt_ = null;
} else {
modifiedAt_ = null;
modifiedAtBuilder_ = null;
}
appId_ = "";
if (outputInfoBuilder_ == null) {
outputInfo_ = null;
} else {
outputInfo_ = null;
outputInfoBuilder_ = null;
}
if (modelVersionBuilder_ == null) {
modelVersion_ = null;
} else {
modelVersion_ = null;
modelVersionBuilder_ = null;
}
displayName_ = "";
userId_ = "";
if (inputInfoBuilder_ == null) {
inputInfo_ = null;
} else {
inputInfo_ = null;
inputInfoBuilder_ = null;
}
if (trainInfoBuilder_ == null) {
trainInfo_ = null;
} else {
trainInfo_ = null;
trainInfoBuilder_ = null;
}
modelTypeId_ = "";
if (visibilityBuilder_ == null) {
visibility_ = null;
} else {
visibility_ = null;
visibilityBuilder_ = null;
}
description_ = "";
if (metadataBuilder_ == null) {
metadata_ = null;
} else {
metadata_ = null;
metadataBuilder_ = null;
}
notes_ = "";
toolkits_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
useCases_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000002);
languages_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000004);
isStarred_ = false;
starCount_ = 0;
if (importInfoBuilder_ == null) {
importInfo_ = null;
} else {
importInfo_ = null;
importInfoBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_Model_descriptor;
}
@java.lang.Override
public com.clarifai.grpc.api.Model getDefaultInstanceForType() {
return com.clarifai.grpc.api.Model.getDefaultInstance();
}
@java.lang.Override
public com.clarifai.grpc.api.Model build() {
com.clarifai.grpc.api.Model result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.clarifai.grpc.api.Model buildPartial() {
com.clarifai.grpc.api.Model result = new com.clarifai.grpc.api.Model(this);
int from_bitField0_ = bitField0_;
result.id_ = id_;
result.name_ = name_;
if (createdAtBuilder_ == null) {
result.createdAt_ = createdAt_;
} else {
result.createdAt_ = createdAtBuilder_.build();
}
if (modifiedAtBuilder_ == null) {
result.modifiedAt_ = modifiedAt_;
} else {
result.modifiedAt_ = modifiedAtBuilder_.build();
}
result.appId_ = appId_;
if (outputInfoBuilder_ == null) {
result.outputInfo_ = outputInfo_;
} else {
result.outputInfo_ = outputInfoBuilder_.build();
}
if (modelVersionBuilder_ == null) {
result.modelVersion_ = modelVersion_;
} else {
result.modelVersion_ = modelVersionBuilder_.build();
}
result.displayName_ = displayName_;
result.userId_ = userId_;
if (inputInfoBuilder_ == null) {
result.inputInfo_ = inputInfo_;
} else {
result.inputInfo_ = inputInfoBuilder_.build();
}
if (trainInfoBuilder_ == null) {
result.trainInfo_ = trainInfo_;
} else {
result.trainInfo_ = trainInfoBuilder_.build();
}
result.modelTypeId_ = modelTypeId_;
if (visibilityBuilder_ == null) {
result.visibility_ = visibility_;
} else {
result.visibility_ = visibilityBuilder_.build();
}
result.description_ = description_;
if (metadataBuilder_ == null) {
result.metadata_ = metadata_;
} else {
result.metadata_ = metadataBuilder_.build();
}
result.notes_ = notes_;
if (((bitField0_ & 0x00000001) != 0)) {
toolkits_ = toolkits_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000001);
}
result.toolkits_ = toolkits_;
if (((bitField0_ & 0x00000002) != 0)) {
useCases_ = useCases_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000002);
}
result.useCases_ = useCases_;
if (((bitField0_ & 0x00000004) != 0)) {
languages_ = languages_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000004);
}
result.languages_ = languages_;
result.isStarred_ = isStarred_;
result.starCount_ = starCount_;
if (importInfoBuilder_ == null) {
result.importInfo_ = importInfo_;
} else {
result.importInfo_ = importInfoBuilder_.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.Model) {
return mergeFrom((com.clarifai.grpc.api.Model)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.clarifai.grpc.api.Model other) {
if (other == com.clarifai.grpc.api.Model.getDefaultInstance()) return this;
if (!other.getId().isEmpty()) {
id_ = other.id_;
onChanged();
}
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (other.hasCreatedAt()) {
mergeCreatedAt(other.getCreatedAt());
}
if (other.hasModifiedAt()) {
mergeModifiedAt(other.getModifiedAt());
}
if (!other.getAppId().isEmpty()) {
appId_ = other.appId_;
onChanged();
}
if (other.hasOutputInfo()) {
mergeOutputInfo(other.getOutputInfo());
}
if (other.hasModelVersion()) {
mergeModelVersion(other.getModelVersion());
}
if (!other.getDisplayName().isEmpty()) {
displayName_ = other.displayName_;
onChanged();
}
if (!other.getUserId().isEmpty()) {
userId_ = other.userId_;
onChanged();
}
if (other.hasInputInfo()) {
mergeInputInfo(other.getInputInfo());
}
if (other.hasTrainInfo()) {
mergeTrainInfo(other.getTrainInfo());
}
if (!other.getModelTypeId().isEmpty()) {
modelTypeId_ = other.modelTypeId_;
onChanged();
}
if (other.hasVisibility()) {
mergeVisibility(other.getVisibility());
}
if (!other.getDescription().isEmpty()) {
description_ = other.description_;
onChanged();
}
if (other.hasMetadata()) {
mergeMetadata(other.getMetadata());
}
if (!other.getNotes().isEmpty()) {
notes_ = other.notes_;
onChanged();
}
if (!other.toolkits_.isEmpty()) {
if (toolkits_.isEmpty()) {
toolkits_ = other.toolkits_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureToolkitsIsMutable();
toolkits_.addAll(other.toolkits_);
}
onChanged();
}
if (!other.useCases_.isEmpty()) {
if (useCases_.isEmpty()) {
useCases_ = other.useCases_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureUseCasesIsMutable();
useCases_.addAll(other.useCases_);
}
onChanged();
}
if (!other.languages_.isEmpty()) {
if (languages_.isEmpty()) {
languages_ = other.languages_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureLanguagesIsMutable();
languages_.addAll(other.languages_);
}
onChanged();
}
if (other.getIsStarred() != false) {
setIsStarred(other.getIsStarred());
}
if (other.getStarCount() != 0) {
setStarCount(other.getStarCount());
}
if (other.hasImportInfo()) {
mergeImportInfo(other.getImportInfo());
}
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.Model parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.clarifai.grpc.api.Model) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object id_ = "";
/**
*
* The model's ID. Must be unique within a particular app and URL-friendly.
*
*
* string id = 1;
* @return The id.
*/
public java.lang.String getId() {
java.lang.Object ref = id_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The model's ID. Must be unique within a particular app and URL-friendly.
*
*
* string id = 1;
* @return The bytes for id.
*/
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The model's ID. Must be unique within a particular app and URL-friendly.
*
*
* string id = 1;
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
id_ = value;
onChanged();
return this;
}
/**
*
* The model's ID. Must be unique within a particular app and URL-friendly.
*
*
* string id = 1;
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
onChanged();
return this;
}
/**
*
* The model's ID. Must be unique within a particular app and URL-friendly.
*
*
* string id = 1;
* @param value The bytes for id to set.
* @return This builder for chaining.
*/
public Builder setIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
id_ = value;
onChanged();
return this;
}
private java.lang.Object name_ = "";
/**
*
* A nicer-to-read name for the model. Can have spaces and special characters.
*
*
* string name = 2;
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* A nicer-to-read name for the model. Can have spaces and special characters.
*
*
* string name = 2;
* @return The bytes for name.
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* A nicer-to-read name for the model. Can have spaces and special characters.
*
*
* string name = 2;
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
*
* A nicer-to-read name for the model. Can have spaces and special characters.
*
*
* string name = 2;
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
* A nicer-to-read name for the model. Can have spaces and special characters.
*
*
* string name = 2;
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
onChanged();
return this;
}
private com.google.protobuf.Timestamp createdAt_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createdAtBuilder_;
/**
*
* When the model was created. We follow the XXXX timestamp
* format. We use https://www.ietf.org/rfc/rfc3339.txt format:
* "2006-01-02T15:04:05.999999Z" so you can expect results like
* the following from the API:
* "2017-04-11T21:50:50.223962Z"
*
*
* .google.protobuf.Timestamp created_at = 3;
* @return Whether the createdAt field is set.
*/
public boolean hasCreatedAt() {
return createdAtBuilder_ != null || createdAt_ != null;
}
/**
*
* When the model was created. We follow the XXXX timestamp
* format. We use https://www.ietf.org/rfc/rfc3339.txt format:
* "2006-01-02T15:04:05.999999Z" so you can expect results like
* the following from the API:
* "2017-04-11T21:50:50.223962Z"
*
*
* .google.protobuf.Timestamp created_at = 3;
* @return The createdAt.
*/
public com.google.protobuf.Timestamp getCreatedAt() {
if (createdAtBuilder_ == null) {
return createdAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_;
} else {
return createdAtBuilder_.getMessage();
}
}
/**
*
* When the model was created. We follow the XXXX timestamp
* format. We use https://www.ietf.org/rfc/rfc3339.txt format:
* "2006-01-02T15:04:05.999999Z" so you can expect results like
* the following from the API:
* "2017-04-11T21:50:50.223962Z"
*
*
* .google.protobuf.Timestamp created_at = 3;
*/
public Builder setCreatedAt(com.google.protobuf.Timestamp value) {
if (createdAtBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
createdAt_ = value;
onChanged();
} else {
createdAtBuilder_.setMessage(value);
}
return this;
}
/**
*
* When the model was created. We follow the XXXX timestamp
* format. We use https://www.ietf.org/rfc/rfc3339.txt format:
* "2006-01-02T15:04:05.999999Z" so you can expect results like
* the following from the API:
* "2017-04-11T21:50:50.223962Z"
*
*
* .google.protobuf.Timestamp created_at = 3;
*/
public Builder setCreatedAt(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (createdAtBuilder_ == null) {
createdAt_ = builderForValue.build();
onChanged();
} else {
createdAtBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* When the model was created. We follow the XXXX timestamp
* format. We use https://www.ietf.org/rfc/rfc3339.txt format:
* "2006-01-02T15:04:05.999999Z" so you can expect results like
* the following from the API:
* "2017-04-11T21:50:50.223962Z"
*
*
* .google.protobuf.Timestamp created_at = 3;
*/
public Builder mergeCreatedAt(com.google.protobuf.Timestamp value) {
if (createdAtBuilder_ == null) {
if (createdAt_ != null) {
createdAt_ =
com.google.protobuf.Timestamp.newBuilder(createdAt_).mergeFrom(value).buildPartial();
} else {
createdAt_ = value;
}
onChanged();
} else {
createdAtBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* When the model was created. We follow the XXXX timestamp
* format. We use https://www.ietf.org/rfc/rfc3339.txt format:
* "2006-01-02T15:04:05.999999Z" so you can expect results like
* the following from the API:
* "2017-04-11T21:50:50.223962Z"
*
*
* .google.protobuf.Timestamp created_at = 3;
*/
public Builder clearCreatedAt() {
if (createdAtBuilder_ == null) {
createdAt_ = null;
onChanged();
} else {
createdAt_ = null;
createdAtBuilder_ = null;
}
return this;
}
/**
*
* When the model was created. We follow the XXXX timestamp
* format. We use https://www.ietf.org/rfc/rfc3339.txt format:
* "2006-01-02T15:04:05.999999Z" so you can expect results like
* the following from the API:
* "2017-04-11T21:50:50.223962Z"
*
*
* .google.protobuf.Timestamp created_at = 3;
*/
public com.google.protobuf.Timestamp.Builder getCreatedAtBuilder() {
onChanged();
return getCreatedAtFieldBuilder().getBuilder();
}
/**
*
* When the model was created. We follow the XXXX timestamp
* format. We use https://www.ietf.org/rfc/rfc3339.txt format:
* "2006-01-02T15:04:05.999999Z" so you can expect results like
* the following from the API:
* "2017-04-11T21:50:50.223962Z"
*
*
* .google.protobuf.Timestamp created_at = 3;
*/
public com.google.protobuf.TimestampOrBuilder getCreatedAtOrBuilder() {
if (createdAtBuilder_ != null) {
return createdAtBuilder_.getMessageOrBuilder();
} else {
return createdAt_ == null ?
com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_;
}
}
/**
*
* When the model was created. We follow the XXXX timestamp
* format. We use https://www.ietf.org/rfc/rfc3339.txt format:
* "2006-01-02T15:04:05.999999Z" so you can expect results like
* the following from the API:
* "2017-04-11T21:50:50.223962Z"
*
*
* .google.protobuf.Timestamp created_at = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
getCreatedAtFieldBuilder() {
if (createdAtBuilder_ == null) {
createdAtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
getCreatedAt(),
getParentForChildren(),
isClean());
createdAt_ = null;
}
return createdAtBuilder_;
}
private com.google.protobuf.Timestamp modifiedAt_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> modifiedAtBuilder_;
/**
*
* When was the most recent model version created at
*
*
* .google.protobuf.Timestamp modified_at = 19;
* @return Whether the modifiedAt field is set.
*/
public boolean hasModifiedAt() {
return modifiedAtBuilder_ != null || modifiedAt_ != null;
}
/**
*
* When was the most recent model version created at
*
*
* .google.protobuf.Timestamp modified_at = 19;
* @return The modifiedAt.
*/
public com.google.protobuf.Timestamp getModifiedAt() {
if (modifiedAtBuilder_ == null) {
return modifiedAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : modifiedAt_;
} else {
return modifiedAtBuilder_.getMessage();
}
}
/**
*
* When was the most recent model version created at
*
*
* .google.protobuf.Timestamp modified_at = 19;
*/
public Builder setModifiedAt(com.google.protobuf.Timestamp value) {
if (modifiedAtBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
modifiedAt_ = value;
onChanged();
} else {
modifiedAtBuilder_.setMessage(value);
}
return this;
}
/**
*
* When was the most recent model version created at
*
*
* .google.protobuf.Timestamp modified_at = 19;
*/
public Builder setModifiedAt(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (modifiedAtBuilder_ == null) {
modifiedAt_ = builderForValue.build();
onChanged();
} else {
modifiedAtBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* When was the most recent model version created at
*
*
* .google.protobuf.Timestamp modified_at = 19;
*/
public Builder mergeModifiedAt(com.google.protobuf.Timestamp value) {
if (modifiedAtBuilder_ == null) {
if (modifiedAt_ != null) {
modifiedAt_ =
com.google.protobuf.Timestamp.newBuilder(modifiedAt_).mergeFrom(value).buildPartial();
} else {
modifiedAt_ = value;
}
onChanged();
} else {
modifiedAtBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* When was the most recent model version created at
*
*
* .google.protobuf.Timestamp modified_at = 19;
*/
public Builder clearModifiedAt() {
if (modifiedAtBuilder_ == null) {
modifiedAt_ = null;
onChanged();
} else {
modifiedAt_ = null;
modifiedAtBuilder_ = null;
}
return this;
}
/**
*
* When was the most recent model version created at
*
*
* .google.protobuf.Timestamp modified_at = 19;
*/
public com.google.protobuf.Timestamp.Builder getModifiedAtBuilder() {
onChanged();
return getModifiedAtFieldBuilder().getBuilder();
}
/**
*
* When was the most recent model version created at
*
*
* .google.protobuf.Timestamp modified_at = 19;
*/
public com.google.protobuf.TimestampOrBuilder getModifiedAtOrBuilder() {
if (modifiedAtBuilder_ != null) {
return modifiedAtBuilder_.getMessageOrBuilder();
} else {
return modifiedAt_ == null ?
com.google.protobuf.Timestamp.getDefaultInstance() : modifiedAt_;
}
}
/**
*
* When was the most recent model version created at
*
*
* .google.protobuf.Timestamp modified_at = 19;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
getModifiedAtFieldBuilder() {
if (modifiedAtBuilder_ == null) {
modifiedAtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
getModifiedAt(),
getParentForChildren(),
isClean());
modifiedAt_ = null;
}
return modifiedAtBuilder_;
}
private java.lang.Object appId_ = "";
/**
*
* The app the model belongs to.
*
*
* string app_id = 4 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @return The appId.
*/
public java.lang.String getAppId() {
java.lang.Object ref = appId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
appId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The app the model belongs to.
*
*
* string app_id = 4 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @return The bytes for appId.
*/
public com.google.protobuf.ByteString
getAppIdBytes() {
java.lang.Object ref = appId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
appId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The app the model belongs to.
*
*
* string app_id = 4 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @param value The appId to set.
* @return This builder for chaining.
*/
public Builder setAppId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
appId_ = value;
onChanged();
return this;
}
/**
*
* The app the model belongs to.
*
*
* string app_id = 4 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @return This builder for chaining.
*/
public Builder clearAppId() {
appId_ = getDefaultInstance().getAppId();
onChanged();
return this;
}
/**
*
* The app the model belongs to.
*
*
* string app_id = 4 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @param value The bytes for appId to set.
* @return This builder for chaining.
*/
public Builder setAppIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
appId_ = value;
onChanged();
return this;
}
private com.clarifai.grpc.api.OutputInfo outputInfo_;
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.OutputInfo, com.clarifai.grpc.api.OutputInfo.Builder, com.clarifai.grpc.api.OutputInfoOrBuilder> outputInfoBuilder_;
/**
*
* Info about the model's output and configuration.
*
*
* .clarifai.api.OutputInfo output_info = 5;
* @return Whether the outputInfo field is set.
*/
public boolean hasOutputInfo() {
return outputInfoBuilder_ != null || outputInfo_ != null;
}
/**
*
* Info about the model's output and configuration.
*
*
* .clarifai.api.OutputInfo output_info = 5;
* @return The outputInfo.
*/
public com.clarifai.grpc.api.OutputInfo getOutputInfo() {
if (outputInfoBuilder_ == null) {
return outputInfo_ == null ? com.clarifai.grpc.api.OutputInfo.getDefaultInstance() : outputInfo_;
} else {
return outputInfoBuilder_.getMessage();
}
}
/**
*
* Info about the model's output and configuration.
*
*
* .clarifai.api.OutputInfo output_info = 5;
*/
public Builder setOutputInfo(com.clarifai.grpc.api.OutputInfo value) {
if (outputInfoBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
outputInfo_ = value;
onChanged();
} else {
outputInfoBuilder_.setMessage(value);
}
return this;
}
/**
*
* Info about the model's output and configuration.
*
*
* .clarifai.api.OutputInfo output_info = 5;
*/
public Builder setOutputInfo(
com.clarifai.grpc.api.OutputInfo.Builder builderForValue) {
if (outputInfoBuilder_ == null) {
outputInfo_ = builderForValue.build();
onChanged();
} else {
outputInfoBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Info about the model's output and configuration.
*
*
* .clarifai.api.OutputInfo output_info = 5;
*/
public Builder mergeOutputInfo(com.clarifai.grpc.api.OutputInfo value) {
if (outputInfoBuilder_ == null) {
if (outputInfo_ != null) {
outputInfo_ =
com.clarifai.grpc.api.OutputInfo.newBuilder(outputInfo_).mergeFrom(value).buildPartial();
} else {
outputInfo_ = value;
}
onChanged();
} else {
outputInfoBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Info about the model's output and configuration.
*
*
* .clarifai.api.OutputInfo output_info = 5;
*/
public Builder clearOutputInfo() {
if (outputInfoBuilder_ == null) {
outputInfo_ = null;
onChanged();
} else {
outputInfo_ = null;
outputInfoBuilder_ = null;
}
return this;
}
/**
*
* Info about the model's output and configuration.
*
*
* .clarifai.api.OutputInfo output_info = 5;
*/
public com.clarifai.grpc.api.OutputInfo.Builder getOutputInfoBuilder() {
onChanged();
return getOutputInfoFieldBuilder().getBuilder();
}
/**
*
* Info about the model's output and configuration.
*
*
* .clarifai.api.OutputInfo output_info = 5;
*/
public com.clarifai.grpc.api.OutputInfoOrBuilder getOutputInfoOrBuilder() {
if (outputInfoBuilder_ != null) {
return outputInfoBuilder_.getMessageOrBuilder();
} else {
return outputInfo_ == null ?
com.clarifai.grpc.api.OutputInfo.getDefaultInstance() : outputInfo_;
}
}
/**
*
* Info about the model's output and configuration.
*
*
* .clarifai.api.OutputInfo output_info = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.OutputInfo, com.clarifai.grpc.api.OutputInfo.Builder, com.clarifai.grpc.api.OutputInfoOrBuilder>
getOutputInfoFieldBuilder() {
if (outputInfoBuilder_ == null) {
outputInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.OutputInfo, com.clarifai.grpc.api.OutputInfo.Builder, com.clarifai.grpc.api.OutputInfoOrBuilder>(
getOutputInfo(),
getParentForChildren(),
isClean());
outputInfo_ = null;
}
return outputInfoBuilder_;
}
private com.clarifai.grpc.api.ModelVersion modelVersion_;
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.ModelVersion, com.clarifai.grpc.api.ModelVersion.Builder, com.clarifai.grpc.api.ModelVersionOrBuilder> modelVersionBuilder_;
/**
*
* A particular version of the model, e.g., to specify the version when creating a workflow.
*
*
* .clarifai.api.ModelVersion model_version = 6;
* @return Whether the modelVersion field is set.
*/
public boolean hasModelVersion() {
return modelVersionBuilder_ != null || modelVersion_ != null;
}
/**
*
* A particular version of the model, e.g., to specify the version when creating a workflow.
*
*
* .clarifai.api.ModelVersion model_version = 6;
* @return The modelVersion.
*/
public com.clarifai.grpc.api.ModelVersion getModelVersion() {
if (modelVersionBuilder_ == null) {
return modelVersion_ == null ? com.clarifai.grpc.api.ModelVersion.getDefaultInstance() : modelVersion_;
} else {
return modelVersionBuilder_.getMessage();
}
}
/**
*
* A particular version of the model, e.g., to specify the version when creating a workflow.
*
*
* .clarifai.api.ModelVersion model_version = 6;
*/
public Builder setModelVersion(com.clarifai.grpc.api.ModelVersion value) {
if (modelVersionBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
modelVersion_ = value;
onChanged();
} else {
modelVersionBuilder_.setMessage(value);
}
return this;
}
/**
*
* A particular version of the model, e.g., to specify the version when creating a workflow.
*
*
* .clarifai.api.ModelVersion model_version = 6;
*/
public Builder setModelVersion(
com.clarifai.grpc.api.ModelVersion.Builder builderForValue) {
if (modelVersionBuilder_ == null) {
modelVersion_ = builderForValue.build();
onChanged();
} else {
modelVersionBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* A particular version of the model, e.g., to specify the version when creating a workflow.
*
*
* .clarifai.api.ModelVersion model_version = 6;
*/
public Builder mergeModelVersion(com.clarifai.grpc.api.ModelVersion value) {
if (modelVersionBuilder_ == null) {
if (modelVersion_ != null) {
modelVersion_ =
com.clarifai.grpc.api.ModelVersion.newBuilder(modelVersion_).mergeFrom(value).buildPartial();
} else {
modelVersion_ = value;
}
onChanged();
} else {
modelVersionBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* A particular version of the model, e.g., to specify the version when creating a workflow.
*
*
* .clarifai.api.ModelVersion model_version = 6;
*/
public Builder clearModelVersion() {
if (modelVersionBuilder_ == null) {
modelVersion_ = null;
onChanged();
} else {
modelVersion_ = null;
modelVersionBuilder_ = null;
}
return this;
}
/**
*
* A particular version of the model, e.g., to specify the version when creating a workflow.
*
*
* .clarifai.api.ModelVersion model_version = 6;
*/
public com.clarifai.grpc.api.ModelVersion.Builder getModelVersionBuilder() {
onChanged();
return getModelVersionFieldBuilder().getBuilder();
}
/**
*
* A particular version of the model, e.g., to specify the version when creating a workflow.
*
*
* .clarifai.api.ModelVersion model_version = 6;
*/
public com.clarifai.grpc.api.ModelVersionOrBuilder getModelVersionOrBuilder() {
if (modelVersionBuilder_ != null) {
return modelVersionBuilder_.getMessageOrBuilder();
} else {
return modelVersion_ == null ?
com.clarifai.grpc.api.ModelVersion.getDefaultInstance() : modelVersion_;
}
}
/**
*
* A particular version of the model, e.g., to specify the version when creating a workflow.
*
*
* .clarifai.api.ModelVersion model_version = 6;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.ModelVersion, com.clarifai.grpc.api.ModelVersion.Builder, com.clarifai.grpc.api.ModelVersionOrBuilder>
getModelVersionFieldBuilder() {
if (modelVersionBuilder_ == null) {
modelVersionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.ModelVersion, com.clarifai.grpc.api.ModelVersion.Builder, com.clarifai.grpc.api.ModelVersionOrBuilder>(
getModelVersion(),
getParentForChildren(),
isClean());
modelVersion_ = null;
}
return modelVersionBuilder_;
}
private java.lang.Object displayName_ = "";
/**
*
* An even nicer-to-read name for public Clarifai models where we're not happy with the name but
* need a temporary workaround while we check what depends on these names.
*
*
* string display_name = 7;
* @return The displayName.
*/
public java.lang.String getDisplayName() {
java.lang.Object ref = displayName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
displayName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* An even nicer-to-read name for public Clarifai models where we're not happy with the name but
* need a temporary workaround while we check what depends on these names.
*
*
* string display_name = 7;
* @return The bytes for displayName.
*/
public com.google.protobuf.ByteString
getDisplayNameBytes() {
java.lang.Object ref = displayName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
displayName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* An even nicer-to-read name for public Clarifai models where we're not happy with the name but
* need a temporary workaround while we check what depends on these names.
*
*
* string display_name = 7;
* @param value The displayName to set.
* @return This builder for chaining.
*/
public Builder setDisplayName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
displayName_ = value;
onChanged();
return this;
}
/**
*
* An even nicer-to-read name for public Clarifai models where we're not happy with the name but
* need a temporary workaround while we check what depends on these names.
*
*
* string display_name = 7;
* @return This builder for chaining.
*/
public Builder clearDisplayName() {
displayName_ = getDefaultInstance().getDisplayName();
onChanged();
return this;
}
/**
*
* An even nicer-to-read name for public Clarifai models where we're not happy with the name but
* need a temporary workaround while we check what depends on these names.
*
*
* string display_name = 7;
* @param value The bytes for displayName to set.
* @return This builder for chaining.
*/
public Builder setDisplayNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
displayName_ = value;
onChanged();
return this;
}
private java.lang.Object userId_ = "";
/**
*
* The user id that the model belongs to.
*
*
* string user_id = 9;
* @return The userId.
*/
public java.lang.String getUserId() {
java.lang.Object ref = userId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
userId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The user id that the model belongs to.
*
*
* string user_id = 9;
* @return The bytes for userId.
*/
public com.google.protobuf.ByteString
getUserIdBytes() {
java.lang.Object ref = userId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
userId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The user id that the model belongs to.
*
*
* string user_id = 9;
* @param value The userId to set.
* @return This builder for chaining.
*/
public Builder setUserId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
userId_ = value;
onChanged();
return this;
}
/**
*
* The user id that the model belongs to.
*
*
* string user_id = 9;
* @return This builder for chaining.
*/
public Builder clearUserId() {
userId_ = getDefaultInstance().getUserId();
onChanged();
return this;
}
/**
*
* The user id that the model belongs to.
*
*
* string user_id = 9;
* @param value The bytes for userId to set.
* @return This builder for chaining.
*/
public Builder setUserIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
userId_ = value;
onChanged();
return this;
}
private com.clarifai.grpc.api.InputInfo inputInfo_;
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.InputInfo, com.clarifai.grpc.api.InputInfo.Builder, com.clarifai.grpc.api.InputInfoOrBuilder> inputInfoBuilder_;
/**
*
* Info about the models' input and configuration of them.
*
*
* .clarifai.api.InputInfo input_info = 12;
* @return Whether the inputInfo field is set.
*/
public boolean hasInputInfo() {
return inputInfoBuilder_ != null || inputInfo_ != null;
}
/**
*
* Info about the models' input and configuration of them.
*
*
* .clarifai.api.InputInfo input_info = 12;
* @return The inputInfo.
*/
public com.clarifai.grpc.api.InputInfo getInputInfo() {
if (inputInfoBuilder_ == null) {
return inputInfo_ == null ? com.clarifai.grpc.api.InputInfo.getDefaultInstance() : inputInfo_;
} else {
return inputInfoBuilder_.getMessage();
}
}
/**
*
* Info about the models' input and configuration of them.
*
*
* .clarifai.api.InputInfo input_info = 12;
*/
public Builder setInputInfo(com.clarifai.grpc.api.InputInfo value) {
if (inputInfoBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
inputInfo_ = value;
onChanged();
} else {
inputInfoBuilder_.setMessage(value);
}
return this;
}
/**
*
* Info about the models' input and configuration of them.
*
*
* .clarifai.api.InputInfo input_info = 12;
*/
public Builder setInputInfo(
com.clarifai.grpc.api.InputInfo.Builder builderForValue) {
if (inputInfoBuilder_ == null) {
inputInfo_ = builderForValue.build();
onChanged();
} else {
inputInfoBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Info about the models' input and configuration of them.
*
*
* .clarifai.api.InputInfo input_info = 12;
*/
public Builder mergeInputInfo(com.clarifai.grpc.api.InputInfo value) {
if (inputInfoBuilder_ == null) {
if (inputInfo_ != null) {
inputInfo_ =
com.clarifai.grpc.api.InputInfo.newBuilder(inputInfo_).mergeFrom(value).buildPartial();
} else {
inputInfo_ = value;
}
onChanged();
} else {
inputInfoBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Info about the models' input and configuration of them.
*
*
* .clarifai.api.InputInfo input_info = 12;
*/
public Builder clearInputInfo() {
if (inputInfoBuilder_ == null) {
inputInfo_ = null;
onChanged();
} else {
inputInfo_ = null;
inputInfoBuilder_ = null;
}
return this;
}
/**
*
* Info about the models' input and configuration of them.
*
*
* .clarifai.api.InputInfo input_info = 12;
*/
public com.clarifai.grpc.api.InputInfo.Builder getInputInfoBuilder() {
onChanged();
return getInputInfoFieldBuilder().getBuilder();
}
/**
*
* Info about the models' input and configuration of them.
*
*
* .clarifai.api.InputInfo input_info = 12;
*/
public com.clarifai.grpc.api.InputInfoOrBuilder getInputInfoOrBuilder() {
if (inputInfoBuilder_ != null) {
return inputInfoBuilder_.getMessageOrBuilder();
} else {
return inputInfo_ == null ?
com.clarifai.grpc.api.InputInfo.getDefaultInstance() : inputInfo_;
}
}
/**
*
* Info about the models' input and configuration of them.
*
*
* .clarifai.api.InputInfo input_info = 12;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.InputInfo, com.clarifai.grpc.api.InputInfo.Builder, com.clarifai.grpc.api.InputInfoOrBuilder>
getInputInfoFieldBuilder() {
if (inputInfoBuilder_ == null) {
inputInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.InputInfo, com.clarifai.grpc.api.InputInfo.Builder, com.clarifai.grpc.api.InputInfoOrBuilder>(
getInputInfo(),
getParentForChildren(),
isClean());
inputInfo_ = null;
}
return inputInfoBuilder_;
}
private com.clarifai.grpc.api.TrainInfo trainInfo_;
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.TrainInfo, com.clarifai.grpc.api.TrainInfo.Builder, com.clarifai.grpc.api.TrainInfoOrBuilder> trainInfoBuilder_;
/**
*
* Configuration for the training process of this model.
*
*
* .clarifai.api.TrainInfo train_info = 13;
* @return Whether the trainInfo field is set.
*/
public boolean hasTrainInfo() {
return trainInfoBuilder_ != null || trainInfo_ != null;
}
/**
*
* Configuration for the training process of this model.
*
*
* .clarifai.api.TrainInfo train_info = 13;
* @return The trainInfo.
*/
public com.clarifai.grpc.api.TrainInfo getTrainInfo() {
if (trainInfoBuilder_ == null) {
return trainInfo_ == null ? com.clarifai.grpc.api.TrainInfo.getDefaultInstance() : trainInfo_;
} else {
return trainInfoBuilder_.getMessage();
}
}
/**
*
* Configuration for the training process of this model.
*
*
* .clarifai.api.TrainInfo train_info = 13;
*/
public Builder setTrainInfo(com.clarifai.grpc.api.TrainInfo value) {
if (trainInfoBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
trainInfo_ = value;
onChanged();
} else {
trainInfoBuilder_.setMessage(value);
}
return this;
}
/**
*
* Configuration for the training process of this model.
*
*
* .clarifai.api.TrainInfo train_info = 13;
*/
public Builder setTrainInfo(
com.clarifai.grpc.api.TrainInfo.Builder builderForValue) {
if (trainInfoBuilder_ == null) {
trainInfo_ = builderForValue.build();
onChanged();
} else {
trainInfoBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Configuration for the training process of this model.
*
*
* .clarifai.api.TrainInfo train_info = 13;
*/
public Builder mergeTrainInfo(com.clarifai.grpc.api.TrainInfo value) {
if (trainInfoBuilder_ == null) {
if (trainInfo_ != null) {
trainInfo_ =
com.clarifai.grpc.api.TrainInfo.newBuilder(trainInfo_).mergeFrom(value).buildPartial();
} else {
trainInfo_ = value;
}
onChanged();
} else {
trainInfoBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Configuration for the training process of this model.
*
*
* .clarifai.api.TrainInfo train_info = 13;
*/
public Builder clearTrainInfo() {
if (trainInfoBuilder_ == null) {
trainInfo_ = null;
onChanged();
} else {
trainInfo_ = null;
trainInfoBuilder_ = null;
}
return this;
}
/**
*
* Configuration for the training process of this model.
*
*
* .clarifai.api.TrainInfo train_info = 13;
*/
public com.clarifai.grpc.api.TrainInfo.Builder getTrainInfoBuilder() {
onChanged();
return getTrainInfoFieldBuilder().getBuilder();
}
/**
*
* Configuration for the training process of this model.
*
*
* .clarifai.api.TrainInfo train_info = 13;
*/
public com.clarifai.grpc.api.TrainInfoOrBuilder getTrainInfoOrBuilder() {
if (trainInfoBuilder_ != null) {
return trainInfoBuilder_.getMessageOrBuilder();
} else {
return trainInfo_ == null ?
com.clarifai.grpc.api.TrainInfo.getDefaultInstance() : trainInfo_;
}
}
/**
*
* Configuration for the training process of this model.
*
*
* .clarifai.api.TrainInfo train_info = 13;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.TrainInfo, com.clarifai.grpc.api.TrainInfo.Builder, com.clarifai.grpc.api.TrainInfoOrBuilder>
getTrainInfoFieldBuilder() {
if (trainInfoBuilder_ == null) {
trainInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.TrainInfo, com.clarifai.grpc.api.TrainInfo.Builder, com.clarifai.grpc.api.TrainInfoOrBuilder>(
getTrainInfo(),
getParentForChildren(),
isClean());
trainInfo_ = null;
}
return trainInfoBuilder_;
}
private java.lang.Object modelTypeId_ = "";
/**
*
* The ModelType.Id that is used for this model. This is used for all versions and you cannot
* change model_type_id between versions of the same model.
*
*
* string model_type_id = 14;
* @return The modelTypeId.
*/
public java.lang.String getModelTypeId() {
java.lang.Object ref = modelTypeId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
modelTypeId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The ModelType.Id that is used for this model. This is used for all versions and you cannot
* change model_type_id between versions of the same model.
*
*
* string model_type_id = 14;
* @return The bytes for modelTypeId.
*/
public com.google.protobuf.ByteString
getModelTypeIdBytes() {
java.lang.Object ref = modelTypeId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
modelTypeId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The ModelType.Id that is used for this model. This is used for all versions and you cannot
* change model_type_id between versions of the same model.
*
*
* string model_type_id = 14;
* @param value The modelTypeId to set.
* @return This builder for chaining.
*/
public Builder setModelTypeId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
modelTypeId_ = value;
onChanged();
return this;
}
/**
*
* The ModelType.Id that is used for this model. This is used for all versions and you cannot
* change model_type_id between versions of the same model.
*
*
* string model_type_id = 14;
* @return This builder for chaining.
*/
public Builder clearModelTypeId() {
modelTypeId_ = getDefaultInstance().getModelTypeId();
onChanged();
return this;
}
/**
*
* The ModelType.Id that is used for this model. This is used for all versions and you cannot
* change model_type_id between versions of the same model.
*
*
* string model_type_id = 14;
* @param value The bytes for modelTypeId to set.
* @return This builder for chaining.
*/
public Builder setModelTypeIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
modelTypeId_ = value;
onChanged();
return this;
}
private com.clarifai.grpc.api.Visibility visibility_;
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Visibility, com.clarifai.grpc.api.Visibility.Builder, com.clarifai.grpc.api.VisibilityOrBuilder> visibilityBuilder_;
/**
*
* The visibility field represents whether this message is privately/publicly visible.
* To be visible to the public the App that contains it AND the User that contains the App must
* also be publicly visible.
*
*
* .clarifai.api.Visibility visibility = 15;
* @return Whether the visibility field is set.
*/
public boolean hasVisibility() {
return visibilityBuilder_ != null || visibility_ != null;
}
/**
*
* The visibility field represents whether this message is privately/publicly visible.
* To be visible to the public the App that contains it AND the User that contains the App must
* also be publicly visible.
*
*
* .clarifai.api.Visibility visibility = 15;
* @return The visibility.
*/
public com.clarifai.grpc.api.Visibility getVisibility() {
if (visibilityBuilder_ == null) {
return visibility_ == null ? com.clarifai.grpc.api.Visibility.getDefaultInstance() : visibility_;
} else {
return visibilityBuilder_.getMessage();
}
}
/**
*
* The visibility field represents whether this message is privately/publicly visible.
* To be visible to the public the App that contains it AND the User that contains the App must
* also be publicly visible.
*
*
* .clarifai.api.Visibility visibility = 15;
*/
public Builder setVisibility(com.clarifai.grpc.api.Visibility value) {
if (visibilityBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
visibility_ = value;
onChanged();
} else {
visibilityBuilder_.setMessage(value);
}
return this;
}
/**
*
* The visibility field represents whether this message is privately/publicly visible.
* To be visible to the public the App that contains it AND the User that contains the App must
* also be publicly visible.
*
*
* .clarifai.api.Visibility visibility = 15;
*/
public Builder setVisibility(
com.clarifai.grpc.api.Visibility.Builder builderForValue) {
if (visibilityBuilder_ == null) {
visibility_ = builderForValue.build();
onChanged();
} else {
visibilityBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* The visibility field represents whether this message is privately/publicly visible.
* To be visible to the public the App that contains it AND the User that contains the App must
* also be publicly visible.
*
*
* .clarifai.api.Visibility visibility = 15;
*/
public Builder mergeVisibility(com.clarifai.grpc.api.Visibility value) {
if (visibilityBuilder_ == null) {
if (visibility_ != null) {
visibility_ =
com.clarifai.grpc.api.Visibility.newBuilder(visibility_).mergeFrom(value).buildPartial();
} else {
visibility_ = value;
}
onChanged();
} else {
visibilityBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* The visibility field represents whether this message is privately/publicly visible.
* To be visible to the public the App that contains it AND the User that contains the App must
* also be publicly visible.
*
*
* .clarifai.api.Visibility visibility = 15;
*/
public Builder clearVisibility() {
if (visibilityBuilder_ == null) {
visibility_ = null;
onChanged();
} else {
visibility_ = null;
visibilityBuilder_ = null;
}
return this;
}
/**
*
* The visibility field represents whether this message is privately/publicly visible.
* To be visible to the public the App that contains it AND the User that contains the App must
* also be publicly visible.
*
*
* .clarifai.api.Visibility visibility = 15;
*/
public com.clarifai.grpc.api.Visibility.Builder getVisibilityBuilder() {
onChanged();
return getVisibilityFieldBuilder().getBuilder();
}
/**
*
* The visibility field represents whether this message is privately/publicly visible.
* To be visible to the public the App that contains it AND the User that contains the App must
* also be publicly visible.
*
*
* .clarifai.api.Visibility visibility = 15;
*/
public com.clarifai.grpc.api.VisibilityOrBuilder getVisibilityOrBuilder() {
if (visibilityBuilder_ != null) {
return visibilityBuilder_.getMessageOrBuilder();
} else {
return visibility_ == null ?
com.clarifai.grpc.api.Visibility.getDefaultInstance() : visibility_;
}
}
/**
*
* The visibility field represents whether this message is privately/publicly visible.
* To be visible to the public the App that contains it AND the User that contains the App must
* also be publicly visible.
*
*
* .clarifai.api.Visibility visibility = 15;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Visibility, com.clarifai.grpc.api.Visibility.Builder, com.clarifai.grpc.api.VisibilityOrBuilder>
getVisibilityFieldBuilder() {
if (visibilityBuilder_ == null) {
visibilityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Visibility, com.clarifai.grpc.api.Visibility.Builder, com.clarifai.grpc.api.VisibilityOrBuilder>(
getVisibility(),
getParentForChildren(),
isClean());
visibility_ = null;
}
return visibilityBuilder_;
}
private java.lang.Object description_ = "";
/**
*
* Short description about this model
*
*
* string description = 16;
* @return The description.
*/
public java.lang.String getDescription() {
java.lang.Object ref = description_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
description_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Short description about this model
*
*
* string description = 16;
* @return The bytes for description.
*/
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Short description about this model
*
*
* string description = 16;
* @param value The description to set.
* @return This builder for chaining.
*/
public Builder setDescription(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
description_ = value;
onChanged();
return this;
}
/**
*
* Short description about this model
*
*
* string description = 16;
* @return This builder for chaining.
*/
public Builder clearDescription() {
description_ = getDefaultInstance().getDescription();
onChanged();
return this;
}
/**
*
* Short description about this model
*
*
* string description = 16;
* @param value The bytes for description to set.
* @return This builder for chaining.
*/
public Builder setDescriptionBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
description_ = value;
onChanged();
return this;
}
private com.google.protobuf.Struct metadata_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> metadataBuilder_;
/**
*
* To handle arbitrary json metadata you can use a struct field:
* https://github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto
*
*
* .google.protobuf.Struct metadata = 17;
* @return Whether the metadata field is set.
*/
public boolean hasMetadata() {
return metadataBuilder_ != null || metadata_ != null;
}
/**
*
* To handle arbitrary json metadata you can use a struct field:
* https://github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto
*
*
* .google.protobuf.Struct metadata = 17;
* @return The metadata.
*/
public com.google.protobuf.Struct getMetadata() {
if (metadataBuilder_ == null) {
return metadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : metadata_;
} else {
return metadataBuilder_.getMessage();
}
}
/**
*
* To handle arbitrary json metadata you can use a struct field:
* https://github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto
*
*
* .google.protobuf.Struct metadata = 17;
*/
public Builder setMetadata(com.google.protobuf.Struct value) {
if (metadataBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
metadata_ = value;
onChanged();
} else {
metadataBuilder_.setMessage(value);
}
return this;
}
/**
*
* To handle arbitrary json metadata you can use a struct field:
* https://github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto
*
*
* .google.protobuf.Struct metadata = 17;
*/
public Builder setMetadata(
com.google.protobuf.Struct.Builder builderForValue) {
if (metadataBuilder_ == null) {
metadata_ = builderForValue.build();
onChanged();
} else {
metadataBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* To handle arbitrary json metadata you can use a struct field:
* https://github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto
*
*
* .google.protobuf.Struct metadata = 17;
*/
public Builder mergeMetadata(com.google.protobuf.Struct value) {
if (metadataBuilder_ == null) {
if (metadata_ != null) {
metadata_ =
com.google.protobuf.Struct.newBuilder(metadata_).mergeFrom(value).buildPartial();
} else {
metadata_ = value;
}
onChanged();
} else {
metadataBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* To handle arbitrary json metadata you can use a struct field:
* https://github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto
*
*
* .google.protobuf.Struct metadata = 17;
*/
public Builder clearMetadata() {
if (metadataBuilder_ == null) {
metadata_ = null;
onChanged();
} else {
metadata_ = null;
metadataBuilder_ = null;
}
return this;
}
/**
*
* To handle arbitrary json metadata you can use a struct field:
* https://github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto
*
*
* .google.protobuf.Struct metadata = 17;
*/
public com.google.protobuf.Struct.Builder getMetadataBuilder() {
onChanged();
return getMetadataFieldBuilder().getBuilder();
}
/**
*
* To handle arbitrary json metadata you can use a struct field:
* https://github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto
*
*
* .google.protobuf.Struct metadata = 17;
*/
public com.google.protobuf.StructOrBuilder getMetadataOrBuilder() {
if (metadataBuilder_ != null) {
return metadataBuilder_.getMessageOrBuilder();
} else {
return metadata_ == null ?
com.google.protobuf.Struct.getDefaultInstance() : metadata_;
}
}
/**
*
* To handle arbitrary json metadata you can use a struct field:
* https://github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto
*
*
* .google.protobuf.Struct metadata = 17;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>
getMetadataFieldBuilder() {
if (metadataBuilder_ == null) {
metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>(
getMetadata(),
getParentForChildren(),
isClean());
metadata_ = null;
}
return metadataBuilder_;
}
private java.lang.Object notes_ = "";
/**
*
* Notes for the model
* This field should be used for in-depth notes and supports up to 64Kbs.
*
*
* string notes = 18;
* @return The notes.
*/
public java.lang.String getNotes() {
java.lang.Object ref = notes_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
notes_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Notes for the model
* This field should be used for in-depth notes and supports up to 64Kbs.
*
*
* string notes = 18;
* @return The bytes for notes.
*/
public com.google.protobuf.ByteString
getNotesBytes() {
java.lang.Object ref = notes_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
notes_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Notes for the model
* This field should be used for in-depth notes and supports up to 64Kbs.
*
*
* string notes = 18;
* @param value The notes to set.
* @return This builder for chaining.
*/
public Builder setNotes(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
notes_ = value;
onChanged();
return this;
}
/**
*
* Notes for the model
* This field should be used for in-depth notes and supports up to 64Kbs.
*
*
* string notes = 18;
* @return This builder for chaining.
*/
public Builder clearNotes() {
notes_ = getDefaultInstance().getNotes();
onChanged();
return this;
}
/**
*
* Notes for the model
* This field should be used for in-depth notes and supports up to 64Kbs.
*
*
* string notes = 18;
* @param value The bytes for notes to set.
* @return This builder for chaining.
*/
public Builder setNotesBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
notes_ = value;
onChanged();
return this;
}
private com.google.protobuf.LazyStringList toolkits_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureToolkitsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
toolkits_ = new com.google.protobuf.LazyStringArrayList(toolkits_);
bitField0_ |= 0x00000001;
}
}
/**
*
* Tags from toolkits category
*
*
* repeated string toolkits = 20 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @return A list containing the toolkits.
*/
public com.google.protobuf.ProtocolStringList
getToolkitsList() {
return toolkits_.getUnmodifiableView();
}
/**
*
* Tags from toolkits category
*
*
* repeated string toolkits = 20 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @return The count of toolkits.
*/
public int getToolkitsCount() {
return toolkits_.size();
}
/**
*
* Tags from toolkits category
*
*
* repeated string toolkits = 20 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @param index The index of the element to return.
* @return The toolkits at the given index.
*/
public java.lang.String getToolkits(int index) {
return toolkits_.get(index);
}
/**
*
* Tags from toolkits category
*
*
* repeated string toolkits = 20 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @param index The index of the value to return.
* @return The bytes of the toolkits at the given index.
*/
public com.google.protobuf.ByteString
getToolkitsBytes(int index) {
return toolkits_.getByteString(index);
}
/**
*
* Tags from toolkits category
*
*
* repeated string toolkits = 20 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @param index The index to set the value at.
* @param value The toolkits to set.
* @return This builder for chaining.
*/
public Builder setToolkits(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureToolkitsIsMutable();
toolkits_.set(index, value);
onChanged();
return this;
}
/**
*
* Tags from toolkits category
*
*
* repeated string toolkits = 20 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @param value The toolkits to add.
* @return This builder for chaining.
*/
public Builder addToolkits(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureToolkitsIsMutable();
toolkits_.add(value);
onChanged();
return this;
}
/**
*
* Tags from toolkits category
*
*
* repeated string toolkits = 20 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @param values The toolkits to add.
* @return This builder for chaining.
*/
public Builder addAllToolkits(
java.lang.Iterable values) {
ensureToolkitsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, toolkits_);
onChanged();
return this;
}
/**
*
* Tags from toolkits category
*
*
* repeated string toolkits = 20 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @return This builder for chaining.
*/
public Builder clearToolkits() {
toolkits_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* Tags from toolkits category
*
*
* repeated string toolkits = 20 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @param value The bytes of the toolkits to add.
* @return This builder for chaining.
*/
public Builder addToolkitsBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureToolkitsIsMutable();
toolkits_.add(value);
onChanged();
return this;
}
private com.google.protobuf.LazyStringList useCases_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureUseCasesIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
useCases_ = new com.google.protobuf.LazyStringArrayList(useCases_);
bitField0_ |= 0x00000002;
}
}
/**
*
* Tags from use_cases category
*
*
* repeated string use_cases = 21 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @return A list containing the useCases.
*/
public com.google.protobuf.ProtocolStringList
getUseCasesList() {
return useCases_.getUnmodifiableView();
}
/**
*
* Tags from use_cases category
*
*
* repeated string use_cases = 21 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @return The count of useCases.
*/
public int getUseCasesCount() {
return useCases_.size();
}
/**
*
* Tags from use_cases category
*
*
* repeated string use_cases = 21 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @param index The index of the element to return.
* @return The useCases at the given index.
*/
public java.lang.String getUseCases(int index) {
return useCases_.get(index);
}
/**
*
* Tags from use_cases category
*
*
* repeated string use_cases = 21 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @param index The index of the value to return.
* @return The bytes of the useCases at the given index.
*/
public com.google.protobuf.ByteString
getUseCasesBytes(int index) {
return useCases_.getByteString(index);
}
/**
*
* Tags from use_cases category
*
*
* repeated string use_cases = 21 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @param index The index to set the value at.
* @param value The useCases to set.
* @return This builder for chaining.
*/
public Builder setUseCases(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureUseCasesIsMutable();
useCases_.set(index, value);
onChanged();
return this;
}
/**
*
* Tags from use_cases category
*
*
* repeated string use_cases = 21 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @param value The useCases to add.
* @return This builder for chaining.
*/
public Builder addUseCases(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureUseCasesIsMutable();
useCases_.add(value);
onChanged();
return this;
}
/**
*
* Tags from use_cases category
*
*
* repeated string use_cases = 21 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @param values The useCases to add.
* @return This builder for chaining.
*/
public Builder addAllUseCases(
java.lang.Iterable values) {
ensureUseCasesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, useCases_);
onChanged();
return this;
}
/**
*
* Tags from use_cases category
*
*
* repeated string use_cases = 21 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @return This builder for chaining.
*/
public Builder clearUseCases() {
useCases_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
* Tags from use_cases category
*
*
* repeated string use_cases = 21 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @param value The bytes of the useCases to add.
* @return This builder for chaining.
*/
public Builder addUseCasesBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureUseCasesIsMutable();
useCases_.add(value);
onChanged();
return this;
}
private com.google.protobuf.LazyStringList languages_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureLanguagesIsMutable() {
if (!((bitField0_ & 0x00000004) != 0)) {
languages_ = new com.google.protobuf.LazyStringArrayList(languages_);
bitField0_ |= 0x00000004;
}
}
/**
*
* Tags from languages category.
*
*
* repeated string languages = 25 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @return A list containing the languages.
*/
public com.google.protobuf.ProtocolStringList
getLanguagesList() {
return languages_.getUnmodifiableView();
}
/**
*
* Tags from languages category.
*
*
* repeated string languages = 25 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @return The count of languages.
*/
public int getLanguagesCount() {
return languages_.size();
}
/**
*
* Tags from languages category.
*
*
* repeated string languages = 25 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @param index The index of the element to return.
* @return The languages at the given index.
*/
public java.lang.String getLanguages(int index) {
return languages_.get(index);
}
/**
*
* Tags from languages category.
*
*
* repeated string languages = 25 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @param index The index of the value to return.
* @return The bytes of the languages at the given index.
*/
public com.google.protobuf.ByteString
getLanguagesBytes(int index) {
return languages_.getByteString(index);
}
/**
*
* Tags from languages category.
*
*
* repeated string languages = 25 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @param index The index to set the value at.
* @param value The languages to set.
* @return This builder for chaining.
*/
public Builder setLanguages(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureLanguagesIsMutable();
languages_.set(index, value);
onChanged();
return this;
}
/**
*
* Tags from languages category.
*
*
* repeated string languages = 25 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @param value The languages to add.
* @return This builder for chaining.
*/
public Builder addLanguages(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureLanguagesIsMutable();
languages_.add(value);
onChanged();
return this;
}
/**
*
* Tags from languages category.
*
*
* repeated string languages = 25 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @param values The languages to add.
* @return This builder for chaining.
*/
public Builder addAllLanguages(
java.lang.Iterable values) {
ensureLanguagesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, languages_);
onChanged();
return this;
}
/**
*
* Tags from languages category.
*
*
* repeated string languages = 25 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @return This builder for chaining.
*/
public Builder clearLanguages() {
languages_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
* Tags from languages category.
*
*
* repeated string languages = 25 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @param value The bytes of the languages to add.
* @return This builder for chaining.
*/
public Builder addLanguagesBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureLanguagesIsMutable();
languages_.add(value);
onChanged();
return this;
}
private boolean isStarred_ ;
/**
*
* Is starred by the requesting user (only showed on get/list requests)
* Please use PostModelStars/DeleteModelStars endpoints to star/unstar a model
*
*
* bool is_starred = 22;
* @return The isStarred.
*/
public boolean getIsStarred() {
return isStarred_;
}
/**
*
* Is starred by the requesting user (only showed on get/list requests)
* Please use PostModelStars/DeleteModelStars endpoints to star/unstar a model
*
*
* bool is_starred = 22;
* @param value The isStarred to set.
* @return This builder for chaining.
*/
public Builder setIsStarred(boolean value) {
isStarred_ = value;
onChanged();
return this;
}
/**
*
* Is starred by the requesting user (only showed on get/list requests)
* Please use PostModelStars/DeleteModelStars endpoints to star/unstar a model
*
*
* bool is_starred = 22;
* @return This builder for chaining.
*/
public Builder clearIsStarred() {
isStarred_ = false;
onChanged();
return this;
}
private int starCount_ ;
/**
*
* How many users have starred the model (only showed on get/list requests)
* Computed value, not editable
*
*
* int32 star_count = 23;
* @return The starCount.
*/
public int getStarCount() {
return starCount_;
}
/**
*
* How many users have starred the model (only showed on get/list requests)
* Computed value, not editable
*
*
* int32 star_count = 23;
* @param value The starCount to set.
* @return This builder for chaining.
*/
public Builder setStarCount(int value) {
starCount_ = value;
onChanged();
return this;
}
/**
*
* How many users have starred the model (only showed on get/list requests)
* Computed value, not editable
*
*
* int32 star_count = 23;
* @return This builder for chaining.
*/
public Builder clearStarCount() {
starCount_ = 0;
onChanged();
return this;
}
private com.clarifai.grpc.api.ImportInfo importInfo_;
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.ImportInfo, com.clarifai.grpc.api.ImportInfo.Builder, com.clarifai.grpc.api.ImportInfoOrBuilder> importInfoBuilder_;
/**
*
* Configuration used to import model from third-party toolkits
*
*
* .clarifai.api.ImportInfo import_info = 24;
* @return Whether the importInfo field is set.
*/
public boolean hasImportInfo() {
return importInfoBuilder_ != null || importInfo_ != null;
}
/**
*
* Configuration used to import model from third-party toolkits
*
*
* .clarifai.api.ImportInfo import_info = 24;
* @return The importInfo.
*/
public com.clarifai.grpc.api.ImportInfo getImportInfo() {
if (importInfoBuilder_ == null) {
return importInfo_ == null ? com.clarifai.grpc.api.ImportInfo.getDefaultInstance() : importInfo_;
} else {
return importInfoBuilder_.getMessage();
}
}
/**
*
* Configuration used to import model from third-party toolkits
*
*
* .clarifai.api.ImportInfo import_info = 24;
*/
public Builder setImportInfo(com.clarifai.grpc.api.ImportInfo value) {
if (importInfoBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
importInfo_ = value;
onChanged();
} else {
importInfoBuilder_.setMessage(value);
}
return this;
}
/**
*
* Configuration used to import model from third-party toolkits
*
*
* .clarifai.api.ImportInfo import_info = 24;
*/
public Builder setImportInfo(
com.clarifai.grpc.api.ImportInfo.Builder builderForValue) {
if (importInfoBuilder_ == null) {
importInfo_ = builderForValue.build();
onChanged();
} else {
importInfoBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Configuration used to import model from third-party toolkits
*
*
* .clarifai.api.ImportInfo import_info = 24;
*/
public Builder mergeImportInfo(com.clarifai.grpc.api.ImportInfo value) {
if (importInfoBuilder_ == null) {
if (importInfo_ != null) {
importInfo_ =
com.clarifai.grpc.api.ImportInfo.newBuilder(importInfo_).mergeFrom(value).buildPartial();
} else {
importInfo_ = value;
}
onChanged();
} else {
importInfoBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Configuration used to import model from third-party toolkits
*
*
* .clarifai.api.ImportInfo import_info = 24;
*/
public Builder clearImportInfo() {
if (importInfoBuilder_ == null) {
importInfo_ = null;
onChanged();
} else {
importInfo_ = null;
importInfoBuilder_ = null;
}
return this;
}
/**
*
* Configuration used to import model from third-party toolkits
*
*
* .clarifai.api.ImportInfo import_info = 24;
*/
public com.clarifai.grpc.api.ImportInfo.Builder getImportInfoBuilder() {
onChanged();
return getImportInfoFieldBuilder().getBuilder();
}
/**
*
* Configuration used to import model from third-party toolkits
*
*
* .clarifai.api.ImportInfo import_info = 24;
*/
public com.clarifai.grpc.api.ImportInfoOrBuilder getImportInfoOrBuilder() {
if (importInfoBuilder_ != null) {
return importInfoBuilder_.getMessageOrBuilder();
} else {
return importInfo_ == null ?
com.clarifai.grpc.api.ImportInfo.getDefaultInstance() : importInfo_;
}
}
/**
*
* Configuration used to import model from third-party toolkits
*
*
* .clarifai.api.ImportInfo import_info = 24;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.ImportInfo, com.clarifai.grpc.api.ImportInfo.Builder, com.clarifai.grpc.api.ImportInfoOrBuilder>
getImportInfoFieldBuilder() {
if (importInfoBuilder_ == null) {
importInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.ImportInfo, com.clarifai.grpc.api.ImportInfo.Builder, com.clarifai.grpc.api.ImportInfoOrBuilder>(
getImportInfo(),
getParentForChildren(),
isClean());
importInfo_ = null;
}
return importInfoBuilder_;
}
@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.Model)
}
// @@protoc_insertion_point(class_scope:clarifai.api.Model)
private static final com.clarifai.grpc.api.Model DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.clarifai.grpc.api.Model();
}
public static com.clarifai.grpc.api.Model getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Model parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Model(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.Model getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy