Enum ResponseType
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
نوع پاسخ شماره ای که نشان دهنده نوع پاسخ برنامه چت است.
فقط برای برنامههای گپ Google در دسترس است. برای افزونههای Google Workspace در دسترس نیست.
برای فراخوانی یک enum، کلاس والد، نام و ویژگی آن را فراخوانی می کنید. به عنوان مثال، CardService.Type.DIALOG
.
خواص
اموال | تایپ کنید | توضیحات |
---|
TYPE_UNSPECIFIED | Enum | نوع پیشفرض که بهعنوان NEW_MESSAGE استفاده میشود. |
NEW_MESSAGE | Enum | به عنوان یک پیام جدید در تاپیک ارسال کنید. |
UPDATE_MESSAGE | Enum | پیام برنامه چت را به روز کنید. این فقط در رویداد CARD_CLICKED که نوع فرستنده پیام BOT است مجاز است. |
UPDATE_USER_MESSAGE_CARDS | Enum | کارت ها را در پیام کاربر به روز کنید. این فقط به عنوان پاسخی به یک رویداد MESSAGE با یک URL منطبق، یا یک رویداد CARD_CLICKED که در آن نوع فرستنده پیام HUMAN است مجاز است. متن نادیده گرفته می شود. |
REQUEST_CONFIG | Enum | به طور خصوصی از کاربر برای احراز هویت یا پیکربندی اضافی بخواهید. |
DIALOG | Enum | دیالوگی ارائه می دهد. |
UPDATE_WIDGET | Enum | پرس و جو گزینه های تکمیل خودکار متن ویجت. |
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی."],[[["\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. |"]]