aspose_imaging_cloud 20.4 → 20.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  # ----------------------------------------------------------------------------
2
2
  # <copyright company="Aspose" file="create_fax_tiff_request.rb">
3
- # Copyright (c) 2018-2019 Aspose Pty Ltd. All rights reserved.
3
+ # Copyright (c) 2018-2020 Aspose Pty Ltd. All rights reserved.
4
4
  # </copyright>
5
5
  # <summary>
6
6
  # Permission is hereby granted, free of charge, to any person obtaining a
@@ -0,0 +1,93 @@
1
+ # ----------------------------------------------------------------------------
2
+ # <copyright company="Aspose" file="create_object_bounds_request.rb">
3
+ # Copyright (c) 2018-2020 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 create_object_bounds operation.
32
+ class CreateObjectBoundsRequest < ImagingRequest
33
+
34
+ # Detects objects bounds. Image data is passed as zero-indexed multipart/form-data content or as raw body stream.
35
+ # @param [File] image_data Input image
36
+ # @param [String] method Object detection method
37
+ # @param [Integer] threshold Object detection probability threshold in percents
38
+ # @param [BOOLEAN] include_label Draw detected objects labels
39
+ # @param [BOOLEAN] include_score Draw detected objects scores
40
+ # @param [String] out_path Path to updated file (if this is empty, response contains streamed image)
41
+ # @param [String] storage Your Aspose Cloud Storage name.
42
+ def initialize(image_data, method = nil, threshold = nil, include_label = nil, include_score = nil, out_path = nil, storage = nil)
43
+ @image_data = image_data
44
+ @method = method
45
+ @threshold = threshold
46
+ @include_label = include_label
47
+ @include_score = include_score
48
+ @out_path = out_path
49
+ @storage = storage
50
+ end
51
+
52
+ def to_http_info(config)
53
+ # verify the required parameter 'image_data' is set
54
+ if config.client_side_validation && @image_data.nil?
55
+ raise ArgumentError, "Missing the required parameter 'image_data' when calling ImagingApi.create_object_bounds"
56
+ end
57
+
58
+ # resource path
59
+ local_var_path = '/imaging/ai/objectdetection/bounds'
60
+
61
+ # query parameters
62
+ query_params = {}
63
+ query_params[:method] = @method unless @method.nil?
64
+ query_params[:threshold] = @threshold unless @threshold.nil?
65
+ query_params[:includeLabel] = @include_label unless @include_label.nil?
66
+ query_params[:includeScore] = @include_score unless @include_score.nil?
67
+ query_params[:outPath] = @out_path unless @out_path.nil?
68
+ query_params[:storage] = @storage unless @storage.nil?
69
+
70
+ # form parameters
71
+ form_params = {}
72
+ form_params['imageData'] = @image_data
73
+
74
+ # http body (model)
75
+ post_body = nil
76
+ auth_names = ['JWT']
77
+
78
+ # header parameters
79
+ header_params = {}
80
+ # HTTP header 'Accept' (if needed)
81
+ header_params['Accept'] = select_header_accept(['application/json'])
82
+ # HTTP header 'Content-Type'
83
+ header_params['Content-Type'] = form_params.any? ? 'multipart/form-data' : select_header_content_type(['multipart/form-data'])
84
+
85
+ AsposeImagingCloud::HttpRequest.new(local_var_path,
86
+ header_params,
87
+ query_params,
88
+ form_params,
89
+ post_body,
90
+ auth_names)
91
+ end
92
+ end
93
+ end
@@ -0,0 +1,96 @@
1
+ # ----------------------------------------------------------------------------
2
+ # <copyright company="Aspose" file="create_visual_object_bounds_request.rb">
3
+ # Copyright (c) 2018-2020 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 create_visual_object_bounds operation.
32
+ class CreateVisualObjectBoundsRequest < ImagingRequest
33
+
34
+ # Detects objects bounds and draw them on the original image. Image data is passed as zero-indexed multipart/form-data content or as raw body stream
35
+ # @param [File] image_data Input image
36
+ # @param [String] method Object detection method
37
+ # @param [Integer] threshold Object detection probability threshold in percents
38
+ # @param [BOOLEAN] include_label Draw detected objects classes
39
+ # @param [BOOLEAN] include_score Draw detected objects scores
40
+ # @param [String] color Bounds, labels, and scores text color
41
+ # @param [String] out_path Path to updated file (if this is empty, response contains streamed image)
42
+ # @param [String] storage Your Aspose Cloud Storage name.
43
+ def initialize(image_data, method = nil, threshold = nil, include_label = nil, include_score = nil, color = nil, out_path = nil, storage = nil)
44
+ @image_data = image_data
45
+ @method = method
46
+ @threshold = threshold
47
+ @include_label = include_label
48
+ @include_score = include_score
49
+ @color = color
50
+ @out_path = out_path
51
+ @storage = storage
52
+ end
53
+
54
+ def to_http_info(config)
55
+ # verify the required parameter 'image_data' is set
56
+ if config.client_side_validation && @image_data.nil?
57
+ raise ArgumentError, "Missing the required parameter 'image_data' when calling ImagingApi.create_visual_object_bounds"
58
+ end
59
+
60
+ # resource path
61
+ local_var_path = '/imaging/ai/objectdetection/visualbounds'
62
+
63
+ # query parameters
64
+ query_params = {}
65
+ query_params[:method] = @method unless @method.nil?
66
+ query_params[:threshold] = @threshold unless @threshold.nil?
67
+ query_params[:includeLabel] = @include_label unless @include_label.nil?
68
+ query_params[:includeScore] = @include_score unless @include_score.nil?
69
+ query_params[:color] = @color unless @color.nil?
70
+ query_params[:outPath] = @out_path unless @out_path.nil?
71
+ query_params[:storage] = @storage unless @storage.nil?
72
+
73
+ # form parameters
74
+ form_params = {}
75
+ form_params['imageData'] = @image_data
76
+
77
+ # http body (model)
78
+ post_body = nil
79
+ auth_names = ['JWT']
80
+
81
+ # header parameters
82
+ header_params = {}
83
+ # HTTP header 'Accept' (if needed)
84
+ header_params['Accept'] = select_header_accept(['application/json'])
85
+ # HTTP header 'Content-Type'
86
+ header_params['Content-Type'] = form_params.any? ? 'multipart/form-data' : select_header_content_type(['multipart/form-data'])
87
+
88
+ AsposeImagingCloud::HttpRequest.new(local_var_path,
89
+ header_params,
90
+ query_params,
91
+ form_params,
92
+ post_body,
93
+ auth_names)
94
+ end
95
+ end
96
+ end
@@ -0,0 +1,92 @@
1
+ # ----------------------------------------------------------------------------
2
+ # <copyright company="Aspose" file="get_object_bounds_request.rb">
3
+ # Copyright (c) 2018-2020 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 get_object_bounds operation.
32
+ class GetObjectBoundsRequest < ImagingRequest
33
+
34
+ # Detects objects&#39; bounds
35
+ # @param [String] name Image file name.
36
+ # @param [String] method Object detection method
37
+ # @param [Integer] threshold Object detection probability threshold in percents
38
+ # @param [BOOLEAN] include_label Return detected objects labels
39
+ # @param [BOOLEAN] include_score Return detected objects score
40
+ # @param [String] folder Folder
41
+ # @param [String] storage Storage
42
+ def initialize(name, method = nil, threshold = nil, include_label = nil, include_score = nil, folder = nil, storage = nil)
43
+ @name = name
44
+ @method = method
45
+ @threshold = threshold
46
+ @include_label = include_label
47
+ @include_score = include_score
48
+ @folder = folder
49
+ @storage = storage
50
+ end
51
+
52
+ def to_http_info(config)
53
+ # verify the required parameter 'name' is set
54
+ if config.client_side_validation && @name.nil?
55
+ raise ArgumentError, "Missing the required parameter 'name' when calling ImagingApi.get_object_bounds"
56
+ end
57
+
58
+ # resource path
59
+ local_var_path = '/imaging/ai/objectdetection/{name}/bounds'.sub('{' + 'name' + '}', @name.to_s)
60
+
61
+ # query parameters
62
+ query_params = {}
63
+ query_params[:method] = @method unless @method.nil?
64
+ query_params[:threshold] = @threshold unless @threshold.nil?
65
+ query_params[:includeLabel] = @include_label unless @include_label.nil?
66
+ query_params[:includeScore] = @include_score unless @include_score.nil?
67
+ query_params[:folder] = @folder unless @folder.nil?
68
+ query_params[:storage] = @storage unless @storage.nil?
69
+
70
+ # form parameters
71
+ form_params = {}
72
+
73
+ # http body (model)
74
+ post_body = nil
75
+ auth_names = ['JWT']
76
+
77
+ # header parameters
78
+ header_params = {}
79
+ # HTTP header 'Accept' (if needed)
80
+ header_params['Accept'] = select_header_accept(['application/json'])
81
+ # HTTP header 'Content-Type'
82
+ header_params['Content-Type'] = form_params.any? ? 'multipart/form-data' : select_header_content_type(['application/json'])
83
+
84
+ AsposeImagingCloud::HttpRequest.new(local_var_path,
85
+ header_params,
86
+ query_params,
87
+ form_params,
88
+ post_body,
89
+ auth_names)
90
+ end
91
+ end
92
+ end
@@ -0,0 +1,95 @@
1
+ # ----------------------------------------------------------------------------
2
+ # <copyright company="Aspose" file="get_visual_object_bounds_request.rb">
3
+ # Copyright (c) 2018-2020 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 get_visual_object_bounds operation.
32
+ class GetVisualObjectBoundsRequest < ImagingRequest
33
+
34
+ # Detects objects bounds and draw them on the original image
35
+ # @param [String] name The image features detector.
36
+ # @param [String] method Object detection method
37
+ # @param [Integer] threshold Object detection probability threshold in percents
38
+ # @param [BOOLEAN] include_label Draw detected objects labels
39
+ # @param [BOOLEAN] include_score Draw detected objects scores
40
+ # @param [String] color Bounds, labels, and scores text color
41
+ # @param [String] folder The folder.
42
+ # @param [String] storage The storage.
43
+ def initialize(name, method = nil, threshold = nil, include_label = nil, include_score = nil, color = nil, folder = nil, storage = nil)
44
+ @name = name
45
+ @method = method
46
+ @threshold = threshold
47
+ @include_label = include_label
48
+ @include_score = include_score
49
+ @color = color
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.get_visual_object_bounds"
58
+ end
59
+
60
+ # resource path
61
+ local_var_path = '/imaging/ai/objectdetection/{name}/visualbounds'.sub('{' + 'name' + '}', @name.to_s)
62
+
63
+ # query parameters
64
+ query_params = {}
65
+ query_params[:method] = @method unless @method.nil?
66
+ query_params[:threshold] = @threshold unless @threshold.nil?
67
+ query_params[:includeLabel] = @include_label unless @include_label.nil?
68
+ query_params[:includeScore] = @include_score unless @include_score.nil?
69
+ query_params[:color] = @color unless @color.nil?
70
+ query_params[:folder] = @folder unless @folder.nil?
71
+ query_params[:storage] = @storage unless @storage.nil?
72
+
73
+ # form parameters
74
+ form_params = {}
75
+
76
+ # http body (model)
77
+ post_body = nil
78
+ auth_names = ['JWT']
79
+
80
+ # header parameters
81
+ header_params = {}
82
+ # HTTP header 'Accept' (if needed)
83
+ header_params['Accept'] = select_header_accept(['application/json'])
84
+ # HTTP header 'Content-Type'
85
+ header_params['Content-Type'] = form_params.any? ? 'multipart/form-data' : select_header_content_type(['application/json'])
86
+
87
+ AsposeImagingCloud::HttpRequest.new(local_var_path,
88
+ header_params,
89
+ query_params,
90
+ form_params,
91
+ post_body,
92
+ auth_names)
93
+ end
94
+ end
95
+ end
@@ -0,0 +1,93 @@
1
+ # ----------------------------------------------------------------------------
2
+ # <copyright company="Aspose" file="object_bounds_request.rb">
3
+ # Copyright (c) 2018-2020 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 object_bounds operation.
32
+ class ObjectBoundsRequest < ImagingRequest
33
+
34
+ # Detect objects&#39; bounds
35
+ # @param [String] name Image file name.
36
+ # @param [String] method Object detection method
37
+ # @param [Integer] threshold Object detection probability threshold in percents
38
+ # @param [BOOLEAN] include_class Return detected objects classes
39
+ # @param [BOOLEAN] include_score Return detected objects score
40
+ # @param [String] folder Folder
41
+ # @param [String] storage Storage
42
+ def initialize(name, method = nil, threshold = nil, include_class = nil, include_score = nil, folder = nil, storage = nil)
43
+ @name = name
44
+ @method = method
45
+ @threshold = threshold
46
+ @include_class = include_class
47
+ @include_score = include_score
48
+ @folder = folder
49
+ @storage = storage
50
+ end
51
+
52
+ def to_http_info(config)
53
+ # verify the required parameter 'name' is set
54
+ if config.client_side_validation && @name.nil?
55
+ raise ArgumentError, "Missing the required parameter 'name' when calling ImagingApi.object_bounds"
56
+ end
57
+
58
+ # resource path
59
+ local_var_path = '/imaging/ai/objectdetection/bounds'
60
+
61
+ # query parameters
62
+ query_params = {}
63
+ query_params[:name] = @name
64
+ query_params[:method] = @method unless @method.nil?
65
+ query_params[:threshold] = @threshold unless @threshold.nil?
66
+ query_params[:includeClass] = @include_class unless @include_class.nil?
67
+ query_params[:includeScore] = @include_score unless @include_score.nil?
68
+ query_params[:folder] = @folder unless @folder.nil?
69
+ query_params[:storage] = @storage unless @storage.nil?
70
+
71
+ # form parameters
72
+ form_params = {}
73
+
74
+ # http body (model)
75
+ post_body = nil
76
+ auth_names = ['JWT']
77
+
78
+ # header parameters
79
+ header_params = {}
80
+ # HTTP header 'Accept' (if needed)
81
+ header_params['Accept'] = select_header_accept(['application/json'])
82
+ # HTTP header 'Content-Type'
83
+ header_params['Content-Type'] = form_params.any? ? 'multipart/form-data' : select_header_content_type(['application/json'])
84
+
85
+ AsposeImagingCloud::HttpRequest.new(local_var_path,
86
+ header_params,
87
+ query_params,
88
+ form_params,
89
+ post_body,
90
+ auth_names)
91
+ end
92
+ end
93
+ end