Class: Google::Apis::ChatV1::Thread

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/chat_v1/classes.rb,
lib/google/apis/chat_v1/representations.rb,
lib/google/apis/chat_v1/representations.rb

Overview

A thread in a Google Chat space. For example usage, see Start or reply to a message thread. If you specify a thread when creating a message, you can set the messageReplyOption field to determine what happens if no matching thread is found.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Thread

Returns a new instance of Thread.



5244
5245
5246
# File 'lib/google/apis/chat_v1/classes.rb', line 5244

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

Instance Attribute Details

#nameString

Resource name of the thread. Example: spaces/space/threads/thread` Corresponds to the JSON propertyname`

Returns:

  • (String)


5232
5233
5234
# File 'lib/google/apis/chat_v1/classes.rb', line 5232

def name
  @name
end

#thread_keyString

Optional. Input for creating or updating a thread. Otherwise, output only. ID for the thread. Supports up to 4000 characters. This ID is unique to the Chat app that sets it. For example, if multiple Chat apps create a message using the same thread key, the messages are posted in different threads. To reply in a thread created by a person or another Chat app, specify the thread name field instead. Corresponds to the JSON property threadKey

Returns:

  • (String)


5242
5243
5244
# File 'lib/google/apis/chat_v1/classes.rb', line 5242

def thread_key
  @thread_key
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5249
5250
5251
5252
# File 'lib/google/apis/chat_v1/classes.rb', line 5249

def update!(**args)
  @name = args[:name] if args.key?(:name)
  @thread_key = args[:thread_key] if args.key?(:thread_key)
end