groupdocs_conversion_cloud 25.8 → 25.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. checksums.yaml +4 -4
  2. data/lib/groupdocs_conversion_cloud/models/{vsd_load_options.rb → compression_load_options.rb} +11 -11
  3. data/lib/groupdocs_conversion_cloud/models/database_load_options.rb +214 -0
  4. data/lib/groupdocs_conversion_cloud/models/e_book_load_options.rb +214 -0
  5. data/lib/groupdocs_conversion_cloud/models/finance_load_options.rb +214 -0
  6. data/lib/groupdocs_conversion_cloud/models/{vsdx_load_options.rb → font_load_options.rb} +7 -17
  7. data/lib/groupdocs_conversion_cloud/models/{bmp_load_options.rb → gis_load_options.rb} +31 -11
  8. data/lib/groupdocs_conversion_cloud/models/{vsdm_load_options.rb → mbox_load_options.rb} +7 -17
  9. data/lib/groupdocs_conversion_cloud/models/{one_load_options.rb → note_load_options.rb} +2 -2
  10. data/lib/groupdocs_conversion_cloud/models/{vdw_load_options.rb → olm_load_options.rb} +11 -11
  11. data/lib/groupdocs_conversion_cloud/models/{vss_load_options.rb → pdl_load_options.rb} +7 -17
  12. data/lib/groupdocs_conversion_cloud/models/pub_load_options.rb +214 -0
  13. data/lib/groupdocs_conversion_cloud/models/three_d_load_options.rb +214 -0
  14. data/lib/groupdocs_conversion_cloud/models/{vdx_load_options.rb → vcf_load_options.rb} +11 -11
  15. data/lib/groupdocs_conversion_cloud/version.rb +1 -1
  16. data/lib/groupdocs_conversion_cloud.rb +13 -80
  17. metadata +15 -82
  18. data/lib/groupdocs_conversion_cloud/models/cf2_load_options.rb +0 -298
  19. data/lib/groupdocs_conversion_cloud/models/dcm_load_options.rb +0 -224
  20. data/lib/groupdocs_conversion_cloud/models/dgn_load_options.rb +0 -298
  21. data/lib/groupdocs_conversion_cloud/models/dng_load_options.rb +0 -224
  22. data/lib/groupdocs_conversion_cloud/models/doc_load_options.rb +0 -658
  23. data/lib/groupdocs_conversion_cloud/models/docm_load_options.rb +0 -658
  24. data/lib/groupdocs_conversion_cloud/models/docx_load_options.rb +0 -658
  25. data/lib/groupdocs_conversion_cloud/models/dot_load_options.rb +0 -658
  26. data/lib/groupdocs_conversion_cloud/models/dotm_load_options.rb +0 -658
  27. data/lib/groupdocs_conversion_cloud/models/dotx_load_options.rb +0 -658
  28. data/lib/groupdocs_conversion_cloud/models/dwf_load_options.rb +0 -298
  29. data/lib/groupdocs_conversion_cloud/models/dwfx_load_options.rb +0 -298
  30. data/lib/groupdocs_conversion_cloud/models/dwg_load_options.rb +0 -298
  31. data/lib/groupdocs_conversion_cloud/models/dwt_load_options.rb +0 -298
  32. data/lib/groupdocs_conversion_cloud/models/dxf_load_options.rb +0 -298
  33. data/lib/groupdocs_conversion_cloud/models/emf_load_options.rb +0 -224
  34. data/lib/groupdocs_conversion_cloud/models/eml_load_options.rb +0 -406
  35. data/lib/groupdocs_conversion_cloud/models/emlx_load_options.rb +0 -406
  36. data/lib/groupdocs_conversion_cloud/models/gif_load_options.rb +0 -224
  37. data/lib/groupdocs_conversion_cloud/models/ico_load_options.rb +0 -224
  38. data/lib/groupdocs_conversion_cloud/models/ifc_load_options.rb +0 -298
  39. data/lib/groupdocs_conversion_cloud/models/igs_load_options.rb +0 -298
  40. data/lib/groupdocs_conversion_cloud/models/j2c_load_options.rb +0 -224
  41. data/lib/groupdocs_conversion_cloud/models/j2k_load_options.rb +0 -224
  42. data/lib/groupdocs_conversion_cloud/models/jp2_load_options.rb +0 -224
  43. data/lib/groupdocs_conversion_cloud/models/jpeg_load_options.rb +0 -224
  44. data/lib/groupdocs_conversion_cloud/models/jpf_load_options.rb +0 -224
  45. data/lib/groupdocs_conversion_cloud/models/jpg_load_options.rb +0 -224
  46. data/lib/groupdocs_conversion_cloud/models/jpm_load_options.rb +0 -224
  47. data/lib/groupdocs_conversion_cloud/models/jpx_load_options.rb +0 -224
  48. data/lib/groupdocs_conversion_cloud/models/mht_load_options.rb +0 -406
  49. data/lib/groupdocs_conversion_cloud/models/mobi_load_options.rb +0 -658
  50. data/lib/groupdocs_conversion_cloud/models/msg_load_options.rb +0 -406
  51. data/lib/groupdocs_conversion_cloud/models/odg_load_options.rb +0 -224
  52. data/lib/groupdocs_conversion_cloud/models/odp_load_options.rb +0 -434
  53. data/lib/groupdocs_conversion_cloud/models/ods_load_options.rb +0 -537
  54. data/lib/groupdocs_conversion_cloud/models/odt_load_options.rb +0 -658
  55. data/lib/groupdocs_conversion_cloud/models/ost_load_options.rb +0 -406
  56. data/lib/groupdocs_conversion_cloud/models/otp_load_options.rb +0 -434
  57. data/lib/groupdocs_conversion_cloud/models/ots_load_options.rb +0 -537
  58. data/lib/groupdocs_conversion_cloud/models/ott_load_options.rb +0 -658
  59. data/lib/groupdocs_conversion_cloud/models/plt_load_options.rb +0 -298
  60. data/lib/groupdocs_conversion_cloud/models/png_load_options.rb +0 -224
  61. data/lib/groupdocs_conversion_cloud/models/potm_load_options.rb +0 -434
  62. data/lib/groupdocs_conversion_cloud/models/potx_load_options.rb +0 -434
  63. data/lib/groupdocs_conversion_cloud/models/pps_load_options.rb +0 -434
  64. data/lib/groupdocs_conversion_cloud/models/ppsm_load_options.rb +0 -434
  65. data/lib/groupdocs_conversion_cloud/models/ppsx_load_options.rb +0 -434
  66. data/lib/groupdocs_conversion_cloud/models/ppt_load_options.rb +0 -434
  67. data/lib/groupdocs_conversion_cloud/models/pptm_load_options.rb +0 -434
  68. data/lib/groupdocs_conversion_cloud/models/pptx_load_options.rb +0 -434
  69. data/lib/groupdocs_conversion_cloud/models/psd_load_options.rb +0 -224
  70. data/lib/groupdocs_conversion_cloud/models/pst_load_options.rb +0 -406
  71. data/lib/groupdocs_conversion_cloud/models/stl_load_options.rb +0 -298
  72. data/lib/groupdocs_conversion_cloud/models/tif_load_options.rb +0 -224
  73. data/lib/groupdocs_conversion_cloud/models/tiff_load_options.rb +0 -224
  74. data/lib/groupdocs_conversion_cloud/models/vssm_load_options.rb +0 -224
  75. data/lib/groupdocs_conversion_cloud/models/vssx_load_options.rb +0 -224
  76. data/lib/groupdocs_conversion_cloud/models/vst_load_options.rb +0 -224
  77. data/lib/groupdocs_conversion_cloud/models/vstm_load_options.rb +0 -224
  78. data/lib/groupdocs_conversion_cloud/models/vstx_load_options.rb +0 -224
  79. data/lib/groupdocs_conversion_cloud/models/vsx_load_options.rb +0 -224
  80. data/lib/groupdocs_conversion_cloud/models/vtx_load_options.rb +0 -224
  81. data/lib/groupdocs_conversion_cloud/models/webp_load_options.rb +0 -224
  82. data/lib/groupdocs_conversion_cloud/models/wmf_load_options.rb +0 -224
  83. data/lib/groupdocs_conversion_cloud/models/xls2003_load_options.rb +0 -537
  84. data/lib/groupdocs_conversion_cloud/models/xls_load_options.rb +0 -537
  85. data/lib/groupdocs_conversion_cloud/models/xlsb_load_options.rb +0 -537
  86. data/lib/groupdocs_conversion_cloud/models/xlsm_load_options.rb +0 -537
  87. data/lib/groupdocs_conversion_cloud/models/xlsx_load_options.rb +0 -537
  88. data/lib/groupdocs_conversion_cloud/models/xltm_load_options.rb +0 -537
  89. data/lib/groupdocs_conversion_cloud/models/xltx_load_options.rb +0 -537
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 704f579bb65790f457853db3c4097dcf65dfa8705fecc9411bb80279a33fe0bf
4
- data.tar.gz: fe279c543d6bab8a5a9e6422dad6657f244bf18d3d298184daa1c8fcf2c4773d
3
+ metadata.gz: dca78fab814347fd9ce87445fe6b5ecd8c0220369c7b644c1c74b32b7f44b6f3
4
+ data.tar.gz: 8c16c60d1be54aee9c12724211b7b22c53f4e4d4d70407cc69ecff0f2560ea79
5
5
  SHA512:
6
- metadata.gz: 2c492a18e3d3d22e2d26b1997c6de86b55061b7e3cb0527d295917da38d3ff997055637fdb3210ea1da0751a4a1219b2781d5d89fa7b0dbe84714b276236e939
7
- data.tar.gz: 5354cc1cdddaa0c93ea11a08773206b607c8d08c413ed4b3352dbaf1aa32b7e26b9f4872b4e88b25bf87a0c3860ec2bf1e841ac5b3a17571c8e863925c1df383
6
+ metadata.gz: 84ca6325318d6adbfa1a9476aa911beb4b22586a32b8dc3aa6784cd1ef76651fca4248c5ecbba0c72b3882543ba2cf92cade7a98f55585a3a7e30c8ab91d2862
7
+ data.tar.gz: 3fae745f9f38d4911c5b8a43113d88d68a2e8c06d980737c903b2c6acf45fa47eb736a8562e2c383bdcfe799d30b902aba2d59b8549aa600d90100fb3eff9091
@@ -1,6 +1,6 @@
1
1
  #
2
2
  # --------------------------------------------------------------------------------------------------------------------
3
- # <copyright company="Aspose Pty Ltd" file="vsd_load_options.rb">
3
+ # <copyright company="Aspose Pty Ltd" file="compression_load_options.rb">
4
4
  # Copyright (c) Aspose Pty Ltd
5
5
  # </copyright>
6
6
  # <summary>
@@ -28,20 +28,20 @@
28
28
  require 'date'
29
29
 
30
30
  module GroupDocsConversionCloud
31
- # Vsd load options
32
- class VsdLoadOptions
31
+ # Options for loading compression documents
32
+ class CompressionLoadOptions
33
33
 
34
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
35
  attr_accessor :format
36
36
 
37
- # Default font for Diagram document. The following font will be used if a font is missing.
38
- attr_accessor :default_font
37
+ # Set password to load protected document.
38
+ attr_accessor :password
39
39
 
40
40
  # Attribute mapping from ruby-style variable name to JSON key.
41
41
  def self.attribute_map
42
42
  {
43
43
  :'format' => :'Format',
44
- :'default_font' => :'DefaultFont'
44
+ :'password' => :'Password'
45
45
  }
46
46
  end
47
47
 
@@ -49,7 +49,7 @@ module GroupDocsConversionCloud
49
49
  def self.swagger_types
50
50
  {
51
51
  :'format' => :'String',
52
- :'default_font' => :'String'
52
+ :'password' => :'String'
53
53
  }
54
54
  end
55
55
 
@@ -65,8 +65,8 @@ module GroupDocsConversionCloud
65
65
  self.format = attributes[:'Format']
66
66
  end
67
67
 
68
- if attributes.key?(:'DefaultFont')
69
- self.default_font = attributes[:'DefaultFont']
68
+ if attributes.key?(:'Password')
69
+ self.password = attributes[:'Password']
70
70
  end
71
71
 
72
72
  end
@@ -90,7 +90,7 @@ module GroupDocsConversionCloud
90
90
  return true if self.equal?(other)
91
91
  self.class == other.class &&
92
92
  format == other.format &&
93
- default_font == other.default_font
93
+ password == other.password
94
94
  end
95
95
 
96
96
  # @see the `==` method
@@ -102,7 +102,7 @@ module GroupDocsConversionCloud
102
102
  # Calculates hash code according to all attributes.
103
103
  # @return [Fixnum] Hash code
104
104
  def hash
105
- [format, default_font].hash
105
+ [format, password].hash
106
106
  end
107
107
 
108
108
  # Downcases first letter.
@@ -0,0 +1,214 @@
1
+ #
2
+ # --------------------------------------------------------------------------------------------------------------------
3
+ # <copyright company="Aspose Pty Ltd" file="database_load_options.rb">
4
+ # Copyright (c) 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
+ # Options for loading Database documents
32
+ class DatabaseLoadOptions
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
+
37
+ # Attribute mapping from ruby-style variable name to JSON key.
38
+ def self.attribute_map
39
+ {
40
+ :'format' => :'Format'
41
+ }
42
+ end
43
+
44
+ # Attribute type mapping.
45
+ def self.swagger_types
46
+ {
47
+ :'format' => :'String'
48
+ }
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ return unless attributes.is_a?(Hash)
55
+
56
+ # convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
58
+
59
+ if attributes.key?(:'Format')
60
+ self.format = attributes[:'Format']
61
+ end
62
+
63
+ end
64
+
65
+ # Show invalid properties with the reasons. Usually used together with valid?
66
+ # @return Array for valid properies with the reasons
67
+ def list_invalid_properties
68
+ invalid_properties = []
69
+ return invalid_properties
70
+ end
71
+
72
+ # Check to see if the all the properties in the model are valid
73
+ # @return true if the model is valid
74
+ def valid?
75
+ return true
76
+ end
77
+
78
+ # Checks equality by comparing each attribute.
79
+ # @param [Object] Object to be compared
80
+ def ==(other)
81
+ return true if self.equal?(other)
82
+ self.class == other.class &&
83
+ format == other.format
84
+ end
85
+
86
+ # @see the `==` method
87
+ # @param [Object] Object to be compared
88
+ def eql?(other)
89
+ self == other
90
+ end
91
+
92
+ # Calculates hash code according to all attributes.
93
+ # @return [Fixnum] Hash code
94
+ def hash
95
+ [format].hash
96
+ end
97
+
98
+ # Downcases first letter.
99
+ # @return downcased string
100
+ def uncap(str)
101
+ str[0, 1].downcase + str[1..-1]
102
+ end
103
+
104
+ # Builds the object from hash
105
+ # @param [Hash] attributes Model attributes in the form of hash
106
+ # @return [Object] Returns the model itself
107
+ def build_from_hash(attributes)
108
+ return nil unless attributes.is_a?(Hash)
109
+ self.class.swagger_types.each_pair do |key, type|
110
+ pname = uncap(self.class.attribute_map[key]).intern
111
+ value = attributes[pname]
112
+ if type =~ /\AArray<(.*)>/i
113
+ # check to ensure the input is an array given that the the attribute
114
+ # is documented as an array but the input is not
115
+ if value.is_a?(Array)
116
+ self.send("#{key}=", value.map { |v| _deserialize($1, v) })
117
+ end
118
+ elsif !value.nil?
119
+ self.send("#{key}=", _deserialize(type, value))
120
+ end
121
+ # or else data not found in attributes(hash), not an issue as the data can be optional
122
+ end
123
+
124
+ self
125
+ end
126
+
127
+ # Deserializes the data based on type
128
+ # @param string type Data type
129
+ # @param string value Value to be deserialized
130
+ # @return [Object] Deserialized data
131
+ def _deserialize(type, value)
132
+ case type.to_sym
133
+ when :DateTime
134
+ Date.parse value
135
+ when :Date
136
+ Date.parse value
137
+ when :String
138
+ value.to_s
139
+ when :Integer
140
+ value.to_i
141
+ when :Float
142
+ value.to_f
143
+ when :BOOLEAN
144
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
145
+ true
146
+ else
147
+ false
148
+ end
149
+ when :Object
150
+ # generic object (usually a Hash), return directly
151
+ value
152
+ when /\AArray<(?<inner_type>.+)>\z/
153
+ inner_type = Regexp.last_match[:inner_type]
154
+ value.map { |v| _deserialize(inner_type, v) }
155
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
156
+ k_type = Regexp.last_match[:k_type]
157
+ v_type = Regexp.last_match[:v_type]
158
+ {}.tap do |hash|
159
+ value.each do |k, v|
160
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
161
+ end
162
+ end
163
+ else
164
+ # model
165
+ temp_model = GroupDocsConversionCloud.const_get(type).new
166
+ temp_model.build_from_hash(value)
167
+ end
168
+ end
169
+
170
+ # Returns the string representation of the object
171
+ # @return [String] String presentation of the object
172
+ def to_s
173
+ to_hash.to_s
174
+ end
175
+
176
+ # to_body is an alias to to_hash (backward compatibility)
177
+ # @return [Hash] Returns the object in the form of hash
178
+ def to_body
179
+ to_hash
180
+ end
181
+
182
+ # Returns the object in the form of hash
183
+ # @return [Hash] Returns the object in the form of hash
184
+ def to_hash
185
+ hash = {}
186
+ self.class.attribute_map.each_pair do |attr, param|
187
+ value = self.send(attr)
188
+ next if value.nil?
189
+ hash[param] = _to_hash(value)
190
+ end
191
+ hash
192
+ end
193
+
194
+ # Outputs non-array value in the form of hash
195
+ # For object, use to_hash. Otherwise, just return the value
196
+ # @param [Object] value Any valid value
197
+ # @return [Hash] Returns the value in the form of hash
198
+ def _to_hash(value)
199
+ if value.is_a?(Array)
200
+ value.compact.map { |v| _to_hash(v) }
201
+ elsif value.is_a?(Hash)
202
+ {}.tap do |hash|
203
+ value.each { |k, v| hash[k] = _to_hash(v) }
204
+ end
205
+ elsif value.respond_to? :to_hash
206
+ value.to_hash
207
+ else
208
+ value
209
+ end
210
+ end
211
+
212
+ end
213
+
214
+ end
@@ -0,0 +1,214 @@
1
+ #
2
+ # --------------------------------------------------------------------------------------------------------------------
3
+ # <copyright company="Aspose Pty Ltd" file="e_book_load_options.rb">
4
+ # Copyright (c) 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
+ # Options for loading e-book documents
32
+ class EBookLoadOptions
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
+
37
+ # Attribute mapping from ruby-style variable name to JSON key.
38
+ def self.attribute_map
39
+ {
40
+ :'format' => :'Format'
41
+ }
42
+ end
43
+
44
+ # Attribute type mapping.
45
+ def self.swagger_types
46
+ {
47
+ :'format' => :'String'
48
+ }
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ return unless attributes.is_a?(Hash)
55
+
56
+ # convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
58
+
59
+ if attributes.key?(:'Format')
60
+ self.format = attributes[:'Format']
61
+ end
62
+
63
+ end
64
+
65
+ # Show invalid properties with the reasons. Usually used together with valid?
66
+ # @return Array for valid properies with the reasons
67
+ def list_invalid_properties
68
+ invalid_properties = []
69
+ return invalid_properties
70
+ end
71
+
72
+ # Check to see if the all the properties in the model are valid
73
+ # @return true if the model is valid
74
+ def valid?
75
+ return true
76
+ end
77
+
78
+ # Checks equality by comparing each attribute.
79
+ # @param [Object] Object to be compared
80
+ def ==(other)
81
+ return true if self.equal?(other)
82
+ self.class == other.class &&
83
+ format == other.format
84
+ end
85
+
86
+ # @see the `==` method
87
+ # @param [Object] Object to be compared
88
+ def eql?(other)
89
+ self == other
90
+ end
91
+
92
+ # Calculates hash code according to all attributes.
93
+ # @return [Fixnum] Hash code
94
+ def hash
95
+ [format].hash
96
+ end
97
+
98
+ # Downcases first letter.
99
+ # @return downcased string
100
+ def uncap(str)
101
+ str[0, 1].downcase + str[1..-1]
102
+ end
103
+
104
+ # Builds the object from hash
105
+ # @param [Hash] attributes Model attributes in the form of hash
106
+ # @return [Object] Returns the model itself
107
+ def build_from_hash(attributes)
108
+ return nil unless attributes.is_a?(Hash)
109
+ self.class.swagger_types.each_pair do |key, type|
110
+ pname = uncap(self.class.attribute_map[key]).intern
111
+ value = attributes[pname]
112
+ if type =~ /\AArray<(.*)>/i
113
+ # check to ensure the input is an array given that the the attribute
114
+ # is documented as an array but the input is not
115
+ if value.is_a?(Array)
116
+ self.send("#{key}=", value.map { |v| _deserialize($1, v) })
117
+ end
118
+ elsif !value.nil?
119
+ self.send("#{key}=", _deserialize(type, value))
120
+ end
121
+ # or else data not found in attributes(hash), not an issue as the data can be optional
122
+ end
123
+
124
+ self
125
+ end
126
+
127
+ # Deserializes the data based on type
128
+ # @param string type Data type
129
+ # @param string value Value to be deserialized
130
+ # @return [Object] Deserialized data
131
+ def _deserialize(type, value)
132
+ case type.to_sym
133
+ when :DateTime
134
+ Date.parse value
135
+ when :Date
136
+ Date.parse value
137
+ when :String
138
+ value.to_s
139
+ when :Integer
140
+ value.to_i
141
+ when :Float
142
+ value.to_f
143
+ when :BOOLEAN
144
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
145
+ true
146
+ else
147
+ false
148
+ end
149
+ when :Object
150
+ # generic object (usually a Hash), return directly
151
+ value
152
+ when /\AArray<(?<inner_type>.+)>\z/
153
+ inner_type = Regexp.last_match[:inner_type]
154
+ value.map { |v| _deserialize(inner_type, v) }
155
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
156
+ k_type = Regexp.last_match[:k_type]
157
+ v_type = Regexp.last_match[:v_type]
158
+ {}.tap do |hash|
159
+ value.each do |k, v|
160
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
161
+ end
162
+ end
163
+ else
164
+ # model
165
+ temp_model = GroupDocsConversionCloud.const_get(type).new
166
+ temp_model.build_from_hash(value)
167
+ end
168
+ end
169
+
170
+ # Returns the string representation of the object
171
+ # @return [String] String presentation of the object
172
+ def to_s
173
+ to_hash.to_s
174
+ end
175
+
176
+ # to_body is an alias to to_hash (backward compatibility)
177
+ # @return [Hash] Returns the object in the form of hash
178
+ def to_body
179
+ to_hash
180
+ end
181
+
182
+ # Returns the object in the form of hash
183
+ # @return [Hash] Returns the object in the form of hash
184
+ def to_hash
185
+ hash = {}
186
+ self.class.attribute_map.each_pair do |attr, param|
187
+ value = self.send(attr)
188
+ next if value.nil?
189
+ hash[param] = _to_hash(value)
190
+ end
191
+ hash
192
+ end
193
+
194
+ # Outputs non-array value in the form of hash
195
+ # For object, use to_hash. Otherwise, just return the value
196
+ # @param [Object] value Any valid value
197
+ # @return [Hash] Returns the value in the form of hash
198
+ def _to_hash(value)
199
+ if value.is_a?(Array)
200
+ value.compact.map { |v| _to_hash(v) }
201
+ elsif value.is_a?(Hash)
202
+ {}.tap do |hash|
203
+ value.each { |k, v| hash[k] = _to_hash(v) }
204
+ end
205
+ elsif value.respond_to? :to_hash
206
+ value.to_hash
207
+ else
208
+ value
209
+ end
210
+ end
211
+
212
+ end
213
+
214
+ end