groupdocs_conversion_cloud 21.9 → 22.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (184) hide show
  1. checksums.yaml +4 -4
  2. data/lib/groupdocs_conversion_cloud/api/convert_api.rb +14 -4
  3. data/lib/groupdocs_conversion_cloud/api/file_api.rb +6 -6
  4. data/lib/groupdocs_conversion_cloud/api/folder_api.rb +6 -6
  5. data/lib/groupdocs_conversion_cloud/api/info_api.rb +3 -3
  6. data/lib/groupdocs_conversion_cloud/api/license_api.rb +169 -0
  7. data/lib/groupdocs_conversion_cloud/api/storage_api.rb +5 -5
  8. data/lib/groupdocs_conversion_cloud/api_client.rb +1 -1
  9. data/lib/groupdocs_conversion_cloud/api_error.rb +1 -1
  10. data/lib/groupdocs_conversion_cloud/configuration.rb +1 -1
  11. data/lib/groupdocs_conversion_cloud/models/bmp_convert_options.rb +1 -1
  12. data/lib/groupdocs_conversion_cloud/models/bmp_load_options.rb +12 -2
  13. data/lib/groupdocs_conversion_cloud/models/cad_load_options.rb +12 -2
  14. data/lib/groupdocs_conversion_cloud/models/cgm_convert_options.rb +1 -1
  15. data/lib/groupdocs_conversion_cloud/models/consumption_result.rb +234 -0
  16. data/lib/groupdocs_conversion_cloud/models/convert_options.rb +1 -1
  17. data/lib/groupdocs_conversion_cloud/models/convert_settings.rb +1 -1
  18. data/lib/groupdocs_conversion_cloud/models/csv_load_options.rb +12 -2
  19. data/lib/groupdocs_conversion_cloud/models/dcm_convert_options.rb +1 -1
  20. data/lib/groupdocs_conversion_cloud/models/dcm_load_options.rb +12 -2
  21. data/lib/groupdocs_conversion_cloud/models/dgn_load_options.rb +12 -2
  22. data/lib/groupdocs_conversion_cloud/models/diagram_load_options.rb +12 -2
  23. data/lib/groupdocs_conversion_cloud/models/disc_usage.rb +1 -1
  24. data/lib/groupdocs_conversion_cloud/models/djvu_convert_options.rb +1 -1
  25. data/lib/groupdocs_conversion_cloud/models/dng_convert_options.rb +1 -1
  26. data/lib/groupdocs_conversion_cloud/models/dng_load_options.rb +12 -2
  27. data/lib/groupdocs_conversion_cloud/models/doc_convert_options.rb +57 -5
  28. data/lib/groupdocs_conversion_cloud/models/doc_load_options.rb +12 -2
  29. data/lib/groupdocs_conversion_cloud/models/docm_convert_options.rb +57 -5
  30. data/lib/groupdocs_conversion_cloud/models/docm_load_options.rb +12 -2
  31. data/lib/groupdocs_conversion_cloud/models/document_metadata.rb +1 -1
  32. data/lib/groupdocs_conversion_cloud/models/docx_convert_options.rb +57 -5
  33. data/lib/groupdocs_conversion_cloud/models/docx_load_options.rb +12 -2
  34. data/lib/groupdocs_conversion_cloud/models/dot_convert_options.rb +57 -5
  35. data/lib/groupdocs_conversion_cloud/models/dot_load_options.rb +12 -2
  36. data/lib/groupdocs_conversion_cloud/models/dotm_convert_options.rb +57 -5
  37. data/lib/groupdocs_conversion_cloud/models/dotm_load_options.rb +12 -2
  38. data/lib/groupdocs_conversion_cloud/models/dotx_convert_options.rb +57 -5
  39. data/lib/groupdocs_conversion_cloud/models/dotx_load_options.rb +12 -2
  40. data/lib/groupdocs_conversion_cloud/models/dwf_load_options.rb +12 -2
  41. data/lib/groupdocs_conversion_cloud/models/dwg_load_options.rb +12 -2
  42. data/lib/groupdocs_conversion_cloud/models/dxf_load_options.rb +12 -2
  43. data/lib/groupdocs_conversion_cloud/models/email_load_options.rb +12 -2
  44. data/lib/groupdocs_conversion_cloud/models/emf_convert_options.rb +1 -1
  45. data/lib/groupdocs_conversion_cloud/models/emf_load_options.rb +12 -2
  46. data/lib/groupdocs_conversion_cloud/models/eml_load_options.rb +12 -2
  47. data/lib/groupdocs_conversion_cloud/models/emlx_load_options.rb +12 -2
  48. data/lib/groupdocs_conversion_cloud/models/epub_convert_options.rb +1 -1
  49. data/lib/groupdocs_conversion_cloud/models/error.rb +1 -1
  50. data/lib/groupdocs_conversion_cloud/models/error_details.rb +1 -1
  51. data/lib/groupdocs_conversion_cloud/models/field_label.rb +1 -1
  52. data/lib/groupdocs_conversion_cloud/models/file_version.rb +1 -1
  53. data/lib/groupdocs_conversion_cloud/models/file_versions.rb +1 -1
  54. data/lib/groupdocs_conversion_cloud/models/files_list.rb +1 -1
  55. data/lib/groupdocs_conversion_cloud/models/files_upload_result.rb +1 -1
  56. data/lib/groupdocs_conversion_cloud/models/gif_convert_options.rb +1 -1
  57. data/lib/groupdocs_conversion_cloud/models/gif_load_options.rb +12 -2
  58. data/lib/groupdocs_conversion_cloud/models/html_convert_options.rb +1 -1
  59. data/lib/groupdocs_conversion_cloud/models/html_load_options.rb +12 -2
  60. data/lib/groupdocs_conversion_cloud/models/ico_convert_options.rb +1 -1
  61. data/lib/groupdocs_conversion_cloud/models/ico_load_options.rb +12 -2
  62. data/lib/groupdocs_conversion_cloud/models/ifc_load_options.rb +12 -2
  63. data/lib/groupdocs_conversion_cloud/models/igs_load_options.rb +12 -2
  64. data/lib/groupdocs_conversion_cloud/models/image_convert_options.rb +1 -1
  65. data/lib/groupdocs_conversion_cloud/models/image_load_options.rb +12 -2
  66. data/lib/groupdocs_conversion_cloud/models/j2c_convert_options.rb +1 -1
  67. data/lib/groupdocs_conversion_cloud/models/j2c_load_options.rb +12 -2
  68. data/lib/groupdocs_conversion_cloud/models/j2k_convert_options.rb +1 -1
  69. data/lib/groupdocs_conversion_cloud/models/j2k_load_options.rb +12 -2
  70. data/lib/groupdocs_conversion_cloud/models/jp2_convert_options.rb +1 -1
  71. data/lib/groupdocs_conversion_cloud/models/jp2_load_options.rb +12 -2
  72. data/lib/groupdocs_conversion_cloud/models/jpeg_convert_options.rb +1 -1
  73. data/lib/groupdocs_conversion_cloud/models/jpeg_load_options.rb +12 -2
  74. data/lib/groupdocs_conversion_cloud/models/jpf_convert_options.rb +1 -1
  75. data/lib/groupdocs_conversion_cloud/models/jpf_load_options.rb +12 -2
  76. data/lib/groupdocs_conversion_cloud/models/jpg_convert_options.rb +1 -1
  77. data/lib/groupdocs_conversion_cloud/models/jpg_load_options.rb +12 -2
  78. data/lib/groupdocs_conversion_cloud/models/jpm_convert_options.rb +1 -1
  79. data/lib/groupdocs_conversion_cloud/models/jpm_load_options.rb +12 -2
  80. data/lib/groupdocs_conversion_cloud/models/jpx_convert_options.rb +1 -1
  81. data/lib/groupdocs_conversion_cloud/models/jpx_load_options.rb +12 -2
  82. data/lib/groupdocs_conversion_cloud/models/load_options.rb +13 -3
  83. data/lib/groupdocs_conversion_cloud/models/mht_load_options.rb +12 -2
  84. data/lib/groupdocs_conversion_cloud/models/mobi_load_options.rb +12 -2
  85. data/lib/groupdocs_conversion_cloud/models/msg_load_options.rb +12 -2
  86. data/lib/groupdocs_conversion_cloud/models/object_exist.rb +1 -1
  87. data/lib/groupdocs_conversion_cloud/models/odg_convert_options.rb +1 -1
  88. data/lib/groupdocs_conversion_cloud/models/odg_load_options.rb +12 -2
  89. data/lib/groupdocs_conversion_cloud/models/odp_convert_options.rb +1 -1
  90. data/lib/groupdocs_conversion_cloud/models/odp_load_options.rb +12 -2
  91. data/lib/groupdocs_conversion_cloud/models/ods_convert_options.rb +1 -1
  92. data/lib/groupdocs_conversion_cloud/models/ods_load_options.rb +12 -2
  93. data/lib/groupdocs_conversion_cloud/models/odt_convert_options.rb +57 -5
  94. data/lib/groupdocs_conversion_cloud/models/odt_load_options.rb +12 -2
  95. data/lib/groupdocs_conversion_cloud/models/one_load_options.rb +12 -2
  96. data/lib/groupdocs_conversion_cloud/models/ost_load_options.rb +12 -2
  97. data/lib/groupdocs_conversion_cloud/models/otp_convert_options.rb +1 -1
  98. data/lib/groupdocs_conversion_cloud/models/otp_load_options.rb +12 -2
  99. data/lib/groupdocs_conversion_cloud/models/ots_convert_options.rb +1 -1
  100. data/lib/groupdocs_conversion_cloud/models/ots_load_options.rb +12 -2
  101. data/lib/groupdocs_conversion_cloud/models/ott_convert_options.rb +57 -5
  102. data/lib/groupdocs_conversion_cloud/models/ott_load_options.rb +12 -2
  103. data/lib/groupdocs_conversion_cloud/models/pdf_convert_options.rb +1 -1
  104. data/lib/groupdocs_conversion_cloud/models/pdf_load_options.rb +12 -2
  105. data/lib/groupdocs_conversion_cloud/models/plt_load_options.rb +12 -2
  106. data/lib/groupdocs_conversion_cloud/models/png_convert_options.rb +1 -1
  107. data/lib/groupdocs_conversion_cloud/models/png_load_options.rb +12 -2
  108. data/lib/groupdocs_conversion_cloud/models/potm_convert_options.rb +1 -1
  109. data/lib/groupdocs_conversion_cloud/models/potm_load_options.rb +12 -2
  110. data/lib/groupdocs_conversion_cloud/models/potx_convert_options.rb +1 -1
  111. data/lib/groupdocs_conversion_cloud/models/potx_load_options.rb +12 -2
  112. data/lib/groupdocs_conversion_cloud/models/pps_convert_options.rb +1 -1
  113. data/lib/groupdocs_conversion_cloud/models/pps_load_options.rb +12 -2
  114. data/lib/groupdocs_conversion_cloud/models/ppsm_convert_options.rb +1 -1
  115. data/lib/groupdocs_conversion_cloud/models/ppsm_load_options.rb +12 -2
  116. data/lib/groupdocs_conversion_cloud/models/ppsx_convert_options.rb +1 -1
  117. data/lib/groupdocs_conversion_cloud/models/ppsx_load_options.rb +12 -2
  118. data/lib/groupdocs_conversion_cloud/models/ppt_convert_options.rb +1 -1
  119. data/lib/groupdocs_conversion_cloud/models/ppt_load_options.rb +12 -2
  120. data/lib/groupdocs_conversion_cloud/models/pptm_convert_options.rb +1 -1
  121. data/lib/groupdocs_conversion_cloud/models/pptm_load_options.rb +12 -2
  122. data/lib/groupdocs_conversion_cloud/models/pptx_convert_options.rb +1 -1
  123. data/lib/groupdocs_conversion_cloud/models/pptx_load_options.rb +12 -2
  124. data/lib/groupdocs_conversion_cloud/models/presentation_convert_options.rb +1 -1
  125. data/lib/groupdocs_conversion_cloud/models/presentation_load_options.rb +12 -2
  126. data/lib/groupdocs_conversion_cloud/models/psd_convert_options.rb +1 -1
  127. data/lib/groupdocs_conversion_cloud/models/psd_load_options.rb +12 -2
  128. data/lib/groupdocs_conversion_cloud/models/pst_load_options.rb +12 -2
  129. data/lib/groupdocs_conversion_cloud/models/rtf_convert_options.rb +54 -2
  130. data/lib/groupdocs_conversion_cloud/models/spreadsheet_convert_options.rb +1 -1
  131. data/lib/groupdocs_conversion_cloud/models/spreadsheet_load_options.rb +12 -2
  132. data/lib/groupdocs_conversion_cloud/models/stl_load_options.rb +12 -2
  133. data/lib/groupdocs_conversion_cloud/models/storage_exist.rb +1 -1
  134. data/lib/groupdocs_conversion_cloud/models/storage_file.rb +1 -1
  135. data/lib/groupdocs_conversion_cloud/models/stored_converted_result.rb +1 -1
  136. data/lib/groupdocs_conversion_cloud/models/supported_format.rb +1 -1
  137. data/lib/groupdocs_conversion_cloud/models/svg_convert_options.rb +1 -1
  138. data/lib/groupdocs_conversion_cloud/models/tif_convert_options.rb +1 -1
  139. data/lib/groupdocs_conversion_cloud/models/tif_load_options.rb +12 -2
  140. data/lib/groupdocs_conversion_cloud/models/tiff_convert_options.rb +1 -1
  141. data/lib/groupdocs_conversion_cloud/models/tiff_load_options.rb +12 -2
  142. data/lib/groupdocs_conversion_cloud/models/tsv_convert_options.rb +1 -1
  143. data/lib/groupdocs_conversion_cloud/models/tsv_load_options.rb +12 -2
  144. data/lib/groupdocs_conversion_cloud/models/txt_convert_options.rb +1 -1
  145. data/lib/groupdocs_conversion_cloud/models/txt_load_options.rb +12 -2
  146. data/lib/groupdocs_conversion_cloud/models/vdw_load_options.rb +12 -2
  147. data/lib/groupdocs_conversion_cloud/models/vdx_load_options.rb +12 -2
  148. data/lib/groupdocs_conversion_cloud/models/vsd_load_options.rb +12 -2
  149. data/lib/groupdocs_conversion_cloud/models/vsdm_load_options.rb +12 -2
  150. data/lib/groupdocs_conversion_cloud/models/vsdx_load_options.rb +12 -2
  151. data/lib/groupdocs_conversion_cloud/models/vss_load_options.rb +12 -2
  152. data/lib/groupdocs_conversion_cloud/models/vssm_load_options.rb +12 -2
  153. data/lib/groupdocs_conversion_cloud/models/vssx_load_options.rb +12 -2
  154. data/lib/groupdocs_conversion_cloud/models/vst_load_options.rb +12 -2
  155. data/lib/groupdocs_conversion_cloud/models/vstm_load_options.rb +12 -2
  156. data/lib/groupdocs_conversion_cloud/models/vstx_load_options.rb +12 -2
  157. data/lib/groupdocs_conversion_cloud/models/vsx_load_options.rb +12 -2
  158. data/lib/groupdocs_conversion_cloud/models/vtx_load_options.rb +12 -2
  159. data/lib/groupdocs_conversion_cloud/models/watermark_options.rb +20 -5
  160. data/lib/groupdocs_conversion_cloud/models/webp_convert_options.rb +1 -1
  161. data/lib/groupdocs_conversion_cloud/models/webp_load_options.rb +12 -2
  162. data/lib/groupdocs_conversion_cloud/models/wmf_convert_options.rb +1 -1
  163. data/lib/groupdocs_conversion_cloud/models/wmf_load_options.rb +12 -2
  164. data/lib/groupdocs_conversion_cloud/models/word_processing_convert_options.rb +57 -5
  165. data/lib/groupdocs_conversion_cloud/models/word_processing_load_options.rb +12 -2
  166. data/lib/groupdocs_conversion_cloud/models/xls2003_convert_options.rb +1 -1
  167. data/lib/groupdocs_conversion_cloud/models/xls2003_load_options.rb +12 -2
  168. data/lib/groupdocs_conversion_cloud/models/xls_convert_options.rb +1 -1
  169. data/lib/groupdocs_conversion_cloud/models/xls_load_options.rb +12 -2
  170. data/lib/groupdocs_conversion_cloud/models/xlsb_convert_options.rb +1 -1
  171. data/lib/groupdocs_conversion_cloud/models/xlsb_load_options.rb +12 -2
  172. data/lib/groupdocs_conversion_cloud/models/xlsm_convert_options.rb +1 -1
  173. data/lib/groupdocs_conversion_cloud/models/xlsm_load_options.rb +12 -2
  174. data/lib/groupdocs_conversion_cloud/models/xlsx_convert_options.rb +1 -1
  175. data/lib/groupdocs_conversion_cloud/models/xlsx_load_options.rb +12 -2
  176. data/lib/groupdocs_conversion_cloud/models/xltm_convert_options.rb +1 -1
  177. data/lib/groupdocs_conversion_cloud/models/xltm_load_options.rb +12 -2
  178. data/lib/groupdocs_conversion_cloud/models/xltx_convert_options.rb +1 -1
  179. data/lib/groupdocs_conversion_cloud/models/xltx_load_options.rb +12 -2
  180. data/lib/groupdocs_conversion_cloud/models/xml_load_options.rb +12 -2
  181. data/lib/groupdocs_conversion_cloud/models/xps_convert_options.rb +1 -1
  182. data/lib/groupdocs_conversion_cloud/version.rb +2 -2
  183. data/lib/groupdocs_conversion_cloud.rb +3 -1
  184. metadata +4 -2
@@ -0,0 +1,234 @@
1
+ #
2
+ # --------------------------------------------------------------------------------------------------------------------
3
+ # <copyright company="Aspose Pty Ltd" file="consumption_result.rb">
4
+ # Copyright (c) 2003-2022 Aspose Pty Ltd
5
+ # </copyright>
6
+ # <summary>
7
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ # of this software and associated documentation files (the "Software"), to deal
9
+ # in the Software without restriction, including without limitation the rights
10
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ # copies of the Software, and to permit persons to whom the Software is
12
+ # furnished to do so, subject to the following conditions:
13
+ #
14
+ # The above copyright notice and this permission notice shall be included in all
15
+ # copies or substantial portions of the Software.
16
+ #
17
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ # SOFTWARE.
24
+ # </summary>
25
+ # --------------------------------------------------------------------------------------------------------------------
26
+ #
27
+
28
+ require 'date'
29
+
30
+ module GroupDocsConversionCloud
31
+ # Metered license consumption information
32
+ class ConsumptionResult
33
+
34
+ # Amount of used credits
35
+ attr_accessor :credit
36
+
37
+ # Amount of MBs processed
38
+ attr_accessor :quantity
39
+
40
+ # Attribute mapping from ruby-style variable name to JSON key.
41
+ def self.attribute_map
42
+ {
43
+ :'credit' => :'Credit',
44
+ :'quantity' => :'Quantity'
45
+ }
46
+ end
47
+
48
+ # Attribute type mapping.
49
+ def self.swagger_types
50
+ {
51
+ :'credit' => :'Float',
52
+ :'quantity' => :'Float'
53
+ }
54
+ end
55
+
56
+ # Initializes the object
57
+ # @param [Hash] attributes Model attributes in the form of hash
58
+ def initialize(attributes = {})
59
+ return unless attributes.is_a?(Hash)
60
+
61
+ # convert string to symbol for hash key
62
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
63
+
64
+ if attributes.key?(:'Credit')
65
+ self.credit = attributes[:'Credit']
66
+ end
67
+
68
+ if attributes.key?(:'Quantity')
69
+ self.quantity = attributes[:'Quantity']
70
+ end
71
+
72
+ end
73
+
74
+ # Show invalid properties with the reasons. Usually used together with valid?
75
+ # @return Array for valid properies with the reasons
76
+ def list_invalid_properties
77
+ invalid_properties = []
78
+ if @credit.nil?
79
+ invalid_properties.push("invalid value for 'credit', credit cannot be nil.")
80
+ end
81
+
82
+ if @quantity.nil?
83
+ invalid_properties.push("invalid value for 'quantity', quantity cannot be nil.")
84
+ end
85
+
86
+ return invalid_properties
87
+ end
88
+
89
+ # Check to see if the all the properties in the model are valid
90
+ # @return true if the model is valid
91
+ def valid?
92
+ return false if @credit.nil?
93
+ return false if @quantity.nil?
94
+ return true
95
+ end
96
+
97
+ # Checks equality by comparing each attribute.
98
+ # @param [Object] Object to be compared
99
+ def ==(other)
100
+ return true if self.equal?(other)
101
+ self.class == other.class &&
102
+ credit == other.credit &&
103
+ quantity == other.quantity
104
+ end
105
+
106
+ # @see the `==` method
107
+ # @param [Object] Object to be compared
108
+ def eql?(other)
109
+ self == other
110
+ end
111
+
112
+ # Calculates hash code according to all attributes.
113
+ # @return [Fixnum] Hash code
114
+ def hash
115
+ [credit, quantity].hash
116
+ end
117
+
118
+ # Downcases first letter.
119
+ # @return downcased string
120
+ def uncap(str)
121
+ str[0, 1].downcase + str[1..-1]
122
+ end
123
+
124
+ # Builds the object from hash
125
+ # @param [Hash] attributes Model attributes in the form of hash
126
+ # @return [Object] Returns the model itself
127
+ def build_from_hash(attributes)
128
+ return nil unless attributes.is_a?(Hash)
129
+ self.class.swagger_types.each_pair do |key, type|
130
+ pname = uncap(self.class.attribute_map[key]).intern
131
+ value = attributes[pname]
132
+ if type =~ /\AArray<(.*)>/i
133
+ # check to ensure the input is an array given that the the attribute
134
+ # is documented as an array but the input is not
135
+ if value.is_a?(Array)
136
+ self.send("#{key}=", value.map { |v| _deserialize($1, v) })
137
+ end
138
+ elsif !value.nil?
139
+ self.send("#{key}=", _deserialize(type, value))
140
+ end
141
+ # or else data not found in attributes(hash), not an issue as the data can be optional
142
+ end
143
+
144
+ self
145
+ end
146
+
147
+ # Deserializes the data based on type
148
+ # @param string type Data type
149
+ # @param string value Value to be deserialized
150
+ # @return [Object] Deserialized data
151
+ def _deserialize(type, value)
152
+ case type.to_sym
153
+ when :DateTime
154
+ Date.parse value
155
+ when :Date
156
+ Date.parse value
157
+ when :String
158
+ value.to_s
159
+ when :Integer
160
+ value.to_i
161
+ when :Float
162
+ value.to_f
163
+ when :BOOLEAN
164
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
165
+ true
166
+ else
167
+ false
168
+ end
169
+ when :Object
170
+ # generic object (usually a Hash), return directly
171
+ value
172
+ when /\AArray<(?<inner_type>.+)>\z/
173
+ inner_type = Regexp.last_match[:inner_type]
174
+ value.map { |v| _deserialize(inner_type, v) }
175
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
176
+ k_type = Regexp.last_match[:k_type]
177
+ v_type = Regexp.last_match[:v_type]
178
+ {}.tap do |hash|
179
+ value.each do |k, v|
180
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
181
+ end
182
+ end
183
+ else
184
+ # model
185
+ temp_model = GroupDocsConversionCloud.const_get(type).new
186
+ temp_model.build_from_hash(value)
187
+ end
188
+ end
189
+
190
+ # Returns the string representation of the object
191
+ # @return [String] String presentation of the object
192
+ def to_s
193
+ to_hash.to_s
194
+ end
195
+
196
+ # to_body is an alias to to_hash (backward compatibility)
197
+ # @return [Hash] Returns the object in the form of hash
198
+ def to_body
199
+ to_hash
200
+ end
201
+
202
+ # Returns the object in the form of hash
203
+ # @return [Hash] Returns the object in the form of hash
204
+ def to_hash
205
+ hash = {}
206
+ self.class.attribute_map.each_pair do |attr, param|
207
+ value = self.send(attr)
208
+ next if value.nil?
209
+ hash[param] = _to_hash(value)
210
+ end
211
+ hash
212
+ end
213
+
214
+ # Outputs non-array value in the form of hash
215
+ # For object, use to_hash. Otherwise, just return the value
216
+ # @param [Object] value Any valid value
217
+ # @return [Hash] Returns the value in the form of hash
218
+ def _to_hash(value)
219
+ if value.is_a?(Array)
220
+ value.compact.map { |v| _to_hash(v) }
221
+ elsif value.is_a?(Hash)
222
+ {}.tap do |hash|
223
+ value.each { |k, v| hash[k] = _to_hash(v) }
224
+ end
225
+ elsif value.respond_to? :to_hash
226
+ value.to_hash
227
+ else
228
+ value
229
+ end
230
+ end
231
+
232
+ end
233
+
234
+ end
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # --------------------------------------------------------------------------------------------------------------------
3
3
  # <copyright company="Aspose Pty Ltd" file="convert_options.rb">
4
- # Copyright (c) 2003-2021 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2022 Aspose Pty Ltd
5
5
  # </copyright>
6
6
  # <summary>
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # --------------------------------------------------------------------------------------------------------------------
3
3
  # <copyright company="Aspose Pty Ltd" file="convert_settings.rb">
4
- # Copyright (c) 2003-2021 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2022 Aspose Pty Ltd
5
5
  # </copyright>
6
6
  # <summary>
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # --------------------------------------------------------------------------------------------------------------------
3
3
  # <copyright company="Aspose Pty Ltd" file="csv_load_options.rb">
4
- # Copyright (c) 2003-2021 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2022 Aspose Pty Ltd
5
5
  # </copyright>
6
6
  # <summary>
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -31,6 +31,9 @@ module GroupDocsConversionCloud
31
31
  # Csv document load options
32
32
  class CsvLoadOptions
33
33
 
34
+ # The format of input file, (\"docx\", for example). This field must be filled with correct input file format when using ConvertDirect method, which accept input file as binary stream, and, because of that, API can correctly handle LoadOptions. In regular conversion, the input file format taken from the input file name and this field ignored.
35
+ attr_accessor :format
36
+
34
37
  # Delimiter of a Csv file
35
38
  attr_accessor :separator
36
39
 
@@ -52,6 +55,7 @@ module GroupDocsConversionCloud
52
55
  # Attribute mapping from ruby-style variable name to JSON key.
53
56
  def self.attribute_map
54
57
  {
58
+ :'format' => :'Format',
55
59
  :'separator' => :'Separator',
56
60
  :'is_multi_encoded' => :'IsMultiEncoded',
57
61
  :'has_formula' => :'HasFormula',
@@ -64,6 +68,7 @@ module GroupDocsConversionCloud
64
68
  # Attribute type mapping.
65
69
  def self.swagger_types
66
70
  {
71
+ :'format' => :'String',
67
72
  :'separator' => :'String',
68
73
  :'is_multi_encoded' => :'BOOLEAN',
69
74
  :'has_formula' => :'BOOLEAN',
@@ -81,6 +86,10 @@ module GroupDocsConversionCloud
81
86
  # convert string to symbol for hash key
82
87
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
83
88
 
89
+ if attributes.key?(:'Format')
90
+ self.format = attributes[:'Format']
91
+ end
92
+
84
93
  if attributes.key?(:'Separator')
85
94
  self.separator = attributes[:'Separator']
86
95
  end
@@ -150,6 +159,7 @@ module GroupDocsConversionCloud
150
159
  def ==(other)
151
160
  return true if self.equal?(other)
152
161
  self.class == other.class &&
162
+ format == other.format &&
153
163
  separator == other.separator &&
154
164
  is_multi_encoded == other.is_multi_encoded &&
155
165
  has_formula == other.has_formula &&
@@ -167,7 +177,7 @@ module GroupDocsConversionCloud
167
177
  # Calculates hash code according to all attributes.
168
178
  # @return [Fixnum] Hash code
169
179
  def hash
170
- [separator, is_multi_encoded, has_formula, convert_numeric_data, convert_date_time_data, encoding].hash
180
+ [format, separator, is_multi_encoded, has_formula, convert_numeric_data, convert_date_time_data, encoding].hash
171
181
  end
172
182
 
173
183
  # Downcases first letter.
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # --------------------------------------------------------------------------------------------------------------------
3
3
  # <copyright company="Aspose Pty Ltd" file="dcm_convert_options.rb">
4
- # Copyright (c) 2003-2021 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2022 Aspose Pty Ltd
5
5
  # </copyright>
6
6
  # <summary>
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # --------------------------------------------------------------------------------------------------------------------
3
3
  # <copyright company="Aspose Pty Ltd" file="dcm_load_options.rb">
4
- # Copyright (c) 2003-2021 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2022 Aspose Pty Ltd
5
5
  # </copyright>
6
6
  # <summary>
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -31,12 +31,16 @@ module GroupDocsConversionCloud
31
31
  # Dcm load options
32
32
  class DcmLoadOptions
33
33
 
34
+ # The format of input file, (\"docx\", for example). This field must be filled with correct input file format when using ConvertDirect method, which accept input file as binary stream, and, because of that, API can correctly handle LoadOptions. In regular conversion, the input file format taken from the input file name and this field ignored.
35
+ attr_accessor :format
36
+
34
37
  # Default font for Psd, Emf, Wmf document types. The following font will be used if a font is missing.
35
38
  attr_accessor :default_font
36
39
 
37
40
  # Attribute mapping from ruby-style variable name to JSON key.
38
41
  def self.attribute_map
39
42
  {
43
+ :'format' => :'Format',
40
44
  :'default_font' => :'DefaultFont'
41
45
  }
42
46
  end
@@ -44,6 +48,7 @@ module GroupDocsConversionCloud
44
48
  # Attribute type mapping.
45
49
  def self.swagger_types
46
50
  {
51
+ :'format' => :'String',
47
52
  :'default_font' => :'String'
48
53
  }
49
54
  end
@@ -56,6 +61,10 @@ module GroupDocsConversionCloud
56
61
  # convert string to symbol for hash key
57
62
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
58
63
 
64
+ if attributes.key?(:'Format')
65
+ self.format = attributes[:'Format']
66
+ end
67
+
59
68
  if attributes.key?(:'DefaultFont')
60
69
  self.default_font = attributes[:'DefaultFont']
61
70
  end
@@ -80,6 +89,7 @@ module GroupDocsConversionCloud
80
89
  def ==(other)
81
90
  return true if self.equal?(other)
82
91
  self.class == other.class &&
92
+ format == other.format &&
83
93
  default_font == other.default_font
84
94
  end
85
95
 
@@ -92,7 +102,7 @@ module GroupDocsConversionCloud
92
102
  # Calculates hash code according to all attributes.
93
103
  # @return [Fixnum] Hash code
94
104
  def hash
95
- [default_font].hash
105
+ [format, default_font].hash
96
106
  end
97
107
 
98
108
  # Downcases first letter.
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # --------------------------------------------------------------------------------------------------------------------
3
3
  # <copyright company="Aspose Pty Ltd" file="dgn_load_options.rb">
4
- # Copyright (c) 2003-2021 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2022 Aspose Pty Ltd
5
5
  # </copyright>
6
6
  # <summary>
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -31,6 +31,9 @@ module GroupDocsConversionCloud
31
31
  # Dgn load options
32
32
  class DgnLoadOptions
33
33
 
34
+ # The format of input file, (\"docx\", for example). This field must be filled with correct input file format when using ConvertDirect method, which accept input file as binary stream, and, because of that, API can correctly handle LoadOptions. In regular conversion, the input file format taken from the input file name and this field ignored.
35
+ attr_accessor :format
36
+
34
37
  # Set desired page width for converting CAD document
35
38
  attr_accessor :width
36
39
 
@@ -43,6 +46,7 @@ module GroupDocsConversionCloud
43
46
  # Attribute mapping from ruby-style variable name to JSON key.
44
47
  def self.attribute_map
45
48
  {
49
+ :'format' => :'Format',
46
50
  :'width' => :'Width',
47
51
  :'height' => :'Height',
48
52
  :'layout_names' => :'LayoutNames'
@@ -52,6 +56,7 @@ module GroupDocsConversionCloud
52
56
  # Attribute type mapping.
53
57
  def self.swagger_types
54
58
  {
59
+ :'format' => :'String',
55
60
  :'width' => :'Integer',
56
61
  :'height' => :'Integer',
57
62
  :'layout_names' => :'Array<String>'
@@ -66,6 +71,10 @@ module GroupDocsConversionCloud
66
71
  # convert string to symbol for hash key
67
72
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
68
73
 
74
+ if attributes.key?(:'Format')
75
+ self.format = attributes[:'Format']
76
+ end
77
+
69
78
  if attributes.key?(:'Width')
70
79
  self.width = attributes[:'Width']
71
80
  end
@@ -110,6 +119,7 @@ module GroupDocsConversionCloud
110
119
  def ==(other)
111
120
  return true if self.equal?(other)
112
121
  self.class == other.class &&
122
+ format == other.format &&
113
123
  width == other.width &&
114
124
  height == other.height &&
115
125
  layout_names == other.layout_names
@@ -124,7 +134,7 @@ module GroupDocsConversionCloud
124
134
  # Calculates hash code according to all attributes.
125
135
  # @return [Fixnum] Hash code
126
136
  def hash
127
- [width, height, layout_names].hash
137
+ [format, width, height, layout_names].hash
128
138
  end
129
139
 
130
140
  # Downcases first letter.
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # --------------------------------------------------------------------------------------------------------------------
3
3
  # <copyright company="Aspose Pty Ltd" file="diagram_load_options.rb">
4
- # Copyright (c) 2003-2021 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2022 Aspose Pty Ltd
5
5
  # </copyright>
6
6
  # <summary>
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -31,12 +31,16 @@ module GroupDocsConversionCloud
31
31
  # Diagram document load options
32
32
  class DiagramLoadOptions
33
33
 
34
+ # The format of input file, (\"docx\", for example). This field must be filled with correct input file format when using ConvertDirect method, which accept input file as binary stream, and, because of that, API can correctly handle LoadOptions. In regular conversion, the input file format taken from the input file name and this field ignored.
35
+ attr_accessor :format
36
+
34
37
  # Default font for Diagram document. The following font will be used if a font is missing.
35
38
  attr_accessor :default_font
36
39
 
37
40
  # Attribute mapping from ruby-style variable name to JSON key.
38
41
  def self.attribute_map
39
42
  {
43
+ :'format' => :'Format',
40
44
  :'default_font' => :'DefaultFont'
41
45
  }
42
46
  end
@@ -44,6 +48,7 @@ module GroupDocsConversionCloud
44
48
  # Attribute type mapping.
45
49
  def self.swagger_types
46
50
  {
51
+ :'format' => :'String',
47
52
  :'default_font' => :'String'
48
53
  }
49
54
  end
@@ -56,6 +61,10 @@ module GroupDocsConversionCloud
56
61
  # convert string to symbol for hash key
57
62
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
58
63
 
64
+ if attributes.key?(:'Format')
65
+ self.format = attributes[:'Format']
66
+ end
67
+
59
68
  if attributes.key?(:'DefaultFont')
60
69
  self.default_font = attributes[:'DefaultFont']
61
70
  end
@@ -80,6 +89,7 @@ module GroupDocsConversionCloud
80
89
  def ==(other)
81
90
  return true if self.equal?(other)
82
91
  self.class == other.class &&
92
+ format == other.format &&
83
93
  default_font == other.default_font
84
94
  end
85
95
 
@@ -92,7 +102,7 @@ module GroupDocsConversionCloud
92
102
  # Calculates hash code according to all attributes.
93
103
  # @return [Fixnum] Hash code
94
104
  def hash
95
- [default_font].hash
105
+ [format, default_font].hash
96
106
  end
97
107
 
98
108
  # Downcases first letter.
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # --------------------------------------------------------------------------------------------------------------------
3
3
  # <copyright company="Aspose Pty Ltd" file="disc_usage.rb">
4
- # Copyright (c) 2003-2021 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2022 Aspose Pty Ltd
5
5
  # </copyright>
6
6
  # <summary>
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # --------------------------------------------------------------------------------------------------------------------
3
3
  # <copyright company="Aspose Pty Ltd" file="djvu_convert_options.rb">
4
- # Copyright (c) 2003-2021 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2022 Aspose Pty Ltd
5
5
  # </copyright>
6
6
  # <summary>
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # --------------------------------------------------------------------------------------------------------------------
3
3
  # <copyright company="Aspose Pty Ltd" file="dng_convert_options.rb">
4
- # Copyright (c) 2003-2021 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2022 Aspose Pty Ltd
5
5
  # </copyright>
6
6
  # <summary>
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # --------------------------------------------------------------------------------------------------------------------
3
3
  # <copyright company="Aspose Pty Ltd" file="dng_load_options.rb">
4
- # Copyright (c) 2003-2021 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2022 Aspose Pty Ltd
5
5
  # </copyright>
6
6
  # <summary>
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -31,12 +31,16 @@ module GroupDocsConversionCloud
31
31
  # Dng load options
32
32
  class DngLoadOptions
33
33
 
34
+ # The format of input file, (\"docx\", for example). This field must be filled with correct input file format when using ConvertDirect method, which accept input file as binary stream, and, because of that, API can correctly handle LoadOptions. In regular conversion, the input file format taken from the input file name and this field ignored.
35
+ attr_accessor :format
36
+
34
37
  # Default font for Psd, Emf, Wmf document types. The following font will be used if a font is missing.
35
38
  attr_accessor :default_font
36
39
 
37
40
  # Attribute mapping from ruby-style variable name to JSON key.
38
41
  def self.attribute_map
39
42
  {
43
+ :'format' => :'Format',
40
44
  :'default_font' => :'DefaultFont'
41
45
  }
42
46
  end
@@ -44,6 +48,7 @@ module GroupDocsConversionCloud
44
48
  # Attribute type mapping.
45
49
  def self.swagger_types
46
50
  {
51
+ :'format' => :'String',
47
52
  :'default_font' => :'String'
48
53
  }
49
54
  end
@@ -56,6 +61,10 @@ module GroupDocsConversionCloud
56
61
  # convert string to symbol for hash key
57
62
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
58
63
 
64
+ if attributes.key?(:'Format')
65
+ self.format = attributes[:'Format']
66
+ end
67
+
59
68
  if attributes.key?(:'DefaultFont')
60
69
  self.default_font = attributes[:'DefaultFont']
61
70
  end
@@ -80,6 +89,7 @@ module GroupDocsConversionCloud
80
89
  def ==(other)
81
90
  return true if self.equal?(other)
82
91
  self.class == other.class &&
92
+ format == other.format &&
83
93
  default_font == other.default_font
84
94
  end
85
95
 
@@ -92,7 +102,7 @@ module GroupDocsConversionCloud
92
102
  # Calculates hash code according to all attributes.
93
103
  # @return [Fixnum] Hash code
94
104
  def hash
95
- [default_font].hash
105
+ [format, default_font].hash
96
106
  end
97
107
 
98
108
  # Downcases first letter.