aspose_imaging_cloud 1.0.0 → 19.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (161) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +224 -61
  3. data/lib/aspose-imaging-cloud.rb +161 -0
  4. data/lib/aspose-imaging-cloud/api/imaging_api.rb +684 -0
  5. data/lib/aspose-imaging-cloud/api_client.rb +357 -0
  6. data/lib/aspose-imaging-cloud/api_error.rb +42 -0
  7. data/lib/{aspose_imaging_cloud → aspose-imaging-cloud}/configuration.rb +236 -166
  8. data/lib/aspose-imaging-cloud/models/big_rectangular_filter_properties.rb +206 -0
  9. data/lib/aspose-imaging-cloud/models/bilateral_smoothing_filter_properties.rb +281 -0
  10. data/lib/aspose-imaging-cloud/models/bmp_properties.rb +202 -0
  11. data/lib/aspose-imaging-cloud/models/convolution_filter_properties.rb +236 -0
  12. data/lib/aspose-imaging-cloud/models/deconvolution_filter_properties.rb +266 -0
  13. data/lib/aspose-imaging-cloud/models/dicom_properties.rb +584 -0
  14. data/lib/aspose-imaging-cloud/models/disc_usage.rb +222 -0
  15. data/lib/aspose-imaging-cloud/models/djvu_properties.rb +232 -0
  16. data/lib/aspose-imaging-cloud/models/dng_properties.rb +329 -0
  17. data/lib/aspose-imaging-cloud/models/error.rb +232 -0
  18. data/lib/aspose-imaging-cloud/models/error_details.rb +217 -0
  19. data/lib/aspose-imaging-cloud/models/exif_data.rb +1560 -0
  20. data/lib/aspose-imaging-cloud/models/file_version.rb +277 -0
  21. data/lib/aspose-imaging-cloud/models/file_versions.rb +204 -0
  22. data/lib/aspose-imaging-cloud/models/files_list.rb +204 -0
  23. data/lib/aspose-imaging-cloud/models/files_upload_result.rb +216 -0
  24. data/lib/aspose-imaging-cloud/models/filter_properties_base.rb +206 -0
  25. data/lib/aspose-imaging-cloud/models/gauss_wiener_filter_properties.rb +296 -0
  26. data/lib/aspose-imaging-cloud/models/gaussian_blur_filter_properties.rb +266 -0
  27. data/lib/aspose-imaging-cloud/models/gif_properties.rb +247 -0
  28. data/lib/aspose-imaging-cloud/models/image_duplicates.rb +204 -0
  29. data/lib/aspose-imaging-cloud/models/image_duplicates_set.rb +204 -0
  30. data/lib/aspose-imaging-cloud/models/image_features.rb +257 -0
  31. data/lib/aspose-imaging-cloud/models/imaging_response.rb +412 -0
  32. data/lib/aspose-imaging-cloud/models/jfif_data.rb +247 -0
  33. data/lib/aspose-imaging-cloud/models/jpeg2000_properties.rb +214 -0
  34. data/lib/aspose-imaging-cloud/models/jpeg_exif_data.rb +1738 -0
  35. data/lib/aspose-imaging-cloud/models/jpeg_properties.rb +222 -0
  36. data/lib/aspose-imaging-cloud/models/median_filter_properties.rb +221 -0
  37. data/lib/aspose-imaging-cloud/models/motion_wiener_filter_properties.rb +311 -0
  38. data/lib/aspose-imaging-cloud/models/object_exist.rb +222 -0
  39. data/lib/aspose-imaging-cloud/models/odg_metadata.rb +372 -0
  40. data/lib/aspose-imaging-cloud/models/odg_page.rb +222 -0
  41. data/lib/aspose-imaging-cloud/models/odg_properties.rb +229 -0
  42. data/lib/aspose-imaging-cloud/models/png_properties.rb +192 -0
  43. data/lib/aspose-imaging-cloud/models/psd_properties.rb +242 -0
  44. data/lib/aspose-imaging-cloud/models/requests/add_search_image_request.rb +91 -0
  45. data/lib/aspose-imaging-cloud/models/requests/append_tiff_request.rb +88 -0
  46. data/lib/aspose-imaging-cloud/models/requests/compare_images_request.rb +94 -0
  47. data/lib/aspose-imaging-cloud/models/requests/convert_tiff_to_fax_request.rb +80 -0
  48. data/lib/aspose-imaging-cloud/models/requests/copy_file_request.rb +91 -0
  49. data/lib/aspose-imaging-cloud/models/requests/copy_folder_request.rb +88 -0
  50. data/lib/aspose-imaging-cloud/models/requests/create_cropped_image_request.rb +121 -0
  51. data/lib/aspose-imaging-cloud/models/requests/create_folder_request.rb +77 -0
  52. data/lib/aspose-imaging-cloud/models/requests/create_image_features_request.rb +89 -0
  53. data/lib/aspose-imaging-cloud/models/requests/create_image_frame_request.rb +112 -0
  54. data/lib/aspose-imaging-cloud/models/requests/create_image_search_request.rb +79 -0
  55. data/lib/aspose-imaging-cloud/models/requests/create_image_tag_request.rb +96 -0
  56. data/lib/aspose-imaging-cloud/models/requests/create_modified_bmp_request.rb +108 -0
  57. data/lib/aspose-imaging-cloud/models/requests/create_modified_emf_request.rb +127 -0
  58. data/lib/aspose-imaging-cloud/models/requests/create_modified_gif_request.rb +102 -0
  59. data/lib/aspose-imaging-cloud/models/requests/create_modified_jpeg2000_request.rb +95 -0
  60. data/lib/aspose-imaging-cloud/models/requests/create_modified_jpeg_request.rb +90 -0
  61. data/lib/aspose-imaging-cloud/models/requests/create_modified_psd_request.rb +90 -0
  62. data/lib/aspose-imaging-cloud/models/requests/create_modified_svg_request.rb +114 -0
  63. data/lib/aspose-imaging-cloud/models/requests/create_modified_tiff_request.rb +104 -0
  64. data/lib/aspose-imaging-cloud/models/requests/create_modified_web_p_request.rb +116 -0
  65. data/lib/aspose-imaging-cloud/models/requests/create_modified_wmf_request.rb +127 -0
  66. data/lib/aspose-imaging-cloud/models/requests/create_resized_image_request.rb +105 -0
  67. data/lib/aspose-imaging-cloud/models/requests/create_rotate_flipped_image_request.rb +97 -0
  68. data/lib/aspose-imaging-cloud/models/requests/create_saved_image_as_request.rb +89 -0
  69. data/lib/aspose-imaging-cloud/models/requests/create_updated_image_request.rb +145 -0
  70. data/lib/aspose-imaging-cloud/models/requests/create_web_site_image_features_request.rb +88 -0
  71. data/lib/aspose-imaging-cloud/models/requests/crop_image_request.rb +120 -0
  72. data/lib/aspose-imaging-cloud/models/requests/delete_file_request.rb +80 -0
  73. data/lib/aspose-imaging-cloud/models/requests/delete_folder_request.rb +80 -0
  74. data/lib/aspose-imaging-cloud/models/requests/delete_image_features_request.rb +88 -0
  75. data/lib/aspose-imaging-cloud/models/requests/delete_image_search_request.rb +80 -0
  76. data/lib/aspose-imaging-cloud/models/requests/delete_search_image_request.rb +88 -0
  77. data/lib/aspose-imaging-cloud/models/requests/download_file_request.rb +80 -0
  78. data/lib/aspose-imaging-cloud/models/requests/extract_image_features_request.rb +91 -0
  79. data/lib/aspose-imaging-cloud/models/requests/extract_image_frame_properties_request.rb +82 -0
  80. data/lib/aspose-imaging-cloud/models/requests/extract_image_properties_request.rb +75 -0
  81. data/lib/aspose-imaging-cloud/models/requests/filter_effect_image_request.rb +103 -0
  82. data/lib/aspose-imaging-cloud/models/requests/find_image_duplicates_request.rb +88 -0
  83. data/lib/aspose-imaging-cloud/models/requests/find_images_by_tags_request.rb +104 -0
  84. data/lib/aspose-imaging-cloud/models/requests/find_similar_images_request.rb +102 -0
  85. data/lib/aspose-imaging-cloud/models/requests/get_disc_usage_request.rb +70 -0
  86. data/lib/aspose-imaging-cloud/models/requests/get_file_versions_request.rb +77 -0
  87. data/lib/aspose-imaging-cloud/models/requests/get_files_list_request.rb +77 -0
  88. data/lib/aspose-imaging-cloud/models/requests/get_image_features_request.rb +88 -0
  89. data/lib/aspose-imaging-cloud/models/requests/get_image_frame_properties_request.rb +87 -0
  90. data/lib/aspose-imaging-cloud/models/requests/get_image_frame_request.rb +111 -0
  91. data/lib/aspose-imaging-cloud/models/requests/get_image_properties_request.rb +80 -0
  92. data/lib/aspose-imaging-cloud/models/requests/get_image_search_status_request.rb +80 -0
  93. data/lib/aspose-imaging-cloud/models/requests/get_search_image_request.rb +88 -0
  94. data/lib/aspose-imaging-cloud/models/requests/http_request.rb +50 -0
  95. data/lib/aspose-imaging-cloud/models/requests/imaging_request.rb +101 -0
  96. data/lib/aspose-imaging-cloud/models/requests/modify_bmp_request.rb +107 -0
  97. data/lib/aspose-imaging-cloud/models/requests/modify_emf_request.rb +126 -0
  98. data/lib/aspose-imaging-cloud/models/requests/modify_gif_request.rb +101 -0
  99. data/lib/aspose-imaging-cloud/models/requests/modify_jpeg2000_request.rb +94 -0
  100. data/lib/aspose-imaging-cloud/models/requests/modify_jpeg_request.rb +89 -0
  101. data/lib/aspose-imaging-cloud/models/requests/modify_psd_request.rb +89 -0
  102. data/lib/aspose-imaging-cloud/models/requests/modify_svg_request.rb +113 -0
  103. data/lib/aspose-imaging-cloud/models/requests/modify_tiff_request.rb +103 -0
  104. data/lib/aspose-imaging-cloud/models/requests/modify_web_p_request.rb +115 -0
  105. data/lib/aspose-imaging-cloud/models/requests/modify_wmf_request.rb +126 -0
  106. data/lib/aspose-imaging-cloud/models/requests/move_file_request.rb +91 -0
  107. data/lib/aspose-imaging-cloud/models/requests/move_folder_request.rb +88 -0
  108. data/lib/aspose-imaging-cloud/models/requests/object_exists_request.rb +80 -0
  109. data/lib/aspose-imaging-cloud/models/requests/resize_image_request.rb +104 -0
  110. data/lib/aspose-imaging-cloud/models/requests/rotate_flip_image_request.rb +96 -0
  111. data/lib/aspose-imaging-cloud/models/requests/save_image_as_request.rb +88 -0
  112. data/lib/aspose-imaging-cloud/models/requests/storage_exists_request.rb +74 -0
  113. data/lib/aspose-imaging-cloud/models/requests/update_image_features_request.rb +91 -0
  114. data/lib/aspose-imaging-cloud/models/requests/update_image_request.rb +144 -0
  115. data/lib/aspose-imaging-cloud/models/requests/update_search_image_request.rb +91 -0
  116. data/lib/aspose-imaging-cloud/models/requests/upload_file_request.rb +86 -0
  117. data/lib/aspose-imaging-cloud/models/search_context_status.rb +212 -0
  118. data/lib/aspose-imaging-cloud/models/search_result.rb +217 -0
  119. data/lib/aspose-imaging-cloud/models/search_results_set.rb +204 -0
  120. data/lib/aspose-imaging-cloud/models/sharpen_filter_properties.rb +266 -0
  121. data/lib/aspose-imaging-cloud/models/small_rectangular_filter_properties.rb +206 -0
  122. data/lib/aspose-imaging-cloud/models/storage_exist.rb +207 -0
  123. data/lib/aspose-imaging-cloud/models/storage_file.rb +252 -0
  124. data/lib/aspose-imaging-cloud/models/svg_properties.rb +202 -0
  125. data/lib/aspose-imaging-cloud/models/tiff_frame.rb +242 -0
  126. data/lib/aspose-imaging-cloud/models/tiff_options.rb +734 -0
  127. data/lib/aspose-imaging-cloud/models/tiff_properties.rb +224 -0
  128. data/lib/aspose-imaging-cloud/models/web_p_properties.rb +252 -0
  129. data/lib/aspose-imaging-cloud/version.rb +15 -0
  130. metadata +149 -129
  131. data/LICENSE +0 -22
  132. data/aspose_imaging_cloud.gemspec +0 -26
  133. data/lib/aspose_imaging_cloud.rb +0 -43
  134. data/lib/aspose_imaging_cloud/api/imaging_api.rb +0 -1776
  135. data/lib/aspose_imaging_cloud/api_client.rb +0 -335
  136. data/lib/aspose_imaging_cloud/api_error.rb +0 -24
  137. data/lib/aspose_imaging_cloud/models/base_object.rb +0 -86
  138. data/lib/aspose_imaging_cloud/models/base_response.rb +0 -53
  139. data/lib/aspose_imaging_cloud/models/bmp_properties.rb +0 -37
  140. data/lib/aspose_imaging_cloud/models/exif_data.rb +0 -855
  141. data/lib/aspose_imaging_cloud/models/gif_properties.rb +0 -53
  142. data/lib/aspose_imaging_cloud/models/imaging_response.rb +0 -149
  143. data/lib/aspose_imaging_cloud/models/jfif_data.rb +0 -61
  144. data/lib/aspose_imaging_cloud/models/jpeg_exif_data.rb +0 -991
  145. data/lib/aspose_imaging_cloud/models/jpeg_properties.rb +0 -53
  146. data/lib/aspose_imaging_cloud/models/psd_properties.rb +0 -61
  147. data/lib/aspose_imaging_cloud/models/tiff_frame.rb +0 -61
  148. data/lib/aspose_imaging_cloud/models/tiff_options.rb +0 -419
  149. data/lib/aspose_imaging_cloud/models/tiff_properties.rb +0 -55
  150. data/lib/aspose_imaging_cloud/version.rb +0 -3
  151. data/test/data/TestDemo.tif +0 -0
  152. data/test/data/aspose.jpg +0 -0
  153. data/test/data/aspose_imaging_for_cloud.png +0 -0
  154. data/test/data/demo.tif +0 -0
  155. data/test/data/sample-multi.tif +0 -0
  156. data/test/data/sample.bmp +0 -0
  157. data/test/data/sample.gif +0 -0
  158. data/test/data/sample.psd +0 -0
  159. data/test/data/sample.tif +0 -0
  160. data/test/data/test.bmp +0 -0
  161. data/test/imaging_tests.rb +0 -291
@@ -0,0 +1,120 @@
1
+ # ----------------------------------------------------------------------------
2
+ # <copyright company="Aspose" file="crop_image_request.rb">
3
+ # Copyright (c) 2018-2019 Aspose Pty Ltd. All rights reserved.
4
+ # </copyright>
5
+ # <summary>
6
+ # Permission is hereby granted, free of charge, to any person obtaining a
7
+ # copy of this software and associated documentation files (the "Software"),
8
+ # to deal in the Software without restriction, including without limitation
9
+ # the rights to use, copy, modify, merge, publish, distribute, sublicense,
10
+ # and/or sell copies of the Software, and to permit persons to whom the
11
+ # Software is furnished to do so, subject to the following conditions:
12
+ #
13
+ # The above copyright notice and this permission notice shall be included in
14
+ # all 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
21
+ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22
+ # DEALINGS IN THE SOFTWARE.
23
+ # </summary>
24
+ # ----------------------------------------------------------------------------
25
+
26
+
27
+ require_relative './imaging_request'
28
+ require_relative './http_request'
29
+
30
+ module AsposeImagingCloud
31
+ # Request model for crop_image operation.
32
+ class CropImageRequest < ImagingRequest
33
+
34
+ # Crop an existing image.
35
+ # @param [String] name Filename of an image.
36
+ # @param [String] format Resulting image format. Please, refer to https://docs.aspose.cloud/display/imagingcloud/Supported+File+Formats#SupportedFileFormats-CommonOperationsFormatSupportMap for possible use-cases.
37
+ # @param [Integer] x X position of start point for cropping rectangle.
38
+ # @param [Integer] y Y position of start point for cropping rectangle.
39
+ # @param [Integer] width Width of cropping rectangle
40
+ # @param [Integer] height Height of cropping rectangle.
41
+ # @param [String] folder Folder with image to process.
42
+ # @param [String] storage Your Aspose Cloud Storage name.
43
+ def initialize(name, format, x, y, width, height, folder = nil, storage = nil)
44
+ @name = name
45
+ @format = format
46
+ @x = x
47
+ @y = y
48
+ @width = width
49
+ @height = height
50
+ @folder = folder
51
+ @storage = storage
52
+ end
53
+
54
+ def to_http_info(config)
55
+ # verify the required parameter 'name' is set
56
+ if config.client_side_validation && @name.nil?
57
+ raise ArgumentError, "Missing the required parameter 'name' when calling ImagingApi.crop_image"
58
+ end
59
+
60
+ # verify the required parameter 'format' is set
61
+ if config.client_side_validation && @format.nil?
62
+ raise ArgumentError, "Missing the required parameter 'format' when calling ImagingApi.crop_image"
63
+ end
64
+
65
+ # verify the required parameter 'x' is set
66
+ if config.client_side_validation && @x.nil?
67
+ raise ArgumentError, "Missing the required parameter 'x' when calling ImagingApi.crop_image"
68
+ end
69
+
70
+ # verify the required parameter 'y' is set
71
+ if config.client_side_validation && @y.nil?
72
+ raise ArgumentError, "Missing the required parameter 'y' when calling ImagingApi.crop_image"
73
+ end
74
+
75
+ # verify the required parameter 'width' is set
76
+ if config.client_side_validation && @width.nil?
77
+ raise ArgumentError, "Missing the required parameter 'width' when calling ImagingApi.crop_image"
78
+ end
79
+
80
+ # verify the required parameter 'height' is set
81
+ if config.client_side_validation && @height.nil?
82
+ raise ArgumentError, "Missing the required parameter 'height' when calling ImagingApi.crop_image"
83
+ end
84
+
85
+ # resource path
86
+ local_var_path = '/imaging/{name}/crop'.sub('{' + 'name' + '}', @name.to_s)
87
+
88
+ # query parameters
89
+ query_params = {}
90
+ query_params[:format] = @format
91
+ query_params[:x] = @x
92
+ query_params[:y] = @y
93
+ query_params[:width] = @width
94
+ query_params[:height] = @height
95
+ query_params[:folder] = @folder unless @folder.nil?
96
+ query_params[:storage] = @storage unless @storage.nil?
97
+
98
+ # form parameters
99
+ form_params = {}
100
+
101
+ # http body (model)
102
+ post_body = nil
103
+ auth_names = ['JWT']
104
+
105
+ # header parameters
106
+ header_params = {}
107
+ # HTTP header 'Accept' (if needed)
108
+ header_params['Accept'] = select_header_accept(['application/json'])
109
+ # HTTP header 'Content-Type'
110
+ header_params['Content-Type'] = form_params.any? ? 'multipart/form-data' : select_header_content_type(['application/json'])
111
+
112
+ AsposeImagingCloud::HttpRequest.new(local_var_path,
113
+ header_params,
114
+ query_params,
115
+ form_params,
116
+ post_body,
117
+ auth_names)
118
+ end
119
+ end
120
+ end
@@ -0,0 +1,80 @@
1
+ # ----------------------------------------------------------------------------
2
+ # <copyright company="Aspose" file="delete_file_request.rb">
3
+ # Copyright (c) 2018-2019 Aspose Pty Ltd. All rights reserved.
4
+ # </copyright>
5
+ # <summary>
6
+ # Permission is hereby granted, free of charge, to any person obtaining a
7
+ # copy of this software and associated documentation files (the "Software"),
8
+ # to deal in the Software without restriction, including without limitation
9
+ # the rights to use, copy, modify, merge, publish, distribute, sublicense,
10
+ # and/or sell copies of the Software, and to permit persons to whom the
11
+ # Software is furnished to do so, subject to the following conditions:
12
+ #
13
+ # The above copyright notice and this permission notice shall be included in
14
+ # all 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
21
+ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22
+ # DEALINGS IN THE SOFTWARE.
23
+ # </summary>
24
+ # ----------------------------------------------------------------------------
25
+
26
+
27
+ require_relative './imaging_request'
28
+ require_relative './http_request'
29
+
30
+ module AsposeImagingCloud
31
+ # Request model for delete_file operation.
32
+ class DeleteFileRequest < ImagingRequest
33
+
34
+ # Delete file
35
+ # @param [String] path File path e.g. &#39;/folder/file.ext&#39;
36
+ # @param [String] storage_name Storage name
37
+ # @param [String] version_id File version ID to delete
38
+ def initialize(path, storage_name = nil, version_id = nil)
39
+ @path = path
40
+ @storage_name = storage_name
41
+ @version_id = version_id
42
+ end
43
+
44
+ def to_http_info(config)
45
+ # verify the required parameter 'path' is set
46
+ if config.client_side_validation && @path.nil?
47
+ raise ArgumentError, "Missing the required parameter 'path' when calling ImagingApi.delete_file"
48
+ end
49
+
50
+ # resource path
51
+ local_var_path = '/imaging/storage/file/{path}'.sub('{' + 'path' + '}', @path.to_s)
52
+
53
+ # query parameters
54
+ query_params = {}
55
+ query_params[:storageName] = @storage_name unless @storage_name.nil?
56
+ query_params[:versionId] = @version_id unless @version_id.nil?
57
+
58
+ # form parameters
59
+ form_params = {}
60
+
61
+ # http body (model)
62
+ post_body = nil
63
+ auth_names = ['JWT']
64
+
65
+ # header parameters
66
+ header_params = {}
67
+ # HTTP header 'Accept' (if needed)
68
+ header_params['Accept'] = select_header_accept(['application/json'])
69
+ # HTTP header 'Content-Type'
70
+ header_params['Content-Type'] = form_params.any? ? 'multipart/form-data' : select_header_content_type(['application/json'])
71
+
72
+ AsposeImagingCloud::HttpRequest.new(local_var_path,
73
+ header_params,
74
+ query_params,
75
+ form_params,
76
+ post_body,
77
+ auth_names)
78
+ end
79
+ end
80
+ end
@@ -0,0 +1,80 @@
1
+ # ----------------------------------------------------------------------------
2
+ # <copyright company="Aspose" file="delete_folder_request.rb">
3
+ # Copyright (c) 2018-2019 Aspose Pty Ltd. All rights reserved.
4
+ # </copyright>
5
+ # <summary>
6
+ # Permission is hereby granted, free of charge, to any person obtaining a
7
+ # copy of this software and associated documentation files (the "Software"),
8
+ # to deal in the Software without restriction, including without limitation
9
+ # the rights to use, copy, modify, merge, publish, distribute, sublicense,
10
+ # and/or sell copies of the Software, and to permit persons to whom the
11
+ # Software is furnished to do so, subject to the following conditions:
12
+ #
13
+ # The above copyright notice and this permission notice shall be included in
14
+ # all 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
21
+ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22
+ # DEALINGS IN THE SOFTWARE.
23
+ # </summary>
24
+ # ----------------------------------------------------------------------------
25
+
26
+
27
+ require_relative './imaging_request'
28
+ require_relative './http_request'
29
+
30
+ module AsposeImagingCloud
31
+ # Request model for delete_folder operation.
32
+ class DeleteFolderRequest < ImagingRequest
33
+
34
+ # Delete folder
35
+ # @param [String] path Folder path e.g. &#39;/folder&#39;
36
+ # @param [String] storage_name Storage name
37
+ # @param [BOOLEAN] recursive Enable to delete folders, subfolders and files
38
+ def initialize(path, storage_name = nil, recursive = nil)
39
+ @path = path
40
+ @storage_name = storage_name
41
+ @recursive = recursive
42
+ end
43
+
44
+ def to_http_info(config)
45
+ # verify the required parameter 'path' is set
46
+ if config.client_side_validation && @path.nil?
47
+ raise ArgumentError, "Missing the required parameter 'path' when calling ImagingApi.delete_folder"
48
+ end
49
+
50
+ # resource path
51
+ local_var_path = '/imaging/storage/folder/{path}'.sub('{' + 'path' + '}', @path.to_s)
52
+
53
+ # query parameters
54
+ query_params = {}
55
+ query_params[:storageName] = @storage_name unless @storage_name.nil?
56
+ query_params[:recursive] = @recursive unless @recursive.nil?
57
+
58
+ # form parameters
59
+ form_params = {}
60
+
61
+ # http body (model)
62
+ post_body = nil
63
+ auth_names = ['JWT']
64
+
65
+ # header parameters
66
+ header_params = {}
67
+ # HTTP header 'Accept' (if needed)
68
+ header_params['Accept'] = select_header_accept(['application/json'])
69
+ # HTTP header 'Content-Type'
70
+ header_params['Content-Type'] = form_params.any? ? 'multipart/form-data' : select_header_content_type(['application/json'])
71
+
72
+ AsposeImagingCloud::HttpRequest.new(local_var_path,
73
+ header_params,
74
+ query_params,
75
+ form_params,
76
+ post_body,
77
+ auth_names)
78
+ end
79
+ end
80
+ end
@@ -0,0 +1,88 @@
1
+ # ----------------------------------------------------------------------------
2
+ # <copyright company="Aspose" file="delete_image_features_request.rb">
3
+ # Copyright (c) 2018-2019 Aspose Pty Ltd. All rights reserved.
4
+ # </copyright>
5
+ # <summary>
6
+ # Permission is hereby granted, free of charge, to any person obtaining a
7
+ # copy of this software and associated documentation files (the "Software"),
8
+ # to deal in the Software without restriction, including without limitation
9
+ # the rights to use, copy, modify, merge, publish, distribute, sublicense,
10
+ # and/or sell copies of the Software, and to permit persons to whom the
11
+ # Software is furnished to do so, subject to the following conditions:
12
+ #
13
+ # The above copyright notice and this permission notice shall be included in
14
+ # all 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
21
+ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22
+ # DEALINGS IN THE SOFTWARE.
23
+ # </summary>
24
+ # ----------------------------------------------------------------------------
25
+
26
+
27
+ require_relative './imaging_request'
28
+ require_relative './http_request'
29
+
30
+ module AsposeImagingCloud
31
+ # Request model for delete_image_features operation.
32
+ class DeleteImageFeaturesRequest < ImagingRequest
33
+
34
+ # Deletes image features from search context.
35
+ # @param [String] search_context_id The search context identifier.
36
+ # @param [String] image_id The image identifier.
37
+ # @param [String] folder The folder.
38
+ # @param [String] storage The storage.
39
+ def initialize(search_context_id, image_id, folder = nil, storage = nil)
40
+ @search_context_id = search_context_id
41
+ @image_id = image_id
42
+ @folder = folder
43
+ @storage = storage
44
+ end
45
+
46
+ def to_http_info(config)
47
+ # verify the required parameter 'search_context_id' is set
48
+ if config.client_side_validation && @search_context_id.nil?
49
+ raise ArgumentError, "Missing the required parameter 'search_context_id' when calling ImagingApi.delete_image_features"
50
+ end
51
+
52
+ # verify the required parameter 'image_id' is set
53
+ if config.client_side_validation && @image_id.nil?
54
+ raise ArgumentError, "Missing the required parameter 'image_id' when calling ImagingApi.delete_image_features"
55
+ end
56
+
57
+ # resource path
58
+ local_var_path = '/imaging/ai/imageSearch/{searchContextId}/features'.sub('{' + 'searchContextId' + '}', @search_context_id.to_s)
59
+
60
+ # query parameters
61
+ query_params = {}
62
+ query_params[:imageId] = @image_id
63
+ query_params[:folder] = @folder unless @folder.nil?
64
+ query_params[:storage] = @storage unless @storage.nil?
65
+
66
+ # form parameters
67
+ form_params = {}
68
+
69
+ # http body (model)
70
+ post_body = nil
71
+ auth_names = ['JWT']
72
+
73
+ # header parameters
74
+ header_params = {}
75
+ # HTTP header 'Accept' (if needed)
76
+ header_params['Accept'] = select_header_accept(['application/json'])
77
+ # HTTP header 'Content-Type'
78
+ header_params['Content-Type'] = form_params.any? ? 'multipart/form-data' : select_header_content_type(['application/json'])
79
+
80
+ AsposeImagingCloud::HttpRequest.new(local_var_path,
81
+ header_params,
82
+ query_params,
83
+ form_params,
84
+ post_body,
85
+ auth_names)
86
+ end
87
+ end
88
+ end
@@ -0,0 +1,80 @@
1
+ # ----------------------------------------------------------------------------
2
+ # <copyright company="Aspose" file="delete_image_search_request.rb">
3
+ # Copyright (c) 2018-2019 Aspose Pty Ltd. All rights reserved.
4
+ # </copyright>
5
+ # <summary>
6
+ # Permission is hereby granted, free of charge, to any person obtaining a
7
+ # copy of this software and associated documentation files (the "Software"),
8
+ # to deal in the Software without restriction, including without limitation
9
+ # the rights to use, copy, modify, merge, publish, distribute, sublicense,
10
+ # and/or sell copies of the Software, and to permit persons to whom the
11
+ # Software is furnished to do so, subject to the following conditions:
12
+ #
13
+ # The above copyright notice and this permission notice shall be included in
14
+ # all 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
21
+ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22
+ # DEALINGS IN THE SOFTWARE.
23
+ # </summary>
24
+ # ----------------------------------------------------------------------------
25
+
26
+
27
+ require_relative './imaging_request'
28
+ require_relative './http_request'
29
+
30
+ module AsposeImagingCloud
31
+ # Request model for delete_image_search operation.
32
+ class DeleteImageSearchRequest < ImagingRequest
33
+
34
+ # Deletes the search context.
35
+ # @param [String] search_context_id The search context identifier.
36
+ # @param [String] folder The folder.
37
+ # @param [String] storage The storage.
38
+ def initialize(search_context_id, folder = nil, storage = nil)
39
+ @search_context_id = search_context_id
40
+ @folder = folder
41
+ @storage = storage
42
+ end
43
+
44
+ def to_http_info(config)
45
+ # verify the required parameter 'search_context_id' is set
46
+ if config.client_side_validation && @search_context_id.nil?
47
+ raise ArgumentError, "Missing the required parameter 'search_context_id' when calling ImagingApi.delete_image_search"
48
+ end
49
+
50
+ # resource path
51
+ local_var_path = '/imaging/ai/imageSearch/{searchContextId}'.sub('{' + 'searchContextId' + '}', @search_context_id.to_s)
52
+
53
+ # query parameters
54
+ query_params = {}
55
+ query_params[:folder] = @folder unless @folder.nil?
56
+ query_params[:storage] = @storage unless @storage.nil?
57
+
58
+ # form parameters
59
+ form_params = {}
60
+
61
+ # http body (model)
62
+ post_body = nil
63
+ auth_names = ['JWT']
64
+
65
+ # header parameters
66
+ header_params = {}
67
+ # HTTP header 'Accept' (if needed)
68
+ header_params['Accept'] = select_header_accept(['application/json'])
69
+ # HTTP header 'Content-Type'
70
+ header_params['Content-Type'] = form_params.any? ? 'multipart/form-data' : select_header_content_type(['application/json'])
71
+
72
+ AsposeImagingCloud::HttpRequest.new(local_var_path,
73
+ header_params,
74
+ query_params,
75
+ form_params,
76
+ post_body,
77
+ auth_names)
78
+ end
79
+ end
80
+ end