TextModuleData
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
文本模块的数据。所有字段均为选填字段。系统将显示标题(如果有),如果定义了不同类型的正文,则将串联这些正文。
JSON 表示法 |
{
"header": string,
"body": string,
"localizedHeader": {
object (LocalizedString )
},
"localizedBody": {
object (LocalizedString )
},
"id": string
} |
字段 |
body |
string
文本模块的正文,定义为不间断字符串。建议的最大长度为 500 个字符,以确保字符串能在较小的屏幕上完整显示。
|
localizedBody |
object (LocalizedString )
已翻译的正文字符串。建议的最大长度为 500 个字符,以确保字符串能在较小的屏幕上完整显示。
|
id |
string
与文本模块关联的 ID。通过此字段,您可以轻松管理文本模块,以及在模板替换项中引用这些模块。ID 应仅包含字母数字字符、“_”或“-”。它不能包含句点,因为句点用于分隔模板替换项中 FieldReference.fieldPaths 内的字段。
|
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eText modules consist of a header and body, with optional localized versions for each.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eheader\u003c/code\u003e and \u003ccode\u003ebody\u003c/code\u003e fields are strings with recommended maximum lengths for display purposes.\u003c/p\u003e\n"],["\u003cp\u003eLocalized content can be provided using the \u003ccode\u003elocalizedHeader\u003c/code\u003e and \u003ccode\u003elocalizedBody\u003c/code\u003e fields, which accept LocalizedString objects.\u003c/p\u003e\n"],["\u003cp\u003eEach text module can have a unique \u003ccode\u003eid\u003c/code\u003e for management and referencing within templates, using only alphanumeric characters, '_', or '-'.\u003c/p\u003e\n"]]],["The provided data defines the structure of a Text module using a JSON format. Key fields include `header`, `body`, `localizedHeader`, `localizedBody`, and `id`, all optional. Headers and bodies can be defined as strings or localized objects with recommended maximum lengths of 35 and 500 characters, respectively. The `id` field, for management, must be alphanumeric, using '_' or '-' and not '.'. Different body types will be combined, if provided.\n"],null,["# TextModuleData\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n\nData for Text module. All fields are optional. Header will be displayed if available, different types of bodies will be concatenated if they are defined.\n\n| JSON representation |\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"header\": string, \"body\": string, \"localizedHeader\": { object (/wallet/reference/rest/v1/LocalizedString) }, \"localizedBody\": { object (/wallet/reference/rest/v1/LocalizedString) }, \"id\": string } ``` |\n\n| Fields ||\n|-------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `header` | `string` The header of the Text Module. Recommended maximum length is 35 characters to ensure full string is displayed on smaller screens. |\n| `body` | `string` The body of the Text Module, which is defined as an uninterrupted string. Recommended maximum length is 500 characters to ensure full string is displayed on smaller screens. |\n| `localizedHeader` | `object (`[LocalizedString](/wallet/reference/rest/v1/LocalizedString)`)` Translated strings for the header. Recommended maximum length is 35 characters to ensure full string is displayed on smaller screens. |\n| `localizedBody` | `object (`[LocalizedString](/wallet/reference/rest/v1/LocalizedString)`)` Translated strings for the body. Recommended maximum length is 500 characters to ensure full string is displayed on smaller screens. |\n| `id` | `string` The ID associated with a text module. This field is here to enable ease of management of text modules and referencing them in template overrides. The ID should only include alphanumeric characters, '_', or '-'. It can not include dots, as dots are used to separate fields within FieldReference.fieldPaths in template overrides. |"]]