Reference documentation and code samples for the Cloud AutoML V1 API class Google::Cloud::AutoML::V1::TextSnippet.
A representation of a text snippet.
Inherits
Object
Extended By
Google::Protobuf::MessageExts::ClassMethods
Includes
Google::Protobuf::MessageExts
Methods
#content
defcontent()->::String
Returns
(::String) — Required. The content of the text snippet as a string. Up to 250000
characters long.
#content=
defcontent=(value)->::String
Parameter
value (::String) — Required. The content of the text snippet as a string. Up to 250000
characters long.
Returns
(::String) — Required. The content of the text snippet as a string. Up to 250000
characters long.
#content_uri
defcontent_uri()->::String
Returns
(::String) — Output only. HTTP URI where you can download the content.
#content_uri=
defcontent_uri=(value)->::String
Parameter
value (::String) — Output only. HTTP URI where you can download the content.
Returns
(::String) — Output only. HTTP URI where you can download the content.
#mime_type
defmime_type()->::String
Returns
(::String) — Optional. The format of content. Currently the only two allowed
values are "text/html" and "text/plain". If left blank, the format is
automatically determined from the type of the uploaded content.
#mime_type=
defmime_type=(value)->::String
Parameter
value (::String) — Optional. The format of content. Currently the only two allowed
values are "text/html" and "text/plain". If left blank, the format is
automatically determined from the type of the uploaded content.
Returns
(::String) — Optional. The format of content. Currently the only two allowed
values are "text/html" and "text/plain". If left blank, the format is
automatically determined from the type of the uploaded content.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Cloud AutoML V1 API - Class Google::Cloud::AutoML::V1::TextSnippet (v1.3.1)\n\nVersion latestkeyboard_arrow_down\n\n- [1.3.1 (latest)](/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Cloud-AutoML-V1-TextSnippet)\n- [1.3.0](/ruby/docs/reference/google-cloud-automl-v1/1.3.0/Google-Cloud-AutoML-V1-TextSnippet)\n- [1.2.1](/ruby/docs/reference/google-cloud-automl-v1/1.2.1/Google-Cloud-AutoML-V1-TextSnippet)\n- [1.1.0](/ruby/docs/reference/google-cloud-automl-v1/1.1.0/Google-Cloud-AutoML-V1-TextSnippet)\n- [1.0.1](/ruby/docs/reference/google-cloud-automl-v1/1.0.1/Google-Cloud-AutoML-V1-TextSnippet)\n- [0.10.0](/ruby/docs/reference/google-cloud-automl-v1/0.10.0/Google-Cloud-AutoML-V1-TextSnippet)\n- [0.9.2](/ruby/docs/reference/google-cloud-automl-v1/0.9.2/Google-Cloud-AutoML-V1-TextSnippet)\n- [0.8.0](/ruby/docs/reference/google-cloud-automl-v1/0.8.0/Google-Cloud-AutoML-V1-TextSnippet)\n- [0.7.0](/ruby/docs/reference/google-cloud-automl-v1/0.7.0/Google-Cloud-AutoML-V1-TextSnippet)\n- [0.6.0](/ruby/docs/reference/google-cloud-automl-v1/0.6.0/Google-Cloud-AutoML-V1-TextSnippet)\n- [0.5.1](/ruby/docs/reference/google-cloud-automl-v1/0.5.1/Google-Cloud-AutoML-V1-TextSnippet)\n- [0.4.8](/ruby/docs/reference/google-cloud-automl-v1/0.4.8/Google-Cloud-AutoML-V1-TextSnippet) \nReference documentation and code samples for the Cloud AutoML V1 API class Google::Cloud::AutoML::V1::TextSnippet.\n\nA representation of a text snippet. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #content\n\n def content() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Required. The content of the text snippet as a string. Up to 250000 characters long.\n\n### #content=\n\n def content=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Required. The content of the text snippet as a string. Up to 250000 characters long. \n**Returns**\n\n- (::String) --- Required. The content of the text snippet as a string. Up to 250000 characters long.\n\n### #content_uri\n\n def content_uri() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Output only. HTTP URI where you can download the content.\n\n### #content_uri=\n\n def content_uri=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Output only. HTTP URI where you can download the content. \n**Returns**\n\n- (::String) --- Output only. HTTP URI where you can download the content.\n\n### #mime_type\n\n def mime_type() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Optional. The format of [content](/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Cloud-AutoML-V1-TextSnippet#Google__Cloud__AutoML__V1__TextSnippet_content_instance_ \"Google::Cloud::AutoML::V1::TextSnippet#content (method)\"). Currently the only two allowed values are \"text/html\" and \"text/plain\". If left blank, the format is automatically determined from the type of the uploaded [content](/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Cloud-AutoML-V1-TextSnippet#Google__Cloud__AutoML__V1__TextSnippet_content_instance_ \"Google::Cloud::AutoML::V1::TextSnippet#content (method)\").\n\n### #mime_type=\n\n def mime_type=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Optional. The format of [content](/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Cloud-AutoML-V1-TextSnippet#Google__Cloud__AutoML__V1__TextSnippet_content_instance_ \"Google::Cloud::AutoML::V1::TextSnippet#content (method)\"). Currently the only two allowed values are \"text/html\" and \"text/plain\". If left blank, the format is automatically determined from the type of the uploaded [content](/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Cloud-AutoML-V1-TextSnippet#Google__Cloud__AutoML__V1__TextSnippet_content_instance_ \"Google::Cloud::AutoML::V1::TextSnippet#content (method)\"). \n**Returns**\n\n- (::String) --- Optional. The format of [content](/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Cloud-AutoML-V1-TextSnippet#Google__Cloud__AutoML__V1__TextSnippet_content_instance_ \"Google::Cloud::AutoML::V1::TextSnippet#content (method)\"). Currently the only two allowed values are \"text/html\" and \"text/plain\". If left blank, the format is automatically determined from the type of the uploaded [content](/ruby/docs/reference/google-cloud-automl-v1/latest/Google-Cloud-AutoML-V1-TextSnippet#Google__Cloud__AutoML__V1__TextSnippet_content_instance_ \"Google::Cloud::AutoML::V1::TextSnippet#content (method)\")."]]