groupdocs_viewer_cloud 18.11 → 19.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (111) hide show
  1. checksums.yaml +4 -4
  2. data/lib/groupdocs_viewer_cloud.rb +27 -32
  3. data/lib/groupdocs_viewer_cloud/api/file_api.rb +729 -0
  4. data/lib/groupdocs_viewer_cloud/api/folder_api.rb +694 -0
  5. data/lib/groupdocs_viewer_cloud/api/storage_api.rb +541 -0
  6. data/lib/groupdocs_viewer_cloud/api/viewer_api.rb +232 -5069
  7. data/lib/groupdocs_viewer_cloud/api_client.rb +5 -5
  8. data/lib/groupdocs_viewer_cloud/api_error.rb +6 -6
  9. data/lib/groupdocs_viewer_cloud/configuration.rb +4 -4
  10. data/lib/groupdocs_viewer_cloud/models/attachment_info.rb +22 -34
  11. data/lib/groupdocs_viewer_cloud/models/{html_page.rb → attachment_view.rb} +39 -33
  12. data/lib/groupdocs_viewer_cloud/models/cad_options.rb +44 -65
  13. data/lib/groupdocs_viewer_cloud/models/{font_family.rb → delete_view_options.rb} +25 -17
  14. data/lib/groupdocs_viewer_cloud/models/{reorder_options.rb → disc_usage.rb} +42 -34
  15. data/lib/groupdocs_viewer_cloud/models/email_options.rb +23 -25
  16. data/lib/groupdocs_viewer_cloud/models/{image_page_collection.rb → error.rb} +46 -40
  17. data/lib/groupdocs_viewer_cloud/models/{outlook_options.rb → error_details.rb} +40 -17
  18. data/lib/groupdocs_viewer_cloud/models/field_label.rb +20 -12
  19. data/lib/groupdocs_viewer_cloud/models/{transform_options_base.rb → file_info.rb} +49 -21
  20. data/lib/groupdocs_viewer_cloud/models/{html_attachment_page_collection.rb → file_version.rb} +91 -40
  21. data/lib/groupdocs_viewer_cloud/models/{page_info_collection.rb → file_versions.rb} +26 -18
  22. data/lib/groupdocs_viewer_cloud/models/{font_collection.rb → files_list.rb} +26 -18
  23. data/lib/groupdocs_viewer_cloud/models/{image_page.rb → files_upload_result.rb} +36 -24
  24. data/lib/groupdocs_viewer_cloud/models/format.rb +30 -22
  25. data/lib/groupdocs_viewer_cloud/models/{format_collection.rb → formats_result.rb} +19 -11
  26. data/lib/groupdocs_viewer_cloud/models/html_options.rb +108 -209
  27. data/lib/groupdocs_viewer_cloud/models/html_resource.rb +234 -0
  28. data/lib/groupdocs_viewer_cloud/models/image_options.rb +129 -163
  29. data/lib/groupdocs_viewer_cloud/models/{attachment_collection.rb → info_result.rb} +32 -32
  30. data/lib/groupdocs_viewer_cloud/models/{rotate_options.rb → object_exist.rb} +42 -34
  31. data/lib/groupdocs_viewer_cloud/models/page_info.rb +48 -55
  32. data/lib/groupdocs_viewer_cloud/models/{pdf_file_info.rb → page_view.rb} +53 -38
  33. data/lib/groupdocs_viewer_cloud/models/{project_options.rb → project_management_options.rb} +39 -21
  34. data/lib/groupdocs_viewer_cloud/models/render_options.rb +92 -146
  35. data/lib/groupdocs_viewer_cloud/models/resource.rb +30 -22
  36. data/lib/groupdocs_viewer_cloud/models/{row_info.rb → row.rb} +65 -37
  37. data/lib/groupdocs_viewer_cloud/models/{cells_options.rb → spreadsheet_options.rb} +95 -67
  38. data/lib/groupdocs_viewer_cloud/models/{attachment.rb → storage_exist.rb} +30 -27
  39. data/lib/groupdocs_viewer_cloud/models/{image_attachment_page_collection.rb → storage_file.rb} +66 -40
  40. data/lib/groupdocs_viewer_cloud/models/{document_info.rb → view_options.rb} +99 -105
  41. data/lib/groupdocs_viewer_cloud/models/{html_page_collection.rb → view_result.rb} +43 -33
  42. data/lib/groupdocs_viewer_cloud/models/watermark.rb +35 -22
  43. data/lib/groupdocs_viewer_cloud/version.rb +2 -2
  44. metadata +27 -110
  45. data/lib/groupdocs_viewer_cloud/models/document_info_options.rb +0 -358
  46. data/lib/groupdocs_viewer_cloud/models/file_response.rb +0 -196
  47. data/lib/groupdocs_viewer_cloud/models/pdf_file_options.rb +0 -358
  48. data/lib/groupdocs_viewer_cloud/models/pdf_options.rb +0 -236
  49. data/lib/groupdocs_viewer_cloud/models/render_options_base.rb +0 -358
  50. data/lib/groupdocs_viewer_cloud/models/requests/html_create_attachment_pages_cache_request.rb +0 -65
  51. data/lib/groupdocs_viewer_cloud/models/requests/html_create_pages_cache_from_content_request.rb +0 -65
  52. data/lib/groupdocs_viewer_cloud/models/requests/html_create_pages_cache_from_url_request.rb +0 -65
  53. data/lib/groupdocs_viewer_cloud/models/requests/html_create_pages_cache_request.rb +0 -61
  54. data/lib/groupdocs_viewer_cloud/models/requests/html_create_pdf_file_from_content_request.rb +0 -65
  55. data/lib/groupdocs_viewer_cloud/models/requests/html_create_pdf_file_from_url_request.rb +0 -65
  56. data/lib/groupdocs_viewer_cloud/models/requests/html_create_pdf_file_request.rb +0 -61
  57. data/lib/groupdocs_viewer_cloud/models/requests/html_delete_attachment_pages_cache_request.rb +0 -57
  58. data/lib/groupdocs_viewer_cloud/models/requests/html_delete_pages_cache_request.rb +0 -53
  59. data/lib/groupdocs_viewer_cloud/models/requests/html_get_attachment_info_request.rb +0 -65
  60. data/lib/groupdocs_viewer_cloud/models/requests/html_get_attachment_info_with_options_request.rb +0 -61
  61. data/lib/groupdocs_viewer_cloud/models/requests/html_get_attachment_page_request.rb +0 -109
  62. data/lib/groupdocs_viewer_cloud/models/requests/html_get_attachment_page_resource_request.rb +0 -65
  63. data/lib/groupdocs_viewer_cloud/models/requests/html_get_attachment_pages_request.rb +0 -113
  64. data/lib/groupdocs_viewer_cloud/models/requests/html_get_attachment_request.rb +0 -61
  65. data/lib/groupdocs_viewer_cloud/models/requests/html_get_attachments_request.rb +0 -57
  66. data/lib/groupdocs_viewer_cloud/models/requests/html_get_document_info_from_content_request.rb +0 -61
  67. data/lib/groupdocs_viewer_cloud/models/requests/html_get_document_info_from_url_request.rb +0 -69
  68. data/lib/groupdocs_viewer_cloud/models/requests/html_get_document_info_from_url_with_options_request.rb +0 -61
  69. data/lib/groupdocs_viewer_cloud/models/requests/html_get_document_info_request.rb +0 -65
  70. data/lib/groupdocs_viewer_cloud/models/requests/html_get_document_info_with_options_request.rb +0 -57
  71. data/lib/groupdocs_viewer_cloud/models/requests/html_get_page_request.rb +0 -101
  72. data/lib/groupdocs_viewer_cloud/models/requests/html_get_page_resource_request.rb +0 -61
  73. data/lib/groupdocs_viewer_cloud/models/requests/html_get_pages_from_url_request.rb +0 -109
  74. data/lib/groupdocs_viewer_cloud/models/requests/html_get_pages_request.rb +0 -105
  75. data/lib/groupdocs_viewer_cloud/models/requests/html_get_pdf_file_from_url_request.rb +0 -77
  76. data/lib/groupdocs_viewer_cloud/models/requests/html_get_pdf_file_request.rb +0 -73
  77. data/lib/groupdocs_viewer_cloud/models/requests/html_get_zip_with_attachment_pages_request.rb +0 -113
  78. data/lib/groupdocs_viewer_cloud/models/requests/html_get_zip_with_pages_request.rb +0 -105
  79. data/lib/groupdocs_viewer_cloud/models/requests/html_transform_pages_request.rb +0 -57
  80. data/lib/groupdocs_viewer_cloud/models/requests/image_create_attachment_pages_cache_request.rb +0 -65
  81. data/lib/groupdocs_viewer_cloud/models/requests/image_create_pages_cache_from_content_request.rb +0 -65
  82. data/lib/groupdocs_viewer_cloud/models/requests/image_create_pages_cache_from_url_request.rb +0 -65
  83. data/lib/groupdocs_viewer_cloud/models/requests/image_create_pages_cache_request.rb +0 -61
  84. data/lib/groupdocs_viewer_cloud/models/requests/image_create_pdf_file_from_content_request.rb +0 -65
  85. data/lib/groupdocs_viewer_cloud/models/requests/image_create_pdf_file_from_url_request.rb +0 -65
  86. data/lib/groupdocs_viewer_cloud/models/requests/image_create_pdf_file_request.rb +0 -61
  87. data/lib/groupdocs_viewer_cloud/models/requests/image_delete_attachment_pages_cache_request.rb +0 -57
  88. data/lib/groupdocs_viewer_cloud/models/requests/image_delete_pages_cache_request.rb +0 -53
  89. data/lib/groupdocs_viewer_cloud/models/requests/image_get_attachment_info_request.rb +0 -69
  90. data/lib/groupdocs_viewer_cloud/models/requests/image_get_attachment_info_with_options_request.rb +0 -61
  91. data/lib/groupdocs_viewer_cloud/models/requests/image_get_attachment_page_request.rb +0 -105
  92. data/lib/groupdocs_viewer_cloud/models/requests/image_get_attachment_pages_request.rb +0 -109
  93. data/lib/groupdocs_viewer_cloud/models/requests/image_get_attachment_request.rb +0 -61
  94. data/lib/groupdocs_viewer_cloud/models/requests/image_get_attachments_request.rb +0 -57
  95. data/lib/groupdocs_viewer_cloud/models/requests/image_get_document_info_from_content_request.rb +0 -61
  96. data/lib/groupdocs_viewer_cloud/models/requests/image_get_document_info_from_url_request.rb +0 -73
  97. data/lib/groupdocs_viewer_cloud/models/requests/image_get_document_info_from_url_with_options_request.rb +0 -61
  98. data/lib/groupdocs_viewer_cloud/models/requests/image_get_document_info_request.rb +0 -69
  99. data/lib/groupdocs_viewer_cloud/models/requests/image_get_document_info_with_options_request.rb +0 -57
  100. data/lib/groupdocs_viewer_cloud/models/requests/image_get_page_request.rb +0 -97
  101. data/lib/groupdocs_viewer_cloud/models/requests/image_get_pages_from_url_request.rb +0 -105
  102. data/lib/groupdocs_viewer_cloud/models/requests/image_get_pages_request.rb +0 -101
  103. data/lib/groupdocs_viewer_cloud/models/requests/image_get_pdf_file_from_url_request.rb +0 -77
  104. data/lib/groupdocs_viewer_cloud/models/requests/image_get_pdf_file_request.rb +0 -73
  105. data/lib/groupdocs_viewer_cloud/models/requests/image_get_zip_with_attachment_pages_request.rb +0 -109
  106. data/lib/groupdocs_viewer_cloud/models/requests/image_get_zip_with_pages_request.rb +0 -101
  107. data/lib/groupdocs_viewer_cloud/models/requests/image_transform_pages_request.rb +0 -57
  108. data/lib/groupdocs_viewer_cloud/models/resource_url.rb +0 -206
  109. data/lib/groupdocs_viewer_cloud/models/slides_options.rb +0 -206
  110. data/lib/groupdocs_viewer_cloud/models/tile.rb +0 -236
  111. data/lib/groupdocs_viewer_cloud/models/words_options.rb +0 -216
@@ -1,358 +0,0 @@
1
- #
2
- # --------------------------------------------------------------------------------------------------------------------
3
- # <copyright company="Aspose Pty Ltd" file="render_options_base.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
- # Base render options.
32
- class RenderOptionsBase
33
-
34
- # Allows to specify document password in case when document is password-protected.
35
- attr_accessor :password
36
-
37
- # Allows to specify attachment password in case when attachment is password-protected.
38
- attr_accessor :attachment_password
39
-
40
- # Enables document text extraction. For rendering document as image only.
41
- attr_accessor :extract_text
42
-
43
- # Enables document comments rendering.
44
- attr_accessor :render_comments
45
-
46
- # Enables rendering of document hidden pages, sheets or slides.
47
- attr_accessor :render_hidden_pages
48
-
49
- # Transforms to apply. Available transforms [\"Rotate\",\"Reorder\",\"AddPrintAction\"]. 1. Rotate - pages will be rotated on angle if angle was set before. 2. Reorder - for rendering document as PDF only. Pages will be ordered according to rearrangements made before. 3. AddPrintAction - for rendering document as PDF only. An JavaScript action will be added which opens print dialog when PDF document is opened.
50
- attr_accessor :transforms
51
-
52
- # The name of the default font. Default font name may be specified in following cases: - You want to generally specify the default font to fall back on, if particular font in the document cannot be found during rendering. - Your document uses fonts, that contain non-English characters and you want to make sure any missing font is replaced with one that has the same character set available.
53
- attr_accessor :default_font_name
54
-
55
- # Allows to specify watermark.
56
- attr_accessor :watermark
57
-
58
- # The Spreadsheet documents rendering options.
59
- attr_accessor :cells_options
60
-
61
- # The CAD documents rendering options.
62
- attr_accessor :cad_options
63
-
64
- # The Email documents rendering options.
65
- attr_accessor :email_options
66
-
67
- # The Text documents rendering options.
68
- attr_accessor :words_options
69
-
70
- # The PDF documents rendering options.
71
- attr_accessor :pdf_options
72
-
73
- # The Presentation documents rendering options.
74
- attr_accessor :slides_options
75
-
76
- # The Microsoft Project documents rendering options.
77
- attr_accessor :project_options
78
-
79
- # The Outlook Data File document (PST/OST) rendering options.
80
- attr_accessor :outlook_options
81
-
82
- # Attribute mapping from ruby-style variable name to JSON key.
83
- def self.attribute_map
84
- {
85
- :'password' => :'password',
86
- :'attachment_password' => :'attachmentPassword',
87
- :'extract_text' => :'extractText',
88
- :'render_comments' => :'renderComments',
89
- :'render_hidden_pages' => :'renderHiddenPages',
90
- :'transforms' => :'transforms',
91
- :'default_font_name' => :'defaultFontName',
92
- :'watermark' => :'watermark',
93
- :'cells_options' => :'cellsOptions',
94
- :'cad_options' => :'cadOptions',
95
- :'email_options' => :'emailOptions',
96
- :'words_options' => :'wordsOptions',
97
- :'pdf_options' => :'pdfOptions',
98
- :'slides_options' => :'slidesOptions',
99
- :'project_options' => :'projectOptions',
100
- :'outlook_options' => :'outlookOptions'
101
- }
102
- end
103
-
104
- # Attribute type mapping.
105
- def self.swagger_types
106
- {
107
- :'password' => :'String',
108
- :'attachment_password' => :'String',
109
- :'extract_text' => :'BOOLEAN',
110
- :'render_comments' => :'BOOLEAN',
111
- :'render_hidden_pages' => :'BOOLEAN',
112
- :'transforms' => :'Array<String>',
113
- :'default_font_name' => :'String',
114
- :'watermark' => :'Watermark',
115
- :'cells_options' => :'CellsOptions',
116
- :'cad_options' => :'CadOptions',
117
- :'email_options' => :'EmailOptions',
118
- :'words_options' => :'WordsOptions',
119
- :'pdf_options' => :'PdfOptions',
120
- :'slides_options' => :'SlidesOptions',
121
- :'project_options' => :'ProjectOptions',
122
- :'outlook_options' => :'OutlookOptions'
123
- }
124
- end
125
-
126
- # Initializes the object
127
- # @param [Hash] attributes Model attributes in the form of hash
128
- def initialize(attributes = {})
129
- return unless attributes.is_a?(Hash)
130
-
131
- # convert string to symbol for hash key
132
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
133
-
134
- if attributes.key?(:'password')
135
- self.password = attributes[:'password']
136
- end
137
-
138
- if attributes.key?(:'attachmentPassword')
139
- self.attachment_password = attributes[:'attachmentPassword']
140
- end
141
-
142
- if attributes.key?(:'extractText')
143
- self.extract_text = attributes[:'extractText']
144
- end
145
-
146
- if attributes.key?(:'renderComments')
147
- self.render_comments = attributes[:'renderComments']
148
- end
149
-
150
- if attributes.key?(:'renderHiddenPages')
151
- self.render_hidden_pages = attributes[:'renderHiddenPages']
152
- end
153
-
154
- if attributes.key?(:'transforms')
155
- if (value = attributes[:'transforms']).is_a?(Array)
156
- self.transforms = value
157
- end
158
- end
159
-
160
- if attributes.key?(:'defaultFontName')
161
- self.default_font_name = attributes[:'defaultFontName']
162
- end
163
-
164
- if attributes.key?(:'watermark')
165
- self.watermark = attributes[:'watermark']
166
- end
167
-
168
- if attributes.key?(:'cellsOptions')
169
- self.cells_options = attributes[:'cellsOptions']
170
- end
171
-
172
- if attributes.key?(:'cadOptions')
173
- self.cad_options = attributes[:'cadOptions']
174
- end
175
-
176
- if attributes.key?(:'emailOptions')
177
- self.email_options = attributes[:'emailOptions']
178
- end
179
-
180
- if attributes.key?(:'wordsOptions')
181
- self.words_options = attributes[:'wordsOptions']
182
- end
183
-
184
- if attributes.key?(:'pdfOptions')
185
- self.pdf_options = attributes[:'pdfOptions']
186
- end
187
-
188
- if attributes.key?(:'slidesOptions')
189
- self.slides_options = attributes[:'slidesOptions']
190
- end
191
-
192
- if attributes.key?(:'projectOptions')
193
- self.project_options = attributes[:'projectOptions']
194
- end
195
-
196
- if attributes.key?(:'outlookOptions')
197
- self.outlook_options = attributes[:'outlookOptions']
198
- end
199
-
200
- end
201
-
202
- # Show invalid properties with the reasons. Usually used together with valid?
203
- # @return Array for valid properies with the reasons
204
- def list_invalid_properties
205
- invalid_properties = []
206
- return invalid_properties
207
- end
208
-
209
- # Check to see if the all the properties in the model are valid
210
- # @return true if the model is valid
211
- def valid?
212
- return true
213
- end
214
-
215
- # Checks equality by comparing each attribute.
216
- # @param [Object] Object to be compared
217
- def ==(other)
218
- return true if self.equal?(other)
219
- self.class == other.class &&
220
- password == other.password &&
221
- attachment_password == other.attachment_password &&
222
- extract_text == other.extract_text &&
223
- render_comments == other.render_comments &&
224
- render_hidden_pages == other.render_hidden_pages &&
225
- transforms == other.transforms &&
226
- default_font_name == other.default_font_name &&
227
- watermark == other.watermark &&
228
- cells_options == other.cells_options &&
229
- cad_options == other.cad_options &&
230
- email_options == other.email_options &&
231
- words_options == other.words_options &&
232
- pdf_options == other.pdf_options &&
233
- slides_options == other.slides_options &&
234
- project_options == other.project_options &&
235
- outlook_options == other.outlook_options
236
- end
237
-
238
- # @see the `==` method
239
- # @param [Object] Object to be compared
240
- def eql?(other)
241
- self == other
242
- end
243
-
244
- # Calculates hash code according to all attributes.
245
- # @return [Fixnum] Hash code
246
- def hash
247
- [password, attachment_password, extract_text, render_comments, render_hidden_pages, transforms, default_font_name, watermark, cells_options, cad_options, email_options, words_options, pdf_options, slides_options, project_options, outlook_options].hash
248
- end
249
-
250
- # Builds the object from hash
251
- # @param [Hash] attributes Model attributes in the form of hash
252
- # @return [Object] Returns the model itself
253
- def build_from_hash(attributes)
254
- return nil unless attributes.is_a?(Hash)
255
- self.class.swagger_types.each_pair do |key, type|
256
- if type =~ /\AArray<(.*)>/i
257
- # check to ensure the input is an array given that the the attribute
258
- # is documented as an array but the input is not
259
- if attributes[self.class.attribute_map[key]].is_a?(Array)
260
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
261
- end
262
- elsif !attributes[self.class.attribute_map[key]].nil?
263
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
264
- end
265
- # or else data not found in attributes(hash), not an issue as the data can be optional
266
- end
267
-
268
- self
269
- end
270
-
271
- # Deserializes the data based on type
272
- # @param string type Data type
273
- # @param string value Value to be deserialized
274
- # @return [Object] Deserialized data
275
- def _deserialize(type, value)
276
- case type.to_sym
277
- when :DateTime
278
- Date.parse value
279
- when :Date
280
- Date.parse value
281
- when :String
282
- value.to_s
283
- when :Integer
284
- value.to_i
285
- when :Float
286
- value.to_f
287
- when :BOOLEAN
288
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
289
- true
290
- else
291
- false
292
- end
293
- when :Object
294
- # generic object (usually a Hash), return directly
295
- value
296
- when /\AArray<(?<inner_type>.+)>\z/
297
- inner_type = Regexp.last_match[:inner_type]
298
- value.map { |v| _deserialize(inner_type, v) }
299
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
300
- k_type = Regexp.last_match[:k_type]
301
- v_type = Regexp.last_match[:v_type]
302
- {}.tap do |hash|
303
- value.each do |k, v|
304
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
305
- end
306
- end
307
- else
308
- # model
309
- temp_model = GroupDocsViewerCloud.const_get(type).new
310
- temp_model.build_from_hash(value)
311
- end
312
- end
313
-
314
- # Returns the string representation of the object
315
- # @return [String] String presentation of the object
316
- def to_s
317
- to_hash.to_s
318
- end
319
-
320
- # to_body is an alias to to_hash (backward compatibility)
321
- # @return [Hash] Returns the object in the form of hash
322
- def to_body
323
- to_hash
324
- end
325
-
326
- # Returns the object in the form of hash
327
- # @return [Hash] Returns the object in the form of hash
328
- def to_hash
329
- hash = {}
330
- self.class.attribute_map.each_pair do |attr, param|
331
- value = self.send(attr)
332
- next if value.nil?
333
- hash[param] = _to_hash(value)
334
- end
335
- hash
336
- end
337
-
338
- # Outputs non-array value in the form of hash
339
- # For object, use to_hash. Otherwise, just return the value
340
- # @param [Object] value Any valid value
341
- # @return [Hash] Returns the value in the form of hash
342
- def _to_hash(value)
343
- if value.is_a?(Array)
344
- value.compact.map { |v| _to_hash(v) }
345
- elsif value.is_a?(Hash)
346
- {}.tap do |hash|
347
- value.each { |k, v| hash[k] = _to_hash(v) }
348
- end
349
- elsif value.respond_to? :to_hash
350
- value.to_hash
351
- else
352
- value
353
- end
354
- end
355
-
356
- end
357
-
358
- end
@@ -1,65 +0,0 @@
1
- #
2
- # --------------------------------------------------------------------------------------------------------------------
3
- # <copyright company="Aspose Pty Ltd" file="html_create_attachment_pages_cache_request.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
- module GroupDocsViewerCloud
29
-
30
- #
31
- # Request model for html_create_attachment_pages_cache operation.
32
- #
33
- class HtmlCreateAttachmentPagesCacheRequest
34
-
35
- # The file name.
36
- attr_accessor :file_name
37
- # The attachment name.
38
- attr_accessor :attachment_name
39
- # The HTML rendering options.
40
- attr_accessor :html_options
41
- # The folder with custom fonts in storage.
42
- attr_accessor :fonts_folder
43
- # The folder which contains specified file in storage.
44
- attr_accessor :folder
45
- # The file storage which have to be used.
46
- attr_accessor :storage
47
-
48
- #
49
- # Initializes a new instance.
50
- # @param file_name The file name.
51
- # @param attachment_name The attachment name.
52
- # @param html_options The HTML rendering options.
53
- # @param fonts_folder The folder with custom fonts in storage.
54
- # @param folder The folder which contains specified file in storage.
55
- # @param storage The file storage which have to be used.
56
- def initialize(file_name, attachment_name, html_options = nil, fonts_folder = nil, folder = nil, storage = nil)
57
- self.file_name = file_name
58
- self.attachment_name = attachment_name
59
- self.html_options = html_options
60
- self.fonts_folder = fonts_folder
61
- self.folder = folder
62
- self.storage = storage
63
- end
64
- end
65
- end
@@ -1,65 +0,0 @@
1
- #
2
- # --------------------------------------------------------------------------------------------------------------------
3
- # <copyright company="Aspose Pty Ltd" file="html_create_pages_cache_from_content_request.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
- module GroupDocsViewerCloud
29
-
30
- #
31
- # Request model for html_create_pages_cache_from_content operation.
32
- #
33
- class HtmlCreatePagesCacheFromContentRequest
34
-
35
- # File contents.
36
- attr_accessor :file
37
- # HTML rendering options 'HtmlOptions' as JSON or XML.
38
- attr_accessor :html_options
39
- # The file name.
40
- attr_accessor :file_name
41
- # The folder with custom fonts in storage.
42
- attr_accessor :fonts_folder
43
- # The folder which contains specified file in storage.
44
- attr_accessor :folder
45
- # The file storage which have to be used.
46
- attr_accessor :storage
47
-
48
- #
49
- # Initializes a new instance.
50
- # @param file File contents.
51
- # @param html_options HTML rendering options 'HtmlOptions' as JSON or XML.
52
- # @param file_name The file name.
53
- # @param fonts_folder The folder with custom fonts in storage.
54
- # @param folder The folder which contains specified file in storage.
55
- # @param storage The file storage which have to be used.
56
- def initialize(file, html_options, file_name = nil, fonts_folder = nil, folder = nil, storage = nil)
57
- self.file = file
58
- self.html_options = html_options
59
- self.file_name = file_name
60
- self.fonts_folder = fonts_folder
61
- self.folder = folder
62
- self.storage = storage
63
- end
64
- end
65
- end