Class: AsposeCellsCloud::ListObject

Inherits:
Object
  • Object
show all
Defined in:
lib/aspose_cells_cloud/models/list_object.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ ListObject

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 137

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?(:'AutoFilter')
      self.auto_filter = attributes[:'AutoFilter']
  end
  if attributes.has_key?(:'DisplayName')
      self.display_name = attributes[:'DisplayName']
  end
  if attributes.has_key?(:'StartColumn')
      self.start_column = attributes[:'StartColumn']
  end
  if attributes.has_key?(:'StartRow')
      self.start_row = attributes[:'StartRow']
  end
  if attributes.has_key?(:'EndColumn')
      self.end_column = attributes[:'EndColumn']
  end
  if attributes.has_key?(:'EndRow')
      self.end_row = attributes[:'EndRow']
  end
  if attributes.has_key?(:'ListColumns')
      self.list_columns = attributes[:'ListColumns']
  end
  if attributes.has_key?(:'ShowHeaderRow')
      self.show_header_row = attributes[:'ShowHeaderRow']
  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?(:'ShowTableStyleLastColumn')
      self.show_table_style_last_column = attributes[:'ShowTableStyleLastColumn']
  end
  if attributes.has_key?(:'ShowTableStyleRowStripes')
      self.show_table_style_row_stripes = attributes[:'ShowTableStyleRowStripes']
  end
  if attributes.has_key?(:'ShowTotals')
      self.show_totals = attributes[:'ShowTotals']
  end
  if attributes.has_key?(:'TableStyleName')
      self.table_style_name = attributes[:'TableStyleName']
  end
  if attributes.has_key?(:'TableStyleType')
      self.table_style_type = attributes[:'TableStyleType']
  end
  if attributes.has_key?(:'DataRange')
      self.data_range = attributes[:'DataRange']
  end
  if attributes.has_key?(:'DataSourceType')
      self.data_source_type = attributes[:'DataSourceType']
  end
  if attributes.has_key?(:'Comment')
      self.comment = attributes[:'Comment']
  end
  if attributes.has_key?(:'XmlMap')
      self.xml_map = attributes[:'XmlMap']
  end
  if attributes.has_key?(:'AlternativeText')
      self.alternative_text = attributes[:'AlternativeText']
  end
  if attributes.has_key?(:'AlternativeDescription')
      self.alternative_description = attributes[:'AlternativeDescription']
  end
  if attributes.has_key?(:'link')
      self.link = attributes[:'link']
  end

end

Instance Attribute Details

#alternative_descriptionObject

Gets and sets the alternative description.



75
76
77
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 75

def alternative_description
  @alternative_description
end

#alternative_textObject

Gets and sets the alternative text.



73
74
75
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 73

def alternative_text
  @alternative_text
end

#auto_filterObject

Gets auto filter.



35
36
37
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 35

def auto_filter
  @auto_filter
end

#commentObject

Gets and sets the comment of the table.



69
70
71
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 69

def comment
  @comment
end

#data_rangeObject

Gets the data range of the ListObject.



65
66
67
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 65

def data_range
  @data_range
end

#data_source_typeObject

Gets the data source type of the table.



67
68
69
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 67

def data_source_type
  @data_source_type
end

#display_nameObject

Gets and sets the display name.



37
38
39
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 37

def display_name
  @display_name
end

#end_columnObject

Gets the end column of the range.



43
44
45
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 43

def end_column
  @end_column
end

#end_rowObject

Gets the end row of the range.



45
46
47
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 45

def end_row
  @end_row
end

Returns the value of attribute link.



77
78
79
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 77

def link
  @link
end

#list_columnsObject

Gets ListColumns of the ListObject.



47
48
49
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 47

def list_columns
  @list_columns
end

#show_header_rowObject

Gets and sets whether this ListObject show header row.



49
50
51
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 49

def show_header_row
  @show_header_row
end

#show_table_style_column_stripesObject

Indicates whether column stripe formatting is applied.



51
52
53
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 51

def show_table_style_column_stripes
  @show_table_style_column_stripes
end

#show_table_style_first_columnObject

Indicates whether the first column in the table should have the style applied.



53
54
55
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 53

def show_table_style_first_column
  @show_table_style_first_column
end

#show_table_style_last_columnObject

Indicates whether the last column in the table should have the style applied.



55
56
57
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 55

def show_table_style_last_column
  @show_table_style_last_column
end

#show_table_style_row_stripesObject

Indicates whether row stripe formatting is applied.



57
58
59
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 57

def show_table_style_row_stripes
  @show_table_style_row_stripes
end

#show_totalsObject

Gets and sets whether this ListObject show total row.



59
60
61
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 59

def show_totals
  @show_totals
end

#start_columnObject

Gets the start column of the range.



39
40
41
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 39

def start_column
  @start_column
end

#start_rowObject

Gets the start row of the range.



41
42
43
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 41

def start_row
  @start_row
end

#table_style_nameObject

Gets and sets the table style name.



61
62
63
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 61

def table_style_name
  @table_style_name
end

#table_style_typeObject

Gets and the built-in table style.



63
64
65
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 63

def table_style_type
  @table_style_type
end

#xml_mapObject

Gets an used for this list.



71
72
73
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 71

def xml_map
  @xml_map
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 80

def self.attribute_map
  {
    :'auto_filter' => :'AutoFilter',
    :'display_name' => :'DisplayName',
    :'start_column' => :'StartColumn',
    :'start_row' => :'StartRow',
    :'end_column' => :'EndColumn',
    :'end_row' => :'EndRow',
    :'list_columns' => :'ListColumns',
    :'show_header_row' => :'ShowHeaderRow',
    :'show_table_style_column_stripes' => :'ShowTableStyleColumnStripes',
    :'show_table_style_first_column' => :'ShowTableStyleFirstColumn',
    :'show_table_style_last_column' => :'ShowTableStyleLastColumn',
    :'show_table_style_row_stripes' => :'ShowTableStyleRowStripes',
    :'show_totals' => :'ShowTotals',
    :'table_style_name' => :'TableStyleName',
    :'table_style_type' => :'TableStyleType',
    :'data_range' => :'DataRange',
    :'data_source_type' => :'DataSourceType',
    :'comment' => :'Comment',
    :'xml_map' => :'XmlMap',
    :'alternative_text' => :'AlternativeText',
    :'alternative_description' => :'AlternativeDescription',
    :'link' => :'link'
  }
end

.swagger_typesObject

Attribute type mapping.



108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 108

def self.swagger_types
  {
    :'auto_filter' => :'AutoFilter',
    :'display_name' => :'String',
    :'start_column' => :'Integer',
    :'start_row' => :'Integer',
    :'end_column' => :'Integer',
    :'end_row' => :'Integer',
    :'list_columns' => :'Array<ListColumn>',
    :'show_header_row' => :'BOOLEAN',
    :'show_table_style_column_stripes' => :'BOOLEAN',
    :'show_table_style_first_column' => :'BOOLEAN',
    :'show_table_style_last_column' => :'BOOLEAN',
    :'show_table_style_row_stripes' => :'BOOLEAN',
    :'show_totals' => :'BOOLEAN',
    :'table_style_name' => :'String',
    :'table_style_type' => :'String',
    :'data_range' => :'Range',
    :'data_source_type' => :'String',
    :'comment' => :'String',
    :'xml_map' => :'XmlMap',
    :'alternative_text' => :'String',
    :'alternative_description' => :'String',
    :'link' => :'Link'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 316

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      auto_filter == o.auto_filter &&
      display_name == o.display_name &&
      start_column == o.start_column &&
      start_row == o.start_row &&
      end_column == o.end_column &&
      end_row == o.end_row &&
      list_columns == o.list_columns &&
      show_header_row == o.show_header_row &&
      show_table_style_column_stripes == o.show_table_style_column_stripes &&
      show_table_style_first_column == o.show_table_style_first_column &&
      show_table_style_last_column == o.show_table_style_last_column &&
      show_table_style_row_stripes == o.show_table_style_row_stripes &&
      show_totals == o.show_totals &&
      table_style_name == o.table_style_name &&
      table_style_type == o.table_style_type &&
      data_range == o.data_range &&
      data_source_type == o.data_source_type &&
      comment == o.comment &&
      xml_map == o.xml_map &&
      alternative_text == o.alternative_text &&
      alternative_description == o.alternative_description &&
      link == o.link 
      std_dev == o.std_dev
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 380

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

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



446
447
448
449
450
451
452
453
454
455
456
457
458
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 446

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

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 359

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

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


346
347
348
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 346

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



352
353
354
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 352

def hash
  [ auto_filter , display_name , start_column , start_row , end_column , end_row , list_columns , show_header_row , show_table_style_column_stripes , show_table_style_first_column , show_table_style_last_column , show_table_style_row_stripes , show_totals , table_style_name , table_style_type , data_range , data_source_type , comment , xml_map , alternative_text , alternative_description , link ].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properies with the reasons



214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 214

def list_invalid_properties
  invalid_properties = Array.new
  if @auto_filter.nil?
      invalid_properties.push("invalid value for 'auto_filter', auto_filter cannot be nil.")
  end
  if @display_name.nil?
      invalid_properties.push("invalid value for 'display_name', display_name cannot be nil.")
  end
  if @start_column.nil?
      invalid_properties.push("invalid value for 'start_column', start_column cannot be nil.")
  end
  if @start_row.nil?
      invalid_properties.push("invalid value for 'start_row', start_row cannot be nil.")
  end
  if @end_column.nil?
      invalid_properties.push("invalid value for 'end_column', end_column cannot be nil.")
  end
  if @end_row.nil?
      invalid_properties.push("invalid value for 'end_row', end_row cannot be nil.")
  end
  if @list_columns.nil?
      invalid_properties.push("invalid value for 'list_columns', list_columns cannot be nil.")
  end
  if @show_header_row.nil?
      invalid_properties.push("invalid value for 'show_header_row', show_header_row cannot be nil.")
  end
  if @show_table_style_column_stripes.nil?
      invalid_properties.push("invalid value for 'show_table_style_column_stripes', show_table_style_column_stripes cannot be nil.")
  end
  if @show_table_style_first_column.nil?
      invalid_properties.push("invalid value for 'show_table_style_first_column', show_table_style_first_column cannot be nil.")
  end
  if @show_table_style_last_column.nil?
      invalid_properties.push("invalid value for 'show_table_style_last_column', show_table_style_last_column cannot be nil.")
  end
  if @show_table_style_row_stripes.nil?
      invalid_properties.push("invalid value for 'show_table_style_row_stripes', show_table_style_row_stripes cannot be nil.")
  end
  if @show_totals.nil?
      invalid_properties.push("invalid value for 'show_totals', show_totals cannot be nil.")
  end
  if @table_style_name.nil?
      invalid_properties.push("invalid value for 'table_style_name', table_style_name cannot be nil.")
  end
  if @table_style_type.nil?
      invalid_properties.push("invalid value for 'table_style_type', table_style_type cannot be nil.")
  end
  if @data_range.nil?
      invalid_properties.push("invalid value for 'data_range', data_range cannot be nil.")
  end
  if @data_source_type.nil?
      invalid_properties.push("invalid value for 'data_source_type', data_source_type cannot be nil.")
  end
  if @comment.nil?
      invalid_properties.push("invalid value for 'comment', comment cannot be nil.")
  end
  if @xml_map.nil?
      invalid_properties.push("invalid value for 'xml_map', xml_map cannot be nil.")
  end
  if @alternative_text.nil?
      invalid_properties.push("invalid value for 'alternative_text', alternative_text cannot be nil.")
  end
  if @alternative_description.nil?
      invalid_properties.push("invalid value for 'alternative_description', alternative_description cannot be nil.")
  end
  if @link.nil?
      invalid_properties.push("invalid value for 'link', link cannot be nil.")
  end

  return invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



426
427
428
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 426

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



432
433
434
435
436
437
438
439
440
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 432

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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



420
421
422
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 420

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
# File 'lib/aspose_cells_cloud/models/list_object.rb', line 288

def valid?
  return false if @auto_filter.nil?
  return false if @display_name.nil?
  return false if @start_column.nil?
  return false if @start_row.nil?
  return false if @end_column.nil?
  return false if @end_row.nil?
  return false if @list_columns.nil?
  return false if @show_header_row.nil?
  return false if @show_table_style_column_stripes.nil?
  return false if @show_table_style_first_column.nil?
  return false if @show_table_style_last_column.nil?
  return false if @show_table_style_row_stripes.nil?
  return false if @show_totals.nil?
  return false if @table_style_name.nil?
  return false if @table_style_type.nil?
  return false if @data_range.nil?
  return false if @data_source_type.nil?
  return false if @comment.nil?
  return false if @xml_map.nil?
  return false if @alternative_text.nil?
  return false if @alternative_description.nil?
  return false if @link.nil?
  return true
end