All Downloads are FREE. Search and download functionalities are using the official Maven repository.

yandex.cloud.api.ai.ocr.v1.OcrService Maven / Gradle / Ivy

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: yandex/cloud/ai/ocr/v1/ocr_service.proto

package yandex.cloud.api.ai.ocr.v1;

public final class OcrService {
  private OcrService() {}
  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 RecognizeTextRequestOrBuilder extends
      // @@protoc_insertion_point(interface_extends:yandex.cloud.ai.ocr.v1.RecognizeTextRequest)
      com.google.protobuf.MessageOrBuilder {

    /**
     * 
     *bytes with data
     * 
* * bytes content = 1; * @return Whether the content field is set. */ boolean hasContent(); /** *
     *bytes with data
     * 
* * bytes content = 1; * @return The content. */ com.google.protobuf.ByteString getContent(); /** *
     * [MIME type](https://en.wikipedia.org/wiki/Media_type) of content (for example, `` application/pdf ``).
     * 
* * string mime_type = 2; * @return The mimeType. */ java.lang.String getMimeType(); /** *
     * [MIME type](https://en.wikipedia.org/wiki/Media_type) of content (for example, `` application/pdf ``).
     * 
* * string mime_type = 2; * @return The bytes for mimeType. */ com.google.protobuf.ByteString getMimeTypeBytes(); /** *
     * List of the languages to recognize text.
     * Specified in [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format (for example, `` ru ``).
     * 
* * repeated string language_codes = 3; * @return A list containing the languageCodes. */ java.util.List getLanguageCodesList(); /** *
     * List of the languages to recognize text.
     * Specified in [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format (for example, `` ru ``).
     * 
* * repeated string language_codes = 3; * @return The count of languageCodes. */ int getLanguageCodesCount(); /** *
     * List of the languages to recognize text.
     * Specified in [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format (for example, `` ru ``).
     * 
* * repeated string language_codes = 3; * @param index The index of the element to return. * @return The languageCodes at the given index. */ java.lang.String getLanguageCodes(int index); /** *
     * List of the languages to recognize text.
     * Specified in [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format (for example, `` ru ``).
     * 
* * repeated string language_codes = 3; * @param index The index of the value to return. * @return The bytes of the languageCodes at the given index. */ com.google.protobuf.ByteString getLanguageCodesBytes(int index); /** *
     * Model to use for text detection.
     * 
* * string model = 4 [(.yandex.cloud.length) = "<=50"]; * @return The model. */ java.lang.String getModel(); /** *
     * Model to use for text detection.
     * 
* * string model = 4 [(.yandex.cloud.length) = "<=50"]; * @return The bytes for model. */ com.google.protobuf.ByteString getModelBytes(); public yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextRequest.SourceCase getSourceCase(); } /** * Protobuf type {@code yandex.cloud.ai.ocr.v1.RecognizeTextRequest} */ public static final class RecognizeTextRequest extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:yandex.cloud.ai.ocr.v1.RecognizeTextRequest) RecognizeTextRequestOrBuilder { private static final long serialVersionUID = 0L; // Use RecognizeTextRequest.newBuilder() to construct. private RecognizeTextRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private RecognizeTextRequest() { mimeType_ = ""; languageCodes_ = com.google.protobuf.LazyStringArrayList.EMPTY; model_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new RecognizeTextRequest(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private RecognizeTextRequest( 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: { source_ = input.readBytes(); sourceCase_ = 1; break; } case 18: { java.lang.String s = input.readStringRequireUtf8(); mimeType_ = s; break; } case 26: { java.lang.String s = input.readStringRequireUtf8(); if (!((mutable_bitField0_ & 0x00000001) != 0)) { languageCodes_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000001; } languageCodes_.add(s); break; } case 34: { java.lang.String s = input.readStringRequireUtf8(); model_ = s; break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) != 0)) { languageCodes_ = languageCodes_.getUnmodifiableView(); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return yandex.cloud.api.ai.ocr.v1.OcrService.internal_static_yandex_cloud_ai_ocr_v1_RecognizeTextRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return yandex.cloud.api.ai.ocr.v1.OcrService.internal_static_yandex_cloud_ai_ocr_v1_RecognizeTextRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextRequest.class, yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextRequest.Builder.class); } private int sourceCase_ = 0; private java.lang.Object source_; public enum SourceCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { CONTENT(1), SOURCE_NOT_SET(0); private final int value; private SourceCase(int value) { this.value = value; } /** * @param value The number of the enum to look for. * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static SourceCase valueOf(int value) { return forNumber(value); } public static SourceCase forNumber(int value) { switch (value) { case 1: return CONTENT; case 0: return SOURCE_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public SourceCase getSourceCase() { return SourceCase.forNumber( sourceCase_); } public static final int CONTENT_FIELD_NUMBER = 1; /** *
     *bytes with data
     * 
* * bytes content = 1; * @return Whether the content field is set. */ @java.lang.Override public boolean hasContent() { return sourceCase_ == 1; } /** *
     *bytes with data
     * 
* * bytes content = 1; * @return The content. */ @java.lang.Override public com.google.protobuf.ByteString getContent() { if (sourceCase_ == 1) { return (com.google.protobuf.ByteString) source_; } return com.google.protobuf.ByteString.EMPTY; } public static final int MIME_TYPE_FIELD_NUMBER = 2; private volatile java.lang.Object mimeType_; /** *
     * [MIME type](https://en.wikipedia.org/wiki/Media_type) of content (for example, `` application/pdf ``).
     * 
* * string mime_type = 2; * @return The mimeType. */ @java.lang.Override public java.lang.String getMimeType() { java.lang.Object ref = mimeType_; 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(); mimeType_ = s; return s; } } /** *
     * [MIME type](https://en.wikipedia.org/wiki/Media_type) of content (for example, `` application/pdf ``).
     * 
* * string mime_type = 2; * @return The bytes for mimeType. */ @java.lang.Override public com.google.protobuf.ByteString getMimeTypeBytes() { java.lang.Object ref = mimeType_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); mimeType_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int LANGUAGE_CODES_FIELD_NUMBER = 3; private com.google.protobuf.LazyStringList languageCodes_; /** *
     * List of the languages to recognize text.
     * Specified in [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format (for example, `` ru ``).
     * 
* * repeated string language_codes = 3; * @return A list containing the languageCodes. */ public com.google.protobuf.ProtocolStringList getLanguageCodesList() { return languageCodes_; } /** *
     * List of the languages to recognize text.
     * Specified in [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format (for example, `` ru ``).
     * 
* * repeated string language_codes = 3; * @return The count of languageCodes. */ public int getLanguageCodesCount() { return languageCodes_.size(); } /** *
     * List of the languages to recognize text.
     * Specified in [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format (for example, `` ru ``).
     * 
* * repeated string language_codes = 3; * @param index The index of the element to return. * @return The languageCodes at the given index. */ public java.lang.String getLanguageCodes(int index) { return languageCodes_.get(index); } /** *
     * List of the languages to recognize text.
     * Specified in [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format (for example, `` ru ``).
     * 
* * repeated string language_codes = 3; * @param index The index of the value to return. * @return The bytes of the languageCodes at the given index. */ public com.google.protobuf.ByteString getLanguageCodesBytes(int index) { return languageCodes_.getByteString(index); } public static final int MODEL_FIELD_NUMBER = 4; private volatile java.lang.Object model_; /** *
     * Model to use for text detection.
     * 
* * string model = 4 [(.yandex.cloud.length) = "<=50"]; * @return The model. */ @java.lang.Override public java.lang.String getModel() { java.lang.Object ref = model_; 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(); model_ = s; return s; } } /** *
     * Model to use for text detection.
     * 
* * string model = 4 [(.yandex.cloud.length) = "<=50"]; * @return The bytes for model. */ @java.lang.Override public com.google.protobuf.ByteString getModelBytes() { java.lang.Object ref = model_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); model_ = 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 (sourceCase_ == 1) { output.writeBytes( 1, (com.google.protobuf.ByteString) source_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, mimeType_); } for (int i = 0; i < languageCodes_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, languageCodes_.getRaw(i)); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, model_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (sourceCase_ == 1) { size += com.google.protobuf.CodedOutputStream .computeBytesSize( 1, (com.google.protobuf.ByteString) source_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(mimeType_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, mimeType_); } { int dataSize = 0; for (int i = 0; i < languageCodes_.size(); i++) { dataSize += computeStringSizeNoTag(languageCodes_.getRaw(i)); } size += dataSize; size += 1 * getLanguageCodesList().size(); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, model_); } 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.ocr.v1.OcrService.RecognizeTextRequest)) { return super.equals(obj); } yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextRequest other = (yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextRequest) obj; if (!getMimeType() .equals(other.getMimeType())) return false; if (!getLanguageCodesList() .equals(other.getLanguageCodesList())) return false; if (!getModel() .equals(other.getModel())) return false; if (!getSourceCase().equals(other.getSourceCase())) return false; switch (sourceCase_) { case 1: if (!getContent() .equals(other.getContent())) return false; break; case 0: default: } 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) + MIME_TYPE_FIELD_NUMBER; hash = (53 * hash) + getMimeType().hashCode(); if (getLanguageCodesCount() > 0) { hash = (37 * hash) + LANGUAGE_CODES_FIELD_NUMBER; hash = (53 * hash) + getLanguageCodesList().hashCode(); } hash = (37 * hash) + MODEL_FIELD_NUMBER; hash = (53 * hash) + getModel().hashCode(); switch (sourceCase_) { case 1: hash = (37 * hash) + CONTENT_FIELD_NUMBER; hash = (53 * hash) + getContent().hashCode(); break; case 0: default: } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextRequest 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.ocr.v1.OcrService.RecognizeTextRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextRequest 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.ocr.v1.OcrService.RecognizeTextRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextRequest 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.ocr.v1.OcrService.RecognizeTextRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextRequest 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.ocr.v1.OcrService.RecognizeTextRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextRequest 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.ocr.v1.OcrService.RecognizeTextRequest 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.ocr.v1.RecognizeTextRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:yandex.cloud.ai.ocr.v1.RecognizeTextRequest) yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return yandex.cloud.api.ai.ocr.v1.OcrService.internal_static_yandex_cloud_ai_ocr_v1_RecognizeTextRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return yandex.cloud.api.ai.ocr.v1.OcrService.internal_static_yandex_cloud_ai_ocr_v1_RecognizeTextRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextRequest.class, yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextRequest.Builder.class); } // Construct using yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextRequest.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(); mimeType_ = ""; languageCodes_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); model_ = ""; sourceCase_ = 0; source_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return yandex.cloud.api.ai.ocr.v1.OcrService.internal_static_yandex_cloud_ai_ocr_v1_RecognizeTextRequest_descriptor; } @java.lang.Override public yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextRequest getDefaultInstanceForType() { return yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextRequest.getDefaultInstance(); } @java.lang.Override public yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextRequest build() { yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextRequest buildPartial() { yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextRequest result = new yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextRequest(this); int from_bitField0_ = bitField0_; if (sourceCase_ == 1) { result.source_ = source_; } result.mimeType_ = mimeType_; if (((bitField0_ & 0x00000001) != 0)) { languageCodes_ = languageCodes_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000001); } result.languageCodes_ = languageCodes_; result.model_ = model_; result.sourceCase_ = sourceCase_; 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.ocr.v1.OcrService.RecognizeTextRequest) { return mergeFrom((yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextRequest)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextRequest other) { if (other == yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextRequest.getDefaultInstance()) return this; if (!other.getMimeType().isEmpty()) { mimeType_ = other.mimeType_; onChanged(); } if (!other.languageCodes_.isEmpty()) { if (languageCodes_.isEmpty()) { languageCodes_ = other.languageCodes_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureLanguageCodesIsMutable(); languageCodes_.addAll(other.languageCodes_); } onChanged(); } if (!other.getModel().isEmpty()) { model_ = other.model_; onChanged(); } switch (other.getSourceCase()) { case CONTENT: { setContent(other.getContent()); break; } case SOURCE_NOT_SET: { break; } } 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.ocr.v1.OcrService.RecognizeTextRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int sourceCase_ = 0; private java.lang.Object source_; public SourceCase getSourceCase() { return SourceCase.forNumber( sourceCase_); } public Builder clearSource() { sourceCase_ = 0; source_ = null; onChanged(); return this; } private int bitField0_; /** *
       *bytes with data
       * 
* * bytes content = 1; * @return Whether the content field is set. */ public boolean hasContent() { return sourceCase_ == 1; } /** *
       *bytes with data
       * 
* * bytes content = 1; * @return The content. */ public com.google.protobuf.ByteString getContent() { if (sourceCase_ == 1) { return (com.google.protobuf.ByteString) source_; } return com.google.protobuf.ByteString.EMPTY; } /** *
       *bytes with data
       * 
* * bytes content = 1; * @param value The content to set. * @return This builder for chaining. */ public Builder setContent(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } sourceCase_ = 1; source_ = value; onChanged(); return this; } /** *
       *bytes with data
       * 
* * bytes content = 1; * @return This builder for chaining. */ public Builder clearContent() { if (sourceCase_ == 1) { sourceCase_ = 0; source_ = null; onChanged(); } return this; } private java.lang.Object mimeType_ = ""; /** *
       * [MIME type](https://en.wikipedia.org/wiki/Media_type) of content (for example, `` application/pdf ``).
       * 
* * string mime_type = 2; * @return The mimeType. */ public java.lang.String getMimeType() { java.lang.Object ref = mimeType_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); mimeType_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * [MIME type](https://en.wikipedia.org/wiki/Media_type) of content (for example, `` application/pdf ``).
       * 
* * string mime_type = 2; * @return The bytes for mimeType. */ public com.google.protobuf.ByteString getMimeTypeBytes() { java.lang.Object ref = mimeType_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); mimeType_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * [MIME type](https://en.wikipedia.org/wiki/Media_type) of content (for example, `` application/pdf ``).
       * 
* * string mime_type = 2; * @param value The mimeType to set. * @return This builder for chaining. */ public Builder setMimeType( java.lang.String value) { if (value == null) { throw new NullPointerException(); } mimeType_ = value; onChanged(); return this; } /** *
       * [MIME type](https://en.wikipedia.org/wiki/Media_type) of content (for example, `` application/pdf ``).
       * 
* * string mime_type = 2; * @return This builder for chaining. */ public Builder clearMimeType() { mimeType_ = getDefaultInstance().getMimeType(); onChanged(); return this; } /** *
       * [MIME type](https://en.wikipedia.org/wiki/Media_type) of content (for example, `` application/pdf ``).
       * 
* * string mime_type = 2; * @param value The bytes for mimeType to set. * @return This builder for chaining. */ public Builder setMimeTypeBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); mimeType_ = value; onChanged(); return this; } private com.google.protobuf.LazyStringList languageCodes_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureLanguageCodesIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { languageCodes_ = new com.google.protobuf.LazyStringArrayList(languageCodes_); bitField0_ |= 0x00000001; } } /** *
       * List of the languages to recognize text.
       * Specified in [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format (for example, `` ru ``).
       * 
* * repeated string language_codes = 3; * @return A list containing the languageCodes. */ public com.google.protobuf.ProtocolStringList getLanguageCodesList() { return languageCodes_.getUnmodifiableView(); } /** *
       * List of the languages to recognize text.
       * Specified in [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format (for example, `` ru ``).
       * 
* * repeated string language_codes = 3; * @return The count of languageCodes. */ public int getLanguageCodesCount() { return languageCodes_.size(); } /** *
       * List of the languages to recognize text.
       * Specified in [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format (for example, `` ru ``).
       * 
* * repeated string language_codes = 3; * @param index The index of the element to return. * @return The languageCodes at the given index. */ public java.lang.String getLanguageCodes(int index) { return languageCodes_.get(index); } /** *
       * List of the languages to recognize text.
       * Specified in [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format (for example, `` ru ``).
       * 
* * repeated string language_codes = 3; * @param index The index of the value to return. * @return The bytes of the languageCodes at the given index. */ public com.google.protobuf.ByteString getLanguageCodesBytes(int index) { return languageCodes_.getByteString(index); } /** *
       * List of the languages to recognize text.
       * Specified in [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format (for example, `` ru ``).
       * 
* * repeated string language_codes = 3; * @param index The index to set the value at. * @param value The languageCodes to set. * @return This builder for chaining. */ public Builder setLanguageCodes( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureLanguageCodesIsMutable(); languageCodes_.set(index, value); onChanged(); return this; } /** *
       * List of the languages to recognize text.
       * Specified in [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format (for example, `` ru ``).
       * 
* * repeated string language_codes = 3; * @param value The languageCodes to add. * @return This builder for chaining. */ public Builder addLanguageCodes( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureLanguageCodesIsMutable(); languageCodes_.add(value); onChanged(); return this; } /** *
       * List of the languages to recognize text.
       * Specified in [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format (for example, `` ru ``).
       * 
* * repeated string language_codes = 3; * @param values The languageCodes to add. * @return This builder for chaining. */ public Builder addAllLanguageCodes( java.lang.Iterable values) { ensureLanguageCodesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, languageCodes_); onChanged(); return this; } /** *
       * List of the languages to recognize text.
       * Specified in [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format (for example, `` ru ``).
       * 
* * repeated string language_codes = 3; * @return This builder for chaining. */ public Builder clearLanguageCodes() { languageCodes_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** *
       * List of the languages to recognize text.
       * Specified in [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1) format (for example, `` ru ``).
       * 
* * repeated string language_codes = 3; * @param value The bytes of the languageCodes to add. * @return This builder for chaining. */ public Builder addLanguageCodesBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureLanguageCodesIsMutable(); languageCodes_.add(value); onChanged(); return this; } private java.lang.Object model_ = ""; /** *
       * Model to use for text detection.
       * 
* * string model = 4 [(.yandex.cloud.length) = "<=50"]; * @return The model. */ public java.lang.String getModel() { java.lang.Object ref = model_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); model_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * Model to use for text detection.
       * 
* * string model = 4 [(.yandex.cloud.length) = "<=50"]; * @return The bytes for model. */ public com.google.protobuf.ByteString getModelBytes() { java.lang.Object ref = model_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); model_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * Model to use for text detection.
       * 
* * string model = 4 [(.yandex.cloud.length) = "<=50"]; * @param value The model to set. * @return This builder for chaining. */ public Builder setModel( java.lang.String value) { if (value == null) { throw new NullPointerException(); } model_ = value; onChanged(); return this; } /** *
       * Model to use for text detection.
       * 
* * string model = 4 [(.yandex.cloud.length) = "<=50"]; * @return This builder for chaining. */ public Builder clearModel() { model_ = getDefaultInstance().getModel(); onChanged(); return this; } /** *
       * Model to use for text detection.
       * 
* * string model = 4 [(.yandex.cloud.length) = "<=50"]; * @param value The bytes for model to set. * @return This builder for chaining. */ public Builder setModelBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); model_ = 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.ocr.v1.RecognizeTextRequest) } // @@protoc_insertion_point(class_scope:yandex.cloud.ai.ocr.v1.RecognizeTextRequest) private static final yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextRequest DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextRequest(); } public static yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextRequest getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public RecognizeTextRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new RecognizeTextRequest(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.ocr.v1.OcrService.RecognizeTextRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface RecognizeTextResponseOrBuilder extends // @@protoc_insertion_point(interface_extends:yandex.cloud.ai.ocr.v1.RecognizeTextResponse) com.google.protobuf.MessageOrBuilder { /** *
     * Recognized text blocks in this page or text from entities.
     * 
* * .yandex.cloud.ai.ocr.v1.TextAnnotation text_annotation = 1; * @return Whether the textAnnotation field is set. */ boolean hasTextAnnotation(); /** *
     * Recognized text blocks in this page or text from entities.
     * 
* * .yandex.cloud.ai.ocr.v1.TextAnnotation text_annotation = 1; * @return The textAnnotation. */ yandex.cloud.api.ai.ocr.v1.Ocr.TextAnnotation getTextAnnotation(); /** *
     * Recognized text blocks in this page or text from entities.
     * 
* * .yandex.cloud.ai.ocr.v1.TextAnnotation text_annotation = 1; */ yandex.cloud.api.ai.ocr.v1.Ocr.TextAnnotationOrBuilder getTextAnnotationOrBuilder(); /** *
     * Page number in PDF file.
     * 
* * int64 page = 2; * @return The page. */ long getPage(); } /** * Protobuf type {@code yandex.cloud.ai.ocr.v1.RecognizeTextResponse} */ public static final class RecognizeTextResponse extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:yandex.cloud.ai.ocr.v1.RecognizeTextResponse) RecognizeTextResponseOrBuilder { private static final long serialVersionUID = 0L; // Use RecognizeTextResponse.newBuilder() to construct. private RecognizeTextResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private RecognizeTextResponse() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new RecognizeTextResponse(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private RecognizeTextResponse( 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: { yandex.cloud.api.ai.ocr.v1.Ocr.TextAnnotation.Builder subBuilder = null; if (textAnnotation_ != null) { subBuilder = textAnnotation_.toBuilder(); } textAnnotation_ = input.readMessage(yandex.cloud.api.ai.ocr.v1.Ocr.TextAnnotation.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(textAnnotation_); textAnnotation_ = subBuilder.buildPartial(); } break; } case 16: { page_ = 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 { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return yandex.cloud.api.ai.ocr.v1.OcrService.internal_static_yandex_cloud_ai_ocr_v1_RecognizeTextResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return yandex.cloud.api.ai.ocr.v1.OcrService.internal_static_yandex_cloud_ai_ocr_v1_RecognizeTextResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextResponse.class, yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextResponse.Builder.class); } public static final int TEXT_ANNOTATION_FIELD_NUMBER = 1; private yandex.cloud.api.ai.ocr.v1.Ocr.TextAnnotation textAnnotation_; /** *
     * Recognized text blocks in this page or text from entities.
     * 
* * .yandex.cloud.ai.ocr.v1.TextAnnotation text_annotation = 1; * @return Whether the textAnnotation field is set. */ @java.lang.Override public boolean hasTextAnnotation() { return textAnnotation_ != null; } /** *
     * Recognized text blocks in this page or text from entities.
     * 
* * .yandex.cloud.ai.ocr.v1.TextAnnotation text_annotation = 1; * @return The textAnnotation. */ @java.lang.Override public yandex.cloud.api.ai.ocr.v1.Ocr.TextAnnotation getTextAnnotation() { return textAnnotation_ == null ? yandex.cloud.api.ai.ocr.v1.Ocr.TextAnnotation.getDefaultInstance() : textAnnotation_; } /** *
     * Recognized text blocks in this page or text from entities.
     * 
* * .yandex.cloud.ai.ocr.v1.TextAnnotation text_annotation = 1; */ @java.lang.Override public yandex.cloud.api.ai.ocr.v1.Ocr.TextAnnotationOrBuilder getTextAnnotationOrBuilder() { return getTextAnnotation(); } public static final int PAGE_FIELD_NUMBER = 2; private long page_; /** *
     * Page number in PDF file.
     * 
* * int64 page = 2; * @return The page. */ @java.lang.Override public long getPage() { return page_; } 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 (textAnnotation_ != null) { output.writeMessage(1, getTextAnnotation()); } if (page_ != 0L) { output.writeInt64(2, page_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (textAnnotation_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getTextAnnotation()); } if (page_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(2, page_); } 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.ocr.v1.OcrService.RecognizeTextResponse)) { return super.equals(obj); } yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextResponse other = (yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextResponse) obj; if (hasTextAnnotation() != other.hasTextAnnotation()) return false; if (hasTextAnnotation()) { if (!getTextAnnotation() .equals(other.getTextAnnotation())) return false; } if (getPage() != other.getPage()) 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 (hasTextAnnotation()) { hash = (37 * hash) + TEXT_ANNOTATION_FIELD_NUMBER; hash = (53 * hash) + getTextAnnotation().hashCode(); } hash = (37 * hash) + PAGE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getPage()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextResponse parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextResponse 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.ocr.v1.OcrService.RecognizeTextResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextResponse 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.ocr.v1.OcrService.RecognizeTextResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextResponse parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextResponse 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.ocr.v1.OcrService.RecognizeTextResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextResponse 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.ocr.v1.OcrService.RecognizeTextResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextResponse 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.ocr.v1.OcrService.RecognizeTextResponse 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.ocr.v1.RecognizeTextResponse} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:yandex.cloud.ai.ocr.v1.RecognizeTextResponse) yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return yandex.cloud.api.ai.ocr.v1.OcrService.internal_static_yandex_cloud_ai_ocr_v1_RecognizeTextResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return yandex.cloud.api.ai.ocr.v1.OcrService.internal_static_yandex_cloud_ai_ocr_v1_RecognizeTextResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextResponse.class, yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextResponse.Builder.class); } // Construct using yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @java.lang.Override public Builder clear() { super.clear(); if (textAnnotationBuilder_ == null) { textAnnotation_ = null; } else { textAnnotation_ = null; textAnnotationBuilder_ = null; } page_ = 0L; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return yandex.cloud.api.ai.ocr.v1.OcrService.internal_static_yandex_cloud_ai_ocr_v1_RecognizeTextResponse_descriptor; } @java.lang.Override public yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextResponse getDefaultInstanceForType() { return yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextResponse.getDefaultInstance(); } @java.lang.Override public yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextResponse build() { yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextResponse buildPartial() { yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextResponse result = new yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextResponse(this); if (textAnnotationBuilder_ == null) { result.textAnnotation_ = textAnnotation_; } else { result.textAnnotation_ = textAnnotationBuilder_.build(); } result.page_ = page_; 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.ocr.v1.OcrService.RecognizeTextResponse) { return mergeFrom((yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextResponse)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextResponse other) { if (other == yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextResponse.getDefaultInstance()) return this; if (other.hasTextAnnotation()) { mergeTextAnnotation(other.getTextAnnotation()); } if (other.getPage() != 0L) { setPage(other.getPage()); } 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.ocr.v1.OcrService.RecognizeTextResponse parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private yandex.cloud.api.ai.ocr.v1.Ocr.TextAnnotation textAnnotation_; private com.google.protobuf.SingleFieldBuilderV3< yandex.cloud.api.ai.ocr.v1.Ocr.TextAnnotation, yandex.cloud.api.ai.ocr.v1.Ocr.TextAnnotation.Builder, yandex.cloud.api.ai.ocr.v1.Ocr.TextAnnotationOrBuilder> textAnnotationBuilder_; /** *
       * Recognized text blocks in this page or text from entities.
       * 
* * .yandex.cloud.ai.ocr.v1.TextAnnotation text_annotation = 1; * @return Whether the textAnnotation field is set. */ public boolean hasTextAnnotation() { return textAnnotationBuilder_ != null || textAnnotation_ != null; } /** *
       * Recognized text blocks in this page or text from entities.
       * 
* * .yandex.cloud.ai.ocr.v1.TextAnnotation text_annotation = 1; * @return The textAnnotation. */ public yandex.cloud.api.ai.ocr.v1.Ocr.TextAnnotation getTextAnnotation() { if (textAnnotationBuilder_ == null) { return textAnnotation_ == null ? yandex.cloud.api.ai.ocr.v1.Ocr.TextAnnotation.getDefaultInstance() : textAnnotation_; } else { return textAnnotationBuilder_.getMessage(); } } /** *
       * Recognized text blocks in this page or text from entities.
       * 
* * .yandex.cloud.ai.ocr.v1.TextAnnotation text_annotation = 1; */ public Builder setTextAnnotation(yandex.cloud.api.ai.ocr.v1.Ocr.TextAnnotation value) { if (textAnnotationBuilder_ == null) { if (value == null) { throw new NullPointerException(); } textAnnotation_ = value; onChanged(); } else { textAnnotationBuilder_.setMessage(value); } return this; } /** *
       * Recognized text blocks in this page or text from entities.
       * 
* * .yandex.cloud.ai.ocr.v1.TextAnnotation text_annotation = 1; */ public Builder setTextAnnotation( yandex.cloud.api.ai.ocr.v1.Ocr.TextAnnotation.Builder builderForValue) { if (textAnnotationBuilder_ == null) { textAnnotation_ = builderForValue.build(); onChanged(); } else { textAnnotationBuilder_.setMessage(builderForValue.build()); } return this; } /** *
       * Recognized text blocks in this page or text from entities.
       * 
* * .yandex.cloud.ai.ocr.v1.TextAnnotation text_annotation = 1; */ public Builder mergeTextAnnotation(yandex.cloud.api.ai.ocr.v1.Ocr.TextAnnotation value) { if (textAnnotationBuilder_ == null) { if (textAnnotation_ != null) { textAnnotation_ = yandex.cloud.api.ai.ocr.v1.Ocr.TextAnnotation.newBuilder(textAnnotation_).mergeFrom(value).buildPartial(); } else { textAnnotation_ = value; } onChanged(); } else { textAnnotationBuilder_.mergeFrom(value); } return this; } /** *
       * Recognized text blocks in this page or text from entities.
       * 
* * .yandex.cloud.ai.ocr.v1.TextAnnotation text_annotation = 1; */ public Builder clearTextAnnotation() { if (textAnnotationBuilder_ == null) { textAnnotation_ = null; onChanged(); } else { textAnnotation_ = null; textAnnotationBuilder_ = null; } return this; } /** *
       * Recognized text blocks in this page or text from entities.
       * 
* * .yandex.cloud.ai.ocr.v1.TextAnnotation text_annotation = 1; */ public yandex.cloud.api.ai.ocr.v1.Ocr.TextAnnotation.Builder getTextAnnotationBuilder() { onChanged(); return getTextAnnotationFieldBuilder().getBuilder(); } /** *
       * Recognized text blocks in this page or text from entities.
       * 
* * .yandex.cloud.ai.ocr.v1.TextAnnotation text_annotation = 1; */ public yandex.cloud.api.ai.ocr.v1.Ocr.TextAnnotationOrBuilder getTextAnnotationOrBuilder() { if (textAnnotationBuilder_ != null) { return textAnnotationBuilder_.getMessageOrBuilder(); } else { return textAnnotation_ == null ? yandex.cloud.api.ai.ocr.v1.Ocr.TextAnnotation.getDefaultInstance() : textAnnotation_; } } /** *
       * Recognized text blocks in this page or text from entities.
       * 
* * .yandex.cloud.ai.ocr.v1.TextAnnotation text_annotation = 1; */ private com.google.protobuf.SingleFieldBuilderV3< yandex.cloud.api.ai.ocr.v1.Ocr.TextAnnotation, yandex.cloud.api.ai.ocr.v1.Ocr.TextAnnotation.Builder, yandex.cloud.api.ai.ocr.v1.Ocr.TextAnnotationOrBuilder> getTextAnnotationFieldBuilder() { if (textAnnotationBuilder_ == null) { textAnnotationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< yandex.cloud.api.ai.ocr.v1.Ocr.TextAnnotation, yandex.cloud.api.ai.ocr.v1.Ocr.TextAnnotation.Builder, yandex.cloud.api.ai.ocr.v1.Ocr.TextAnnotationOrBuilder>( getTextAnnotation(), getParentForChildren(), isClean()); textAnnotation_ = null; } return textAnnotationBuilder_; } private long page_ ; /** *
       * Page number in PDF file.
       * 
* * int64 page = 2; * @return The page. */ @java.lang.Override public long getPage() { return page_; } /** *
       * Page number in PDF file.
       * 
* * int64 page = 2; * @param value The page to set. * @return This builder for chaining. */ public Builder setPage(long value) { page_ = value; onChanged(); return this; } /** *
       * Page number in PDF file.
       * 
* * int64 page = 2; * @return This builder for chaining. */ public Builder clearPage() { page_ = 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.ocr.v1.RecognizeTextResponse) } // @@protoc_insertion_point(class_scope:yandex.cloud.ai.ocr.v1.RecognizeTextResponse) private static final yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextResponse DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextResponse(); } public static yandex.cloud.api.ai.ocr.v1.OcrService.RecognizeTextResponse getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public RecognizeTextResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new RecognizeTextResponse(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.ocr.v1.OcrService.RecognizeTextResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface GetRecognitionRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:yandex.cloud.ai.ocr.v1.GetRecognitionRequest) com.google.protobuf.MessageOrBuilder { /** *
     * Operation ID of async recognition request.
     * 
* * string operation_id = 1 [(.yandex.cloud.required) = true, (.yandex.cloud.length) = "<=50"]; * @return The operationId. */ java.lang.String getOperationId(); /** *
     * Operation ID of async recognition request.
     * 
* * string operation_id = 1 [(.yandex.cloud.required) = true, (.yandex.cloud.length) = "<=50"]; * @return The bytes for operationId. */ com.google.protobuf.ByteString getOperationIdBytes(); } /** * Protobuf type {@code yandex.cloud.ai.ocr.v1.GetRecognitionRequest} */ public static final class GetRecognitionRequest extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:yandex.cloud.ai.ocr.v1.GetRecognitionRequest) GetRecognitionRequestOrBuilder { private static final long serialVersionUID = 0L; // Use GetRecognitionRequest.newBuilder() to construct. private GetRecognitionRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private GetRecognitionRequest() { operationId_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new GetRecognitionRequest(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private GetRecognitionRequest( 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(); operationId_ = 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.ocr.v1.OcrService.internal_static_yandex_cloud_ai_ocr_v1_GetRecognitionRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return yandex.cloud.api.ai.ocr.v1.OcrService.internal_static_yandex_cloud_ai_ocr_v1_GetRecognitionRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( yandex.cloud.api.ai.ocr.v1.OcrService.GetRecognitionRequest.class, yandex.cloud.api.ai.ocr.v1.OcrService.GetRecognitionRequest.Builder.class); } public static final int OPERATION_ID_FIELD_NUMBER = 1; private volatile java.lang.Object operationId_; /** *
     * Operation ID of async recognition request.
     * 
* * string operation_id = 1 [(.yandex.cloud.required) = true, (.yandex.cloud.length) = "<=50"]; * @return The operationId. */ @java.lang.Override public java.lang.String getOperationId() { java.lang.Object ref = operationId_; 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(); operationId_ = s; return s; } } /** *
     * Operation ID of async recognition request.
     * 
* * string operation_id = 1 [(.yandex.cloud.required) = true, (.yandex.cloud.length) = "<=50"]; * @return The bytes for operationId. */ @java.lang.Override public com.google.protobuf.ByteString getOperationIdBytes() { java.lang.Object ref = operationId_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); operationId_ = 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(operationId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, operationId_); } 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(operationId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, operationId_); } 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.ocr.v1.OcrService.GetRecognitionRequest)) { return super.equals(obj); } yandex.cloud.api.ai.ocr.v1.OcrService.GetRecognitionRequest other = (yandex.cloud.api.ai.ocr.v1.OcrService.GetRecognitionRequest) obj; if (!getOperationId() .equals(other.getOperationId())) 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) + OPERATION_ID_FIELD_NUMBER; hash = (53 * hash) + getOperationId().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static yandex.cloud.api.ai.ocr.v1.OcrService.GetRecognitionRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static yandex.cloud.api.ai.ocr.v1.OcrService.GetRecognitionRequest 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.ocr.v1.OcrService.GetRecognitionRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static yandex.cloud.api.ai.ocr.v1.OcrService.GetRecognitionRequest 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.ocr.v1.OcrService.GetRecognitionRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static yandex.cloud.api.ai.ocr.v1.OcrService.GetRecognitionRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static yandex.cloud.api.ai.ocr.v1.OcrService.GetRecognitionRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static yandex.cloud.api.ai.ocr.v1.OcrService.GetRecognitionRequest 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.ocr.v1.OcrService.GetRecognitionRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static yandex.cloud.api.ai.ocr.v1.OcrService.GetRecognitionRequest 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.ocr.v1.OcrService.GetRecognitionRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static yandex.cloud.api.ai.ocr.v1.OcrService.GetRecognitionRequest 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.ocr.v1.OcrService.GetRecognitionRequest 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.ocr.v1.GetRecognitionRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:yandex.cloud.ai.ocr.v1.GetRecognitionRequest) yandex.cloud.api.ai.ocr.v1.OcrService.GetRecognitionRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return yandex.cloud.api.ai.ocr.v1.OcrService.internal_static_yandex_cloud_ai_ocr_v1_GetRecognitionRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return yandex.cloud.api.ai.ocr.v1.OcrService.internal_static_yandex_cloud_ai_ocr_v1_GetRecognitionRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( yandex.cloud.api.ai.ocr.v1.OcrService.GetRecognitionRequest.class, yandex.cloud.api.ai.ocr.v1.OcrService.GetRecognitionRequest.Builder.class); } // Construct using yandex.cloud.api.ai.ocr.v1.OcrService.GetRecognitionRequest.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(); operationId_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return yandex.cloud.api.ai.ocr.v1.OcrService.internal_static_yandex_cloud_ai_ocr_v1_GetRecognitionRequest_descriptor; } @java.lang.Override public yandex.cloud.api.ai.ocr.v1.OcrService.GetRecognitionRequest getDefaultInstanceForType() { return yandex.cloud.api.ai.ocr.v1.OcrService.GetRecognitionRequest.getDefaultInstance(); } @java.lang.Override public yandex.cloud.api.ai.ocr.v1.OcrService.GetRecognitionRequest build() { yandex.cloud.api.ai.ocr.v1.OcrService.GetRecognitionRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public yandex.cloud.api.ai.ocr.v1.OcrService.GetRecognitionRequest buildPartial() { yandex.cloud.api.ai.ocr.v1.OcrService.GetRecognitionRequest result = new yandex.cloud.api.ai.ocr.v1.OcrService.GetRecognitionRequest(this); result.operationId_ = operationId_; 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.ocr.v1.OcrService.GetRecognitionRequest) { return mergeFrom((yandex.cloud.api.ai.ocr.v1.OcrService.GetRecognitionRequest)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(yandex.cloud.api.ai.ocr.v1.OcrService.GetRecognitionRequest other) { if (other == yandex.cloud.api.ai.ocr.v1.OcrService.GetRecognitionRequest.getDefaultInstance()) return this; if (!other.getOperationId().isEmpty()) { operationId_ = other.operationId_; 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.ocr.v1.OcrService.GetRecognitionRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (yandex.cloud.api.ai.ocr.v1.OcrService.GetRecognitionRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private java.lang.Object operationId_ = ""; /** *
       * Operation ID of async recognition request.
       * 
* * string operation_id = 1 [(.yandex.cloud.required) = true, (.yandex.cloud.length) = "<=50"]; * @return The operationId. */ public java.lang.String getOperationId() { java.lang.Object ref = operationId_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); operationId_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * Operation ID of async recognition request.
       * 
* * string operation_id = 1 [(.yandex.cloud.required) = true, (.yandex.cloud.length) = "<=50"]; * @return The bytes for operationId. */ public com.google.protobuf.ByteString getOperationIdBytes() { java.lang.Object ref = operationId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); operationId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * Operation ID of async recognition request.
       * 
* * string operation_id = 1 [(.yandex.cloud.required) = true, (.yandex.cloud.length) = "<=50"]; * @param value The operationId to set. * @return This builder for chaining. */ public Builder setOperationId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } operationId_ = value; onChanged(); return this; } /** *
       * Operation ID of async recognition request.
       * 
* * string operation_id = 1 [(.yandex.cloud.required) = true, (.yandex.cloud.length) = "<=50"]; * @return This builder for chaining. */ public Builder clearOperationId() { operationId_ = getDefaultInstance().getOperationId(); onChanged(); return this; } /** *
       * Operation ID of async recognition request.
       * 
* * string operation_id = 1 [(.yandex.cloud.required) = true, (.yandex.cloud.length) = "<=50"]; * @param value The bytes for operationId to set. * @return This builder for chaining. */ public Builder setOperationIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); operationId_ = 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.ocr.v1.GetRecognitionRequest) } // @@protoc_insertion_point(class_scope:yandex.cloud.ai.ocr.v1.GetRecognitionRequest) private static final yandex.cloud.api.ai.ocr.v1.OcrService.GetRecognitionRequest DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new yandex.cloud.api.ai.ocr.v1.OcrService.GetRecognitionRequest(); } public static yandex.cloud.api.ai.ocr.v1.OcrService.GetRecognitionRequest getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public GetRecognitionRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new GetRecognitionRequest(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.ocr.v1.OcrService.GetRecognitionRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private static final com.google.protobuf.Descriptors.Descriptor internal_static_yandex_cloud_ai_ocr_v1_RecognizeTextRequest_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_yandex_cloud_ai_ocr_v1_RecognizeTextRequest_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_yandex_cloud_ai_ocr_v1_RecognizeTextResponse_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_yandex_cloud_ai_ocr_v1_RecognizeTextResponse_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_yandex_cloud_ai_ocr_v1_GetRecognitionRequest_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_yandex_cloud_ai_ocr_v1_GetRecognitionRequest_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/ocr/v1/ocr_service.pro" + "to\022\026yandex.cloud.ai.ocr.v1\032 yandex/cloud" + "/ai/ocr/v1/ocr.proto\032\034google/api/annotat" + "ions.proto\032\035yandex/cloud/validation.prot" + "o\032 yandex/cloud/api/operation.proto\032&yan" + "dex/cloud/operation/operation.proto\"w\n\024R" + "ecognizeTextRequest\022\021\n\007content\030\001 \001(\014H\000\022\021" + "\n\tmime_type\030\002 \001(\t\022\026\n\016language_codes\030\003 \003(" + "\t\022\027\n\005model\030\004 \001(\tB\010\212\3101\004<=50B\010\n\006source\"f\n\025" + "RecognizeTextResponse\022?\n\017text_annotation" + "\030\001 \001(\0132&.yandex.cloud.ai.ocr.v1.TextAnno" + "tation\022\014\n\004page\030\002 \001(\003\";\n\025GetRecognitionRe" + "quest\022\"\n\014operation_id\030\001 \001(\tB\014\350\3071\001\212\3101\004<=5" + "02\247\001\n\026TextRecognitionService\022\214\001\n\tRecogni" + "ze\022,.yandex.cloud.ai.ocr.v1.RecognizeTex" + "tRequest\032-.yandex.cloud.ai.ocr.v1.Recogn" + "izeTextResponse\" \202\323\344\223\002\032\"\025/ocr/v1/recogni" + "zeText:\001*0\0012\321\002\n\033TextRecognitionAsyncServ" + "ice\022\236\001\n\tRecognize\022,.yandex.cloud.ai.ocr." + "v1.RecognizeTextRequest\032!.yandex.cloud.o" + "peration.Operation\"@\262\322*\027\022\025google.protobu" + "f.Empty\202\323\344\223\002\037\"\032/ocr/v1/recognizeTextAsyn" + "c:\001*\022\220\001\n\016GetRecognition\022-.yandex.cloud.a" + "i.ocr.v1.GetRecognitionRequest\032-.yandex." + "cloud.ai.ocr.v1.RecognizeTextResponse\"\036\202" + "\323\344\223\002\030\022\026/ocr/v1/getRecognition0\001B\\\n\032yande" + "x.cloud.api.ai.ocr.v1Z>github.com/yandex" + "-cloud/go-genproto/yandex/cloud/ai/ocr/v" + "1;ocrb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { yandex.cloud.api.ai.ocr.v1.Ocr.getDescriptor(), com.google.api.AnnotationsProto.getDescriptor(), yandex.cloud.api.Validation.getDescriptor(), yandex.cloud.api.OperationOuterClass.getDescriptor(), yandex.cloud.api.operation.OperationOuterClass.getDescriptor(), }); internal_static_yandex_cloud_ai_ocr_v1_RecognizeTextRequest_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_yandex_cloud_ai_ocr_v1_RecognizeTextRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_yandex_cloud_ai_ocr_v1_RecognizeTextRequest_descriptor, new java.lang.String[] { "Content", "MimeType", "LanguageCodes", "Model", "Source", }); internal_static_yandex_cloud_ai_ocr_v1_RecognizeTextResponse_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_yandex_cloud_ai_ocr_v1_RecognizeTextResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_yandex_cloud_ai_ocr_v1_RecognizeTextResponse_descriptor, new java.lang.String[] { "TextAnnotation", "Page", }); internal_static_yandex_cloud_ai_ocr_v1_GetRecognitionRequest_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_yandex_cloud_ai_ocr_v1_GetRecognitionRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_yandex_cloud_ai_ocr_v1_GetRecognitionRequest_descriptor, new java.lang.String[] { "OperationId", }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.AnnotationsProto.http); registry.add(yandex.cloud.api.OperationOuterClass.operation); registry.add(yandex.cloud.api.Validation.length); registry.add(yandex.cloud.api.Validation.required); com.google.protobuf.Descriptors.FileDescriptor .internalUpdateFileDescriptor(descriptor, registry); yandex.cloud.api.ai.ocr.v1.Ocr.getDescriptor(); com.google.api.AnnotationsProto.getDescriptor(); yandex.cloud.api.Validation.getDescriptor(); yandex.cloud.api.OperationOuterClass.getDescriptor(); yandex.cloud.api.operation.OperationOuterClass.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy