yandex.cloud.api.ai.vision.v1.TextDetection Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: yandex/cloud/ai/vision/v1/text_detection.proto
package yandex.cloud.api.ai.vision.v1;
public final class TextDetection {
private TextDetection() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
public interface TextAnnotationOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.ai.vision.v1.TextAnnotation)
com.google.protobuf.MessageOrBuilder {
/**
*
* Pages of the recognized file.
* For JPEG and PNG files contains only 1 page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Page pages = 1;
*/
java.util.List
getPagesList();
/**
*
* Pages of the recognized file.
* For JPEG and PNG files contains only 1 page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Page pages = 1;
*/
yandex.cloud.api.ai.vision.v1.TextDetection.Page getPages(int index);
/**
*
* Pages of the recognized file.
* For JPEG and PNG files contains only 1 page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Page pages = 1;
*/
int getPagesCount();
/**
*
* Pages of the recognized file.
* For JPEG and PNG files contains only 1 page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Page pages = 1;
*/
java.util.List extends yandex.cloud.api.ai.vision.v1.TextDetection.PageOrBuilder>
getPagesOrBuilderList();
/**
*
* Pages of the recognized file.
* For JPEG and PNG files contains only 1 page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Page pages = 1;
*/
yandex.cloud.api.ai.vision.v1.TextDetection.PageOrBuilder getPagesOrBuilder(
int index);
}
/**
* Protobuf type {@code yandex.cloud.ai.vision.v1.TextAnnotation}
*/
public static final class TextAnnotation extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.ai.vision.v1.TextAnnotation)
TextAnnotationOrBuilder {
private static final long serialVersionUID = 0L;
// Use TextAnnotation.newBuilder() to construct.
private TextAnnotation(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private TextAnnotation() {
pages_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new TextAnnotation();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private TextAnnotation(
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: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
pages_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
pages_.add(
input.readMessage(yandex.cloud.api.ai.vision.v1.TextDetection.Page.parser(), extensionRegistry));
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
pages_ = java.util.Collections.unmodifiableList(pages_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.vision.v1.TextDetection.internal_static_yandex_cloud_ai_vision_v1_TextAnnotation_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.vision.v1.TextDetection.internal_static_yandex_cloud_ai_vision_v1_TextAnnotation_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.vision.v1.TextDetection.TextAnnotation.class, yandex.cloud.api.ai.vision.v1.TextDetection.TextAnnotation.Builder.class);
}
public static final int PAGES_FIELD_NUMBER = 1;
private java.util.List pages_;
/**
*
* Pages of the recognized file.
* For JPEG and PNG files contains only 1 page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Page pages = 1;
*/
@java.lang.Override
public java.util.List getPagesList() {
return pages_;
}
/**
*
* Pages of the recognized file.
* For JPEG and PNG files contains only 1 page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Page pages = 1;
*/
@java.lang.Override
public java.util.List extends yandex.cloud.api.ai.vision.v1.TextDetection.PageOrBuilder>
getPagesOrBuilderList() {
return pages_;
}
/**
*
* Pages of the recognized file.
* For JPEG and PNG files contains only 1 page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Page pages = 1;
*/
@java.lang.Override
public int getPagesCount() {
return pages_.size();
}
/**
*
* Pages of the recognized file.
* For JPEG and PNG files contains only 1 page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Page pages = 1;
*/
@java.lang.Override
public yandex.cloud.api.ai.vision.v1.TextDetection.Page getPages(int index) {
return pages_.get(index);
}
/**
*
* Pages of the recognized file.
* For JPEG and PNG files contains only 1 page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Page pages = 1;
*/
@java.lang.Override
public yandex.cloud.api.ai.vision.v1.TextDetection.PageOrBuilder getPagesOrBuilder(
int index) {
return pages_.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 < pages_.size(); i++) {
output.writeMessage(1, pages_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < pages_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, pages_.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 yandex.cloud.api.ai.vision.v1.TextDetection.TextAnnotation)) {
return super.equals(obj);
}
yandex.cloud.api.ai.vision.v1.TextDetection.TextAnnotation other = (yandex.cloud.api.ai.vision.v1.TextDetection.TextAnnotation) obj;
if (!getPagesList()
.equals(other.getPagesList())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getPagesCount() > 0) {
hash = (37 * hash) + PAGES_FIELD_NUMBER;
hash = (53 * hash) + getPagesList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.TextAnnotation parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.TextAnnotation parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.TextAnnotation parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.TextAnnotation parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.TextAnnotation parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.TextAnnotation parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.TextAnnotation parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.TextAnnotation 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 yandex.cloud.api.ai.vision.v1.TextDetection.TextAnnotation parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.TextAnnotation 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 yandex.cloud.api.ai.vision.v1.TextDetection.TextAnnotation parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.TextAnnotation 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(yandex.cloud.api.ai.vision.v1.TextDetection.TextAnnotation 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 yandex.cloud.ai.vision.v1.TextAnnotation}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.ai.vision.v1.TextAnnotation)
yandex.cloud.api.ai.vision.v1.TextDetection.TextAnnotationOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.vision.v1.TextDetection.internal_static_yandex_cloud_ai_vision_v1_TextAnnotation_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.vision.v1.TextDetection.internal_static_yandex_cloud_ai_vision_v1_TextAnnotation_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.vision.v1.TextDetection.TextAnnotation.class, yandex.cloud.api.ai.vision.v1.TextDetection.TextAnnotation.Builder.class);
}
// Construct using yandex.cloud.api.ai.vision.v1.TextDetection.TextAnnotation.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getPagesFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (pagesBuilder_ == null) {
pages_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
pagesBuilder_.clear();
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.ai.vision.v1.TextDetection.internal_static_yandex_cloud_ai_vision_v1_TextAnnotation_descriptor;
}
@java.lang.Override
public yandex.cloud.api.ai.vision.v1.TextDetection.TextAnnotation getDefaultInstanceForType() {
return yandex.cloud.api.ai.vision.v1.TextDetection.TextAnnotation.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.ai.vision.v1.TextDetection.TextAnnotation build() {
yandex.cloud.api.ai.vision.v1.TextDetection.TextAnnotation result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.ai.vision.v1.TextDetection.TextAnnotation buildPartial() {
yandex.cloud.api.ai.vision.v1.TextDetection.TextAnnotation result = new yandex.cloud.api.ai.vision.v1.TextDetection.TextAnnotation(this);
int from_bitField0_ = bitField0_;
if (pagesBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
pages_ = java.util.Collections.unmodifiableList(pages_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.pages_ = pages_;
} else {
result.pages_ = pagesBuilder_.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 yandex.cloud.api.ai.vision.v1.TextDetection.TextAnnotation) {
return mergeFrom((yandex.cloud.api.ai.vision.v1.TextDetection.TextAnnotation)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.ai.vision.v1.TextDetection.TextAnnotation other) {
if (other == yandex.cloud.api.ai.vision.v1.TextDetection.TextAnnotation.getDefaultInstance()) return this;
if (pagesBuilder_ == null) {
if (!other.pages_.isEmpty()) {
if (pages_.isEmpty()) {
pages_ = other.pages_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensurePagesIsMutable();
pages_.addAll(other.pages_);
}
onChanged();
}
} else {
if (!other.pages_.isEmpty()) {
if (pagesBuilder_.isEmpty()) {
pagesBuilder_.dispose();
pagesBuilder_ = null;
pages_ = other.pages_;
bitField0_ = (bitField0_ & ~0x00000001);
pagesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getPagesFieldBuilder() : null;
} else {
pagesBuilder_.addAllMessages(other.pages_);
}
}
}
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 {
yandex.cloud.api.ai.vision.v1.TextDetection.TextAnnotation parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.ai.vision.v1.TextDetection.TextAnnotation) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List pages_ =
java.util.Collections.emptyList();
private void ensurePagesIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
pages_ = new java.util.ArrayList(pages_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.ai.vision.v1.TextDetection.Page, yandex.cloud.api.ai.vision.v1.TextDetection.Page.Builder, yandex.cloud.api.ai.vision.v1.TextDetection.PageOrBuilder> pagesBuilder_;
/**
*
* Pages of the recognized file.
* For JPEG and PNG files contains only 1 page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Page pages = 1;
*/
public java.util.List getPagesList() {
if (pagesBuilder_ == null) {
return java.util.Collections.unmodifiableList(pages_);
} else {
return pagesBuilder_.getMessageList();
}
}
/**
*
* Pages of the recognized file.
* For JPEG and PNG files contains only 1 page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Page pages = 1;
*/
public int getPagesCount() {
if (pagesBuilder_ == null) {
return pages_.size();
} else {
return pagesBuilder_.getCount();
}
}
/**
*
* Pages of the recognized file.
* For JPEG and PNG files contains only 1 page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Page pages = 1;
*/
public yandex.cloud.api.ai.vision.v1.TextDetection.Page getPages(int index) {
if (pagesBuilder_ == null) {
return pages_.get(index);
} else {
return pagesBuilder_.getMessage(index);
}
}
/**
*
* Pages of the recognized file.
* For JPEG and PNG files contains only 1 page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Page pages = 1;
*/
public Builder setPages(
int index, yandex.cloud.api.ai.vision.v1.TextDetection.Page value) {
if (pagesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePagesIsMutable();
pages_.set(index, value);
onChanged();
} else {
pagesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Pages of the recognized file.
* For JPEG and PNG files contains only 1 page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Page pages = 1;
*/
public Builder setPages(
int index, yandex.cloud.api.ai.vision.v1.TextDetection.Page.Builder builderForValue) {
if (pagesBuilder_ == null) {
ensurePagesIsMutable();
pages_.set(index, builderForValue.build());
onChanged();
} else {
pagesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Pages of the recognized file.
* For JPEG and PNG files contains only 1 page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Page pages = 1;
*/
public Builder addPages(yandex.cloud.api.ai.vision.v1.TextDetection.Page value) {
if (pagesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePagesIsMutable();
pages_.add(value);
onChanged();
} else {
pagesBuilder_.addMessage(value);
}
return this;
}
/**
*
* Pages of the recognized file.
* For JPEG and PNG files contains only 1 page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Page pages = 1;
*/
public Builder addPages(
int index, yandex.cloud.api.ai.vision.v1.TextDetection.Page value) {
if (pagesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePagesIsMutable();
pages_.add(index, value);
onChanged();
} else {
pagesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Pages of the recognized file.
* For JPEG and PNG files contains only 1 page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Page pages = 1;
*/
public Builder addPages(
yandex.cloud.api.ai.vision.v1.TextDetection.Page.Builder builderForValue) {
if (pagesBuilder_ == null) {
ensurePagesIsMutable();
pages_.add(builderForValue.build());
onChanged();
} else {
pagesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Pages of the recognized file.
* For JPEG and PNG files contains only 1 page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Page pages = 1;
*/
public Builder addPages(
int index, yandex.cloud.api.ai.vision.v1.TextDetection.Page.Builder builderForValue) {
if (pagesBuilder_ == null) {
ensurePagesIsMutable();
pages_.add(index, builderForValue.build());
onChanged();
} else {
pagesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Pages of the recognized file.
* For JPEG and PNG files contains only 1 page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Page pages = 1;
*/
public Builder addAllPages(
java.lang.Iterable extends yandex.cloud.api.ai.vision.v1.TextDetection.Page> values) {
if (pagesBuilder_ == null) {
ensurePagesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, pages_);
onChanged();
} else {
pagesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Pages of the recognized file.
* For JPEG and PNG files contains only 1 page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Page pages = 1;
*/
public Builder clearPages() {
if (pagesBuilder_ == null) {
pages_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
pagesBuilder_.clear();
}
return this;
}
/**
*
* Pages of the recognized file.
* For JPEG and PNG files contains only 1 page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Page pages = 1;
*/
public Builder removePages(int index) {
if (pagesBuilder_ == null) {
ensurePagesIsMutable();
pages_.remove(index);
onChanged();
} else {
pagesBuilder_.remove(index);
}
return this;
}
/**
*
* Pages of the recognized file.
* For JPEG and PNG files contains only 1 page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Page pages = 1;
*/
public yandex.cloud.api.ai.vision.v1.TextDetection.Page.Builder getPagesBuilder(
int index) {
return getPagesFieldBuilder().getBuilder(index);
}
/**
*
* Pages of the recognized file.
* For JPEG and PNG files contains only 1 page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Page pages = 1;
*/
public yandex.cloud.api.ai.vision.v1.TextDetection.PageOrBuilder getPagesOrBuilder(
int index) {
if (pagesBuilder_ == null) {
return pages_.get(index); } else {
return pagesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Pages of the recognized file.
* For JPEG and PNG files contains only 1 page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Page pages = 1;
*/
public java.util.List extends yandex.cloud.api.ai.vision.v1.TextDetection.PageOrBuilder>
getPagesOrBuilderList() {
if (pagesBuilder_ != null) {
return pagesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(pages_);
}
}
/**
*
* Pages of the recognized file.
* For JPEG and PNG files contains only 1 page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Page pages = 1;
*/
public yandex.cloud.api.ai.vision.v1.TextDetection.Page.Builder addPagesBuilder() {
return getPagesFieldBuilder().addBuilder(
yandex.cloud.api.ai.vision.v1.TextDetection.Page.getDefaultInstance());
}
/**
*
* Pages of the recognized file.
* For JPEG and PNG files contains only 1 page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Page pages = 1;
*/
public yandex.cloud.api.ai.vision.v1.TextDetection.Page.Builder addPagesBuilder(
int index) {
return getPagesFieldBuilder().addBuilder(
index, yandex.cloud.api.ai.vision.v1.TextDetection.Page.getDefaultInstance());
}
/**
*
* Pages of the recognized file.
* For JPEG and PNG files contains only 1 page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Page pages = 1;
*/
public java.util.List
getPagesBuilderList() {
return getPagesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.ai.vision.v1.TextDetection.Page, yandex.cloud.api.ai.vision.v1.TextDetection.Page.Builder, yandex.cloud.api.ai.vision.v1.TextDetection.PageOrBuilder>
getPagesFieldBuilder() {
if (pagesBuilder_ == null) {
pagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.ai.vision.v1.TextDetection.Page, yandex.cloud.api.ai.vision.v1.TextDetection.Page.Builder, yandex.cloud.api.ai.vision.v1.TextDetection.PageOrBuilder>(
pages_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
pages_ = null;
}
return pagesBuilder_;
}
@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:yandex.cloud.ai.vision.v1.TextAnnotation)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.ai.vision.v1.TextAnnotation)
private static final yandex.cloud.api.ai.vision.v1.TextDetection.TextAnnotation DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.ai.vision.v1.TextDetection.TextAnnotation();
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.TextAnnotation getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public TextAnnotation parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new TextAnnotation(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 yandex.cloud.api.ai.vision.v1.TextDetection.TextAnnotation getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface PageOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.ai.vision.v1.Page)
com.google.protobuf.MessageOrBuilder {
/**
*
* Page width in pixels.
*
*
* int64 width = 1;
* @return The width.
*/
long getWidth();
/**
*
* Page height in pixels.
*
*
* int64 height = 2;
* @return The height.
*/
long getHeight();
/**
*
* Recognized text blocks in this page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Block blocks = 3;
*/
java.util.List
getBlocksList();
/**
*
* Recognized text blocks in this page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Block blocks = 3;
*/
yandex.cloud.api.ai.vision.v1.TextDetection.Block getBlocks(int index);
/**
*
* Recognized text blocks in this page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Block blocks = 3;
*/
int getBlocksCount();
/**
*
* Recognized text blocks in this page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Block blocks = 3;
*/
java.util.List extends yandex.cloud.api.ai.vision.v1.TextDetection.BlockOrBuilder>
getBlocksOrBuilderList();
/**
*
* Recognized text blocks in this page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Block blocks = 3;
*/
yandex.cloud.api.ai.vision.v1.TextDetection.BlockOrBuilder getBlocksOrBuilder(
int index);
/**
*
* Recognized entities
*
*
* repeated .yandex.cloud.ai.vision.v1.Entity entities = 4;
*/
java.util.List
getEntitiesList();
/**
*
* Recognized entities
*
*
* repeated .yandex.cloud.ai.vision.v1.Entity entities = 4;
*/
yandex.cloud.api.ai.vision.v1.TextDetection.Entity getEntities(int index);
/**
*
* Recognized entities
*
*
* repeated .yandex.cloud.ai.vision.v1.Entity entities = 4;
*/
int getEntitiesCount();
/**
*
* Recognized entities
*
*
* repeated .yandex.cloud.ai.vision.v1.Entity entities = 4;
*/
java.util.List extends yandex.cloud.api.ai.vision.v1.TextDetection.EntityOrBuilder>
getEntitiesOrBuilderList();
/**
*
* Recognized entities
*
*
* repeated .yandex.cloud.ai.vision.v1.Entity entities = 4;
*/
yandex.cloud.api.ai.vision.v1.TextDetection.EntityOrBuilder getEntitiesOrBuilder(
int index);
}
/**
* Protobuf type {@code yandex.cloud.ai.vision.v1.Page}
*/
public static final class Page extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.ai.vision.v1.Page)
PageOrBuilder {
private static final long serialVersionUID = 0L;
// Use Page.newBuilder() to construct.
private Page(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Page() {
blocks_ = java.util.Collections.emptyList();
entities_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Page();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Page(
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 8: {
width_ = input.readInt64();
break;
}
case 16: {
height_ = input.readInt64();
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
blocks_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
blocks_.add(
input.readMessage(yandex.cloud.api.ai.vision.v1.TextDetection.Block.parser(), extensionRegistry));
break;
}
case 34: {
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
entities_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
entities_.add(
input.readMessage(yandex.cloud.api.ai.vision.v1.TextDetection.Entity.parser(), extensionRegistry));
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
blocks_ = java.util.Collections.unmodifiableList(blocks_);
}
if (((mutable_bitField0_ & 0x00000002) != 0)) {
entities_ = java.util.Collections.unmodifiableList(entities_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.vision.v1.TextDetection.internal_static_yandex_cloud_ai_vision_v1_Page_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.vision.v1.TextDetection.internal_static_yandex_cloud_ai_vision_v1_Page_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.vision.v1.TextDetection.Page.class, yandex.cloud.api.ai.vision.v1.TextDetection.Page.Builder.class);
}
public static final int WIDTH_FIELD_NUMBER = 1;
private long width_;
/**
*
* Page width in pixels.
*
*
* int64 width = 1;
* @return The width.
*/
@java.lang.Override
public long getWidth() {
return width_;
}
public static final int HEIGHT_FIELD_NUMBER = 2;
private long height_;
/**
*
* Page height in pixels.
*
*
* int64 height = 2;
* @return The height.
*/
@java.lang.Override
public long getHeight() {
return height_;
}
public static final int BLOCKS_FIELD_NUMBER = 3;
private java.util.List blocks_;
/**
*
* Recognized text blocks in this page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Block blocks = 3;
*/
@java.lang.Override
public java.util.List getBlocksList() {
return blocks_;
}
/**
*
* Recognized text blocks in this page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Block blocks = 3;
*/
@java.lang.Override
public java.util.List extends yandex.cloud.api.ai.vision.v1.TextDetection.BlockOrBuilder>
getBlocksOrBuilderList() {
return blocks_;
}
/**
*
* Recognized text blocks in this page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Block blocks = 3;
*/
@java.lang.Override
public int getBlocksCount() {
return blocks_.size();
}
/**
*
* Recognized text blocks in this page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Block blocks = 3;
*/
@java.lang.Override
public yandex.cloud.api.ai.vision.v1.TextDetection.Block getBlocks(int index) {
return blocks_.get(index);
}
/**
*
* Recognized text blocks in this page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Block blocks = 3;
*/
@java.lang.Override
public yandex.cloud.api.ai.vision.v1.TextDetection.BlockOrBuilder getBlocksOrBuilder(
int index) {
return blocks_.get(index);
}
public static final int ENTITIES_FIELD_NUMBER = 4;
private java.util.List entities_;
/**
*
* Recognized entities
*
*
* repeated .yandex.cloud.ai.vision.v1.Entity entities = 4;
*/
@java.lang.Override
public java.util.List getEntitiesList() {
return entities_;
}
/**
*
* Recognized entities
*
*
* repeated .yandex.cloud.ai.vision.v1.Entity entities = 4;
*/
@java.lang.Override
public java.util.List extends yandex.cloud.api.ai.vision.v1.TextDetection.EntityOrBuilder>
getEntitiesOrBuilderList() {
return entities_;
}
/**
*
* Recognized entities
*
*
* repeated .yandex.cloud.ai.vision.v1.Entity entities = 4;
*/
@java.lang.Override
public int getEntitiesCount() {
return entities_.size();
}
/**
*
* Recognized entities
*
*
* repeated .yandex.cloud.ai.vision.v1.Entity entities = 4;
*/
@java.lang.Override
public yandex.cloud.api.ai.vision.v1.TextDetection.Entity getEntities(int index) {
return entities_.get(index);
}
/**
*
* Recognized entities
*
*
* repeated .yandex.cloud.ai.vision.v1.Entity entities = 4;
*/
@java.lang.Override
public yandex.cloud.api.ai.vision.v1.TextDetection.EntityOrBuilder getEntitiesOrBuilder(
int index) {
return entities_.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 (width_ != 0L) {
output.writeInt64(1, width_);
}
if (height_ != 0L) {
output.writeInt64(2, height_);
}
for (int i = 0; i < blocks_.size(); i++) {
output.writeMessage(3, blocks_.get(i));
}
for (int i = 0; i < entities_.size(); i++) {
output.writeMessage(4, entities_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (width_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(1, width_);
}
if (height_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(2, height_);
}
for (int i = 0; i < blocks_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, blocks_.get(i));
}
for (int i = 0; i < entities_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, entities_.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 yandex.cloud.api.ai.vision.v1.TextDetection.Page)) {
return super.equals(obj);
}
yandex.cloud.api.ai.vision.v1.TextDetection.Page other = (yandex.cloud.api.ai.vision.v1.TextDetection.Page) obj;
if (getWidth()
!= other.getWidth()) return false;
if (getHeight()
!= other.getHeight()) return false;
if (!getBlocksList()
.equals(other.getBlocksList())) return false;
if (!getEntitiesList()
.equals(other.getEntitiesList())) 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) + WIDTH_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getWidth());
hash = (37 * hash) + HEIGHT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getHeight());
if (getBlocksCount() > 0) {
hash = (37 * hash) + BLOCKS_FIELD_NUMBER;
hash = (53 * hash) + getBlocksList().hashCode();
}
if (getEntitiesCount() > 0) {
hash = (37 * hash) + ENTITIES_FIELD_NUMBER;
hash = (53 * hash) + getEntitiesList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Page parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Page parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Page parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Page parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Page parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Page parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Page parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Page 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 yandex.cloud.api.ai.vision.v1.TextDetection.Page parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Page 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 yandex.cloud.api.ai.vision.v1.TextDetection.Page parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Page 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(yandex.cloud.api.ai.vision.v1.TextDetection.Page 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 yandex.cloud.ai.vision.v1.Page}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.ai.vision.v1.Page)
yandex.cloud.api.ai.vision.v1.TextDetection.PageOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.vision.v1.TextDetection.internal_static_yandex_cloud_ai_vision_v1_Page_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.vision.v1.TextDetection.internal_static_yandex_cloud_ai_vision_v1_Page_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.vision.v1.TextDetection.Page.class, yandex.cloud.api.ai.vision.v1.TextDetection.Page.Builder.class);
}
// Construct using yandex.cloud.api.ai.vision.v1.TextDetection.Page.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getBlocksFieldBuilder();
getEntitiesFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
width_ = 0L;
height_ = 0L;
if (blocksBuilder_ == null) {
blocks_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
blocksBuilder_.clear();
}
if (entitiesBuilder_ == null) {
entities_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
} else {
entitiesBuilder_.clear();
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.ai.vision.v1.TextDetection.internal_static_yandex_cloud_ai_vision_v1_Page_descriptor;
}
@java.lang.Override
public yandex.cloud.api.ai.vision.v1.TextDetection.Page getDefaultInstanceForType() {
return yandex.cloud.api.ai.vision.v1.TextDetection.Page.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.ai.vision.v1.TextDetection.Page build() {
yandex.cloud.api.ai.vision.v1.TextDetection.Page result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.ai.vision.v1.TextDetection.Page buildPartial() {
yandex.cloud.api.ai.vision.v1.TextDetection.Page result = new yandex.cloud.api.ai.vision.v1.TextDetection.Page(this);
int from_bitField0_ = bitField0_;
result.width_ = width_;
result.height_ = height_;
if (blocksBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
blocks_ = java.util.Collections.unmodifiableList(blocks_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.blocks_ = blocks_;
} else {
result.blocks_ = blocksBuilder_.build();
}
if (entitiesBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
entities_ = java.util.Collections.unmodifiableList(entities_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.entities_ = entities_;
} else {
result.entities_ = entitiesBuilder_.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 yandex.cloud.api.ai.vision.v1.TextDetection.Page) {
return mergeFrom((yandex.cloud.api.ai.vision.v1.TextDetection.Page)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.ai.vision.v1.TextDetection.Page other) {
if (other == yandex.cloud.api.ai.vision.v1.TextDetection.Page.getDefaultInstance()) return this;
if (other.getWidth() != 0L) {
setWidth(other.getWidth());
}
if (other.getHeight() != 0L) {
setHeight(other.getHeight());
}
if (blocksBuilder_ == null) {
if (!other.blocks_.isEmpty()) {
if (blocks_.isEmpty()) {
blocks_ = other.blocks_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureBlocksIsMutable();
blocks_.addAll(other.blocks_);
}
onChanged();
}
} else {
if (!other.blocks_.isEmpty()) {
if (blocksBuilder_.isEmpty()) {
blocksBuilder_.dispose();
blocksBuilder_ = null;
blocks_ = other.blocks_;
bitField0_ = (bitField0_ & ~0x00000001);
blocksBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getBlocksFieldBuilder() : null;
} else {
blocksBuilder_.addAllMessages(other.blocks_);
}
}
}
if (entitiesBuilder_ == null) {
if (!other.entities_.isEmpty()) {
if (entities_.isEmpty()) {
entities_ = other.entities_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureEntitiesIsMutable();
entities_.addAll(other.entities_);
}
onChanged();
}
} else {
if (!other.entities_.isEmpty()) {
if (entitiesBuilder_.isEmpty()) {
entitiesBuilder_.dispose();
entitiesBuilder_ = null;
entities_ = other.entities_;
bitField0_ = (bitField0_ & ~0x00000002);
entitiesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getEntitiesFieldBuilder() : null;
} else {
entitiesBuilder_.addAllMessages(other.entities_);
}
}
}
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 {
yandex.cloud.api.ai.vision.v1.TextDetection.Page parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.ai.vision.v1.TextDetection.Page) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private long width_ ;
/**
*
* Page width in pixels.
*
*
* int64 width = 1;
* @return The width.
*/
@java.lang.Override
public long getWidth() {
return width_;
}
/**
*
* Page width in pixels.
*
*
* int64 width = 1;
* @param value The width to set.
* @return This builder for chaining.
*/
public Builder setWidth(long value) {
width_ = value;
onChanged();
return this;
}
/**
*
* Page width in pixels.
*
*
* int64 width = 1;
* @return This builder for chaining.
*/
public Builder clearWidth() {
width_ = 0L;
onChanged();
return this;
}
private long height_ ;
/**
*
* Page height in pixels.
*
*
* int64 height = 2;
* @return The height.
*/
@java.lang.Override
public long getHeight() {
return height_;
}
/**
*
* Page height in pixels.
*
*
* int64 height = 2;
* @param value The height to set.
* @return This builder for chaining.
*/
public Builder setHeight(long value) {
height_ = value;
onChanged();
return this;
}
/**
*
* Page height in pixels.
*
*
* int64 height = 2;
* @return This builder for chaining.
*/
public Builder clearHeight() {
height_ = 0L;
onChanged();
return this;
}
private java.util.List blocks_ =
java.util.Collections.emptyList();
private void ensureBlocksIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
blocks_ = new java.util.ArrayList(blocks_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.ai.vision.v1.TextDetection.Block, yandex.cloud.api.ai.vision.v1.TextDetection.Block.Builder, yandex.cloud.api.ai.vision.v1.TextDetection.BlockOrBuilder> blocksBuilder_;
/**
*
* Recognized text blocks in this page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Block blocks = 3;
*/
public java.util.List getBlocksList() {
if (blocksBuilder_ == null) {
return java.util.Collections.unmodifiableList(blocks_);
} else {
return blocksBuilder_.getMessageList();
}
}
/**
*
* Recognized text blocks in this page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Block blocks = 3;
*/
public int getBlocksCount() {
if (blocksBuilder_ == null) {
return blocks_.size();
} else {
return blocksBuilder_.getCount();
}
}
/**
*
* Recognized text blocks in this page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Block blocks = 3;
*/
public yandex.cloud.api.ai.vision.v1.TextDetection.Block getBlocks(int index) {
if (blocksBuilder_ == null) {
return blocks_.get(index);
} else {
return blocksBuilder_.getMessage(index);
}
}
/**
*
* Recognized text blocks in this page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Block blocks = 3;
*/
public Builder setBlocks(
int index, yandex.cloud.api.ai.vision.v1.TextDetection.Block value) {
if (blocksBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureBlocksIsMutable();
blocks_.set(index, value);
onChanged();
} else {
blocksBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Recognized text blocks in this page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Block blocks = 3;
*/
public Builder setBlocks(
int index, yandex.cloud.api.ai.vision.v1.TextDetection.Block.Builder builderForValue) {
if (blocksBuilder_ == null) {
ensureBlocksIsMutable();
blocks_.set(index, builderForValue.build());
onChanged();
} else {
blocksBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Recognized text blocks in this page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Block blocks = 3;
*/
public Builder addBlocks(yandex.cloud.api.ai.vision.v1.TextDetection.Block value) {
if (blocksBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureBlocksIsMutable();
blocks_.add(value);
onChanged();
} else {
blocksBuilder_.addMessage(value);
}
return this;
}
/**
*
* Recognized text blocks in this page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Block blocks = 3;
*/
public Builder addBlocks(
int index, yandex.cloud.api.ai.vision.v1.TextDetection.Block value) {
if (blocksBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureBlocksIsMutable();
blocks_.add(index, value);
onChanged();
} else {
blocksBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Recognized text blocks in this page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Block blocks = 3;
*/
public Builder addBlocks(
yandex.cloud.api.ai.vision.v1.TextDetection.Block.Builder builderForValue) {
if (blocksBuilder_ == null) {
ensureBlocksIsMutable();
blocks_.add(builderForValue.build());
onChanged();
} else {
blocksBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Recognized text blocks in this page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Block blocks = 3;
*/
public Builder addBlocks(
int index, yandex.cloud.api.ai.vision.v1.TextDetection.Block.Builder builderForValue) {
if (blocksBuilder_ == null) {
ensureBlocksIsMutable();
blocks_.add(index, builderForValue.build());
onChanged();
} else {
blocksBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Recognized text blocks in this page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Block blocks = 3;
*/
public Builder addAllBlocks(
java.lang.Iterable extends yandex.cloud.api.ai.vision.v1.TextDetection.Block> values) {
if (blocksBuilder_ == null) {
ensureBlocksIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, blocks_);
onChanged();
} else {
blocksBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Recognized text blocks in this page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Block blocks = 3;
*/
public Builder clearBlocks() {
if (blocksBuilder_ == null) {
blocks_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
blocksBuilder_.clear();
}
return this;
}
/**
*
* Recognized text blocks in this page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Block blocks = 3;
*/
public Builder removeBlocks(int index) {
if (blocksBuilder_ == null) {
ensureBlocksIsMutable();
blocks_.remove(index);
onChanged();
} else {
blocksBuilder_.remove(index);
}
return this;
}
/**
*
* Recognized text blocks in this page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Block blocks = 3;
*/
public yandex.cloud.api.ai.vision.v1.TextDetection.Block.Builder getBlocksBuilder(
int index) {
return getBlocksFieldBuilder().getBuilder(index);
}
/**
*
* Recognized text blocks in this page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Block blocks = 3;
*/
public yandex.cloud.api.ai.vision.v1.TextDetection.BlockOrBuilder getBlocksOrBuilder(
int index) {
if (blocksBuilder_ == null) {
return blocks_.get(index); } else {
return blocksBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Recognized text blocks in this page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Block blocks = 3;
*/
public java.util.List extends yandex.cloud.api.ai.vision.v1.TextDetection.BlockOrBuilder>
getBlocksOrBuilderList() {
if (blocksBuilder_ != null) {
return blocksBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(blocks_);
}
}
/**
*
* Recognized text blocks in this page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Block blocks = 3;
*/
public yandex.cloud.api.ai.vision.v1.TextDetection.Block.Builder addBlocksBuilder() {
return getBlocksFieldBuilder().addBuilder(
yandex.cloud.api.ai.vision.v1.TextDetection.Block.getDefaultInstance());
}
/**
*
* Recognized text blocks in this page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Block blocks = 3;
*/
public yandex.cloud.api.ai.vision.v1.TextDetection.Block.Builder addBlocksBuilder(
int index) {
return getBlocksFieldBuilder().addBuilder(
index, yandex.cloud.api.ai.vision.v1.TextDetection.Block.getDefaultInstance());
}
/**
*
* Recognized text blocks in this page.
*
*
* repeated .yandex.cloud.ai.vision.v1.Block blocks = 3;
*/
public java.util.List
getBlocksBuilderList() {
return getBlocksFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.ai.vision.v1.TextDetection.Block, yandex.cloud.api.ai.vision.v1.TextDetection.Block.Builder, yandex.cloud.api.ai.vision.v1.TextDetection.BlockOrBuilder>
getBlocksFieldBuilder() {
if (blocksBuilder_ == null) {
blocksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.ai.vision.v1.TextDetection.Block, yandex.cloud.api.ai.vision.v1.TextDetection.Block.Builder, yandex.cloud.api.ai.vision.v1.TextDetection.BlockOrBuilder>(
blocks_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
blocks_ = null;
}
return blocksBuilder_;
}
private java.util.List entities_ =
java.util.Collections.emptyList();
private void ensureEntitiesIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
entities_ = new java.util.ArrayList(entities_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.ai.vision.v1.TextDetection.Entity, yandex.cloud.api.ai.vision.v1.TextDetection.Entity.Builder, yandex.cloud.api.ai.vision.v1.TextDetection.EntityOrBuilder> entitiesBuilder_;
/**
*
* Recognized entities
*
*
* repeated .yandex.cloud.ai.vision.v1.Entity entities = 4;
*/
public java.util.List getEntitiesList() {
if (entitiesBuilder_ == null) {
return java.util.Collections.unmodifiableList(entities_);
} else {
return entitiesBuilder_.getMessageList();
}
}
/**
*
* Recognized entities
*
*
* repeated .yandex.cloud.ai.vision.v1.Entity entities = 4;
*/
public int getEntitiesCount() {
if (entitiesBuilder_ == null) {
return entities_.size();
} else {
return entitiesBuilder_.getCount();
}
}
/**
*
* Recognized entities
*
*
* repeated .yandex.cloud.ai.vision.v1.Entity entities = 4;
*/
public yandex.cloud.api.ai.vision.v1.TextDetection.Entity getEntities(int index) {
if (entitiesBuilder_ == null) {
return entities_.get(index);
} else {
return entitiesBuilder_.getMessage(index);
}
}
/**
*
* Recognized entities
*
*
* repeated .yandex.cloud.ai.vision.v1.Entity entities = 4;
*/
public Builder setEntities(
int index, yandex.cloud.api.ai.vision.v1.TextDetection.Entity value) {
if (entitiesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureEntitiesIsMutable();
entities_.set(index, value);
onChanged();
} else {
entitiesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Recognized entities
*
*
* repeated .yandex.cloud.ai.vision.v1.Entity entities = 4;
*/
public Builder setEntities(
int index, yandex.cloud.api.ai.vision.v1.TextDetection.Entity.Builder builderForValue) {
if (entitiesBuilder_ == null) {
ensureEntitiesIsMutable();
entities_.set(index, builderForValue.build());
onChanged();
} else {
entitiesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Recognized entities
*
*
* repeated .yandex.cloud.ai.vision.v1.Entity entities = 4;
*/
public Builder addEntities(yandex.cloud.api.ai.vision.v1.TextDetection.Entity value) {
if (entitiesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureEntitiesIsMutable();
entities_.add(value);
onChanged();
} else {
entitiesBuilder_.addMessage(value);
}
return this;
}
/**
*
* Recognized entities
*
*
* repeated .yandex.cloud.ai.vision.v1.Entity entities = 4;
*/
public Builder addEntities(
int index, yandex.cloud.api.ai.vision.v1.TextDetection.Entity value) {
if (entitiesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureEntitiesIsMutable();
entities_.add(index, value);
onChanged();
} else {
entitiesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Recognized entities
*
*
* repeated .yandex.cloud.ai.vision.v1.Entity entities = 4;
*/
public Builder addEntities(
yandex.cloud.api.ai.vision.v1.TextDetection.Entity.Builder builderForValue) {
if (entitiesBuilder_ == null) {
ensureEntitiesIsMutable();
entities_.add(builderForValue.build());
onChanged();
} else {
entitiesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Recognized entities
*
*
* repeated .yandex.cloud.ai.vision.v1.Entity entities = 4;
*/
public Builder addEntities(
int index, yandex.cloud.api.ai.vision.v1.TextDetection.Entity.Builder builderForValue) {
if (entitiesBuilder_ == null) {
ensureEntitiesIsMutable();
entities_.add(index, builderForValue.build());
onChanged();
} else {
entitiesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Recognized entities
*
*
* repeated .yandex.cloud.ai.vision.v1.Entity entities = 4;
*/
public Builder addAllEntities(
java.lang.Iterable extends yandex.cloud.api.ai.vision.v1.TextDetection.Entity> values) {
if (entitiesBuilder_ == null) {
ensureEntitiesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, entities_);
onChanged();
} else {
entitiesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Recognized entities
*
*
* repeated .yandex.cloud.ai.vision.v1.Entity entities = 4;
*/
public Builder clearEntities() {
if (entitiesBuilder_ == null) {
entities_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
entitiesBuilder_.clear();
}
return this;
}
/**
*
* Recognized entities
*
*
* repeated .yandex.cloud.ai.vision.v1.Entity entities = 4;
*/
public Builder removeEntities(int index) {
if (entitiesBuilder_ == null) {
ensureEntitiesIsMutable();
entities_.remove(index);
onChanged();
} else {
entitiesBuilder_.remove(index);
}
return this;
}
/**
*
* Recognized entities
*
*
* repeated .yandex.cloud.ai.vision.v1.Entity entities = 4;
*/
public yandex.cloud.api.ai.vision.v1.TextDetection.Entity.Builder getEntitiesBuilder(
int index) {
return getEntitiesFieldBuilder().getBuilder(index);
}
/**
*
* Recognized entities
*
*
* repeated .yandex.cloud.ai.vision.v1.Entity entities = 4;
*/
public yandex.cloud.api.ai.vision.v1.TextDetection.EntityOrBuilder getEntitiesOrBuilder(
int index) {
if (entitiesBuilder_ == null) {
return entities_.get(index); } else {
return entitiesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Recognized entities
*
*
* repeated .yandex.cloud.ai.vision.v1.Entity entities = 4;
*/
public java.util.List extends yandex.cloud.api.ai.vision.v1.TextDetection.EntityOrBuilder>
getEntitiesOrBuilderList() {
if (entitiesBuilder_ != null) {
return entitiesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(entities_);
}
}
/**
*
* Recognized entities
*
*
* repeated .yandex.cloud.ai.vision.v1.Entity entities = 4;
*/
public yandex.cloud.api.ai.vision.v1.TextDetection.Entity.Builder addEntitiesBuilder() {
return getEntitiesFieldBuilder().addBuilder(
yandex.cloud.api.ai.vision.v1.TextDetection.Entity.getDefaultInstance());
}
/**
*
* Recognized entities
*
*
* repeated .yandex.cloud.ai.vision.v1.Entity entities = 4;
*/
public yandex.cloud.api.ai.vision.v1.TextDetection.Entity.Builder addEntitiesBuilder(
int index) {
return getEntitiesFieldBuilder().addBuilder(
index, yandex.cloud.api.ai.vision.v1.TextDetection.Entity.getDefaultInstance());
}
/**
*
* Recognized entities
*
*
* repeated .yandex.cloud.ai.vision.v1.Entity entities = 4;
*/
public java.util.List
getEntitiesBuilderList() {
return getEntitiesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.ai.vision.v1.TextDetection.Entity, yandex.cloud.api.ai.vision.v1.TextDetection.Entity.Builder, yandex.cloud.api.ai.vision.v1.TextDetection.EntityOrBuilder>
getEntitiesFieldBuilder() {
if (entitiesBuilder_ == null) {
entitiesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.ai.vision.v1.TextDetection.Entity, yandex.cloud.api.ai.vision.v1.TextDetection.Entity.Builder, yandex.cloud.api.ai.vision.v1.TextDetection.EntityOrBuilder>(
entities_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
entities_ = null;
}
return entitiesBuilder_;
}
@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:yandex.cloud.ai.vision.v1.Page)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.ai.vision.v1.Page)
private static final yandex.cloud.api.ai.vision.v1.TextDetection.Page DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.ai.vision.v1.TextDetection.Page();
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Page getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Page parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Page(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 yandex.cloud.api.ai.vision.v1.TextDetection.Page getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface EntityOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.ai.vision.v1.Entity)
com.google.protobuf.MessageOrBuilder {
/**
*
* Entity name
*
*
* string name = 1;
* @return The name.
*/
java.lang.String getName();
/**
*
* Entity name
*
*
* string name = 1;
* @return The bytes for name.
*/
com.google.protobuf.ByteString
getNameBytes();
/**
*
* Recognized entity text
*
*
* string text = 2;
* @return The text.
*/
java.lang.String getText();
/**
*
* Recognized entity text
*
*
* string text = 2;
* @return The bytes for text.
*/
com.google.protobuf.ByteString
getTextBytes();
}
/**
* Protobuf type {@code yandex.cloud.ai.vision.v1.Entity}
*/
public static final class Entity extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.ai.vision.v1.Entity)
EntityOrBuilder {
private static final long serialVersionUID = 0L;
// Use Entity.newBuilder() to construct.
private Entity(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Entity() {
name_ = "";
text_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Entity();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Entity(
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();
name_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
text_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.vision.v1.TextDetection.internal_static_yandex_cloud_ai_vision_v1_Entity_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.vision.v1.TextDetection.internal_static_yandex_cloud_ai_vision_v1_Entity_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.vision.v1.TextDetection.Entity.class, yandex.cloud.api.ai.vision.v1.TextDetection.Entity.Builder.class);
}
public static final int NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object name_;
/**
*
* Entity name
*
*
* string name = 1;
* @return The name.
*/
@java.lang.Override
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
}
}
/**
*
* Entity name
*
*
* string name = 1;
* @return The bytes for name.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TEXT_FIELD_NUMBER = 2;
private volatile java.lang.Object text_;
/**
*
* Recognized entity text
*
*
* string text = 2;
* @return The text.
*/
@java.lang.Override
public java.lang.String getText() {
java.lang.Object ref = text_;
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();
text_ = s;
return s;
}
}
/**
*
* Recognized entity text
*
*
* string text = 2;
* @return The bytes for text.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getTextBytes() {
java.lang.Object ref = text_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
text_ = 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(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, text_);
}
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(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, text_);
}
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 yandex.cloud.api.ai.vision.v1.TextDetection.Entity)) {
return super.equals(obj);
}
yandex.cloud.api.ai.vision.v1.TextDetection.Entity other = (yandex.cloud.api.ai.vision.v1.TextDetection.Entity) obj;
if (!getName()
.equals(other.getName())) return false;
if (!getText()
.equals(other.getText())) 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) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (37 * hash) + TEXT_FIELD_NUMBER;
hash = (53 * hash) + getText().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Entity parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Entity parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Entity parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Entity parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Entity parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Entity parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Entity parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Entity 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 yandex.cloud.api.ai.vision.v1.TextDetection.Entity parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Entity 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 yandex.cloud.api.ai.vision.v1.TextDetection.Entity parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Entity 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(yandex.cloud.api.ai.vision.v1.TextDetection.Entity 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 yandex.cloud.ai.vision.v1.Entity}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.ai.vision.v1.Entity)
yandex.cloud.api.ai.vision.v1.TextDetection.EntityOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.vision.v1.TextDetection.internal_static_yandex_cloud_ai_vision_v1_Entity_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.vision.v1.TextDetection.internal_static_yandex_cloud_ai_vision_v1_Entity_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.vision.v1.TextDetection.Entity.class, yandex.cloud.api.ai.vision.v1.TextDetection.Entity.Builder.class);
}
// Construct using yandex.cloud.api.ai.vision.v1.TextDetection.Entity.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();
name_ = "";
text_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.ai.vision.v1.TextDetection.internal_static_yandex_cloud_ai_vision_v1_Entity_descriptor;
}
@java.lang.Override
public yandex.cloud.api.ai.vision.v1.TextDetection.Entity getDefaultInstanceForType() {
return yandex.cloud.api.ai.vision.v1.TextDetection.Entity.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.ai.vision.v1.TextDetection.Entity build() {
yandex.cloud.api.ai.vision.v1.TextDetection.Entity result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.ai.vision.v1.TextDetection.Entity buildPartial() {
yandex.cloud.api.ai.vision.v1.TextDetection.Entity result = new yandex.cloud.api.ai.vision.v1.TextDetection.Entity(this);
result.name_ = name_;
result.text_ = text_;
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 yandex.cloud.api.ai.vision.v1.TextDetection.Entity) {
return mergeFrom((yandex.cloud.api.ai.vision.v1.TextDetection.Entity)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.ai.vision.v1.TextDetection.Entity other) {
if (other == yandex.cloud.api.ai.vision.v1.TextDetection.Entity.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (!other.getText().isEmpty()) {
text_ = other.text_;
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 {
yandex.cloud.api.ai.vision.v1.TextDetection.Entity parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.ai.vision.v1.TextDetection.Entity) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object name_ = "";
/**
*
* Entity name
*
*
* string name = 1;
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Entity name
*
*
* string name = 1;
* @return The bytes for name.
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Entity name
*
*
* string name = 1;
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
*
* Entity name
*
*
* string name = 1;
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
* Entity name
*
*
* string name = 1;
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
onChanged();
return this;
}
private java.lang.Object text_ = "";
/**
*
* Recognized entity text
*
*
* string text = 2;
* @return The text.
*/
public java.lang.String getText() {
java.lang.Object ref = text_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
text_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Recognized entity text
*
*
* string text = 2;
* @return The bytes for text.
*/
public com.google.protobuf.ByteString
getTextBytes() {
java.lang.Object ref = text_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
text_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Recognized entity text
*
*
* string text = 2;
* @param value The text to set.
* @return This builder for chaining.
*/
public Builder setText(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
text_ = value;
onChanged();
return this;
}
/**
*
* Recognized entity text
*
*
* string text = 2;
* @return This builder for chaining.
*/
public Builder clearText() {
text_ = getDefaultInstance().getText();
onChanged();
return this;
}
/**
*
* Recognized entity text
*
*
* string text = 2;
* @param value The bytes for text to set.
* @return This builder for chaining.
*/
public Builder setTextBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
text_ = 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:yandex.cloud.ai.vision.v1.Entity)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.ai.vision.v1.Entity)
private static final yandex.cloud.api.ai.vision.v1.TextDetection.Entity DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.ai.vision.v1.TextDetection.Entity();
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Entity getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Entity parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Entity(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 yandex.cloud.api.ai.vision.v1.TextDetection.Entity getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface BlockOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.ai.vision.v1.Block)
com.google.protobuf.MessageOrBuilder {
/**
*
* Area on the page where the text block is located.
*
*
* .yandex.cloud.ai.vision.v1.Polygon bounding_box = 1;
* @return Whether the boundingBox field is set.
*/
boolean hasBoundingBox();
/**
*
* Area on the page where the text block is located.
*
*
* .yandex.cloud.ai.vision.v1.Polygon bounding_box = 1;
* @return The boundingBox.
*/
yandex.cloud.api.ai.vision.v1.Primitives.Polygon getBoundingBox();
/**
*
* Area on the page where the text block is located.
*
*
* .yandex.cloud.ai.vision.v1.Polygon bounding_box = 1;
*/
yandex.cloud.api.ai.vision.v1.Primitives.PolygonOrBuilder getBoundingBoxOrBuilder();
/**
*
* Recognized lines in this block.
*
*
* repeated .yandex.cloud.ai.vision.v1.Line lines = 2;
*/
java.util.List
getLinesList();
/**
*
* Recognized lines in this block.
*
*
* repeated .yandex.cloud.ai.vision.v1.Line lines = 2;
*/
yandex.cloud.api.ai.vision.v1.TextDetection.Line getLines(int index);
/**
*
* Recognized lines in this block.
*
*
* repeated .yandex.cloud.ai.vision.v1.Line lines = 2;
*/
int getLinesCount();
/**
*
* Recognized lines in this block.
*
*
* repeated .yandex.cloud.ai.vision.v1.Line lines = 2;
*/
java.util.List extends yandex.cloud.api.ai.vision.v1.TextDetection.LineOrBuilder>
getLinesOrBuilderList();
/**
*
* Recognized lines in this block.
*
*
* repeated .yandex.cloud.ai.vision.v1.Line lines = 2;
*/
yandex.cloud.api.ai.vision.v1.TextDetection.LineOrBuilder getLinesOrBuilder(
int index);
}
/**
* Protobuf type {@code yandex.cloud.ai.vision.v1.Block}
*/
public static final class Block extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.ai.vision.v1.Block)
BlockOrBuilder {
private static final long serialVersionUID = 0L;
// Use Block.newBuilder() to construct.
private Block(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Block() {
lines_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Block();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Block(
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: {
yandex.cloud.api.ai.vision.v1.Primitives.Polygon.Builder subBuilder = null;
if (boundingBox_ != null) {
subBuilder = boundingBox_.toBuilder();
}
boundingBox_ = input.readMessage(yandex.cloud.api.ai.vision.v1.Primitives.Polygon.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(boundingBox_);
boundingBox_ = subBuilder.buildPartial();
}
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
lines_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
lines_.add(
input.readMessage(yandex.cloud.api.ai.vision.v1.TextDetection.Line.parser(), extensionRegistry));
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
lines_ = java.util.Collections.unmodifiableList(lines_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.vision.v1.TextDetection.internal_static_yandex_cloud_ai_vision_v1_Block_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.vision.v1.TextDetection.internal_static_yandex_cloud_ai_vision_v1_Block_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.vision.v1.TextDetection.Block.class, yandex.cloud.api.ai.vision.v1.TextDetection.Block.Builder.class);
}
public static final int BOUNDING_BOX_FIELD_NUMBER = 1;
private yandex.cloud.api.ai.vision.v1.Primitives.Polygon boundingBox_;
/**
*
* Area on the page where the text block is located.
*
*
* .yandex.cloud.ai.vision.v1.Polygon bounding_box = 1;
* @return Whether the boundingBox field is set.
*/
@java.lang.Override
public boolean hasBoundingBox() {
return boundingBox_ != null;
}
/**
*
* Area on the page where the text block is located.
*
*
* .yandex.cloud.ai.vision.v1.Polygon bounding_box = 1;
* @return The boundingBox.
*/
@java.lang.Override
public yandex.cloud.api.ai.vision.v1.Primitives.Polygon getBoundingBox() {
return boundingBox_ == null ? yandex.cloud.api.ai.vision.v1.Primitives.Polygon.getDefaultInstance() : boundingBox_;
}
/**
*
* Area on the page where the text block is located.
*
*
* .yandex.cloud.ai.vision.v1.Polygon bounding_box = 1;
*/
@java.lang.Override
public yandex.cloud.api.ai.vision.v1.Primitives.PolygonOrBuilder getBoundingBoxOrBuilder() {
return getBoundingBox();
}
public static final int LINES_FIELD_NUMBER = 2;
private java.util.List lines_;
/**
*
* Recognized lines in this block.
*
*
* repeated .yandex.cloud.ai.vision.v1.Line lines = 2;
*/
@java.lang.Override
public java.util.List getLinesList() {
return lines_;
}
/**
*
* Recognized lines in this block.
*
*
* repeated .yandex.cloud.ai.vision.v1.Line lines = 2;
*/
@java.lang.Override
public java.util.List extends yandex.cloud.api.ai.vision.v1.TextDetection.LineOrBuilder>
getLinesOrBuilderList() {
return lines_;
}
/**
*
* Recognized lines in this block.
*
*
* repeated .yandex.cloud.ai.vision.v1.Line lines = 2;
*/
@java.lang.Override
public int getLinesCount() {
return lines_.size();
}
/**
*
* Recognized lines in this block.
*
*
* repeated .yandex.cloud.ai.vision.v1.Line lines = 2;
*/
@java.lang.Override
public yandex.cloud.api.ai.vision.v1.TextDetection.Line getLines(int index) {
return lines_.get(index);
}
/**
*
* Recognized lines in this block.
*
*
* repeated .yandex.cloud.ai.vision.v1.Line lines = 2;
*/
@java.lang.Override
public yandex.cloud.api.ai.vision.v1.TextDetection.LineOrBuilder getLinesOrBuilder(
int index) {
return lines_.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 (boundingBox_ != null) {
output.writeMessage(1, getBoundingBox());
}
for (int i = 0; i < lines_.size(); i++) {
output.writeMessage(2, lines_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (boundingBox_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getBoundingBox());
}
for (int i = 0; i < lines_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, lines_.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 yandex.cloud.api.ai.vision.v1.TextDetection.Block)) {
return super.equals(obj);
}
yandex.cloud.api.ai.vision.v1.TextDetection.Block other = (yandex.cloud.api.ai.vision.v1.TextDetection.Block) obj;
if (hasBoundingBox() != other.hasBoundingBox()) return false;
if (hasBoundingBox()) {
if (!getBoundingBox()
.equals(other.getBoundingBox())) return false;
}
if (!getLinesList()
.equals(other.getLinesList())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasBoundingBox()) {
hash = (37 * hash) + BOUNDING_BOX_FIELD_NUMBER;
hash = (53 * hash) + getBoundingBox().hashCode();
}
if (getLinesCount() > 0) {
hash = (37 * hash) + LINES_FIELD_NUMBER;
hash = (53 * hash) + getLinesList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Block parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Block parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Block parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Block parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Block parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Block parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Block parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Block 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 yandex.cloud.api.ai.vision.v1.TextDetection.Block parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Block 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 yandex.cloud.api.ai.vision.v1.TextDetection.Block parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Block 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(yandex.cloud.api.ai.vision.v1.TextDetection.Block 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 yandex.cloud.ai.vision.v1.Block}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.ai.vision.v1.Block)
yandex.cloud.api.ai.vision.v1.TextDetection.BlockOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.vision.v1.TextDetection.internal_static_yandex_cloud_ai_vision_v1_Block_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.vision.v1.TextDetection.internal_static_yandex_cloud_ai_vision_v1_Block_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.vision.v1.TextDetection.Block.class, yandex.cloud.api.ai.vision.v1.TextDetection.Block.Builder.class);
}
// Construct using yandex.cloud.api.ai.vision.v1.TextDetection.Block.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getLinesFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (boundingBoxBuilder_ == null) {
boundingBox_ = null;
} else {
boundingBox_ = null;
boundingBoxBuilder_ = null;
}
if (linesBuilder_ == null) {
lines_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
linesBuilder_.clear();
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.ai.vision.v1.TextDetection.internal_static_yandex_cloud_ai_vision_v1_Block_descriptor;
}
@java.lang.Override
public yandex.cloud.api.ai.vision.v1.TextDetection.Block getDefaultInstanceForType() {
return yandex.cloud.api.ai.vision.v1.TextDetection.Block.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.ai.vision.v1.TextDetection.Block build() {
yandex.cloud.api.ai.vision.v1.TextDetection.Block result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.ai.vision.v1.TextDetection.Block buildPartial() {
yandex.cloud.api.ai.vision.v1.TextDetection.Block result = new yandex.cloud.api.ai.vision.v1.TextDetection.Block(this);
int from_bitField0_ = bitField0_;
if (boundingBoxBuilder_ == null) {
result.boundingBox_ = boundingBox_;
} else {
result.boundingBox_ = boundingBoxBuilder_.build();
}
if (linesBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
lines_ = java.util.Collections.unmodifiableList(lines_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.lines_ = lines_;
} else {
result.lines_ = linesBuilder_.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 yandex.cloud.api.ai.vision.v1.TextDetection.Block) {
return mergeFrom((yandex.cloud.api.ai.vision.v1.TextDetection.Block)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.ai.vision.v1.TextDetection.Block other) {
if (other == yandex.cloud.api.ai.vision.v1.TextDetection.Block.getDefaultInstance()) return this;
if (other.hasBoundingBox()) {
mergeBoundingBox(other.getBoundingBox());
}
if (linesBuilder_ == null) {
if (!other.lines_.isEmpty()) {
if (lines_.isEmpty()) {
lines_ = other.lines_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureLinesIsMutable();
lines_.addAll(other.lines_);
}
onChanged();
}
} else {
if (!other.lines_.isEmpty()) {
if (linesBuilder_.isEmpty()) {
linesBuilder_.dispose();
linesBuilder_ = null;
lines_ = other.lines_;
bitField0_ = (bitField0_ & ~0x00000001);
linesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getLinesFieldBuilder() : null;
} else {
linesBuilder_.addAllMessages(other.lines_);
}
}
}
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 {
yandex.cloud.api.ai.vision.v1.TextDetection.Block parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.ai.vision.v1.TextDetection.Block) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private yandex.cloud.api.ai.vision.v1.Primitives.Polygon boundingBox_;
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.ai.vision.v1.Primitives.Polygon, yandex.cloud.api.ai.vision.v1.Primitives.Polygon.Builder, yandex.cloud.api.ai.vision.v1.Primitives.PolygonOrBuilder> boundingBoxBuilder_;
/**
*
* Area on the page where the text block is located.
*
*
* .yandex.cloud.ai.vision.v1.Polygon bounding_box = 1;
* @return Whether the boundingBox field is set.
*/
public boolean hasBoundingBox() {
return boundingBoxBuilder_ != null || boundingBox_ != null;
}
/**
*
* Area on the page where the text block is located.
*
*
* .yandex.cloud.ai.vision.v1.Polygon bounding_box = 1;
* @return The boundingBox.
*/
public yandex.cloud.api.ai.vision.v1.Primitives.Polygon getBoundingBox() {
if (boundingBoxBuilder_ == null) {
return boundingBox_ == null ? yandex.cloud.api.ai.vision.v1.Primitives.Polygon.getDefaultInstance() : boundingBox_;
} else {
return boundingBoxBuilder_.getMessage();
}
}
/**
*
* Area on the page where the text block is located.
*
*
* .yandex.cloud.ai.vision.v1.Polygon bounding_box = 1;
*/
public Builder setBoundingBox(yandex.cloud.api.ai.vision.v1.Primitives.Polygon value) {
if (boundingBoxBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
boundingBox_ = value;
onChanged();
} else {
boundingBoxBuilder_.setMessage(value);
}
return this;
}
/**
*
* Area on the page where the text block is located.
*
*
* .yandex.cloud.ai.vision.v1.Polygon bounding_box = 1;
*/
public Builder setBoundingBox(
yandex.cloud.api.ai.vision.v1.Primitives.Polygon.Builder builderForValue) {
if (boundingBoxBuilder_ == null) {
boundingBox_ = builderForValue.build();
onChanged();
} else {
boundingBoxBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Area on the page where the text block is located.
*
*
* .yandex.cloud.ai.vision.v1.Polygon bounding_box = 1;
*/
public Builder mergeBoundingBox(yandex.cloud.api.ai.vision.v1.Primitives.Polygon value) {
if (boundingBoxBuilder_ == null) {
if (boundingBox_ != null) {
boundingBox_ =
yandex.cloud.api.ai.vision.v1.Primitives.Polygon.newBuilder(boundingBox_).mergeFrom(value).buildPartial();
} else {
boundingBox_ = value;
}
onChanged();
} else {
boundingBoxBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Area on the page where the text block is located.
*
*
* .yandex.cloud.ai.vision.v1.Polygon bounding_box = 1;
*/
public Builder clearBoundingBox() {
if (boundingBoxBuilder_ == null) {
boundingBox_ = null;
onChanged();
} else {
boundingBox_ = null;
boundingBoxBuilder_ = null;
}
return this;
}
/**
*
* Area on the page where the text block is located.
*
*
* .yandex.cloud.ai.vision.v1.Polygon bounding_box = 1;
*/
public yandex.cloud.api.ai.vision.v1.Primitives.Polygon.Builder getBoundingBoxBuilder() {
onChanged();
return getBoundingBoxFieldBuilder().getBuilder();
}
/**
*
* Area on the page where the text block is located.
*
*
* .yandex.cloud.ai.vision.v1.Polygon bounding_box = 1;
*/
public yandex.cloud.api.ai.vision.v1.Primitives.PolygonOrBuilder getBoundingBoxOrBuilder() {
if (boundingBoxBuilder_ != null) {
return boundingBoxBuilder_.getMessageOrBuilder();
} else {
return boundingBox_ == null ?
yandex.cloud.api.ai.vision.v1.Primitives.Polygon.getDefaultInstance() : boundingBox_;
}
}
/**
*
* Area on the page where the text block is located.
*
*
* .yandex.cloud.ai.vision.v1.Polygon bounding_box = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.ai.vision.v1.Primitives.Polygon, yandex.cloud.api.ai.vision.v1.Primitives.Polygon.Builder, yandex.cloud.api.ai.vision.v1.Primitives.PolygonOrBuilder>
getBoundingBoxFieldBuilder() {
if (boundingBoxBuilder_ == null) {
boundingBoxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.ai.vision.v1.Primitives.Polygon, yandex.cloud.api.ai.vision.v1.Primitives.Polygon.Builder, yandex.cloud.api.ai.vision.v1.Primitives.PolygonOrBuilder>(
getBoundingBox(),
getParentForChildren(),
isClean());
boundingBox_ = null;
}
return boundingBoxBuilder_;
}
private java.util.List lines_ =
java.util.Collections.emptyList();
private void ensureLinesIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
lines_ = new java.util.ArrayList(lines_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.ai.vision.v1.TextDetection.Line, yandex.cloud.api.ai.vision.v1.TextDetection.Line.Builder, yandex.cloud.api.ai.vision.v1.TextDetection.LineOrBuilder> linesBuilder_;
/**
*
* Recognized lines in this block.
*
*
* repeated .yandex.cloud.ai.vision.v1.Line lines = 2;
*/
public java.util.List getLinesList() {
if (linesBuilder_ == null) {
return java.util.Collections.unmodifiableList(lines_);
} else {
return linesBuilder_.getMessageList();
}
}
/**
*
* Recognized lines in this block.
*
*
* repeated .yandex.cloud.ai.vision.v1.Line lines = 2;
*/
public int getLinesCount() {
if (linesBuilder_ == null) {
return lines_.size();
} else {
return linesBuilder_.getCount();
}
}
/**
*
* Recognized lines in this block.
*
*
* repeated .yandex.cloud.ai.vision.v1.Line lines = 2;
*/
public yandex.cloud.api.ai.vision.v1.TextDetection.Line getLines(int index) {
if (linesBuilder_ == null) {
return lines_.get(index);
} else {
return linesBuilder_.getMessage(index);
}
}
/**
*
* Recognized lines in this block.
*
*
* repeated .yandex.cloud.ai.vision.v1.Line lines = 2;
*/
public Builder setLines(
int index, yandex.cloud.api.ai.vision.v1.TextDetection.Line value) {
if (linesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLinesIsMutable();
lines_.set(index, value);
onChanged();
} else {
linesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Recognized lines in this block.
*
*
* repeated .yandex.cloud.ai.vision.v1.Line lines = 2;
*/
public Builder setLines(
int index, yandex.cloud.api.ai.vision.v1.TextDetection.Line.Builder builderForValue) {
if (linesBuilder_ == null) {
ensureLinesIsMutable();
lines_.set(index, builderForValue.build());
onChanged();
} else {
linesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Recognized lines in this block.
*
*
* repeated .yandex.cloud.ai.vision.v1.Line lines = 2;
*/
public Builder addLines(yandex.cloud.api.ai.vision.v1.TextDetection.Line value) {
if (linesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLinesIsMutable();
lines_.add(value);
onChanged();
} else {
linesBuilder_.addMessage(value);
}
return this;
}
/**
*
* Recognized lines in this block.
*
*
* repeated .yandex.cloud.ai.vision.v1.Line lines = 2;
*/
public Builder addLines(
int index, yandex.cloud.api.ai.vision.v1.TextDetection.Line value) {
if (linesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLinesIsMutable();
lines_.add(index, value);
onChanged();
} else {
linesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Recognized lines in this block.
*
*
* repeated .yandex.cloud.ai.vision.v1.Line lines = 2;
*/
public Builder addLines(
yandex.cloud.api.ai.vision.v1.TextDetection.Line.Builder builderForValue) {
if (linesBuilder_ == null) {
ensureLinesIsMutable();
lines_.add(builderForValue.build());
onChanged();
} else {
linesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Recognized lines in this block.
*
*
* repeated .yandex.cloud.ai.vision.v1.Line lines = 2;
*/
public Builder addLines(
int index, yandex.cloud.api.ai.vision.v1.TextDetection.Line.Builder builderForValue) {
if (linesBuilder_ == null) {
ensureLinesIsMutable();
lines_.add(index, builderForValue.build());
onChanged();
} else {
linesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Recognized lines in this block.
*
*
* repeated .yandex.cloud.ai.vision.v1.Line lines = 2;
*/
public Builder addAllLines(
java.lang.Iterable extends yandex.cloud.api.ai.vision.v1.TextDetection.Line> values) {
if (linesBuilder_ == null) {
ensureLinesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, lines_);
onChanged();
} else {
linesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Recognized lines in this block.
*
*
* repeated .yandex.cloud.ai.vision.v1.Line lines = 2;
*/
public Builder clearLines() {
if (linesBuilder_ == null) {
lines_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
linesBuilder_.clear();
}
return this;
}
/**
*
* Recognized lines in this block.
*
*
* repeated .yandex.cloud.ai.vision.v1.Line lines = 2;
*/
public Builder removeLines(int index) {
if (linesBuilder_ == null) {
ensureLinesIsMutable();
lines_.remove(index);
onChanged();
} else {
linesBuilder_.remove(index);
}
return this;
}
/**
*
* Recognized lines in this block.
*
*
* repeated .yandex.cloud.ai.vision.v1.Line lines = 2;
*/
public yandex.cloud.api.ai.vision.v1.TextDetection.Line.Builder getLinesBuilder(
int index) {
return getLinesFieldBuilder().getBuilder(index);
}
/**
*
* Recognized lines in this block.
*
*
* repeated .yandex.cloud.ai.vision.v1.Line lines = 2;
*/
public yandex.cloud.api.ai.vision.v1.TextDetection.LineOrBuilder getLinesOrBuilder(
int index) {
if (linesBuilder_ == null) {
return lines_.get(index); } else {
return linesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Recognized lines in this block.
*
*
* repeated .yandex.cloud.ai.vision.v1.Line lines = 2;
*/
public java.util.List extends yandex.cloud.api.ai.vision.v1.TextDetection.LineOrBuilder>
getLinesOrBuilderList() {
if (linesBuilder_ != null) {
return linesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(lines_);
}
}
/**
*
* Recognized lines in this block.
*
*
* repeated .yandex.cloud.ai.vision.v1.Line lines = 2;
*/
public yandex.cloud.api.ai.vision.v1.TextDetection.Line.Builder addLinesBuilder() {
return getLinesFieldBuilder().addBuilder(
yandex.cloud.api.ai.vision.v1.TextDetection.Line.getDefaultInstance());
}
/**
*
* Recognized lines in this block.
*
*
* repeated .yandex.cloud.ai.vision.v1.Line lines = 2;
*/
public yandex.cloud.api.ai.vision.v1.TextDetection.Line.Builder addLinesBuilder(
int index) {
return getLinesFieldBuilder().addBuilder(
index, yandex.cloud.api.ai.vision.v1.TextDetection.Line.getDefaultInstance());
}
/**
*
* Recognized lines in this block.
*
*
* repeated .yandex.cloud.ai.vision.v1.Line lines = 2;
*/
public java.util.List
getLinesBuilderList() {
return getLinesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.ai.vision.v1.TextDetection.Line, yandex.cloud.api.ai.vision.v1.TextDetection.Line.Builder, yandex.cloud.api.ai.vision.v1.TextDetection.LineOrBuilder>
getLinesFieldBuilder() {
if (linesBuilder_ == null) {
linesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.ai.vision.v1.TextDetection.Line, yandex.cloud.api.ai.vision.v1.TextDetection.Line.Builder, yandex.cloud.api.ai.vision.v1.TextDetection.LineOrBuilder>(
lines_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
lines_ = null;
}
return linesBuilder_;
}
@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:yandex.cloud.ai.vision.v1.Block)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.ai.vision.v1.Block)
private static final yandex.cloud.api.ai.vision.v1.TextDetection.Block DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.ai.vision.v1.TextDetection.Block();
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Block getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Block parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Block(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 yandex.cloud.api.ai.vision.v1.TextDetection.Block getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface LineOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.ai.vision.v1.Line)
com.google.protobuf.MessageOrBuilder {
/**
*
* Area on the page where the line is located.
*
*
* .yandex.cloud.ai.vision.v1.Polygon bounding_box = 1;
* @return Whether the boundingBox field is set.
*/
boolean hasBoundingBox();
/**
*
* Area on the page where the line is located.
*
*
* .yandex.cloud.ai.vision.v1.Polygon bounding_box = 1;
* @return The boundingBox.
*/
yandex.cloud.api.ai.vision.v1.Primitives.Polygon getBoundingBox();
/**
*
* Area on the page where the line is located.
*
*
* .yandex.cloud.ai.vision.v1.Polygon bounding_box = 1;
*/
yandex.cloud.api.ai.vision.v1.Primitives.PolygonOrBuilder getBoundingBoxOrBuilder();
/**
*
* Recognized words in this line.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word words = 2;
*/
java.util.List
getWordsList();
/**
*
* Recognized words in this line.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word words = 2;
*/
yandex.cloud.api.ai.vision.v1.TextDetection.Word getWords(int index);
/**
*
* Recognized words in this line.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word words = 2;
*/
int getWordsCount();
/**
*
* Recognized words in this line.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word words = 2;
*/
java.util.List extends yandex.cloud.api.ai.vision.v1.TextDetection.WordOrBuilder>
getWordsOrBuilderList();
/**
*
* Recognized words in this line.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word words = 2;
*/
yandex.cloud.api.ai.vision.v1.TextDetection.WordOrBuilder getWordsOrBuilder(
int index);
/**
*
* Confidence of the OCR results for the line. Range [0, 1].
*
*
* double confidence = 3;
* @return The confidence.
*/
double getConfidence();
}
/**
* Protobuf type {@code yandex.cloud.ai.vision.v1.Line}
*/
public static final class Line extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.ai.vision.v1.Line)
LineOrBuilder {
private static final long serialVersionUID = 0L;
// Use Line.newBuilder() to construct.
private Line(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Line() {
words_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Line();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Line(
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: {
yandex.cloud.api.ai.vision.v1.Primitives.Polygon.Builder subBuilder = null;
if (boundingBox_ != null) {
subBuilder = boundingBox_.toBuilder();
}
boundingBox_ = input.readMessage(yandex.cloud.api.ai.vision.v1.Primitives.Polygon.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(boundingBox_);
boundingBox_ = subBuilder.buildPartial();
}
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
words_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
words_.add(
input.readMessage(yandex.cloud.api.ai.vision.v1.TextDetection.Word.parser(), extensionRegistry));
break;
}
case 25: {
confidence_ = input.readDouble();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
words_ = java.util.Collections.unmodifiableList(words_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.vision.v1.TextDetection.internal_static_yandex_cloud_ai_vision_v1_Line_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.vision.v1.TextDetection.internal_static_yandex_cloud_ai_vision_v1_Line_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.vision.v1.TextDetection.Line.class, yandex.cloud.api.ai.vision.v1.TextDetection.Line.Builder.class);
}
public static final int BOUNDING_BOX_FIELD_NUMBER = 1;
private yandex.cloud.api.ai.vision.v1.Primitives.Polygon boundingBox_;
/**
*
* Area on the page where the line is located.
*
*
* .yandex.cloud.ai.vision.v1.Polygon bounding_box = 1;
* @return Whether the boundingBox field is set.
*/
@java.lang.Override
public boolean hasBoundingBox() {
return boundingBox_ != null;
}
/**
*
* Area on the page where the line is located.
*
*
* .yandex.cloud.ai.vision.v1.Polygon bounding_box = 1;
* @return The boundingBox.
*/
@java.lang.Override
public yandex.cloud.api.ai.vision.v1.Primitives.Polygon getBoundingBox() {
return boundingBox_ == null ? yandex.cloud.api.ai.vision.v1.Primitives.Polygon.getDefaultInstance() : boundingBox_;
}
/**
*
* Area on the page where the line is located.
*
*
* .yandex.cloud.ai.vision.v1.Polygon bounding_box = 1;
*/
@java.lang.Override
public yandex.cloud.api.ai.vision.v1.Primitives.PolygonOrBuilder getBoundingBoxOrBuilder() {
return getBoundingBox();
}
public static final int WORDS_FIELD_NUMBER = 2;
private java.util.List words_;
/**
*
* Recognized words in this line.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word words = 2;
*/
@java.lang.Override
public java.util.List getWordsList() {
return words_;
}
/**
*
* Recognized words in this line.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word words = 2;
*/
@java.lang.Override
public java.util.List extends yandex.cloud.api.ai.vision.v1.TextDetection.WordOrBuilder>
getWordsOrBuilderList() {
return words_;
}
/**
*
* Recognized words in this line.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word words = 2;
*/
@java.lang.Override
public int getWordsCount() {
return words_.size();
}
/**
*
* Recognized words in this line.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word words = 2;
*/
@java.lang.Override
public yandex.cloud.api.ai.vision.v1.TextDetection.Word getWords(int index) {
return words_.get(index);
}
/**
*
* Recognized words in this line.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word words = 2;
*/
@java.lang.Override
public yandex.cloud.api.ai.vision.v1.TextDetection.WordOrBuilder getWordsOrBuilder(
int index) {
return words_.get(index);
}
public static final int CONFIDENCE_FIELD_NUMBER = 3;
private double confidence_;
/**
*
* Confidence of the OCR results for the line. Range [0, 1].
*
*
* double confidence = 3;
* @return The confidence.
*/
@java.lang.Override
public double getConfidence() {
return confidence_;
}
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 (boundingBox_ != null) {
output.writeMessage(1, getBoundingBox());
}
for (int i = 0; i < words_.size(); i++) {
output.writeMessage(2, words_.get(i));
}
if (java.lang.Double.doubleToRawLongBits(confidence_) != 0) {
output.writeDouble(3, confidence_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (boundingBox_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getBoundingBox());
}
for (int i = 0; i < words_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, words_.get(i));
}
if (java.lang.Double.doubleToRawLongBits(confidence_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(3, confidence_);
}
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 yandex.cloud.api.ai.vision.v1.TextDetection.Line)) {
return super.equals(obj);
}
yandex.cloud.api.ai.vision.v1.TextDetection.Line other = (yandex.cloud.api.ai.vision.v1.TextDetection.Line) obj;
if (hasBoundingBox() != other.hasBoundingBox()) return false;
if (hasBoundingBox()) {
if (!getBoundingBox()
.equals(other.getBoundingBox())) return false;
}
if (!getWordsList()
.equals(other.getWordsList())) return false;
if (java.lang.Double.doubleToLongBits(getConfidence())
!= java.lang.Double.doubleToLongBits(
other.getConfidence())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasBoundingBox()) {
hash = (37 * hash) + BOUNDING_BOX_FIELD_NUMBER;
hash = (53 * hash) + getBoundingBox().hashCode();
}
if (getWordsCount() > 0) {
hash = (37 * hash) + WORDS_FIELD_NUMBER;
hash = (53 * hash) + getWordsList().hashCode();
}
hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getConfidence()));
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Line parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Line parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Line parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Line parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Line parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Line parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Line parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Line 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 yandex.cloud.api.ai.vision.v1.TextDetection.Line parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Line 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 yandex.cloud.api.ai.vision.v1.TextDetection.Line parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Line 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(yandex.cloud.api.ai.vision.v1.TextDetection.Line 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 yandex.cloud.ai.vision.v1.Line}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.ai.vision.v1.Line)
yandex.cloud.api.ai.vision.v1.TextDetection.LineOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.vision.v1.TextDetection.internal_static_yandex_cloud_ai_vision_v1_Line_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.vision.v1.TextDetection.internal_static_yandex_cloud_ai_vision_v1_Line_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.vision.v1.TextDetection.Line.class, yandex.cloud.api.ai.vision.v1.TextDetection.Line.Builder.class);
}
// Construct using yandex.cloud.api.ai.vision.v1.TextDetection.Line.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getWordsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (boundingBoxBuilder_ == null) {
boundingBox_ = null;
} else {
boundingBox_ = null;
boundingBoxBuilder_ = null;
}
if (wordsBuilder_ == null) {
words_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
wordsBuilder_.clear();
}
confidence_ = 0D;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.ai.vision.v1.TextDetection.internal_static_yandex_cloud_ai_vision_v1_Line_descriptor;
}
@java.lang.Override
public yandex.cloud.api.ai.vision.v1.TextDetection.Line getDefaultInstanceForType() {
return yandex.cloud.api.ai.vision.v1.TextDetection.Line.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.ai.vision.v1.TextDetection.Line build() {
yandex.cloud.api.ai.vision.v1.TextDetection.Line result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.ai.vision.v1.TextDetection.Line buildPartial() {
yandex.cloud.api.ai.vision.v1.TextDetection.Line result = new yandex.cloud.api.ai.vision.v1.TextDetection.Line(this);
int from_bitField0_ = bitField0_;
if (boundingBoxBuilder_ == null) {
result.boundingBox_ = boundingBox_;
} else {
result.boundingBox_ = boundingBoxBuilder_.build();
}
if (wordsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
words_ = java.util.Collections.unmodifiableList(words_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.words_ = words_;
} else {
result.words_ = wordsBuilder_.build();
}
result.confidence_ = confidence_;
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 yandex.cloud.api.ai.vision.v1.TextDetection.Line) {
return mergeFrom((yandex.cloud.api.ai.vision.v1.TextDetection.Line)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.ai.vision.v1.TextDetection.Line other) {
if (other == yandex.cloud.api.ai.vision.v1.TextDetection.Line.getDefaultInstance()) return this;
if (other.hasBoundingBox()) {
mergeBoundingBox(other.getBoundingBox());
}
if (wordsBuilder_ == null) {
if (!other.words_.isEmpty()) {
if (words_.isEmpty()) {
words_ = other.words_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureWordsIsMutable();
words_.addAll(other.words_);
}
onChanged();
}
} else {
if (!other.words_.isEmpty()) {
if (wordsBuilder_.isEmpty()) {
wordsBuilder_.dispose();
wordsBuilder_ = null;
words_ = other.words_;
bitField0_ = (bitField0_ & ~0x00000001);
wordsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getWordsFieldBuilder() : null;
} else {
wordsBuilder_.addAllMessages(other.words_);
}
}
}
if (other.getConfidence() != 0D) {
setConfidence(other.getConfidence());
}
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 {
yandex.cloud.api.ai.vision.v1.TextDetection.Line parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.ai.vision.v1.TextDetection.Line) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private yandex.cloud.api.ai.vision.v1.Primitives.Polygon boundingBox_;
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.ai.vision.v1.Primitives.Polygon, yandex.cloud.api.ai.vision.v1.Primitives.Polygon.Builder, yandex.cloud.api.ai.vision.v1.Primitives.PolygonOrBuilder> boundingBoxBuilder_;
/**
*
* Area on the page where the line is located.
*
*
* .yandex.cloud.ai.vision.v1.Polygon bounding_box = 1;
* @return Whether the boundingBox field is set.
*/
public boolean hasBoundingBox() {
return boundingBoxBuilder_ != null || boundingBox_ != null;
}
/**
*
* Area on the page where the line is located.
*
*
* .yandex.cloud.ai.vision.v1.Polygon bounding_box = 1;
* @return The boundingBox.
*/
public yandex.cloud.api.ai.vision.v1.Primitives.Polygon getBoundingBox() {
if (boundingBoxBuilder_ == null) {
return boundingBox_ == null ? yandex.cloud.api.ai.vision.v1.Primitives.Polygon.getDefaultInstance() : boundingBox_;
} else {
return boundingBoxBuilder_.getMessage();
}
}
/**
*
* Area on the page where the line is located.
*
*
* .yandex.cloud.ai.vision.v1.Polygon bounding_box = 1;
*/
public Builder setBoundingBox(yandex.cloud.api.ai.vision.v1.Primitives.Polygon value) {
if (boundingBoxBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
boundingBox_ = value;
onChanged();
} else {
boundingBoxBuilder_.setMessage(value);
}
return this;
}
/**
*
* Area on the page where the line is located.
*
*
* .yandex.cloud.ai.vision.v1.Polygon bounding_box = 1;
*/
public Builder setBoundingBox(
yandex.cloud.api.ai.vision.v1.Primitives.Polygon.Builder builderForValue) {
if (boundingBoxBuilder_ == null) {
boundingBox_ = builderForValue.build();
onChanged();
} else {
boundingBoxBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Area on the page where the line is located.
*
*
* .yandex.cloud.ai.vision.v1.Polygon bounding_box = 1;
*/
public Builder mergeBoundingBox(yandex.cloud.api.ai.vision.v1.Primitives.Polygon value) {
if (boundingBoxBuilder_ == null) {
if (boundingBox_ != null) {
boundingBox_ =
yandex.cloud.api.ai.vision.v1.Primitives.Polygon.newBuilder(boundingBox_).mergeFrom(value).buildPartial();
} else {
boundingBox_ = value;
}
onChanged();
} else {
boundingBoxBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Area on the page where the line is located.
*
*
* .yandex.cloud.ai.vision.v1.Polygon bounding_box = 1;
*/
public Builder clearBoundingBox() {
if (boundingBoxBuilder_ == null) {
boundingBox_ = null;
onChanged();
} else {
boundingBox_ = null;
boundingBoxBuilder_ = null;
}
return this;
}
/**
*
* Area on the page where the line is located.
*
*
* .yandex.cloud.ai.vision.v1.Polygon bounding_box = 1;
*/
public yandex.cloud.api.ai.vision.v1.Primitives.Polygon.Builder getBoundingBoxBuilder() {
onChanged();
return getBoundingBoxFieldBuilder().getBuilder();
}
/**
*
* Area on the page where the line is located.
*
*
* .yandex.cloud.ai.vision.v1.Polygon bounding_box = 1;
*/
public yandex.cloud.api.ai.vision.v1.Primitives.PolygonOrBuilder getBoundingBoxOrBuilder() {
if (boundingBoxBuilder_ != null) {
return boundingBoxBuilder_.getMessageOrBuilder();
} else {
return boundingBox_ == null ?
yandex.cloud.api.ai.vision.v1.Primitives.Polygon.getDefaultInstance() : boundingBox_;
}
}
/**
*
* Area on the page where the line is located.
*
*
* .yandex.cloud.ai.vision.v1.Polygon bounding_box = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.ai.vision.v1.Primitives.Polygon, yandex.cloud.api.ai.vision.v1.Primitives.Polygon.Builder, yandex.cloud.api.ai.vision.v1.Primitives.PolygonOrBuilder>
getBoundingBoxFieldBuilder() {
if (boundingBoxBuilder_ == null) {
boundingBoxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.ai.vision.v1.Primitives.Polygon, yandex.cloud.api.ai.vision.v1.Primitives.Polygon.Builder, yandex.cloud.api.ai.vision.v1.Primitives.PolygonOrBuilder>(
getBoundingBox(),
getParentForChildren(),
isClean());
boundingBox_ = null;
}
return boundingBoxBuilder_;
}
private java.util.List words_ =
java.util.Collections.emptyList();
private void ensureWordsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
words_ = new java.util.ArrayList(words_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.ai.vision.v1.TextDetection.Word, yandex.cloud.api.ai.vision.v1.TextDetection.Word.Builder, yandex.cloud.api.ai.vision.v1.TextDetection.WordOrBuilder> wordsBuilder_;
/**
*
* Recognized words in this line.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word words = 2;
*/
public java.util.List getWordsList() {
if (wordsBuilder_ == null) {
return java.util.Collections.unmodifiableList(words_);
} else {
return wordsBuilder_.getMessageList();
}
}
/**
*
* Recognized words in this line.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word words = 2;
*/
public int getWordsCount() {
if (wordsBuilder_ == null) {
return words_.size();
} else {
return wordsBuilder_.getCount();
}
}
/**
*
* Recognized words in this line.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word words = 2;
*/
public yandex.cloud.api.ai.vision.v1.TextDetection.Word getWords(int index) {
if (wordsBuilder_ == null) {
return words_.get(index);
} else {
return wordsBuilder_.getMessage(index);
}
}
/**
*
* Recognized words in this line.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word words = 2;
*/
public Builder setWords(
int index, yandex.cloud.api.ai.vision.v1.TextDetection.Word value) {
if (wordsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureWordsIsMutable();
words_.set(index, value);
onChanged();
} else {
wordsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Recognized words in this line.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word words = 2;
*/
public Builder setWords(
int index, yandex.cloud.api.ai.vision.v1.TextDetection.Word.Builder builderForValue) {
if (wordsBuilder_ == null) {
ensureWordsIsMutable();
words_.set(index, builderForValue.build());
onChanged();
} else {
wordsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Recognized words in this line.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word words = 2;
*/
public Builder addWords(yandex.cloud.api.ai.vision.v1.TextDetection.Word value) {
if (wordsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureWordsIsMutable();
words_.add(value);
onChanged();
} else {
wordsBuilder_.addMessage(value);
}
return this;
}
/**
*
* Recognized words in this line.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word words = 2;
*/
public Builder addWords(
int index, yandex.cloud.api.ai.vision.v1.TextDetection.Word value) {
if (wordsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureWordsIsMutable();
words_.add(index, value);
onChanged();
} else {
wordsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Recognized words in this line.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word words = 2;
*/
public Builder addWords(
yandex.cloud.api.ai.vision.v1.TextDetection.Word.Builder builderForValue) {
if (wordsBuilder_ == null) {
ensureWordsIsMutable();
words_.add(builderForValue.build());
onChanged();
} else {
wordsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Recognized words in this line.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word words = 2;
*/
public Builder addWords(
int index, yandex.cloud.api.ai.vision.v1.TextDetection.Word.Builder builderForValue) {
if (wordsBuilder_ == null) {
ensureWordsIsMutable();
words_.add(index, builderForValue.build());
onChanged();
} else {
wordsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Recognized words in this line.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word words = 2;
*/
public Builder addAllWords(
java.lang.Iterable extends yandex.cloud.api.ai.vision.v1.TextDetection.Word> values) {
if (wordsBuilder_ == null) {
ensureWordsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, words_);
onChanged();
} else {
wordsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Recognized words in this line.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word words = 2;
*/
public Builder clearWords() {
if (wordsBuilder_ == null) {
words_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
wordsBuilder_.clear();
}
return this;
}
/**
*
* Recognized words in this line.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word words = 2;
*/
public Builder removeWords(int index) {
if (wordsBuilder_ == null) {
ensureWordsIsMutable();
words_.remove(index);
onChanged();
} else {
wordsBuilder_.remove(index);
}
return this;
}
/**
*
* Recognized words in this line.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word words = 2;
*/
public yandex.cloud.api.ai.vision.v1.TextDetection.Word.Builder getWordsBuilder(
int index) {
return getWordsFieldBuilder().getBuilder(index);
}
/**
*
* Recognized words in this line.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word words = 2;
*/
public yandex.cloud.api.ai.vision.v1.TextDetection.WordOrBuilder getWordsOrBuilder(
int index) {
if (wordsBuilder_ == null) {
return words_.get(index); } else {
return wordsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Recognized words in this line.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word words = 2;
*/
public java.util.List extends yandex.cloud.api.ai.vision.v1.TextDetection.WordOrBuilder>
getWordsOrBuilderList() {
if (wordsBuilder_ != null) {
return wordsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(words_);
}
}
/**
*
* Recognized words in this line.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word words = 2;
*/
public yandex.cloud.api.ai.vision.v1.TextDetection.Word.Builder addWordsBuilder() {
return getWordsFieldBuilder().addBuilder(
yandex.cloud.api.ai.vision.v1.TextDetection.Word.getDefaultInstance());
}
/**
*
* Recognized words in this line.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word words = 2;
*/
public yandex.cloud.api.ai.vision.v1.TextDetection.Word.Builder addWordsBuilder(
int index) {
return getWordsFieldBuilder().addBuilder(
index, yandex.cloud.api.ai.vision.v1.TextDetection.Word.getDefaultInstance());
}
/**
*
* Recognized words in this line.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word words = 2;
*/
public java.util.List
getWordsBuilderList() {
return getWordsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.ai.vision.v1.TextDetection.Word, yandex.cloud.api.ai.vision.v1.TextDetection.Word.Builder, yandex.cloud.api.ai.vision.v1.TextDetection.WordOrBuilder>
getWordsFieldBuilder() {
if (wordsBuilder_ == null) {
wordsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.ai.vision.v1.TextDetection.Word, yandex.cloud.api.ai.vision.v1.TextDetection.Word.Builder, yandex.cloud.api.ai.vision.v1.TextDetection.WordOrBuilder>(
words_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
words_ = null;
}
return wordsBuilder_;
}
private double confidence_ ;
/**
*
* Confidence of the OCR results for the line. Range [0, 1].
*
*
* double confidence = 3;
* @return The confidence.
*/
@java.lang.Override
public double getConfidence() {
return confidence_;
}
/**
*
* Confidence of the OCR results for the line. Range [0, 1].
*
*
* double confidence = 3;
* @param value The confidence to set.
* @return This builder for chaining.
*/
public Builder setConfidence(double value) {
confidence_ = value;
onChanged();
return this;
}
/**
*
* Confidence of the OCR results for the line. Range [0, 1].
*
*
* double confidence = 3;
* @return This builder for chaining.
*/
public Builder clearConfidence() {
confidence_ = 0D;
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:yandex.cloud.ai.vision.v1.Line)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.ai.vision.v1.Line)
private static final yandex.cloud.api.ai.vision.v1.TextDetection.Line DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.ai.vision.v1.TextDetection.Line();
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Line getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Line parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Line(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 yandex.cloud.api.ai.vision.v1.TextDetection.Line getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface WordOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.ai.vision.v1.Word)
com.google.protobuf.MessageOrBuilder {
/**
*
* Area on the page where the word is located.
*
*
* .yandex.cloud.ai.vision.v1.Polygon bounding_box = 1;
* @return Whether the boundingBox field is set.
*/
boolean hasBoundingBox();
/**
*
* Area on the page where the word is located.
*
*
* .yandex.cloud.ai.vision.v1.Polygon bounding_box = 1;
* @return The boundingBox.
*/
yandex.cloud.api.ai.vision.v1.Primitives.Polygon getBoundingBox();
/**
*
* Area on the page where the word is located.
*
*
* .yandex.cloud.ai.vision.v1.Polygon bounding_box = 1;
*/
yandex.cloud.api.ai.vision.v1.Primitives.PolygonOrBuilder getBoundingBoxOrBuilder();
/**
*
* Recognized word value.
*
*
* string text = 2;
* @return The text.
*/
java.lang.String getText();
/**
*
* Recognized word value.
*
*
* string text = 2;
* @return The bytes for text.
*/
com.google.protobuf.ByteString
getTextBytes();
/**
*
* Confidence of the OCR results for the word. Range [0, 1].
*
*
* double confidence = 3;
* @return The confidence.
*/
double getConfidence();
/**
*
* A list of detected languages together with confidence.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word.DetectedLanguage languages = 4;
*/
java.util.List
getLanguagesList();
/**
*
* A list of detected languages together with confidence.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word.DetectedLanguage languages = 4;
*/
yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage getLanguages(int index);
/**
*
* A list of detected languages together with confidence.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word.DetectedLanguage languages = 4;
*/
int getLanguagesCount();
/**
*
* A list of detected languages together with confidence.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word.DetectedLanguage languages = 4;
*/
java.util.List extends yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguageOrBuilder>
getLanguagesOrBuilderList();
/**
*
* A list of detected languages together with confidence.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word.DetectedLanguage languages = 4;
*/
yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguageOrBuilder getLanguagesOrBuilder(
int index);
/**
*
* Id of recognized word in entities array
*
*
* int64 entity_index = 5;
* @return The entityIndex.
*/
long getEntityIndex();
}
/**
* Protobuf type {@code yandex.cloud.ai.vision.v1.Word}
*/
public static final class Word extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.ai.vision.v1.Word)
WordOrBuilder {
private static final long serialVersionUID = 0L;
// Use Word.newBuilder() to construct.
private Word(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Word() {
text_ = "";
languages_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Word();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Word(
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: {
yandex.cloud.api.ai.vision.v1.Primitives.Polygon.Builder subBuilder = null;
if (boundingBox_ != null) {
subBuilder = boundingBox_.toBuilder();
}
boundingBox_ = input.readMessage(yandex.cloud.api.ai.vision.v1.Primitives.Polygon.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(boundingBox_);
boundingBox_ = subBuilder.buildPartial();
}
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
text_ = s;
break;
}
case 25: {
confidence_ = input.readDouble();
break;
}
case 34: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
languages_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
languages_.add(
input.readMessage(yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage.parser(), extensionRegistry));
break;
}
case 40: {
entityIndex_ = input.readInt64();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
languages_ = java.util.Collections.unmodifiableList(languages_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.vision.v1.TextDetection.internal_static_yandex_cloud_ai_vision_v1_Word_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.vision.v1.TextDetection.internal_static_yandex_cloud_ai_vision_v1_Word_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.vision.v1.TextDetection.Word.class, yandex.cloud.api.ai.vision.v1.TextDetection.Word.Builder.class);
}
public interface DetectedLanguageOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.ai.vision.v1.Word.DetectedLanguage)
com.google.protobuf.MessageOrBuilder {
/**
*
* Detected language code.
*
*
* string language_code = 1;
* @return The languageCode.
*/
java.lang.String getLanguageCode();
/**
*
* Detected language code.
*
*
* string language_code = 1;
* @return The bytes for languageCode.
*/
com.google.protobuf.ByteString
getLanguageCodeBytes();
/**
*
* Confidence of detected language. Range [0, 1].
*
*
* double confidence = 2;
* @return The confidence.
*/
double getConfidence();
}
/**
* Protobuf type {@code yandex.cloud.ai.vision.v1.Word.DetectedLanguage}
*/
public static final class DetectedLanguage extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.ai.vision.v1.Word.DetectedLanguage)
DetectedLanguageOrBuilder {
private static final long serialVersionUID = 0L;
// Use DetectedLanguage.newBuilder() to construct.
private DetectedLanguage(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private DetectedLanguage() {
languageCode_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new DetectedLanguage();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private DetectedLanguage(
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();
languageCode_ = s;
break;
}
case 17: {
confidence_ = input.readDouble();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.vision.v1.TextDetection.internal_static_yandex_cloud_ai_vision_v1_Word_DetectedLanguage_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.vision.v1.TextDetection.internal_static_yandex_cloud_ai_vision_v1_Word_DetectedLanguage_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage.class, yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage.Builder.class);
}
public static final int LANGUAGE_CODE_FIELD_NUMBER = 1;
private volatile java.lang.Object languageCode_;
/**
*
* Detected language code.
*
*
* string language_code = 1;
* @return The languageCode.
*/
@java.lang.Override
public java.lang.String getLanguageCode() {
java.lang.Object ref = languageCode_;
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();
languageCode_ = s;
return s;
}
}
/**
*
* Detected language code.
*
*
* string language_code = 1;
* @return The bytes for languageCode.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getLanguageCodeBytes() {
java.lang.Object ref = languageCode_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
languageCode_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CONFIDENCE_FIELD_NUMBER = 2;
private double confidence_;
/**
*
* Confidence of detected language. Range [0, 1].
*
*
* double confidence = 2;
* @return The confidence.
*/
@java.lang.Override
public double getConfidence() {
return confidence_;
}
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(languageCode_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, languageCode_);
}
if (java.lang.Double.doubleToRawLongBits(confidence_) != 0) {
output.writeDouble(2, confidence_);
}
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(languageCode_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, languageCode_);
}
if (java.lang.Double.doubleToRawLongBits(confidence_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(2, confidence_);
}
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 yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage)) {
return super.equals(obj);
}
yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage other = (yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage) obj;
if (!getLanguageCode()
.equals(other.getLanguageCode())) return false;
if (java.lang.Double.doubleToLongBits(getConfidence())
!= java.lang.Double.doubleToLongBits(
other.getConfidence())) 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) + LANGUAGE_CODE_FIELD_NUMBER;
hash = (53 * hash) + getLanguageCode().hashCode();
hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getConfidence()));
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage 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 yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage 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 yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage 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(yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage 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 yandex.cloud.ai.vision.v1.Word.DetectedLanguage}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.ai.vision.v1.Word.DetectedLanguage)
yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguageOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.vision.v1.TextDetection.internal_static_yandex_cloud_ai_vision_v1_Word_DetectedLanguage_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.vision.v1.TextDetection.internal_static_yandex_cloud_ai_vision_v1_Word_DetectedLanguage_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage.class, yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage.Builder.class);
}
// Construct using yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage.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();
languageCode_ = "";
confidence_ = 0D;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.ai.vision.v1.TextDetection.internal_static_yandex_cloud_ai_vision_v1_Word_DetectedLanguage_descriptor;
}
@java.lang.Override
public yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage getDefaultInstanceForType() {
return yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage build() {
yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage buildPartial() {
yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage result = new yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage(this);
result.languageCode_ = languageCode_;
result.confidence_ = confidence_;
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 yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage) {
return mergeFrom((yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage other) {
if (other == yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage.getDefaultInstance()) return this;
if (!other.getLanguageCode().isEmpty()) {
languageCode_ = other.languageCode_;
onChanged();
}
if (other.getConfidence() != 0D) {
setConfidence(other.getConfidence());
}
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 {
yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object languageCode_ = "";
/**
*
* Detected language code.
*
*
* string language_code = 1;
* @return The languageCode.
*/
public java.lang.String getLanguageCode() {
java.lang.Object ref = languageCode_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
languageCode_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Detected language code.
*
*
* string language_code = 1;
* @return The bytes for languageCode.
*/
public com.google.protobuf.ByteString
getLanguageCodeBytes() {
java.lang.Object ref = languageCode_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
languageCode_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Detected language code.
*
*
* string language_code = 1;
* @param value The languageCode to set.
* @return This builder for chaining.
*/
public Builder setLanguageCode(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
languageCode_ = value;
onChanged();
return this;
}
/**
*
* Detected language code.
*
*
* string language_code = 1;
* @return This builder for chaining.
*/
public Builder clearLanguageCode() {
languageCode_ = getDefaultInstance().getLanguageCode();
onChanged();
return this;
}
/**
*
* Detected language code.
*
*
* string language_code = 1;
* @param value The bytes for languageCode to set.
* @return This builder for chaining.
*/
public Builder setLanguageCodeBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
languageCode_ = value;
onChanged();
return this;
}
private double confidence_ ;
/**
*
* Confidence of detected language. Range [0, 1].
*
*
* double confidence = 2;
* @return The confidence.
*/
@java.lang.Override
public double getConfidence() {
return confidence_;
}
/**
*
* Confidence of detected language. Range [0, 1].
*
*
* double confidence = 2;
* @param value The confidence to set.
* @return This builder for chaining.
*/
public Builder setConfidence(double value) {
confidence_ = value;
onChanged();
return this;
}
/**
*
* Confidence of detected language. Range [0, 1].
*
*
* double confidence = 2;
* @return This builder for chaining.
*/
public Builder clearConfidence() {
confidence_ = 0D;
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:yandex.cloud.ai.vision.v1.Word.DetectedLanguage)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.ai.vision.v1.Word.DetectedLanguage)
private static final yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage();
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public DetectedLanguage parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new DetectedLanguage(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 yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int BOUNDING_BOX_FIELD_NUMBER = 1;
private yandex.cloud.api.ai.vision.v1.Primitives.Polygon boundingBox_;
/**
*
* Area on the page where the word is located.
*
*
* .yandex.cloud.ai.vision.v1.Polygon bounding_box = 1;
* @return Whether the boundingBox field is set.
*/
@java.lang.Override
public boolean hasBoundingBox() {
return boundingBox_ != null;
}
/**
*
* Area on the page where the word is located.
*
*
* .yandex.cloud.ai.vision.v1.Polygon bounding_box = 1;
* @return The boundingBox.
*/
@java.lang.Override
public yandex.cloud.api.ai.vision.v1.Primitives.Polygon getBoundingBox() {
return boundingBox_ == null ? yandex.cloud.api.ai.vision.v1.Primitives.Polygon.getDefaultInstance() : boundingBox_;
}
/**
*
* Area on the page where the word is located.
*
*
* .yandex.cloud.ai.vision.v1.Polygon bounding_box = 1;
*/
@java.lang.Override
public yandex.cloud.api.ai.vision.v1.Primitives.PolygonOrBuilder getBoundingBoxOrBuilder() {
return getBoundingBox();
}
public static final int TEXT_FIELD_NUMBER = 2;
private volatile java.lang.Object text_;
/**
*
* Recognized word value.
*
*
* string text = 2;
* @return The text.
*/
@java.lang.Override
public java.lang.String getText() {
java.lang.Object ref = text_;
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();
text_ = s;
return s;
}
}
/**
*
* Recognized word value.
*
*
* string text = 2;
* @return The bytes for text.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getTextBytes() {
java.lang.Object ref = text_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
text_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CONFIDENCE_FIELD_NUMBER = 3;
private double confidence_;
/**
*
* Confidence of the OCR results for the word. Range [0, 1].
*
*
* double confidence = 3;
* @return The confidence.
*/
@java.lang.Override
public double getConfidence() {
return confidence_;
}
public static final int LANGUAGES_FIELD_NUMBER = 4;
private java.util.List languages_;
/**
*
* A list of detected languages together with confidence.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word.DetectedLanguage languages = 4;
*/
@java.lang.Override
public java.util.List getLanguagesList() {
return languages_;
}
/**
*
* A list of detected languages together with confidence.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word.DetectedLanguage languages = 4;
*/
@java.lang.Override
public java.util.List extends yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguageOrBuilder>
getLanguagesOrBuilderList() {
return languages_;
}
/**
*
* A list of detected languages together with confidence.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word.DetectedLanguage languages = 4;
*/
@java.lang.Override
public int getLanguagesCount() {
return languages_.size();
}
/**
*
* A list of detected languages together with confidence.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word.DetectedLanguage languages = 4;
*/
@java.lang.Override
public yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage getLanguages(int index) {
return languages_.get(index);
}
/**
*
* A list of detected languages together with confidence.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word.DetectedLanguage languages = 4;
*/
@java.lang.Override
public yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguageOrBuilder getLanguagesOrBuilder(
int index) {
return languages_.get(index);
}
public static final int ENTITY_INDEX_FIELD_NUMBER = 5;
private long entityIndex_;
/**
*
* Id of recognized word in entities array
*
*
* int64 entity_index = 5;
* @return The entityIndex.
*/
@java.lang.Override
public long getEntityIndex() {
return entityIndex_;
}
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 (boundingBox_ != null) {
output.writeMessage(1, getBoundingBox());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, text_);
}
if (java.lang.Double.doubleToRawLongBits(confidence_) != 0) {
output.writeDouble(3, confidence_);
}
for (int i = 0; i < languages_.size(); i++) {
output.writeMessage(4, languages_.get(i));
}
if (entityIndex_ != 0L) {
output.writeInt64(5, entityIndex_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (boundingBox_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getBoundingBox());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, text_);
}
if (java.lang.Double.doubleToRawLongBits(confidence_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(3, confidence_);
}
for (int i = 0; i < languages_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, languages_.get(i));
}
if (entityIndex_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(5, entityIndex_);
}
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 yandex.cloud.api.ai.vision.v1.TextDetection.Word)) {
return super.equals(obj);
}
yandex.cloud.api.ai.vision.v1.TextDetection.Word other = (yandex.cloud.api.ai.vision.v1.TextDetection.Word) obj;
if (hasBoundingBox() != other.hasBoundingBox()) return false;
if (hasBoundingBox()) {
if (!getBoundingBox()
.equals(other.getBoundingBox())) return false;
}
if (!getText()
.equals(other.getText())) return false;
if (java.lang.Double.doubleToLongBits(getConfidence())
!= java.lang.Double.doubleToLongBits(
other.getConfidence())) return false;
if (!getLanguagesList()
.equals(other.getLanguagesList())) return false;
if (getEntityIndex()
!= other.getEntityIndex()) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasBoundingBox()) {
hash = (37 * hash) + BOUNDING_BOX_FIELD_NUMBER;
hash = (53 * hash) + getBoundingBox().hashCode();
}
hash = (37 * hash) + TEXT_FIELD_NUMBER;
hash = (53 * hash) + getText().hashCode();
hash = (37 * hash) + CONFIDENCE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getConfidence()));
if (getLanguagesCount() > 0) {
hash = (37 * hash) + LANGUAGES_FIELD_NUMBER;
hash = (53 * hash) + getLanguagesList().hashCode();
}
hash = (37 * hash) + ENTITY_INDEX_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getEntityIndex());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Word parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Word parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Word parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Word parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Word parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Word parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Word parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Word 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 yandex.cloud.api.ai.vision.v1.TextDetection.Word parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Word 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 yandex.cloud.api.ai.vision.v1.TextDetection.Word parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Word 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(yandex.cloud.api.ai.vision.v1.TextDetection.Word 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 yandex.cloud.ai.vision.v1.Word}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.ai.vision.v1.Word)
yandex.cloud.api.ai.vision.v1.TextDetection.WordOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.ai.vision.v1.TextDetection.internal_static_yandex_cloud_ai_vision_v1_Word_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.ai.vision.v1.TextDetection.internal_static_yandex_cloud_ai_vision_v1_Word_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.ai.vision.v1.TextDetection.Word.class, yandex.cloud.api.ai.vision.v1.TextDetection.Word.Builder.class);
}
// Construct using yandex.cloud.api.ai.vision.v1.TextDetection.Word.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getLanguagesFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (boundingBoxBuilder_ == null) {
boundingBox_ = null;
} else {
boundingBox_ = null;
boundingBoxBuilder_ = null;
}
text_ = "";
confidence_ = 0D;
if (languagesBuilder_ == null) {
languages_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
languagesBuilder_.clear();
}
entityIndex_ = 0L;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.ai.vision.v1.TextDetection.internal_static_yandex_cloud_ai_vision_v1_Word_descriptor;
}
@java.lang.Override
public yandex.cloud.api.ai.vision.v1.TextDetection.Word getDefaultInstanceForType() {
return yandex.cloud.api.ai.vision.v1.TextDetection.Word.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.ai.vision.v1.TextDetection.Word build() {
yandex.cloud.api.ai.vision.v1.TextDetection.Word result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.ai.vision.v1.TextDetection.Word buildPartial() {
yandex.cloud.api.ai.vision.v1.TextDetection.Word result = new yandex.cloud.api.ai.vision.v1.TextDetection.Word(this);
int from_bitField0_ = bitField0_;
if (boundingBoxBuilder_ == null) {
result.boundingBox_ = boundingBox_;
} else {
result.boundingBox_ = boundingBoxBuilder_.build();
}
result.text_ = text_;
result.confidence_ = confidence_;
if (languagesBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
languages_ = java.util.Collections.unmodifiableList(languages_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.languages_ = languages_;
} else {
result.languages_ = languagesBuilder_.build();
}
result.entityIndex_ = entityIndex_;
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 yandex.cloud.api.ai.vision.v1.TextDetection.Word) {
return mergeFrom((yandex.cloud.api.ai.vision.v1.TextDetection.Word)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.ai.vision.v1.TextDetection.Word other) {
if (other == yandex.cloud.api.ai.vision.v1.TextDetection.Word.getDefaultInstance()) return this;
if (other.hasBoundingBox()) {
mergeBoundingBox(other.getBoundingBox());
}
if (!other.getText().isEmpty()) {
text_ = other.text_;
onChanged();
}
if (other.getConfidence() != 0D) {
setConfidence(other.getConfidence());
}
if (languagesBuilder_ == null) {
if (!other.languages_.isEmpty()) {
if (languages_.isEmpty()) {
languages_ = other.languages_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureLanguagesIsMutable();
languages_.addAll(other.languages_);
}
onChanged();
}
} else {
if (!other.languages_.isEmpty()) {
if (languagesBuilder_.isEmpty()) {
languagesBuilder_.dispose();
languagesBuilder_ = null;
languages_ = other.languages_;
bitField0_ = (bitField0_ & ~0x00000001);
languagesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getLanguagesFieldBuilder() : null;
} else {
languagesBuilder_.addAllMessages(other.languages_);
}
}
}
if (other.getEntityIndex() != 0L) {
setEntityIndex(other.getEntityIndex());
}
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 {
yandex.cloud.api.ai.vision.v1.TextDetection.Word parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.ai.vision.v1.TextDetection.Word) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private yandex.cloud.api.ai.vision.v1.Primitives.Polygon boundingBox_;
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.ai.vision.v1.Primitives.Polygon, yandex.cloud.api.ai.vision.v1.Primitives.Polygon.Builder, yandex.cloud.api.ai.vision.v1.Primitives.PolygonOrBuilder> boundingBoxBuilder_;
/**
*
* Area on the page where the word is located.
*
*
* .yandex.cloud.ai.vision.v1.Polygon bounding_box = 1;
* @return Whether the boundingBox field is set.
*/
public boolean hasBoundingBox() {
return boundingBoxBuilder_ != null || boundingBox_ != null;
}
/**
*
* Area on the page where the word is located.
*
*
* .yandex.cloud.ai.vision.v1.Polygon bounding_box = 1;
* @return The boundingBox.
*/
public yandex.cloud.api.ai.vision.v1.Primitives.Polygon getBoundingBox() {
if (boundingBoxBuilder_ == null) {
return boundingBox_ == null ? yandex.cloud.api.ai.vision.v1.Primitives.Polygon.getDefaultInstance() : boundingBox_;
} else {
return boundingBoxBuilder_.getMessage();
}
}
/**
*
* Area on the page where the word is located.
*
*
* .yandex.cloud.ai.vision.v1.Polygon bounding_box = 1;
*/
public Builder setBoundingBox(yandex.cloud.api.ai.vision.v1.Primitives.Polygon value) {
if (boundingBoxBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
boundingBox_ = value;
onChanged();
} else {
boundingBoxBuilder_.setMessage(value);
}
return this;
}
/**
*
* Area on the page where the word is located.
*
*
* .yandex.cloud.ai.vision.v1.Polygon bounding_box = 1;
*/
public Builder setBoundingBox(
yandex.cloud.api.ai.vision.v1.Primitives.Polygon.Builder builderForValue) {
if (boundingBoxBuilder_ == null) {
boundingBox_ = builderForValue.build();
onChanged();
} else {
boundingBoxBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Area on the page where the word is located.
*
*
* .yandex.cloud.ai.vision.v1.Polygon bounding_box = 1;
*/
public Builder mergeBoundingBox(yandex.cloud.api.ai.vision.v1.Primitives.Polygon value) {
if (boundingBoxBuilder_ == null) {
if (boundingBox_ != null) {
boundingBox_ =
yandex.cloud.api.ai.vision.v1.Primitives.Polygon.newBuilder(boundingBox_).mergeFrom(value).buildPartial();
} else {
boundingBox_ = value;
}
onChanged();
} else {
boundingBoxBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Area on the page where the word is located.
*
*
* .yandex.cloud.ai.vision.v1.Polygon bounding_box = 1;
*/
public Builder clearBoundingBox() {
if (boundingBoxBuilder_ == null) {
boundingBox_ = null;
onChanged();
} else {
boundingBox_ = null;
boundingBoxBuilder_ = null;
}
return this;
}
/**
*
* Area on the page where the word is located.
*
*
* .yandex.cloud.ai.vision.v1.Polygon bounding_box = 1;
*/
public yandex.cloud.api.ai.vision.v1.Primitives.Polygon.Builder getBoundingBoxBuilder() {
onChanged();
return getBoundingBoxFieldBuilder().getBuilder();
}
/**
*
* Area on the page where the word is located.
*
*
* .yandex.cloud.ai.vision.v1.Polygon bounding_box = 1;
*/
public yandex.cloud.api.ai.vision.v1.Primitives.PolygonOrBuilder getBoundingBoxOrBuilder() {
if (boundingBoxBuilder_ != null) {
return boundingBoxBuilder_.getMessageOrBuilder();
} else {
return boundingBox_ == null ?
yandex.cloud.api.ai.vision.v1.Primitives.Polygon.getDefaultInstance() : boundingBox_;
}
}
/**
*
* Area on the page where the word is located.
*
*
* .yandex.cloud.ai.vision.v1.Polygon bounding_box = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.ai.vision.v1.Primitives.Polygon, yandex.cloud.api.ai.vision.v1.Primitives.Polygon.Builder, yandex.cloud.api.ai.vision.v1.Primitives.PolygonOrBuilder>
getBoundingBoxFieldBuilder() {
if (boundingBoxBuilder_ == null) {
boundingBoxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.ai.vision.v1.Primitives.Polygon, yandex.cloud.api.ai.vision.v1.Primitives.Polygon.Builder, yandex.cloud.api.ai.vision.v1.Primitives.PolygonOrBuilder>(
getBoundingBox(),
getParentForChildren(),
isClean());
boundingBox_ = null;
}
return boundingBoxBuilder_;
}
private java.lang.Object text_ = "";
/**
*
* Recognized word value.
*
*
* string text = 2;
* @return The text.
*/
public java.lang.String getText() {
java.lang.Object ref = text_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
text_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Recognized word value.
*
*
* string text = 2;
* @return The bytes for text.
*/
public com.google.protobuf.ByteString
getTextBytes() {
java.lang.Object ref = text_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
text_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Recognized word value.
*
*
* string text = 2;
* @param value The text to set.
* @return This builder for chaining.
*/
public Builder setText(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
text_ = value;
onChanged();
return this;
}
/**
*
* Recognized word value.
*
*
* string text = 2;
* @return This builder for chaining.
*/
public Builder clearText() {
text_ = getDefaultInstance().getText();
onChanged();
return this;
}
/**
*
* Recognized word value.
*
*
* string text = 2;
* @param value The bytes for text to set.
* @return This builder for chaining.
*/
public Builder setTextBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
text_ = value;
onChanged();
return this;
}
private double confidence_ ;
/**
*
* Confidence of the OCR results for the word. Range [0, 1].
*
*
* double confidence = 3;
* @return The confidence.
*/
@java.lang.Override
public double getConfidence() {
return confidence_;
}
/**
*
* Confidence of the OCR results for the word. Range [0, 1].
*
*
* double confidence = 3;
* @param value The confidence to set.
* @return This builder for chaining.
*/
public Builder setConfidence(double value) {
confidence_ = value;
onChanged();
return this;
}
/**
*
* Confidence of the OCR results for the word. Range [0, 1].
*
*
* double confidence = 3;
* @return This builder for chaining.
*/
public Builder clearConfidence() {
confidence_ = 0D;
onChanged();
return this;
}
private java.util.List languages_ =
java.util.Collections.emptyList();
private void ensureLanguagesIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
languages_ = new java.util.ArrayList(languages_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage, yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage.Builder, yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguageOrBuilder> languagesBuilder_;
/**
*
* A list of detected languages together with confidence.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word.DetectedLanguage languages = 4;
*/
public java.util.List getLanguagesList() {
if (languagesBuilder_ == null) {
return java.util.Collections.unmodifiableList(languages_);
} else {
return languagesBuilder_.getMessageList();
}
}
/**
*
* A list of detected languages together with confidence.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word.DetectedLanguage languages = 4;
*/
public int getLanguagesCount() {
if (languagesBuilder_ == null) {
return languages_.size();
} else {
return languagesBuilder_.getCount();
}
}
/**
*
* A list of detected languages together with confidence.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word.DetectedLanguage languages = 4;
*/
public yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage getLanguages(int index) {
if (languagesBuilder_ == null) {
return languages_.get(index);
} else {
return languagesBuilder_.getMessage(index);
}
}
/**
*
* A list of detected languages together with confidence.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word.DetectedLanguage languages = 4;
*/
public Builder setLanguages(
int index, yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage value) {
if (languagesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLanguagesIsMutable();
languages_.set(index, value);
onChanged();
} else {
languagesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* A list of detected languages together with confidence.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word.DetectedLanguage languages = 4;
*/
public Builder setLanguages(
int index, yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage.Builder builderForValue) {
if (languagesBuilder_ == null) {
ensureLanguagesIsMutable();
languages_.set(index, builderForValue.build());
onChanged();
} else {
languagesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* A list of detected languages together with confidence.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word.DetectedLanguage languages = 4;
*/
public Builder addLanguages(yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage value) {
if (languagesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLanguagesIsMutable();
languages_.add(value);
onChanged();
} else {
languagesBuilder_.addMessage(value);
}
return this;
}
/**
*
* A list of detected languages together with confidence.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word.DetectedLanguage languages = 4;
*/
public Builder addLanguages(
int index, yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage value) {
if (languagesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLanguagesIsMutable();
languages_.add(index, value);
onChanged();
} else {
languagesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* A list of detected languages together with confidence.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word.DetectedLanguage languages = 4;
*/
public Builder addLanguages(
yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage.Builder builderForValue) {
if (languagesBuilder_ == null) {
ensureLanguagesIsMutable();
languages_.add(builderForValue.build());
onChanged();
} else {
languagesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* A list of detected languages together with confidence.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word.DetectedLanguage languages = 4;
*/
public Builder addLanguages(
int index, yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage.Builder builderForValue) {
if (languagesBuilder_ == null) {
ensureLanguagesIsMutable();
languages_.add(index, builderForValue.build());
onChanged();
} else {
languagesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* A list of detected languages together with confidence.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word.DetectedLanguage languages = 4;
*/
public Builder addAllLanguages(
java.lang.Iterable extends yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage> values) {
if (languagesBuilder_ == null) {
ensureLanguagesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, languages_);
onChanged();
} else {
languagesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* A list of detected languages together with confidence.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word.DetectedLanguage languages = 4;
*/
public Builder clearLanguages() {
if (languagesBuilder_ == null) {
languages_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
languagesBuilder_.clear();
}
return this;
}
/**
*
* A list of detected languages together with confidence.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word.DetectedLanguage languages = 4;
*/
public Builder removeLanguages(int index) {
if (languagesBuilder_ == null) {
ensureLanguagesIsMutable();
languages_.remove(index);
onChanged();
} else {
languagesBuilder_.remove(index);
}
return this;
}
/**
*
* A list of detected languages together with confidence.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word.DetectedLanguage languages = 4;
*/
public yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage.Builder getLanguagesBuilder(
int index) {
return getLanguagesFieldBuilder().getBuilder(index);
}
/**
*
* A list of detected languages together with confidence.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word.DetectedLanguage languages = 4;
*/
public yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguageOrBuilder getLanguagesOrBuilder(
int index) {
if (languagesBuilder_ == null) {
return languages_.get(index); } else {
return languagesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* A list of detected languages together with confidence.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word.DetectedLanguage languages = 4;
*/
public java.util.List extends yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguageOrBuilder>
getLanguagesOrBuilderList() {
if (languagesBuilder_ != null) {
return languagesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(languages_);
}
}
/**
*
* A list of detected languages together with confidence.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word.DetectedLanguage languages = 4;
*/
public yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage.Builder addLanguagesBuilder() {
return getLanguagesFieldBuilder().addBuilder(
yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage.getDefaultInstance());
}
/**
*
* A list of detected languages together with confidence.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word.DetectedLanguage languages = 4;
*/
public yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage.Builder addLanguagesBuilder(
int index) {
return getLanguagesFieldBuilder().addBuilder(
index, yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage.getDefaultInstance());
}
/**
*
* A list of detected languages together with confidence.
*
*
* repeated .yandex.cloud.ai.vision.v1.Word.DetectedLanguage languages = 4;
*/
public java.util.List
getLanguagesBuilderList() {
return getLanguagesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage, yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage.Builder, yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguageOrBuilder>
getLanguagesFieldBuilder() {
if (languagesBuilder_ == null) {
languagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage, yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguage.Builder, yandex.cloud.api.ai.vision.v1.TextDetection.Word.DetectedLanguageOrBuilder>(
languages_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
languages_ = null;
}
return languagesBuilder_;
}
private long entityIndex_ ;
/**
*
* Id of recognized word in entities array
*
*
* int64 entity_index = 5;
* @return The entityIndex.
*/
@java.lang.Override
public long getEntityIndex() {
return entityIndex_;
}
/**
*
* Id of recognized word in entities array
*
*
* int64 entity_index = 5;
* @param value The entityIndex to set.
* @return This builder for chaining.
*/
public Builder setEntityIndex(long value) {
entityIndex_ = value;
onChanged();
return this;
}
/**
*
* Id of recognized word in entities array
*
*
* int64 entity_index = 5;
* @return This builder for chaining.
*/
public Builder clearEntityIndex() {
entityIndex_ = 0L;
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:yandex.cloud.ai.vision.v1.Word)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.ai.vision.v1.Word)
private static final yandex.cloud.api.ai.vision.v1.TextDetection.Word DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.ai.vision.v1.TextDetection.Word();
}
public static yandex.cloud.api.ai.vision.v1.TextDetection.Word getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Word parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Word(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 yandex.cloud.api.ai.vision.v1.TextDetection.Word getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_yandex_cloud_ai_vision_v1_TextAnnotation_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_yandex_cloud_ai_vision_v1_TextAnnotation_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_yandex_cloud_ai_vision_v1_Page_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_yandex_cloud_ai_vision_v1_Page_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_yandex_cloud_ai_vision_v1_Entity_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_yandex_cloud_ai_vision_v1_Entity_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_yandex_cloud_ai_vision_v1_Block_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_yandex_cloud_ai_vision_v1_Block_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_yandex_cloud_ai_vision_v1_Line_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_yandex_cloud_ai_vision_v1_Line_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_yandex_cloud_ai_vision_v1_Word_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_yandex_cloud_ai_vision_v1_Word_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_yandex_cloud_ai_vision_v1_Word_DetectedLanguage_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_yandex_cloud_ai_vision_v1_Word_DetectedLanguage_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n.yandex/cloud/ai/vision/v1/text_detecti" +
"on.proto\022\031yandex.cloud.ai.vision.v1\032*yan" +
"dex/cloud/ai/vision/v1/primitives.proto\"" +
"@\n\016TextAnnotation\022.\n\005pages\030\001 \003(\0132\037.yande" +
"x.cloud.ai.vision.v1.Page\"\214\001\n\004Page\022\r\n\005wi" +
"dth\030\001 \001(\003\022\016\n\006height\030\002 \001(\003\0220\n\006blocks\030\003 \003(" +
"\0132 .yandex.cloud.ai.vision.v1.Block\0223\n\010e" +
"ntities\030\004 \003(\0132!.yandex.cloud.ai.vision.v" +
"1.Entity\"$\n\006Entity\022\014\n\004name\030\001 \001(\t\022\014\n\004text" +
"\030\002 \001(\t\"q\n\005Block\0228\n\014bounding_box\030\001 \001(\0132\"." +
"yandex.cloud.ai.vision.v1.Polygon\022.\n\005lin" +
"es\030\002 \003(\0132\037.yandex.cloud.ai.vision.v1.Lin" +
"e\"\204\001\n\004Line\0228\n\014bounding_box\030\001 \001(\0132\".yande" +
"x.cloud.ai.vision.v1.Polygon\022.\n\005words\030\002 " +
"\003(\0132\037.yandex.cloud.ai.vision.v1.Word\022\022\n\n" +
"confidence\030\003 \001(\001\"\374\001\n\004Word\0228\n\014bounding_bo" +
"x\030\001 \001(\0132\".yandex.cloud.ai.vision.v1.Poly" +
"gon\022\014\n\004text\030\002 \001(\t\022\022\n\nconfidence\030\003 \001(\001\022C\n" +
"\tlanguages\030\004 \003(\01320.yandex.cloud.ai.visio" +
"n.v1.Word.DetectedLanguage\022\024\n\014entity_ind" +
"ex\030\005 \001(\003\032=\n\020DetectedLanguage\022\025\n\rlanguage" +
"_code\030\001 \001(\t\022\022\n\nconfidence\030\002 \001(\001Be\n\035yande" +
"x.cloud.api.ai.vision.v1ZDgithub.com/yan" +
"dex-cloud/go-genproto/yandex/cloud/ai/vi" +
"sion/v1;visionb\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
yandex.cloud.api.ai.vision.v1.Primitives.getDescriptor(),
});
internal_static_yandex_cloud_ai_vision_v1_TextAnnotation_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_yandex_cloud_ai_vision_v1_TextAnnotation_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_yandex_cloud_ai_vision_v1_TextAnnotation_descriptor,
new java.lang.String[] { "Pages", });
internal_static_yandex_cloud_ai_vision_v1_Page_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_yandex_cloud_ai_vision_v1_Page_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_yandex_cloud_ai_vision_v1_Page_descriptor,
new java.lang.String[] { "Width", "Height", "Blocks", "Entities", });
internal_static_yandex_cloud_ai_vision_v1_Entity_descriptor =
getDescriptor().getMessageTypes().get(2);
internal_static_yandex_cloud_ai_vision_v1_Entity_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_yandex_cloud_ai_vision_v1_Entity_descriptor,
new java.lang.String[] { "Name", "Text", });
internal_static_yandex_cloud_ai_vision_v1_Block_descriptor =
getDescriptor().getMessageTypes().get(3);
internal_static_yandex_cloud_ai_vision_v1_Block_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_yandex_cloud_ai_vision_v1_Block_descriptor,
new java.lang.String[] { "BoundingBox", "Lines", });
internal_static_yandex_cloud_ai_vision_v1_Line_descriptor =
getDescriptor().getMessageTypes().get(4);
internal_static_yandex_cloud_ai_vision_v1_Line_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_yandex_cloud_ai_vision_v1_Line_descriptor,
new java.lang.String[] { "BoundingBox", "Words", "Confidence", });
internal_static_yandex_cloud_ai_vision_v1_Word_descriptor =
getDescriptor().getMessageTypes().get(5);
internal_static_yandex_cloud_ai_vision_v1_Word_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_yandex_cloud_ai_vision_v1_Word_descriptor,
new java.lang.String[] { "BoundingBox", "Text", "Confidence", "Languages", "EntityIndex", });
internal_static_yandex_cloud_ai_vision_v1_Word_DetectedLanguage_descriptor =
internal_static_yandex_cloud_ai_vision_v1_Word_descriptor.getNestedTypes().get(0);
internal_static_yandex_cloud_ai_vision_v1_Word_DetectedLanguage_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_yandex_cloud_ai_vision_v1_Word_DetectedLanguage_descriptor,
new java.lang.String[] { "LanguageCode", "Confidence", });
yandex.cloud.api.ai.vision.v1.Primitives.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy