Class: AsposeCellsCloud::ListObject
- Inherits:
-
Object
- Object
- AsposeCellsCloud::ListObject
- Defined in:
- lib/aspose_cells_cloud/models/list_object.rb
Instance Attribute Summary collapse
-
#auto_filter ⇒ Object
Gets auto filter.
-
#display_name ⇒ Object
Gets and sets the display name.Gets the data range of the ListObject.
-
#end_column ⇒ Object
Gets the end column of the range.
-
#end_row ⇒ Object
Gets the end row of the range.
-
#link ⇒ Object
Returns the value of attribute link.
-
#list_columns ⇒ Object
Gets ListColumns of the ListObject.
-
#show_header_row ⇒ Object
Gets and sets whether this ListObject show header row.
-
#show_table_style_column_stripes ⇒ Object
Indicates whether column stripe formatting is applied.
-
#show_table_style_first_column ⇒ Object
Inidicates whether the first column in the table should have the style applied.
-
#show_table_style_last_column ⇒ Object
Indicates whether the last column in the table should have the style applied.
-
#show_table_style_row_stripes ⇒ Object
Indicates whether row stripe formatting is applied.
-
#show_totals ⇒ Object
Gets and sets whether this ListObject show total row.
-
#start_column ⇒ Object
Gets the start column of the range.
-
#start_row ⇒ Object
Gets the start row of the range.
-
#table_style_name ⇒ Object
Gets and sets the table style name.
-
#table_style_type ⇒ Object
Gets and the built-in table style.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ ListObject
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ ListObject
Initializes the object
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 |
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 122 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.has_key?(:'link') self.link = attributes[:'link'] end if attributes.has_key?(:'ShowTotals') self.show_totals = attributes[:'ShowTotals'] end if attributes.has_key?(:'TableStyleType') self.table_style_type = attributes[:'TableStyleType'] end if attributes.has_key?(:'DisplayName') self.display_name = attributes[:'DisplayName'] end if attributes.has_key?(:'ShowHeaderRow') self.show_header_row = attributes[:'ShowHeaderRow'] end if attributes.has_key?(:'StartColumn') self.start_column = attributes[:'StartColumn'] end if attributes.has_key?(:'ShowTableStyleLastColumn') self.show_table_style_last_column = attributes[:'ShowTableStyleLastColumn'] end if attributes.has_key?(:'ShowTableStyleColumnStripes') self.show_table_style_column_stripes = attributes[:'ShowTableStyleColumnStripes'] end if attributes.has_key?(:'ShowTableStyleFirstColumn') self.show_table_style_first_column = attributes[:'ShowTableStyleFirstColumn'] end if attributes.has_key?(:'StartRow') self.start_row = attributes[:'StartRow'] end if attributes.has_key?(:'AutoFilter') self.auto_filter = attributes[:'AutoFilter'] end if attributes.has_key?(:'ShowTableStyleRowStripes') self.show_table_style_row_stripes = attributes[:'ShowTableStyleRowStripes'] end if attributes.has_key?(:'EndColumn') self.end_column = attributes[:'EndColumn'] end if attributes.has_key?(:'TableStyleName') self.table_style_name = attributes[:'TableStyleName'] end if attributes.has_key?(:'ListColumns') if (value = attributes[:'ListColumns']).is_a?(Array) self.list_columns = value end end if attributes.has_key?(:'EndRow') self.end_row = attributes[:'EndRow'] end end |
Instance Attribute Details
#auto_filter ⇒ Object
Gets auto filter.
58 59 60 |
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 58 def auto_filter @auto_filter end |
#display_name ⇒ Object
Gets and sets the display name.Gets the data range of the ListObject.
37 38 39 |
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 37 def display_name @display_name end |
#end_column ⇒ Object
Gets the end column of the range.
64 65 66 |
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 64 def end_column @end_column end |
#end_row ⇒ Object
Gets the end row of the range.
73 74 75 |
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 73 def end_row @end_row end |
#link ⇒ Object
Returns the value of attribute link.
28 29 30 |
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 28 def link @link end |
#list_columns ⇒ Object
Gets ListColumns of the ListObject.
70 71 72 |
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 70 def list_columns @list_columns end |
#show_header_row ⇒ Object
Gets and sets whether this ListObject show header row.
40 41 42 |
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 40 def show_header_row @show_header_row end |
#show_table_style_column_stripes ⇒ Object
Indicates whether column stripe formatting is applied.
49 50 51 |
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 49 def show_table_style_column_stripes @show_table_style_column_stripes end |
#show_table_style_first_column ⇒ Object
Inidicates whether the first column in the table should have the style applied.
52 53 54 |
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 52 def show_table_style_first_column @show_table_style_first_column end |
#show_table_style_last_column ⇒ Object
Indicates whether the last column in the table should have the style applied.
46 47 48 |
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 46 def show_table_style_last_column @show_table_style_last_column end |
#show_table_style_row_stripes ⇒ Object
Indicates whether row stripe formatting is applied.
61 62 63 |
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 61 def show_table_style_row_stripes @show_table_style_row_stripes end |
#show_totals ⇒ Object
Gets and sets whether this ListObject show total row.
31 32 33 |
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 31 def show_totals @show_totals end |
#start_column ⇒ Object
Gets the start column of the range.
43 44 45 |
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 43 def start_column @start_column end |
#start_row ⇒ Object
Gets the start row of the range.
55 56 57 |
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 55 def start_row @start_row end |
#table_style_name ⇒ Object
Gets and sets the table style name.
67 68 69 |
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 67 def table_style_name @table_style_name end |
#table_style_type ⇒ Object
Gets and the built-in table style.
34 35 36 |
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 34 def table_style_type @table_style_type end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 77 def self.attribute_map { :'link' => :'link', :'show_totals' => :'ShowTotals', :'table_style_type' => :'TableStyleType', :'display_name' => :'DisplayName', :'show_header_row' => :'ShowHeaderRow', :'start_column' => :'StartColumn', :'show_table_style_last_column' => :'ShowTableStyleLastColumn', :'show_table_style_column_stripes' => :'ShowTableStyleColumnStripes', :'show_table_style_first_column' => :'ShowTableStyleFirstColumn', :'start_row' => :'StartRow', :'auto_filter' => :'AutoFilter', :'show_table_style_row_stripes' => :'ShowTableStyleRowStripes', :'end_column' => :'EndColumn', :'table_style_name' => :'TableStyleName', :'list_columns' => :'ListColumns', :'end_row' => :'EndRow' } end |
.swagger_types ⇒ Object
Attribute type mapping.
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 99 def self.swagger_types { :'link' => :'Link', :'show_totals' => :'BOOLEAN', :'table_style_type' => :'String', :'display_name' => :'String', :'show_header_row' => :'BOOLEAN', :'start_column' => :'Integer', :'show_table_style_last_column' => :'BOOLEAN', :'show_table_style_column_stripes' => :'BOOLEAN', :'show_table_style_first_column' => :'BOOLEAN', :'start_row' => :'Integer', :'auto_filter' => :'AutoFilter', :'show_table_style_row_stripes' => :'BOOLEAN', :'end_column' => :'Integer', :'table_style_name' => :'String', :'list_columns' => :'Array<ListColumn>', :'end_row' => :'Integer' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 |
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 211 def ==(o) return true if self.equal?(o) self.class == o.class && link == o.link && show_totals == o.show_totals && table_style_type == o.table_style_type && display_name == o.display_name && show_header_row == o.show_header_row && start_column == o.start_column && show_table_style_last_column == o.show_table_style_last_column && show_table_style_column_stripes == o.show_table_style_column_stripes && show_table_style_first_column == o.show_table_style_first_column && start_row == o.start_row && auto_filter == o.auto_filter && show_table_style_row_stripes == o.show_table_style_row_stripes && end_column == o.end_column && table_style_name == o.table_style_name && list_columns == o.list_columns && end_row == o.end_row end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 |
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 268 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :BOOLEAN if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model temp_model = AsposeCellsCloud.const_get(type).new temp_model.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
334 335 336 337 338 339 340 341 342 343 344 345 346 |
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 334 def _to_hash(value) if value.is_a?(Array) value.compact.map{ |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 |
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 247 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(o) ⇒ Boolean
234 235 236 |
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 234 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
240 241 242 |
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 240 def hash [link, show_totals, table_style_type, display_name, show_header_row, start_column, show_table_style_last_column, show_table_style_column_stripes, show_table_style_first_column, start_row, auto_filter, show_table_style_row_stripes, end_column, table_style_name, list_columns, end_row].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
198 199 200 201 |
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 198 def list_invalid_properties invalid_properties = Array.new return invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
314 315 316 |
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 314 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
320 321 322 323 324 325 326 327 328 |
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 320 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
308 309 310 |
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 308 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
205 206 207 |
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 205 def valid? return true end |