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.



5127
5128
5129
# File 'lib/google/apis/chat_v1/classes.rb', line 5127

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

Instance Attribute Details

#nameString

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

Returns:

  • (String)


5115
5116
5117
# File 'lib/google/apis/chat_v1/classes.rb', line 5115

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)


5125
5126
5127
# File 'lib/google/apis/chat_v1/classes.rb', line 5125

def thread_key
  @thread_key
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5132
5133
5134
5135
# File 'lib/google/apis/chat_v1/classes.rb', line 5132

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