Class: BotFramework::AttachmentInfo
- Defined in:
- lib/bot_framework/models/attachment_info.rb
Overview
Metdata for an attachment
Instance Attribute Summary collapse
-
#name ⇒ Object
Name of the attachment.
-
#type ⇒ Object
ContentType of the attachment.
-
#views ⇒ Object
attachment views.
Class Method Summary collapse
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ AttachmentInfo
constructor
Initializes the object.
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 = {}) ⇒ AttachmentInfo
Initializes the object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/bot_framework/models/attachment_info.rb', line 24 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.name = attributes[:name] if attributes.key?(:name) self.type = attributes[:type] if attributes.key?(:type) if attributes.key?(:views) if (value = attributes[:views]).is_a?(Array) self.views = value end end end |
Instance Attribute Details
#name ⇒ Object
Name of the attachment
5 6 7 |
# File 'lib/bot_framework/models/attachment_info.rb', line 5 def name @name end |
#type ⇒ Object
ContentType of the attachment
8 9 10 |
# File 'lib/bot_framework/models/attachment_info.rb', line 8 def type @type end |
#views ⇒ Object
attachment views
11 12 13 |
# File 'lib/bot_framework/models/attachment_info.rb', line 11 def views @views end |
Class Method Details
.swagger_types ⇒ Object
Attribute type mapping.
14 15 16 17 18 19 20 |
# File 'lib/bot_framework/models/attachment_info.rb', line 14 def self.swagger_types { name: :String, type: :String, views: :'Array<AttachmentView>' } end |