Class: Google::Apis::WorkspaceeventsV1::StreamResponse
- Inherits:
-
Object
- Object
- Google::Apis::WorkspaceeventsV1::StreamResponse
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/workspaceevents_v1/classes.rb,
lib/google/apis/workspaceevents_v1/representations.rb,
lib/google/apis/workspaceevents_v1/representations.rb
Overview
The stream response for a message. The stream should be one of the following sequences: If the response is a message, the stream should contain one, and only one, message and then close If the response is a task lifecycle, the first response should be a Task object followed by zero or more TaskStatusUpdateEvents and TaskArtifactUpdateEvents. The stream should complete when the Task if in an interrupted or terminal state. A stream that ends before these conditions are met are
Instance Attribute Summary collapse
-
#artifact_update ⇒ Google::Apis::WorkspaceeventsV1::TaskArtifactUpdateEvent
TaskArtifactUpdateEvent represents a task delta where an artifact has been generated.
-
#message ⇒ Google::Apis::WorkspaceeventsV1::Message
Message is one unit of communication between client and server.
-
#status_update ⇒ Google::Apis::WorkspaceeventsV1::TaskStatusUpdateEvent
TaskStatusUpdateEvent is a delta even on a task indicating that a task has changed.
-
#task ⇒ Google::Apis::WorkspaceeventsV1::Task
Task is the core unit of action for A2A.
Instance Method Summary collapse
-
#initialize(**args) ⇒ StreamResponse
constructor
A new instance of StreamResponse.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ StreamResponse
Returns a new instance of StreamResponse.
696 697 698 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 696 def initialize(**args) update!(**args) end |
Instance Attribute Details
#artifact_update ⇒ Google::Apis::WorkspaceeventsV1::TaskArtifactUpdateEvent
TaskArtifactUpdateEvent represents a task delta where an artifact has been
generated.
Corresponds to the JSON property artifactUpdate
671 672 673 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 671 def artifact_update @artifact_update end |
#message ⇒ Google::Apis::WorkspaceeventsV1::Message
Message is one unit of communication between client and server. It is
associated with a context and optionally a task. Since the server is
responsible for the context definition, it must always provide a context_id in
its messages. The client can optionally provide the context_id if it knows the
context to associate the message to. Similarly for task_id, except the server
decides if a task is created and whether to include the task_id.
Corresponds to the JSON property message
681 682 683 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 681 def @message end |
#status_update ⇒ Google::Apis::WorkspaceeventsV1::TaskStatusUpdateEvent
TaskStatusUpdateEvent is a delta even on a task indicating that a task has
changed.
Corresponds to the JSON property statusUpdate
687 688 689 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 687 def status_update @status_update end |
#task ⇒ Google::Apis::WorkspaceeventsV1::Task
Task is the core unit of action for A2A. It has a current status and when
results are created for the task they are stored in the artifact. If there are
multiple turns for a task, these are stored in history.
Corresponds to the JSON property task
694 695 696 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 694 def task @task end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
701 702 703 704 705 706 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 701 def update!(**args) @artifact_update = args[:artifact_update] if args.key?(:artifact_update) @message = args[:message] if args.key?(:message) @status_update = args[:status_update] if args.key?(:status_update) @task = args[:task] if args.key?(:task) end |