Class CalendarEventActionResponseBuilder

  • CalendarEventActionResponseBuilder helps in constructing responses for actions taken on Calendar events within Apps Script.

  • It provides methods to add attendees, attachments, and conference data to the event.

  • The build() method finalizes the response and ensures its validity before execution.

  • Developers can chain methods together for a more fluent and readable code structure.

  • Responses built using this object are ultimately represented by a CalendarEventActionResponse instance.

CalendarEventActionResponseBuilder

A builder for CalendarEventActionResponse objects.

Methods

MethodReturn typeBrief description
addAttachments(attachments)CalendarEventActionResponseBuilderSpecifies that the response should add the attachments to the Calendar event when the associated UI action is taken.
addAttendees(emails)CalendarEventActionResponseBuilderSpecifies that the response should add the indicated attendees to the Calendar event when the associated UI action is taken.
build()CalendarEventActionResponseBuilds the current Calendar event action response and validates it.
setConferenceData(conferenceData)CalendarEventActionResponseBuilderSpecifies that the response should set the indicated conference data to the Calendar event when the associated UI action is taken.

Detailed documentation

addAttachments(attachments)

Specifies that the response should add the attachments to the Calendar event when the associated UI action is taken.

Parameters

NameTypeDescription
attachmentsAttachment[]An array of Attachments to add.

Return

CalendarEventActionResponseBuilder — This object, for chaining.


addAttendees(emails)

Specifies that the response should add the indicated attendees to the Calendar event when the associated UI action is taken.

Parameters

NameTypeDescription
emailsString[]An array of email addresses to add to the event.

Return

CalendarEventActionResponseBuilder — This object, for chaining.

Throws

Error — If too many attendees have been added.


build()

Builds the current Calendar event action response and validates it.

Return

CalendarEventActionResponse — A validated CalendarEventActionResponse.

Throws

Error — If the constructed Calendar event action response isn't valid.


setConferenceData(conferenceData)

Specifies that the response should set the indicated conference data to the Calendar event when the associated UI action is taken.

Parameters

NameTypeDescription
conferenceDataConferenceDataConference data to set to the event, created by an add on.

Return

CalendarEventActionResponseBuilder — This object, for chaining.