Class: Google::Apis::CesV1::LfA2aV1Message
- Inherits:
-
Object
- Object
- Google::Apis::CesV1::LfA2aV1Message
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/ces_v1/classes.rb,
lib/google/apis/ces_v1/representations.rb,
lib/google/apis/ces_v1/representations.rb
Overview
Message is one unit of communication between client and server. It can be
associated with a context and/or a task. For server messages, context_id
must be provided, and task_id only if a task was created. For client
messages, both fields are optional, with the caveat that if both are provided,
they have to match (the context_id has to be the one that is set on the task)
. If only task_id is provided, the server will infer context_id from it.
Instance Attribute Summary collapse
-
#context_id ⇒ String
Optional.
-
#extensions ⇒ Array<String>
The URIs of extensions that are present or contributed to this Message.
-
#message_id ⇒ String
Required.
-
#metadata ⇒ Hash<String,Object>
Optional.
-
#parts ⇒ Array<Google::Apis::CesV1::LfA2aV1Part>
Required.
-
#reference_task_ids ⇒ Array<String>
A list of task IDs that this message references for additional context.
-
#role ⇒ String
Required.
-
#task_id ⇒ String
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ LfA2aV1Message
constructor
A new instance of LfA2aV1Message.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ LfA2aV1Message
Returns a new instance of LfA2aV1Message.
4329 4330 4331 |
# File 'lib/google/apis/ces_v1/classes.rb', line 4329 def initialize(**args) update!(**args) end |
Instance Attribute Details
#context_id ⇒ String
Optional. The context id of the message. If set, the message will be
associated with the given context.
Corresponds to the JSON property contextId
4290 4291 4292 |
# File 'lib/google/apis/ces_v1/classes.rb', line 4290 def context_id @context_id end |
#extensions ⇒ Array<String>
The URIs of extensions that are present or contributed to this Message.
Corresponds to the JSON property extensions
4295 4296 4297 |
# File 'lib/google/apis/ces_v1/classes.rb', line 4295 def extensions @extensions end |
#message_id ⇒ String
Required. The unique identifier (e.g. UUID) of the message. This is created by
the message creator.
Corresponds to the JSON property messageId
4301 4302 4303 |
# File 'lib/google/apis/ces_v1/classes.rb', line 4301 def @message_id end |
#metadata ⇒ Hash<String,Object>
Optional. Any metadata to provide along with the message.
Corresponds to the JSON property metadata
4306 4307 4308 |
# File 'lib/google/apis/ces_v1/classes.rb', line 4306 def @metadata end |
#parts ⇒ Array<Google::Apis::CesV1::LfA2aV1Part>
Required. Parts is the container of the message content.
Corresponds to the JSON property parts
4311 4312 4313 |
# File 'lib/google/apis/ces_v1/classes.rb', line 4311 def parts @parts end |
#reference_task_ids ⇒ Array<String>
A list of task IDs that this message references for additional context.
Corresponds to the JSON property referenceTaskIds
4316 4317 4318 |
# File 'lib/google/apis/ces_v1/classes.rb', line 4316 def reference_task_ids @reference_task_ids end |
#role ⇒ String
Required. Identifies the sender of the message.
Corresponds to the JSON property role
4321 4322 4323 |
# File 'lib/google/apis/ces_v1/classes.rb', line 4321 def role @role end |
#task_id ⇒ String
Optional. The task id of the message. If set, the message will be associated
with the given task.
Corresponds to the JSON property taskId
4327 4328 4329 |
# File 'lib/google/apis/ces_v1/classes.rb', line 4327 def task_id @task_id end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 |
# File 'lib/google/apis/ces_v1/classes.rb', line 4334 def update!(**args) @context_id = args[:context_id] if args.key?(:context_id) @extensions = args[:extensions] if args.key?(:extensions) @message_id = args[:message_id] if args.key?(:message_id) @metadata = args[:metadata] if args.key?(:metadata) @parts = args[:parts] if args.key?(:parts) @reference_task_ids = args[:reference_task_ids] if args.key?(:reference_task_ids) @role = args[:role] if args.key?(:role) @task_id = args[:task_id] if args.key?(:task_id) end |