com.clarifai.grpc.api.TrainInfo Maven / Gradle / Ivy
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: proto/clarifai/api/resources.proto
package com.clarifai.grpc.api;
/**
* Protobuf type {@code clarifai.api.TrainInfo}
*/
public final class TrainInfo extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:clarifai.api.TrainInfo)
TrainInfoOrBuilder {
private static final long serialVersionUID = 0L;
// Use TrainInfo.newBuilder() to construct.
private TrainInfo(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private TrainInfo() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new TrainInfo();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private TrainInfo(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
com.google.protobuf.Struct.Builder subBuilder = null;
if (params_ != null) {
subBuilder = params_.toBuilder();
}
params_ = input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(params_);
params_ = subBuilder.buildPartial();
}
break;
}
case 18: {
com.clarifai.grpc.api.Dataset.Builder subBuilder = null;
if (dataset_ != null) {
subBuilder = dataset_.toBuilder();
}
dataset_ = input.readMessage(com.clarifai.grpc.api.Dataset.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(dataset_);
dataset_ = subBuilder.buildPartial();
}
break;
}
case 26: {
com.clarifai.grpc.api.Model.Builder subBuilder = null;
if (resumeFromModel_ != null) {
subBuilder = resumeFromModel_.toBuilder();
}
resumeFromModel_ = input.readMessage(com.clarifai.grpc.api.Model.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(resumeFromModel_);
resumeFromModel_ = subBuilder.buildPartial();
}
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_TrainInfo_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_TrainInfo_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.TrainInfo.class, com.clarifai.grpc.api.TrainInfo.Builder.class);
}
public static final int PARAMS_FIELD_NUMBER = 1;
private com.google.protobuf.Struct params_;
/**
*
* To control the training process when PostModelVersions is used we allow a list of parameters
* defined for each ModelType as a Struct (JSON object) here. During training, the settings
* contained within are sent to the training processor to alter the training process.
*
*
* .google.protobuf.Struct params = 1;
* @return Whether the params field is set.
*/
@java.lang.Override
public boolean hasParams() {
return params_ != null;
}
/**
*
* To control the training process when PostModelVersions is used we allow a list of parameters
* defined for each ModelType as a Struct (JSON object) here. During training, the settings
* contained within are sent to the training processor to alter the training process.
*
*
* .google.protobuf.Struct params = 1;
* @return The params.
*/
@java.lang.Override
public com.google.protobuf.Struct getParams() {
return params_ == null ? com.google.protobuf.Struct.getDefaultInstance() : params_;
}
/**
*
* To control the training process when PostModelVersions is used we allow a list of parameters
* defined for each ModelType as a Struct (JSON object) here. During training, the settings
* contained within are sent to the training processor to alter the training process.
*
*
* .google.protobuf.Struct params = 1;
*/
@java.lang.Override
public com.google.protobuf.StructOrBuilder getParamsOrBuilder() {
return getParams();
}
public static final int DATASET_FIELD_NUMBER = 2;
private com.clarifai.grpc.api.Dataset dataset_;
/**
*
* The dataset and dataset version this model version was or will be trained on
*
*
* .clarifai.api.Dataset dataset = 2;
* @return Whether the dataset field is set.
*/
@java.lang.Override
public boolean hasDataset() {
return dataset_ != null;
}
/**
*
* The dataset and dataset version this model version was or will be trained on
*
*
* .clarifai.api.Dataset dataset = 2;
* @return The dataset.
*/
@java.lang.Override
public com.clarifai.grpc.api.Dataset getDataset() {
return dataset_ == null ? com.clarifai.grpc.api.Dataset.getDefaultInstance() : dataset_;
}
/**
*
* The dataset and dataset version this model version was or will be trained on
*
*
* .clarifai.api.Dataset dataset = 2;
*/
@java.lang.Override
public com.clarifai.grpc.api.DatasetOrBuilder getDatasetOrBuilder() {
return getDataset();
}
public static final int RESUME_FROM_MODEL_FIELD_NUMBER = 3;
private com.clarifai.grpc.api.Model resumeFromModel_;
/**
*
* The model to resume training from.
*
*
* .clarifai.api.Model resume_from_model = 3;
* @return Whether the resumeFromModel field is set.
*/
@java.lang.Override
public boolean hasResumeFromModel() {
return resumeFromModel_ != null;
}
/**
*
* The model to resume training from.
*
*
* .clarifai.api.Model resume_from_model = 3;
* @return The resumeFromModel.
*/
@java.lang.Override
public com.clarifai.grpc.api.Model getResumeFromModel() {
return resumeFromModel_ == null ? com.clarifai.grpc.api.Model.getDefaultInstance() : resumeFromModel_;
}
/**
*
* The model to resume training from.
*
*
* .clarifai.api.Model resume_from_model = 3;
*/
@java.lang.Override
public com.clarifai.grpc.api.ModelOrBuilder getResumeFromModelOrBuilder() {
return getResumeFromModel();
}
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 (params_ != null) {
output.writeMessage(1, getParams());
}
if (dataset_ != null) {
output.writeMessage(2, getDataset());
}
if (resumeFromModel_ != null) {
output.writeMessage(3, getResumeFromModel());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (params_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getParams());
}
if (dataset_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getDataset());
}
if (resumeFromModel_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getResumeFromModel());
}
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.TrainInfo)) {
return super.equals(obj);
}
com.clarifai.grpc.api.TrainInfo other = (com.clarifai.grpc.api.TrainInfo) obj;
if (hasParams() != other.hasParams()) return false;
if (hasParams()) {
if (!getParams()
.equals(other.getParams())) return false;
}
if (hasDataset() != other.hasDataset()) return false;
if (hasDataset()) {
if (!getDataset()
.equals(other.getDataset())) return false;
}
if (hasResumeFromModel() != other.hasResumeFromModel()) return false;
if (hasResumeFromModel()) {
if (!getResumeFromModel()
.equals(other.getResumeFromModel())) return false;
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasParams()) {
hash = (37 * hash) + PARAMS_FIELD_NUMBER;
hash = (53 * hash) + getParams().hashCode();
}
if (hasDataset()) {
hash = (37 * hash) + DATASET_FIELD_NUMBER;
hash = (53 * hash) + getDataset().hashCode();
}
if (hasResumeFromModel()) {
hash = (37 * hash) + RESUME_FROM_MODEL_FIELD_NUMBER;
hash = (53 * hash) + getResumeFromModel().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.clarifai.grpc.api.TrainInfo parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.TrainInfo 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.TrainInfo parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.TrainInfo 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.TrainInfo parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.TrainInfo parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.clarifai.grpc.api.TrainInfo parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.TrainInfo 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.TrainInfo parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.TrainInfo 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.TrainInfo parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.TrainInfo 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.TrainInfo prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code clarifai.api.TrainInfo}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:clarifai.api.TrainInfo)
com.clarifai.grpc.api.TrainInfoOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_TrainInfo_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_TrainInfo_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.TrainInfo.class, com.clarifai.grpc.api.TrainInfo.Builder.class);
}
// Construct using com.clarifai.grpc.api.TrainInfo.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (paramsBuilder_ == null) {
params_ = null;
} else {
params_ = null;
paramsBuilder_ = null;
}
if (datasetBuilder_ == null) {
dataset_ = null;
} else {
dataset_ = null;
datasetBuilder_ = null;
}
if (resumeFromModelBuilder_ == null) {
resumeFromModel_ = null;
} else {
resumeFromModel_ = null;
resumeFromModelBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_TrainInfo_descriptor;
}
@java.lang.Override
public com.clarifai.grpc.api.TrainInfo getDefaultInstanceForType() {
return com.clarifai.grpc.api.TrainInfo.getDefaultInstance();
}
@java.lang.Override
public com.clarifai.grpc.api.TrainInfo build() {
com.clarifai.grpc.api.TrainInfo result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.clarifai.grpc.api.TrainInfo buildPartial() {
com.clarifai.grpc.api.TrainInfo result = new com.clarifai.grpc.api.TrainInfo(this);
if (paramsBuilder_ == null) {
result.params_ = params_;
} else {
result.params_ = paramsBuilder_.build();
}
if (datasetBuilder_ == null) {
result.dataset_ = dataset_;
} else {
result.dataset_ = datasetBuilder_.build();
}
if (resumeFromModelBuilder_ == null) {
result.resumeFromModel_ = resumeFromModel_;
} else {
result.resumeFromModel_ = resumeFromModelBuilder_.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.TrainInfo) {
return mergeFrom((com.clarifai.grpc.api.TrainInfo)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.clarifai.grpc.api.TrainInfo other) {
if (other == com.clarifai.grpc.api.TrainInfo.getDefaultInstance()) return this;
if (other.hasParams()) {
mergeParams(other.getParams());
}
if (other.hasDataset()) {
mergeDataset(other.getDataset());
}
if (other.hasResumeFromModel()) {
mergeResumeFromModel(other.getResumeFromModel());
}
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.TrainInfo parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.clarifai.grpc.api.TrainInfo) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private com.google.protobuf.Struct params_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> paramsBuilder_;
/**
*
* To control the training process when PostModelVersions is used we allow a list of parameters
* defined for each ModelType as a Struct (JSON object) here. During training, the settings
* contained within are sent to the training processor to alter the training process.
*
*
* .google.protobuf.Struct params = 1;
* @return Whether the params field is set.
*/
public boolean hasParams() {
return paramsBuilder_ != null || params_ != null;
}
/**
*
* To control the training process when PostModelVersions is used we allow a list of parameters
* defined for each ModelType as a Struct (JSON object) here. During training, the settings
* contained within are sent to the training processor to alter the training process.
*
*
* .google.protobuf.Struct params = 1;
* @return The params.
*/
public com.google.protobuf.Struct getParams() {
if (paramsBuilder_ == null) {
return params_ == null ? com.google.protobuf.Struct.getDefaultInstance() : params_;
} else {
return paramsBuilder_.getMessage();
}
}
/**
*
* To control the training process when PostModelVersions is used we allow a list of parameters
* defined for each ModelType as a Struct (JSON object) here. During training, the settings
* contained within are sent to the training processor to alter the training process.
*
*
* .google.protobuf.Struct params = 1;
*/
public Builder setParams(com.google.protobuf.Struct value) {
if (paramsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
params_ = value;
onChanged();
} else {
paramsBuilder_.setMessage(value);
}
return this;
}
/**
*
* To control the training process when PostModelVersions is used we allow a list of parameters
* defined for each ModelType as a Struct (JSON object) here. During training, the settings
* contained within are sent to the training processor to alter the training process.
*
*
* .google.protobuf.Struct params = 1;
*/
public Builder setParams(
com.google.protobuf.Struct.Builder builderForValue) {
if (paramsBuilder_ == null) {
params_ = builderForValue.build();
onChanged();
} else {
paramsBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* To control the training process when PostModelVersions is used we allow a list of parameters
* defined for each ModelType as a Struct (JSON object) here. During training, the settings
* contained within are sent to the training processor to alter the training process.
*
*
* .google.protobuf.Struct params = 1;
*/
public Builder mergeParams(com.google.protobuf.Struct value) {
if (paramsBuilder_ == null) {
if (params_ != null) {
params_ =
com.google.protobuf.Struct.newBuilder(params_).mergeFrom(value).buildPartial();
} else {
params_ = value;
}
onChanged();
} else {
paramsBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* To control the training process when PostModelVersions is used we allow a list of parameters
* defined for each ModelType as a Struct (JSON object) here. During training, the settings
* contained within are sent to the training processor to alter the training process.
*
*
* .google.protobuf.Struct params = 1;
*/
public Builder clearParams() {
if (paramsBuilder_ == null) {
params_ = null;
onChanged();
} else {
params_ = null;
paramsBuilder_ = null;
}
return this;
}
/**
*
* To control the training process when PostModelVersions is used we allow a list of parameters
* defined for each ModelType as a Struct (JSON object) here. During training, the settings
* contained within are sent to the training processor to alter the training process.
*
*
* .google.protobuf.Struct params = 1;
*/
public com.google.protobuf.Struct.Builder getParamsBuilder() {
onChanged();
return getParamsFieldBuilder().getBuilder();
}
/**
*
* To control the training process when PostModelVersions is used we allow a list of parameters
* defined for each ModelType as a Struct (JSON object) here. During training, the settings
* contained within are sent to the training processor to alter the training process.
*
*
* .google.protobuf.Struct params = 1;
*/
public com.google.protobuf.StructOrBuilder getParamsOrBuilder() {
if (paramsBuilder_ != null) {
return paramsBuilder_.getMessageOrBuilder();
} else {
return params_ == null ?
com.google.protobuf.Struct.getDefaultInstance() : params_;
}
}
/**
*
* To control the training process when PostModelVersions is used we allow a list of parameters
* defined for each ModelType as a Struct (JSON object) here. During training, the settings
* contained within are sent to the training processor to alter the training process.
*
*
* .google.protobuf.Struct params = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>
getParamsFieldBuilder() {
if (paramsBuilder_ == null) {
paramsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>(
getParams(),
getParentForChildren(),
isClean());
params_ = null;
}
return paramsBuilder_;
}
private com.clarifai.grpc.api.Dataset dataset_;
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Dataset, com.clarifai.grpc.api.Dataset.Builder, com.clarifai.grpc.api.DatasetOrBuilder> datasetBuilder_;
/**
*
* The dataset and dataset version this model version was or will be trained on
*
*
* .clarifai.api.Dataset dataset = 2;
* @return Whether the dataset field is set.
*/
public boolean hasDataset() {
return datasetBuilder_ != null || dataset_ != null;
}
/**
*
* The dataset and dataset version this model version was or will be trained on
*
*
* .clarifai.api.Dataset dataset = 2;
* @return The dataset.
*/
public com.clarifai.grpc.api.Dataset getDataset() {
if (datasetBuilder_ == null) {
return dataset_ == null ? com.clarifai.grpc.api.Dataset.getDefaultInstance() : dataset_;
} else {
return datasetBuilder_.getMessage();
}
}
/**
*
* The dataset and dataset version this model version was or will be trained on
*
*
* .clarifai.api.Dataset dataset = 2;
*/
public Builder setDataset(com.clarifai.grpc.api.Dataset value) {
if (datasetBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
dataset_ = value;
onChanged();
} else {
datasetBuilder_.setMessage(value);
}
return this;
}
/**
*
* The dataset and dataset version this model version was or will be trained on
*
*
* .clarifai.api.Dataset dataset = 2;
*/
public Builder setDataset(
com.clarifai.grpc.api.Dataset.Builder builderForValue) {
if (datasetBuilder_ == null) {
dataset_ = builderForValue.build();
onChanged();
} else {
datasetBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* The dataset and dataset version this model version was or will be trained on
*
*
* .clarifai.api.Dataset dataset = 2;
*/
public Builder mergeDataset(com.clarifai.grpc.api.Dataset value) {
if (datasetBuilder_ == null) {
if (dataset_ != null) {
dataset_ =
com.clarifai.grpc.api.Dataset.newBuilder(dataset_).mergeFrom(value).buildPartial();
} else {
dataset_ = value;
}
onChanged();
} else {
datasetBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* The dataset and dataset version this model version was or will be trained on
*
*
* .clarifai.api.Dataset dataset = 2;
*/
public Builder clearDataset() {
if (datasetBuilder_ == null) {
dataset_ = null;
onChanged();
} else {
dataset_ = null;
datasetBuilder_ = null;
}
return this;
}
/**
*
* The dataset and dataset version this model version was or will be trained on
*
*
* .clarifai.api.Dataset dataset = 2;
*/
public com.clarifai.grpc.api.Dataset.Builder getDatasetBuilder() {
onChanged();
return getDatasetFieldBuilder().getBuilder();
}
/**
*
* The dataset and dataset version this model version was or will be trained on
*
*
* .clarifai.api.Dataset dataset = 2;
*/
public com.clarifai.grpc.api.DatasetOrBuilder getDatasetOrBuilder() {
if (datasetBuilder_ != null) {
return datasetBuilder_.getMessageOrBuilder();
} else {
return dataset_ == null ?
com.clarifai.grpc.api.Dataset.getDefaultInstance() : dataset_;
}
}
/**
*
* The dataset and dataset version this model version was or will be trained on
*
*
* .clarifai.api.Dataset dataset = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Dataset, com.clarifai.grpc.api.Dataset.Builder, com.clarifai.grpc.api.DatasetOrBuilder>
getDatasetFieldBuilder() {
if (datasetBuilder_ == null) {
datasetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Dataset, com.clarifai.grpc.api.Dataset.Builder, com.clarifai.grpc.api.DatasetOrBuilder>(
getDataset(),
getParentForChildren(),
isClean());
dataset_ = null;
}
return datasetBuilder_;
}
private com.clarifai.grpc.api.Model resumeFromModel_;
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Model, com.clarifai.grpc.api.Model.Builder, com.clarifai.grpc.api.ModelOrBuilder> resumeFromModelBuilder_;
/**
*
* The model to resume training from.
*
*
* .clarifai.api.Model resume_from_model = 3;
* @return Whether the resumeFromModel field is set.
*/
public boolean hasResumeFromModel() {
return resumeFromModelBuilder_ != null || resumeFromModel_ != null;
}
/**
*
* The model to resume training from.
*
*
* .clarifai.api.Model resume_from_model = 3;
* @return The resumeFromModel.
*/
public com.clarifai.grpc.api.Model getResumeFromModel() {
if (resumeFromModelBuilder_ == null) {
return resumeFromModel_ == null ? com.clarifai.grpc.api.Model.getDefaultInstance() : resumeFromModel_;
} else {
return resumeFromModelBuilder_.getMessage();
}
}
/**
*
* The model to resume training from.
*
*
* .clarifai.api.Model resume_from_model = 3;
*/
public Builder setResumeFromModel(com.clarifai.grpc.api.Model value) {
if (resumeFromModelBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
resumeFromModel_ = value;
onChanged();
} else {
resumeFromModelBuilder_.setMessage(value);
}
return this;
}
/**
*
* The model to resume training from.
*
*
* .clarifai.api.Model resume_from_model = 3;
*/
public Builder setResumeFromModel(
com.clarifai.grpc.api.Model.Builder builderForValue) {
if (resumeFromModelBuilder_ == null) {
resumeFromModel_ = builderForValue.build();
onChanged();
} else {
resumeFromModelBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* The model to resume training from.
*
*
* .clarifai.api.Model resume_from_model = 3;
*/
public Builder mergeResumeFromModel(com.clarifai.grpc.api.Model value) {
if (resumeFromModelBuilder_ == null) {
if (resumeFromModel_ != null) {
resumeFromModel_ =
com.clarifai.grpc.api.Model.newBuilder(resumeFromModel_).mergeFrom(value).buildPartial();
} else {
resumeFromModel_ = value;
}
onChanged();
} else {
resumeFromModelBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* The model to resume training from.
*
*
* .clarifai.api.Model resume_from_model = 3;
*/
public Builder clearResumeFromModel() {
if (resumeFromModelBuilder_ == null) {
resumeFromModel_ = null;
onChanged();
} else {
resumeFromModel_ = null;
resumeFromModelBuilder_ = null;
}
return this;
}
/**
*
* The model to resume training from.
*
*
* .clarifai.api.Model resume_from_model = 3;
*/
public com.clarifai.grpc.api.Model.Builder getResumeFromModelBuilder() {
onChanged();
return getResumeFromModelFieldBuilder().getBuilder();
}
/**
*
* The model to resume training from.
*
*
* .clarifai.api.Model resume_from_model = 3;
*/
public com.clarifai.grpc.api.ModelOrBuilder getResumeFromModelOrBuilder() {
if (resumeFromModelBuilder_ != null) {
return resumeFromModelBuilder_.getMessageOrBuilder();
} else {
return resumeFromModel_ == null ?
com.clarifai.grpc.api.Model.getDefaultInstance() : resumeFromModel_;
}
}
/**
*
* The model to resume training from.
*
*
* .clarifai.api.Model resume_from_model = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Model, com.clarifai.grpc.api.Model.Builder, com.clarifai.grpc.api.ModelOrBuilder>
getResumeFromModelFieldBuilder() {
if (resumeFromModelBuilder_ == null) {
resumeFromModelBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.Model, com.clarifai.grpc.api.Model.Builder, com.clarifai.grpc.api.ModelOrBuilder>(
getResumeFromModel(),
getParentForChildren(),
isClean());
resumeFromModel_ = null;
}
return resumeFromModelBuilder_;
}
@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.TrainInfo)
}
// @@protoc_insertion_point(class_scope:clarifai.api.TrainInfo)
private static final com.clarifai.grpc.api.TrainInfo DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.clarifai.grpc.api.TrainInfo();
}
public static com.clarifai.grpc.api.TrainInfo getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public TrainInfo parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new TrainInfo(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.TrainInfo getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}