google-apis-workspaceevents_v1 0.18.0 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/google/apis/workspaceevents_v1/classes.rb +681 -0
- data/lib/google/apis/workspaceevents_v1/gem_version.rb +2 -2
- data/lib/google/apis/workspaceevents_v1/representations.rb +299 -0
- data/lib/google/apis/workspaceevents_v1/service.rb +270 -0
- metadata +2 -2
|
@@ -22,6 +22,172 @@ module Google
|
|
|
22
22
|
module Apis
|
|
23
23
|
module WorkspaceeventsV1
|
|
24
24
|
|
|
25
|
+
# Artifacts are the container for task completed results. These are similar to
|
|
26
|
+
# Messages but are intended to be the product of a task, as opposed to point-to-
|
|
27
|
+
# point communication.
|
|
28
|
+
class Artifact
|
|
29
|
+
include Google::Apis::Core::Hashable
|
|
30
|
+
|
|
31
|
+
# Unique identifier (e.g. UUID) for the artifact. It must be at least unique
|
|
32
|
+
# within a task.
|
|
33
|
+
# Corresponds to the JSON property `artifactId`
|
|
34
|
+
# @return [String]
|
|
35
|
+
attr_accessor :artifact_id
|
|
36
|
+
|
|
37
|
+
# A human readable description of the artifact, optional.
|
|
38
|
+
# Corresponds to the JSON property `description`
|
|
39
|
+
# @return [String]
|
|
40
|
+
attr_accessor :description
|
|
41
|
+
|
|
42
|
+
# The URIs of extensions that are present or contributed to this Artifact.
|
|
43
|
+
# Corresponds to the JSON property `extensions`
|
|
44
|
+
# @return [Array<String>]
|
|
45
|
+
attr_accessor :extensions
|
|
46
|
+
|
|
47
|
+
# Optional metadata included with the artifact.
|
|
48
|
+
# Corresponds to the JSON property `metadata`
|
|
49
|
+
# @return [Hash<String,Object>]
|
|
50
|
+
attr_accessor :metadata
|
|
51
|
+
|
|
52
|
+
# A human readable name for the artifact.
|
|
53
|
+
# Corresponds to the JSON property `name`
|
|
54
|
+
# @return [String]
|
|
55
|
+
attr_accessor :name
|
|
56
|
+
|
|
57
|
+
# The content of the artifact.
|
|
58
|
+
# Corresponds to the JSON property `parts`
|
|
59
|
+
# @return [Array<Google::Apis::WorkspaceeventsV1::Part>]
|
|
60
|
+
attr_accessor :parts
|
|
61
|
+
|
|
62
|
+
def initialize(**args)
|
|
63
|
+
update!(**args)
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Update properties of this object
|
|
67
|
+
def update!(**args)
|
|
68
|
+
@artifact_id = args[:artifact_id] if args.key?(:artifact_id)
|
|
69
|
+
@description = args[:description] if args.key?(:description)
|
|
70
|
+
@extensions = args[:extensions] if args.key?(:extensions)
|
|
71
|
+
@metadata = args[:metadata] if args.key?(:metadata)
|
|
72
|
+
@name = args[:name] if args.key?(:name)
|
|
73
|
+
@parts = args[:parts] if args.key?(:parts)
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Defines authentication details, used for push notifications.
|
|
78
|
+
class AuthenticationInfo
|
|
79
|
+
include Google::Apis::Core::Hashable
|
|
80
|
+
|
|
81
|
+
# Optional credentials
|
|
82
|
+
# Corresponds to the JSON property `credentials`
|
|
83
|
+
# @return [String]
|
|
84
|
+
attr_accessor :credentials
|
|
85
|
+
|
|
86
|
+
# Supported authentication schemes - e.g. Basic, Bearer, etc
|
|
87
|
+
# Corresponds to the JSON property `schemes`
|
|
88
|
+
# @return [Array<String>]
|
|
89
|
+
attr_accessor :schemes
|
|
90
|
+
|
|
91
|
+
def initialize(**args)
|
|
92
|
+
update!(**args)
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Update properties of this object
|
|
96
|
+
def update!(**args)
|
|
97
|
+
@credentials = args[:credentials] if args.key?(:credentials)
|
|
98
|
+
@schemes = args[:schemes] if args.key?(:schemes)
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
#
|
|
103
|
+
class CancelTaskRequest
|
|
104
|
+
include Google::Apis::Core::Hashable
|
|
105
|
+
|
|
106
|
+
def initialize(**args)
|
|
107
|
+
update!(**args)
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Update properties of this object
|
|
111
|
+
def update!(**args)
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# DataPart represents a structured blob. This is most commonly a JSON payload.
|
|
116
|
+
class DataPart
|
|
117
|
+
include Google::Apis::Core::Hashable
|
|
118
|
+
|
|
119
|
+
#
|
|
120
|
+
# Corresponds to the JSON property `data`
|
|
121
|
+
# @return [Hash<String,Object>]
|
|
122
|
+
attr_accessor :data
|
|
123
|
+
|
|
124
|
+
def initialize(**args)
|
|
125
|
+
update!(**args)
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Update properties of this object
|
|
129
|
+
def update!(**args)
|
|
130
|
+
@data = args[:data] if args.key?(:data)
|
|
131
|
+
end
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# A generic empty message that you can re-use to avoid defining duplicated empty
|
|
135
|
+
# messages in your APIs. A typical example is to use it as the request or the
|
|
136
|
+
# response type of an API method. For instance: service Foo ` rpc Bar(google.
|
|
137
|
+
# protobuf.Empty) returns (google.protobuf.Empty); `
|
|
138
|
+
class Empty
|
|
139
|
+
include Google::Apis::Core::Hashable
|
|
140
|
+
|
|
141
|
+
def initialize(**args)
|
|
142
|
+
update!(**args)
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Update properties of this object
|
|
146
|
+
def update!(**args)
|
|
147
|
+
end
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# FilePart represents the different ways files can be provided. If files are
|
|
151
|
+
# small, directly feeding the bytes is supported via file_with_bytes. If the
|
|
152
|
+
# file is large, the agent should read the content as appropriate directly from
|
|
153
|
+
# the file_with_uri source.
|
|
154
|
+
class FilePart
|
|
155
|
+
include Google::Apis::Core::Hashable
|
|
156
|
+
|
|
157
|
+
#
|
|
158
|
+
# Corresponds to the JSON property `fileWithBytes`
|
|
159
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
|
160
|
+
# @return [String]
|
|
161
|
+
attr_accessor :file_with_bytes
|
|
162
|
+
|
|
163
|
+
#
|
|
164
|
+
# Corresponds to the JSON property `fileWithUri`
|
|
165
|
+
# @return [String]
|
|
166
|
+
attr_accessor :file_with_uri
|
|
167
|
+
|
|
168
|
+
#
|
|
169
|
+
# Corresponds to the JSON property `mimeType`
|
|
170
|
+
# @return [String]
|
|
171
|
+
attr_accessor :mime_type
|
|
172
|
+
|
|
173
|
+
#
|
|
174
|
+
# Corresponds to the JSON property `name`
|
|
175
|
+
# @return [String]
|
|
176
|
+
attr_accessor :name
|
|
177
|
+
|
|
178
|
+
def initialize(**args)
|
|
179
|
+
update!(**args)
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Update properties of this object
|
|
183
|
+
def update!(**args)
|
|
184
|
+
@file_with_bytes = args[:file_with_bytes] if args.key?(:file_with_bytes)
|
|
185
|
+
@file_with_uri = args[:file_with_uri] if args.key?(:file_with_uri)
|
|
186
|
+
@mime_type = args[:mime_type] if args.key?(:mime_type)
|
|
187
|
+
@name = args[:name] if args.key?(:name)
|
|
188
|
+
end
|
|
189
|
+
end
|
|
190
|
+
|
|
25
191
|
# The response message for SubscriptionsService.ListSubscriptions.
|
|
26
192
|
class ListSubscriptionsResponse
|
|
27
193
|
include Google::Apis::Core::Hashable
|
|
@@ -48,6 +214,97 @@ module Google
|
|
|
48
214
|
end
|
|
49
215
|
end
|
|
50
216
|
|
|
217
|
+
#
|
|
218
|
+
class ListTaskPushNotificationConfigResponse
|
|
219
|
+
include Google::Apis::Core::Hashable
|
|
220
|
+
|
|
221
|
+
# The list of push notification configurations.
|
|
222
|
+
# Corresponds to the JSON property `configs`
|
|
223
|
+
# @return [Array<Google::Apis::WorkspaceeventsV1::TaskPushNotificationConfig>]
|
|
224
|
+
attr_accessor :configs
|
|
225
|
+
|
|
226
|
+
# A token, which can be sent as `page_token` to retrieve the next page. If this
|
|
227
|
+
# field is omitted, there are no subsequent pages.
|
|
228
|
+
# Corresponds to the JSON property `nextPageToken`
|
|
229
|
+
# @return [String]
|
|
230
|
+
attr_accessor :next_page_token
|
|
231
|
+
|
|
232
|
+
def initialize(**args)
|
|
233
|
+
update!(**args)
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
# Update properties of this object
|
|
237
|
+
def update!(**args)
|
|
238
|
+
@configs = args[:configs] if args.key?(:configs)
|
|
239
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
|
240
|
+
end
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
# Message is one unit of communication between client and server. It is
|
|
244
|
+
# associated with a context and optionally a task. Since the server is
|
|
245
|
+
# responsible for the context definition, it must always provide a context_id in
|
|
246
|
+
# its messages. The client can optionally provide the context_id if it knows the
|
|
247
|
+
# context to associate the message to. Similarly for task_id, except the server
|
|
248
|
+
# decides if a task is created and whether to include the task_id.
|
|
249
|
+
class Message
|
|
250
|
+
include Google::Apis::Core::Hashable
|
|
251
|
+
|
|
252
|
+
# protolint:disable REPEATED_FIELD_NAMES_PLURALIZED Content is the container of
|
|
253
|
+
# the message content.
|
|
254
|
+
# Corresponds to the JSON property `content`
|
|
255
|
+
# @return [Array<Google::Apis::WorkspaceeventsV1::Part>]
|
|
256
|
+
attr_accessor :content
|
|
257
|
+
|
|
258
|
+
# The context id of the message. This is optional and if set, the message will
|
|
259
|
+
# be associated with the given context.
|
|
260
|
+
# Corresponds to the JSON property `contextId`
|
|
261
|
+
# @return [String]
|
|
262
|
+
attr_accessor :context_id
|
|
263
|
+
|
|
264
|
+
# The URIs of extensions that are present or contributed to this Message.
|
|
265
|
+
# Corresponds to the JSON property `extensions`
|
|
266
|
+
# @return [Array<String>]
|
|
267
|
+
attr_accessor :extensions
|
|
268
|
+
|
|
269
|
+
# The unique identifier (e.g. UUID)of the message. This is required and created
|
|
270
|
+
# by the message creator.
|
|
271
|
+
# Corresponds to the JSON property `messageId`
|
|
272
|
+
# @return [String]
|
|
273
|
+
attr_accessor :message_id
|
|
274
|
+
|
|
275
|
+
# protolint:enable REPEATED_FIELD_NAMES_PLURALIZED Any optional metadata to
|
|
276
|
+
# provide along with the message.
|
|
277
|
+
# Corresponds to the JSON property `metadata`
|
|
278
|
+
# @return [Hash<String,Object>]
|
|
279
|
+
attr_accessor :metadata
|
|
280
|
+
|
|
281
|
+
# A role for the message.
|
|
282
|
+
# Corresponds to the JSON property `role`
|
|
283
|
+
# @return [String]
|
|
284
|
+
attr_accessor :role
|
|
285
|
+
|
|
286
|
+
# The task id of the message. This is optional and if set, the message will be
|
|
287
|
+
# associated with the given task.
|
|
288
|
+
# Corresponds to the JSON property `taskId`
|
|
289
|
+
# @return [String]
|
|
290
|
+
attr_accessor :task_id
|
|
291
|
+
|
|
292
|
+
def initialize(**args)
|
|
293
|
+
update!(**args)
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
# Update properties of this object
|
|
297
|
+
def update!(**args)
|
|
298
|
+
@content = args[:content] if args.key?(:content)
|
|
299
|
+
@context_id = args[:context_id] if args.key?(:context_id)
|
|
300
|
+
@extensions = args[:extensions] if args.key?(:extensions)
|
|
301
|
+
@message_id = args[:message_id] if args.key?(:message_id)
|
|
302
|
+
@metadata = args[:metadata] if args.key?(:metadata)
|
|
303
|
+
@role = args[:role] if args.key?(:role)
|
|
304
|
+
@task_id = args[:task_id] if args.key?(:task_id)
|
|
305
|
+
end
|
|
306
|
+
end
|
|
307
|
+
|
|
51
308
|
# The endpoint where the subscription delivers events.
|
|
52
309
|
class NotificationEndpoint
|
|
53
310
|
include Google::Apis::Core::Hashable
|
|
@@ -139,6 +396,48 @@ module Google
|
|
|
139
396
|
end
|
|
140
397
|
end
|
|
141
398
|
|
|
399
|
+
# Part represents a container for a section of communication content. Parts can
|
|
400
|
+
# be purely textual, some sort of file (image, video, etc) or a structured data
|
|
401
|
+
# blob (i.e. JSON).
|
|
402
|
+
class Part
|
|
403
|
+
include Google::Apis::Core::Hashable
|
|
404
|
+
|
|
405
|
+
# DataPart represents a structured blob. This is most commonly a JSON payload.
|
|
406
|
+
# Corresponds to the JSON property `data`
|
|
407
|
+
# @return [Google::Apis::WorkspaceeventsV1::DataPart]
|
|
408
|
+
attr_accessor :data
|
|
409
|
+
|
|
410
|
+
# FilePart represents the different ways files can be provided. If files are
|
|
411
|
+
# small, directly feeding the bytes is supported via file_with_bytes. If the
|
|
412
|
+
# file is large, the agent should read the content as appropriate directly from
|
|
413
|
+
# the file_with_uri source.
|
|
414
|
+
# Corresponds to the JSON property `file`
|
|
415
|
+
# @return [Google::Apis::WorkspaceeventsV1::FilePart]
|
|
416
|
+
attr_accessor :file
|
|
417
|
+
|
|
418
|
+
# Optional metadata associated with this part.
|
|
419
|
+
# Corresponds to the JSON property `metadata`
|
|
420
|
+
# @return [Hash<String,Object>]
|
|
421
|
+
attr_accessor :metadata
|
|
422
|
+
|
|
423
|
+
#
|
|
424
|
+
# Corresponds to the JSON property `text`
|
|
425
|
+
# @return [String]
|
|
426
|
+
attr_accessor :text
|
|
427
|
+
|
|
428
|
+
def initialize(**args)
|
|
429
|
+
update!(**args)
|
|
430
|
+
end
|
|
431
|
+
|
|
432
|
+
# Update properties of this object
|
|
433
|
+
def update!(**args)
|
|
434
|
+
@data = args[:data] if args.key?(:data)
|
|
435
|
+
@file = args[:file] if args.key?(:file)
|
|
436
|
+
@metadata = args[:metadata] if args.key?(:metadata)
|
|
437
|
+
@text = args[:text] if args.key?(:text)
|
|
438
|
+
end
|
|
439
|
+
end
|
|
440
|
+
|
|
142
441
|
# Options about what data to include in the event payload. Only supported for
|
|
143
442
|
# Google Chat and Google Drive events.
|
|
144
443
|
class PayloadOptions
|
|
@@ -175,6 +474,43 @@ module Google
|
|
|
175
474
|
end
|
|
176
475
|
end
|
|
177
476
|
|
|
477
|
+
# Configuration for setting up push notifications for task updates.
|
|
478
|
+
class PushNotificationConfig
|
|
479
|
+
include Google::Apis::Core::Hashable
|
|
480
|
+
|
|
481
|
+
# Defines authentication details, used for push notifications.
|
|
482
|
+
# Corresponds to the JSON property `authentication`
|
|
483
|
+
# @return [Google::Apis::WorkspaceeventsV1::AuthenticationInfo]
|
|
484
|
+
attr_accessor :authentication
|
|
485
|
+
|
|
486
|
+
# A unique identifier (e.g. UUID) for this push notification.
|
|
487
|
+
# Corresponds to the JSON property `id`
|
|
488
|
+
# @return [String]
|
|
489
|
+
attr_accessor :id
|
|
490
|
+
|
|
491
|
+
# Token unique for this task/session
|
|
492
|
+
# Corresponds to the JSON property `token`
|
|
493
|
+
# @return [String]
|
|
494
|
+
attr_accessor :token
|
|
495
|
+
|
|
496
|
+
# Url to send the notification too
|
|
497
|
+
# Corresponds to the JSON property `url`
|
|
498
|
+
# @return [String]
|
|
499
|
+
attr_accessor :url
|
|
500
|
+
|
|
501
|
+
def initialize(**args)
|
|
502
|
+
update!(**args)
|
|
503
|
+
end
|
|
504
|
+
|
|
505
|
+
# Update properties of this object
|
|
506
|
+
def update!(**args)
|
|
507
|
+
@authentication = args[:authentication] if args.key?(:authentication)
|
|
508
|
+
@id = args[:id] if args.key?(:id)
|
|
509
|
+
@token = args[:token] if args.key?(:token)
|
|
510
|
+
@url = args[:url] if args.key?(:url)
|
|
511
|
+
end
|
|
512
|
+
end
|
|
513
|
+
|
|
178
514
|
# The request message for SubscriptionsService.ReactivateSubscription.
|
|
179
515
|
class ReactivateSubscriptionRequest
|
|
180
516
|
include Google::Apis::Core::Hashable
|
|
@@ -188,6 +524,83 @@ module Google
|
|
|
188
524
|
end
|
|
189
525
|
end
|
|
190
526
|
|
|
527
|
+
# Configuration of a send message request.
|
|
528
|
+
class SendMessageConfiguration
|
|
529
|
+
include Google::Apis::Core::Hashable
|
|
530
|
+
|
|
531
|
+
# The output modes that the agent is expected to respond with.
|
|
532
|
+
# Corresponds to the JSON property `acceptedOutputModes`
|
|
533
|
+
# @return [Array<String>]
|
|
534
|
+
attr_accessor :accepted_output_modes
|
|
535
|
+
|
|
536
|
+
# If true, the message will be blocking until the task is completed. If false,
|
|
537
|
+
# the message will be non-blocking and the task will be returned immediately. It
|
|
538
|
+
# is the caller's responsibility to check for any task updates.
|
|
539
|
+
# Corresponds to the JSON property `blocking`
|
|
540
|
+
# @return [Boolean]
|
|
541
|
+
attr_accessor :blocking
|
|
542
|
+
alias_method :blocking?, :blocking
|
|
543
|
+
|
|
544
|
+
# The maximum number of messages to include in the history. if 0, the history
|
|
545
|
+
# will be unlimited.
|
|
546
|
+
# Corresponds to the JSON property `historyLength`
|
|
547
|
+
# @return [Fixnum]
|
|
548
|
+
attr_accessor :history_length
|
|
549
|
+
|
|
550
|
+
# Configuration for setting up push notifications for task updates.
|
|
551
|
+
# Corresponds to the JSON property `pushNotification`
|
|
552
|
+
# @return [Google::Apis::WorkspaceeventsV1::PushNotificationConfig]
|
|
553
|
+
attr_accessor :push_notification
|
|
554
|
+
|
|
555
|
+
def initialize(**args)
|
|
556
|
+
update!(**args)
|
|
557
|
+
end
|
|
558
|
+
|
|
559
|
+
# Update properties of this object
|
|
560
|
+
def update!(**args)
|
|
561
|
+
@accepted_output_modes = args[:accepted_output_modes] if args.key?(:accepted_output_modes)
|
|
562
|
+
@blocking = args[:blocking] if args.key?(:blocking)
|
|
563
|
+
@history_length = args[:history_length] if args.key?(:history_length)
|
|
564
|
+
@push_notification = args[:push_notification] if args.key?(:push_notification)
|
|
565
|
+
end
|
|
566
|
+
end
|
|
567
|
+
|
|
568
|
+
# /////////// Request Messages ///////////
|
|
569
|
+
class SendMessageRequest
|
|
570
|
+
include Google::Apis::Core::Hashable
|
|
571
|
+
|
|
572
|
+
# Configuration of a send message request.
|
|
573
|
+
# Corresponds to the JSON property `configuration`
|
|
574
|
+
# @return [Google::Apis::WorkspaceeventsV1::SendMessageConfiguration]
|
|
575
|
+
attr_accessor :configuration
|
|
576
|
+
|
|
577
|
+
# Message is one unit of communication between client and server. It is
|
|
578
|
+
# associated with a context and optionally a task. Since the server is
|
|
579
|
+
# responsible for the context definition, it must always provide a context_id in
|
|
580
|
+
# its messages. The client can optionally provide the context_id if it knows the
|
|
581
|
+
# context to associate the message to. Similarly for task_id, except the server
|
|
582
|
+
# decides if a task is created and whether to include the task_id.
|
|
583
|
+
# Corresponds to the JSON property `message`
|
|
584
|
+
# @return [Google::Apis::WorkspaceeventsV1::Message]
|
|
585
|
+
attr_accessor :message
|
|
586
|
+
|
|
587
|
+
# Optional metadata for the request.
|
|
588
|
+
# Corresponds to the JSON property `metadata`
|
|
589
|
+
# @return [Hash<String,Object>]
|
|
590
|
+
attr_accessor :metadata
|
|
591
|
+
|
|
592
|
+
def initialize(**args)
|
|
593
|
+
update!(**args)
|
|
594
|
+
end
|
|
595
|
+
|
|
596
|
+
# Update properties of this object
|
|
597
|
+
def update!(**args)
|
|
598
|
+
@configuration = args[:configuration] if args.key?(:configuration)
|
|
599
|
+
@message = args[:message] if args.key?(:message)
|
|
600
|
+
@metadata = args[:metadata] if args.key?(:metadata)
|
|
601
|
+
end
|
|
602
|
+
end
|
|
603
|
+
|
|
191
604
|
# The `Status` type defines a logical error model that is suitable for different
|
|
192
605
|
# programming environments, including REST APIs and RPC APIs. It is used by [
|
|
193
606
|
# gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
|
|
@@ -227,6 +640,58 @@ module Google
|
|
|
227
640
|
end
|
|
228
641
|
end
|
|
229
642
|
|
|
643
|
+
# The stream response for a message. The stream should be one of the following
|
|
644
|
+
# sequences: If the response is a message, the stream should contain one, and
|
|
645
|
+
# only one, message and then close If the response is a task lifecycle, the
|
|
646
|
+
# first response should be a Task object followed by zero or more
|
|
647
|
+
# TaskStatusUpdateEvents and TaskArtifactUpdateEvents. The stream should
|
|
648
|
+
# complete when the Task if in an interrupted or terminal state. A stream that
|
|
649
|
+
# ends before these conditions are met are
|
|
650
|
+
class StreamResponse
|
|
651
|
+
include Google::Apis::Core::Hashable
|
|
652
|
+
|
|
653
|
+
# TaskArtifactUpdateEvent represents a task delta where an artifact has been
|
|
654
|
+
# generated.
|
|
655
|
+
# Corresponds to the JSON property `artifactUpdate`
|
|
656
|
+
# @return [Google::Apis::WorkspaceeventsV1::TaskArtifactUpdateEvent]
|
|
657
|
+
attr_accessor :artifact_update
|
|
658
|
+
|
|
659
|
+
# Message is one unit of communication between client and server. It is
|
|
660
|
+
# associated with a context and optionally a task. Since the server is
|
|
661
|
+
# responsible for the context definition, it must always provide a context_id in
|
|
662
|
+
# its messages. The client can optionally provide the context_id if it knows the
|
|
663
|
+
# context to associate the message to. Similarly for task_id, except the server
|
|
664
|
+
# decides if a task is created and whether to include the task_id.
|
|
665
|
+
# Corresponds to the JSON property `message`
|
|
666
|
+
# @return [Google::Apis::WorkspaceeventsV1::Message]
|
|
667
|
+
attr_accessor :message
|
|
668
|
+
|
|
669
|
+
# TaskStatusUpdateEvent is a delta even on a task indicating that a task has
|
|
670
|
+
# changed.
|
|
671
|
+
# Corresponds to the JSON property `statusUpdate`
|
|
672
|
+
# @return [Google::Apis::WorkspaceeventsV1::TaskStatusUpdateEvent]
|
|
673
|
+
attr_accessor :status_update
|
|
674
|
+
|
|
675
|
+
# Task is the core unit of action for A2A. It has a current status and when
|
|
676
|
+
# results are created for the task they are stored in the artifact. If there are
|
|
677
|
+
# multiple turns for a task, these are stored in history.
|
|
678
|
+
# Corresponds to the JSON property `task`
|
|
679
|
+
# @return [Google::Apis::WorkspaceeventsV1::Task]
|
|
680
|
+
attr_accessor :task
|
|
681
|
+
|
|
682
|
+
def initialize(**args)
|
|
683
|
+
update!(**args)
|
|
684
|
+
end
|
|
685
|
+
|
|
686
|
+
# Update properties of this object
|
|
687
|
+
def update!(**args)
|
|
688
|
+
@artifact_update = args[:artifact_update] if args.key?(:artifact_update)
|
|
689
|
+
@message = args[:message] if args.key?(:message)
|
|
690
|
+
@status_update = args[:status_update] if args.key?(:status_update)
|
|
691
|
+
@task = args[:task] if args.key?(:task)
|
|
692
|
+
end
|
|
693
|
+
end
|
|
694
|
+
|
|
230
695
|
# A subscription to receive events about a Google Workspace resource. To learn
|
|
231
696
|
# more about subscriptions, see the [Google Workspace Events API overview](https:
|
|
232
697
|
# //developers.google.com/workspace/events).
|
|
@@ -362,6 +827,222 @@ module Google
|
|
|
362
827
|
@update_time = args[:update_time] if args.key?(:update_time)
|
|
363
828
|
end
|
|
364
829
|
end
|
|
830
|
+
|
|
831
|
+
# Task is the core unit of action for A2A. It has a current status and when
|
|
832
|
+
# results are created for the task they are stored in the artifact. If there are
|
|
833
|
+
# multiple turns for a task, these are stored in history.
|
|
834
|
+
class Task
|
|
835
|
+
include Google::Apis::Core::Hashable
|
|
836
|
+
|
|
837
|
+
# A set of output artifacts for a Task.
|
|
838
|
+
# Corresponds to the JSON property `artifacts`
|
|
839
|
+
# @return [Array<Google::Apis::WorkspaceeventsV1::Artifact>]
|
|
840
|
+
attr_accessor :artifacts
|
|
841
|
+
|
|
842
|
+
# Unique identifier (e.g. UUID) for the contextual collection of interactions (
|
|
843
|
+
# tasks and messages). Created by the A2A server.
|
|
844
|
+
# Corresponds to the JSON property `contextId`
|
|
845
|
+
# @return [String]
|
|
846
|
+
attr_accessor :context_id
|
|
847
|
+
|
|
848
|
+
# protolint:disable REPEATED_FIELD_NAMES_PLURALIZED The history of interactions
|
|
849
|
+
# from a task.
|
|
850
|
+
# Corresponds to the JSON property `history`
|
|
851
|
+
# @return [Array<Google::Apis::WorkspaceeventsV1::Message>]
|
|
852
|
+
attr_accessor :history
|
|
853
|
+
|
|
854
|
+
# Unique identifier (e.g. UUID) for the task, generated by the server for a new
|
|
855
|
+
# task.
|
|
856
|
+
# Corresponds to the JSON property `id`
|
|
857
|
+
# @return [String]
|
|
858
|
+
attr_accessor :id
|
|
859
|
+
|
|
860
|
+
# protolint:enable REPEATED_FIELD_NAMES_PLURALIZED A key/value object to store
|
|
861
|
+
# custom metadata about a task.
|
|
862
|
+
# Corresponds to the JSON property `metadata`
|
|
863
|
+
# @return [Hash<String,Object>]
|
|
864
|
+
attr_accessor :metadata
|
|
865
|
+
|
|
866
|
+
# A container for the status of a task
|
|
867
|
+
# Corresponds to the JSON property `status`
|
|
868
|
+
# @return [Google::Apis::WorkspaceeventsV1::TaskStatus]
|
|
869
|
+
attr_accessor :status
|
|
870
|
+
|
|
871
|
+
def initialize(**args)
|
|
872
|
+
update!(**args)
|
|
873
|
+
end
|
|
874
|
+
|
|
875
|
+
# Update properties of this object
|
|
876
|
+
def update!(**args)
|
|
877
|
+
@artifacts = args[:artifacts] if args.key?(:artifacts)
|
|
878
|
+
@context_id = args[:context_id] if args.key?(:context_id)
|
|
879
|
+
@history = args[:history] if args.key?(:history)
|
|
880
|
+
@id = args[:id] if args.key?(:id)
|
|
881
|
+
@metadata = args[:metadata] if args.key?(:metadata)
|
|
882
|
+
@status = args[:status] if args.key?(:status)
|
|
883
|
+
end
|
|
884
|
+
end
|
|
885
|
+
|
|
886
|
+
# TaskArtifactUpdateEvent represents a task delta where an artifact has been
|
|
887
|
+
# generated.
|
|
888
|
+
class TaskArtifactUpdateEvent
|
|
889
|
+
include Google::Apis::Core::Hashable
|
|
890
|
+
|
|
891
|
+
# Whether this should be appended to a prior one produced
|
|
892
|
+
# Corresponds to the JSON property `append`
|
|
893
|
+
# @return [Boolean]
|
|
894
|
+
attr_accessor :append
|
|
895
|
+
alias_method :append?, :append
|
|
896
|
+
|
|
897
|
+
# Artifacts are the container for task completed results. These are similar to
|
|
898
|
+
# Messages but are intended to be the product of a task, as opposed to point-to-
|
|
899
|
+
# point communication.
|
|
900
|
+
# Corresponds to the JSON property `artifact`
|
|
901
|
+
# @return [Google::Apis::WorkspaceeventsV1::Artifact]
|
|
902
|
+
attr_accessor :artifact
|
|
903
|
+
|
|
904
|
+
# The id of the context that this task belongs too
|
|
905
|
+
# Corresponds to the JSON property `contextId`
|
|
906
|
+
# @return [String]
|
|
907
|
+
attr_accessor :context_id
|
|
908
|
+
|
|
909
|
+
# Whether this represents the last part of an artifact
|
|
910
|
+
# Corresponds to the JSON property `lastChunk`
|
|
911
|
+
# @return [Boolean]
|
|
912
|
+
attr_accessor :last_chunk
|
|
913
|
+
alias_method :last_chunk?, :last_chunk
|
|
914
|
+
|
|
915
|
+
# Optional metadata associated with the artifact update.
|
|
916
|
+
# Corresponds to the JSON property `metadata`
|
|
917
|
+
# @return [Hash<String,Object>]
|
|
918
|
+
attr_accessor :metadata
|
|
919
|
+
|
|
920
|
+
# The id of the task for this artifact
|
|
921
|
+
# Corresponds to the JSON property `taskId`
|
|
922
|
+
# @return [String]
|
|
923
|
+
attr_accessor :task_id
|
|
924
|
+
|
|
925
|
+
def initialize(**args)
|
|
926
|
+
update!(**args)
|
|
927
|
+
end
|
|
928
|
+
|
|
929
|
+
# Update properties of this object
|
|
930
|
+
def update!(**args)
|
|
931
|
+
@append = args[:append] if args.key?(:append)
|
|
932
|
+
@artifact = args[:artifact] if args.key?(:artifact)
|
|
933
|
+
@context_id = args[:context_id] if args.key?(:context_id)
|
|
934
|
+
@last_chunk = args[:last_chunk] if args.key?(:last_chunk)
|
|
935
|
+
@metadata = args[:metadata] if args.key?(:metadata)
|
|
936
|
+
@task_id = args[:task_id] if args.key?(:task_id)
|
|
937
|
+
end
|
|
938
|
+
end
|
|
939
|
+
|
|
940
|
+
#
|
|
941
|
+
class TaskPushNotificationConfig
|
|
942
|
+
include Google::Apis::Core::Hashable
|
|
943
|
+
|
|
944
|
+
# The resource name of the config. Format: tasks/`task_id`/
|
|
945
|
+
# pushNotificationConfigs/`config_id`
|
|
946
|
+
# Corresponds to the JSON property `name`
|
|
947
|
+
# @return [String]
|
|
948
|
+
attr_accessor :name
|
|
949
|
+
|
|
950
|
+
# Configuration for setting up push notifications for task updates.
|
|
951
|
+
# Corresponds to the JSON property `pushNotificationConfig`
|
|
952
|
+
# @return [Google::Apis::WorkspaceeventsV1::PushNotificationConfig]
|
|
953
|
+
attr_accessor :push_notification_config
|
|
954
|
+
|
|
955
|
+
def initialize(**args)
|
|
956
|
+
update!(**args)
|
|
957
|
+
end
|
|
958
|
+
|
|
959
|
+
# Update properties of this object
|
|
960
|
+
def update!(**args)
|
|
961
|
+
@name = args[:name] if args.key?(:name)
|
|
962
|
+
@push_notification_config = args[:push_notification_config] if args.key?(:push_notification_config)
|
|
963
|
+
end
|
|
964
|
+
end
|
|
965
|
+
|
|
966
|
+
# A container for the status of a task
|
|
967
|
+
class TaskStatus
|
|
968
|
+
include Google::Apis::Core::Hashable
|
|
969
|
+
|
|
970
|
+
# Message is one unit of communication between client and server. It is
|
|
971
|
+
# associated with a context and optionally a task. Since the server is
|
|
972
|
+
# responsible for the context definition, it must always provide a context_id in
|
|
973
|
+
# its messages. The client can optionally provide the context_id if it knows the
|
|
974
|
+
# context to associate the message to. Similarly for task_id, except the server
|
|
975
|
+
# decides if a task is created and whether to include the task_id.
|
|
976
|
+
# Corresponds to the JSON property `message`
|
|
977
|
+
# @return [Google::Apis::WorkspaceeventsV1::Message]
|
|
978
|
+
attr_accessor :message
|
|
979
|
+
|
|
980
|
+
# The current state of this task
|
|
981
|
+
# Corresponds to the JSON property `state`
|
|
982
|
+
# @return [String]
|
|
983
|
+
attr_accessor :state
|
|
984
|
+
|
|
985
|
+
# Timestamp when the status was recorded. Example: "2023-10-27T10:00:00Z"
|
|
986
|
+
# Corresponds to the JSON property `timestamp`
|
|
987
|
+
# @return [String]
|
|
988
|
+
attr_accessor :timestamp
|
|
989
|
+
|
|
990
|
+
def initialize(**args)
|
|
991
|
+
update!(**args)
|
|
992
|
+
end
|
|
993
|
+
|
|
994
|
+
# Update properties of this object
|
|
995
|
+
def update!(**args)
|
|
996
|
+
@message = args[:message] if args.key?(:message)
|
|
997
|
+
@state = args[:state] if args.key?(:state)
|
|
998
|
+
@timestamp = args[:timestamp] if args.key?(:timestamp)
|
|
999
|
+
end
|
|
1000
|
+
end
|
|
1001
|
+
|
|
1002
|
+
# TaskStatusUpdateEvent is a delta even on a task indicating that a task has
|
|
1003
|
+
# changed.
|
|
1004
|
+
class TaskStatusUpdateEvent
|
|
1005
|
+
include Google::Apis::Core::Hashable
|
|
1006
|
+
|
|
1007
|
+
# The id of the context that the task belongs to
|
|
1008
|
+
# Corresponds to the JSON property `contextId`
|
|
1009
|
+
# @return [String]
|
|
1010
|
+
attr_accessor :context_id
|
|
1011
|
+
|
|
1012
|
+
# Whether this is the last status update expected for this task.
|
|
1013
|
+
# Corresponds to the JSON property `final`
|
|
1014
|
+
# @return [Boolean]
|
|
1015
|
+
attr_accessor :final
|
|
1016
|
+
alias_method :final?, :final
|
|
1017
|
+
|
|
1018
|
+
# Optional metadata to associate with the task update.
|
|
1019
|
+
# Corresponds to the JSON property `metadata`
|
|
1020
|
+
# @return [Hash<String,Object>]
|
|
1021
|
+
attr_accessor :metadata
|
|
1022
|
+
|
|
1023
|
+
# A container for the status of a task
|
|
1024
|
+
# Corresponds to the JSON property `status`
|
|
1025
|
+
# @return [Google::Apis::WorkspaceeventsV1::TaskStatus]
|
|
1026
|
+
attr_accessor :status
|
|
1027
|
+
|
|
1028
|
+
# The id of the task that is changed
|
|
1029
|
+
# Corresponds to the JSON property `taskId`
|
|
1030
|
+
# @return [String]
|
|
1031
|
+
attr_accessor :task_id
|
|
1032
|
+
|
|
1033
|
+
def initialize(**args)
|
|
1034
|
+
update!(**args)
|
|
1035
|
+
end
|
|
1036
|
+
|
|
1037
|
+
# Update properties of this object
|
|
1038
|
+
def update!(**args)
|
|
1039
|
+
@context_id = args[:context_id] if args.key?(:context_id)
|
|
1040
|
+
@final = args[:final] if args.key?(:final)
|
|
1041
|
+
@metadata = args[:metadata] if args.key?(:metadata)
|
|
1042
|
+
@status = args[:status] if args.key?(:status)
|
|
1043
|
+
@task_id = args[:task_id] if args.key?(:task_id)
|
|
1044
|
+
end
|
|
1045
|
+
end
|
|
365
1046
|
end
|
|
366
1047
|
end
|
|
367
1048
|
end
|