groupdocs_annotation_cloud 19.5 → 20.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/groupdocs_annotation_cloud.rb +1 -2
- data/lib/groupdocs_annotation_cloud/api/annotate_api.rb +5 -104
- data/lib/groupdocs_annotation_cloud/api/file_api.rb +7 -7
- data/lib/groupdocs_annotation_cloud/api/folder_api.rb +7 -7
- data/lib/groupdocs_annotation_cloud/api/info_api.rb +2 -2
- data/lib/groupdocs_annotation_cloud/api/preview_api.rb +37 -37
- data/lib/groupdocs_annotation_cloud/api/storage_api.rb +5 -5
- data/lib/groupdocs_annotation_cloud/api_client.rb +1 -1
- data/lib/groupdocs_annotation_cloud/api_error.rb +1 -1
- data/lib/groupdocs_annotation_cloud/configuration.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/annotation_api_link.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/annotation_info.rb +147 -64
- data/lib/groupdocs_annotation_cloud/models/annotation_reply_info.rb +41 -26
- data/lib/groupdocs_annotation_cloud/models/disc_usage.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/document_info.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/error.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/error_details.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/file_version.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/file_versions.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/files_list.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/files_upload_result.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/format.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/formats_result.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/link.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/link_element.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/object_exist.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/page_image.rb +2 -2
- data/lib/groupdocs_annotation_cloud/models/page_images.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/page_info.rb +5 -32
- data/lib/groupdocs_annotation_cloud/models/point.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/rectangle.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/storage_exist.rb +1 -1
- data/lib/groupdocs_annotation_cloud/models/storage_file.rb +1 -1
- data/lib/groupdocs_annotation_cloud/version.rb +2 -2
- metadata +2 -3
- data/lib/groupdocs_annotation_cloud/models/row_info.rb +0 -298
@@ -1,6 +1,6 @@
|
|
1
1
|
# -----------------------------------------------------------------------------------
|
2
2
|
# <copyright company="Aspose Pty Ltd" file="storage.rb">
|
3
|
-
# Copyright (c) 2003-
|
3
|
+
# Copyright (c) 2003-2020 Aspose Pty Ltd
|
4
4
|
# </copyright>
|
5
5
|
# <summary>
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -350,7 +350,7 @@ end
|
|
350
350
|
#
|
351
351
|
# --------------------------------------------------------------------------------------------------------------------
|
352
352
|
# <copyright company="Aspose Pty Ltd" file="get_disc_usage_request.rb">
|
353
|
-
# Copyright (c) 2003-
|
353
|
+
# Copyright (c) 2003-2020 Aspose Pty Ltd
|
354
354
|
# </copyright>
|
355
355
|
# <summary>
|
356
356
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -395,7 +395,7 @@ end
|
|
395
395
|
#
|
396
396
|
# --------------------------------------------------------------------------------------------------------------------
|
397
397
|
# <copyright company="Aspose Pty Ltd" file="get_file_versions_request.rb">
|
398
|
-
# Copyright (c) 2003-
|
398
|
+
# Copyright (c) 2003-2020 Aspose Pty Ltd
|
399
399
|
# </copyright>
|
400
400
|
# <summary>
|
401
401
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -444,7 +444,7 @@ end
|
|
444
444
|
#
|
445
445
|
# --------------------------------------------------------------------------------------------------------------------
|
446
446
|
# <copyright company="Aspose Pty Ltd" file="object_exists_request.rb">
|
447
|
-
# Copyright (c) 2003-
|
447
|
+
# Copyright (c) 2003-2020 Aspose Pty Ltd
|
448
448
|
# </copyright>
|
449
449
|
# <summary>
|
450
450
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -497,7 +497,7 @@ end
|
|
497
497
|
#
|
498
498
|
# --------------------------------------------------------------------------------------------------------------------
|
499
499
|
# <copyright company="Aspose Pty Ltd" file="storage_exists_request.rb">
|
500
|
-
# Copyright (c) 2003-
|
500
|
+
# Copyright (c) 2003-2020 Aspose Pty Ltd
|
501
501
|
# </copyright>
|
502
502
|
# <summary>
|
503
503
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# -----------------------------------------------------------------------------------
|
2
2
|
# <copyright company="Aspose Pty Ltd" file="api_client.rb">
|
3
|
-
# Copyright (c) 2003-
|
3
|
+
# Copyright (c) 2003-2020 Aspose Pty Ltd
|
4
4
|
# </copyright>
|
5
5
|
# <summary>
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# -----------------------------------------------------------------------------------
|
2
2
|
# <copyright company="Aspose Pty Ltd" file="api_error.rb">
|
3
|
-
# Copyright (c) 2003-
|
3
|
+
# Copyright (c) 2003-2020 Aspose Pty Ltd
|
4
4
|
# </copyright>
|
5
5
|
# <summary>
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# ------------------------------------------------------------------------------------
|
2
2
|
# <copyright company="Aspose Pty Ltd" file="configuration.rb">
|
3
|
-
# Copyright (c) 2003-
|
3
|
+
# Copyright (c) 2003-2020 Aspose Pty Ltd
|
4
4
|
# </copyright>
|
5
5
|
# <summary>
|
6
6
|
# 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="annotation_api_link.rb">
|
4
|
-
# Copyright (c) 2003-
|
4
|
+
# Copyright (c) 2003-2020 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="annotation_info.rb">
|
4
|
-
# Copyright (c) 2003-
|
4
|
+
# Copyright (c) 2003-2020 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 :
|
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 :
|
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,9 +94,6 @@ 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
|
93
|
-
|
94
97
|
# Gets or sets the annotation's font family
|
95
98
|
attr_accessor :font_family
|
96
99
|
|
@@ -102,6 +105,12 @@ module GroupDocsAnnotationCloud
|
|
102
105
|
|
103
106
|
# Gets or sets the watermark annotation's rotation angle
|
104
107
|
attr_accessor :angle
|
108
|
+
|
109
|
+
# Gets or sets annotation link url
|
110
|
+
attr_accessor :url
|
111
|
+
|
112
|
+
# Gets or sets image file path in cloud storage, for Image annotations
|
113
|
+
attr_accessor :image_path
|
105
114
|
class EnumAttributeValidator
|
106
115
|
attr_reader :datatype
|
107
116
|
attr_reader :allowable_values
|
@@ -127,18 +136,20 @@ module GroupDocsAnnotationCloud
|
|
127
136
|
# Attribute mapping from ruby-style variable name to JSON key.
|
128
137
|
def self.attribute_map
|
129
138
|
{
|
130
|
-
:'
|
131
|
-
:'document_guid' => :'DocumentGuid',
|
139
|
+
:'id' => :'Id',
|
132
140
|
:'text' => :'Text',
|
133
|
-
:'
|
141
|
+
:'text_to_replace' => :'TextToReplace',
|
142
|
+
:'horizontal_alignment' => :'HorizontalAlignment',
|
143
|
+
:'vertical_alignment' => :'VerticalAlignment',
|
144
|
+
:'creator_id' => :'CreatorId',
|
134
145
|
:'creator_name' => :'CreatorName',
|
135
146
|
:'creator_email' => :'CreatorEmail',
|
136
147
|
:'box' => :'Box',
|
148
|
+
:'points' => :'Points',
|
137
149
|
:'page_number' => :'PageNumber',
|
138
150
|
:'annotation_position' => :'AnnotationPosition',
|
139
151
|
:'svg_path' => :'SvgPath',
|
140
152
|
:'type' => :'Type',
|
141
|
-
:'access' => :'Access',
|
142
153
|
:'replies' => :'Replies',
|
143
154
|
:'created_on' => :'CreatedOn',
|
144
155
|
:'font_color' => :'FontColor',
|
@@ -146,41 +157,45 @@ module GroupDocsAnnotationCloud
|
|
146
157
|
:'pen_width' => :'PenWidth',
|
147
158
|
:'pen_style' => :'PenStyle',
|
148
159
|
:'background_color' => :'BackgroundColor',
|
149
|
-
:'field_text' => :'FieldText',
|
150
160
|
:'font_family' => :'FontFamily',
|
151
161
|
:'font_size' => :'FontSize',
|
152
162
|
:'opacity' => :'Opacity',
|
153
|
-
:'angle' => :'Angle'
|
163
|
+
:'angle' => :'Angle',
|
164
|
+
:'url' => :'Url',
|
165
|
+
:'image_path' => :'ImagePath'
|
154
166
|
}
|
155
167
|
end
|
156
168
|
|
157
169
|
# Attribute type mapping.
|
158
170
|
def self.swagger_types
|
159
171
|
{
|
160
|
-
:'
|
161
|
-
:'document_guid' => :'Integer',
|
172
|
+
:'id' => :'Integer',
|
162
173
|
:'text' => :'String',
|
163
|
-
:'
|
174
|
+
:'text_to_replace' => :'String',
|
175
|
+
:'horizontal_alignment' => :'String',
|
176
|
+
:'vertical_alignment' => :'String',
|
177
|
+
:'creator_id' => :'Integer',
|
164
178
|
:'creator_name' => :'String',
|
165
179
|
:'creator_email' => :'String',
|
166
180
|
:'box' => :'Rectangle',
|
181
|
+
:'points' => :'Array<Point>',
|
167
182
|
:'page_number' => :'Integer',
|
168
183
|
:'annotation_position' => :'Point',
|
169
184
|
:'svg_path' => :'String',
|
170
185
|
:'type' => :'String',
|
171
|
-
:'access' => :'String',
|
172
186
|
:'replies' => :'Array<AnnotationReplyInfo>',
|
173
187
|
:'created_on' => :'DateTime',
|
174
188
|
:'font_color' => :'Integer',
|
175
189
|
:'pen_color' => :'Integer',
|
176
190
|
:'pen_width' => :'Integer',
|
177
|
-
:'pen_style' => :'
|
191
|
+
:'pen_style' => :'String',
|
178
192
|
:'background_color' => :'Integer',
|
179
|
-
:'field_text' => :'String',
|
180
193
|
:'font_family' => :'String',
|
181
194
|
:'font_size' => :'Float',
|
182
195
|
:'opacity' => :'Float',
|
183
|
-
:'angle' => :'Float'
|
196
|
+
:'angle' => :'Float',
|
197
|
+
:'url' => :'String',
|
198
|
+
:'image_path' => :'String'
|
184
199
|
}
|
185
200
|
end
|
186
201
|
|
@@ -192,20 +207,28 @@ module GroupDocsAnnotationCloud
|
|
192
207
|
# convert string to symbol for hash key
|
193
208
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
194
209
|
|
195
|
-
if attributes.key?(:'
|
196
|
-
self.
|
197
|
-
end
|
198
|
-
|
199
|
-
if attributes.key?(:'DocumentGuid')
|
200
|
-
self.document_guid = attributes[:'DocumentGuid']
|
210
|
+
if attributes.key?(:'Id')
|
211
|
+
self.id = attributes[:'Id']
|
201
212
|
end
|
202
213
|
|
203
214
|
if attributes.key?(:'Text')
|
204
215
|
self.text = attributes[:'Text']
|
205
216
|
end
|
206
217
|
|
207
|
-
if attributes.key?(:'
|
208
|
-
self.
|
218
|
+
if attributes.key?(:'TextToReplace')
|
219
|
+
self.text_to_replace = attributes[:'TextToReplace']
|
220
|
+
end
|
221
|
+
|
222
|
+
if attributes.key?(:'HorizontalAlignment')
|
223
|
+
self.horizontal_alignment = attributes[:'HorizontalAlignment']
|
224
|
+
end
|
225
|
+
|
226
|
+
if attributes.key?(:'VerticalAlignment')
|
227
|
+
self.vertical_alignment = attributes[:'VerticalAlignment']
|
228
|
+
end
|
229
|
+
|
230
|
+
if attributes.key?(:'CreatorId')
|
231
|
+
self.creator_id = attributes[:'CreatorId']
|
209
232
|
end
|
210
233
|
|
211
234
|
if attributes.key?(:'CreatorName')
|
@@ -220,6 +243,12 @@ module GroupDocsAnnotationCloud
|
|
220
243
|
self.box = attributes[:'Box']
|
221
244
|
end
|
222
245
|
|
246
|
+
if attributes.key?(:'Points')
|
247
|
+
if (value = attributes[:'Points']).is_a?(Array)
|
248
|
+
self.points = value
|
249
|
+
end
|
250
|
+
end
|
251
|
+
|
223
252
|
if attributes.key?(:'PageNumber')
|
224
253
|
self.page_number = attributes[:'PageNumber']
|
225
254
|
end
|
@@ -236,10 +265,6 @@ module GroupDocsAnnotationCloud
|
|
236
265
|
self.type = attributes[:'Type']
|
237
266
|
end
|
238
267
|
|
239
|
-
if attributes.key?(:'Access')
|
240
|
-
self.access = attributes[:'Access']
|
241
|
-
end
|
242
|
-
|
243
268
|
if attributes.key?(:'Replies')
|
244
269
|
if (value = attributes[:'Replies']).is_a?(Array)
|
245
270
|
self.replies = value
|
@@ -270,10 +295,6 @@ module GroupDocsAnnotationCloud
|
|
270
295
|
self.background_color = attributes[:'BackgroundColor']
|
271
296
|
end
|
272
297
|
|
273
|
-
if attributes.key?(:'FieldText')
|
274
|
-
self.field_text = attributes[:'FieldText']
|
275
|
-
end
|
276
|
-
|
277
298
|
if attributes.key?(:'FontFamily')
|
278
299
|
self.font_family = attributes[:'FontFamily']
|
279
300
|
end
|
@@ -290,14 +311,34 @@ module GroupDocsAnnotationCloud
|
|
290
311
|
self.angle = attributes[:'Angle']
|
291
312
|
end
|
292
313
|
|
314
|
+
if attributes.key?(:'Url')
|
315
|
+
self.url = attributes[:'Url']
|
316
|
+
end
|
317
|
+
|
318
|
+
if attributes.key?(:'ImagePath')
|
319
|
+
self.image_path = attributes[:'ImagePath']
|
320
|
+
end
|
321
|
+
|
293
322
|
end
|
294
323
|
|
295
324
|
# Show invalid properties with the reasons. Usually used together with valid?
|
296
325
|
# @return Array for valid properies with the reasons
|
297
326
|
def list_invalid_properties
|
298
327
|
invalid_properties = []
|
299
|
-
if @
|
300
|
-
invalid_properties.push("invalid value for '
|
328
|
+
if @id.nil?
|
329
|
+
invalid_properties.push("invalid value for 'id', id cannot be nil.")
|
330
|
+
end
|
331
|
+
|
332
|
+
if @horizontal_alignment.nil?
|
333
|
+
invalid_properties.push("invalid value for 'horizontal_alignment', horizontal_alignment cannot be nil.")
|
334
|
+
end
|
335
|
+
|
336
|
+
if @vertical_alignment.nil?
|
337
|
+
invalid_properties.push("invalid value for 'vertical_alignment', vertical_alignment cannot be nil.")
|
338
|
+
end
|
339
|
+
|
340
|
+
if @creator_id.nil?
|
341
|
+
invalid_properties.push("invalid value for 'creator_id', creator_id cannot be nil.")
|
301
342
|
end
|
302
343
|
|
303
344
|
if @box.nil?
|
@@ -318,24 +359,62 @@ module GroupDocsAnnotationCloud
|
|
318
359
|
# Check to see if the all the properties in the model are valid
|
319
360
|
# @return true if the model is valid
|
320
361
|
def valid?
|
321
|
-
return false if @
|
362
|
+
return false if @id.nil?
|
363
|
+
return false if @horizontal_alignment.nil?
|
364
|
+
horizontal_alignment_validator = EnumAttributeValidator.new('String', ["None", "Left", "Center", "Right"])
|
365
|
+
return false unless horizontal_alignment_validator.valid?(@horizontal_alignment)
|
366
|
+
return false if @vertical_alignment.nil?
|
367
|
+
vertical_alignment_validator = EnumAttributeValidator.new('String', ["None", "Top", "Center", "Bottom"])
|
368
|
+
return false unless vertical_alignment_validator.valid?(@vertical_alignment)
|
369
|
+
return false if @creator_id.nil?
|
322
370
|
return false if @box.nil?
|
323
371
|
return false if @type.nil?
|
324
|
-
type_validator = EnumAttributeValidator.new('String', ["
|
372
|
+
type_validator = EnumAttributeValidator.new('String', ["None", "Area", "Arrow", "Distance", "Ellipse", "Link", "Point", "Polyline", "ResourcesRedaction", "TextField", "TextHighlight", "TextRedaction", "TextReplacement", "TextStrikeout", "TextUnderline", "Watermark", "Image"])
|
325
373
|
return false unless type_validator.valid?(@type)
|
326
|
-
access_validator = EnumAttributeValidator.new('String', ["Public", "Private"])
|
327
|
-
return false unless access_validator.valid?(@access)
|
328
374
|
return false if @created_on.nil?
|
375
|
+
pen_style_validator = EnumAttributeValidator.new('String', ["Solid", "Dash", "DashDot", "Dot", "LongDash", "DashDotDot"])
|
376
|
+
return false unless pen_style_validator.valid?(@pen_style)
|
329
377
|
return true
|
330
378
|
end
|
331
379
|
|
380
|
+
# Custom attribute writer method checking allowed values (enum).
|
381
|
+
# @param [Object] horizontal_alignment Object to be assigned
|
382
|
+
def horizontal_alignment=(horizontal_alignment)
|
383
|
+
validator = EnumAttributeValidator.new('String', ["None", "Left", "Center", "Right"])
|
384
|
+
if horizontal_alignment.to_i == 0
|
385
|
+
unless validator.valid?(horizontal_alignment)
|
386
|
+
# raise ArgumentError, "invalid value for 'horizontal_alignment', must be one of #{validator.allowable_values}."
|
387
|
+
@horizontal_alignment = validator.allowable_values[horizontal_alignment.to_i]
|
388
|
+
end
|
389
|
+
@horizontal_alignment = horizontal_alignment
|
390
|
+
else
|
391
|
+
@horizontal_alignment = validator.allowable_values[horizontal_alignment.to_i]
|
392
|
+
end
|
393
|
+
end
|
394
|
+
|
395
|
+
# Custom attribute writer method checking allowed values (enum).
|
396
|
+
# @param [Object] vertical_alignment Object to be assigned
|
397
|
+
def vertical_alignment=(vertical_alignment)
|
398
|
+
validator = EnumAttributeValidator.new('String', ["None", "Top", "Center", "Bottom"])
|
399
|
+
if vertical_alignment.to_i == 0
|
400
|
+
unless validator.valid?(vertical_alignment)
|
401
|
+
# raise ArgumentError, "invalid value for 'vertical_alignment', must be one of #{validator.allowable_values}."
|
402
|
+
@vertical_alignment = validator.allowable_values[vertical_alignment.to_i]
|
403
|
+
end
|
404
|
+
@vertical_alignment = vertical_alignment
|
405
|
+
else
|
406
|
+
@vertical_alignment = validator.allowable_values[vertical_alignment.to_i]
|
407
|
+
end
|
408
|
+
end
|
409
|
+
|
332
410
|
# Custom attribute writer method checking allowed values (enum).
|
333
411
|
# @param [Object] type Object to be assigned
|
334
412
|
def type=(type)
|
335
|
-
validator = EnumAttributeValidator.new('String', ["
|
413
|
+
validator = EnumAttributeValidator.new('String', ["None", "Area", "Arrow", "Distance", "Ellipse", "Link", "Point", "Polyline", "ResourcesRedaction", "TextField", "TextHighlight", "TextRedaction", "TextReplacement", "TextStrikeout", "TextUnderline", "Watermark", "Image"])
|
336
414
|
if type.to_i == 0
|
337
415
|
unless validator.valid?(type)
|
338
|
-
raise ArgumentError, "invalid value for 'type', must be one of #{validator.allowable_values}."
|
416
|
+
# raise ArgumentError, "invalid value for 'type', must be one of #{validator.allowable_values}."
|
417
|
+
@type = validator.allowable_values[type.to_i]
|
339
418
|
end
|
340
419
|
@type = type
|
341
420
|
else
|
@@ -344,16 +423,17 @@ module GroupDocsAnnotationCloud
|
|
344
423
|
end
|
345
424
|
|
346
425
|
# Custom attribute writer method checking allowed values (enum).
|
347
|
-
# @param [Object]
|
348
|
-
def
|
349
|
-
validator = EnumAttributeValidator.new('String', ["
|
350
|
-
if
|
351
|
-
unless validator.valid?(
|
352
|
-
raise ArgumentError, "invalid value for '
|
426
|
+
# @param [Object] pen_style Object to be assigned
|
427
|
+
def pen_style=(pen_style)
|
428
|
+
validator = EnumAttributeValidator.new('String', ["Solid", "Dash", "DashDot", "Dot", "LongDash", "DashDotDot"])
|
429
|
+
if pen_style.to_i == 0
|
430
|
+
unless validator.valid?(pen_style)
|
431
|
+
# raise ArgumentError, "invalid value for 'pen_style', must be one of #{validator.allowable_values}."
|
432
|
+
@pen_style = validator.allowable_values[pen_style.to_i]
|
353
433
|
end
|
354
|
-
@
|
434
|
+
@pen_style = pen_style
|
355
435
|
else
|
356
|
-
@
|
436
|
+
@pen_style = validator.allowable_values[pen_style.to_i]
|
357
437
|
end
|
358
438
|
end
|
359
439
|
|
@@ -362,18 +442,20 @@ module GroupDocsAnnotationCloud
|
|
362
442
|
def ==(other)
|
363
443
|
return true if self.equal?(other)
|
364
444
|
self.class == other.class &&
|
365
|
-
|
366
|
-
document_guid == other.document_guid &&
|
445
|
+
id == other.id &&
|
367
446
|
text == other.text &&
|
368
|
-
|
447
|
+
text_to_replace == other.text_to_replace &&
|
448
|
+
horizontal_alignment == other.horizontal_alignment &&
|
449
|
+
vertical_alignment == other.vertical_alignment &&
|
450
|
+
creator_id == other.creator_id &&
|
369
451
|
creator_name == other.creator_name &&
|
370
452
|
creator_email == other.creator_email &&
|
371
453
|
box == other.box &&
|
454
|
+
points == other.points &&
|
372
455
|
page_number == other.page_number &&
|
373
456
|
annotation_position == other.annotation_position &&
|
374
457
|
svg_path == other.svg_path &&
|
375
458
|
type == other.type &&
|
376
|
-
access == other.access &&
|
377
459
|
replies == other.replies &&
|
378
460
|
created_on == other.created_on &&
|
379
461
|
font_color == other.font_color &&
|
@@ -381,11 +463,12 @@ module GroupDocsAnnotationCloud
|
|
381
463
|
pen_width == other.pen_width &&
|
382
464
|
pen_style == other.pen_style &&
|
383
465
|
background_color == other.background_color &&
|
384
|
-
field_text == other.field_text &&
|
385
466
|
font_family == other.font_family &&
|
386
467
|
font_size == other.font_size &&
|
387
468
|
opacity == other.opacity &&
|
388
|
-
angle == other.angle
|
469
|
+
angle == other.angle &&
|
470
|
+
url == other.url &&
|
471
|
+
image_path == other.image_path
|
389
472
|
end
|
390
473
|
|
391
474
|
# @see the `==` method
|
@@ -397,7 +480,7 @@ module GroupDocsAnnotationCloud
|
|
397
480
|
# Calculates hash code according to all attributes.
|
398
481
|
# @return [Fixnum] Hash code
|
399
482
|
def hash
|
400
|
-
[
|
483
|
+
[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, font_family, font_size, opacity, angle, url, image_path].hash
|
401
484
|
end
|
402
485
|
|
403
486
|
# Downcases first letter.
|