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.
299 300 301 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 299 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
263 264 265 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 263 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
269 270 271 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 269 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
274 275 276 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 274 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
280 281 282 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 280 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
286 287 288 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 286 def @metadata end |
#role ⇒ String
A role for the message.
Corresponds to the JSON property role
291 292 293 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 291 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
297 298 299 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 297 def task_id @task_id end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
304 305 306 307 308 309 310 311 312 |
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 304 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 |