Movatterモバイル変換


[0]ホーム

URL:


workspaceevents

package
v0.257.0Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License:BSD-3-ClauseImports:18Imported by:0

Details

Repository

github.com/googleapis/google-api-go-client

Links

Documentation

Overview

Package workspaceevents provides access to the Google Workspace Events API.

For product documentation, see:https://developers.google.com/workspace/events

Library status

These client libraries are officially supported by Google. However, thislibrary is considered complete and is in maintenance mode. This meansthat we will address critical bugs and security issues but will not addany 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/workspaceevents/v1"...ctx := context.Background()workspaceeventsService, err := workspaceevents.NewService(ctx)

In this example, Google Application Default Credentials are used forauthentication. For information on how to create and obtain ApplicationDefault Credentials, seehttps://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, usegoogle.golang.org/api/option.WithScopes:

workspaceeventsService, err := workspaceevents.NewService(ctx, option.WithScopes(workspaceevents.MeetingsSpaceReadonlyScope))

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

workspaceeventsService, err := workspaceevents.NewService(ctx, option.WithAPIKey("AIza..."))

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

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

Seegoogle.golang.org/api/option.ClientOption for details on options.

Index

Constants

View Source
const (// On their own behalf, apps in Google Chat can see, add, update, and remove// members from conversations and spacesChatAppMembershipsScope = "https://www.googleapis.com/auth/chat.app.memberships"// On their own behalf, apps in Google Chat can see all messages and their// associated reactions and message contentChatAppMessagesReadonlyScope = "https://www.googleapis.com/auth/chat.app.messages.readonly"// On their own behalf, apps in Google Chat can create conversations and spaces// and see or update their metadata (including history settings and access// settings)ChatAppSpacesScope = "https://www.googleapis.com/auth/chat.app.spaces"// Private Service:https://www.googleapis.com/auth/chat.botChatBotScope = "https://www.googleapis.com/auth/chat.bot"// See, add, update, and remove members from conversations and spaces in Google// ChatChatMembershipsScope = "https://www.googleapis.com/auth/chat.memberships"// View members in Google Chat conversations.ChatMembershipsReadonlyScope = "https://www.googleapis.com/auth/chat.memberships.readonly"// See, compose, send, update, and delete messages as well as their message// content; add, see, and delete reactions to messages.ChatMessagesScope = "https://www.googleapis.com/auth/chat.messages"// See, add, and delete reactions as well as their reaction content to messages// in Google ChatChatMessagesReactionsScope = "https://www.googleapis.com/auth/chat.messages.reactions"// View reactions as well as their reaction content to messages in Google ChatChatMessagesReactionsReadonlyScope = "https://www.googleapis.com/auth/chat.messages.reactions.readonly"// See messages as well as their reactions and message content in Google ChatChatMessagesReadonlyScope = "https://www.googleapis.com/auth/chat.messages.readonly"// Create conversations and spaces and see or update metadata (including// history settings and access settings) in Google ChatChatSpacesScope = "https://www.googleapis.com/auth/chat.spaces"// View chat and spaces in Google ChatChatSpacesReadonlyScope = "https://www.googleapis.com/auth/chat.spaces.readonly"// See, edit, create, and delete all of your Google Drive filesDriveScope = "https://www.googleapis.com/auth/drive"// See, edit, create, and delete only the specific Google Drive files you use// with this appDriveFileScope = "https://www.googleapis.com/auth/drive.file"// View and manage metadata of files in your Google DriveDriveMetadataScope = "https://www.googleapis.com/auth/drive.metadata"// See information about your Google Drive filesDriveMetadataReadonlyScope = "https://www.googleapis.com/auth/drive.metadata.readonly"// See and download all your Google Drive filesDriveReadonlyScope = "https://www.googleapis.com/auth/drive.readonly"// Create, edit, and see information about your Google Meet conferences created// by the app.MeetingsSpaceCreatedScope = "https://www.googleapis.com/auth/meetings.space.created"// Read information about any of your Google Meet conferencesMeetingsSpaceReadonlyScope = "https://www.googleapis.com/auth/meetings.space.readonly")

OAuth2 scopes used by this API.

Variables

This section is empty.

Functions

This section is empty.

Types

typeArtifactadded inv0.256.0

type Artifact struct {// ArtifactId: Unique identifier (e.g. UUID) for the artifact. It must be at// least unique within a task.ArtifactIdstring `json:"artifactId,omitempty"`// Description: A human readable description of the artifact, optional.Descriptionstring `json:"description,omitempty"`// Extensions: The URIs of extensions that are present or contributed to this// Artifact.Extensions []string `json:"extensions,omitempty"`// Metadata: Optional metadata included with the artifact.Metadatagoogleapi.RawMessage `json:"metadata,omitempty"`// Name: A human readable name for the artifact.Namestring `json:"name,omitempty"`// Parts: The content of the artifact.Parts []*Part `json:"parts,omitempty"`// ForceSendFields is a list of field names (e.g. "ArtifactId") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "ArtifactId") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

Artifact: Artifacts are the container for task completed results. These aresimilar to Messages but are intended to be the product of a task, as opposedto point-to-point communication.

func (Artifact)MarshalJSONadded inv0.256.0

func (sArtifact) MarshalJSON() ([]byte,error)

typeAuthenticationInfoadded inv0.256.0

type AuthenticationInfo struct {// Credentials: Optional credentialsCredentialsstring `json:"credentials,omitempty"`// Schemes: Supported authentication schemes - e.g. Basic, Bearer, etcSchemes []string `json:"schemes,omitempty"`// ForceSendFields is a list of field names (e.g. "Credentials") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Credentials") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

AuthenticationInfo: Defines authentication details, used for pushnotifications.

func (AuthenticationInfo)MarshalJSONadded inv0.256.0

func (sAuthenticationInfo) MarshalJSON() ([]byte,error)

typeCancelTaskRequestadded inv0.256.0

type CancelTaskRequest struct {}

typeDataPartadded inv0.256.0

type DataPart struct {Datagoogleapi.RawMessage `json:"data,omitempty"`// ForceSendFields is a list of field names (e.g. "Data") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Data") to include in API requests// with the JSON null value. By default, fields with empty values are omitted// from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

DataPart: DataPart represents a structured blob. This is most commonly aJSON payload.

func (DataPart)MarshalJSONadded inv0.256.0

func (sDataPart) MarshalJSON() ([]byte,error)

typeEmptyadded inv0.256.0

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 definingduplicated empty messages in your APIs. A typical example is to use it asthe request or the response type of an API method. For instance: service Foo{ rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }

typeFilePartadded inv0.256.0

type FilePart struct {FileWithBytesstring `json:"fileWithBytes,omitempty"`FileWithUristring `json:"fileWithUri,omitempty"`MimeTypestring `json:"mimeType,omitempty"`Namestring `json:"name,omitempty"`// ForceSendFields is a list of field names (e.g. "FileWithBytes") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "FileWithBytes") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

FilePart: FilePart represents the different ways files can be provided. Iffiles are small, directly feeding the bytes is supported viafile_with_bytes. If the file is large, the agent should read the content asappropriate directly from the file_with_uri source.

func (FilePart)MarshalJSONadded inv0.256.0

func (sFilePart) MarshalJSON() ([]byte,error)

typeListSubscriptionsResponseadded inv0.166.0

type ListSubscriptionsResponse struct {// NextPageToken: A token, which can be sent as `page_token` to retrieve the// next page. If this field is omitted, there are no subsequent pages.NextPageTokenstring `json:"nextPageToken,omitempty"`// Subscriptions: List of subscriptions.Subscriptions []*Subscription `json:"subscriptions,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. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

ListSubscriptionsResponse: The response message forSubscriptionsService.ListSubscriptions.

func (ListSubscriptionsResponse)MarshalJSONadded inv0.166.0

func (sListSubscriptionsResponse) MarshalJSON() ([]byte,error)

typeListTaskPushNotificationConfigResponseadded inv0.256.0

type ListTaskPushNotificationConfigResponse struct {// Configs: The list of push notification configurations.Configs []*TaskPushNotificationConfig `json:"configs,omitempty"`// NextPageToken: A token, which can be sent as `page_token` to retrieve the// next page. If this field is omitted, there are no subsequent pages.NextPageTokenstring `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. "Configs") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Configs") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

func (ListTaskPushNotificationConfigResponse)MarshalJSONadded inv0.256.0

typeMessageadded inv0.256.0

type Message struct {// Content: protolint:disable REPEATED_FIELD_NAMES_PLURALIZED Content is the// container of the message content.Content []*Part `json:"content,omitempty"`// ContextId: The context id of the message. This is optional and if set, the// message will be associated with the given context.ContextIdstring `json:"contextId,omitempty"`// Extensions: The URIs of extensions that are present or contributed to this// Message.Extensions []string `json:"extensions,omitempty"`// MessageId: The unique identifier (e.g. UUID)of the message. This is required// and created by the message creator.MessageIdstring `json:"messageId,omitempty"`// Metadata: protolint:enable REPEATED_FIELD_NAMES_PLURALIZED Any optional// metadata to provide along with the message.Metadatagoogleapi.RawMessage `json:"metadata,omitempty"`// Role: A role for the message.//// Possible values://   "ROLE_UNSPECIFIED"//   "ROLE_USER" - USER role refers to communication from the client to the// server.//   "ROLE_AGENT" - AGENT role refers to communication from the server to the// client.Rolestring `json:"role,omitempty"`// TaskId: The task id of the message. This is optional and if set, the message// will be associated with the given task.TaskIdstring `json:"taskId,omitempty"`// ForceSendFields is a list of field names (e.g. "Content") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Content") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

Message: Message is one unit of communication between client and server. Itis associated with a context and optionally a task. Since the server isresponsible for the context definition, it must always provide a context_idin its messages. The client can optionally provide the context_id if itknows the context to associate the message to. Similarly for task_id, exceptthe server decides if a task is created and whether to include the task_id.

func (Message)MarshalJSONadded inv0.256.0

func (sMessage) MarshalJSON() ([]byte,error)

typeMessageServiceadded inv0.256.0

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

funcNewMessageServiceadded inv0.256.0

func NewMessageService(s *Service) *MessageService

func (*MessageService)Streamadded inv0.256.0

func (r *MessageService) Stream(sendmessagerequest *SendMessageRequest) *MessageStreamCall

Stream: SendStreamingMessage is a streaming call that will return a streamof task update events until the Task is in an interrupted or terminal state.

typeMessageStreamCalladded inv0.256.0

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

func (*MessageStreamCall)Contextadded inv0.256.0

Context sets the context to be used in this call's Do method.

func (*MessageStreamCall)Doadded inv0.256.0

Do executes the "workspaceevents.message.stream" call.Any non-2xx status code is an error. Response headers are in either*StreamResponse.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.

func (*MessageStreamCall)Fieldsadded inv0.256.0

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*MessageStreamCall)Headeradded inv0.256.0

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

Header returns a http.Header that can be modified by the caller to addheaders to the request.

typeNotificationEndpointadded inv0.166.0

type NotificationEndpoint struct {// PubsubTopic: Immutable. The Pub/Sub topic that receives events for the// subscription. Format: `projects/{project}/topics/{topic}` You must create// the topic in the same Google Cloud project where you create this// subscription. Note: The Google Workspace Events API uses ordering keys// (https://cloud.google.com/pubsub/docs/ordering) for the benefit of// sequential events. If the Cloud Pub/Sub topic has a message storage policy// (https://cloud.google.com/pubsub/docs/resource-location-restriction#exceptions)// configured to exclude the nearest Google Cloud region, publishing events// with ordering keys will fail. When the topic receives events, the events are// encoded as Pub/Sub messages. For details, see the Google Cloud Pub/Sub// Protocol Binding for CloudEvents// (https://github.com/googleapis/google-cloudevents/blob/main/docs/spec/pubsub.md).PubsubTopicstring `json:"pubsubTopic,omitempty"`// ForceSendFields is a list of field names (e.g. "PubsubTopic") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "PubsubTopic") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

NotificationEndpoint: The endpoint where the subscription delivers events.

func (NotificationEndpoint)MarshalJSONadded inv0.166.0

func (sNotificationEndpoint) MarshalJSON() ([]byte,error)

typeOperationadded inv0.166.0

type Operation struct {// Done: If the value is `false`, it means the operation is still in progress.// If `true`, the operation is completed, and either `error` or `response` is// available.Donebool `json:"done,omitempty"`// Error: The error result of the operation in case of failure or cancellation.Error *Status `json:"error,omitempty"`// Metadata: Service-specific metadata associated with the operation. It// typically contains progress information and common metadata such as create// time. Some services might not provide such metadata. Any method that returns// a long-running operation should document the metadata type, if any.Metadatagoogleapi.RawMessage `json:"metadata,omitempty"`// Name: The server-assigned name, which is only unique within the same service// that originally returns it. If you use the default HTTP mapping, the `name`// should be a resource name ending with `operations/{unique_id}`.Namestring `json:"name,omitempty"`// Response: The normal, successful response of the operation. If the original// method returns no data on success, such as `Delete`, the response is// `google.protobuf.Empty`. If the original method is standard// `Get`/`Create`/`Update`, the response should be the resource. For other// methods, the response should have the type `XxxResponse`, where `Xxx` is the// original method name. For example, if the original method name is// `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.Responsegoogleapi.RawMessage `json:"response,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Done") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Done") to include in API requests// with the JSON null value. By default, fields with empty values are omitted// from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

Operation: This resource represents a long-running operation that is theresult of a network API call.

func (Operation)MarshalJSONadded inv0.166.0

func (sOperation) MarshalJSON() ([]byte,error)

typeOperationsGetCalladded inv0.166.0

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

func (*OperationsGetCall)Contextadded inv0.166.0

Context sets the context to be used in this call's Do method.

func (*OperationsGetCall)Doadded inv0.166.0

Do executes the "workspaceevents.operations.get" call.Any non-2xx status code is an error. Response headers are in either*Operation.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.

func (*OperationsGetCall)Fieldsadded inv0.166.0

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*OperationsGetCall)Headeradded inv0.166.0

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

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*OperationsGetCall)IfNoneMatchadded inv0.166.0

func (c *OperationsGetCall) IfNoneMatch(entityTagstring) *OperationsGetCall

IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.

typeOperationsServiceadded inv0.166.0

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

funcNewOperationsServiceadded inv0.166.0

func NewOperationsService(s *Service) *OperationsService

func (*OperationsService)Getadded inv0.166.0

Get: Gets the latest state of a long-running operation. Clients can use thismethod to poll the operation result at intervals as recommended by the APIservice.

- name: The name of the operation resource.

typePartadded inv0.256.0

type Part struct {Data *DataPart `json:"data,omitempty"`File *FilePart `json:"file,omitempty"`// Metadata: Optional metadata associated with this part.Metadatagoogleapi.RawMessage `json:"metadata,omitempty"`Textstring               `json:"text,omitempty"`// ForceSendFields is a list of field names (e.g. "Data") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Data") to include in API requests// with the JSON null value. By default, fields with empty values are omitted// from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

Part: Part represents a container for a section of communication content.Parts can be purely textual, some sort of file (image, video, etc) or astructured data blob (i.e. JSON).

func (Part)MarshalJSONadded inv0.256.0

func (sPart) MarshalJSON() ([]byte,error)

typePayloadOptionsadded inv0.166.0

type PayloadOptions struct {// FieldMask: Optional. If `include_resource` is set to `true`, the list of// fields to include in the event payload. Separate fields with a comma. For// example, to include a Google Chat message's sender and create time, enter// `message.sender,message.createTime`. If omitted, the payload includes all// fields for the resource. If you specify a field that doesn't exist for the// resource, the system ignores the field.FieldMaskstring `json:"fieldMask,omitempty"`// IncludeResource: Optional. Whether the event payload includes data about the// resource that changed. For example, for an event where a Google Chat message// was created, whether the payload contains data about the `Message`// (https://developers.google.com/chat/api/reference/rest/v1/spaces.messages)// resource. If false, the event payload only includes the name of the changed// resource.IncludeResourcebool `json:"includeResource,omitempty"`// ForceSendFields is a list of field names (e.g. "FieldMask") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "FieldMask") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

PayloadOptions: Options about what data to include in the event payload.Only supported for Google Chat and Google Drive events.

func (PayloadOptions)MarshalJSONadded inv0.166.0

func (sPayloadOptions) MarshalJSON() ([]byte,error)

typePushNotificationConfigadded inv0.256.0

type PushNotificationConfig struct {// Authentication: Information about the authentication to sent with the// notificationAuthentication *AuthenticationInfo `json:"authentication,omitempty"`// Id: A unique identifier (e.g. UUID) for this push notification.Idstring `json:"id,omitempty"`// Token: Token unique for this task/sessionTokenstring `json:"token,omitempty"`// Url: Url to send the notification tooUrlstring `json:"url,omitempty"`// ForceSendFields is a list of field names (e.g. "Authentication") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Authentication") to include in// API requests with the JSON null value. By default, fields with empty values// are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

PushNotificationConfig: Configuration for setting up push notifications fortask updates.

func (PushNotificationConfig)MarshalJSONadded inv0.256.0

func (sPushNotificationConfig) MarshalJSON() ([]byte,error)

typeReactivateSubscriptionRequestadded inv0.166.0

type ReactivateSubscriptionRequest struct {}

ReactivateSubscriptionRequest: The request message forSubscriptionsService.ReactivateSubscription.

typeSendMessageConfigurationadded inv0.256.0

type SendMessageConfiguration struct {// AcceptedOutputModes: The output modes that the agent is expected to respond// with.AcceptedOutputModes []string `json:"acceptedOutputModes,omitempty"`// Blocking: If true, the message will be blocking until the task is completed.// If false, the message will be non-blocking and the task will be returned// immediately. It is the caller's responsibility to check for any task// updates.Blockingbool `json:"blocking,omitempty"`// HistoryLength: The maximum number of messages to include in the history. if// 0, the history will be unlimited.HistoryLengthint64 `json:"historyLength,omitempty"`// PushNotification: A configuration of a webhook that can be used to receive// updatesPushNotification *PushNotificationConfig `json:"pushNotification,omitempty"`// ForceSendFields is a list of field names (e.g. "AcceptedOutputModes") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "AcceptedOutputModes") to include// in API requests with the JSON null value. By default, fields with empty// values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

SendMessageConfiguration: Configuration of a send message request.

func (SendMessageConfiguration)MarshalJSONadded inv0.256.0

func (sSendMessageConfiguration) MarshalJSON() ([]byte,error)

typeSendMessageRequestadded inv0.256.0

type SendMessageRequest struct {// Configuration: Configuration for the send request.Configuration *SendMessageConfiguration `json:"configuration,omitempty"`// Message: Required. The message to send to the agent.Message *Message `json:"message,omitempty"`// Metadata: Optional metadata for the request.Metadatagoogleapi.RawMessage `json:"metadata,omitempty"`// ForceSendFields is a list of field names (e.g. "Configuration") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Configuration") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

SendMessageRequest: /////////// Request Messages ///////////

func (SendMessageRequest)MarshalJSONadded inv0.256.0

func (sSendMessageRequest) MarshalJSON() ([]byte,error)

typeService

type Service struct {BasePathstring// API endpoint base URLUserAgentstring// optional additional User-Agent fragmentMessage *MessageServiceOperations *OperationsServiceSubscriptions *SubscriptionsServiceTasks *TasksService// contains filtered or unexported fields}

funcNewdeprecated

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.

funcNewService

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

NewService creates a new Service.

typeStatusadded inv0.166.0

type Status struct {// Code: The status code, which should be an enum value of google.rpc.Code.Codeint64 `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.Messagestring `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. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

Status: The `Status` type defines a logical error model that is suitable fordifferent programming environments, including REST APIs and RPC APIs. It isused by gRPC (https://github.com/grpc). Each `Status` message contains threepieces of data: error code, error message, and error details. You can findout more about this error model and how to work with it in the API DesignGuide (https://cloud.google.com/apis/design/errors).

func (Status)MarshalJSONadded inv0.166.0

func (sStatus) MarshalJSON() ([]byte,error)

typeStreamResponseadded inv0.256.0

type StreamResponse struct {ArtifactUpdate *TaskArtifactUpdateEvent `json:"artifactUpdate,omitempty"`Message        *Message                 `json:"message,omitempty"`StatusUpdate   *TaskStatusUpdateEvent   `json:"statusUpdate,omitempty"`Task           *Task                    `json:"task,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "ArtifactUpdate") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "ArtifactUpdate") to include in// API requests with the JSON null value. By default, fields with empty values// are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

StreamResponse: The stream response for a message. The stream should be oneof the following sequences: If the response is a message, the stream shouldcontain one, and only one, message and then close If the response is a tasklifecycle, the first response should be a Task object followed by zero ormore TaskStatusUpdateEvents and TaskArtifactUpdateEvents. The stream shouldcomplete when the Task if in an interrupted or terminal state. A stream thatends before these conditions are met are

func (StreamResponse)MarshalJSONadded inv0.256.0

func (sStreamResponse) MarshalJSON() ([]byte,error)

typeSubscriptionadded inv0.166.0

type Subscription struct {// Authority: Output only. The user who authorized the creation of the// subscription. When a user authorizes the subscription, this field and the// `user_authority` field have the same value and the format is: Format:// `users/{user}` For Google Workspace users, the `{user}` value is the// `user.id`// (https://developers.google.com/admin-sdk/directory/reference/rest/v1/users#User.FIELDS.ids)// field from the Directory API. When a Chat app authorizes the subscription,// only `service_account_authority` field populates and this field is empty.Authoritystring `json:"authority,omitempty"`// CreateTime: Output only. The time when the subscription is created.CreateTimestring `json:"createTime,omitempty"`// Etag: Optional. This checksum is computed by the server based on the value// of other fields, and might be sent on update requests to ensure the client// has an up-to-date value before proceeding.Etagstring `json:"etag,omitempty"`// EventTypes: Required. Unordered list. Input for creating a subscription.// Otherwise, output only. One or more types of events to receive about the// target resource. Formatted according to the CloudEvents specification. The// supported event types depend on the target resource of your subscription.// For details, see Supported Google Workspace events// (https://developers.google.com/workspace/events/guides#supported-events). By// default, you also receive events about the lifecycle of your subscription// (https://developers.google.com/workspace/events/guides/events-lifecycle).// You don't need to specify lifecycle events for this field. If you specify an// event type that doesn't exist for the target resource, the request returns// an HTTP `400 Bad Request` status code.EventTypes []string `json:"eventTypes,omitempty"`// ExpireTime: Non-empty default. The timestamp in UTC when the subscription// expires. Always displayed on output, regardless of what was used on input.ExpireTimestring `json:"expireTime,omitempty"`// Name: Identifier. Resource name of the subscription. Format:// `subscriptions/{subscription}`Namestring `json:"name,omitempty"`// NotificationEndpoint: Required. Immutable. The endpoint where the// subscription delivers events, such as a Pub/Sub topic.NotificationEndpoint *NotificationEndpoint `json:"notificationEndpoint,omitempty"`// PayloadOptions: Optional. Options about what data to include in the event// payload. Only supported for Google Chat and Google Drive events.PayloadOptions *PayloadOptions `json:"payloadOptions,omitempty"`// Reconciling: Output only. If `true`, the subscription is in the process of// being updated.Reconcilingbool `json:"reconciling,omitempty"`// State: Output only. The state of the subscription. Determines whether the// subscription can receive events and deliver them to the notification// endpoint.//// Possible values://   "STATE_UNSPECIFIED" - Default value. This value is unused.//   "ACTIVE" - The subscription is active and can receive and deliver events// to its notification endpoint.//   "SUSPENDED" - The subscription is unable to receive events due to an// error. To identify the error, see the `suspension_reason` field.//   "DELETED" - The subscription is deleted.Statestring `json:"state,omitempty"`// SuspensionReason: Output only. The error that suspended the subscription. To// reactivate the subscription, resolve the error and call the// `ReactivateSubscription` method.//// Possible values://   "ERROR_TYPE_UNSPECIFIED" - Default value. This value is unused.//   "USER_SCOPE_REVOKED" - The authorizing user has revoked the grant of one// or more OAuth scopes. To learn more about authorization for Google// Workspace, see [Configure the OAuth consent// screen](https://developers.google.com/workspace/guides/configure-oauth-consen// t#choose-scopes).//   "RESOURCE_DELETED" - The target resource for the subscription no longer// exists.//   "USER_AUTHORIZATION_FAILURE" - The user that authorized the creation of// the subscription no longer has access to the subscription's target resource.//   "ENDPOINT_PERMISSION_DENIED" - The Google Workspace application doesn't// have access to deliver events to your subscription's notification endpoint.//   "ENDPOINT_NOT_FOUND" - The subscription's notification endpoint doesn't// exist, or the endpoint can't be found in the Google Cloud project where you// created the subscription.//   "ENDPOINT_RESOURCE_EXHAUSTED" - The subscription's notification endpoint// failed to receive events due to insufficient quota or reaching rate// limiting.//   "OTHER" - An unidentified error has occurred.SuspensionReasonstring `json:"suspensionReason,omitempty"`// TargetResource: Required. Immutable. The Google Workspace resource that's// monitored for events, formatted as the full resource name// (https://google.aip.dev/122#full-resource-names). To learn about target// resources and the events that they support, see Supported Google Workspace// events (https://developers.google.com/workspace/events#supported-events). A// user can only authorize your app to create one subscription for a given// target resource. If your app tries to create another subscription with the// same user credentials, the request returns an `ALREADY_EXISTS` error.TargetResourcestring `json:"targetResource,omitempty"`// Ttl: Input only. The time-to-live (TTL) or duration for the subscription. If// unspecified or set to `0`, uses the maximum possible duration.Ttlstring `json:"ttl,omitempty"`// Uid: Output only. System-assigned unique identifier for the subscription.Uidstring `json:"uid,omitempty"`// UpdateTime: Output only. The last time that the subscription is updated.UpdateTimestring `json:"updateTime,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Authority") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Authority") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

Subscription: A subscription to receive events about a Google Workspaceresource. To learn more about subscriptions, see the Google Workspace EventsAPI overview (https://developers.google.com/workspace/events).

func (Subscription)MarshalJSONadded inv0.166.0

func (sSubscription) MarshalJSON() ([]byte,error)

typeSubscriptionsCreateCalladded inv0.166.0

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

func (*SubscriptionsCreateCall)Contextadded inv0.166.0

Context sets the context to be used in this call's Do method.

func (*SubscriptionsCreateCall)Doadded inv0.166.0

Do executes the "workspaceevents.subscriptions.create" call.Any non-2xx status code is an error. Response headers are in either*Operation.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.

func (*SubscriptionsCreateCall)Fieldsadded inv0.166.0

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*SubscriptionsCreateCall)Headeradded inv0.166.0

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*SubscriptionsCreateCall)ValidateOnlyadded inv0.166.0

func (c *SubscriptionsCreateCall) ValidateOnly(validateOnlybool) *SubscriptionsCreateCall

ValidateOnly sets the optional parameter "validateOnly": If set to `true`,validates and previews the request, but doesn't create the subscription.

typeSubscriptionsDeleteCalladded inv0.166.0

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

func (*SubscriptionsDeleteCall)AllowMissingadded inv0.166.0

func (c *SubscriptionsDeleteCall) AllowMissing(allowMissingbool) *SubscriptionsDeleteCall

AllowMissing sets the optional parameter "allowMissing": If set to `true`and the subscription isn't found, the request succeeds but doesn't deletethe subscription.

func (*SubscriptionsDeleteCall)Contextadded inv0.166.0

Context sets the context to be used in this call's Do method.

func (*SubscriptionsDeleteCall)Doadded inv0.166.0

Do executes the "workspaceevents.subscriptions.delete" call.Any non-2xx status code is an error. Response headers are in either*Operation.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.

func (*SubscriptionsDeleteCall)Etagadded inv0.166.0

Etag sets the optional parameter "etag": Etag of the subscription. Ifpresent, it must match with the server's etag. Otherwise, request fails withthe status `ABORTED`.

func (*SubscriptionsDeleteCall)Fieldsadded inv0.166.0

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*SubscriptionsDeleteCall)Headeradded inv0.166.0

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*SubscriptionsDeleteCall)ValidateOnlyadded inv0.166.0

func (c *SubscriptionsDeleteCall) ValidateOnly(validateOnlybool) *SubscriptionsDeleteCall

ValidateOnly sets the optional parameter "validateOnly": If set to `true`,validates and previews the request, but doesn't delete the subscription.

typeSubscriptionsGetCalladded inv0.166.0

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

func (*SubscriptionsGetCall)Contextadded inv0.166.0

Context sets the context to be used in this call's Do method.

func (*SubscriptionsGetCall)Doadded inv0.166.0

Do executes the "workspaceevents.subscriptions.get" call.Any non-2xx status code is an error. Response headers are in either*Subscription.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.

func (*SubscriptionsGetCall)Fieldsadded inv0.166.0

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*SubscriptionsGetCall)Headeradded inv0.166.0

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

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*SubscriptionsGetCall)IfNoneMatchadded inv0.166.0

func (c *SubscriptionsGetCall) IfNoneMatch(entityTagstring) *SubscriptionsGetCall

IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.

typeSubscriptionsListCalladded inv0.166.0

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

func (*SubscriptionsListCall)Contextadded inv0.166.0

Context sets the context to be used in this call's Do method.

func (*SubscriptionsListCall)Doadded inv0.166.0

Do executes the "workspaceevents.subscriptions.list" call.Any non-2xx status code is an error. Response headers are in either*ListSubscriptionsResponse.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error was becausehttp.StatusNotModified was returned.

func (*SubscriptionsListCall)Fieldsadded inv0.166.0

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*SubscriptionsListCall)Filteradded inv0.166.0

Filter sets the optional parameter "filter": Required. A query filter. Youcan filter subscriptions by event type (`event_types`) and target resource(`target_resource`). You must specify at least one event type in your query.To filter for multiple event types, use the `OR` operator. To filter by bothevent type and target resource, use the `AND` operator and specify the fullresource name, such as `//chat.googleapis.com/spaces/{space}`. For example,the following queries are valid: ```event_types:"google.workspace.chat.membership.v1.updated" ORevent_types:"google.workspace.chat.message.v1.created"event_types:"google.workspace.chat.message.v1.created" ANDtarget_resource="//chat.googleapis.com/spaces/{space}" (event_types:"google.workspace.chat.membership.v1.updated" ORevent_types:"google.workspace.chat.message.v1.created" ) ANDtarget_resource="//chat.googleapis.com/spaces/{space}" ``` The serverrejects invalid queries with an `INVALID_ARGUMENT` error.

func (*SubscriptionsListCall)Headeradded inv0.166.0

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*SubscriptionsListCall)IfNoneMatchadded inv0.166.0

func (c *SubscriptionsListCall) IfNoneMatch(entityTagstring) *SubscriptionsListCall

IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.

func (*SubscriptionsListCall)PageSizeadded inv0.166.0

PageSize sets the optional parameter "pageSize": The maximum number ofsubscriptions to return. The service might return fewer than this value. Ifunspecified or set to `0`, up to 50 subscriptions are returned. The maximumvalue is 100. If you specify a value more than 100, the system only returns100 subscriptions.

func (*SubscriptionsListCall)PageTokenadded inv0.166.0

func (c *SubscriptionsListCall) PageToken(pageTokenstring) *SubscriptionsListCall

PageToken sets the optional parameter "pageToken": A page token, receivedfrom a previous list subscriptions call. Provide this parameter to retrievethe subsequent page. When paginating, the filter value should match the callthat provided the page token. Passing a different value might lead tounexpected results.

func (*SubscriptionsListCall)Pagesadded inv0.166.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.

typeSubscriptionsPatchCalladded inv0.166.0

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

func (*SubscriptionsPatchCall)Contextadded inv0.166.0

Context sets the context to be used in this call's Do method.

func (*SubscriptionsPatchCall)Doadded inv0.166.0

Do executes the "workspaceevents.subscriptions.patch" call.Any non-2xx status code is an error. Response headers are in either*Operation.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.

func (*SubscriptionsPatchCall)Fieldsadded inv0.166.0

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*SubscriptionsPatchCall)Headeradded inv0.166.0

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*SubscriptionsPatchCall)UpdateMaskadded inv0.166.0

func (c *SubscriptionsPatchCall) UpdateMask(updateMaskstring) *SubscriptionsPatchCall

UpdateMask sets the optional parameter "updateMask": The field to update. Ifomitted, updates any fields included in the request. You can update one ofthe following fields in a subscription: * `expire_time`: The timestamp whenthe subscription expires. * `ttl`: The time-to-live (TTL) or duration of thesubscription. * `event_types`: The list of event types to receive about thetarget resource. When using the `*` wildcard (equivalent to `PUT`), omittedfields are set to empty values and rejected if they're invalid.

func (*SubscriptionsPatchCall)ValidateOnlyadded inv0.166.0

func (c *SubscriptionsPatchCall) ValidateOnly(validateOnlybool) *SubscriptionsPatchCall

ValidateOnly sets the optional parameter "validateOnly": If set to `true`,validates and previews the request, but doesn't update the subscription.

typeSubscriptionsReactivateCalladded inv0.166.0

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

func (*SubscriptionsReactivateCall)Contextadded inv0.166.0

Context sets the context to be used in this call's Do method.

func (*SubscriptionsReactivateCall)Doadded inv0.166.0

Do executes the "workspaceevents.subscriptions.reactivate" call.Any non-2xx status code is an error. Response headers are in either*Operation.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.

func (*SubscriptionsReactivateCall)Fieldsadded inv0.166.0

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*SubscriptionsReactivateCall)Headeradded inv0.166.0

Header returns a http.Header that can be modified by the caller to addheaders to the request.

typeSubscriptionsServiceadded inv0.166.0

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

funcNewSubscriptionsServiceadded inv0.166.0

func NewSubscriptionsService(s *Service) *SubscriptionsService

func (*SubscriptionsService)Createadded inv0.166.0

Create: Creates a Google Workspace subscription. To learn how to use thismethod, see Create a Google Workspace subscription(https://developers.google.com/workspace/events/guides/create-subscription).For a subscription on a Chat target resource(https://developers.google.com/workspace/events/guides/events-chat), you cancreate a subscription as: - A Chat app by specifying an authorization scopethat begins with `chat.app` and getting one-time administrator approval(Developer Preview (https://developers.google.com/workspace/preview)). Tolearn more, see Authorize as a Chat app with administrator approval(https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).- A user by specifying an authorization scope that doesn't include `app` inits name. To learn more, see Authorize as a Chat user(https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).

func (*SubscriptionsService)Deleteadded inv0.166.0

Delete: Deletes a Google Workspace subscription. To learn how to use thismethod, see Delete a Google Workspace subscription(https://developers.google.com/workspace/events/guides/delete-subscription).

  • name: Resource name of the subscription to delete. Format:`subscriptions/{subscription}`.

func (*SubscriptionsService)Getadded inv0.166.0

Get: Gets details about a Google Workspace subscription. To learn how to usethis method, see Get details about a Google Workspace subscription(https://developers.google.com/workspace/events/guides/get-subscription).

  • name: Resource name of the subscription. Format:`subscriptions/{subscription}`.

func (*SubscriptionsService)Listadded inv0.166.0

List: Lists Google Workspace subscriptions. To learn how to use this method,see List Google Workspace subscriptions(https://developers.google.com/workspace/events/guides/list-subscriptions).

func (*SubscriptionsService)Patchadded inv0.166.0

func (r *SubscriptionsService) Patch(namestring, subscription *Subscription) *SubscriptionsPatchCall

Patch: Updates or renews a Google Workspace subscription. To learn how touse this method, see Update or renew a Google Workspace subscription(https://developers.google.com/workspace/events/guides/update-subscription).For a subscription on a Chat target resource(https://developers.google.com/workspace/events/guides/events-chat), you canupdate a subscription as: - A Chat app by specifying an authorization scopethat begins with `chat.app` andgetting one-time administrator approval(Developer Preview (https://developers.google.com/workspace/preview)). Tolearn more, see Authorize as a Chat app with administrator approval(https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).- A user by specifying an authorization scope that doesn't include `app` inits name. To learn more, see Authorize as a Chat user(https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).

  • name: Identifier. Resource name of the subscription. Format:`subscriptions/{subscription}`.

func (*SubscriptionsService)Reactivateadded inv0.166.0

func (r *SubscriptionsService) Reactivate(namestring, reactivatesubscriptionrequest *ReactivateSubscriptionRequest) *SubscriptionsReactivateCall

Reactivate: Reactivates a suspended Google Workspace subscription. Thismethod resets your subscription's `State` field to `ACTIVE`. Before you usethis method, you must fix the error that suspended the subscription. Thismethod will ignore or reject any subscription that isn't currently in asuspended state. To learn how to use this method, see Reactivate a GoogleWorkspace subscription(https://developers.google.com/workspace/events/guides/reactivate-subscription).For a subscription on a Chat target resource(https://developers.google.com/workspace/events/guides/events-chat), you canreactivate a subscription as: - A Chat app by specifying an authorizationscope that begins with `chat.app` andgetting one-time administrator approval(Developer Preview (https://developers.google.com/workspace/preview)). Tolearn more, see Authorize as a Chat app with administrator approval(https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).- A user by specifying an authorization scope that doesn't include `app` inits name. To learn more, see Authorize as a Chat user(https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).

  • name: Resource name of the subscription. Format:`subscriptions/{subscription}`.

typeTaskadded inv0.256.0

type Task struct {// Artifacts: A set of output artifacts for a Task.Artifacts []*Artifact `json:"artifacts,omitempty"`// ContextId: Unique identifier (e.g. UUID) for the contextual collection of// interactions (tasks and messages). Created by the A2A server.ContextIdstring `json:"contextId,omitempty"`// History: protolint:disable REPEATED_FIELD_NAMES_PLURALIZED The history of// interactions from a task.History []*Message `json:"history,omitempty"`// Id: Unique identifier (e.g. UUID) for the task, generated by the server for// a new task.Idstring `json:"id,omitempty"`// Metadata: protolint:enable REPEATED_FIELD_NAMES_PLURALIZED A key/value// object to store custom metadata about a task.Metadatagoogleapi.RawMessage `json:"metadata,omitempty"`// Status: The current status of a Task, including state and a message.Status *TaskStatus `json:"status,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// ForceSendFields is a list of field names (e.g. "Artifacts") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Artifacts") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

Task: Task is the core unit of action for A2A. It has a current status andwhen results are created for the task they are stored in the artifact. Ifthere are multiple turns for a task, these are stored in history.

func (Task)MarshalJSONadded inv0.256.0

func (sTask) MarshalJSON() ([]byte,error)

typeTaskArtifactUpdateEventadded inv0.256.0

type TaskArtifactUpdateEvent struct {// Append: Whether this should be appended to a prior one producedAppendbool `json:"append,omitempty"`// Artifact: The artifact itselfArtifact *Artifact `json:"artifact,omitempty"`// ContextId: The id of the context that this task belongs tooContextIdstring `json:"contextId,omitempty"`// LastChunk: Whether this represents the last part of an artifactLastChunkbool `json:"lastChunk,omitempty"`// Metadata: Optional metadata associated with the artifact update.Metadatagoogleapi.RawMessage `json:"metadata,omitempty"`// TaskId: The id of the task for this artifactTaskIdstring `json:"taskId,omitempty"`// ForceSendFields is a list of field names (e.g. "Append") to unconditionally// include in API requests. By default, fields with empty or default values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "Append") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

TaskArtifactUpdateEvent: TaskArtifactUpdateEvent represents a task deltawhere an artifact has been generated.

func (TaskArtifactUpdateEvent)MarshalJSONadded inv0.256.0

func (sTaskArtifactUpdateEvent) MarshalJSON() ([]byte,error)

typeTaskPushNotificationConfigadded inv0.256.0

type TaskPushNotificationConfig struct {// Name: The resource name of the config. Format:// tasks/{task_id}/pushNotificationConfigs/{config_id}Namestring `json:"name,omitempty"`// PushNotificationConfig: The push notification configuration details.PushNotificationConfig *PushNotificationConfig `json:"pushNotificationConfig,omitempty"`// ServerResponse contains the HTTP response code and headers from the server.googleapi.ServerResponse `json:"-"`// 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. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

func (TaskPushNotificationConfig)MarshalJSONadded inv0.256.0

func (sTaskPushNotificationConfig) MarshalJSON() ([]byte,error)

typeTaskStatusadded inv0.256.0

type TaskStatus struct {// Message: A message associated with the status.Message *Message `json:"message,omitempty"`// State: The current state of this task//// Possible values://   "TASK_STATE_UNSPECIFIED"//   "TASK_STATE_SUBMITTED" - Represents the status that acknowledges a task is// created//   "TASK_STATE_WORKING" - Represents the status that a task is actively being// processed//   "TASK_STATE_COMPLETED" - Represents the status a task is finished. This is// a terminal state//   "TASK_STATE_FAILED" - Represents the status a task is done but failed.// This is a terminal state//   "TASK_STATE_CANCELLED" - Represents the status a task was cancelled before// it finished. This is a terminal state.//   "TASK_STATE_INPUT_REQUIRED" - Represents the status that the task requires// information to complete. This is an interrupted state.//   "TASK_STATE_REJECTED" - Represents the status that the agent has decided// to not perform the task. This may be done during initial task creation or// later once an agent has determined it can't or won't proceed. This is a// terminal state.//   "TASK_STATE_AUTH_REQUIRED" - Represents the state that some authentication// is needed from the upstream client. Authentication is expected to come// out-of-band thus this is not an interrupted or terminal state.Statestring `json:"state,omitempty"`// Timestamp: Timestamp when the status was recorded. Example:// "2023-10-27T10:00:00Z"Timestampstring `json:"timestamp,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. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.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. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

TaskStatus: A container for the status of a task

func (TaskStatus)MarshalJSONadded inv0.256.0

func (sTaskStatus) MarshalJSON() ([]byte,error)

typeTaskStatusUpdateEventadded inv0.256.0

type TaskStatusUpdateEvent struct {// ContextId: The id of the context that the task belongs toContextIdstring `json:"contextId,omitempty"`// Final: Whether this is the last status update expected for this task.Finalbool `json:"final,omitempty"`// Metadata: Optional metadata to associate with the task update.Metadatagoogleapi.RawMessage `json:"metadata,omitempty"`// Status: The new status of the task.Status *TaskStatus `json:"status,omitempty"`// TaskId: The id of the task that is changedTaskIdstring `json:"taskId,omitempty"`// ForceSendFields is a list of field names (e.g. "ContextId") to// unconditionally include in API requests. By default, fields with empty or// default values are omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more// details.ForceSendFields []string `json:"-"`// NullFields is a list of field names (e.g. "ContextId") to include in API// requests with the JSON null value. By default, fields with empty values are// omitted from API requests. See//https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.NullFields []string `json:"-"`}

TaskStatusUpdateEvent: TaskStatusUpdateEvent is a delta even on a taskindicating that a task has changed.

func (TaskStatusUpdateEvent)MarshalJSONadded inv0.256.0

func (sTaskStatusUpdateEvent) MarshalJSON() ([]byte,error)

typeTasksCancelCalladded inv0.256.0

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

func (*TasksCancelCall)Contextadded inv0.256.0

Context sets the context to be used in this call's Do method.

func (*TasksCancelCall)Doadded inv0.256.0

func (c *TasksCancelCall) Do(opts ...googleapi.CallOption) (*Task,error)

Do executes the "workspaceevents.tasks.cancel" call.Any non-2xx status code is an error. Response headers are in either*Task.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.

func (*TasksCancelCall)Fieldsadded inv0.256.0

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*TasksCancelCall)Headeradded inv0.256.0

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

Header returns a http.Header that can be modified by the caller to addheaders to the request.

typeTasksGetCalladded inv0.256.0

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

func (*TasksGetCall)Contextadded inv0.256.0

func (c *TasksGetCall) Context(ctxcontext.Context) *TasksGetCall

Context sets the context to be used in this call's Do method.

func (*TasksGetCall)Doadded inv0.256.0

func (c *TasksGetCall) Do(opts ...googleapi.CallOption) (*Task,error)

Do executes the "workspaceevents.tasks.get" call.Any non-2xx status code is an error. Response headers are in either*Task.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.

func (*TasksGetCall)Fieldsadded inv0.256.0

func (c *TasksGetCall) Fields(s ...googleapi.Field) *TasksGetCall

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*TasksGetCall)Headeradded inv0.256.0

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

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*TasksGetCall)HistoryLengthadded inv0.256.0

func (c *TasksGetCall) HistoryLength(historyLengthint64) *TasksGetCall

HistoryLength sets the optional parameter "historyLength": The number ofmost recent messages from the task's history to retrieve.

func (*TasksGetCall)IfNoneMatchadded inv0.256.0

func (c *TasksGetCall) IfNoneMatch(entityTagstring) *TasksGetCall

IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.

typeTasksPushNotificationConfigsCreateCalladded inv0.256.0

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

func (*TasksPushNotificationConfigsCreateCall)ConfigIdadded inv0.256.0

ConfigId sets the optional parameter "configId": Required. The ID for thenew config.

func (*TasksPushNotificationConfigsCreateCall)Contextadded inv0.256.0

Context sets the context to be used in this call's Do method.

func (*TasksPushNotificationConfigsCreateCall)Doadded inv0.256.0

Do executes the "workspaceevents.tasks.pushNotificationConfigs.create" call.Any non-2xx status code is an error. Response headers are in either*TaskPushNotificationConfig.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error was becausehttp.StatusNotModified was returned.

func (*TasksPushNotificationConfigsCreateCall)Fieldsadded inv0.256.0

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*TasksPushNotificationConfigsCreateCall)Headeradded inv0.256.0

Header returns a http.Header that can be modified by the caller to addheaders to the request.

typeTasksPushNotificationConfigsDeleteCalladded inv0.256.0

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

func (*TasksPushNotificationConfigsDeleteCall)Contextadded inv0.256.0

Context sets the context to be used in this call's Do method.

func (*TasksPushNotificationConfigsDeleteCall)Doadded inv0.256.0

Do executes the "workspaceevents.tasks.pushNotificationConfigs.delete" call.Any non-2xx status code is an error. Response headers are in either*Empty.ServerResponse.Header or (if a response was returned at all) inerror.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.

func (*TasksPushNotificationConfigsDeleteCall)Fieldsadded inv0.256.0

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*TasksPushNotificationConfigsDeleteCall)Headeradded inv0.256.0

Header returns a http.Header that can be modified by the caller to addheaders to the request.

typeTasksPushNotificationConfigsGetCalladded inv0.256.0

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

func (*TasksPushNotificationConfigsGetCall)Contextadded inv0.256.0

Context sets the context to be used in this call's Do method.

func (*TasksPushNotificationConfigsGetCall)Doadded inv0.256.0

Do executes the "workspaceevents.tasks.pushNotificationConfigs.get" call.Any non-2xx status code is an error. Response headers are in either*TaskPushNotificationConfig.ServerResponse.Header or (if a response wasreturned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error was becausehttp.StatusNotModified was returned.

func (*TasksPushNotificationConfigsGetCall)Fieldsadded inv0.256.0

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*TasksPushNotificationConfigsGetCall)Headeradded inv0.256.0

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*TasksPushNotificationConfigsGetCall)IfNoneMatchadded inv0.256.0

IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.

typeTasksPushNotificationConfigsListCalladded inv0.256.0

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

func (*TasksPushNotificationConfigsListCall)Contextadded inv0.256.0

Context sets the context to be used in this call's Do method.

func (*TasksPushNotificationConfigsListCall)Doadded inv0.256.0

Do executes the "workspaceevents.tasks.pushNotificationConfigs.list" call.Any non-2xx status code is an error. Response headers are in either*ListTaskPushNotificationConfigResponse.ServerResponse.Header or (if aresponse was returned at all) in error.(*googleapi.Error).Header. Usegoogleapi.IsNotModified to check whether the returned error was becausehttp.StatusNotModified was returned.

func (*TasksPushNotificationConfigsListCall)Fieldsadded inv0.256.0

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*TasksPushNotificationConfigsListCall)Headeradded inv0.256.0

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*TasksPushNotificationConfigsListCall)IfNoneMatchadded inv0.256.0

IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.

func (*TasksPushNotificationConfigsListCall)PageSizeadded inv0.256.0

PageSize sets the optional parameter "pageSize": For AIP-158 these fieldsare present. Usually not used/needed. The maximum number of configurationsto return. If unspecified, all configs will be returned.

func (*TasksPushNotificationConfigsListCall)PageTokenadded inv0.256.0

PageToken sets the optional parameter "pageToken": A page token receivedfrom a previous ListTaskPushNotificationConfigRequest call. Provide this toretrieve the subsequent page. When paginating, all other parameters providedto `ListTaskPushNotificationConfigRequest` must match the call that providedthe page token.

func (*TasksPushNotificationConfigsListCall)Pagesadded inv0.256.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.

typeTasksPushNotificationConfigsServiceadded inv0.256.0

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

funcNewTasksPushNotificationConfigsServiceadded inv0.256.0

func NewTasksPushNotificationConfigsService(s *Service) *TasksPushNotificationConfigsService

func (*TasksPushNotificationConfigsService)Createadded inv0.256.0

Create: Set a push notification config for a task.

- parent: The parent task resource for this config. Format: tasks/{task_id}.

func (*TasksPushNotificationConfigsService)Deleteadded inv0.256.0

Delete: Delete a push notification config for a task.

  • name: The resource name of the config to delete. Format:tasks/{task_id}/pushNotificationConfigs/{config_id}.

func (*TasksPushNotificationConfigsService)Getadded inv0.256.0

Get: Get a push notification config for a task.

  • name: The resource name of the config to retrieve. Format:tasks/{task_id}/pushNotificationConfigs/{config_id}.

func (*TasksPushNotificationConfigsService)Listadded inv0.256.0

List: Get a list of push notifications configured for a task.

- parent: The parent task resource. Format: tasks/{task_id}.

typeTasksServiceadded inv0.256.0

type TasksService struct {PushNotificationConfigs *TasksPushNotificationConfigsService// contains filtered or unexported fields}

funcNewTasksServiceadded inv0.256.0

func NewTasksService(s *Service) *TasksService

func (*TasksService)Canceladded inv0.256.0

func (r *TasksService) Cancel(namestring, canceltaskrequest *CancelTaskRequest) *TasksCancelCall

Cancel: Cancel a task from the agent. If supported one should expect no moretask updates for the task.

- name: The resource name of the task to cancel. Format: tasks/{task_id}.

func (*TasksService)Getadded inv0.256.0

func (r *TasksService) Get(namestring) *TasksGetCall

Get: Get the current state of a task from the agent.

- name: The resource name of the task. Format: tasks/{task_id}.

func (*TasksService)Subscribeadded inv0.256.0

func (r *TasksService) Subscribe(namestring) *TasksSubscribeCall

Subscribe: TaskSubscription is a streaming call that will return a stream oftask update events. This attaches the stream to an existing in process task.If the task is complete the stream will return the completed task (likeGetTask) and close the stream.

  • name: The resource name of the task to subscribe to. Format:tasks/{task_id}.

typeTasksSubscribeCalladded inv0.256.0

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

func (*TasksSubscribeCall)Contextadded inv0.256.0

Context sets the context to be used in this call's Do method.

func (*TasksSubscribeCall)Doadded inv0.256.0

Do executes the "workspaceevents.tasks.subscribe" call.Any non-2xx status code is an error. Response headers are in either*StreamResponse.ServerResponse.Header or (if a response was returned at all)in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to checkwhether the returned error was because http.StatusNotModified was returned.

func (*TasksSubscribeCall)Fieldsadded inv0.256.0

Fields allows partial responses to be retrieved. Seehttps://developers.google.com/gdata/docs/2.0/basics#PartialResponse for moredetails.

func (*TasksSubscribeCall)Headeradded inv0.256.0

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

Header returns a http.Header that can be modified by the caller to addheaders to the request.

func (*TasksSubscribeCall)IfNoneMatchadded inv0.256.0

func (c *TasksSubscribeCall) IfNoneMatch(entityTagstring) *TasksSubscribeCall

IfNoneMatch sets an optional parameter which makes the operation fail if theobject's ETag matches the given value. This is useful for getting updatesonly after the object has changed since the last request.

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp