Class: BotFramework::Attachment
- Defined in:
- lib/bot_framework/models/attachment.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
Embedded content.
-
#content_type ⇒ Object
mimetype/Contenttype for the file.
-
#content_url ⇒ Object
Content Url.
-
#name ⇒ Object
(OPTIONAL) The name of the attachment.
-
#thumbnail_url ⇒ Object
(OPTIONAL) Thumbnail associated with attachment.
Class Method Summary collapse
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Attachment
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 = {}) ⇒ Attachment
Initializes the object
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/bot_framework/models/attachment.rb', line 31 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 } if attributes.key?(:contentType) self.content_type = attributes[:contentType] end self.content_url = attributes[:contentUrl] if attributes.key?(:contentUrl) self.content = attributes[:content] if attributes.key?(:content) self.name = attributes[:name] if attributes.key?(:name) if attributes.key?(:thumbnailUrl) self.thumbnail_url = attributes[:thumbnailUrl] end end |
Instance Attribute Details
#content ⇒ Object
Embedded content
10 11 12 |
# File 'lib/bot_framework/models/attachment.rb', line 10 def content @content end |
#content_type ⇒ Object
mimetype/Contenttype for the file
4 5 6 |
# File 'lib/bot_framework/models/attachment.rb', line 4 def content_type @content_type end |
#content_url ⇒ Object
Content Url
7 8 9 |
# File 'lib/bot_framework/models/attachment.rb', line 7 def content_url @content_url end |
#name ⇒ Object
(OPTIONAL) The name of the attachment
13 14 15 |
# File 'lib/bot_framework/models/attachment.rb', line 13 def name @name end |
#thumbnail_url ⇒ Object
(OPTIONAL) Thumbnail associated with attachment
16 17 18 |
# File 'lib/bot_framework/models/attachment.rb', line 16 def thumbnail_url @thumbnail_url end |
Class Method Details
.swagger_types ⇒ Object
Attribute type mapping.
19 20 21 22 23 24 25 26 27 |
# File 'lib/bot_framework/models/attachment.rb', line 19 def self.swagger_types { content_type: :String, content_url: :String, content: :Object, name: :String, thumbnail_url: :String } end |