Class: Google::Apis::WorkspaceeventsV1::Task

Inherits:
Object
  • Object
show all
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

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.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Task

Returns a new instance of Task.



904
905
906
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 904

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#artifactsArray<Google::Apis::WorkspaceeventsV1::Artifact>

A set of output artifacts for a Task. Corresponds to the JSON property artifacts



873
874
875
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 873

def artifacts
  @artifacts
end

#context_idString

Unique identifier (e.g. UUID) for the contextual collection of interactions ( tasks and messages). Created by the A2A server. Corresponds to the JSON property contextId

Returns:

  • (String)


879
880
881
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 879

def context_id
  @context_id
end

#historyArray<Google::Apis::WorkspaceeventsV1::Message>

protolint:disable REPEATED_FIELD_NAMES_PLURALIZED The history of interactions from a task. Corresponds to the JSON property history



885
886
887
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 885

def history
  @history
end

#idString

Unique identifier (e.g. UUID) for the task, generated by the server for a new task. Corresponds to the JSON property id

Returns:

  • (String)


891
892
893
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 891

def id
  @id
end

#metadataHash<String,Object>

protolint:enable REPEATED_FIELD_NAMES_PLURALIZED A key/value object to store custom metadata about a task. Corresponds to the JSON property metadata

Returns:

  • (Hash<String,Object>)


897
898
899
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 897

def 
  @metadata
end

#statusGoogle::Apis::WorkspaceeventsV1::TaskStatus

A container for the status of a task Corresponds to the JSON property status



902
903
904
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 902

def status
  @status
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



909
910
911
912
913
914
915
916
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 909

def update!(**args)
  @artifacts = args[:artifacts] if args.key?(:artifacts)
  @context_id = args[:context_id] if args.key?(:context_id)
  @history = args[:history] if args.key?(:history)
  @id = args[:id] if args.key?(:id)
  @metadata = args[:metadata] if args.key?(:metadata)
  @status = args[:status] if args.key?(:status)
end