chat

package
v0.174.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2024 License: BSD-3-Clause Imports: 16 Imported by: 31

Documentation

Overview

Package chat provides access to the Google Chat API.

For product documentation, see: https://developers.google.com/hangouts/chat

Library status

These client libraries are officially supported by Google. However, this library is considered complete and is in maintenance mode. This means that we will address critical bugs and security issues but will not add any new features.

When possible, we recommend using our newer [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) that are still actively being worked and iterated on.

Creating a client

Usage example:

import "google.golang.org/api/chat/v1"
...
ctx := context.Background()
chatService, err := chat.NewService(ctx)

In this example, Google Application Default Credentials are used for authentication. For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.

Other authentication options

By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use google.golang.org/api/option.WithScopes:

chatService, err := chat.NewService(ctx, option.WithScopes(chat.ChatSpacesReadonlyScope))

To use an API key for authentication (note: some APIs do not support API keys), use google.golang.org/api/option.WithAPIKey:

chatService, err := chat.NewService(ctx, option.WithAPIKey("AIza..."))

To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow, use google.golang.org/api/option.WithTokenSource:

config := &oauth2.Config{...}
// ...
token, err := config.Exchange(ctx, ...)
chatService, err := chat.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))

See google.golang.org/api/option.ClientOption for details on options.

Index

Constants

View Source
const (
	// Private Service: https://www.googleapis.com/auth/chat.bot
	ChatBotScope = "https://www.googleapis.com/auth/chat.bot"

	// Delete conversations and spaces & remove access to associated files
	// in Google Chat
	ChatDeleteScope = "https://www.googleapis.com/auth/chat.delete"

	// Import spaces, messages, and memberships into Google Chat.
	ChatImportScope = "https://www.googleapis.com/auth/chat.import"

	// View, add, and remove members from conversations in Google Chat
	ChatMembershipsScope = "https://www.googleapis.com/auth/chat.memberships"

	// Add and remove itself from conversations in Google Chat
	ChatMembershipsAppScope = "https://www.googleapis.com/auth/chat.memberships.app"

	// View members in Google Chat conversations.
	ChatMembershipsReadonlyScope = "https://www.googleapis.com/auth/chat.memberships.readonly"

	// View, compose, send, update, and delete messages, and add, view, and
	// delete reactions to messages.
	ChatMessagesScope = "https://www.googleapis.com/auth/chat.messages"

	// Compose and send messages in Google Chat
	ChatMessagesCreateScope = "https://www.googleapis.com/auth/chat.messages.create"

	// View, add, and delete reactions to messages in Google Chat
	ChatMessagesReactionsScope = "https://www.googleapis.com/auth/chat.messages.reactions"

	// Add reactions to messages in Google Chat
	ChatMessagesReactionsCreateScope = "https://www.googleapis.com/auth/chat.messages.reactions.create"

	// View reactions to messages in Google Chat
	ChatMessagesReactionsReadonlyScope = "https://www.googleapis.com/auth/chat.messages.reactions.readonly"

	// View messages and reactions in Google Chat
	ChatMessagesReadonlyScope = "https://www.googleapis.com/auth/chat.messages.readonly"

	// Create conversations and spaces and see or edit metadata (including
	// history settings and access settings) in Google Chat
	ChatSpacesScope = "https://www.googleapis.com/auth/chat.spaces"

	// Create new conversations in Google Chat
	ChatSpacesCreateScope = "https://www.googleapis.com/auth/chat.spaces.create"

	// View chat and spaces in Google Chat
	ChatSpacesReadonlyScope = "https://www.googleapis.com/auth/chat.spaces.readonly"
)

OAuth2 scopes used by this API.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessoryWidget added in v0.173.0

type AccessoryWidget struct {
	// ButtonList: A list of buttons.
	ButtonList *GoogleAppsCardV1ButtonList `json:"buttonList,omitempty"`

	// ForceSendFields is a list of field names (e.g. "ButtonList") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "ButtonList") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

AccessoryWidget: One or more interactive widgets that appear at the bottom of a message. For details, see Add interactive widgets at the bottom of a message (https://developers.google.com/workspace/chat/create-messages#add-accessory-widgets).

func (*AccessoryWidget) MarshalJSON added in v0.173.0

func (s *AccessoryWidget) MarshalJSON() ([]byte, error)

type ActionParameter

type ActionParameter struct {
	// Key: The name of the parameter for the action script.
	Key string `json:"key,omitempty"`

	// Value: The value of the parameter.
	Value string `json:"value,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Key") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Key") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ActionParameter: List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters.

func (*ActionParameter) MarshalJSON

func (s *ActionParameter) MarshalJSON() ([]byte, error)

type ActionResponse

type ActionResponse struct {
	// DialogAction: Input only. A response to an interaction event related
	// to a dialog (https://developers.google.com/workspace/chat/dialogs).
	// Must be accompanied by `ResponseType.Dialog`.
	DialogAction *DialogAction `json:"dialogAction,omitempty"`

	// Type: Input only. The type of Chat app response.
	//
	// Possible values:
	//   "TYPE_UNSPECIFIED" - Default type that's handled as `NEW_MESSAGE`.
	//   "NEW_MESSAGE" - Post as a new message in the topic.
	//   "UPDATE_MESSAGE" - Update the Chat app's message. This is only
	// permitted on a `CARD_CLICKED` event where the message sender type is
	// `BOT`.
	//   "UPDATE_USER_MESSAGE_CARDS" - 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.
	//   "REQUEST_CONFIG" - Privately ask the user for additional
	// authentication or configuration.
	//   "DIALOG" - Presents a
	// [dialog](https://developers.google.com/workspace/chat/dialogs).
	//   "UPDATE_WIDGET" - Widget text autocomplete options query.
	Type string `json:"type,omitempty"`

	// UpdatedWidget: Input only. The response of the updated widget.
	UpdatedWidget *UpdatedWidget `json:"updatedWidget,omitempty"`

	// Url: Input only. URL for users to authenticate or configure. (Only
	// for `REQUEST_CONFIG` response types.)
	Url string `json:"url,omitempty"`

	// ForceSendFields is a list of field names (e.g. "DialogAction") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "DialogAction") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ActionResponse: Parameters that a Chat app can use to configure how its response is posted.

func (*ActionResponse) MarshalJSON

func (s *ActionResponse) MarshalJSON() ([]byte, error)

type ActionStatus added in v0.51.0

type ActionStatus struct {
	// StatusCode: The status code.
	//
	// Possible values:
	//   "OK" - Not an error; returned on success. HTTP Mapping: 200 OK
	//   "CANCELLED" - The operation was cancelled, typically by the caller.
	// HTTP Mapping: 499 Client Closed Request
	//   "UNKNOWN" - Unknown error. For example, this error may be returned
	// when a `Status` value received from another address space belongs to
	// an error space that is not known in this address space. Also errors
	// raised by APIs that do not return enough error information may be
	// converted to this error. HTTP Mapping: 500 Internal Server Error
	//   "INVALID_ARGUMENT" - The client specified an invalid argument. Note
	// that this differs from `FAILED_PRECONDITION`. `INVALID_ARGUMENT`
	// indicates arguments that are problematic regardless of the state of
	// the system (e.g., a malformed file name). HTTP Mapping: 400 Bad
	// Request
	//   "DEADLINE_EXCEEDED" - The deadline expired before the operation
	// could complete. For operations that change the state of the system,
	// this error may be returned even if the operation has completed
	// successfully. For example, a successful response from a server could
	// have been delayed long enough for the deadline to expire. HTTP
	// Mapping: 504 Gateway Timeout
	//   "NOT_FOUND" - Some requested entity (e.g., file or directory) was
	// not found. Note to server developers: if a request is denied for an
	// entire class of users, such as gradual feature rollout or
	// undocumented allowlist, `NOT_FOUND` may be used. If a request is
	// denied for some users within a class of users, such as user-based
	// access control, `PERMISSION_DENIED` must be used. HTTP Mapping: 404
	// Not Found
	//   "ALREADY_EXISTS" - The entity that a client attempted to create
	// (e.g., file or directory) already exists. HTTP Mapping: 409 Conflict
	//   "PERMISSION_DENIED" - The caller does not have permission to
	// execute the specified operation. `PERMISSION_DENIED` must not be used
	// for rejections caused by exhausting some resource (use
	// `RESOURCE_EXHAUSTED` instead for those errors). `PERMISSION_DENIED`
	// must not be used if the caller can not be identified (use
	// `UNAUTHENTICATED` instead for those errors). This error code does not
	// imply the request is valid or the requested entity exists or
	// satisfies other pre-conditions. HTTP Mapping: 403 Forbidden
	//   "UNAUTHENTICATED" - The request does not have valid authentication
	// credentials for the operation. HTTP Mapping: 401 Unauthorized
	//   "RESOURCE_EXHAUSTED" - Some resource has been exhausted, perhaps a
	// per-user quota, or perhaps the entire file system is out of space.
	// HTTP Mapping: 429 Too Many Requests
	//   "FAILED_PRECONDITION" - The operation was rejected because the
	// system is not in a state required for the operation's execution. For
	// example, the directory to be deleted is non-empty, an rmdir operation
	// is applied to a non-directory, etc. Service implementors can use the
	// following guidelines to decide between `FAILED_PRECONDITION`,
	// `ABORTED`, and `UNAVAILABLE`: (a) Use `UNAVAILABLE` if the client can
	// retry just the failing call. (b) Use `ABORTED` if the client should
	// retry at a higher level. For example, when a client-specified
	// test-and-set fails, indicating the client should restart a
	// read-modify-write sequence. (c) Use `FAILED_PRECONDITION` if the
	// client should not retry until the system state has been explicitly
	// fixed. For example, if an "rmdir" fails because the directory is
	// non-empty, `FAILED_PRECONDITION` should be returned since the client
	// should not retry unless the files are deleted from the directory.
	// HTTP Mapping: 400 Bad Request
	//   "ABORTED" - The operation was aborted, typically due to a
	// concurrency issue such as a sequencer check failure or transaction
	// abort. See the guidelines above for deciding between
	// `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`. HTTP Mapping:
	// 409 Conflict
	//   "OUT_OF_RANGE" - The operation was attempted past the valid range.
	// E.g., seeking or reading past end-of-file. Unlike `INVALID_ARGUMENT`,
	// this error indicates a problem that may be fixed if the system state
	// changes. For example, a 32-bit file system will generate
	// `INVALID_ARGUMENT` if asked to read at an offset that is not in the
	// range [0,2^32-1], but it will generate `OUT_OF_RANGE` if asked to
	// read from an offset past the current file size. There is a fair bit
	// of overlap between `FAILED_PRECONDITION` and `OUT_OF_RANGE`. We
	// recommend using `OUT_OF_RANGE` (the more specific error) when it
	// applies so that callers who are iterating through a space can easily
	// look for an `OUT_OF_RANGE` error to detect when they are done. HTTP
	// Mapping: 400 Bad Request
	//   "UNIMPLEMENTED" - The operation is not implemented or is not
	// supported/enabled in this service. HTTP Mapping: 501 Not Implemented
	//   "INTERNAL" - Internal errors. This means that some invariants
	// expected by the underlying system have been broken. This error code
	// is reserved for serious errors. HTTP Mapping: 500 Internal Server
	// Error
	//   "UNAVAILABLE" - The service is currently unavailable. This is most
	// likely a transient condition, which can be corrected by retrying with
	// a backoff. Note that it is not always safe to retry non-idempotent
	// operations. See the guidelines above for deciding between
	// `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`. HTTP Mapping:
	// 503 Service Unavailable
	//   "DATA_LOSS" - Unrecoverable data loss or corruption. HTTP Mapping:
	// 500 Internal Server Error
	StatusCode string `json:"statusCode,omitempty"`

	// UserFacingMessage: The message to send users about the status of
	// their request. If unset, a generic message based on the `status_code`
	// is sent.
	UserFacingMessage string `json:"userFacingMessage,omitempty"`

	// ForceSendFields is a list of field names (e.g. "StatusCode") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "StatusCode") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ActionStatus: Represents the status for a request to either invoke or submit a dialog (https://developers.google.com/workspace/chat/dialogs).

func (*ActionStatus) MarshalJSON added in v0.51.0

func (s *ActionStatus) MarshalJSON() ([]byte, error)

type Annotation

type Annotation struct {
	// Length: Length of the substring in the plain-text message body this
	// annotation corresponds to.
	Length int64 `json:"length,omitempty"`

	// RichLinkMetadata: The metadata for a rich link.
	RichLinkMetadata *RichLinkMetadata `json:"richLinkMetadata,omitempty"`

	// SlashCommand: The metadata for a slash command.
	SlashCommand *SlashCommandMetadata `json:"slashCommand,omitempty"`

	// StartIndex: Start index (0-based, inclusive) in the plain-text
	// message body this annotation corresponds to.
	StartIndex int64 `json:"startIndex,omitempty"`

	// Type: The type of this annotation.
	//
	// Possible values:
	//   "ANNOTATION_TYPE_UNSPECIFIED" - Default value for the enum. Don't
	// use.
	//   "USER_MENTION" - A user is mentioned.
	//   "SLASH_COMMAND" - A slash command is invoked.
	//   "RICH_LINK" - A rich link annotation.
	Type string `json:"type,omitempty"`

	// UserMention: The metadata of user mention.
	UserMention *UserMentionMetadata `json:"userMention,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Length") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Length") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

Annotation: Output only. Annotations associated with the plain-text body of the message. To add basic formatting to a text message, see Format text messages (https://developers.google.com/workspace/chat/format-messages). Example plain-text message body: ``` Hello @FooBot how are you!" ``` The corresponding annotations metadata: ``` "annotations":[{ "type":"USER_MENTION", "startIndex":6, "length":7, "userMention": { "user": { "name":"users/{user}", "displayName":"FooBot", "avatarUrl":"https://goo.gl/aeDtrS", "type":"BOT" }, "type":"MENTION" } }] ```

func (*Annotation) MarshalJSON

func (s *Annotation) MarshalJSON() ([]byte, error)

type AttachedGif added in v0.129.0

type AttachedGif struct {
	// Uri: Output only. The URL that hosts the GIF image.
	Uri string `json:"uri,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Uri") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Uri") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

AttachedGif: A GIF image that's specified by a URL.

func (*AttachedGif) MarshalJSON added in v0.129.0

func (s *AttachedGif) MarshalJSON() ([]byte, error)

type Attachment added in v0.30.0

type Attachment struct {
	// AttachmentDataRef: A reference to the attachment data. This field is
	// used with the media API to download the attachment data.
	AttachmentDataRef *AttachmentDataRef `json:"attachmentDataRef,omitempty"`

	// ContentName: Output only. The original file name for the content, not
	// the full path.
	ContentName string `json:"contentName,omitempty"`

	// ContentType: Output only. The content type (MIME type) of the file.
	ContentType string `json:"contentType,omitempty"`

	// DownloadUri: Output only. The download URL which should be used to
	// allow a human user to download the attachment. Chat apps shouldn't
	// use this URL to download attachment content.
	DownloadUri string `json:"downloadUri,omitempty"`

	// DriveDataRef: Output only. A reference to the Google Drive
	// attachment. This field is used with the Google Drive API.
	DriveDataRef *DriveDataRef `json:"driveDataRef,omitempty"`

	// Name: Resource name of the attachment, in the form
	// `spaces/*/messages/*/attachments/*`.
	Name string `json:"name,omitempty"`

	// Source: Output only. The source of the attachment.
	//
	// Possible values:
	//   "SOURCE_UNSPECIFIED" - Reserved.
	//   "DRIVE_FILE" - The file is a Google Drive file.
	//   "UPLOADED_CONTENT" - The file is uploaded to Chat.
	Source string `json:"source,omitempty"`

	// ThumbnailUri: Output only. The thumbnail URL which should be used to
	// preview the attachment to a human user. Chat apps shouldn't use this
	// URL to download attachment content.
	ThumbnailUri string `json:"thumbnailUri,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "AttachmentDataRef")
	// to unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "AttachmentDataRef") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

Attachment: An attachment in Google Chat.

func (*Attachment) MarshalJSON added in v0.30.0

func (s *Attachment) MarshalJSON() ([]byte, error)

type AttachmentDataRef added in v0.30.0

type AttachmentDataRef struct {
	// AttachmentUploadToken: Opaque token containing a reference to an
	// uploaded attachment. Treated by clients as an opaque string and used
	// to create or update Chat messages with attachments.
	AttachmentUploadToken string `json:"attachmentUploadToken,omitempty"`

	// ResourceName: The resource name of the attachment data. This field is
	// used with the media API to download the attachment data.
	ResourceName string `json:"resourceName,omitempty"`

	// ForceSendFields is a list of field names (e.g.
	// "AttachmentUploadToken") to unconditionally include in API requests.
	// By default, fields with empty or default values are omitted from API
	// requests. However, any non-pointer, non-interface field appearing in
	// ForceSendFields will be sent to the server regardless of whether the
	// field is empty or not. This may be used to include empty fields in
	// Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "AttachmentUploadToken") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

AttachmentDataRef: A reference to the attachment data.

func (*AttachmentDataRef) MarshalJSON added in v0.30.0

func (s *AttachmentDataRef) MarshalJSON() ([]byte, error)

type Button

type Button struct {
	// ImageButton: A button with image and `onclick` action.
	ImageButton *ImageButton `json:"imageButton,omitempty"`

	// TextButton: A button with text and `onclick` action.
	TextButton *TextButton `json:"textButton,omitempty"`

	// ForceSendFields is a list of field names (e.g. "ImageButton") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "ImageButton") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

Button: A button. Can be a text button or an image button.

func (*Button) MarshalJSON

func (s *Button) MarshalJSON() ([]byte, error)

type Card

type Card struct {
	// CardActions: The actions of this card.
	CardActions []*CardAction `json:"cardActions,omitempty"`

	// Header: The header of the card. A header usually contains a title and
	// an image.
	Header *CardHeader `json:"header,omitempty"`

	// Name: Name of the card.
	Name string `json:"name,omitempty"`

	// Sections: Sections are separated by a line divider.
	Sections []*Section `json:"sections,omitempty"`

	// ForceSendFields is a list of field names (e.g. "CardActions") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "CardActions") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

Card: A card is a UI element that can contain UI widgets such as text and images.

func (*Card) MarshalJSON

func (s *Card) MarshalJSON() ([]byte, error)

type CardAction

type CardAction struct {
	// ActionLabel: The label used to be displayed in the action menu item.
	ActionLabel string `json:"actionLabel,omitempty"`

	// OnClick: The onclick action for this action item.
	OnClick *OnClick `json:"onClick,omitempty"`

	// ForceSendFields is a list of field names (e.g. "ActionLabel") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "ActionLabel") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

CardAction: A card action is the action associated with the card. For an invoice card, a typical action would be: delete invoice, email invoice or open the invoice in browser. Not supported by Google Chat apps.

func (*CardAction) MarshalJSON

func (s *CardAction) MarshalJSON() ([]byte, error)

type CardHeader

type CardHeader struct {
	// ImageStyle: The image's type (for example, square border or circular
	// border).
	//
	// Possible values:
	//   "IMAGE_STYLE_UNSPECIFIED"
	//   "IMAGE" - Square border.
	//   "AVATAR" - Circular border.
	ImageStyle string `json:"imageStyle,omitempty"`

	// ImageUrl: The URL of the image in the card header.
	ImageUrl string `json:"imageUrl,omitempty"`

	// Subtitle: The subtitle of the card header.
	Subtitle string `json:"subtitle,omitempty"`

	// Title: The title must be specified. The header has a fixed height: if
	// both a title and subtitle is specified, each takes up one line. If
	// only the title is specified, it takes up both lines.
	Title string `json:"title,omitempty"`

	// ForceSendFields is a list of field names (e.g. "ImageStyle") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "ImageStyle") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

func (*CardHeader) MarshalJSON

func (s *CardHeader) MarshalJSON() ([]byte, error)

type CardWithId added in v0.49.0

type CardWithId struct {
	// Card: A card. Maximum size is 32 KB.
	Card *GoogleAppsCardV1Card `json:"card,omitempty"`

	// CardId: Required if the message contains multiple cards. A unique
	// identifier for a card in a message.
	CardId string `json:"cardId,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Card") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Card") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

CardWithId: A card (https://developers.google.com/workspace/chat/api/reference/rest/v1/cards) in a Google Chat message. Only Chat apps can create cards. If your Chat app authenticates as a user (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), the message can't contain cards. Card builder (https://addons.gsuite.google.com/uikit/builder)

func (*CardWithId) MarshalJSON added in v0.49.0

func (s *CardWithId) MarshalJSON() ([]byte, error)

type ChatAppLogEntry added in v0.76.0

type ChatAppLogEntry struct {
	// Deployment: The deployment that caused the error. For Chat apps built
	// in Apps Script, this is the deployment ID defined by Apps Script.
	Deployment string `json:"deployment,omitempty"`

	// DeploymentFunction: The unencrypted `callback_method` name that was
	// running when the error was encountered.
	DeploymentFunction string `json:"deploymentFunction,omitempty"`

	// Error: The error code and message.
	Error *Status `json:"error,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Deployment") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Deployment") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ChatAppLogEntry: JSON payload of error messages. If the Cloud Logging API is enabled, these error messages are logged to Google Cloud Logging (https://cloud.google.com/logging/docs).

func (*ChatAppLogEntry) MarshalJSON added in v0.76.0

func (s *ChatAppLogEntry) MarshalJSON() ([]byte, error)

type ChatClientDataSourceMarkup added in v0.132.0

type ChatClientDataSourceMarkup struct {
	// SpaceDataSource: Google Chat spaces that the user is a member of.
	SpaceDataSource *SpaceDataSource `json:"spaceDataSource,omitempty"`

	// ForceSendFields is a list of field names (e.g. "SpaceDataSource") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "SpaceDataSource") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

ChatClientDataSourceMarkup: For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. Google Chat apps (https://developers.google.com/workspace/chat):

func (*ChatClientDataSourceMarkup) MarshalJSON added in v0.132.0

func (s *ChatClientDataSourceMarkup) MarshalJSON() ([]byte, error)

type Color added in v0.49.0

type Color struct {
	// Alpha: The fraction of this color that should be applied to the
	// pixel. That is, the final pixel color is defined by the equation:
	// `pixel color = alpha * (this color) + (1.0 - alpha) * (background
	// color)` This means that a value of 1.0 corresponds to a solid color,
	// whereas a value of 0.0 corresponds to a completely transparent color.
	// This uses a wrapper message rather than a simple float scalar so that
	// it is possible to distinguish between a default value and the value
	// being unset. If omitted, this color object is rendered as a solid
	// color (as if the alpha value had been explicitly given a value of
	// 1.0).
	Alpha float64 `json:"alpha,omitempty"`

	// Blue: The amount of blue in the color as a value in the interval [0,
	// 1].
	Blue float64 `json:"blue,omitempty"`

	// Green: The amount of green in the color as a value in the interval
	// [0, 1].
	Green float64 `json:"green,omitempty"`

	// Red: The amount of red in the color as a value in the interval [0,
	// 1].
	Red float64 `json:"red,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Alpha") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Alpha") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

Color: Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn't have information about the absolute color space that should be used to interpret the RGB value—for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(”); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { resultBuilder.push('0'); } resultBuilder.push(hexString); return resultBuilder.join(”); }; // ...

func (*Color) MarshalJSON added in v0.49.0

func (s *Color) MarshalJSON() ([]byte, error)

func (*Color) UnmarshalJSON added in v0.49.0

func (s *Color) UnmarshalJSON(data []byte) error

type CommonEventObject added in v0.55.0

type CommonEventObject struct {
	// FormInputs: A map containing the values that a user inputs in a
	// widget from a card or dialog. The map keys are the string IDs
	// assigned to each widget, and the values represent inputs to the
	// widget. For details, see Process information inputted by users
	// (https://developers.google.com/chat/ui/read-form-data).
	FormInputs map[string]Inputs `json:"formInputs,omitempty"`

	// HostApp: The hostApp enum which indicates the app the add-on is
	// invoked from. Always `CHAT` for Chat apps.
	//
	// Possible values:
	//   "UNSPECIFIED_HOST_APP" - Google can't identify a host app.
	//   "GMAIL" - The add-on launches from Gmail.
	//   "CALENDAR" - The add-on launches from Google Calendar.
	//   "DRIVE" - The add-on launches from Google Drive.
	//   "DEMO" - Not used.
	//   "DOCS" - The add-on launches from Google Docs.
	//   "MEET" - The add-on launches from Google Meet.
	//   "SHEETS" - The add-on launches from Google Sheets.
	//   "SLIDES" - The add-on launches from Google Slides.
	//   "DRAWINGS" - The add-on launches from Google Drawings.
	//   "CHAT" - A Google Chat app. Not used for Google Workspace Add-ons.
	HostApp string `json:"hostApp,omitempty"`

	// InvokedFunction: Name of the invoked function associated with the
	// widget. Only set for Chat apps.
	InvokedFunction string `json:"invokedFunction,omitempty"`

	// Parameters: Custom parameters
	// (/chat/api/reference/rest/v1/cards#ActionParameter) passed to the
	// invoked function. Both keys and values must be strings.
	Parameters map[string]string `json:"parameters,omitempty"`

	// Platform: The platform enum which indicates the platform where the
	// event originates (`WEB`, `IOS`, or `ANDROID`). Not supported by Chat
	// apps.
	//
	// Possible values:
	//   "UNKNOWN_PLATFORM"
	//   "WEB"
	//   "IOS"
	//   "ANDROID"
	Platform string `json:"platform,omitempty"`

	// TimeZone: The timezone ID and offset from Coordinated Universal Time
	// (UTC). Only supported for the event types `CARD_CLICKED`
	// (https://developers.google.com/chat/api/reference/rest/v1/EventType#ENUM_VALUES.CARD_CLICKED)
	// and `SUBMIT_DIALOG`
	// (https://developers.google.com/chat/api/reference/rest/v1/DialogEventType#ENUM_VALUES.SUBMIT_DIALOG).
	TimeZone *TimeZone `json:"timeZone,omitempty"`

	// UserLocale: The full `locale.displayName` in the format of [ISO 639
	// language code]-[ISO 3166 country/region code] such as "en-US".
	UserLocale string `json:"userLocale,omitempty"`

	// ForceSendFields is a list of field names (e.g. "FormInputs") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "FormInputs") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

CommonEventObject: Represents information about the user's client, such as locale, host app, and platform. For Chat apps, `CommonEventObject` includes data submitted by users interacting with cards, like data entered in dialogs (https://developers.google.com/chat/how-tos/dialogs).

func (*CommonEventObject) MarshalJSON added in v0.55.0

func (s *CommonEventObject) MarshalJSON() ([]byte, error)

type CompleteImportSpaceRequest added in v0.156.0

type CompleteImportSpaceRequest struct {
}

CompleteImportSpaceRequest: Request message for completing the import process for a space.

type CompleteImportSpaceResponse added in v0.156.0

type CompleteImportSpaceResponse struct {
	// Space: The import mode space.
	Space *Space `json:"space,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Space") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Space") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

CompleteImportSpaceResponse: Response message for completing the import process for a space.

func (*CompleteImportSpaceResponse) MarshalJSON added in v0.156.0

func (s *CompleteImportSpaceResponse) MarshalJSON() ([]byte, error)

type CustomEmoji added in v0.123.0

type CustomEmoji struct {
	// Uid: Unique key for the custom emoji resource.
	Uid string `json:"uid,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Uid") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Uid") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

CustomEmoji: Represents a custom emoji.

func (*CustomEmoji) MarshalJSON added in v0.123.0

func (s *CustomEmoji) MarshalJSON() ([]byte, error)

type DateInput added in v0.55.0

type DateInput struct {
	// MsSinceEpoch: Time since epoch time, in milliseconds.
	MsSinceEpoch int64 `json:"msSinceEpoch,omitempty,string"`

	// ForceSendFields is a list of field names (e.g. "MsSinceEpoch") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "MsSinceEpoch") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

DateInput: Date input values.

func (*DateInput) MarshalJSON added in v0.55.0

func (s *DateInput) MarshalJSON() ([]byte, error)

type DateTimeInput added in v0.55.0

type DateTimeInput struct {
	// HasDate: Whether the `datetime` input includes a calendar date.
	HasDate bool `json:"hasDate,omitempty"`

	// HasTime: Whether the `datetime` input includes a timestamp.
	HasTime bool `json:"hasTime,omitempty"`

	// MsSinceEpoch: Time since epoch time, in milliseconds.
	MsSinceEpoch int64 `json:"msSinceEpoch,omitempty,string"`

	// ForceSendFields is a list of field names (e.g. "HasDate") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "HasDate") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

DateTimeInput: Date and time input values.

func (*DateTimeInput) MarshalJSON added in v0.55.0

func (s *DateTimeInput) MarshalJSON() ([]byte, error)

type DeletionMetadata added in v0.123.0

type DeletionMetadata struct {
	// DeletionType: Indicates who deleted the message.
	//
	// Possible values:
	//   "DELETION_TYPE_UNSPECIFIED" - This value is unused.
	//   "CREATOR" - User deleted their own message.
	//   "SPACE_OWNER" - The space owner deleted the message.
	//   "ADMIN" - A Google Workspace admin deleted the message.
	//   "APP_MESSAGE_EXPIRY" - A Chat app deleted its own message when it
	// expired.
	//   "CREATOR_VIA_APP" - A Chat app deleted the message on behalf of the
	// user.
	//   "SPACE_OWNER_VIA_APP" - A Chat app deleted the message on behalf of
	// the space owner.
	DeletionType string `json:"deletionType,omitempty"`

	// ForceSendFields is a list of field names (e.g. "DeletionType") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "DeletionType") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

DeletionMetadata: Information about a deleted message. A message is deleted when `delete_time` is set.

func (*DeletionMetadata) MarshalJSON added in v0.123.0

func (s *DeletionMetadata) MarshalJSON() ([]byte, error)

type DeprecatedEvent

type DeprecatedEvent struct {
	// Action: For `CARD_CLICKED` interaction events, the form action data
	// associated when a user clicks a card or dialog. To learn more, see
	// Read form data input by users on cards
	// (https://developers.google.com/workspace/chat/read-form-data).
	Action *FormAction `json:"action,omitempty"`

	// Common: Represents information about the user's client, such as
	// locale, host app, and platform. For Chat apps, `CommonEventObject`
	// includes information submitted by users interacting with dialogs
	// (https://developers.google.com/workspace/chat/dialogs), like data
	// entered on a card.
	Common *CommonEventObject `json:"common,omitempty"`

	// ConfigCompleteRedirectUrl: The URL the Chat app should redirect the
	// user to after they have completed an authorization or configuration
	// flow outside of Google Chat. For more information, see Connect a Chat
	// app with other services & tools
	// (https://developers.google.com/workspace/chat/connect-web-services-tools).
	ConfigCompleteRedirectUrl string `json:"configCompleteRedirectUrl,omitempty"`

	// DialogEventType: The type of dialog
	// (https://developers.google.com/workspace/chat/dialogs) interaction
	// event received.
	//
	// Possible values:
	//   "TYPE_UNSPECIFIED" - Default value. Unspecified.
	//   "REQUEST_DIALOG" - A user opens a dialog.
	//   "SUBMIT_DIALOG" - A user clicks an interactive element of a dialog.
	// For example, a user fills out information in a dialog and clicks a
	// button to submit the information.
	//   "CANCEL_DIALOG" - A user closes a dialog without submitting
	// information, or the dialog is canceled.
	DialogEventType string `json:"dialogEventType,omitempty"`

	// EventTime: The timestamp indicating when the interaction event
	// occurred.
	EventTime string `json:"eventTime,omitempty"`

	// IsDialogEvent: For `CARD_CLICKED` interaction events, whether the
	// user interacted with a dialog
	// (https://developers.google.com/workspace/chat/dialogs).
	IsDialogEvent bool `json:"isDialogEvent,omitempty"`

	// Message: The message that triggered the interaction event, if
	// applicable.
	Message *Message `json:"message,omitempty"`

	// Space: The space in which the interaction event occurred.
	Space *Space `json:"space,omitempty"`

	// ThreadKey: The Chat app-defined key for the thread related to the
	// interaction event. See `spaces.messages.thread.threadKey`
	// (/chat/api/reference/rest/v1/spaces.messages#Thread.FIELDS.thread_key)
	//  for more information.
	ThreadKey string `json:"threadKey,omitempty"`

	// Token: A secret value that legacy Chat apps can use to verify if a
	// request is from Google. Google randomly generates the token, and its
	// value remains static. You can obtain, revoke, or regenerate the token
	// from the Chat API configuration page
	// (https://console.cloud.google.com/apis/api/chat.googleapis.com/hangouts-chat)
	// in the Google Cloud Console. Modern Chat apps don't use this field.
	// It is absent from API responses and the Chat API configuration page
	// (https://console.cloud.google.com/apis/api/chat.googleapis.com/hangouts-chat).
	Token string `json:"token,omitempty"`

	// Type: The type of interaction event. For details, see Types of Google
	// Chat app interaction events
	// (https://developers.google.com/workspace/chat/events).
	//
	// Possible values:
	//   "UNSPECIFIED" - Default value for the enum. DO NOT USE.
	//   "MESSAGE" - A user sends the Chat app a message, or invokes the
	// Chat app in a space.
	//   "ADDED_TO_SPACE" - A user adds the Chat app to a space, or a Google
	// Workspace administrator installs the Chat app in direct message
	// spaces for users in their organization.
	//   "REMOVED_FROM_SPACE" - A user removes the Chat app from a space.
	//   "CARD_CLICKED" - A user clicks an interactive element of a card or
	// dialog from a Chat app, such as a button. If a user interacts with a
	// dialog, the `CARD_CLICKED` interaction event's `isDialogEvent` field
	// is set to `true` and includes a
	// [`DialogEventType`](https://developers.google.com/workspace/chat/api/r
	// eference/rest/v1/DialogEventType).
	//   "WIDGET_UPDATED" - A user updates a widget in a card message or
	// dialog.
	Type string `json:"type,omitempty"`

	// User: The user that triggered the interaction event.
	User *User `json:"user,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Action") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Action") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

DeprecatedEvent: A Google Chat app interaction event. To learn about interaction events, see Receive and respond to interactions with your Google Chat app (https://developers.google.com/workspace/chat/api/guides/message-formats). To learn about event types and for example event payloads, see Types of Google Chat app interaction events (https://developers.google.com/workspace/chat/events). In addition to receiving events from user interactions, Chat apps can receive events about changes to spaces, such as when a new member is added to a space. To learn about space events, see Work with events from Google Chat (https://developers.google.com/workspace/chat/events-overview).

func (*DeprecatedEvent) MarshalJSON

func (s *DeprecatedEvent) MarshalJSON() ([]byte, error)

type Dialog added in v0.51.0

type Dialog struct {
	// Body: Input only. Body of the dialog, which is rendered in a modal.
	// Google Chat apps don't support the following card entities:
	// `DateTimePicker`, `OnChangeAction`.
	Body *GoogleAppsCardV1Card `json:"body,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Body") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Body") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

Dialog: Wrapper around the card body of the dialog.

func (*Dialog) MarshalJSON added in v0.51.0

func (s *Dialog) MarshalJSON() ([]byte, error)

type DialogAction added in v0.51.0

type DialogAction struct {
	// ActionStatus: Input only. Status for a request to either invoke or
	// submit a dialog
	// (https://developers.google.com/workspace/chat/dialogs). Displays a
	// status and message to users, if necessary. For example, in case of an
	// error or success.
	ActionStatus *ActionStatus `json:"actionStatus,omitempty"`

	// Dialog: Input only. Dialog
	// (https://developers.google.com/workspace/chat/dialogs) for the
	// request.
	Dialog *Dialog `json:"dialog,omitempty"`

	// ForceSendFields is a list of field names (e.g. "ActionStatus") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "ActionStatus") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

DialogAction: Contains a dialog (https://developers.google.com/workspace/chat/dialogs) and request status code.

func (*DialogAction) MarshalJSON added in v0.51.0

func (s *DialogAction) MarshalJSON() ([]byte, error)

type DriveDataRef added in v0.30.0

type DriveDataRef struct {
	// DriveFileId: The ID for the drive file. Use with the Drive API.
	DriveFileId string `json:"driveFileId,omitempty"`

	// ForceSendFields is a list of field names (e.g. "DriveFileId") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "DriveFileId") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

DriveDataRef: A reference to the data of a drive attachment.

func (*DriveDataRef) MarshalJSON added in v0.30.0

func (s *DriveDataRef) MarshalJSON() ([]byte, error)

type DriveLinkData added in v0.170.0

type DriveLinkData struct {
	// DriveDataRef: A DriveDataRef
	// (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.attachments#drivedataref)
	// which references a Google Drive file.
	DriveDataRef *DriveDataRef `json:"driveDataRef,omitempty"`

	// MimeType: The mime type of the linked Google Drive resource.
	MimeType string `json:"mimeType,omitempty"`

	// ForceSendFields is a list of field names (e.g. "DriveDataRef") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "DriveDataRef") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

DriveLinkData: Data for Google Drive links.

func (*DriveLinkData) MarshalJSON added in v0.170.0

func (s *DriveLinkData) MarshalJSON() ([]byte, error)

type Emoji added in v0.123.0

type Emoji struct {
	// CustomEmoji: Output only. A custom emoji.
	CustomEmoji *CustomEmoji `json:"customEmoji,omitempty"`

	// Unicode: A basic emoji represented by a unicode string.
	Unicode string `json:"unicode,omitempty"`

	// ForceSendFields is a list of field names (e.g. "CustomEmoji") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "CustomEmoji") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

Emoji: An emoji that is used as a reaction to a message.

func (*Emoji) MarshalJSON added in v0.123.0

func (s *Emoji) MarshalJSON() ([]byte, error)

type EmojiReactionSummary added in v0.123.0

type EmojiReactionSummary struct {
	// Emoji: Emoji associated with the reactions.
	Emoji *Emoji `json:"emoji,omitempty"`

	// ReactionCount: The total number of reactions using the associated
	// emoji.
	ReactionCount int64 `json:"reactionCount,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Emoji") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Emoji") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

EmojiReactionSummary: The number of people who reacted to a message with a specific emoji.

func (*EmojiReactionSummary) MarshalJSON added in v0.123.0

func (s *EmojiReactionSummary) MarshalJSON() ([]byte, error)

type Empty

type Empty struct {
	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`
}

Empty: A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }

type FormAction

type FormAction struct {
	// ActionMethodName: The method name is used to identify which part of
	// the form triggered the form submission. This information is echoed
	// back to the Chat app as part of the card click event. You can use the
	// same method name for several elements that trigger a common behavior.
	ActionMethodName string `json:"actionMethodName,omitempty"`

	// Parameters: List of action parameters.
	Parameters []*ActionParameter `json:"parameters,omitempty"`

	// ForceSendFields is a list of field names (e.g. "ActionMethodName") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "ActionMethodName") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

FormAction: A form action describes the behavior when the form is submitted. For example, you can invoke Apps Script to handle the form.

func (*FormAction) MarshalJSON

func (s *FormAction) MarshalJSON() ([]byte, error)

type GoogleAppsCardV1Action added in v0.49.0

type GoogleAppsCardV1Action struct {
	// Function: A custom function to invoke when the containing element is
	// clicked or othrwise activated. For example usage, see Read form data
	// (https://developers.google.com/workspace/chat/read-form-data).
	Function string `json:"function,omitempty"`

	// Interaction: Optional. Required when opening a dialog
	// (https://developers.google.com/workspace/chat/dialogs). What to do in
	// response to an interaction with a user, such as a user clicking a
	// button in a card message. If unspecified, the app responds by
	// executing an `action`—like opening a link or running a
	// function—as normal. By specifying an `interaction`, the app can
	// respond in special interactive ways. For example, by setting
	// `interaction` to `OPEN_DIALOG`, the app can open a dialog
	// (https://developers.google.com/workspace/chat/dialogs). When
	// specified, a loading indicator isn't shown. If specified for an
	// add-on, the entire card is stripped and nothing is shown in the
	// client. Google Chat apps
	// (https://developers.google.com/workspace/chat):
	//
	// Possible values:
	//   "INTERACTION_UNSPECIFIED" - Default value. The `action` executes as
	// normal.
	//   "OPEN_DIALOG" - Opens a
	// [dialog](https://developers.google.com/workspace/chat/dialogs), a
	// windowed, card-based interface that Chat apps use to interact with
	// users. Only supported by Chat apps in response to button-clicks on
	// card messages. If specified for an add-on, the entire card is
	// stripped and nothing is shown in the client. [Google Chat
	// apps](https://developers.google.com/workspace/chat):
	Interaction string `json:"interaction,omitempty"`

	// LoadIndicator: Specifies the loading indicator that the action
	// displays while making the call to the action.
	//
	// Possible values:
	//   "SPINNER" - Displays a spinner to indicate that content is loading.
	//   "NONE" - Nothing is displayed.
	LoadIndicator string `json:"loadIndicator,omitempty"`

	// Parameters: List of action parameters.
	Parameters []*GoogleAppsCardV1ActionParameter `json:"parameters,omitempty"`

	// PersistValues: Indicates whether form values persist after the
	// action. The default value is `false`. If `true`, form values remain
	// after the action is triggered. To let the user make changes while the
	// action is being processed, set `LoadIndicator`
	// (https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator)
	// to `NONE`. For card messages
	// (https://developers.google.com/workspace/chat/api/guides/v1/messages/create#create)
	// in Chat apps, you must also set the action's `ResponseType`
	// (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#responsetype)
	// to `UPDATE_MESSAGE` and use the same `card_id`
	// (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#CardWithId)
	// from the card that contained the action. If `false`, the form values
	// are cleared when the action is triggered. To prevent the user from
	// making changes while the action is being processed, set
	// `LoadIndicator`
	// (https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator)
	// to `SPINNER`.
	PersistValues bool `json:"persistValues,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Function") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Function") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

GoogleAppsCardV1Action: An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. Google Workspace Add-ons and Chat apps (https://developers.google.com/workspace/extend):

func (*GoogleAppsCardV1Action) MarshalJSON added in v0.49.0

func (s *GoogleAppsCardV1Action) MarshalJSON() ([]byte, error)

type GoogleAppsCardV1ActionParameter added in v0.49.0

type GoogleAppsCardV1ActionParameter struct {
	// Key: The name of the parameter for the action script.
	Key string `json:"key,omitempty"`

	// Value: The value of the parameter.
	Value string `json:"value,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Key") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Key") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

GoogleAppsCardV1ActionParameter: List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see `CommonEventObject` (https://developers.google.com/workspace/chat/api/reference/rest/v1/Event#commoneventobject). Google Workspace Add-ons and Chat apps (https://developers.google.com/workspace/extend):

func (*GoogleAppsCardV1ActionParameter) MarshalJSON added in v0.49.0

func (s *GoogleAppsCardV1ActionParameter) MarshalJSON() ([]byte, error)

type GoogleAppsCardV1BorderStyle added in v0.49.0

type GoogleAppsCardV1BorderStyle struct {
	// CornerRadius: The corner radius for the border.
	CornerRadius int64 `json:"cornerRadius,omitempty"`

	// StrokeColor: The colors to use when the type is `BORDER_TYPE_STROKE`.
	StrokeColor *Color `json:"strokeColor,omitempty"`

	// Type: The border type.
	//
	// Possible values:
	//   "BORDER_TYPE_UNSPECIFIED" - Don't use. Unspecified.
	//   "NO_BORDER" - Default value. No border.
	//   "STROKE" - Outline.
	Type string `json:"type,omitempty"`

	// ForceSendFields is a list of field names (e.g. "CornerRadius") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "CornerRadius") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

GoogleAppsCardV1BorderStyle: The style options for the border of a card or widget, including the border type and color. Google Workspace Add-ons and Chat apps (https://developers.google.com/workspace/extend):

func (*GoogleAppsCardV1BorderStyle) MarshalJSON added in v0.49.0

func (s *GoogleAppsCardV1BorderStyle) MarshalJSON() ([]byte, error)

type GoogleAppsCardV1Button added in v0.49.0

type GoogleAppsCardV1Button struct {
	// AltText: The alternative text that's used for accessibility. Set
	// descriptive text that lets users know what the button does. For
	// example, if a button opens a hyperlink, you might write: "Opens a new
	// browser tab and navigates to the Google Chat developer documentation
	// at https://developers.google.com/workspace/chat".
	AltText string `json:"altText,omitempty"`

	// Color: If set, the button is filled with a solid background color and
	// the font color changes to maintain contrast with the background
	// color. For example, setting a blue background likely results in white
	// text. If unset, the image background is white and the font color is
	// blue. For red, green, and blue, the value of each field is a `float`
	// number that you can express in either of two ways: as a number
	// between 0 and 255 divided by 255 (153/255), or as a value between 0
	// and 1 (0.6). 0 represents the absence of a color and 1 or 255/255
	// represent the full presence of that color on the RGB scale.
	// Optionally set `alpha`, which sets a level of transparency using this
	// equation: “` pixel color = alpha * (this color) + (1.0 - alpha) *
	// (background color) “` For `alpha`, a value of `1` corresponds with a
	// solid color, and a value of `0` corresponds with a completely
	// transparent color. For example, the following color represents a half
	// transparent red: “` "color": { "red": 1, "green": 0, "blue": 0,
	// "alpha": 0.5 } “`
	Color *Color `json:"color,omitempty"`

	// Disabled: If `true`, the button is displayed in an inactive state and
	// doesn't respond to user actions.
	Disabled bool `json:"disabled,omitempty"`

	// Icon: The icon image. If both `icon` and `text` are set, then the
	// icon appears before the text.
	Icon *GoogleAppsCardV1Icon `json:"icon,omitempty"`

	// OnClick: Required. The action to perform when a user clicks the
	// button, such as opening a hyperlink or running a custom function.
	OnClick *GoogleAppsCardV1OnClick `json:"onClick,omitempty"`

	// Text: The text displayed inside the button.
	Text string `json:"text,omitempty"`

	// ForceSendFields is a list of field names (e.g. "AltText") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "AltText") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

GoogleAppsCardV1Button: A text, icon, or text and icon button that users can click. For an example in Google Chat apps, see Add a button (https://developers.google.com/workspace/chat/design-interactive-card-dialog#add_a_button). To make an image a clickable button, specify an `Image` (not an `ImageComponent`) and set an `onClick` action. Google Workspace Add-ons and Chat apps (https://developers.google.com/workspace/extend):

func (*GoogleAppsCardV1Button) MarshalJSON added in v0.49.0

func (s *GoogleAppsCardV1Button) MarshalJSON() ([]byte, error)

type GoogleAppsCardV1ButtonList added in v0.49.0

type GoogleAppsCardV1ButtonList struct {
	// Buttons: An array of buttons.
	Buttons []*GoogleAppsCardV1Button `json:"buttons,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Buttons") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Buttons") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

GoogleAppsCardV1ButtonList: A list of buttons layed out horizontally. For an example in Google Chat apps, see Add a button (https://developers.google.com/workspace/chat/design-interactive-card-dialog#add_a_button). Google Workspace Add-ons and Chat apps (https://developers.google.com/workspace/extend):

func (*GoogleAppsCardV1ButtonList) MarshalJSON added in v0.49.0

func (s *GoogleAppsCardV1ButtonList) MarshalJSON() ([]byte, error)

type GoogleAppsCardV1Card added in v0.49.0

type GoogleAppsCardV1Card struct {
	// CardActions: The card's actions. Actions are added to the card's
	// toolbar menu. Google Workspace Add-ons
	// (https://developers.google.com/workspace/add-ons): For example, the
	// following JSON constructs a card action menu with `Settings` and
	// `Send Feedback` options: “` "card_actions": [ { "actionLabel":
	// "Settings", "onClick": { "action": { "functionName": "goToView",
	// "parameters": [ { "key": "viewType", "value": "SETTING" } ],
	// "loadIndicator": "LoadIndicator.SPINNER" } } }, { "actionLabel":
	// "Send Feedback", "onClick": { "openLink": { "url":
	// "https://example.com/feedback" } } } ] “`
	CardActions []*GoogleAppsCardV1CardAction `json:"cardActions,omitempty"`

	// DisplayStyle: In Google Workspace Add-ons, sets the display
	// properties of the `peekCardHeader`. Google Workspace Add-ons
	// (https://developers.google.com/workspace/add-ons):
	//
	// Possible values:
	//   "DISPLAY_STYLE_UNSPECIFIED" - Don't use. Unspecified.
	//   "PEEK" - The header of the card appears at the bottom of the
	// sidebar, partially covering the current top card of the stack.
	// Clicking the header pops the card into the card stack. If the card
	// has no header, a generated header is used instead.
	//   "REPLACE" - Default value. The card is shown by replacing the view
	// of the top card in the card stack.
	DisplayStyle string `json:"displayStyle,omitempty"`

	// FixedFooter: The fixed footer shown at the bottom of this card.
	// Setting `fixedFooter` without specifying a `primaryButton` or a
	// `secondaryButton` causes an error. For Chat apps, you can use fixed
	// footers in dialogs
	// (https://developers.google.com/workspace/chat/dialogs), but not card
	// messages
	// (https://developers.google.com/workspace/chat/create-messages#create).
	// Google Workspace Add-ons and Chat apps
	// (https://developers.google.com/workspace/extend):
	FixedFooter *GoogleAppsCardV1CardFixedFooter `json:"fixedFooter,omitempty"`

	// Header: The header of the card. A header usually contains a leading
	// image and a title. Headers always appear at the top of a card.
	Header *GoogleAppsCardV1CardHeader `json:"header,omitempty"`

	// Name: Name of the card. Used as a card identifier in card navigation.
	// Google Workspace Add-ons
	// (https://developers.google.com/workspace/add-ons):
	Name string `json:"name,omitempty"`

	// PeekCardHeader: When displaying contextual content, the peek card
	// header acts as a placeholder so that the user can navigate forward
	// between the homepage cards and the contextual cards. Google Workspace
	// Add-ons (https://developers.google.com/workspace/add-ons):
	PeekCardHeader *GoogleAppsCardV1CardHeader `json:"peekCardHeader,omitempty"`

	// SectionDividerStyle: The divider style between sections.
	//
	// Possible values:
	//   "DIVIDER_STYLE_UNSPECIFIED" - Don't use. Unspecified.
	//   "SOLID_DIVIDER" - Default option. Render a solid divider between
	// sections.
	//   "NO_DIVIDER" - If set, no divider is rendered between sections.
	SectionDividerStyle string `json:"sectionDividerStyle,omitempty"`

	// Sections: Contains a collection of widgets. Each section has its own,
	// optional header. Sections are visually separated by a line divider.
	// For an example in Google Chat apps, see Define a section of a card
	// (https://developers.google.com/workspace/chat/design-components-card-dialog#define_a_section_of_a_card).
	Sections []*GoogleAppsCardV1Section `json:"sections,omitempty"`

	// ForceSendFields is a list of field names (e.g. "CardActions") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "CardActions") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

GoogleAppsCardV1Card: A card interface displayed in a Google Chat message or Google Workspace Add-on. Cards support a defined layout, interactive UI elements like buttons, and rich media like images. Use cards to present detailed information, gather information from users, and guide users to take a next step. Card builder (https://addons.gsuite.google.com/uikit/builder) To learn how to build cards, see the following documentation: * For Google Chat apps, see Design the components of a card or dialog (https://developers.google.com/workspace/chat/design-components-card-dialog). * For Google Workspace Add-ons, see Card-based interfaces (https://developers.google.com/apps-script/add-ons/concepts/cards). **Example: Card message for a Google Chat app** !Example contact card (https://developers.google.com/workspace/chat/images/card_api_reference.png) To create the sample card message in Google Chat, use the following JSON: ``` { "cardsV2": [ { "cardId": "unique-card-id", "card": { "header": { "title": "Sasha", "subtitle": "Software Engineer", "imageUrl": "https://developers.google.com/workspace/chat/images/quickstart-app-av atar.png", "imageType": "CIRCLE", "imageAltText": "Avatar for Sasha" }, "sections": [ { "header": "Contact Info", "collapsible": true, "uncollapsibleWidgetsCount": 1, "widgets": [ { "decoratedText": { "startIcon": { "knownIcon": "EMAIL" }, "text": "sasha@example.com" } }, { "decoratedText": { "startIcon": { "knownIcon": "PERSON" }, "text": "Online" } }, { "decoratedText": { "startIcon": { "knownIcon": "PHONE" }, "text": "+1 (555) 555-1234" } }, { "buttonList": { "buttons": [ { "text": "Share", "onClick": { "openLink": { "url": "https://example.com/share" } } }, { "text": "Edit", "onClick": { "action": { "function": "goToView", "parameters": [ { "key": "viewType", "value": "EDIT" } ] } } } ] } } ] } ] } } ] } ```

func (*GoogleAppsCardV1Card) MarshalJSON added in v0.49.0

func (s *GoogleAppsCardV1Card) MarshalJSON() ([]byte, error)

type GoogleAppsCardV1CardAction added in v0.49.0

type GoogleAppsCardV1CardAction struct {
	// ActionLabel: The label that displays as the action menu item.
	ActionLabel string `json:"actionLabel,omitempty"`

	// OnClick: The `onClick` action for this action item.
	OnClick *GoogleAppsCardV1OnClick `json:"onClick,omitempty"`

	// ForceSendFields is a list of field names (e.g. "ActionLabel") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "ActionLabel") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

GoogleAppsCardV1CardAction: A card action is the action associated with the card. For example, an invoice card might include actions such as delete invoice, email invoice, or open the invoice in a browser. Google Workspace Add-ons (https://developers.google.com/workspace/add-ons):

func (*GoogleAppsCardV1CardAction) MarshalJSON added in v0.49.0

func (s *GoogleAppsCardV1CardAction) MarshalJSON() ([]byte, error)

type GoogleAppsCardV1CardFixedFooter added in v0.49.0

type GoogleAppsCardV1CardFixedFooter struct {
	// PrimaryButton: The primary button of the fixed footer. The button
	// must be a text button with text and color set.
	PrimaryButton *GoogleAppsCardV1Button `json:"primaryButton,omitempty"`

	// SecondaryButton: The secondary button of the fixed footer. The button
	// must be a text button with text and color set. If `secondaryButton`
	// is set, you must also set `primaryButton`.
	SecondaryButton *GoogleAppsCardV1Button `json:"secondaryButton,omitempty"`

	// ForceSendFields is a list of field names (e.g. "PrimaryButton") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "PrimaryButton") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

GoogleAppsCardV1CardFixedFooter: A persistent (sticky) footer that that appears at the bottom of the card. Setting `fixedFooter` without specifying a `primaryButton` or a `secondaryButton` causes an error. For Chat apps, you can use fixed footers in dialogs (https://developers.google.com/workspace/chat/dialogs), but not card messages (https://developers.google.com/workspace/chat/create-messages#create). For an example in Google Chat apps, see Add a persistent footer (https://developers.google.com/workspace/chat/design-components-card-dialog#add_a_persistent_footer). Google Workspace Add-ons and Chat apps (https://developers.google.com/workspace/extend):

func (*GoogleAppsCardV1CardFixedFooter) MarshalJSON added in v0.49.0

func (s *GoogleAppsCardV1CardFixedFooter) MarshalJSON() ([]byte, error)

type GoogleAppsCardV1CardHeader added in v0.49.0

type GoogleAppsCardV1CardHeader struct {
	// ImageAltText: The alternative text of this image that's used for
	// accessibility.
	ImageAltText string `json:"imageAltText,omitempty"`

	// ImageType: The shape used to crop the image. Google Workspace Add-ons
	// and Chat apps (https://developers.google.com/workspace/extend):
	//
	// Possible values:
	//   "SQUARE" - Default value. Applies a square mask to the image. For
	// example, a 4x3 image becomes 3x3.
	//   "CIRCLE" - Applies a circular mask to the image. For example, a 4x3
	// image becomes a circle with a diameter of 3.
	ImageType string `json:"imageType,omitempty"`

	// ImageUrl: The HTTPS URL of the image in the card header.
	ImageUrl string `json:"imageUrl,omitempty"`

	// Subtitle: The subtitle of the card header. If specified, appears on
	// its own line below the `title`.
	Subtitle string `json:"subtitle,omitempty"`

	// Title: Required. The title of the card header. The header has a fixed
	// height: if both a title and subtitle are specified, each takes up one
	// line. If only the title is specified, it takes up both lines.
	Title string `json:"title,omitempty"`

	// ForceSendFields is a list of field names (e.g. "ImageAltText") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "ImageAltText") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

GoogleAppsCardV1CardHeader: Represents a card header. For an example in Google Chat apps, see Add a header (https://developers.google.com/workspace/chat/design-components-card-dialog#add_a_header). Google Workspace Add-ons and Chat apps (https://developers.google.com/workspace/extend):

func (*GoogleAppsCardV1CardHeader) MarshalJSON added in v0.49.0

func (s *GoogleAppsCardV1CardHeader) MarshalJSON() ([]byte, error)

type GoogleAppsCardV1Column added in v0.123.0

type GoogleAppsCardV1Column struct {
	// HorizontalAlignment: Specifies whether widgets align to the left,
	// right, or center of a column.
	//
	// Possible values:
	//   "HORIZONTAL_ALIGNMENT_UNSPECIFIED" - Don't use. Unspecified.
	//   "START" - Default value. Aligns widgets to the start position of
	// the column. For left-to-right layouts, aligns to the left. For
	// right-to-left layouts, aligns to the right.
	//   "CENTER" - Aligns widgets to the center of the column.
	//   "END" - Aligns widgets to the end position of the column. For
	// left-to-right layouts, aligns widgets to the right. For right-to-left
	// layouts, aligns widgets to the left.
	HorizontalAlignment string `json:"horizontalAlignment,omitempty"`

	// HorizontalSizeStyle: Specifies how a column fills the width of the
	// card.
	//
	// Possible values:
	//   "HORIZONTAL_SIZE_STYLE_UNSPECIFIED" - Don't use. Unspecified.
	//   "FILL_AVAILABLE_SPACE" - Default value. Column fills the available
	// space, up to 70% of the card's width. If both columns are set to
	// `FILL_AVAILABLE_SPACE`, each column fills 50% of the space.
	//   "FILL_MINIMUM_SPACE" - Column fills the least amount of space
	// possible and no more than 30% of the card's width.
	HorizontalSizeStyle string `json:"horizontalSizeStyle,omitempty"`

	// VerticalAlignment: Specifies whether widgets align to the top,
	// bottom, or center of a column.
	//
	// Possible values:
	//   "VERTICAL_ALIGNMENT_UNSPECIFIED" - Don't use. Unspecified.
	//   "CENTER" - Default value. Aligns widgets to the center of a column.
	//   "TOP" - Aligns widgets to the top of a column.
	//   "BOTTOM" - Aligns widgets to the bottom of a column.
	VerticalAlignment string `json:"verticalAlignment,omitempty"`

	// Widgets: An array of widgets included in a column. Widgets appear in
	// the order that they are specified.
	Widgets []*GoogleAppsCardV1Widgets `json:"widgets,omitempty"`

	// ForceSendFields is a list of field names (e.g. "HorizontalAlignment")
	// to unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "HorizontalAlignment") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

GoogleAppsCardV1Column: A column. Google Workspace Add-ons and Chat apps (https://developers.google.com/workspace/extend): Columns for Google Workspace Add-ons are in Developer Preview.

func (*GoogleAppsCardV1Column) MarshalJSON added in v0.123.0

func (s *GoogleAppsCardV1Column) MarshalJSON() ([]byte, error)

type GoogleAppsCardV1Columns added in v0.123.0

type GoogleAppsCardV1Columns struct {
	// ColumnItems: An array of columns. You can include up to 2 columns in
	// a card or dialog.
	ColumnItems []*GoogleAppsCardV1Column `json:"columnItems,omitempty"`

	// ForceSendFields is a list of field names (e.g. "ColumnItems") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "ColumnItems") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

GoogleAppsCardV1Columns: The `Columns` widget displays up to 2 columns in a card or dialog. You can add widgets to each column; the widgets appear in the order that they are specified. For an example in Google Chat apps, see Display cards and dialogs in columns (https://developers.google.com/workspace/chat/format-structure-card-dialog#display_cards_and_dialogs_in_columns). The height of each column is determined by the taller column. For example, if the first column is taller than the second column, both columns have the height of the first column. Because each column can contain a different number of widgets, you can't define rows or align widgets between the columns. Columns are displayed side-by-side. You can customize the width of each column using the `HorizontalSizeStyle` field. If the user's screen width is too narrow, the second column wraps below the first: * On web, the second column wraps if the screen width is less than or equal to 480 pixels. * On iOS devices, the second column wraps if the screen width is less than or equal to 300 pt. * On Android devices, the second column wraps if the screen width is less than or equal to 320 dp. To include more than 2 columns, or to use rows, use the `Grid` widget. Google Workspace Add-ons and Chat apps (https://developers.google.com/workspace/extend): Columns for Google Workspace Add-ons are in Developer Preview.

func (*GoogleAppsCardV1Columns) MarshalJSON added in v0.123.0

func (s *GoogleAppsCardV1Columns) MarshalJSON() ([]byte, error)

type GoogleAppsCardV1DateTimePicker added in v0.49.0

type GoogleAppsCardV1DateTimePicker struct {
	// Label: The text that prompts users to input a date, a time, or a date
	// and time. For example, if users are scheduling an appointment, use a
	// label such as `Appointment date` or `Appointment date and time`.
	Label string `json:"label,omitempty"`

	// Name: The name by which the `DateTimePicker` is identified in a form
	// input event. For details about working with form inputs, see Receive
	// form data
	// (https://developers.google.com/workspace/chat/read-form-data).
	Name string `json:"name,omitempty"`

	// OnChangeAction: Triggered when the user clicks **Save** or **Clear**
	// from the `DateTimePicker` interface.
	OnChangeAction *GoogleAppsCardV1Action `json:"onChangeAction,omitempty"`

	// TimezoneOffsetDate: The number representing the time zone offset from
	// UTC, in minutes. If set, the `value_ms_epoch` is displayed in the
	// specified time zone. If unset, the value defaults to the user's time
	// zone setting.
	TimezoneOffsetDate int64 `json:"timezoneOffsetDate,omitempty"`

	// Type: Whether the widget supports inputting a date, a time, or the
	// date and time.
	//
	// Possible values:
	//   "DATE_AND_TIME" - Users input a date and time.
	//   "DATE_ONLY" - Users input a date.
	//   "TIME_ONLY" - Users input a time.
	Type string `json:"type,omitempty"`

	// ValueMsEpoch: The default value displayed in the widget, in
	// milliseconds since Unix epoch time
	// (https://en.wikipedia.org/wiki/Unix_time). Specify the value based on
	// the type of picker (`DateTimePickerType`): * `DATE_AND_TIME`: a
	// calendar date and time in UTC. For example, to represent January 1,
	// 2023 at 12:00 PM UTC, use `1672574400000`. * `DATE_ONLY`: a calendar
	// date at 00:00:00 UTC. For example, to represent January 1, 2023, use
	// `1672531200000`. * `TIME_ONLY`: a time in UTC. For example, to
	// represent 12:00 PM, use `43200000` (or `12 * 60 * 60 * 1000`).
	ValueMsEpoch int64 `json:"valueMsEpoch,omitempty,string"`

	// ForceSendFields is a list of field names (e.g. "Label") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Label") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

GoogleAppsCardV1DateTimePicker: Lets users input a date, a time, or both a date and a time. For an example in Google Chat apps, see Let a user pick a date and time (https://developers.google.com/workspace/chat/design-interactive-card-dialog#let_a_user_pick_a_date_and_time). Users can input text or use the picker to select dates and times. If users input an invalid date or time, the picker shows an error that prompts users to input the information correctly. Google Workspace Add-ons and Chat apps (https://developers.google.com/workspace/extend):

func (*GoogleAppsCardV1DateTimePicker) MarshalJSON added in v0.49.0

func (s *GoogleAppsCardV1DateTimePicker) MarshalJSON() ([]byte, error)

type GoogleAppsCardV1DecoratedText added in v0.49.0

type GoogleAppsCardV1DecoratedText struct {
	// BottomLabel: The text that appears below `text`. Always wraps.
	BottomLabel string `json:"bottomLabel,omitempty"`

	// Button: A button that a user can click to trigger an action.
	Button *GoogleAppsCardV1Button `json:"button,omitempty"`

	// EndIcon: An icon displayed after the text. Supports built-in
	// (https://developers.google.com/workspace/chat/format-messages#builtinicons)
	// and custom
	// (https://developers.google.com/workspace/chat/format-messages#customicons)
	// icons.
	EndIcon *GoogleAppsCardV1Icon `json:"endIcon,omitempty"`

	// Icon: Deprecated in favor of `startIcon`.
	Icon *GoogleAppsCardV1Icon `json:"icon,omitempty"`

	// OnClick: This action is triggered when users click `topLabel` or
	// `bottomLabel`.
	OnClick *GoogleAppsCardV1OnClick `json:"onClick,omitempty"`

	// StartIcon: The icon displayed in front of the text.
	StartIcon *GoogleAppsCardV1Icon `json:"startIcon,omitempty"`

	// SwitchControl: A switch widget that a user can click to change its
	// state and trigger an action.
	SwitchControl *GoogleAppsCardV1SwitchControl `json:"switchControl,omitempty"`

	// Text: Required. The primary text. Supports simple formatting. For
	// more information about formatting text, see Formatting text in Google
	// Chat apps
	// (https://developers.google.com/workspace/chat/format-messages#card-formatting)
	// and Formatting text in Google Workspace Add-ons
	// (https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
	Text string `json:"text,omitempty"`

	// TopLabel: The text that appears above `text`. Always truncates.
	TopLabel string `json:"topLabel,omitempty"`

	// WrapText: The wrap text setting. If `true`, the text wraps and
	// displays on multiple lines. Otherwise, the text is truncated. Only
	// applies to `text`, not `topLabel` and `bottomLabel`.
	WrapText bool `json:"wrapText,omitempty"`

	// ForceSendFields is a list of field names (e.g. "BottomLabel") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "BottomLabel") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

GoogleAppsCardV1DecoratedText: A widget that displays text with optional decorations such as a label above or below the text, an icon in front of the text, a selection widget, or a button after the text. For an example in Google Chat apps, see Display text with decorative text (https://developers.google.com/workspace/chat/add-text-image-card-dialog#display_text_with_decorative_elements). Google Workspace Add-ons and Chat apps (https://developers.google.com/workspace/extend):

func (*GoogleAppsCardV1DecoratedText) MarshalJSON added in v0.49.0

func (s *GoogleAppsCardV1DecoratedText) MarshalJSON() ([]byte, error)

type GoogleAppsCardV1Divider added in v0.49.0

type GoogleAppsCardV1Divider struct {
}

GoogleAppsCardV1Divider: Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see Add a horizontal divider between widgets (https://developers.google.com/workspace/chat/format-structure-card-dialog#add_a_horizontal_divider_between_widgets). Google Workspace Add-ons and Chat apps (https://developers.google.com/workspace/extend): For example, the following JSON creates a divider: ``` "divider": {} ```

type GoogleAppsCardV1Grid added in v0.49.0

type GoogleAppsCardV1Grid struct {
	// BorderStyle: The border style to apply to each grid item.
	BorderStyle *GoogleAppsCardV1BorderStyle `json:"borderStyle,omitempty"`

	// ColumnCount: The number of columns to display in the grid. A default
	// value is used if this field isn't specified, and that default value
	// is different depending on where the grid is shown (dialog versus
	// companion).
	ColumnCount int64 `json:"columnCount,omitempty"`

	// Items: The items to display in the grid.
	Items []*GoogleAppsCardV1GridItem `json:"items,omitempty"`

	// OnClick: This callback is reused by each individual grid item, but
	// with the item's identifier and index in the items list added to the
	// callback's parameters.
	OnClick *GoogleAppsCardV1OnClick `json:"onClick,omitempty"`

	// Title: The text that displays in the grid header.
	Title string `json:"title,omitempty"`

	// ForceSendFields is a list of field names (e.g. "BorderStyle") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "BorderStyle") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

GoogleAppsCardV1Grid: Displays a grid with a collection of items. Items can only include text or images. For responsive columns, or to include more than text or images, use `Columns`. For an example in Google Chat apps, see Display a Grid with a collection of items (https://developers.google.com/workspace/chat/format-structure-card-dialog#display_a_grid_with_a_collection_of_items). A grid supports any number of columns and items. The number of rows is determined by items divided by columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. Google Workspace Add-ons and Chat apps (https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` "grid": { "title": "A fine collection of items", "columnCount": 2, "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ { "image": { "imageUri": "https://www.example.com/image.png", "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE" } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": { "openLink": { "url": "https://www.example.com" } } } ```

func (*GoogleAppsCardV1Grid) MarshalJSON added in v0.49.0

func (s *GoogleAppsCardV1Grid) MarshalJSON() ([]byte, error)

type GoogleAppsCardV1GridItem added in v0.49.0

type GoogleAppsCardV1GridItem struct {
	// Id: A user-specified identifier for this grid item. This identifier
	// is returned in the parent grid's `onClick` callback parameters.
	Id string `json:"id,omitempty"`

	// Image: The image that displays in the grid item.
	Image *GoogleAppsCardV1ImageComponent `json:"image,omitempty"`

	// Layout: The layout to use for the grid item.
	//
	// Possible values:
	//   "GRID_ITEM_LAYOUT_UNSPECIFIED" - Don't use. Unspecified.
	//   "TEXT_BELOW" - The title and subtitle are shown below the grid
	// item's image.
	//   "TEXT_ABOVE" - The title and subtitle are shown above the grid
	// item's image.
	Layout string `json:"layout,omitempty"`

	// Subtitle: The grid item's subtitle.
	Subtitle string `json:"subtitle,omitempty"`

	// Title: The grid item's title.
	Title string `json:"title,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Id") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Id") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

GoogleAppsCardV1GridItem: Represents an item in a grid layout. Items can contain text, an image, or both text and an image. Google Workspace Add-ons and Chat apps (https://developers.google.com/workspace/extend):

func (*GoogleAppsCardV1GridItem) MarshalJSON added in v0.49.0

func (s *GoogleAppsCardV1GridItem) MarshalJSON() ([]byte, error)

type GoogleAppsCardV1Icon added in v0.49.0

type GoogleAppsCardV1Icon struct {
	// AltText: Optional. A description of the icon used for accessibility.
	// If unspecified, the default value `Button` is provided. As a best
	// practice, you should set a helpful description for what the icon
	// displays, and if applicable, what it does. For example, `A user's
	// account portrait`, or `Opens a new browser tab and navigates to the
	// Google Chat developer documentation at
	// https://developers.google.com/workspace/chat`. If the icon is set in
	// a `Button`, the `altText` appears as helper text when the user hovers
	// over the button. However, if the button also sets `text`, the icon's
	// `altText` is ignored.
	AltText string `json:"altText,omitempty"`

	// IconUrl: Display a custom icon hosted at an HTTPS URL. For example:
	// “` "iconUrl":
	// "https://developers.google.com/workspace/chat/images/quickstart-app-av
	// atar.png" “` Supported file types include `.png` and `.jpg`.
	IconUrl string `json:"iconUrl,omitempty"`

	// ImageType: The crop style applied to the image. In some cases,
	// applying a `CIRCLE` crop causes the image to be drawn larger than a
	// built-in icon.
	//
	// Possible values:
	//   "SQUARE" - Default value. Applies a square mask to the image. For
	// example, a 4x3 image becomes 3x3.
	//   "CIRCLE" - Applies a circular mask to the image. For example, a 4x3
	// image becomes a circle with a diameter of 3.
	ImageType string `json:"imageType,omitempty"`

	// KnownIcon: Display one of the built-in icons provided by Google
	// Workspace. For example, to display an airplane icon, specify
	// `AIRPLANE`. For a bus, specify `BUS`. For a full list of supported
	// icons, see built-in icons
	// (https://developers.google.com/workspace/chat/format-messages#builtinicons).
	KnownIcon string `json:"knownIcon,omitempty"`

	// MaterialIcon: Display one of the Google Material Icons
	// (https://fonts.google.com/icons). For example, to display a checkbox
	// icon
	// (https://fonts.google.com/icons?selected=Material%20Symbols%20Outlined%3Acheck_box%3AFILL%400%3Bwght%40400%3BGRAD%400%3Bopsz%4048),
	// use “` "material_icon": { "name": "check_box" } “` Google Chat apps
	// (https://developers.google.com/workspace/chat):
	MaterialIcon *GoogleAppsCardV1MaterialIcon `json:"materialIcon,omitempty"`

	// ForceSendFields is a list of field names (e.g. "AltText") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "AltText") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

GoogleAppsCardV1Icon: An icon displayed in a widget on a card. For an example in Google Chat apps, see Add an icon (https://developers.google.com/workspace/chat/add-text-image-card-dialog#add_an_icon). Supports built-in (https://developers.google.com/workspace/chat/format-messages#builtinicons) and custom (https://developers.google.com/workspace/chat/format-messages#customicons) icons. Google Workspace Add-ons and Chat apps (https://developers.google.com/workspace/extend):

func (*GoogleAppsCardV1Icon) MarshalJSON added in v0.49.0

func (s *GoogleAppsCardV1Icon) MarshalJSON() ([]byte, error)

type GoogleAppsCardV1Image added in v0.49.0

type GoogleAppsCardV1Image struct {
	// AltText: The alternative text of this image that's used for
	// accessibility.
	AltText string `json:"altText,omitempty"`

	// ImageUrl: The HTTPS URL that hosts the image. For example: “`
	// https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png
	// “`
	ImageUrl string `json:"imageUrl,omitempty"`

	// OnClick: When a user clicks the image, the click triggers this
	// action.
	OnClick *GoogleAppsCardV1OnClick `json:"onClick,omitempty"`

	// ForceSendFields is a list of field names (e.g. "AltText") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "AltText") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

GoogleAppsCardV1Image: An image that is specified by a URL and can have an `onClick` action. For an example, see Add an image (https://developers.google.com/workspace/chat/add-text-image-card-dialog#add_an_image). Google Workspace Add-ons and Chat apps (https://developers.google.com/workspace/extend):

func (*GoogleAppsCardV1Image) MarshalJSON added in v0.49.0

func (s *GoogleAppsCardV1Image) MarshalJSON() ([]byte, error)

type GoogleAppsCardV1ImageComponent added in v0.49.0

type GoogleAppsCardV1ImageComponent struct {
	// AltText: The accessibility label for the image.
	AltText string `json:"altText,omitempty"`

	// BorderStyle: The border style to apply to the image.
	BorderStyle *GoogleAppsCardV1BorderStyle `json:"borderStyle,omitempty"`

	// CropStyle: The crop style to apply to the image.
	CropStyle *GoogleAppsCardV1ImageCropStyle `json:"cropStyle,omitempty"`

	// ImageUri: The image URL.
	ImageUri string `json:"imageUri,omitempty"`

	// ForceSendFields is a list of field names (e.g. "AltText") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "AltText") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

GoogleAppsCardV1ImageComponent: Represents an image. Google Workspace Add-ons and Chat apps (https://developers.google.com/workspace/extend):

func (*GoogleAppsCardV1ImageComponent) MarshalJSON added in v0.49.0

func (s *GoogleAppsCardV1ImageComponent) MarshalJSON() ([]byte, error)

type GoogleAppsCardV1ImageCropStyle added in v0.49.0

type GoogleAppsCardV1ImageCropStyle struct {
	// AspectRatio: The aspect ratio to use if the crop type is
	// `RECTANGLE_CUSTOM`. For example, here's how to apply a 16:9 aspect
	// ratio: “` cropStyle { "type": "RECTANGLE_CUSTOM", "aspectRatio":
	// 16/9 } “`
	AspectRatio float64 `json:"aspectRatio,omitempty"`

	// Type: The crop type.
	//
	// Possible values:
	//   "IMAGE_CROP_TYPE_UNSPECIFIED" - Don't use. Unspecified.
	//   "SQUARE" - Default value. Applies a square crop.
	//   "CIRCLE" - Applies a circular crop.
	//   "RECTANGLE_CUSTOM" - Applies a rectangular crop with a custom
	// aspect ratio. Set the custom aspect ratio with `aspectRatio`.
	//   "RECTANGLE_4_3" - Applies a rectangular crop with a 4:3 aspect
	// ratio.
	Type string `json:"type,omitempty"`

	// ForceSendFields is a list of field names (e.g. "AspectRatio") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "AspectRatio") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

GoogleAppsCardV1ImageCropStyle: Represents the crop style applied to an image. Google Workspace Add-ons and Chat apps (https://developers.google.com/workspace/extend): For example, here's how to apply a 16:9 aspect ratio: ``` cropStyle { "type": "RECTANGLE_CUSTOM", "aspectRatio": 16/9 } ```

func (*GoogleAppsCardV1ImageCropStyle) MarshalJSON added in v0.49.0

func (s *GoogleAppsCardV1ImageCropStyle) MarshalJSON() ([]byte, error)

func (*GoogleAppsCardV1ImageCropStyle) UnmarshalJSON added in v0.49.0

func (s *GoogleAppsCardV1ImageCropStyle) UnmarshalJSON(data []byte) error

type GoogleAppsCardV1MaterialIcon added in v0.171.0

type GoogleAppsCardV1MaterialIcon struct {
	// Fill: Whether the icon renders as filled. Default value is false. To
	// preview different icon settings, go to Google Font Icons
	// (https://fonts.google.com/icons) and adjust the settings under
	// **Customize**.
	Fill bool `json:"fill,omitempty"`

	// Grade: Weight and grade affect a symbol’s thickness. Adjustments to
	// grade are more granular than adjustments to weight and have a small
	// impact on the size of the symbol. Choose from {-25, 0, 200}. If
	// absent, default value is 0. If any other value is specified, the
	// default value is used. To preview different icon settings, go to
	// Google Font Icons (https://fonts.google.com/icons) and adjust the
	// settings under **Customize**.
	Grade int64 `json:"grade,omitempty"`

	// Name: The icon name defined in the Google Material Icon
	// (https://fonts.google.com/icons), for example, `check_box`. Any
	// invalid names are abandoned and replaced with empty string and
	// results in the icon failing to render.
	Name string `json:"name,omitempty"`

	// Weight: The stroke weight of the icon. Choose from {100, 200, 300,
	// 400, 500, 600, 700}. If absent, default value is 400. If any other
	// value is specified, the default value is used. To preview different
	// icon settings, go to Google Font Icons
	// (https://fonts.google.com/icons) and adjust the settings under
	// **Customize**.
	Weight int64 `json:"weight,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Fill") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Fill") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

GoogleAppsCardV1MaterialIcon: A Google Material Icon (https://fonts.google.com/icons), which includes over 2500+ options. For example, to display a checkbox icon (https://fonts.google.com/icons?selected=Material%20Symbols%20Outlined%3Acheck_box%3AFILL%400%3Bwght%40400%3BGRAD%400%3Bopsz%4048) with customized weight and grade, write the following: ``` { "name": "check_box", "fill": true, "weight": 300, "grade": -25 } ``` Google Chat apps (https://developers.google.com/workspace/chat):

func (*GoogleAppsCardV1MaterialIcon) MarshalJSON added in v0.171.0

func (s *GoogleAppsCardV1MaterialIcon) MarshalJSON() ([]byte, error)

type GoogleAppsCardV1OnClick added in v0.49.0

type GoogleAppsCardV1OnClick struct {
	// Action: If specified, an action is triggered by this `onClick`.
	Action *GoogleAppsCardV1Action `json:"action,omitempty"`

	// Card: A new card is pushed to the card stack after clicking if
	// specified. Google Workspace Add-ons
	// (https://developers.google.com/workspace/add-ons):
	Card *GoogleAppsCardV1Card `json:"card,omitempty"`

	// OpenDynamicLinkAction: An add-on triggers this action when the action
	// needs to open a link. This differs from the `open_link` above in that
	// this needs to talk to server to get the link. Thus some preparation
	// work is required for web client to do before the open link action
	// response comes back. Google Workspace Add-ons
	// (https://developers.google.com/workspace/add-ons):
	OpenDynamicLinkAction *GoogleAppsCardV1Action `json:"openDynamicLinkAction,omitempty"`

	// OpenLink: If specified, this `onClick` triggers an open link action.
	OpenLink *GoogleAppsCardV1OpenLink `json:"openLink,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Action") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Action") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

GoogleAppsCardV1OnClick: Represents how to respond when users click an interactive element on a card, such as a button. Google Workspace Add-ons and Chat apps (https://developers.google.com/workspace/extend):

func (*GoogleAppsCardV1OnClick) MarshalJSON added in v0.49.0

func (s *GoogleAppsCardV1OnClick) MarshalJSON() ([]byte, error)
type GoogleAppsCardV1OpenLink struct {
	// OnClose: Whether the client forgets about a link after opening it, or
	// observes it until the window closes. Google Workspace Add-ons
	// (https://developers.google.com/workspace/add-ons):
	//
	// Possible values:
	//   "NOTHING" - Default value. The card doesn't reload; nothing
	// happens.
	//   "RELOAD" - Reloads the card after the child window closes. If used
	// in conjunction with
	// [`OpenAs.OVERLAY`](https://developers.google.com/workspace/add-ons/ref
	// erence/rpc/google.apps.card.v1#openas), the child window acts as a
	// modal dialog and the parent card is blocked until the child window
	// closes.
	OnClose string `json:"onClose,omitempty"`

	// OpenAs: How to open a link. Google Workspace Add-ons
	// (https://developers.google.com/workspace/add-ons):
	//
	// Possible values:
	//   "FULL_SIZE" - The link opens as a full-size window (if that's the
	// frame used by the client).
	//   "OVERLAY" - The link opens as an overlay, such as a pop-up.
	OpenAs string `json:"openAs,omitempty"`

	// Url: The URL to open.
	Url string `json:"url,omitempty"`

	// ForceSendFields is a list of field names (e.g. "OnClose") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "OnClose") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

GoogleAppsCardV1OpenLink: Represents an `onClick` event that opens a hyperlink. Google Workspace Add-ons and Chat apps (https://developers.google.com/workspace/extend):

func (*GoogleAppsCardV1OpenLink) MarshalJSON added in v0.49.0

func (s *GoogleAppsCardV1OpenLink) MarshalJSON() ([]byte, error)

type GoogleAppsCardV1PlatformDataSource added in v0.132.0

type GoogleAppsCardV1PlatformDataSource struct {
	// CommonDataSource: A data source shared by all Google Workspace
	// applications, such as users in a Google Workspace organization.
	//
	// Possible values:
	//   "UNKNOWN" - Default value. Don't use.
	//   "USER" - Google Workspace users. The user can only view and select
	// users from their Google Workspace organization.
	CommonDataSource string `json:"commonDataSource,omitempty"`

	// HostAppDataSource: A data source that's unique to a Google Workspace
	// host application, such spaces in Google Chat.
	HostAppDataSource *HostAppDataSourceMarkup `json:"hostAppDataSource,omitempty"`

	// ForceSendFields is a list of field names (e.g. "CommonDataSource") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "CommonDataSource") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

GoogleAppsCardV1PlatformDataSource: For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. Google Chat apps (https://developers.google.com/workspace/chat):

func (*GoogleAppsCardV1PlatformDataSource) MarshalJSON added in v0.132.0

func (s *GoogleAppsCardV1PlatformDataSource) MarshalJSON() ([]byte, error)

type GoogleAppsCardV1Section added in v0.49.0

type GoogleAppsCardV1Section struct {
	// Collapsible: Indicates whether this section is collapsible.
	// Collapsible sections hide some or all widgets, but users can expand
	// the section to reveal the hidden widgets by clicking **Show more**.
	// Users can hide the widgets again by clicking **Show less**. To
	// determine which widgets are hidden, specify
	// `uncollapsibleWidgetsCount`.
	Collapsible bool `json:"collapsible,omitempty"`

	// Header: Text that appears at the top of a section. Supports simple
	// HTML formatted text. For more information about formatting text, see
	// Formatting text in Google Chat apps
	// (https://developers.google.com/workspace/chat/format-messages#card-formatting)
	// and Formatting text in Google Workspace Add-ons
	// (https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
	Header string `json:"header,omitempty"`

	// UncollapsibleWidgetsCount: The number of uncollapsible widgets which
	// remain visible even when a section is collapsed. For example, when a
	// section contains five widgets and the `uncollapsibleWidgetsCount` is
	// set to `2`, the first two widgets are always shown and the last three
	// are collapsed by default. The `uncollapsibleWidgetsCount` is taken
	// into account only when `collapsible` is `true`.
	UncollapsibleWidgetsCount int64 `json:"uncollapsibleWidgetsCount,omitempty"`

	// Widgets: All the widgets in the section. Must contain at least one
	// widget.
	Widgets []*GoogleAppsCardV1Widget `json:"widgets,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Collapsible") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Collapsible") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

GoogleAppsCardV1Section: A section contains a collection of widgets that are rendered vertically in the order that they're specified. Google Workspace Add-ons and Chat apps (https://developers.google.com/workspace/extend):

func (*GoogleAppsCardV1Section) MarshalJSON added in v0.49.0

func (s *GoogleAppsCardV1Section) MarshalJSON() ([]byte, error)

type GoogleAppsCardV1SelectionInput added in v0.49.0

type GoogleAppsCardV1SelectionInput struct {
	// ExternalDataSource: An external data source, such as a relational
	// data base.
	ExternalDataSource *GoogleAppsCardV1Action `json:"externalDataSource,omitempty"`

	// Items: An array of selectable items. For example, an array of radio
	// buttons or checkboxes. Supports up to 100 items.
	Items []*GoogleAppsCardV1SelectionItem `json:"items,omitempty"`

	// Label: The text that appears above the selection input field in the
	// user interface. Specify text that helps the user enter the
	// information your app needs. For example, if users are selecting the
	// urgency of a work ticket from a drop-down menu, the label might be
	// "Urgency" or "Select urgency".
	Label string `json:"label,omitempty"`

	// MultiSelectMaxSelectedItems: For multiselect menus, the maximum
	// number of items that a user can select. Minimum value is 1 item. If
	// unspecified, defaults to 3 items.
	MultiSelectMaxSelectedItems int64 `json:"multiSelectMaxSelectedItems,omitempty"`

	// MultiSelectMinQueryLength: For multiselect menus, the number of text
	// characters that a user inputs before the app queries autocomplete and
	// displays suggested items in the menu. If unspecified, defaults to 0
	// characters for static data sources and 3 characters for external data
	// sources.
	MultiSelectMinQueryLength int64 `json:"multiSelectMinQueryLength,omitempty"`

	// Name: The name that identifies the selection input in a form input
	// event. For details about working with form inputs, see Receive form
	// data (https://developers.google.com/workspace/chat/read-form-data).
	Name string `json:"name,omitempty"`

	// OnChangeAction: If specified, the form is submitted when the
	// selection changes. If not specified, you must specify a separate
	// button that submits the form. For details about working with form
	// inputs, see Receive form data
	// (https://developers.google.com/workspace/chat/read-form-data).
	OnChangeAction *GoogleAppsCardV1Action `json:"onChangeAction,omitempty"`

	// PlatformDataSource: A data source from Google Workspace.
	PlatformDataSource *GoogleAppsCardV1PlatformDataSource `json:"platformDataSource,omitempty"`

	// Type: The type of items that are displayed to users in a
	// `SelectionInput` widget. Selection types support different types of
	// interactions. For example, users can select one or more checkboxes,
	// but they can only select one value from a dropdown menu.
	//
	// Possible values:
	//   "CHECK_BOX" - A set of checkboxes. Users can select one or more
	// checkboxes.
	//   "RADIO_BUTTON" - A set of radio buttons. Users can select one radio
	// button.
	//   "SWITCH" - A set of switches. Users can turn on one or more
	// switches.
	//   "DROPDOWN" - A dropdown menu. Users can select one item from the
	// menu.
	//   "MULTI_SELECT" - A multiselect menu for static or dynamic data.
	// From the menu bar, users select one or more items. Users can also
	// input values to populate dynamic data. For example, users can start
	// typing the name of a Google Chat space and the widget autosuggests
	// the space. To populate items for a multiselect menu, you can use one
	// of the following types of data sources: * Static data: Items are
	// specified as `SelectionItem` objects in the widget. Up to 100 items.
	// * Google Workspace data: Items are populated using data from Google
	// Workspace, such as Google Workspace users or Google Chat spaces. *
	// External data: Items are populated from an external data source
	// outside of Google Workspace. For examples of how to implement
	// multiselect menus, see [Add a multiselect
	// menu](https://developers.google.com/workspace/chat/design-interactive-
	// card-dialog#multiselect-menu). [Google Workspace Add-ons and Chat
	// apps](https://developers.google.com/workspace/extend): Multiselect
	// for Google Workspace Add-ons are in Developer Preview.
	Type string `json:"type,omitempty"`

	// ForceSendFields is a list of field names (e.g. "ExternalDataSource")
	// to unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "ExternalDataSource") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

GoogleAppsCardV1SelectionInput: A widget that creates one or more UI items that users can select. For example, a dropdown menu or checkboxes. You can use this widget to collect data that can be predicted or enumerated. For an example in Google Chat apps, see Add selectable UI elements (/workspace/chat/design-interactive-card-dialog#add_selectable_ui_elem ents). Chat apps can process the value of items that users select or input. For details about working with form inputs, see Receive form data (https://developers.google.com/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. Google Workspace Add-ons and Chat apps (https://developers.google.com/workspace/extend):

func (*GoogleAppsCardV1SelectionInput) MarshalJSON added in v0.49.0

func (s *GoogleAppsCardV1SelectionInput) MarshalJSON() ([]byte, error)

type GoogleAppsCardV1SelectionItem added in v0.49.0

type GoogleAppsCardV1SelectionItem struct {
	// BottomText: For multiselect menus, a text description or label that's
	// displayed below the item's `text` field.
	BottomText string `json:"bottomText,omitempty"`

	// Selected: Whether the item is selected by default. If the selection
	// input only accepts one value (such as for radio buttons or a dropdown
	// menu), only set this field for one item.
	Selected bool `json:"selected,omitempty"`

	// StartIconUri: For multiselect menus, the URL for the icon displayed
	// next to the item's `text` field. Supports PNG and JPEG files. Must be
	// an `HTTPS` URL. For example,
	// `https://developers.google.com/workspace/chat/images/quickstart-app-av
	// atar.png`.
	StartIconUri string `json:"startIconUri,omitempty"`

	// Text: The text that identifies or describes the item to users.
	Text string `json:"text,omitempty"`

	// Value: The value associated with this item. The client should use
	// this as a form input value. For details about working with form
	// inputs, see Receive form data
	// (https://developers.google.com/workspace/chat/read-form-data).
	Value string `json:"value,omitempty"`

	// ForceSendFields is a list of field names (e.g. "BottomText") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "BottomText") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

GoogleAppsCardV1SelectionItem: An item that users can select in a selection input, such as a checkbox or switch. Google Workspace Add-ons and Chat apps (https://developers.google.com/workspace/extend):

func (*GoogleAppsCardV1SelectionItem) MarshalJSON added in v0.49.0

func (s *GoogleAppsCardV1SelectionItem) MarshalJSON() ([]byte, error)

type GoogleAppsCardV1SuggestionItem added in v0.49.0

type GoogleAppsCardV1SuggestionItem struct {
	// Text: The value of a suggested input to a text input field. This is
	// equivalent to what users enter themselves.
	Text string `json:"text,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Text") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Text") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

GoogleAppsCardV1SuggestionItem: One suggested value that users can enter in a text input field. Google Workspace Add-ons and Chat apps (https://developers.google.com/workspace/extend):

func (*GoogleAppsCardV1SuggestionItem) MarshalJSON added in v0.49.0

func (s *GoogleAppsCardV1SuggestionItem) MarshalJSON() ([]byte, error)

type GoogleAppsCardV1Suggestions added in v0.49.0

type GoogleAppsCardV1Suggestions struct {
	// Items: A list of suggestions used for autocomplete recommendations in
	// text input fields.
	Items []*GoogleAppsCardV1SuggestionItem `json:"items,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Items") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Items") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

GoogleAppsCardV1Suggestions: Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. Google Workspace Add-ons and Chat apps (https://developers.google.com/workspace/extend):

func (*GoogleAppsCardV1Suggestions) MarshalJSON added in v0.49.0

func (s *GoogleAppsCardV1Suggestions) MarshalJSON() ([]byte, error)

type GoogleAppsCardV1SwitchControl added in v0.49.0

type GoogleAppsCardV1SwitchControl struct {
	// ControlType: How the switch appears in the user interface. Google
	// Workspace Add-ons and Chat apps
	// (https://developers.google.com/workspace/extend):
	//
	// Possible values:
	//   "SWITCH" - A toggle-style switch.
	//   "CHECKBOX" - Deprecated in favor of `CHECK_BOX`.
	//   "CHECK_BOX" - A checkbox.
	ControlType string `json:"controlType,omitempty"`

	// Name: The name by which the switch widget is identified in a form
	// input event. For details about working with form inputs, see Receive
	// form data
	// (https://developers.google.com/workspace/chat/read-form-data).
	Name string `json:"name,omitempty"`

	// OnChangeAction: The action to perform when the switch state is
	// changed, such as what function to run.
	OnChangeAction *GoogleAppsCardV1Action `json:"onChangeAction,omitempty"`

	// Selected: When `true`, the switch is selected.
	Selected bool `json:"selected,omitempty"`

	// Value: The value entered by a user, returned as part of a form input
	// event. For details about working with form inputs, see Receive form
	// data (https://developers.google.com/workspace/chat/read-form-data).
	Value string `json:"value,omitempty"`

	// ForceSendFields is a list of field names (e.g. "ControlType") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "ControlType") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

GoogleAppsCardV1SwitchControl: Either a toggle-style switch or a checkbox inside a `decoratedText` widget. Google Workspace Add-ons and Chat apps (https://developers.google.com/workspace/extend): Only supported in the `decoratedText` widget.

func (*GoogleAppsCardV1SwitchControl) MarshalJSON added in v0.49.0

func (s *GoogleAppsCardV1SwitchControl) MarshalJSON() ([]byte, error)

type GoogleAppsCardV1TextInput added in v0.49.0

type GoogleAppsCardV1TextInput struct {
	// AutoCompleteAction: Optional. Specify what action to take when the
	// text input field provides suggestions to users who interact with it.
	// If unspecified, the suggestions are set by `initialSuggestions` and
	// are processed by the client. If specified, the app takes the action
	// specified here, such as running a custom function. Google Workspace
	// Add-ons (https://developers.google.com/workspace/add-ons):
	AutoCompleteAction *GoogleAppsCardV1Action `json:"autoCompleteAction,omitempty"`

	// HintText: Text that appears below the text input field meant to
	// assist users by prompting them to enter a certain value. This text is
	// always visible. Required if `label` is unspecified. Otherwise,
	// optional.
	HintText string `json:"hintText,omitempty"`

	// InitialSuggestions: Suggested values that users can enter. These
	// values appear when users click inside the text input field. As users
	// type, the suggested values dynamically filter to match what the users
	// have typed. For example, a text input field for programming language
	// might suggest Java, JavaScript, Python, and C++. When users start
	// typing `Jav`, the list of suggestions filters to show just `Java` and
	// `JavaScript`. Suggested values help guide users to enter values that
	// your app can make sense of. When referring to JavaScript, some users
	// might enter `javascript` and others `java script`. Suggesting
	// `JavaScript` can standardize how users interact with your app. When
	// specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set
	// to `MULTIPLE_LINE`. Google Workspace Add-ons and Chat apps
	// (https://developers.google.com/workspace/extend):
	InitialSuggestions *GoogleAppsCardV1Suggestions `json:"initialSuggestions,omitempty"`

	// Label: The text that appears above the text input field in the user
	// interface. Specify text that helps the user enter the information
	// your app needs. For example, if you are asking someone's name, but
	// specifically need their surname, write `surname` instead of `name`.
	// Required if `hintText` is unspecified. Otherwise, optional.
	Label string `json:"label,omitempty"`

	// Name: The name by which the text input is identified in a form input
	// event. For details about working with form inputs, see Receive form
	// data (https://developers.google.com/workspace/chat/read-form-data).
	Name string `json:"name,omitempty"`

	// OnChangeAction: What to do when a change occurs in the text input
	// field. For example, a user adding to the field or deleting text.
	// Examples of actions to take include running a custom function or
	// opening a dialog
	// (https://developers.google.com/workspace/chat/dialogs) in Google
	// Chat.
	OnChangeAction *GoogleAppsCardV1Action `json:"onChangeAction,omitempty"`

	// PlaceholderText: Text that appears in the text input field when the
	// field is empty. Use this text to prompt users to enter a value. For
	// example, `Enter a number from 0 to 100`. Google Chat apps
	// (https://developers.google.com/workspace/chat):
	PlaceholderText string `json:"placeholderText,omitempty"`

	// Type: How a text input field appears in the user interface. For
	// example, whether the field is single or multi-line.
	//
	// Possible values:
	//   "SINGLE_LINE" - The text input field has a fixed height of one
	// line.
	//   "MULTIPLE_LINE" - The text input field has a fixed height of
	// multiple lines.
	Type string `json:"type,omitempty"`

	// Value: The value entered by a user, returned as part of a form input
	// event. For details about working with form inputs, see Receive form
	// data (https://developers.google.com/workspace/chat/read-form-data).
	Value string `json:"value,omitempty"`

	// ForceSendFields is a list of field names (e.g. "AutoCompleteAction")
	// to unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "AutoCompleteAction") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

GoogleAppsCardV1TextInput: A field in which users can enter text. Supports suggestions and on-change actions. For an example in Google Chat apps, see Add a field in which a user can enter text (https://developers.google.com/workspace/chat/design-interactive-card-dialog#add_a_field_in_which_a_user_can_enter_text). Chat apps receive and can process the value of entered text during form input events. For details about working with form inputs, see Receive form data (https://developers.google.com/workspace/chat/read-form-data). When you need to collect undefined or abstract data from users, use a text input. To collect defined or enumerated data from users, use the SelectionInput widget. Google Workspace Add-ons and Chat apps (https://developers.google.com/workspace/extend):

func (*GoogleAppsCardV1TextInput) MarshalJSON added in v0.49.0

func (s *GoogleAppsCardV1TextInput) MarshalJSON() ([]byte, error)

type GoogleAppsCardV1TextParagraph added in v0.49.0

type GoogleAppsCardV1TextParagraph struct {
	// Text: The text that's shown in the widget.
	Text string `json:"text,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Text") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Text") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

GoogleAppsCardV1TextParagraph: A paragraph of text that supports formatting. For an example in Google Chat apps, see Add a paragraph of formatted text (https://developers.google.com/workspace/chat/add-text-image-card-dialog#add_a_paragraph_of_formatted_text). For more information about formatting text, see Formatting text in Google Chat apps (https://developers.google.com/workspace/chat/format-messages#card-formatting) and Formatting text in Google Workspace Add-ons (https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). Google Workspace Add-ons and Chat apps (https://developers.google.com/workspace/extend):

func (*GoogleAppsCardV1TextParagraph) MarshalJSON added in v0.49.0

func (s *GoogleAppsCardV1TextParagraph) MarshalJSON() ([]byte, error)

type GoogleAppsCardV1Widget added in v0.49.0

type GoogleAppsCardV1Widget struct {
	// ButtonList: A list of buttons. For example, the following JSON
	// creates two buttons. The first is a blue text button and the second
	// is an image button that opens a link: “` "buttonList": { "buttons":
	// [ { "text": "Edit", "color": { "red": 0, "green": 0, "blue": 1,
	// "alpha": 1 }, "disabled": true, }, { "icon": { "knownIcon": "INVITE",
	// "altText": "check calendar" }, "onClick": { "openLink": { "url":
	// "https://example.com/calendar" } } } ] } “`
	ButtonList *GoogleAppsCardV1ButtonList `json:"buttonList,omitempty"`

	// Columns: Displays up to 2 columns. To include more than 2 columns, or
	// to use rows, use the `Grid` widget. For example, the following JSON
	// creates 2 columns that each contain text paragraphs: “` "columns": {
	// "columnItems": [ { "horizontalSizeStyle": "FILL_AVAILABLE_SPACE",
	// "horizontalAlignment": "CENTER", "verticalAlignment": "CENTER",
	// "widgets": [ { "textParagraph": { "text": "First column text
	// paragraph" } } ] }, { "horizontalSizeStyle": "FILL_AVAILABLE_SPACE",
	// "horizontalAlignment": "CENTER", "verticalAlignment": "CENTER",
	// "widgets": [ { "textParagraph": { "text": "Second column text
	// paragraph" } } ] } ] } “`
	Columns *GoogleAppsCardV1Columns `json:"columns,omitempty"`

	// DateTimePicker: Displays a widget that lets users input a date, time,
	// or date and time. For example, the following JSON creates a date time
	// picker to schedule an appointment: “` "dateTimePicker": { "name":
	// "appointment_time", "label": "Book your appointment at:", "type":
	// "DATE_AND_TIME", "valueMsEpoch": "796435200000" } “`
	DateTimePicker *GoogleAppsCardV1DateTimePicker `json:"dateTimePicker,omitempty"`

	// DecoratedText: Displays a decorated text item. For example, the
	// following JSON creates a decorated text widget showing email address:
	// “` "decoratedText": { "icon": { "knownIcon": "EMAIL" }, "topLabel":
	// "Email Address", "text": "sasha@example.com", "bottomLabel": "This is
	// a new Email address!", "switchControl": { "name":
	// "has_send_welcome_email_to_sasha", "selected": false, "controlType":
	// "CHECKBOX" } } “`
	DecoratedText *GoogleAppsCardV1DecoratedText `json:"decoratedText,omitempty"`

	// Divider: Displays a horizontal line divider between widgets. For
	// example, the following JSON creates a divider: “` "divider": { } “`
	Divider *GoogleAppsCardV1Divider `json:"divider,omitempty"`

	// Grid: Displays a grid with a collection of items. A grid supports any
	// number of columns and items. The number of rows is determined by the
	// upper bounds of the number items divided by the number of columns. A
	// grid with 10 items and 2 columns has 5 rows. A grid with 11 items and
	// 2 columns has 6 rows. Google Workspace Add-ons and Chat apps
	// (https://developers.google.com/workspace/extend): For example, the
	// following JSON creates a 2 column grid with a single item: “`
	// "grid": { "title": "A fine collection of items", "columnCount": 2,
	// "borderStyle": { "type": "STROKE", "cornerRadius": 4 }, "items": [ {
	// "image": { "imageUri": "https://www.example.com/image.png",
	// "cropStyle": { "type": "SQUARE" }, "borderStyle": { "type": "STROKE"
	// } }, "title": "An item", "textAlignment": "CENTER" } ], "onClick": {
	// "openLink": { "url": "https://www.example.com" } } } “`
	Grid *GoogleAppsCardV1Grid `json:"grid,omitempty"`

	// HorizontalAlignment: Specifies whether widgets align to the left,
	// right, or center of a column.
	//
	// Possible values:
	//   "HORIZONTAL_ALIGNMENT_UNSPECIFIED" - Don't use. Unspecified.
	//   "START" - Default value. Aligns widgets to the start position of
	// the column. For left-to-right layouts, aligns to the left. For
	// right-to-left layouts, aligns to the right.
	//   "CENTER" - Aligns widgets to the center of the column.
	//   "END" - Aligns widgets to the end position of the column. For
	// left-to-right layouts, aligns widgets to the right. For right-to-left
	// layouts, aligns widgets to the left.
	HorizontalAlignment string `json:"horizontalAlignment,omitempty"`

	// Image: Displays an image. For example, the following JSON creates an
	// image with alternative text: “` "image": { "imageUrl":
	// "https://developers.google.com/workspace/chat/images/quickstart-app-av
	// atar.png", "altText": "Chat app avatar" } “`
	Image *GoogleAppsCardV1Image `json:"image,omitempty"`

	// SelectionInput: Displays a selection control that lets users select
	// items. Selection controls can be checkboxes, radio buttons, switches,
	// or dropdown menus. For example, the following JSON creates a dropdown
	// menu that lets users choose a size: “` "selectionInput": { "name":
	// "size", "label": "Size" "type": "DROPDOWN", "items": [ { "text": "S",
	// "value": "small", "selected": false }, { "text": "M", "value":
	// "medium", "selected": true }, { "text": "L", "value": "large",
	// "selected": false }, { "text": "XL", "value": "extra_large",
	// "selected": false } ] } “`
	SelectionInput *GoogleAppsCardV1SelectionInput `json:"selectionInput,omitempty"`

	// TextInput: Displays a text box that users can type into. For example,
	// the following JSON creates a text input for an email address: “`
	// "textInput": { "name": "mailing_address", "label": "Mailing Address"
	// } “` As another example, the following JSON creates a text input for
	// a programming language with static suggestions: “` "textInput": {
	// "name": "preferred_programing_language", "label": "Preferred
	// Language", "initialSuggestions": { "items": [ { "text": "C++" }, {
	// "text": "Java" }, { "text": "JavaScript" }, { "text": "Python" } ] }
	// } “`
	TextInput *GoogleAppsCardV1TextInput `json:"textInput,omitempty"`

	// TextParagraph: Displays a text paragraph. Supports simple HTML
	// formatted text. For more information about formatting text, see
	// Formatting text in Google Chat apps
	// (https://developers.google.com/workspace/chat/format-messages#card-formatting)
	// and Formatting text in Google Workspace Add-ons
	// (https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
	// For example, the following JSON creates a bolded text: “`
	// "textParagraph": { "text": " *bold text*" } “`
	TextParagraph *GoogleAppsCardV1TextParagraph `json:"textParagraph,omitempty"`

	// ForceSendFields is a list of field names (e.g. "ButtonList") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "ButtonList") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

GoogleAppsCardV1Widget: Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.

func (*GoogleAppsCardV1Widget) MarshalJSON added in v0.49.0

func (s *GoogleAppsCardV1Widget) MarshalJSON() ([]byte, error)

type GoogleAppsCardV1Widgets added in v0.123.0

type GoogleAppsCardV1Widgets struct {
	// ButtonList: ButtonList widget.
	ButtonList *GoogleAppsCardV1ButtonList `json:"buttonList,omitempty"`

	// DateTimePicker: DateTimePicker widget.
	DateTimePicker *GoogleAppsCardV1DateTimePicker `json:"dateTimePicker,omitempty"`

	// DecoratedText: DecoratedText widget.
	DecoratedText *GoogleAppsCardV1DecoratedText `json:"decoratedText,omitempty"`

	// Image: Image widget.
	Image *GoogleAppsCardV1Image `json:"image,omitempty"`

	// SelectionInput: SelectionInput widget.
	SelectionInput *GoogleAppsCardV1SelectionInput `json:"selectionInput,omitempty"`

	// TextInput: TextInput widget.
	TextInput *GoogleAppsCardV1TextInput `json:"textInput,omitempty"`

	// TextParagraph: TextParagraph widget.
	TextParagraph *GoogleAppsCardV1TextParagraph `json:"textParagraph,omitempty"`

	// ForceSendFields is a list of field names (e.g. "ButtonList") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "ButtonList") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

GoogleAppsCardV1Widgets: The supported widgets that you can include in a column. Google Workspace Add-ons and Chat apps (https://developers.google.com/workspace/extend): Columns for Google Workspace Add-ons are in Developer Preview.

func (*GoogleAppsCardV1Widgets) MarshalJSON added in v0.123.0

func (s *GoogleAppsCardV1Widgets) MarshalJSON() ([]byte, error)

type Group added in v0.153.0

type Group struct {
	// Name: Resource name for a Google Group. Represents a group
	// (https://cloud.google.com/identity/docs/reference/rest/v1/groups) in
	// Cloud Identity Groups API. Format: groups/{group}
	Name string `json:"name,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Name") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Name") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

Group: A Google Group in Google Chat.

func (*Group) MarshalJSON added in v0.153.0

func (s *Group) MarshalJSON() ([]byte, error)

type HostAppDataSourceMarkup added in v0.132.0

type HostAppDataSourceMarkup struct {
	// ChatDataSource: A data source from Google Chat.
	ChatDataSource *ChatClientDataSourceMarkup `json:"chatDataSource,omitempty"`

	// ForceSendFields is a list of field names (e.g. "ChatDataSource") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "ChatDataSource") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

HostAppDataSourceMarkup: For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. Google Chat apps (https://developers.google.com/workspace/chat):

func (*HostAppDataSourceMarkup) MarshalJSON added in v0.132.0

func (s *HostAppDataSourceMarkup) MarshalJSON() ([]byte, error)

type Image

type Image struct {
	// AspectRatio: The aspect ratio of this image (width and height). This
	// field lets you reserve the right height for the image while waiting
	// for it to load. It's not meant to override the built-in aspect ratio
	// of the image. If unset, the server fills it by prefetching the image.
	AspectRatio float64 `json:"aspectRatio,omitempty"`

	// ImageUrl: The URL of the image.
	ImageUrl string `json:"imageUrl,omitempty"`

	// OnClick: The `onclick` action.
	OnClick *OnClick `json:"onClick,omitempty"`

	// ForceSendFields is a list of field names (e.g. "AspectRatio") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "AspectRatio") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

Image: An image that's specified by a URL and can have an `onclick` action.

func (*Image) MarshalJSON

func (s *Image) MarshalJSON() ([]byte, error)

func (*Image) UnmarshalJSON

func (s *Image) UnmarshalJSON(data []byte) error

type ImageButton

type ImageButton struct {
	// Icon: The icon specified by an `enum` that indices to an icon
	// provided by Chat API.
	//
	// Possible values:
	//   "ICON_UNSPECIFIED"
	//   "AIRPLANE"
	//   "BOOKMARK"
	//   "BUS"
	//   "CAR"
	//   "CLOCK"
	//   "CONFIRMATION_NUMBER_ICON"
	//   "DOLLAR"
	//   "DESCRIPTION"
	//   "EMAIL"
	//   "EVENT_PERFORMER"
	//   "EVENT_SEAT"
	//   "FLIGHT_ARRIVAL"
	//   "FLIGHT_DEPARTURE"
	//   "HOTEL"
	//   "HOTEL_ROOM_TYPE"
	//   "INVITE"
	//   "MAP_PIN"
	//   "MEMBERSHIP"
	//   "MULTIPLE_PEOPLE"
	//   "OFFER"
	//   "PERSON"
	//   "PHONE"
	//   "RESTAURANT_ICON"
	//   "SHOPPING_CART"
	//   "STAR"
	//   "STORE"
	//   "TICKET"
	//   "TRAIN"
	//   "VIDEO_CAMERA"
	//   "VIDEO_PLAY"
	Icon string `json:"icon,omitempty"`

	// IconUrl: The icon specified by a URL.
	IconUrl string `json:"iconUrl,omitempty"`

	// Name: The name of this `image_button` that's used for accessibility.
	// Default value is provided if this name isn't specified.
	Name string `json:"name,omitempty"`

	// OnClick: The `onclick` action.
	OnClick *OnClick `json:"onClick,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Icon") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Icon") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ImageButton: An image button with an `onclick` action.

func (*ImageButton) MarshalJSON

func (s *ImageButton) MarshalJSON() ([]byte, error)

type Inputs added in v0.55.0

type Inputs struct {
	// DateInput: Date input values from a `DateTimePicker`
	// (https://developers.google.com/chat/api/reference/rest/v1/cards#DateTimePicker)
	// widget that only accepts date values.
	DateInput *DateInput `json:"dateInput,omitempty"`

	// DateTimeInput: Date and time input values from a `DateTimePicker`
	// (https://developers.google.com/chat/api/reference/rest/v1/cards#DateTimePicker)
	// widget that accepts both a date and time.
	DateTimeInput *DateTimeInput `json:"dateTimeInput,omitempty"`

	// StringInputs: A list of strings that represent the values that the
	// user inputs in a widget. If the widget only accepts one value, such
	// as a `TextInput`
	// (https://developers.google.com/chat/api/reference/rest/v1/cards#TextInput)
	// widget, the list contains one string object. If the widget accepts
	// multiple values, such as a `SelectionInput`
	// (https://developers.google.com/chat/api/reference/rest/v1/cards#selectioninput)
	// widget of checkboxes, the list contains a string object for each
	// value that the user inputs or selects.
	StringInputs *StringInputs `json:"stringInputs,omitempty"`

	// TimeInput: Time input values from a `DateTimePicker`
	// (https://developers.google.com/chat/api/reference/rest/v1/cards#DateTimePicker)
	// widget that only accepts time values.
	TimeInput *TimeInput `json:"timeInput,omitempty"`

	// ForceSendFields is a list of field names (e.g. "DateInput") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "DateInput") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

Inputs: Types of data that users can input on cards or dialogs (https://developers.google.com/chat/ui/read-form-data). The input type depends on the type of values that the widget accepts.

func (*Inputs) MarshalJSON added in v0.55.0

func (s *Inputs) MarshalJSON() ([]byte, error)

type KeyValue

type KeyValue struct {
	// BottomLabel: The text of the bottom label. Formatted text supported.
	// For more information about formatting text, see Formatting text in
	// Google Chat apps
	// (https://developers.google.com/workspace/chat/format-messages#card-formatting)
	// and Formatting text in Google Workspace Add-ons
	// (https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
	BottomLabel string `json:"bottomLabel,omitempty"`

	// Button: A button that can be clicked to trigger an action.
	Button *Button `json:"button,omitempty"`

	// Content: The text of the content. Formatted text supported and always
	// required. For more information about formatting text, see Formatting
	// text in Google Chat apps
	// (https://developers.google.com/workspace/chat/format-messages#card-formatting)
	// and Formatting text in Google Workspace Add-ons
	// (https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
	Content string `json:"content,omitempty"`

	// ContentMultiline: If the content should be multiline.
	ContentMultiline bool `json:"contentMultiline,omitempty"`

	// Icon: An enum value that's replaced by the Chat API with the
	// corresponding icon image.
	//
	// Possible values:
	//   "ICON_UNSPECIFIED"
	//   "AIRPLANE"
	//   "BOOKMARK"
	//   "BUS"
	//   "CAR"
	//   "CLOCK"
	//   "CONFIRMATION_NUMBER_ICON"
	//   "DOLLAR"
	//   "DESCRIPTION"
	//   "EMAIL"
	//   "EVENT_PERFORMER"
	//   "EVENT_SEAT"
	//   "FLIGHT_ARRIVAL"
	//   "FLIGHT_DEPARTURE"
	//   "HOTEL"
	//   "HOTEL_ROOM_TYPE"
	//   "INVITE"
	//   "MAP_PIN"
	//   "MEMBERSHIP"
	//   "MULTIPLE_PEOPLE"
	//   "OFFER"
	//   "PERSON"
	//   "PHONE"
	//   "RESTAURANT_ICON"
	//   "SHOPPING_CART"
	//   "STAR"
	//   "STORE"
	//   "TICKET"
	//   "TRAIN"
	//   "VIDEO_CAMERA"
	//   "VIDEO_PLAY"
	Icon string `json:"icon,omitempty"`

	// IconUrl: The icon specified by a URL.
	IconUrl string `json:"iconUrl,omitempty"`

	// OnClick: The `onclick` action. Only the top label, bottom label, and
	// content region are clickable.
	OnClick *OnClick `json:"onClick,omitempty"`

	// TopLabel: The text of the top label. Formatted text supported. For
	// more information about formatting text, see Formatting text in Google
	// Chat apps
	// (https://developers.google.com/workspace/chat/format-messages#card-formatting)
	// and Formatting text in Google Workspace Add-ons
	// (https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
	TopLabel string `json:"topLabel,omitempty"`

	// ForceSendFields is a list of field names (e.g. "BottomLabel") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "BottomLabel") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

KeyValue: A UI element contains a key (label) and a value (content). This element can also contain some actions such as `onclick` button.

func (*KeyValue) MarshalJSON

func (s *KeyValue) MarshalJSON() ([]byte, error)

type ListMembershipsResponse

type ListMembershipsResponse struct {
	// Memberships: Unordered list. List of memberships in the requested (or
	// first) page.
	Memberships []*Membership `json:"memberships,omitempty"`

	// NextPageToken: A token that you can send as `pageToken` to retrieve
	// the next page of results. If empty, there are no subsequent pages.
	NextPageToken string `json:"nextPageToken,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Memberships") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Memberships") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ListMembershipsResponse: Response to list memberships of the space.

func (*ListMembershipsResponse) MarshalJSON

func (s *ListMembershipsResponse) MarshalJSON() ([]byte, error)

type ListMessagesResponse added in v0.123.0

type ListMessagesResponse struct {
	// Messages: List of messages.
	Messages []*Message `json:"messages,omitempty"`

	// NextPageToken: You can send a token as `pageToken` to retrieve the
	// next page of results. If empty, there are no subsequent pages.
	NextPageToken string `json:"nextPageToken,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Messages") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Messages") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ListMessagesResponse: Response message for listing messages.

func (*ListMessagesResponse) MarshalJSON added in v0.123.0

func (s *ListMessagesResponse) MarshalJSON() ([]byte, error)

type ListReactionsResponse added in v0.123.0

type ListReactionsResponse struct {
	// NextPageToken: Continuation token to retrieve the next page of
	// results. It's empty for the last page of results.
	NextPageToken string `json:"nextPageToken,omitempty"`

	// Reactions: List of reactions in the requested (or first) page.
	Reactions []*Reaction `json:"reactions,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "NextPageToken") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ListReactionsResponse: Response to a list reactions request.

func (*ListReactionsResponse) MarshalJSON added in v0.123.0

func (s *ListReactionsResponse) MarshalJSON() ([]byte, error)

type ListSpaceEventsResponse added in v0.173.0

type ListSpaceEventsResponse struct {
	// NextPageToken: Continuation token used to fetch more events. If this
	// field is omitted, there are no subsequent pages.
	NextPageToken string `json:"nextPageToken,omitempty"`

	// SpaceEvents: Results are returned in chronological order (oldest
	// event first).
	SpaceEvents []*SpaceEvent `json:"spaceEvents,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "NextPageToken") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ListSpaceEventsResponse: Response message for listing space events.

func (*ListSpaceEventsResponse) MarshalJSON added in v0.173.0

func (s *ListSpaceEventsResponse) MarshalJSON() ([]byte, error)

type ListSpacesResponse

type ListSpacesResponse struct {
	// NextPageToken: You can send a token as `pageToken` to retrieve the
	// next page of results. If empty, there are no subsequent pages.
	NextPageToken string `json:"nextPageToken,omitempty"`

	// Spaces: List of spaces in the requested (or first) page.
	Spaces []*Space `json:"spaces,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "NextPageToken") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ListSpacesResponse: The response for a list spaces request.

func (*ListSpacesResponse) MarshalJSON

func (s *ListSpacesResponse) MarshalJSON() ([]byte, error)

type MatchedUrl added in v0.63.0

type MatchedUrl struct {
	// Url: Output only. The URL that was matched.
	Url string `json:"url,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Url") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Url") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

MatchedUrl: A matched URL in a Chat message. Chat apps can preview matched URLs. For more information, see Preview links (https://developers.google.com/chat/how-tos/preview-links).

func (*MatchedUrl) MarshalJSON added in v0.63.0

func (s *MatchedUrl) MarshalJSON() ([]byte, error)

type Media added in v0.30.0

type Media struct {
	// ResourceName: Name of the media resource.
	ResourceName string `json:"resourceName,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "ResourceName") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "ResourceName") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

Media: Media resource.

func (*Media) MarshalJSON added in v0.30.0

func (s *Media) MarshalJSON() ([]byte, error)

type MediaDownloadCall added in v0.30.0

type MediaDownloadCall struct {
	// contains filtered or unexported fields
}

func (*MediaDownloadCall) Context added in v0.30.0

Context sets the context to be used in this call's Do and Download methods. Any pending HTTP request will be aborted if the provided context is canceled.

func (*MediaDownloadCall) Do added in v0.30.0

func (c *MediaDownloadCall) Do(opts ...googleapi.CallOption) (*Media, error)

Do executes the "chat.media.download" call. Exactly one of *Media or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Media.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*MediaDownloadCall) Download added in v0.30.0

func (c *MediaDownloadCall) Download(opts ...googleapi.CallOption) (*http.Response, error)

Download fetches the API endpoint's "media" value, instead of the normal API response value. If the returned error is nil, the Response is guaranteed to have a 2xx status code. Callers must close the Response.Body as usual.

func (*MediaDownloadCall) Fields added in v0.30.0

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*MediaDownloadCall) Header added in v0.30.0

func (c *MediaDownloadCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*MediaDownloadCall) IfNoneMatch added in v0.30.0

func (c *MediaDownloadCall) IfNoneMatch(entityTag string) *MediaDownloadCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type MediaService added in v0.30.0

type MediaService struct {
	// contains filtered or unexported fields
}

func NewMediaService added in v0.30.0

func NewMediaService(s *Service) *MediaService

func (*MediaService) Download added in v0.30.0

func (r *MediaService) Download(resourceName string) *MediaDownloadCall

Download: Downloads media. Download is supported on the URI `/v1/media/{+name}?alt=media`.

  • resourceName: Name of the media that is being downloaded. See ReadRequest.resource_name.

func (*MediaService) Upload added in v0.123.0

func (r *MediaService) Upload(parent string, uploadattachmentrequest *UploadAttachmentRequest) *MediaUploadCall

Upload: Uploads an attachment. For an example, see Upload media as a file attachment (https://developers.google.com/workspace/chat/upload-media-attachments). Requires user authentication (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). You can upload attachments up to 200 MB. Certain file types aren't supported. For details, see File types blocked by Google Chat (https://support.google.com/chat/answer/7651457?&co=GENIE.Platform%3DDesktop#File%20types%20blocked%20in%20Google%20Chat).

  • parent: Resource name of the Chat space in which the attachment is uploaded. Format "spaces/{space}".

type MediaUploadCall added in v0.123.0

type MediaUploadCall struct {
	// contains filtered or unexported fields
}

func (*MediaUploadCall) Context added in v0.123.0

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled. This context will supersede any context previously provided to the ResumableMedia method.

func (*MediaUploadCall) Do added in v0.123.0

Do executes the "chat.media.upload" call. Exactly one of *UploadAttachmentResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *UploadAttachmentResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*MediaUploadCall) Fields added in v0.123.0

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*MediaUploadCall) Header added in v0.123.0

func (c *MediaUploadCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*MediaUploadCall) Media added in v0.123.0

func (c *MediaUploadCall) Media(r io.Reader, options ...googleapi.MediaOption) *MediaUploadCall

Media specifies the media to upload in one or more chunks. The chunk size may be controlled by supplying a MediaOption generated by googleapi.ChunkSize. The chunk size defaults to googleapi.DefaultUploadChunkSize.The Content-Type header used in the upload request will be determined by sniffing the contents of r, unless a MediaOption generated by googleapi.ContentType is supplied. At most one of Media and ResumableMedia may be set.

func (*MediaUploadCall) ProgressUpdater added in v0.123.0

func (c *MediaUploadCall) ProgressUpdater(pu googleapi.ProgressUpdater) *MediaUploadCall

ProgressUpdater provides a callback function that will be called after every chunk. It should be a low-latency function in order to not slow down the upload operation. This should only be called when using ResumableMedia (as opposed to Media).

func (*MediaUploadCall) ResumableMedia deprecated added in v0.123.0

func (c *MediaUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *MediaUploadCall

ResumableMedia specifies the media to upload in chunks and can be canceled with ctx.

Deprecated: use Media instead.

At most one of Media and ResumableMedia may be set. mediaType identifies the MIME media type of the upload, such as "image/png". If mediaType is "", it will be auto-detected. The provided ctx will supersede any context previously provided to the Context method.

type Membership

type Membership struct {
	// CreateTime: Optional. Immutable. The creation time of the membership,
	// such as when a member joined or was invited to join a space. This
	// field is output only, except when used to import historical
	// memberships in import mode spaces.
	CreateTime string `json:"createTime,omitempty"`

	// DeleteTime: Optional. Immutable. The deletion time of the membership,
	// such as when a member left or was removed from a space. This field is
	// output only, except when used to import historical memberships in
	// import mode spaces.
	DeleteTime string `json:"deleteTime,omitempty"`

	// GroupMember: The Google Group the membership corresponds to. Only
	// supports read operations. Other operations, like creating or updating
	// a membership, aren't currently supported.
	GroupMember *Group `json:"groupMember,omitempty"`

	// Member: The Google Chat user or app the membership corresponds to. If
	// your Chat app authenticates as a user
	// (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
	// the output populates the user
	// (https://developers.google.com/workspace/chat/api/reference/rest/v1/User)
	// `name` and `type`.
	Member *User `json:"member,omitempty"`

	// Name: Resource name of the membership, assigned by the server.
	// Format: `spaces/{space}/members/{member}`
	Name string `json:"name,omitempty"`

	// Role: Optional. User's role within a Chat space, which determines
	// their permitted actions in the space. Developer Preview
	// (https://developers.google.com/workspace/preview): This field can
	// only be used as input in `UpdateMembership`.
	//
	// Possible values:
	//   "MEMBERSHIP_ROLE_UNSPECIFIED" - Default value. For users: they
	// aren't a member of the space, but can be invited. For Google Groups:
	// they're always assigned this role (other enum values might be used in
	// the future).
	//   "ROLE_MEMBER" - A member of the space. The user has basic
	// permissions, like sending messages to the space. In 1:1 and unnamed
	// group conversations, everyone has this role.
	//   "ROLE_MANAGER" - A space manager. The user has all basic
	// permissions plus administrative permissions that let them manage the
	// space, like adding or removing members. Only supported in
	// SpaceType.SPACE.
	Role string `json:"role,omitempty"`

	// State: Output only. State of the membership.
	//
	// Possible values:
	//   "MEMBERSHIP_STATE_UNSPECIFIED" - Default value. Don't use.
	//   "JOINED" - The user is added to the space, and can participate in
	// the space.
	//   "INVITED" - The user is invited to join the space, but hasn't
	// joined it.
	//   "NOT_A_MEMBER" - The user doesn't belong to the space and doesn't
	// have a pending invitation to join the space.
	State string `json:"state,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "CreateTime") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "CreateTime") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

Membership: Represents a membership relation in Google Chat, such as whether a user or Chat app is invited to, part of, or absent from a space.

func (*Membership) MarshalJSON

func (s *Membership) MarshalJSON() ([]byte, error)

type MembershipBatchCreatedEventData added in v0.173.0

type MembershipBatchCreatedEventData struct {
	// Memberships: A list of new memberships.
	Memberships []*MembershipCreatedEventData `json:"memberships,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Memberships") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Memberships") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

MembershipBatchCreatedEventData: Event payload for multiple new memberships. Event type: `google.workspace.chat.membership.v1.batchCreated`

func (*MembershipBatchCreatedEventData) MarshalJSON added in v0.173.0

func (s *MembershipBatchCreatedEventData) MarshalJSON() ([]byte, error)

type MembershipBatchDeletedEventData added in v0.173.0

type MembershipBatchDeletedEventData struct {
	// Memberships: A list of deleted memberships.
	Memberships []*MembershipDeletedEventData `json:"memberships,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Memberships") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Memberships") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

MembershipBatchDeletedEventData: Event payload for multiple deleted memberships. Event type: `google.workspace.chat.membership.v1.batchDeleted`

func (*MembershipBatchDeletedEventData) MarshalJSON added in v0.173.0

func (s *MembershipBatchDeletedEventData) MarshalJSON() ([]byte, error)

type MembershipBatchUpdatedEventData added in v0.173.0

type MembershipBatchUpdatedEventData struct {
	// Memberships: A list of updated memberships.
	Memberships []*MembershipUpdatedEventData `json:"memberships,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Memberships") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Memberships") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

MembershipBatchUpdatedEventData: Event payload for multiple updated memberships. Event type: `google.workspace.chat.membership.v1.batchUpdated`

func (*MembershipBatchUpdatedEventData) MarshalJSON added in v0.173.0

func (s *MembershipBatchUpdatedEventData) MarshalJSON() ([]byte, error)

type MembershipCreatedEventData added in v0.173.0

type MembershipCreatedEventData struct {
	// Membership: The new membership.
	Membership *Membership `json:"membership,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Membership") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Membership") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

MembershipCreatedEventData: Event payload for a new membership. Event type: `google.workspace.chat.membership.v1.created`.

func (*MembershipCreatedEventData) MarshalJSON added in v0.173.0

func (s *MembershipCreatedEventData) MarshalJSON() ([]byte, error)

type MembershipDeletedEventData added in v0.173.0

type MembershipDeletedEventData struct {
	// Membership: The deleted membership. Only the `name` and `state`
	// fields are populated.
	Membership *Membership `json:"membership,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Membership") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Membership") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

MembershipDeletedEventData: Event payload for a deleted membership. Event type: `google.workspace.chat.membership.v1.deleted`

func (*MembershipDeletedEventData) MarshalJSON added in v0.173.0

func (s *MembershipDeletedEventData) MarshalJSON() ([]byte, error)

type MembershipUpdatedEventData added in v0.173.0

type MembershipUpdatedEventData struct {
	// Membership: The updated membership.
	Membership *Membership `json:"membership,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Membership") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Membership") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

MembershipUpdatedEventData: Event payload for an updated membership. Event type: `google.workspace.chat.membership.v1.updated`

func (*MembershipUpdatedEventData) MarshalJSON added in v0.173.0

func (s *MembershipUpdatedEventData) MarshalJSON() ([]byte, error)

type Message

type Message struct {
	// AccessoryWidgets: One or more interactive widgets that appear at the
	// bottom of a message. You can add accessory widgets to messages that
	// contain text, cards, or both text and cards. Not supported for
	// messages that contain dialogs. For details, see Add interactive
	// widgets at the bottom of a message
	// (https://developers.google.com/workspace/chat/create-messages#add-accessory-widgets).
	// Creating a message with accessory widgets requires [app
	// authentication]
	// (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).
	AccessoryWidgets []*AccessoryWidget `json:"accessoryWidgets,omitempty"`

	// ActionResponse: Input only. Parameters that a Chat app can use to
	// configure how its response is posted.
	ActionResponse *ActionResponse `json:"actionResponse,omitempty"`

	// Annotations: Output only. Annotations associated with the `text` in
	// this message.
	Annotations []*Annotation `json:"annotations,omitempty"`

	// ArgumentText: Output only. Plain-text body of the message with all
	// Chat app mentions stripped out.
	ArgumentText string `json:"argumentText,omitempty"`

	// AttachedGifs: Output only. GIF images that are attached to the
	// message.
	AttachedGifs []*AttachedGif `json:"attachedGifs,omitempty"`

	// Attachment: User-uploaded attachment.
	Attachment []*Attachment `json:"attachment,omitempty"`

	// Cards: Deprecated: Use `cards_v2` instead. Rich, formatted, and
	// interactive cards that you can use to display UI elements such as:
	// formatted texts, buttons, and clickable images. Cards are normally
	// displayed below the plain-text body of the message. `cards` and
	// `cards_v2` can have a maximum size of 32 KB.
	Cards []*Card `json:"cards,omitempty"`

	// CardsV2: An array of cards
	// (https://developers.google.com/workspace/chat/api/reference/rest/v1/cards).
	// Only Chat apps can create cards. If your Chat app authenticates as a
	// user
	// (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
	// the messages can't contain cards. To learn about cards and how to
	// create them, see Send card messages
	// (https://developers.google.com/workspace/chat/create-messages#create).
	// Card builder (https://addons.gsuite.google.com/uikit/builder)
	CardsV2 []*CardWithId `json:"cardsV2,omitempty"`

	// ClientAssignedMessageId: Optional. A custom ID for the message. You
	// can use field to identify a message, or to get, delete, or update a
	// message. To set a custom ID, specify the `messageId`
	// (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/create#body.QUERY_PARAMETERS.message_id)
	// field when you create the message. For details, see Name a message
	// (https://developers.google.com/workspace/chat/create-messages#name_a_created_message).
	ClientAssignedMessageId string `json:"clientAssignedMessageId,omitempty"`

	// CreateTime: Optional. Immutable. For spaces created in Chat, the time
	// at which the message was created. This field is output only, except
	// when used in import mode spaces. For import mode spaces, set this
	// field to the historical timestamp at which the message was created in
	// the source in order to preserve the original creation time.
	CreateTime string `json:"createTime,omitempty"`

	// DeleteTime: Output only. The time at which the message was deleted in
	// Google Chat. If the message is never deleted, this field is empty.
	DeleteTime string `json:"deleteTime,omitempty"`

	// DeletionMetadata: Output only. Information about a deleted message. A
	// message is deleted when `delete_time` is set.
	DeletionMetadata *DeletionMetadata `json:"deletionMetadata,omitempty"`

	// EmojiReactionSummaries: Output only. The list of emoji reaction
	// summaries on the message.
	EmojiReactionSummaries []*EmojiReactionSummary `json:"emojiReactionSummaries,omitempty"`

	// FallbackText: A plain-text description of the message's cards, used
	// when the actual cards can't be displayed—for example, mobile
	// notifications.
	FallbackText string `json:"fallbackText,omitempty"`

	// FormattedText: Output only. Contains the message `text` with markups
	// added to communicate formatting. This field might not capture all
	// formatting visible in the UI, but includes the following: * Markup
	// syntax (https://developers.google.com/workspace/chat/format-messages)
	// for bold, italic, strikethrough, monospace, monospace block, and
	// bulleted list. * User mentions
	// (https://developers.google.com/workspace/chat/format-messages#messages-@mention)
	// using the format “. * Custom hyperlinks using the format
	// `<{url}|{rendered_text}>` where the first string is the URL and the
	// second is the rendered text—for example, “. * Custom emoji using
	// the format `:{emoji_name}:`—for example, `:smile:`. This doesn't
	// apply to Unicode emoji, such as `U+1F600` for a grinning face emoji.
	// For more information, see View text formatting sent in a message
	// (https://developers.google.com/workspace/chat/format-messages#view_text_formatting_sent_in_a_message)
	FormattedText string `json:"formattedText,omitempty"`

	// LastUpdateTime: Output only. The time at which the message was last
	// edited by a user. If the message has never been edited, this field is
	// empty.
	LastUpdateTime string `json:"lastUpdateTime,omitempty"`

	// MatchedUrl: Output only. A URL in `spaces.messages.text` that matches
	// a link preview pattern. For more information, see Preview links
	// (https://developers.google.com/workspace/chat/preview-links).
	MatchedUrl *MatchedUrl `json:"matchedUrl,omitempty"`

	// Name: Resource name of the message. Format:
	// `spaces/{space}/messages/{message}` Where `{space}` is the ID of the
	// space where the message is posted and `{message}` is a
	// system-assigned ID for the message. For example,
	// `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB`. If you set a
	// custom ID when you create a message, you can use this ID to specify
	// the message in a request by replacing `{message}` with the value from
	// the `clientAssignedMessageId` field. For example,
	// `spaces/AAAAAAAAAAA/messages/client-custom-name`. For details, see
	// Name a message
	// (https://developers.google.com/workspace/chat/create-messages#name_a_created_message).
	Name string `json:"name,omitempty"`

	// PrivateMessageViewer: Immutable. Input for creating a message,
	// otherwise output only. The user that can view the message. When set,
	// the message is private and only visible to the specified user and the
	// Chat app. Link previews and attachments aren't supported for private
	// messages. Only Chat apps can send private messages. If your Chat app
	// authenticates as a user
	// (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
	// to send a message, the message can't be private and must omit this
	// field. For details, see Send private messages to Google Chat users
	// (https://developers.google.com/workspace/chat/private-messages).
	PrivateMessageViewer *User `json:"privateMessageViewer,omitempty"`

	// QuotedMessageMetadata: Output only. Information about a message
	// that's quoted by a Google Chat user in a space. Google Chat users can
	// quote a message to reply to it.
	QuotedMessageMetadata *QuotedMessageMetadata `json:"quotedMessageMetadata,omitempty"`

	// Sender: Output only. The user who created the message. If your Chat
	// app authenticates as a user
	// (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
	// the output populates the user
	// (https://developers.google.com/workspace/chat/api/reference/rest/v1/User)
	// `name` and `type`.
	Sender *User `json:"sender,omitempty"`

	// SlashCommand: Output only. Slash command information, if applicable.
	SlashCommand *SlashCommand `json:"slashCommand,omitempty"`

	// Space: If your Chat app authenticates as a user
	// (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
	// the output populates the space
	// (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces)
	// `name`.
	Space *Space `json:"space,omitempty"`

	// Text: Plain-text body of the message. The first link to an image,
	// video, or web page generates a preview chip
	// (https://developers.google.com/workspace/chat/preview-links). You can
	// also @mention a Google Chat user
	// (https://developers.google.com/workspace/chat/format-messages#messages-@mention),
	// or everyone in the space. To learn about creating text messages, see
	// Send a text message
	// (https://developers.google.com/workspace/chat/create-messages#create-text-messages).
	Text string `json:"text,omitempty"`

	// Thread: The thread the message belongs to. For example usage, see
	// Start or reply to a message thread
	// (https://developers.google.com/workspace/chat/create-messages#create-message-thread).
	Thread *Thread `json:"thread,omitempty"`

	// ThreadReply: Output only. When `true`, the message is a response in a
	// reply thread. When `false`, the message is visible in the space's
	// top-level conversation as either the first message of a thread or a
	// message with no threaded replies. If the space doesn't support reply
	// in threads, this field is always `false`.
	ThreadReply bool `json:"threadReply,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "AccessoryWidgets") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "AccessoryWidgets") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

Message: A message in a Google Chat space.

func (*Message) MarshalJSON

func (s *Message) MarshalJSON() ([]byte, error)

type MessageBatchCreatedEventData added in v0.173.0

type MessageBatchCreatedEventData struct {
	// Messages: A list of new messages.
	Messages []*MessageCreatedEventData `json:"messages,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Messages") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Messages") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

MessageBatchCreatedEventData: Event payload for multiple new messages. Event type: `google.workspace.chat.message.v1.batchCreated`

func (*MessageBatchCreatedEventData) MarshalJSON added in v0.173.0

func (s *MessageBatchCreatedEventData) MarshalJSON() ([]byte, error)

type MessageBatchDeletedEventData added in v0.173.0

type MessageBatchDeletedEventData struct {
	// Messages: A list of deleted messages.
	Messages []*MessageDeletedEventData `json:"messages,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Messages") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Messages") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

MessageBatchDeletedEventData: Event payload for multiple deleted messages. Event type: `google.workspace.chat.message.v1.batchDeleted`

func (*MessageBatchDeletedEventData) MarshalJSON added in v0.173.0

func (s *MessageBatchDeletedEventData) MarshalJSON() ([]byte, error)

type MessageBatchUpdatedEventData added in v0.173.0

type MessageBatchUpdatedEventData struct {
	// Messages: A list of updated messages.
	Messages []*MessageUpdatedEventData `json:"messages,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Messages") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Messages") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

MessageBatchUpdatedEventData: Event payload for multiple updated messages. Event type: `google.workspace.chat.message.v1.batchUpdated`

func (*MessageBatchUpdatedEventData) MarshalJSON added in v0.173.0

func (s *MessageBatchUpdatedEventData) MarshalJSON() ([]byte, error)

type MessageCreatedEventData added in v0.173.0

type MessageCreatedEventData struct {
	// Message: The new message.
	Message *Message `json:"message,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Message") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Message") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

MessageCreatedEventData: Event payload for a new message. Event type: `google.workspace.chat.message.v1.created`

func (*MessageCreatedEventData) MarshalJSON added in v0.173.0

func (s *MessageCreatedEventData) MarshalJSON() ([]byte, error)

type MessageDeletedEventData added in v0.173.0

type MessageDeletedEventData struct {
	// Message: The deleted message. Only the `name`, `createTime`,
	// `deleteTime`, and `deletionMetadata` fields are populated.
	Message *Message `json:"message,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Message") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Message") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

MessageDeletedEventData: Event payload for a deleted message. Event type: `google.workspace.chat.message.v1.deleted`

func (*MessageDeletedEventData) MarshalJSON added in v0.173.0

func (s *MessageDeletedEventData) MarshalJSON() ([]byte, error)

type MessageUpdatedEventData added in v0.173.0

type MessageUpdatedEventData struct {
	// Message: The updated message.
	Message *Message `json:"message,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Message") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Message") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

MessageUpdatedEventData: Event payload for an updated message. Event type: `google.workspace.chat.message.v1.updated`

func (*MessageUpdatedEventData) MarshalJSON added in v0.173.0

func (s *MessageUpdatedEventData) MarshalJSON() ([]byte, error)

type OnClick

type OnClick struct {
	// Action: A form action is triggered by this `onclick` action if
	// specified.
	Action *FormAction `json:"action,omitempty"`

	// OpenLink: This `onclick` action triggers an open link action if
	// specified.
	OpenLink *OpenLink `json:"openLink,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Action") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Action") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

OnClick: An `onclick` action (for example, open a link).

func (*OnClick) MarshalJSON

func (s *OnClick) MarshalJSON() ([]byte, error)
type OpenLink struct {
	// Url: The URL to open.
	Url string `json:"url,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Url") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Url") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

OpenLink: A link that opens a new window.

func (*OpenLink) MarshalJSON

func (s *OpenLink) MarshalJSON() ([]byte, error)

type QuotedMessageMetadata added in v0.131.0

type QuotedMessageMetadata struct {
	// LastUpdateTime: Output only. The timestamp when the quoted message
	// was created or when the quoted message was last updated.
	LastUpdateTime string `json:"lastUpdateTime,omitempty"`

	// Name: Output only. Resource name of the quoted message. Format:
	// `spaces/{space}/messages/{message}`
	Name string `json:"name,omitempty"`

	// ForceSendFields is a list of field names (e.g. "LastUpdateTime") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "LastUpdateTime") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

QuotedMessageMetadata: Information about a quoted message.

func (*QuotedMessageMetadata) MarshalJSON added in v0.131.0

func (s *QuotedMessageMetadata) MarshalJSON() ([]byte, error)

type Reaction added in v0.123.0

type Reaction struct {
	// Emoji: The emoji used in the reaction.
	Emoji *Emoji `json:"emoji,omitempty"`

	// Name: The resource name of the reaction. Format:
	// `spaces/{space}/messages/{message}/reactions/{reaction}`
	Name string `json:"name,omitempty"`

	// User: Output only. The user who created the reaction.
	User *User `json:"user,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Emoji") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Emoji") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

Reaction: A reaction to a message.

func (*Reaction) MarshalJSON added in v0.123.0

func (s *Reaction) MarshalJSON() ([]byte, error)

type ReactionBatchCreatedEventData added in v0.173.0

type ReactionBatchCreatedEventData struct {
	// Reactions: A list of new reactions.
	Reactions []*ReactionCreatedEventData `json:"reactions,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Reactions") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Reactions") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ReactionBatchCreatedEventData: Event payload for multiple new reactions. Event type: `google.workspace.chat.reaction.v1.batchCreated`

func (*ReactionBatchCreatedEventData) MarshalJSON added in v0.173.0

func (s *ReactionBatchCreatedEventData) MarshalJSON() ([]byte, error)

type ReactionBatchDeletedEventData added in v0.173.0

type ReactionBatchDeletedEventData struct {
	// Reactions: A list of deleted reactions.
	Reactions []*ReactionDeletedEventData `json:"reactions,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Reactions") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Reactions") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ReactionBatchDeletedEventData: Event payload for multiple deleted reactions. Event type: `google.workspace.chat.reaction.v1.batchDeleted`

func (*ReactionBatchDeletedEventData) MarshalJSON added in v0.173.0

func (s *ReactionBatchDeletedEventData) MarshalJSON() ([]byte, error)

type ReactionCreatedEventData added in v0.173.0

type ReactionCreatedEventData struct {
	// Reaction: The new reaction.
	Reaction *Reaction `json:"reaction,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Reaction") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Reaction") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ReactionCreatedEventData: Event payload for a new reaction. Event type: `google.workspace.chat.reaction.v1.created`

func (*ReactionCreatedEventData) MarshalJSON added in v0.173.0

func (s *ReactionCreatedEventData) MarshalJSON() ([]byte, error)

type ReactionDeletedEventData added in v0.173.0

type ReactionDeletedEventData struct {
	// Reaction: The deleted reaction.
	Reaction *Reaction `json:"reaction,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Reaction") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Reaction") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ReactionDeletedEventData: Event payload for a deleted reaction. Type: `google.workspace.chat.reaction.v1.deleted`

func (*ReactionDeletedEventData) MarshalJSON added in v0.173.0

func (s *ReactionDeletedEventData) MarshalJSON() ([]byte, error)

type RichLinkMetadata added in v0.170.0

type RichLinkMetadata struct {
	// DriveLinkData: Data for a drive link.
	DriveLinkData *DriveLinkData `json:"driveLinkData,omitempty"`

	// RichLinkType: The rich link type.
	//
	// Possible values:
	//   "RICH_LINK_TYPE_UNSPECIFIED" - Default value for the enum. Don't
	// use.
	//   "DRIVE_FILE" - A Google Drive rich link type.
	RichLinkType string `json:"richLinkType,omitempty"`

	// Uri: The URI of this link.
	Uri string `json:"uri,omitempty"`

	// ForceSendFields is a list of field names (e.g. "DriveLinkData") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "DriveLinkData") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

RichLinkMetadata: A rich link to a resource.

func (*RichLinkMetadata) MarshalJSON added in v0.170.0

func (s *RichLinkMetadata) MarshalJSON() ([]byte, error)

type Section

type Section struct {
	// Header: The header of the section. Formatted text is supported. For
	// more information about formatting text, see Formatting text in Google
	// Chat apps
	// (https://developers.google.com/workspace/chat/format-messages#card-formatting)
	// and Formatting text in Google Workspace Add-ons
	// (https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
	Header string `json:"header,omitempty"`

	// Widgets: A section must contain at least one widget.
	Widgets []*WidgetMarkup `json:"widgets,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Header") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Header") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

Section: A section contains a collection of widgets that are rendered (vertically) in the order that they are specified. Across all platforms, cards have a narrow fixed width, so there's currently no need for layout properties (for example, float).

func (*Section) MarshalJSON

func (s *Section) MarshalJSON() ([]byte, error)

type SelectionItems added in v0.153.0

type SelectionItems struct {
	// Items: An array of the SelectionItem objects.
	Items []*GoogleAppsCardV1SelectionItem `json:"items,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Items") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Items") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

SelectionItems: List of widget autocomplete results.

func (*SelectionItems) MarshalJSON added in v0.153.0

func (s *SelectionItems) MarshalJSON() ([]byte, error)

type Service

type Service struct {
	BasePath  string // API endpoint base URL
	UserAgent string // optional additional User-Agent fragment

	Media *MediaService

	Spaces *SpacesService
	// contains filtered or unexported fields
}

func New deprecated

func New(client *http.Client) (*Service, error)

New creates a new Service. It uses the provided http.Client for requests.

Deprecated: please use NewService instead. To provide a custom HTTP client, use option.WithHTTPClient. If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.

func NewService added in v0.3.0

func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error)

NewService creates a new Service.

type SetUpSpaceRequest added in v0.123.0

type SetUpSpaceRequest struct {
	// Memberships: Optional. The Google Chat users to invite to join the
	// space. Omit the calling user, as they are added automatically. The
	// set currently allows up to 20 memberships (in addition to the
	// caller). The `Membership.member` field must contain a `user` with
	// `name` populated (format: `users/{user}`) and `type` set to
	// `User.Type.HUMAN`. You can only add human users when setting up a
	// space (adding Chat apps is only supported for direct message setup
	// with the calling app). You can also add members using the user's
	// email as an alias for {user}. For example, the `user.name` can be
	// `users/example@gmail.com`." To invite Gmail users or users from
	// external Google Workspace domains, user's email must be used for
	// `{user}`. Optional when setting `Space.spaceType` to `SPACE`.
	// Required when setting `Space.spaceType` to `GROUP_CHAT`, along with
	// at least two memberships. Required when setting `Space.spaceType` to
	// `DIRECT_MESSAGE` with a human user, along with exactly one
	// membership. Must be empty when creating a 1:1 conversation between a
	// human and the calling Chat app (when setting `Space.spaceType` to
	// `DIRECT_MESSAGE` and `Space.singleUserBotDm` to `true`).
	Memberships []*Membership `json:"memberships,omitempty"`

	// RequestId: Optional. A unique identifier for this request. A random
	// UUID is recommended. Specifying an existing request ID returns the
	// space created with that ID instead of creating a new space.
	// Specifying an existing request ID from the same Chat app with a
	// different authenticated user returns an error.
	RequestId string `json:"requestId,omitempty"`

	// Space: Required. The `Space.spaceType` field is required. To create a
	// space, set `Space.spaceType` to `SPACE` and set `Space.displayName`.
	// If you receive the error message `ALREADY_EXISTS` when setting up a
	// space, try a different `displayName`. An existing space within the
	// Google Workspace organization might already use this display name. To
	// create a group chat, set `Space.spaceType` to `GROUP_CHAT`. Don't set
	// `Space.displayName`. To create a 1:1 conversation between humans, set
	// `Space.spaceType` to `DIRECT_MESSAGE` and set `Space.singleUserBotDm`
	// to `false`. Don't set `Space.displayName` or `Space.spaceDetails`. To
	// create an 1:1 conversation between a human and the calling Chat app,
	// set `Space.spaceType` to `DIRECT_MESSAGE` and `Space.singleUserBotDm`
	// to `true`. Don't set `Space.displayName` or `Space.spaceDetails`. If
	// a `DIRECT_MESSAGE` space already exists, that space is returned
	// instead of creating a new space.
	Space *Space `json:"space,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Memberships") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Memberships") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

SetUpSpaceRequest: Request to create a space and add specified users to it.

func (*SetUpSpaceRequest) MarshalJSON added in v0.123.0

func (s *SetUpSpaceRequest) MarshalJSON() ([]byte, error)

type SlashCommand added in v0.33.0

type SlashCommand struct {
	// CommandId: The ID of the slash command invoked.
	CommandId int64 `json:"commandId,omitempty,string"`

	// ForceSendFields is a list of field names (e.g. "CommandId") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "CommandId") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

SlashCommand: A slash command (https://developers.google.com/workspace/chat/slash-commands) in Google Chat.

func (*SlashCommand) MarshalJSON added in v0.33.0

func (s *SlashCommand) MarshalJSON() ([]byte, error)

type SlashCommandMetadata added in v0.33.0

type SlashCommandMetadata struct {
	// Bot: The Chat app whose command was invoked.
	Bot *User `json:"bot,omitempty"`

	// CommandId: The command ID of the invoked slash command.
	CommandId int64 `json:"commandId,omitempty,string"`

	// CommandName: The name of the invoked slash command.
	CommandName string `json:"commandName,omitempty"`

	// TriggersDialog: Indicates whether the slash command is for a dialog.
	TriggersDialog bool `json:"triggersDialog,omitempty"`

	// Type: The type of slash command.
	//
	// Possible values:
	//   "TYPE_UNSPECIFIED" - Default value for the enum. Don't use.
	//   "ADD" - Add Chat app to space.
	//   "INVOKE" - Invoke slash command in space.
	Type string `json:"type,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Bot") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Bot") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

SlashCommandMetadata: Annotation metadata for slash commands (/).

func (*SlashCommandMetadata) MarshalJSON added in v0.33.0

func (s *SlashCommandMetadata) MarshalJSON() ([]byte, error)

type Space

type Space struct {
	// AdminInstalled: Output only. Whether the Chat app was installed by a
	// Google Workspace administrator. Administrators can install a Chat app
	// for their domain, organizational unit, or a group of users.
	// Administrators can only install Chat apps for direct messaging
	// between users and the app. To support admin install, your app must
	// feature direct messaging.
	AdminInstalled bool `json:"adminInstalled,omitempty"`

	// CreateTime: Optional. Immutable. For spaces created in Chat, the time
	// the space was created. This field is output only, except when used in
	// import mode spaces. For import mode spaces, set this field to the
	// historical timestamp at which the space was created in the source in
	// order to preserve the original creation time. Only populated in the
	// output when `spaceType` is `GROUP_CHAT` or `SPACE`.
	CreateTime string `json:"createTime,omitempty"`

	// DisplayName: The space's display name. Required when creating a space
	// (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/create).
	// If you receive the error message `ALREADY_EXISTS` when creating a
	// space or updating the `displayName`, try a different `displayName`.
	// An existing space within the Google Workspace organization might
	// already use this display name. For direct messages, this field might
	// be empty. Supports up to 128 characters.
	DisplayName string `json:"displayName,omitempty"`

	// ExternalUserAllowed: Immutable. Whether this space permits any Google
	// Chat user as a member. Input when creating a space in a Google
	// Workspace organization. Omit this field when creating spaces in the
	// following conditions: * The authenticated user uses a consumer
	// account (unmanaged user account). By default, a space created by a
	// consumer account permits any Google Chat user. * The space is used to
	// [import data to Google Chat]
	// (https://developers.google.com/chat/api/guides/import-data-overview)
	// because import mode spaces must only permit members from the same
	// Google Workspace organization. However, as part of the Google
	// Workspace Developer Preview Program
	// (https://developers.google.com/workspace/preview), import mode spaces
	// can permit any Google Chat user so this field can then be set for
	// import mode spaces. For existing spaces, this field is output only.
	ExternalUserAllowed bool `json:"externalUserAllowed,omitempty"`

	// ImportMode: Optional. Whether this space is created in `Import Mode`
	// as part of a data migration into Google Workspace. While spaces are
	// being imported, they aren't visible to users until the import is
	// complete.
	ImportMode bool `json:"importMode,omitempty"`

	// Name: Resource name of the space. Format: `spaces/{space}`
	Name string `json:"name,omitempty"`

	// SingleUserBotDm: Optional. Whether the space is a DM between a Chat
	// app and a single human.
	SingleUserBotDm bool `json:"singleUserBotDm,omitempty"`

	// SpaceDetails: Details about the space including description and
	// rules.
	SpaceDetails *SpaceDetails `json:"spaceDetails,omitempty"`

	// SpaceHistoryState: The message history state for messages and threads
	// in this space.
	//
	// Possible values:
	//   "HISTORY_STATE_UNSPECIFIED" - Default value. Do not use.
	//   "HISTORY_OFF" - History off. [Messages and threads are kept for 24
	// hours](https://support.google.com/chat/answer/7664687).
	//   "HISTORY_ON" - History on. The organization's [Vault retention
	// rules](https://support.google.com/vault/answer/7657597) specify for
	// how long messages and threads are kept.
	SpaceHistoryState string `json:"spaceHistoryState,omitempty"`

	// SpaceThreadingState: Output only. The threading state in the Chat
	// space.
	//
	// Possible values:
	//   "SPACE_THREADING_STATE_UNSPECIFIED" - Reserved.
	//   "THREADED_MESSAGES" - Named spaces that support message threads.
	// When users respond to a message, they can reply in-thread, which
	// keeps their response in the context of the original message.
	//   "GROUPED_MESSAGES" - Named spaces where the conversation is
	// organized by topic. Topics and their replies are grouped together.
	//   "UNTHREADED_MESSAGES" - Direct messages (DMs) between two people
	// and group conversations between 3 or more people.
	SpaceThreadingState string `json:"spaceThreadingState,omitempty"`

	// SpaceType: The type of space. Required when creating a space or
	// updating the space type of a space. Output only for other usage.
	//
	// Possible values:
	//   "SPACE_TYPE_UNSPECIFIED" - Reserved.
	//   "SPACE" - A place where people send messages, share files, and
	// collaborate. A `SPACE` can include Chat apps.
	//   "GROUP_CHAT" - Group conversations between 3 or more people. A
	// `GROUP_CHAT` can include Chat apps.
	//   "DIRECT_MESSAGE" - 1:1 messages between two humans or a human and a
	// Chat app.
	SpaceType string `json:"spaceType,omitempty"`

	// Threaded: Output only. Deprecated: Use `spaceThreadingState` instead.
	// Whether messages are threaded in this space.
	Threaded bool `json:"threaded,omitempty"`

	// Type: Output only. Deprecated: Use `space_type` instead. The type of
	// a space.
	//
	// Possible values:
	//   "TYPE_UNSPECIFIED" - Reserved.
	//   "ROOM" - Conversations between two or more humans.
	//   "DM" - 1:1 Direct Message between a human and a Chat app, where all
	// messages are flat. Note that this doesn't include direct messages
	// between two humans.
	Type string `json:"type,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "AdminInstalled") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "AdminInstalled") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

Space: A space in Google Chat. Spaces are conversations between two or more users or 1:1 messages between a user and a Chat app.

func (*Space) MarshalJSON

func (s *Space) MarshalJSON() ([]byte, error)

type SpaceBatchUpdatedEventData added in v0.173.0

type SpaceBatchUpdatedEventData struct {
	// Spaces: A list of updated spaces.
	Spaces []*SpaceUpdatedEventData `json:"spaces,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Spaces") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Spaces") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

SpaceBatchUpdatedEventData: Event payload for multiple updates to a space. Event type: `google.workspace.chat.space.v1.batchUpdated`

func (*SpaceBatchUpdatedEventData) MarshalJSON added in v0.173.0

func (s *SpaceBatchUpdatedEventData) MarshalJSON() ([]byte, error)

type SpaceDataSource added in v0.132.0

type SpaceDataSource struct {
	// DefaultToCurrentSpace: If set to `true`, the multiselect menu selects
	// the current Google Chat space as an item by default.
	DefaultToCurrentSpace bool `json:"defaultToCurrentSpace,omitempty"`

	// ForceSendFields is a list of field names (e.g.
	// "DefaultToCurrentSpace") to unconditionally include in API requests.
	// By default, fields with empty or default values are omitted from API
	// requests. However, any non-pointer, non-interface field appearing in
	// ForceSendFields will be sent to the server regardless of whether the
	// field is empty or not. This may be used to include empty fields in
	// Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "DefaultToCurrentSpace") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

SpaceDataSource: A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. Google Chat apps (https://developers.google.com/workspace/chat):

func (*SpaceDataSource) MarshalJSON added in v0.132.0

func (s *SpaceDataSource) MarshalJSON() ([]byte, error)

type SpaceDetails added in v0.90.0

type SpaceDetails struct {
	// Description: Optional. A description of the space. For example,
	// describe the space's discussion topic, functional purpose, or
	// participants. Supports up to 150 characters.
	Description string `json:"description,omitempty"`

	// Guidelines: Optional. The space's rules, expectations, and etiquette.
	// Supports up to 5,000 characters.
	Guidelines string `json:"guidelines,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Description") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Description") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

SpaceDetails: Details about the space including description and rules.

func (*SpaceDetails) MarshalJSON added in v0.90.0

func (s *SpaceDetails) MarshalJSON() ([]byte, error)

type SpaceEvent added in v0.173.0

type SpaceEvent struct {
	// EventTime: Time when the event occurred.
	EventTime string `json:"eventTime,omitempty"`

	// EventType: Type of space event. Each event type has a batch version,
	// which represents multiple instances of the event type that occur in a
	// short period of time. For `spaceEvents.list()` requests, omit batch
	// event types in your query filter. By default, the server returns both
	// event type and its batch version. Supported event types for messages
	// (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages):
	// * New message: `google.workspace.chat.message.v1.created` * Updated
	// message: `google.workspace.chat.message.v1.updated` * Deleted
	// message: `google.workspace.chat.message.v1.deleted` * Multiple new
	// messages: `google.workspace.chat.message.v1.batchCreated` * Multiple
	// updated messages: `google.workspace.chat.message.v1.batchUpdated` *
	// Multiple deleted messages:
	// `google.workspace.chat.message.v1.batchDeleted` Supported event types
	// for memberships
	// (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.members):
	// * New membership: `google.workspace.chat.membership.v1.created` *
	// Updated membership: `google.workspace.chat.membership.v1.updated` *
	// Deleted membership: `google.workspace.chat.membership.v1.deleted` *
	// Multiple new memberships:
	// `google.workspace.chat.membership.v1.batchCreated` * Multiple updated
	// memberships: `google.workspace.chat.membership.v1.batchUpdated` *
	// Multiple deleted memberships:
	// `google.workspace.chat.membership.v1.batchDeleted` Supported event
	// types for reactions
	// (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.reactions):
	// * New reaction: `google.workspace.chat.reaction.v1.created` * Deleted
	// reaction: `google.workspace.chat.reaction.v1.deleted` * Multiple new
	// reactions: `google.workspace.chat.reaction.v1.batchCreated` *
	// Multiple deleted reactions:
	// `google.workspace.chat.reaction.v1.batchDeleted` Supported event
	// types about the space
	// (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces):
	// * Updated space: `google.workspace.chat.space.v1.updated` * Multiple
	// space updates: `google.workspace.chat.space.v1.batchUpdated`
	EventType string `json:"eventType,omitempty"`

	// MembershipBatchCreatedEventData: Event payload for multiple new
	// memberships. Event type:
	// `google.workspace.chat.membership.v1.batchCreated`
	MembershipBatchCreatedEventData *MembershipBatchCreatedEventData `json:"membershipBatchCreatedEventData,omitempty"`

	// MembershipBatchDeletedEventData: Event payload for multiple deleted
	// memberships. Event type:
	// `google.workspace.chat.membership.v1.batchDeleted`
	MembershipBatchDeletedEventData *MembershipBatchDeletedEventData `json:"membershipBatchDeletedEventData,omitempty"`

	// MembershipBatchUpdatedEventData: Event payload for multiple updated
	// memberships. Event type:
	// `google.workspace.chat.membership.v1.batchUpdated`
	MembershipBatchUpdatedEventData *MembershipBatchUpdatedEventData `json:"membershipBatchUpdatedEventData,omitempty"`

	// MembershipCreatedEventData: Event payload for a new membership. Event
	// type: `google.workspace.chat.membership.v1.created`
	MembershipCreatedEventData *MembershipCreatedEventData `json:"membershipCreatedEventData,omitempty"`

	// MembershipDeletedEventData: Event payload for a deleted membership.
	// Event type: `google.workspace.chat.membership.v1.deleted`
	MembershipDeletedEventData *MembershipDeletedEventData `json:"membershipDeletedEventData,omitempty"`

	// MembershipUpdatedEventData: Event payload for an updated membership.
	// Event type: `google.workspace.chat.membership.v1.updated`
	MembershipUpdatedEventData *MembershipUpdatedEventData `json:"membershipUpdatedEventData,omitempty"`

	// MessageBatchCreatedEventData: Event payload for multiple new
	// messages. Event type: `google.workspace.chat.message.v1.batchCreated`
	MessageBatchCreatedEventData *MessageBatchCreatedEventData `json:"messageBatchCreatedEventData,omitempty"`

	// MessageBatchDeletedEventData: Event payload for multiple deleted
	// messages. Event type: `google.workspace.chat.message.v1.batchDeleted`
	MessageBatchDeletedEventData *MessageBatchDeletedEventData `json:"messageBatchDeletedEventData,omitempty"`

	// MessageBatchUpdatedEventData: Event payload for multiple updated
	// messages. Event type: `google.workspace.chat.message.v1.batchUpdated`
	MessageBatchUpdatedEventData *MessageBatchUpdatedEventData `json:"messageBatchUpdatedEventData,omitempty"`

	// MessageCreatedEventData: Event payload for a new message. Event type:
	// `google.workspace.chat.message.v1.created`
	MessageCreatedEventData *MessageCreatedEventData `json:"messageCreatedEventData,omitempty"`

	// MessageDeletedEventData: Event payload for a deleted message. Event
	// type: `google.workspace.chat.message.v1.deleted`
	MessageDeletedEventData *MessageDeletedEventData `json:"messageDeletedEventData,omitempty"`

	// MessageUpdatedEventData: Event payload for an updated message. Event
	// type: `google.workspace.chat.message.v1.updated`
	MessageUpdatedEventData *MessageUpdatedEventData `json:"messageUpdatedEventData,omitempty"`

	// Name: Resource name of the space event. Format:
	// `spaces/{space}/spaceEvents/{spaceEvent}`
	Name string `json:"name,omitempty"`

	// ReactionBatchCreatedEventData: Event payload for multiple new
	// reactions. Event type:
	// `google.workspace.chat.reaction.v1.batchCreated`
	ReactionBatchCreatedEventData *ReactionBatchCreatedEventData `json:"reactionBatchCreatedEventData,omitempty"`

	// ReactionBatchDeletedEventData: Event payload for multiple deleted
	// reactions. Event type:
	// `google.workspace.chat.reaction.v1.batchDeleted`
	ReactionBatchDeletedEventData *ReactionBatchDeletedEventData `json:"reactionBatchDeletedEventData,omitempty"`

	// ReactionCreatedEventData: Event payload for a new reaction. Event
	// type: `google.workspace.chat.reaction.v1.created`
	ReactionCreatedEventData *ReactionCreatedEventData `json:"reactionCreatedEventData,omitempty"`

	// ReactionDeletedEventData: Event payload for a deleted reaction. Event
	// type: `google.workspace.chat.reaction.v1.deleted`
	ReactionDeletedEventData *ReactionDeletedEventData `json:"reactionDeletedEventData,omitempty"`

	// SpaceBatchUpdatedEventData: Event payload for multiple updates to a
	// space. Event type: `google.workspace.chat.space.v1.batchUpdated`
	SpaceBatchUpdatedEventData *SpaceBatchUpdatedEventData `json:"spaceBatchUpdatedEventData,omitempty"`

	// SpaceUpdatedEventData: Event payload for a space update. Event type:
	// `google.workspace.chat.space.v1.updated`
	SpaceUpdatedEventData *SpaceUpdatedEventData `json:"spaceUpdatedEventData,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "EventTime") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "EventTime") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

SpaceEvent: An event that represents a change or activity in a Google Chat space. To learn more, see Work with events from Google Chat (https://developers.google.com/workspace/chat/events-overview).

func (*SpaceEvent) MarshalJSON added in v0.173.0

func (s *SpaceEvent) MarshalJSON() ([]byte, error)

type SpaceUpdatedEventData added in v0.173.0

type SpaceUpdatedEventData struct {
	// Space: The updated space.
	Space *Space `json:"space,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Space") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Space") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

SpaceUpdatedEventData: Event payload for an updated space. Event type: `google.workspace.chat.space.v1.updated`

func (*SpaceUpdatedEventData) MarshalJSON added in v0.173.0

func (s *SpaceUpdatedEventData) MarshalJSON() ([]byte, error)

type SpacesCompleteImportCall added in v0.156.0

type SpacesCompleteImportCall struct {
	// contains filtered or unexported fields
}

func (*SpacesCompleteImportCall) Context added in v0.156.0

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*SpacesCompleteImportCall) Do added in v0.156.0

Do executes the "chat.spaces.completeImport" call. Exactly one of *CompleteImportSpaceResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *CompleteImportSpaceResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*SpacesCompleteImportCall) Fields added in v0.156.0

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*SpacesCompleteImportCall) Header added in v0.156.0

func (c *SpacesCompleteImportCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type SpacesCreateCall added in v0.123.0

type SpacesCreateCall struct {
	// contains filtered or unexported fields
}

func (*SpacesCreateCall) Context added in v0.123.0

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*SpacesCreateCall) Do added in v0.123.0

func (c *SpacesCreateCall) Do(opts ...googleapi.CallOption) (*Space, error)

Do executes the "chat.spaces.create" call. Exactly one of *Space or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Space.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*SpacesCreateCall) Fields added in v0.123.0

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*SpacesCreateCall) Header added in v0.123.0

func (c *SpacesCreateCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*SpacesCreateCall) RequestId added in v0.123.0

func (c *SpacesCreateCall) RequestId(requestId string) *SpacesCreateCall

RequestId sets the optional parameter "requestId": A unique identifier for this request. A random UUID is recommended. Specifying an existing request ID returns the space created with that ID instead of creating a new space. Specifying an existing request ID from the same Chat app with a different authenticated user returns an error.

type SpacesDeleteCall added in v0.123.0

type SpacesDeleteCall struct {
	// contains filtered or unexported fields
}

func (*SpacesDeleteCall) Context added in v0.123.0

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*SpacesDeleteCall) Do added in v0.123.0

func (c *SpacesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error)

Do executes the "chat.spaces.delete" call. Exactly one of *Empty or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Empty.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*SpacesDeleteCall) Fields added in v0.123.0

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*SpacesDeleteCall) Header added in v0.123.0

func (c *SpacesDeleteCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type SpacesFindDirectMessageCall added in v0.123.0

type SpacesFindDirectMessageCall struct {
	// contains filtered or unexported fields
}

func (*SpacesFindDirectMessageCall) Context added in v0.123.0

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*SpacesFindDirectMessageCall) Do added in v0.123.0

Do executes the "chat.spaces.findDirectMessage" call. Exactly one of *Space or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Space.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*SpacesFindDirectMessageCall) Fields added in v0.123.0

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*SpacesFindDirectMessageCall) Header added in v0.123.0

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*SpacesFindDirectMessageCall) IfNoneMatch added in v0.123.0

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*SpacesFindDirectMessageCall) Name added in v0.123.0

Name sets the optional parameter "name": Required. Resource name of the user to find direct message with. Format: `users/{user}`, where `{user}` is either the `id` for the person (https://developers.google.com/people/api/rest/v1/people) from the People API, or the `id` for the user (https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) in the Directory API. For example, if the People API profile ID is `123456789`, you can find a direct message with that person by using `users/123456789` as the `name`. When authenticated as a user (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), you can use the email as an alias for `{user}`. For example, `users/example@gmail.com` where `example@gmail.com` is the email of the Google Chat user.

type SpacesGetCall

type SpacesGetCall struct {
	// contains filtered or unexported fields
}

func (*SpacesGetCall) Context

func (c *SpacesGetCall) Context(ctx context.Context) *SpacesGetCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*SpacesGetCall) Do

func (c *SpacesGetCall) Do(opts ...googleapi.CallOption) (*Space, error)

Do executes the "chat.spaces.get" call. Exactly one of *Space or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Space.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*SpacesGetCall) Fields

func (c *SpacesGetCall) Fields(s ...googleapi.Field) *SpacesGetCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*SpacesGetCall) Header

func (c *SpacesGetCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*SpacesGetCall) IfNoneMatch

func (c *SpacesGetCall) IfNoneMatch(entityTag string) *SpacesGetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type SpacesListCall

type SpacesListCall struct {
	// contains filtered or unexported fields
}

func (*SpacesListCall) Context

func (c *SpacesListCall) Context(ctx context.Context) *SpacesListCall

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*SpacesListCall) Do

Do executes the "chat.spaces.list" call. Exactly one of *ListSpacesResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListSpacesResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*SpacesListCall) Fields

func (c *SpacesListCall) Fields(s ...googleapi.Field) *SpacesListCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*SpacesListCall) Filter added in v0.123.0

func (c *SpacesListCall) Filter(filter string) *SpacesListCall

Filter sets the optional parameter "filter": A query filter. You can filter spaces by the space type (`space_type` (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#spacetype)). To filter by space type, you must specify valid enum value, such as `SPACE` or `GROUP_CHAT` (the `space_type` can't be `SPACE_TYPE_UNSPECIFIED`). To query for multiple space types, use the `OR` operator. For example, the following queries are valid: ``` space_type = "SPACE" spaceType = "GROUP_CHAT" OR spaceType = "DIRECT_MESSAGE" ``` Invalid queries are rejected by the server with an `INVALID_ARGUMENT` error.

func (*SpacesListCall) Header

func (c *SpacesListCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*SpacesListCall) IfNoneMatch

func (c *SpacesListCall) IfNoneMatch(entityTag string) *SpacesListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*SpacesListCall) PageSize

func (c *SpacesListCall) PageSize(pageSize int64) *SpacesListCall

PageSize sets the optional parameter "pageSize": The maximum number of spaces to return. The service might return fewer than this value. If unspecified, at most 100 spaces are returned. The maximum value is 1000. If you use a value more than 1000, it's automatically changed to 1000. Negative values return an `INVALID_ARGUMENT` error.

func (*SpacesListCall) PageToken

func (c *SpacesListCall) PageToken(pageToken string) *SpacesListCall

PageToken sets the optional parameter "pageToken": A page token, received from a previous list spaces call. Provide this parameter to retrieve the subsequent page. When paginating, the filter value should match the call that provided the page token. Passing a different value may lead to unexpected results.

func (*SpacesListCall) Pages

func (c *SpacesListCall) Pages(ctx context.Context, f func(*ListSpacesResponse) error) error

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

type SpacesMembersCreateCall added in v0.123.0

type SpacesMembersCreateCall struct {
	// contains filtered or unexported fields
}

func (*SpacesMembersCreateCall) Context added in v0.123.0

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*SpacesMembersCreateCall) Do added in v0.123.0

Do executes the "chat.spaces.members.create" call. Exactly one of *Membership or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Membership.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*SpacesMembersCreateCall) Fields added in v0.123.0

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*SpacesMembersCreateCall) Header added in v0.123.0

func (c *SpacesMembersCreateCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type SpacesMembersDeleteCall added in v0.123.0

type SpacesMembersDeleteCall struct {
	// contains filtered or unexported fields
}

func (*SpacesMembersDeleteCall) Context added in v0.123.0

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*SpacesMembersDeleteCall) Do added in v0.123.0

Do executes the "chat.spaces.members.delete" call. Exactly one of *Membership or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Membership.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*SpacesMembersDeleteCall) Fields added in v0.123.0

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*SpacesMembersDeleteCall) Header added in v0.123.0

func (c *SpacesMembersDeleteCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type SpacesMembersGetCall

type SpacesMembersGetCall struct {
	// contains filtered or unexported fields
}

func (*SpacesMembersGetCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*SpacesMembersGetCall) Do

Do executes the "chat.spaces.members.get" call. Exactly one of *Membership or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Membership.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*SpacesMembersGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*SpacesMembersGetCall) Header

func (c *SpacesMembersGetCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*SpacesMembersGetCall) IfNoneMatch

func (c *SpacesMembersGetCall) IfNoneMatch(entityTag string) *SpacesMembersGetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type SpacesMembersListCall

type SpacesMembersListCall struct {
	// contains filtered or unexported fields
}

func (*SpacesMembersListCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*SpacesMembersListCall) Do

Do executes the "chat.spaces.members.list" call. Exactly one of *ListMembershipsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListMembershipsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*SpacesMembersListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*SpacesMembersListCall) Filter added in v0.123.0

Filter sets the optional parameter "filter": A query filter. You can filter memberships by a member's role (`role` (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.members#membershiprole)) and type (`member.type` (https://developers.google.com/workspace/chat/api/reference/rest/v1/User#type)). To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`. To filter by type, set `member.type` to `HUMAN` or `BOT`. To filter by both role and type, use the `AND` operator. To filter by either role or type, use the `OR` operator. For example, the following queries are valid: ``` role = "ROLE_MANAGER" OR role = "ROLE_MEMBER" member.type = "HUMAN" AND role = "ROLE_MANAGER" ``` The following queries are invalid: ``` member.type = "HUMAN" AND member.type = "BOT" role = "ROLE_MANAGER" AND role = "ROLE_MEMBER" ``` Invalid queries are rejected by the server with an `INVALID_ARGUMENT` error.

func (*SpacesMembersListCall) Header

func (c *SpacesMembersListCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*SpacesMembersListCall) IfNoneMatch

func (c *SpacesMembersListCall) IfNoneMatch(entityTag string) *SpacesMembersListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*SpacesMembersListCall) PageSize

func (c *SpacesMembersListCall) PageSize(pageSize int64) *SpacesMembersListCall

PageSize sets the optional parameter "pageSize": The maximum number of memberships to return. The service might return fewer than this value. If unspecified, at most 100 memberships are returned. The maximum value is 1000. If you use a value more than 1000, it's automatically changed to 1000. Negative values return an `INVALID_ARGUMENT` error.

func (*SpacesMembersListCall) PageToken

func (c *SpacesMembersListCall) PageToken(pageToken string) *SpacesMembersListCall

PageToken sets the optional parameter "pageToken": A page token, received from a previous call to list memberships. Provide this parameter to retrieve the subsequent page. When paginating, all other parameters provided should match the call that provided the page token. Passing different values to the other parameters might lead to unexpected results.

func (*SpacesMembersListCall) Pages

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

func (*SpacesMembersListCall) ShowGroups added in v0.153.0

func (c *SpacesMembersListCall) ShowGroups(showGroups bool) *SpacesMembersListCall

ShowGroups sets the optional parameter "showGroups": When `true`, also returns memberships associated with a Google Group, in addition to other types of memberships. If a filter is set, Google Group memberships that don't match the filter criteria aren't returned.

func (*SpacesMembersListCall) ShowInvited added in v0.123.0

func (c *SpacesMembersListCall) ShowInvited(showInvited bool) *SpacesMembersListCall

ShowInvited sets the optional parameter "showInvited": When `true`, also returns memberships associated with invited members, in addition to other types of memberships. If a filter is set, invited memberships that don't match the filter criteria aren't returned. Currently requires user authentication (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).

type SpacesMembersService

type SpacesMembersService struct {
	// contains filtered or unexported fields
}

func NewSpacesMembersService

func NewSpacesMembersService(s *Service) *SpacesMembersService

func (*SpacesMembersService) Create added in v0.123.0

func (r *SpacesMembersService) Create(parent string, membership *Membership) *SpacesMembersCreateCall

Create: Creates a human membership or app membership for the calling app. Creating memberships for other apps isn't supported. For an example, see Invite or add a user or a Google Chat app to a space (https://developers.google.com/workspace/chat/create-members). When creating a membership, if the specified member has their auto-accept policy turned off, then they're invited, and must accept the space invitation before joining. Otherwise, creating a membership adds the member directly to the specified space. Requires user authentication (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). To specify the member to add, set the `membership.member.name` in the `CreateMembershipRequest`: - To add the calling app to a space or a direct message between two human users, use `users/app`. Unable to add other apps to the space. - To add a human user, use `users/{user}`, where `{user}` can be the email address for the user. For users in the same Workspace organization `{user}` can also be the `id` for the person from the People API, or the `id` for the user in the Directory API. For example, if the People API Person profile ID for `user@example.com` is `123456789`, you can add the user to the space by setting the `membership.member.name` to `users/user@example.com` or `users/123456789`.

  • parent: The resource name of the space for which to create the membership. Format: spaces/{space}.

func (*SpacesMembersService) Delete added in v0.123.0

Delete: Deletes a membership. For an example, see Remove a user or a Google Chat app from a space (https://developers.google.com/workspace/chat/delete-members). Requires user authentication (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).

  • name: Resource name of the membership to delete. Chat apps can delete human users' or their own memberships. Chat apps can't delete other apps' memberships. When deleting a human membership, requires the `chat.memberships` scope and `spaces/{space}/members/{member}` format. You can use the email as an alias for `{member}`. For example, `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the email of the Google Chat user. When deleting an app membership, requires the `chat.memberships.app` scope and `spaces/{space}/members/app` format. Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app`.

func (*SpacesMembersService) Get

Get: Returns details about a membership. For an example, see Get details about a user's or Google Chat app's membership (https://developers.google.com/workspace/chat/get-members). Requires authentication (https://developers.google.com/workspace/chat/authenticate-authorize). Supports app authentication (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) and user authentication (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).

  • name: Resource name of the membership to retrieve. To get the app's own membership, you can optionally use `spaces/{space}/members/app`. Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app` When authenticated as a user (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), you can use the user's email as an alias for `{member}`. For example, `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the email of the Google Chat user.

func (*SpacesMembersService) List

List: Lists memberships in a space. For an example, see List users and Google Chat apps in a space (https://developers.google.com/workspace/chat/list-members). Listing memberships with app authentication (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) lists memberships in spaces that the Chat app has access to, but excludes Chat app memberships, including its own. Listing memberships with User authentication (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) lists memberships in spaces that the authenticated user has access to. Requires authentication (https://developers.google.com/workspace/chat/authenticate-authorize). Supports app authentication (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) and user authentication (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).

  • parent: The resource name of the space for which to fetch a membership list. Format: spaces/{space}.

type SpacesMessagesAttachmentsGetCall added in v0.30.0

type SpacesMessagesAttachmentsGetCall struct {
	// contains filtered or unexported fields
}

func (*SpacesMessagesAttachmentsGetCall) Context added in v0.30.0

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*SpacesMessagesAttachmentsGetCall) Do added in v0.30.0

Do executes the "chat.spaces.messages.attachments.get" call. Exactly one of *Attachment or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Attachment.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*SpacesMessagesAttachmentsGetCall) Fields added in v0.30.0

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*SpacesMessagesAttachmentsGetCall) Header added in v0.30.0

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*SpacesMessagesAttachmentsGetCall) IfNoneMatch added in v0.30.0

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type SpacesMessagesAttachmentsService added in v0.30.0

type SpacesMessagesAttachmentsService struct {
	// contains filtered or unexported fields
}

func NewSpacesMessagesAttachmentsService added in v0.30.0

func NewSpacesMessagesAttachmentsService(s *Service) *SpacesMessagesAttachmentsService

func (*SpacesMessagesAttachmentsService) Get added in v0.30.0

Get: Gets the metadata of a message attachment. The attachment data is fetched using the media API (https://developers.google.com/workspace/chat/api/reference/rest/v1/media/download). For an example, see Get metadata about a message attachment (https://developers.google.com/workspace/chat/get-media-attachments). Requires app authentication (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).

  • name: Resource name of the attachment, in the form `spaces/*/messages/*/attachments/*`.

type SpacesMessagesCreateCall

type SpacesMessagesCreateCall struct {
	// contains filtered or unexported fields
}

func (*SpacesMessagesCreateCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*SpacesMessagesCreateCall) Do

Do executes the "chat.spaces.messages.create" call. Exactly one of *Message or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Message.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*SpacesMessagesCreateCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*SpacesMessagesCreateCall) Header

func (c *SpacesMessagesCreateCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*SpacesMessagesCreateCall) MessageId added in v0.100.0

func (c *SpacesMessagesCreateCall) MessageId(messageId string) *SpacesMessagesCreateCall

MessageId sets the optional parameter "messageId": A custom ID for a message. Lets Chat apps get, update, or delete a message without needing to store the system-assigned ID in the message's resource name (represented in the message `name` field). The value for this field must meet the following requirements: * Begins with `client-`. For example, `client-custom-name` is a valid custom ID, but `custom-name` is not. * Contains up to 63 characters and only lowercase letters, numbers, and hyphens. * Is unique within a space. A Chat app can't use the same custom ID for different messages. For details, see Name a message (https://developers.google.com/workspace/chat/create-messages#name_a_created_message).

func (*SpacesMessagesCreateCall) MessageReplyOption added in v0.101.0

func (c *SpacesMessagesCreateCall) MessageReplyOption(messageReplyOption string) *SpacesMessagesCreateCall

MessageReplyOption sets the optional parameter "messageReplyOption": Specifies whether a message starts a thread or replies to one. Only supported in named spaces.

Possible values:

"MESSAGE_REPLY_OPTION_UNSPECIFIED" - Default. Starts a new thread.

Using this option ignores any thread ID or `thread_key` that's included.

"REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD" - Creates the message as a

reply to the thread specified by thread ID or `thread_key`. If it fails, the message starts a new thread instead.

"REPLY_MESSAGE_OR_FAIL" - Creates the message as a reply to the

thread specified by thread ID or `thread_key`. If a new `thread_key` is used, a new thread is created. If the message creation fails, a `NOT_FOUND` error is returned instead.

func (*SpacesMessagesCreateCall) RequestId added in v0.60.0

func (c *SpacesMessagesCreateCall) RequestId(requestId string) *SpacesMessagesCreateCall

RequestId sets the optional parameter "requestId": A unique request ID for this message. Specifying an existing request ID returns the message created with that ID instead of creating a new message.

func (*SpacesMessagesCreateCall) ThreadKey

func (c *SpacesMessagesCreateCall) ThreadKey(threadKey string) *SpacesMessagesCreateCall

ThreadKey sets the optional parameter "threadKey": Deprecated: Use thread.thread_key instead. ID for the thread. Supports up to 4000 characters. To start or add to a thread, create a message and specify a `threadKey` or the thread.name. For example usage, see Start or reply to a message thread (https://developers.google.com/workspace/chat/create-messages#create-message-thread).

type SpacesMessagesDeleteCall

type SpacesMessagesDeleteCall struct {
	// contains filtered or unexported fields
}

func (*SpacesMessagesDeleteCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*SpacesMessagesDeleteCall) Do

Do executes the "chat.spaces.messages.delete" call. Exactly one of *Empty or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Empty.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*SpacesMessagesDeleteCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*SpacesMessagesDeleteCall) Force added in v0.123.0

Force sets the optional parameter "force": When `true`, deleting a message also deletes its threaded replies. When `false`, if a message has threaded replies, deletion fails. Only applies when authenticating as a user (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). Has no effect when [authenticating as a Chat app] (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).

func (*SpacesMessagesDeleteCall) Header

func (c *SpacesMessagesDeleteCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type SpacesMessagesGetCall

type SpacesMessagesGetCall struct {
	// contains filtered or unexported fields
}

func (*SpacesMessagesGetCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*SpacesMessagesGetCall) Do

Do executes the "chat.spaces.messages.get" call. Exactly one of *Message or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Message.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*SpacesMessagesGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*SpacesMessagesGetCall) Header

func (c *SpacesMessagesGetCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*SpacesMessagesGetCall) IfNoneMatch

func (c *SpacesMessagesGetCall) IfNoneMatch(entityTag string) *SpacesMessagesGetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type SpacesMessagesListCall added in v0.123.0

type SpacesMessagesListCall struct {
	// contains filtered or unexported fields
}

func (*SpacesMessagesListCall) Context added in v0.123.0

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*SpacesMessagesListCall) Do added in v0.123.0

Do executes the "chat.spaces.messages.list" call. Exactly one of *ListMessagesResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListMessagesResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*SpacesMessagesListCall) Fields added in v0.123.0

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*SpacesMessagesListCall) Filter added in v0.123.0

Filter sets the optional parameter "filter": A query filter. You can filter messages by date (`create_time`) and thread (`thread.name`). To filter messages by the date they were created, specify the `create_time` with a timestamp in RFC-3339 (https://www.rfc-editor.org/rfc/rfc3339) format and double quotation marks. For example, "2023-04-21T11:30:00-04:00". You can use the greater than operator `>` to list messages that were created after a timestamp, or the less than operator `<` to list messages that were created before a timestamp. To filter messages within a time interval, use the `AND` operator between two timestamps. To filter by thread, specify the `thread.name`, formatted as `spaces/{space}/threads/{thread}`. You can only specify one `thread.name` per query. To filter by both thread and date, use the `AND` operator in your query. For example, the following queries are valid: ``` create_time > "2012-04-21T11:30:00-04:00" create_time > "2012-04-21T11:30:00-04:00" AND thread.name = spaces/AAAAAAAAAAA/threads/123 create_time > "2012-04-21T11:30:00+00:00" AND create_time < "2013-01-01T00:00:00+00:00" AND thread.name = spaces/AAAAAAAAAAA/threads/123 thread.name = spaces/AAAAAAAAAAA/threads/123 ``` Invalid queries are rejected by the server with an `INVALID_ARGUMENT` error.

func (*SpacesMessagesListCall) Header added in v0.123.0

func (c *SpacesMessagesListCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*SpacesMessagesListCall) IfNoneMatch added in v0.123.0

func (c *SpacesMessagesListCall) IfNoneMatch(entityTag string) *SpacesMessagesListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*SpacesMessagesListCall) OrderBy added in v0.123.0

OrderBy sets the optional parameter "orderBy": Optional, if resuming from a previous query. How the list of messages is ordered. Specify a value to order by an ordering operation. Valid ordering operation values are as follows: - `ASC` for ascending. - `DESC` for descending. The default ordering is `create_time ASC`.

func (*SpacesMessagesListCall) PageSize added in v0.123.0

func (c *SpacesMessagesListCall) PageSize(pageSize int64) *SpacesMessagesListCall

PageSize sets the optional parameter "pageSize": The maximum number of messages returned. The service might return fewer messages than this value. If unspecified, at most 25 are returned. The maximum value is 1000. If you use a value more than 1000, it's automatically changed to 1000. Negative values return an `INVALID_ARGUMENT` error.

func (*SpacesMessagesListCall) PageToken added in v0.123.0

func (c *SpacesMessagesListCall) PageToken(pageToken string) *SpacesMessagesListCall

PageToken sets the optional parameter "pageToken": Optional, if resuming from a previous query. A page token received from a previous list messages call. Provide this parameter to retrieve the subsequent page. When paginating, all other parameters provided should match the call that provided the page token. Passing different values to the other parameters might lead to unexpected results.

func (*SpacesMessagesListCall) Pages added in v0.123.0

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

func (*SpacesMessagesListCall) ShowDeleted added in v0.123.0

func (c *SpacesMessagesListCall) ShowDeleted(showDeleted bool) *SpacesMessagesListCall

ShowDeleted sets the optional parameter "showDeleted": Whether to include deleted messages. Deleted messages include deleted time and metadata about their deletion, but message content is unavailable.

type SpacesMessagesPatchCall added in v0.104.0

type SpacesMessagesPatchCall struct {
	// contains filtered or unexported fields
}

func (*SpacesMessagesPatchCall) AllowMissing added in v0.104.0

func (c *SpacesMessagesPatchCall) AllowMissing(allowMissing bool) *SpacesMessagesPatchCall

AllowMissing sets the optional parameter "allowMissing": If `true` and the message isn't found, a new message is created and `updateMask` is ignored. The specified message ID must be client-assigned (https://developers.google.com/workspace/chat/create-messages#name_a_created_message) or the request fails.

func (*SpacesMessagesPatchCall) Context added in v0.104.0

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*SpacesMessagesPatchCall) Do added in v0.104.0

Do executes the "chat.spaces.messages.patch" call. Exactly one of *Message or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Message.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*SpacesMessagesPatchCall) Fields added in v0.104.0

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*SpacesMessagesPatchCall) Header added in v0.104.0

func (c *SpacesMessagesPatchCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*SpacesMessagesPatchCall) UpdateMask added in v0.104.0

func (c *SpacesMessagesPatchCall) UpdateMask(updateMask string) *SpacesMessagesPatchCall

UpdateMask sets the optional parameter "updateMask": Required. The field paths to update. Separate multiple values with commas or use `*` to update all field paths. Currently supported field paths: - `text` - `attachment` - `cards` (Requires app authentication (/chat/api/guides/auth/service-accounts).) - `cards_v2` (Requires app authentication (/chat/api/guides/auth/service-accounts).) - `accessory_widgets` (Requires app authentication (/chat/api/guides/auth/service-accounts).)

type SpacesMessagesReactionsCreateCall added in v0.123.0

type SpacesMessagesReactionsCreateCall struct {
	// contains filtered or unexported fields
}

func (*SpacesMessagesReactionsCreateCall) Context added in v0.123.0

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*SpacesMessagesReactionsCreateCall) Do added in v0.123.0

Do executes the "chat.spaces.messages.reactions.create" call. Exactly one of *Reaction or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Reaction.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*SpacesMessagesReactionsCreateCall) Fields added in v0.123.0

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*SpacesMessagesReactionsCreateCall) Header added in v0.123.0

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type SpacesMessagesReactionsDeleteCall added in v0.123.0

type SpacesMessagesReactionsDeleteCall struct {
	// contains filtered or unexported fields
}

func (*SpacesMessagesReactionsDeleteCall) Context added in v0.123.0

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*SpacesMessagesReactionsDeleteCall) Do added in v0.123.0

Do executes the "chat.spaces.messages.reactions.delete" call. Exactly one of *Empty or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Empty.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*SpacesMessagesReactionsDeleteCall) Fields added in v0.123.0

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*SpacesMessagesReactionsDeleteCall) Header added in v0.123.0

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type SpacesMessagesReactionsListCall added in v0.123.0

type SpacesMessagesReactionsListCall struct {
	// contains filtered or unexported fields
}

func (*SpacesMessagesReactionsListCall) Context added in v0.123.0

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*SpacesMessagesReactionsListCall) Do added in v0.123.0

Do executes the "chat.spaces.messages.reactions.list" call. Exactly one of *ListReactionsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListReactionsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*SpacesMessagesReactionsListCall) Fields added in v0.123.0

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*SpacesMessagesReactionsListCall) Filter added in v0.123.0

Filter sets the optional parameter "filter": A query filter. You can filter reactions by emoji (https://developers.google.com/workspace/chat/api/reference/rest/v1/Emoji) (either `emoji.unicode` or `emoji.custom_emoji.uid`) and user (https://developers.google.com/workspace/chat/api/reference/rest/v1/User) (`user.name`). To filter reactions for multiple emojis or users, join similar fields with the `OR` operator, such as `emoji.unicode = "🙂" OR emoji.unicode = "👍" and `user.name = "users/AAAAAA" OR user.name = "users/BBBBBB". To filter reactions by emoji and user, use the `AND` operator, such as `emoji.unicode = "🙂" AND user.name = "users/AAAAAA". If your query uses both `AND` and `OR`, group them with parentheses. For example, the following queries are valid: ``` user.name = "users/{user}" emoji.unicode = "🙂" emoji.custom_emoji.uid = "{uid}" emoji.unicode = "🙂" OR emoji.unicode = "👍" emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" emoji.unicode = "🙂" AND user.name = "users/{user}" (emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}") AND user.name = "users/{user}" ``` The following queries are invalid: ``` emoji.unicode = "🙂" AND emoji.unicode = "👍" emoji.unicode = "🙂" AND emoji.custom_emoji.uid = "{uid}" emoji.unicode = "🙂" OR user.name = "users/{user}" emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" OR user.name = "users/{user}" emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" AND user.name = "users/{user}" ``` Invalid queries are rejected by the server with an `INVALID_ARGUMENT` error.

func (*SpacesMessagesReactionsListCall) Header added in v0.123.0

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*SpacesMessagesReactionsListCall) IfNoneMatch added in v0.123.0

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*SpacesMessagesReactionsListCall) PageSize added in v0.123.0

PageSize sets the optional parameter "pageSize": The maximum number of reactions returned. The service can return fewer reactions than this value. If unspecified, the default value is 25. The maximum value is 200; values above 200 are changed to 200.

func (*SpacesMessagesReactionsListCall) PageToken added in v0.123.0

PageToken sets the optional parameter "pageToken": (If resuming from a previous query.) A page token received from a previous list reactions call. Provide this to retrieve the subsequent page. When paginating, the filter value should match the call that provided the page token. Passing a different value might lead to unexpected results.

func (*SpacesMessagesReactionsListCall) Pages added in v0.123.0

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

type SpacesMessagesReactionsService added in v0.123.0

type SpacesMessagesReactionsService struct {
	// contains filtered or unexported fields
}

func NewSpacesMessagesReactionsService added in v0.123.0

func NewSpacesMessagesReactionsService(s *Service) *SpacesMessagesReactionsService

func (*SpacesMessagesReactionsService) Create added in v0.123.0

Create: Creates a reaction and adds it to a message. Only unicode emojis are supported. For an example, see Add a reaction to a message (https://developers.google.com/workspace/chat/create-reactions). Requires user authentication (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).

  • parent: The message where the reaction is created. Format: `spaces/{space}/messages/{message}`.

func (*SpacesMessagesReactionsService) Delete added in v0.123.0

Delete: Deletes a reaction to a message. Only unicode emojis are supported. For an example, see Delete a reaction (https://developers.google.com/workspace/chat/delete-reactions). Requires user authentication (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).

  • name: Name of the reaction to delete. Format: `spaces/{space}/messages/{message}/reactions/{reaction}`.

func (*SpacesMessagesReactionsService) List added in v0.123.0

List: Lists reactions to a message. For an example, see List reactions for a message (https://developers.google.com/workspace/chat/list-reactions). Requires user authentication (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).

  • parent: The message users reacted to. Format: `spaces/{space}/messages/{message}`.

type SpacesMessagesService

type SpacesMessagesService struct {
	Attachments *SpacesMessagesAttachmentsService

	Reactions *SpacesMessagesReactionsService
	// contains filtered or unexported fields
}

func NewSpacesMessagesService

func NewSpacesMessagesService(s *Service) *SpacesMessagesService

func (*SpacesMessagesService) Create

func (r *SpacesMessagesService) Create(parent string, message *Message) *SpacesMessagesCreateCall

Create: Creates a message in a Google Chat space. For an example, see Send a message (https://developers.google.com/workspace/chat/create-messages). Calling this method requires authentication (https://developers.google.com/workspace/chat/authenticate-authorize) and supports the following authentication types: - For text messages, user authentication or app authentication are supported. - For card messages, only app authentication is supported. (Only Chat apps can create card messages.)

  • parent: The resource name of the space in which to create a message. Format: `spaces/{space}`.

func (*SpacesMessagesService) Delete

Delete: Deletes a message. For an example, see Delete a message (https://developers.google.com/workspace/chat/delete-messages). Requires authentication (https://developers.google.com/workspace/chat/authenticate-authorize). Supports app authentication (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) and user authentication (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). When using app authentication, requests can only delete messages created by the calling Chat app.

func (*SpacesMessagesService) Get

Get: Returns details about a message. For an example, see Get details about a message (https://developers.google.com/workspace/chat/get-messages). Requires authentication (https://developers.google.com/workspace/chat/authenticate-authorize). Supports app authentication (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) and user authentication (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). Note: Might return a message from a blocked member or space.

func (*SpacesMessagesService) List added in v0.123.0

List: Lists messages in a space that the caller is a member of, including messages from blocked members and spaces. For an example, see List messages (/chat/api/guides/v1/messages/list). Requires user authentication (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).

  • parent: The resource name of the space to list messages from. Format: `spaces/{space}`.

func (*SpacesMessagesService) Patch added in v0.104.0

func (r *SpacesMessagesService) Patch(name string, message *Message) *SpacesMessagesPatchCall

Patch: Updates a message. There's a difference between the `patch` and `update` methods. The `patch` method uses a `patch` request while the `update` method uses a `put` request. We recommend using the `patch` method. For an example, see Update a message (https://developers.google.com/workspace/chat/update-messages). Requires authentication (https://developers.google.com/workspace/chat/authenticate-authorize). Supports app authentication (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) and user authentication (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). When using app authentication, requests can only update messages created by the calling Chat app.

  • name: Resource name of the message. Format: `spaces/{space}/messages/{message}` Where `{space}` is the ID of the space where the message is posted and `{message}` is a system-assigned ID for the message. For example, `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB`. If you set a custom ID when you create a message, you can use this ID to specify the message in a request by replacing `{message}` with the value from the `clientAssignedMessageId` field. For example, `spaces/AAAAAAAAAAA/messages/client-custom-name`. For details, see Name a message (https://developers.google.com/workspace/chat/create-messages#name_a_created_message).

func (*SpacesMessagesService) Update

func (r *SpacesMessagesService) Update(name string, message *Message) *SpacesMessagesUpdateCall

Update: Updates a message. There's a difference between the `patch` and `update` methods. The `patch` method uses a `patch` request while the `update` method uses a `put` request. We recommend using the `patch` method. For an example, see Update a message (https://developers.google.com/workspace/chat/update-messages). Requires authentication (https://developers.google.com/workspace/chat/authenticate-authorize). Supports app authentication (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) and user authentication (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). When using app authentication, requests can only update messages created by the calling Chat app.

  • name: Resource name of the message. Format: `spaces/{space}/messages/{message}` Where `{space}` is the ID of the space where the message is posted and `{message}` is a system-assigned ID for the message. For example, `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB`. If you set a custom ID when you create a message, you can use this ID to specify the message in a request by replacing `{message}` with the value from the `clientAssignedMessageId` field. For example, `spaces/AAAAAAAAAAA/messages/client-custom-name`. For details, see Name a message (https://developers.google.com/workspace/chat/create-messages#name_a_created_message).

type SpacesMessagesUpdateCall

type SpacesMessagesUpdateCall struct {
	// contains filtered or unexported fields
}

func (*SpacesMessagesUpdateCall) AllowMissing added in v0.100.0

func (c *SpacesMessagesUpdateCall) AllowMissing(allowMissing bool) *SpacesMessagesUpdateCall

AllowMissing sets the optional parameter "allowMissing": If `true` and the message isn't found, a new message is created and `updateMask` is ignored. The specified message ID must be client-assigned (https://developers.google.com/workspace/chat/create-messages#name_a_created_message) or the request fails.

func (*SpacesMessagesUpdateCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*SpacesMessagesUpdateCall) Do

Do executes the "chat.spaces.messages.update" call. Exactly one of *Message or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Message.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*SpacesMessagesUpdateCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*SpacesMessagesUpdateCall) Header

func (c *SpacesMessagesUpdateCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*SpacesMessagesUpdateCall) UpdateMask

func (c *SpacesMessagesUpdateCall) UpdateMask(updateMask string) *SpacesMessagesUpdateCall

UpdateMask sets the optional parameter "updateMask": Required. The field paths to update. Separate multiple values with commas or use `*` to update all field paths. Currently supported field paths: - `text` - `attachment` - `cards` (Requires app authentication (/chat/api/guides/auth/service-accounts).) - `cards_v2` (Requires app authentication (/chat/api/guides/auth/service-accounts).) - `accessory_widgets` (Requires app authentication (/chat/api/guides/auth/service-accounts).)

type SpacesPatchCall added in v0.123.0

type SpacesPatchCall struct {
	// contains filtered or unexported fields
}

func (*SpacesPatchCall) Context added in v0.123.0

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*SpacesPatchCall) Do added in v0.123.0

func (c *SpacesPatchCall) Do(opts ...googleapi.CallOption) (*Space, error)

Do executes the "chat.spaces.patch" call. Exactly one of *Space or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Space.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*SpacesPatchCall) Fields added in v0.123.0

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*SpacesPatchCall) Header added in v0.123.0

func (c *SpacesPatchCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*SpacesPatchCall) UpdateMask added in v0.123.0

func (c *SpacesPatchCall) UpdateMask(updateMask string) *SpacesPatchCall

UpdateMask sets the optional parameter "updateMask": Required. The updated field paths, comma separated if there are multiple. Currently supported field paths: - `display_name` (Only supports changing the display name of a space with the `SPACE` type, or when also including the `space_type` mask to change a `GROUP_CHAT` space type to `SPACE`. Trying to update the display name of a `GROUP_CHAT` or a `DIRECT_MESSAGE` space results in an invalid argument error. If you receive the error message `ALREADY_EXISTS` when updating the `displayName`, try a different `displayName`. An existing space within the Google Workspace organization might already use this display name.) - `space_type` (Only supports changing a `GROUP_CHAT` space type to `SPACE`. Include `display_name` together with `space_type` in the update mask and ensure that the specified space has a non-empty display name and the `SPACE` space type. Including the `space_type` mask and the `SPACE` type in the specified space when updating the display name is optional if the existing space already has the `SPACE` type. Trying to update the space type in other ways results in an invalid argument error). - `space_details` - `space_history_state` (Supports turning history on or off for the space (https://support.google.com/chat/answer/7664687) if the organization allows users to change their history setting (https://support.google.com/a/answer/7664184). Warning: mutually exclusive with all other field paths.) - Developer Preview: `access_settings.audience` (Supports changing the access setting (https://support.google.com/chat/answer/11971020) of a space. If no audience is specified in the access setting, the space's access setting is updated to restricted. Warning: mutually exclusive with all other field paths.)

type SpacesService

type SpacesService struct {
	Members *SpacesMembersService

	Messages *SpacesMessagesService

	SpaceEvents *SpacesSpaceEventsService
	// contains filtered or unexported fields
}

func NewSpacesService

func NewSpacesService(s *Service) *SpacesService

func (*SpacesService) CompleteImport added in v0.156.0

func (r *SpacesService) CompleteImport(name string, completeimportspacerequest *CompleteImportSpaceRequest) *SpacesCompleteImportCall

CompleteImport: Completes the import process (https://developers.google.com/workspace/chat/import-data) for the specified space and makes it visible to users. Requires app authentication and domain-wide delegation. For more information, see Authorize Google Chat apps to import data (https://developers.google.com/workspace/chat/authorize-import).

  • name: Resource name of the import mode space. Format: `spaces/{space}`.

func (*SpacesService) Create added in v0.123.0

func (r *SpacesService) Create(space *Space) *SpacesCreateCall

Create: Creates a named space. Spaces grouped by topics aren't supported. For an example, see Create a space (https://developers.google.com/workspace/chat/create-spaces). If you receive the error message `ALREADY_EXISTS` when creating a space, try a different `displayName`. An existing space within the Google Workspace organization might already use this display name. Requires user authentication (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).

func (*SpacesService) Delete added in v0.123.0

func (r *SpacesService) Delete(name string) *SpacesDeleteCall

Delete: Deletes a named space. Always performs a cascading delete, which means that the space's child resources—like messages posted in the space and memberships in the space—are also deleted. For an example, see Delete a space (https://developers.google.com/workspace/chat/delete-spaces). Requires user authentication (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) from a user who has permission to delete the space.

  • name: Resource name of the space to delete. Format: `spaces/{space}`.

func (*SpacesService) FindDirectMessage added in v0.123.0

func (r *SpacesService) FindDirectMessage() *SpacesFindDirectMessageCall

FindDirectMessage: Returns the existing direct message with the specified user. If no direct message space is found, returns a `404 NOT_FOUND` error. For an example, see Find a direct message (/chat/api/guides/v1/spaces/find-direct-message). With user authentication (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), returns the direct message space between the specified user and the authenticated user. With app authentication (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app), returns the direct message space between the specified user and the calling Chat app. Requires user authentication (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) or app authentication (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).

func (*SpacesService) Get

func (r *SpacesService) Get(name string) *SpacesGetCall

Get: Returns details about a space. For an example, see Get details about a space (https://developers.google.com/workspace/chat/get-spaces). Requires authentication (https://developers.google.com/workspace/chat/authenticate-authorize). Supports app authentication (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) and user authentication (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).

  • name: Resource name of the space, in the form "spaces/*". Format: `spaces/{space}`.

func (*SpacesService) List

func (r *SpacesService) List() *SpacesListCall

List: Lists spaces the caller is a member of. Group chats and DMs aren't listed until the first message is sent. For an example, see List spaces (https://developers.google.com/workspace/chat/list-spaces). Requires authentication (https://developers.google.com/workspace/chat/authenticate-authorize). Supports app authentication (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) and user authentication (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). Lists spaces visible to the caller or authenticated user. Group chats and DMs aren't listed until the first message is sent.

func (*SpacesService) Patch added in v0.123.0

func (r *SpacesService) Patch(name string, space *Space) *SpacesPatchCall

Patch: Updates a space. For an example, see Update a space (https://developers.google.com/workspace/chat/update-spaces). If you're updating the `displayName` field and receive the error message `ALREADY_EXISTS`, try a different display name.. An existing space within the Google Workspace organization might already use this display name. Requires user authentication (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).

- name: Resource name of the space. Format: `spaces/{space}`.

func (*SpacesService) Setup added in v0.123.0

func (r *SpacesService) Setup(setupspacerequest *SetUpSpaceRequest) *SpacesSetupCall

Setup: Creates a space and adds specified users to it. The calling user is automatically added to the space, and shouldn't be specified as a membership in the request. For an example, see Set up a space with initial members (https://developers.google.com/workspace/chat/set-up-spaces). To specify the human members to add, add memberships with the appropriate `member.name` in the `SetUpSpaceRequest`. To add a human user, use `users/{user}`, where `{user}` can be the email address for the user. For users in the same Workspace organization `{user}` can also be the `id` for the person from the People API, or the `id` for the user in the Directory API. For example, if the People API Person profile ID for `user@example.com` is `123456789`, you can add the user to the space by setting the `membership.member.name` to `users/user@example.com` or `users/123456789`. For a space or group chat, if the caller blocks or is blocked by some members, then those members aren't added to the created space. To create a direct message (DM) between the calling user and another human user, specify exactly one membership to represent the human user. If one user blocks the other, the request fails and the DM isn't created. To create a DM between the calling user and the calling app, set `Space.singleUserBotDm` to `true` and don't specify any memberships. You can only use this method to set up a DM with the calling app. To add the calling app as a member of a space or an existing DM between two human users, see Invite or add a user or app to a space (https://developers.google.com/workspace/chat/create-members). If a DM already exists between two users, even when one user blocks the other at the time a request is made, then the existing DM is returned. Spaces with threaded replies aren't supported. If you receive the error message `ALREADY_EXISTS` when setting up a space, try a different `displayName`. An existing space within the Google Workspace organization might already use this display name. Requires user authentication (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).

type SpacesSetupCall added in v0.123.0

type SpacesSetupCall struct {
	// contains filtered or unexported fields
}

func (*SpacesSetupCall) Context added in v0.123.0

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*SpacesSetupCall) Do added in v0.123.0

func (c *SpacesSetupCall) Do(opts ...googleapi.CallOption) (*Space, error)

Do executes the "chat.spaces.setup" call. Exactly one of *Space or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Space.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*SpacesSetupCall) Fields added in v0.123.0

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*SpacesSetupCall) Header added in v0.123.0

func (c *SpacesSetupCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type SpacesSpaceEventsGetCall added in v0.173.0

type SpacesSpaceEventsGetCall struct {
	// contains filtered or unexported fields
}

func (*SpacesSpaceEventsGetCall) Context added in v0.173.0

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*SpacesSpaceEventsGetCall) Do added in v0.173.0

Do executes the "chat.spaces.spaceEvents.get" call. Exactly one of *SpaceEvent or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *SpaceEvent.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*SpacesSpaceEventsGetCall) Fields added in v0.173.0

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*SpacesSpaceEventsGetCall) Header added in v0.173.0

func (c *SpacesSpaceEventsGetCall) Header() http.Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*SpacesSpaceEventsGetCall) IfNoneMatch added in v0.173.0

func (c *SpacesSpaceEventsGetCall) IfNoneMatch(entityTag string) *SpacesSpaceEventsGetCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type SpacesSpaceEventsListCall added in v0.173.0

type SpacesSpaceEventsListCall struct {
	// contains filtered or unexported fields
}

func (*SpacesSpaceEventsListCall) Context added in v0.173.0

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*SpacesSpaceEventsListCall) Do added in v0.173.0

Do executes the "chat.spaces.spaceEvents.list" call. Exactly one of *ListSpaceEventsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListSpaceEventsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*SpacesSpaceEventsListCall) Fields added in v0.173.0

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*SpacesSpaceEventsListCall) Filter added in v0.173.0

Filter sets the optional parameter "filter": Required. A query filter. You must specify at least one event type (`event_type`) using the has `:` operator. To filter by multiple event types, use the `OR` operator. Omit batch event types in your filter. The request automatically returns any related batch events. For example, if you filter by new reactions (`google.workspace.chat.reaction.v1.created`), the server also returns batch new reactions events (`google.workspace.chat.reaction.v1.batchCreated`). For a list of supported event types, see the `SpaceEvents` reference documentation (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.event_type). Optionally, you can also filter by start time (`start_time`) and end time (`end_time`): * `start_time`: Exclusive timestamp from which to start listing space events. You can list events that occurred up to 28 days ago. If unspecified, lists space events from the past 28 days. * `end_time`: Inclusive timestamp until which space events are listed. If unspecified, lists events up to the time of the request. To specify a start or end time, use the equals `=` operator and format in RFC-3339 (https://www.rfc-editor.org/rfc/rfc3339). To filter by both `start_time` and `end_time`, use the `AND` operator. For example, the following queries are valid: ``` start_time="2023-08-23T19:20:33+00:00" AND end_time="2023-08-23T19:21:54+00:00" ``` ``` start_time="2023-08-23T19:20:33+00:00" AND (event_types:"google.workspace.chat.space.v1.updated" OR event_types:"google.workspace.chat.message.v1.created") ``` The following queries are invalid: ``` start_time="2023-08-23T19:20:33+00:00" OR end_time="2023-08-23T19:21:54+00:00" ``` ``` event_types:"google.workspace.chat.space.v1.updated" AND event_types:"google.workspace.chat.message.v1.created" ``` Invalid queries are rejected by the server with an `INVALID_ARGUMENT` error.

func (*SpacesSpaceEventsListCall) Header added in v0.173.0

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*SpacesSpaceEventsListCall) IfNoneMatch added in v0.173.0

func (c *SpacesSpaceEventsListCall) IfNoneMatch(entityTag string) *SpacesSpaceEventsListCall

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*SpacesSpaceEventsListCall) PageSize added in v0.173.0

PageSize sets the optional parameter "pageSize": The maximum number of space events returned. The service might return fewer than this value. Negative values return an `INVALID_ARGUMENT` error.

func (*SpacesSpaceEventsListCall) PageToken added in v0.173.0

PageToken sets the optional parameter "pageToken": A page token, received from a previous list space events call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to list space events must match the call that provided the page token. Passing different values to the other parameters might lead to unexpected results.

func (*SpacesSpaceEventsListCall) Pages added in v0.173.0

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

type SpacesSpaceEventsService added in v0.173.0

type SpacesSpaceEventsService struct {
	// contains filtered or unexported fields
}

func NewSpacesSpaceEventsService added in v0.173.0

func NewSpacesSpaceEventsService(s *Service) *SpacesSpaceEventsService

func (*SpacesSpaceEventsService) Get added in v0.173.0

Get: Returns an event from a Google Chat space. The event payload (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.oneof_payload) contains the most recent version of the resource that changed. For example, if you request an event about a new message but the message was later updated, the server returns the updated `Message` resource in the event payload. Requires user authentication (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). To get an event, the authenticated user must be a member of the space. For an example, see Get details about an event from a Google Chat space (https://developers.google.com/workspace/chat/get-space-event).

  • name: The resource name of the space event. Format: `spaces/{space}/spaceEvents/{spaceEvent}`.

func (*SpacesSpaceEventsService) List added in v0.173.0

List: Lists events from a Google Chat space. For each event, the payload (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.oneof_payload) contains the most recent version of the Chat resource. For example, if you list events about new space members, the server returns `Membership` resources that contain the latest membership details. If new members were removed during the requested period, the event payload contains an empty `Membership` resource. Requires user authentication (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). To list events, the authenticated user must be a member of the space. For an example, see List events from a Google Chat space (https://developers.google.com/workspace/chat/list-space-events).

type Status added in v0.61.0

type Status struct {
	// Code: The status code, which should be an enum value of
	// google.rpc.Code.
	Code int64 `json:"code,omitempty"`

	// Details: A list of messages that carry the error details. There is a
	// common set of message types for APIs to use.
	Details []googleapi.RawMessage `json:"details,omitempty"`

	// Message: A developer-facing error message, which should be in
	// English. Any user-facing error message should be localized and sent
	// in the google.rpc.Status.details field, or localized by the client.
	Message string `json:"message,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Code") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Code") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

Status: The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the API Design Guide (https://cloud.google.com/apis/design/errors).

func (*Status) MarshalJSON added in v0.61.0

func (s *Status) MarshalJSON() ([]byte, error)

type StringInputs added in v0.55.0

type StringInputs struct {
	// Value: An list of strings entered by the user.
	Value []string `json:"value,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Value") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Value") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

StringInputs: Input parameter for regular widgets. For single-valued widgets, it is a single value list. For multi-valued widgets, such as checkbox, all the values are presented.

func (*StringInputs) MarshalJSON added in v0.55.0

func (s *StringInputs) MarshalJSON() ([]byte, error)

type TextButton

type TextButton struct {
	// OnClick: The `onclick` action of the button.
	OnClick *OnClick `json:"onClick,omitempty"`

	// Text: The text of the button.
	Text string `json:"text,omitempty"`

	// ForceSendFields is a list of field names (e.g. "OnClick") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "OnClick") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

TextButton: A button with text and `onclick` action.

func (*TextButton) MarshalJSON

func (s *TextButton) MarshalJSON() ([]byte, error)

type TextParagraph

type TextParagraph struct {
	Text string `json:"text,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Text") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Text") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

TextParagraph: A paragraph of text. Formatted text supported. For more information about formatting text, see Formatting text in Google Chat apps (https://developers.google.com/workspace/chat/format-messages#card-formatting) and Formatting text in Google Workspace Add-ons (https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).

func (*TextParagraph) MarshalJSON

func (s *TextParagraph) MarshalJSON() ([]byte, error)

type Thread

type Thread struct {
	// Name: Output only. Resource name of the thread. Example:
	// `spaces/{space}/threads/{thread}`
	Name string `json:"name,omitempty"`

	// ThreadKey: Optional. Input for creating or updating a thread.
	// Otherwise, output only. ID for the thread. Supports up to 4000
	// characters. This ID is unique to the Chat app that sets it. For
	// example, if multiple Chat apps create a message using the same thread
	// key, the messages are posted in different threads. To reply in a
	// thread created by a person or another Chat app, specify the thread
	// `name` field instead.
	ThreadKey string `json:"threadKey,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Name") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Name") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

Thread: A thread in a Google Chat space. For example usage, see Start or reply to a message thread (https://developers.google.com/workspace/chat/create-messages#create-message-thread). If you specify a thread when creating a message, you can set the `messageReplyOption` (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/create#messagereplyoption) field to determine what happens if no matching thread is found.

func (*Thread) MarshalJSON

func (s *Thread) MarshalJSON() ([]byte, error)

type TimeInput added in v0.55.0

type TimeInput struct {
	// Hours: The hour on a 24-hour clock.
	Hours int64 `json:"hours,omitempty"`

	// Minutes: The number of minutes past the hour. Valid values are 0 to
	// 59.
	Minutes int64 `json:"minutes,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Hours") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Hours") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

TimeInput: Time input values.

func (*TimeInput) MarshalJSON added in v0.55.0

func (s *TimeInput) MarshalJSON() ([]byte, error)

type TimeZone added in v0.55.0

type TimeZone struct {
	// Id: The IANA TZ (https://www.iana.org/time-zones) time zone database
	// code, such as "America/Toronto".
	Id string `json:"id,omitempty"`

	// Offset: The user timezone offset, in milliseconds, from Coordinated
	// Universal Time (UTC).
	Offset int64 `json:"offset,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Id") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Id") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

TimeZone: The timezone ID and offset from Coordinated Universal Time (UTC). Only supported for the event types `CARD_CLICKED` (https://developers.google.com/chat/api/reference/rest/v1/EventType#ENUM_VALUES.CARD_CLICKED) and `SUBMIT_DIALOG` (https://developers.google.com/chat/api/reference/rest/v1/DialogEventType#ENUM_VALUES.SUBMIT_DIALOG).

func (*TimeZone) MarshalJSON added in v0.55.0

func (s *TimeZone) MarshalJSON() ([]byte, error)

type UpdatedWidget added in v0.153.0

type UpdatedWidget struct {
	// Suggestions: List of widget autocomplete results
	Suggestions *SelectionItems `json:"suggestions,omitempty"`

	// Widget: The ID of the updated widget. The ID must match the one for
	// the widget that triggered the update request.
	Widget string `json:"widget,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Suggestions") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Suggestions") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

UpdatedWidget: The response of the updated widget. Used to provide autocomplete options for a widget.

func (*UpdatedWidget) MarshalJSON added in v0.153.0

func (s *UpdatedWidget) MarshalJSON() ([]byte, error)

type UploadAttachmentRequest added in v0.123.0

type UploadAttachmentRequest struct {
	// Filename: Required. The filename of the attachment, including the
	// file extension.
	Filename string `json:"filename,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Filename") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Filename") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

UploadAttachmentRequest: Request to upload an attachment.

func (*UploadAttachmentRequest) MarshalJSON added in v0.123.0

func (s *UploadAttachmentRequest) MarshalJSON() ([]byte, error)

type UploadAttachmentResponse added in v0.123.0

type UploadAttachmentResponse struct {
	// AttachmentDataRef: Reference to the uploaded attachment.
	AttachmentDataRef *AttachmentDataRef `json:"attachmentDataRef,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "AttachmentDataRef")
	// to unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "AttachmentDataRef") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

UploadAttachmentResponse: Response of uploading an attachment.

func (*UploadAttachmentResponse) MarshalJSON added in v0.123.0

func (s *UploadAttachmentResponse) MarshalJSON() ([]byte, error)

type User

type User struct {
	// DisplayName: Output only. The user's display name.
	DisplayName string `json:"displayName,omitempty"`

	// DomainId: Unique identifier of the user's Google Workspace domain.
	DomainId string `json:"domainId,omitempty"`

	// IsAnonymous: Output only. When `true`, the user is deleted or their
	// profile is not visible.
	IsAnonymous bool `json:"isAnonymous,omitempty"`

	// Name: Resource name for a Google Chat user. Format: `users/{user}`.
	// `users/app` can be used as an alias for the calling app bot user. For
	// human users, `{user}` is the same user identifier as: - the `id` for
	// the Person (https://developers.google.com/people/api/rest/v1/people)
	// in the People API. For example, `users/123456789` in Chat API
	// represents the same person as the `123456789` Person profile ID in
	// People API. - the `id` for a user
	// (https://developers.google.com/admin-sdk/directory/reference/rest/v1/users)
	// in the Admin SDK Directory API. - the user's email address can be
	// used as an alias for `{user}` in API requests. For example, if the
	// People API Person profile ID for `user@example.com` is `123456789`,
	// you can use `users/user@example.com` as an alias to reference
	// `users/123456789`. Only the canonical resource name (for example
	// `users/123456789`) will be returned from the API.
	Name string `json:"name,omitempty"`

	// Type: User type.
	//
	// Possible values:
	//   "TYPE_UNSPECIFIED" - Default value for the enum. DO NOT USE.
	//   "HUMAN" - Human user.
	//   "BOT" - Chat app user.
	Type string `json:"type,omitempty"`

	// ForceSendFields is a list of field names (e.g. "DisplayName") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "DisplayName") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

User: A user in Google Chat. When returned as an output from a request, if your Chat app authenticates as a user (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), the output for a `User` resource only populates the user's `name` and `type`.

func (*User) MarshalJSON

func (s *User) MarshalJSON() ([]byte, error)

type UserMentionMetadata

type UserMentionMetadata struct {
	// Type: The type of user mention.
	//
	// Possible values:
	//   "TYPE_UNSPECIFIED" - Default value for the enum. Don't use.
	//   "ADD" - Add user to space.
	//   "MENTION" - Mention user in space.
	Type string `json:"type,omitempty"`

	// User: The user mentioned.
	User *User `json:"user,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Type") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Type") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

UserMentionMetadata: Annotation metadata for user mentions (@).

func (*UserMentionMetadata) MarshalJSON

func (s *UserMentionMetadata) MarshalJSON() ([]byte, error)

type WidgetMarkup

type WidgetMarkup struct {
	// Buttons: A list of buttons. Buttons is also `oneof data` and only one
	// of these fields should be set.
	Buttons []*Button `json:"buttons,omitempty"`

	// Image: Display an image in this widget.
	Image *Image `json:"image,omitempty"`

	// KeyValue: Display a key value item in this widget.
	KeyValue *KeyValue `json:"keyValue,omitempty"`

	// TextParagraph: Display a text paragraph in this widget.
	TextParagraph *TextParagraph `json:"textParagraph,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Buttons") to
	// unconditionally include in API requests. By default, fields with
	// empty or default values are omitted from API requests. However, any
	// non-pointer, non-interface field appearing in ForceSendFields will be
	// sent to the server regardless of whether the field is empty or not.
	// This may be used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Buttons") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

WidgetMarkup: A widget is a UI element that presents text and images.

func (*WidgetMarkup) MarshalJSON

func (s *WidgetMarkup) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL