Reference documentation and code samples for the Cloud AutoML V1 Client class TextSnippet.
A representation of a text snippet.
Generated from protobuf messagegoogle.cloud.automl.v1.TextSnippet
Namespace
Google \ Cloud \ AutoMl \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ content
string
Required. The content of the text snippet as a string. Up to 250000 characters long.
↳ mime_type
string
Optional. The format ofcontent. 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 uploadedcontent.
↳ content_uri
string
Output only. HTTP URI where you can download the content.
getContent
Required. The content of the text snippet as a string. Up to 250000
characters long.
Returns
Type
Description
string
setContent
Required. The content of the text snippet as a string. Up to 250000
characters long.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getMimeType
Optional. The format ofcontent. 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 uploadedcontent.
Returns
Type
Description
string
setMimeType
Optional. The format ofcontent. 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 uploadedcontent.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getContentUri
Output only. HTTP URI where you can download the content.
Returns
Type
Description
string
setContentUri
Output only. HTTP URI where you can download the 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-09-04 UTC."],[],[],null,["# Cloud AutoML V1 Client - Class TextSnippet (2.0.5)\n\nVersion latestkeyboard_arrow_down\n\n- [2.0.5 (latest)](/php/docs/reference/cloud-automl/latest/V1.TextSnippet)\n- [2.0.4](/php/docs/reference/cloud-automl/2.0.4/V1.TextSnippet)\n- [1.6.5](/php/docs/reference/cloud-automl/1.6.5/V1.TextSnippet)\n- [1.5.4](/php/docs/reference/cloud-automl/1.5.4/V1.TextSnippet)\n- [1.4.17](/php/docs/reference/cloud-automl/1.4.17/V1.TextSnippet) \nReference documentation and code samples for the Cloud AutoML V1 Client class TextSnippet.\n\nA representation of a text snippet.\n\nGenerated from protobuf message `google.cloud.automl.v1.TextSnippet`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ AutoMl \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getContent\n\nRequired. The content of the text snippet as a string. Up to 250000\ncharacters long.\n\n### setContent\n\nRequired. The content of the text snippet as a string. Up to 250000\ncharacters long.\n\n### getMimeType\n\nOptional. The format of [content](/php/docs/reference/cloud-automl/latest/V1.TextSnippet#_Google_Cloud_AutoMl_V1_TextSnippet__getContent__). Currently the only two allowed\nvalues are \"text/html\" and \"text/plain\". If left blank, the format is\nautomatically determined from the type of the uploaded [content](/php/docs/reference/cloud-automl/latest/V1.TextSnippet#_Google_Cloud_AutoMl_V1_TextSnippet__getContent__).\n\n### setMimeType\n\nOptional. The format of [content](/php/docs/reference/cloud-automl/latest/V1.TextSnippet#_Google_Cloud_AutoMl_V1_TextSnippet__getContent__). Currently the only two allowed\nvalues are \"text/html\" and \"text/plain\". If left blank, the format is\nautomatically determined from the type of the uploaded [content](/php/docs/reference/cloud-automl/latest/V1.TextSnippet#_Google_Cloud_AutoMl_V1_TextSnippet__getContent__).\n\n### getContentUri\n\nOutput only. HTTP URI where you can download the content.\n\n### setContentUri\n\nOutput only. HTTP URI where you can download the content."]]