Class: BotFramework::APIResponse

Inherits:
Base
  • Object
show all
Defined in:
lib/bot_framework/models/api_response.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 = {}) ⇒ APIResponse

Initializes the object

Parameters:

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

    Model attributes in the form of hash



14
15
16
17
18
19
20
21
# File 'lib/bot_framework/models/api_response.rb', line 14

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.message = attributes[:message] if attributes.key?(:message)
end

Instance Attribute Details

#messageObject

Returns the value of attribute message.



3
4
5
# File 'lib/bot_framework/models/api_response.rb', line 3

def message
  @message
end

Class Method Details

.swagger_typesObject

Attribute type mapping.



6
7
8
9
10
# File 'lib/bot_framework/models/api_response.rb', line 6

def self.swagger_types
  {
    message: :String
  }
end