groupdocs_annotation_cloud 18.7 → 19.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/groupdocs_annotation_cloud.rb +23 -39
- data/lib/groupdocs_annotation_cloud/api/annotate_api.rb +664 -0
- data/lib/groupdocs_annotation_cloud/api/file_api.rb +729 -0
- data/lib/groupdocs_annotation_cloud/api/folder_api.rb +694 -0
- data/lib/groupdocs_annotation_cloud/api/{pdf_file_api.rb → info_api.rb} +101 -105
- data/lib/groupdocs_annotation_cloud/api/preview_api.rb +380 -0
- data/lib/groupdocs_annotation_cloud/api/storage_api.rb +541 -0
- data/lib/groupdocs_annotation_cloud/api_client.rb +7 -17
- data/lib/groupdocs_annotation_cloud/api_error.rb +5 -3
- data/lib/groupdocs_annotation_cloud/configuration.rb +3 -3
- data/lib/groupdocs_annotation_cloud/models/annotation_api_link.rb +24 -16
- data/lib/groupdocs_annotation_cloud/models/annotation_info.rb +97 -82
- data/lib/groupdocs_annotation_cloud/models/annotation_reply_info.rb +31 -23
- data/lib/groupdocs_annotation_cloud/models/disc_usage.rb +234 -0
- data/lib/groupdocs_annotation_cloud/models/document_info.rb +44 -22
- data/lib/groupdocs_annotation_cloud/models/error.rb +244 -0
- data/lib/groupdocs_annotation_cloud/models/error_details.rb +229 -0
- data/lib/groupdocs_annotation_cloud/models/file_version.rb +289 -0
- data/lib/groupdocs_annotation_cloud/models/{value_type.rb → file_versions.rb} +33 -13
- data/lib/groupdocs_annotation_cloud/models/files_list.rb +216 -0
- data/lib/groupdocs_annotation_cloud/models/files_upload_result.rb +228 -0
- data/lib/groupdocs_annotation_cloud/models/format.rb +224 -0
- data/lib/groupdocs_annotation_cloud/models/formats_result.rb +216 -0
- data/lib/groupdocs_annotation_cloud/models/link.rb +24 -16
- data/lib/groupdocs_annotation_cloud/models/link_element.rb +18 -10
- data/lib/groupdocs_annotation_cloud/models/object_exist.rb +234 -0
- data/lib/groupdocs_annotation_cloud/models/{image_page.rb → page_image.rb} +28 -13
- data/lib/groupdocs_annotation_cloud/models/{image_pages.rb → page_images.rb} +26 -14
- data/lib/groupdocs_annotation_cloud/models/page_info.rb +41 -23
- data/lib/groupdocs_annotation_cloud/models/point.rb +31 -13
- data/lib/groupdocs_annotation_cloud/models/rectangle.rb +45 -17
- data/lib/groupdocs_annotation_cloud/models/row_info.rb +38 -16
- data/lib/groupdocs_annotation_cloud/models/storage_exist.rb +219 -0
- data/lib/groupdocs_annotation_cloud/models/storage_file.rb +264 -0
- data/lib/groupdocs_annotation_cloud/version.rb +2 -2
- metadata +22 -39
- data/lib/groupdocs_annotation_cloud/api/annotation_api.rb +0 -344
- data/lib/groupdocs_annotation_cloud/api/image_info_api.rb +0 -218
- data/lib/groupdocs_annotation_cloud/api/image_pages_api.rb +0 -395
- data/lib/groupdocs_annotation_cloud/models/requests/delete_clean_document_request.rb +0 -53
- data/lib/groupdocs_annotation_cloud/models/requests/delete_pages_request.rb +0 -49
- data/lib/groupdocs_annotation_cloud/models/requests/get_import_request.rb +0 -53
- data/lib/groupdocs_annotation_cloud/models/requests/get_info_request.rb +0 -53
- data/lib/groupdocs_annotation_cloud/models/requests/get_page_request.rb +0 -53
- data/lib/groupdocs_annotation_cloud/models/requests/get_pages_request.rb +0 -49
- data/lib/groupdocs_annotation_cloud/models/requests/get_pdf_request.rb +0 -53
- data/lib/groupdocs_annotation_cloud/models/requests/get_pdf_stream_request.rb +0 -53
- data/lib/groupdocs_annotation_cloud/models/requests/post_pages_request.rb +0 -53
- data/lib/groupdocs_annotation_cloud/models/requests/put_export_request.rb +0 -57
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
|
-
# <copyright company="Aspose Pty Ltd" file="
|
4
|
-
# Copyright (c) 2003-
|
3
|
+
# <copyright company="Aspose Pty Ltd" file="page_image.rb">
|
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,18 +28,20 @@
|
|
28
28
|
require 'date'
|
29
29
|
|
30
30
|
module GroupDocsAnnotationCloud
|
31
|
-
|
32
|
-
class
|
31
|
+
# The document page image representatoin
|
32
|
+
class PageImage
|
33
33
|
|
34
|
-
# Link to the document
|
34
|
+
# Link to the document
|
35
35
|
attr_accessor :link
|
36
|
+
|
37
|
+
# Gets or sets the page number
|
36
38
|
attr_accessor :number
|
37
39
|
|
38
40
|
# Attribute mapping from ruby-style variable name to JSON key.
|
39
41
|
def self.attribute_map
|
40
42
|
{
|
41
43
|
:'link' => :'link',
|
42
|
-
:'number' => :'
|
44
|
+
:'number' => :'Number'
|
43
45
|
}
|
44
46
|
end
|
45
47
|
|
@@ -73,12 +75,17 @@ module GroupDocsAnnotationCloud
|
|
73
75
|
# @return Array for valid properies with the reasons
|
74
76
|
def list_invalid_properties
|
75
77
|
invalid_properties = []
|
78
|
+
if @number.nil?
|
79
|
+
invalid_properties.push("invalid value for 'number', number cannot be nil.")
|
80
|
+
end
|
81
|
+
|
76
82
|
return invalid_properties
|
77
83
|
end
|
78
84
|
|
79
85
|
# Check to see if the all the properties in the model are valid
|
80
86
|
# @return true if the model is valid
|
81
87
|
def valid?
|
88
|
+
return false if @number.nil?
|
82
89
|
return true
|
83
90
|
end
|
84
91
|
|
@@ -103,20 +110,28 @@ module GroupDocsAnnotationCloud
|
|
103
110
|
[link, number].hash
|
104
111
|
end
|
105
112
|
|
113
|
+
# Downcases first letter.
|
114
|
+
# @return downcased string
|
115
|
+
def uncap(str)
|
116
|
+
str[0, 1].downcase + str[1..-1]
|
117
|
+
end
|
118
|
+
|
106
119
|
# Builds the object from hash
|
107
120
|
# @param [Hash] attributes Model attributes in the form of hash
|
108
121
|
# @return [Object] Returns the model itself
|
109
122
|
def build_from_hash(attributes)
|
110
123
|
return nil unless attributes.is_a?(Hash)
|
111
124
|
self.class.swagger_types.each_pair do |key, type|
|
125
|
+
pname = uncap(self.class.attribute_map[key]).intern
|
126
|
+
value = attributes[pname]
|
112
127
|
if type =~ /\AArray<(.*)>/i
|
113
128
|
# check to ensure the input is an array given that the the attribute
|
114
|
-
# is documented as an array but the input is not
|
115
|
-
if
|
116
|
-
self.send("#{key}=",
|
129
|
+
# is documented as an array but the input is not
|
130
|
+
if value.is_a?(Array)
|
131
|
+
self.send("#{key}=", value.map { |v| _deserialize($1, v) })
|
117
132
|
end
|
118
|
-
elsif !
|
119
|
-
self.send("#{key}=", _deserialize(type,
|
133
|
+
elsif !value.nil?
|
134
|
+
self.send("#{key}=", _deserialize(type, value))
|
120
135
|
end
|
121
136
|
# or else data not found in attributes(hash), not an issue as the data can be optional
|
122
137
|
end
|
@@ -131,9 +146,9 @@ module GroupDocsAnnotationCloud
|
|
131
146
|
def _deserialize(type, value)
|
132
147
|
case type.to_sym
|
133
148
|
when :DateTime
|
134
|
-
|
149
|
+
Date.parse value
|
135
150
|
when :Date
|
136
|
-
|
151
|
+
Date.parse value
|
137
152
|
when :String
|
138
153
|
value.to_s
|
139
154
|
when :Integer
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
|
-
# <copyright company="Aspose Pty Ltd" file="
|
4
|
-
# Copyright (c) 2003-
|
3
|
+
# <copyright company="Aspose Pty Ltd" file="page_images.rb">
|
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,16 +28,20 @@
|
|
28
28
|
require 'date'
|
29
29
|
|
30
30
|
module GroupDocsAnnotationCloud
|
31
|
-
|
32
|
-
class
|
31
|
+
# Represents collection of document pages image representations
|
32
|
+
class PageImages
|
33
|
+
|
34
|
+
# The total count of page image entries in collection
|
33
35
|
attr_accessor :total_count
|
36
|
+
|
37
|
+
# The collection of pages image representations
|
34
38
|
attr_accessor :entries
|
35
39
|
|
36
40
|
# Attribute mapping from ruby-style variable name to JSON key.
|
37
41
|
def self.attribute_map
|
38
42
|
{
|
39
|
-
:'total_count' => :'
|
40
|
-
:'entries' => :'
|
43
|
+
:'total_count' => :'TotalCount',
|
44
|
+
:'entries' => :'Entries'
|
41
45
|
}
|
42
46
|
end
|
43
47
|
|
@@ -45,7 +49,7 @@ module GroupDocsAnnotationCloud
|
|
45
49
|
def self.swagger_types
|
46
50
|
{
|
47
51
|
:'total_count' => :'Integer',
|
48
|
-
:'entries' => :'Array<
|
52
|
+
:'entries' => :'Array<PageImage>'
|
49
53
|
}
|
50
54
|
end
|
51
55
|
|
@@ -108,20 +112,28 @@ module GroupDocsAnnotationCloud
|
|
108
112
|
[total_count, entries].hash
|
109
113
|
end
|
110
114
|
|
115
|
+
# Downcases first letter.
|
116
|
+
# @return downcased string
|
117
|
+
def uncap(str)
|
118
|
+
str[0, 1].downcase + str[1..-1]
|
119
|
+
end
|
120
|
+
|
111
121
|
# Builds the object from hash
|
112
122
|
# @param [Hash] attributes Model attributes in the form of hash
|
113
123
|
# @return [Object] Returns the model itself
|
114
124
|
def build_from_hash(attributes)
|
115
125
|
return nil unless attributes.is_a?(Hash)
|
116
126
|
self.class.swagger_types.each_pair do |key, type|
|
127
|
+
pname = uncap(self.class.attribute_map[key]).intern
|
128
|
+
value = attributes[pname]
|
117
129
|
if type =~ /\AArray<(.*)>/i
|
118
130
|
# check to ensure the input is an array given that the the attribute
|
119
|
-
# is documented as an array but the input is not
|
120
|
-
if
|
121
|
-
self.send("#{key}=",
|
131
|
+
# is documented as an array but the input is not
|
132
|
+
if value.is_a?(Array)
|
133
|
+
self.send("#{key}=", value.map { |v| _deserialize($1, v) })
|
122
134
|
end
|
123
|
-
elsif !
|
124
|
-
self.send("#{key}=", _deserialize(type,
|
135
|
+
elsif !value.nil?
|
136
|
+
self.send("#{key}=", _deserialize(type, value))
|
125
137
|
end
|
126
138
|
# or else data not found in attributes(hash), not an issue as the data can be optional
|
127
139
|
end
|
@@ -136,9 +148,9 @@ module GroupDocsAnnotationCloud
|
|
136
148
|
def _deserialize(type, value)
|
137
149
|
case type.to_sym
|
138
150
|
when :DateTime
|
139
|
-
|
151
|
+
Date.parse value
|
140
152
|
when :Date
|
141
|
-
|
153
|
+
Date.parse value
|
142
154
|
when :String
|
143
155
|
value.to_s
|
144
156
|
when :Integer
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="page_info.rb">
|
4
|
-
# Copyright (c) 2003-
|
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,22 +28,32 @@
|
|
28
28
|
require 'date'
|
29
29
|
|
30
30
|
module GroupDocsAnnotationCloud
|
31
|
-
|
31
|
+
# Describes page information
|
32
32
|
class PageInfo
|
33
|
+
|
34
|
+
# Gets or sets the page number
|
33
35
|
attr_accessor :number
|
36
|
+
|
37
|
+
# Gets or sets the page width
|
34
38
|
attr_accessor :width
|
39
|
+
|
40
|
+
# Gets or sets the page height
|
35
41
|
attr_accessor :height
|
36
|
-
|
42
|
+
|
43
|
+
# Indicates whether page is visible or not
|
44
|
+
attr_accessor :is_visible
|
45
|
+
|
46
|
+
# Gets or sets the list of text rows
|
37
47
|
attr_accessor :rows
|
38
48
|
|
39
49
|
# Attribute mapping from ruby-style variable name to JSON key.
|
40
50
|
def self.attribute_map
|
41
51
|
{
|
42
|
-
:'number' => :'
|
43
|
-
:'width' => :'
|
44
|
-
:'height' => :'
|
45
|
-
:'
|
46
|
-
:'rows' => :'
|
52
|
+
:'number' => :'Number',
|
53
|
+
:'width' => :'Width',
|
54
|
+
:'height' => :'Height',
|
55
|
+
:'is_visible' => :'IsVisible',
|
56
|
+
:'rows' => :'Rows'
|
47
57
|
}
|
48
58
|
end
|
49
59
|
|
@@ -53,7 +63,7 @@ module GroupDocsAnnotationCloud
|
|
53
63
|
:'number' => :'Integer',
|
54
64
|
:'width' => :'Integer',
|
55
65
|
:'height' => :'Integer',
|
56
|
-
:'
|
66
|
+
:'is_visible' => :'BOOLEAN',
|
57
67
|
:'rows' => :'Array<RowInfo>'
|
58
68
|
}
|
59
69
|
end
|
@@ -78,8 +88,8 @@ module GroupDocsAnnotationCloud
|
|
78
88
|
self.height = attributes[:'Height']
|
79
89
|
end
|
80
90
|
|
81
|
-
if attributes.key?(:'
|
82
|
-
self.
|
91
|
+
if attributes.key?(:'IsVisible')
|
92
|
+
self.is_visible = attributes[:'IsVisible']
|
83
93
|
end
|
84
94
|
|
85
95
|
if attributes.key?(:'Rows')
|
@@ -106,8 +116,8 @@ module GroupDocsAnnotationCloud
|
|
106
116
|
invalid_properties.push("invalid value for 'height', height cannot be nil.")
|
107
117
|
end
|
108
118
|
|
109
|
-
if @
|
110
|
-
invalid_properties.push("invalid value for '
|
119
|
+
if @is_visible.nil?
|
120
|
+
invalid_properties.push("invalid value for 'is_visible', is_visible cannot be nil.")
|
111
121
|
end
|
112
122
|
|
113
123
|
return invalid_properties
|
@@ -119,7 +129,7 @@ module GroupDocsAnnotationCloud
|
|
119
129
|
return false if @number.nil?
|
120
130
|
return false if @width.nil?
|
121
131
|
return false if @height.nil?
|
122
|
-
return false if @
|
132
|
+
return false if @is_visible.nil?
|
123
133
|
return true
|
124
134
|
end
|
125
135
|
|
@@ -131,7 +141,7 @@ module GroupDocsAnnotationCloud
|
|
131
141
|
number == other.number &&
|
132
142
|
width == other.width &&
|
133
143
|
height == other.height &&
|
134
|
-
|
144
|
+
is_visible == other.is_visible &&
|
135
145
|
rows == other.rows
|
136
146
|
end
|
137
147
|
|
@@ -144,7 +154,13 @@ module GroupDocsAnnotationCloud
|
|
144
154
|
# Calculates hash code according to all attributes.
|
145
155
|
# @return [Fixnum] Hash code
|
146
156
|
def hash
|
147
|
-
[number, width, height,
|
157
|
+
[number, width, height, is_visible, rows].hash
|
158
|
+
end
|
159
|
+
|
160
|
+
# Downcases first letter.
|
161
|
+
# @return downcased string
|
162
|
+
def uncap(str)
|
163
|
+
str[0, 1].downcase + str[1..-1]
|
148
164
|
end
|
149
165
|
|
150
166
|
# Builds the object from hash
|
@@ -153,14 +169,16 @@ module GroupDocsAnnotationCloud
|
|
153
169
|
def build_from_hash(attributes)
|
154
170
|
return nil unless attributes.is_a?(Hash)
|
155
171
|
self.class.swagger_types.each_pair do |key, type|
|
172
|
+
pname = uncap(self.class.attribute_map[key]).intern
|
173
|
+
value = attributes[pname]
|
156
174
|
if type =~ /\AArray<(.*)>/i
|
157
175
|
# check to ensure the input is an array given that the the attribute
|
158
|
-
# is documented as an array but the input is not
|
159
|
-
if
|
160
|
-
self.send("#{key}=",
|
176
|
+
# is documented as an array but the input is not
|
177
|
+
if value.is_a?(Array)
|
178
|
+
self.send("#{key}=", value.map { |v| _deserialize($1, v) })
|
161
179
|
end
|
162
|
-
elsif !
|
163
|
-
self.send("#{key}=", _deserialize(type,
|
180
|
+
elsif !value.nil?
|
181
|
+
self.send("#{key}=", _deserialize(type, value))
|
164
182
|
end
|
165
183
|
# or else data not found in attributes(hash), not an issue as the data can be optional
|
166
184
|
end
|
@@ -175,9 +193,9 @@ module GroupDocsAnnotationCloud
|
|
175
193
|
def _deserialize(type, value)
|
176
194
|
case type.to_sym
|
177
195
|
when :DateTime
|
178
|
-
|
196
|
+
Date.parse value
|
179
197
|
when :Date
|
180
|
-
|
198
|
+
Date.parse value
|
181
199
|
when :String
|
182
200
|
value.to_s
|
183
201
|
when :Integer
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="point.rb">
|
4
|
-
# Copyright (c) 2003-
|
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,20 +28,20 @@
|
|
28
28
|
require 'date'
|
29
29
|
|
30
30
|
module GroupDocsAnnotationCloud
|
31
|
-
|
31
|
+
# Describes point where annotation will be placed
|
32
32
|
class Point
|
33
33
|
|
34
|
-
# Gets or sets the x
|
34
|
+
# Gets or sets the x coordinate
|
35
35
|
attr_accessor :x
|
36
36
|
|
37
|
-
# Gets or sets the y
|
37
|
+
# Gets or sets the y coordinate
|
38
38
|
attr_accessor :y
|
39
39
|
|
40
40
|
# Attribute mapping from ruby-style variable name to JSON key.
|
41
41
|
def self.attribute_map
|
42
42
|
{
|
43
|
-
:'x' => :'
|
44
|
-
:'y' => :'
|
43
|
+
:'x' => :'X',
|
44
|
+
:'y' => :'Y'
|
45
45
|
}
|
46
46
|
end
|
47
47
|
|
@@ -75,12 +75,22 @@ module GroupDocsAnnotationCloud
|
|
75
75
|
# @return Array for valid properies with the reasons
|
76
76
|
def list_invalid_properties
|
77
77
|
invalid_properties = []
|
78
|
+
if @x.nil?
|
79
|
+
invalid_properties.push("invalid value for 'x', x cannot be nil.")
|
80
|
+
end
|
81
|
+
|
82
|
+
if @y.nil?
|
83
|
+
invalid_properties.push("invalid value for 'y', y cannot be nil.")
|
84
|
+
end
|
85
|
+
|
78
86
|
return invalid_properties
|
79
87
|
end
|
80
88
|
|
81
89
|
# Check to see if the all the properties in the model are valid
|
82
90
|
# @return true if the model is valid
|
83
91
|
def valid?
|
92
|
+
return false if @x.nil?
|
93
|
+
return false if @y.nil?
|
84
94
|
return true
|
85
95
|
end
|
86
96
|
|
@@ -105,20 +115,28 @@ module GroupDocsAnnotationCloud
|
|
105
115
|
[x, y].hash
|
106
116
|
end
|
107
117
|
|
118
|
+
# Downcases first letter.
|
119
|
+
# @return downcased string
|
120
|
+
def uncap(str)
|
121
|
+
str[0, 1].downcase + str[1..-1]
|
122
|
+
end
|
123
|
+
|
108
124
|
# Builds the object from hash
|
109
125
|
# @param [Hash] attributes Model attributes in the form of hash
|
110
126
|
# @return [Object] Returns the model itself
|
111
127
|
def build_from_hash(attributes)
|
112
128
|
return nil unless attributes.is_a?(Hash)
|
113
129
|
self.class.swagger_types.each_pair do |key, type|
|
130
|
+
pname = uncap(self.class.attribute_map[key]).intern
|
131
|
+
value = attributes[pname]
|
114
132
|
if type =~ /\AArray<(.*)>/i
|
115
133
|
# check to ensure the input is an array given that the the attribute
|
116
|
-
# is documented as an array but the input is not
|
117
|
-
if
|
118
|
-
self.send("#{key}=",
|
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) })
|
119
137
|
end
|
120
|
-
elsif !
|
121
|
-
self.send("#{key}=", _deserialize(type,
|
138
|
+
elsif !value.nil?
|
139
|
+
self.send("#{key}=", _deserialize(type, value))
|
122
140
|
end
|
123
141
|
# or else data not found in attributes(hash), not an issue as the data can be optional
|
124
142
|
end
|
@@ -133,9 +151,9 @@ module GroupDocsAnnotationCloud
|
|
133
151
|
def _deserialize(type, value)
|
134
152
|
case type.to_sym
|
135
153
|
when :DateTime
|
136
|
-
|
154
|
+
Date.parse value
|
137
155
|
when :Date
|
138
|
-
|
156
|
+
Date.parse value
|
139
157
|
when :String
|
140
158
|
value.to_s
|
141
159
|
when :Integer
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="rectangle.rb">
|
4
|
-
# Copyright (c) 2003-
|
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,28 +28,28 @@
|
|
28
28
|
require 'date'
|
29
29
|
|
30
30
|
module GroupDocsAnnotationCloud
|
31
|
-
|
31
|
+
# Describes rectangle where annotation will be placed
|
32
32
|
class Rectangle
|
33
33
|
|
34
|
-
# Gets or sets the x
|
34
|
+
# Gets or sets the x coordinate of the rectangle upper left corner
|
35
35
|
attr_accessor :x
|
36
36
|
|
37
|
-
# Gets or sets the y
|
37
|
+
# Gets or sets the y coordinate of the rectangle upper left corner
|
38
38
|
attr_accessor :y
|
39
39
|
|
40
|
-
# Gets or sets the width
|
40
|
+
# Gets or sets the rectangle width
|
41
41
|
attr_accessor :width
|
42
42
|
|
43
|
-
# Gets or sets the height
|
43
|
+
# Gets or sets the rectangle height
|
44
44
|
attr_accessor :height
|
45
45
|
|
46
46
|
# Attribute mapping from ruby-style variable name to JSON key.
|
47
47
|
def self.attribute_map
|
48
48
|
{
|
49
|
-
:'x' => :'
|
50
|
-
:'y' => :'
|
51
|
-
:'width' => :'
|
52
|
-
:'height' => :'
|
49
|
+
:'x' => :'X',
|
50
|
+
:'y' => :'Y',
|
51
|
+
:'width' => :'Width',
|
52
|
+
:'height' => :'Height'
|
53
53
|
}
|
54
54
|
end
|
55
55
|
|
@@ -93,12 +93,32 @@ module GroupDocsAnnotationCloud
|
|
93
93
|
# @return Array for valid properies with the reasons
|
94
94
|
def list_invalid_properties
|
95
95
|
invalid_properties = []
|
96
|
+
if @x.nil?
|
97
|
+
invalid_properties.push("invalid value for 'x', x cannot be nil.")
|
98
|
+
end
|
99
|
+
|
100
|
+
if @y.nil?
|
101
|
+
invalid_properties.push("invalid value for 'y', y cannot be nil.")
|
102
|
+
end
|
103
|
+
|
104
|
+
if @width.nil?
|
105
|
+
invalid_properties.push("invalid value for 'width', width cannot be nil.")
|
106
|
+
end
|
107
|
+
|
108
|
+
if @height.nil?
|
109
|
+
invalid_properties.push("invalid value for 'height', height cannot be nil.")
|
110
|
+
end
|
111
|
+
|
96
112
|
return invalid_properties
|
97
113
|
end
|
98
114
|
|
99
115
|
# Check to see if the all the properties in the model are valid
|
100
116
|
# @return true if the model is valid
|
101
117
|
def valid?
|
118
|
+
return false if @x.nil?
|
119
|
+
return false if @y.nil?
|
120
|
+
return false if @width.nil?
|
121
|
+
return false if @height.nil?
|
102
122
|
return true
|
103
123
|
end
|
104
124
|
|
@@ -125,20 +145,28 @@ module GroupDocsAnnotationCloud
|
|
125
145
|
[x, y, width, height].hash
|
126
146
|
end
|
127
147
|
|
148
|
+
# Downcases first letter.
|
149
|
+
# @return downcased string
|
150
|
+
def uncap(str)
|
151
|
+
str[0, 1].downcase + str[1..-1]
|
152
|
+
end
|
153
|
+
|
128
154
|
# Builds the object from hash
|
129
155
|
# @param [Hash] attributes Model attributes in the form of hash
|
130
156
|
# @return [Object] Returns the model itself
|
131
157
|
def build_from_hash(attributes)
|
132
158
|
return nil unless attributes.is_a?(Hash)
|
133
159
|
self.class.swagger_types.each_pair do |key, type|
|
160
|
+
pname = uncap(self.class.attribute_map[key]).intern
|
161
|
+
value = attributes[pname]
|
134
162
|
if type =~ /\AArray<(.*)>/i
|
135
163
|
# 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
|
138
|
-
self.send("#{key}=",
|
164
|
+
# is documented as an array but the input is not
|
165
|
+
if value.is_a?(Array)
|
166
|
+
self.send("#{key}=", value.map { |v| _deserialize($1, v) })
|
139
167
|
end
|
140
|
-
elsif !
|
141
|
-
self.send("#{key}=", _deserialize(type,
|
168
|
+
elsif !value.nil?
|
169
|
+
self.send("#{key}=", _deserialize(type, value))
|
142
170
|
end
|
143
171
|
# or else data not found in attributes(hash), not an issue as the data can be optional
|
144
172
|
end
|
@@ -153,9 +181,9 @@ module GroupDocsAnnotationCloud
|
|
153
181
|
def _deserialize(type, value)
|
154
182
|
case type.to_sym
|
155
183
|
when :DateTime
|
156
|
-
|
184
|
+
Date.parse value
|
157
185
|
when :Date
|
158
|
-
|
186
|
+
Date.parse value
|
159
187
|
when :String
|
160
188
|
value.to_s
|
161
189
|
when :Integer
|