Class: Google::Apis::CesV1::LfA2aV1Message

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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ LfA2aV1Message

Returns a new instance of LfA2aV1Message.



5042
5043
5044
# File 'lib/google/apis/ces_v1/classes.rb', line 5042

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

Instance Attribute Details

#context_idString

Optional. The context id of the message. If set, the message will be associated with the given context. Corresponds to the JSON property contextId

Returns:

  • (String)


5003
5004
5005
# File 'lib/google/apis/ces_v1/classes.rb', line 5003

def context_id
  @context_id
end

#extensionsArray<String>

The URIs of extensions that are present or contributed to this Message. Corresponds to the JSON property extensions

Returns:

  • (Array<String>)


5008
5009
5010
# File 'lib/google/apis/ces_v1/classes.rb', line 5008

def extensions
  @extensions
end

#message_idString

Required. The unique identifier (e.g. UUID) of the message. This is created by the message creator. Corresponds to the JSON property messageId

Returns:

  • (String)


5014
5015
5016
# File 'lib/google/apis/ces_v1/classes.rb', line 5014

def message_id
  @message_id
end

#metadataHash<String,Object>

Optional. Any metadata to provide along with the message. Corresponds to the JSON property metadata

Returns:

  • (Hash<String,Object>)


5019
5020
5021
# File 'lib/google/apis/ces_v1/classes.rb', line 5019

def 
  @metadata
end

#partsArray<Google::Apis::CesV1::LfA2aV1Part>

Required. Parts is the container of the message content. Corresponds to the JSON property parts



5024
5025
5026
# File 'lib/google/apis/ces_v1/classes.rb', line 5024

def parts
  @parts
end

#reference_task_idsArray<String>

A list of task IDs that this message references for additional context. Corresponds to the JSON property referenceTaskIds

Returns:

  • (Array<String>)


5029
5030
5031
# File 'lib/google/apis/ces_v1/classes.rb', line 5029

def reference_task_ids
  @reference_task_ids
end

#roleString

Required. Identifies the sender of the message. Corresponds to the JSON property role

Returns:

  • (String)


5034
5035
5036
# File 'lib/google/apis/ces_v1/classes.rb', line 5034

def role
  @role
end

#task_idString

Optional. The task id of the message. If set, the message will be associated with the given task. Corresponds to the JSON property taskId

Returns:

  • (String)


5040
5041
5042
# File 'lib/google/apis/ces_v1/classes.rb', line 5040

def task_id
  @task_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
# File 'lib/google/apis/ces_v1/classes.rb', line 5047

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