Class: Google::Apis::WorkspaceeventsV1::Message
- Inherits:
-
Object
- Object
- Google::Apis::WorkspaceeventsV1::Message
- 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
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.
Instance Attribute Summary collapse
-
#content ⇒ Array<Google::Apis::WorkspaceeventsV1::Part>
protolint:disable REPEATED_FIELD_NAMES_PLURALIZED Content is the container of the message content.
-
#context_id ⇒ String
The context id of the message.
-
#extensions ⇒ Array<String>
The URIs of extensions that are present or contributed to this Message.
-
#message_id ⇒ String
The unique identifier (e.g. UUID)of the message.
-
#metadata ⇒ Hash<String,Object>
protolint:enable REPEATED_FIELD_NAMES_PLURALIZED Any optional metadata to provide along with the message.
-
#role ⇒ String
A role for the message.
-
#task_id ⇒ String
The task id of the message.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Message
constructor
A new instance of Message.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Message
Returns a new instance of Message.
326 327 328 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 326 def initialize(**args) update!(**args) end |
Instance Attribute Details
#content ⇒ Array<Google::Apis::WorkspaceeventsV1::Part>
protolint:disable REPEATED_FIELD_NAMES_PLURALIZED Content is the container of
the message content.
Corresponds to the JSON property content
290 291 292 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 290 def content @content end |
#context_id ⇒ String
The context id of the message. This is optional and if set, the message will
be associated with the given context.
Corresponds to the JSON property contextId
296 297 298 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 296 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
301 302 303 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 301 def extensions @extensions end |
#message_id ⇒ String
The unique identifier (e.g. UUID)of the message. This is required and created
by the message creator.
Corresponds to the JSON property messageId
307 308 309 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 307 def @message_id end |
#metadata ⇒ Hash<String,Object>
protolint:enable REPEATED_FIELD_NAMES_PLURALIZED Any optional metadata to
provide along with the message.
Corresponds to the JSON property metadata
313 314 315 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 313 def @metadata end |
#role ⇒ String
A role for the message.
Corresponds to the JSON property role
318 319 320 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 318 def role @role end |
#task_id ⇒ String
The task id of the message. This is optional and if set, the message will be
associated with the given task.
Corresponds to the JSON property taskId
324 325 326 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 324 def task_id @task_id end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
331 332 333 334 335 336 337 338 339 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 331 def update!(**args) @content = args[:content] if args.key?(:content) @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) @role = args[:role] if args.key?(:role) @task_id = args[:task_id] if args.key?(:task_id) end |