Class: Google::Apis::WorkspaceeventsV1::Message

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

Instance Method Summary collapse

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

#contentArray<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_idString

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

Returns:

  • (String)


269
270
271
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 269

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


274
275
276
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 274

def extensions
  @extensions
end

#message_idString

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

Returns:

  • (String)


280
281
282
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 280

def message_id
  @message_id
end

#metadataHash<String,Object>

protolint:enable REPEATED_FIELD_NAMES_PLURALIZED Any optional metadata to provide along with the message. Corresponds to the JSON property metadata

Returns:

  • (Hash<String,Object>)


286
287
288
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 286

def 
  @metadata
end

#roleString

A role for the message. Corresponds to the JSON property role

Returns:

  • (String)


291
292
293
# File 'lib/google/apis/workspaceevents_v1/classes.rb', line 291

def role
  @role
end

#task_idString

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

Returns:

  • (String)


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