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,7 +1,7 @@
1
1
  #
2
2
  # --------------------------------------------------------------------------------------------------------------------
3
3
  # <copyright company="Aspose Pty Ltd" file="html_options.rb">
4
- # Copyright (c) 2003-2018 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2019 Aspose Pty Ltd
5
5
  # </copyright>
6
6
  # <summary>
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -28,143 +28,78 @@
28
28
  require 'date'
29
29
 
30
30
  module GroupDocsViewerCloud
31
- # Provides options for rendering document pages as HTML.
31
+ # Options for rendering document into HTML
32
32
  class HtmlOptions
33
33
 
34
- # Allows to specify document password in case when document is password-protected.
35
- attr_accessor :password
34
+ # Page number from which rendering should be started
35
+ attr_accessor :start_page_number
36
+
37
+ # Count pages which should be rendered
38
+ attr_accessor :count_pages_to_render
36
39
 
37
- # Allows to specify attachment password in case when attachment is password-protected.
38
- attr_accessor :attachment_password
40
+ # 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.
41
+ attr_accessor :default_font_name
39
42
 
40
- # Enables document text extraction. For rendering document as image only.
41
- attr_accessor :extract_text
43
+ # Default encoding for the plain text files such as .csv, .txt and .eml files when encoding is not specified in header
44
+ attr_accessor :default_encoding
42
45
 
43
- # Enables document comments rendering.
46
+ # When enabled comments will be rendered to the output.
44
47
  attr_accessor :render_comments
45
48
 
46
- # Enables rendering of document hidden pages, sheets or slides.
49
+ # When enabled hidden pages, sheets or slides will be rendered to the output
47
50
  attr_accessor :render_hidden_pages
48
51
 
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
52
+ # Rendering options for Spreadsheet file formats. Spreadsheet file formats include files with extensions: .xls, .xlsx, .xlsm, .xlsb, .csv, .ods, .ots, .xltx, .xltm, .tsv
53
+ attr_accessor :spreadsheet_options
57
54
 
58
- # The Spreadsheet documents rendering options.
59
- attr_accessor :cells_options
60
-
61
- # The CAD documents rendering options.
55
+ # Rendering options for CAD file formats. CAD file formats include files with extensions: .dwg, .dxf, .dgn, .ifc, .stl
62
56
  attr_accessor :cad_options
63
57
 
64
- # The Email documents rendering options.
58
+ # Rendering options for Email file formats. Email file formats include files with extensions: .msg, .eml, .emlx, .ifc, .stl
65
59
  attr_accessor :email_options
66
60
 
67
- # The Text documents rendering options.
68
- attr_accessor :words_options
69
-
70
- # The PDF documents rendering options.
71
- attr_accessor :pdf_options
61
+ # Rendering options for Project file formats. Project file formats include files with extensions: .mpt, .mpp
62
+ attr_accessor :project_management_options
72
63
 
73
- # The Presentation documents rendering options.
74
- attr_accessor :slides_options
64
+ # Controls output HTML document resources (styles, images and fonts) linking. By default this option is disabled and all the resources are embedded into HTML document.
65
+ attr_accessor :external_resources
75
66
 
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
- # Allows to specify document page number as starting page to render.
83
- attr_accessor :start_page_number
84
-
85
- # Allows to specify count of document pages to render.
86
- attr_accessor :count_pages
87
-
88
- # Allows to specify HTML resources (styles, images and fonts) path. For example when resource path is http://example.com/api/pages/{page-number}/resources/{resource-name} the {page-number} and {resource-name} templates will be replaced with page number and resource name accordingly. Ignored when EmbedResources option is set to true.
67
+ # Path for the HTML resources (styles, images and fonts). For example when resource path is http://example.com/api/pages/{page-number}/resources/{resource-name} the {page-number} and {resource-name} templates will be replaced with page number and resource name accordingly. This option is ignored when ExternalResources option is disabled.
89
68
  attr_accessor :resource_path
90
69
 
91
- # Allows to ignore ResourcePath when processing *.css files. When this options is enabled ResourcePath won't be added to resource references in *.css file.
92
- attr_accessor :ignore_resource_path_in_resources
93
-
94
- # Controls output HTML document resources (styles, images and fonts) saving. When this options set to true all resources will be embedded into HTML document and ResourcePath option value will be ignored.
95
- attr_accessor :embed_resources
96
-
97
- # Enables content (HTML, CSS and SVG) minification.
98
- attr_accessor :enable_minification
99
-
100
- # Indicates whether rendering will provide responsive web pages, that look well on different device types.
101
- attr_accessor :enable_responsive_rendering
102
-
103
- # Prevents adding fonts to the output HTML document.
104
- attr_accessor :exclude_fonts
105
-
106
- # The list of font names, that will be excluded from HTML.
107
- attr_accessor :exclude_fonts_list
108
-
109
70
  # Attribute mapping from ruby-style variable name to JSON key.
110
71
  def self.attribute_map
111
72
  {
112
- :'password' => :'password',
113
- :'attachment_password' => :'attachmentPassword',
114
- :'extract_text' => :'extractText',
115
- :'render_comments' => :'renderComments',
116
- :'render_hidden_pages' => :'renderHiddenPages',
117
- :'transforms' => :'transforms',
118
- :'default_font_name' => :'defaultFontName',
119
- :'watermark' => :'watermark',
120
- :'cells_options' => :'cellsOptions',
121
- :'cad_options' => :'cadOptions',
122
- :'email_options' => :'emailOptions',
123
- :'words_options' => :'wordsOptions',
124
- :'pdf_options' => :'pdfOptions',
125
- :'slides_options' => :'slidesOptions',
126
- :'project_options' => :'projectOptions',
127
- :'outlook_options' => :'outlookOptions',
128
- :'start_page_number' => :'startPageNumber',
129
- :'count_pages' => :'countPages',
130
- :'resource_path' => :'resourcePath',
131
- :'ignore_resource_path_in_resources' => :'ignoreResourcePathInResources',
132
- :'embed_resources' => :'embedResources',
133
- :'enable_minification' => :'enableMinification',
134
- :'enable_responsive_rendering' => :'enableResponsiveRendering',
135
- :'exclude_fonts' => :'excludeFonts',
136
- :'exclude_fonts_list' => :'excludeFontsList'
73
+ :'start_page_number' => :'StartPageNumber',
74
+ :'count_pages_to_render' => :'CountPagesToRender',
75
+ :'default_font_name' => :'DefaultFontName',
76
+ :'default_encoding' => :'DefaultEncoding',
77
+ :'render_comments' => :'RenderComments',
78
+ :'render_hidden_pages' => :'RenderHiddenPages',
79
+ :'spreadsheet_options' => :'SpreadsheetOptions',
80
+ :'cad_options' => :'CadOptions',
81
+ :'email_options' => :'EmailOptions',
82
+ :'project_management_options' => :'ProjectManagementOptions',
83
+ :'external_resources' => :'ExternalResources',
84
+ :'resource_path' => :'ResourcePath'
137
85
  }
138
86
  end
139
87
 
140
88
  # Attribute type mapping.
141
89
  def self.swagger_types
142
90
  {
143
- :'password' => :'String',
144
- :'attachment_password' => :'String',
145
- :'extract_text' => :'BOOLEAN',
91
+ :'start_page_number' => :'Integer',
92
+ :'count_pages_to_render' => :'Integer',
93
+ :'default_font_name' => :'String',
94
+ :'default_encoding' => :'String',
146
95
  :'render_comments' => :'BOOLEAN',
147
96
  :'render_hidden_pages' => :'BOOLEAN',
148
- :'transforms' => :'Array<String>',
149
- :'default_font_name' => :'String',
150
- :'watermark' => :'Watermark',
151
- :'cells_options' => :'CellsOptions',
97
+ :'spreadsheet_options' => :'SpreadsheetOptions',
152
98
  :'cad_options' => :'CadOptions',
153
99
  :'email_options' => :'EmailOptions',
154
- :'words_options' => :'WordsOptions',
155
- :'pdf_options' => :'PdfOptions',
156
- :'slides_options' => :'SlidesOptions',
157
- :'project_options' => :'ProjectOptions',
158
- :'outlook_options' => :'OutlookOptions',
159
- :'start_page_number' => :'Integer',
160
- :'count_pages' => :'Integer',
161
- :'resource_path' => :'String',
162
- :'ignore_resource_path_in_resources' => :'BOOLEAN',
163
- :'embed_resources' => :'BOOLEAN',
164
- :'enable_minification' => :'BOOLEAN',
165
- :'enable_responsive_rendering' => :'BOOLEAN',
166
- :'exclude_fonts' => :'BOOLEAN',
167
- :'exclude_fonts_list' => :'Array<String>'
100
+ :'project_management_options' => :'ProjectManagementOptions',
101
+ :'external_resources' => :'BOOLEAN',
102
+ :'resource_path' => :'String'
168
103
  }
169
104
  end
170
105
 
@@ -176,122 +111,91 @@ module GroupDocsViewerCloud
176
111
  # convert string to symbol for hash key
177
112
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
178
113
 
179
- if attributes.key?(:'password')
180
- self.password = attributes[:'password']
181
- end
182
-
183
- if attributes.key?(:'attachmentPassword')
184
- self.attachment_password = attributes[:'attachmentPassword']
114
+ if attributes.key?(:'StartPageNumber')
115
+ self.start_page_number = attributes[:'StartPageNumber']
185
116
  end
186
117
 
187
- if attributes.key?(:'extractText')
188
- self.extract_text = attributes[:'extractText']
118
+ if attributes.key?(:'CountPagesToRender')
119
+ self.count_pages_to_render = attributes[:'CountPagesToRender']
189
120
  end
190
121
 
191
- if attributes.key?(:'renderComments')
192
- self.render_comments = attributes[:'renderComments']
122
+ if attributes.key?(:'DefaultFontName')
123
+ self.default_font_name = attributes[:'DefaultFontName']
193
124
  end
194
125
 
195
- if attributes.key?(:'renderHiddenPages')
196
- self.render_hidden_pages = attributes[:'renderHiddenPages']
197
- end
198
-
199
- if attributes.key?(:'transforms')
200
- if (value = attributes[:'transforms']).is_a?(Array)
201
- self.transforms = value
202
- end
126
+ if attributes.key?(:'DefaultEncoding')
127
+ self.default_encoding = attributes[:'DefaultEncoding']
203
128
  end
204
129
 
205
- if attributes.key?(:'defaultFontName')
206
- self.default_font_name = attributes[:'defaultFontName']
130
+ if attributes.key?(:'RenderComments')
131
+ self.render_comments = attributes[:'RenderComments']
207
132
  end
208
133
 
209
- if attributes.key?(:'watermark')
210
- self.watermark = attributes[:'watermark']
134
+ if attributes.key?(:'RenderHiddenPages')
135
+ self.render_hidden_pages = attributes[:'RenderHiddenPages']
211
136
  end
212
137
 
213
- if attributes.key?(:'cellsOptions')
214
- self.cells_options = attributes[:'cellsOptions']
138
+ if attributes.key?(:'SpreadsheetOptions')
139
+ self.spreadsheet_options = attributes[:'SpreadsheetOptions']
215
140
  end
216
141
 
217
- if attributes.key?(:'cadOptions')
218
- self.cad_options = attributes[:'cadOptions']
142
+ if attributes.key?(:'CadOptions')
143
+ self.cad_options = attributes[:'CadOptions']
219
144
  end
220
145
 
221
- if attributes.key?(:'emailOptions')
222
- self.email_options = attributes[:'emailOptions']
146
+ if attributes.key?(:'EmailOptions')
147
+ self.email_options = attributes[:'EmailOptions']
223
148
  end
224
149
 
225
- if attributes.key?(:'wordsOptions')
226
- self.words_options = attributes[:'wordsOptions']
150
+ if attributes.key?(:'ProjectManagementOptions')
151
+ self.project_management_options = attributes[:'ProjectManagementOptions']
227
152
  end
228
153
 
229
- if attributes.key?(:'pdfOptions')
230
- self.pdf_options = attributes[:'pdfOptions']
154
+ if attributes.key?(:'ExternalResources')
155
+ self.external_resources = attributes[:'ExternalResources']
231
156
  end
232
157
 
233
- if attributes.key?(:'slidesOptions')
234
- self.slides_options = attributes[:'slidesOptions']
158
+ if attributes.key?(:'ResourcePath')
159
+ self.resource_path = attributes[:'ResourcePath']
235
160
  end
236
161
 
237
- if attributes.key?(:'projectOptions')
238
- self.project_options = attributes[:'projectOptions']
239
- end
240
-
241
- if attributes.key?(:'outlookOptions')
242
- self.outlook_options = attributes[:'outlookOptions']
243
- end
244
-
245
- if attributes.key?(:'startPageNumber')
246
- self.start_page_number = attributes[:'startPageNumber']
247
- end
248
-
249
- if attributes.key?(:'countPages')
250
- self.count_pages = attributes[:'countPages']
251
- end
252
-
253
- if attributes.key?(:'resourcePath')
254
- self.resource_path = attributes[:'resourcePath']
255
- end
256
-
257
- if attributes.key?(:'ignoreResourcePathInResources')
258
- self.ignore_resource_path_in_resources = attributes[:'ignoreResourcePathInResources']
259
- end
162
+ end
260
163
 
261
- if attributes.key?(:'embedResources')
262
- self.embed_resources = attributes[:'embedResources']
164
+ # Show invalid properties with the reasons. Usually used together with valid?
165
+ # @return Array for valid properies with the reasons
166
+ def list_invalid_properties
167
+ invalid_properties = []
168
+ if @start_page_number.nil?
169
+ invalid_properties.push("invalid value for 'start_page_number', start_page_number cannot be nil.")
263
170
  end
264
171
 
265
- if attributes.key?(:'enableMinification')
266
- self.enable_minification = attributes[:'enableMinification']
172
+ if @count_pages_to_render.nil?
173
+ invalid_properties.push("invalid value for 'count_pages_to_render', count_pages_to_render cannot be nil.")
267
174
  end
268
175
 
269
- if attributes.key?(:'enableResponsiveRendering')
270
- self.enable_responsive_rendering = attributes[:'enableResponsiveRendering']
176
+ if @render_comments.nil?
177
+ invalid_properties.push("invalid value for 'render_comments', render_comments cannot be nil.")
271
178
  end
272
179
 
273
- if attributes.key?(:'excludeFonts')
274
- self.exclude_fonts = attributes[:'excludeFonts']
180
+ if @render_hidden_pages.nil?
181
+ invalid_properties.push("invalid value for 'render_hidden_pages', render_hidden_pages cannot be nil.")
275
182
  end
276
183
 
277
- if attributes.key?(:'excludeFontsList')
278
- if (value = attributes[:'excludeFontsList']).is_a?(Array)
279
- self.exclude_fonts_list = value
280
- end
184
+ if @external_resources.nil?
185
+ invalid_properties.push("invalid value for 'external_resources', external_resources cannot be nil.")
281
186
  end
282
187
 
283
- end
284
-
285
- # Show invalid properties with the reasons. Usually used together with valid?
286
- # @return Array for valid properies with the reasons
287
- def list_invalid_properties
288
- invalid_properties = []
289
188
  return invalid_properties
290
189
  end
291
190
 
292
191
  # Check to see if the all the properties in the model are valid
293
192
  # @return true if the model is valid
294
193
  def valid?
194
+ return false if @start_page_number.nil?
195
+ return false if @count_pages_to_render.nil?
196
+ return false if @render_comments.nil?
197
+ return false if @render_hidden_pages.nil?
198
+ return false if @external_resources.nil?
295
199
  return true
296
200
  end
297
201
 
@@ -300,31 +204,18 @@ module GroupDocsViewerCloud
300
204
  def ==(other)
301
205
  return true if self.equal?(other)
302
206
  self.class == other.class &&
303
- password == other.password &&
304
- attachment_password == other.attachment_password &&
305
- extract_text == other.extract_text &&
207
+ start_page_number == other.start_page_number &&
208
+ count_pages_to_render == other.count_pages_to_render &&
209
+ default_font_name == other.default_font_name &&
210
+ default_encoding == other.default_encoding &&
306
211
  render_comments == other.render_comments &&
307
212
  render_hidden_pages == other.render_hidden_pages &&
308
- transforms == other.transforms &&
309
- default_font_name == other.default_font_name &&
310
- watermark == other.watermark &&
311
- cells_options == other.cells_options &&
213
+ spreadsheet_options == other.spreadsheet_options &&
312
214
  cad_options == other.cad_options &&
313
215
  email_options == other.email_options &&
314
- words_options == other.words_options &&
315
- pdf_options == other.pdf_options &&
316
- slides_options == other.slides_options &&
317
- project_options == other.project_options &&
318
- outlook_options == other.outlook_options &&
319
- start_page_number == other.start_page_number &&
320
- count_pages == other.count_pages &&
321
- resource_path == other.resource_path &&
322
- ignore_resource_path_in_resources == other.ignore_resource_path_in_resources &&
323
- embed_resources == other.embed_resources &&
324
- enable_minification == other.enable_minification &&
325
- enable_responsive_rendering == other.enable_responsive_rendering &&
326
- exclude_fonts == other.exclude_fonts &&
327
- exclude_fonts_list == other.exclude_fonts_list
216
+ project_management_options == other.project_management_options &&
217
+ external_resources == other.external_resources &&
218
+ resource_path == other.resource_path
328
219
  end
329
220
 
330
221
  # @see the `==` method
@@ -336,7 +227,13 @@ module GroupDocsViewerCloud
336
227
  # Calculates hash code according to all attributes.
337
228
  # @return [Fixnum] Hash code
338
229
  def hash
339
- [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, start_page_number, count_pages, resource_path, ignore_resource_path_in_resources, embed_resources, enable_minification, enable_responsive_rendering, exclude_fonts, exclude_fonts_list].hash
230
+ [start_page_number, count_pages_to_render, default_font_name, default_encoding, render_comments, render_hidden_pages, spreadsheet_options, cad_options, email_options, project_management_options, external_resources, resource_path].hash
231
+ end
232
+
233
+ # Downcases first letter.
234
+ # @return downcased string
235
+ def uncap(str)
236
+ str[0, 1].downcase + str[1..-1]
340
237
  end
341
238
 
342
239
  # Builds the object from hash
@@ -345,14 +242,16 @@ module GroupDocsViewerCloud
345
242
  def build_from_hash(attributes)
346
243
  return nil unless attributes.is_a?(Hash)
347
244
  self.class.swagger_types.each_pair do |key, type|
245
+ pname = uncap(self.class.attribute_map[key]).intern
246
+ value = attributes[pname]
348
247
  if type =~ /\AArray<(.*)>/i
349
248
  # check to ensure the input is an array given that the the attribute
350
- # is documented as an array but the input is not
351
- if attributes[self.class.attribute_map[key]].is_a?(Array)
352
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
249
+ # is documented as an array but the input is not
250
+ if value.is_a?(Array)
251
+ self.send("#{key}=", value.map { |v| _deserialize($1, v) })
353
252
  end
354
- elsif !attributes[self.class.attribute_map[key]].nil?
355
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
253
+ elsif !value.nil?
254
+ self.send("#{key}=", _deserialize(type, value))
356
255
  end
357
256
  # or else data not found in attributes(hash), not an issue as the data can be optional
358
257
  end
@@ -0,0 +1,234 @@
1
+ #
2
+ # --------------------------------------------------------------------------------------------------------------------
3
+ # <copyright company="Aspose Pty Ltd" file="html_resource.rb">
4
+ # Copyright (c) 2003-2019 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
+ # HTML page resource (images, css)
32
+ class HtmlResource
33
+
34
+ # Path of resource file in storage
35
+ attr_accessor :path
36
+
37
+ # ULR to retrieve resource.
38
+ attr_accessor :download_url
39
+
40
+ # HTML resource (image, style, graphics or font) file name.
41
+ attr_accessor :name
42
+
43
+ # Attribute mapping from ruby-style variable name to JSON key.
44
+ def self.attribute_map
45
+ {
46
+ :'path' => :'Path',
47
+ :'download_url' => :'DownloadUrl',
48
+ :'name' => :'Name'
49
+ }
50
+ end
51
+
52
+ # Attribute type mapping.
53
+ def self.swagger_types
54
+ {
55
+ :'path' => :'String',
56
+ :'download_url' => :'String',
57
+ :'name' => :'String'
58
+ }
59
+ end
60
+
61
+ # Initializes the object
62
+ # @param [Hash] attributes Model attributes in the form of hash
63
+ def initialize(attributes = {})
64
+ return unless attributes.is_a?(Hash)
65
+
66
+ # convert string to symbol for hash key
67
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
68
+
69
+ if attributes.key?(:'Path')
70
+ self.path = attributes[:'Path']
71
+ end
72
+
73
+ if attributes.key?(:'DownloadUrl')
74
+ self.download_url = attributes[:'DownloadUrl']
75
+ end
76
+
77
+ if attributes.key?(:'Name')
78
+ self.name = attributes[:'Name']
79
+ end
80
+
81
+ end
82
+
83
+ # Show invalid properties with the reasons. Usually used together with valid?
84
+ # @return Array for valid properies with the reasons
85
+ def list_invalid_properties
86
+ invalid_properties = []
87
+ return invalid_properties
88
+ end
89
+
90
+ # Check to see if the all the properties in the model are valid
91
+ # @return true if the model is valid
92
+ def valid?
93
+ return true
94
+ end
95
+
96
+ # Checks equality by comparing each attribute.
97
+ # @param [Object] Object to be compared
98
+ def ==(other)
99
+ return true if self.equal?(other)
100
+ self.class == other.class &&
101
+ path == other.path &&
102
+ download_url == other.download_url &&
103
+ name == other.name
104
+ end
105
+
106
+ # @see the `==` method
107
+ # @param [Object] Object to be compared
108
+ def eql?(other)
109
+ self == other
110
+ end
111
+
112
+ # Calculates hash code according to all attributes.
113
+ # @return [Fixnum] Hash code
114
+ def hash
115
+ [path, download_url, name].hash
116
+ end
117
+
118
+ # Downcases first letter.
119
+ # @return downcased string
120
+ def uncap(str)
121
+ str[0, 1].downcase + str[1..-1]
122
+ end
123
+
124
+ # Builds the object from hash
125
+ # @param [Hash] attributes Model attributes in the form of hash
126
+ # @return [Object] Returns the model itself
127
+ def build_from_hash(attributes)
128
+ return nil unless attributes.is_a?(Hash)
129
+ self.class.swagger_types.each_pair do |key, type|
130
+ pname = uncap(self.class.attribute_map[key]).intern
131
+ value = attributes[pname]
132
+ if type =~ /\AArray<(.*)>/i
133
+ # check to ensure the input is an array given that the the attribute
134
+ # is documented as an array but the input is not
135
+ if value.is_a?(Array)
136
+ self.send("#{key}=", value.map { |v| _deserialize($1, v) })
137
+ end
138
+ elsif !value.nil?
139
+ self.send("#{key}=", _deserialize(type, value))
140
+ end
141
+ # or else data not found in attributes(hash), not an issue as the data can be optional
142
+ end
143
+
144
+ self
145
+ end
146
+
147
+ # Deserializes the data based on type
148
+ # @param string type Data type
149
+ # @param string value Value to be deserialized
150
+ # @return [Object] Deserialized data
151
+ def _deserialize(type, value)
152
+ case type.to_sym
153
+ when :DateTime
154
+ Date.parse value
155
+ when :Date
156
+ Date.parse value
157
+ when :String
158
+ value.to_s
159
+ when :Integer
160
+ value.to_i
161
+ when :Float
162
+ value.to_f
163
+ when :BOOLEAN
164
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
165
+ true
166
+ else
167
+ false
168
+ end
169
+ when :Object
170
+ # generic object (usually a Hash), return directly
171
+ value
172
+ when /\AArray<(?<inner_type>.+)>\z/
173
+ inner_type = Regexp.last_match[:inner_type]
174
+ value.map { |v| _deserialize(inner_type, v) }
175
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
176
+ k_type = Regexp.last_match[:k_type]
177
+ v_type = Regexp.last_match[:v_type]
178
+ {}.tap do |hash|
179
+ value.each do |k, v|
180
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
181
+ end
182
+ end
183
+ else
184
+ # model
185
+ temp_model = GroupDocsViewerCloud.const_get(type).new
186
+ temp_model.build_from_hash(value)
187
+ end
188
+ end
189
+
190
+ # Returns the string representation of the object
191
+ # @return [String] String presentation of the object
192
+ def to_s
193
+ to_hash.to_s
194
+ end
195
+
196
+ # to_body is an alias to to_hash (backward compatibility)
197
+ # @return [Hash] Returns the object in the form of hash
198
+ def to_body
199
+ to_hash
200
+ end
201
+
202
+ # Returns the object in the form of hash
203
+ # @return [Hash] Returns the object in the form of hash
204
+ def to_hash
205
+ hash = {}
206
+ self.class.attribute_map.each_pair do |attr, param|
207
+ value = self.send(attr)
208
+ next if value.nil?
209
+ hash[param] = _to_hash(value)
210
+ end
211
+ hash
212
+ end
213
+
214
+ # Outputs non-array value in the form of hash
215
+ # For object, use to_hash. Otherwise, just return the value
216
+ # @param [Object] value Any valid value
217
+ # @return [Hash] Returns the value in the form of hash
218
+ def _to_hash(value)
219
+ if value.is_a?(Array)
220
+ value.compact.map { |v| _to_hash(v) }
221
+ elsif value.is_a?(Hash)
222
+ {}.tap do |hash|
223
+ value.each { |k, v| hash[k] = _to_hash(v) }
224
+ end
225
+ elsif value.respond_to? :to_hash
226
+ value.to_hash
227
+ else
228
+ value
229
+ end
230
+ end
231
+
232
+ end
233
+
234
+ end