Package com.google.cloud.documentai.v1
Class Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock.Builder>
com.google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock.Builder
- All Implemented Interfaces:
Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlockOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock
public static final class Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock.Builder
extends com.google.protobuf.GeneratedMessage.Builder<Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock.Builder>
implements Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlockOrBuilder
Represents an image type block.Protobuf type
google.cloud.documentai.v1.Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()Annotation of the image block.Optional.Optional.Optional.Text extracted from the image using OCR or alt text describing the image.Mime type of the image.Annotation of the image block.Annotation of the image block.Annotation of the image block.Optional.com.google.protobuf.ByteStringOptional.Optional.com.google.protobuf.ByteStringOptional.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorOptional.com.google.protobuf.ByteStringOptional.Text extracted from the image using OCR or alt text describing the image.com.google.protobuf.ByteStringText extracted from the image using OCR or alt text describing the image.Mime type of the image.com.google.protobuf.ByteStringMime type of the image.booleanAnnotation of the image block.booleanOptional.booleanOptional.booleanOptional.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanAnnotation of the image block.mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) Annotation of the image block.setAnnotations(Document.Annotations.Builder builderForValue) Annotation of the image block.setBlobAssetId(String value) Optional.setBlobAssetIdBytes(com.google.protobuf.ByteString value) Optional.setDataUri(String value) Optional.setDataUriBytes(com.google.protobuf.ByteString value) Optional.Optional.setGcsUriBytes(com.google.protobuf.ByteString value) Optional.setImageText(String value) Text extracted from the image using OCR or alt text describing the image.setImageTextBytes(com.google.protobuf.ByteString value) Text extracted from the image using OCR or alt text describing the image.setMimeType(String value) Mime type of the image.setMimeTypeBytes(com.google.protobuf.ByteString value) Mime type of the image.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
public Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock.Builder mergeFrom(com.google.protobuf.Message other) - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock.Builder>
-
mergeFrom
public Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock.Builder>- Throws:
IOException
-
getImageSourceCase
public Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock.ImageSourceCase getImageSourceCase()- Specified by:
getImageSourceCasein interfaceDocument.DocumentLayout.DocumentLayoutBlock.LayoutImageBlockOrBuilder
-
clearImageSource
-
hasBlobAssetId
public boolean hasBlobAssetId()Optional. Asset id of the inline image. If set, find the image content in the blob_assets field.
string blob_asset_id = 4 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
hasBlobAssetIdin interfaceDocument.DocumentLayout.DocumentLayoutBlock.LayoutImageBlockOrBuilder- Returns:
- Whether the blobAssetId field is set.
-
getBlobAssetId
Optional. Asset id of the inline image. If set, find the image content in the blob_assets field.
string blob_asset_id = 4 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getBlobAssetIdin interfaceDocument.DocumentLayout.DocumentLayoutBlock.LayoutImageBlockOrBuilder- Returns:
- The blobAssetId.
-
getBlobAssetIdBytes
public com.google.protobuf.ByteString getBlobAssetIdBytes()Optional. Asset id of the inline image. If set, find the image content in the blob_assets field.
string blob_asset_id = 4 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getBlobAssetIdBytesin interfaceDocument.DocumentLayout.DocumentLayoutBlock.LayoutImageBlockOrBuilder- Returns:
- The bytes for blobAssetId.
-
setBlobAssetId
public Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock.Builder setBlobAssetId(String value) Optional. Asset id of the inline image. If set, find the image content in the blob_assets field.
string blob_asset_id = 4 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The blobAssetId to set.- Returns:
- This builder for chaining.
-
clearBlobAssetId
Optional. Asset id of the inline image. If set, find the image content in the blob_assets field.
string blob_asset_id = 4 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- This builder for chaining.
-
setBlobAssetIdBytes
public Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock.Builder setBlobAssetIdBytes(com.google.protobuf.ByteString value) Optional. Asset id of the inline image. If set, find the image content in the blob_assets field.
string blob_asset_id = 4 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The bytes for blobAssetId to set.- Returns:
- This builder for chaining.
-
hasGcsUri
public boolean hasGcsUri()Optional. Google Cloud Storage uri of the image.
string gcs_uri = 5 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
hasGcsUriin interfaceDocument.DocumentLayout.DocumentLayoutBlock.LayoutImageBlockOrBuilder- Returns:
- Whether the gcsUri field is set.
-
getGcsUri
Optional. Google Cloud Storage uri of the image.
string gcs_uri = 5 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getGcsUriin interfaceDocument.DocumentLayout.DocumentLayoutBlock.LayoutImageBlockOrBuilder- Returns:
- The gcsUri.
-
getGcsUriBytes
public com.google.protobuf.ByteString getGcsUriBytes()Optional. Google Cloud Storage uri of the image.
string gcs_uri = 5 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getGcsUriBytesin interfaceDocument.DocumentLayout.DocumentLayoutBlock.LayoutImageBlockOrBuilder- Returns:
- The bytes for gcsUri.
-
setGcsUri
Optional. Google Cloud Storage uri of the image.
string gcs_uri = 5 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The gcsUri to set.- Returns:
- This builder for chaining.
-
clearGcsUri
Optional. Google Cloud Storage uri of the image.
string gcs_uri = 5 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- This builder for chaining.
-
setGcsUriBytes
public Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock.Builder setGcsUriBytes(com.google.protobuf.ByteString value) Optional. Google Cloud Storage uri of the image.
string gcs_uri = 5 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The bytes for gcsUri to set.- Returns:
- This builder for chaining.
-
hasDataUri
public boolean hasDataUri()Optional. Data uri of the image. It is composed of four parts: a prefix (data:), a MIME type indicating the type of data, an optional base64 token if non-textual, and the data itself: data:[<mediatype>][;base64],<data>
string data_uri = 6 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
hasDataUriin interfaceDocument.DocumentLayout.DocumentLayoutBlock.LayoutImageBlockOrBuilder- Returns:
- Whether the dataUri field is set.
-
getDataUri
Optional. Data uri of the image. It is composed of four parts: a prefix (data:), a MIME type indicating the type of data, an optional base64 token if non-textual, and the data itself: data:[<mediatype>][;base64],<data>
string data_uri = 6 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getDataUriin interfaceDocument.DocumentLayout.DocumentLayoutBlock.LayoutImageBlockOrBuilder- Returns:
- The dataUri.
-
getDataUriBytes
public com.google.protobuf.ByteString getDataUriBytes()Optional. Data uri of the image. It is composed of four parts: a prefix (data:), a MIME type indicating the type of data, an optional base64 token if non-textual, and the data itself: data:[<mediatype>][;base64],<data>
string data_uri = 6 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getDataUriBytesin interfaceDocument.DocumentLayout.DocumentLayoutBlock.LayoutImageBlockOrBuilder- Returns:
- The bytes for dataUri.
-
setDataUri
public Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock.Builder setDataUri(String value) Optional. Data uri of the image. It is composed of four parts: a prefix (data:), a MIME type indicating the type of data, an optional base64 token if non-textual, and the data itself: data:[<mediatype>][;base64],<data>
string data_uri = 6 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The dataUri to set.- Returns:
- This builder for chaining.
-
clearDataUri
Optional. Data uri of the image. It is composed of four parts: a prefix (data:), a MIME type indicating the type of data, an optional base64 token if non-textual, and the data itself: data:[<mediatype>][;base64],<data>
string data_uri = 6 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- This builder for chaining.
-
setDataUriBytes
public Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock.Builder setDataUriBytes(com.google.protobuf.ByteString value) Optional. Data uri of the image. It is composed of four parts: a prefix (data:), a MIME type indicating the type of data, an optional base64 token if non-textual, and the data itself: data:[<mediatype>][;base64],<data>
string data_uri = 6 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The bytes for dataUri to set.- Returns:
- This builder for chaining.
-
getMimeType
Mime type of the image. An IANA published [media type (MIME type)] (https://www.iana.org/assignments/media-types/media-types.xhtml).
string mime_type = 1;- Specified by:
getMimeTypein interfaceDocument.DocumentLayout.DocumentLayoutBlock.LayoutImageBlockOrBuilder- Returns:
- The mimeType.
-
getMimeTypeBytes
public com.google.protobuf.ByteString getMimeTypeBytes()Mime type of the image. An IANA published [media type (MIME type)] (https://www.iana.org/assignments/media-types/media-types.xhtml).
string mime_type = 1;- Specified by:
getMimeTypeBytesin interfaceDocument.DocumentLayout.DocumentLayoutBlock.LayoutImageBlockOrBuilder- Returns:
- The bytes for mimeType.
-
setMimeType
public Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock.Builder setMimeType(String value) Mime type of the image. An IANA published [media type (MIME type)] (https://www.iana.org/assignments/media-types/media-types.xhtml).
string mime_type = 1;- Parameters:
value- The mimeType to set.- Returns:
- This builder for chaining.
-
clearMimeType
Mime type of the image. An IANA published [media type (MIME type)] (https://www.iana.org/assignments/media-types/media-types.xhtml).
string mime_type = 1;- Returns:
- This builder for chaining.
-
setMimeTypeBytes
public Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock.Builder setMimeTypeBytes(com.google.protobuf.ByteString value) Mime type of the image. An IANA published [media type (MIME type)] (https://www.iana.org/assignments/media-types/media-types.xhtml).
string mime_type = 1;- Parameters:
value- The bytes for mimeType to set.- Returns:
- This builder for chaining.
-
getImageText
Text extracted from the image using OCR or alt text describing the image.
string image_text = 2;- Specified by:
getImageTextin interfaceDocument.DocumentLayout.DocumentLayoutBlock.LayoutImageBlockOrBuilder- Returns:
- The imageText.
-
getImageTextBytes
public com.google.protobuf.ByteString getImageTextBytes()Text extracted from the image using OCR or alt text describing the image.
string image_text = 2;- Specified by:
getImageTextBytesin interfaceDocument.DocumentLayout.DocumentLayoutBlock.LayoutImageBlockOrBuilder- Returns:
- The bytes for imageText.
-
setImageText
public Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock.Builder setImageText(String value) Text extracted from the image using OCR or alt text describing the image.
string image_text = 2;- Parameters:
value- The imageText to set.- Returns:
- This builder for chaining.
-
clearImageText
Text extracted from the image using OCR or alt text describing the image.
string image_text = 2;- Returns:
- This builder for chaining.
-
setImageTextBytes
public Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock.Builder setImageTextBytes(com.google.protobuf.ByteString value) Text extracted from the image using OCR or alt text describing the image.
string image_text = 2;- Parameters:
value- The bytes for imageText to set.- Returns:
- This builder for chaining.
-
hasAnnotations
public boolean hasAnnotations()Annotation of the image block.
.google.cloud.documentai.v1.Document.Annotations annotations = 3;- Specified by:
hasAnnotationsin interfaceDocument.DocumentLayout.DocumentLayoutBlock.LayoutImageBlockOrBuilder- Returns:
- Whether the annotations field is set.
-
getAnnotations
Annotation of the image block.
.google.cloud.documentai.v1.Document.Annotations annotations = 3;- Specified by:
getAnnotationsin interfaceDocument.DocumentLayout.DocumentLayoutBlock.LayoutImageBlockOrBuilder- Returns:
- The annotations.
-
setAnnotations
public Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock.Builder setAnnotations(Document.Annotations value) Annotation of the image block.
.google.cloud.documentai.v1.Document.Annotations annotations = 3; -
setAnnotations
public Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock.Builder setAnnotations(Document.Annotations.Builder builderForValue) Annotation of the image block.
.google.cloud.documentai.v1.Document.Annotations annotations = 3; -
mergeAnnotations
public Document.DocumentLayout.DocumentLayoutBlock.LayoutImageBlock.Builder mergeAnnotations(Document.Annotations value) Annotation of the image block.
.google.cloud.documentai.v1.Document.Annotations annotations = 3; -
clearAnnotations
Annotation of the image block.
.google.cloud.documentai.v1.Document.Annotations annotations = 3; -
getAnnotationsBuilder
Annotation of the image block.
.google.cloud.documentai.v1.Document.Annotations annotations = 3; -
getAnnotationsOrBuilder
Annotation of the image block.
.google.cloud.documentai.v1.Document.Annotations annotations = 3;- Specified by:
getAnnotationsOrBuilderin interfaceDocument.DocumentLayout.DocumentLayoutBlock.LayoutImageBlockOrBuilder
-