Class CalendarEventActionResponseBuilder
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Szczegółowa dokumentacja
addAttachments(attachments)
Określa, że odpowiedź powinna dodać załączniki do wydarzenia w kalendarzu, gdy zostanie wykonane powiązane działanie w interfejsie.
Parametry
Powrót
CalendarEventActionResponseBuilder
– ten obiekt do łańcucha.
addAttendees(emails)
Określa, że odpowiedź powinna dodać wskazanych uczestników do wydarzenia w Kalendarzu po wykonaniu powiązanego działania w interfejsie.
Parametry
Nazwa | Typ | Opis |
emails | String[] | Tablica adresów e-mail do dodania do wydarzenia. |
Powrót
CalendarEventActionResponseBuilder
– ten obiekt do łańcucha.
Rzuty
Error
– jeśli dodano zbyt wielu uczestników.
setConferenceData(conferenceData)
Określa, że odpowiedź powinna ustawić wskazane dane konferencji w zdarzeniu w Kalendarzu, gdy zostanie wykonane powiązane działanie w interfejsie użytkownika.
Parametry
Nazwa | Typ | Opis |
conferenceData | ConferenceData | dane konferencji, które mają być ustawiane w zdarzeniu utworzonym przez dodatek. |
Powrót
CalendarEventActionResponseBuilder
– ten obiekt do łańcucha.
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-26 UTC.
[null,null,["Ostatnia aktualizacja: 2025-07-26 UTC."],[[["\u003cp\u003e\u003ccode\u003eCalendarEventActionResponseBuilder\u003c/code\u003e helps in constructing responses for actions taken on Calendar events within Apps Script.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods to add attendees, attachments, and conference data to the event.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ebuild()\u003c/code\u003e method finalizes the response and ensures its validity before execution.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can chain methods together for a more fluent and readable code structure.\u003c/p\u003e\n"],["\u003cp\u003eResponses built using this object are ultimately represented by a \u003ccode\u003eCalendarEventActionResponse\u003c/code\u003e instance.\u003c/p\u003e\n"]]],["The `CalendarEventActionResponseBuilder` allows building responses for Calendar event actions. Key actions include adding attachments (`addAttachments`) and attendees (`addAttendees`) to a calendar event, setting conference data (`setConferenceData`), and constructing the final response (`build`). `addAttachments` takes an array of attachments. `addAttendees` accepts an array of email addresses. `setConferenceData` uses `ConferenceData` objects. `build` validates and returns the configured `CalendarEventActionResponse`.\n"],null,["# Class CalendarEventActionResponseBuilder\n\nCalendarEventActionResponseBuilder\n\nA builder for [CalendarEventActionResponse](/apps-script/reference/card-service/calendar-event-action-response) objects. \n\n### Methods\n\n| Method | Return type | Brief description |\n|-------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------|\n| [addAttachments(attachments)](#addAttachments(Attachment)) | [CalendarEventActionResponseBuilder](#) | Specifies that the response should add the attachments to the Calendar event when the associated UI action is taken. |\n| [addAttendees(emails)](#addAttendees(String)) | [CalendarEventActionResponseBuilder](#) | Specifies that the response should add the indicated attendees to the Calendar event when the associated UI action is taken. |\n| [build()](#build()) | [CalendarEventActionResponse](/apps-script/reference/card-service/calendar-event-action-response) | Builds the current Calendar event action response and validates it. |\n| [setConferenceData(conferenceData)](#setConferenceData(ConferenceData)) | [CalendarEventActionResponseBuilder](#) | Specifies that the response should set the indicated conference data to the Calendar event when the associated UI action is taken. |\n\nDetailed documentation\n----------------------\n\n### `add``Attachments(attachments)`\n\nSpecifies that the response should add the attachments to the Calendar event when the\nassociated UI action is taken.\n\n#### Parameters\n\n| Name | Type | Description |\n|---------------|----------------------------------------------------------------|-----------------------------------------------------------------------------------|\n| `attachments` | [Attachment[]](/apps-script/reference/card-service/attachment) | An array of [Attachment](/apps-script/reference/card-service/attachment)s to add. |\n\n#### Return\n\n\n[CalendarEventActionResponseBuilder](#) --- This object, for chaining.\n\n*** ** * ** ***\n\n### `add``Attendees(emails)`\n\nSpecifies that the response should add the indicated attendees to the Calendar event when the\nassociated UI action is taken.\n\n#### Parameters\n\n| Name | Type | Description |\n|----------|------------|--------------------------------------------------|\n| `emails` | `String[]` | An array of email addresses to add to the event. |\n\n#### Return\n\n\n[CalendarEventActionResponseBuilder](#) --- This object, for chaining.\n\n#### Throws\n\n\n[`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) --- If too many attendees have been added.\n\n*** ** * ** ***\n\n### `build()`\n\nBuilds the current Calendar event action response and validates it.\n\n#### Return\n\n\n[CalendarEventActionResponse](/apps-script/reference/card-service/calendar-event-action-response) --- A validated [CalendarEventActionResponse](/apps-script/reference/card-service/calendar-event-action-response).\n\n#### Throws\n\n\n[`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) --- If the constructed Calendar event action response isn't valid.\n\n*** ** * ** ***\n\n### `set``Conference``Data(conferenceData)`\n\nSpecifies that the response should set the indicated conference data to the Calendar event when\nthe associated UI action is taken.\n\n#### Parameters\n\n| Name | Type | Description |\n|--------------------|-----------------------------------------------------------|------------------------------------------------------------|\n| `conference``Data` | [ConferenceData](../conference-data/conference-data.html) | Conference data to set to the event, created by an add on. |\n\n#### Return\n\n\n[CalendarEventActionResponseBuilder](#) --- This object, for chaining."]]