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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aae4096fd39ad986135f6ad61ea705f916ea0d1e
4
- data.tar.gz: c8601a4a31d37a8d6958085782d11892704e1e18
3
+ metadata.gz: e16b937deb4d5b53e26a03a3cbf7fb54ae2d4029
4
+ data.tar.gz: 42430a81bf760cd2fa0cb3bec08160081af6b641
5
5
  SHA512:
6
- metadata.gz: edc404262f254191ad5af029e76d94892fdb384330d7a2eabef4f8e9da8a894d8e7b32e75aad446cddc15c958ecd8c805272a7410b51e263b1b64e867b9b7775
7
- data.tar.gz: 81b7b536ea2e77f81631264f8c08d513e89f994ce9ea762dfe092e5043791c42bdb1e9157cab6f9a3bcb0f524f5088d9981efc9062f452338d2e9e33225ba4b6
6
+ metadata.gz: fe3677944015724737fa57d950522092270e497c2e4bee863d3d77906749560659add56008255dd20bbc8e78f1a81f4d4b581e027da285091456e2bf0935c3d4
7
+ data.tar.gz: 4302c70a902d1eb1be531b135d7c5a18232df78112b94636a302d141ebd65e69fa51de3ac49ca69b01ad7ee94fae942c95d419d7c92c908d8ba1990032673be6
@@ -1,6 +1,6 @@
1
1
  # ------------------------------------------------------------------------------------
2
2
  # <copyright company="Aspose Pty Ltd" file="groupdocs_viewer_cloud.rb">
3
- # Copyright (c) 2003-2018 Aspose Pty Ltd
3
+ # Copyright (c) 2003-2019 Aspose Pty Ltd
4
4
  # </copyright>
5
5
  # <summary>
6
6
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -30,47 +30,42 @@ require_relative 'groupdocs_viewer_cloud/version'
30
30
  require_relative 'groupdocs_viewer_cloud/configuration'
31
31
 
32
32
  # Models
33
- require_relative 'groupdocs_viewer_cloud/models/attachment_collection'
34
33
  require_relative 'groupdocs_viewer_cloud/models/attachment_info'
35
34
  require_relative 'groupdocs_viewer_cloud/models/cad_options'
36
- require_relative 'groupdocs_viewer_cloud/models/cells_options'
37
- require_relative 'groupdocs_viewer_cloud/models/document_info'
35
+ require_relative 'groupdocs_viewer_cloud/models/delete_view_options'
36
+ require_relative 'groupdocs_viewer_cloud/models/disc_usage'
38
37
  require_relative 'groupdocs_viewer_cloud/models/email_options'
38
+ require_relative 'groupdocs_viewer_cloud/models/error'
39
+ require_relative 'groupdocs_viewer_cloud/models/error_details'
39
40
  require_relative 'groupdocs_viewer_cloud/models/field_label'
40
- require_relative 'groupdocs_viewer_cloud/models/file_response'
41
- require_relative 'groupdocs_viewer_cloud/models/font_collection'
42
- require_relative 'groupdocs_viewer_cloud/models/font_family'
41
+ require_relative 'groupdocs_viewer_cloud/models/file_info'
42
+ require_relative 'groupdocs_viewer_cloud/models/file_versions'
43
+ require_relative 'groupdocs_viewer_cloud/models/files_list'
44
+ require_relative 'groupdocs_viewer_cloud/models/files_upload_result'
43
45
  require_relative 'groupdocs_viewer_cloud/models/format'
44
- require_relative 'groupdocs_viewer_cloud/models/format_collection'
45
- require_relative 'groupdocs_viewer_cloud/models/html_attachment_page_collection'
46
- require_relative 'groupdocs_viewer_cloud/models/html_page_collection'
47
- require_relative 'groupdocs_viewer_cloud/models/image_attachment_page_collection'
48
- require_relative 'groupdocs_viewer_cloud/models/outlook_options'
46
+ require_relative 'groupdocs_viewer_cloud/models/formats_result'
47
+ require_relative 'groupdocs_viewer_cloud/models/info_result'
48
+ require_relative 'groupdocs_viewer_cloud/models/object_exist'
49
49
  require_relative 'groupdocs_viewer_cloud/models/page_info'
50
- require_relative 'groupdocs_viewer_cloud/models/page_info_collection'
51
- require_relative 'groupdocs_viewer_cloud/models/pdf_options'
52
- require_relative 'groupdocs_viewer_cloud/models/project_options'
53
- require_relative 'groupdocs_viewer_cloud/models/render_options_base'
54
- require_relative 'groupdocs_viewer_cloud/models/resource_url'
55
- require_relative 'groupdocs_viewer_cloud/models/row_info'
56
- require_relative 'groupdocs_viewer_cloud/models/slides_options'
57
- require_relative 'groupdocs_viewer_cloud/models/tile'
58
- require_relative 'groupdocs_viewer_cloud/models/transform_options_base'
59
- require_relative 'groupdocs_viewer_cloud/models/watermark'
60
- require_relative 'groupdocs_viewer_cloud/models/words_options'
61
- require_relative 'groupdocs_viewer_cloud/models/attachment'
62
- require_relative 'groupdocs_viewer_cloud/models/document_info_options'
63
- require_relative 'groupdocs_viewer_cloud/models/html_page'
64
- require_relative 'groupdocs_viewer_cloud/models/image_page'
65
- require_relative 'groupdocs_viewer_cloud/models/image_page_collection'
66
- require_relative 'groupdocs_viewer_cloud/models/pdf_file_info'
67
- require_relative 'groupdocs_viewer_cloud/models/pdf_file_options'
50
+ require_relative 'groupdocs_viewer_cloud/models/project_management_options'
68
51
  require_relative 'groupdocs_viewer_cloud/models/render_options'
69
- require_relative 'groupdocs_viewer_cloud/models/reorder_options'
70
52
  require_relative 'groupdocs_viewer_cloud/models/resource'
71
- require_relative 'groupdocs_viewer_cloud/models/rotate_options'
53
+ require_relative 'groupdocs_viewer_cloud/models/row'
54
+ require_relative 'groupdocs_viewer_cloud/models/spreadsheet_options'
55
+ require_relative 'groupdocs_viewer_cloud/models/storage_exist'
56
+ require_relative 'groupdocs_viewer_cloud/models/storage_file'
57
+ require_relative 'groupdocs_viewer_cloud/models/view_options'
58
+ require_relative 'groupdocs_viewer_cloud/models/view_result'
59
+ require_relative 'groupdocs_viewer_cloud/models/watermark'
60
+ require_relative 'groupdocs_viewer_cloud/models/attachment_view'
61
+ require_relative 'groupdocs_viewer_cloud/models/file_version'
72
62
  require_relative 'groupdocs_viewer_cloud/models/html_options'
63
+ require_relative 'groupdocs_viewer_cloud/models/html_resource'
73
64
  require_relative 'groupdocs_viewer_cloud/models/image_options'
65
+ require_relative 'groupdocs_viewer_cloud/models/page_view'
74
66
 
75
67
  # APIs
68
+ require_relative 'groupdocs_viewer_cloud/api/file_api'
69
+ require_relative 'groupdocs_viewer_cloud/api/folder_api'
70
+ require_relative 'groupdocs_viewer_cloud/api/storage_api'
76
71
  require_relative 'groupdocs_viewer_cloud/api/viewer_api'
@@ -0,0 +1,729 @@
1
+ # -----------------------------------------------------------------------------------
2
+ # <copyright company="Aspose Pty Ltd" file="file.rb">
3
+ # Copyright (c) 2003-2019 Aspose Pty Ltd
4
+ # </copyright>
5
+ # <summary>
6
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ # of this software and associated documentation files (the "Software"), to deal
8
+ # in the Software without restriction, including without limitation the rights
9
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ # copies of the Software, and to permit persons to whom the Software is
11
+ # furnished to do so, subject to the following conditions:
12
+ #
13
+ # The above copyright notice and this permission notice shall be included in all
14
+ # copies or substantial portions of the Software.
15
+ #
16
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ # SOFTWARE.
23
+ # </summary>
24
+ # -----------------------------------------------------------------------------------
25
+
26
+ require 'uri'
27
+ require 'date'
28
+
29
+ module GroupDocsViewerCloud
30
+ #
31
+ # GroupDocs.Viewer Cloud API
32
+ #
33
+ class FileApi
34
+ attr_accessor :config
35
+
36
+ #make FileApi.new private
37
+ private_class_method :new
38
+
39
+ # Initializes new instance of FileApi
40
+ #
41
+ # @param [config] Configuration
42
+ # @return [FileApi] New instance of FileApi
43
+ def initialize(config)
44
+ @config = config
45
+ @api_client = ApiClient.new(config)
46
+ @access_token = nil
47
+ end
48
+
49
+ # Initializes new instance of FileApi
50
+ #
51
+ # @param [app_sid] Application identifier (App SID)
52
+ # @param [app_key] Application private key (App Key)
53
+ # @return [FileApi] New instance of FileApi
54
+ def self.from_keys(app_sid, app_key)
55
+ config = Configuration.new(app_sid, app_key)
56
+ return new(config)
57
+ end
58
+
59
+ # Initializes new instance of FileApi
60
+ #
61
+ # @param [config] Configuration
62
+ # @return [FileApi] New instance of FileApi
63
+ def self.from_config(config)
64
+ return new(config)
65
+ end
66
+
67
+ # Copy file
68
+ #
69
+ # @param request copy_file_request
70
+ # @return [nil]
71
+ def copy_file(request)
72
+ copy_file_with_http_info(request)
73
+ nil
74
+ end
75
+
76
+ # Copy file
77
+ #
78
+ # @param request copy_file_request
79
+ # @return [Array<(nil, Fixnum, Hash)>]
80
+ # nil, response status code and response headers
81
+ def copy_file_with_http_info(request)
82
+ raise ArgumentError, 'Incorrect request type' unless request.is_a? CopyFileRequest
83
+
84
+ @api_client.config.logger.debug 'Calling API: FileApi.copy_file ...' if @api_client.config.debugging
85
+ # verify the required parameter 'src_path' is set
86
+ raise ArgumentError, 'Missing the required parameter src_path when calling FileApi.copy_file' if @api_client.config.client_side_validation && request.src_path.nil?
87
+ # verify the required parameter 'dest_path' is set
88
+ raise ArgumentError, 'Missing the required parameter dest_path when calling FileApi.copy_file' if @api_client.config.client_side_validation && request.dest_path.nil?
89
+ # resource path
90
+ local_var_path = '/viewer/storage/file/copy/{srcPath}'
91
+ local_var_path = local_var_path.sub('{' + downcase_first_letter('srcPath') + '}', request.src_path.to_s)
92
+
93
+ # query parameters
94
+ query_params = {}
95
+ query_params[downcase_first_letter('destPath')] = request.dest_path
96
+
97
+ if local_var_path.include? ('{' + downcase_first_letter('srcStorageName') + '}')
98
+ local_var_path = local_var_path.sub('{' + downcase_first_letter('srcStorageName') + '}', request.src_storage_name.to_s)
99
+ else
100
+ query_params[downcase_first_letter('srcStorageName')] = request.src_storage_name unless request.src_storage_name.nil?
101
+ end
102
+ if local_var_path.include? ('{' + downcase_first_letter('destStorageName') + '}')
103
+ local_var_path = local_var_path.sub('{' + downcase_first_letter('destStorageName') + '}', request.dest_storage_name.to_s)
104
+ else
105
+ query_params[downcase_first_letter('destStorageName')] = request.dest_storage_name unless request.dest_storage_name.nil?
106
+ end
107
+ if local_var_path.include? ('{' + downcase_first_letter('versionId') + '}')
108
+ local_var_path = local_var_path.sub('{' + downcase_first_letter('versionId') + '}', request.version_id.to_s)
109
+ else
110
+ query_params[downcase_first_letter('versionId')] = request.version_id unless request.version_id.nil?
111
+ end
112
+
113
+ # header parameters
114
+ header_params = {}
115
+ # HTTP header 'Accept' (if needed)
116
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
117
+ # HTTP header 'Content-Type'
118
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
119
+
120
+ # form parameters
121
+ form_params = {}
122
+
123
+ # http body (model)
124
+ post_body = nil
125
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
126
+ header_params: header_params,
127
+ query_params: query_params,
128
+ form_params: form_params,
129
+ body: post_body,
130
+ access_token: get_access_token)
131
+ if @api_client.config.debugging
132
+ @api_client.config.logger.debug "API called:
133
+ FileApi#copy_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
134
+ end
135
+ [data, status_code, headers]
136
+ end
137
+
138
+ # Delete file
139
+ #
140
+ # @param request delete_file_request
141
+ # @return [nil]
142
+ def delete_file(request)
143
+ delete_file_with_http_info(request)
144
+ nil
145
+ end
146
+
147
+ # Delete file
148
+ #
149
+ # @param request delete_file_request
150
+ # @return [Array<(nil, Fixnum, Hash)>]
151
+ # nil, response status code and response headers
152
+ def delete_file_with_http_info(request)
153
+ raise ArgumentError, 'Incorrect request type' unless request.is_a? DeleteFileRequest
154
+
155
+ @api_client.config.logger.debug 'Calling API: FileApi.delete_file ...' if @api_client.config.debugging
156
+ # verify the required parameter 'path' is set
157
+ raise ArgumentError, 'Missing the required parameter path when calling FileApi.delete_file' if @api_client.config.client_side_validation && request.path.nil?
158
+ # resource path
159
+ local_var_path = '/viewer/storage/file/{path}'
160
+ local_var_path = local_var_path.sub('{' + downcase_first_letter('path') + '}', request.path.to_s)
161
+
162
+ # query parameters
163
+ query_params = {}
164
+ if local_var_path.include? ('{' + downcase_first_letter('storageName') + '}')
165
+ local_var_path = local_var_path.sub('{' + downcase_first_letter('storageName') + '}', request.storage_name.to_s)
166
+ else
167
+ query_params[downcase_first_letter('storageName')] = request.storage_name unless request.storage_name.nil?
168
+ end
169
+ if local_var_path.include? ('{' + downcase_first_letter('versionId') + '}')
170
+ local_var_path = local_var_path.sub('{' + downcase_first_letter('versionId') + '}', request.version_id.to_s)
171
+ else
172
+ query_params[downcase_first_letter('versionId')] = request.version_id unless request.version_id.nil?
173
+ end
174
+
175
+ # header parameters
176
+ header_params = {}
177
+ # HTTP header 'Accept' (if needed)
178
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
179
+ # HTTP header 'Content-Type'
180
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
181
+
182
+ # form parameters
183
+ form_params = {}
184
+
185
+ # http body (model)
186
+ post_body = nil
187
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
188
+ header_params: header_params,
189
+ query_params: query_params,
190
+ form_params: form_params,
191
+ body: post_body,
192
+ access_token: get_access_token)
193
+ if @api_client.config.debugging
194
+ @api_client.config.logger.debug "API called:
195
+ FileApi#delete_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
196
+ end
197
+ [data, status_code, headers]
198
+ end
199
+
200
+ # Download file
201
+ #
202
+ # @param request download_file_request
203
+ # @return [File]
204
+ def download_file(request)
205
+ data, _status_code, _headers = download_file_with_http_info(request)
206
+ data
207
+ end
208
+
209
+ # Download file
210
+ #
211
+ # @param request download_file_request
212
+ # @return [Array<(File, Fixnum, Hash)>]
213
+ # File data, response status code and response headers
214
+ def download_file_with_http_info(request)
215
+ raise ArgumentError, 'Incorrect request type' unless request.is_a? DownloadFileRequest
216
+
217
+ @api_client.config.logger.debug 'Calling API: FileApi.download_file ...' if @api_client.config.debugging
218
+ # verify the required parameter 'path' is set
219
+ raise ArgumentError, 'Missing the required parameter path when calling FileApi.download_file' if @api_client.config.client_side_validation && request.path.nil?
220
+ # resource path
221
+ local_var_path = '/viewer/storage/file/{path}'
222
+ local_var_path = local_var_path.sub('{' + downcase_first_letter('path') + '}', request.path.to_s)
223
+
224
+ # query parameters
225
+ query_params = {}
226
+ if local_var_path.include? ('{' + downcase_first_letter('storageName') + '}')
227
+ local_var_path = local_var_path.sub('{' + downcase_first_letter('storageName') + '}', request.storage_name.to_s)
228
+ else
229
+ query_params[downcase_first_letter('storageName')] = request.storage_name unless request.storage_name.nil?
230
+ end
231
+ if local_var_path.include? ('{' + downcase_first_letter('versionId') + '}')
232
+ local_var_path = local_var_path.sub('{' + downcase_first_letter('versionId') + '}', request.version_id.to_s)
233
+ else
234
+ query_params[downcase_first_letter('versionId')] = request.version_id unless request.version_id.nil?
235
+ end
236
+
237
+ # header parameters
238
+ header_params = {}
239
+ # HTTP header 'Accept' (if needed)
240
+ header_params['Accept'] = @api_client.select_header_accept(['multipart/form-data'])
241
+ # HTTP header 'Content-Type'
242
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
243
+
244
+ # form parameters
245
+ form_params = {}
246
+
247
+ # http body (model)
248
+ post_body = nil
249
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
250
+ header_params: header_params,
251
+ query_params: query_params,
252
+ form_params: form_params,
253
+ body: post_body,
254
+ access_token: get_access_token,
255
+ return_type: 'File')
256
+ if @api_client.config.debugging
257
+ @api_client.config.logger.debug "API called:
258
+ FileApi#download_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
259
+ end
260
+ [data, status_code, headers]
261
+ end
262
+
263
+ # Move file
264
+ #
265
+ # @param request move_file_request
266
+ # @return [nil]
267
+ def move_file(request)
268
+ move_file_with_http_info(request)
269
+ nil
270
+ end
271
+
272
+ # Move file
273
+ #
274
+ # @param request move_file_request
275
+ # @return [Array<(nil, Fixnum, Hash)>]
276
+ # nil, response status code and response headers
277
+ def move_file_with_http_info(request)
278
+ raise ArgumentError, 'Incorrect request type' unless request.is_a? MoveFileRequest
279
+
280
+ @api_client.config.logger.debug 'Calling API: FileApi.move_file ...' if @api_client.config.debugging
281
+ # verify the required parameter 'src_path' is set
282
+ raise ArgumentError, 'Missing the required parameter src_path when calling FileApi.move_file' if @api_client.config.client_side_validation && request.src_path.nil?
283
+ # verify the required parameter 'dest_path' is set
284
+ raise ArgumentError, 'Missing the required parameter dest_path when calling FileApi.move_file' if @api_client.config.client_side_validation && request.dest_path.nil?
285
+ # resource path
286
+ local_var_path = '/viewer/storage/file/move/{srcPath}'
287
+ local_var_path = local_var_path.sub('{' + downcase_first_letter('srcPath') + '}', request.src_path.to_s)
288
+
289
+ # query parameters
290
+ query_params = {}
291
+ query_params[downcase_first_letter('destPath')] = request.dest_path
292
+
293
+ if local_var_path.include? ('{' + downcase_first_letter('srcStorageName') + '}')
294
+ local_var_path = local_var_path.sub('{' + downcase_first_letter('srcStorageName') + '}', request.src_storage_name.to_s)
295
+ else
296
+ query_params[downcase_first_letter('srcStorageName')] = request.src_storage_name unless request.src_storage_name.nil?
297
+ end
298
+ if local_var_path.include? ('{' + downcase_first_letter('destStorageName') + '}')
299
+ local_var_path = local_var_path.sub('{' + downcase_first_letter('destStorageName') + '}', request.dest_storage_name.to_s)
300
+ else
301
+ query_params[downcase_first_letter('destStorageName')] = request.dest_storage_name unless request.dest_storage_name.nil?
302
+ end
303
+ if local_var_path.include? ('{' + downcase_first_letter('versionId') + '}')
304
+ local_var_path = local_var_path.sub('{' + downcase_first_letter('versionId') + '}', request.version_id.to_s)
305
+ else
306
+ query_params[downcase_first_letter('versionId')] = request.version_id unless request.version_id.nil?
307
+ end
308
+
309
+ # header parameters
310
+ header_params = {}
311
+ # HTTP header 'Accept' (if needed)
312
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
313
+ # HTTP header 'Content-Type'
314
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
315
+
316
+ # form parameters
317
+ form_params = {}
318
+
319
+ # http body (model)
320
+ post_body = nil
321
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
322
+ header_params: header_params,
323
+ query_params: query_params,
324
+ form_params: form_params,
325
+ body: post_body,
326
+ access_token: get_access_token)
327
+ if @api_client.config.debugging
328
+ @api_client.config.logger.debug "API called:
329
+ FileApi#move_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
330
+ end
331
+ [data, status_code, headers]
332
+ end
333
+
334
+ # Upload file
335
+ #
336
+ # @param request upload_file_request
337
+ # @return [FilesUploadResult]
338
+ def upload_file(request)
339
+ data, _status_code, _headers = upload_file_with_http_info(request)
340
+ data
341
+ end
342
+
343
+ # Upload file
344
+ #
345
+ # @param request upload_file_request
346
+ # @return [Array<(FilesUploadResult, Fixnum, Hash)>]
347
+ # FilesUploadResult data, response status code and response headers
348
+ def upload_file_with_http_info(request)
349
+ raise ArgumentError, 'Incorrect request type' unless request.is_a? UploadFileRequest
350
+
351
+ @api_client.config.logger.debug 'Calling API: FileApi.upload_file ...' if @api_client.config.debugging
352
+ # verify the required parameter 'path' is set
353
+ raise ArgumentError, 'Missing the required parameter path when calling FileApi.upload_file' if @api_client.config.client_side_validation && request.path.nil?
354
+ # verify the required parameter 'file' is set
355
+ raise ArgumentError, 'Missing the required parameter file when calling FileApi.upload_file' if @api_client.config.client_side_validation && request.file.nil?
356
+ # resource path
357
+ local_var_path = '/viewer/storage/file/{path}'
358
+ local_var_path = local_var_path.sub('{' + downcase_first_letter('path') + '}', request.path.to_s)
359
+
360
+ # query parameters
361
+ query_params = {}
362
+ if local_var_path.include? ('{' + downcase_first_letter('storageName') + '}')
363
+ local_var_path = local_var_path.sub('{' + downcase_first_letter('storageName') + '}', request.storage_name.to_s)
364
+ else
365
+ query_params[downcase_first_letter('storageName')] = request.storage_name unless request.storage_name.nil?
366
+ end
367
+
368
+ # header parameters
369
+ header_params = {}
370
+ # HTTP header 'Accept' (if needed)
371
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
372
+ # HTTP header 'Content-Type'
373
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
374
+
375
+ # form parameters
376
+ form_params = {}
377
+ form_params[downcase_first_letter('File')] = request.file
378
+
379
+ # http body (model)
380
+ post_body = nil
381
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
382
+ header_params: header_params,
383
+ query_params: query_params,
384
+ form_params: form_params,
385
+ body: post_body,
386
+ access_token: get_access_token,
387
+ return_type: 'FilesUploadResult')
388
+ if @api_client.config.debugging
389
+ @api_client.config.logger.debug "API called:
390
+ FileApi#upload_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
391
+ end
392
+ [data, status_code, headers]
393
+ end
394
+
395
+ #
396
+ # Helper method to convert first letter to downcase
397
+ #
398
+ private def downcase_first_letter(str)
399
+ value = str[0].downcase + str[1..-1]
400
+ value
401
+ end
402
+
403
+ #
404
+ # Retrieves access token
405
+ #
406
+ private def get_access_token
407
+ if @access_token.nil? then
408
+ request_access_token
409
+ end
410
+
411
+ @access_token
412
+ end
413
+
414
+ #
415
+ # Gets a access token from server
416
+ #
417
+ private def request_access_token
418
+ auth_config = Configuration.new(@config.app_sid, @config.app_key)
419
+ auth_config.api_base_url = @config.api_base_url
420
+ auth_config.debugging = @config.debugging
421
+ auth_config.logger = @config.logger
422
+ auth_config.temp_folder_path = @config.temp_folder_path
423
+ auth_config.client_side_validation = @config.client_side_validation
424
+ auth_config.api_version = ''
425
+
426
+ auth_api_client = ApiClient.new(auth_config)
427
+
428
+ request_url = "/connect/token"
429
+ post_data = "grant_type=client_credentials&client_id=#{@config.app_sid}&client_secret=#{@config.app_key}"
430
+
431
+ data, _status_code, _header = auth_api_client.call_api(:POST, request_url, :body => post_data, :return_type => 'Object')
432
+
433
+ @access_token = data[:access_token]
434
+
435
+ expires_in_seconds = data[:expires_in].to_i - 5 * 60
436
+ expires_in_days = Rational(expires_in_seconds, 60 * 60 * 24)
437
+ @access_token_expires_at = DateTime.now + expires_in_days
438
+ end
439
+
440
+ # requires all files inside a directory from current dir
441
+ # @param _dir can be relative path like '/lib' or "../lib"
442
+ private def require_all(_dir)
443
+ Dir[File.expand_path(File.join(File.dirname(File.absolute_path(__FILE__)), _dir)) + "/*.rb"].each do |file|
444
+ require file
445
+ end
446
+ end
447
+ end
448
+ end
449
+ #
450
+ # --------------------------------------------------------------------------------------------------------------------
451
+ # <copyright company="Aspose Pty Ltd" file="copy_file_request.rb">
452
+ # Copyright (c) 2003-2019 Aspose Pty Ltd
453
+ # </copyright>
454
+ # <summary>
455
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
456
+ # of this software and associated documentation files (the "Software"), to deal
457
+ # in the Software without restriction, including without limitation the rights
458
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
459
+ # copies of the Software, and to permit persons to whom the Software is
460
+ # furnished to do so, subject to the following conditions:
461
+ #
462
+ # The above copyright notice and this permission notice shall be included in all
463
+ # copies or substantial portions of the Software.
464
+ #
465
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
466
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
467
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
468
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
469
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
470
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
471
+ # SOFTWARE.
472
+ # </summary>
473
+ # --------------------------------------------------------------------------------------------------------------------
474
+ #
475
+
476
+ module GroupDocsViewerCloud
477
+
478
+ #
479
+ # Request model for copy_file operation.
480
+ #
481
+ class CopyFileRequest
482
+
483
+ # Source file path e.g. '/folder/file.ext'
484
+ attr_accessor :src_path
485
+ # Destination file path
486
+ attr_accessor :dest_path
487
+ # Source storage name
488
+ attr_accessor :src_storage_name
489
+ # Destination storage name
490
+ attr_accessor :dest_storage_name
491
+ # File version ID to copy
492
+ attr_accessor :version_id
493
+
494
+ #
495
+ # Initializes a new instance.
496
+ # @param src_path Source file path e.g. '/folder/file.ext'
497
+ # @param dest_path Destination file path
498
+ # @param src_storage_name Source storage name
499
+ # @param dest_storage_name Destination storage name
500
+ # @param version_id File version ID to copy
501
+ def initialize(src_path, dest_path, src_storage_name = nil, dest_storage_name = nil, version_id = nil)
502
+ self.src_path = src_path
503
+ self.dest_path = dest_path
504
+ self.src_storage_name = src_storage_name
505
+ self.dest_storage_name = dest_storage_name
506
+ self.version_id = version_id
507
+ end
508
+ end
509
+ end
510
+ #
511
+ # --------------------------------------------------------------------------------------------------------------------
512
+ # <copyright company="Aspose Pty Ltd" file="delete_file_request.rb">
513
+ # Copyright (c) 2003-2019 Aspose Pty Ltd
514
+ # </copyright>
515
+ # <summary>
516
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
517
+ # of this software and associated documentation files (the "Software"), to deal
518
+ # in the Software without restriction, including without limitation the rights
519
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
520
+ # copies of the Software, and to permit persons to whom the Software is
521
+ # furnished to do so, subject to the following conditions:
522
+ #
523
+ # The above copyright notice and this permission notice shall be included in all
524
+ # copies or substantial portions of the Software.
525
+ #
526
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
527
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
528
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
529
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
530
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
531
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
532
+ # SOFTWARE.
533
+ # </summary>
534
+ # --------------------------------------------------------------------------------------------------------------------
535
+ #
536
+
537
+ module GroupDocsViewerCloud
538
+
539
+ #
540
+ # Request model for delete_file operation.
541
+ #
542
+ class DeleteFileRequest
543
+
544
+ # File path e.g. '/folder/file.ext'
545
+ attr_accessor :path
546
+ # Storage name
547
+ attr_accessor :storage_name
548
+ # File version ID to delete
549
+ attr_accessor :version_id
550
+
551
+ #
552
+ # Initializes a new instance.
553
+ # @param path File path e.g. '/folder/file.ext'
554
+ # @param storage_name Storage name
555
+ # @param version_id File version ID to delete
556
+ def initialize(path, storage_name = nil, version_id = nil)
557
+ self.path = path
558
+ self.storage_name = storage_name
559
+ self.version_id = version_id
560
+ end
561
+ end
562
+ end
563
+ #
564
+ # --------------------------------------------------------------------------------------------------------------------
565
+ # <copyright company="Aspose Pty Ltd" file="download_file_request.rb">
566
+ # Copyright (c) 2003-2019 Aspose Pty Ltd
567
+ # </copyright>
568
+ # <summary>
569
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
570
+ # of this software and associated documentation files (the "Software"), to deal
571
+ # in the Software without restriction, including without limitation the rights
572
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
573
+ # copies of the Software, and to permit persons to whom the Software is
574
+ # furnished to do so, subject to the following conditions:
575
+ #
576
+ # The above copyright notice and this permission notice shall be included in all
577
+ # copies or substantial portions of the Software.
578
+ #
579
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
580
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
581
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
582
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
583
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
584
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
585
+ # SOFTWARE.
586
+ # </summary>
587
+ # --------------------------------------------------------------------------------------------------------------------
588
+ #
589
+
590
+ module GroupDocsViewerCloud
591
+
592
+ #
593
+ # Request model for download_file operation.
594
+ #
595
+ class DownloadFileRequest
596
+
597
+ # File path e.g. '/folder/file.ext'
598
+ attr_accessor :path
599
+ # Storage name
600
+ attr_accessor :storage_name
601
+ # File version ID to download
602
+ attr_accessor :version_id
603
+
604
+ #
605
+ # Initializes a new instance.
606
+ # @param path File path e.g. '/folder/file.ext'
607
+ # @param storage_name Storage name
608
+ # @param version_id File version ID to download
609
+ def initialize(path, storage_name = nil, version_id = nil)
610
+ self.path = path
611
+ self.storage_name = storage_name
612
+ self.version_id = version_id
613
+ end
614
+ end
615
+ end
616
+ #
617
+ # --------------------------------------------------------------------------------------------------------------------
618
+ # <copyright company="Aspose Pty Ltd" file="move_file_request.rb">
619
+ # Copyright (c) 2003-2019 Aspose Pty Ltd
620
+ # </copyright>
621
+ # <summary>
622
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
623
+ # of this software and associated documentation files (the "Software"), to deal
624
+ # in the Software without restriction, including without limitation the rights
625
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
626
+ # copies of the Software, and to permit persons to whom the Software is
627
+ # furnished to do so, subject to the following conditions:
628
+ #
629
+ # The above copyright notice and this permission notice shall be included in all
630
+ # copies or substantial portions of the Software.
631
+ #
632
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
633
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
634
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
635
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
636
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
637
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
638
+ # SOFTWARE.
639
+ # </summary>
640
+ # --------------------------------------------------------------------------------------------------------------------
641
+ #
642
+
643
+ module GroupDocsViewerCloud
644
+
645
+ #
646
+ # Request model for move_file operation.
647
+ #
648
+ class MoveFileRequest
649
+
650
+ # Source file path e.g. '/src.ext'
651
+ attr_accessor :src_path
652
+ # Destination file path e.g. '/dest.ext'
653
+ attr_accessor :dest_path
654
+ # Source storage name
655
+ attr_accessor :src_storage_name
656
+ # Destination storage name
657
+ attr_accessor :dest_storage_name
658
+ # File version ID to move
659
+ attr_accessor :version_id
660
+
661
+ #
662
+ # Initializes a new instance.
663
+ # @param src_path Source file path e.g. '/src.ext'
664
+ # @param dest_path Destination file path e.g. '/dest.ext'
665
+ # @param src_storage_name Source storage name
666
+ # @param dest_storage_name Destination storage name
667
+ # @param version_id File version ID to move
668
+ def initialize(src_path, dest_path, src_storage_name = nil, dest_storage_name = nil, version_id = nil)
669
+ self.src_path = src_path
670
+ self.dest_path = dest_path
671
+ self.src_storage_name = src_storage_name
672
+ self.dest_storage_name = dest_storage_name
673
+ self.version_id = version_id
674
+ end
675
+ end
676
+ end
677
+ #
678
+ # --------------------------------------------------------------------------------------------------------------------
679
+ # <copyright company="Aspose Pty Ltd" file="upload_file_request.rb">
680
+ # Copyright (c) 2003-2019 Aspose Pty Ltd
681
+ # </copyright>
682
+ # <summary>
683
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
684
+ # of this software and associated documentation files (the "Software"), to deal
685
+ # in the Software without restriction, including without limitation the rights
686
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
687
+ # copies of the Software, and to permit persons to whom the Software is
688
+ # furnished to do so, subject to the following conditions:
689
+ #
690
+ # The above copyright notice and this permission notice shall be included in all
691
+ # copies or substantial portions of the Software.
692
+ #
693
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
694
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
695
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
696
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
697
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
698
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
699
+ # SOFTWARE.
700
+ # </summary>
701
+ # --------------------------------------------------------------------------------------------------------------------
702
+ #
703
+
704
+ module GroupDocsViewerCloud
705
+
706
+ #
707
+ # Request model for upload_file operation.
708
+ #
709
+ class UploadFileRequest
710
+
711
+ # Path where to upload including filename and extension e.g. /file.ext or /Folder 1/file.ext If the content is multipart and path does not contains the file name it tries to get them from filename parameter from Content-Disposition header.
712
+ attr_accessor :path
713
+ # File to upload
714
+ attr_accessor :file
715
+ # Storage name
716
+ attr_accessor :storage_name
717
+
718
+ #
719
+ # Initializes a new instance.
720
+ # @param path Path where to upload including filename and extension e.g. /file.ext or /Folder 1/file.ext If the content is multipart and path does not contains the file name it tries to get them from filename parameter from Content-Disposition header.
721
+ # @param file File to upload
722
+ # @param storage_name Storage name
723
+ def initialize(path, file, storage_name = nil)
724
+ self.path = path
725
+ self.file = file
726
+ self.storage_name = storage_name
727
+ end
728
+ end
729
+ end