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.
- checksums.yaml +5 -5
- data/README.md +224 -61
- data/lib/aspose-imaging-cloud.rb +161 -0
- data/lib/aspose-imaging-cloud/api/imaging_api.rb +684 -0
- data/lib/aspose-imaging-cloud/api_client.rb +357 -0
- data/lib/aspose-imaging-cloud/api_error.rb +42 -0
- data/lib/{aspose_imaging_cloud → aspose-imaging-cloud}/configuration.rb +236 -166
- data/lib/aspose-imaging-cloud/models/big_rectangular_filter_properties.rb +206 -0
- data/lib/aspose-imaging-cloud/models/bilateral_smoothing_filter_properties.rb +281 -0
- data/lib/aspose-imaging-cloud/models/bmp_properties.rb +202 -0
- data/lib/aspose-imaging-cloud/models/convolution_filter_properties.rb +236 -0
- data/lib/aspose-imaging-cloud/models/deconvolution_filter_properties.rb +266 -0
- data/lib/aspose-imaging-cloud/models/dicom_properties.rb +584 -0
- data/lib/aspose-imaging-cloud/models/disc_usage.rb +222 -0
- data/lib/aspose-imaging-cloud/models/djvu_properties.rb +232 -0
- data/lib/aspose-imaging-cloud/models/dng_properties.rb +329 -0
- data/lib/aspose-imaging-cloud/models/error.rb +232 -0
- data/lib/aspose-imaging-cloud/models/error_details.rb +217 -0
- data/lib/aspose-imaging-cloud/models/exif_data.rb +1560 -0
- data/lib/aspose-imaging-cloud/models/file_version.rb +277 -0
- data/lib/aspose-imaging-cloud/models/file_versions.rb +204 -0
- data/lib/aspose-imaging-cloud/models/files_list.rb +204 -0
- data/lib/aspose-imaging-cloud/models/files_upload_result.rb +216 -0
- data/lib/aspose-imaging-cloud/models/filter_properties_base.rb +206 -0
- data/lib/aspose-imaging-cloud/models/gauss_wiener_filter_properties.rb +296 -0
- data/lib/aspose-imaging-cloud/models/gaussian_blur_filter_properties.rb +266 -0
- data/lib/aspose-imaging-cloud/models/gif_properties.rb +247 -0
- data/lib/aspose-imaging-cloud/models/image_duplicates.rb +204 -0
- data/lib/aspose-imaging-cloud/models/image_duplicates_set.rb +204 -0
- data/lib/aspose-imaging-cloud/models/image_features.rb +257 -0
- data/lib/aspose-imaging-cloud/models/imaging_response.rb +412 -0
- data/lib/aspose-imaging-cloud/models/jfif_data.rb +247 -0
- data/lib/aspose-imaging-cloud/models/jpeg2000_properties.rb +214 -0
- data/lib/aspose-imaging-cloud/models/jpeg_exif_data.rb +1738 -0
- data/lib/aspose-imaging-cloud/models/jpeg_properties.rb +222 -0
- data/lib/aspose-imaging-cloud/models/median_filter_properties.rb +221 -0
- data/lib/aspose-imaging-cloud/models/motion_wiener_filter_properties.rb +311 -0
- data/lib/aspose-imaging-cloud/models/object_exist.rb +222 -0
- data/lib/aspose-imaging-cloud/models/odg_metadata.rb +372 -0
- data/lib/aspose-imaging-cloud/models/odg_page.rb +222 -0
- data/lib/aspose-imaging-cloud/models/odg_properties.rb +229 -0
- data/lib/aspose-imaging-cloud/models/png_properties.rb +192 -0
- data/lib/aspose-imaging-cloud/models/psd_properties.rb +242 -0
- data/lib/aspose-imaging-cloud/models/requests/add_search_image_request.rb +91 -0
- data/lib/aspose-imaging-cloud/models/requests/append_tiff_request.rb +88 -0
- data/lib/aspose-imaging-cloud/models/requests/compare_images_request.rb +94 -0
- data/lib/aspose-imaging-cloud/models/requests/convert_tiff_to_fax_request.rb +80 -0
- data/lib/aspose-imaging-cloud/models/requests/copy_file_request.rb +91 -0
- data/lib/aspose-imaging-cloud/models/requests/copy_folder_request.rb +88 -0
- data/lib/aspose-imaging-cloud/models/requests/create_cropped_image_request.rb +121 -0
- data/lib/aspose-imaging-cloud/models/requests/create_folder_request.rb +77 -0
- data/lib/aspose-imaging-cloud/models/requests/create_image_features_request.rb +89 -0
- data/lib/aspose-imaging-cloud/models/requests/create_image_frame_request.rb +112 -0
- data/lib/aspose-imaging-cloud/models/requests/create_image_search_request.rb +79 -0
- data/lib/aspose-imaging-cloud/models/requests/create_image_tag_request.rb +96 -0
- data/lib/aspose-imaging-cloud/models/requests/create_modified_bmp_request.rb +108 -0
- data/lib/aspose-imaging-cloud/models/requests/create_modified_emf_request.rb +127 -0
- data/lib/aspose-imaging-cloud/models/requests/create_modified_gif_request.rb +102 -0
- data/lib/aspose-imaging-cloud/models/requests/create_modified_jpeg2000_request.rb +95 -0
- data/lib/aspose-imaging-cloud/models/requests/create_modified_jpeg_request.rb +90 -0
- data/lib/aspose-imaging-cloud/models/requests/create_modified_psd_request.rb +90 -0
- data/lib/aspose-imaging-cloud/models/requests/create_modified_svg_request.rb +114 -0
- data/lib/aspose-imaging-cloud/models/requests/create_modified_tiff_request.rb +104 -0
- data/lib/aspose-imaging-cloud/models/requests/create_modified_web_p_request.rb +116 -0
- data/lib/aspose-imaging-cloud/models/requests/create_modified_wmf_request.rb +127 -0
- data/lib/aspose-imaging-cloud/models/requests/create_resized_image_request.rb +105 -0
- data/lib/aspose-imaging-cloud/models/requests/create_rotate_flipped_image_request.rb +97 -0
- data/lib/aspose-imaging-cloud/models/requests/create_saved_image_as_request.rb +89 -0
- data/lib/aspose-imaging-cloud/models/requests/create_updated_image_request.rb +145 -0
- data/lib/aspose-imaging-cloud/models/requests/create_web_site_image_features_request.rb +88 -0
- data/lib/aspose-imaging-cloud/models/requests/crop_image_request.rb +120 -0
- data/lib/aspose-imaging-cloud/models/requests/delete_file_request.rb +80 -0
- data/lib/aspose-imaging-cloud/models/requests/delete_folder_request.rb +80 -0
- data/lib/aspose-imaging-cloud/models/requests/delete_image_features_request.rb +88 -0
- data/lib/aspose-imaging-cloud/models/requests/delete_image_search_request.rb +80 -0
- data/lib/aspose-imaging-cloud/models/requests/delete_search_image_request.rb +88 -0
- data/lib/aspose-imaging-cloud/models/requests/download_file_request.rb +80 -0
- data/lib/aspose-imaging-cloud/models/requests/extract_image_features_request.rb +91 -0
- data/lib/aspose-imaging-cloud/models/requests/extract_image_frame_properties_request.rb +82 -0
- data/lib/aspose-imaging-cloud/models/requests/extract_image_properties_request.rb +75 -0
- data/lib/aspose-imaging-cloud/models/requests/filter_effect_image_request.rb +103 -0
- data/lib/aspose-imaging-cloud/models/requests/find_image_duplicates_request.rb +88 -0
- data/lib/aspose-imaging-cloud/models/requests/find_images_by_tags_request.rb +104 -0
- data/lib/aspose-imaging-cloud/models/requests/find_similar_images_request.rb +102 -0
- data/lib/aspose-imaging-cloud/models/requests/get_disc_usage_request.rb +70 -0
- data/lib/aspose-imaging-cloud/models/requests/get_file_versions_request.rb +77 -0
- data/lib/aspose-imaging-cloud/models/requests/get_files_list_request.rb +77 -0
- data/lib/aspose-imaging-cloud/models/requests/get_image_features_request.rb +88 -0
- data/lib/aspose-imaging-cloud/models/requests/get_image_frame_properties_request.rb +87 -0
- data/lib/aspose-imaging-cloud/models/requests/get_image_frame_request.rb +111 -0
- data/lib/aspose-imaging-cloud/models/requests/get_image_properties_request.rb +80 -0
- data/lib/aspose-imaging-cloud/models/requests/get_image_search_status_request.rb +80 -0
- data/lib/aspose-imaging-cloud/models/requests/get_search_image_request.rb +88 -0
- data/lib/aspose-imaging-cloud/models/requests/http_request.rb +50 -0
- data/lib/aspose-imaging-cloud/models/requests/imaging_request.rb +101 -0
- data/lib/aspose-imaging-cloud/models/requests/modify_bmp_request.rb +107 -0
- data/lib/aspose-imaging-cloud/models/requests/modify_emf_request.rb +126 -0
- data/lib/aspose-imaging-cloud/models/requests/modify_gif_request.rb +101 -0
- data/lib/aspose-imaging-cloud/models/requests/modify_jpeg2000_request.rb +94 -0
- data/lib/aspose-imaging-cloud/models/requests/modify_jpeg_request.rb +89 -0
- data/lib/aspose-imaging-cloud/models/requests/modify_psd_request.rb +89 -0
- data/lib/aspose-imaging-cloud/models/requests/modify_svg_request.rb +113 -0
- data/lib/aspose-imaging-cloud/models/requests/modify_tiff_request.rb +103 -0
- data/lib/aspose-imaging-cloud/models/requests/modify_web_p_request.rb +115 -0
- data/lib/aspose-imaging-cloud/models/requests/modify_wmf_request.rb +126 -0
- data/lib/aspose-imaging-cloud/models/requests/move_file_request.rb +91 -0
- data/lib/aspose-imaging-cloud/models/requests/move_folder_request.rb +88 -0
- data/lib/aspose-imaging-cloud/models/requests/object_exists_request.rb +80 -0
- data/lib/aspose-imaging-cloud/models/requests/resize_image_request.rb +104 -0
- data/lib/aspose-imaging-cloud/models/requests/rotate_flip_image_request.rb +96 -0
- data/lib/aspose-imaging-cloud/models/requests/save_image_as_request.rb +88 -0
- data/lib/aspose-imaging-cloud/models/requests/storage_exists_request.rb +74 -0
- data/lib/aspose-imaging-cloud/models/requests/update_image_features_request.rb +91 -0
- data/lib/aspose-imaging-cloud/models/requests/update_image_request.rb +144 -0
- data/lib/aspose-imaging-cloud/models/requests/update_search_image_request.rb +91 -0
- data/lib/aspose-imaging-cloud/models/requests/upload_file_request.rb +86 -0
- data/lib/aspose-imaging-cloud/models/search_context_status.rb +212 -0
- data/lib/aspose-imaging-cloud/models/search_result.rb +217 -0
- data/lib/aspose-imaging-cloud/models/search_results_set.rb +204 -0
- data/lib/aspose-imaging-cloud/models/sharpen_filter_properties.rb +266 -0
- data/lib/aspose-imaging-cloud/models/small_rectangular_filter_properties.rb +206 -0
- data/lib/aspose-imaging-cloud/models/storage_exist.rb +207 -0
- data/lib/aspose-imaging-cloud/models/storage_file.rb +252 -0
- data/lib/aspose-imaging-cloud/models/svg_properties.rb +202 -0
- data/lib/aspose-imaging-cloud/models/tiff_frame.rb +242 -0
- data/lib/aspose-imaging-cloud/models/tiff_options.rb +734 -0
- data/lib/aspose-imaging-cloud/models/tiff_properties.rb +224 -0
- data/lib/aspose-imaging-cloud/models/web_p_properties.rb +252 -0
- data/lib/aspose-imaging-cloud/version.rb +15 -0
- metadata +149 -129
- data/LICENSE +0 -22
- data/aspose_imaging_cloud.gemspec +0 -26
- data/lib/aspose_imaging_cloud.rb +0 -43
- data/lib/aspose_imaging_cloud/api/imaging_api.rb +0 -1776
- data/lib/aspose_imaging_cloud/api_client.rb +0 -335
- data/lib/aspose_imaging_cloud/api_error.rb +0 -24
- data/lib/aspose_imaging_cloud/models/base_object.rb +0 -86
- data/lib/aspose_imaging_cloud/models/base_response.rb +0 -53
- data/lib/aspose_imaging_cloud/models/bmp_properties.rb +0 -37
- data/lib/aspose_imaging_cloud/models/exif_data.rb +0 -855
- data/lib/aspose_imaging_cloud/models/gif_properties.rb +0 -53
- data/lib/aspose_imaging_cloud/models/imaging_response.rb +0 -149
- data/lib/aspose_imaging_cloud/models/jfif_data.rb +0 -61
- data/lib/aspose_imaging_cloud/models/jpeg_exif_data.rb +0 -991
- data/lib/aspose_imaging_cloud/models/jpeg_properties.rb +0 -53
- data/lib/aspose_imaging_cloud/models/psd_properties.rb +0 -61
- data/lib/aspose_imaging_cloud/models/tiff_frame.rb +0 -61
- data/lib/aspose_imaging_cloud/models/tiff_options.rb +0 -419
- data/lib/aspose_imaging_cloud/models/tiff_properties.rb +0 -55
- data/lib/aspose_imaging_cloud/version.rb +0 -3
- data/test/data/TestDemo.tif +0 -0
- data/test/data/aspose.jpg +0 -0
- data/test/data/aspose_imaging_for_cloud.png +0 -0
- data/test/data/demo.tif +0 -0
- data/test/data/sample-multi.tif +0 -0
- data/test/data/sample.bmp +0 -0
- data/test/data/sample.gif +0 -0
- data/test/data/sample.psd +0 -0
- data/test/data/sample.tif +0 -0
- data/test/data/test.bmp +0 -0
- data/test/imaging_tests.rb +0 -291
@@ -0,0 +1,412 @@
|
|
1
|
+
# ----------------------------------------------------------------------------
|
2
|
+
# <copyright company="Aspose" file="imaging_response.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 'date'
|
28
|
+
|
29
|
+
module AsposeImagingCloud
|
30
|
+
# Represents information about image.
|
31
|
+
class ImagingResponse
|
32
|
+
# Gets or sets the height of image.
|
33
|
+
attr_accessor :height
|
34
|
+
|
35
|
+
# Gets or sets the width of image.
|
36
|
+
attr_accessor :width
|
37
|
+
|
38
|
+
# Gets or sets the bits per pixel for image.
|
39
|
+
attr_accessor :bits_per_pixel
|
40
|
+
|
41
|
+
# Gets or sets the BMP properties.
|
42
|
+
attr_accessor :bmp_properties
|
43
|
+
|
44
|
+
# Gets or sets the GIF properties.
|
45
|
+
attr_accessor :gif_properties
|
46
|
+
|
47
|
+
# Gets or sets the JPEG properties.
|
48
|
+
attr_accessor :jpeg_properties
|
49
|
+
|
50
|
+
# Gets or sets the PNG properties.
|
51
|
+
attr_accessor :png_properties
|
52
|
+
|
53
|
+
# Gets or sets the TIFF properties.
|
54
|
+
attr_accessor :tiff_properties
|
55
|
+
|
56
|
+
# Gets or sets the PSD properties.
|
57
|
+
attr_accessor :psd_properties
|
58
|
+
|
59
|
+
# Gets or sets the DJVU properties.
|
60
|
+
attr_accessor :djvu_properties
|
61
|
+
|
62
|
+
# Gets or sets the WEBP properties.
|
63
|
+
attr_accessor :web_p_properties
|
64
|
+
|
65
|
+
# Gets or sets the JPEG2000 properties.
|
66
|
+
attr_accessor :jpeg2000_properties
|
67
|
+
|
68
|
+
# Gets or sets the DICOM properties.
|
69
|
+
attr_accessor :dicom_properties
|
70
|
+
|
71
|
+
# Gets or sets the DNG properties.
|
72
|
+
attr_accessor :dng_properties
|
73
|
+
|
74
|
+
# Gets or sets the the ODG properties.
|
75
|
+
attr_accessor :odg_properties
|
76
|
+
|
77
|
+
# Gets or sets the SVG properties.
|
78
|
+
attr_accessor :svg_properties
|
79
|
+
|
80
|
+
# Gets or sets the horizontal resolution of an image.
|
81
|
+
attr_accessor :horizontal_resolution
|
82
|
+
|
83
|
+
# Gets or sets the vertical resolution of an image.
|
84
|
+
attr_accessor :vertical_resolution
|
85
|
+
|
86
|
+
# Gets or sets a value indicating whether image is cached.
|
87
|
+
attr_accessor :is_cached
|
88
|
+
|
89
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
90
|
+
def self.attribute_map
|
91
|
+
{
|
92
|
+
:'height' => :'Height',
|
93
|
+
:'width' => :'Width',
|
94
|
+
:'bits_per_pixel' => :'BitsPerPixel',
|
95
|
+
:'bmp_properties' => :'BmpProperties',
|
96
|
+
:'gif_properties' => :'GifProperties',
|
97
|
+
:'jpeg_properties' => :'JpegProperties',
|
98
|
+
:'png_properties' => :'PngProperties',
|
99
|
+
:'tiff_properties' => :'TiffProperties',
|
100
|
+
:'psd_properties' => :'PsdProperties',
|
101
|
+
:'djvu_properties' => :'DjvuProperties',
|
102
|
+
:'web_p_properties' => :'WebPProperties',
|
103
|
+
:'jpeg2000_properties' => :'Jpeg2000Properties',
|
104
|
+
:'dicom_properties' => :'DicomProperties',
|
105
|
+
:'dng_properties' => :'DngProperties',
|
106
|
+
:'odg_properties' => :'OdgProperties',
|
107
|
+
:'svg_properties' => :'SvgProperties',
|
108
|
+
:'horizontal_resolution' => :'HorizontalResolution',
|
109
|
+
:'vertical_resolution' => :'VerticalResolution',
|
110
|
+
:'is_cached' => :'IsCached'
|
111
|
+
}
|
112
|
+
end
|
113
|
+
|
114
|
+
# Attribute type mapping.
|
115
|
+
def self.swagger_types
|
116
|
+
{
|
117
|
+
:'height' => :'Integer',
|
118
|
+
:'width' => :'Integer',
|
119
|
+
:'bits_per_pixel' => :'Integer',
|
120
|
+
:'bmp_properties' => :'BmpProperties',
|
121
|
+
:'gif_properties' => :'GifProperties',
|
122
|
+
:'jpeg_properties' => :'JpegProperties',
|
123
|
+
:'png_properties' => :'PngProperties',
|
124
|
+
:'tiff_properties' => :'TiffProperties',
|
125
|
+
:'psd_properties' => :'PsdProperties',
|
126
|
+
:'djvu_properties' => :'DjvuProperties',
|
127
|
+
:'web_p_properties' => :'WebPProperties',
|
128
|
+
:'jpeg2000_properties' => :'Jpeg2000Properties',
|
129
|
+
:'dicom_properties' => :'DicomProperties',
|
130
|
+
:'dng_properties' => :'DngProperties',
|
131
|
+
:'odg_properties' => :'OdgProperties',
|
132
|
+
:'svg_properties' => :'SvgProperties',
|
133
|
+
:'horizontal_resolution' => :'Float',
|
134
|
+
:'vertical_resolution' => :'Float',
|
135
|
+
:'is_cached' => :'BOOLEAN'
|
136
|
+
}
|
137
|
+
end
|
138
|
+
|
139
|
+
# Initializes the object
|
140
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
141
|
+
def initialize(attributes = {})
|
142
|
+
return unless attributes.is_a?(Hash)
|
143
|
+
|
144
|
+
# convert string to symbol for hash key
|
145
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
146
|
+
|
147
|
+
if attributes.has_key?(:'Height')
|
148
|
+
self.height = attributes[:'Height']
|
149
|
+
end
|
150
|
+
|
151
|
+
if attributes.has_key?(:'Width')
|
152
|
+
self.width = attributes[:'Width']
|
153
|
+
end
|
154
|
+
|
155
|
+
if attributes.has_key?(:'BitsPerPixel')
|
156
|
+
self.bits_per_pixel = attributes[:'BitsPerPixel']
|
157
|
+
end
|
158
|
+
|
159
|
+
if attributes.has_key?(:'BmpProperties')
|
160
|
+
self.bmp_properties = attributes[:'BmpProperties']
|
161
|
+
end
|
162
|
+
|
163
|
+
if attributes.has_key?(:'GifProperties')
|
164
|
+
self.gif_properties = attributes[:'GifProperties']
|
165
|
+
end
|
166
|
+
|
167
|
+
if attributes.has_key?(:'JpegProperties')
|
168
|
+
self.jpeg_properties = attributes[:'JpegProperties']
|
169
|
+
end
|
170
|
+
|
171
|
+
if attributes.has_key?(:'PngProperties')
|
172
|
+
self.png_properties = attributes[:'PngProperties']
|
173
|
+
end
|
174
|
+
|
175
|
+
if attributes.has_key?(:'TiffProperties')
|
176
|
+
self.tiff_properties = attributes[:'TiffProperties']
|
177
|
+
end
|
178
|
+
|
179
|
+
if attributes.has_key?(:'PsdProperties')
|
180
|
+
self.psd_properties = attributes[:'PsdProperties']
|
181
|
+
end
|
182
|
+
|
183
|
+
if attributes.has_key?(:'DjvuProperties')
|
184
|
+
self.djvu_properties = attributes[:'DjvuProperties']
|
185
|
+
end
|
186
|
+
|
187
|
+
if attributes.has_key?(:'WebPProperties')
|
188
|
+
self.web_p_properties = attributes[:'WebPProperties']
|
189
|
+
end
|
190
|
+
|
191
|
+
if attributes.has_key?(:'Jpeg2000Properties')
|
192
|
+
self.jpeg2000_properties = attributes[:'Jpeg2000Properties']
|
193
|
+
end
|
194
|
+
|
195
|
+
if attributes.has_key?(:'DicomProperties')
|
196
|
+
self.dicom_properties = attributes[:'DicomProperties']
|
197
|
+
end
|
198
|
+
|
199
|
+
if attributes.has_key?(:'DngProperties')
|
200
|
+
self.dng_properties = attributes[:'DngProperties']
|
201
|
+
end
|
202
|
+
|
203
|
+
if attributes.has_key?(:'OdgProperties')
|
204
|
+
self.odg_properties = attributes[:'OdgProperties']
|
205
|
+
end
|
206
|
+
|
207
|
+
if attributes.has_key?(:'SvgProperties')
|
208
|
+
self.svg_properties = attributes[:'SvgProperties']
|
209
|
+
end
|
210
|
+
|
211
|
+
if attributes.has_key?(:'HorizontalResolution')
|
212
|
+
self.horizontal_resolution = attributes[:'HorizontalResolution']
|
213
|
+
end
|
214
|
+
|
215
|
+
if attributes.has_key?(:'VerticalResolution')
|
216
|
+
self.vertical_resolution = attributes[:'VerticalResolution']
|
217
|
+
end
|
218
|
+
|
219
|
+
if attributes.has_key?(:'IsCached')
|
220
|
+
self.is_cached = attributes[:'IsCached']
|
221
|
+
end
|
222
|
+
end
|
223
|
+
|
224
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
225
|
+
# @return Array for valid properties with the reasons
|
226
|
+
def list_invalid_properties
|
227
|
+
invalid_properties = Array.new
|
228
|
+
if @height.nil?
|
229
|
+
invalid_properties.push('invalid value for "height", height cannot be nil.')
|
230
|
+
end
|
231
|
+
|
232
|
+
if @width.nil?
|
233
|
+
invalid_properties.push('invalid value for "width", width cannot be nil.')
|
234
|
+
end
|
235
|
+
|
236
|
+
if @bits_per_pixel.nil?
|
237
|
+
invalid_properties.push('invalid value for "bits_per_pixel", bits_per_pixel cannot be nil.')
|
238
|
+
end
|
239
|
+
|
240
|
+
if @horizontal_resolution.nil?
|
241
|
+
invalid_properties.push('invalid value for "horizontal_resolution", horizontal_resolution cannot be nil.')
|
242
|
+
end
|
243
|
+
|
244
|
+
if @vertical_resolution.nil?
|
245
|
+
invalid_properties.push('invalid value for "vertical_resolution", vertical_resolution cannot be nil.')
|
246
|
+
end
|
247
|
+
|
248
|
+
if @is_cached.nil?
|
249
|
+
invalid_properties.push('invalid value for "is_cached", is_cached cannot be nil.')
|
250
|
+
end
|
251
|
+
|
252
|
+
invalid_properties
|
253
|
+
end
|
254
|
+
|
255
|
+
# Check to see if the all the properties in the model are valid
|
256
|
+
# @return true if the model is valid
|
257
|
+
def valid?
|
258
|
+
return false if @height.nil?
|
259
|
+
return false if @width.nil?
|
260
|
+
return false if @bits_per_pixel.nil?
|
261
|
+
return false if @horizontal_resolution.nil?
|
262
|
+
return false if @vertical_resolution.nil?
|
263
|
+
return false if @is_cached.nil?
|
264
|
+
true
|
265
|
+
end
|
266
|
+
|
267
|
+
# Checks equality by comparing each attribute.
|
268
|
+
# @param [Object] Object to be compared
|
269
|
+
def ==(o)
|
270
|
+
return true if self.equal?(o)
|
271
|
+
self.class == o.class &&
|
272
|
+
height == o.height &&
|
273
|
+
width == o.width &&
|
274
|
+
bits_per_pixel == o.bits_per_pixel &&
|
275
|
+
bmp_properties == o.bmp_properties &&
|
276
|
+
gif_properties == o.gif_properties &&
|
277
|
+
jpeg_properties == o.jpeg_properties &&
|
278
|
+
png_properties == o.png_properties &&
|
279
|
+
tiff_properties == o.tiff_properties &&
|
280
|
+
psd_properties == o.psd_properties &&
|
281
|
+
djvu_properties == o.djvu_properties &&
|
282
|
+
web_p_properties == o.web_p_properties &&
|
283
|
+
jpeg2000_properties == o.jpeg2000_properties &&
|
284
|
+
dicom_properties == o.dicom_properties &&
|
285
|
+
dng_properties == o.dng_properties &&
|
286
|
+
odg_properties == o.odg_properties &&
|
287
|
+
svg_properties == o.svg_properties &&
|
288
|
+
horizontal_resolution == o.horizontal_resolution &&
|
289
|
+
vertical_resolution == o.vertical_resolution &&
|
290
|
+
is_cached == o.is_cached
|
291
|
+
end
|
292
|
+
|
293
|
+
# @see the `==` method
|
294
|
+
# @param [Object] Object to be compared
|
295
|
+
def eql?(o)
|
296
|
+
self == o
|
297
|
+
end
|
298
|
+
|
299
|
+
# Calculates hash code according to all attributes.
|
300
|
+
# @return [Fixnum] Hash code
|
301
|
+
def hash
|
302
|
+
[height, width, bits_per_pixel, bmp_properties, gif_properties, jpeg_properties, png_properties, tiff_properties, psd_properties, djvu_properties, web_p_properties, jpeg2000_properties, dicom_properties, dng_properties, odg_properties, svg_properties, horizontal_resolution, vertical_resolution, is_cached].hash
|
303
|
+
end
|
304
|
+
|
305
|
+
# Builds the object from hash
|
306
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
307
|
+
# @return [Object] Returns the model itself
|
308
|
+
def build_from_hash(attributes)
|
309
|
+
return nil unless attributes.is_a?(Hash)
|
310
|
+
self.class.swagger_types.each_pair do |key, type|
|
311
|
+
attribute_key = self.class.attribute_map[key]
|
312
|
+
attribute_key = (attribute_key[0, 1].downcase + attribute_key[1..-1]).to_sym
|
313
|
+
if type =~ /\AArray<(.*)>/i
|
314
|
+
# check to ensure the input is an array given that the the attribute
|
315
|
+
# is documented as an array but the input is not
|
316
|
+
if attributes[attribute_key].is_a?(Array)
|
317
|
+
self.send("#{key}=", attributes[attribute_key].map { |v| _deserialize($1, v) })
|
318
|
+
end
|
319
|
+
elsif !attributes[attribute_key].nil?
|
320
|
+
self.send("#{key}=", _deserialize(type, attributes[attribute_key]))
|
321
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
322
|
+
end
|
323
|
+
|
324
|
+
self
|
325
|
+
end
|
326
|
+
|
327
|
+
# Deserializes the data based on type
|
328
|
+
# @param string type Data type
|
329
|
+
# @param string value Value to be deserialized
|
330
|
+
# @return [Object] Deserialized data
|
331
|
+
def _deserialize(type, value)
|
332
|
+
case type.to_sym
|
333
|
+
when :DateTime
|
334
|
+
DateTime.parse(value)
|
335
|
+
when :Date
|
336
|
+
Date.parse(value)
|
337
|
+
when :String
|
338
|
+
value.to_s
|
339
|
+
when :Integer
|
340
|
+
value.to_i
|
341
|
+
when :Float
|
342
|
+
value.to_f
|
343
|
+
when :BOOLEAN
|
344
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
345
|
+
true
|
346
|
+
else
|
347
|
+
false
|
348
|
+
end
|
349
|
+
when :Object
|
350
|
+
# generic object (usually a Hash), return directly
|
351
|
+
value
|
352
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
353
|
+
inner_type = Regexp.last_match[:inner_type]
|
354
|
+
value.map { |v| _deserialize(inner_type, v) }
|
355
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
356
|
+
k_type = Regexp.last_match[:k_type]
|
357
|
+
v_type = Regexp.last_match[:v_type]
|
358
|
+
{}.tap do |hash|
|
359
|
+
value.each do |k, v|
|
360
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
361
|
+
end
|
362
|
+
end
|
363
|
+
else # model
|
364
|
+
temp_model = AsposeImagingCloud.const_get(type).new
|
365
|
+
temp_model.build_from_hash(value)
|
366
|
+
end
|
367
|
+
end
|
368
|
+
|
369
|
+
# Returns the string representation of the object
|
370
|
+
# @return [String] String presentation of the object
|
371
|
+
def to_s
|
372
|
+
to_hash.to_s
|
373
|
+
end
|
374
|
+
|
375
|
+
# to_body is an alias to to_hash (backward compatibility)
|
376
|
+
# @return [Hash] Returns the object in the form of hash
|
377
|
+
def to_body
|
378
|
+
to_hash
|
379
|
+
end
|
380
|
+
|
381
|
+
# Returns the object in the form of hash
|
382
|
+
# @return [Hash] Returns the object in the form of hash
|
383
|
+
def to_hash
|
384
|
+
hash = {}
|
385
|
+
self.class.attribute_map.each_pair do |attr, param|
|
386
|
+
value = self.send(attr)
|
387
|
+
next if value.nil?
|
388
|
+
hash[param] = _to_hash(value)
|
389
|
+
end
|
390
|
+
hash
|
391
|
+
end
|
392
|
+
|
393
|
+
# Outputs non-array value in the form of hash
|
394
|
+
# For object, use to_hash. Otherwise, just return the value
|
395
|
+
# @param [Object] value Any valid value
|
396
|
+
# @return [Hash] Returns the value in the form of hash
|
397
|
+
def _to_hash(value)
|
398
|
+
if value.is_a?(Array)
|
399
|
+
value.compact.map { |v| _to_hash(v) }
|
400
|
+
elsif value.is_a?(Hash)
|
401
|
+
{}.tap do |hash|
|
402
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
403
|
+
end
|
404
|
+
elsif value.respond_to? :to_hash
|
405
|
+
value.to_hash
|
406
|
+
else
|
407
|
+
value
|
408
|
+
end
|
409
|
+
end
|
410
|
+
|
411
|
+
end
|
412
|
+
end
|
@@ -0,0 +1,247 @@
|
|
1
|
+
# ----------------------------------------------------------------------------
|
2
|
+
# <copyright company="Aspose" file="jfif_data.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 'date'
|
28
|
+
|
29
|
+
module AsposeImagingCloud
|
30
|
+
# Represents JFIF data.
|
31
|
+
class JfifData
|
32
|
+
# Gets or sets the density units.
|
33
|
+
attr_accessor :density_units
|
34
|
+
|
35
|
+
# Gets or sets the version.
|
36
|
+
attr_accessor :version
|
37
|
+
|
38
|
+
# Gets or sets the X density.
|
39
|
+
attr_accessor :x_density
|
40
|
+
|
41
|
+
# Gets or sets the Y density.
|
42
|
+
attr_accessor :y_density
|
43
|
+
|
44
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
45
|
+
def self.attribute_map
|
46
|
+
{
|
47
|
+
:'density_units' => :'DensityUnits',
|
48
|
+
:'version' => :'Version',
|
49
|
+
:'x_density' => :'XDensity',
|
50
|
+
:'y_density' => :'YDensity'
|
51
|
+
}
|
52
|
+
end
|
53
|
+
|
54
|
+
# Attribute type mapping.
|
55
|
+
def self.swagger_types
|
56
|
+
{
|
57
|
+
:'density_units' => :'String',
|
58
|
+
:'version' => :'Integer',
|
59
|
+
:'x_density' => :'Integer',
|
60
|
+
:'y_density' => :'Integer'
|
61
|
+
}
|
62
|
+
end
|
63
|
+
|
64
|
+
# Initializes the object
|
65
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
66
|
+
def initialize(attributes = {})
|
67
|
+
return unless attributes.is_a?(Hash)
|
68
|
+
|
69
|
+
# convert string to symbol for hash key
|
70
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
71
|
+
|
72
|
+
if attributes.has_key?(:'DensityUnits')
|
73
|
+
self.density_units = attributes[:'DensityUnits']
|
74
|
+
end
|
75
|
+
|
76
|
+
if attributes.has_key?(:'Version')
|
77
|
+
self.version = attributes[:'Version']
|
78
|
+
end
|
79
|
+
|
80
|
+
if attributes.has_key?(:'XDensity')
|
81
|
+
self.x_density = attributes[:'XDensity']
|
82
|
+
end
|
83
|
+
|
84
|
+
if attributes.has_key?(:'YDensity')
|
85
|
+
self.y_density = attributes[:'YDensity']
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
90
|
+
# @return Array for valid properties with the reasons
|
91
|
+
def list_invalid_properties
|
92
|
+
invalid_properties = Array.new
|
93
|
+
if @version.nil?
|
94
|
+
invalid_properties.push('invalid value for "version", version cannot be nil.')
|
95
|
+
end
|
96
|
+
|
97
|
+
if @x_density.nil?
|
98
|
+
invalid_properties.push('invalid value for "x_density", x_density cannot be nil.')
|
99
|
+
end
|
100
|
+
|
101
|
+
if @y_density.nil?
|
102
|
+
invalid_properties.push('invalid value for "y_density", y_density cannot be nil.')
|
103
|
+
end
|
104
|
+
|
105
|
+
invalid_properties
|
106
|
+
end
|
107
|
+
|
108
|
+
# Check to see if the all the properties in the model are valid
|
109
|
+
# @return true if the model is valid
|
110
|
+
def valid?
|
111
|
+
return false if @version.nil?
|
112
|
+
return false if @x_density.nil?
|
113
|
+
return false if @y_density.nil?
|
114
|
+
true
|
115
|
+
end
|
116
|
+
|
117
|
+
# Checks equality by comparing each attribute.
|
118
|
+
# @param [Object] Object to be compared
|
119
|
+
def ==(o)
|
120
|
+
return true if self.equal?(o)
|
121
|
+
self.class == o.class &&
|
122
|
+
density_units == o.density_units &&
|
123
|
+
version == o.version &&
|
124
|
+
x_density == o.x_density &&
|
125
|
+
y_density == o.y_density
|
126
|
+
end
|
127
|
+
|
128
|
+
# @see the `==` method
|
129
|
+
# @param [Object] Object to be compared
|
130
|
+
def eql?(o)
|
131
|
+
self == o
|
132
|
+
end
|
133
|
+
|
134
|
+
# Calculates hash code according to all attributes.
|
135
|
+
# @return [Fixnum] Hash code
|
136
|
+
def hash
|
137
|
+
[density_units, version, x_density, y_density].hash
|
138
|
+
end
|
139
|
+
|
140
|
+
# Builds the object from hash
|
141
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
142
|
+
# @return [Object] Returns the model itself
|
143
|
+
def build_from_hash(attributes)
|
144
|
+
return nil unless attributes.is_a?(Hash)
|
145
|
+
self.class.swagger_types.each_pair do |key, type|
|
146
|
+
attribute_key = self.class.attribute_map[key]
|
147
|
+
attribute_key = (attribute_key[0, 1].downcase + attribute_key[1..-1]).to_sym
|
148
|
+
if type =~ /\AArray<(.*)>/i
|
149
|
+
# check to ensure the input is an array given that the the attribute
|
150
|
+
# is documented as an array but the input is not
|
151
|
+
if attributes[attribute_key].is_a?(Array)
|
152
|
+
self.send("#{key}=", attributes[attribute_key].map { |v| _deserialize($1, v) })
|
153
|
+
end
|
154
|
+
elsif !attributes[attribute_key].nil?
|
155
|
+
self.send("#{key}=", _deserialize(type, attributes[attribute_key]))
|
156
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
157
|
+
end
|
158
|
+
|
159
|
+
self
|
160
|
+
end
|
161
|
+
|
162
|
+
# Deserializes the data based on type
|
163
|
+
# @param string type Data type
|
164
|
+
# @param string value Value to be deserialized
|
165
|
+
# @return [Object] Deserialized data
|
166
|
+
def _deserialize(type, value)
|
167
|
+
case type.to_sym
|
168
|
+
when :DateTime
|
169
|
+
DateTime.parse(value)
|
170
|
+
when :Date
|
171
|
+
Date.parse(value)
|
172
|
+
when :String
|
173
|
+
value.to_s
|
174
|
+
when :Integer
|
175
|
+
value.to_i
|
176
|
+
when :Float
|
177
|
+
value.to_f
|
178
|
+
when :BOOLEAN
|
179
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
180
|
+
true
|
181
|
+
else
|
182
|
+
false
|
183
|
+
end
|
184
|
+
when :Object
|
185
|
+
# generic object (usually a Hash), return directly
|
186
|
+
value
|
187
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
188
|
+
inner_type = Regexp.last_match[:inner_type]
|
189
|
+
value.map { |v| _deserialize(inner_type, v) }
|
190
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
191
|
+
k_type = Regexp.last_match[:k_type]
|
192
|
+
v_type = Regexp.last_match[:v_type]
|
193
|
+
{}.tap do |hash|
|
194
|
+
value.each do |k, v|
|
195
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
196
|
+
end
|
197
|
+
end
|
198
|
+
else # model
|
199
|
+
temp_model = AsposeImagingCloud.const_get(type).new
|
200
|
+
temp_model.build_from_hash(value)
|
201
|
+
end
|
202
|
+
end
|
203
|
+
|
204
|
+
# Returns the string representation of the object
|
205
|
+
# @return [String] String presentation of the object
|
206
|
+
def to_s
|
207
|
+
to_hash.to_s
|
208
|
+
end
|
209
|
+
|
210
|
+
# to_body is an alias to to_hash (backward compatibility)
|
211
|
+
# @return [Hash] Returns the object in the form of hash
|
212
|
+
def to_body
|
213
|
+
to_hash
|
214
|
+
end
|
215
|
+
|
216
|
+
# Returns the object in the form of hash
|
217
|
+
# @return [Hash] Returns the object in the form of hash
|
218
|
+
def to_hash
|
219
|
+
hash = {}
|
220
|
+
self.class.attribute_map.each_pair do |attr, param|
|
221
|
+
value = self.send(attr)
|
222
|
+
next if value.nil?
|
223
|
+
hash[param] = _to_hash(value)
|
224
|
+
end
|
225
|
+
hash
|
226
|
+
end
|
227
|
+
|
228
|
+
# Outputs non-array value in the form of hash
|
229
|
+
# For object, use to_hash. Otherwise, just return the value
|
230
|
+
# @param [Object] value Any valid value
|
231
|
+
# @return [Hash] Returns the value in the form of hash
|
232
|
+
def _to_hash(value)
|
233
|
+
if value.is_a?(Array)
|
234
|
+
value.compact.map { |v| _to_hash(v) }
|
235
|
+
elsif value.is_a?(Hash)
|
236
|
+
{}.tap do |hash|
|
237
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
238
|
+
end
|
239
|
+
elsif value.respond_to? :to_hash
|
240
|
+
value.to_hash
|
241
|
+
else
|
242
|
+
value
|
243
|
+
end
|
244
|
+
end
|
245
|
+
|
246
|
+
end
|
247
|
+
end
|