Class Document.Content.Builder

  • All Implemented Interfaces:
    Document.ContentOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    Document.Content

    public static final class Document.Content.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Document.Content.Builder>
    implements Document.ContentOrBuilder
     Unstructured data linked to this document.
     
    Protobuf type google.cloud.discoveryengine.v1beta.Document.Content
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<Document.Content.Builder>
      • clear

        public Document.Content.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<Document.Content.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<Document.Content.Builder>
      • getDefaultInstanceForType

        public Document.Content getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public Document.Content build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public Document.Content buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • clone

        public Document.Content.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<Document.Content.Builder>
      • setField

        public Document.Content.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                 Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<Document.Content.Builder>
      • clearField

        public Document.Content.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Document.Content.Builder>
      • clearOneof

        public Document.Content.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Document.Content.Builder>
      • setRepeatedField

        public Document.Content.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                         int index,
                                                         Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Document.Content.Builder>
      • addRepeatedField

        public Document.Content.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                         Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Document.Content.Builder>
      • mergeFrom

        public Document.Content.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Document.Content.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Document.Content.Builder>
      • mergeFrom

        public Document.Content.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                                  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                           throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Document.Content.Builder>
        Throws:
        IOException
      • hasRawBytes

        public boolean hasRawBytes()
         The content represented as a stream of bytes. The maximum length is
         1,000,000 bytes (1 MB / ~0.95 MiB).
        
         Note: As with all `bytes` fields, this field is represented as pure
         binary in Protocol Buffers and base64-encoded string in JSON. For
         example, `abc123!?$*&()'-=@~` should be represented as
         `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See
         https://developers.google.com/protocol-buffers/docs/proto3#json.
         
        bytes raw_bytes = 2;
        Specified by:
        hasRawBytes in interface Document.ContentOrBuilder
        Returns:
        Whether the rawBytes field is set.
      • getRawBytes

        public com.google.protobuf.ByteString getRawBytes()
         The content represented as a stream of bytes. The maximum length is
         1,000,000 bytes (1 MB / ~0.95 MiB).
        
         Note: As with all `bytes` fields, this field is represented as pure
         binary in Protocol Buffers and base64-encoded string in JSON. For
         example, `abc123!?$*&()'-=@~` should be represented as
         `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See
         https://developers.google.com/protocol-buffers/docs/proto3#json.
         
        bytes raw_bytes = 2;
        Specified by:
        getRawBytes in interface Document.ContentOrBuilder
        Returns:
        The rawBytes.
      • setRawBytes

        public Document.Content.Builder setRawBytes​(com.google.protobuf.ByteString value)
         The content represented as a stream of bytes. The maximum length is
         1,000,000 bytes (1 MB / ~0.95 MiB).
        
         Note: As with all `bytes` fields, this field is represented as pure
         binary in Protocol Buffers and base64-encoded string in JSON. For
         example, `abc123!?$*&()'-=@~` should be represented as
         `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See
         https://developers.google.com/protocol-buffers/docs/proto3#json.
         
        bytes raw_bytes = 2;
        Parameters:
        value - The rawBytes to set.
        Returns:
        This builder for chaining.
      • clearRawBytes

        public Document.Content.Builder clearRawBytes()
         The content represented as a stream of bytes. The maximum length is
         1,000,000 bytes (1 MB / ~0.95 MiB).
        
         Note: As with all `bytes` fields, this field is represented as pure
         binary in Protocol Buffers and base64-encoded string in JSON. For
         example, `abc123!?$*&()'-=@~` should be represented as
         `YWJjMTIzIT8kKiYoKSctPUB+` in JSON. See
         https://developers.google.com/protocol-buffers/docs/proto3#json.
         
        bytes raw_bytes = 2;
        Returns:
        This builder for chaining.
      • hasUri

        public boolean hasUri()
         The URI of the content. Only Cloud Storage URIs (e.g.
         `gs://bucket-name/path/to/file`) are supported. The maximum file size
         is 100 MB.
         
        string uri = 3;
        Specified by:
        hasUri in interface Document.ContentOrBuilder
        Returns:
        Whether the uri field is set.
      • getUri

        public String getUri()
         The URI of the content. Only Cloud Storage URIs (e.g.
         `gs://bucket-name/path/to/file`) are supported. The maximum file size
         is 100 MB.
         
        string uri = 3;
        Specified by:
        getUri in interface Document.ContentOrBuilder
        Returns:
        The uri.
      • getUriBytes

        public com.google.protobuf.ByteString getUriBytes()
         The URI of the content. Only Cloud Storage URIs (e.g.
         `gs://bucket-name/path/to/file`) are supported. The maximum file size
         is 100 MB.
         
        string uri = 3;
        Specified by:
        getUriBytes in interface Document.ContentOrBuilder
        Returns:
        The bytes for uri.
      • setUri

        public Document.Content.Builder setUri​(String value)
         The URI of the content. Only Cloud Storage URIs (e.g.
         `gs://bucket-name/path/to/file`) are supported. The maximum file size
         is 100 MB.
         
        string uri = 3;
        Parameters:
        value - The uri to set.
        Returns:
        This builder for chaining.
      • clearUri

        public Document.Content.Builder clearUri()
         The URI of the content. Only Cloud Storage URIs (e.g.
         `gs://bucket-name/path/to/file`) are supported. The maximum file size
         is 100 MB.
         
        string uri = 3;
        Returns:
        This builder for chaining.
      • setUriBytes

        public Document.Content.Builder setUriBytes​(com.google.protobuf.ByteString value)
         The URI of the content. Only Cloud Storage URIs (e.g.
         `gs://bucket-name/path/to/file`) are supported. The maximum file size
         is 100 MB.
         
        string uri = 3;
        Parameters:
        value - The bytes for uri to set.
        Returns:
        This builder for chaining.
      • getMimeType

        public String getMimeType()
         The MIME type of the content. Supported types:
        
         * `application/pdf` (PDF, only native PDFs are supported for now)
         * `text/html` (HTML)
         * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX)
         * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX)
         * `text/plain` (TXT)
        
         See https://www.iana.org/assignments/media-types/media-types.xhtml.
         
        string mime_type = 1;
        Specified by:
        getMimeType in interface Document.ContentOrBuilder
        Returns:
        The mimeType.
      • getMimeTypeBytes

        public com.google.protobuf.ByteString getMimeTypeBytes()
         The MIME type of the content. Supported types:
        
         * `application/pdf` (PDF, only native PDFs are supported for now)
         * `text/html` (HTML)
         * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX)
         * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX)
         * `text/plain` (TXT)
        
         See https://www.iana.org/assignments/media-types/media-types.xhtml.
         
        string mime_type = 1;
        Specified by:
        getMimeTypeBytes in interface Document.ContentOrBuilder
        Returns:
        The bytes for mimeType.
      • setMimeType

        public Document.Content.Builder setMimeType​(String value)
         The MIME type of the content. Supported types:
        
         * `application/pdf` (PDF, only native PDFs are supported for now)
         * `text/html` (HTML)
         * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX)
         * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX)
         * `text/plain` (TXT)
        
         See 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

        public Document.Content.Builder clearMimeType()
         The MIME type of the content. Supported types:
        
         * `application/pdf` (PDF, only native PDFs are supported for now)
         * `text/html` (HTML)
         * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX)
         * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX)
         * `text/plain` (TXT)
        
         See https://www.iana.org/assignments/media-types/media-types.xhtml.
         
        string mime_type = 1;
        Returns:
        This builder for chaining.
      • setMimeTypeBytes

        public Document.Content.Builder setMimeTypeBytes​(com.google.protobuf.ByteString value)
         The MIME type of the content. Supported types:
        
         * `application/pdf` (PDF, only native PDFs are supported for now)
         * `text/html` (HTML)
         * `application/vnd.openxmlformats-officedocument.wordprocessingml.document` (DOCX)
         * `application/vnd.openxmlformats-officedocument.presentationml.presentation` (PPTX)
         * `text/plain` (TXT)
        
         See 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.
      • setUnknownFields

        public final Document.Content.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Document.Content.Builder>
      • mergeUnknownFields

        public final Document.Content.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Document.Content.Builder>