groupdocs_viewer_cloud 18.11 → 19.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/groupdocs_viewer_cloud.rb +27 -32
- data/lib/groupdocs_viewer_cloud/api/file_api.rb +729 -0
- data/lib/groupdocs_viewer_cloud/api/folder_api.rb +694 -0
- data/lib/groupdocs_viewer_cloud/api/storage_api.rb +541 -0
- data/lib/groupdocs_viewer_cloud/api/viewer_api.rb +232 -5069
- data/lib/groupdocs_viewer_cloud/api_client.rb +5 -5
- data/lib/groupdocs_viewer_cloud/api_error.rb +6 -6
- data/lib/groupdocs_viewer_cloud/configuration.rb +4 -4
- data/lib/groupdocs_viewer_cloud/models/attachment_info.rb +22 -34
- data/lib/groupdocs_viewer_cloud/models/{html_page.rb → attachment_view.rb} +39 -33
- data/lib/groupdocs_viewer_cloud/models/cad_options.rb +44 -65
- data/lib/groupdocs_viewer_cloud/models/{font_family.rb → delete_view_options.rb} +25 -17
- data/lib/groupdocs_viewer_cloud/models/{reorder_options.rb → disc_usage.rb} +42 -34
- data/lib/groupdocs_viewer_cloud/models/email_options.rb +23 -25
- data/lib/groupdocs_viewer_cloud/models/{image_page_collection.rb → error.rb} +46 -40
- data/lib/groupdocs_viewer_cloud/models/{outlook_options.rb → error_details.rb} +40 -17
- data/lib/groupdocs_viewer_cloud/models/field_label.rb +20 -12
- data/lib/groupdocs_viewer_cloud/models/{transform_options_base.rb → file_info.rb} +49 -21
- data/lib/groupdocs_viewer_cloud/models/{html_attachment_page_collection.rb → file_version.rb} +91 -40
- data/lib/groupdocs_viewer_cloud/models/{page_info_collection.rb → file_versions.rb} +26 -18
- data/lib/groupdocs_viewer_cloud/models/{font_collection.rb → files_list.rb} +26 -18
- data/lib/groupdocs_viewer_cloud/models/{image_page.rb → files_upload_result.rb} +36 -24
- data/lib/groupdocs_viewer_cloud/models/format.rb +30 -22
- data/lib/groupdocs_viewer_cloud/models/{format_collection.rb → formats_result.rb} +19 -11
- data/lib/groupdocs_viewer_cloud/models/html_options.rb +108 -209
- data/lib/groupdocs_viewer_cloud/models/html_resource.rb +234 -0
- data/lib/groupdocs_viewer_cloud/models/image_options.rb +129 -163
- data/lib/groupdocs_viewer_cloud/models/{attachment_collection.rb → info_result.rb} +32 -32
- data/lib/groupdocs_viewer_cloud/models/{rotate_options.rb → object_exist.rb} +42 -34
- data/lib/groupdocs_viewer_cloud/models/page_info.rb +48 -55
- data/lib/groupdocs_viewer_cloud/models/{pdf_file_info.rb → page_view.rb} +53 -38
- data/lib/groupdocs_viewer_cloud/models/{project_options.rb → project_management_options.rb} +39 -21
- data/lib/groupdocs_viewer_cloud/models/render_options.rb +92 -146
- data/lib/groupdocs_viewer_cloud/models/resource.rb +30 -22
- data/lib/groupdocs_viewer_cloud/models/{row_info.rb → row.rb} +65 -37
- data/lib/groupdocs_viewer_cloud/models/{cells_options.rb → spreadsheet_options.rb} +95 -67
- data/lib/groupdocs_viewer_cloud/models/{attachment.rb → storage_exist.rb} +30 -27
- data/lib/groupdocs_viewer_cloud/models/{image_attachment_page_collection.rb → storage_file.rb} +66 -40
- data/lib/groupdocs_viewer_cloud/models/{document_info.rb → view_options.rb} +99 -105
- data/lib/groupdocs_viewer_cloud/models/{html_page_collection.rb → view_result.rb} +43 -33
- data/lib/groupdocs_viewer_cloud/models/watermark.rb +35 -22
- data/lib/groupdocs_viewer_cloud/version.rb +2 -2
- metadata +27 -110
- data/lib/groupdocs_viewer_cloud/models/document_info_options.rb +0 -358
- data/lib/groupdocs_viewer_cloud/models/file_response.rb +0 -196
- data/lib/groupdocs_viewer_cloud/models/pdf_file_options.rb +0 -358
- data/lib/groupdocs_viewer_cloud/models/pdf_options.rb +0 -236
- data/lib/groupdocs_viewer_cloud/models/render_options_base.rb +0 -358
- data/lib/groupdocs_viewer_cloud/models/requests/html_create_attachment_pages_cache_request.rb +0 -65
- data/lib/groupdocs_viewer_cloud/models/requests/html_create_pages_cache_from_content_request.rb +0 -65
- data/lib/groupdocs_viewer_cloud/models/requests/html_create_pages_cache_from_url_request.rb +0 -65
- data/lib/groupdocs_viewer_cloud/models/requests/html_create_pages_cache_request.rb +0 -61
- data/lib/groupdocs_viewer_cloud/models/requests/html_create_pdf_file_from_content_request.rb +0 -65
- data/lib/groupdocs_viewer_cloud/models/requests/html_create_pdf_file_from_url_request.rb +0 -65
- data/lib/groupdocs_viewer_cloud/models/requests/html_create_pdf_file_request.rb +0 -61
- data/lib/groupdocs_viewer_cloud/models/requests/html_delete_attachment_pages_cache_request.rb +0 -57
- data/lib/groupdocs_viewer_cloud/models/requests/html_delete_pages_cache_request.rb +0 -53
- data/lib/groupdocs_viewer_cloud/models/requests/html_get_attachment_info_request.rb +0 -65
- data/lib/groupdocs_viewer_cloud/models/requests/html_get_attachment_info_with_options_request.rb +0 -61
- data/lib/groupdocs_viewer_cloud/models/requests/html_get_attachment_page_request.rb +0 -109
- data/lib/groupdocs_viewer_cloud/models/requests/html_get_attachment_page_resource_request.rb +0 -65
- data/lib/groupdocs_viewer_cloud/models/requests/html_get_attachment_pages_request.rb +0 -113
- data/lib/groupdocs_viewer_cloud/models/requests/html_get_attachment_request.rb +0 -61
- data/lib/groupdocs_viewer_cloud/models/requests/html_get_attachments_request.rb +0 -57
- data/lib/groupdocs_viewer_cloud/models/requests/html_get_document_info_from_content_request.rb +0 -61
- data/lib/groupdocs_viewer_cloud/models/requests/html_get_document_info_from_url_request.rb +0 -69
- data/lib/groupdocs_viewer_cloud/models/requests/html_get_document_info_from_url_with_options_request.rb +0 -61
- data/lib/groupdocs_viewer_cloud/models/requests/html_get_document_info_request.rb +0 -65
- data/lib/groupdocs_viewer_cloud/models/requests/html_get_document_info_with_options_request.rb +0 -57
- data/lib/groupdocs_viewer_cloud/models/requests/html_get_page_request.rb +0 -101
- data/lib/groupdocs_viewer_cloud/models/requests/html_get_page_resource_request.rb +0 -61
- data/lib/groupdocs_viewer_cloud/models/requests/html_get_pages_from_url_request.rb +0 -109
- data/lib/groupdocs_viewer_cloud/models/requests/html_get_pages_request.rb +0 -105
- data/lib/groupdocs_viewer_cloud/models/requests/html_get_pdf_file_from_url_request.rb +0 -77
- data/lib/groupdocs_viewer_cloud/models/requests/html_get_pdf_file_request.rb +0 -73
- data/lib/groupdocs_viewer_cloud/models/requests/html_get_zip_with_attachment_pages_request.rb +0 -113
- data/lib/groupdocs_viewer_cloud/models/requests/html_get_zip_with_pages_request.rb +0 -105
- data/lib/groupdocs_viewer_cloud/models/requests/html_transform_pages_request.rb +0 -57
- data/lib/groupdocs_viewer_cloud/models/requests/image_create_attachment_pages_cache_request.rb +0 -65
- data/lib/groupdocs_viewer_cloud/models/requests/image_create_pages_cache_from_content_request.rb +0 -65
- data/lib/groupdocs_viewer_cloud/models/requests/image_create_pages_cache_from_url_request.rb +0 -65
- data/lib/groupdocs_viewer_cloud/models/requests/image_create_pages_cache_request.rb +0 -61
- data/lib/groupdocs_viewer_cloud/models/requests/image_create_pdf_file_from_content_request.rb +0 -65
- data/lib/groupdocs_viewer_cloud/models/requests/image_create_pdf_file_from_url_request.rb +0 -65
- data/lib/groupdocs_viewer_cloud/models/requests/image_create_pdf_file_request.rb +0 -61
- data/lib/groupdocs_viewer_cloud/models/requests/image_delete_attachment_pages_cache_request.rb +0 -57
- data/lib/groupdocs_viewer_cloud/models/requests/image_delete_pages_cache_request.rb +0 -53
- data/lib/groupdocs_viewer_cloud/models/requests/image_get_attachment_info_request.rb +0 -69
- data/lib/groupdocs_viewer_cloud/models/requests/image_get_attachment_info_with_options_request.rb +0 -61
- data/lib/groupdocs_viewer_cloud/models/requests/image_get_attachment_page_request.rb +0 -105
- data/lib/groupdocs_viewer_cloud/models/requests/image_get_attachment_pages_request.rb +0 -109
- data/lib/groupdocs_viewer_cloud/models/requests/image_get_attachment_request.rb +0 -61
- data/lib/groupdocs_viewer_cloud/models/requests/image_get_attachments_request.rb +0 -57
- data/lib/groupdocs_viewer_cloud/models/requests/image_get_document_info_from_content_request.rb +0 -61
- data/lib/groupdocs_viewer_cloud/models/requests/image_get_document_info_from_url_request.rb +0 -73
- data/lib/groupdocs_viewer_cloud/models/requests/image_get_document_info_from_url_with_options_request.rb +0 -61
- data/lib/groupdocs_viewer_cloud/models/requests/image_get_document_info_request.rb +0 -69
- data/lib/groupdocs_viewer_cloud/models/requests/image_get_document_info_with_options_request.rb +0 -57
- data/lib/groupdocs_viewer_cloud/models/requests/image_get_page_request.rb +0 -97
- data/lib/groupdocs_viewer_cloud/models/requests/image_get_pages_from_url_request.rb +0 -105
- data/lib/groupdocs_viewer_cloud/models/requests/image_get_pages_request.rb +0 -101
- data/lib/groupdocs_viewer_cloud/models/requests/image_get_pdf_file_from_url_request.rb +0 -77
- data/lib/groupdocs_viewer_cloud/models/requests/image_get_pdf_file_request.rb +0 -73
- data/lib/groupdocs_viewer_cloud/models/requests/image_get_zip_with_attachment_pages_request.rb +0 -109
- data/lib/groupdocs_viewer_cloud/models/requests/image_get_zip_with_pages_request.rb +0 -101
- data/lib/groupdocs_viewer_cloud/models/requests/image_transform_pages_request.rb +0 -57
- data/lib/groupdocs_viewer_cloud/models/resource_url.rb +0 -206
- data/lib/groupdocs_viewer_cloud/models/slides_options.rb +0 -206
- data/lib/groupdocs_viewer_cloud/models/tile.rb +0 -236
- data/lib/groupdocs_viewer_cloud/models/words_options.rb +0 -216
@@ -1,358 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# --------------------------------------------------------------------------------------------------------------------
|
3
|
-
# <copyright company="Aspose Pty Ltd" file="document_info_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
|
-
# Provides options for retrieving document information.
|
32
|
-
class DocumentInfoOptions
|
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,196 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# --------------------------------------------------------------------------------------------------------------------
|
3
|
-
# <copyright company="Aspose Pty Ltd" file="file_response.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 empty type used as a flag.
|
32
|
-
class FileResponse
|
33
|
-
|
34
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
35
|
-
def self.attribute_map
|
36
|
-
{
|
37
|
-
}
|
38
|
-
end
|
39
|
-
|
40
|
-
# Attribute type mapping.
|
41
|
-
def self.swagger_types
|
42
|
-
{
|
43
|
-
}
|
44
|
-
end
|
45
|
-
|
46
|
-
# Initializes the object
|
47
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
48
|
-
def initialize(attributes = {})
|
49
|
-
return unless attributes.is_a?(Hash)
|
50
|
-
|
51
|
-
# convert string to symbol for hash key
|
52
|
-
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
53
|
-
|
54
|
-
end
|
55
|
-
|
56
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
57
|
-
# @return Array for valid properies with the reasons
|
58
|
-
def list_invalid_properties
|
59
|
-
invalid_properties = []
|
60
|
-
return invalid_properties
|
61
|
-
end
|
62
|
-
|
63
|
-
# Check to see if the all the properties in the model are valid
|
64
|
-
# @return true if the model is valid
|
65
|
-
def valid?
|
66
|
-
return true
|
67
|
-
end
|
68
|
-
|
69
|
-
# Checks equality by comparing each attribute.
|
70
|
-
# @param [Object] Object to be compared
|
71
|
-
def ==(other)
|
72
|
-
return true if self.equal?(other)
|
73
|
-
self.class == other.class
|
74
|
-
end
|
75
|
-
|
76
|
-
# @see the `==` method
|
77
|
-
# @param [Object] Object to be compared
|
78
|
-
def eql?(other)
|
79
|
-
self == other
|
80
|
-
end
|
81
|
-
|
82
|
-
# Calculates hash code according to all attributes.
|
83
|
-
# @return [Fixnum] Hash code
|
84
|
-
def hash
|
85
|
-
[].hash
|
86
|
-
end
|
87
|
-
|
88
|
-
# Builds the object from hash
|
89
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
90
|
-
# @return [Object] Returns the model itself
|
91
|
-
def build_from_hash(attributes)
|
92
|
-
return nil unless attributes.is_a?(Hash)
|
93
|
-
self.class.swagger_types.each_pair do |key, type|
|
94
|
-
if type =~ /\AArray<(.*)>/i
|
95
|
-
# check to ensure the input is an array given that the the attribute
|
96
|
-
# is documented as an array but the input is not
|
97
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
98
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
99
|
-
end
|
100
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
101
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
102
|
-
end
|
103
|
-
# or else data not found in attributes(hash), not an issue as the data can be optional
|
104
|
-
end
|
105
|
-
|
106
|
-
self
|
107
|
-
end
|
108
|
-
|
109
|
-
# Deserializes the data based on type
|
110
|
-
# @param string type Data type
|
111
|
-
# @param string value Value to be deserialized
|
112
|
-
# @return [Object] Deserialized data
|
113
|
-
def _deserialize(type, value)
|
114
|
-
case type.to_sym
|
115
|
-
when :DateTime
|
116
|
-
Date.parse value
|
117
|
-
when :Date
|
118
|
-
Date.parse value
|
119
|
-
when :String
|
120
|
-
value.to_s
|
121
|
-
when :Integer
|
122
|
-
value.to_i
|
123
|
-
when :Float
|
124
|
-
value.to_f
|
125
|
-
when :BOOLEAN
|
126
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
127
|
-
true
|
128
|
-
else
|
129
|
-
false
|
130
|
-
end
|
131
|
-
when :Object
|
132
|
-
# generic object (usually a Hash), return directly
|
133
|
-
value
|
134
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
135
|
-
inner_type = Regexp.last_match[:inner_type]
|
136
|
-
value.map { |v| _deserialize(inner_type, v) }
|
137
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
138
|
-
k_type = Regexp.last_match[:k_type]
|
139
|
-
v_type = Regexp.last_match[:v_type]
|
140
|
-
{}.tap do |hash|
|
141
|
-
value.each do |k, v|
|
142
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
143
|
-
end
|
144
|
-
end
|
145
|
-
else
|
146
|
-
# model
|
147
|
-
temp_model = GroupDocsViewerCloud.const_get(type).new
|
148
|
-
temp_model.build_from_hash(value)
|
149
|
-
end
|
150
|
-
end
|
151
|
-
|
152
|
-
# Returns the string representation of the object
|
153
|
-
# @return [String] String presentation of the object
|
154
|
-
def to_s
|
155
|
-
to_hash.to_s
|
156
|
-
end
|
157
|
-
|
158
|
-
# to_body is an alias to to_hash (backward compatibility)
|
159
|
-
# @return [Hash] Returns the object in the form of hash
|
160
|
-
def to_body
|
161
|
-
to_hash
|
162
|
-
end
|
163
|
-
|
164
|
-
# Returns the object in the form of hash
|
165
|
-
# @return [Hash] Returns the object in the form of hash
|
166
|
-
def to_hash
|
167
|
-
hash = {}
|
168
|
-
self.class.attribute_map.each_pair do |attr, param|
|
169
|
-
value = self.send(attr)
|
170
|
-
next if value.nil?
|
171
|
-
hash[param] = _to_hash(value)
|
172
|
-
end
|
173
|
-
hash
|
174
|
-
end
|
175
|
-
|
176
|
-
# Outputs non-array value in the form of hash
|
177
|
-
# For object, use to_hash. Otherwise, just return the value
|
178
|
-
# @param [Object] value Any valid value
|
179
|
-
# @return [Hash] Returns the value in the form of hash
|
180
|
-
def _to_hash(value)
|
181
|
-
if value.is_a?(Array)
|
182
|
-
value.compact.map { |v| _to_hash(v) }
|
183
|
-
elsif value.is_a?(Hash)
|
184
|
-
{}.tap do |hash|
|
185
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
186
|
-
end
|
187
|
-
elsif value.respond_to? :to_hash
|
188
|
-
value.to_hash
|
189
|
-
else
|
190
|
-
value
|
191
|
-
end
|
192
|
-
end
|
193
|
-
|
194
|
-
end
|
195
|
-
|
196
|
-
end
|