groupdocs_annotation_cloud 18.7

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 (34) hide show
  1. checksums.yaml +7 -0
  2. data/lib/groupdocs_annotation_cloud/api/annotation_api.rb +344 -0
  3. data/lib/groupdocs_annotation_cloud/api/image_info_api.rb +218 -0
  4. data/lib/groupdocs_annotation_cloud/api/image_pages_api.rb +395 -0
  5. data/lib/groupdocs_annotation_cloud/api/pdf_file_api.rb +281 -0
  6. data/lib/groupdocs_annotation_cloud/api_client.rb +390 -0
  7. data/lib/groupdocs_annotation_cloud/api_error.rb +56 -0
  8. data/lib/groupdocs_annotation_cloud/configuration.rb +95 -0
  9. data/lib/groupdocs_annotation_cloud/models/annotation_api_link.rb +236 -0
  10. data/lib/groupdocs_annotation_cloud/models/annotation_info.rb +504 -0
  11. data/lib/groupdocs_annotation_cloud/models/annotation_reply_info.rb +271 -0
  12. data/lib/groupdocs_annotation_cloud/models/document_info.rb +264 -0
  13. data/lib/groupdocs_annotation_cloud/models/image_page.rb +214 -0
  14. data/lib/groupdocs_annotation_cloud/models/image_pages.rb +219 -0
  15. data/lib/groupdocs_annotation_cloud/models/link.rb +236 -0
  16. data/lib/groupdocs_annotation_cloud/models/link_element.rb +206 -0
  17. data/lib/groupdocs_annotation_cloud/models/page_info.rb +258 -0
  18. data/lib/groupdocs_annotation_cloud/models/point.rb +216 -0
  19. data/lib/groupdocs_annotation_cloud/models/rectangle.rb +236 -0
  20. data/lib/groupdocs_annotation_cloud/models/requests/delete_clean_document_request.rb +53 -0
  21. data/lib/groupdocs_annotation_cloud/models/requests/delete_pages_request.rb +49 -0
  22. data/lib/groupdocs_annotation_cloud/models/requests/get_import_request.rb +53 -0
  23. data/lib/groupdocs_annotation_cloud/models/requests/get_info_request.rb +53 -0
  24. data/lib/groupdocs_annotation_cloud/models/requests/get_page_request.rb +53 -0
  25. data/lib/groupdocs_annotation_cloud/models/requests/get_pages_request.rb +49 -0
  26. data/lib/groupdocs_annotation_cloud/models/requests/get_pdf_request.rb +53 -0
  27. data/lib/groupdocs_annotation_cloud/models/requests/get_pdf_stream_request.rb +53 -0
  28. data/lib/groupdocs_annotation_cloud/models/requests/post_pages_request.rb +53 -0
  29. data/lib/groupdocs_annotation_cloud/models/requests/put_export_request.rb +57 -0
  30. data/lib/groupdocs_annotation_cloud/models/row_info.rb +276 -0
  31. data/lib/groupdocs_annotation_cloud/models/value_type.rb +196 -0
  32. data/lib/groupdocs_annotation_cloud/version.rb +29 -0
  33. data/lib/groupdocs_annotation_cloud.rb +80 -0
  34. metadata +164 -0
@@ -0,0 +1,53 @@
1
+ #
2
+ # --------------------------------------------------------------------------------------------------------------------
3
+ # <copyright company="Aspose Pty Ltd" file="post_pages_request.rb">
4
+ # Copyright (c) 2003-2018 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
+ module GroupDocsAnnotationCloud
29
+
30
+ #
31
+ # Request model for post_pages operation.
32
+ #
33
+ class PostPagesRequest
34
+
35
+ # The document name.
36
+ attr_accessor :name
37
+ # The folder name.
38
+ attr_accessor :folder
39
+ # The document password.
40
+ attr_accessor :password
41
+
42
+ #
43
+ # Initializes a new instance.
44
+ # @param name The document name.
45
+ # @param folder The folder name.
46
+ # @param password The document password.
47
+ def initialize(name, folder = nil, password = nil)
48
+ self.name = name
49
+ self.folder = folder
50
+ self.password = password
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,57 @@
1
+ #
2
+ # --------------------------------------------------------------------------------------------------------------------
3
+ # <copyright company="Aspose Pty Ltd" file="put_export_request.rb">
4
+ # Copyright (c) 2003-2018 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
+ module GroupDocsAnnotationCloud
29
+
30
+ #
31
+ # Request model for put_export operation.
32
+ #
33
+ class PutExportRequest
34
+
35
+ # The document name.
36
+ attr_accessor :name
37
+ # Gets or sets body
38
+ attr_accessor :body
39
+ # The folder name.
40
+ attr_accessor :folder
41
+ # Gets or sets password
42
+ attr_accessor :password
43
+
44
+ #
45
+ # Initializes a new instance.
46
+ # @param name The document name.
47
+ # @param body
48
+ # @param folder The folder name.
49
+ # @param password
50
+ def initialize(name, body = nil, folder = nil, password = nil)
51
+ self.name = name
52
+ self.body = body
53
+ self.folder = folder
54
+ self.password = password
55
+ end
56
+ end
57
+ end
@@ -0,0 +1,276 @@
1
+ #
2
+ # --------------------------------------------------------------------------------------------------------------------
3
+ # <copyright company="Aspose Pty Ltd" file="row_info.rb">
4
+ # Copyright (c) 2003-2018 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 GroupDocsAnnotationCloud
31
+
32
+ class RowInfo
33
+ attr_accessor :character_coordinates
34
+ attr_accessor :line_height
35
+ attr_accessor :line_left
36
+ attr_accessor :line_top
37
+ attr_accessor :line_width
38
+ attr_accessor :text
39
+ attr_accessor :text_coordinates
40
+
41
+ # Attribute mapping from ruby-style variable name to JSON key.
42
+ def self.attribute_map
43
+ {
44
+ :'character_coordinates' => :'characterCoordinates',
45
+ :'line_height' => :'lineHeight',
46
+ :'line_left' => :'lineLeft',
47
+ :'line_top' => :'lineTop',
48
+ :'line_width' => :'lineWidth',
49
+ :'text' => :'text',
50
+ :'text_coordinates' => :'textCoordinates'
51
+ }
52
+ end
53
+
54
+ # Attribute type mapping.
55
+ def self.swagger_types
56
+ {
57
+ :'character_coordinates' => :'Array<Float>',
58
+ :'line_height' => :'Float',
59
+ :'line_left' => :'Float',
60
+ :'line_top' => :'Float',
61
+ :'line_width' => :'Float',
62
+ :'text' => :'String',
63
+ :'text_coordinates' => :'Array<Float>'
64
+ }
65
+ end
66
+
67
+ # Initializes the object
68
+ # @param [Hash] attributes Model attributes in the form of hash
69
+ def initialize(attributes = {})
70
+ return unless attributes.is_a?(Hash)
71
+
72
+ # convert string to symbol for hash key
73
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
74
+
75
+ if attributes.key?(:'CharacterCoordinates')
76
+ if (value = attributes[:'CharacterCoordinates']).is_a?(Array)
77
+ self.character_coordinates = value
78
+ end
79
+ end
80
+
81
+ if attributes.key?(:'LineHeight')
82
+ self.line_height = attributes[:'LineHeight']
83
+ end
84
+
85
+ if attributes.key?(:'LineLeft')
86
+ self.line_left = attributes[:'LineLeft']
87
+ end
88
+
89
+ if attributes.key?(:'LineTop')
90
+ self.line_top = attributes[:'LineTop']
91
+ end
92
+
93
+ if attributes.key?(:'LineWidth')
94
+ self.line_width = attributes[:'LineWidth']
95
+ end
96
+
97
+ if attributes.key?(:'Text')
98
+ self.text = attributes[:'Text']
99
+ end
100
+
101
+ if attributes.key?(:'TextCoordinates')
102
+ if (value = attributes[:'TextCoordinates']).is_a?(Array)
103
+ self.text_coordinates = value
104
+ end
105
+ end
106
+
107
+ end
108
+
109
+ # Show invalid properties with the reasons. Usually used together with valid?
110
+ # @return Array for valid properies with the reasons
111
+ def list_invalid_properties
112
+ invalid_properties = []
113
+ if @line_height.nil?
114
+ invalid_properties.push("invalid value for 'line_height', line_height cannot be nil.")
115
+ end
116
+
117
+ if @line_left.nil?
118
+ invalid_properties.push("invalid value for 'line_left', line_left cannot be nil.")
119
+ end
120
+
121
+ if @line_top.nil?
122
+ invalid_properties.push("invalid value for 'line_top', line_top cannot be nil.")
123
+ end
124
+
125
+ if @line_width.nil?
126
+ invalid_properties.push("invalid value for 'line_width', line_width cannot be nil.")
127
+ end
128
+
129
+ return invalid_properties
130
+ end
131
+
132
+ # Check to see if the all the properties in the model are valid
133
+ # @return true if the model is valid
134
+ def valid?
135
+ return false if @line_height.nil?
136
+ return false if @line_left.nil?
137
+ return false if @line_top.nil?
138
+ return false if @line_width.nil?
139
+ return true
140
+ end
141
+
142
+ # Checks equality by comparing each attribute.
143
+ # @param [Object] Object to be compared
144
+ def ==(other)
145
+ return true if self.equal?(other)
146
+ self.class == other.class &&
147
+ character_coordinates == other.character_coordinates &&
148
+ line_height == other.line_height &&
149
+ line_left == other.line_left &&
150
+ line_top == other.line_top &&
151
+ line_width == other.line_width &&
152
+ text == other.text &&
153
+ text_coordinates == other.text_coordinates
154
+ end
155
+
156
+ # @see the `==` method
157
+ # @param [Object] Object to be compared
158
+ def eql?(other)
159
+ self == other
160
+ end
161
+
162
+ # Calculates hash code according to all attributes.
163
+ # @return [Fixnum] Hash code
164
+ def hash
165
+ [character_coordinates, line_height, line_left, line_top, line_width, text, text_coordinates].hash
166
+ end
167
+
168
+ # Builds the object from hash
169
+ # @param [Hash] attributes Model attributes in the form of hash
170
+ # @return [Object] Returns the model itself
171
+ def build_from_hash(attributes)
172
+ return nil unless attributes.is_a?(Hash)
173
+ self.class.swagger_types.each_pair do |key, type|
174
+ if type =~ /\AArray<(.*)>/i
175
+ # check to ensure the input is an array given that the the attribute
176
+ # is documented as an array but the input is not
177
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
178
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
179
+ end
180
+ elsif !attributes[self.class.attribute_map[key]].nil?
181
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
182
+ end
183
+ # or else data not found in attributes(hash), not an issue as the data can be optional
184
+ end
185
+
186
+ self
187
+ end
188
+
189
+ # Deserializes the data based on type
190
+ # @param string type Data type
191
+ # @param string value Value to be deserialized
192
+ # @return [Object] Deserialized data
193
+ def _deserialize(type, value)
194
+ case type.to_sym
195
+ when :DateTime
196
+ Time.at(/\d/.match(value)[0].to_f).to_datetime
197
+ when :Date
198
+ Time.at(/\d/.match(value)[0].to_f).to_date
199
+ when :String
200
+ value.to_s
201
+ when :Integer
202
+ value.to_i
203
+ when :Float
204
+ value.to_f
205
+ when :BOOLEAN
206
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
207
+ true
208
+ else
209
+ false
210
+ end
211
+ when :Object
212
+ # generic object (usually a Hash), return directly
213
+ value
214
+ when /\AArray<(?<inner_type>.+)>\z/
215
+ inner_type = Regexp.last_match[:inner_type]
216
+ value.map { |v| _deserialize(inner_type, v) }
217
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
218
+ k_type = Regexp.last_match[:k_type]
219
+ v_type = Regexp.last_match[:v_type]
220
+ {}.tap do |hash|
221
+ value.each do |k, v|
222
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
223
+ end
224
+ end
225
+ else
226
+ # model
227
+ temp_model = GroupDocsAnnotationCloud.const_get(type).new
228
+ temp_model.build_from_hash(value)
229
+ end
230
+ end
231
+
232
+ # Returns the string representation of the object
233
+ # @return [String] String presentation of the object
234
+ def to_s
235
+ to_hash.to_s
236
+ end
237
+
238
+ # to_body is an alias to to_hash (backward compatibility)
239
+ # @return [Hash] Returns the object in the form of hash
240
+ def to_body
241
+ to_hash
242
+ end
243
+
244
+ # Returns the object in the form of hash
245
+ # @return [Hash] Returns the object in the form of hash
246
+ def to_hash
247
+ hash = {}
248
+ self.class.attribute_map.each_pair do |attr, param|
249
+ value = self.send(attr)
250
+ next if value.nil?
251
+ hash[param] = _to_hash(value)
252
+ end
253
+ hash
254
+ end
255
+
256
+ # Outputs non-array value in the form of hash
257
+ # For object, use to_hash. Otherwise, just return the value
258
+ # @param [Object] value Any valid value
259
+ # @return [Hash] Returns the value in the form of hash
260
+ def _to_hash(value)
261
+ if value.is_a?(Array)
262
+ value.compact.map { |v| _to_hash(v) }
263
+ elsif value.is_a?(Hash)
264
+ {}.tap do |hash|
265
+ value.each { |k, v| hash[k] = _to_hash(v) }
266
+ end
267
+ elsif value.respond_to? :to_hash
268
+ value.to_hash
269
+ else
270
+ value
271
+ end
272
+ end
273
+
274
+ end
275
+
276
+ end
@@ -0,0 +1,196 @@
1
+ #
2
+ # --------------------------------------------------------------------------------------------------------------------
3
+ # <copyright company="Aspose Pty Ltd" file="value_type.rb">
4
+ # Copyright (c) 2003-2018 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 GroupDocsAnnotationCloud
31
+
32
+ class ValueType
33
+
34
+ # Attribute mapping from ruby-style variable name to JSON key.
35
+ def self.attribute_map
36
+ {
37
+ }
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.swagger_types
42
+ {
43
+ }
44
+ end
45
+
46
+ # Initializes the object
47
+ # @param [Hash] attributes Model attributes in the form of hash
48
+ def initialize(attributes = {})
49
+ return unless attributes.is_a?(Hash)
50
+
51
+ # convert string to symbol for hash key
52
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
53
+
54
+ end
55
+
56
+ # Show invalid properties with the reasons. Usually used together with valid?
57
+ # @return Array for valid properies with the reasons
58
+ def list_invalid_properties
59
+ invalid_properties = []
60
+ return invalid_properties
61
+ end
62
+
63
+ # Check to see if the all the properties in the model are valid
64
+ # @return true if the model is valid
65
+ def valid?
66
+ return true
67
+ end
68
+
69
+ # Checks equality by comparing each attribute.
70
+ # @param [Object] Object to be compared
71
+ def ==(other)
72
+ return true if self.equal?(other)
73
+ self.class == other.class
74
+ end
75
+
76
+ # @see the `==` method
77
+ # @param [Object] Object to be compared
78
+ def eql?(other)
79
+ self == other
80
+ end
81
+
82
+ # Calculates hash code according to all attributes.
83
+ # @return [Fixnum] Hash code
84
+ def hash
85
+ [].hash
86
+ end
87
+
88
+ # Builds the object from hash
89
+ # @param [Hash] attributes Model attributes in the form of hash
90
+ # @return [Object] Returns the model itself
91
+ def build_from_hash(attributes)
92
+ return nil unless attributes.is_a?(Hash)
93
+ self.class.swagger_types.each_pair do |key, type|
94
+ if type =~ /\AArray<(.*)>/i
95
+ # check to ensure the input is an array given that the the attribute
96
+ # is documented as an array but the input is not
97
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
98
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
99
+ end
100
+ elsif !attributes[self.class.attribute_map[key]].nil?
101
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
102
+ end
103
+ # or else data not found in attributes(hash), not an issue as the data can be optional
104
+ end
105
+
106
+ self
107
+ end
108
+
109
+ # Deserializes the data based on type
110
+ # @param string type Data type
111
+ # @param string value Value to be deserialized
112
+ # @return [Object] Deserialized data
113
+ def _deserialize(type, value)
114
+ case type.to_sym
115
+ when :DateTime
116
+ Time.at(/\d/.match(value)[0].to_f).to_datetime
117
+ when :Date
118
+ Time.at(/\d/.match(value)[0].to_f).to_date
119
+ when :String
120
+ value.to_s
121
+ when :Integer
122
+ value.to_i
123
+ when :Float
124
+ value.to_f
125
+ when :BOOLEAN
126
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
127
+ true
128
+ else
129
+ false
130
+ end
131
+ when :Object
132
+ # generic object (usually a Hash), return directly
133
+ value
134
+ when /\AArray<(?<inner_type>.+)>\z/
135
+ inner_type = Regexp.last_match[:inner_type]
136
+ value.map { |v| _deserialize(inner_type, v) }
137
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
138
+ k_type = Regexp.last_match[:k_type]
139
+ v_type = Regexp.last_match[:v_type]
140
+ {}.tap do |hash|
141
+ value.each do |k, v|
142
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
143
+ end
144
+ end
145
+ else
146
+ # model
147
+ temp_model = GroupDocsAnnotationCloud.const_get(type).new
148
+ temp_model.build_from_hash(value)
149
+ end
150
+ end
151
+
152
+ # Returns the string representation of the object
153
+ # @return [String] String presentation of the object
154
+ def to_s
155
+ to_hash.to_s
156
+ end
157
+
158
+ # to_body is an alias to to_hash (backward compatibility)
159
+ # @return [Hash] Returns the object in the form of hash
160
+ def to_body
161
+ to_hash
162
+ end
163
+
164
+ # Returns the object in the form of hash
165
+ # @return [Hash] Returns the object in the form of hash
166
+ def to_hash
167
+ hash = {}
168
+ self.class.attribute_map.each_pair do |attr, param|
169
+ value = self.send(attr)
170
+ next if value.nil?
171
+ hash[param] = _to_hash(value)
172
+ end
173
+ hash
174
+ end
175
+
176
+ # Outputs non-array value in the form of hash
177
+ # For object, use to_hash. Otherwise, just return the value
178
+ # @param [Object] value Any valid value
179
+ # @return [Hash] Returns the value in the form of hash
180
+ def _to_hash(value)
181
+ if value.is_a?(Array)
182
+ value.compact.map { |v| _to_hash(v) }
183
+ elsif value.is_a?(Hash)
184
+ {}.tap do |hash|
185
+ value.each { |k, v| hash[k] = _to_hash(v) }
186
+ end
187
+ elsif value.respond_to? :to_hash
188
+ value.to_hash
189
+ else
190
+ value
191
+ end
192
+ end
193
+
194
+ end
195
+
196
+ end
@@ -0,0 +1,29 @@
1
+ #
2
+ # --------------------------------------------------------------------------------------------------------------------
3
+ # <copyright company="Aspose Pty Ltd" file="version.rb">
4
+ # Copyright (c) 2003-2018 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
+ module GroupDocsAnnotationCloud
28
+ VERSION = "18.7".freeze
29
+ end
@@ -0,0 +1,80 @@
1
+ # ------------------------------------------------------------------------------------
2
+ # <copyright company="Aspose Pty Ltd" file="groupdocs_annotation_cloud.rb">
3
+ # Copyright (c) 2003-2018 Aspose Pty Ltd
4
+ # </copyright>
5
+ # <summary>
6
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ # of this software and associated documentation files (the "Software"), to deal
8
+ # in the Software without restriction, including without limitation the rights
9
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ # copies of the Software, and to permit persons to whom the Software is
11
+ # furnished to do so, subject to the following conditions:
12
+ #
13
+ # The above copyright notice and this permission notice shall be included in all
14
+ # 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 FROM,
21
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ # SOFTWARE.
23
+ # </summary>
24
+ # ------------------------------------------------------------------------------------
25
+
26
+ # Common files
27
+ require_relative 'groupdocs_annotation_cloud/api_client'
28
+ require_relative 'groupdocs_annotation_cloud/api_error'
29
+ require_relative 'groupdocs_annotation_cloud/version'
30
+ require_relative 'groupdocs_annotation_cloud/configuration'
31
+
32
+ # Models
33
+ require_relative 'groupdocs_annotation_cloud/models/annotation_info'
34
+ require_relative 'groupdocs_annotation_cloud/models/annotation_reply_info'
35
+ require_relative 'groupdocs_annotation_cloud/models/document_info'
36
+ require_relative 'groupdocs_annotation_cloud/models/image_pages'
37
+ require_relative 'groupdocs_annotation_cloud/models/link'
38
+ require_relative 'groupdocs_annotation_cloud/models/link_element'
39
+ require_relative 'groupdocs_annotation_cloud/models/page_info'
40
+ require_relative 'groupdocs_annotation_cloud/models/row_info'
41
+ require_relative 'groupdocs_annotation_cloud/models/value_type'
42
+ require_relative 'groupdocs_annotation_cloud/models/annotation_api_link'
43
+ require_relative 'groupdocs_annotation_cloud/models/image_page'
44
+ require_relative 'groupdocs_annotation_cloud/models/point'
45
+ require_relative 'groupdocs_annotation_cloud/models/rectangle'
46
+
47
+ # APIs
48
+ require_relative 'groupdocs_annotation_cloud/api/annotation_api'
49
+ require_relative 'groupdocs_annotation_cloud/api/image_info_api'
50
+ require_relative 'groupdocs_annotation_cloud/api/image_pages_api'
51
+ require_relative 'groupdocs_annotation_cloud/api/pdf_file_api'
52
+
53
+ module GroupDocsAnnotationCloud
54
+ # Main module
55
+ class << self
56
+ # Initialize SDK with API keys.
57
+ #
58
+ # app_sid = "xxx"
59
+ # app_key = "xxx"
60
+ #
61
+ # GroupDocsAnnotationCloud.from_keys(app_sid, app_key)
62
+ def from_keys(app_sid, app_key)
63
+ AnnotationApi.from_keys(app_sid, app_key)
64
+ end
65
+
66
+ # Initialize SDK with Configuration.
67
+ #
68
+ # app_sid = "xxx"
69
+ # app_key = "xxx"
70
+ #
71
+ # config = GroupDocsAnnotationCloud::Configuration.new(app_sid, app_key)
72
+ # config.debugging = true
73
+ # config.temp_folder_path = "./temp"
74
+ #
75
+ # GroupDocsAnnotationCloud.from_config(config)
76
+ def from_config(config)
77
+ AnnotationApi.from_config(config)
78
+ end
79
+ end
80
+ end