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
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # --------------------------------------------------------------------------------------------------------------------
3
3
  # <copyright company="Aspose Pty Ltd" file="annotation_info.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
@@ -32,16 +32,22 @@ module GroupDocsAnnotationCloud
32
32
  class AnnotationInfo
33
33
 
34
34
  # Gets or sets the unique identifier
35
- attr_accessor :guid
36
-
37
- # Gets or sets the document unique identifier
38
- attr_accessor :document_guid
35
+ attr_accessor :id
39
36
 
40
37
  # Gets or sets the annotation text
41
38
  attr_accessor :text
42
39
 
40
+ # GGets or sets text to be replaced
41
+ attr_accessor :text_to_replace
42
+
43
+ # Gets or sets text horizontal alignment
44
+ attr_accessor :horizontal_alignment
45
+
46
+ # Gets or sets text vertical alignment
47
+ attr_accessor :vertical_alignment
48
+
43
49
  # Gets or sets the creator unique identifier
44
- attr_accessor :creator_guid
50
+ attr_accessor :creator_id
45
51
 
46
52
  # Gets or sets the name of the creator
47
53
  attr_accessor :creator_name
@@ -52,6 +58,9 @@ module GroupDocsAnnotationCloud
52
58
  # Gets or sets the box where annotation will be placed
53
59
  attr_accessor :box
54
60
 
61
+ # Gets or sets collection of points that describe rectangles with text
62
+ attr_accessor :points
63
+
55
64
  # Gets or sets the number of page where annotation will be placed
56
65
  attr_accessor :page_number
57
66
 
@@ -64,9 +73,6 @@ module GroupDocsAnnotationCloud
64
73
  # Gets or sets the annotation type
65
74
  attr_accessor :type
66
75
 
67
- # Gets or sets the annotation access
68
- attr_accessor :access
69
-
70
76
  # Gets or sets the array of annotation replies
71
77
  attr_accessor :replies
72
78
 
@@ -88,8 +94,8 @@ module GroupDocsAnnotationCloud
88
94
  # Gets or sets the annotation's background color
89
95
  attr_accessor :background_color
90
96
 
91
- # Gets or sets the annotation's field text
92
- attr_accessor :field_text
97
+ # Gets or sets annotation color
98
+ attr_accessor :squiggly_color
93
99
 
94
100
  # Gets or sets the annotation's font family
95
101
  attr_accessor :font_family
@@ -102,6 +108,18 @@ module GroupDocsAnnotationCloud
102
108
 
103
109
  # Gets or sets the watermark annotation's rotation angle
104
110
  attr_accessor :angle
111
+
112
+ # Gets or sets z-index. Default value is 0 The z-index property specifies the stack order of an element.
113
+ attr_accessor :z_index
114
+
115
+ # Gets or sets annotation link url
116
+ attr_accessor :url
117
+
118
+ # Gets or sets image file path in cloud storage, for Image annotations
119
+ attr_accessor :image_path
120
+
121
+ # Sets auto scale for watermark annotation
122
+ attr_accessor :auto_scale
105
123
  class EnumAttributeValidator
106
124
  attr_reader :datatype
107
125
  attr_reader :allowable_values
@@ -127,18 +145,20 @@ module GroupDocsAnnotationCloud
127
145
  # Attribute mapping from ruby-style variable name to JSON key.
128
146
  def self.attribute_map
129
147
  {
130
- :'guid' => :'Guid',
131
- :'document_guid' => :'DocumentGuid',
148
+ :'id' => :'Id',
132
149
  :'text' => :'Text',
133
- :'creator_guid' => :'CreatorGuid',
150
+ :'text_to_replace' => :'TextToReplace',
151
+ :'horizontal_alignment' => :'HorizontalAlignment',
152
+ :'vertical_alignment' => :'VerticalAlignment',
153
+ :'creator_id' => :'CreatorId',
134
154
  :'creator_name' => :'CreatorName',
135
155
  :'creator_email' => :'CreatorEmail',
136
156
  :'box' => :'Box',
157
+ :'points' => :'Points',
137
158
  :'page_number' => :'PageNumber',
138
159
  :'annotation_position' => :'AnnotationPosition',
139
160
  :'svg_path' => :'SvgPath',
140
161
  :'type' => :'Type',
141
- :'access' => :'Access',
142
162
  :'replies' => :'Replies',
143
163
  :'created_on' => :'CreatedOn',
144
164
  :'font_color' => :'FontColor',
@@ -146,41 +166,51 @@ module GroupDocsAnnotationCloud
146
166
  :'pen_width' => :'PenWidth',
147
167
  :'pen_style' => :'PenStyle',
148
168
  :'background_color' => :'BackgroundColor',
149
- :'field_text' => :'FieldText',
169
+ :'squiggly_color' => :'SquigglyColor',
150
170
  :'font_family' => :'FontFamily',
151
171
  :'font_size' => :'FontSize',
152
172
  :'opacity' => :'Opacity',
153
- :'angle' => :'Angle'
173
+ :'angle' => :'Angle',
174
+ :'z_index' => :'ZIndex',
175
+ :'url' => :'Url',
176
+ :'image_path' => :'ImagePath',
177
+ :'auto_scale' => :'AutoScale'
154
178
  }
155
179
  end
156
180
 
157
181
  # Attribute type mapping.
158
182
  def self.swagger_types
159
183
  {
160
- :'guid' => :'String',
161
- :'document_guid' => :'Integer',
184
+ :'id' => :'Integer',
162
185
  :'text' => :'String',
163
- :'creator_guid' => :'String',
186
+ :'text_to_replace' => :'String',
187
+ :'horizontal_alignment' => :'String',
188
+ :'vertical_alignment' => :'String',
189
+ :'creator_id' => :'Integer',
164
190
  :'creator_name' => :'String',
165
191
  :'creator_email' => :'String',
166
192
  :'box' => :'Rectangle',
193
+ :'points' => :'Array<Point>',
167
194
  :'page_number' => :'Integer',
168
195
  :'annotation_position' => :'Point',
169
196
  :'svg_path' => :'String',
170
197
  :'type' => :'String',
171
- :'access' => :'String',
172
198
  :'replies' => :'Array<AnnotationReplyInfo>',
173
199
  :'created_on' => :'DateTime',
174
200
  :'font_color' => :'Integer',
175
201
  :'pen_color' => :'Integer',
176
202
  :'pen_width' => :'Integer',
177
- :'pen_style' => :'Integer',
203
+ :'pen_style' => :'String',
178
204
  :'background_color' => :'Integer',
179
- :'field_text' => :'String',
205
+ :'squiggly_color' => :'Integer',
180
206
  :'font_family' => :'String',
181
207
  :'font_size' => :'Float',
182
208
  :'opacity' => :'Float',
183
- :'angle' => :'Float'
209
+ :'angle' => :'Float',
210
+ :'z_index' => :'Integer',
211
+ :'url' => :'String',
212
+ :'image_path' => :'String',
213
+ :'auto_scale' => :'BOOLEAN'
184
214
  }
185
215
  end
186
216
 
@@ -192,20 +222,28 @@ module GroupDocsAnnotationCloud
192
222
  # convert string to symbol for hash key
193
223
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
194
224
 
195
- if attributes.key?(:'Guid')
196
- self.guid = attributes[:'Guid']
197
- end
198
-
199
- if attributes.key?(:'DocumentGuid')
200
- self.document_guid = attributes[:'DocumentGuid']
225
+ if attributes.key?(:'Id')
226
+ self.id = attributes[:'Id']
201
227
  end
202
228
 
203
229
  if attributes.key?(:'Text')
204
230
  self.text = attributes[:'Text']
205
231
  end
206
232
 
207
- if attributes.key?(:'CreatorGuid')
208
- self.creator_guid = attributes[:'CreatorGuid']
233
+ if attributes.key?(:'TextToReplace')
234
+ self.text_to_replace = attributes[:'TextToReplace']
235
+ end
236
+
237
+ if attributes.key?(:'HorizontalAlignment')
238
+ self.horizontal_alignment = attributes[:'HorizontalAlignment']
239
+ end
240
+
241
+ if attributes.key?(:'VerticalAlignment')
242
+ self.vertical_alignment = attributes[:'VerticalAlignment']
243
+ end
244
+
245
+ if attributes.key?(:'CreatorId')
246
+ self.creator_id = attributes[:'CreatorId']
209
247
  end
210
248
 
211
249
  if attributes.key?(:'CreatorName')
@@ -220,6 +258,12 @@ module GroupDocsAnnotationCloud
220
258
  self.box = attributes[:'Box']
221
259
  end
222
260
 
261
+ if attributes.key?(:'Points')
262
+ if (value = attributes[:'Points']).is_a?(Array)
263
+ self.points = value
264
+ end
265
+ end
266
+
223
267
  if attributes.key?(:'PageNumber')
224
268
  self.page_number = attributes[:'PageNumber']
225
269
  end
@@ -236,10 +280,6 @@ module GroupDocsAnnotationCloud
236
280
  self.type = attributes[:'Type']
237
281
  end
238
282
 
239
- if attributes.key?(:'Access')
240
- self.access = attributes[:'Access']
241
- end
242
-
243
283
  if attributes.key?(:'Replies')
244
284
  if (value = attributes[:'Replies']).is_a?(Array)
245
285
  self.replies = value
@@ -270,8 +310,8 @@ module GroupDocsAnnotationCloud
270
310
  self.background_color = attributes[:'BackgroundColor']
271
311
  end
272
312
 
273
- if attributes.key?(:'FieldText')
274
- self.field_text = attributes[:'FieldText']
313
+ if attributes.key?(:'SquigglyColor')
314
+ self.squiggly_color = attributes[:'SquigglyColor']
275
315
  end
276
316
 
277
317
  if attributes.key?(:'FontFamily')
@@ -290,14 +330,42 @@ module GroupDocsAnnotationCloud
290
330
  self.angle = attributes[:'Angle']
291
331
  end
292
332
 
333
+ if attributes.key?(:'ZIndex')
334
+ self.z_index = attributes[:'ZIndex']
335
+ end
336
+
337
+ if attributes.key?(:'Url')
338
+ self.url = attributes[:'Url']
339
+ end
340
+
341
+ if attributes.key?(:'ImagePath')
342
+ self.image_path = attributes[:'ImagePath']
343
+ end
344
+
345
+ if attributes.key?(:'AutoScale')
346
+ self.auto_scale = attributes[:'AutoScale']
347
+ end
348
+
293
349
  end
294
350
 
295
351
  # Show invalid properties with the reasons. Usually used together with valid?
296
352
  # @return Array for valid properies with the reasons
297
353
  def list_invalid_properties
298
354
  invalid_properties = []
299
- if @document_guid.nil?
300
- invalid_properties.push("invalid value for 'document_guid', document_guid cannot be nil.")
355
+ if @id.nil?
356
+ invalid_properties.push("invalid value for 'id', id cannot be nil.")
357
+ end
358
+
359
+ if @horizontal_alignment.nil?
360
+ invalid_properties.push("invalid value for 'horizontal_alignment', horizontal_alignment cannot be nil.")
361
+ end
362
+
363
+ if @vertical_alignment.nil?
364
+ invalid_properties.push("invalid value for 'vertical_alignment', vertical_alignment cannot be nil.")
365
+ end
366
+
367
+ if @creator_id.nil?
368
+ invalid_properties.push("invalid value for 'creator_id', creator_id cannot be nil.")
301
369
  end
302
370
 
303
371
  if @box.nil?
@@ -312,30 +380,78 @@ module GroupDocsAnnotationCloud
312
380
  invalid_properties.push("invalid value for 'created_on', created_on cannot be nil.")
313
381
  end
314
382
 
383
+ if @z_index.nil?
384
+ invalid_properties.push("invalid value for 'z_index', z_index cannot be nil.")
385
+ end
386
+
387
+ if @auto_scale.nil?
388
+ invalid_properties.push("invalid value for 'auto_scale', auto_scale cannot be nil.")
389
+ end
390
+
315
391
  return invalid_properties
316
392
  end
317
393
 
318
394
  # Check to see if the all the properties in the model are valid
319
395
  # @return true if the model is valid
320
396
  def valid?
321
- return false if @document_guid.nil?
397
+ return false if @id.nil?
398
+ return false if @horizontal_alignment.nil?
399
+ horizontal_alignment_validator = EnumAttributeValidator.new('String', ["None", "Left", "Center", "Right"])
400
+ return false unless horizontal_alignment_validator.valid?(@horizontal_alignment)
401
+ return false if @vertical_alignment.nil?
402
+ vertical_alignment_validator = EnumAttributeValidator.new('String', ["None", "Top", "Center", "Bottom"])
403
+ return false unless vertical_alignment_validator.valid?(@vertical_alignment)
404
+ return false if @creator_id.nil?
322
405
  return false if @box.nil?
323
406
  return false if @type.nil?
324
- type_validator = EnumAttributeValidator.new('String', ["Text", "Area", "Point", "TextStrikeout", "Polyline", "TextField", "Watermark", "TextReplacement", "Arrow", "TextRedaction", "ResourcesRedaction", "TextUnderline", "Distance", "Ellipse"])
407
+ type_validator = EnumAttributeValidator.new('String', ["None", "Area", "Arrow", "Distance", "Ellipse", "Link", "Point", "Polyline", "ResourcesRedaction", "TextField", "TextHighlight", "TextRedaction", "TextReplacement", "TextStrikeout", "TextUnderline", "Watermark", "Image", "TextSquiggly"])
325
408
  return false unless type_validator.valid?(@type)
326
- access_validator = EnumAttributeValidator.new('String', ["Public", "Private"])
327
- return false unless access_validator.valid?(@access)
328
409
  return false if @created_on.nil?
410
+ pen_style_validator = EnumAttributeValidator.new('String', ["Solid", "Dash", "DashDot", "Dot", "LongDash", "DashDotDot"])
411
+ return false unless pen_style_validator.valid?(@pen_style)
412
+ return false if @z_index.nil?
413
+ return false if @auto_scale.nil?
329
414
  return true
330
415
  end
331
416
 
417
+ # Custom attribute writer method checking allowed values (enum).
418
+ # @param [Object] horizontal_alignment Object to be assigned
419
+ def horizontal_alignment=(horizontal_alignment)
420
+ validator = EnumAttributeValidator.new('String', ["None", "Left", "Center", "Right"])
421
+ if horizontal_alignment.to_i == 0
422
+ unless validator.valid?(horizontal_alignment)
423
+ # raise ArgumentError, "invalid value for 'horizontal_alignment', must be one of #{validator.allowable_values}."
424
+ @horizontal_alignment = validator.allowable_values[horizontal_alignment.to_i]
425
+ end
426
+ @horizontal_alignment = horizontal_alignment
427
+ else
428
+ @horizontal_alignment = validator.allowable_values[horizontal_alignment.to_i]
429
+ end
430
+ end
431
+
432
+ # Custom attribute writer method checking allowed values (enum).
433
+ # @param [Object] vertical_alignment Object to be assigned
434
+ def vertical_alignment=(vertical_alignment)
435
+ validator = EnumAttributeValidator.new('String', ["None", "Top", "Center", "Bottom"])
436
+ if vertical_alignment.to_i == 0
437
+ unless validator.valid?(vertical_alignment)
438
+ # raise ArgumentError, "invalid value for 'vertical_alignment', must be one of #{validator.allowable_values}."
439
+ @vertical_alignment = validator.allowable_values[vertical_alignment.to_i]
440
+ end
441
+ @vertical_alignment = vertical_alignment
442
+ else
443
+ @vertical_alignment = validator.allowable_values[vertical_alignment.to_i]
444
+ end
445
+ end
446
+
332
447
  # Custom attribute writer method checking allowed values (enum).
333
448
  # @param [Object] type Object to be assigned
334
449
  def type=(type)
335
- validator = EnumAttributeValidator.new('String', ["Text", "Area", "Point", "TextStrikeout", "Polyline", "TextField", "Watermark", "TextReplacement", "Arrow", "TextRedaction", "ResourcesRedaction", "TextUnderline", "Distance", "Ellipse"])
450
+ validator = EnumAttributeValidator.new('String', ["None", "Area", "Arrow", "Distance", "Ellipse", "Link", "Point", "Polyline", "ResourcesRedaction", "TextField", "TextHighlight", "TextRedaction", "TextReplacement", "TextStrikeout", "TextUnderline", "Watermark", "Image", "TextSquiggly"])
336
451
  if type.to_i == 0
337
452
  unless validator.valid?(type)
338
- raise ArgumentError, "invalid value for 'type', must be one of #{validator.allowable_values}."
453
+ # raise ArgumentError, "invalid value for 'type', must be one of #{validator.allowable_values}."
454
+ @type = validator.allowable_values[type.to_i]
339
455
  end
340
456
  @type = type
341
457
  else
@@ -344,16 +460,17 @@ module GroupDocsAnnotationCloud
344
460
  end
345
461
 
346
462
  # Custom attribute writer method checking allowed values (enum).
347
- # @param [Object] access Object to be assigned
348
- def access=(access)
349
- validator = EnumAttributeValidator.new('String', ["Public", "Private"])
350
- if access.to_i == 0
351
- unless validator.valid?(access)
352
- raise ArgumentError, "invalid value for 'access', must be one of #{validator.allowable_values}."
463
+ # @param [Object] pen_style Object to be assigned
464
+ def pen_style=(pen_style)
465
+ validator = EnumAttributeValidator.new('String', ["Solid", "Dash", "DashDot", "Dot", "LongDash", "DashDotDot"])
466
+ if pen_style.to_i == 0
467
+ unless validator.valid?(pen_style)
468
+ # raise ArgumentError, "invalid value for 'pen_style', must be one of #{validator.allowable_values}."
469
+ @pen_style = validator.allowable_values[pen_style.to_i]
353
470
  end
354
- @access = access
471
+ @pen_style = pen_style
355
472
  else
356
- @access = validator.allowable_values[access.to_i]
473
+ @pen_style = validator.allowable_values[pen_style.to_i]
357
474
  end
358
475
  end
359
476
 
@@ -362,18 +479,20 @@ module GroupDocsAnnotationCloud
362
479
  def ==(other)
363
480
  return true if self.equal?(other)
364
481
  self.class == other.class &&
365
- guid == other.guid &&
366
- document_guid == other.document_guid &&
482
+ id == other.id &&
367
483
  text == other.text &&
368
- creator_guid == other.creator_guid &&
484
+ text_to_replace == other.text_to_replace &&
485
+ horizontal_alignment == other.horizontal_alignment &&
486
+ vertical_alignment == other.vertical_alignment &&
487
+ creator_id == other.creator_id &&
369
488
  creator_name == other.creator_name &&
370
489
  creator_email == other.creator_email &&
371
490
  box == other.box &&
491
+ points == other.points &&
372
492
  page_number == other.page_number &&
373
493
  annotation_position == other.annotation_position &&
374
494
  svg_path == other.svg_path &&
375
495
  type == other.type &&
376
- access == other.access &&
377
496
  replies == other.replies &&
378
497
  created_on == other.created_on &&
379
498
  font_color == other.font_color &&
@@ -381,11 +500,15 @@ module GroupDocsAnnotationCloud
381
500
  pen_width == other.pen_width &&
382
501
  pen_style == other.pen_style &&
383
502
  background_color == other.background_color &&
384
- field_text == other.field_text &&
503
+ squiggly_color == other.squiggly_color &&
385
504
  font_family == other.font_family &&
386
505
  font_size == other.font_size &&
387
506
  opacity == other.opacity &&
388
- angle == other.angle
507
+ angle == other.angle &&
508
+ z_index == other.z_index &&
509
+ url == other.url &&
510
+ image_path == other.image_path &&
511
+ auto_scale == other.auto_scale
389
512
  end
390
513
 
391
514
  # @see the `==` method
@@ -397,7 +520,7 @@ module GroupDocsAnnotationCloud
397
520
  # Calculates hash code according to all attributes.
398
521
  # @return [Fixnum] Hash code
399
522
  def hash
400
- [guid, document_guid, text, creator_guid, creator_name, creator_email, box, page_number, annotation_position, svg_path, type, access, replies, created_on, font_color, pen_color, pen_width, pen_style, background_color, field_text, font_family, font_size, opacity, angle].hash
523
+ [id, text, text_to_replace, horizontal_alignment, vertical_alignment, creator_id, creator_name, creator_email, box, points, page_number, annotation_position, svg_path, type, replies, created_on, font_color, pen_color, pen_width, pen_style, background_color, squiggly_color, font_family, font_size, opacity, angle, z_index, url, image_path, auto_scale].hash
401
524
  end
402
525
 
403
526
  # Downcases first letter.
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # --------------------------------------------------------------------------------------------------------------------
3
3
  # <copyright company="Aspose Pty Ltd" file="annotation_reply_info.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
@@ -32,10 +32,10 @@ module GroupDocsAnnotationCloud
32
32
  class AnnotationReplyInfo
33
33
 
34
34
  # Gets or sets the unique identifier
35
- attr_accessor :guid
35
+ attr_accessor :id
36
36
 
37
37
  # Gets or sets the user's unique identifier
38
- attr_accessor :user_guid
38
+ attr_accessor :user_id
39
39
 
40
40
  # Gets or sets the user's name
41
41
  attr_accessor :user_name
@@ -44,37 +44,37 @@ module GroupDocsAnnotationCloud
44
44
  attr_accessor :user_email
45
45
 
46
46
  # Gets or sets the message
47
- attr_accessor :message
47
+ attr_accessor :comment
48
48
 
49
49
  # Gets or sets the reply time
50
50
  attr_accessor :replied_on
51
51
 
52
52
  # Gets or sets the parent reply unique identifier
53
- attr_accessor :parent_reply_guid
53
+ attr_accessor :parent_reply_id
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',
58
+ :'id' => :'Id',
59
+ :'user_id' => :'UserId',
60
60
  :'user_name' => :'UserName',
61
61
  :'user_email' => :'UserEmail',
62
- :'message' => :'Message',
62
+ :'comment' => :'Comment',
63
63
  :'replied_on' => :'RepliedOn',
64
- :'parent_reply_guid' => :'ParentReplyGuid'
64
+ :'parent_reply_id' => :'ParentReplyId'
65
65
  }
66
66
  end
67
67
 
68
68
  # Attribute type mapping.
69
69
  def self.swagger_types
70
70
  {
71
- :'guid' => :'String',
72
- :'user_guid' => :'String',
71
+ :'id' => :'Integer',
72
+ :'user_id' => :'Integer',
73
73
  :'user_name' => :'String',
74
74
  :'user_email' => :'String',
75
- :'message' => :'String',
75
+ :'comment' => :'String',
76
76
  :'replied_on' => :'DateTime',
77
- :'parent_reply_guid' => :'String'
77
+ :'parent_reply_id' => :'Integer'
78
78
  }
79
79
  end
80
80
 
@@ -86,12 +86,12 @@ module GroupDocsAnnotationCloud
86
86
  # convert string to symbol for hash key
87
87
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
88
88
 
89
- if attributes.key?(:'Guid')
90
- self.guid = attributes[:'Guid']
89
+ if attributes.key?(:'Id')
90
+ self.id = attributes[:'Id']
91
91
  end
92
92
 
93
- if attributes.key?(:'UserGuid')
94
- self.user_guid = attributes[:'UserGuid']
93
+ if attributes.key?(:'UserId')
94
+ self.user_id = attributes[:'UserId']
95
95
  end
96
96
 
97
97
  if attributes.key?(:'UserName')
@@ -102,16 +102,16 @@ module GroupDocsAnnotationCloud
102
102
  self.user_email = attributes[:'UserEmail']
103
103
  end
104
104
 
105
- if attributes.key?(:'Message')
106
- self.message = attributes[:'Message']
105
+ if attributes.key?(:'Comment')
106
+ self.comment = attributes[:'Comment']
107
107
  end
108
108
 
109
109
  if attributes.key?(:'RepliedOn')
110
110
  self.replied_on = attributes[:'RepliedOn']
111
111
  end
112
112
 
113
- if attributes.key?(:'ParentReplyGuid')
114
- self.parent_reply_guid = attributes[:'ParentReplyGuid']
113
+ if attributes.key?(:'ParentReplyId')
114
+ self.parent_reply_id = attributes[:'ParentReplyId']
115
115
  end
116
116
 
117
117
  end
@@ -120,17 +120,32 @@ module GroupDocsAnnotationCloud
120
120
  # @return Array for valid properies with the reasons
121
121
  def list_invalid_properties
122
122
  invalid_properties = []
123
+ if @id.nil?
124
+ invalid_properties.push("invalid value for 'id', id cannot be nil.")
125
+ end
126
+
127
+ if @user_id.nil?
128
+ invalid_properties.push("invalid value for 'user_id', user_id cannot be nil.")
129
+ end
130
+
123
131
  if @replied_on.nil?
124
132
  invalid_properties.push("invalid value for 'replied_on', replied_on cannot be nil.")
125
133
  end
126
134
 
135
+ if @parent_reply_id.nil?
136
+ invalid_properties.push("invalid value for 'parent_reply_id', parent_reply_id cannot be nil.")
137
+ end
138
+
127
139
  return invalid_properties
128
140
  end
129
141
 
130
142
  # Check to see if the all the properties in the model are valid
131
143
  # @return true if the model is valid
132
144
  def valid?
145
+ return false if @id.nil?
146
+ return false if @user_id.nil?
133
147
  return false if @replied_on.nil?
148
+ return false if @parent_reply_id.nil?
134
149
  return true
135
150
  end
136
151
 
@@ -139,13 +154,13 @@ module GroupDocsAnnotationCloud
139
154
  def ==(other)
140
155
  return true if self.equal?(other)
141
156
  self.class == other.class &&
142
- guid == other.guid &&
143
- user_guid == other.user_guid &&
157
+ id == other.id &&
158
+ user_id == other.user_id &&
144
159
  user_name == other.user_name &&
145
160
  user_email == other.user_email &&
146
- message == other.message &&
161
+ comment == other.comment &&
147
162
  replied_on == other.replied_on &&
148
- parent_reply_guid == other.parent_reply_guid
163
+ parent_reply_id == other.parent_reply_id
149
164
  end
150
165
 
151
166
  # @see the `==` method
@@ -157,7 +172,7 @@ module GroupDocsAnnotationCloud
157
172
  # Calculates hash code according to all attributes.
158
173
  # @return [Fixnum] Hash code
159
174
  def hash
160
- [guid, user_guid, user_name, user_email, message, replied_on, parent_reply_guid].hash
175
+ [id, user_id, user_name, user_email, comment, replied_on, parent_reply_id].hash
161
176
  end
162
177
 
163
178
  # Downcases first letter.