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,217 @@
1
+ # ----------------------------------------------------------------------------
2
+ # <copyright company="Aspose" file="error_details.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
+ # The error details
31
+ class ErrorDetails
32
+ # The request id
33
+ attr_accessor :request_id
34
+
35
+ # Date
36
+ attr_accessor :date
37
+
38
+ # Attribute mapping from ruby-style variable name to JSON key.
39
+ def self.attribute_map
40
+ {
41
+ :'request_id' => :'RequestId',
42
+ :'date' => :'Date'
43
+ }
44
+ end
45
+
46
+ # Attribute type mapping.
47
+ def self.swagger_types
48
+ {
49
+ :'request_id' => :'String',
50
+ :'date' => :'DateTime'
51
+ }
52
+ end
53
+
54
+ # Initializes the object
55
+ # @param [Hash] attributes Model attributes in the form of hash
56
+ def initialize(attributes = {})
57
+ return unless attributes.is_a?(Hash)
58
+
59
+ # convert string to symbol for hash key
60
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
61
+
62
+ if attributes.has_key?(:'RequestId')
63
+ self.request_id = attributes[:'RequestId']
64
+ end
65
+
66
+ if attributes.has_key?(:'Date')
67
+ self.date = attributes[:'Date']
68
+ end
69
+ end
70
+
71
+ # Show invalid properties with the reasons. Usually used together with valid?
72
+ # @return Array for valid properties with the reasons
73
+ def list_invalid_properties
74
+ invalid_properties = Array.new
75
+ if @date.nil?
76
+ invalid_properties.push('invalid value for "date", date cannot be nil.')
77
+ end
78
+
79
+ invalid_properties
80
+ end
81
+
82
+ # Check to see if the all the properties in the model are valid
83
+ # @return true if the model is valid
84
+ def valid?
85
+ return false if @date.nil?
86
+ true
87
+ end
88
+
89
+ # Checks equality by comparing each attribute.
90
+ # @param [Object] Object to be compared
91
+ def ==(o)
92
+ return true if self.equal?(o)
93
+ self.class == o.class &&
94
+ request_id == o.request_id &&
95
+ date == o.date
96
+ end
97
+
98
+ # @see the `==` method
99
+ # @param [Object] Object to be compared
100
+ def eql?(o)
101
+ self == o
102
+ end
103
+
104
+ # Calculates hash code according to all attributes.
105
+ # @return [Fixnum] Hash code
106
+ def hash
107
+ [request_id, date].hash
108
+ end
109
+
110
+ # Builds the object from hash
111
+ # @param [Hash] attributes Model attributes in the form of hash
112
+ # @return [Object] Returns the model itself
113
+ def build_from_hash(attributes)
114
+ return nil unless attributes.is_a?(Hash)
115
+ self.class.swagger_types.each_pair do |key, type|
116
+ attribute_key = self.class.attribute_map[key]
117
+ attribute_key = (attribute_key[0, 1].downcase + attribute_key[1..-1]).to_sym
118
+ if type =~ /\AArray<(.*)>/i
119
+ # check to ensure the input is an array given that the the attribute
120
+ # is documented as an array but the input is not
121
+ if attributes[attribute_key].is_a?(Array)
122
+ self.send("#{key}=", attributes[attribute_key].map { |v| _deserialize($1, v) })
123
+ end
124
+ elsif !attributes[attribute_key].nil?
125
+ self.send("#{key}=", _deserialize(type, attributes[attribute_key]))
126
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
127
+ end
128
+
129
+ self
130
+ end
131
+
132
+ # Deserializes the data based on type
133
+ # @param string type Data type
134
+ # @param string value Value to be deserialized
135
+ # @return [Object] Deserialized data
136
+ def _deserialize(type, value)
137
+ case type.to_sym
138
+ when :DateTime
139
+ DateTime.parse(value)
140
+ when :Date
141
+ Date.parse(value)
142
+ when :String
143
+ value.to_s
144
+ when :Integer
145
+ value.to_i
146
+ when :Float
147
+ value.to_f
148
+ when :BOOLEAN
149
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
150
+ true
151
+ else
152
+ false
153
+ end
154
+ when :Object
155
+ # generic object (usually a Hash), return directly
156
+ value
157
+ when /\AArray<(?<inner_type>.+)>\z/
158
+ inner_type = Regexp.last_match[:inner_type]
159
+ value.map { |v| _deserialize(inner_type, v) }
160
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
161
+ k_type = Regexp.last_match[:k_type]
162
+ v_type = Regexp.last_match[:v_type]
163
+ {}.tap do |hash|
164
+ value.each do |k, v|
165
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
166
+ end
167
+ end
168
+ else # model
169
+ temp_model = AsposeImagingCloud.const_get(type).new
170
+ temp_model.build_from_hash(value)
171
+ end
172
+ end
173
+
174
+ # Returns the string representation of the object
175
+ # @return [String] String presentation of the object
176
+ def to_s
177
+ to_hash.to_s
178
+ end
179
+
180
+ # to_body is an alias to to_hash (backward compatibility)
181
+ # @return [Hash] Returns the object in the form of hash
182
+ def to_body
183
+ to_hash
184
+ end
185
+
186
+ # Returns the object in the form of hash
187
+ # @return [Hash] Returns the object in the form of hash
188
+ def to_hash
189
+ hash = {}
190
+ self.class.attribute_map.each_pair do |attr, param|
191
+ value = self.send(attr)
192
+ next if value.nil?
193
+ hash[param] = _to_hash(value)
194
+ end
195
+ hash
196
+ end
197
+
198
+ # Outputs non-array value in the form of hash
199
+ # For object, use to_hash. Otherwise, just return the value
200
+ # @param [Object] value Any valid value
201
+ # @return [Hash] Returns the value in the form of hash
202
+ def _to_hash(value)
203
+ if value.is_a?(Array)
204
+ value.compact.map { |v| _to_hash(v) }
205
+ elsif value.is_a?(Hash)
206
+ {}.tap do |hash|
207
+ value.each { |k, v| hash[k] = _to_hash(v) }
208
+ end
209
+ elsif value.respond_to? :to_hash
210
+ value.to_hash
211
+ else
212
+ value
213
+ end
214
+ end
215
+
216
+ end
217
+ end
@@ -0,0 +1,1560 @@
1
+ # ----------------------------------------------------------------------------
2
+ # <copyright company="Aspose" file="exif_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 common EXIF data section.
31
+ class ExifData
32
+ # Gets or sets the aperture.
33
+ attr_accessor :aperture_value
34
+
35
+ # Gets or sets the body serial number.
36
+ attr_accessor :body_serial_number
37
+
38
+ # Gets or sets the brightness.
39
+ attr_accessor :brightness_value
40
+
41
+ # Gets or sets the CFA pattern.
42
+ attr_accessor :cfa_pattern
43
+
44
+ # Gets or sets the camera owner name.
45
+ attr_accessor :camera_owner_name
46
+
47
+ # Gets or sets the color space.
48
+ attr_accessor :color_space
49
+
50
+ # Gets or sets the components configuration.
51
+ attr_accessor :components_configuration
52
+
53
+ # Gets or sets the compressed bits per pixel.
54
+ attr_accessor :compressed_bits_per_pixel
55
+
56
+ # Gets or sets the contrast.
57
+ attr_accessor :contrast
58
+
59
+ # Gets or sets the value indincating if custom rendering is performed.
60
+ attr_accessor :custom_rendered
61
+
62
+ # Gets or sets date and time when image was digitized.
63
+ attr_accessor :date_time_digitized
64
+
65
+ # Gets or sets date and time of the original image.
66
+ attr_accessor :date_time_original
67
+
68
+ # Gets or sets the device setting description.
69
+ attr_accessor :device_setting_description
70
+
71
+ # Gets or sets the digital zoom ratio.
72
+ attr_accessor :digital_zoom_ratio
73
+
74
+ # Gets or sets EXIF version.
75
+ attr_accessor :exif_version
76
+
77
+ # Gets or sets the exposure bias.
78
+ attr_accessor :exposure_bias_value
79
+
80
+ # Gets or sets the exposure index.
81
+ attr_accessor :exposure_index
82
+
83
+ # Gets or sets the exposure mode.
84
+ attr_accessor :exposure_mode
85
+
86
+ # Gets or sets the exposure program.
87
+ attr_accessor :exposure_program
88
+
89
+ # Gets or sets the exposure time.
90
+ attr_accessor :exposure_time
91
+
92
+ # Gets or sets the focal number.
93
+ attr_accessor :f_number
94
+
95
+ # Gets or sets the file source.
96
+ attr_accessor :file_source
97
+
98
+ # Gets or sets the flash.
99
+ attr_accessor :flash
100
+
101
+ # Gets or sets the flash energy.
102
+ attr_accessor :flash_energy
103
+
104
+ # Gets or sets the Flashpix version.
105
+ attr_accessor :flashpix_version
106
+
107
+ # Gets or sets the focal length.
108
+ attr_accessor :focal_length
109
+
110
+ # Gets or sets the focal length in 35mm film.
111
+ attr_accessor :focal_length_in35_mm_film
112
+
113
+ # Gets or sets the focal plane resolution unit.
114
+ attr_accessor :focal_plane_resolution_unit
115
+
116
+ # Gets or sets the focal plane X resolution.
117
+ attr_accessor :focal_plane_x_resolution
118
+
119
+ # Gets or sets the focal plane Y resolution.
120
+ attr_accessor :focal_plane_y_resolution
121
+
122
+ # Gets or sets the GPS altitude.
123
+ attr_accessor :gps_altitude
124
+
125
+ # Gets or sets the GPS altitude reference (if it's above or below sea level).
126
+ attr_accessor :gps_altitude_ref
127
+
128
+ # Gets or sets the GPS area information.
129
+ attr_accessor :gps_area_information
130
+
131
+ # Gets or sets the GPS DOP (data degree of precision).
132
+ attr_accessor :gpsdop
133
+
134
+ # Gets or sets the GPS bearing of the destination.
135
+ attr_accessor :gps_dest_bearing
136
+
137
+ # Gets or sets the GPS reference unit for bearing of the destination.
138
+ attr_accessor :gps_dest_bearing_ref
139
+
140
+ # Gets or sets the GPS destination distance.
141
+ attr_accessor :gps_dest_distance
142
+
143
+ # Gets or sets the GPS reference unit for destination distance.
144
+ attr_accessor :gps_dest_distance_ref
145
+
146
+ # Gets or sets the GPS destination latitude.
147
+ attr_accessor :gps_dest_latitude
148
+
149
+ # Gets or sets the GPS reference destination latitude (north or south).
150
+ attr_accessor :gps_dest_latitude_ref
151
+
152
+ # Gets or sets the GPS destination longtitude.
153
+ attr_accessor :gps_dest_longitude
154
+
155
+ # Gets or sets the GPS reference destination longtitude (east or west).
156
+ attr_accessor :gps_dest_longitude_ref
157
+
158
+ # Gets or sets the GPS differential.
159
+ attr_accessor :gps_differential
160
+
161
+ # Gets or sets the GPS image direction.
162
+ attr_accessor :gps_img_direction
163
+
164
+ # Gets or sets the GPS reference image direction.
165
+ attr_accessor :gps_img_direction_ref
166
+
167
+ # Gets or sets the GPS date stamp.
168
+ attr_accessor :gps_date_stamp
169
+
170
+ # Gets or sets the GPS latitude.
171
+ attr_accessor :gps_latitude
172
+
173
+ # Gets or sets the GPS latitude reference (north or south).
174
+ attr_accessor :gps_latitude_ref
175
+
176
+ # Gets or sets the GPS longitude.
177
+ attr_accessor :gps_longitude
178
+
179
+ # Gets or sets the GPS longitude reference (east or west).
180
+ attr_accessor :gps_longitude_ref
181
+
182
+ # Gets or sets the geodetic survey data used by the GPS receiver.
183
+ attr_accessor :gps_map_datum
184
+
185
+ # Gets or sets the GPS measure mode.
186
+ attr_accessor :gps_measure_mode
187
+
188
+ # Gets or setsthe GPS processing method.
189
+ attr_accessor :gps_processing_method
190
+
191
+ # Gets or sets the GPS satellites info.
192
+ attr_accessor :gps_satellites
193
+
194
+ # Gets or sets the GPS speed.
195
+ attr_accessor :gps_speed
196
+
197
+ # Gets or sets the GPS speed reference unit.
198
+ attr_accessor :gps_speed_ref
199
+
200
+ # Gets or sets the GPS status.
201
+ attr_accessor :gps_status
202
+
203
+ # Gets or sets the GPS times tamp.
204
+ attr_accessor :gps_timestamp
205
+
206
+ # Gets or sets the GPS track.
207
+ attr_accessor :gps_track
208
+
209
+ # Gets or sets the GPS track reference.
210
+ attr_accessor :gps_track_ref
211
+
212
+ # Gets or sets the GPS version ID.
213
+ attr_accessor :gps_version_id
214
+
215
+ # Gets or sets the gain control.
216
+ attr_accessor :gain_control
217
+
218
+ # Gets or sets the gamma.
219
+ attr_accessor :gamma
220
+
221
+ # Gets or sets the ISO speed.
222
+ attr_accessor :iso_speed
223
+
224
+ # Gets or sets the ISO speed latitude YYY value.
225
+ attr_accessor :iso_speed_latitude_yyy
226
+
227
+ # Gets or sets the ISO speed latitude ZZZ value.
228
+ attr_accessor :iso_speed_latitude_zzz
229
+
230
+ # Gets or sets the photographic sensitivity.
231
+ attr_accessor :photographic_sensitivity
232
+
233
+ # Gets or sets the image unique ID.
234
+ attr_accessor :image_unique_id
235
+
236
+ # Gets or sets the lens manufacturer.
237
+ attr_accessor :lens_make
238
+
239
+ # Gets or sets the lens model.
240
+ attr_accessor :lens_model
241
+
242
+ # Gets or sets the lens serial number.
243
+ attr_accessor :lens_serial_number
244
+
245
+ # Gets or sets the lens specification.
246
+ attr_accessor :lens_specification
247
+
248
+ # Gets or sets the light source.
249
+ attr_accessor :light_source
250
+
251
+ # Gets or sets the maker note raw data.
252
+ attr_accessor :maker_note_raw_data
253
+
254
+ # Gets or sets the max aperture.
255
+ attr_accessor :max_aperture_value
256
+
257
+ # Gets or sets the metering mode.
258
+ attr_accessor :metering_mode
259
+
260
+ # Gets or sets the OECF (Opto-Electric Conversion Function).
261
+ attr_accessor :oecf
262
+
263
+ # Gets or sets the pixel X dimension.
264
+ attr_accessor :pixel_x_dimension
265
+
266
+ # Gets or sets the pixel Y dimension.
267
+ attr_accessor :pixel_y_dimension
268
+
269
+ # Gets or sets the recommended exposure index.
270
+ attr_accessor :recommended_exposure_index
271
+
272
+ # Gets or sets the related sound file.
273
+ attr_accessor :related_sound_file
274
+
275
+ # Gets or sets the saturation.
276
+ attr_accessor :saturation
277
+
278
+ # Gets or sets the scene capture type.
279
+ attr_accessor :scene_capture_type
280
+
281
+ # Gets or sets the scene type.
282
+ attr_accessor :scene_type
283
+
284
+ # Gets or sets the sensing method.
285
+ attr_accessor :sensing_method
286
+
287
+ # Gets or sets the sensitivity type.
288
+ attr_accessor :sensitivity_type
289
+
290
+ # Gets or sets the sharpness.
291
+ attr_accessor :sharpness
292
+
293
+ # Gets or sets the shutter speed.
294
+ attr_accessor :shutter_speed_value
295
+
296
+ # Gets or sets the spatial frequency response.
297
+ attr_accessor :spatial_frequency_response
298
+
299
+ # Gets or sets the spectral sensitivity.
300
+ attr_accessor :spectral_sensitivity
301
+
302
+ # Gets or sets the standard output sensitivity.
303
+ attr_accessor :standard_output_sensitivity
304
+
305
+ # Gets or sets the subject area.
306
+ attr_accessor :subject_area
307
+
308
+ # Gets or sets the subject distance.
309
+ attr_accessor :subject_distance
310
+
311
+ # Gets or sets the subject distance range.
312
+ attr_accessor :subject_distance_range
313
+
314
+ # Gets or sets the subject location.
315
+ attr_accessor :subject_location
316
+
317
+ # Gets or sets the fractions of seconds for the DateTime tag.
318
+ attr_accessor :subsec_time
319
+
320
+ # Gets or sets the fractions of seconds for the DateTimeDigitized tag.
321
+ attr_accessor :subsec_time_digitized
322
+
323
+ # Gets or sets the fractions of seconds for the DateTimeOriginal tag.
324
+ attr_accessor :subsec_time_original
325
+
326
+ # Gets or sets the user comment.
327
+ attr_accessor :user_comment
328
+
329
+ # Gets or sets the white balance.
330
+ attr_accessor :white_balance
331
+
332
+ # Gets or sets the white point.
333
+ attr_accessor :white_point
334
+
335
+ # Attribute mapping from ruby-style variable name to JSON key.
336
+ def self.attribute_map
337
+ {
338
+ :'aperture_value' => :'ApertureValue',
339
+ :'body_serial_number' => :'BodySerialNumber',
340
+ :'brightness_value' => :'BrightnessValue',
341
+ :'cfa_pattern' => :'CFAPattern',
342
+ :'camera_owner_name' => :'CameraOwnerName',
343
+ :'color_space' => :'ColorSpace',
344
+ :'components_configuration' => :'ComponentsConfiguration',
345
+ :'compressed_bits_per_pixel' => :'CompressedBitsPerPixel',
346
+ :'contrast' => :'Contrast',
347
+ :'custom_rendered' => :'CustomRendered',
348
+ :'date_time_digitized' => :'DateTimeDigitized',
349
+ :'date_time_original' => :'DateTimeOriginal',
350
+ :'device_setting_description' => :'DeviceSettingDescription',
351
+ :'digital_zoom_ratio' => :'DigitalZoomRatio',
352
+ :'exif_version' => :'ExifVersion',
353
+ :'exposure_bias_value' => :'ExposureBiasValue',
354
+ :'exposure_index' => :'ExposureIndex',
355
+ :'exposure_mode' => :'ExposureMode',
356
+ :'exposure_program' => :'ExposureProgram',
357
+ :'exposure_time' => :'ExposureTime',
358
+ :'f_number' => :'FNumber',
359
+ :'file_source' => :'FileSource',
360
+ :'flash' => :'Flash',
361
+ :'flash_energy' => :'FlashEnergy',
362
+ :'flashpix_version' => :'FlashpixVersion',
363
+ :'focal_length' => :'FocalLength',
364
+ :'focal_length_in35_mm_film' => :'FocalLengthIn35MmFilm',
365
+ :'focal_plane_resolution_unit' => :'FocalPlaneResolutionUnit',
366
+ :'focal_plane_x_resolution' => :'FocalPlaneXResolution',
367
+ :'focal_plane_y_resolution' => :'FocalPlaneYResolution',
368
+ :'gps_altitude' => :'GPSAltitude',
369
+ :'gps_altitude_ref' => :'GPSAltitudeRef',
370
+ :'gps_area_information' => :'GPSAreaInformation',
371
+ :'gpsdop' => :'GPSDOP',
372
+ :'gps_dest_bearing' => :'GPSDestBearing',
373
+ :'gps_dest_bearing_ref' => :'GPSDestBearingRef',
374
+ :'gps_dest_distance' => :'GPSDestDistance',
375
+ :'gps_dest_distance_ref' => :'GPSDestDistanceRef',
376
+ :'gps_dest_latitude' => :'GPSDestLatitude',
377
+ :'gps_dest_latitude_ref' => :'GPSDestLatitudeRef',
378
+ :'gps_dest_longitude' => :'GPSDestLongitude',
379
+ :'gps_dest_longitude_ref' => :'GPSDestLongitudeRef',
380
+ :'gps_differential' => :'GPSDifferential',
381
+ :'gps_img_direction' => :'GPSImgDirection',
382
+ :'gps_img_direction_ref' => :'GPSImgDirectionRef',
383
+ :'gps_date_stamp' => :'GPSDateStamp',
384
+ :'gps_latitude' => :'GPSLatitude',
385
+ :'gps_latitude_ref' => :'GPSLatitudeRef',
386
+ :'gps_longitude' => :'GPSLongitude',
387
+ :'gps_longitude_ref' => :'GPSLongitudeRef',
388
+ :'gps_map_datum' => :'GPSMapDatum',
389
+ :'gps_measure_mode' => :'GPSMeasureMode',
390
+ :'gps_processing_method' => :'GPSProcessingMethod',
391
+ :'gps_satellites' => :'GPSSatellites',
392
+ :'gps_speed' => :'GPSSpeed',
393
+ :'gps_speed_ref' => :'GPSSpeedRef',
394
+ :'gps_status' => :'GPSStatus',
395
+ :'gps_timestamp' => :'GPSTimestamp',
396
+ :'gps_track' => :'GPSTrack',
397
+ :'gps_track_ref' => :'GPSTrackRef',
398
+ :'gps_version_id' => :'GPSVersionID',
399
+ :'gain_control' => :'GainControl',
400
+ :'gamma' => :'Gamma',
401
+ :'iso_speed' => :'ISOSpeed',
402
+ :'iso_speed_latitude_yyy' => :'ISOSpeedLatitudeYYY',
403
+ :'iso_speed_latitude_zzz' => :'ISOSpeedLatitudeZZZ',
404
+ :'photographic_sensitivity' => :'PhotographicSensitivity',
405
+ :'image_unique_id' => :'ImageUniqueID',
406
+ :'lens_make' => :'LensMake',
407
+ :'lens_model' => :'LensModel',
408
+ :'lens_serial_number' => :'LensSerialNumber',
409
+ :'lens_specification' => :'LensSpecification',
410
+ :'light_source' => :'LightSource',
411
+ :'maker_note_raw_data' => :'MakerNoteRawData',
412
+ :'max_aperture_value' => :'MaxApertureValue',
413
+ :'metering_mode' => :'MeteringMode',
414
+ :'oecf' => :'OECF',
415
+ :'pixel_x_dimension' => :'PixelXDimension',
416
+ :'pixel_y_dimension' => :'PixelYDimension',
417
+ :'recommended_exposure_index' => :'RecommendedExposureIndex',
418
+ :'related_sound_file' => :'RelatedSoundFile',
419
+ :'saturation' => :'Saturation',
420
+ :'scene_capture_type' => :'SceneCaptureType',
421
+ :'scene_type' => :'SceneType',
422
+ :'sensing_method' => :'SensingMethod',
423
+ :'sensitivity_type' => :'SensitivityType',
424
+ :'sharpness' => :'Sharpness',
425
+ :'shutter_speed_value' => :'ShutterSpeedValue',
426
+ :'spatial_frequency_response' => :'SpatialFrequencyResponse',
427
+ :'spectral_sensitivity' => :'SpectralSensitivity',
428
+ :'standard_output_sensitivity' => :'StandardOutputSensitivity',
429
+ :'subject_area' => :'SubjectArea',
430
+ :'subject_distance' => :'SubjectDistance',
431
+ :'subject_distance_range' => :'SubjectDistanceRange',
432
+ :'subject_location' => :'SubjectLocation',
433
+ :'subsec_time' => :'SubsecTime',
434
+ :'subsec_time_digitized' => :'SubsecTimeDigitized',
435
+ :'subsec_time_original' => :'SubsecTimeOriginal',
436
+ :'user_comment' => :'UserComment',
437
+ :'white_balance' => :'WhiteBalance',
438
+ :'white_point' => :'WhitePoint'
439
+ }
440
+ end
441
+
442
+ # Attribute type mapping.
443
+ def self.swagger_types
444
+ {
445
+ :'aperture_value' => :'Float',
446
+ :'body_serial_number' => :'String',
447
+ :'brightness_value' => :'Float',
448
+ :'cfa_pattern' => :'String',
449
+ :'camera_owner_name' => :'String',
450
+ :'color_space' => :'String',
451
+ :'components_configuration' => :'String',
452
+ :'compressed_bits_per_pixel' => :'Float',
453
+ :'contrast' => :'String',
454
+ :'custom_rendered' => :'String',
455
+ :'date_time_digitized' => :'String',
456
+ :'date_time_original' => :'String',
457
+ :'device_setting_description' => :'String',
458
+ :'digital_zoom_ratio' => :'Float',
459
+ :'exif_version' => :'String',
460
+ :'exposure_bias_value' => :'Float',
461
+ :'exposure_index' => :'Float',
462
+ :'exposure_mode' => :'String',
463
+ :'exposure_program' => :'String',
464
+ :'exposure_time' => :'Float',
465
+ :'f_number' => :'Float',
466
+ :'file_source' => :'String',
467
+ :'flash' => :'String',
468
+ :'flash_energy' => :'Float',
469
+ :'flashpix_version' => :'String',
470
+ :'focal_length' => :'Float',
471
+ :'focal_length_in35_mm_film' => :'Integer',
472
+ :'focal_plane_resolution_unit' => :'String',
473
+ :'focal_plane_x_resolution' => :'Float',
474
+ :'focal_plane_y_resolution' => :'Float',
475
+ :'gps_altitude' => :'Float',
476
+ :'gps_altitude_ref' => :'String',
477
+ :'gps_area_information' => :'String',
478
+ :'gpsdop' => :'Float',
479
+ :'gps_dest_bearing' => :'Float',
480
+ :'gps_dest_bearing_ref' => :'String',
481
+ :'gps_dest_distance' => :'Float',
482
+ :'gps_dest_distance_ref' => :'String',
483
+ :'gps_dest_latitude' => :'Array<Float>',
484
+ :'gps_dest_latitude_ref' => :'String',
485
+ :'gps_dest_longitude' => :'Array<Float>',
486
+ :'gps_dest_longitude_ref' => :'String',
487
+ :'gps_differential' => :'Integer',
488
+ :'gps_img_direction' => :'Float',
489
+ :'gps_img_direction_ref' => :'String',
490
+ :'gps_date_stamp' => :'String',
491
+ :'gps_latitude' => :'Array<Float>',
492
+ :'gps_latitude_ref' => :'String',
493
+ :'gps_longitude' => :'Array<Float>',
494
+ :'gps_longitude_ref' => :'String',
495
+ :'gps_map_datum' => :'String',
496
+ :'gps_measure_mode' => :'String',
497
+ :'gps_processing_method' => :'String',
498
+ :'gps_satellites' => :'String',
499
+ :'gps_speed' => :'Float',
500
+ :'gps_speed_ref' => :'String',
501
+ :'gps_status' => :'String',
502
+ :'gps_timestamp' => :'Array<Float>',
503
+ :'gps_track' => :'String',
504
+ :'gps_track_ref' => :'String',
505
+ :'gps_version_id' => :'String',
506
+ :'gain_control' => :'String',
507
+ :'gamma' => :'Float',
508
+ :'iso_speed' => :'Integer',
509
+ :'iso_speed_latitude_yyy' => :'Integer',
510
+ :'iso_speed_latitude_zzz' => :'Integer',
511
+ :'photographic_sensitivity' => :'Integer',
512
+ :'image_unique_id' => :'String',
513
+ :'lens_make' => :'String',
514
+ :'lens_model' => :'String',
515
+ :'lens_serial_number' => :'String',
516
+ :'lens_specification' => :'Array<Float>',
517
+ :'light_source' => :'String',
518
+ :'maker_note_raw_data' => :'String',
519
+ :'max_aperture_value' => :'Float',
520
+ :'metering_mode' => :'String',
521
+ :'oecf' => :'String',
522
+ :'pixel_x_dimension' => :'Integer',
523
+ :'pixel_y_dimension' => :'Integer',
524
+ :'recommended_exposure_index' => :'Integer',
525
+ :'related_sound_file' => :'String',
526
+ :'saturation' => :'String',
527
+ :'scene_capture_type' => :'String',
528
+ :'scene_type' => :'Integer',
529
+ :'sensing_method' => :'String',
530
+ :'sensitivity_type' => :'Integer',
531
+ :'sharpness' => :'Integer',
532
+ :'shutter_speed_value' => :'Float',
533
+ :'spatial_frequency_response' => :'String',
534
+ :'spectral_sensitivity' => :'String',
535
+ :'standard_output_sensitivity' => :'Integer',
536
+ :'subject_area' => :'Array<Integer>',
537
+ :'subject_distance' => :'Float',
538
+ :'subject_distance_range' => :'String',
539
+ :'subject_location' => :'Array<Integer>',
540
+ :'subsec_time' => :'String',
541
+ :'subsec_time_digitized' => :'String',
542
+ :'subsec_time_original' => :'String',
543
+ :'user_comment' => :'String',
544
+ :'white_balance' => :'String',
545
+ :'white_point' => :'Array<Float>'
546
+ }
547
+ end
548
+
549
+ # Initializes the object
550
+ # @param [Hash] attributes Model attributes in the form of hash
551
+ def initialize(attributes = {})
552
+ return unless attributes.is_a?(Hash)
553
+
554
+ # convert string to symbol for hash key
555
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
556
+
557
+ if attributes.has_key?(:'ApertureValue')
558
+ self.aperture_value = attributes[:'ApertureValue']
559
+ end
560
+
561
+ if attributes.has_key?(:'BodySerialNumber')
562
+ self.body_serial_number = attributes[:'BodySerialNumber']
563
+ end
564
+
565
+ if attributes.has_key?(:'BrightnessValue')
566
+ self.brightness_value = attributes[:'BrightnessValue']
567
+ end
568
+
569
+ if attributes.has_key?(:'CFAPattern')
570
+ self.cfa_pattern = attributes[:'CFAPattern']
571
+ end
572
+
573
+ if attributes.has_key?(:'CameraOwnerName')
574
+ self.camera_owner_name = attributes[:'CameraOwnerName']
575
+ end
576
+
577
+ if attributes.has_key?(:'ColorSpace')
578
+ self.color_space = attributes[:'ColorSpace']
579
+ end
580
+
581
+ if attributes.has_key?(:'ComponentsConfiguration')
582
+ self.components_configuration = attributes[:'ComponentsConfiguration']
583
+ end
584
+
585
+ if attributes.has_key?(:'CompressedBitsPerPixel')
586
+ self.compressed_bits_per_pixel = attributes[:'CompressedBitsPerPixel']
587
+ end
588
+
589
+ if attributes.has_key?(:'Contrast')
590
+ self.contrast = attributes[:'Contrast']
591
+ end
592
+
593
+ if attributes.has_key?(:'CustomRendered')
594
+ self.custom_rendered = attributes[:'CustomRendered']
595
+ end
596
+
597
+ if attributes.has_key?(:'DateTimeDigitized')
598
+ self.date_time_digitized = attributes[:'DateTimeDigitized']
599
+ end
600
+
601
+ if attributes.has_key?(:'DateTimeOriginal')
602
+ self.date_time_original = attributes[:'DateTimeOriginal']
603
+ end
604
+
605
+ if attributes.has_key?(:'DeviceSettingDescription')
606
+ self.device_setting_description = attributes[:'DeviceSettingDescription']
607
+ end
608
+
609
+ if attributes.has_key?(:'DigitalZoomRatio')
610
+ self.digital_zoom_ratio = attributes[:'DigitalZoomRatio']
611
+ end
612
+
613
+ if attributes.has_key?(:'ExifVersion')
614
+ self.exif_version = attributes[:'ExifVersion']
615
+ end
616
+
617
+ if attributes.has_key?(:'ExposureBiasValue')
618
+ self.exposure_bias_value = attributes[:'ExposureBiasValue']
619
+ end
620
+
621
+ if attributes.has_key?(:'ExposureIndex')
622
+ self.exposure_index = attributes[:'ExposureIndex']
623
+ end
624
+
625
+ if attributes.has_key?(:'ExposureMode')
626
+ self.exposure_mode = attributes[:'ExposureMode']
627
+ end
628
+
629
+ if attributes.has_key?(:'ExposureProgram')
630
+ self.exposure_program = attributes[:'ExposureProgram']
631
+ end
632
+
633
+ if attributes.has_key?(:'ExposureTime')
634
+ self.exposure_time = attributes[:'ExposureTime']
635
+ end
636
+
637
+ if attributes.has_key?(:'FNumber')
638
+ self.f_number = attributes[:'FNumber']
639
+ end
640
+
641
+ if attributes.has_key?(:'FileSource')
642
+ self.file_source = attributes[:'FileSource']
643
+ end
644
+
645
+ if attributes.has_key?(:'Flash')
646
+ self.flash = attributes[:'Flash']
647
+ end
648
+
649
+ if attributes.has_key?(:'FlashEnergy')
650
+ self.flash_energy = attributes[:'FlashEnergy']
651
+ end
652
+
653
+ if attributes.has_key?(:'FlashpixVersion')
654
+ self.flashpix_version = attributes[:'FlashpixVersion']
655
+ end
656
+
657
+ if attributes.has_key?(:'FocalLength')
658
+ self.focal_length = attributes[:'FocalLength']
659
+ end
660
+
661
+ if attributes.has_key?(:'FocalLengthIn35MmFilm')
662
+ self.focal_length_in35_mm_film = attributes[:'FocalLengthIn35MmFilm']
663
+ end
664
+
665
+ if attributes.has_key?(:'FocalPlaneResolutionUnit')
666
+ self.focal_plane_resolution_unit = attributes[:'FocalPlaneResolutionUnit']
667
+ end
668
+
669
+ if attributes.has_key?(:'FocalPlaneXResolution')
670
+ self.focal_plane_x_resolution = attributes[:'FocalPlaneXResolution']
671
+ end
672
+
673
+ if attributes.has_key?(:'FocalPlaneYResolution')
674
+ self.focal_plane_y_resolution = attributes[:'FocalPlaneYResolution']
675
+ end
676
+
677
+ if attributes.has_key?(:'GPSAltitude')
678
+ self.gps_altitude = attributes[:'GPSAltitude']
679
+ end
680
+
681
+ if attributes.has_key?(:'GPSAltitudeRef')
682
+ self.gps_altitude_ref = attributes[:'GPSAltitudeRef']
683
+ end
684
+
685
+ if attributes.has_key?(:'GPSAreaInformation')
686
+ self.gps_area_information = attributes[:'GPSAreaInformation']
687
+ end
688
+
689
+ if attributes.has_key?(:'GPSDOP')
690
+ self.gpsdop = attributes[:'GPSDOP']
691
+ end
692
+
693
+ if attributes.has_key?(:'GPSDestBearing')
694
+ self.gps_dest_bearing = attributes[:'GPSDestBearing']
695
+ end
696
+
697
+ if attributes.has_key?(:'GPSDestBearingRef')
698
+ self.gps_dest_bearing_ref = attributes[:'GPSDestBearingRef']
699
+ end
700
+
701
+ if attributes.has_key?(:'GPSDestDistance')
702
+ self.gps_dest_distance = attributes[:'GPSDestDistance']
703
+ end
704
+
705
+ if attributes.has_key?(:'GPSDestDistanceRef')
706
+ self.gps_dest_distance_ref = attributes[:'GPSDestDistanceRef']
707
+ end
708
+
709
+ if attributes.has_key?(:'GPSDestLatitude')
710
+ if (value = attributes[:'GPSDestLatitude']).is_a?(Array)
711
+ self.gps_dest_latitude = value
712
+ end
713
+ end
714
+
715
+ if attributes.has_key?(:'GPSDestLatitudeRef')
716
+ self.gps_dest_latitude_ref = attributes[:'GPSDestLatitudeRef']
717
+ end
718
+
719
+ if attributes.has_key?(:'GPSDestLongitude')
720
+ if (value = attributes[:'GPSDestLongitude']).is_a?(Array)
721
+ self.gps_dest_longitude = value
722
+ end
723
+ end
724
+
725
+ if attributes.has_key?(:'GPSDestLongitudeRef')
726
+ self.gps_dest_longitude_ref = attributes[:'GPSDestLongitudeRef']
727
+ end
728
+
729
+ if attributes.has_key?(:'GPSDifferential')
730
+ self.gps_differential = attributes[:'GPSDifferential']
731
+ end
732
+
733
+ if attributes.has_key?(:'GPSImgDirection')
734
+ self.gps_img_direction = attributes[:'GPSImgDirection']
735
+ end
736
+
737
+ if attributes.has_key?(:'GPSImgDirectionRef')
738
+ self.gps_img_direction_ref = attributes[:'GPSImgDirectionRef']
739
+ end
740
+
741
+ if attributes.has_key?(:'GPSDateStamp')
742
+ self.gps_date_stamp = attributes[:'GPSDateStamp']
743
+ end
744
+
745
+ if attributes.has_key?(:'GPSLatitude')
746
+ if (value = attributes[:'GPSLatitude']).is_a?(Array)
747
+ self.gps_latitude = value
748
+ end
749
+ end
750
+
751
+ if attributes.has_key?(:'GPSLatitudeRef')
752
+ self.gps_latitude_ref = attributes[:'GPSLatitudeRef']
753
+ end
754
+
755
+ if attributes.has_key?(:'GPSLongitude')
756
+ if (value = attributes[:'GPSLongitude']).is_a?(Array)
757
+ self.gps_longitude = value
758
+ end
759
+ end
760
+
761
+ if attributes.has_key?(:'GPSLongitudeRef')
762
+ self.gps_longitude_ref = attributes[:'GPSLongitudeRef']
763
+ end
764
+
765
+ if attributes.has_key?(:'GPSMapDatum')
766
+ self.gps_map_datum = attributes[:'GPSMapDatum']
767
+ end
768
+
769
+ if attributes.has_key?(:'GPSMeasureMode')
770
+ self.gps_measure_mode = attributes[:'GPSMeasureMode']
771
+ end
772
+
773
+ if attributes.has_key?(:'GPSProcessingMethod')
774
+ self.gps_processing_method = attributes[:'GPSProcessingMethod']
775
+ end
776
+
777
+ if attributes.has_key?(:'GPSSatellites')
778
+ self.gps_satellites = attributes[:'GPSSatellites']
779
+ end
780
+
781
+ if attributes.has_key?(:'GPSSpeed')
782
+ self.gps_speed = attributes[:'GPSSpeed']
783
+ end
784
+
785
+ if attributes.has_key?(:'GPSSpeedRef')
786
+ self.gps_speed_ref = attributes[:'GPSSpeedRef']
787
+ end
788
+
789
+ if attributes.has_key?(:'GPSStatus')
790
+ self.gps_status = attributes[:'GPSStatus']
791
+ end
792
+
793
+ if attributes.has_key?(:'GPSTimestamp')
794
+ if (value = attributes[:'GPSTimestamp']).is_a?(Array)
795
+ self.gps_timestamp = value
796
+ end
797
+ end
798
+
799
+ if attributes.has_key?(:'GPSTrack')
800
+ self.gps_track = attributes[:'GPSTrack']
801
+ end
802
+
803
+ if attributes.has_key?(:'GPSTrackRef')
804
+ self.gps_track_ref = attributes[:'GPSTrackRef']
805
+ end
806
+
807
+ if attributes.has_key?(:'GPSVersionID')
808
+ self.gps_version_id = attributes[:'GPSVersionID']
809
+ end
810
+
811
+ if attributes.has_key?(:'GainControl')
812
+ self.gain_control = attributes[:'GainControl']
813
+ end
814
+
815
+ if attributes.has_key?(:'Gamma')
816
+ self.gamma = attributes[:'Gamma']
817
+ end
818
+
819
+ if attributes.has_key?(:'ISOSpeed')
820
+ self.iso_speed = attributes[:'ISOSpeed']
821
+ end
822
+
823
+ if attributes.has_key?(:'ISOSpeedLatitudeYYY')
824
+ self.iso_speed_latitude_yyy = attributes[:'ISOSpeedLatitudeYYY']
825
+ end
826
+
827
+ if attributes.has_key?(:'ISOSpeedLatitudeZZZ')
828
+ self.iso_speed_latitude_zzz = attributes[:'ISOSpeedLatitudeZZZ']
829
+ end
830
+
831
+ if attributes.has_key?(:'PhotographicSensitivity')
832
+ self.photographic_sensitivity = attributes[:'PhotographicSensitivity']
833
+ end
834
+
835
+ if attributes.has_key?(:'ImageUniqueID')
836
+ self.image_unique_id = attributes[:'ImageUniqueID']
837
+ end
838
+
839
+ if attributes.has_key?(:'LensMake')
840
+ self.lens_make = attributes[:'LensMake']
841
+ end
842
+
843
+ if attributes.has_key?(:'LensModel')
844
+ self.lens_model = attributes[:'LensModel']
845
+ end
846
+
847
+ if attributes.has_key?(:'LensSerialNumber')
848
+ self.lens_serial_number = attributes[:'LensSerialNumber']
849
+ end
850
+
851
+ if attributes.has_key?(:'LensSpecification')
852
+ if (value = attributes[:'LensSpecification']).is_a?(Array)
853
+ self.lens_specification = value
854
+ end
855
+ end
856
+
857
+ if attributes.has_key?(:'LightSource')
858
+ self.light_source = attributes[:'LightSource']
859
+ end
860
+
861
+ if attributes.has_key?(:'MakerNoteRawData')
862
+ self.maker_note_raw_data = attributes[:'MakerNoteRawData']
863
+ end
864
+
865
+ if attributes.has_key?(:'MaxApertureValue')
866
+ self.max_aperture_value = attributes[:'MaxApertureValue']
867
+ end
868
+
869
+ if attributes.has_key?(:'MeteringMode')
870
+ self.metering_mode = attributes[:'MeteringMode']
871
+ end
872
+
873
+ if attributes.has_key?(:'OECF')
874
+ self.oecf = attributes[:'OECF']
875
+ end
876
+
877
+ if attributes.has_key?(:'PixelXDimension')
878
+ self.pixel_x_dimension = attributes[:'PixelXDimension']
879
+ end
880
+
881
+ if attributes.has_key?(:'PixelYDimension')
882
+ self.pixel_y_dimension = attributes[:'PixelYDimension']
883
+ end
884
+
885
+ if attributes.has_key?(:'RecommendedExposureIndex')
886
+ self.recommended_exposure_index = attributes[:'RecommendedExposureIndex']
887
+ end
888
+
889
+ if attributes.has_key?(:'RelatedSoundFile')
890
+ self.related_sound_file = attributes[:'RelatedSoundFile']
891
+ end
892
+
893
+ if attributes.has_key?(:'Saturation')
894
+ self.saturation = attributes[:'Saturation']
895
+ end
896
+
897
+ if attributes.has_key?(:'SceneCaptureType')
898
+ self.scene_capture_type = attributes[:'SceneCaptureType']
899
+ end
900
+
901
+ if attributes.has_key?(:'SceneType')
902
+ self.scene_type = attributes[:'SceneType']
903
+ end
904
+
905
+ if attributes.has_key?(:'SensingMethod')
906
+ self.sensing_method = attributes[:'SensingMethod']
907
+ end
908
+
909
+ if attributes.has_key?(:'SensitivityType')
910
+ self.sensitivity_type = attributes[:'SensitivityType']
911
+ end
912
+
913
+ if attributes.has_key?(:'Sharpness')
914
+ self.sharpness = attributes[:'Sharpness']
915
+ end
916
+
917
+ if attributes.has_key?(:'ShutterSpeedValue')
918
+ self.shutter_speed_value = attributes[:'ShutterSpeedValue']
919
+ end
920
+
921
+ if attributes.has_key?(:'SpatialFrequencyResponse')
922
+ self.spatial_frequency_response = attributes[:'SpatialFrequencyResponse']
923
+ end
924
+
925
+ if attributes.has_key?(:'SpectralSensitivity')
926
+ self.spectral_sensitivity = attributes[:'SpectralSensitivity']
927
+ end
928
+
929
+ if attributes.has_key?(:'StandardOutputSensitivity')
930
+ self.standard_output_sensitivity = attributes[:'StandardOutputSensitivity']
931
+ end
932
+
933
+ if attributes.has_key?(:'SubjectArea')
934
+ if (value = attributes[:'SubjectArea']).is_a?(Array)
935
+ self.subject_area = value
936
+ end
937
+ end
938
+
939
+ if attributes.has_key?(:'SubjectDistance')
940
+ self.subject_distance = attributes[:'SubjectDistance']
941
+ end
942
+
943
+ if attributes.has_key?(:'SubjectDistanceRange')
944
+ self.subject_distance_range = attributes[:'SubjectDistanceRange']
945
+ end
946
+
947
+ if attributes.has_key?(:'SubjectLocation')
948
+ if (value = attributes[:'SubjectLocation']).is_a?(Array)
949
+ self.subject_location = value
950
+ end
951
+ end
952
+
953
+ if attributes.has_key?(:'SubsecTime')
954
+ self.subsec_time = attributes[:'SubsecTime']
955
+ end
956
+
957
+ if attributes.has_key?(:'SubsecTimeDigitized')
958
+ self.subsec_time_digitized = attributes[:'SubsecTimeDigitized']
959
+ end
960
+
961
+ if attributes.has_key?(:'SubsecTimeOriginal')
962
+ self.subsec_time_original = attributes[:'SubsecTimeOriginal']
963
+ end
964
+
965
+ if attributes.has_key?(:'UserComment')
966
+ self.user_comment = attributes[:'UserComment']
967
+ end
968
+
969
+ if attributes.has_key?(:'WhiteBalance')
970
+ self.white_balance = attributes[:'WhiteBalance']
971
+ end
972
+
973
+ if attributes.has_key?(:'WhitePoint')
974
+ if (value = attributes[:'WhitePoint']).is_a?(Array)
975
+ self.white_point = value
976
+ end
977
+ end
978
+ end
979
+
980
+ # Show invalid properties with the reasons. Usually used together with valid?
981
+ # @return Array for valid properties with the reasons
982
+ def list_invalid_properties
983
+ invalid_properties = Array.new
984
+ if @aperture_value.nil?
985
+ invalid_properties.push('invalid value for "aperture_value", aperture_value cannot be nil.')
986
+ end
987
+
988
+ if @brightness_value.nil?
989
+ invalid_properties.push('invalid value for "brightness_value", brightness_value cannot be nil.')
990
+ end
991
+
992
+ if !@cfa_pattern.nil? && @cfa_pattern !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
993
+ invalid_properties.push('invalid value for "cfa_pattern", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.')
994
+ end
995
+
996
+ if !@components_configuration.nil? && @components_configuration !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
997
+ invalid_properties.push('invalid value for "components_configuration", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.')
998
+ end
999
+
1000
+ if @compressed_bits_per_pixel.nil?
1001
+ invalid_properties.push('invalid value for "compressed_bits_per_pixel", compressed_bits_per_pixel cannot be nil.')
1002
+ end
1003
+
1004
+ if !@device_setting_description.nil? && @device_setting_description !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
1005
+ invalid_properties.push('invalid value for "device_setting_description", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.')
1006
+ end
1007
+
1008
+ if @digital_zoom_ratio.nil?
1009
+ invalid_properties.push('invalid value for "digital_zoom_ratio", digital_zoom_ratio cannot be nil.')
1010
+ end
1011
+
1012
+ if !@exif_version.nil? && @exif_version !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
1013
+ invalid_properties.push('invalid value for "exif_version", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.')
1014
+ end
1015
+
1016
+ if @exposure_bias_value.nil?
1017
+ invalid_properties.push('invalid value for "exposure_bias_value", exposure_bias_value cannot be nil.')
1018
+ end
1019
+
1020
+ if @exposure_index.nil?
1021
+ invalid_properties.push('invalid value for "exposure_index", exposure_index cannot be nil.')
1022
+ end
1023
+
1024
+ if @exposure_time.nil?
1025
+ invalid_properties.push('invalid value for "exposure_time", exposure_time cannot be nil.')
1026
+ end
1027
+
1028
+ if @f_number.nil?
1029
+ invalid_properties.push('invalid value for "f_number", f_number cannot be nil.')
1030
+ end
1031
+
1032
+ if @flash_energy.nil?
1033
+ invalid_properties.push('invalid value for "flash_energy", flash_energy cannot be nil.')
1034
+ end
1035
+
1036
+ if !@flashpix_version.nil? && @flashpix_version !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
1037
+ invalid_properties.push('invalid value for "flashpix_version", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.')
1038
+ end
1039
+
1040
+ if @focal_length.nil?
1041
+ invalid_properties.push('invalid value for "focal_length", focal_length cannot be nil.')
1042
+ end
1043
+
1044
+ if @focal_length_in35_mm_film.nil?
1045
+ invalid_properties.push('invalid value for "focal_length_in35_mm_film", focal_length_in35_mm_film cannot be nil.')
1046
+ end
1047
+
1048
+ if @focal_plane_x_resolution.nil?
1049
+ invalid_properties.push('invalid value for "focal_plane_x_resolution", focal_plane_x_resolution cannot be nil.')
1050
+ end
1051
+
1052
+ if @focal_plane_y_resolution.nil?
1053
+ invalid_properties.push('invalid value for "focal_plane_y_resolution", focal_plane_y_resolution cannot be nil.')
1054
+ end
1055
+
1056
+ if @gps_altitude.nil?
1057
+ invalid_properties.push('invalid value for "gps_altitude", gps_altitude cannot be nil.')
1058
+ end
1059
+
1060
+ if !@gps_area_information.nil? && @gps_area_information !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
1061
+ invalid_properties.push('invalid value for "gps_area_information", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.')
1062
+ end
1063
+
1064
+ if @gpsdop.nil?
1065
+ invalid_properties.push('invalid value for "gpsdop", gpsdop cannot be nil.')
1066
+ end
1067
+
1068
+ if @gps_dest_bearing.nil?
1069
+ invalid_properties.push('invalid value for "gps_dest_bearing", gps_dest_bearing cannot be nil.')
1070
+ end
1071
+
1072
+ if @gps_dest_distance.nil?
1073
+ invalid_properties.push('invalid value for "gps_dest_distance", gps_dest_distance cannot be nil.')
1074
+ end
1075
+
1076
+ if @gps_differential.nil?
1077
+ invalid_properties.push('invalid value for "gps_differential", gps_differential cannot be nil.')
1078
+ end
1079
+
1080
+ if @gps_img_direction.nil?
1081
+ invalid_properties.push('invalid value for "gps_img_direction", gps_img_direction cannot be nil.')
1082
+ end
1083
+
1084
+ if !@gps_processing_method.nil? && @gps_processing_method !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
1085
+ invalid_properties.push('invalid value for "gps_processing_method", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.')
1086
+ end
1087
+
1088
+ if @gps_speed.nil?
1089
+ invalid_properties.push('invalid value for "gps_speed", gps_speed cannot be nil.')
1090
+ end
1091
+
1092
+ if !@gps_version_id.nil? && @gps_version_id !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
1093
+ invalid_properties.push('invalid value for "gps_version_id", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.')
1094
+ end
1095
+
1096
+ if @gamma.nil?
1097
+ invalid_properties.push('invalid value for "gamma", gamma cannot be nil.')
1098
+ end
1099
+
1100
+ if @iso_speed.nil?
1101
+ invalid_properties.push('invalid value for "iso_speed", iso_speed cannot be nil.')
1102
+ end
1103
+
1104
+ if @iso_speed_latitude_yyy.nil?
1105
+ invalid_properties.push('invalid value for "iso_speed_latitude_yyy", iso_speed_latitude_yyy cannot be nil.')
1106
+ end
1107
+
1108
+ if @iso_speed_latitude_zzz.nil?
1109
+ invalid_properties.push('invalid value for "iso_speed_latitude_zzz", iso_speed_latitude_zzz cannot be nil.')
1110
+ end
1111
+
1112
+ if @photographic_sensitivity.nil?
1113
+ invalid_properties.push('invalid value for "photographic_sensitivity", photographic_sensitivity cannot be nil.')
1114
+ end
1115
+
1116
+ if !@maker_note_raw_data.nil? && @maker_note_raw_data !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
1117
+ invalid_properties.push('invalid value for "maker_note_raw_data", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.')
1118
+ end
1119
+
1120
+ if @max_aperture_value.nil?
1121
+ invalid_properties.push('invalid value for "max_aperture_value", max_aperture_value cannot be nil.')
1122
+ end
1123
+
1124
+ if !@oecf.nil? && @oecf !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
1125
+ invalid_properties.push('invalid value for "oecf", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.')
1126
+ end
1127
+
1128
+ if @pixel_x_dimension.nil?
1129
+ invalid_properties.push('invalid value for "pixel_x_dimension", pixel_x_dimension cannot be nil.')
1130
+ end
1131
+
1132
+ if @pixel_y_dimension.nil?
1133
+ invalid_properties.push('invalid value for "pixel_y_dimension", pixel_y_dimension cannot be nil.')
1134
+ end
1135
+
1136
+ if @recommended_exposure_index.nil?
1137
+ invalid_properties.push('invalid value for "recommended_exposure_index", recommended_exposure_index cannot be nil.')
1138
+ end
1139
+
1140
+ if @scene_type.nil?
1141
+ invalid_properties.push('invalid value for "scene_type", scene_type cannot be nil.')
1142
+ end
1143
+
1144
+ if @sensitivity_type.nil?
1145
+ invalid_properties.push('invalid value for "sensitivity_type", sensitivity_type cannot be nil.')
1146
+ end
1147
+
1148
+ if @sharpness.nil?
1149
+ invalid_properties.push('invalid value for "sharpness", sharpness cannot be nil.')
1150
+ end
1151
+
1152
+ if @shutter_speed_value.nil?
1153
+ invalid_properties.push('invalid value for "shutter_speed_value", shutter_speed_value cannot be nil.')
1154
+ end
1155
+
1156
+ if !@spatial_frequency_response.nil? && @spatial_frequency_response !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
1157
+ invalid_properties.push('invalid value for "spatial_frequency_response", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.')
1158
+ end
1159
+
1160
+ if @standard_output_sensitivity.nil?
1161
+ invalid_properties.push('invalid value for "standard_output_sensitivity", standard_output_sensitivity cannot be nil.')
1162
+ end
1163
+
1164
+ if @subject_distance.nil?
1165
+ invalid_properties.push('invalid value for "subject_distance", subject_distance cannot be nil.')
1166
+ end
1167
+
1168
+ invalid_properties
1169
+ end
1170
+
1171
+ # Check to see if the all the properties in the model are valid
1172
+ # @return true if the model is valid
1173
+ def valid?
1174
+ return false if @aperture_value.nil?
1175
+ return false if @brightness_value.nil?
1176
+ return false if !@cfa_pattern.nil? && @cfa_pattern !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
1177
+ return false if !@components_configuration.nil? && @components_configuration !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
1178
+ return false if @compressed_bits_per_pixel.nil?
1179
+ return false if !@device_setting_description.nil? && @device_setting_description !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
1180
+ return false if @digital_zoom_ratio.nil?
1181
+ return false if !@exif_version.nil? && @exif_version !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
1182
+ return false if @exposure_bias_value.nil?
1183
+ return false if @exposure_index.nil?
1184
+ return false if @exposure_time.nil?
1185
+ return false if @f_number.nil?
1186
+ return false if @flash_energy.nil?
1187
+ return false if !@flashpix_version.nil? && @flashpix_version !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
1188
+ return false if @focal_length.nil?
1189
+ return false if @focal_length_in35_mm_film.nil?
1190
+ return false if @focal_plane_x_resolution.nil?
1191
+ return false if @focal_plane_y_resolution.nil?
1192
+ return false if @gps_altitude.nil?
1193
+ return false if !@gps_area_information.nil? && @gps_area_information !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
1194
+ return false if @gpsdop.nil?
1195
+ return false if @gps_dest_bearing.nil?
1196
+ return false if @gps_dest_distance.nil?
1197
+ return false if @gps_differential.nil?
1198
+ return false if @gps_img_direction.nil?
1199
+ return false if !@gps_processing_method.nil? && @gps_processing_method !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
1200
+ return false if @gps_speed.nil?
1201
+ return false if !@gps_version_id.nil? && @gps_version_id !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
1202
+ return false if @gamma.nil?
1203
+ return false if @iso_speed.nil?
1204
+ return false if @iso_speed_latitude_yyy.nil?
1205
+ return false if @iso_speed_latitude_zzz.nil?
1206
+ return false if @photographic_sensitivity.nil?
1207
+ return false if !@maker_note_raw_data.nil? && @maker_note_raw_data !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
1208
+ return false if @max_aperture_value.nil?
1209
+ return false if !@oecf.nil? && @oecf !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
1210
+ return false if @pixel_x_dimension.nil?
1211
+ return false if @pixel_y_dimension.nil?
1212
+ return false if @recommended_exposure_index.nil?
1213
+ return false if @scene_type.nil?
1214
+ return false if @sensitivity_type.nil?
1215
+ return false if @sharpness.nil?
1216
+ return false if @shutter_speed_value.nil?
1217
+ return false if !@spatial_frequency_response.nil? && @spatial_frequency_response !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
1218
+ return false if @standard_output_sensitivity.nil?
1219
+ return false if @subject_distance.nil?
1220
+ true
1221
+ end
1222
+
1223
+ # Custom attribute writer method with validation
1224
+ # @param [Object] cfa_pattern Value to be assigned
1225
+ def cfa_pattern=(cfa_pattern)
1226
+ if !cfa_pattern.nil? && cfa_pattern !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
1227
+ fail ArgumentError, 'invalid value for "cfa_pattern", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.'
1228
+ end
1229
+
1230
+ @cfa_pattern = cfa_pattern
1231
+ end
1232
+
1233
+ # Custom attribute writer method with validation
1234
+ # @param [Object] components_configuration Value to be assigned
1235
+ def components_configuration=(components_configuration)
1236
+ if !components_configuration.nil? && components_configuration !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
1237
+ fail ArgumentError, 'invalid value for "components_configuration", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.'
1238
+ end
1239
+
1240
+ @components_configuration = components_configuration
1241
+ end
1242
+
1243
+ # Custom attribute writer method with validation
1244
+ # @param [Object] device_setting_description Value to be assigned
1245
+ def device_setting_description=(device_setting_description)
1246
+ if !device_setting_description.nil? && device_setting_description !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
1247
+ fail ArgumentError, 'invalid value for "device_setting_description", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.'
1248
+ end
1249
+
1250
+ @device_setting_description = device_setting_description
1251
+ end
1252
+
1253
+ # Custom attribute writer method with validation
1254
+ # @param [Object] exif_version Value to be assigned
1255
+ def exif_version=(exif_version)
1256
+ if !exif_version.nil? && exif_version !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
1257
+ fail ArgumentError, 'invalid value for "exif_version", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.'
1258
+ end
1259
+
1260
+ @exif_version = exif_version
1261
+ end
1262
+
1263
+ # Custom attribute writer method with validation
1264
+ # @param [Object] flashpix_version Value to be assigned
1265
+ def flashpix_version=(flashpix_version)
1266
+ if !flashpix_version.nil? && flashpix_version !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
1267
+ fail ArgumentError, 'invalid value for "flashpix_version", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.'
1268
+ end
1269
+
1270
+ @flashpix_version = flashpix_version
1271
+ end
1272
+
1273
+ # Custom attribute writer method with validation
1274
+ # @param [Object] gps_area_information Value to be assigned
1275
+ def gps_area_information=(gps_area_information)
1276
+ if !gps_area_information.nil? && gps_area_information !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
1277
+ fail ArgumentError, 'invalid value for "gps_area_information", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.'
1278
+ end
1279
+
1280
+ @gps_area_information = gps_area_information
1281
+ end
1282
+
1283
+ # Custom attribute writer method with validation
1284
+ # @param [Object] gps_processing_method Value to be assigned
1285
+ def gps_processing_method=(gps_processing_method)
1286
+ if !gps_processing_method.nil? && gps_processing_method !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
1287
+ fail ArgumentError, 'invalid value for "gps_processing_method", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.'
1288
+ end
1289
+
1290
+ @gps_processing_method = gps_processing_method
1291
+ end
1292
+
1293
+ # Custom attribute writer method with validation
1294
+ # @param [Object] gps_version_id Value to be assigned
1295
+ def gps_version_id=(gps_version_id)
1296
+ if !gps_version_id.nil? && gps_version_id !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
1297
+ fail ArgumentError, 'invalid value for "gps_version_id", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.'
1298
+ end
1299
+
1300
+ @gps_version_id = gps_version_id
1301
+ end
1302
+
1303
+ # Custom attribute writer method with validation
1304
+ # @param [Object] maker_note_raw_data Value to be assigned
1305
+ def maker_note_raw_data=(maker_note_raw_data)
1306
+ if !maker_note_raw_data.nil? && maker_note_raw_data !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
1307
+ fail ArgumentError, 'invalid value for "maker_note_raw_data", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.'
1308
+ end
1309
+
1310
+ @maker_note_raw_data = maker_note_raw_data
1311
+ end
1312
+
1313
+ # Custom attribute writer method with validation
1314
+ # @param [Object] oecf Value to be assigned
1315
+ def oecf=(oecf)
1316
+ if !oecf.nil? && oecf !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
1317
+ fail ArgumentError, 'invalid value for "oecf", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.'
1318
+ end
1319
+
1320
+ @oecf = oecf
1321
+ end
1322
+
1323
+ # Custom attribute writer method with validation
1324
+ # @param [Object] spatial_frequency_response Value to be assigned
1325
+ def spatial_frequency_response=(spatial_frequency_response)
1326
+ if !spatial_frequency_response.nil? && spatial_frequency_response !~ Regexp.new(/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/)
1327
+ fail ArgumentError, 'invalid value for "spatial_frequency_response", must conform to the pattern /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.'
1328
+ end
1329
+
1330
+ @spatial_frequency_response = spatial_frequency_response
1331
+ end
1332
+
1333
+ # Checks equality by comparing each attribute.
1334
+ # @param [Object] Object to be compared
1335
+ def ==(o)
1336
+ return true if self.equal?(o)
1337
+ self.class == o.class &&
1338
+ aperture_value == o.aperture_value &&
1339
+ body_serial_number == o.body_serial_number &&
1340
+ brightness_value == o.brightness_value &&
1341
+ cfa_pattern == o.cfa_pattern &&
1342
+ camera_owner_name == o.camera_owner_name &&
1343
+ color_space == o.color_space &&
1344
+ components_configuration == o.components_configuration &&
1345
+ compressed_bits_per_pixel == o.compressed_bits_per_pixel &&
1346
+ contrast == o.contrast &&
1347
+ custom_rendered == o.custom_rendered &&
1348
+ date_time_digitized == o.date_time_digitized &&
1349
+ date_time_original == o.date_time_original &&
1350
+ device_setting_description == o.device_setting_description &&
1351
+ digital_zoom_ratio == o.digital_zoom_ratio &&
1352
+ exif_version == o.exif_version &&
1353
+ exposure_bias_value == o.exposure_bias_value &&
1354
+ exposure_index == o.exposure_index &&
1355
+ exposure_mode == o.exposure_mode &&
1356
+ exposure_program == o.exposure_program &&
1357
+ exposure_time == o.exposure_time &&
1358
+ f_number == o.f_number &&
1359
+ file_source == o.file_source &&
1360
+ flash == o.flash &&
1361
+ flash_energy == o.flash_energy &&
1362
+ flashpix_version == o.flashpix_version &&
1363
+ focal_length == o.focal_length &&
1364
+ focal_length_in35_mm_film == o.focal_length_in35_mm_film &&
1365
+ focal_plane_resolution_unit == o.focal_plane_resolution_unit &&
1366
+ focal_plane_x_resolution == o.focal_plane_x_resolution &&
1367
+ focal_plane_y_resolution == o.focal_plane_y_resolution &&
1368
+ gps_altitude == o.gps_altitude &&
1369
+ gps_altitude_ref == o.gps_altitude_ref &&
1370
+ gps_area_information == o.gps_area_information &&
1371
+ gpsdop == o.gpsdop &&
1372
+ gps_dest_bearing == o.gps_dest_bearing &&
1373
+ gps_dest_bearing_ref == o.gps_dest_bearing_ref &&
1374
+ gps_dest_distance == o.gps_dest_distance &&
1375
+ gps_dest_distance_ref == o.gps_dest_distance_ref &&
1376
+ gps_dest_latitude == o.gps_dest_latitude &&
1377
+ gps_dest_latitude_ref == o.gps_dest_latitude_ref &&
1378
+ gps_dest_longitude == o.gps_dest_longitude &&
1379
+ gps_dest_longitude_ref == o.gps_dest_longitude_ref &&
1380
+ gps_differential == o.gps_differential &&
1381
+ gps_img_direction == o.gps_img_direction &&
1382
+ gps_img_direction_ref == o.gps_img_direction_ref &&
1383
+ gps_date_stamp == o.gps_date_stamp &&
1384
+ gps_latitude == o.gps_latitude &&
1385
+ gps_latitude_ref == o.gps_latitude_ref &&
1386
+ gps_longitude == o.gps_longitude &&
1387
+ gps_longitude_ref == o.gps_longitude_ref &&
1388
+ gps_map_datum == o.gps_map_datum &&
1389
+ gps_measure_mode == o.gps_measure_mode &&
1390
+ gps_processing_method == o.gps_processing_method &&
1391
+ gps_satellites == o.gps_satellites &&
1392
+ gps_speed == o.gps_speed &&
1393
+ gps_speed_ref == o.gps_speed_ref &&
1394
+ gps_status == o.gps_status &&
1395
+ gps_timestamp == o.gps_timestamp &&
1396
+ gps_track == o.gps_track &&
1397
+ gps_track_ref == o.gps_track_ref &&
1398
+ gps_version_id == o.gps_version_id &&
1399
+ gain_control == o.gain_control &&
1400
+ gamma == o.gamma &&
1401
+ iso_speed == o.iso_speed &&
1402
+ iso_speed_latitude_yyy == o.iso_speed_latitude_yyy &&
1403
+ iso_speed_latitude_zzz == o.iso_speed_latitude_zzz &&
1404
+ photographic_sensitivity == o.photographic_sensitivity &&
1405
+ image_unique_id == o.image_unique_id &&
1406
+ lens_make == o.lens_make &&
1407
+ lens_model == o.lens_model &&
1408
+ lens_serial_number == o.lens_serial_number &&
1409
+ lens_specification == o.lens_specification &&
1410
+ light_source == o.light_source &&
1411
+ maker_note_raw_data == o.maker_note_raw_data &&
1412
+ max_aperture_value == o.max_aperture_value &&
1413
+ metering_mode == o.metering_mode &&
1414
+ oecf == o.oecf &&
1415
+ pixel_x_dimension == o.pixel_x_dimension &&
1416
+ pixel_y_dimension == o.pixel_y_dimension &&
1417
+ recommended_exposure_index == o.recommended_exposure_index &&
1418
+ related_sound_file == o.related_sound_file &&
1419
+ saturation == o.saturation &&
1420
+ scene_capture_type == o.scene_capture_type &&
1421
+ scene_type == o.scene_type &&
1422
+ sensing_method == o.sensing_method &&
1423
+ sensitivity_type == o.sensitivity_type &&
1424
+ sharpness == o.sharpness &&
1425
+ shutter_speed_value == o.shutter_speed_value &&
1426
+ spatial_frequency_response == o.spatial_frequency_response &&
1427
+ spectral_sensitivity == o.spectral_sensitivity &&
1428
+ standard_output_sensitivity == o.standard_output_sensitivity &&
1429
+ subject_area == o.subject_area &&
1430
+ subject_distance == o.subject_distance &&
1431
+ subject_distance_range == o.subject_distance_range &&
1432
+ subject_location == o.subject_location &&
1433
+ subsec_time == o.subsec_time &&
1434
+ subsec_time_digitized == o.subsec_time_digitized &&
1435
+ subsec_time_original == o.subsec_time_original &&
1436
+ user_comment == o.user_comment &&
1437
+ white_balance == o.white_balance &&
1438
+ white_point == o.white_point
1439
+ end
1440
+
1441
+ # @see the `==` method
1442
+ # @param [Object] Object to be compared
1443
+ def eql?(o)
1444
+ self == o
1445
+ end
1446
+
1447
+ # Calculates hash code according to all attributes.
1448
+ # @return [Fixnum] Hash code
1449
+ def hash
1450
+ [aperture_value, body_serial_number, brightness_value, cfa_pattern, camera_owner_name, color_space, components_configuration, compressed_bits_per_pixel, contrast, custom_rendered, date_time_digitized, date_time_original, device_setting_description, digital_zoom_ratio, exif_version, exposure_bias_value, exposure_index, exposure_mode, exposure_program, exposure_time, f_number, file_source, flash, flash_energy, flashpix_version, focal_length, focal_length_in35_mm_film, focal_plane_resolution_unit, focal_plane_x_resolution, focal_plane_y_resolution, gps_altitude, gps_altitude_ref, gps_area_information, gpsdop, gps_dest_bearing, gps_dest_bearing_ref, gps_dest_distance, gps_dest_distance_ref, gps_dest_latitude, gps_dest_latitude_ref, gps_dest_longitude, gps_dest_longitude_ref, gps_differential, gps_img_direction, gps_img_direction_ref, gps_date_stamp, gps_latitude, gps_latitude_ref, gps_longitude, gps_longitude_ref, gps_map_datum, gps_measure_mode, gps_processing_method, gps_satellites, gps_speed, gps_speed_ref, gps_status, gps_timestamp, gps_track, gps_track_ref, gps_version_id, gain_control, gamma, iso_speed, iso_speed_latitude_yyy, iso_speed_latitude_zzz, photographic_sensitivity, image_unique_id, lens_make, lens_model, lens_serial_number, lens_specification, light_source, maker_note_raw_data, max_aperture_value, metering_mode, oecf, pixel_x_dimension, pixel_y_dimension, recommended_exposure_index, related_sound_file, saturation, scene_capture_type, scene_type, sensing_method, sensitivity_type, sharpness, shutter_speed_value, spatial_frequency_response, spectral_sensitivity, standard_output_sensitivity, subject_area, subject_distance, subject_distance_range, subject_location, subsec_time, subsec_time_digitized, subsec_time_original, user_comment, white_balance, white_point].hash
1451
+ end
1452
+
1453
+ # Builds the object from hash
1454
+ # @param [Hash] attributes Model attributes in the form of hash
1455
+ # @return [Object] Returns the model itself
1456
+ def build_from_hash(attributes)
1457
+ return nil unless attributes.is_a?(Hash)
1458
+ self.class.swagger_types.each_pair do |key, type|
1459
+ attribute_key = self.class.attribute_map[key]
1460
+ attribute_key = (attribute_key[0, 1].downcase + attribute_key[1..-1]).to_sym
1461
+ if type =~ /\AArray<(.*)>/i
1462
+ # check to ensure the input is an array given that the the attribute
1463
+ # is documented as an array but the input is not
1464
+ if attributes[attribute_key].is_a?(Array)
1465
+ self.send("#{key}=", attributes[attribute_key].map { |v| _deserialize($1, v) })
1466
+ end
1467
+ elsif !attributes[attribute_key].nil?
1468
+ self.send("#{key}=", _deserialize(type, attributes[attribute_key]))
1469
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
1470
+ end
1471
+
1472
+ self
1473
+ end
1474
+
1475
+ # Deserializes the data based on type
1476
+ # @param string type Data type
1477
+ # @param string value Value to be deserialized
1478
+ # @return [Object] Deserialized data
1479
+ def _deserialize(type, value)
1480
+ case type.to_sym
1481
+ when :DateTime
1482
+ DateTime.parse(value)
1483
+ when :Date
1484
+ Date.parse(value)
1485
+ when :String
1486
+ value.to_s
1487
+ when :Integer
1488
+ value.to_i
1489
+ when :Float
1490
+ value.to_f
1491
+ when :BOOLEAN
1492
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
1493
+ true
1494
+ else
1495
+ false
1496
+ end
1497
+ when :Object
1498
+ # generic object (usually a Hash), return directly
1499
+ value
1500
+ when /\AArray<(?<inner_type>.+)>\z/
1501
+ inner_type = Regexp.last_match[:inner_type]
1502
+ value.map { |v| _deserialize(inner_type, v) }
1503
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
1504
+ k_type = Regexp.last_match[:k_type]
1505
+ v_type = Regexp.last_match[:v_type]
1506
+ {}.tap do |hash|
1507
+ value.each do |k, v|
1508
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
1509
+ end
1510
+ end
1511
+ else # model
1512
+ temp_model = AsposeImagingCloud.const_get(type).new
1513
+ temp_model.build_from_hash(value)
1514
+ end
1515
+ end
1516
+
1517
+ # Returns the string representation of the object
1518
+ # @return [String] String presentation of the object
1519
+ def to_s
1520
+ to_hash.to_s
1521
+ end
1522
+
1523
+ # to_body is an alias to to_hash (backward compatibility)
1524
+ # @return [Hash] Returns the object in the form of hash
1525
+ def to_body
1526
+ to_hash
1527
+ end
1528
+
1529
+ # Returns the object in the form of hash
1530
+ # @return [Hash] Returns the object in the form of hash
1531
+ def to_hash
1532
+ hash = {}
1533
+ self.class.attribute_map.each_pair do |attr, param|
1534
+ value = self.send(attr)
1535
+ next if value.nil?
1536
+ hash[param] = _to_hash(value)
1537
+ end
1538
+ hash
1539
+ end
1540
+
1541
+ # Outputs non-array value in the form of hash
1542
+ # For object, use to_hash. Otherwise, just return the value
1543
+ # @param [Object] value Any valid value
1544
+ # @return [Hash] Returns the value in the form of hash
1545
+ def _to_hash(value)
1546
+ if value.is_a?(Array)
1547
+ value.compact.map { |v| _to_hash(v) }
1548
+ elsif value.is_a?(Hash)
1549
+ {}.tap do |hash|
1550
+ value.each { |k, v| hash[k] = _to_hash(v) }
1551
+ end
1552
+ elsif value.respond_to? :to_hash
1553
+ value.to_hash
1554
+ else
1555
+ value
1556
+ end
1557
+ end
1558
+
1559
+ end
1560
+ end