org.tensorflow.metadata.v0.Annotation Maven / Gradle / Ivy
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: tensorflow_metadata/proto/v0/schema.proto
// Protobuf Java Version: 3.25.4
package org.tensorflow.metadata.v0;
/**
*
* Additional information about the schema or about a feature.
*
*
* Protobuf type {@code tensorflow.metadata.v0.Annotation}
*/
public final class Annotation extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tensorflow.metadata.v0.Annotation)
AnnotationOrBuilder {
private static final long serialVersionUID = 0L;
// Use Annotation.newBuilder() to construct.
private Annotation(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Annotation() {
tag_ =
com.google.protobuf.LazyStringArrayList.emptyList();
comment_ =
com.google.protobuf.LazyStringArrayList.emptyList();
extraMetadata_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Annotation();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.metadata.v0.SchemaOuterClass.internal_static_tensorflow_metadata_v0_Annotation_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.metadata.v0.SchemaOuterClass.internal_static_tensorflow_metadata_v0_Annotation_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.metadata.v0.Annotation.class, org.tensorflow.metadata.v0.Annotation.Builder.class);
}
public static final int TAG_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList tag_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
* Tags can be used to mark features. For example, tag on user_age feature can
* be `user_feature`, tag on user_country feature can be `location_feature`,
* `user_feature`.
*
*
* repeated string tag = 1;
* @return A list containing the tag.
*/
public com.google.protobuf.ProtocolStringList
getTagList() {
return tag_;
}
/**
*
* Tags can be used to mark features. For example, tag on user_age feature can
* be `user_feature`, tag on user_country feature can be `location_feature`,
* `user_feature`.
*
*
* repeated string tag = 1;
* @return The count of tag.
*/
public int getTagCount() {
return tag_.size();
}
/**
*
* Tags can be used to mark features. For example, tag on user_age feature can
* be `user_feature`, tag on user_country feature can be `location_feature`,
* `user_feature`.
*
*
* repeated string tag = 1;
* @param index The index of the element to return.
* @return The tag at the given index.
*/
public java.lang.String getTag(int index) {
return tag_.get(index);
}
/**
*
* Tags can be used to mark features. For example, tag on user_age feature can
* be `user_feature`, tag on user_country feature can be `location_feature`,
* `user_feature`.
*
*
* repeated string tag = 1;
* @param index The index of the value to return.
* @return The bytes of the tag at the given index.
*/
public com.google.protobuf.ByteString
getTagBytes(int index) {
return tag_.getByteString(index);
}
public static final int COMMENT_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList comment_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
* Free-text comments. This can be used as a description of the feature,
* developer notes etc.
*
*
* repeated string comment = 2;
* @return A list containing the comment.
*/
public com.google.protobuf.ProtocolStringList
getCommentList() {
return comment_;
}
/**
*
* Free-text comments. This can be used as a description of the feature,
* developer notes etc.
*
*
* repeated string comment = 2;
* @return The count of comment.
*/
public int getCommentCount() {
return comment_.size();
}
/**
*
* Free-text comments. This can be used as a description of the feature,
* developer notes etc.
*
*
* repeated string comment = 2;
* @param index The index of the element to return.
* @return The comment at the given index.
*/
public java.lang.String getComment(int index) {
return comment_.get(index);
}
/**
*
* Free-text comments. This can be used as a description of the feature,
* developer notes etc.
*
*
* repeated string comment = 2;
* @param index The index of the value to return.
* @return The bytes of the comment at the given index.
*/
public com.google.protobuf.ByteString
getCommentBytes(int index) {
return comment_.getByteString(index);
}
public static final int EXTRA_METADATA_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private java.util.List extraMetadata_;
/**
*
* Application-specific metadata may be attached here.
*
*
* repeated .google.protobuf.Any extra_metadata = 3;
*/
@java.lang.Override
public java.util.List getExtraMetadataList() {
return extraMetadata_;
}
/**
*
* Application-specific metadata may be attached here.
*
*
* repeated .google.protobuf.Any extra_metadata = 3;
*/
@java.lang.Override
public java.util.List extends com.google.protobuf.AnyOrBuilder>
getExtraMetadataOrBuilderList() {
return extraMetadata_;
}
/**
*
* Application-specific metadata may be attached here.
*
*
* repeated .google.protobuf.Any extra_metadata = 3;
*/
@java.lang.Override
public int getExtraMetadataCount() {
return extraMetadata_.size();
}
/**
*
* Application-specific metadata may be attached here.
*
*
* repeated .google.protobuf.Any extra_metadata = 3;
*/
@java.lang.Override
public com.google.protobuf.Any getExtraMetadata(int index) {
return extraMetadata_.get(index);
}
/**
*
* Application-specific metadata may be attached here.
*
*
* repeated .google.protobuf.Any extra_metadata = 3;
*/
@java.lang.Override
public com.google.protobuf.AnyOrBuilder getExtraMetadataOrBuilder(
int index) {
return extraMetadata_.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 {
for (int i = 0; i < tag_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, tag_.getRaw(i));
}
for (int i = 0; i < comment_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, comment_.getRaw(i));
}
for (int i = 0; i < extraMetadata_.size(); i++) {
output.writeMessage(3, extraMetadata_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
{
int dataSize = 0;
for (int i = 0; i < tag_.size(); i++) {
dataSize += computeStringSizeNoTag(tag_.getRaw(i));
}
size += dataSize;
size += 1 * getTagList().size();
}
{
int dataSize = 0;
for (int i = 0; i < comment_.size(); i++) {
dataSize += computeStringSizeNoTag(comment_.getRaw(i));
}
size += dataSize;
size += 1 * getCommentList().size();
}
for (int i = 0; i < extraMetadata_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, extraMetadata_.get(i));
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.tensorflow.metadata.v0.Annotation)) {
return super.equals(obj);
}
org.tensorflow.metadata.v0.Annotation other = (org.tensorflow.metadata.v0.Annotation) obj;
if (!getTagList()
.equals(other.getTagList())) return false;
if (!getCommentList()
.equals(other.getCommentList())) return false;
if (!getExtraMetadataList()
.equals(other.getExtraMetadataList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getTagCount() > 0) {
hash = (37 * hash) + TAG_FIELD_NUMBER;
hash = (53 * hash) + getTagList().hashCode();
}
if (getCommentCount() > 0) {
hash = (37 * hash) + COMMENT_FIELD_NUMBER;
hash = (53 * hash) + getCommentList().hashCode();
}
if (getExtraMetadataCount() > 0) {
hash = (37 * hash) + EXTRA_METADATA_FIELD_NUMBER;
hash = (53 * hash) + getExtraMetadataList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.tensorflow.metadata.v0.Annotation parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.metadata.v0.Annotation parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.metadata.v0.Annotation parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.metadata.v0.Annotation parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.metadata.v0.Annotation parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.tensorflow.metadata.v0.Annotation parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.tensorflow.metadata.v0.Annotation parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.metadata.v0.Annotation 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 org.tensorflow.metadata.v0.Annotation parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.tensorflow.metadata.v0.Annotation 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 org.tensorflow.metadata.v0.Annotation parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.tensorflow.metadata.v0.Annotation 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(org.tensorflow.metadata.v0.Annotation 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;
}
/**
*
* Additional information about the schema or about a feature.
*
*
* Protobuf type {@code tensorflow.metadata.v0.Annotation}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tensorflow.metadata.v0.Annotation)
org.tensorflow.metadata.v0.AnnotationOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.tensorflow.metadata.v0.SchemaOuterClass.internal_static_tensorflow_metadata_v0_Annotation_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.tensorflow.metadata.v0.SchemaOuterClass.internal_static_tensorflow_metadata_v0_Annotation_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.tensorflow.metadata.v0.Annotation.class, org.tensorflow.metadata.v0.Annotation.Builder.class);
}
// Construct using org.tensorflow.metadata.v0.Annotation.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
tag_ =
com.google.protobuf.LazyStringArrayList.emptyList();
comment_ =
com.google.protobuf.LazyStringArrayList.emptyList();
if (extraMetadataBuilder_ == null) {
extraMetadata_ = java.util.Collections.emptyList();
} else {
extraMetadata_ = null;
extraMetadataBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.tensorflow.metadata.v0.SchemaOuterClass.internal_static_tensorflow_metadata_v0_Annotation_descriptor;
}
@java.lang.Override
public org.tensorflow.metadata.v0.Annotation getDefaultInstanceForType() {
return org.tensorflow.metadata.v0.Annotation.getDefaultInstance();
}
@java.lang.Override
public org.tensorflow.metadata.v0.Annotation build() {
org.tensorflow.metadata.v0.Annotation result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.tensorflow.metadata.v0.Annotation buildPartial() {
org.tensorflow.metadata.v0.Annotation result = new org.tensorflow.metadata.v0.Annotation(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(org.tensorflow.metadata.v0.Annotation result) {
if (extraMetadataBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)) {
extraMetadata_ = java.util.Collections.unmodifiableList(extraMetadata_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.extraMetadata_ = extraMetadata_;
} else {
result.extraMetadata_ = extraMetadataBuilder_.build();
}
}
private void buildPartial0(org.tensorflow.metadata.v0.Annotation result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
tag_.makeImmutable();
result.tag_ = tag_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
comment_.makeImmutable();
result.comment_ = comment_;
}
}
@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 org.tensorflow.metadata.v0.Annotation) {
return mergeFrom((org.tensorflow.metadata.v0.Annotation)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.tensorflow.metadata.v0.Annotation other) {
if (other == org.tensorflow.metadata.v0.Annotation.getDefaultInstance()) return this;
if (!other.tag_.isEmpty()) {
if (tag_.isEmpty()) {
tag_ = other.tag_;
bitField0_ |= 0x00000001;
} else {
ensureTagIsMutable();
tag_.addAll(other.tag_);
}
onChanged();
}
if (!other.comment_.isEmpty()) {
if (comment_.isEmpty()) {
comment_ = other.comment_;
bitField0_ |= 0x00000002;
} else {
ensureCommentIsMutable();
comment_.addAll(other.comment_);
}
onChanged();
}
if (extraMetadataBuilder_ == null) {
if (!other.extraMetadata_.isEmpty()) {
if (extraMetadata_.isEmpty()) {
extraMetadata_ = other.extraMetadata_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureExtraMetadataIsMutable();
extraMetadata_.addAll(other.extraMetadata_);
}
onChanged();
}
} else {
if (!other.extraMetadata_.isEmpty()) {
if (extraMetadataBuilder_.isEmpty()) {
extraMetadataBuilder_.dispose();
extraMetadataBuilder_ = null;
extraMetadata_ = other.extraMetadata_;
bitField0_ = (bitField0_ & ~0x00000004);
extraMetadataBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getExtraMetadataFieldBuilder() : null;
} else {
extraMetadataBuilder_.addAllMessages(other.extraMetadata_);
}
}
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
com.google.protobuf.ByteString bs = input.readBytes();
ensureTagIsMutable();
tag_.add(bs);
break;
} // case 10
case 18: {
com.google.protobuf.ByteString bs = input.readBytes();
ensureCommentIsMutable();
comment_.add(bs);
break;
} // case 18
case 26: {
com.google.protobuf.Any m =
input.readMessage(
com.google.protobuf.Any.parser(),
extensionRegistry);
if (extraMetadataBuilder_ == null) {
ensureExtraMetadataIsMutable();
extraMetadata_.add(m);
} else {
extraMetadataBuilder_.addMessage(m);
}
break;
} // case 26
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private com.google.protobuf.LazyStringArrayList tag_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureTagIsMutable() {
if (!tag_.isModifiable()) {
tag_ = new com.google.protobuf.LazyStringArrayList(tag_);
}
bitField0_ |= 0x00000001;
}
/**
*
* Tags can be used to mark features. For example, tag on user_age feature can
* be `user_feature`, tag on user_country feature can be `location_feature`,
* `user_feature`.
*
*
* repeated string tag = 1;
* @return A list containing the tag.
*/
public com.google.protobuf.ProtocolStringList
getTagList() {
tag_.makeImmutable();
return tag_;
}
/**
*
* Tags can be used to mark features. For example, tag on user_age feature can
* be `user_feature`, tag on user_country feature can be `location_feature`,
* `user_feature`.
*
*
* repeated string tag = 1;
* @return The count of tag.
*/
public int getTagCount() {
return tag_.size();
}
/**
*
* Tags can be used to mark features. For example, tag on user_age feature can
* be `user_feature`, tag on user_country feature can be `location_feature`,
* `user_feature`.
*
*
* repeated string tag = 1;
* @param index The index of the element to return.
* @return The tag at the given index.
*/
public java.lang.String getTag(int index) {
return tag_.get(index);
}
/**
*
* Tags can be used to mark features. For example, tag on user_age feature can
* be `user_feature`, tag on user_country feature can be `location_feature`,
* `user_feature`.
*
*
* repeated string tag = 1;
* @param index The index of the value to return.
* @return The bytes of the tag at the given index.
*/
public com.google.protobuf.ByteString
getTagBytes(int index) {
return tag_.getByteString(index);
}
/**
*
* Tags can be used to mark features. For example, tag on user_age feature can
* be `user_feature`, tag on user_country feature can be `location_feature`,
* `user_feature`.
*
*
* repeated string tag = 1;
* @param index The index to set the value at.
* @param value The tag to set.
* @return This builder for chaining.
*/
public Builder setTag(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureTagIsMutable();
tag_.set(index, value);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Tags can be used to mark features. For example, tag on user_age feature can
* be `user_feature`, tag on user_country feature can be `location_feature`,
* `user_feature`.
*
*
* repeated string tag = 1;
* @param value The tag to add.
* @return This builder for chaining.
*/
public Builder addTag(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureTagIsMutable();
tag_.add(value);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Tags can be used to mark features. For example, tag on user_age feature can
* be `user_feature`, tag on user_country feature can be `location_feature`,
* `user_feature`.
*
*
* repeated string tag = 1;
* @param values The tag to add.
* @return This builder for chaining.
*/
public Builder addAllTag(
java.lang.Iterable values) {
ensureTagIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, tag_);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Tags can be used to mark features. For example, tag on user_age feature can
* be `user_feature`, tag on user_country feature can be `location_feature`,
* `user_feature`.
*
*
* repeated string tag = 1;
* @return This builder for chaining.
*/
public Builder clearTag() {
tag_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);;
onChanged();
return this;
}
/**
*
* Tags can be used to mark features. For example, tag on user_age feature can
* be `user_feature`, tag on user_country feature can be `location_feature`,
* `user_feature`.
*
*
* repeated string tag = 1;
* @param value The bytes of the tag to add.
* @return This builder for chaining.
*/
public Builder addTagBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
ensureTagIsMutable();
tag_.add(value);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList comment_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureCommentIsMutable() {
if (!comment_.isModifiable()) {
comment_ = new com.google.protobuf.LazyStringArrayList(comment_);
}
bitField0_ |= 0x00000002;
}
/**
*
* Free-text comments. This can be used as a description of the feature,
* developer notes etc.
*
*
* repeated string comment = 2;
* @return A list containing the comment.
*/
public com.google.protobuf.ProtocolStringList
getCommentList() {
comment_.makeImmutable();
return comment_;
}
/**
*
* Free-text comments. This can be used as a description of the feature,
* developer notes etc.
*
*
* repeated string comment = 2;
* @return The count of comment.
*/
public int getCommentCount() {
return comment_.size();
}
/**
*
* Free-text comments. This can be used as a description of the feature,
* developer notes etc.
*
*
* repeated string comment = 2;
* @param index The index of the element to return.
* @return The comment at the given index.
*/
public java.lang.String getComment(int index) {
return comment_.get(index);
}
/**
*
* Free-text comments. This can be used as a description of the feature,
* developer notes etc.
*
*
* repeated string comment = 2;
* @param index The index of the value to return.
* @return The bytes of the comment at the given index.
*/
public com.google.protobuf.ByteString
getCommentBytes(int index) {
return comment_.getByteString(index);
}
/**
*
* Free-text comments. This can be used as a description of the feature,
* developer notes etc.
*
*
* repeated string comment = 2;
* @param index The index to set the value at.
* @param value The comment to set.
* @return This builder for chaining.
*/
public Builder setComment(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureCommentIsMutable();
comment_.set(index, value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Free-text comments. This can be used as a description of the feature,
* developer notes etc.
*
*
* repeated string comment = 2;
* @param value The comment to add.
* @return This builder for chaining.
*/
public Builder addComment(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureCommentIsMutable();
comment_.add(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Free-text comments. This can be used as a description of the feature,
* developer notes etc.
*
*
* repeated string comment = 2;
* @param values The comment to add.
* @return This builder for chaining.
*/
public Builder addAllComment(
java.lang.Iterable values) {
ensureCommentIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, comment_);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Free-text comments. This can be used as a description of the feature,
* developer notes etc.
*
*
* repeated string comment = 2;
* @return This builder for chaining.
*/
public Builder clearComment() {
comment_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);;
onChanged();
return this;
}
/**
*
* Free-text comments. This can be used as a description of the feature,
* developer notes etc.
*
*
* repeated string comment = 2;
* @param value The bytes of the comment to add.
* @return This builder for chaining.
*/
public Builder addCommentBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
ensureCommentIsMutable();
comment_.add(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.util.List extraMetadata_ =
java.util.Collections.emptyList();
private void ensureExtraMetadataIsMutable() {
if (!((bitField0_ & 0x00000004) != 0)) {
extraMetadata_ = new java.util.ArrayList(extraMetadata_);
bitField0_ |= 0x00000004;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> extraMetadataBuilder_;
/**
*
* Application-specific metadata may be attached here.
*
*
* repeated .google.protobuf.Any extra_metadata = 3;
*/
public java.util.List getExtraMetadataList() {
if (extraMetadataBuilder_ == null) {
return java.util.Collections.unmodifiableList(extraMetadata_);
} else {
return extraMetadataBuilder_.getMessageList();
}
}
/**
*
* Application-specific metadata may be attached here.
*
*
* repeated .google.protobuf.Any extra_metadata = 3;
*/
public int getExtraMetadataCount() {
if (extraMetadataBuilder_ == null) {
return extraMetadata_.size();
} else {
return extraMetadataBuilder_.getCount();
}
}
/**
*
* Application-specific metadata may be attached here.
*
*
* repeated .google.protobuf.Any extra_metadata = 3;
*/
public com.google.protobuf.Any getExtraMetadata(int index) {
if (extraMetadataBuilder_ == null) {
return extraMetadata_.get(index);
} else {
return extraMetadataBuilder_.getMessage(index);
}
}
/**
*
* Application-specific metadata may be attached here.
*
*
* repeated .google.protobuf.Any extra_metadata = 3;
*/
public Builder setExtraMetadata(
int index, com.google.protobuf.Any value) {
if (extraMetadataBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureExtraMetadataIsMutable();
extraMetadata_.set(index, value);
onChanged();
} else {
extraMetadataBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Application-specific metadata may be attached here.
*
*
* repeated .google.protobuf.Any extra_metadata = 3;
*/
public Builder setExtraMetadata(
int index, com.google.protobuf.Any.Builder builderForValue) {
if (extraMetadataBuilder_ == null) {
ensureExtraMetadataIsMutable();
extraMetadata_.set(index, builderForValue.build());
onChanged();
} else {
extraMetadataBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Application-specific metadata may be attached here.
*
*
* repeated .google.protobuf.Any extra_metadata = 3;
*/
public Builder addExtraMetadata(com.google.protobuf.Any value) {
if (extraMetadataBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureExtraMetadataIsMutable();
extraMetadata_.add(value);
onChanged();
} else {
extraMetadataBuilder_.addMessage(value);
}
return this;
}
/**
*
* Application-specific metadata may be attached here.
*
*
* repeated .google.protobuf.Any extra_metadata = 3;
*/
public Builder addExtraMetadata(
int index, com.google.protobuf.Any value) {
if (extraMetadataBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureExtraMetadataIsMutable();
extraMetadata_.add(index, value);
onChanged();
} else {
extraMetadataBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Application-specific metadata may be attached here.
*
*
* repeated .google.protobuf.Any extra_metadata = 3;
*/
public Builder addExtraMetadata(
com.google.protobuf.Any.Builder builderForValue) {
if (extraMetadataBuilder_ == null) {
ensureExtraMetadataIsMutable();
extraMetadata_.add(builderForValue.build());
onChanged();
} else {
extraMetadataBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Application-specific metadata may be attached here.
*
*
* repeated .google.protobuf.Any extra_metadata = 3;
*/
public Builder addExtraMetadata(
int index, com.google.protobuf.Any.Builder builderForValue) {
if (extraMetadataBuilder_ == null) {
ensureExtraMetadataIsMutable();
extraMetadata_.add(index, builderForValue.build());
onChanged();
} else {
extraMetadataBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Application-specific metadata may be attached here.
*
*
* repeated .google.protobuf.Any extra_metadata = 3;
*/
public Builder addAllExtraMetadata(
java.lang.Iterable extends com.google.protobuf.Any> values) {
if (extraMetadataBuilder_ == null) {
ensureExtraMetadataIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, extraMetadata_);
onChanged();
} else {
extraMetadataBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Application-specific metadata may be attached here.
*
*
* repeated .google.protobuf.Any extra_metadata = 3;
*/
public Builder clearExtraMetadata() {
if (extraMetadataBuilder_ == null) {
extraMetadata_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
} else {
extraMetadataBuilder_.clear();
}
return this;
}
/**
*
* Application-specific metadata may be attached here.
*
*
* repeated .google.protobuf.Any extra_metadata = 3;
*/
public Builder removeExtraMetadata(int index) {
if (extraMetadataBuilder_ == null) {
ensureExtraMetadataIsMutable();
extraMetadata_.remove(index);
onChanged();
} else {
extraMetadataBuilder_.remove(index);
}
return this;
}
/**
*
* Application-specific metadata may be attached here.
*
*
* repeated .google.protobuf.Any extra_metadata = 3;
*/
public com.google.protobuf.Any.Builder getExtraMetadataBuilder(
int index) {
return getExtraMetadataFieldBuilder().getBuilder(index);
}
/**
*
* Application-specific metadata may be attached here.
*
*
* repeated .google.protobuf.Any extra_metadata = 3;
*/
public com.google.protobuf.AnyOrBuilder getExtraMetadataOrBuilder(
int index) {
if (extraMetadataBuilder_ == null) {
return extraMetadata_.get(index); } else {
return extraMetadataBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Application-specific metadata may be attached here.
*
*
* repeated .google.protobuf.Any extra_metadata = 3;
*/
public java.util.List extends com.google.protobuf.AnyOrBuilder>
getExtraMetadataOrBuilderList() {
if (extraMetadataBuilder_ != null) {
return extraMetadataBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(extraMetadata_);
}
}
/**
*
* Application-specific metadata may be attached here.
*
*
* repeated .google.protobuf.Any extra_metadata = 3;
*/
public com.google.protobuf.Any.Builder addExtraMetadataBuilder() {
return getExtraMetadataFieldBuilder().addBuilder(
com.google.protobuf.Any.getDefaultInstance());
}
/**
*
* Application-specific metadata may be attached here.
*
*
* repeated .google.protobuf.Any extra_metadata = 3;
*/
public com.google.protobuf.Any.Builder addExtraMetadataBuilder(
int index) {
return getExtraMetadataFieldBuilder().addBuilder(
index, com.google.protobuf.Any.getDefaultInstance());
}
/**
*
* Application-specific metadata may be attached here.
*
*
* repeated .google.protobuf.Any extra_metadata = 3;
*/
public java.util.List
getExtraMetadataBuilderList() {
return getExtraMetadataFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>
getExtraMetadataFieldBuilder() {
if (extraMetadataBuilder_ == null) {
extraMetadataBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>(
extraMetadata_,
((bitField0_ & 0x00000004) != 0),
getParentForChildren(),
isClean());
extraMetadata_ = null;
}
return extraMetadataBuilder_;
}
@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:tensorflow.metadata.v0.Annotation)
}
// @@protoc_insertion_point(class_scope:tensorflow.metadata.v0.Annotation)
private static final org.tensorflow.metadata.v0.Annotation DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.tensorflow.metadata.v0.Annotation();
}
public static org.tensorflow.metadata.v0.Annotation getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Annotation parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.tensorflow.metadata.v0.Annotation getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy