Class: SlackWebApi::ObjsIcon
- Defined in:
- lib/slack_web_api/models/objs_icon.rb
Overview
ObjsIcon Model.
Instance Attribute Summary collapse
-
#image_102 ⇒ String
TODO: Write general description for this method.
-
#image_132 ⇒ String
TODO: Write general description for this method.
-
#image_230 ⇒ String
TODO: Write general description for this method.
-
#image_34 ⇒ String
TODO: Write general description for this method.
-
#image_44 ⇒ String
TODO: Write general description for this method.
-
#image_68 ⇒ String
TODO: Write general description for this method.
-
#image_88 ⇒ String
TODO: Write general description for this method.
-
#image_default ⇒ TrueClass | FalseClass
TODO: Write general description for this method.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(image_102: SKIP, image_132: SKIP, image_230: SKIP, image_34: SKIP, image_44: SKIP, image_68: SKIP, image_88: SKIP, image_default: SKIP, additional_properties: nil) ⇒ ObjsIcon
constructor
A new instance of ObjsIcon.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(image_102: SKIP, image_132: SKIP, image_230: SKIP, image_34: SKIP, image_44: SKIP, image_68: SKIP, image_88: SKIP, image_default: SKIP, additional_properties: nil) ⇒ ObjsIcon
Returns a new instance of ObjsIcon.
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/slack_web_api/models/objs_icon.rb', line 77 def initialize(image_102: SKIP, image_132: SKIP, image_230: SKIP, image_34: SKIP, image_44: SKIP, image_68: SKIP, image_88: SKIP, image_default: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @image_102 = image_102 unless image_102 == SKIP @image_132 = image_132 unless image_132 == SKIP @image_230 = image_230 unless image_230 == SKIP @image_34 = image_34 unless image_34 == SKIP @image_44 = image_44 unless image_44 == SKIP @image_68 = image_68 unless image_68 == SKIP @image_88 = image_88 unless image_88 == SKIP @image_default = image_default unless image_default == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#image_102 ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/slack_web_api/models/objs_icon.rb', line 14 def image_102 @image_102 end |
#image_132 ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/slack_web_api/models/objs_icon.rb', line 18 def image_132 @image_132 end |
#image_230 ⇒ String
TODO: Write general description for this method
22 23 24 |
# File 'lib/slack_web_api/models/objs_icon.rb', line 22 def image_230 @image_230 end |
#image_34 ⇒ String
TODO: Write general description for this method
26 27 28 |
# File 'lib/slack_web_api/models/objs_icon.rb', line 26 def image_34 @image_34 end |
#image_44 ⇒ String
TODO: Write general description for this method
30 31 32 |
# File 'lib/slack_web_api/models/objs_icon.rb', line 30 def image_44 @image_44 end |
#image_68 ⇒ String
TODO: Write general description for this method
34 35 36 |
# File 'lib/slack_web_api/models/objs_icon.rb', line 34 def image_68 @image_68 end |
#image_88 ⇒ String
TODO: Write general description for this method
38 39 40 |
# File 'lib/slack_web_api/models/objs_icon.rb', line 38 def image_88 @image_88 end |
#image_default ⇒ TrueClass | FalseClass
TODO: Write general description for this method
42 43 44 |
# File 'lib/slack_web_api/models/objs_icon.rb', line 42 def image_default @image_default end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/slack_web_api/models/objs_icon.rb', line 96 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. image_102 = hash.key?('image_102') ? hash['image_102'] : SKIP image_132 = hash.key?('image_132') ? hash['image_132'] : SKIP image_230 = hash.key?('image_230') ? hash['image_230'] : SKIP image_34 = hash.key?('image_34') ? hash['image_34'] : SKIP image_44 = hash.key?('image_44') ? hash['image_44'] : SKIP image_68 = hash.key?('image_68') ? hash['image_68'] : SKIP image_88 = hash.key?('image_88') ? hash['image_88'] : SKIP image_default = hash.key?('image_default') ? hash['image_default'] : SKIP # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. ObjsIcon.new(image_102: image_102, image_132: image_132, image_230: image_230, image_34: image_34, image_44: image_44, image_68: image_68, image_88: image_88, image_default: image_default, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/slack_web_api/models/objs_icon.rb', line 45 def self.names @_hash = {} if @_hash.nil? @_hash['image_102'] = 'image_102' @_hash['image_132'] = 'image_132' @_hash['image_230'] = 'image_230' @_hash['image_34'] = 'image_34' @_hash['image_44'] = 'image_44' @_hash['image_68'] = 'image_68' @_hash['image_88'] = 'image_88' @_hash['image_default'] = 'image_default' @_hash end |
.nullables ⇒ Object
An array for nullable fields
73 74 75 |
# File 'lib/slack_web_api/models/objs_icon.rb', line 73 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/slack_web_api/models/objs_icon.rb', line 59 def self.optionals %w[ image_102 image_132 image_230 image_34 image_44 image_68 image_88 image_default ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
138 139 140 141 142 143 144 145 |
# File 'lib/slack_web_api/models/objs_icon.rb', line 138 def inspect class_name = self.class.name.split('::').last "<#{class_name} image_102: #{@image_102.inspect}, image_132: #{@image_132.inspect},"\ " image_230: #{@image_230.inspect}, image_34: #{@image_34.inspect}, image_44:"\ " #{@image_44.inspect}, image_68: #{@image_68.inspect}, image_88: #{@image_88.inspect},"\ " image_default: #{@image_default.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
129 130 131 132 133 134 135 |
# File 'lib/slack_web_api/models/objs_icon.rb', line 129 def to_s class_name = self.class.name.split('::').last "<#{class_name} image_102: #{@image_102}, image_132: #{@image_132}, image_230:"\ " #{@image_230}, image_34: #{@image_34}, image_44: #{@image_44}, image_68: #{@image_68},"\ " image_88: #{@image_88}, image_default: #{@image_default}, additional_properties:"\ " #{@additional_properties}>" end |