Class: AsposeCellsCloud::PivotField
- Inherits:
-
Object
- Object
- AsposeCellsCloud::PivotField
- Defined in:
- lib/aspose_cells_cloud/models/pivot_field.rb
Instance Attribute Summary collapse
-
#auto_show_count ⇒ Object
Returns the value of attribute auto_show_count.
-
#auto_show_field ⇒ Object
Returns the value of attribute auto_show_field.
-
#auto_sort_field ⇒ Object
Returns the value of attribute auto_sort_field.
-
#base_field ⇒ Object
Returns the value of attribute base_field.
-
#base_index ⇒ Object
Returns the value of attribute base_index.
-
#base_item ⇒ Object
Returns the value of attribute base_item.
-
#base_item_position ⇒ Object
Returns the value of attribute base_item_position.
-
#current_page_item ⇒ Object
Returns the value of attribute current_page_item.
-
#data_display_format ⇒ Object
Returns the value of attribute data_display_format.
-
#display_name ⇒ Object
Returns the value of attribute display_name.
-
#drag_to_column ⇒ Object
Returns the value of attribute drag_to_column.
-
#drag_to_data ⇒ Object
Returns the value of attribute drag_to_data.
-
#drag_to_hide ⇒ Object
Returns the value of attribute drag_to_hide.
-
#drag_to_page ⇒ Object
Returns the value of attribute drag_to_page.
-
#drag_to_row ⇒ Object
Returns the value of attribute drag_to_row.
-
#function ⇒ Object
Returns the value of attribute function.
-
#insert_blank_row ⇒ Object
Returns the value of attribute insert_blank_row.
-
#is_ascend_show ⇒ Object
Returns the value of attribute is_ascend_show.
-
#is_ascend_sort ⇒ Object
Returns the value of attribute is_ascend_sort.
-
#is_auto_show ⇒ Object
Returns the value of attribute is_auto_show.
-
#is_auto_sort ⇒ Object
Returns the value of attribute is_auto_sort.
-
#is_auto_subtotals ⇒ Object
Returns the value of attribute is_auto_subtotals.
-
#is_calculated_field ⇒ Object
Returns the value of attribute is_calculated_field.
-
#is_include_new_items_in_filter ⇒ Object
Returns the value of attribute is_include_new_items_in_filter.
-
#is_insert_page_breaks_between_items ⇒ Object
Returns the value of attribute is_insert_page_breaks_between_items.
-
#is_multiple_item_selection_allowed ⇒ Object
Returns the value of attribute is_multiple_item_selection_allowed.
-
#is_repeat_item_labels ⇒ Object
Returns the value of attribute is_repeat_item_labels.
-
#item_count ⇒ Object
Returns the value of attribute item_count.
-
#items ⇒ Object
Returns the value of attribute items.
-
#name ⇒ Object
Returns the value of attribute name.
-
#number ⇒ Object
Returns the value of attribute number.
-
#number_format ⇒ Object
Returns the value of attribute number_format.
-
#original_items ⇒ Object
Returns the value of attribute original_items.
-
#pivot_items ⇒ Object
Returns the value of attribute pivot_items.
-
#position ⇒ Object
Returns the value of attribute position.
-
#show_all_items ⇒ Object
Returns the value of attribute show_all_items.
-
#show_compact ⇒ Object
Returns the value of attribute show_compact.
-
#show_in_outline_form ⇒ Object
Returns the value of attribute show_in_outline_form.
-
#show_subtotal_at_top ⇒ Object
Returns the value of attribute show_subtotal_at_top.
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 = {}) ⇒ PivotField
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 = {}) ⇒ PivotField
Initializes the object
199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 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 285 286 287 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 313 314 315 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 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 199 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?(:'PivotItems') if (value = attributes[:'PivotItems']).is_a?(Array) self.pivot_items = value end end if attributes.has_key?(:'DisplayName') self.display_name = attributes[:'DisplayName'] end if attributes.has_key?(:'NumberFormat') self.number_format = attributes[:'NumberFormat'] end if attributes.has_key?(:'DragToColumn') self.drag_to_column = attributes[:'DragToColumn'] end if attributes.has_key?(:'IsAutoShow') self.is_auto_show = attributes[:'IsAutoShow'] end if attributes.has_key?(:'IsRepeatItemLabels') self.is_repeat_item_labels = attributes[:'IsRepeatItemLabels'] end if attributes.has_key?(:'DragToRow') self.drag_to_row = attributes[:'DragToRow'] end if attributes.has_key?(:'IsAutoSort') self.is_auto_sort = attributes[:'IsAutoSort'] end if attributes.has_key?(:'InsertBlankRow') self.insert_blank_row = attributes[:'InsertBlankRow'] end if attributes.has_key?(:'ShowSubtotalAtTop') self.show_subtotal_at_top = attributes[:'ShowSubtotalAtTop'] end if attributes.has_key?(:'ShowCompact') self.show_compact = attributes[:'ShowCompact'] end if attributes.has_key?(:'Function') self.function = attributes[:'Function'] end if attributes.has_key?(:'IsMultipleItemSelectionAllowed') self.is_multiple_item_selection_allowed = attributes[:'IsMultipleItemSelectionAllowed'] end if attributes.has_key?(:'DataDisplayFormat') self.data_display_format = attributes[:'DataDisplayFormat'] end if attributes.has_key?(:'BaseItemPosition') self.base_item_position = attributes[:'BaseItemPosition'] end if attributes.has_key?(:'IsInsertPageBreaksBetweenItems') self.is_insert_page_breaks_between_items = attributes[:'IsInsertPageBreaksBetweenItems'] end if attributes.has_key?(:'ShowAllItems') self.show_all_items = attributes[:'ShowAllItems'] end if attributes.has_key?(:'BaseItem') self.base_item = attributes[:'BaseItem'] end if attributes.has_key?(:'ItemCount') self.item_count = attributes[:'ItemCount'] end if attributes.has_key?(:'Name') self.name = attributes[:'Name'] end if attributes.has_key?(:'ShowInOutlineForm') self.show_in_outline_form = attributes[:'ShowInOutlineForm'] end if attributes.has_key?(:'Items') if (value = attributes[:'Items']).is_a?(Array) self.items = value end end if attributes.has_key?(:'AutoShowField') self.auto_show_field = attributes[:'AutoShowField'] end if attributes.has_key?(:'IsAutoSubtotals') self.is_auto_subtotals = attributes[:'IsAutoSubtotals'] end if attributes.has_key?(:'IsIncludeNewItemsInFilter') self.is_include_new_items_in_filter = attributes[:'IsIncludeNewItemsInFilter'] end if attributes.has_key?(:'CurrentPageItem') self.current_page_item = attributes[:'CurrentPageItem'] end if attributes.has_key?(:'Position') self.position = attributes[:'Position'] end if attributes.has_key?(:'IsAscendSort') self.is_ascend_sort = attributes[:'IsAscendSort'] end if attributes.has_key?(:'IsAscendShow') self.is_ascend_show = attributes[:'IsAscendShow'] end if attributes.has_key?(:'BaseField') self.base_field = attributes[:'BaseField'] end if attributes.has_key?(:'AutoSortField') self.auto_sort_field = attributes[:'AutoSortField'] end if attributes.has_key?(:'AutoShowCount') self.auto_show_count = attributes[:'AutoShowCount'] end if attributes.has_key?(:'Number') self.number = attributes[:'Number'] end if attributes.has_key?(:'DragToPage') self.drag_to_page = attributes[:'DragToPage'] end if attributes.has_key?(:'DragToData') self.drag_to_data = attributes[:'DragToData'] end if attributes.has_key?(:'BaseIndex') self.base_index = attributes[:'BaseIndex'] end if attributes.has_key?(:'OriginalItems') if (value = attributes[:'OriginalItems']).is_a?(Array) self.original_items = value end end if attributes.has_key?(:'DragToHide') self.drag_to_hide = attributes[:'DragToHide'] end if attributes.has_key?(:'IsCalculatedField') self.is_calculated_field = attributes[:'IsCalculatedField'] end end |
Instance Attribute Details
#auto_show_count ⇒ Object
Returns the value of attribute auto_show_count.
90 91 92 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 90 def auto_show_count @auto_show_count end |
#auto_show_field ⇒ Object
Returns the value of attribute auto_show_field.
72 73 74 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 72 def auto_show_field @auto_show_field end |
#auto_sort_field ⇒ Object
Returns the value of attribute auto_sort_field.
88 89 90 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 88 def auto_sort_field @auto_sort_field end |
#base_field ⇒ Object
Returns the value of attribute base_field.
86 87 88 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 86 def base_field @base_field end |
#base_index ⇒ Object
Returns the value of attribute base_index.
98 99 100 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 98 def base_index @base_index end |
#base_item ⇒ Object
Returns the value of attribute base_item.
62 63 64 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 62 def base_item @base_item end |
#base_item_position ⇒ Object
Returns the value of attribute base_item_position.
56 57 58 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 56 def base_item_position @base_item_position end |
#current_page_item ⇒ Object
Returns the value of attribute current_page_item.
78 79 80 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 78 def current_page_item @current_page_item end |
#data_display_format ⇒ Object
Returns the value of attribute data_display_format.
54 55 56 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 54 def data_display_format @data_display_format end |
#display_name ⇒ Object
Returns the value of attribute display_name.
30 31 32 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 30 def display_name @display_name end |
#drag_to_column ⇒ Object
Returns the value of attribute drag_to_column.
34 35 36 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 34 def drag_to_column @drag_to_column end |
#drag_to_data ⇒ Object
Returns the value of attribute drag_to_data.
96 97 98 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 96 def drag_to_data @drag_to_data end |
#drag_to_hide ⇒ Object
Returns the value of attribute drag_to_hide.
102 103 104 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 102 def drag_to_hide @drag_to_hide end |
#drag_to_page ⇒ Object
Returns the value of attribute drag_to_page.
94 95 96 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 94 def drag_to_page @drag_to_page end |
#drag_to_row ⇒ Object
Returns the value of attribute drag_to_row.
40 41 42 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 40 def drag_to_row @drag_to_row end |
#function ⇒ Object
Returns the value of attribute function.
50 51 52 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 50 def function @function end |
#insert_blank_row ⇒ Object
Returns the value of attribute insert_blank_row.
44 45 46 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 44 def insert_blank_row @insert_blank_row end |
#is_ascend_show ⇒ Object
Returns the value of attribute is_ascend_show.
84 85 86 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 84 def is_ascend_show @is_ascend_show end |
#is_ascend_sort ⇒ Object
Returns the value of attribute is_ascend_sort.
82 83 84 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 82 def is_ascend_sort @is_ascend_sort end |
#is_auto_show ⇒ Object
Returns the value of attribute is_auto_show.
36 37 38 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 36 def is_auto_show @is_auto_show end |
#is_auto_sort ⇒ Object
Returns the value of attribute is_auto_sort.
42 43 44 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 42 def is_auto_sort @is_auto_sort end |
#is_auto_subtotals ⇒ Object
Returns the value of attribute is_auto_subtotals.
74 75 76 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 74 def is_auto_subtotals @is_auto_subtotals end |
#is_calculated_field ⇒ Object
Returns the value of attribute is_calculated_field.
104 105 106 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 104 def is_calculated_field @is_calculated_field end |
#is_include_new_items_in_filter ⇒ Object
Returns the value of attribute is_include_new_items_in_filter.
76 77 78 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 76 def is_include_new_items_in_filter @is_include_new_items_in_filter end |
#is_insert_page_breaks_between_items ⇒ Object
Returns the value of attribute is_insert_page_breaks_between_items.
58 59 60 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 58 def is_insert_page_breaks_between_items @is_insert_page_breaks_between_items end |
#is_multiple_item_selection_allowed ⇒ Object
Returns the value of attribute is_multiple_item_selection_allowed.
52 53 54 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 52 def is_multiple_item_selection_allowed @is_multiple_item_selection_allowed end |
#is_repeat_item_labels ⇒ Object
Returns the value of attribute is_repeat_item_labels.
38 39 40 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 38 def is_repeat_item_labels @is_repeat_item_labels end |
#item_count ⇒ Object
Returns the value of attribute item_count.
64 65 66 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 64 def item_count @item_count end |
#items ⇒ Object
Returns the value of attribute items.
70 71 72 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 70 def items @items end |
#name ⇒ Object
Returns the value of attribute name.
66 67 68 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 66 def name @name end |
#number ⇒ Object
Returns the value of attribute number.
92 93 94 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 92 def number @number end |
#number_format ⇒ Object
Returns the value of attribute number_format.
32 33 34 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 32 def number_format @number_format end |
#original_items ⇒ Object
Returns the value of attribute original_items.
100 101 102 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 100 def original_items @original_items end |
#pivot_items ⇒ Object
Returns the value of attribute pivot_items.
28 29 30 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 28 def pivot_items @pivot_items end |
#position ⇒ Object
Returns the value of attribute position.
80 81 82 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 80 def position @position end |
#show_all_items ⇒ Object
Returns the value of attribute show_all_items.
60 61 62 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 60 def show_all_items @show_all_items end |
#show_compact ⇒ Object
Returns the value of attribute show_compact.
48 49 50 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 48 def show_compact @show_compact end |
#show_in_outline_form ⇒ Object
Returns the value of attribute show_in_outline_form.
68 69 70 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 68 def show_in_outline_form @show_in_outline_form end |
#show_subtotal_at_top ⇒ Object
Returns the value of attribute show_subtotal_at_top.
46 47 48 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 46 def show_subtotal_at_top @show_subtotal_at_top end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 108 def self.attribute_map { :'pivot_items' => :'PivotItems', :'display_name' => :'DisplayName', :'number_format' => :'NumberFormat', :'drag_to_column' => :'DragToColumn', :'is_auto_show' => :'IsAutoShow', :'is_repeat_item_labels' => :'IsRepeatItemLabels', :'drag_to_row' => :'DragToRow', :'is_auto_sort' => :'IsAutoSort', :'insert_blank_row' => :'InsertBlankRow', :'show_subtotal_at_top' => :'ShowSubtotalAtTop', :'show_compact' => :'ShowCompact', :'function' => :'Function', :'is_multiple_item_selection_allowed' => :'IsMultipleItemSelectionAllowed', :'data_display_format' => :'DataDisplayFormat', :'base_item_position' => :'BaseItemPosition', :'is_insert_page_breaks_between_items' => :'IsInsertPageBreaksBetweenItems', :'show_all_items' => :'ShowAllItems', :'base_item' => :'BaseItem', :'item_count' => :'ItemCount', :'name' => :'Name', :'show_in_outline_form' => :'ShowInOutlineForm', :'items' => :'Items', :'auto_show_field' => :'AutoShowField', :'is_auto_subtotals' => :'IsAutoSubtotals', :'is_include_new_items_in_filter' => :'IsIncludeNewItemsInFilter', :'current_page_item' => :'CurrentPageItem', :'position' => :'Position', :'is_ascend_sort' => :'IsAscendSort', :'is_ascend_show' => :'IsAscendShow', :'base_field' => :'BaseField', :'auto_sort_field' => :'AutoSortField', :'auto_show_count' => :'AutoShowCount', :'number' => :'Number', :'drag_to_page' => :'DragToPage', :'drag_to_data' => :'DragToData', :'base_index' => :'BaseIndex', :'original_items' => :'OriginalItems', :'drag_to_hide' => :'DragToHide', :'is_calculated_field' => :'IsCalculatedField' } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 153 def self.swagger_types { :'pivot_items' => :'Array<PivotItem>', :'display_name' => :'String', :'number_format' => :'String', :'drag_to_column' => :'BOOLEAN', :'is_auto_show' => :'BOOLEAN', :'is_repeat_item_labels' => :'BOOLEAN', :'drag_to_row' => :'BOOLEAN', :'is_auto_sort' => :'BOOLEAN', :'insert_blank_row' => :'BOOLEAN', :'show_subtotal_at_top' => :'BOOLEAN', :'show_compact' => :'BOOLEAN', :'function' => :'String', :'is_multiple_item_selection_allowed' => :'BOOLEAN', :'data_display_format' => :'String', :'base_item_position' => :'String', :'is_insert_page_breaks_between_items' => :'BOOLEAN', :'show_all_items' => :'BOOLEAN', :'base_item' => :'Integer', :'item_count' => :'Integer', :'name' => :'String', :'show_in_outline_form' => :'BOOLEAN', :'items' => :'Array<String>', :'auto_show_field' => :'Integer', :'is_auto_subtotals' => :'BOOLEAN', :'is_include_new_items_in_filter' => :'BOOLEAN', :'current_page_item' => :'Integer', :'position' => :'Integer', :'is_ascend_sort' => :'BOOLEAN', :'is_ascend_show' => :'BOOLEAN', :'base_field' => :'Integer', :'auto_sort_field' => :'Integer', :'auto_show_count' => :'Integer', :'number' => :'Integer', :'drag_to_page' => :'BOOLEAN', :'drag_to_data' => :'BOOLEAN', :'base_index' => :'Integer', :'original_items' => :'Array<String>', :'drag_to_hide' => :'BOOLEAN', :'is_calculated_field' => :'BOOLEAN' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
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 417 418 419 420 421 422 423 424 425 426 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 384 def ==(o) return true if self.equal?(o) self.class == o.class && pivot_items == o.pivot_items && display_name == o.display_name && number_format == o.number_format && drag_to_column == o.drag_to_column && is_auto_show == o.is_auto_show && is_repeat_item_labels == o.is_repeat_item_labels && drag_to_row == o.drag_to_row && is_auto_sort == o.is_auto_sort && insert_blank_row == o.insert_blank_row && show_subtotal_at_top == o.show_subtotal_at_top && show_compact == o.show_compact && function == o.function && is_multiple_item_selection_allowed == o.is_multiple_item_selection_allowed && data_display_format == o.data_display_format && base_item_position == o.base_item_position && is_insert_page_breaks_between_items == o.is_insert_page_breaks_between_items && show_all_items == o.show_all_items && base_item == o.base_item && item_count == o.item_count && name == o.name && show_in_outline_form == o.show_in_outline_form && items == o.items && auto_show_field == o.auto_show_field && is_auto_subtotals == o.is_auto_subtotals && is_include_new_items_in_filter == o.is_include_new_items_in_filter && current_page_item == o.current_page_item && position == o.position && is_ascend_sort == o.is_ascend_sort && is_ascend_show == o.is_ascend_show && base_field == o.base_field && auto_sort_field == o.auto_sort_field && auto_show_count == o.auto_show_count && number == o.number && drag_to_page == o.drag_to_page && drag_to_data == o.drag_to_data && base_index == o.base_index && original_items == o.original_items && drag_to_hide == o.drag_to_hide && is_calculated_field == o.is_calculated_field end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 464 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
530 531 532 533 534 535 536 537 538 539 540 541 542 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 530 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
443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 443 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
430 431 432 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 430 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
436 437 438 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 436 def hash [pivot_items, display_name, number_format, drag_to_column, is_auto_show, is_repeat_item_labels, drag_to_row, is_auto_sort, insert_blank_row, show_subtotal_at_top, show_compact, function, is_multiple_item_selection_allowed, data_display_format, base_item_position, is_insert_page_breaks_between_items, show_all_items, base_item, item_count, name, show_in_outline_form, items, auto_show_field, is_auto_subtotals, is_include_new_items_in_filter, current_page_item, position, is_ascend_sort, is_ascend_show, base_field, auto_sort_field, auto_show_count, number, drag_to_page, drag_to_data, base_index, original_items, drag_to_hide, is_calculated_field].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
371 372 373 374 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 371 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)
510 511 512 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 510 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
516 517 518 519 520 521 522 523 524 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 516 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
504 505 506 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 504 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
378 379 380 |
# File 'lib/aspose_cells_cloud/models/pivot_field.rb', line 378 def valid? return true end |