Class: BotFramework::ConversationParameters

Inherits:
Base
  • Object
show all
Defined in:
lib/bot_framework/models/conversation_parameters.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#==, #_deserialize, #_to_hash, #as_json, attr_accessor, attribute_map, #attributes, #attributes_hash, #build_from_hash, #compact_attributes_hash, #eql?, #hash, #list_invalid_properties, #to_body, #to_hash, #to_json, #to_s, #valid?

Constructor Details

#initialize(attributes = {}) ⇒ ConversationParameters

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/bot_framework/models/conversation_parameters.rb', line 27

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  self.is_group = attributes[:isGroup] if attributes.key?(:isGroup)

  self.bot = attributes[:bot] if attributes.key?(:bot)

  if attributes.key?(:members)
    if (value = attributes[:members]).is_a?(Array)
      self.members = value
    end
  end

  self.topic_name = attributes[:topicName] if attributes.key?(:topicName)
end

Instance Attribute Details

#botObject

The bot address for this conversation



7
8
9
# File 'lib/bot_framework/models/conversation_parameters.rb', line 7

def bot
  @bot
end

#is_groupObject

IsGroup



4
5
6
# File 'lib/bot_framework/models/conversation_parameters.rb', line 4

def is_group
  @is_group
end

#membersObject

Members to add to the conversation



10
11
12
# File 'lib/bot_framework/models/conversation_parameters.rb', line 10

def members
  @members
end

#topic_nameObject

(Optional) Topic of the conversation (if supported by the channel)



13
14
15
# File 'lib/bot_framework/models/conversation_parameters.rb', line 13

def topic_name
  @topic_name
end

Class Method Details

.swagger_typesObject

Attribute type mapping.



16
17
18
19
20
21
22
23
# File 'lib/bot_framework/models/conversation_parameters.rb', line 16

def self.swagger_types
  {
    is_group: :BOOLEAN,
    bot: :ChannelAccount,
    members: :'Array<ChannelAccount>',
    topic_name: :String
  }
end