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.



5061
5062
5063
# File 'lib/google/apis/ces_v1/classes.rb', line 5061

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)


5022
5023
5024
# File 'lib/google/apis/ces_v1/classes.rb', line 5022

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>)


5027
5028
5029
# File 'lib/google/apis/ces_v1/classes.rb', line 5027

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)


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

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>)


5038
5039
5040
# File 'lib/google/apis/ces_v1/classes.rb', line 5038

def 
  @metadata
end

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

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



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

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>)


5048
5049
5050
# File 'lib/google/apis/ces_v1/classes.rb', line 5048

def reference_task_ids
  @reference_task_ids
end

#roleString

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

Returns:

  • (String)


5053
5054
5055
# File 'lib/google/apis/ces_v1/classes.rb', line 5053

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)


5059
5060
5061
# File 'lib/google/apis/ces_v1/classes.rb', line 5059

def task_id
  @task_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
# File 'lib/google/apis/ces_v1/classes.rb', line 5066

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