groupdocs_viewer_cloud 18.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (106) hide show
  1. checksums.yaml +7 -0
  2. data/lib/groupdocs_viewer_cloud.rb +104 -0
  3. data/lib/groupdocs_viewer_cloud/api/viewer_api.rb +5296 -0
  4. data/lib/groupdocs_viewer_cloud/api_client.rb +390 -0
  5. data/lib/groupdocs_viewer_cloud/api_error.rb +56 -0
  6. data/lib/groupdocs_viewer_cloud/configuration.rb +95 -0
  7. data/lib/groupdocs_viewer_cloud/models/attachment.rb +216 -0
  8. data/lib/groupdocs_viewer_cloud/models/attachment_collection.rb +228 -0
  9. data/lib/groupdocs_viewer_cloud/models/attachment_info.rb +226 -0
  10. data/lib/groupdocs_viewer_cloud/models/cad_options.rb +270 -0
  11. data/lib/groupdocs_viewer_cloud/models/cells_options.rb +296 -0
  12. data/lib/groupdocs_viewer_cloud/models/document_info.rb +282 -0
  13. data/lib/groupdocs_viewer_cloud/models/document_info_options.rb +348 -0
  14. data/lib/groupdocs_viewer_cloud/models/email_options.rb +228 -0
  15. data/lib/groupdocs_viewer_cloud/models/field_label.rb +216 -0
  16. data/lib/groupdocs_viewer_cloud/models/file_response.rb +196 -0
  17. data/lib/groupdocs_viewer_cloud/models/font_collection.rb +208 -0
  18. data/lib/groupdocs_viewer_cloud/models/font_family.rb +206 -0
  19. data/lib/groupdocs_viewer_cloud/models/format.rb +216 -0
  20. data/lib/groupdocs_viewer_cloud/models/format_collection.rb +208 -0
  21. data/lib/groupdocs_viewer_cloud/models/html_attachment_page_collection.rb +238 -0
  22. data/lib/groupdocs_viewer_cloud/models/html_options.rb +428 -0
  23. data/lib/groupdocs_viewer_cloud/models/html_page.rb +228 -0
  24. data/lib/groupdocs_viewer_cloud/models/html_page_collection.rb +228 -0
  25. data/lib/groupdocs_viewer_cloud/models/image_attachment_page_collection.rb +238 -0
  26. data/lib/groupdocs_viewer_cloud/models/image_options.rb +408 -0
  27. data/lib/groupdocs_viewer_cloud/models/image_page.rb +216 -0
  28. data/lib/groupdocs_viewer_cloud/models/image_page_collection.rb +238 -0
  29. data/lib/groupdocs_viewer_cloud/models/page_info.rb +268 -0
  30. data/lib/groupdocs_viewer_cloud/models/page_info_collection.rb +208 -0
  31. data/lib/groupdocs_viewer_cloud/models/pdf_file_info.rb +236 -0
  32. data/lib/groupdocs_viewer_cloud/models/pdf_file_options.rb +348 -0
  33. data/lib/groupdocs_viewer_cloud/models/pdf_options.rb +236 -0
  34. data/lib/groupdocs_viewer_cloud/models/project_options.rb +216 -0
  35. data/lib/groupdocs_viewer_cloud/models/render_options.rb +368 -0
  36. data/lib/groupdocs_viewer_cloud/models/render_options_base.rb +348 -0
  37. data/lib/groupdocs_viewer_cloud/models/reorder_options.rb +226 -0
  38. data/lib/groupdocs_viewer_cloud/models/requests/html_create_attachment_pages_cache_request.rb +65 -0
  39. data/lib/groupdocs_viewer_cloud/models/requests/html_create_pages_cache_from_content_request.rb +65 -0
  40. data/lib/groupdocs_viewer_cloud/models/requests/html_create_pages_cache_from_url_request.rb +65 -0
  41. data/lib/groupdocs_viewer_cloud/models/requests/html_create_pages_cache_request.rb +61 -0
  42. data/lib/groupdocs_viewer_cloud/models/requests/html_create_pdf_file_from_content_request.rb +65 -0
  43. data/lib/groupdocs_viewer_cloud/models/requests/html_create_pdf_file_from_url_request.rb +65 -0
  44. data/lib/groupdocs_viewer_cloud/models/requests/html_create_pdf_file_request.rb +61 -0
  45. data/lib/groupdocs_viewer_cloud/models/requests/html_delete_attachment_pages_cache_request.rb +57 -0
  46. data/lib/groupdocs_viewer_cloud/models/requests/html_delete_pages_cache_request.rb +53 -0
  47. data/lib/groupdocs_viewer_cloud/models/requests/html_get_attachment_info_request.rb +65 -0
  48. data/lib/groupdocs_viewer_cloud/models/requests/html_get_attachment_info_with_options_request.rb +61 -0
  49. data/lib/groupdocs_viewer_cloud/models/requests/html_get_attachment_page_request.rb +109 -0
  50. data/lib/groupdocs_viewer_cloud/models/requests/html_get_attachment_page_resource_request.rb +65 -0
  51. data/lib/groupdocs_viewer_cloud/models/requests/html_get_attachment_pages_request.rb +113 -0
  52. data/lib/groupdocs_viewer_cloud/models/requests/html_get_attachment_request.rb +61 -0
  53. data/lib/groupdocs_viewer_cloud/models/requests/html_get_attachments_request.rb +57 -0
  54. data/lib/groupdocs_viewer_cloud/models/requests/html_get_document_info_from_content_request.rb +61 -0
  55. data/lib/groupdocs_viewer_cloud/models/requests/html_get_document_info_from_url_request.rb +69 -0
  56. data/lib/groupdocs_viewer_cloud/models/requests/html_get_document_info_from_url_with_options_request.rb +61 -0
  57. data/lib/groupdocs_viewer_cloud/models/requests/html_get_document_info_request.rb +65 -0
  58. data/lib/groupdocs_viewer_cloud/models/requests/html_get_document_info_with_options_request.rb +57 -0
  59. data/lib/groupdocs_viewer_cloud/models/requests/html_get_page_request.rb +101 -0
  60. data/lib/groupdocs_viewer_cloud/models/requests/html_get_page_resource_request.rb +61 -0
  61. data/lib/groupdocs_viewer_cloud/models/requests/html_get_pages_from_url_request.rb +109 -0
  62. data/lib/groupdocs_viewer_cloud/models/requests/html_get_pages_request.rb +105 -0
  63. data/lib/groupdocs_viewer_cloud/models/requests/html_get_pdf_file_from_url_request.rb +77 -0
  64. data/lib/groupdocs_viewer_cloud/models/requests/html_get_pdf_file_request.rb +73 -0
  65. data/lib/groupdocs_viewer_cloud/models/requests/html_get_zip_with_attachment_pages_request.rb +113 -0
  66. data/lib/groupdocs_viewer_cloud/models/requests/html_get_zip_with_pages_request.rb +105 -0
  67. data/lib/groupdocs_viewer_cloud/models/requests/html_transform_pages_request.rb +57 -0
  68. data/lib/groupdocs_viewer_cloud/models/requests/image_create_attachment_pages_cache_request.rb +65 -0
  69. data/lib/groupdocs_viewer_cloud/models/requests/image_create_pages_cache_from_content_request.rb +65 -0
  70. data/lib/groupdocs_viewer_cloud/models/requests/image_create_pages_cache_from_url_request.rb +65 -0
  71. data/lib/groupdocs_viewer_cloud/models/requests/image_create_pages_cache_request.rb +61 -0
  72. data/lib/groupdocs_viewer_cloud/models/requests/image_create_pdf_file_from_content_request.rb +65 -0
  73. data/lib/groupdocs_viewer_cloud/models/requests/image_create_pdf_file_from_url_request.rb +65 -0
  74. data/lib/groupdocs_viewer_cloud/models/requests/image_create_pdf_file_request.rb +61 -0
  75. data/lib/groupdocs_viewer_cloud/models/requests/image_delete_attachment_pages_cache_request.rb +57 -0
  76. data/lib/groupdocs_viewer_cloud/models/requests/image_delete_pages_cache_request.rb +53 -0
  77. data/lib/groupdocs_viewer_cloud/models/requests/image_get_attachment_info_request.rb +69 -0
  78. data/lib/groupdocs_viewer_cloud/models/requests/image_get_attachment_info_with_options_request.rb +61 -0
  79. data/lib/groupdocs_viewer_cloud/models/requests/image_get_attachment_page_request.rb +105 -0
  80. data/lib/groupdocs_viewer_cloud/models/requests/image_get_attachment_pages_request.rb +109 -0
  81. data/lib/groupdocs_viewer_cloud/models/requests/image_get_attachment_request.rb +61 -0
  82. data/lib/groupdocs_viewer_cloud/models/requests/image_get_attachments_request.rb +57 -0
  83. data/lib/groupdocs_viewer_cloud/models/requests/image_get_document_info_from_content_request.rb +61 -0
  84. data/lib/groupdocs_viewer_cloud/models/requests/image_get_document_info_from_url_request.rb +73 -0
  85. data/lib/groupdocs_viewer_cloud/models/requests/image_get_document_info_from_url_with_options_request.rb +61 -0
  86. data/lib/groupdocs_viewer_cloud/models/requests/image_get_document_info_request.rb +69 -0
  87. data/lib/groupdocs_viewer_cloud/models/requests/image_get_document_info_with_options_request.rb +57 -0
  88. data/lib/groupdocs_viewer_cloud/models/requests/image_get_page_request.rb +97 -0
  89. data/lib/groupdocs_viewer_cloud/models/requests/image_get_pages_from_url_request.rb +105 -0
  90. data/lib/groupdocs_viewer_cloud/models/requests/image_get_pages_request.rb +101 -0
  91. data/lib/groupdocs_viewer_cloud/models/requests/image_get_pdf_file_from_url_request.rb +77 -0
  92. data/lib/groupdocs_viewer_cloud/models/requests/image_get_pdf_file_request.rb +73 -0
  93. data/lib/groupdocs_viewer_cloud/models/requests/image_get_zip_with_attachment_pages_request.rb +109 -0
  94. data/lib/groupdocs_viewer_cloud/models/requests/image_get_zip_with_pages_request.rb +101 -0
  95. data/lib/groupdocs_viewer_cloud/models/requests/image_transform_pages_request.rb +57 -0
  96. data/lib/groupdocs_viewer_cloud/models/resource.rb +216 -0
  97. data/lib/groupdocs_viewer_cloud/models/resource_url.rb +206 -0
  98. data/lib/groupdocs_viewer_cloud/models/rotate_options.rb +226 -0
  99. data/lib/groupdocs_viewer_cloud/models/row_info.rb +270 -0
  100. data/lib/groupdocs_viewer_cloud/models/slides_options.rb +206 -0
  101. data/lib/groupdocs_viewer_cloud/models/tile.rb +236 -0
  102. data/lib/groupdocs_viewer_cloud/models/transform_options_base.rb +216 -0
  103. data/lib/groupdocs_viewer_cloud/models/watermark.rb +236 -0
  104. data/lib/groupdocs_viewer_cloud/models/words_options.rb +216 -0
  105. data/lib/groupdocs_viewer_cloud/version.rb +29 -0
  106. metadata +235 -0
@@ -0,0 +1,270 @@
1
+ #
2
+ # --------------------------------------------------------------------------------------------------------------------
3
+ # <copyright company="Aspose Pty Ltd" file="cad_options.rb">
4
+ # Copyright (c) 2003-2018 Aspose Pty Ltd
5
+ # </copyright>
6
+ # <summary>
7
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ # of this software and associated documentation files (the "Software"), to deal
9
+ # in the Software without restriction, including without limitation the rights
10
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ # copies of the Software, and to permit persons to whom the Software is
12
+ # furnished to do so, subject to the following conditions:
13
+ #
14
+ # The above copyright notice and this permission notice shall be included in all
15
+ # copies or substantial portions of the Software.
16
+ #
17
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ # SOFTWARE.
24
+ # </summary>
25
+ # --------------------------------------------------------------------------------------------------------------------
26
+ #
27
+
28
+ require 'date'
29
+
30
+ module GroupDocsViewerCloud
31
+ # The CAD documents rendering options.
32
+ class CadOptions
33
+
34
+ # The scale factor affects the size of an output document.
35
+ attr_accessor :scale_factor
36
+
37
+ # The width of the render result in pixels.
38
+ attr_accessor :width
39
+
40
+ # The height of the render result in pixels.
41
+ attr_accessor :height
42
+
43
+ # Indicates whether layouts from CAD document should be rendered.
44
+ attr_accessor :render_layouts
45
+
46
+ # The name of the specific layout to render.
47
+ attr_accessor :layout_name
48
+
49
+ # The list of document layers to render. By default all layers will be rendered. Layer names are case sensitive.
50
+ attr_accessor :layers
51
+
52
+ # The coordinates of the drawing regions, that should be rendered. Please note, that this option works only for DWG format. When the list is empty, then whole drawing is rendered. When the list contains at least one tile, then ScaleFactor, Width, Height, RenderLayouts and LayoutName properties are ignored.
53
+ attr_accessor :tiles
54
+
55
+ # Attribute mapping from ruby-style variable name to JSON key.
56
+ def self.attribute_map
57
+ {
58
+ :'scale_factor' => :'scaleFactor',
59
+ :'width' => :'width',
60
+ :'height' => :'height',
61
+ :'render_layouts' => :'renderLayouts',
62
+ :'layout_name' => :'layoutName',
63
+ :'layers' => :'layers',
64
+ :'tiles' => :'tiles'
65
+ }
66
+ end
67
+
68
+ # Attribute type mapping.
69
+ def self.swagger_types
70
+ {
71
+ :'scale_factor' => :'Float',
72
+ :'width' => :'Integer',
73
+ :'height' => :'Integer',
74
+ :'render_layouts' => :'BOOLEAN',
75
+ :'layout_name' => :'String',
76
+ :'layers' => :'Array<String>',
77
+ :'tiles' => :'Array<Tile>'
78
+ }
79
+ end
80
+
81
+ # Initializes the object
82
+ # @param [Hash] attributes Model attributes in the form of hash
83
+ def initialize(attributes = {})
84
+ return unless attributes.is_a?(Hash)
85
+
86
+ # convert string to symbol for hash key
87
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
88
+
89
+ if attributes.key?(:'scaleFactor')
90
+ self.scale_factor = attributes[:'scaleFactor']
91
+ end
92
+
93
+ if attributes.key?(:'width')
94
+ self.width = attributes[:'width']
95
+ end
96
+
97
+ if attributes.key?(:'height')
98
+ self.height = attributes[:'height']
99
+ end
100
+
101
+ if attributes.key?(:'renderLayouts')
102
+ self.render_layouts = attributes[:'renderLayouts']
103
+ end
104
+
105
+ if attributes.key?(:'layoutName')
106
+ self.layout_name = attributes[:'layoutName']
107
+ end
108
+
109
+ if attributes.key?(:'layers')
110
+ if (value = attributes[:'layers']).is_a?(Array)
111
+ self.layers = value
112
+ end
113
+ end
114
+
115
+ if attributes.key?(:'tiles')
116
+ if (value = attributes[:'tiles']).is_a?(Array)
117
+ self.tiles = value
118
+ end
119
+ end
120
+
121
+ end
122
+
123
+ # Show invalid properties with the reasons. Usually used together with valid?
124
+ # @return Array for valid properies with the reasons
125
+ def list_invalid_properties
126
+ invalid_properties = []
127
+ return invalid_properties
128
+ end
129
+
130
+ # Check to see if the all the properties in the model are valid
131
+ # @return true if the model is valid
132
+ def valid?
133
+ return true
134
+ end
135
+
136
+ # Checks equality by comparing each attribute.
137
+ # @param [Object] Object to be compared
138
+ def ==(other)
139
+ return true if self.equal?(other)
140
+ self.class == other.class &&
141
+ scale_factor == other.scale_factor &&
142
+ width == other.width &&
143
+ height == other.height &&
144
+ render_layouts == other.render_layouts &&
145
+ layout_name == other.layout_name &&
146
+ layers == other.layers &&
147
+ tiles == other.tiles
148
+ end
149
+
150
+ # @see the `==` method
151
+ # @param [Object] Object to be compared
152
+ def eql?(other)
153
+ self == other
154
+ end
155
+
156
+ # Calculates hash code according to all attributes.
157
+ # @return [Fixnum] Hash code
158
+ def hash
159
+ [scale_factor, width, height, render_layouts, layout_name, layers, tiles].hash
160
+ end
161
+
162
+ # Builds the object from hash
163
+ # @param [Hash] attributes Model attributes in the form of hash
164
+ # @return [Object] Returns the model itself
165
+ def build_from_hash(attributes)
166
+ return nil unless attributes.is_a?(Hash)
167
+ self.class.swagger_types.each_pair do |key, type|
168
+ if type =~ /\AArray<(.*)>/i
169
+ # check to ensure the input is an array given that the the attribute
170
+ # is documented as an array but the input is not
171
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
172
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
173
+ end
174
+ elsif !attributes[self.class.attribute_map[key]].nil?
175
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
176
+ end
177
+ # or else data not found in attributes(hash), not an issue as the data can be optional
178
+ end
179
+
180
+ self
181
+ end
182
+
183
+ # Deserializes the data based on type
184
+ # @param string type Data type
185
+ # @param string value Value to be deserialized
186
+ # @return [Object] Deserialized data
187
+ def _deserialize(type, value)
188
+ case type.to_sym
189
+ when :DateTime
190
+ Time.at(/\d/.match(value)[0].to_f).to_datetime
191
+ when :Date
192
+ Time.at(/\d/.match(value)[0].to_f).to_date
193
+ when :String
194
+ value.to_s
195
+ when :Integer
196
+ value.to_i
197
+ when :Float
198
+ value.to_f
199
+ when :BOOLEAN
200
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
201
+ true
202
+ else
203
+ false
204
+ end
205
+ when :Object
206
+ # generic object (usually a Hash), return directly
207
+ value
208
+ when /\AArray<(?<inner_type>.+)>\z/
209
+ inner_type = Regexp.last_match[:inner_type]
210
+ value.map { |v| _deserialize(inner_type, v) }
211
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
212
+ k_type = Regexp.last_match[:k_type]
213
+ v_type = Regexp.last_match[:v_type]
214
+ {}.tap do |hash|
215
+ value.each do |k, v|
216
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
217
+ end
218
+ end
219
+ else
220
+ # model
221
+ temp_model = GroupDocsViewerCloud.const_get(type).new
222
+ temp_model.build_from_hash(value)
223
+ end
224
+ end
225
+
226
+ # Returns the string representation of the object
227
+ # @return [String] String presentation of the object
228
+ def to_s
229
+ to_hash.to_s
230
+ end
231
+
232
+ # to_body is an alias to to_hash (backward compatibility)
233
+ # @return [Hash] Returns the object in the form of hash
234
+ def to_body
235
+ to_hash
236
+ end
237
+
238
+ # Returns the object in the form of hash
239
+ # @return [Hash] Returns the object in the form of hash
240
+ def to_hash
241
+ hash = {}
242
+ self.class.attribute_map.each_pair do |attr, param|
243
+ value = self.send(attr)
244
+ next if value.nil?
245
+ hash[param] = _to_hash(value)
246
+ end
247
+ hash
248
+ end
249
+
250
+ # Outputs non-array value in the form of hash
251
+ # For object, use to_hash. Otherwise, just return the value
252
+ # @param [Object] value Any valid value
253
+ # @return [Hash] Returns the value in the form of hash
254
+ def _to_hash(value)
255
+ if value.is_a?(Array)
256
+ value.compact.map { |v| _to_hash(v) }
257
+ elsif value.is_a?(Hash)
258
+ {}.tap do |hash|
259
+ value.each { |k, v| hash[k] = _to_hash(v) }
260
+ end
261
+ elsif value.respond_to? :to_hash
262
+ value.to_hash
263
+ else
264
+ value
265
+ end
266
+ end
267
+
268
+ end
269
+
270
+ end
@@ -0,0 +1,296 @@
1
+ #
2
+ # --------------------------------------------------------------------------------------------------------------------
3
+ # <copyright company="Aspose Pty Ltd" file="cells_options.rb">
4
+ # Copyright (c) 2003-2018 Aspose Pty Ltd
5
+ # </copyright>
6
+ # <summary>
7
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ # of this software and associated documentation files (the "Software"), to deal
9
+ # in the Software without restriction, including without limitation the rights
10
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ # copies of the Software, and to permit persons to whom the Software is
12
+ # furnished to do so, subject to the following conditions:
13
+ #
14
+ # The above copyright notice and this permission notice shall be included in all
15
+ # copies or substantial portions of the Software.
16
+ #
17
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ # SOFTWARE.
24
+ # </summary>
25
+ # --------------------------------------------------------------------------------------------------------------------
26
+ #
27
+
28
+ require 'date'
29
+
30
+ module GroupDocsViewerCloud
31
+ # The Spreadsheet documents rendering options.
32
+ class CellsOptions
33
+
34
+ # Indicates whether to render grid lines.
35
+ attr_accessor :render_grid_lines
36
+
37
+ # Allows to enable worksheets pagination. By default one worksheet is rendered into one page.
38
+ attr_accessor :paginate_sheets
39
+
40
+ # The number of rows rendered into one page when PaginateSheets = true. Default value is 50.
41
+ attr_accessor :count_rows_per_page
42
+
43
+ # Indicates whether empty rows should be ignored.
44
+ attr_accessor :ignore_empty_rows
45
+
46
+ # The text (*.csv) document encoding.
47
+ attr_accessor :encoding
48
+
49
+ # Prefix for hyper-link that references worksheet inside the same document. For rendering document as HTML only.
50
+ attr_accessor :internal_hyperlink_prefix
51
+
52
+ # Text overflow mode applied when the text is too big to fit into the cell. Supported values {Overlay|OverlayIfNextIsEmpty|HideText|AutoFitColumn}: 1. Overlay - overlay next cells even they are not empty. 2. OverlayIfNextIsEmpty - overlay next cells only if they are not empty (default). 3. HideText - hide overflow text. 4. AutoFitColumn - expand cell width to fit overflowed text.
53
+ attr_accessor :text_overflow_mode
54
+
55
+ # Enables rendering of hidden rows.
56
+ attr_accessor :render_hidden_rows
57
+
58
+ # Enables rendering of hidden columns.
59
+ attr_accessor :render_hidden_columns
60
+
61
+ # Enables rendering worksheet(s) sections which is defined as print area. Renders each print area in a worksheet as a separate page.
62
+ attr_accessor :render_print_area_only
63
+
64
+ # Attribute mapping from ruby-style variable name to JSON key.
65
+ def self.attribute_map
66
+ {
67
+ :'render_grid_lines' => :'renderGridLines',
68
+ :'paginate_sheets' => :'paginateSheets',
69
+ :'count_rows_per_page' => :'countRowsPerPage',
70
+ :'ignore_empty_rows' => :'ignoreEmptyRows',
71
+ :'encoding' => :'encoding',
72
+ :'internal_hyperlink_prefix' => :'internalHyperlinkPrefix',
73
+ :'text_overflow_mode' => :'textOverflowMode',
74
+ :'render_hidden_rows' => :'renderHiddenRows',
75
+ :'render_hidden_columns' => :'renderHiddenColumns',
76
+ :'render_print_area_only' => :'renderPrintAreaOnly'
77
+ }
78
+ end
79
+
80
+ # Attribute type mapping.
81
+ def self.swagger_types
82
+ {
83
+ :'render_grid_lines' => :'BOOLEAN',
84
+ :'paginate_sheets' => :'BOOLEAN',
85
+ :'count_rows_per_page' => :'Integer',
86
+ :'ignore_empty_rows' => :'BOOLEAN',
87
+ :'encoding' => :'String',
88
+ :'internal_hyperlink_prefix' => :'String',
89
+ :'text_overflow_mode' => :'String',
90
+ :'render_hidden_rows' => :'BOOLEAN',
91
+ :'render_hidden_columns' => :'BOOLEAN',
92
+ :'render_print_area_only' => :'BOOLEAN'
93
+ }
94
+ end
95
+
96
+ # Initializes the object
97
+ # @param [Hash] attributes Model attributes in the form of hash
98
+ def initialize(attributes = {})
99
+ return unless attributes.is_a?(Hash)
100
+
101
+ # convert string to symbol for hash key
102
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
103
+
104
+ if attributes.key?(:'renderGridLines')
105
+ self.render_grid_lines = attributes[:'renderGridLines']
106
+ end
107
+
108
+ if attributes.key?(:'paginateSheets')
109
+ self.paginate_sheets = attributes[:'paginateSheets']
110
+ end
111
+
112
+ if attributes.key?(:'countRowsPerPage')
113
+ self.count_rows_per_page = attributes[:'countRowsPerPage']
114
+ end
115
+
116
+ if attributes.key?(:'ignoreEmptyRows')
117
+ self.ignore_empty_rows = attributes[:'ignoreEmptyRows']
118
+ end
119
+
120
+ if attributes.key?(:'encoding')
121
+ self.encoding = attributes[:'encoding']
122
+ end
123
+
124
+ if attributes.key?(:'internalHyperlinkPrefix')
125
+ self.internal_hyperlink_prefix = attributes[:'internalHyperlinkPrefix']
126
+ end
127
+
128
+ if attributes.key?(:'textOverflowMode')
129
+ self.text_overflow_mode = attributes[:'textOverflowMode']
130
+ end
131
+
132
+ if attributes.key?(:'renderHiddenRows')
133
+ self.render_hidden_rows = attributes[:'renderHiddenRows']
134
+ end
135
+
136
+ if attributes.key?(:'renderHiddenColumns')
137
+ self.render_hidden_columns = attributes[:'renderHiddenColumns']
138
+ end
139
+
140
+ if attributes.key?(:'renderPrintAreaOnly')
141
+ self.render_print_area_only = attributes[:'renderPrintAreaOnly']
142
+ end
143
+
144
+ end
145
+
146
+ # Show invalid properties with the reasons. Usually used together with valid?
147
+ # @return Array for valid properies with the reasons
148
+ def list_invalid_properties
149
+ invalid_properties = []
150
+ return invalid_properties
151
+ end
152
+
153
+ # Check to see if the all the properties in the model are valid
154
+ # @return true if the model is valid
155
+ def valid?
156
+ return true
157
+ end
158
+
159
+ # Checks equality by comparing each attribute.
160
+ # @param [Object] Object to be compared
161
+ def ==(other)
162
+ return true if self.equal?(other)
163
+ self.class == other.class &&
164
+ render_grid_lines == other.render_grid_lines &&
165
+ paginate_sheets == other.paginate_sheets &&
166
+ count_rows_per_page == other.count_rows_per_page &&
167
+ ignore_empty_rows == other.ignore_empty_rows &&
168
+ encoding == other.encoding &&
169
+ internal_hyperlink_prefix == other.internal_hyperlink_prefix &&
170
+ text_overflow_mode == other.text_overflow_mode &&
171
+ render_hidden_rows == other.render_hidden_rows &&
172
+ render_hidden_columns == other.render_hidden_columns &&
173
+ render_print_area_only == other.render_print_area_only
174
+ end
175
+
176
+ # @see the `==` method
177
+ # @param [Object] Object to be compared
178
+ def eql?(other)
179
+ self == other
180
+ end
181
+
182
+ # Calculates hash code according to all attributes.
183
+ # @return [Fixnum] Hash code
184
+ def hash
185
+ [render_grid_lines, paginate_sheets, count_rows_per_page, ignore_empty_rows, encoding, internal_hyperlink_prefix, text_overflow_mode, render_hidden_rows, render_hidden_columns, render_print_area_only].hash
186
+ end
187
+
188
+ # Builds the object from hash
189
+ # @param [Hash] attributes Model attributes in the form of hash
190
+ # @return [Object] Returns the model itself
191
+ def build_from_hash(attributes)
192
+ return nil unless attributes.is_a?(Hash)
193
+ self.class.swagger_types.each_pair do |key, type|
194
+ if type =~ /\AArray<(.*)>/i
195
+ # check to ensure the input is an array given that the the attribute
196
+ # is documented as an array but the input is not
197
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
198
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
199
+ end
200
+ elsif !attributes[self.class.attribute_map[key]].nil?
201
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
202
+ end
203
+ # or else data not found in attributes(hash), not an issue as the data can be optional
204
+ end
205
+
206
+ self
207
+ end
208
+
209
+ # Deserializes the data based on type
210
+ # @param string type Data type
211
+ # @param string value Value to be deserialized
212
+ # @return [Object] Deserialized data
213
+ def _deserialize(type, value)
214
+ case type.to_sym
215
+ when :DateTime
216
+ Time.at(/\d/.match(value)[0].to_f).to_datetime
217
+ when :Date
218
+ Time.at(/\d/.match(value)[0].to_f).to_date
219
+ when :String
220
+ value.to_s
221
+ when :Integer
222
+ value.to_i
223
+ when :Float
224
+ value.to_f
225
+ when :BOOLEAN
226
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
227
+ true
228
+ else
229
+ false
230
+ end
231
+ when :Object
232
+ # generic object (usually a Hash), return directly
233
+ value
234
+ when /\AArray<(?<inner_type>.+)>\z/
235
+ inner_type = Regexp.last_match[:inner_type]
236
+ value.map { |v| _deserialize(inner_type, v) }
237
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
238
+ k_type = Regexp.last_match[:k_type]
239
+ v_type = Regexp.last_match[:v_type]
240
+ {}.tap do |hash|
241
+ value.each do |k, v|
242
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
243
+ end
244
+ end
245
+ else
246
+ # model
247
+ temp_model = GroupDocsViewerCloud.const_get(type).new
248
+ temp_model.build_from_hash(value)
249
+ end
250
+ end
251
+
252
+ # Returns the string representation of the object
253
+ # @return [String] String presentation of the object
254
+ def to_s
255
+ to_hash.to_s
256
+ end
257
+
258
+ # to_body is an alias to to_hash (backward compatibility)
259
+ # @return [Hash] Returns the object in the form of hash
260
+ def to_body
261
+ to_hash
262
+ end
263
+
264
+ # Returns the object in the form of hash
265
+ # @return [Hash] Returns the object in the form of hash
266
+ def to_hash
267
+ hash = {}
268
+ self.class.attribute_map.each_pair do |attr, param|
269
+ value = self.send(attr)
270
+ next if value.nil?
271
+ hash[param] = _to_hash(value)
272
+ end
273
+ hash
274
+ end
275
+
276
+ # Outputs non-array value in the form of hash
277
+ # For object, use to_hash. Otherwise, just return the value
278
+ # @param [Object] value Any valid value
279
+ # @return [Hash] Returns the value in the form of hash
280
+ def _to_hash(value)
281
+ if value.is_a?(Array)
282
+ value.compact.map { |v| _to_hash(v) }
283
+ elsif value.is_a?(Hash)
284
+ {}.tap do |hash|
285
+ value.each { |k, v| hash[k] = _to_hash(v) }
286
+ end
287
+ elsif value.respond_to? :to_hash
288
+ value.to_hash
289
+ else
290
+ value
291
+ end
292
+ end
293
+
294
+ end
295
+
296
+ end