com.clarifai.grpc.api.ModuleVersion 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;
/**
*
* A specific version of an app module that is available for assigning to apps.
*
*
* Protobuf type {@code clarifai.api.ModuleVersion}
*/
public final class ModuleVersion extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:clarifai.api.ModuleVersion)
ModuleVersionOrBuilder {
private static final long serialVersionUID = 0L;
// Use ModuleVersion.newBuilder() to construct.
private ModuleVersion(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ModuleVersion() {
id_ = "";
moduleId_ = "";
appId_ = "";
userId_ = "";
description_ = "";
notes_ = "";
gitCommitUrl_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ModuleVersion();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ModuleVersion(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
id_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
moduleId_ = s;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
appId_ = s;
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
userId_ = s;
break;
}
case 50: {
java.lang.String s = input.readStringRequireUtf8();
description_ = s;
break;
}
case 58: {
java.lang.String s = input.readStringRequireUtf8();
notes_ = s;
break;
}
case 66: {
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 74: {
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 82: {
java.lang.String s = input.readStringRequireUtf8();
gitCommitUrl_ = s;
break;
}
case 90: {
com.clarifai.grpc.api.ModuleVersion.ModuleNav.Builder subBuilder = null;
if (moduleNav_ != null) {
subBuilder = moduleNav_.toBuilder();
}
moduleNav_ = input.readMessage(com.clarifai.grpc.api.ModuleVersion.ModuleNav.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(moduleNav_);
moduleNav_ = subBuilder.buildPartial();
}
break;
}
case 96: {
approved_ = input.readBool();
break;
}
case 106: {
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 114: {
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;
}
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_ModuleVersion_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_ModuleVersion_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.ModuleVersion.class, com.clarifai.grpc.api.ModuleVersion.Builder.class);
}
public interface ModuleSubNavOrBuilder extends
// @@protoc_insertion_point(interface_extends:clarifai.api.ModuleVersion.ModuleSubNav)
com.google.protobuf.MessageOrBuilder {
/**
*
* This is the display title for a navbar element to link to a specific page.
* The name for this subnav element to show in the sidebar.
*
*
* string title = 1;
* @return The title.
*/
java.lang.String getTitle();
/**
*
* This is the display title for a navbar element to link to a specific page.
* The name for this subnav element to show in the sidebar.
*
*
* string title = 1;
* @return The bytes for title.
*/
com.google.protobuf.ByteString
getTitleBytes();
/**
*
* The query param name
*
*
* string query_key = 2;
* @return The queryKey.
*/
java.lang.String getQueryKey();
/**
*
* The query param name
*
*
* string query_key = 2;
* @return The bytes for queryKey.
*/
com.google.protobuf.ByteString
getQueryKeyBytes();
/**
*
* The query param value
*
*
* string query_value = 3;
* @return The queryValue.
*/
java.lang.String getQueryValue();
/**
*
* The query param value
*
*
* string query_value = 3;
* @return The bytes for queryValue.
*/
com.google.protobuf.ByteString
getQueryValueBytes();
}
/**
* Protobuf type {@code clarifai.api.ModuleVersion.ModuleSubNav}
*/
public static final class ModuleSubNav extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:clarifai.api.ModuleVersion.ModuleSubNav)
ModuleSubNavOrBuilder {
private static final long serialVersionUID = 0L;
// Use ModuleSubNav.newBuilder() to construct.
private ModuleSubNav(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ModuleSubNav() {
title_ = "";
queryKey_ = "";
queryValue_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ModuleSubNav();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ModuleSubNav(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
title_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
queryKey_ = s;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
queryValue_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_ModuleVersion_ModuleSubNav_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_ModuleVersion_ModuleSubNav_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.ModuleVersion.ModuleSubNav.class, com.clarifai.grpc.api.ModuleVersion.ModuleSubNav.Builder.class);
}
public static final int TITLE_FIELD_NUMBER = 1;
private volatile java.lang.Object title_;
/**
*
* This is the display title for a navbar element to link to a specific page.
* The name for this subnav element to show in the sidebar.
*
*
* string title = 1;
* @return The title.
*/
@java.lang.Override
public java.lang.String getTitle() {
java.lang.Object ref = title_;
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();
title_ = s;
return s;
}
}
/**
*
* This is the display title for a navbar element to link to a specific page.
* The name for this subnav element to show in the sidebar.
*
*
* string title = 1;
* @return The bytes for title.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getTitleBytes() {
java.lang.Object ref = title_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
title_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int QUERY_KEY_FIELD_NUMBER = 2;
private volatile java.lang.Object queryKey_;
/**
*
* The query param name
*
*
* string query_key = 2;
* @return The queryKey.
*/
@java.lang.Override
public java.lang.String getQueryKey() {
java.lang.Object ref = queryKey_;
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();
queryKey_ = s;
return s;
}
}
/**
*
* The query param name
*
*
* string query_key = 2;
* @return The bytes for queryKey.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getQueryKeyBytes() {
java.lang.Object ref = queryKey_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
queryKey_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int QUERY_VALUE_FIELD_NUMBER = 3;
private volatile java.lang.Object queryValue_;
/**
*
* The query param value
*
*
* string query_value = 3;
* @return The queryValue.
*/
@java.lang.Override
public java.lang.String getQueryValue() {
java.lang.Object ref = queryValue_;
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();
queryValue_ = s;
return s;
}
}
/**
*
* The query param value
*
*
* string query_value = 3;
* @return The bytes for queryValue.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getQueryValueBytes() {
java.lang.Object ref = queryValue_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
queryValue_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, title_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queryKey_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, queryKey_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queryValue_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, queryValue_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, title_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queryKey_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, queryKey_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queryValue_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, queryValue_);
}
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.ModuleVersion.ModuleSubNav)) {
return super.equals(obj);
}
com.clarifai.grpc.api.ModuleVersion.ModuleSubNav other = (com.clarifai.grpc.api.ModuleVersion.ModuleSubNav) obj;
if (!getTitle()
.equals(other.getTitle())) return false;
if (!getQueryKey()
.equals(other.getQueryKey())) return false;
if (!getQueryValue()
.equals(other.getQueryValue())) 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) + TITLE_FIELD_NUMBER;
hash = (53 * hash) + getTitle().hashCode();
hash = (37 * hash) + QUERY_KEY_FIELD_NUMBER;
hash = (53 * hash) + getQueryKey().hashCode();
hash = (37 * hash) + QUERY_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getQueryValue().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.clarifai.grpc.api.ModuleVersion.ModuleSubNav parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.ModuleVersion.ModuleSubNav 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.ModuleVersion.ModuleSubNav parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.ModuleVersion.ModuleSubNav 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.ModuleVersion.ModuleSubNav parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.ModuleVersion.ModuleSubNav parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.clarifai.grpc.api.ModuleVersion.ModuleSubNav parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.ModuleVersion.ModuleSubNav 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.ModuleVersion.ModuleSubNav parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.ModuleVersion.ModuleSubNav 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.ModuleVersion.ModuleSubNav parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.ModuleVersion.ModuleSubNav 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.ModuleVersion.ModuleSubNav 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.ModuleVersion.ModuleSubNav}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:clarifai.api.ModuleVersion.ModuleSubNav)
com.clarifai.grpc.api.ModuleVersion.ModuleSubNavOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_ModuleVersion_ModuleSubNav_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_ModuleVersion_ModuleSubNav_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.ModuleVersion.ModuleSubNav.class, com.clarifai.grpc.api.ModuleVersion.ModuleSubNav.Builder.class);
}
// Construct using com.clarifai.grpc.api.ModuleVersion.ModuleSubNav.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();
title_ = "";
queryKey_ = "";
queryValue_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_ModuleVersion_ModuleSubNav_descriptor;
}
@java.lang.Override
public com.clarifai.grpc.api.ModuleVersion.ModuleSubNav getDefaultInstanceForType() {
return com.clarifai.grpc.api.ModuleVersion.ModuleSubNav.getDefaultInstance();
}
@java.lang.Override
public com.clarifai.grpc.api.ModuleVersion.ModuleSubNav build() {
com.clarifai.grpc.api.ModuleVersion.ModuleSubNav result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.clarifai.grpc.api.ModuleVersion.ModuleSubNav buildPartial() {
com.clarifai.grpc.api.ModuleVersion.ModuleSubNav result = new com.clarifai.grpc.api.ModuleVersion.ModuleSubNav(this);
result.title_ = title_;
result.queryKey_ = queryKey_;
result.queryValue_ = queryValue_;
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.ModuleVersion.ModuleSubNav) {
return mergeFrom((com.clarifai.grpc.api.ModuleVersion.ModuleSubNav)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.clarifai.grpc.api.ModuleVersion.ModuleSubNav other) {
if (other == com.clarifai.grpc.api.ModuleVersion.ModuleSubNav.getDefaultInstance()) return this;
if (!other.getTitle().isEmpty()) {
title_ = other.title_;
onChanged();
}
if (!other.getQueryKey().isEmpty()) {
queryKey_ = other.queryKey_;
onChanged();
}
if (!other.getQueryValue().isEmpty()) {
queryValue_ = other.queryValue_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.clarifai.grpc.api.ModuleVersion.ModuleSubNav parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.clarifai.grpc.api.ModuleVersion.ModuleSubNav) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object title_ = "";
/**
*
* This is the display title for a navbar element to link to a specific page.
* The name for this subnav element to show in the sidebar.
*
*
* string title = 1;
* @return The title.
*/
public java.lang.String getTitle() {
java.lang.Object ref = title_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
title_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* This is the display title for a navbar element to link to a specific page.
* The name for this subnav element to show in the sidebar.
*
*
* string title = 1;
* @return The bytes for title.
*/
public com.google.protobuf.ByteString
getTitleBytes() {
java.lang.Object ref = title_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
title_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* This is the display title for a navbar element to link to a specific page.
* The name for this subnav element to show in the sidebar.
*
*
* string title = 1;
* @param value The title to set.
* @return This builder for chaining.
*/
public Builder setTitle(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
title_ = value;
onChanged();
return this;
}
/**
*
* This is the display title for a navbar element to link to a specific page.
* The name for this subnav element to show in the sidebar.
*
*
* string title = 1;
* @return This builder for chaining.
*/
public Builder clearTitle() {
title_ = getDefaultInstance().getTitle();
onChanged();
return this;
}
/**
*
* This is the display title for a navbar element to link to a specific page.
* The name for this subnav element to show in the sidebar.
*
*
* string title = 1;
* @param value The bytes for title to set.
* @return This builder for chaining.
*/
public Builder setTitleBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
title_ = value;
onChanged();
return this;
}
private java.lang.Object queryKey_ = "";
/**
*
* The query param name
*
*
* string query_key = 2;
* @return The queryKey.
*/
public java.lang.String getQueryKey() {
java.lang.Object ref = queryKey_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
queryKey_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The query param name
*
*
* string query_key = 2;
* @return The bytes for queryKey.
*/
public com.google.protobuf.ByteString
getQueryKeyBytes() {
java.lang.Object ref = queryKey_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
queryKey_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The query param name
*
*
* string query_key = 2;
* @param value The queryKey to set.
* @return This builder for chaining.
*/
public Builder setQueryKey(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
queryKey_ = value;
onChanged();
return this;
}
/**
*
* The query param name
*
*
* string query_key = 2;
* @return This builder for chaining.
*/
public Builder clearQueryKey() {
queryKey_ = getDefaultInstance().getQueryKey();
onChanged();
return this;
}
/**
*
* The query param name
*
*
* string query_key = 2;
* @param value The bytes for queryKey to set.
* @return This builder for chaining.
*/
public Builder setQueryKeyBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
queryKey_ = value;
onChanged();
return this;
}
private java.lang.Object queryValue_ = "";
/**
*
* The query param value
*
*
* string query_value = 3;
* @return The queryValue.
*/
public java.lang.String getQueryValue() {
java.lang.Object ref = queryValue_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
queryValue_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The query param value
*
*
* string query_value = 3;
* @return The bytes for queryValue.
*/
public com.google.protobuf.ByteString
getQueryValueBytes() {
java.lang.Object ref = queryValue_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
queryValue_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The query param value
*
*
* string query_value = 3;
* @param value The queryValue to set.
* @return This builder for chaining.
*/
public Builder setQueryValue(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
queryValue_ = value;
onChanged();
return this;
}
/**
*
* The query param value
*
*
* string query_value = 3;
* @return This builder for chaining.
*/
public Builder clearQueryValue() {
queryValue_ = getDefaultInstance().getQueryValue();
onChanged();
return this;
}
/**
*
* The query param value
*
*
* string query_value = 3;
* @param value The bytes for queryValue to set.
* @return This builder for chaining.
*/
public Builder setQueryValueBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
queryValue_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:clarifai.api.ModuleVersion.ModuleSubNav)
}
// @@protoc_insertion_point(class_scope:clarifai.api.ModuleVersion.ModuleSubNav)
private static final com.clarifai.grpc.api.ModuleVersion.ModuleSubNav DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.clarifai.grpc.api.ModuleVersion.ModuleSubNav();
}
public static com.clarifai.grpc.api.ModuleVersion.ModuleSubNav getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ModuleSubNav parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ModuleSubNav(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.ModuleVersion.ModuleSubNav getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ModuleNavOrBuilder extends
// @@protoc_insertion_point(interface_extends:clarifai.api.ModuleVersion.ModuleNav)
com.google.protobuf.MessageOrBuilder {
/**
*
* This is the left side title for this module and for browser tab title of the module.
* We have this in the version so that users can change those settings
* when releasing a new version of their module.
*
*
* string title = 1;
* @return The title.
*/
java.lang.String getTitle();
/**
*
* This is the left side title for this module and for browser tab title of the module.
* We have this in the version so that users can change those settings
* when releasing a new version of their module.
*
*
* string title = 1;
* @return The bytes for title.
*/
com.google.protobuf.ByteString
getTitleBytes();
/**
*
* A list of subnav elements to put under the module title.
*
*
* repeated .clarifai.api.ModuleVersion.ModuleSubNav module_sub_navs = 2;
*/
java.util.List
getModuleSubNavsList();
/**
*
* A list of subnav elements to put under the module title.
*
*
* repeated .clarifai.api.ModuleVersion.ModuleSubNav module_sub_navs = 2;
*/
com.clarifai.grpc.api.ModuleVersion.ModuleSubNav getModuleSubNavs(int index);
/**
*
* A list of subnav elements to put under the module title.
*
*
* repeated .clarifai.api.ModuleVersion.ModuleSubNav module_sub_navs = 2;
*/
int getModuleSubNavsCount();
/**
*
* A list of subnav elements to put under the module title.
*
*
* repeated .clarifai.api.ModuleVersion.ModuleSubNav module_sub_navs = 2;
*/
java.util.List extends com.clarifai.grpc.api.ModuleVersion.ModuleSubNavOrBuilder>
getModuleSubNavsOrBuilderList();
/**
*
* A list of subnav elements to put under the module title.
*
*
* repeated .clarifai.api.ModuleVersion.ModuleSubNav module_sub_navs = 2;
*/
com.clarifai.grpc.api.ModuleVersion.ModuleSubNavOrBuilder getModuleSubNavsOrBuilder(
int index);
}
/**
* Protobuf type {@code clarifai.api.ModuleVersion.ModuleNav}
*/
public static final class ModuleNav extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:clarifai.api.ModuleVersion.ModuleNav)
ModuleNavOrBuilder {
private static final long serialVersionUID = 0L;
// Use ModuleNav.newBuilder() to construct.
private ModuleNav(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ModuleNav() {
title_ = "";
moduleSubNavs_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ModuleNav();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ModuleNav(
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();
title_ = s;
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
moduleSubNavs_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
moduleSubNavs_.add(
input.readMessage(com.clarifai.grpc.api.ModuleVersion.ModuleSubNav.parser(), extensionRegistry));
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 {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
moduleSubNavs_ = java.util.Collections.unmodifiableList(moduleSubNavs_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_ModuleVersion_ModuleNav_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_ModuleVersion_ModuleNav_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.ModuleVersion.ModuleNav.class, com.clarifai.grpc.api.ModuleVersion.ModuleNav.Builder.class);
}
public static final int TITLE_FIELD_NUMBER = 1;
private volatile java.lang.Object title_;
/**
*
* This is the left side title for this module and for browser tab title of the module.
* We have this in the version so that users can change those settings
* when releasing a new version of their module.
*
*
* string title = 1;
* @return The title.
*/
@java.lang.Override
public java.lang.String getTitle() {
java.lang.Object ref = title_;
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();
title_ = s;
return s;
}
}
/**
*
* This is the left side title for this module and for browser tab title of the module.
* We have this in the version so that users can change those settings
* when releasing a new version of their module.
*
*
* string title = 1;
* @return The bytes for title.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getTitleBytes() {
java.lang.Object ref = title_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
title_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int MODULE_SUB_NAVS_FIELD_NUMBER = 2;
private java.util.List moduleSubNavs_;
/**
*
* A list of subnav elements to put under the module title.
*
*
* repeated .clarifai.api.ModuleVersion.ModuleSubNav module_sub_navs = 2;
*/
@java.lang.Override
public java.util.List getModuleSubNavsList() {
return moduleSubNavs_;
}
/**
*
* A list of subnav elements to put under the module title.
*
*
* repeated .clarifai.api.ModuleVersion.ModuleSubNav module_sub_navs = 2;
*/
@java.lang.Override
public java.util.List extends com.clarifai.grpc.api.ModuleVersion.ModuleSubNavOrBuilder>
getModuleSubNavsOrBuilderList() {
return moduleSubNavs_;
}
/**
*
* A list of subnav elements to put under the module title.
*
*
* repeated .clarifai.api.ModuleVersion.ModuleSubNav module_sub_navs = 2;
*/
@java.lang.Override
public int getModuleSubNavsCount() {
return moduleSubNavs_.size();
}
/**
*
* A list of subnav elements to put under the module title.
*
*
* repeated .clarifai.api.ModuleVersion.ModuleSubNav module_sub_navs = 2;
*/
@java.lang.Override
public com.clarifai.grpc.api.ModuleVersion.ModuleSubNav getModuleSubNavs(int index) {
return moduleSubNavs_.get(index);
}
/**
*
* A list of subnav elements to put under the module title.
*
*
* repeated .clarifai.api.ModuleVersion.ModuleSubNav module_sub_navs = 2;
*/
@java.lang.Override
public com.clarifai.grpc.api.ModuleVersion.ModuleSubNavOrBuilder getModuleSubNavsOrBuilder(
int index) {
return moduleSubNavs_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, title_);
}
for (int i = 0; i < moduleSubNavs_.size(); i++) {
output.writeMessage(2, moduleSubNavs_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, title_);
}
for (int i = 0; i < moduleSubNavs_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, moduleSubNavs_.get(i));
}
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.ModuleVersion.ModuleNav)) {
return super.equals(obj);
}
com.clarifai.grpc.api.ModuleVersion.ModuleNav other = (com.clarifai.grpc.api.ModuleVersion.ModuleNav) obj;
if (!getTitle()
.equals(other.getTitle())) return false;
if (!getModuleSubNavsList()
.equals(other.getModuleSubNavsList())) 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) + TITLE_FIELD_NUMBER;
hash = (53 * hash) + getTitle().hashCode();
if (getModuleSubNavsCount() > 0) {
hash = (37 * hash) + MODULE_SUB_NAVS_FIELD_NUMBER;
hash = (53 * hash) + getModuleSubNavsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.clarifai.grpc.api.ModuleVersion.ModuleNav parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.ModuleVersion.ModuleNav 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.ModuleVersion.ModuleNav parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.ModuleVersion.ModuleNav 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.ModuleVersion.ModuleNav parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.ModuleVersion.ModuleNav parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.clarifai.grpc.api.ModuleVersion.ModuleNav parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.ModuleVersion.ModuleNav 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.ModuleVersion.ModuleNav parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.ModuleVersion.ModuleNav 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.ModuleVersion.ModuleNav parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.ModuleVersion.ModuleNav 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.ModuleVersion.ModuleNav 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.ModuleVersion.ModuleNav}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:clarifai.api.ModuleVersion.ModuleNav)
com.clarifai.grpc.api.ModuleVersion.ModuleNavOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_ModuleVersion_ModuleNav_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_ModuleVersion_ModuleNav_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.ModuleVersion.ModuleNav.class, com.clarifai.grpc.api.ModuleVersion.ModuleNav.Builder.class);
}
// Construct using com.clarifai.grpc.api.ModuleVersion.ModuleNav.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getModuleSubNavsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
title_ = "";
if (moduleSubNavsBuilder_ == null) {
moduleSubNavs_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
moduleSubNavsBuilder_.clear();
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_ModuleVersion_ModuleNav_descriptor;
}
@java.lang.Override
public com.clarifai.grpc.api.ModuleVersion.ModuleNav getDefaultInstanceForType() {
return com.clarifai.grpc.api.ModuleVersion.ModuleNav.getDefaultInstance();
}
@java.lang.Override
public com.clarifai.grpc.api.ModuleVersion.ModuleNav build() {
com.clarifai.grpc.api.ModuleVersion.ModuleNav result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.clarifai.grpc.api.ModuleVersion.ModuleNav buildPartial() {
com.clarifai.grpc.api.ModuleVersion.ModuleNav result = new com.clarifai.grpc.api.ModuleVersion.ModuleNav(this);
int from_bitField0_ = bitField0_;
result.title_ = title_;
if (moduleSubNavsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
moduleSubNavs_ = java.util.Collections.unmodifiableList(moduleSubNavs_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.moduleSubNavs_ = moduleSubNavs_;
} else {
result.moduleSubNavs_ = moduleSubNavsBuilder_.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.ModuleVersion.ModuleNav) {
return mergeFrom((com.clarifai.grpc.api.ModuleVersion.ModuleNav)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.clarifai.grpc.api.ModuleVersion.ModuleNav other) {
if (other == com.clarifai.grpc.api.ModuleVersion.ModuleNav.getDefaultInstance()) return this;
if (!other.getTitle().isEmpty()) {
title_ = other.title_;
onChanged();
}
if (moduleSubNavsBuilder_ == null) {
if (!other.moduleSubNavs_.isEmpty()) {
if (moduleSubNavs_.isEmpty()) {
moduleSubNavs_ = other.moduleSubNavs_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureModuleSubNavsIsMutable();
moduleSubNavs_.addAll(other.moduleSubNavs_);
}
onChanged();
}
} else {
if (!other.moduleSubNavs_.isEmpty()) {
if (moduleSubNavsBuilder_.isEmpty()) {
moduleSubNavsBuilder_.dispose();
moduleSubNavsBuilder_ = null;
moduleSubNavs_ = other.moduleSubNavs_;
bitField0_ = (bitField0_ & ~0x00000001);
moduleSubNavsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getModuleSubNavsFieldBuilder() : null;
} else {
moduleSubNavsBuilder_.addAllMessages(other.moduleSubNavs_);
}
}
}
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.ModuleVersion.ModuleNav parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.clarifai.grpc.api.ModuleVersion.ModuleNav) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object title_ = "";
/**
*
* This is the left side title for this module and for browser tab title of the module.
* We have this in the version so that users can change those settings
* when releasing a new version of their module.
*
*
* string title = 1;
* @return The title.
*/
public java.lang.String getTitle() {
java.lang.Object ref = title_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
title_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* This is the left side title for this module and for browser tab title of the module.
* We have this in the version so that users can change those settings
* when releasing a new version of their module.
*
*
* string title = 1;
* @return The bytes for title.
*/
public com.google.protobuf.ByteString
getTitleBytes() {
java.lang.Object ref = title_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
title_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* This is the left side title for this module and for browser tab title of the module.
* We have this in the version so that users can change those settings
* when releasing a new version of their module.
*
*
* string title = 1;
* @param value The title to set.
* @return This builder for chaining.
*/
public Builder setTitle(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
title_ = value;
onChanged();
return this;
}
/**
*
* This is the left side title for this module and for browser tab title of the module.
* We have this in the version so that users can change those settings
* when releasing a new version of their module.
*
*
* string title = 1;
* @return This builder for chaining.
*/
public Builder clearTitle() {
title_ = getDefaultInstance().getTitle();
onChanged();
return this;
}
/**
*
* This is the left side title for this module and for browser tab title of the module.
* We have this in the version so that users can change those settings
* when releasing a new version of their module.
*
*
* string title = 1;
* @param value The bytes for title to set.
* @return This builder for chaining.
*/
public Builder setTitleBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
title_ = value;
onChanged();
return this;
}
private java.util.List moduleSubNavs_ =
java.util.Collections.emptyList();
private void ensureModuleSubNavsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
moduleSubNavs_ = new java.util.ArrayList(moduleSubNavs_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.clarifai.grpc.api.ModuleVersion.ModuleSubNav, com.clarifai.grpc.api.ModuleVersion.ModuleSubNav.Builder, com.clarifai.grpc.api.ModuleVersion.ModuleSubNavOrBuilder> moduleSubNavsBuilder_;
/**
*
* A list of subnav elements to put under the module title.
*
*
* repeated .clarifai.api.ModuleVersion.ModuleSubNav module_sub_navs = 2;
*/
public java.util.List getModuleSubNavsList() {
if (moduleSubNavsBuilder_ == null) {
return java.util.Collections.unmodifiableList(moduleSubNavs_);
} else {
return moduleSubNavsBuilder_.getMessageList();
}
}
/**
*
* A list of subnav elements to put under the module title.
*
*
* repeated .clarifai.api.ModuleVersion.ModuleSubNav module_sub_navs = 2;
*/
public int getModuleSubNavsCount() {
if (moduleSubNavsBuilder_ == null) {
return moduleSubNavs_.size();
} else {
return moduleSubNavsBuilder_.getCount();
}
}
/**
*
* A list of subnav elements to put under the module title.
*
*
* repeated .clarifai.api.ModuleVersion.ModuleSubNav module_sub_navs = 2;
*/
public com.clarifai.grpc.api.ModuleVersion.ModuleSubNav getModuleSubNavs(int index) {
if (moduleSubNavsBuilder_ == null) {
return moduleSubNavs_.get(index);
} else {
return moduleSubNavsBuilder_.getMessage(index);
}
}
/**
*
* A list of subnav elements to put under the module title.
*
*
* repeated .clarifai.api.ModuleVersion.ModuleSubNav module_sub_navs = 2;
*/
public Builder setModuleSubNavs(
int index, com.clarifai.grpc.api.ModuleVersion.ModuleSubNav value) {
if (moduleSubNavsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureModuleSubNavsIsMutable();
moduleSubNavs_.set(index, value);
onChanged();
} else {
moduleSubNavsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* A list of subnav elements to put under the module title.
*
*
* repeated .clarifai.api.ModuleVersion.ModuleSubNav module_sub_navs = 2;
*/
public Builder setModuleSubNavs(
int index, com.clarifai.grpc.api.ModuleVersion.ModuleSubNav.Builder builderForValue) {
if (moduleSubNavsBuilder_ == null) {
ensureModuleSubNavsIsMutable();
moduleSubNavs_.set(index, builderForValue.build());
onChanged();
} else {
moduleSubNavsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* A list of subnav elements to put under the module title.
*
*
* repeated .clarifai.api.ModuleVersion.ModuleSubNav module_sub_navs = 2;
*/
public Builder addModuleSubNavs(com.clarifai.grpc.api.ModuleVersion.ModuleSubNav value) {
if (moduleSubNavsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureModuleSubNavsIsMutable();
moduleSubNavs_.add(value);
onChanged();
} else {
moduleSubNavsBuilder_.addMessage(value);
}
return this;
}
/**
*
* A list of subnav elements to put under the module title.
*
*
* repeated .clarifai.api.ModuleVersion.ModuleSubNav module_sub_navs = 2;
*/
public Builder addModuleSubNavs(
int index, com.clarifai.grpc.api.ModuleVersion.ModuleSubNav value) {
if (moduleSubNavsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureModuleSubNavsIsMutable();
moduleSubNavs_.add(index, value);
onChanged();
} else {
moduleSubNavsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* A list of subnav elements to put under the module title.
*
*
* repeated .clarifai.api.ModuleVersion.ModuleSubNav module_sub_navs = 2;
*/
public Builder addModuleSubNavs(
com.clarifai.grpc.api.ModuleVersion.ModuleSubNav.Builder builderForValue) {
if (moduleSubNavsBuilder_ == null) {
ensureModuleSubNavsIsMutable();
moduleSubNavs_.add(builderForValue.build());
onChanged();
} else {
moduleSubNavsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* A list of subnav elements to put under the module title.
*
*
* repeated .clarifai.api.ModuleVersion.ModuleSubNav module_sub_navs = 2;
*/
public Builder addModuleSubNavs(
int index, com.clarifai.grpc.api.ModuleVersion.ModuleSubNav.Builder builderForValue) {
if (moduleSubNavsBuilder_ == null) {
ensureModuleSubNavsIsMutable();
moduleSubNavs_.add(index, builderForValue.build());
onChanged();
} else {
moduleSubNavsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* A list of subnav elements to put under the module title.
*
*
* repeated .clarifai.api.ModuleVersion.ModuleSubNav module_sub_navs = 2;
*/
public Builder addAllModuleSubNavs(
java.lang.Iterable extends com.clarifai.grpc.api.ModuleVersion.ModuleSubNav> values) {
if (moduleSubNavsBuilder_ == null) {
ensureModuleSubNavsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, moduleSubNavs_);
onChanged();
} else {
moduleSubNavsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* A list of subnav elements to put under the module title.
*
*
* repeated .clarifai.api.ModuleVersion.ModuleSubNav module_sub_navs = 2;
*/
public Builder clearModuleSubNavs() {
if (moduleSubNavsBuilder_ == null) {
moduleSubNavs_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
moduleSubNavsBuilder_.clear();
}
return this;
}
/**
*
* A list of subnav elements to put under the module title.
*
*
* repeated .clarifai.api.ModuleVersion.ModuleSubNav module_sub_navs = 2;
*/
public Builder removeModuleSubNavs(int index) {
if (moduleSubNavsBuilder_ == null) {
ensureModuleSubNavsIsMutable();
moduleSubNavs_.remove(index);
onChanged();
} else {
moduleSubNavsBuilder_.remove(index);
}
return this;
}
/**
*
* A list of subnav elements to put under the module title.
*
*
* repeated .clarifai.api.ModuleVersion.ModuleSubNav module_sub_navs = 2;
*/
public com.clarifai.grpc.api.ModuleVersion.ModuleSubNav.Builder getModuleSubNavsBuilder(
int index) {
return getModuleSubNavsFieldBuilder().getBuilder(index);
}
/**
*
* A list of subnav elements to put under the module title.
*
*
* repeated .clarifai.api.ModuleVersion.ModuleSubNav module_sub_navs = 2;
*/
public com.clarifai.grpc.api.ModuleVersion.ModuleSubNavOrBuilder getModuleSubNavsOrBuilder(
int index) {
if (moduleSubNavsBuilder_ == null) {
return moduleSubNavs_.get(index); } else {
return moduleSubNavsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* A list of subnav elements to put under the module title.
*
*
* repeated .clarifai.api.ModuleVersion.ModuleSubNav module_sub_navs = 2;
*/
public java.util.List extends com.clarifai.grpc.api.ModuleVersion.ModuleSubNavOrBuilder>
getModuleSubNavsOrBuilderList() {
if (moduleSubNavsBuilder_ != null) {
return moduleSubNavsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(moduleSubNavs_);
}
}
/**
*
* A list of subnav elements to put under the module title.
*
*
* repeated .clarifai.api.ModuleVersion.ModuleSubNav module_sub_navs = 2;
*/
public com.clarifai.grpc.api.ModuleVersion.ModuleSubNav.Builder addModuleSubNavsBuilder() {
return getModuleSubNavsFieldBuilder().addBuilder(
com.clarifai.grpc.api.ModuleVersion.ModuleSubNav.getDefaultInstance());
}
/**
*
* A list of subnav elements to put under the module title.
*
*
* repeated .clarifai.api.ModuleVersion.ModuleSubNav module_sub_navs = 2;
*/
public com.clarifai.grpc.api.ModuleVersion.ModuleSubNav.Builder addModuleSubNavsBuilder(
int index) {
return getModuleSubNavsFieldBuilder().addBuilder(
index, com.clarifai.grpc.api.ModuleVersion.ModuleSubNav.getDefaultInstance());
}
/**
*
* A list of subnav elements to put under the module title.
*
*
* repeated .clarifai.api.ModuleVersion.ModuleSubNav module_sub_navs = 2;
*/
public java.util.List
getModuleSubNavsBuilderList() {
return getModuleSubNavsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.clarifai.grpc.api.ModuleVersion.ModuleSubNav, com.clarifai.grpc.api.ModuleVersion.ModuleSubNav.Builder, com.clarifai.grpc.api.ModuleVersion.ModuleSubNavOrBuilder>
getModuleSubNavsFieldBuilder() {
if (moduleSubNavsBuilder_ == null) {
moduleSubNavsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.clarifai.grpc.api.ModuleVersion.ModuleSubNav, com.clarifai.grpc.api.ModuleVersion.ModuleSubNav.Builder, com.clarifai.grpc.api.ModuleVersion.ModuleSubNavOrBuilder>(
moduleSubNavs_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
moduleSubNavs_ = null;
}
return moduleSubNavsBuilder_;
}
@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.ModuleVersion.ModuleNav)
}
// @@protoc_insertion_point(class_scope:clarifai.api.ModuleVersion.ModuleNav)
private static final com.clarifai.grpc.api.ModuleVersion.ModuleNav DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.clarifai.grpc.api.ModuleVersion.ModuleNav();
}
public static com.clarifai.grpc.api.ModuleVersion.ModuleNav getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ModuleNav parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ModuleNav(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.ModuleVersion.ModuleNav getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int ID_FIELD_NUMBER = 1;
private volatile java.lang.Object id_;
/**
*
* A name for this version like 1_0, 1_1_0, etc.
*
*
* string id = 1;
* @return The id.
*/
@java.lang.Override
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;
}
}
/**
*
* A name for this version like 1_0, 1_1_0, etc.
*
*
* string id = 1;
* @return The bytes for id.
*/
@java.lang.Override
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 MODULE_ID_FIELD_NUMBER = 2;
private volatile java.lang.Object moduleId_;
/**
*
* The module this version belongs to.
*
*
* string module_id = 2;
* @return The moduleId.
*/
@java.lang.Override
public java.lang.String getModuleId() {
java.lang.Object ref = moduleId_;
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();
moduleId_ = s;
return s;
}
}
/**
*
* The module this version belongs to.
*
*
* string module_id = 2;
* @return The bytes for moduleId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getModuleIdBytes() {
java.lang.Object ref = moduleId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
moduleId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int APP_ID_FIELD_NUMBER = 3;
private volatile java.lang.Object appId_;
/**
*
* The app_id this module version belongs to.
*
*
* string app_id = 3;
* @return The appId.
*/
@java.lang.Override
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_id this module version belongs to.
*
*
* string app_id = 3;
* @return The bytes for appId.
*/
@java.lang.Override
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 USER_ID_FIELD_NUMBER = 4;
private volatile java.lang.Object userId_;
/**
*
* The user_id this module version belongs to.
*
*
* string user_id = 4;
* @return The userId.
*/
@java.lang.Override
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 this module version belongs to.
*
*
* string user_id = 4;
* @return The bytes for userId.
*/
@java.lang.Override
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 DESCRIPTION_FIELD_NUMBER = 6;
private volatile java.lang.Object description_;
/**
*
* A short description for this version.
*
*
* string description = 6;
* @return The description.
*/
@java.lang.Override
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;
}
}
/**
*
* A short description for this version.
*
*
* string description = 6;
* @return The bytes for description.
*/
@java.lang.Override
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 NOTES_FIELD_NUMBER = 7;
private volatile java.lang.Object notes_;
/**
*
* A markdown formatted string to detailed description of the app module.
* This is within each version so that it can be change version to version.
*
*
* string notes = 7;
* @return The notes.
*/
@java.lang.Override
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;
}
}
/**
*
* A markdown formatted string to detailed description of the app module.
* This is within each version so that it can be change version to version.
*
*
* string notes = 7;
* @return The bytes for notes.
*/
@java.lang.Override
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 CREATED_AT_FIELD_NUMBER = 8;
private com.google.protobuf.Timestamp createdAt_;
/**
*
* When the app module version was created.
*
*
* .google.protobuf.Timestamp created_at = 8;
* @return Whether the createdAt field is set.
*/
@java.lang.Override
public boolean hasCreatedAt() {
return createdAt_ != null;
}
/**
*
* When the app module version was created.
*
*
* .google.protobuf.Timestamp created_at = 8;
* @return The createdAt.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getCreatedAt() {
return createdAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_;
}
/**
*
* When the app module version was created.
*
*
* .google.protobuf.Timestamp created_at = 8;
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getCreatedAtOrBuilder() {
return getCreatedAt();
}
public static final int MODIFIED_AT_FIELD_NUMBER = 9;
private com.google.protobuf.Timestamp modifiedAt_;
/**
*
* When the app module version was last modified.
*
*
* .google.protobuf.Timestamp modified_at = 9;
* @return Whether the modifiedAt field is set.
*/
@java.lang.Override
public boolean hasModifiedAt() {
return modifiedAt_ != null;
}
/**
*
* When the app module version was last modified.
*
*
* .google.protobuf.Timestamp modified_at = 9;
* @return The modifiedAt.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getModifiedAt() {
return modifiedAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : modifiedAt_;
}
/**
*
* When the app module version was last modified.
*
*
* .google.protobuf.Timestamp modified_at = 9;
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getModifiedAtOrBuilder() {
return getModifiedAt();
}
public static final int GIT_COMMIT_URL_FIELD_NUMBER = 10;
private volatile java.lang.Object gitCommitUrl_;
/**
*
* The code repo of the streamlit app.
* If you are still developing your Module you should create a ModuleVersion
* with an empty git_commit_url and then create an InstalledModuleVersion
* with a pre-deployed deploy_url (such as localhost or streamlit cloud).
* Once you are ready to create a production, create a new ModuleVersion with
* the ready git url to a specific commit that you would like to be reviewed by the
* Clarifai team for approval within our community. You cannot publish a ModuleVersion
* is reviewed and approved. Please only provide the git_commit_url when you're
* ready for a review. This url needs to include a specific commit, for example:
* https://github.com/user/repo/commit/767ff9c08ba3429c8e7b8825da148555
*
*
* string git_commit_url = 10;
* @return The gitCommitUrl.
*/
@java.lang.Override
public java.lang.String getGitCommitUrl() {
java.lang.Object ref = gitCommitUrl_;
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();
gitCommitUrl_ = s;
return s;
}
}
/**
*
* The code repo of the streamlit app.
* If you are still developing your Module you should create a ModuleVersion
* with an empty git_commit_url and then create an InstalledModuleVersion
* with a pre-deployed deploy_url (such as localhost or streamlit cloud).
* Once you are ready to create a production, create a new ModuleVersion with
* the ready git url to a specific commit that you would like to be reviewed by the
* Clarifai team for approval within our community. You cannot publish a ModuleVersion
* is reviewed and approved. Please only provide the git_commit_url when you're
* ready for a review. This url needs to include a specific commit, for example:
* https://github.com/user/repo/commit/767ff9c08ba3429c8e7b8825da148555
*
*
* string git_commit_url = 10;
* @return The bytes for gitCommitUrl.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getGitCommitUrlBytes() {
java.lang.Object ref = gitCommitUrl_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
gitCommitUrl_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int MODULE_NAV_FIELD_NUMBER = 11;
private com.clarifai.grpc.api.ModuleVersion.ModuleNav moduleNav_;
/**
* .clarifai.api.ModuleVersion.ModuleNav module_nav = 11;
* @return Whether the moduleNav field is set.
*/
@java.lang.Override
public boolean hasModuleNav() {
return moduleNav_ != null;
}
/**
* .clarifai.api.ModuleVersion.ModuleNav module_nav = 11;
* @return The moduleNav.
*/
@java.lang.Override
public com.clarifai.grpc.api.ModuleVersion.ModuleNav getModuleNav() {
return moduleNav_ == null ? com.clarifai.grpc.api.ModuleVersion.ModuleNav.getDefaultInstance() : moduleNav_;
}
/**
* .clarifai.api.ModuleVersion.ModuleNav module_nav = 11;
*/
@java.lang.Override
public com.clarifai.grpc.api.ModuleVersion.ModuleNavOrBuilder getModuleNavOrBuilder() {
return getModuleNav();
}
public static final int APPROVED_FIELD_NUMBER = 12;
private boolean approved_;
/**
*
* A boolean to mark if Clarifai has approved this app version.
* This cannot be set in the request to True.
*
*
* bool approved = 12;
* @return The approved.
*/
@java.lang.Override
public boolean getApproved() {
return approved_;
}
public static final int VISIBILITY_FIELD_NUMBER = 13;
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.
* Defaults to PRIVATE if not provided.
*
*
* .clarifai.api.Visibility visibility = 13;
* @return Whether the visibility field is set.
*/
@java.lang.Override
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.
* Defaults to PRIVATE if not provided.
*
*
* .clarifai.api.Visibility visibility = 13;
* @return The visibility.
*/
@java.lang.Override
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.
* Defaults to PRIVATE if not provided.
*
*
* .clarifai.api.Visibility visibility = 13;
*/
@java.lang.Override
public com.clarifai.grpc.api.VisibilityOrBuilder getVisibilityOrBuilder() {
return getVisibility();
}
public static final int METADATA_FIELD_NUMBER = 14;
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
* This is an optional arg.
*
*
* .google.protobuf.Struct metadata = 14;
* @return Whether the metadata field is set.
*/
@java.lang.Override
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
* This is an optional arg.
*
*
* .google.protobuf.Struct metadata = 14;
* @return The metadata.
*/
@java.lang.Override
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
* This is an optional arg.
*
*
* .google.protobuf.Struct metadata = 14;
*/
@java.lang.Override
public com.google.protobuf.StructOrBuilder getMetadataOrBuilder() {
return getMetadata();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(moduleId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, moduleId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, appId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, userId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, description_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notes_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, notes_);
}
if (createdAt_ != null) {
output.writeMessage(8, getCreatedAt());
}
if (modifiedAt_ != null) {
output.writeMessage(9, getModifiedAt());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gitCommitUrl_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 10, gitCommitUrl_);
}
if (moduleNav_ != null) {
output.writeMessage(11, getModuleNav());
}
if (approved_ != false) {
output.writeBool(12, approved_);
}
if (visibility_ != null) {
output.writeMessage(13, getVisibility());
}
if (metadata_ != null) {
output.writeMessage(14, getMetadata());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(moduleId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, moduleId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, appId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, userId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, description_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notes_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, notes_);
}
if (createdAt_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(8, getCreatedAt());
}
if (modifiedAt_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(9, getModifiedAt());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(gitCommitUrl_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, gitCommitUrl_);
}
if (moduleNav_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(11, getModuleNav());
}
if (approved_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(12, approved_);
}
if (visibility_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(13, getVisibility());
}
if (metadata_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(14, getMetadata());
}
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.ModuleVersion)) {
return super.equals(obj);
}
com.clarifai.grpc.api.ModuleVersion other = (com.clarifai.grpc.api.ModuleVersion) obj;
if (!getId()
.equals(other.getId())) return false;
if (!getModuleId()
.equals(other.getModuleId())) return false;
if (!getAppId()
.equals(other.getAppId())) return false;
if (!getUserId()
.equals(other.getUserId())) return false;
if (!getDescription()
.equals(other.getDescription())) return false;
if (!getNotes()
.equals(other.getNotes())) 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 (!getGitCommitUrl()
.equals(other.getGitCommitUrl())) return false;
if (hasModuleNav() != other.hasModuleNav()) return false;
if (hasModuleNav()) {
if (!getModuleNav()
.equals(other.getModuleNav())) return false;
}
if (getApproved()
!= other.getApproved()) return false;
if (hasVisibility() != other.hasVisibility()) return false;
if (hasVisibility()) {
if (!getVisibility()
.equals(other.getVisibility())) return false;
}
if (hasMetadata() != other.hasMetadata()) return false;
if (hasMetadata()) {
if (!getMetadata()
.equals(other.getMetadata())) 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) + MODULE_ID_FIELD_NUMBER;
hash = (53 * hash) + getModuleId().hashCode();
hash = (37 * hash) + APP_ID_FIELD_NUMBER;
hash = (53 * hash) + getAppId().hashCode();
hash = (37 * hash) + USER_ID_FIELD_NUMBER;
hash = (53 * hash) + getUserId().hashCode();
hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
hash = (37 * hash) + NOTES_FIELD_NUMBER;
hash = (53 * hash) + getNotes().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) + GIT_COMMIT_URL_FIELD_NUMBER;
hash = (53 * hash) + getGitCommitUrl().hashCode();
if (hasModuleNav()) {
hash = (37 * hash) + MODULE_NAV_FIELD_NUMBER;
hash = (53 * hash) + getModuleNav().hashCode();
}
hash = (37 * hash) + APPROVED_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getApproved());
if (hasVisibility()) {
hash = (37 * hash) + VISIBILITY_FIELD_NUMBER;
hash = (53 * hash) + getVisibility().hashCode();
}
if (hasMetadata()) {
hash = (37 * hash) + METADATA_FIELD_NUMBER;
hash = (53 * hash) + getMetadata().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.clarifai.grpc.api.ModuleVersion parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.ModuleVersion 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.ModuleVersion parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.ModuleVersion 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.ModuleVersion parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.clarifai.grpc.api.ModuleVersion parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.clarifai.grpc.api.ModuleVersion parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.ModuleVersion 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.ModuleVersion parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.ModuleVersion 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.ModuleVersion parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.clarifai.grpc.api.ModuleVersion 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.ModuleVersion 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;
}
/**
*
* A specific version of an app module that is available for assigning to apps.
*
*
* Protobuf type {@code clarifai.api.ModuleVersion}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:clarifai.api.ModuleVersion)
com.clarifai.grpc.api.ModuleVersionOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_ModuleVersion_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_ModuleVersion_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.ModuleVersion.class, com.clarifai.grpc.api.ModuleVersion.Builder.class);
}
// Construct using com.clarifai.grpc.api.ModuleVersion.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_ = "";
moduleId_ = "";
appId_ = "";
userId_ = "";
description_ = "";
notes_ = "";
if (createdAtBuilder_ == null) {
createdAt_ = null;
} else {
createdAt_ = null;
createdAtBuilder_ = null;
}
if (modifiedAtBuilder_ == null) {
modifiedAt_ = null;
} else {
modifiedAt_ = null;
modifiedAtBuilder_ = null;
}
gitCommitUrl_ = "";
if (moduleNavBuilder_ == null) {
moduleNav_ = null;
} else {
moduleNav_ = null;
moduleNavBuilder_ = null;
}
approved_ = false;
if (visibilityBuilder_ == null) {
visibility_ = null;
} else {
visibility_ = null;
visibilityBuilder_ = null;
}
if (metadataBuilder_ == null) {
metadata_ = null;
} else {
metadata_ = null;
metadataBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_ModuleVersion_descriptor;
}
@java.lang.Override
public com.clarifai.grpc.api.ModuleVersion getDefaultInstanceForType() {
return com.clarifai.grpc.api.ModuleVersion.getDefaultInstance();
}
@java.lang.Override
public com.clarifai.grpc.api.ModuleVersion build() {
com.clarifai.grpc.api.ModuleVersion result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.clarifai.grpc.api.ModuleVersion buildPartial() {
com.clarifai.grpc.api.ModuleVersion result = new com.clarifai.grpc.api.ModuleVersion(this);
result.id_ = id_;
result.moduleId_ = moduleId_;
result.appId_ = appId_;
result.userId_ = userId_;
result.description_ = description_;
result.notes_ = notes_;
if (createdAtBuilder_ == null) {
result.createdAt_ = createdAt_;
} else {
result.createdAt_ = createdAtBuilder_.build();
}
if (modifiedAtBuilder_ == null) {
result.modifiedAt_ = modifiedAt_;
} else {
result.modifiedAt_ = modifiedAtBuilder_.build();
}
result.gitCommitUrl_ = gitCommitUrl_;
if (moduleNavBuilder_ == null) {
result.moduleNav_ = moduleNav_;
} else {
result.moduleNav_ = moduleNavBuilder_.build();
}
result.approved_ = approved_;
if (visibilityBuilder_ == null) {
result.visibility_ = visibility_;
} else {
result.visibility_ = visibilityBuilder_.build();
}
if (metadataBuilder_ == null) {
result.metadata_ = metadata_;
} else {
result.metadata_ = metadataBuilder_.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.ModuleVersion) {
return mergeFrom((com.clarifai.grpc.api.ModuleVersion)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.clarifai.grpc.api.ModuleVersion other) {
if (other == com.clarifai.grpc.api.ModuleVersion.getDefaultInstance()) return this;
if (!other.getId().isEmpty()) {
id_ = other.id_;
onChanged();
}
if (!other.getModuleId().isEmpty()) {
moduleId_ = other.moduleId_;
onChanged();
}
if (!other.getAppId().isEmpty()) {
appId_ = other.appId_;
onChanged();
}
if (!other.getUserId().isEmpty()) {
userId_ = other.userId_;
onChanged();
}
if (!other.getDescription().isEmpty()) {
description_ = other.description_;
onChanged();
}
if (!other.getNotes().isEmpty()) {
notes_ = other.notes_;
onChanged();
}
if (other.hasCreatedAt()) {
mergeCreatedAt(other.getCreatedAt());
}
if (other.hasModifiedAt()) {
mergeModifiedAt(other.getModifiedAt());
}
if (!other.getGitCommitUrl().isEmpty()) {
gitCommitUrl_ = other.gitCommitUrl_;
onChanged();
}
if (other.hasModuleNav()) {
mergeModuleNav(other.getModuleNav());
}
if (other.getApproved() != false) {
setApproved(other.getApproved());
}
if (other.hasVisibility()) {
mergeVisibility(other.getVisibility());
}
if (other.hasMetadata()) {
mergeMetadata(other.getMetadata());
}
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.ModuleVersion parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.clarifai.grpc.api.ModuleVersion) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object id_ = "";
/**
*
* A name for this version like 1_0, 1_1_0, etc.
*
*
* 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;
}
}
/**
*
* A name for this version like 1_0, 1_1_0, etc.
*
*
* 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;
}
}
/**
*
* A name for this version like 1_0, 1_1_0, etc.
*
*
* 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;
}
/**
*
* A name for this version like 1_0, 1_1_0, etc.
*
*
* string id = 1;
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
onChanged();
return this;
}
/**
*
* A name for this version like 1_0, 1_1_0, etc.
*
*
* 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 moduleId_ = "";
/**
*
* The module this version belongs to.
*
*
* string module_id = 2;
* @return The moduleId.
*/
public java.lang.String getModuleId() {
java.lang.Object ref = moduleId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
moduleId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The module this version belongs to.
*
*
* string module_id = 2;
* @return The bytes for moduleId.
*/
public com.google.protobuf.ByteString
getModuleIdBytes() {
java.lang.Object ref = moduleId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
moduleId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The module this version belongs to.
*
*
* string module_id = 2;
* @param value The moduleId to set.
* @return This builder for chaining.
*/
public Builder setModuleId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
moduleId_ = value;
onChanged();
return this;
}
/**
*
* The module this version belongs to.
*
*
* string module_id = 2;
* @return This builder for chaining.
*/
public Builder clearModuleId() {
moduleId_ = getDefaultInstance().getModuleId();
onChanged();
return this;
}
/**
*
* The module this version belongs to.
*
*
* string module_id = 2;
* @param value The bytes for moduleId to set.
* @return This builder for chaining.
*/
public Builder setModuleIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
moduleId_ = value;
onChanged();
return this;
}
private java.lang.Object appId_ = "";
/**
*
* The app_id this module version belongs to.
*
*
* string app_id = 3;
* @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_id this module version belongs to.
*
*
* string app_id = 3;
* @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_id this module version belongs to.
*
*
* string app_id = 3;
* @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_id this module version belongs to.
*
*
* string app_id = 3;
* @return This builder for chaining.
*/
public Builder clearAppId() {
appId_ = getDefaultInstance().getAppId();
onChanged();
return this;
}
/**
*
* The app_id this module version belongs to.
*
*
* string app_id = 3;
* @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 java.lang.Object userId_ = "";
/**
*
* The user_id this module version belongs to.
*
*
* string user_id = 4;
* @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 this module version belongs to.
*
*
* string user_id = 4;
* @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 this module version belongs to.
*
*
* string user_id = 4;
* @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 this module version belongs to.
*
*
* string user_id = 4;
* @return This builder for chaining.
*/
public Builder clearUserId() {
userId_ = getDefaultInstance().getUserId();
onChanged();
return this;
}
/**
*
* The user_id this module version belongs to.
*
*
* string user_id = 4;
* @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 java.lang.Object description_ = "";
/**
*
* A short description for this version.
*
*
* string description = 6;
* @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;
}
}
/**
*
* A short description for this version.
*
*
* string description = 6;
* @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;
}
}
/**
*
* A short description for this version.
*
*
* string description = 6;
* @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;
}
/**
*
* A short description for this version.
*
*
* string description = 6;
* @return This builder for chaining.
*/
public Builder clearDescription() {
description_ = getDefaultInstance().getDescription();
onChanged();
return this;
}
/**
*
* A short description for this version.
*
*
* string description = 6;
* @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 java.lang.Object notes_ = "";
/**
*
* A markdown formatted string to detailed description of the app module.
* This is within each version so that it can be change version to version.
*
*
* string notes = 7;
* @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;
}
}
/**
*
* A markdown formatted string to detailed description of the app module.
* This is within each version so that it can be change version to version.
*
*
* string notes = 7;
* @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;
}
}
/**
*
* A markdown formatted string to detailed description of the app module.
* This is within each version so that it can be change version to version.
*
*
* string notes = 7;
* @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;
}
/**
*
* A markdown formatted string to detailed description of the app module.
* This is within each version so that it can be change version to version.
*
*
* string notes = 7;
* @return This builder for chaining.
*/
public Builder clearNotes() {
notes_ = getDefaultInstance().getNotes();
onChanged();
return this;
}
/**
*
* A markdown formatted string to detailed description of the app module.
* This is within each version so that it can be change version to version.
*
*
* string notes = 7;
* @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.Timestamp createdAt_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createdAtBuilder_;
/**
*
* When the app module version was created.
*
*
* .google.protobuf.Timestamp created_at = 8;
* @return Whether the createdAt field is set.
*/
public boolean hasCreatedAt() {
return createdAtBuilder_ != null || createdAt_ != null;
}
/**
*
* When the app module version was created.
*
*
* .google.protobuf.Timestamp created_at = 8;
* @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 app module version was created.
*
*
* .google.protobuf.Timestamp created_at = 8;
*/
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 app module version was created.
*
*
* .google.protobuf.Timestamp created_at = 8;
*/
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 app module version was created.
*
*
* .google.protobuf.Timestamp created_at = 8;
*/
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 app module version was created.
*
*
* .google.protobuf.Timestamp created_at = 8;
*/
public Builder clearCreatedAt() {
if (createdAtBuilder_ == null) {
createdAt_ = null;
onChanged();
} else {
createdAt_ = null;
createdAtBuilder_ = null;
}
return this;
}
/**
*
* When the app module version was created.
*
*
* .google.protobuf.Timestamp created_at = 8;
*/
public com.google.protobuf.Timestamp.Builder getCreatedAtBuilder() {
onChanged();
return getCreatedAtFieldBuilder().getBuilder();
}
/**
*
* When the app module version was created.
*
*
* .google.protobuf.Timestamp created_at = 8;
*/
public com.google.protobuf.TimestampOrBuilder getCreatedAtOrBuilder() {
if (createdAtBuilder_ != null) {
return createdAtBuilder_.getMessageOrBuilder();
} else {
return createdAt_ == null ?
com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_;
}
}
/**
*
* When the app module version was created.
*
*
* .google.protobuf.Timestamp created_at = 8;
*/
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 the app module version was last modified.
*
*
* .google.protobuf.Timestamp modified_at = 9;
* @return Whether the modifiedAt field is set.
*/
public boolean hasModifiedAt() {
return modifiedAtBuilder_ != null || modifiedAt_ != null;
}
/**
*
* When the app module version was last modified.
*
*
* .google.protobuf.Timestamp modified_at = 9;
* @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 the app module version was last modified.
*
*
* .google.protobuf.Timestamp modified_at = 9;
*/
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 the app module version was last modified.
*
*
* .google.protobuf.Timestamp modified_at = 9;
*/
public Builder setModifiedAt(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (modifiedAtBuilder_ == null) {
modifiedAt_ = builderForValue.build();
onChanged();
} else {
modifiedAtBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* When the app module version was last modified.
*
*
* .google.protobuf.Timestamp modified_at = 9;
*/
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 the app module version was last modified.
*
*
* .google.protobuf.Timestamp modified_at = 9;
*/
public Builder clearModifiedAt() {
if (modifiedAtBuilder_ == null) {
modifiedAt_ = null;
onChanged();
} else {
modifiedAt_ = null;
modifiedAtBuilder_ = null;
}
return this;
}
/**
*
* When the app module version was last modified.
*
*
* .google.protobuf.Timestamp modified_at = 9;
*/
public com.google.protobuf.Timestamp.Builder getModifiedAtBuilder() {
onChanged();
return getModifiedAtFieldBuilder().getBuilder();
}
/**
*
* When the app module version was last modified.
*
*
* .google.protobuf.Timestamp modified_at = 9;
*/
public com.google.protobuf.TimestampOrBuilder getModifiedAtOrBuilder() {
if (modifiedAtBuilder_ != null) {
return modifiedAtBuilder_.getMessageOrBuilder();
} else {
return modifiedAt_ == null ?
com.google.protobuf.Timestamp.getDefaultInstance() : modifiedAt_;
}
}
/**
*
* When the app module version was last modified.
*
*
* .google.protobuf.Timestamp modified_at = 9;
*/
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 gitCommitUrl_ = "";
/**
*
* The code repo of the streamlit app.
* If you are still developing your Module you should create a ModuleVersion
* with an empty git_commit_url and then create an InstalledModuleVersion
* with a pre-deployed deploy_url (such as localhost or streamlit cloud).
* Once you are ready to create a production, create a new ModuleVersion with
* the ready git url to a specific commit that you would like to be reviewed by the
* Clarifai team for approval within our community. You cannot publish a ModuleVersion
* is reviewed and approved. Please only provide the git_commit_url when you're
* ready for a review. This url needs to include a specific commit, for example:
* https://github.com/user/repo/commit/767ff9c08ba3429c8e7b8825da148555
*
*
* string git_commit_url = 10;
* @return The gitCommitUrl.
*/
public java.lang.String getGitCommitUrl() {
java.lang.Object ref = gitCommitUrl_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
gitCommitUrl_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The code repo of the streamlit app.
* If you are still developing your Module you should create a ModuleVersion
* with an empty git_commit_url and then create an InstalledModuleVersion
* with a pre-deployed deploy_url (such as localhost or streamlit cloud).
* Once you are ready to create a production, create a new ModuleVersion with
* the ready git url to a specific commit that you would like to be reviewed by the
* Clarifai team for approval within our community. You cannot publish a ModuleVersion
* is reviewed and approved. Please only provide the git_commit_url when you're
* ready for a review. This url needs to include a specific commit, for example:
* https://github.com/user/repo/commit/767ff9c08ba3429c8e7b8825da148555
*
*
* string git_commit_url = 10;
* @return The bytes for gitCommitUrl.
*/
public com.google.protobuf.ByteString
getGitCommitUrlBytes() {
java.lang.Object ref = gitCommitUrl_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
gitCommitUrl_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The code repo of the streamlit app.
* If you are still developing your Module you should create a ModuleVersion
* with an empty git_commit_url and then create an InstalledModuleVersion
* with a pre-deployed deploy_url (such as localhost or streamlit cloud).
* Once you are ready to create a production, create a new ModuleVersion with
* the ready git url to a specific commit that you would like to be reviewed by the
* Clarifai team for approval within our community. You cannot publish a ModuleVersion
* is reviewed and approved. Please only provide the git_commit_url when you're
* ready for a review. This url needs to include a specific commit, for example:
* https://github.com/user/repo/commit/767ff9c08ba3429c8e7b8825da148555
*
*
* string git_commit_url = 10;
* @param value The gitCommitUrl to set.
* @return This builder for chaining.
*/
public Builder setGitCommitUrl(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
gitCommitUrl_ = value;
onChanged();
return this;
}
/**
*
* The code repo of the streamlit app.
* If you are still developing your Module you should create a ModuleVersion
* with an empty git_commit_url and then create an InstalledModuleVersion
* with a pre-deployed deploy_url (such as localhost or streamlit cloud).
* Once you are ready to create a production, create a new ModuleVersion with
* the ready git url to a specific commit that you would like to be reviewed by the
* Clarifai team for approval within our community. You cannot publish a ModuleVersion
* is reviewed and approved. Please only provide the git_commit_url when you're
* ready for a review. This url needs to include a specific commit, for example:
* https://github.com/user/repo/commit/767ff9c08ba3429c8e7b8825da148555
*
*
* string git_commit_url = 10;
* @return This builder for chaining.
*/
public Builder clearGitCommitUrl() {
gitCommitUrl_ = getDefaultInstance().getGitCommitUrl();
onChanged();
return this;
}
/**
*
* The code repo of the streamlit app.
* If you are still developing your Module you should create a ModuleVersion
* with an empty git_commit_url and then create an InstalledModuleVersion
* with a pre-deployed deploy_url (such as localhost or streamlit cloud).
* Once you are ready to create a production, create a new ModuleVersion with
* the ready git url to a specific commit that you would like to be reviewed by the
* Clarifai team for approval within our community. You cannot publish a ModuleVersion
* is reviewed and approved. Please only provide the git_commit_url when you're
* ready for a review. This url needs to include a specific commit, for example:
* https://github.com/user/repo/commit/767ff9c08ba3429c8e7b8825da148555
*
*
* string git_commit_url = 10;
* @param value The bytes for gitCommitUrl to set.
* @return This builder for chaining.
*/
public Builder setGitCommitUrlBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
gitCommitUrl_ = value;
onChanged();
return this;
}
private com.clarifai.grpc.api.ModuleVersion.ModuleNav moduleNav_;
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.ModuleVersion.ModuleNav, com.clarifai.grpc.api.ModuleVersion.ModuleNav.Builder, com.clarifai.grpc.api.ModuleVersion.ModuleNavOrBuilder> moduleNavBuilder_;
/**
* .clarifai.api.ModuleVersion.ModuleNav module_nav = 11;
* @return Whether the moduleNav field is set.
*/
public boolean hasModuleNav() {
return moduleNavBuilder_ != null || moduleNav_ != null;
}
/**
* .clarifai.api.ModuleVersion.ModuleNav module_nav = 11;
* @return The moduleNav.
*/
public com.clarifai.grpc.api.ModuleVersion.ModuleNav getModuleNav() {
if (moduleNavBuilder_ == null) {
return moduleNav_ == null ? com.clarifai.grpc.api.ModuleVersion.ModuleNav.getDefaultInstance() : moduleNav_;
} else {
return moduleNavBuilder_.getMessage();
}
}
/**
* .clarifai.api.ModuleVersion.ModuleNav module_nav = 11;
*/
public Builder setModuleNav(com.clarifai.grpc.api.ModuleVersion.ModuleNav value) {
if (moduleNavBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
moduleNav_ = value;
onChanged();
} else {
moduleNavBuilder_.setMessage(value);
}
return this;
}
/**
* .clarifai.api.ModuleVersion.ModuleNav module_nav = 11;
*/
public Builder setModuleNav(
com.clarifai.grpc.api.ModuleVersion.ModuleNav.Builder builderForValue) {
if (moduleNavBuilder_ == null) {
moduleNav_ = builderForValue.build();
onChanged();
} else {
moduleNavBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .clarifai.api.ModuleVersion.ModuleNav module_nav = 11;
*/
public Builder mergeModuleNav(com.clarifai.grpc.api.ModuleVersion.ModuleNav value) {
if (moduleNavBuilder_ == null) {
if (moduleNav_ != null) {
moduleNav_ =
com.clarifai.grpc.api.ModuleVersion.ModuleNav.newBuilder(moduleNav_).mergeFrom(value).buildPartial();
} else {
moduleNav_ = value;
}
onChanged();
} else {
moduleNavBuilder_.mergeFrom(value);
}
return this;
}
/**
* .clarifai.api.ModuleVersion.ModuleNav module_nav = 11;
*/
public Builder clearModuleNav() {
if (moduleNavBuilder_ == null) {
moduleNav_ = null;
onChanged();
} else {
moduleNav_ = null;
moduleNavBuilder_ = null;
}
return this;
}
/**
* .clarifai.api.ModuleVersion.ModuleNav module_nav = 11;
*/
public com.clarifai.grpc.api.ModuleVersion.ModuleNav.Builder getModuleNavBuilder() {
onChanged();
return getModuleNavFieldBuilder().getBuilder();
}
/**
* .clarifai.api.ModuleVersion.ModuleNav module_nav = 11;
*/
public com.clarifai.grpc.api.ModuleVersion.ModuleNavOrBuilder getModuleNavOrBuilder() {
if (moduleNavBuilder_ != null) {
return moduleNavBuilder_.getMessageOrBuilder();
} else {
return moduleNav_ == null ?
com.clarifai.grpc.api.ModuleVersion.ModuleNav.getDefaultInstance() : moduleNav_;
}
}
/**
* .clarifai.api.ModuleVersion.ModuleNav module_nav = 11;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.ModuleVersion.ModuleNav, com.clarifai.grpc.api.ModuleVersion.ModuleNav.Builder, com.clarifai.grpc.api.ModuleVersion.ModuleNavOrBuilder>
getModuleNavFieldBuilder() {
if (moduleNavBuilder_ == null) {
moduleNavBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.clarifai.grpc.api.ModuleVersion.ModuleNav, com.clarifai.grpc.api.ModuleVersion.ModuleNav.Builder, com.clarifai.grpc.api.ModuleVersion.ModuleNavOrBuilder>(
getModuleNav(),
getParentForChildren(),
isClean());
moduleNav_ = null;
}
return moduleNavBuilder_;
}
private boolean approved_ ;
/**
*
* A boolean to mark if Clarifai has approved this app version.
* This cannot be set in the request to True.
*
*
* bool approved = 12;
* @return The approved.
*/
@java.lang.Override
public boolean getApproved() {
return approved_;
}
/**
*
* A boolean to mark if Clarifai has approved this app version.
* This cannot be set in the request to True.
*
*
* bool approved = 12;
* @param value The approved to set.
* @return This builder for chaining.
*/
public Builder setApproved(boolean value) {
approved_ = value;
onChanged();
return this;
}
/**
*
* A boolean to mark if Clarifai has approved this app version.
* This cannot be set in the request to True.
*
*
* bool approved = 12;
* @return This builder for chaining.
*/
public Builder clearApproved() {
approved_ = false;
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.
* Defaults to PRIVATE if not provided.
*
*
* .clarifai.api.Visibility visibility = 13;
* @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.
* Defaults to PRIVATE if not provided.
*
*
* .clarifai.api.Visibility visibility = 13;
* @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.
* Defaults to PRIVATE if not provided.
*
*
* .clarifai.api.Visibility visibility = 13;
*/
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.
* Defaults to PRIVATE if not provided.
*
*
* .clarifai.api.Visibility visibility = 13;
*/
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.
* Defaults to PRIVATE if not provided.
*
*
* .clarifai.api.Visibility visibility = 13;
*/
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.
* Defaults to PRIVATE if not provided.
*
*
* .clarifai.api.Visibility visibility = 13;
*/
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.
* Defaults to PRIVATE if not provided.
*
*
* .clarifai.api.Visibility visibility = 13;
*/
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.
* Defaults to PRIVATE if not provided.
*
*
* .clarifai.api.Visibility visibility = 13;
*/
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.
* Defaults to PRIVATE if not provided.
*
*
* .clarifai.api.Visibility visibility = 13;
*/
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 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
* This is an optional arg.
*
*
* .google.protobuf.Struct metadata = 14;
* @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
* This is an optional arg.
*
*
* .google.protobuf.Struct metadata = 14;
* @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
* This is an optional arg.
*
*
* .google.protobuf.Struct metadata = 14;
*/
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
* This is an optional arg.
*
*
* .google.protobuf.Struct metadata = 14;
*/
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
* This is an optional arg.
*
*
* .google.protobuf.Struct metadata = 14;
*/
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
* This is an optional arg.
*
*
* .google.protobuf.Struct metadata = 14;
*/
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
* This is an optional arg.
*
*
* .google.protobuf.Struct metadata = 14;
*/
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
* This is an optional arg.
*
*
* .google.protobuf.Struct metadata = 14;
*/
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
* This is an optional arg.
*
*
* .google.protobuf.Struct metadata = 14;
*/
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_;
}
@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.ModuleVersion)
}
// @@protoc_insertion_point(class_scope:clarifai.api.ModuleVersion)
private static final com.clarifai.grpc.api.ModuleVersion DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.clarifai.grpc.api.ModuleVersion();
}
public static com.clarifai.grpc.api.ModuleVersion getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ModuleVersion parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ModuleVersion(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.ModuleVersion getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}