Class: BotFramework::CardImage

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

Initializes the object

Parameters:

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

    Model attributes in the form of hash



23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/bot_framework/models/card_image.rb', line 23

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

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

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

Instance Attribute Details

#altObject

Image description intended for screen readers



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

def alt
  @alt
end

#tapObject

Action assigned to specific Attachment.E.g.navigate to specific URL or play/open media content



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

def tap
  @tap
end

#urlObject

URL Thumbnail image for major content property.



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

def url
  @url
end

Class Method Details

.swagger_typesObject

Attribute type mapping.



13
14
15
16
17
18
19
# File 'lib/bot_framework/models/card_image.rb', line 13

def self.swagger_types
  {
    url: :String,
    alt: :String,
    tap: :CardAction
  }
end