Class: BotFramework::AttachmentView
- Defined in:
- lib/bot_framework/models/attachment_view.rb
Overview
Attachment View name and size
Instance Attribute Summary collapse
-
#size ⇒ Object
Name of the attachment.
-
#view_id ⇒ Object
content type of the attachmnet.
Class Method Summary collapse
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ AttachmentView
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 = {}) ⇒ AttachmentView
Initializes the object
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/bot_framework/models/attachment_view.rb', line 20 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.view_id = attributes[:viewId] if attributes.key?(:viewId) self.size = attributes[:size] if attributes.key?(:size) end |
Instance Attribute Details
#size ⇒ Object
Name of the attachment
8 9 10 |
# File 'lib/bot_framework/models/attachment_view.rb', line 8 def size @size end |
#view_id ⇒ Object
content type of the attachmnet
5 6 7 |
# File 'lib/bot_framework/models/attachment_view.rb', line 5 def view_id @view_id end |
Class Method Details
.swagger_types ⇒ Object
Attribute type mapping.
11 12 13 14 15 16 |
# File 'lib/bot_framework/models/attachment_view.rb', line 11 def self.swagger_types { view_id: :String, size: :Integer } end |