aspose_slides_cloud 21.4.0 → 21.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +89 -61
- data/TestData/TemplatingCVDataWithBase64.xml +22 -22
- data/lib/aspose_slides_cloud.rb +212 -213
- data/lib/aspose_slides_cloud/api/slides_api.rb +15206 -17689
- data/lib/aspose_slides_cloud/api_client.rb +439 -439
- data/lib/aspose_slides_cloud/models/add_layout_slide.rb +244 -244
- data/lib/aspose_slides_cloud/models/add_master_slide.rb +259 -259
- data/lib/aspose_slides_cloud/models/add_shape.rb +239 -239
- data/lib/aspose_slides_cloud/models/add_slide.rb +269 -269
- data/lib/aspose_slides_cloud/models/api_info.rb +217 -217
- data/lib/aspose_slides_cloud/models/arrow_head_properties.rb +285 -285
- data/lib/aspose_slides_cloud/models/audio_frame.rb +359 -359
- data/lib/aspose_slides_cloud/models/axes.rb +237 -237
- data/lib/aspose_slides_cloud/models/axis.rb +699 -699
- data/lib/aspose_slides_cloud/models/base64_input_file.rb +230 -230
- data/lib/aspose_slides_cloud/models/blur_effect.rb +227 -227
- data/lib/aspose_slides_cloud/models/box_and_whisker_series.rb +299 -299
- data/lib/aspose_slides_cloud/models/bubble_chart_data_point.rb +212 -212
- data/lib/aspose_slides_cloud/models/bubble_series.rb +248 -248
- data/lib/aspose_slides_cloud/models/chart.rb +365 -365
- data/lib/aspose_slides_cloud/models/chart_category.rb +271 -271
- data/lib/aspose_slides_cloud/models/chart_title.rb +222 -222
- data/lib/aspose_slides_cloud/models/chart_wall.rb +281 -281
- data/lib/aspose_slides_cloud/models/color_scheme.rb +317 -317
- data/lib/aspose_slides_cloud/models/common_slide_view_properties.rb +217 -217
- data/lib/aspose_slides_cloud/models/connector.rb +275 -275
- data/lib/aspose_slides_cloud/models/custom_dash_pattern.rb +209 -209
- data/lib/aspose_slides_cloud/models/data_point.rb +197 -197
- data/lib/aspose_slides_cloud/models/disc_usage.rb +227 -227
- data/lib/aspose_slides_cloud/models/document.rb +257 -257
- data/lib/aspose_slides_cloud/models/document_properties.rb +209 -209
- data/lib/aspose_slides_cloud/models/document_property.rb +232 -232
- data/lib/aspose_slides_cloud/models/document_replace_result.rb +218 -218
- data/lib/aspose_slides_cloud/models/effect.rb +424 -424
- data/lib/aspose_slides_cloud/models/effect_format.rb +277 -277
- data/lib/aspose_slides_cloud/models/entity_exists.rb +212 -212
- data/lib/aspose_slides_cloud/models/error.rb +237 -237
- data/lib/aspose_slides_cloud/models/error_details.rb +222 -222
- data/lib/aspose_slides_cloud/models/export_format.rb +60 -60
- data/lib/aspose_slides_cloud/models/export_options.rb +216 -216
- data/lib/aspose_slides_cloud/models/file_version.rb +225 -225
- data/lib/aspose_slides_cloud/models/file_versions.rb +209 -209
- data/lib/aspose_slides_cloud/models/files_list.rb +209 -209
- data/lib/aspose_slides_cloud/models/files_upload_result.rb +221 -221
- data/lib/aspose_slides_cloud/models/fill_format.rb +240 -240
- data/lib/aspose_slides_cloud/models/fill_overlay_effect.rb +246 -246
- data/lib/aspose_slides_cloud/models/font_scheme.rb +227 -227
- data/lib/aspose_slides_cloud/models/font_set.rb +227 -227
- data/lib/aspose_slides_cloud/models/format_scheme.rb +245 -245
- data/lib/aspose_slides_cloud/models/geometry_shape.rb +260 -260
- data/lib/aspose_slides_cloud/models/glow_effect.rb +222 -222
- data/lib/aspose_slides_cloud/models/gradient_fill.rb +342 -342
- data/lib/aspose_slides_cloud/models/gradient_fill_stop.rb +222 -222
- data/lib/aspose_slides_cloud/models/graphical_object.rb +234 -234
- data/lib/aspose_slides_cloud/models/group_shape.rb +234 -234
- data/lib/aspose_slides_cloud/models/header_footer.rb +247 -247
- data/lib/aspose_slides_cloud/models/html_export_options.rb +421 -421
- data/lib/aspose_slides_cloud/models/i_shape_export_options.rb +197 -197
- data/lib/aspose_slides_cloud/models/image.rb +237 -237
- data/lib/aspose_slides_cloud/models/image_export_format.rb +43 -43
- data/lib/aspose_slides_cloud/models/image_export_options.rb +299 -299
- data/lib/aspose_slides_cloud/models/images.rb +209 -209
- data/lib/aspose_slides_cloud/models/inner_shadow_effect.rb +252 -252
- data/lib/aspose_slides_cloud/models/input.rb +227 -227
- data/lib/aspose_slides_cloud/models/input_file.rb +250 -250
- data/lib/aspose_slides_cloud/models/interactive_sequence.rb +224 -224
- data/lib/aspose_slides_cloud/models/layout_slide.rb +278 -278
- data/lib/aspose_slides_cloud/models/layout_slides.rb +209 -209
- data/lib/aspose_slides_cloud/models/legend.rb +321 -321
- data/lib/aspose_slides_cloud/models/line_format.rb +411 -411
- data/lib/aspose_slides_cloud/models/master_slide.rb +231 -231
- data/lib/aspose_slides_cloud/models/master_slides.rb +209 -209
- data/lib/aspose_slides_cloud/models/merge.rb +231 -231
- data/lib/aspose_slides_cloud/models/merging_source.rb +219 -219
- data/lib/aspose_slides_cloud/models/no_fill.rb +219 -219
- data/lib/aspose_slides_cloud/models/normal_view_restored_properties.rb +217 -217
- data/lib/aspose_slides_cloud/models/notes_slide.rb +217 -217
- data/lib/aspose_slides_cloud/models/notes_slide_export_format.rb +43 -43
- data/lib/aspose_slides_cloud/models/notes_slide_header_footer.rb +267 -267
- data/lib/aspose_slides_cloud/models/object_exist.rb +227 -227
- data/lib/aspose_slides_cloud/models/ole_object_frame.rb +259 -259
- data/lib/aspose_slides_cloud/models/one_value_chart_data_point.rb +210 -210
- data/lib/aspose_slides_cloud/models/one_value_series.rb +248 -248
- data/lib/aspose_slides_cloud/models/ordered_merge_request.rb +209 -209
- data/lib/aspose_slides_cloud/models/outer_shadow_effect.rb +252 -252
- data/lib/aspose_slides_cloud/models/output_file.rb +240 -240
- data/lib/aspose_slides_cloud/models/paragraph.rb +517 -517
- data/lib/aspose_slides_cloud/models/paragraphs.rb +209 -209
- data/lib/aspose_slides_cloud/models/path_input_file.rb +240 -240
- data/lib/aspose_slides_cloud/models/path_output_file.rb +239 -239
- data/lib/aspose_slides_cloud/models/pattern_fill.rb +266 -266
- data/lib/aspose_slides_cloud/models/pdf_export_options.rb +547 -547
- data/lib/aspose_slides_cloud/models/picture_fill.rb +351 -351
- data/lib/aspose_slides_cloud/models/picture_frame.rb +245 -245
- data/lib/aspose_slides_cloud/models/pipeline.rb +219 -219
- data/lib/aspose_slides_cloud/models/placeholder.rb +325 -325
- data/lib/aspose_slides_cloud/models/placeholders.rb +209 -209
- data/lib/aspose_slides_cloud/models/plot_area.rb +311 -311
- data/lib/aspose_slides_cloud/models/portion.rb +589 -589
- data/lib/aspose_slides_cloud/models/portions.rb +209 -209
- data/lib/aspose_slides_cloud/models/pptx_export_options.rb +247 -247
- data/lib/aspose_slides_cloud/models/presentation_to_merge.rb +273 -273
- data/lib/aspose_slides_cloud/models/presentations_merge_request.rb +221 -221
- data/lib/aspose_slides_cloud/models/preset_shadow_effect.rb +286 -286
- data/lib/aspose_slides_cloud/models/protection_properties.rb +267 -267
- data/lib/aspose_slides_cloud/models/reflection_effect.rb +441 -441
- data/lib/aspose_slides_cloud/models/remove_shape.rb +229 -229
- data/lib/aspose_slides_cloud/models/remove_slide.rb +234 -234
- data/lib/aspose_slides_cloud/models/reorder_slide.rb +249 -249
- data/lib/aspose_slides_cloud/models/replace_text.rb +269 -269
- data/lib/aspose_slides_cloud/models/request_input_file.rb +235 -235
- data/lib/aspose_slides_cloud/models/reset_slide.rb +234 -234
- data/lib/aspose_slides_cloud/models/resource_base.rb +219 -219
- data/lib/aspose_slides_cloud/models/resource_uri.rb +237 -237
- data/lib/aspose_slides_cloud/models/response_output_file.rb +219 -219
- data/lib/aspose_slides_cloud/models/save.rb +266 -266
- data/lib/aspose_slides_cloud/models/save_shape.rb +276 -276
- data/lib/aspose_slides_cloud/models/save_slide.rb +301 -301
- data/lib/aspose_slides_cloud/models/scatter_chart_data_point.rb +225 -225
- data/lib/aspose_slides_cloud/models/scatter_series.rb +248 -248
- data/lib/aspose_slides_cloud/models/section.rb +234 -234
- data/lib/aspose_slides_cloud/models/sections.rb +209 -209
- data/lib/aspose_slides_cloud/models/series.rb +422 -422
- data/lib/aspose_slides_cloud/models/series_marker.rb +281 -281
- data/lib/aspose_slides_cloud/models/shape.rb +255 -255
- data/lib/aspose_slides_cloud/models/shape_base.rb +375 -375
- data/lib/aspose_slides_cloud/models/shape_export_format.rb +44 -44
- data/lib/aspose_slides_cloud/models/shape_image_export_options.rb +286 -286
- data/lib/aspose_slides_cloud/models/shape_thumbnail_bounds.rb +41 -41
- data/lib/aspose_slides_cloud/models/shapes.rb +209 -209
- data/lib/aspose_slides_cloud/models/shapes_alignment_type.rb +46 -46
- data/lib/aspose_slides_cloud/models/slide.rb +322 -322
- data/lib/aspose_slides_cloud/models/slide_animation.rb +221 -221
- data/lib/aspose_slides_cloud/models/slide_background.rb +266 -266
- data/lib/aspose_slides_cloud/models/slide_comment.rb +239 -239
- data/lib/aspose_slides_cloud/models/slide_comments.rb +209 -209
- data/lib/aspose_slides_cloud/models/slide_export_format.rb +59 -59
- data/lib/aspose_slides_cloud/models/slide_properties.rb +315 -315
- data/lib/aspose_slides_cloud/models/slide_replace_result.rb +223 -223
- data/lib/aspose_slides_cloud/models/slides.rb +209 -209
- data/lib/aspose_slides_cloud/models/smart_art.rb +342 -342
- data/lib/aspose_slides_cloud/models/smart_art_node.rb +293 -293
- data/lib/aspose_slides_cloud/models/smart_art_shape.rb +235 -235
- data/lib/aspose_slides_cloud/models/soft_edge_effect.rb +212 -212
- data/lib/aspose_slides_cloud/models/solid_fill.rb +229 -229
- data/lib/aspose_slides_cloud/models/split_document_result.rb +209 -209
- data/lib/aspose_slides_cloud/models/storage_exist.rb +212 -212
- data/lib/aspose_slides_cloud/models/storage_file.rb +257 -257
- data/lib/aspose_slides_cloud/models/svg_export_options.rb +379 -379
- data/lib/aspose_slides_cloud/models/swf_export_options.rb +529 -529
- data/lib/aspose_slides_cloud/models/table.rb +350 -350
- data/lib/aspose_slides_cloud/models/table_cell.rb +403 -403
- data/lib/aspose_slides_cloud/models/table_column.rb +212 -212
- data/lib/aspose_slides_cloud/models/table_row.rb +239 -239
- data/lib/aspose_slides_cloud/models/task.rb +240 -240
- data/lib/aspose_slides_cloud/models/text_item.rb +217 -217
- data/lib/aspose_slides_cloud/models/text_items.rb +209 -209
- data/lib/aspose_slides_cloud/models/theme.rb +237 -237
- data/lib/aspose_slides_cloud/models/tiff_export_options.rb +423 -423
- data/lib/aspose_slides_cloud/models/update_background.rb +241 -241
- data/lib/aspose_slides_cloud/models/update_shape.rb +239 -239
- data/lib/aspose_slides_cloud/models/video_frame.rb +329 -329
- data/lib/aspose_slides_cloud/models/view_properties.rb +357 -357
- data/lib/aspose_slides_cloud/models/waterfall_chart_data_point.rb +206 -206
- data/lib/aspose_slides_cloud/models/waterfall_series.rb +247 -247
- data/lib/aspose_slides_cloud/models/xps_export_options.rb +243 -243
- data/lib/aspose_slides_cloud/type_registry.rb +323 -323
- data/lib/aspose_slides_cloud/version.rb +25 -25
- data/spec/api/slides_api_spec.rb +40213 -39435
- data/spec/extra/extra_spec.rb +202 -202
- data/spec/spec_utils.rb +182 -182
- data/testConfig.json +7 -7
- data/testRules.json +513 -511
- metadata +2 -3
- data/lib/aspose_slides_cloud/api/slides_api_requests.rb +0 -4742
@@ -1,699 +1,699 @@
|
|
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
|
-
# Represents a chart axis
|
27
|
-
class Axis
|
28
|
-
# True if the axis is visible
|
29
|
-
attr_accessor :is_visible
|
30
|
-
|
31
|
-
# True if the axis has a visible title
|
32
|
-
attr_accessor :has_title
|
33
|
-
|
34
|
-
# Axis position
|
35
|
-
attr_accessor :position
|
36
|
-
|
37
|
-
# The scaling value of the display units for the value axis
|
38
|
-
attr_accessor :display_unit
|
39
|
-
|
40
|
-
# The smallest time unit that is represented on the date axis
|
41
|
-
attr_accessor :base_unit_scale
|
42
|
-
|
43
|
-
# True the major unit of the axis is automatically assigned
|
44
|
-
attr_accessor :is_automatic_major_unit
|
45
|
-
|
46
|
-
# The major units for the date or value axis
|
47
|
-
attr_accessor :major_unit
|
48
|
-
|
49
|
-
# The major unit scale for the date axis
|
50
|
-
attr_accessor :major_unit_scale
|
51
|
-
|
52
|
-
# The type of major tick mark for the specified axis
|
53
|
-
attr_accessor :major_tick_mark
|
54
|
-
|
55
|
-
# True the minor unit of the axis is automatically assigned
|
56
|
-
attr_accessor :is_automatic_minor_unit
|
57
|
-
|
58
|
-
# The minor units for the date or value axis
|
59
|
-
attr_accessor :minor_unit
|
60
|
-
|
61
|
-
# The minor unit scale for the date axis
|
62
|
-
attr_accessor :minor_unit_scale
|
63
|
-
|
64
|
-
# The type of minor tick mark for the specified axis
|
65
|
-
attr_accessor :minor_tick_mark
|
66
|
-
|
67
|
-
# True if the max value is automatically assigned
|
68
|
-
attr_accessor :is_automatic_max_value
|
69
|
-
|
70
|
-
# The maximum value on the value axis
|
71
|
-
attr_accessor :max_value
|
72
|
-
|
73
|
-
# True if the min value is automatically assigned
|
74
|
-
attr_accessor :is_automatic_min_value
|
75
|
-
|
76
|
-
# The minimum value on the value axis
|
77
|
-
attr_accessor :min_value
|
78
|
-
|
79
|
-
# True if the value axis scale type is logarithmic
|
80
|
-
attr_accessor :is_logarithmic
|
81
|
-
|
82
|
-
# The logarithmic base. Default value is 10
|
83
|
-
attr_accessor :log_base
|
84
|
-
|
85
|
-
# The type of the category axis
|
86
|
-
attr_accessor :category_axis_type
|
87
|
-
|
88
|
-
# True if the value axis crosses the category axis between categories. This property applies only to category axes, and it doesn't apply to 3-D charts
|
89
|
-
attr_accessor :axis_between_categories
|
90
|
-
|
91
|
-
# The distance of labels from the axis. Applied to category or date axis. Value must be between 0% and 1000%.
|
92
|
-
attr_accessor :label_offset
|
93
|
-
|
94
|
-
# True if MS PowerPoint plots data points from last to first
|
95
|
-
attr_accessor :is_plot_order_reversed
|
96
|
-
|
97
|
-
# True if the format is linked to source data
|
98
|
-
attr_accessor :is_number_format_linked_to_source
|
99
|
-
|
100
|
-
# the format string for the Axis Labels
|
101
|
-
attr_accessor :number_format
|
102
|
-
|
103
|
-
# The CrossType on the specified axis where the other axis crosses
|
104
|
-
attr_accessor :cross_type
|
105
|
-
|
106
|
-
# The point on the axis where the perpendicular axis crosses it
|
107
|
-
attr_accessor :cross_at
|
108
|
-
|
109
|
-
# True for automatic tick marks spacing value
|
110
|
-
attr_accessor :is_automatic_tick_marks_spacing
|
111
|
-
|
112
|
-
# Specifies how many tick marks shall be skipped before the next one shall be drawn. Applied to category or series axis.
|
113
|
-
attr_accessor :tick_marks_spacing
|
114
|
-
|
115
|
-
# True for automatic tick label spacing value
|
116
|
-
attr_accessor :is_automatic_tick_label_spacing
|
117
|
-
|
118
|
-
# Specifies how many tick labels to skip between label that is drawn.
|
119
|
-
attr_accessor :tick_label_spacing
|
120
|
-
|
121
|
-
# The position of tick-mark labels on the specified axis.
|
122
|
-
attr_accessor :tick_label_position
|
123
|
-
|
124
|
-
# Represents the rotation angle of tick labels.
|
125
|
-
attr_accessor :tick_label_rotation_angle
|
126
|
-
|
127
|
-
# Get or sets the fill format.
|
128
|
-
attr_accessor :fill_format
|
129
|
-
|
130
|
-
# Get or sets the effect format.
|
131
|
-
attr_accessor :effect_format
|
132
|
-
|
133
|
-
# Get or sets the line format.
|
134
|
-
attr_accessor :line_format
|
135
|
-
|
136
|
-
class EnumAttributeValidator
|
137
|
-
attr_reader :datatype
|
138
|
-
attr_reader :allowable_values
|
139
|
-
|
140
|
-
def initialize(datatype, allowable_values)
|
141
|
-
@allowable_values = allowable_values.map do |value|
|
142
|
-
case datatype.to_s
|
143
|
-
when /Integer/i
|
144
|
-
value.to_i
|
145
|
-
when /Float/i
|
146
|
-
value.to_f
|
147
|
-
else
|
148
|
-
value
|
149
|
-
end
|
150
|
-
end
|
151
|
-
end
|
152
|
-
|
153
|
-
def valid?(value)
|
154
|
-
!value || allowable_values.any?{ |s| s.casecmp(value) == 0 }
|
155
|
-
end
|
156
|
-
end
|
157
|
-
|
158
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
159
|
-
def self.attribute_map
|
160
|
-
{
|
161
|
-
:'is_visible' => :'IsVisible',
|
162
|
-
:'has_title' => :'HasTitle',
|
163
|
-
:'position' => :'Position',
|
164
|
-
:'display_unit' => :'DisplayUnit',
|
165
|
-
:'base_unit_scale' => :'BaseUnitScale',
|
166
|
-
:'is_automatic_major_unit' => :'IsAutomaticMajorUnit',
|
167
|
-
:'major_unit' => :'MajorUnit',
|
168
|
-
:'major_unit_scale' => :'MajorUnitScale',
|
169
|
-
:'major_tick_mark' => :'MajorTickMark',
|
170
|
-
:'is_automatic_minor_unit' => :'IsAutomaticMinorUnit',
|
171
|
-
:'minor_unit' => :'MinorUnit',
|
172
|
-
:'minor_unit_scale' => :'MinorUnitScale',
|
173
|
-
:'minor_tick_mark' => :'MinorTickMark',
|
174
|
-
:'is_automatic_max_value' => :'IsAutomaticMaxValue',
|
175
|
-
:'max_value' => :'MaxValue',
|
176
|
-
:'is_automatic_min_value' => :'IsAutomaticMinValue',
|
177
|
-
:'min_value' => :'MinValue',
|
178
|
-
:'is_logarithmic' => :'IsLogarithmic',
|
179
|
-
:'log_base' => :'LogBase',
|
180
|
-
:'category_axis_type' => :'CategoryAxisType',
|
181
|
-
:'axis_between_categories' => :'AxisBetweenCategories',
|
182
|
-
:'label_offset' => :'LabelOffset',
|
183
|
-
:'is_plot_order_reversed' => :'IsPlotOrderReversed',
|
184
|
-
:'is_number_format_linked_to_source' => :'IsNumberFormatLinkedToSource',
|
185
|
-
:'number_format' => :'NumberFormat',
|
186
|
-
:'cross_type' => :'CrossType',
|
187
|
-
:'cross_at' => :'CrossAt',
|
188
|
-
:'is_automatic_tick_marks_spacing' => :'IsAutomaticTickMarksSpacing',
|
189
|
-
:'tick_marks_spacing' => :'TickMarksSpacing',
|
190
|
-
:'is_automatic_tick_label_spacing' => :'IsAutomaticTickLabelSpacing',
|
191
|
-
:'tick_label_spacing' => :'TickLabelSpacing',
|
192
|
-
:'tick_label_position' => :'TickLabelPosition',
|
193
|
-
:'tick_label_rotation_angle' => :'TickLabelRotationAngle',
|
194
|
-
:'fill_format' => :'FillFormat',
|
195
|
-
:'effect_format' => :'EffectFormat',
|
196
|
-
:'line_format' => :'LineFormat',
|
197
|
-
}
|
198
|
-
end
|
199
|
-
|
200
|
-
# Attribute type mapping.
|
201
|
-
def self.swagger_types
|
202
|
-
{
|
203
|
-
:'is_visible' => :'BOOLEAN',
|
204
|
-
:'has_title' => :'BOOLEAN',
|
205
|
-
:'position' => :'String',
|
206
|
-
:'display_unit' => :'String',
|
207
|
-
:'base_unit_scale' => :'String',
|
208
|
-
:'is_automatic_major_unit' => :'BOOLEAN',
|
209
|
-
:'major_unit' => :'Float',
|
210
|
-
:'major_unit_scale' => :'String',
|
211
|
-
:'major_tick_mark' => :'String',
|
212
|
-
:'is_automatic_minor_unit' => :'BOOLEAN',
|
213
|
-
:'minor_unit' => :'Float',
|
214
|
-
:'minor_unit_scale' => :'String',
|
215
|
-
:'minor_tick_mark' => :'String',
|
216
|
-
:'is_automatic_max_value' => :'BOOLEAN',
|
217
|
-
:'max_value' => :'Float',
|
218
|
-
:'is_automatic_min_value' => :'BOOLEAN',
|
219
|
-
:'min_value' => :'Float',
|
220
|
-
:'is_logarithmic' => :'BOOLEAN',
|
221
|
-
:'log_base' => :'Float',
|
222
|
-
:'category_axis_type' => :'String',
|
223
|
-
:'axis_between_categories' => :'BOOLEAN',
|
224
|
-
:'label_offset' => :'Integer',
|
225
|
-
:'is_plot_order_reversed' => :'BOOLEAN',
|
226
|
-
:'is_number_format_linked_to_source' => :'BOOLEAN',
|
227
|
-
:'number_format' => :'String',
|
228
|
-
:'cross_type' => :'String',
|
229
|
-
:'cross_at' => :'Float',
|
230
|
-
:'is_automatic_tick_marks_spacing' => :'BOOLEAN',
|
231
|
-
:'tick_marks_spacing' => :'Integer',
|
232
|
-
:'is_automatic_tick_label_spacing' => :'BOOLEAN',
|
233
|
-
:'tick_label_spacing' => :'Integer',
|
234
|
-
:'tick_label_position' => :'String',
|
235
|
-
:'tick_label_rotation_angle' => :'Float',
|
236
|
-
:'fill_format' => :'FillFormat',
|
237
|
-
:'effect_format' => :'EffectFormat',
|
238
|
-
:'line_format' => :'LineFormat',
|
239
|
-
}
|
240
|
-
end
|
241
|
-
|
242
|
-
# Initializes the object
|
243
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
244
|
-
def initialize(attributes = {})
|
245
|
-
return unless attributes.is_a?(Hash)
|
246
|
-
|
247
|
-
# convert string to symbol for hash key
|
248
|
-
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
249
|
-
|
250
|
-
if attributes.has_key?(:'IsVisible')
|
251
|
-
self.is_visible = attributes[:'IsVisible']
|
252
|
-
end
|
253
|
-
|
254
|
-
if attributes.has_key?(:'HasTitle')
|
255
|
-
self.has_title = attributes[:'HasTitle']
|
256
|
-
end
|
257
|
-
|
258
|
-
if attributes.has_key?(:'Position')
|
259
|
-
self.position = attributes[:'Position']
|
260
|
-
end
|
261
|
-
|
262
|
-
if attributes.has_key?(:'DisplayUnit')
|
263
|
-
self.display_unit = attributes[:'DisplayUnit']
|
264
|
-
end
|
265
|
-
|
266
|
-
if attributes.has_key?(:'BaseUnitScale')
|
267
|
-
self.base_unit_scale = attributes[:'BaseUnitScale']
|
268
|
-
end
|
269
|
-
|
270
|
-
if attributes.has_key?(:'IsAutomaticMajorUnit')
|
271
|
-
self.is_automatic_major_unit = attributes[:'IsAutomaticMajorUnit']
|
272
|
-
end
|
273
|
-
|
274
|
-
if attributes.has_key?(:'MajorUnit')
|
275
|
-
self.major_unit = attributes[:'MajorUnit']
|
276
|
-
end
|
277
|
-
|
278
|
-
if attributes.has_key?(:'MajorUnitScale')
|
279
|
-
self.major_unit_scale = attributes[:'MajorUnitScale']
|
280
|
-
end
|
281
|
-
|
282
|
-
if attributes.has_key?(:'MajorTickMark')
|
283
|
-
self.major_tick_mark = attributes[:'MajorTickMark']
|
284
|
-
end
|
285
|
-
|
286
|
-
if attributes.has_key?(:'IsAutomaticMinorUnit')
|
287
|
-
self.is_automatic_minor_unit = attributes[:'IsAutomaticMinorUnit']
|
288
|
-
end
|
289
|
-
|
290
|
-
if attributes.has_key?(:'MinorUnit')
|
291
|
-
self.minor_unit = attributes[:'MinorUnit']
|
292
|
-
end
|
293
|
-
|
294
|
-
if attributes.has_key?(:'MinorUnitScale')
|
295
|
-
self.minor_unit_scale = attributes[:'MinorUnitScale']
|
296
|
-
end
|
297
|
-
|
298
|
-
if attributes.has_key?(:'MinorTickMark')
|
299
|
-
self.minor_tick_mark = attributes[:'MinorTickMark']
|
300
|
-
end
|
301
|
-
|
302
|
-
if attributes.has_key?(:'IsAutomaticMaxValue')
|
303
|
-
self.is_automatic_max_value = attributes[:'IsAutomaticMaxValue']
|
304
|
-
end
|
305
|
-
|
306
|
-
if attributes.has_key?(:'MaxValue')
|
307
|
-
self.max_value = attributes[:'MaxValue']
|
308
|
-
end
|
309
|
-
|
310
|
-
if attributes.has_key?(:'IsAutomaticMinValue')
|
311
|
-
self.is_automatic_min_value = attributes[:'IsAutomaticMinValue']
|
312
|
-
end
|
313
|
-
|
314
|
-
if attributes.has_key?(:'MinValue')
|
315
|
-
self.min_value = attributes[:'MinValue']
|
316
|
-
end
|
317
|
-
|
318
|
-
if attributes.has_key?(:'IsLogarithmic')
|
319
|
-
self.is_logarithmic = attributes[:'IsLogarithmic']
|
320
|
-
end
|
321
|
-
|
322
|
-
if attributes.has_key?(:'LogBase')
|
323
|
-
self.log_base = attributes[:'LogBase']
|
324
|
-
end
|
325
|
-
|
326
|
-
if attributes.has_key?(:'CategoryAxisType')
|
327
|
-
self.category_axis_type = attributes[:'CategoryAxisType']
|
328
|
-
end
|
329
|
-
|
330
|
-
if attributes.has_key?(:'AxisBetweenCategories')
|
331
|
-
self.axis_between_categories = attributes[:'AxisBetweenCategories']
|
332
|
-
end
|
333
|
-
|
334
|
-
if attributes.has_key?(:'LabelOffset')
|
335
|
-
self.label_offset = attributes[:'LabelOffset']
|
336
|
-
end
|
337
|
-
|
338
|
-
if attributes.has_key?(:'IsPlotOrderReversed')
|
339
|
-
self.is_plot_order_reversed = attributes[:'IsPlotOrderReversed']
|
340
|
-
end
|
341
|
-
|
342
|
-
if attributes.has_key?(:'IsNumberFormatLinkedToSource')
|
343
|
-
self.is_number_format_linked_to_source = attributes[:'IsNumberFormatLinkedToSource']
|
344
|
-
end
|
345
|
-
|
346
|
-
if attributes.has_key?(:'NumberFormat')
|
347
|
-
self.number_format = attributes[:'NumberFormat']
|
348
|
-
end
|
349
|
-
|
350
|
-
if attributes.has_key?(:'CrossType')
|
351
|
-
self.cross_type = attributes[:'CrossType']
|
352
|
-
end
|
353
|
-
|
354
|
-
if attributes.has_key?(:'CrossAt')
|
355
|
-
self.cross_at = attributes[:'CrossAt']
|
356
|
-
end
|
357
|
-
|
358
|
-
if attributes.has_key?(:'IsAutomaticTickMarksSpacing')
|
359
|
-
self.is_automatic_tick_marks_spacing = attributes[:'IsAutomaticTickMarksSpacing']
|
360
|
-
end
|
361
|
-
|
362
|
-
if attributes.has_key?(:'TickMarksSpacing')
|
363
|
-
self.tick_marks_spacing = attributes[:'TickMarksSpacing']
|
364
|
-
end
|
365
|
-
|
366
|
-
if attributes.has_key?(:'IsAutomaticTickLabelSpacing')
|
367
|
-
self.is_automatic_tick_label_spacing = attributes[:'IsAutomaticTickLabelSpacing']
|
368
|
-
end
|
369
|
-
|
370
|
-
if attributes.has_key?(:'TickLabelSpacing')
|
371
|
-
self.tick_label_spacing = attributes[:'TickLabelSpacing']
|
372
|
-
end
|
373
|
-
|
374
|
-
if attributes.has_key?(:'TickLabelPosition')
|
375
|
-
self.tick_label_position = attributes[:'TickLabelPosition']
|
376
|
-
end
|
377
|
-
|
378
|
-
if attributes.has_key?(:'TickLabelRotationAngle')
|
379
|
-
self.tick_label_rotation_angle = attributes[:'TickLabelRotationAngle']
|
380
|
-
end
|
381
|
-
|
382
|
-
if attributes.has_key?(:'FillFormat')
|
383
|
-
self.fill_format = attributes[:'FillFormat']
|
384
|
-
end
|
385
|
-
|
386
|
-
if attributes.has_key?(:'EffectFormat')
|
387
|
-
self.effect_format = attributes[:'EffectFormat']
|
388
|
-
end
|
389
|
-
|
390
|
-
if attributes.has_key?(:'LineFormat')
|
391
|
-
self.line_format = attributes[:'LineFormat']
|
392
|
-
end
|
393
|
-
end
|
394
|
-
|
395
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
396
|
-
# @return Array for valid properties with the reasons
|
397
|
-
def list_invalid_properties
|
398
|
-
invalid_properties = Array.new
|
399
|
-
invalid_properties
|
400
|
-
end
|
401
|
-
|
402
|
-
# Check to see if the all the properties in the model are valid
|
403
|
-
# @return true if the model is valid
|
404
|
-
def valid?
|
405
|
-
position_validator = EnumAttributeValidator.new('String', ['Bottom', 'Left', 'Right', 'Top'])
|
406
|
-
return false unless position_validator.valid?(@position)
|
407
|
-
display_unit_validator = EnumAttributeValidator.new('String', ['None', 'Hundreds', 'Thousands', 'TenThousands', 'HundredThousands', 'Millions', 'TenMillions', 'HundredMillions', 'Billions', 'Trillions', 'CustomValue'])
|
408
|
-
return false unless display_unit_validator.valid?(@display_unit)
|
409
|
-
base_unit_scale_validator = EnumAttributeValidator.new('String', ['Days', 'Months', 'Years'])
|
410
|
-
return false unless base_unit_scale_validator.valid?(@base_unit_scale)
|
411
|
-
major_unit_scale_validator = EnumAttributeValidator.new('String', ['Days', 'Months', 'Years'])
|
412
|
-
return false unless major_unit_scale_validator.valid?(@major_unit_scale)
|
413
|
-
major_tick_mark_validator = EnumAttributeValidator.new('String', ['Cross', 'Inside', 'None', 'Outside'])
|
414
|
-
return false unless major_tick_mark_validator.valid?(@major_tick_mark)
|
415
|
-
minor_unit_scale_validator = EnumAttributeValidator.new('String', ['Days', 'Months', 'Years'])
|
416
|
-
return false unless minor_unit_scale_validator.valid?(@minor_unit_scale)
|
417
|
-
minor_tick_mark_validator = EnumAttributeValidator.new('String', ['Cross', 'Inside', 'None', 'Outside'])
|
418
|
-
return false unless minor_tick_mark_validator.valid?(@minor_tick_mark)
|
419
|
-
category_axis_type_validator = EnumAttributeValidator.new('String', ['Text', 'Date'])
|
420
|
-
return false unless category_axis_type_validator.valid?(@category_axis_type)
|
421
|
-
cross_type_validator = EnumAttributeValidator.new('String', ['AxisCrossesAtZero', 'Maximum', 'Custom'])
|
422
|
-
return false unless cross_type_validator.valid?(@cross_type)
|
423
|
-
tick_label_position_validator = EnumAttributeValidator.new('String', ['High', 'Low', 'NextTo', 'None'])
|
424
|
-
return false unless tick_label_position_validator.valid?(@tick_label_position)
|
425
|
-
true
|
426
|
-
end
|
427
|
-
|
428
|
-
# Custom attribute writer method checking allowed values (enum).
|
429
|
-
# @param [Object] position Object to be assigned
|
430
|
-
def position=(position)
|
431
|
-
validator = EnumAttributeValidator.new('String', ['Bottom', 'Left', 'Right', 'Top'])
|
432
|
-
unless validator.valid?(position)
|
433
|
-
fail ArgumentError, 'invalid value for "position", must be one of #{validator.allowable_values}.'
|
434
|
-
end
|
435
|
-
@position = position
|
436
|
-
end
|
437
|
-
|
438
|
-
# Custom attribute writer method checking allowed values (enum).
|
439
|
-
# @param [Object] display_unit Object to be assigned
|
440
|
-
def display_unit=(display_unit)
|
441
|
-
validator = EnumAttributeValidator.new('String', ['None', 'Hundreds', 'Thousands', 'TenThousands', 'HundredThousands', 'Millions', 'TenMillions', 'HundredMillions', 'Billions', 'Trillions', 'CustomValue'])
|
442
|
-
unless validator.valid?(display_unit)
|
443
|
-
fail ArgumentError, 'invalid value for "display_unit", must be one of #{validator.allowable_values}.'
|
444
|
-
end
|
445
|
-
@display_unit = display_unit
|
446
|
-
end
|
447
|
-
|
448
|
-
# Custom attribute writer method checking allowed values (enum).
|
449
|
-
# @param [Object] base_unit_scale Object to be assigned
|
450
|
-
def base_unit_scale=(base_unit_scale)
|
451
|
-
validator = EnumAttributeValidator.new('String', ['Days', 'Months', 'Years'])
|
452
|
-
unless validator.valid?(base_unit_scale)
|
453
|
-
fail ArgumentError, 'invalid value for "base_unit_scale", must be one of #{validator.allowable_values}.'
|
454
|
-
end
|
455
|
-
@base_unit_scale = base_unit_scale
|
456
|
-
end
|
457
|
-
|
458
|
-
# Custom attribute writer method checking allowed values (enum).
|
459
|
-
# @param [Object] major_unit_scale Object to be assigned
|
460
|
-
def major_unit_scale=(major_unit_scale)
|
461
|
-
validator = EnumAttributeValidator.new('String', ['Days', 'Months', 'Years'])
|
462
|
-
unless validator.valid?(major_unit_scale)
|
463
|
-
fail ArgumentError, 'invalid value for "major_unit_scale", must be one of #{validator.allowable_values}.'
|
464
|
-
end
|
465
|
-
@major_unit_scale = major_unit_scale
|
466
|
-
end
|
467
|
-
|
468
|
-
# Custom attribute writer method checking allowed values (enum).
|
469
|
-
# @param [Object] major_tick_mark Object to be assigned
|
470
|
-
def major_tick_mark=(major_tick_mark)
|
471
|
-
validator = EnumAttributeValidator.new('String', ['Cross', 'Inside', 'None', 'Outside'])
|
472
|
-
unless validator.valid?(major_tick_mark)
|
473
|
-
fail ArgumentError, 'invalid value for "major_tick_mark", must be one of #{validator.allowable_values}.'
|
474
|
-
end
|
475
|
-
@major_tick_mark = major_tick_mark
|
476
|
-
end
|
477
|
-
|
478
|
-
# Custom attribute writer method checking allowed values (enum).
|
479
|
-
# @param [Object] minor_unit_scale Object to be assigned
|
480
|
-
def minor_unit_scale=(minor_unit_scale)
|
481
|
-
validator = EnumAttributeValidator.new('String', ['Days', 'Months', 'Years'])
|
482
|
-
unless validator.valid?(minor_unit_scale)
|
483
|
-
fail ArgumentError, 'invalid value for "minor_unit_scale", must be one of #{validator.allowable_values}.'
|
484
|
-
end
|
485
|
-
@minor_unit_scale = minor_unit_scale
|
486
|
-
end
|
487
|
-
|
488
|
-
# Custom attribute writer method checking allowed values (enum).
|
489
|
-
# @param [Object] minor_tick_mark Object to be assigned
|
490
|
-
def minor_tick_mark=(minor_tick_mark)
|
491
|
-
validator = EnumAttributeValidator.new('String', ['Cross', 'Inside', 'None', 'Outside'])
|
492
|
-
unless validator.valid?(minor_tick_mark)
|
493
|
-
fail ArgumentError, 'invalid value for "minor_tick_mark", must be one of #{validator.allowable_values}.'
|
494
|
-
end
|
495
|
-
@minor_tick_mark = minor_tick_mark
|
496
|
-
end
|
497
|
-
|
498
|
-
# Custom attribute writer method checking allowed values (enum).
|
499
|
-
# @param [Object] category_axis_type Object to be assigned
|
500
|
-
def category_axis_type=(category_axis_type)
|
501
|
-
validator = EnumAttributeValidator.new('String', ['Text', 'Date'])
|
502
|
-
unless validator.valid?(category_axis_type)
|
503
|
-
fail ArgumentError, 'invalid value for "category_axis_type", must be one of #{validator.allowable_values}.'
|
504
|
-
end
|
505
|
-
@category_axis_type = category_axis_type
|
506
|
-
end
|
507
|
-
|
508
|
-
# Custom attribute writer method checking allowed values (enum).
|
509
|
-
# @param [Object] cross_type Object to be assigned
|
510
|
-
def cross_type=(cross_type)
|
511
|
-
validator = EnumAttributeValidator.new('String', ['AxisCrossesAtZero', 'Maximum', 'Custom'])
|
512
|
-
unless validator.valid?(cross_type)
|
513
|
-
fail ArgumentError, 'invalid value for "cross_type", must be one of #{validator.allowable_values}.'
|
514
|
-
end
|
515
|
-
@cross_type = cross_type
|
516
|
-
end
|
517
|
-
|
518
|
-
# Custom attribute writer method checking allowed values (enum).
|
519
|
-
# @param [Object] tick_label_position Object to be assigned
|
520
|
-
def tick_label_position=(tick_label_position)
|
521
|
-
validator = EnumAttributeValidator.new('String', ['High', 'Low', 'NextTo', 'None'])
|
522
|
-
unless validator.valid?(tick_label_position)
|
523
|
-
fail ArgumentError, 'invalid value for "tick_label_position", must be one of #{validator.allowable_values}.'
|
524
|
-
end
|
525
|
-
@tick_label_position = tick_label_position
|
526
|
-
end
|
527
|
-
|
528
|
-
# Checks equality by comparing each attribute.
|
529
|
-
# @param [Object] Object to be compared
|
530
|
-
def ==(o)
|
531
|
-
return true if self.equal?(o)
|
532
|
-
self.class == o.class &&
|
533
|
-
is_visible == o.is_visible &&
|
534
|
-
has_title == o.has_title &&
|
535
|
-
position == o.position &&
|
536
|
-
display_unit == o.display_unit &&
|
537
|
-
base_unit_scale == o.base_unit_scale &&
|
538
|
-
is_automatic_major_unit == o.is_automatic_major_unit &&
|
539
|
-
major_unit == o.major_unit &&
|
540
|
-
major_unit_scale == o.major_unit_scale &&
|
541
|
-
major_tick_mark == o.major_tick_mark &&
|
542
|
-
is_automatic_minor_unit == o.is_automatic_minor_unit &&
|
543
|
-
minor_unit == o.minor_unit &&
|
544
|
-
minor_unit_scale == o.minor_unit_scale &&
|
545
|
-
minor_tick_mark == o.minor_tick_mark &&
|
546
|
-
is_automatic_max_value == o.is_automatic_max_value &&
|
547
|
-
max_value == o.max_value &&
|
548
|
-
is_automatic_min_value == o.is_automatic_min_value &&
|
549
|
-
min_value == o.min_value &&
|
550
|
-
is_logarithmic == o.is_logarithmic &&
|
551
|
-
log_base == o.log_base &&
|
552
|
-
category_axis_type == o.category_axis_type &&
|
553
|
-
axis_between_categories == o.axis_between_categories &&
|
554
|
-
label_offset == o.label_offset &&
|
555
|
-
is_plot_order_reversed == o.is_plot_order_reversed &&
|
556
|
-
is_number_format_linked_to_source == o.is_number_format_linked_to_source &&
|
557
|
-
number_format == o.number_format &&
|
558
|
-
cross_type == o.cross_type &&
|
559
|
-
cross_at == o.cross_at &&
|
560
|
-
is_automatic_tick_marks_spacing == o.is_automatic_tick_marks_spacing &&
|
561
|
-
tick_marks_spacing == o.tick_marks_spacing &&
|
562
|
-
is_automatic_tick_label_spacing == o.is_automatic_tick_label_spacing &&
|
563
|
-
tick_label_spacing == o.tick_label_spacing &&
|
564
|
-
tick_label_position == o.tick_label_position &&
|
565
|
-
tick_label_rotation_angle == o.tick_label_rotation_angle &&
|
566
|
-
fill_format == o.fill_format &&
|
567
|
-
effect_format == o.effect_format &&
|
568
|
-
line_format == o.line_format
|
569
|
-
end
|
570
|
-
|
571
|
-
# @see the `==` method
|
572
|
-
# @param [Object] Object to be compared
|
573
|
-
def eql?(o)
|
574
|
-
self == o
|
575
|
-
end
|
576
|
-
|
577
|
-
# Calculates hash code according to all attributes.
|
578
|
-
# @return [Fixnum] Hash code
|
579
|
-
def hash
|
580
|
-
[is_visible, has_title, position, display_unit, base_unit_scale, is_automatic_major_unit, major_unit, major_unit_scale, major_tick_mark, is_automatic_minor_unit, minor_unit, minor_unit_scale, minor_tick_mark, is_automatic_max_value, max_value, is_automatic_min_value, min_value, is_logarithmic, log_base, category_axis_type, axis_between_categories, label_offset, is_plot_order_reversed, is_number_format_linked_to_source, number_format, cross_type, cross_at, is_automatic_tick_marks_spacing, tick_marks_spacing, is_automatic_tick_label_spacing, tick_label_spacing, tick_label_position, tick_label_rotation_angle, fill_format, effect_format, line_format].hash
|
581
|
-
end
|
582
|
-
|
583
|
-
# Builds the object from hash
|
584
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
585
|
-
# @return [Object] Returns the model itself
|
586
|
-
def build_from_hash(attributes)
|
587
|
-
return nil unless attributes.is_a?(Hash)
|
588
|
-
self.class.swagger_types.each_pair do |key, type|
|
589
|
-
mapKey = self.class.attribute_map[key]
|
590
|
-
if !mapKey.nil?
|
591
|
-
val = attributes[mapKey]
|
592
|
-
if val.nil?
|
593
|
-
mapKeyString = mapKey.to_s
|
594
|
-
mapKeyString[0] = mapKeyString[0].downcase
|
595
|
-
mapKey = mapKeyString.to_sym
|
596
|
-
val = attributes[mapKey]
|
597
|
-
end
|
598
|
-
if !val.nil?
|
599
|
-
if type =~ /\AArray<(.*)>/i
|
600
|
-
# check to ensure the input is an array given that the the attribute
|
601
|
-
# is documented as an array but the input is not
|
602
|
-
if val.is_a?(Array)
|
603
|
-
self.send("#{key}=", val.map { |v| _deserialize($1, v) })
|
604
|
-
end
|
605
|
-
else
|
606
|
-
self.send("#{key}=", _deserialize(type, val))
|
607
|
-
end
|
608
|
-
end
|
609
|
-
end
|
610
|
-
end
|
611
|
-
|
612
|
-
self
|
613
|
-
end
|
614
|
-
|
615
|
-
# Deserializes the data based on type
|
616
|
-
# @param string type Data type
|
617
|
-
# @param string value Value to be deserialized
|
618
|
-
# @return [Object] Deserialized data
|
619
|
-
def _deserialize(type, value)
|
620
|
-
case type.to_sym
|
621
|
-
when :DateTime
|
622
|
-
DateTime.parse(value)
|
623
|
-
when :Date
|
624
|
-
Date.parse(value)
|
625
|
-
when :String
|
626
|
-
value.to_s
|
627
|
-
when :Integer
|
628
|
-
value.to_i
|
629
|
-
when :Float
|
630
|
-
value.to_f
|
631
|
-
when :BOOLEAN
|
632
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
633
|
-
true
|
634
|
-
else
|
635
|
-
false
|
636
|
-
end
|
637
|
-
when :Object
|
638
|
-
# generic object (usually a Hash), return directly
|
639
|
-
value
|
640
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
641
|
-
inner_type = Regexp.last_match[:inner_type]
|
642
|
-
value.map { |v| _deserialize(inner_type, v) }
|
643
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
644
|
-
k_type = Regexp.last_match[:k_type]
|
645
|
-
v_type = Regexp.last_match[:v_type]
|
646
|
-
{}.tap do |hash|
|
647
|
-
value.each do |k, v|
|
648
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
649
|
-
end
|
650
|
-
end
|
651
|
-
else # model
|
652
|
-
temp_model = AsposeSlidesCloud.const_get(type).new
|
653
|
-
temp_model.build_from_hash(value)
|
654
|
-
end
|
655
|
-
end
|
656
|
-
|
657
|
-
# Returns the string representation of the object
|
658
|
-
# @return [String] String presentation of the object
|
659
|
-
def to_s
|
660
|
-
to_hash.to_s
|
661
|
-
end
|
662
|
-
|
663
|
-
# to_body is an alias to to_hash (backward compatibility)
|
664
|
-
# @return [Hash] Returns the object in the form of hash
|
665
|
-
def to_body
|
666
|
-
to_hash
|
667
|
-
end
|
668
|
-
|
669
|
-
# Returns the object in the form of hash
|
670
|
-
# @return [Hash] Returns the object in the form of hash
|
671
|
-
def to_hash
|
672
|
-
hash = {}
|
673
|
-
self.class.attribute_map.each_pair do |attr, param|
|
674
|
-
value = self.send(attr)
|
675
|
-
next if value.nil?
|
676
|
-
hash[param] = _to_hash(value)
|
677
|
-
end
|
678
|
-
hash
|
679
|
-
end
|
680
|
-
|
681
|
-
# Outputs non-array value in the form of hash
|
682
|
-
# For object, use to_hash. Otherwise, just return the value
|
683
|
-
# @param [Object] value Any valid value
|
684
|
-
# @return [Hash] Returns the value in the form of hash
|
685
|
-
def _to_hash(value)
|
686
|
-
if value.is_a?(Array)
|
687
|
-
value.compact.map { |v| _to_hash(v) }
|
688
|
-
elsif value.is_a?(Hash)
|
689
|
-
{}.tap do |hash|
|
690
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
691
|
-
end
|
692
|
-
elsif value.respond_to? :to_hash
|
693
|
-
value.to_hash
|
694
|
-
else
|
695
|
-
value
|
696
|
-
end
|
697
|
-
end
|
698
|
-
end
|
699
|
-
end
|
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
|
+
# Represents a chart axis
|
27
|
+
class Axis
|
28
|
+
# True if the axis is visible
|
29
|
+
attr_accessor :is_visible
|
30
|
+
|
31
|
+
# True if the axis has a visible title
|
32
|
+
attr_accessor :has_title
|
33
|
+
|
34
|
+
# Axis position
|
35
|
+
attr_accessor :position
|
36
|
+
|
37
|
+
# The scaling value of the display units for the value axis
|
38
|
+
attr_accessor :display_unit
|
39
|
+
|
40
|
+
# The smallest time unit that is represented on the date axis
|
41
|
+
attr_accessor :base_unit_scale
|
42
|
+
|
43
|
+
# True the major unit of the axis is automatically assigned
|
44
|
+
attr_accessor :is_automatic_major_unit
|
45
|
+
|
46
|
+
# The major units for the date or value axis
|
47
|
+
attr_accessor :major_unit
|
48
|
+
|
49
|
+
# The major unit scale for the date axis
|
50
|
+
attr_accessor :major_unit_scale
|
51
|
+
|
52
|
+
# The type of major tick mark for the specified axis
|
53
|
+
attr_accessor :major_tick_mark
|
54
|
+
|
55
|
+
# True the minor unit of the axis is automatically assigned
|
56
|
+
attr_accessor :is_automatic_minor_unit
|
57
|
+
|
58
|
+
# The minor units for the date or value axis
|
59
|
+
attr_accessor :minor_unit
|
60
|
+
|
61
|
+
# The minor unit scale for the date axis
|
62
|
+
attr_accessor :minor_unit_scale
|
63
|
+
|
64
|
+
# The type of minor tick mark for the specified axis
|
65
|
+
attr_accessor :minor_tick_mark
|
66
|
+
|
67
|
+
# True if the max value is automatically assigned
|
68
|
+
attr_accessor :is_automatic_max_value
|
69
|
+
|
70
|
+
# The maximum value on the value axis
|
71
|
+
attr_accessor :max_value
|
72
|
+
|
73
|
+
# True if the min value is automatically assigned
|
74
|
+
attr_accessor :is_automatic_min_value
|
75
|
+
|
76
|
+
# The minimum value on the value axis
|
77
|
+
attr_accessor :min_value
|
78
|
+
|
79
|
+
# True if the value axis scale type is logarithmic
|
80
|
+
attr_accessor :is_logarithmic
|
81
|
+
|
82
|
+
# The logarithmic base. Default value is 10
|
83
|
+
attr_accessor :log_base
|
84
|
+
|
85
|
+
# The type of the category axis
|
86
|
+
attr_accessor :category_axis_type
|
87
|
+
|
88
|
+
# True if the value axis crosses the category axis between categories. This property applies only to category axes, and it doesn't apply to 3-D charts
|
89
|
+
attr_accessor :axis_between_categories
|
90
|
+
|
91
|
+
# The distance of labels from the axis. Applied to category or date axis. Value must be between 0% and 1000%.
|
92
|
+
attr_accessor :label_offset
|
93
|
+
|
94
|
+
# True if MS PowerPoint plots data points from last to first
|
95
|
+
attr_accessor :is_plot_order_reversed
|
96
|
+
|
97
|
+
# True if the format is linked to source data
|
98
|
+
attr_accessor :is_number_format_linked_to_source
|
99
|
+
|
100
|
+
# the format string for the Axis Labels
|
101
|
+
attr_accessor :number_format
|
102
|
+
|
103
|
+
# The CrossType on the specified axis where the other axis crosses
|
104
|
+
attr_accessor :cross_type
|
105
|
+
|
106
|
+
# The point on the axis where the perpendicular axis crosses it
|
107
|
+
attr_accessor :cross_at
|
108
|
+
|
109
|
+
# True for automatic tick marks spacing value
|
110
|
+
attr_accessor :is_automatic_tick_marks_spacing
|
111
|
+
|
112
|
+
# Specifies how many tick marks shall be skipped before the next one shall be drawn. Applied to category or series axis.
|
113
|
+
attr_accessor :tick_marks_spacing
|
114
|
+
|
115
|
+
# True for automatic tick label spacing value
|
116
|
+
attr_accessor :is_automatic_tick_label_spacing
|
117
|
+
|
118
|
+
# Specifies how many tick labels to skip between label that is drawn.
|
119
|
+
attr_accessor :tick_label_spacing
|
120
|
+
|
121
|
+
# The position of tick-mark labels on the specified axis.
|
122
|
+
attr_accessor :tick_label_position
|
123
|
+
|
124
|
+
# Represents the rotation angle of tick labels.
|
125
|
+
attr_accessor :tick_label_rotation_angle
|
126
|
+
|
127
|
+
# Get or sets the fill format.
|
128
|
+
attr_accessor :fill_format
|
129
|
+
|
130
|
+
# Get or sets the effect format.
|
131
|
+
attr_accessor :effect_format
|
132
|
+
|
133
|
+
# Get or sets the line format.
|
134
|
+
attr_accessor :line_format
|
135
|
+
|
136
|
+
class EnumAttributeValidator
|
137
|
+
attr_reader :datatype
|
138
|
+
attr_reader :allowable_values
|
139
|
+
|
140
|
+
def initialize(datatype, allowable_values)
|
141
|
+
@allowable_values = allowable_values.map do |value|
|
142
|
+
case datatype.to_s
|
143
|
+
when /Integer/i
|
144
|
+
value.to_i
|
145
|
+
when /Float/i
|
146
|
+
value.to_f
|
147
|
+
else
|
148
|
+
value
|
149
|
+
end
|
150
|
+
end
|
151
|
+
end
|
152
|
+
|
153
|
+
def valid?(value)
|
154
|
+
!value || allowable_values.any?{ |s| s.casecmp(value) == 0 }
|
155
|
+
end
|
156
|
+
end
|
157
|
+
|
158
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
159
|
+
def self.attribute_map
|
160
|
+
{
|
161
|
+
:'is_visible' => :'IsVisible',
|
162
|
+
:'has_title' => :'HasTitle',
|
163
|
+
:'position' => :'Position',
|
164
|
+
:'display_unit' => :'DisplayUnit',
|
165
|
+
:'base_unit_scale' => :'BaseUnitScale',
|
166
|
+
:'is_automatic_major_unit' => :'IsAutomaticMajorUnit',
|
167
|
+
:'major_unit' => :'MajorUnit',
|
168
|
+
:'major_unit_scale' => :'MajorUnitScale',
|
169
|
+
:'major_tick_mark' => :'MajorTickMark',
|
170
|
+
:'is_automatic_minor_unit' => :'IsAutomaticMinorUnit',
|
171
|
+
:'minor_unit' => :'MinorUnit',
|
172
|
+
:'minor_unit_scale' => :'MinorUnitScale',
|
173
|
+
:'minor_tick_mark' => :'MinorTickMark',
|
174
|
+
:'is_automatic_max_value' => :'IsAutomaticMaxValue',
|
175
|
+
:'max_value' => :'MaxValue',
|
176
|
+
:'is_automatic_min_value' => :'IsAutomaticMinValue',
|
177
|
+
:'min_value' => :'MinValue',
|
178
|
+
:'is_logarithmic' => :'IsLogarithmic',
|
179
|
+
:'log_base' => :'LogBase',
|
180
|
+
:'category_axis_type' => :'CategoryAxisType',
|
181
|
+
:'axis_between_categories' => :'AxisBetweenCategories',
|
182
|
+
:'label_offset' => :'LabelOffset',
|
183
|
+
:'is_plot_order_reversed' => :'IsPlotOrderReversed',
|
184
|
+
:'is_number_format_linked_to_source' => :'IsNumberFormatLinkedToSource',
|
185
|
+
:'number_format' => :'NumberFormat',
|
186
|
+
:'cross_type' => :'CrossType',
|
187
|
+
:'cross_at' => :'CrossAt',
|
188
|
+
:'is_automatic_tick_marks_spacing' => :'IsAutomaticTickMarksSpacing',
|
189
|
+
:'tick_marks_spacing' => :'TickMarksSpacing',
|
190
|
+
:'is_automatic_tick_label_spacing' => :'IsAutomaticTickLabelSpacing',
|
191
|
+
:'tick_label_spacing' => :'TickLabelSpacing',
|
192
|
+
:'tick_label_position' => :'TickLabelPosition',
|
193
|
+
:'tick_label_rotation_angle' => :'TickLabelRotationAngle',
|
194
|
+
:'fill_format' => :'FillFormat',
|
195
|
+
:'effect_format' => :'EffectFormat',
|
196
|
+
:'line_format' => :'LineFormat',
|
197
|
+
}
|
198
|
+
end
|
199
|
+
|
200
|
+
# Attribute type mapping.
|
201
|
+
def self.swagger_types
|
202
|
+
{
|
203
|
+
:'is_visible' => :'BOOLEAN',
|
204
|
+
:'has_title' => :'BOOLEAN',
|
205
|
+
:'position' => :'String',
|
206
|
+
:'display_unit' => :'String',
|
207
|
+
:'base_unit_scale' => :'String',
|
208
|
+
:'is_automatic_major_unit' => :'BOOLEAN',
|
209
|
+
:'major_unit' => :'Float',
|
210
|
+
:'major_unit_scale' => :'String',
|
211
|
+
:'major_tick_mark' => :'String',
|
212
|
+
:'is_automatic_minor_unit' => :'BOOLEAN',
|
213
|
+
:'minor_unit' => :'Float',
|
214
|
+
:'minor_unit_scale' => :'String',
|
215
|
+
:'minor_tick_mark' => :'String',
|
216
|
+
:'is_automatic_max_value' => :'BOOLEAN',
|
217
|
+
:'max_value' => :'Float',
|
218
|
+
:'is_automatic_min_value' => :'BOOLEAN',
|
219
|
+
:'min_value' => :'Float',
|
220
|
+
:'is_logarithmic' => :'BOOLEAN',
|
221
|
+
:'log_base' => :'Float',
|
222
|
+
:'category_axis_type' => :'String',
|
223
|
+
:'axis_between_categories' => :'BOOLEAN',
|
224
|
+
:'label_offset' => :'Integer',
|
225
|
+
:'is_plot_order_reversed' => :'BOOLEAN',
|
226
|
+
:'is_number_format_linked_to_source' => :'BOOLEAN',
|
227
|
+
:'number_format' => :'String',
|
228
|
+
:'cross_type' => :'String',
|
229
|
+
:'cross_at' => :'Float',
|
230
|
+
:'is_automatic_tick_marks_spacing' => :'BOOLEAN',
|
231
|
+
:'tick_marks_spacing' => :'Integer',
|
232
|
+
:'is_automatic_tick_label_spacing' => :'BOOLEAN',
|
233
|
+
:'tick_label_spacing' => :'Integer',
|
234
|
+
:'tick_label_position' => :'String',
|
235
|
+
:'tick_label_rotation_angle' => :'Float',
|
236
|
+
:'fill_format' => :'FillFormat',
|
237
|
+
:'effect_format' => :'EffectFormat',
|
238
|
+
:'line_format' => :'LineFormat',
|
239
|
+
}
|
240
|
+
end
|
241
|
+
|
242
|
+
# Initializes the object
|
243
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
244
|
+
def initialize(attributes = {})
|
245
|
+
return unless attributes.is_a?(Hash)
|
246
|
+
|
247
|
+
# convert string to symbol for hash key
|
248
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
249
|
+
|
250
|
+
if attributes.has_key?(:'IsVisible')
|
251
|
+
self.is_visible = attributes[:'IsVisible']
|
252
|
+
end
|
253
|
+
|
254
|
+
if attributes.has_key?(:'HasTitle')
|
255
|
+
self.has_title = attributes[:'HasTitle']
|
256
|
+
end
|
257
|
+
|
258
|
+
if attributes.has_key?(:'Position')
|
259
|
+
self.position = attributes[:'Position']
|
260
|
+
end
|
261
|
+
|
262
|
+
if attributes.has_key?(:'DisplayUnit')
|
263
|
+
self.display_unit = attributes[:'DisplayUnit']
|
264
|
+
end
|
265
|
+
|
266
|
+
if attributes.has_key?(:'BaseUnitScale')
|
267
|
+
self.base_unit_scale = attributes[:'BaseUnitScale']
|
268
|
+
end
|
269
|
+
|
270
|
+
if attributes.has_key?(:'IsAutomaticMajorUnit')
|
271
|
+
self.is_automatic_major_unit = attributes[:'IsAutomaticMajorUnit']
|
272
|
+
end
|
273
|
+
|
274
|
+
if attributes.has_key?(:'MajorUnit')
|
275
|
+
self.major_unit = attributes[:'MajorUnit']
|
276
|
+
end
|
277
|
+
|
278
|
+
if attributes.has_key?(:'MajorUnitScale')
|
279
|
+
self.major_unit_scale = attributes[:'MajorUnitScale']
|
280
|
+
end
|
281
|
+
|
282
|
+
if attributes.has_key?(:'MajorTickMark')
|
283
|
+
self.major_tick_mark = attributes[:'MajorTickMark']
|
284
|
+
end
|
285
|
+
|
286
|
+
if attributes.has_key?(:'IsAutomaticMinorUnit')
|
287
|
+
self.is_automatic_minor_unit = attributes[:'IsAutomaticMinorUnit']
|
288
|
+
end
|
289
|
+
|
290
|
+
if attributes.has_key?(:'MinorUnit')
|
291
|
+
self.minor_unit = attributes[:'MinorUnit']
|
292
|
+
end
|
293
|
+
|
294
|
+
if attributes.has_key?(:'MinorUnitScale')
|
295
|
+
self.minor_unit_scale = attributes[:'MinorUnitScale']
|
296
|
+
end
|
297
|
+
|
298
|
+
if attributes.has_key?(:'MinorTickMark')
|
299
|
+
self.minor_tick_mark = attributes[:'MinorTickMark']
|
300
|
+
end
|
301
|
+
|
302
|
+
if attributes.has_key?(:'IsAutomaticMaxValue')
|
303
|
+
self.is_automatic_max_value = attributes[:'IsAutomaticMaxValue']
|
304
|
+
end
|
305
|
+
|
306
|
+
if attributes.has_key?(:'MaxValue')
|
307
|
+
self.max_value = attributes[:'MaxValue']
|
308
|
+
end
|
309
|
+
|
310
|
+
if attributes.has_key?(:'IsAutomaticMinValue')
|
311
|
+
self.is_automatic_min_value = attributes[:'IsAutomaticMinValue']
|
312
|
+
end
|
313
|
+
|
314
|
+
if attributes.has_key?(:'MinValue')
|
315
|
+
self.min_value = attributes[:'MinValue']
|
316
|
+
end
|
317
|
+
|
318
|
+
if attributes.has_key?(:'IsLogarithmic')
|
319
|
+
self.is_logarithmic = attributes[:'IsLogarithmic']
|
320
|
+
end
|
321
|
+
|
322
|
+
if attributes.has_key?(:'LogBase')
|
323
|
+
self.log_base = attributes[:'LogBase']
|
324
|
+
end
|
325
|
+
|
326
|
+
if attributes.has_key?(:'CategoryAxisType')
|
327
|
+
self.category_axis_type = attributes[:'CategoryAxisType']
|
328
|
+
end
|
329
|
+
|
330
|
+
if attributes.has_key?(:'AxisBetweenCategories')
|
331
|
+
self.axis_between_categories = attributes[:'AxisBetweenCategories']
|
332
|
+
end
|
333
|
+
|
334
|
+
if attributes.has_key?(:'LabelOffset')
|
335
|
+
self.label_offset = attributes[:'LabelOffset']
|
336
|
+
end
|
337
|
+
|
338
|
+
if attributes.has_key?(:'IsPlotOrderReversed')
|
339
|
+
self.is_plot_order_reversed = attributes[:'IsPlotOrderReversed']
|
340
|
+
end
|
341
|
+
|
342
|
+
if attributes.has_key?(:'IsNumberFormatLinkedToSource')
|
343
|
+
self.is_number_format_linked_to_source = attributes[:'IsNumberFormatLinkedToSource']
|
344
|
+
end
|
345
|
+
|
346
|
+
if attributes.has_key?(:'NumberFormat')
|
347
|
+
self.number_format = attributes[:'NumberFormat']
|
348
|
+
end
|
349
|
+
|
350
|
+
if attributes.has_key?(:'CrossType')
|
351
|
+
self.cross_type = attributes[:'CrossType']
|
352
|
+
end
|
353
|
+
|
354
|
+
if attributes.has_key?(:'CrossAt')
|
355
|
+
self.cross_at = attributes[:'CrossAt']
|
356
|
+
end
|
357
|
+
|
358
|
+
if attributes.has_key?(:'IsAutomaticTickMarksSpacing')
|
359
|
+
self.is_automatic_tick_marks_spacing = attributes[:'IsAutomaticTickMarksSpacing']
|
360
|
+
end
|
361
|
+
|
362
|
+
if attributes.has_key?(:'TickMarksSpacing')
|
363
|
+
self.tick_marks_spacing = attributes[:'TickMarksSpacing']
|
364
|
+
end
|
365
|
+
|
366
|
+
if attributes.has_key?(:'IsAutomaticTickLabelSpacing')
|
367
|
+
self.is_automatic_tick_label_spacing = attributes[:'IsAutomaticTickLabelSpacing']
|
368
|
+
end
|
369
|
+
|
370
|
+
if attributes.has_key?(:'TickLabelSpacing')
|
371
|
+
self.tick_label_spacing = attributes[:'TickLabelSpacing']
|
372
|
+
end
|
373
|
+
|
374
|
+
if attributes.has_key?(:'TickLabelPosition')
|
375
|
+
self.tick_label_position = attributes[:'TickLabelPosition']
|
376
|
+
end
|
377
|
+
|
378
|
+
if attributes.has_key?(:'TickLabelRotationAngle')
|
379
|
+
self.tick_label_rotation_angle = attributes[:'TickLabelRotationAngle']
|
380
|
+
end
|
381
|
+
|
382
|
+
if attributes.has_key?(:'FillFormat')
|
383
|
+
self.fill_format = attributes[:'FillFormat']
|
384
|
+
end
|
385
|
+
|
386
|
+
if attributes.has_key?(:'EffectFormat')
|
387
|
+
self.effect_format = attributes[:'EffectFormat']
|
388
|
+
end
|
389
|
+
|
390
|
+
if attributes.has_key?(:'LineFormat')
|
391
|
+
self.line_format = attributes[:'LineFormat']
|
392
|
+
end
|
393
|
+
end
|
394
|
+
|
395
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
396
|
+
# @return Array for valid properties with the reasons
|
397
|
+
def list_invalid_properties
|
398
|
+
invalid_properties = Array.new
|
399
|
+
invalid_properties
|
400
|
+
end
|
401
|
+
|
402
|
+
# Check to see if the all the properties in the model are valid
|
403
|
+
# @return true if the model is valid
|
404
|
+
def valid?
|
405
|
+
position_validator = EnumAttributeValidator.new('String', ['Bottom', 'Left', 'Right', 'Top'])
|
406
|
+
return false unless position_validator.valid?(@position)
|
407
|
+
display_unit_validator = EnumAttributeValidator.new('String', ['None', 'Hundreds', 'Thousands', 'TenThousands', 'HundredThousands', 'Millions', 'TenMillions', 'HundredMillions', 'Billions', 'Trillions', 'CustomValue'])
|
408
|
+
return false unless display_unit_validator.valid?(@display_unit)
|
409
|
+
base_unit_scale_validator = EnumAttributeValidator.new('String', ['Days', 'Months', 'Years'])
|
410
|
+
return false unless base_unit_scale_validator.valid?(@base_unit_scale)
|
411
|
+
major_unit_scale_validator = EnumAttributeValidator.new('String', ['Days', 'Months', 'Years'])
|
412
|
+
return false unless major_unit_scale_validator.valid?(@major_unit_scale)
|
413
|
+
major_tick_mark_validator = EnumAttributeValidator.new('String', ['Cross', 'Inside', 'None', 'Outside'])
|
414
|
+
return false unless major_tick_mark_validator.valid?(@major_tick_mark)
|
415
|
+
minor_unit_scale_validator = EnumAttributeValidator.new('String', ['Days', 'Months', 'Years'])
|
416
|
+
return false unless minor_unit_scale_validator.valid?(@minor_unit_scale)
|
417
|
+
minor_tick_mark_validator = EnumAttributeValidator.new('String', ['Cross', 'Inside', 'None', 'Outside'])
|
418
|
+
return false unless minor_tick_mark_validator.valid?(@minor_tick_mark)
|
419
|
+
category_axis_type_validator = EnumAttributeValidator.new('String', ['Text', 'Date'])
|
420
|
+
return false unless category_axis_type_validator.valid?(@category_axis_type)
|
421
|
+
cross_type_validator = EnumAttributeValidator.new('String', ['AxisCrossesAtZero', 'Maximum', 'Custom'])
|
422
|
+
return false unless cross_type_validator.valid?(@cross_type)
|
423
|
+
tick_label_position_validator = EnumAttributeValidator.new('String', ['High', 'Low', 'NextTo', 'None'])
|
424
|
+
return false unless tick_label_position_validator.valid?(@tick_label_position)
|
425
|
+
true
|
426
|
+
end
|
427
|
+
|
428
|
+
# Custom attribute writer method checking allowed values (enum).
|
429
|
+
# @param [Object] position Object to be assigned
|
430
|
+
def position=(position)
|
431
|
+
validator = EnumAttributeValidator.new('String', ['Bottom', 'Left', 'Right', 'Top'])
|
432
|
+
unless validator.valid?(position)
|
433
|
+
fail ArgumentError, 'invalid value for "position", must be one of #{validator.allowable_values}.'
|
434
|
+
end
|
435
|
+
@position = position
|
436
|
+
end
|
437
|
+
|
438
|
+
# Custom attribute writer method checking allowed values (enum).
|
439
|
+
# @param [Object] display_unit Object to be assigned
|
440
|
+
def display_unit=(display_unit)
|
441
|
+
validator = EnumAttributeValidator.new('String', ['None', 'Hundreds', 'Thousands', 'TenThousands', 'HundredThousands', 'Millions', 'TenMillions', 'HundredMillions', 'Billions', 'Trillions', 'CustomValue'])
|
442
|
+
unless validator.valid?(display_unit)
|
443
|
+
fail ArgumentError, 'invalid value for "display_unit", must be one of #{validator.allowable_values}.'
|
444
|
+
end
|
445
|
+
@display_unit = display_unit
|
446
|
+
end
|
447
|
+
|
448
|
+
# Custom attribute writer method checking allowed values (enum).
|
449
|
+
# @param [Object] base_unit_scale Object to be assigned
|
450
|
+
def base_unit_scale=(base_unit_scale)
|
451
|
+
validator = EnumAttributeValidator.new('String', ['Days', 'Months', 'Years'])
|
452
|
+
unless validator.valid?(base_unit_scale)
|
453
|
+
fail ArgumentError, 'invalid value for "base_unit_scale", must be one of #{validator.allowable_values}.'
|
454
|
+
end
|
455
|
+
@base_unit_scale = base_unit_scale
|
456
|
+
end
|
457
|
+
|
458
|
+
# Custom attribute writer method checking allowed values (enum).
|
459
|
+
# @param [Object] major_unit_scale Object to be assigned
|
460
|
+
def major_unit_scale=(major_unit_scale)
|
461
|
+
validator = EnumAttributeValidator.new('String', ['Days', 'Months', 'Years'])
|
462
|
+
unless validator.valid?(major_unit_scale)
|
463
|
+
fail ArgumentError, 'invalid value for "major_unit_scale", must be one of #{validator.allowable_values}.'
|
464
|
+
end
|
465
|
+
@major_unit_scale = major_unit_scale
|
466
|
+
end
|
467
|
+
|
468
|
+
# Custom attribute writer method checking allowed values (enum).
|
469
|
+
# @param [Object] major_tick_mark Object to be assigned
|
470
|
+
def major_tick_mark=(major_tick_mark)
|
471
|
+
validator = EnumAttributeValidator.new('String', ['Cross', 'Inside', 'None', 'Outside'])
|
472
|
+
unless validator.valid?(major_tick_mark)
|
473
|
+
fail ArgumentError, 'invalid value for "major_tick_mark", must be one of #{validator.allowable_values}.'
|
474
|
+
end
|
475
|
+
@major_tick_mark = major_tick_mark
|
476
|
+
end
|
477
|
+
|
478
|
+
# Custom attribute writer method checking allowed values (enum).
|
479
|
+
# @param [Object] minor_unit_scale Object to be assigned
|
480
|
+
def minor_unit_scale=(minor_unit_scale)
|
481
|
+
validator = EnumAttributeValidator.new('String', ['Days', 'Months', 'Years'])
|
482
|
+
unless validator.valid?(minor_unit_scale)
|
483
|
+
fail ArgumentError, 'invalid value for "minor_unit_scale", must be one of #{validator.allowable_values}.'
|
484
|
+
end
|
485
|
+
@minor_unit_scale = minor_unit_scale
|
486
|
+
end
|
487
|
+
|
488
|
+
# Custom attribute writer method checking allowed values (enum).
|
489
|
+
# @param [Object] minor_tick_mark Object to be assigned
|
490
|
+
def minor_tick_mark=(minor_tick_mark)
|
491
|
+
validator = EnumAttributeValidator.new('String', ['Cross', 'Inside', 'None', 'Outside'])
|
492
|
+
unless validator.valid?(minor_tick_mark)
|
493
|
+
fail ArgumentError, 'invalid value for "minor_tick_mark", must be one of #{validator.allowable_values}.'
|
494
|
+
end
|
495
|
+
@minor_tick_mark = minor_tick_mark
|
496
|
+
end
|
497
|
+
|
498
|
+
# Custom attribute writer method checking allowed values (enum).
|
499
|
+
# @param [Object] category_axis_type Object to be assigned
|
500
|
+
def category_axis_type=(category_axis_type)
|
501
|
+
validator = EnumAttributeValidator.new('String', ['Text', 'Date'])
|
502
|
+
unless validator.valid?(category_axis_type)
|
503
|
+
fail ArgumentError, 'invalid value for "category_axis_type", must be one of #{validator.allowable_values}.'
|
504
|
+
end
|
505
|
+
@category_axis_type = category_axis_type
|
506
|
+
end
|
507
|
+
|
508
|
+
# Custom attribute writer method checking allowed values (enum).
|
509
|
+
# @param [Object] cross_type Object to be assigned
|
510
|
+
def cross_type=(cross_type)
|
511
|
+
validator = EnumAttributeValidator.new('String', ['AxisCrossesAtZero', 'Maximum', 'Custom'])
|
512
|
+
unless validator.valid?(cross_type)
|
513
|
+
fail ArgumentError, 'invalid value for "cross_type", must be one of #{validator.allowable_values}.'
|
514
|
+
end
|
515
|
+
@cross_type = cross_type
|
516
|
+
end
|
517
|
+
|
518
|
+
# Custom attribute writer method checking allowed values (enum).
|
519
|
+
# @param [Object] tick_label_position Object to be assigned
|
520
|
+
def tick_label_position=(tick_label_position)
|
521
|
+
validator = EnumAttributeValidator.new('String', ['High', 'Low', 'NextTo', 'None'])
|
522
|
+
unless validator.valid?(tick_label_position)
|
523
|
+
fail ArgumentError, 'invalid value for "tick_label_position", must be one of #{validator.allowable_values}.'
|
524
|
+
end
|
525
|
+
@tick_label_position = tick_label_position
|
526
|
+
end
|
527
|
+
|
528
|
+
# Checks equality by comparing each attribute.
|
529
|
+
# @param [Object] Object to be compared
|
530
|
+
def ==(o)
|
531
|
+
return true if self.equal?(o)
|
532
|
+
self.class == o.class &&
|
533
|
+
is_visible == o.is_visible &&
|
534
|
+
has_title == o.has_title &&
|
535
|
+
position == o.position &&
|
536
|
+
display_unit == o.display_unit &&
|
537
|
+
base_unit_scale == o.base_unit_scale &&
|
538
|
+
is_automatic_major_unit == o.is_automatic_major_unit &&
|
539
|
+
major_unit == o.major_unit &&
|
540
|
+
major_unit_scale == o.major_unit_scale &&
|
541
|
+
major_tick_mark == o.major_tick_mark &&
|
542
|
+
is_automatic_minor_unit == o.is_automatic_minor_unit &&
|
543
|
+
minor_unit == o.minor_unit &&
|
544
|
+
minor_unit_scale == o.minor_unit_scale &&
|
545
|
+
minor_tick_mark == o.minor_tick_mark &&
|
546
|
+
is_automatic_max_value == o.is_automatic_max_value &&
|
547
|
+
max_value == o.max_value &&
|
548
|
+
is_automatic_min_value == o.is_automatic_min_value &&
|
549
|
+
min_value == o.min_value &&
|
550
|
+
is_logarithmic == o.is_logarithmic &&
|
551
|
+
log_base == o.log_base &&
|
552
|
+
category_axis_type == o.category_axis_type &&
|
553
|
+
axis_between_categories == o.axis_between_categories &&
|
554
|
+
label_offset == o.label_offset &&
|
555
|
+
is_plot_order_reversed == o.is_plot_order_reversed &&
|
556
|
+
is_number_format_linked_to_source == o.is_number_format_linked_to_source &&
|
557
|
+
number_format == o.number_format &&
|
558
|
+
cross_type == o.cross_type &&
|
559
|
+
cross_at == o.cross_at &&
|
560
|
+
is_automatic_tick_marks_spacing == o.is_automatic_tick_marks_spacing &&
|
561
|
+
tick_marks_spacing == o.tick_marks_spacing &&
|
562
|
+
is_automatic_tick_label_spacing == o.is_automatic_tick_label_spacing &&
|
563
|
+
tick_label_spacing == o.tick_label_spacing &&
|
564
|
+
tick_label_position == o.tick_label_position &&
|
565
|
+
tick_label_rotation_angle == o.tick_label_rotation_angle &&
|
566
|
+
fill_format == o.fill_format &&
|
567
|
+
effect_format == o.effect_format &&
|
568
|
+
line_format == o.line_format
|
569
|
+
end
|
570
|
+
|
571
|
+
# @see the `==` method
|
572
|
+
# @param [Object] Object to be compared
|
573
|
+
def eql?(o)
|
574
|
+
self == o
|
575
|
+
end
|
576
|
+
|
577
|
+
# Calculates hash code according to all attributes.
|
578
|
+
# @return [Fixnum] Hash code
|
579
|
+
def hash
|
580
|
+
[is_visible, has_title, position, display_unit, base_unit_scale, is_automatic_major_unit, major_unit, major_unit_scale, major_tick_mark, is_automatic_minor_unit, minor_unit, minor_unit_scale, minor_tick_mark, is_automatic_max_value, max_value, is_automatic_min_value, min_value, is_logarithmic, log_base, category_axis_type, axis_between_categories, label_offset, is_plot_order_reversed, is_number_format_linked_to_source, number_format, cross_type, cross_at, is_automatic_tick_marks_spacing, tick_marks_spacing, is_automatic_tick_label_spacing, tick_label_spacing, tick_label_position, tick_label_rotation_angle, fill_format, effect_format, line_format].hash
|
581
|
+
end
|
582
|
+
|
583
|
+
# Builds the object from hash
|
584
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
585
|
+
# @return [Object] Returns the model itself
|
586
|
+
def build_from_hash(attributes)
|
587
|
+
return nil unless attributes.is_a?(Hash)
|
588
|
+
self.class.swagger_types.each_pair do |key, type|
|
589
|
+
mapKey = self.class.attribute_map[key]
|
590
|
+
if !mapKey.nil?
|
591
|
+
val = attributes[mapKey]
|
592
|
+
if val.nil?
|
593
|
+
mapKeyString = mapKey.to_s
|
594
|
+
mapKeyString[0] = mapKeyString[0].downcase
|
595
|
+
mapKey = mapKeyString.to_sym
|
596
|
+
val = attributes[mapKey]
|
597
|
+
end
|
598
|
+
if !val.nil?
|
599
|
+
if type =~ /\AArray<(.*)>/i
|
600
|
+
# check to ensure the input is an array given that the the attribute
|
601
|
+
# is documented as an array but the input is not
|
602
|
+
if val.is_a?(Array)
|
603
|
+
self.send("#{key}=", val.map { |v| _deserialize($1, v) })
|
604
|
+
end
|
605
|
+
else
|
606
|
+
self.send("#{key}=", _deserialize(type, val))
|
607
|
+
end
|
608
|
+
end
|
609
|
+
end
|
610
|
+
end
|
611
|
+
|
612
|
+
self
|
613
|
+
end
|
614
|
+
|
615
|
+
# Deserializes the data based on type
|
616
|
+
# @param string type Data type
|
617
|
+
# @param string value Value to be deserialized
|
618
|
+
# @return [Object] Deserialized data
|
619
|
+
def _deserialize(type, value)
|
620
|
+
case type.to_sym
|
621
|
+
when :DateTime
|
622
|
+
DateTime.parse(value)
|
623
|
+
when :Date
|
624
|
+
Date.parse(value)
|
625
|
+
when :String
|
626
|
+
value.to_s
|
627
|
+
when :Integer
|
628
|
+
value.to_i
|
629
|
+
when :Float
|
630
|
+
value.to_f
|
631
|
+
when :BOOLEAN
|
632
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
633
|
+
true
|
634
|
+
else
|
635
|
+
false
|
636
|
+
end
|
637
|
+
when :Object
|
638
|
+
# generic object (usually a Hash), return directly
|
639
|
+
value
|
640
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
641
|
+
inner_type = Regexp.last_match[:inner_type]
|
642
|
+
value.map { |v| _deserialize(inner_type, v) }
|
643
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
644
|
+
k_type = Regexp.last_match[:k_type]
|
645
|
+
v_type = Regexp.last_match[:v_type]
|
646
|
+
{}.tap do |hash|
|
647
|
+
value.each do |k, v|
|
648
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
649
|
+
end
|
650
|
+
end
|
651
|
+
else # model
|
652
|
+
temp_model = AsposeSlidesCloud.const_get(type).new
|
653
|
+
temp_model.build_from_hash(value)
|
654
|
+
end
|
655
|
+
end
|
656
|
+
|
657
|
+
# Returns the string representation of the object
|
658
|
+
# @return [String] String presentation of the object
|
659
|
+
def to_s
|
660
|
+
to_hash.to_s
|
661
|
+
end
|
662
|
+
|
663
|
+
# to_body is an alias to to_hash (backward compatibility)
|
664
|
+
# @return [Hash] Returns the object in the form of hash
|
665
|
+
def to_body
|
666
|
+
to_hash
|
667
|
+
end
|
668
|
+
|
669
|
+
# Returns the object in the form of hash
|
670
|
+
# @return [Hash] Returns the object in the form of hash
|
671
|
+
def to_hash
|
672
|
+
hash = {}
|
673
|
+
self.class.attribute_map.each_pair do |attr, param|
|
674
|
+
value = self.send(attr)
|
675
|
+
next if value.nil?
|
676
|
+
hash[param] = _to_hash(value)
|
677
|
+
end
|
678
|
+
hash
|
679
|
+
end
|
680
|
+
|
681
|
+
# Outputs non-array value in the form of hash
|
682
|
+
# For object, use to_hash. Otherwise, just return the value
|
683
|
+
# @param [Object] value Any valid value
|
684
|
+
# @return [Hash] Returns the value in the form of hash
|
685
|
+
def _to_hash(value)
|
686
|
+
if value.is_a?(Array)
|
687
|
+
value.compact.map { |v| _to_hash(v) }
|
688
|
+
elsif value.is_a?(Hash)
|
689
|
+
{}.tap do |hash|
|
690
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
691
|
+
end
|
692
|
+
elsif value.respond_to? :to_hash
|
693
|
+
value.to_hash
|
694
|
+
else
|
695
|
+
value
|
696
|
+
end
|
697
|
+
end
|
698
|
+
end
|
699
|
+
end
|