groupdocs_annotation_cloud 18.7 → 19.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/lib/groupdocs_annotation_cloud.rb +23 -39
  3. data/lib/groupdocs_annotation_cloud/api/annotate_api.rb +664 -0
  4. data/lib/groupdocs_annotation_cloud/api/file_api.rb +729 -0
  5. data/lib/groupdocs_annotation_cloud/api/folder_api.rb +694 -0
  6. data/lib/groupdocs_annotation_cloud/api/{pdf_file_api.rb → info_api.rb} +101 -105
  7. data/lib/groupdocs_annotation_cloud/api/preview_api.rb +380 -0
  8. data/lib/groupdocs_annotation_cloud/api/storage_api.rb +541 -0
  9. data/lib/groupdocs_annotation_cloud/api_client.rb +7 -17
  10. data/lib/groupdocs_annotation_cloud/api_error.rb +5 -3
  11. data/lib/groupdocs_annotation_cloud/configuration.rb +3 -3
  12. data/lib/groupdocs_annotation_cloud/models/annotation_api_link.rb +24 -16
  13. data/lib/groupdocs_annotation_cloud/models/annotation_info.rb +97 -82
  14. data/lib/groupdocs_annotation_cloud/models/annotation_reply_info.rb +31 -23
  15. data/lib/groupdocs_annotation_cloud/models/disc_usage.rb +234 -0
  16. data/lib/groupdocs_annotation_cloud/models/document_info.rb +44 -22
  17. data/lib/groupdocs_annotation_cloud/models/error.rb +244 -0
  18. data/lib/groupdocs_annotation_cloud/models/error_details.rb +229 -0
  19. data/lib/groupdocs_annotation_cloud/models/file_version.rb +289 -0
  20. data/lib/groupdocs_annotation_cloud/models/{value_type.rb → file_versions.rb} +33 -13
  21. data/lib/groupdocs_annotation_cloud/models/files_list.rb +216 -0
  22. data/lib/groupdocs_annotation_cloud/models/files_upload_result.rb +228 -0
  23. data/lib/groupdocs_annotation_cloud/models/format.rb +224 -0
  24. data/lib/groupdocs_annotation_cloud/models/formats_result.rb +216 -0
  25. data/lib/groupdocs_annotation_cloud/models/link.rb +24 -16
  26. data/lib/groupdocs_annotation_cloud/models/link_element.rb +18 -10
  27. data/lib/groupdocs_annotation_cloud/models/object_exist.rb +234 -0
  28. data/lib/groupdocs_annotation_cloud/models/{image_page.rb → page_image.rb} +28 -13
  29. data/lib/groupdocs_annotation_cloud/models/{image_pages.rb → page_images.rb} +26 -14
  30. data/lib/groupdocs_annotation_cloud/models/page_info.rb +41 -23
  31. data/lib/groupdocs_annotation_cloud/models/point.rb +31 -13
  32. data/lib/groupdocs_annotation_cloud/models/rectangle.rb +45 -17
  33. data/lib/groupdocs_annotation_cloud/models/row_info.rb +38 -16
  34. data/lib/groupdocs_annotation_cloud/models/storage_exist.rb +219 -0
  35. data/lib/groupdocs_annotation_cloud/models/storage_file.rb +264 -0
  36. data/lib/groupdocs_annotation_cloud/version.rb +2 -2
  37. metadata +22 -39
  38. data/lib/groupdocs_annotation_cloud/api/annotation_api.rb +0 -344
  39. data/lib/groupdocs_annotation_cloud/api/image_info_api.rb +0 -218
  40. data/lib/groupdocs_annotation_cloud/api/image_pages_api.rb +0 -395
  41. data/lib/groupdocs_annotation_cloud/models/requests/delete_clean_document_request.rb +0 -53
  42. data/lib/groupdocs_annotation_cloud/models/requests/delete_pages_request.rb +0 -49
  43. data/lib/groupdocs_annotation_cloud/models/requests/get_import_request.rb +0 -53
  44. data/lib/groupdocs_annotation_cloud/models/requests/get_info_request.rb +0 -53
  45. data/lib/groupdocs_annotation_cloud/models/requests/get_page_request.rb +0 -53
  46. data/lib/groupdocs_annotation_cloud/models/requests/get_pages_request.rb +0 -49
  47. data/lib/groupdocs_annotation_cloud/models/requests/get_pdf_request.rb +0 -53
  48. data/lib/groupdocs_annotation_cloud/models/requests/get_pdf_stream_request.rb +0 -53
  49. data/lib/groupdocs_annotation_cloud/models/requests/post_pages_request.rb +0 -53
  50. data/lib/groupdocs_annotation_cloud/models/requests/put_export_request.rb +0 -57
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # --------------------------------------------------------------------------------------------------------------------
3
3
  # <copyright company="Aspose Pty Ltd" file="annotation_reply_info.rb">
4
- # Copyright (c) 2003-2018 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2019 Aspose Pty Ltd
5
5
  # </copyright>
6
6
  # <summary>
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -28,40 +28,40 @@
28
28
  require 'date'
29
29
 
30
30
  module GroupDocsAnnotationCloud
31
-
31
+ # Describes annotation reply properties
32
32
  class AnnotationReplyInfo
33
33
 
34
- # Gets or sets the unique identifier.
34
+ # Gets or sets the unique identifier
35
35
  attr_accessor :guid
36
36
 
37
- # Gets or sets the user unique identifier.
37
+ # Gets or sets the user's unique identifier
38
38
  attr_accessor :user_guid
39
39
 
40
- # Gets or sets the name of the user.
40
+ # Gets or sets the user's name
41
41
  attr_accessor :user_name
42
42
 
43
- # Gets or sets the user email.
43
+ # Gets or sets the user email
44
44
  attr_accessor :user_email
45
45
 
46
- # Gets or sets the message.
46
+ # Gets or sets the message
47
47
  attr_accessor :message
48
48
 
49
- # Gets or sets the replied on.
49
+ # Gets or sets the reply time
50
50
  attr_accessor :replied_on
51
51
 
52
- # Gets or sets the parent reply unique identifier.
52
+ # Gets or sets the parent reply unique identifier
53
53
  attr_accessor :parent_reply_guid
54
54
 
55
55
  # Attribute mapping from ruby-style variable name to JSON key.
56
56
  def self.attribute_map
57
57
  {
58
- :'guid' => :'guid',
59
- :'user_guid' => :'userGuid',
60
- :'user_name' => :'userName',
61
- :'user_email' => :'userEmail',
62
- :'message' => :'message',
63
- :'replied_on' => :'repliedOn',
64
- :'parent_reply_guid' => :'parentReplyGuid'
58
+ :'guid' => :'Guid',
59
+ :'user_guid' => :'UserGuid',
60
+ :'user_name' => :'UserName',
61
+ :'user_email' => :'UserEmail',
62
+ :'message' => :'Message',
63
+ :'replied_on' => :'RepliedOn',
64
+ :'parent_reply_guid' => :'ParentReplyGuid'
65
65
  }
66
66
  end
67
67
 
@@ -160,20 +160,28 @@ module GroupDocsAnnotationCloud
160
160
  [guid, user_guid, user_name, user_email, message, replied_on, parent_reply_guid].hash
161
161
  end
162
162
 
163
+ # Downcases first letter.
164
+ # @return downcased string
165
+ def uncap(str)
166
+ str[0, 1].downcase + str[1..-1]
167
+ end
168
+
163
169
  # Builds the object from hash
164
170
  # @param [Hash] attributes Model attributes in the form of hash
165
171
  # @return [Object] Returns the model itself
166
172
  def build_from_hash(attributes)
167
173
  return nil unless attributes.is_a?(Hash)
168
174
  self.class.swagger_types.each_pair do |key, type|
175
+ pname = uncap(self.class.attribute_map[key]).intern
176
+ value = attributes[pname]
169
177
  if type =~ /\AArray<(.*)>/i
170
178
  # check to ensure the input is an array given that the the attribute
171
- # is documented as an array but the input is not
172
- if attributes[self.class.attribute_map[key]].is_a?(Array)
173
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
179
+ # is documented as an array but the input is not
180
+ if value.is_a?(Array)
181
+ self.send("#{key}=", value.map { |v| _deserialize($1, v) })
174
182
  end
175
- elsif !attributes[self.class.attribute_map[key]].nil?
176
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
183
+ elsif !value.nil?
184
+ self.send("#{key}=", _deserialize(type, value))
177
185
  end
178
186
  # or else data not found in attributes(hash), not an issue as the data can be optional
179
187
  end
@@ -188,9 +196,9 @@ module GroupDocsAnnotationCloud
188
196
  def _deserialize(type, value)
189
197
  case type.to_sym
190
198
  when :DateTime
191
- Time.at(/\d/.match(value)[0].to_f).to_datetime
199
+ Date.parse value
192
200
  when :Date
193
- Time.at(/\d/.match(value)[0].to_f).to_date
201
+ Date.parse value
194
202
  when :String
195
203
  value.to_s
196
204
  when :Integer
@@ -0,0 +1,234 @@
1
+ #
2
+ # --------------------------------------------------------------------------------------------------------------------
3
+ # <copyright company="Aspose Pty Ltd" file="disc_usage.rb">
4
+ # Copyright (c) 2003-2019 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
+ # Class for disc space information.
32
+ class DiscUsage
33
+
34
+ # Application used disc space.
35
+ attr_accessor :used_size
36
+
37
+ # Total disc space.
38
+ attr_accessor :total_size
39
+
40
+ # Attribute mapping from ruby-style variable name to JSON key.
41
+ def self.attribute_map
42
+ {
43
+ :'used_size' => :'UsedSize',
44
+ :'total_size' => :'TotalSize'
45
+ }
46
+ end
47
+
48
+ # Attribute type mapping.
49
+ def self.swagger_types
50
+ {
51
+ :'used_size' => :'Integer',
52
+ :'total_size' => :'Integer'
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?(:'UsedSize')
65
+ self.used_size = attributes[:'UsedSize']
66
+ end
67
+
68
+ if attributes.key?(:'TotalSize')
69
+ self.total_size = attributes[:'TotalSize']
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 @used_size.nil?
79
+ invalid_properties.push("invalid value for 'used_size', used_size cannot be nil.")
80
+ end
81
+
82
+ if @total_size.nil?
83
+ invalid_properties.push("invalid value for 'total_size', total_size 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 @used_size.nil?
93
+ return false if @total_size.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
+ used_size == other.used_size &&
103
+ total_size == other.total_size
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
+ [used_size, total_size].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 = GroupDocsAnnotationCloud.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="document_info.rb">
4
- # Copyright (c) 2003-2018 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2019 Aspose Pty Ltd
5
5
  # </copyright>
6
6
  # <summary>
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -28,26 +28,40 @@
28
28
  require 'date'
29
29
 
30
30
  module GroupDocsAnnotationCloud
31
-
31
+ # Describes document basic info
32
32
  class DocumentInfo
33
+
34
+ # Gets or sets the document name
33
35
  attr_accessor :name
34
- attr_accessor :folder
36
+
37
+ # Gets or sets the document path
38
+ attr_accessor :path
39
+
40
+ # Gets or sets the document extension
35
41
  attr_accessor :extension
42
+
43
+ # Gets or sets the file format
36
44
  attr_accessor :file_format
45
+
46
+ # Gets or sets the document size
37
47
  attr_accessor :size
48
+
49
+ # Gets or sets the document date modified
38
50
  attr_accessor :date_modified
51
+
52
+ # Gets or sets the pages
39
53
  attr_accessor :pages
40
54
 
41
55
  # Attribute mapping from ruby-style variable name to JSON key.
42
56
  def self.attribute_map
43
57
  {
44
- :'name' => :'name',
45
- :'folder' => :'folder',
46
- :'extension' => :'extension',
47
- :'file_format' => :'fileFormat',
48
- :'size' => :'size',
49
- :'date_modified' => :'dateModified',
50
- :'pages' => :'pages'
58
+ :'name' => :'Name',
59
+ :'path' => :'Path',
60
+ :'extension' => :'Extension',
61
+ :'file_format' => :'FileFormat',
62
+ :'size' => :'Size',
63
+ :'date_modified' => :'DateModified',
64
+ :'pages' => :'Pages'
51
65
  }
52
66
  end
53
67
 
@@ -55,7 +69,7 @@ module GroupDocsAnnotationCloud
55
69
  def self.swagger_types
56
70
  {
57
71
  :'name' => :'String',
58
- :'folder' => :'String',
72
+ :'path' => :'String',
59
73
  :'extension' => :'String',
60
74
  :'file_format' => :'String',
61
75
  :'size' => :'Integer',
@@ -76,8 +90,8 @@ module GroupDocsAnnotationCloud
76
90
  self.name = attributes[:'Name']
77
91
  end
78
92
 
79
- if attributes.key?(:'Folder')
80
- self.folder = attributes[:'Folder']
93
+ if attributes.key?(:'Path')
94
+ self.path = attributes[:'Path']
81
95
  end
82
96
 
83
97
  if attributes.key?(:'Extension')
@@ -133,7 +147,7 @@ module GroupDocsAnnotationCloud
133
147
  return true if self.equal?(other)
134
148
  self.class == other.class &&
135
149
  name == other.name &&
136
- folder == other.folder &&
150
+ path == other.path &&
137
151
  extension == other.extension &&
138
152
  file_format == other.file_format &&
139
153
  size == other.size &&
@@ -150,7 +164,13 @@ module GroupDocsAnnotationCloud
150
164
  # Calculates hash code according to all attributes.
151
165
  # @return [Fixnum] Hash code
152
166
  def hash
153
- [name, folder, extension, file_format, size, date_modified, pages].hash
167
+ [name, path, extension, file_format, size, date_modified, pages].hash
168
+ end
169
+
170
+ # Downcases first letter.
171
+ # @return downcased string
172
+ def uncap(str)
173
+ str[0, 1].downcase + str[1..-1]
154
174
  end
155
175
 
156
176
  # Builds the object from hash
@@ -159,14 +179,16 @@ module GroupDocsAnnotationCloud
159
179
  def build_from_hash(attributes)
160
180
  return nil unless attributes.is_a?(Hash)
161
181
  self.class.swagger_types.each_pair do |key, type|
182
+ pname = uncap(self.class.attribute_map[key]).intern
183
+ value = attributes[pname]
162
184
  if type =~ /\AArray<(.*)>/i
163
185
  # check to ensure the input is an array given that the the attribute
164
- # is documented as an array but the input is not
165
- if attributes[self.class.attribute_map[key]].is_a?(Array)
166
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
186
+ # is documented as an array but the input is not
187
+ if value.is_a?(Array)
188
+ self.send("#{key}=", value.map { |v| _deserialize($1, v) })
167
189
  end
168
- elsif !attributes[self.class.attribute_map[key]].nil?
169
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
190
+ elsif !value.nil?
191
+ self.send("#{key}=", _deserialize(type, value))
170
192
  end
171
193
  # or else data not found in attributes(hash), not an issue as the data can be optional
172
194
  end
@@ -181,9 +203,9 @@ module GroupDocsAnnotationCloud
181
203
  def _deserialize(type, value)
182
204
  case type.to_sym
183
205
  when :DateTime
184
- Time.at(/\d/.match(value)[0].to_f).to_datetime
206
+ Date.parse value
185
207
  when :Date
186
- Time.at(/\d/.match(value)[0].to_f).to_date
208
+ Date.parse value
187
209
  when :String
188
210
  value.to_s
189
211
  when :Integer