groupdocs_annotation_cloud 19.5 → 22.2

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 (42) hide show
  1. checksums.yaml +4 -4
  2. data/lib/groupdocs_annotation_cloud/api/annotate_api.rb +107 -263
  3. data/lib/groupdocs_annotation_cloud/api/file_api.rb +7 -7
  4. data/lib/groupdocs_annotation_cloud/api/folder_api.rb +7 -7
  5. data/lib/groupdocs_annotation_cloud/api/info_api.rb +11 -22
  6. data/lib/groupdocs_annotation_cloud/api/license_api.rb +169 -0
  7. data/lib/groupdocs_annotation_cloud/api/preview_api.rb +23 -90
  8. data/lib/groupdocs_annotation_cloud/api/storage_api.rb +5 -5
  9. data/lib/groupdocs_annotation_cloud/api_client.rb +1 -1
  10. data/lib/groupdocs_annotation_cloud/api_error.rb +18 -5
  11. data/lib/groupdocs_annotation_cloud/configuration.rb +1 -1
  12. data/lib/groupdocs_annotation_cloud/models/{row_info.rb → annotate_options.rb} +65 -72
  13. data/lib/groupdocs_annotation_cloud/models/annotation_api_link.rb +1 -1
  14. data/lib/groupdocs_annotation_cloud/models/annotation_info.rb +184 -61
  15. data/lib/groupdocs_annotation_cloud/models/annotation_reply_info.rb +41 -26
  16. data/lib/groupdocs_annotation_cloud/models/consumption_result.rb +234 -0
  17. data/lib/groupdocs_annotation_cloud/models/disc_usage.rb +1 -1
  18. data/lib/groupdocs_annotation_cloud/models/document_info.rb +1 -1
  19. data/lib/groupdocs_annotation_cloud/models/error.rb +1 -1
  20. data/lib/groupdocs_annotation_cloud/models/error_details.rb +1 -1
  21. data/lib/groupdocs_annotation_cloud/models/file_info.rb +244 -0
  22. data/lib/groupdocs_annotation_cloud/models/file_version.rb +1 -1
  23. data/lib/groupdocs_annotation_cloud/models/file_versions.rb +1 -1
  24. data/lib/groupdocs_annotation_cloud/models/files_list.rb +1 -1
  25. data/lib/groupdocs_annotation_cloud/models/files_upload_result.rb +1 -1
  26. data/lib/groupdocs_annotation_cloud/models/format.rb +1 -1
  27. data/lib/groupdocs_annotation_cloud/models/formats_result.rb +1 -1
  28. data/lib/groupdocs_annotation_cloud/models/link.rb +1 -1
  29. data/lib/groupdocs_annotation_cloud/models/link_element.rb +1 -1
  30. data/lib/groupdocs_annotation_cloud/models/object_exist.rb +1 -1
  31. data/lib/groupdocs_annotation_cloud/models/page_image.rb +2 -2
  32. data/lib/groupdocs_annotation_cloud/models/page_images.rb +1 -1
  33. data/lib/groupdocs_annotation_cloud/models/page_info.rb +5 -32
  34. data/lib/groupdocs_annotation_cloud/models/point.rb +1 -1
  35. data/lib/groupdocs_annotation_cloud/models/preview_options.rb +364 -0
  36. data/lib/groupdocs_annotation_cloud/models/rectangle.rb +1 -1
  37. data/lib/groupdocs_annotation_cloud/models/remove_options.rb +236 -0
  38. data/lib/groupdocs_annotation_cloud/models/storage_exist.rb +1 -1
  39. data/lib/groupdocs_annotation_cloud/models/storage_file.rb +1 -1
  40. data/lib/groupdocs_annotation_cloud/version.rb +2 -2
  41. data/lib/groupdocs_annotation_cloud.rb +7 -2
  42. metadata +8 -17
@@ -0,0 +1,236 @@
1
+ #
2
+ # --------------------------------------------------------------------------------------------------------------------
3
+ # <copyright company="Aspose Pty Ltd" file="remove_options.rb">
4
+ # Copyright (c) 2003-2021 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
+ # Options for removing annotations
32
+ class RemoveOptions
33
+
34
+ # Input document description
35
+ attr_accessor :file_info
36
+
37
+ # List of annotation IDs to remove from the document
38
+ attr_accessor :annotation_ids
39
+
40
+ # Path to output document in the cloud storage.
41
+ attr_accessor :output_path
42
+
43
+ # Attribute mapping from ruby-style variable name to JSON key.
44
+ def self.attribute_map
45
+ {
46
+ :'file_info' => :'FileInfo',
47
+ :'annotation_ids' => :'AnnotationIds',
48
+ :'output_path' => :'OutputPath'
49
+ }
50
+ end
51
+
52
+ # Attribute type mapping.
53
+ def self.swagger_types
54
+ {
55
+ :'file_info' => :'FileInfo',
56
+ :'annotation_ids' => :'Array<Integer>',
57
+ :'output_path' => :'String'
58
+ }
59
+ end
60
+
61
+ # Initializes the object
62
+ # @param [Hash] attributes Model attributes in the form of hash
63
+ def initialize(attributes = {})
64
+ return unless attributes.is_a?(Hash)
65
+
66
+ # convert string to symbol for hash key
67
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
68
+
69
+ if attributes.key?(:'FileInfo')
70
+ self.file_info = attributes[:'FileInfo']
71
+ end
72
+
73
+ if attributes.key?(:'AnnotationIds')
74
+ if (value = attributes[:'AnnotationIds']).is_a?(Array)
75
+ self.annotation_ids = value
76
+ end
77
+ end
78
+
79
+ if attributes.key?(:'OutputPath')
80
+ self.output_path = attributes[:'OutputPath']
81
+ end
82
+
83
+ end
84
+
85
+ # Show invalid properties with the reasons. Usually used together with valid?
86
+ # @return Array for valid properies with the reasons
87
+ def list_invalid_properties
88
+ invalid_properties = []
89
+ return invalid_properties
90
+ end
91
+
92
+ # Check to see if the all the properties in the model are valid
93
+ # @return true if the model is valid
94
+ def valid?
95
+ return true
96
+ end
97
+
98
+ # Checks equality by comparing each attribute.
99
+ # @param [Object] Object to be compared
100
+ def ==(other)
101
+ return true if self.equal?(other)
102
+ self.class == other.class &&
103
+ file_info == other.file_info &&
104
+ annotation_ids == other.annotation_ids &&
105
+ output_path == other.output_path
106
+ end
107
+
108
+ # @see the `==` method
109
+ # @param [Object] Object to be compared
110
+ def eql?(other)
111
+ self == other
112
+ end
113
+
114
+ # Calculates hash code according to all attributes.
115
+ # @return [Fixnum] Hash code
116
+ def hash
117
+ [file_info, annotation_ids, output_path].hash
118
+ end
119
+
120
+ # Downcases first letter.
121
+ # @return downcased string
122
+ def uncap(str)
123
+ str[0, 1].downcase + str[1..-1]
124
+ end
125
+
126
+ # Builds the object from hash
127
+ # @param [Hash] attributes Model attributes in the form of hash
128
+ # @return [Object] Returns the model itself
129
+ def build_from_hash(attributes)
130
+ return nil unless attributes.is_a?(Hash)
131
+ self.class.swagger_types.each_pair do |key, type|
132
+ pname = uncap(self.class.attribute_map[key]).intern
133
+ value = attributes[pname]
134
+ if type =~ /\AArray<(.*)>/i
135
+ # check to ensure the input is an array given that the the attribute
136
+ # is documented as an array but the input is not
137
+ if value.is_a?(Array)
138
+ self.send("#{key}=", value.map { |v| _deserialize($1, v) })
139
+ end
140
+ elsif !value.nil?
141
+ self.send("#{key}=", _deserialize(type, value))
142
+ end
143
+ # or else data not found in attributes(hash), not an issue as the data can be optional
144
+ end
145
+
146
+ self
147
+ end
148
+
149
+ # Deserializes the data based on type
150
+ # @param string type Data type
151
+ # @param string value Value to be deserialized
152
+ # @return [Object] Deserialized data
153
+ def _deserialize(type, value)
154
+ case type.to_sym
155
+ when :DateTime
156
+ Date.parse value
157
+ when :Date
158
+ Date.parse value
159
+ when :String
160
+ value.to_s
161
+ when :Integer
162
+ value.to_i
163
+ when :Float
164
+ value.to_f
165
+ when :BOOLEAN
166
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
167
+ true
168
+ else
169
+ false
170
+ end
171
+ when :Object
172
+ # generic object (usually a Hash), return directly
173
+ value
174
+ when /\AArray<(?<inner_type>.+)>\z/
175
+ inner_type = Regexp.last_match[:inner_type]
176
+ value.map { |v| _deserialize(inner_type, v) }
177
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
178
+ k_type = Regexp.last_match[:k_type]
179
+ v_type = Regexp.last_match[:v_type]
180
+ {}.tap do |hash|
181
+ value.each do |k, v|
182
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
183
+ end
184
+ end
185
+ else
186
+ # model
187
+ temp_model = GroupDocsAnnotationCloud.const_get(type).new
188
+ temp_model.build_from_hash(value)
189
+ end
190
+ end
191
+
192
+ # Returns the string representation of the object
193
+ # @return [String] String presentation of the object
194
+ def to_s
195
+ to_hash.to_s
196
+ end
197
+
198
+ # to_body is an alias to to_hash (backward compatibility)
199
+ # @return [Hash] Returns the object in the form of hash
200
+ def to_body
201
+ to_hash
202
+ end
203
+
204
+ # Returns the object in the form of hash
205
+ # @return [Hash] Returns the object in the form of hash
206
+ def to_hash
207
+ hash = {}
208
+ self.class.attribute_map.each_pair do |attr, param|
209
+ value = self.send(attr)
210
+ next if value.nil?
211
+ hash[param] = _to_hash(value)
212
+ end
213
+ hash
214
+ end
215
+
216
+ # Outputs non-array value in the form of hash
217
+ # For object, use to_hash. Otherwise, just return the value
218
+ # @param [Object] value Any valid value
219
+ # @return [Hash] Returns the value in the form of hash
220
+ def _to_hash(value)
221
+ if value.is_a?(Array)
222
+ value.compact.map { |v| _to_hash(v) }
223
+ elsif value.is_a?(Hash)
224
+ {}.tap do |hash|
225
+ value.each { |k, v| hash[k] = _to_hash(v) }
226
+ end
227
+ elsif value.respond_to? :to_hash
228
+ value.to_hash
229
+ else
230
+ value
231
+ end
232
+ end
233
+
234
+ end
235
+
236
+ end
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # --------------------------------------------------------------------------------------------------------------------
3
3
  # <copyright company="Aspose Pty Ltd" file="storage_exist.rb">
4
- # Copyright (c) 2003-2019 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2021 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="storage_file.rb">
4
- # Copyright (c) 2003-2019 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2021 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="version.rb">
4
- # Copyright (c) 2003-2019 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
5
5
  # </copyright>
6
6
  # <summary>
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -25,5 +25,5 @@
25
25
  # --------------------------------------------------------------------------------------------------------------------
26
26
  #
27
27
  module GroupDocsAnnotationCloud
28
- VERSION = "19.5".freeze
28
+ VERSION = "22.2".freeze
29
29
  end
@@ -1,6 +1,6 @@
1
1
  # ------------------------------------------------------------------------------------
2
2
  # <copyright company="Aspose Pty Ltd" file="groupdocs_annotation_cloud.rb">
3
- # Copyright (c) 2003-2019 Aspose Pty Ltd
3
+ # Copyright (c) 2003-2021 Aspose Pty Ltd
4
4
  # </copyright>
5
5
  # <summary>
6
6
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -30,12 +30,15 @@ require_relative 'groupdocs_annotation_cloud/version'
30
30
  require_relative 'groupdocs_annotation_cloud/configuration'
31
31
 
32
32
  # Models
33
+ require_relative 'groupdocs_annotation_cloud/models/annotate_options'
33
34
  require_relative 'groupdocs_annotation_cloud/models/annotation_info'
34
35
  require_relative 'groupdocs_annotation_cloud/models/annotation_reply_info'
36
+ require_relative 'groupdocs_annotation_cloud/models/consumption_result'
35
37
  require_relative 'groupdocs_annotation_cloud/models/disc_usage'
36
38
  require_relative 'groupdocs_annotation_cloud/models/document_info'
37
39
  require_relative 'groupdocs_annotation_cloud/models/error'
38
40
  require_relative 'groupdocs_annotation_cloud/models/error_details'
41
+ require_relative 'groupdocs_annotation_cloud/models/file_info'
39
42
  require_relative 'groupdocs_annotation_cloud/models/file_versions'
40
43
  require_relative 'groupdocs_annotation_cloud/models/files_list'
41
44
  require_relative 'groupdocs_annotation_cloud/models/files_upload_result'
@@ -47,8 +50,9 @@ require_relative 'groupdocs_annotation_cloud/models/object_exist'
47
50
  require_relative 'groupdocs_annotation_cloud/models/page_images'
48
51
  require_relative 'groupdocs_annotation_cloud/models/page_info'
49
52
  require_relative 'groupdocs_annotation_cloud/models/point'
53
+ require_relative 'groupdocs_annotation_cloud/models/preview_options'
50
54
  require_relative 'groupdocs_annotation_cloud/models/rectangle'
51
- require_relative 'groupdocs_annotation_cloud/models/row_info'
55
+ require_relative 'groupdocs_annotation_cloud/models/remove_options'
52
56
  require_relative 'groupdocs_annotation_cloud/models/storage_exist'
53
57
  require_relative 'groupdocs_annotation_cloud/models/storage_file'
54
58
  require_relative 'groupdocs_annotation_cloud/models/annotation_api_link'
@@ -60,5 +64,6 @@ require_relative 'groupdocs_annotation_cloud/api/annotate_api'
60
64
  require_relative 'groupdocs_annotation_cloud/api/file_api'
61
65
  require_relative 'groupdocs_annotation_cloud/api/folder_api'
62
66
  require_relative 'groupdocs_annotation_cloud/api/info_api'
67
+ require_relative 'groupdocs_annotation_cloud/api/license_api'
63
68
  require_relative 'groupdocs_annotation_cloud/api/preview_api'
64
69
  require_relative 'groupdocs_annotation_cloud/api/storage_api'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: groupdocs_annotation_cloud
3
3
  version: !ruby/object:Gem::Version
4
- version: '19.5'
4
+ version: '22.2'
5
5
  platform: ruby
6
6
  authors:
7
7
  - GroupDocs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-02 00:00:00.000000000 Z
11
+ date: 2022-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -24,20 +24,6 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: 0.14.0
27
- - !ruby/object:Gem::Dependency
28
- name: mimemagic
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: 0.3.2
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: 0.3.2
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: addressable
43
29
  requirement: !ruby/object:Gem::Requirement
@@ -89,18 +75,22 @@ files:
89
75
  - lib/groupdocs_annotation_cloud/api/file_api.rb
90
76
  - lib/groupdocs_annotation_cloud/api/folder_api.rb
91
77
  - lib/groupdocs_annotation_cloud/api/info_api.rb
78
+ - lib/groupdocs_annotation_cloud/api/license_api.rb
92
79
  - lib/groupdocs_annotation_cloud/api/preview_api.rb
93
80
  - lib/groupdocs_annotation_cloud/api/storage_api.rb
94
81
  - lib/groupdocs_annotation_cloud/api_client.rb
95
82
  - lib/groupdocs_annotation_cloud/api_error.rb
96
83
  - lib/groupdocs_annotation_cloud/configuration.rb
84
+ - lib/groupdocs_annotation_cloud/models/annotate_options.rb
97
85
  - lib/groupdocs_annotation_cloud/models/annotation_api_link.rb
98
86
  - lib/groupdocs_annotation_cloud/models/annotation_info.rb
99
87
  - lib/groupdocs_annotation_cloud/models/annotation_reply_info.rb
88
+ - lib/groupdocs_annotation_cloud/models/consumption_result.rb
100
89
  - lib/groupdocs_annotation_cloud/models/disc_usage.rb
101
90
  - lib/groupdocs_annotation_cloud/models/document_info.rb
102
91
  - lib/groupdocs_annotation_cloud/models/error.rb
103
92
  - lib/groupdocs_annotation_cloud/models/error_details.rb
93
+ - lib/groupdocs_annotation_cloud/models/file_info.rb
104
94
  - lib/groupdocs_annotation_cloud/models/file_version.rb
105
95
  - lib/groupdocs_annotation_cloud/models/file_versions.rb
106
96
  - lib/groupdocs_annotation_cloud/models/files_list.rb
@@ -114,8 +104,9 @@ files:
114
104
  - lib/groupdocs_annotation_cloud/models/page_images.rb
115
105
  - lib/groupdocs_annotation_cloud/models/page_info.rb
116
106
  - lib/groupdocs_annotation_cloud/models/point.rb
107
+ - lib/groupdocs_annotation_cloud/models/preview_options.rb
117
108
  - lib/groupdocs_annotation_cloud/models/rectangle.rb
118
- - lib/groupdocs_annotation_cloud/models/row_info.rb
109
+ - lib/groupdocs_annotation_cloud/models/remove_options.rb
119
110
  - lib/groupdocs_annotation_cloud/models/storage_exist.rb
120
111
  - lib/groupdocs_annotation_cloud/models/storage_file.rb
121
112
  - lib/groupdocs_annotation_cloud/version.rb