Enum ResponseType
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ResponseType
อาร์เรย์แบบจำกัดที่แสดงถึงประเภทการตอบกลับของแอป Chat
ใช้ได้กับแอป Google Chat เท่านั้น ไม่พร้อมใช้งานสำหรับส่วนเสริมของ Google Workspace
หากต้องการเรียกใช้ enum ให้เรียกคลาสหลัก ชื่อ และพร็อพเพอร์ตี้ของ enum นั้น เช่น
CardService.Type.DIALOG
พร็อพเพอร์ตี้
พร็อพเพอร์ตี้ | ประเภท | คำอธิบาย |
TYPE_UNSPECIFIED | Enum | ประเภทเริ่มต้นที่จัดการเป็น NEW_MESSAGE |
NEW_MESSAGE | Enum | โพสต์เป็นข้อความใหม่ในหัวข้อ |
UPDATE_MESSAGE | Enum | อัปเดตข้อความของแอป Chat ซึ่งอนุญาตเฉพาะในเหตุการณ์ CARD_CLICKED ที่ประเภทผู้ส่งข้อความคือ BOT |
UPDATE_USER_MESSAGE_CARDS | Enum | อัปเดตการ์ดในข้อความของผู้ใช้ ซึ่งอนุญาตเฉพาะในการตอบกลับเหตุการณ์ MESSAGE ที่มี URL ที่ตรงกัน หรือเหตุการณ์ CARD_CLICKED ที่ผู้ส่งข้อความเป็นประเภท HUMAN ระบบจะไม่สนใจข้อความ |
REQUEST_CONFIG | Enum | ขอให้ผู้ใช้ตรวจสอบสิทธิ์หรือกําหนดค่าเพิ่มเติมเป็นการส่วนตัว |
DIALOG | Enum | แสดงกล่องโต้ตอบ |
UPDATE_WIDGET | Enum | การค้นหาตัวเลือกการเติมข้อความอัตโนมัติของวิดเจ็ต |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[[["\u003cp\u003e\u003ccode\u003eResponseType\u003c/code\u003e is an enum used to define the type of response a Google Chat app sends.\u003c/p\u003e\n"],["\u003cp\u003eIt is exclusively for Google Chat apps and is not applicable to Google Workspace Add-ons.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eResponseType\u003c/code\u003e properties specify actions like posting new messages, updating existing ones, requesting user configuration, and displaying dialogs.\u003c/p\u003e\n"],["\u003cp\u003eUpdating cards on user messages or the Chat app's message depends on specific event triggers and sender types.\u003c/p\u003e\n"],["\u003cp\u003eTo call an enum property, use its parent class, name, and the specific property (e.g., \u003ccode\u003eCardService.Type.DIALOG\u003c/code\u003e).\u003c/p\u003e\n"]]],["The `ResponseType` enum defines how a Google Chat app responds. Available responses include `NEW_MESSAGE` (post a new message), `UPDATE_MESSAGE` (update the app's message, only for bot-initiated events), and `UPDATE_USER_MESSAGE_CARDS` (update cards on a user's message for human or URL-matched events). Other options: `REQUEST_CONFIG` (ask for user config), `DIALOG` (present a dialog), `UPDATE_WIDGET` (widget autocomplete query), and the default `TYPE_UNSPECIFIED` which is handled as `NEW_MESSAGE`.\n"],null,["# Enum ResponseType\n\nResponseType\n\nAn enum that represents the type of Chat app response.\n\nOnly available for Google Chat apps. Not available for Google Workspace add-ons.\n\nTo call an enum, you call its parent class, name, and property. For example, `\nCardService.Type.DIALOG`. \n\n### Properties\n\n| Property | Type | Description |\n|-----------------------------|--------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `TYPE_UNSPECIFIED` | `Enum` | Default type that's handled as `NEW_MESSAGE`. |\n| `NEW_MESSAGE` | `Enum` | Post as a new message in the topic. |\n| `UPDATE_MESSAGE` | `Enum` | Update the Chat app's message. This is only permitted on a `CARD_CLICKED` event where the message sender type is `BOT`. |\n| `UPDATE_USER_MESSAGE_CARDS` | `Enum` | Update the cards on a user's message. This is only permitted as a response to a `MESSAGE` event with a matched URL, or a `CARD_CLICKED` event where the message sender type is `HUMAN`. Text is ignored. |\n| `REQUEST_CONFIG` | `Enum` | Privately ask the user for additional authentication or configuration. |\n| `DIALOG` | `Enum` | Presents a dialog. |\n| `UPDATE_WIDGET` | `Enum` | Widget text autocomplete options query. |"]]