aspose_slides_cloud 19.10.0 → 20.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/README.md +51 -2
- data/lib/aspose_slides_cloud.rb +7 -0
- data/lib/aspose_slides_cloud/api/slides_api.rb +1847 -407
- data/lib/aspose_slides_cloud/api/slides_api_requests.rb +742 -152
- data/lib/aspose_slides_cloud/api_client.rb +1 -0
- data/lib/aspose_slides_cloud/models/arrow_head_properties.rb +0 -15
- data/lib/aspose_slides_cloud/models/axis.rb +0 -160
- data/lib/aspose_slides_cloud/models/box_and_whisker_series.rb +490 -0
- data/lib/aspose_slides_cloud/models/bubble_series.rb +2 -37
- data/lib/aspose_slides_cloud/models/chart.rb +3 -3
- data/lib/aspose_slides_cloud/models/chart_category.rb +237 -0
- data/lib/aspose_slides_cloud/models/chart_wall.rb +0 -10
- data/lib/aspose_slides_cloud/models/common_slide_view_properties.rb +205 -0
- data/lib/aspose_slides_cloud/models/document.rb +11 -1
- data/lib/aspose_slides_cloud/models/document_replace_result.rb +11 -1
- data/lib/aspose_slides_cloud/models/export_format.rb +1 -0
- data/lib/aspose_slides_cloud/models/legend.rb +0 -30
- data/lib/aspose_slides_cloud/models/line_format.rb +0 -35
- data/lib/aspose_slides_cloud/models/normal_view_restored_properties.rb +205 -0
- data/lib/aspose_slides_cloud/models/one_value_series.rb +2 -37
- data/lib/aspose_slides_cloud/models/pdf_export_options.rb +33 -6
- data/lib/aspose_slides_cloud/models/plot_area.rb +0 -25
- data/lib/aspose_slides_cloud/models/save.rb +2 -2
- data/lib/aspose_slides_cloud/models/save_slide.rb +2 -2
- data/lib/aspose_slides_cloud/models/scatter_series.rb +2 -37
- data/lib/aspose_slides_cloud/models/series.rb +2 -37
- data/lib/aspose_slides_cloud/models/series_marker.rb +0 -10
- data/lib/aspose_slides_cloud/models/slide_export_format.rb +1 -0
- data/lib/aspose_slides_cloud/models/table.rb +0 -40
- data/lib/aspose_slides_cloud/models/table_cell.rb +0 -40
- data/lib/aspose_slides_cloud/models/view_properties.rb +367 -0
- data/lib/aspose_slides_cloud/models/waterfall_series.rb +438 -0
- data/lib/aspose_slides_cloud/version.rb +1 -1
- data/spec/api/slides_api_spec.rb +16468 -11925
- data/spec/extra/extra_spec.rb +5 -5
- data/spec/spec_utils.rb +1 -1
- data/testRules.json +53 -5
- metadata +8 -2
@@ -99,31 +99,16 @@ module AsposeSlidesCloud
|
|
99
99
|
# @return Array for valid properties with the reasons
|
100
100
|
def list_invalid_properties
|
101
101
|
invalid_properties = Array.new
|
102
|
-
if @length.nil?
|
103
|
-
invalid_properties.push('invalid value for "length", length cannot be nil.')
|
104
|
-
end
|
105
|
-
|
106
|
-
if @style.nil?
|
107
|
-
invalid_properties.push('invalid value for "style", style cannot be nil.')
|
108
|
-
end
|
109
|
-
|
110
|
-
if @width.nil?
|
111
|
-
invalid_properties.push('invalid value for "width", width cannot be nil.')
|
112
|
-
end
|
113
|
-
|
114
102
|
invalid_properties
|
115
103
|
end
|
116
104
|
|
117
105
|
# Check to see if the all the properties in the model are valid
|
118
106
|
# @return true if the model is valid
|
119
107
|
def valid?
|
120
|
-
return false if @length.nil?
|
121
108
|
length_validator = EnumAttributeValidator.new('String', ['Short', 'Medium', 'Long', 'NotDefined'])
|
122
109
|
return false unless length_validator.valid?(@length)
|
123
|
-
return false if @style.nil?
|
124
110
|
style_validator = EnumAttributeValidator.new('String', ['None', 'Triangle', 'Stealth', 'Diamond', 'Oval', 'Open', 'NotDefined'])
|
125
111
|
return false unless style_validator.valid?(@style)
|
126
|
-
return false if @width.nil?
|
127
112
|
width_validator = EnumAttributeValidator.new('String', ['Narrow', 'Medium', 'Wide', 'NotDefined'])
|
128
113
|
return false unless width_validator.valid?(@width)
|
129
114
|
true
|
@@ -396,192 +396,32 @@ module AsposeSlidesCloud
|
|
396
396
|
# @return Array for valid properties with the reasons
|
397
397
|
def list_invalid_properties
|
398
398
|
invalid_properties = Array.new
|
399
|
-
if @is_visible.nil?
|
400
|
-
invalid_properties.push('invalid value for "is_visible", is_visible cannot be nil.')
|
401
|
-
end
|
402
|
-
|
403
|
-
if @has_title.nil?
|
404
|
-
invalid_properties.push('invalid value for "has_title", has_title cannot be nil.')
|
405
|
-
end
|
406
|
-
|
407
|
-
if @position.nil?
|
408
|
-
invalid_properties.push('invalid value for "position", position cannot be nil.')
|
409
|
-
end
|
410
|
-
|
411
|
-
if @display_unit.nil?
|
412
|
-
invalid_properties.push('invalid value for "display_unit", display_unit cannot be nil.')
|
413
|
-
end
|
414
|
-
|
415
|
-
if @base_unit_scale.nil?
|
416
|
-
invalid_properties.push('invalid value for "base_unit_scale", base_unit_scale cannot be nil.')
|
417
|
-
end
|
418
|
-
|
419
|
-
if @is_automatic_major_unit.nil?
|
420
|
-
invalid_properties.push('invalid value for "is_automatic_major_unit", is_automatic_major_unit cannot be nil.')
|
421
|
-
end
|
422
|
-
|
423
|
-
if @major_unit.nil?
|
424
|
-
invalid_properties.push('invalid value for "major_unit", major_unit cannot be nil.')
|
425
|
-
end
|
426
|
-
|
427
|
-
if @major_unit_scale.nil?
|
428
|
-
invalid_properties.push('invalid value for "major_unit_scale", major_unit_scale cannot be nil.')
|
429
|
-
end
|
430
|
-
|
431
|
-
if @major_tick_mark.nil?
|
432
|
-
invalid_properties.push('invalid value for "major_tick_mark", major_tick_mark cannot be nil.')
|
433
|
-
end
|
434
|
-
|
435
|
-
if @is_automatic_minor_unit.nil?
|
436
|
-
invalid_properties.push('invalid value for "is_automatic_minor_unit", is_automatic_minor_unit cannot be nil.')
|
437
|
-
end
|
438
|
-
|
439
|
-
if @minor_unit.nil?
|
440
|
-
invalid_properties.push('invalid value for "minor_unit", minor_unit cannot be nil.')
|
441
|
-
end
|
442
|
-
|
443
|
-
if @minor_unit_scale.nil?
|
444
|
-
invalid_properties.push('invalid value for "minor_unit_scale", minor_unit_scale cannot be nil.')
|
445
|
-
end
|
446
|
-
|
447
|
-
if @minor_tick_mark.nil?
|
448
|
-
invalid_properties.push('invalid value for "minor_tick_mark", minor_tick_mark cannot be nil.')
|
449
|
-
end
|
450
|
-
|
451
|
-
if @is_automatic_max_value.nil?
|
452
|
-
invalid_properties.push('invalid value for "is_automatic_max_value", is_automatic_max_value cannot be nil.')
|
453
|
-
end
|
454
|
-
|
455
|
-
if @max_value.nil?
|
456
|
-
invalid_properties.push('invalid value for "max_value", max_value cannot be nil.')
|
457
|
-
end
|
458
|
-
|
459
|
-
if @is_automatic_min_value.nil?
|
460
|
-
invalid_properties.push('invalid value for "is_automatic_min_value", is_automatic_min_value cannot be nil.')
|
461
|
-
end
|
462
|
-
|
463
|
-
if @min_value.nil?
|
464
|
-
invalid_properties.push('invalid value for "min_value", min_value cannot be nil.')
|
465
|
-
end
|
466
|
-
|
467
|
-
if @is_logarithmic.nil?
|
468
|
-
invalid_properties.push('invalid value for "is_logarithmic", is_logarithmic cannot be nil.')
|
469
|
-
end
|
470
|
-
|
471
|
-
if @log_base.nil?
|
472
|
-
invalid_properties.push('invalid value for "log_base", log_base cannot be nil.')
|
473
|
-
end
|
474
|
-
|
475
|
-
if @category_axis_type.nil?
|
476
|
-
invalid_properties.push('invalid value for "category_axis_type", category_axis_type cannot be nil.')
|
477
|
-
end
|
478
|
-
|
479
|
-
if @axis_between_categories.nil?
|
480
|
-
invalid_properties.push('invalid value for "axis_between_categories", axis_between_categories cannot be nil.')
|
481
|
-
end
|
482
|
-
|
483
|
-
if @label_offset.nil?
|
484
|
-
invalid_properties.push('invalid value for "label_offset", label_offset cannot be nil.')
|
485
|
-
end
|
486
|
-
|
487
|
-
if @is_plot_order_reversed.nil?
|
488
|
-
invalid_properties.push('invalid value for "is_plot_order_reversed", is_plot_order_reversed cannot be nil.')
|
489
|
-
end
|
490
|
-
|
491
|
-
if @is_number_format_linked_to_source.nil?
|
492
|
-
invalid_properties.push('invalid value for "is_number_format_linked_to_source", is_number_format_linked_to_source cannot be nil.')
|
493
|
-
end
|
494
|
-
|
495
|
-
if @cross_type.nil?
|
496
|
-
invalid_properties.push('invalid value for "cross_type", cross_type cannot be nil.')
|
497
|
-
end
|
498
|
-
|
499
|
-
if @cross_at.nil?
|
500
|
-
invalid_properties.push('invalid value for "cross_at", cross_at cannot be nil.')
|
501
|
-
end
|
502
|
-
|
503
|
-
if @is_automatic_tick_marks_spacing.nil?
|
504
|
-
invalid_properties.push('invalid value for "is_automatic_tick_marks_spacing", is_automatic_tick_marks_spacing cannot be nil.')
|
505
|
-
end
|
506
|
-
|
507
|
-
if @tick_marks_spacing.nil?
|
508
|
-
invalid_properties.push('invalid value for "tick_marks_spacing", tick_marks_spacing cannot be nil.')
|
509
|
-
end
|
510
|
-
|
511
|
-
if @is_automatic_tick_label_spacing.nil?
|
512
|
-
invalid_properties.push('invalid value for "is_automatic_tick_label_spacing", is_automatic_tick_label_spacing cannot be nil.')
|
513
|
-
end
|
514
|
-
|
515
|
-
if @tick_label_spacing.nil?
|
516
|
-
invalid_properties.push('invalid value for "tick_label_spacing", tick_label_spacing cannot be nil.')
|
517
|
-
end
|
518
|
-
|
519
|
-
if @tick_label_position.nil?
|
520
|
-
invalid_properties.push('invalid value for "tick_label_position", tick_label_position cannot be nil.')
|
521
|
-
end
|
522
|
-
|
523
|
-
if @tick_label_rotation_angle.nil?
|
524
|
-
invalid_properties.push('invalid value for "tick_label_rotation_angle", tick_label_rotation_angle cannot be nil.')
|
525
|
-
end
|
526
|
-
|
527
399
|
invalid_properties
|
528
400
|
end
|
529
401
|
|
530
402
|
# Check to see if the all the properties in the model are valid
|
531
403
|
# @return true if the model is valid
|
532
404
|
def valid?
|
533
|
-
return false if @is_visible.nil?
|
534
|
-
return false if @has_title.nil?
|
535
|
-
return false if @position.nil?
|
536
405
|
position_validator = EnumAttributeValidator.new('String', ['Bottom', 'Left', 'Right', 'Top'])
|
537
406
|
return false unless position_validator.valid?(@position)
|
538
|
-
return false if @display_unit.nil?
|
539
407
|
display_unit_validator = EnumAttributeValidator.new('String', ['None', 'Hundreds', 'Thousands', 'TenThousands', 'HundredThousands', 'Millions', 'TenMillions', 'HundredMillions', 'Billions', 'Trillions', 'CustomValue'])
|
540
408
|
return false unless display_unit_validator.valid?(@display_unit)
|
541
|
-
return false if @base_unit_scale.nil?
|
542
409
|
base_unit_scale_validator = EnumAttributeValidator.new('String', ['Days', 'Months', 'Years'])
|
543
410
|
return false unless base_unit_scale_validator.valid?(@base_unit_scale)
|
544
|
-
return false if @is_automatic_major_unit.nil?
|
545
|
-
return false if @major_unit.nil?
|
546
|
-
return false if @major_unit_scale.nil?
|
547
411
|
major_unit_scale_validator = EnumAttributeValidator.new('String', ['Days', 'Months', 'Years'])
|
548
412
|
return false unless major_unit_scale_validator.valid?(@major_unit_scale)
|
549
|
-
return false if @major_tick_mark.nil?
|
550
413
|
major_tick_mark_validator = EnumAttributeValidator.new('String', ['Cross', 'Inside', 'None', 'Outside'])
|
551
414
|
return false unless major_tick_mark_validator.valid?(@major_tick_mark)
|
552
|
-
return false if @is_automatic_minor_unit.nil?
|
553
|
-
return false if @minor_unit.nil?
|
554
|
-
return false if @minor_unit_scale.nil?
|
555
415
|
minor_unit_scale_validator = EnumAttributeValidator.new('String', ['Days', 'Months', 'Years'])
|
556
416
|
return false unless minor_unit_scale_validator.valid?(@minor_unit_scale)
|
557
|
-
return false if @minor_tick_mark.nil?
|
558
417
|
minor_tick_mark_validator = EnumAttributeValidator.new('String', ['Cross', 'Inside', 'None', 'Outside'])
|
559
418
|
return false unless minor_tick_mark_validator.valid?(@minor_tick_mark)
|
560
|
-
return false if @is_automatic_max_value.nil?
|
561
|
-
return false if @max_value.nil?
|
562
|
-
return false if @is_automatic_min_value.nil?
|
563
|
-
return false if @min_value.nil?
|
564
|
-
return false if @is_logarithmic.nil?
|
565
|
-
return false if @log_base.nil?
|
566
|
-
return false if @category_axis_type.nil?
|
567
419
|
category_axis_type_validator = EnumAttributeValidator.new('String', ['Text', 'Date'])
|
568
420
|
return false unless category_axis_type_validator.valid?(@category_axis_type)
|
569
|
-
return false if @axis_between_categories.nil?
|
570
|
-
return false if @label_offset.nil?
|
571
|
-
return false if @is_plot_order_reversed.nil?
|
572
|
-
return false if @is_number_format_linked_to_source.nil?
|
573
|
-
return false if @cross_type.nil?
|
574
421
|
cross_type_validator = EnumAttributeValidator.new('String', ['AxisCrossesAtZero', 'Maximum', 'Custom'])
|
575
422
|
return false unless cross_type_validator.valid?(@cross_type)
|
576
|
-
return false if @cross_at.nil?
|
577
|
-
return false if @is_automatic_tick_marks_spacing.nil?
|
578
|
-
return false if @tick_marks_spacing.nil?
|
579
|
-
return false if @is_automatic_tick_label_spacing.nil?
|
580
|
-
return false if @tick_label_spacing.nil?
|
581
|
-
return false if @tick_label_position.nil?
|
582
423
|
tick_label_position_validator = EnumAttributeValidator.new('String', ['High', 'Low', 'NextTo', 'None'])
|
583
424
|
return false unless tick_label_position_validator.valid?(@tick_label_position)
|
584
|
-
return false if @tick_label_rotation_angle.nil?
|
585
425
|
true
|
586
426
|
end
|
587
427
|
|
@@ -0,0 +1,490 @@
|
|
1
|
+
=begin
|
2
|
+
Copyright (c) 2019 Aspose Pty Ltd
|
3
|
+
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
5
|
+
of this software and associated documentation files (the "Software"), to deal
|
6
|
+
in the Software without restriction, including without limitation the rights
|
7
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8
|
+
copies of the Software, and to permit persons to whom the Software is
|
9
|
+
furnished to do so, subject to the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be included in all
|
12
|
+
copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
16
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
17
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
18
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
19
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
20
|
+
SOFTWARE.
|
21
|
+
=end
|
22
|
+
|
23
|
+
require 'date'
|
24
|
+
|
25
|
+
module AsposeSlidesCloud
|
26
|
+
# One value series.
|
27
|
+
class BoxAndWhiskerSeries
|
28
|
+
# Series type.
|
29
|
+
attr_accessor :type
|
30
|
+
|
31
|
+
# Series name.
|
32
|
+
attr_accessor :name
|
33
|
+
|
34
|
+
# True if each data marker in the series has a different color.
|
35
|
+
attr_accessor :is_color_varied
|
36
|
+
|
37
|
+
# Invert solid color for the series.
|
38
|
+
attr_accessor :inverted_solid_fill_color
|
39
|
+
|
40
|
+
# True if curve smoothing is turned on. Applies only to line and scatter connected by lines charts.
|
41
|
+
attr_accessor :smooth
|
42
|
+
|
43
|
+
# True if the series is plotted on second value axis.
|
44
|
+
attr_accessor :plot_on_second_axis
|
45
|
+
|
46
|
+
# Series order.
|
47
|
+
attr_accessor :order
|
48
|
+
|
49
|
+
# The number format for the series y values.
|
50
|
+
attr_accessor :number_format_of_y_values
|
51
|
+
|
52
|
+
# The number format for the series x values.
|
53
|
+
attr_accessor :number_format_of_x_values
|
54
|
+
|
55
|
+
# The number format for the series values.
|
56
|
+
attr_accessor :number_format_of_values
|
57
|
+
|
58
|
+
# The number format for the series bubble sizes.
|
59
|
+
attr_accessor :number_format_of_bubble_sizes
|
60
|
+
|
61
|
+
# True if the series shall invert its colors if the value is negative. Applies to bar, column and bubble series.
|
62
|
+
attr_accessor :invert_if_negative
|
63
|
+
|
64
|
+
# The distance of an open pie slice from the center of the pie chart is expressed as a percentage of the pie diameter.
|
65
|
+
attr_accessor :explosion
|
66
|
+
|
67
|
+
# Series marker.
|
68
|
+
attr_accessor :marker
|
69
|
+
|
70
|
+
# Fill properties set for the series.
|
71
|
+
attr_accessor :fill_format
|
72
|
+
|
73
|
+
# Effect properties set for the series.
|
74
|
+
attr_accessor :effect_format
|
75
|
+
|
76
|
+
# Line properties set for the series.
|
77
|
+
attr_accessor :line_format
|
78
|
+
|
79
|
+
# Data point type.
|
80
|
+
attr_accessor :data_point_type
|
81
|
+
|
82
|
+
# Gets or sets the values.
|
83
|
+
attr_accessor :data_points
|
84
|
+
|
85
|
+
# Quartile method.
|
86
|
+
attr_accessor :quartile_method
|
87
|
+
|
88
|
+
# True if inner points are shown.
|
89
|
+
attr_accessor :show_inner_points
|
90
|
+
|
91
|
+
# True if mean line is shown.
|
92
|
+
attr_accessor :show_mean_line
|
93
|
+
|
94
|
+
# True if mean markers are shown.
|
95
|
+
attr_accessor :show_mean_markers
|
96
|
+
|
97
|
+
# True if outlier points are shown.
|
98
|
+
attr_accessor :show_outlier_points
|
99
|
+
|
100
|
+
class EnumAttributeValidator
|
101
|
+
attr_reader :datatype
|
102
|
+
attr_reader :allowable_values
|
103
|
+
|
104
|
+
def initialize(datatype, allowable_values)
|
105
|
+
@allowable_values = allowable_values.map do |value|
|
106
|
+
case datatype.to_s
|
107
|
+
when /Integer/i
|
108
|
+
value.to_i
|
109
|
+
when /Float/i
|
110
|
+
value.to_f
|
111
|
+
else
|
112
|
+
value
|
113
|
+
end
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
def valid?(value)
|
118
|
+
!value || allowable_values.any?{ |s| s.casecmp(value) == 0 }
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
123
|
+
def self.attribute_map
|
124
|
+
{
|
125
|
+
:'type' => :'Type',
|
126
|
+
:'name' => :'Name',
|
127
|
+
:'is_color_varied' => :'IsColorVaried',
|
128
|
+
:'inverted_solid_fill_color' => :'InvertedSolidFillColor',
|
129
|
+
:'smooth' => :'Smooth',
|
130
|
+
:'plot_on_second_axis' => :'PlotOnSecondAxis',
|
131
|
+
:'order' => :'Order',
|
132
|
+
:'number_format_of_y_values' => :'NumberFormatOfYValues',
|
133
|
+
:'number_format_of_x_values' => :'NumberFormatOfXValues',
|
134
|
+
:'number_format_of_values' => :'NumberFormatOfValues',
|
135
|
+
:'number_format_of_bubble_sizes' => :'NumberFormatOfBubbleSizes',
|
136
|
+
:'invert_if_negative' => :'InvertIfNegative',
|
137
|
+
:'explosion' => :'Explosion',
|
138
|
+
:'marker' => :'Marker',
|
139
|
+
:'fill_format' => :'FillFormat',
|
140
|
+
:'effect_format' => :'EffectFormat',
|
141
|
+
:'line_format' => :'LineFormat',
|
142
|
+
:'data_point_type' => :'DataPointType',
|
143
|
+
:'data_points' => :'DataPoints',
|
144
|
+
:'quartile_method' => :'QuartileMethod',
|
145
|
+
:'show_inner_points' => :'ShowInnerPoints',
|
146
|
+
:'show_mean_line' => :'ShowMeanLine',
|
147
|
+
:'show_mean_markers' => :'ShowMeanMarkers',
|
148
|
+
:'show_outlier_points' => :'ShowOutlierPoints'
|
149
|
+
}
|
150
|
+
end
|
151
|
+
|
152
|
+
# Attribute type mapping.
|
153
|
+
def self.swagger_types
|
154
|
+
{
|
155
|
+
:'type' => :'String',
|
156
|
+
:'name' => :'String',
|
157
|
+
:'is_color_varied' => :'BOOLEAN',
|
158
|
+
:'inverted_solid_fill_color' => :'String',
|
159
|
+
:'smooth' => :'BOOLEAN',
|
160
|
+
:'plot_on_second_axis' => :'BOOLEAN',
|
161
|
+
:'order' => :'Integer',
|
162
|
+
:'number_format_of_y_values' => :'String',
|
163
|
+
:'number_format_of_x_values' => :'String',
|
164
|
+
:'number_format_of_values' => :'String',
|
165
|
+
:'number_format_of_bubble_sizes' => :'String',
|
166
|
+
:'invert_if_negative' => :'BOOLEAN',
|
167
|
+
:'explosion' => :'Integer',
|
168
|
+
:'marker' => :'SeriesMarker',
|
169
|
+
:'fill_format' => :'FillFormat',
|
170
|
+
:'effect_format' => :'EffectFormat',
|
171
|
+
:'line_format' => :'LineFormat',
|
172
|
+
:'data_point_type' => :'String',
|
173
|
+
:'data_points' => :'Array<OneValueChartDataPoint>',
|
174
|
+
:'quartile_method' => :'String',
|
175
|
+
:'show_inner_points' => :'BOOLEAN',
|
176
|
+
:'show_mean_line' => :'BOOLEAN',
|
177
|
+
:'show_mean_markers' => :'BOOLEAN',
|
178
|
+
:'show_outlier_points' => :'BOOLEAN'
|
179
|
+
}
|
180
|
+
end
|
181
|
+
|
182
|
+
# Initializes the object
|
183
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
184
|
+
def initialize(attributes = {})
|
185
|
+
return unless attributes.is_a?(Hash)
|
186
|
+
|
187
|
+
# convert string to symbol for hash key
|
188
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
189
|
+
|
190
|
+
if attributes.has_key?(:'Type')
|
191
|
+
self.type = attributes[:'Type']
|
192
|
+
end
|
193
|
+
|
194
|
+
if attributes.has_key?(:'Name')
|
195
|
+
self.name = attributes[:'Name']
|
196
|
+
end
|
197
|
+
|
198
|
+
if attributes.has_key?(:'IsColorVaried')
|
199
|
+
self.is_color_varied = attributes[:'IsColorVaried']
|
200
|
+
end
|
201
|
+
|
202
|
+
if attributes.has_key?(:'InvertedSolidFillColor')
|
203
|
+
self.inverted_solid_fill_color = attributes[:'InvertedSolidFillColor']
|
204
|
+
end
|
205
|
+
|
206
|
+
if attributes.has_key?(:'Smooth')
|
207
|
+
self.smooth = attributes[:'Smooth']
|
208
|
+
end
|
209
|
+
|
210
|
+
if attributes.has_key?(:'PlotOnSecondAxis')
|
211
|
+
self.plot_on_second_axis = attributes[:'PlotOnSecondAxis']
|
212
|
+
end
|
213
|
+
|
214
|
+
if attributes.has_key?(:'Order')
|
215
|
+
self.order = attributes[:'Order']
|
216
|
+
end
|
217
|
+
|
218
|
+
if attributes.has_key?(:'NumberFormatOfYValues')
|
219
|
+
self.number_format_of_y_values = attributes[:'NumberFormatOfYValues']
|
220
|
+
end
|
221
|
+
|
222
|
+
if attributes.has_key?(:'NumberFormatOfXValues')
|
223
|
+
self.number_format_of_x_values = attributes[:'NumberFormatOfXValues']
|
224
|
+
end
|
225
|
+
|
226
|
+
if attributes.has_key?(:'NumberFormatOfValues')
|
227
|
+
self.number_format_of_values = attributes[:'NumberFormatOfValues']
|
228
|
+
end
|
229
|
+
|
230
|
+
if attributes.has_key?(:'NumberFormatOfBubbleSizes')
|
231
|
+
self.number_format_of_bubble_sizes = attributes[:'NumberFormatOfBubbleSizes']
|
232
|
+
end
|
233
|
+
|
234
|
+
if attributes.has_key?(:'InvertIfNegative')
|
235
|
+
self.invert_if_negative = attributes[:'InvertIfNegative']
|
236
|
+
end
|
237
|
+
|
238
|
+
if attributes.has_key?(:'Explosion')
|
239
|
+
self.explosion = attributes[:'Explosion']
|
240
|
+
end
|
241
|
+
|
242
|
+
if attributes.has_key?(:'Marker')
|
243
|
+
self.marker = attributes[:'Marker']
|
244
|
+
end
|
245
|
+
|
246
|
+
if attributes.has_key?(:'FillFormat')
|
247
|
+
self.fill_format = attributes[:'FillFormat']
|
248
|
+
end
|
249
|
+
|
250
|
+
if attributes.has_key?(:'EffectFormat')
|
251
|
+
self.effect_format = attributes[:'EffectFormat']
|
252
|
+
end
|
253
|
+
|
254
|
+
if attributes.has_key?(:'LineFormat')
|
255
|
+
self.line_format = attributes[:'LineFormat']
|
256
|
+
end
|
257
|
+
|
258
|
+
if attributes.has_key?(:'DataPointType')
|
259
|
+
self.data_point_type = attributes[:'DataPointType']
|
260
|
+
end
|
261
|
+
|
262
|
+
if attributes.has_key?(:'DataPoints')
|
263
|
+
if (value = attributes[:'DataPoints']).is_a?(Array)
|
264
|
+
self.data_points = value
|
265
|
+
end
|
266
|
+
end
|
267
|
+
|
268
|
+
if attributes.has_key?(:'QuartileMethod')
|
269
|
+
self.quartile_method = attributes[:'QuartileMethod']
|
270
|
+
end
|
271
|
+
|
272
|
+
if attributes.has_key?(:'ShowInnerPoints')
|
273
|
+
self.show_inner_points = attributes[:'ShowInnerPoints']
|
274
|
+
end
|
275
|
+
|
276
|
+
if attributes.has_key?(:'ShowMeanLine')
|
277
|
+
self.show_mean_line = attributes[:'ShowMeanLine']
|
278
|
+
end
|
279
|
+
|
280
|
+
if attributes.has_key?(:'ShowMeanMarkers')
|
281
|
+
self.show_mean_markers = attributes[:'ShowMeanMarkers']
|
282
|
+
end
|
283
|
+
|
284
|
+
if attributes.has_key?(:'ShowOutlierPoints')
|
285
|
+
self.show_outlier_points = attributes[:'ShowOutlierPoints']
|
286
|
+
end
|
287
|
+
end
|
288
|
+
|
289
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
290
|
+
# @return Array for valid properties with the reasons
|
291
|
+
def list_invalid_properties
|
292
|
+
invalid_properties = Array.new
|
293
|
+
if @data_point_type.nil?
|
294
|
+
invalid_properties.push('invalid value for "data_point_type", data_point_type cannot be nil.')
|
295
|
+
end
|
296
|
+
|
297
|
+
invalid_properties
|
298
|
+
end
|
299
|
+
|
300
|
+
# Check to see if the all the properties in the model are valid
|
301
|
+
# @return true if the model is valid
|
302
|
+
def valid?
|
303
|
+
type_validator = EnumAttributeValidator.new('String', ['ClusteredColumn', 'StackedColumn', 'PercentsStackedColumn', 'ClusteredColumn3D', 'StackedColumn3D', 'PercentsStackedColumn3D', 'Column3D', 'ClusteredCylinder', 'StackedCylinder', 'PercentsStackedCylinder', 'Cylinder3D', 'ClusteredCone', 'StackedCone', 'PercentsStackedCone', 'Cone3D', 'ClusteredPyramid', 'StackedPyramid', 'PercentsStackedPyramid', 'Pyramid3D', 'Line', 'StackedLine', 'PercentsStackedLine', 'LineWithMarkers', 'StackedLineWithMarkers', 'PercentsStackedLineWithMarkers', 'Line3D', 'Pie', 'Pie3D', 'PieOfPie', 'ExplodedPie', 'ExplodedPie3D', 'BarOfPie', 'PercentsStackedBar', 'ClusteredBar3D', 'ClusteredBar', 'StackedBar', 'StackedBar3D', 'PercentsStackedBar3D', 'ClusteredHorizontalCylinder', 'StackedHorizontalCylinder', 'PercentsStackedHorizontalCylinder', 'ClusteredHorizontalCone', 'StackedHorizontalCone', 'PercentsStackedHorizontalCone', 'ClusteredHorizontalPyramid', 'StackedHorizontalPyramid', 'PercentsStackedHorizontalPyramid', 'Area', 'StackedArea', 'PercentsStackedArea', 'Area3D', 'StackedArea3D', 'PercentsStackedArea3D', 'ScatterWithMarkers', 'ScatterWithSmoothLinesAndMarkers', 'ScatterWithSmoothLines', 'ScatterWithStraightLinesAndMarkers', 'ScatterWithStraightLines', 'HighLowClose', 'OpenHighLowClose', 'VolumeHighLowClose', 'VolumeOpenHighLowClose', 'Surface3D', 'WireframeSurface3D', 'Contour', 'WireframeContour', 'Doughnut', 'ExplodedDoughnut', 'Bubble', 'BubbleWith3D', 'Radar', 'RadarWithMarkers', 'FilledRadar', 'SeriesOfMixedTypes', 'Treemap', 'Sunburst', 'Histogram', 'ParetoLine', 'BoxAndWhisker', 'Waterfall', 'Funnel'])
|
304
|
+
return false unless type_validator.valid?(@type)
|
305
|
+
return false if @data_point_type.nil?
|
306
|
+
data_point_type_validator = EnumAttributeValidator.new('String', ['OneValue', 'Scatter', 'Bubble'])
|
307
|
+
return false unless data_point_type_validator.valid?(@data_point_type)
|
308
|
+
quartile_method_validator = EnumAttributeValidator.new('String', ['Exclusive', 'Inclusive'])
|
309
|
+
return false unless quartile_method_validator.valid?(@quartile_method)
|
310
|
+
true
|
311
|
+
end
|
312
|
+
|
313
|
+
# Custom attribute writer method checking allowed values (enum).
|
314
|
+
# @param [Object] type Object to be assigned
|
315
|
+
def type=(type)
|
316
|
+
validator = EnumAttributeValidator.new('String', ['ClusteredColumn', 'StackedColumn', 'PercentsStackedColumn', 'ClusteredColumn3D', 'StackedColumn3D', 'PercentsStackedColumn3D', 'Column3D', 'ClusteredCylinder', 'StackedCylinder', 'PercentsStackedCylinder', 'Cylinder3D', 'ClusteredCone', 'StackedCone', 'PercentsStackedCone', 'Cone3D', 'ClusteredPyramid', 'StackedPyramid', 'PercentsStackedPyramid', 'Pyramid3D', 'Line', 'StackedLine', 'PercentsStackedLine', 'LineWithMarkers', 'StackedLineWithMarkers', 'PercentsStackedLineWithMarkers', 'Line3D', 'Pie', 'Pie3D', 'PieOfPie', 'ExplodedPie', 'ExplodedPie3D', 'BarOfPie', 'PercentsStackedBar', 'ClusteredBar3D', 'ClusteredBar', 'StackedBar', 'StackedBar3D', 'PercentsStackedBar3D', 'ClusteredHorizontalCylinder', 'StackedHorizontalCylinder', 'PercentsStackedHorizontalCylinder', 'ClusteredHorizontalCone', 'StackedHorizontalCone', 'PercentsStackedHorizontalCone', 'ClusteredHorizontalPyramid', 'StackedHorizontalPyramid', 'PercentsStackedHorizontalPyramid', 'Area', 'StackedArea', 'PercentsStackedArea', 'Area3D', 'StackedArea3D', 'PercentsStackedArea3D', 'ScatterWithMarkers', 'ScatterWithSmoothLinesAndMarkers', 'ScatterWithSmoothLines', 'ScatterWithStraightLinesAndMarkers', 'ScatterWithStraightLines', 'HighLowClose', 'OpenHighLowClose', 'VolumeHighLowClose', 'VolumeOpenHighLowClose', 'Surface3D', 'WireframeSurface3D', 'Contour', 'WireframeContour', 'Doughnut', 'ExplodedDoughnut', 'Bubble', 'BubbleWith3D', 'Radar', 'RadarWithMarkers', 'FilledRadar', 'SeriesOfMixedTypes', 'Treemap', 'Sunburst', 'Histogram', 'ParetoLine', 'BoxAndWhisker', 'Waterfall', 'Funnel'])
|
317
|
+
unless validator.valid?(type)
|
318
|
+
fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.'
|
319
|
+
end
|
320
|
+
@type = type
|
321
|
+
end
|
322
|
+
|
323
|
+
# Custom attribute writer method checking allowed values (enum).
|
324
|
+
# @param [Object] data_point_type Object to be assigned
|
325
|
+
def data_point_type=(data_point_type)
|
326
|
+
validator = EnumAttributeValidator.new('String', ['OneValue', 'Scatter', 'Bubble'])
|
327
|
+
unless validator.valid?(data_point_type)
|
328
|
+
fail ArgumentError, 'invalid value for "data_point_type", must be one of #{validator.allowable_values}.'
|
329
|
+
end
|
330
|
+
@data_point_type = data_point_type
|
331
|
+
end
|
332
|
+
|
333
|
+
# Custom attribute writer method checking allowed values (enum).
|
334
|
+
# @param [Object] quartile_method Object to be assigned
|
335
|
+
def quartile_method=(quartile_method)
|
336
|
+
validator = EnumAttributeValidator.new('String', ['Exclusive', 'Inclusive'])
|
337
|
+
unless validator.valid?(quartile_method)
|
338
|
+
fail ArgumentError, 'invalid value for "quartile_method", must be one of #{validator.allowable_values}.'
|
339
|
+
end
|
340
|
+
@quartile_method = quartile_method
|
341
|
+
end
|
342
|
+
|
343
|
+
# Checks equality by comparing each attribute.
|
344
|
+
# @param [Object] Object to be compared
|
345
|
+
def ==(o)
|
346
|
+
return true if self.equal?(o)
|
347
|
+
self.class == o.class &&
|
348
|
+
type == o.type &&
|
349
|
+
name == o.name &&
|
350
|
+
is_color_varied == o.is_color_varied &&
|
351
|
+
inverted_solid_fill_color == o.inverted_solid_fill_color &&
|
352
|
+
smooth == o.smooth &&
|
353
|
+
plot_on_second_axis == o.plot_on_second_axis &&
|
354
|
+
order == o.order &&
|
355
|
+
number_format_of_y_values == o.number_format_of_y_values &&
|
356
|
+
number_format_of_x_values == o.number_format_of_x_values &&
|
357
|
+
number_format_of_values == o.number_format_of_values &&
|
358
|
+
number_format_of_bubble_sizes == o.number_format_of_bubble_sizes &&
|
359
|
+
invert_if_negative == o.invert_if_negative &&
|
360
|
+
explosion == o.explosion &&
|
361
|
+
marker == o.marker &&
|
362
|
+
fill_format == o.fill_format &&
|
363
|
+
effect_format == o.effect_format &&
|
364
|
+
line_format == o.line_format &&
|
365
|
+
data_point_type == o.data_point_type &&
|
366
|
+
data_points == o.data_points &&
|
367
|
+
quartile_method == o.quartile_method &&
|
368
|
+
show_inner_points == o.show_inner_points &&
|
369
|
+
show_mean_line == o.show_mean_line &&
|
370
|
+
show_mean_markers == o.show_mean_markers &&
|
371
|
+
show_outlier_points == o.show_outlier_points
|
372
|
+
end
|
373
|
+
|
374
|
+
# @see the `==` method
|
375
|
+
# @param [Object] Object to be compared
|
376
|
+
def eql?(o)
|
377
|
+
self == o
|
378
|
+
end
|
379
|
+
|
380
|
+
# Calculates hash code according to all attributes.
|
381
|
+
# @return [Fixnum] Hash code
|
382
|
+
def hash
|
383
|
+
[type, name, is_color_varied, inverted_solid_fill_color, smooth, plot_on_second_axis, order, number_format_of_y_values, number_format_of_x_values, number_format_of_values, number_format_of_bubble_sizes, invert_if_negative, explosion, marker, fill_format, effect_format, line_format, data_point_type, data_points, quartile_method, show_inner_points, show_mean_line, show_mean_markers, show_outlier_points].hash
|
384
|
+
end
|
385
|
+
|
386
|
+
# Builds the object from hash
|
387
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
388
|
+
# @return [Object] Returns the model itself
|
389
|
+
def build_from_hash(attributes)
|
390
|
+
return nil unless attributes.is_a?(Hash)
|
391
|
+
self.class.swagger_types.each_pair do |key, type|
|
392
|
+
if type =~ /\AArray<(.*)>/i
|
393
|
+
# check to ensure the input is an array given that the the attribute
|
394
|
+
# is documented as an array but the input is not
|
395
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
396
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
397
|
+
end
|
398
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
399
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
400
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
401
|
+
end
|
402
|
+
|
403
|
+
self
|
404
|
+
end
|
405
|
+
|
406
|
+
# Deserializes the data based on type
|
407
|
+
# @param string type Data type
|
408
|
+
# @param string value Value to be deserialized
|
409
|
+
# @return [Object] Deserialized data
|
410
|
+
def _deserialize(type, value)
|
411
|
+
case type.to_sym
|
412
|
+
when :DateTime
|
413
|
+
DateTime.parse(value)
|
414
|
+
when :Date
|
415
|
+
Date.parse(value)
|
416
|
+
when :String
|
417
|
+
value.to_s
|
418
|
+
when :Integer
|
419
|
+
value.to_i
|
420
|
+
when :Float
|
421
|
+
value.to_f
|
422
|
+
when :BOOLEAN
|
423
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
424
|
+
true
|
425
|
+
else
|
426
|
+
false
|
427
|
+
end
|
428
|
+
when :Object
|
429
|
+
# generic object (usually a Hash), return directly
|
430
|
+
value
|
431
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
432
|
+
inner_type = Regexp.last_match[:inner_type]
|
433
|
+
value.map { |v| _deserialize(inner_type, v) }
|
434
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
435
|
+
k_type = Regexp.last_match[:k_type]
|
436
|
+
v_type = Regexp.last_match[:v_type]
|
437
|
+
{}.tap do |hash|
|
438
|
+
value.each do |k, v|
|
439
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
440
|
+
end
|
441
|
+
end
|
442
|
+
else # model
|
443
|
+
temp_model = AsposeSlidesCloud.const_get(type).new
|
444
|
+
temp_model.build_from_hash(value)
|
445
|
+
end
|
446
|
+
end
|
447
|
+
|
448
|
+
# Returns the string representation of the object
|
449
|
+
# @return [String] String presentation of the object
|
450
|
+
def to_s
|
451
|
+
to_hash.to_s
|
452
|
+
end
|
453
|
+
|
454
|
+
# to_body is an alias to to_hash (backward compatibility)
|
455
|
+
# @return [Hash] Returns the object in the form of hash
|
456
|
+
def to_body
|
457
|
+
to_hash
|
458
|
+
end
|
459
|
+
|
460
|
+
# Returns the object in the form of hash
|
461
|
+
# @return [Hash] Returns the object in the form of hash
|
462
|
+
def to_hash
|
463
|
+
hash = {}
|
464
|
+
self.class.attribute_map.each_pair do |attr, param|
|
465
|
+
value = self.send(attr)
|
466
|
+
next if value.nil?
|
467
|
+
hash[param] = _to_hash(value)
|
468
|
+
end
|
469
|
+
hash
|
470
|
+
end
|
471
|
+
|
472
|
+
# Outputs non-array value in the form of hash
|
473
|
+
# For object, use to_hash. Otherwise, just return the value
|
474
|
+
# @param [Object] value Any valid value
|
475
|
+
# @return [Hash] Returns the value in the form of hash
|
476
|
+
def _to_hash(value)
|
477
|
+
if value.is_a?(Array)
|
478
|
+
value.compact.map { |v| _to_hash(v) }
|
479
|
+
elsif value.is_a?(Hash)
|
480
|
+
{}.tap do |hash|
|
481
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
482
|
+
end
|
483
|
+
elsif value.respond_to? :to_hash
|
484
|
+
value.to_hash
|
485
|
+
else
|
486
|
+
value
|
487
|
+
end
|
488
|
+
end
|
489
|
+
end
|
490
|
+
end
|