Class UniversalActionResponseBuilder
Tài liệu chi tiết
build()
Tạo và xác thực phản hồi thao tác chung hiện tại.
Cầu thủ trả bóng
UniversalActionResponse
– UniversalActionResponse đã được xác thực.
Gửi
Error
– nếu phản hồi hành động phổ quát được tạo không hợp lệ.
displayAddOnCards(cardObjects)
Hiển thị tiện ích bổ sung cùng với các thẻ được chỉ định.
Tham số
Tên | Loại | Mô tả |
cardObjects | Object[] | Một mảng Card để hiển thị. |
Cầu thủ trả bóng
UniversalActionResponseBuilder
– Đối tượng này, để tạo chuỗi.
setOpenLink(openLink)
Đặt URL để mở khi chọn hành động chung.
Tham số
Tên | Loại | Mô tả |
openLink | OpenLink | Đối tượng đường liên kết cần sử dụng. |
Cầu thủ trả bóng
UniversalActionResponseBuilder
– Đối tượng này, để tạo chuỗi.
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2024-12-03 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2024-12-03 UTC."],[[["UniversalActionResponseBuilder facilitates constructing UniversalActionResponse objects for handling user actions within Google Workspace add-ons."],["It provides methods to define the response behavior, including displaying add-on cards (`displayAddOnCards`) or opening URLs (`setOpenLink`)."],["The `build()` method finalizes and validates the response configuration."]]],["The `UniversalActionResponseBuilder` constructs `UniversalActionResponse` objects. Key actions include: `build()`, which creates and validates the response, returning a `UniversalActionResponse`. `displayAddOnCards(cardObjects)` presents the add-on with provided `Card` objects, and `setOpenLink(openLink)` defines a URL that opens upon universal action selection, using an `OpenLink` object. Both `displayAddOnCards` and `setOpenLink` allow for method chaining. The `build()` method can throw an `Error` if the created object is not valid.\n"]]