Class: Google::Cloud::DiscoveryEngine::V1::Document

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/discoveryengine/v1/document.rb

Overview

Document captures all raw metadata information of items to be recommended or searched.

Defined Under Namespace

Classes: Content

Instance Attribute Summary collapse

Instance Attribute Details

#content::Google::Cloud::DiscoveryEngine::V1::Document::Content

Returns The unstructured data linked to this document. Content must be set if this document is under a CONTENT_REQUIRED data store.

Returns:



76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# File 'proto_docs/google/cloud/discoveryengine/v1/document.rb', line 76

class Document
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Unstructured data linked to this document.
  # @!attribute [rw] raw_bytes
  #   @return [::String]
  #     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.
  # @!attribute [rw] uri
  #   @return [::String]
  #     The URI of the content. Only Cloud Storage URIs (e.g.
  #     `gs://bucket-name/path/to/file`) are supported. The maximum file size
  #     is 2.5 MB for text-based formats, 100 MB for other formats.
  # @!attribute [rw] mime_type
  #   @return [::String]
  #     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.
  class Content
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#derived_struct_data::Google::Protobuf::Struct (readonly)

Returns Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document.

Returns:

  • (::Google::Protobuf::Struct)

    Output only. This field is OUTPUT_ONLY. It contains derived data that are not in the original input document.



76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# File 'proto_docs/google/cloud/discoveryengine/v1/document.rb', line 76

class Document
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Unstructured data linked to this document.
  # @!attribute [rw] raw_bytes
  #   @return [::String]
  #     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.
  # @!attribute [rw] uri
  #   @return [::String]
  #     The URI of the content. Only Cloud Storage URIs (e.g.
  #     `gs://bucket-name/path/to/file`) are supported. The maximum file size
  #     is 2.5 MB for text-based formats, 100 MB for other formats.
  # @!attribute [rw] mime_type
  #   @return [::String]
  #     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.
  class Content
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#id::String

Returns Immutable. The identifier of the document.

Id should conform to RFC-1034 standard with a length limit of 63 characters.

Returns:

  • (::String)

    Immutable. The identifier of the document.

    Id should conform to RFC-1034 standard with a length limit of 63 characters.



76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# File 'proto_docs/google/cloud/discoveryengine/v1/document.rb', line 76

class Document
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Unstructured data linked to this document.
  # @!attribute [rw] raw_bytes
  #   @return [::String]
  #     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.
  # @!attribute [rw] uri
  #   @return [::String]
  #     The URI of the content. Only Cloud Storage URIs (e.g.
  #     `gs://bucket-name/path/to/file`) are supported. The maximum file size
  #     is 2.5 MB for text-based formats, 100 MB for other formats.
  # @!attribute [rw] mime_type
  #   @return [::String]
  #     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.
  class Content
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#index_time::Google::Protobuf::Timestamp (readonly)

Returns Output only. The last time the document was indexed. If this field is set, the document could be returned in search results.

This field is OUTPUT_ONLY. If this field is not populated, it means the document has never been indexed.

Returns:

  • (::Google::Protobuf::Timestamp)

    Output only. The last time the document was indexed. If this field is set, the document could be returned in search results.

    This field is OUTPUT_ONLY. If this field is not populated, it means the document has never been indexed.



76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# File 'proto_docs/google/cloud/discoveryengine/v1/document.rb', line 76

class Document
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Unstructured data linked to this document.
  # @!attribute [rw] raw_bytes
  #   @return [::String]
  #     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.
  # @!attribute [rw] uri
  #   @return [::String]
  #     The URI of the content. Only Cloud Storage URIs (e.g.
  #     `gs://bucket-name/path/to/file`) are supported. The maximum file size
  #     is 2.5 MB for text-based formats, 100 MB for other formats.
  # @!attribute [rw] mime_type
  #   @return [::String]
  #     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.
  class Content
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#json_data::String

Returns The JSON string representation of the document. It should conform to the registered Schema or an INVALID_ARGUMENT error is thrown.

Returns:

  • (::String)

    The JSON string representation of the document. It should conform to the registered Schema or an INVALID_ARGUMENT error is thrown.



76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# File 'proto_docs/google/cloud/discoveryengine/v1/document.rb', line 76

class Document
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Unstructured data linked to this document.
  # @!attribute [rw] raw_bytes
  #   @return [::String]
  #     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.
  # @!attribute [rw] uri
  #   @return [::String]
  #     The URI of the content. Only Cloud Storage URIs (e.g.
  #     `gs://bucket-name/path/to/file`) are supported. The maximum file size
  #     is 2.5 MB for text-based formats, 100 MB for other formats.
  # @!attribute [rw] mime_type
  #   @return [::String]
  #     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.
  class Content
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#name::String

Returns Immutable. The full resource name of the document. Format: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}.

This field must be a UTF-8 encoded string with a length limit of 1024 characters.

Returns:

  • (::String)

    Immutable. The full resource name of the document. Format: projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document_id}.

    This field must be a UTF-8 encoded string with a length limit of 1024 characters.



76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# File 'proto_docs/google/cloud/discoveryengine/v1/document.rb', line 76

class Document
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Unstructured data linked to this document.
  # @!attribute [rw] raw_bytes
  #   @return [::String]
  #     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.
  # @!attribute [rw] uri
  #   @return [::String]
  #     The URI of the content. Only Cloud Storage URIs (e.g.
  #     `gs://bucket-name/path/to/file`) are supported. The maximum file size
  #     is 2.5 MB for text-based formats, 100 MB for other formats.
  # @!attribute [rw] mime_type
  #   @return [::String]
  #     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.
  class Content
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#parent_document_id::String

Returns The identifier of the parent document. Currently supports at most two level document hierarchy.

Id should conform to RFC-1034 standard with a length limit of 63 characters.

Returns:

  • (::String)

    The identifier of the parent document. Currently supports at most two level document hierarchy.

    Id should conform to RFC-1034 standard with a length limit of 63 characters.



76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# File 'proto_docs/google/cloud/discoveryengine/v1/document.rb', line 76

class Document
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Unstructured data linked to this document.
  # @!attribute [rw] raw_bytes
  #   @return [::String]
  #     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.
  # @!attribute [rw] uri
  #   @return [::String]
  #     The URI of the content. Only Cloud Storage URIs (e.g.
  #     `gs://bucket-name/path/to/file`) are supported. The maximum file size
  #     is 2.5 MB for text-based formats, 100 MB for other formats.
  # @!attribute [rw] mime_type
  #   @return [::String]
  #     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.
  class Content
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#schema_id::String

Returns The identifier of the schema located in the same data store.

Returns:

  • (::String)

    The identifier of the schema located in the same data store.



76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# File 'proto_docs/google/cloud/discoveryengine/v1/document.rb', line 76

class Document
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Unstructured data linked to this document.
  # @!attribute [rw] raw_bytes
  #   @return [::String]
  #     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.
  # @!attribute [rw] uri
  #   @return [::String]
  #     The URI of the content. Only Cloud Storage URIs (e.g.
  #     `gs://bucket-name/path/to/file`) are supported. The maximum file size
  #     is 2.5 MB for text-based formats, 100 MB for other formats.
  # @!attribute [rw] mime_type
  #   @return [::String]
  #     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.
  class Content
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end

#struct_data::Google::Protobuf::Struct

Returns The structured JSON data for the document. It should conform to the registered Schema or an INVALID_ARGUMENT error is thrown.

Returns:

  • (::Google::Protobuf::Struct)

    The structured JSON data for the document. It should conform to the registered Schema or an INVALID_ARGUMENT error is thrown.



76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# File 'proto_docs/google/cloud/discoveryengine/v1/document.rb', line 76

class Document
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Unstructured data linked to this document.
  # @!attribute [rw] raw_bytes
  #   @return [::String]
  #     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.
  # @!attribute [rw] uri
  #   @return [::String]
  #     The URI of the content. Only Cloud Storage URIs (e.g.
  #     `gs://bucket-name/path/to/file`) are supported. The maximum file size
  #     is 2.5 MB for text-based formats, 100 MB for other formats.
  # @!attribute [rw] mime_type
  #   @return [::String]
  #     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.
  class Content
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end
end