groupdocs_viewer_cloud 18.11 → 19.3
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_viewer_cloud.rb +27 -32
- data/lib/groupdocs_viewer_cloud/api/file_api.rb +729 -0
- data/lib/groupdocs_viewer_cloud/api/folder_api.rb +694 -0
- data/lib/groupdocs_viewer_cloud/api/storage_api.rb +541 -0
- data/lib/groupdocs_viewer_cloud/api/viewer_api.rb +232 -5069
- data/lib/groupdocs_viewer_cloud/api_client.rb +5 -5
- data/lib/groupdocs_viewer_cloud/api_error.rb +6 -6
- data/lib/groupdocs_viewer_cloud/configuration.rb +4 -4
- data/lib/groupdocs_viewer_cloud/models/attachment_info.rb +22 -34
- data/lib/groupdocs_viewer_cloud/models/{html_page.rb → attachment_view.rb} +39 -33
- data/lib/groupdocs_viewer_cloud/models/cad_options.rb +44 -65
- data/lib/groupdocs_viewer_cloud/models/{font_family.rb → delete_view_options.rb} +25 -17
- data/lib/groupdocs_viewer_cloud/models/{reorder_options.rb → disc_usage.rb} +42 -34
- data/lib/groupdocs_viewer_cloud/models/email_options.rb +23 -25
- data/lib/groupdocs_viewer_cloud/models/{image_page_collection.rb → error.rb} +46 -40
- data/lib/groupdocs_viewer_cloud/models/{outlook_options.rb → error_details.rb} +40 -17
- data/lib/groupdocs_viewer_cloud/models/field_label.rb +20 -12
- data/lib/groupdocs_viewer_cloud/models/{transform_options_base.rb → file_info.rb} +49 -21
- data/lib/groupdocs_viewer_cloud/models/{html_attachment_page_collection.rb → file_version.rb} +91 -40
- data/lib/groupdocs_viewer_cloud/models/{page_info_collection.rb → file_versions.rb} +26 -18
- data/lib/groupdocs_viewer_cloud/models/{font_collection.rb → files_list.rb} +26 -18
- data/lib/groupdocs_viewer_cloud/models/{image_page.rb → files_upload_result.rb} +36 -24
- data/lib/groupdocs_viewer_cloud/models/format.rb +30 -22
- data/lib/groupdocs_viewer_cloud/models/{format_collection.rb → formats_result.rb} +19 -11
- data/lib/groupdocs_viewer_cloud/models/html_options.rb +108 -209
- data/lib/groupdocs_viewer_cloud/models/html_resource.rb +234 -0
- data/lib/groupdocs_viewer_cloud/models/image_options.rb +129 -163
- data/lib/groupdocs_viewer_cloud/models/{attachment_collection.rb → info_result.rb} +32 -32
- data/lib/groupdocs_viewer_cloud/models/{rotate_options.rb → object_exist.rb} +42 -34
- data/lib/groupdocs_viewer_cloud/models/page_info.rb +48 -55
- data/lib/groupdocs_viewer_cloud/models/{pdf_file_info.rb → page_view.rb} +53 -38
- data/lib/groupdocs_viewer_cloud/models/{project_options.rb → project_management_options.rb} +39 -21
- data/lib/groupdocs_viewer_cloud/models/render_options.rb +92 -146
- data/lib/groupdocs_viewer_cloud/models/resource.rb +30 -22
- data/lib/groupdocs_viewer_cloud/models/{row_info.rb → row.rb} +65 -37
- data/lib/groupdocs_viewer_cloud/models/{cells_options.rb → spreadsheet_options.rb} +95 -67
- data/lib/groupdocs_viewer_cloud/models/{attachment.rb → storage_exist.rb} +30 -27
- data/lib/groupdocs_viewer_cloud/models/{image_attachment_page_collection.rb → storage_file.rb} +66 -40
- data/lib/groupdocs_viewer_cloud/models/{document_info.rb → view_options.rb} +99 -105
- data/lib/groupdocs_viewer_cloud/models/{html_page_collection.rb → view_result.rb} +43 -33
- data/lib/groupdocs_viewer_cloud/models/watermark.rb +35 -22
- data/lib/groupdocs_viewer_cloud/version.rb +2 -2
- metadata +27 -110
- data/lib/groupdocs_viewer_cloud/models/document_info_options.rb +0 -358
- data/lib/groupdocs_viewer_cloud/models/file_response.rb +0 -196
- data/lib/groupdocs_viewer_cloud/models/pdf_file_options.rb +0 -358
- data/lib/groupdocs_viewer_cloud/models/pdf_options.rb +0 -236
- data/lib/groupdocs_viewer_cloud/models/render_options_base.rb +0 -358
- data/lib/groupdocs_viewer_cloud/models/requests/html_create_attachment_pages_cache_request.rb +0 -65
- data/lib/groupdocs_viewer_cloud/models/requests/html_create_pages_cache_from_content_request.rb +0 -65
- data/lib/groupdocs_viewer_cloud/models/requests/html_create_pages_cache_from_url_request.rb +0 -65
- data/lib/groupdocs_viewer_cloud/models/requests/html_create_pages_cache_request.rb +0 -61
- data/lib/groupdocs_viewer_cloud/models/requests/html_create_pdf_file_from_content_request.rb +0 -65
- data/lib/groupdocs_viewer_cloud/models/requests/html_create_pdf_file_from_url_request.rb +0 -65
- data/lib/groupdocs_viewer_cloud/models/requests/html_create_pdf_file_request.rb +0 -61
- data/lib/groupdocs_viewer_cloud/models/requests/html_delete_attachment_pages_cache_request.rb +0 -57
- data/lib/groupdocs_viewer_cloud/models/requests/html_delete_pages_cache_request.rb +0 -53
- data/lib/groupdocs_viewer_cloud/models/requests/html_get_attachment_info_request.rb +0 -65
- data/lib/groupdocs_viewer_cloud/models/requests/html_get_attachment_info_with_options_request.rb +0 -61
- data/lib/groupdocs_viewer_cloud/models/requests/html_get_attachment_page_request.rb +0 -109
- data/lib/groupdocs_viewer_cloud/models/requests/html_get_attachment_page_resource_request.rb +0 -65
- data/lib/groupdocs_viewer_cloud/models/requests/html_get_attachment_pages_request.rb +0 -113
- data/lib/groupdocs_viewer_cloud/models/requests/html_get_attachment_request.rb +0 -61
- data/lib/groupdocs_viewer_cloud/models/requests/html_get_attachments_request.rb +0 -57
- data/lib/groupdocs_viewer_cloud/models/requests/html_get_document_info_from_content_request.rb +0 -61
- data/lib/groupdocs_viewer_cloud/models/requests/html_get_document_info_from_url_request.rb +0 -69
- data/lib/groupdocs_viewer_cloud/models/requests/html_get_document_info_from_url_with_options_request.rb +0 -61
- data/lib/groupdocs_viewer_cloud/models/requests/html_get_document_info_request.rb +0 -65
- data/lib/groupdocs_viewer_cloud/models/requests/html_get_document_info_with_options_request.rb +0 -57
- data/lib/groupdocs_viewer_cloud/models/requests/html_get_page_request.rb +0 -101
- data/lib/groupdocs_viewer_cloud/models/requests/html_get_page_resource_request.rb +0 -61
- data/lib/groupdocs_viewer_cloud/models/requests/html_get_pages_from_url_request.rb +0 -109
- data/lib/groupdocs_viewer_cloud/models/requests/html_get_pages_request.rb +0 -105
- data/lib/groupdocs_viewer_cloud/models/requests/html_get_pdf_file_from_url_request.rb +0 -77
- data/lib/groupdocs_viewer_cloud/models/requests/html_get_pdf_file_request.rb +0 -73
- data/lib/groupdocs_viewer_cloud/models/requests/html_get_zip_with_attachment_pages_request.rb +0 -113
- data/lib/groupdocs_viewer_cloud/models/requests/html_get_zip_with_pages_request.rb +0 -105
- data/lib/groupdocs_viewer_cloud/models/requests/html_transform_pages_request.rb +0 -57
- data/lib/groupdocs_viewer_cloud/models/requests/image_create_attachment_pages_cache_request.rb +0 -65
- data/lib/groupdocs_viewer_cloud/models/requests/image_create_pages_cache_from_content_request.rb +0 -65
- data/lib/groupdocs_viewer_cloud/models/requests/image_create_pages_cache_from_url_request.rb +0 -65
- data/lib/groupdocs_viewer_cloud/models/requests/image_create_pages_cache_request.rb +0 -61
- data/lib/groupdocs_viewer_cloud/models/requests/image_create_pdf_file_from_content_request.rb +0 -65
- data/lib/groupdocs_viewer_cloud/models/requests/image_create_pdf_file_from_url_request.rb +0 -65
- data/lib/groupdocs_viewer_cloud/models/requests/image_create_pdf_file_request.rb +0 -61
- data/lib/groupdocs_viewer_cloud/models/requests/image_delete_attachment_pages_cache_request.rb +0 -57
- data/lib/groupdocs_viewer_cloud/models/requests/image_delete_pages_cache_request.rb +0 -53
- data/lib/groupdocs_viewer_cloud/models/requests/image_get_attachment_info_request.rb +0 -69
- data/lib/groupdocs_viewer_cloud/models/requests/image_get_attachment_info_with_options_request.rb +0 -61
- data/lib/groupdocs_viewer_cloud/models/requests/image_get_attachment_page_request.rb +0 -105
- data/lib/groupdocs_viewer_cloud/models/requests/image_get_attachment_pages_request.rb +0 -109
- data/lib/groupdocs_viewer_cloud/models/requests/image_get_attachment_request.rb +0 -61
- data/lib/groupdocs_viewer_cloud/models/requests/image_get_attachments_request.rb +0 -57
- data/lib/groupdocs_viewer_cloud/models/requests/image_get_document_info_from_content_request.rb +0 -61
- data/lib/groupdocs_viewer_cloud/models/requests/image_get_document_info_from_url_request.rb +0 -73
- data/lib/groupdocs_viewer_cloud/models/requests/image_get_document_info_from_url_with_options_request.rb +0 -61
- data/lib/groupdocs_viewer_cloud/models/requests/image_get_document_info_request.rb +0 -69
- data/lib/groupdocs_viewer_cloud/models/requests/image_get_document_info_with_options_request.rb +0 -57
- data/lib/groupdocs_viewer_cloud/models/requests/image_get_page_request.rb +0 -97
- data/lib/groupdocs_viewer_cloud/models/requests/image_get_pages_from_url_request.rb +0 -105
- data/lib/groupdocs_viewer_cloud/models/requests/image_get_pages_request.rb +0 -101
- data/lib/groupdocs_viewer_cloud/models/requests/image_get_pdf_file_from_url_request.rb +0 -77
- data/lib/groupdocs_viewer_cloud/models/requests/image_get_pdf_file_request.rb +0 -73
- data/lib/groupdocs_viewer_cloud/models/requests/image_get_zip_with_attachment_pages_request.rb +0 -109
- data/lib/groupdocs_viewer_cloud/models/requests/image_get_zip_with_pages_request.rb +0 -101
- data/lib/groupdocs_viewer_cloud/models/requests/image_transform_pages_request.rb +0 -57
- data/lib/groupdocs_viewer_cloud/models/resource_url.rb +0 -206
- data/lib/groupdocs_viewer_cloud/models/slides_options.rb +0 -206
- data/lib/groupdocs_viewer_cloud/models/tile.rb +0 -236
- data/lib/groupdocs_viewer_cloud/models/words_options.rb +0 -216
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="resource.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 GroupDocsViewerCloud
|
31
|
-
#
|
31
|
+
# Reference to resource
|
32
32
|
class Resource
|
33
33
|
|
34
|
-
#
|
35
|
-
attr_accessor :
|
34
|
+
# Path of resource file in storage
|
35
|
+
attr_accessor :path
|
36
36
|
|
37
|
-
#
|
38
|
-
attr_accessor :
|
37
|
+
# ULR to retrieve resource.
|
38
|
+
attr_accessor :download_url
|
39
39
|
|
40
40
|
# Attribute mapping from ruby-style variable name to JSON key.
|
41
41
|
def self.attribute_map
|
42
42
|
{
|
43
|
-
:'
|
44
|
-
:'
|
43
|
+
:'path' => :'Path',
|
44
|
+
:'download_url' => :'DownloadUrl'
|
45
45
|
}
|
46
46
|
end
|
47
47
|
|
48
48
|
# Attribute type mapping.
|
49
49
|
def self.swagger_types
|
50
50
|
{
|
51
|
-
:'
|
52
|
-
:'
|
51
|
+
:'path' => :'String',
|
52
|
+
:'download_url' => :'String'
|
53
53
|
}
|
54
54
|
end
|
55
55
|
|
@@ -61,12 +61,12 @@ module GroupDocsViewerCloud
|
|
61
61
|
# convert string to symbol for hash key
|
62
62
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
63
63
|
|
64
|
-
if attributes.key?(:'
|
65
|
-
self.
|
64
|
+
if attributes.key?(:'Path')
|
65
|
+
self.path = attributes[:'Path']
|
66
66
|
end
|
67
67
|
|
68
|
-
if attributes.key?(:'
|
69
|
-
self.
|
68
|
+
if attributes.key?(:'DownloadUrl')
|
69
|
+
self.download_url = attributes[:'DownloadUrl']
|
70
70
|
end
|
71
71
|
|
72
72
|
end
|
@@ -89,8 +89,8 @@ module GroupDocsViewerCloud
|
|
89
89
|
def ==(other)
|
90
90
|
return true if self.equal?(other)
|
91
91
|
self.class == other.class &&
|
92
|
-
|
93
|
-
|
92
|
+
path == other.path &&
|
93
|
+
download_url == other.download_url
|
94
94
|
end
|
95
95
|
|
96
96
|
# @see the `==` method
|
@@ -102,7 +102,13 @@ module GroupDocsViewerCloud
|
|
102
102
|
# Calculates hash code according to all attributes.
|
103
103
|
# @return [Fixnum] Hash code
|
104
104
|
def hash
|
105
|
-
[
|
105
|
+
[path, download_url].hash
|
106
|
+
end
|
107
|
+
|
108
|
+
# Downcases first letter.
|
109
|
+
# @return downcased string
|
110
|
+
def uncap(str)
|
111
|
+
str[0, 1].downcase + str[1..-1]
|
106
112
|
end
|
107
113
|
|
108
114
|
# Builds the object from hash
|
@@ -111,14 +117,16 @@ module GroupDocsViewerCloud
|
|
111
117
|
def build_from_hash(attributes)
|
112
118
|
return nil unless attributes.is_a?(Hash)
|
113
119
|
self.class.swagger_types.each_pair do |key, type|
|
120
|
+
pname = uncap(self.class.attribute_map[key]).intern
|
121
|
+
value = attributes[pname]
|
114
122
|
if type =~ /\AArray<(.*)>/i
|
115
123
|
# 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}=",
|
124
|
+
# is documented as an array but the input is not
|
125
|
+
if value.is_a?(Array)
|
126
|
+
self.send("#{key}=", value.map { |v| _deserialize($1, v) })
|
119
127
|
end
|
120
|
-
elsif !
|
121
|
-
self.send("#{key}=", _deserialize(type,
|
128
|
+
elsif !value.nil?
|
129
|
+
self.send("#{key}=", _deserialize(type, value))
|
122
130
|
end
|
123
131
|
# or else data not found in attributes(hash), not an issue as the data can be optional
|
124
132
|
end
|
@@ -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="row.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,40 +28,40 @@
|
|
28
28
|
require 'date'
|
29
29
|
|
30
30
|
module GroupDocsViewerCloud
|
31
|
-
#
|
32
|
-
class
|
31
|
+
# Page row with text
|
32
|
+
class Row
|
33
33
|
|
34
|
-
# Row text
|
34
|
+
# Row text
|
35
35
|
attr_accessor :text
|
36
36
|
|
37
|
-
# Row left coordinate
|
37
|
+
# Row left coordinate
|
38
38
|
attr_accessor :row_left
|
39
39
|
|
40
|
-
# Row top coordinate
|
40
|
+
# Row top coordinate
|
41
41
|
attr_accessor :row_top
|
42
42
|
|
43
|
-
# Row width
|
43
|
+
# Row width
|
44
44
|
attr_accessor :row_width
|
45
45
|
|
46
|
-
# Row height
|
46
|
+
# Row height
|
47
47
|
attr_accessor :row_height
|
48
48
|
|
49
|
-
# Text coordinates
|
49
|
+
# Text coordinates
|
50
50
|
attr_accessor :text_coordinates
|
51
51
|
|
52
|
-
# Characters coordinates
|
52
|
+
# Characters coordinates
|
53
53
|
attr_accessor :character_coordinates
|
54
54
|
|
55
55
|
# Attribute mapping from ruby-style variable name to JSON key.
|
56
56
|
def self.attribute_map
|
57
57
|
{
|
58
|
-
:'text' => :'
|
59
|
-
:'row_left' => :'
|
60
|
-
:'row_top' => :'
|
61
|
-
:'row_width' => :'
|
62
|
-
:'row_height' => :'
|
63
|
-
:'text_coordinates' => :'
|
64
|
-
:'character_coordinates' => :'
|
58
|
+
:'text' => :'Text',
|
59
|
+
:'row_left' => :'RowLeft',
|
60
|
+
:'row_top' => :'RowTop',
|
61
|
+
:'row_width' => :'RowWidth',
|
62
|
+
:'row_height' => :'RowHeight',
|
63
|
+
:'text_coordinates' => :'TextCoordinates',
|
64
|
+
:'character_coordinates' => :'CharacterCoordinates'
|
65
65
|
}
|
66
66
|
end
|
67
67
|
|
@@ -86,34 +86,34 @@ module GroupDocsViewerCloud
|
|
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?(:'
|
90
|
-
self.text = attributes[:'
|
89
|
+
if attributes.key?(:'Text')
|
90
|
+
self.text = attributes[:'Text']
|
91
91
|
end
|
92
92
|
|
93
|
-
if attributes.key?(:'
|
94
|
-
self.row_left = attributes[:'
|
93
|
+
if attributes.key?(:'RowLeft')
|
94
|
+
self.row_left = attributes[:'RowLeft']
|
95
95
|
end
|
96
96
|
|
97
|
-
if attributes.key?(:'
|
98
|
-
self.row_top = attributes[:'
|
97
|
+
if attributes.key?(:'RowTop')
|
98
|
+
self.row_top = attributes[:'RowTop']
|
99
99
|
end
|
100
100
|
|
101
|
-
if attributes.key?(:'
|
102
|
-
self.row_width = attributes[:'
|
101
|
+
if attributes.key?(:'RowWidth')
|
102
|
+
self.row_width = attributes[:'RowWidth']
|
103
103
|
end
|
104
104
|
|
105
|
-
if attributes.key?(:'
|
106
|
-
self.row_height = attributes[:'
|
105
|
+
if attributes.key?(:'RowHeight')
|
106
|
+
self.row_height = attributes[:'RowHeight']
|
107
107
|
end
|
108
108
|
|
109
|
-
if attributes.key?(:'
|
110
|
-
if (value = attributes[:'
|
109
|
+
if attributes.key?(:'TextCoordinates')
|
110
|
+
if (value = attributes[:'TextCoordinates']).is_a?(Array)
|
111
111
|
self.text_coordinates = value
|
112
112
|
end
|
113
113
|
end
|
114
114
|
|
115
|
-
if attributes.key?(:'
|
116
|
-
if (value = attributes[:'
|
115
|
+
if attributes.key?(:'CharacterCoordinates')
|
116
|
+
if (value = attributes[:'CharacterCoordinates']).is_a?(Array)
|
117
117
|
self.character_coordinates = value
|
118
118
|
end
|
119
119
|
end
|
@@ -124,12 +124,32 @@ module GroupDocsViewerCloud
|
|
124
124
|
# @return Array for valid properies with the reasons
|
125
125
|
def list_invalid_properties
|
126
126
|
invalid_properties = []
|
127
|
+
if @row_left.nil?
|
128
|
+
invalid_properties.push("invalid value for 'row_left', row_left cannot be nil.")
|
129
|
+
end
|
130
|
+
|
131
|
+
if @row_top.nil?
|
132
|
+
invalid_properties.push("invalid value for 'row_top', row_top cannot be nil.")
|
133
|
+
end
|
134
|
+
|
135
|
+
if @row_width.nil?
|
136
|
+
invalid_properties.push("invalid value for 'row_width', row_width cannot be nil.")
|
137
|
+
end
|
138
|
+
|
139
|
+
if @row_height.nil?
|
140
|
+
invalid_properties.push("invalid value for 'row_height', row_height cannot be nil.")
|
141
|
+
end
|
142
|
+
|
127
143
|
return invalid_properties
|
128
144
|
end
|
129
145
|
|
130
146
|
# Check to see if the all the properties in the model are valid
|
131
147
|
# @return true if the model is valid
|
132
148
|
def valid?
|
149
|
+
return false if @row_left.nil?
|
150
|
+
return false if @row_top.nil?
|
151
|
+
return false if @row_width.nil?
|
152
|
+
return false if @row_height.nil?
|
133
153
|
return true
|
134
154
|
end
|
135
155
|
|
@@ -159,20 +179,28 @@ module GroupDocsViewerCloud
|
|
159
179
|
[text, row_left, row_top, row_width, row_height, text_coordinates, character_coordinates].hash
|
160
180
|
end
|
161
181
|
|
182
|
+
# Downcases first letter.
|
183
|
+
# @return downcased string
|
184
|
+
def uncap(str)
|
185
|
+
str[0, 1].downcase + str[1..-1]
|
186
|
+
end
|
187
|
+
|
162
188
|
# Builds the object from hash
|
163
189
|
# @param [Hash] attributes Model attributes in the form of hash
|
164
190
|
# @return [Object] Returns the model itself
|
165
191
|
def build_from_hash(attributes)
|
166
192
|
return nil unless attributes.is_a?(Hash)
|
167
193
|
self.class.swagger_types.each_pair do |key, type|
|
194
|
+
pname = uncap(self.class.attribute_map[key]).intern
|
195
|
+
value = attributes[pname]
|
168
196
|
if type =~ /\AArray<(.*)>/i
|
169
197
|
# check to ensure the input is an array given that the the attribute
|
170
|
-
# is documented as an array but the input is not
|
171
|
-
if
|
172
|
-
self.send("#{key}=",
|
198
|
+
# is documented as an array but the input is not
|
199
|
+
if value.is_a?(Array)
|
200
|
+
self.send("#{key}=", value.map { |v| _deserialize($1, v) })
|
173
201
|
end
|
174
|
-
elsif !
|
175
|
-
self.send("#{key}=", _deserialize(type,
|
202
|
+
elsif !value.nil?
|
203
|
+
self.send("#{key}=", _deserialize(type, value))
|
176
204
|
end
|
177
205
|
# or else data not found in attributes(hash), not an issue as the data can be optional
|
178
206
|
end
|
@@ -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="spreadsheet_options.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,29 +28,23 @@
|
|
28
28
|
require 'date'
|
29
29
|
|
30
30
|
module GroupDocsViewerCloud
|
31
|
-
#
|
32
|
-
class
|
33
|
-
|
34
|
-
# Indicates whether to render grid lines.
|
35
|
-
attr_accessor :render_grid_lines
|
31
|
+
# Rendering options for Spreadsheet file formats. Spreadsheet file formats include files with extensions: .xls, .xlsx, .xlsm, .xlsb, .csv, .ods, .ots, .xltx, .xltm, .tsv
|
32
|
+
class SpreadsheetOptions
|
36
33
|
|
37
34
|
# Allows to enable worksheets pagination. By default one worksheet is rendered into one page.
|
38
35
|
attr_accessor :paginate_sheets
|
39
36
|
|
40
|
-
# The number of rows rendered into one page when PaginateSheets
|
37
|
+
# The number of rows rendered into one page when PaginateSheets is enabled. Default value is 50.
|
41
38
|
attr_accessor :count_rows_per_page
|
42
39
|
|
43
|
-
# Indicates whether
|
44
|
-
attr_accessor :
|
45
|
-
|
46
|
-
# The text (*.csv) document encoding.
|
47
|
-
attr_accessor :encoding
|
40
|
+
# Indicates whether to render grid lines
|
41
|
+
attr_accessor :render_grid_lines
|
48
42
|
|
49
|
-
#
|
50
|
-
attr_accessor :
|
43
|
+
# By default empty rows are skipped. Enable this option in case you want to render empty rows.
|
44
|
+
attr_accessor :render_empty_rows
|
51
45
|
|
52
|
-
#
|
53
|
-
attr_accessor :
|
46
|
+
# By default empty columns are skipped. Enable this option in case you want to render empty columns.
|
47
|
+
attr_accessor :render_empty_columns
|
54
48
|
|
55
49
|
# Enables rendering of hidden rows.
|
56
50
|
attr_accessor :render_hidden_rows
|
@@ -64,29 +58,25 @@ module GroupDocsViewerCloud
|
|
64
58
|
# Attribute mapping from ruby-style variable name to JSON key.
|
65
59
|
def self.attribute_map
|
66
60
|
{
|
67
|
-
:'
|
68
|
-
:'
|
69
|
-
:'
|
70
|
-
:'
|
71
|
-
:'
|
72
|
-
:'
|
73
|
-
:'
|
74
|
-
:'
|
75
|
-
:'render_hidden_columns' => :'renderHiddenColumns',
|
76
|
-
:'render_print_area_only' => :'renderPrintAreaOnly'
|
61
|
+
:'paginate_sheets' => :'PaginateSheets',
|
62
|
+
:'count_rows_per_page' => :'CountRowsPerPage',
|
63
|
+
:'render_grid_lines' => :'RenderGridLines',
|
64
|
+
:'render_empty_rows' => :'RenderEmptyRows',
|
65
|
+
:'render_empty_columns' => :'RenderEmptyColumns',
|
66
|
+
:'render_hidden_rows' => :'RenderHiddenRows',
|
67
|
+
:'render_hidden_columns' => :'RenderHiddenColumns',
|
68
|
+
:'render_print_area_only' => :'RenderPrintAreaOnly'
|
77
69
|
}
|
78
70
|
end
|
79
71
|
|
80
72
|
# Attribute type mapping.
|
81
73
|
def self.swagger_types
|
82
74
|
{
|
83
|
-
:'render_grid_lines' => :'BOOLEAN',
|
84
75
|
:'paginate_sheets' => :'BOOLEAN',
|
85
76
|
:'count_rows_per_page' => :'Integer',
|
86
|
-
:'
|
87
|
-
:'
|
88
|
-
:'
|
89
|
-
:'text_overflow_mode' => :'String',
|
77
|
+
:'render_grid_lines' => :'BOOLEAN',
|
78
|
+
:'render_empty_rows' => :'BOOLEAN',
|
79
|
+
:'render_empty_columns' => :'BOOLEAN',
|
90
80
|
:'render_hidden_rows' => :'BOOLEAN',
|
91
81
|
:'render_hidden_columns' => :'BOOLEAN',
|
92
82
|
:'render_print_area_only' => :'BOOLEAN'
|
@@ -101,44 +91,36 @@ module GroupDocsViewerCloud
|
|
101
91
|
# convert string to symbol for hash key
|
102
92
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
103
93
|
|
104
|
-
if attributes.key?(:'
|
105
|
-
self.
|
106
|
-
end
|
107
|
-
|
108
|
-
if attributes.key?(:'paginateSheets')
|
109
|
-
self.paginate_sheets = attributes[:'paginateSheets']
|
94
|
+
if attributes.key?(:'PaginateSheets')
|
95
|
+
self.paginate_sheets = attributes[:'PaginateSheets']
|
110
96
|
end
|
111
97
|
|
112
|
-
if attributes.key?(:'
|
113
|
-
self.count_rows_per_page = attributes[:'
|
98
|
+
if attributes.key?(:'CountRowsPerPage')
|
99
|
+
self.count_rows_per_page = attributes[:'CountRowsPerPage']
|
114
100
|
end
|
115
101
|
|
116
|
-
if attributes.key?(:'
|
117
|
-
self.
|
102
|
+
if attributes.key?(:'RenderGridLines')
|
103
|
+
self.render_grid_lines = attributes[:'RenderGridLines']
|
118
104
|
end
|
119
105
|
|
120
|
-
if attributes.key?(:'
|
121
|
-
self.
|
106
|
+
if attributes.key?(:'RenderEmptyRows')
|
107
|
+
self.render_empty_rows = attributes[:'RenderEmptyRows']
|
122
108
|
end
|
123
109
|
|
124
|
-
if attributes.key?(:'
|
125
|
-
self.
|
110
|
+
if attributes.key?(:'RenderEmptyColumns')
|
111
|
+
self.render_empty_columns = attributes[:'RenderEmptyColumns']
|
126
112
|
end
|
127
113
|
|
128
|
-
if attributes.key?(:'
|
129
|
-
self.
|
114
|
+
if attributes.key?(:'RenderHiddenRows')
|
115
|
+
self.render_hidden_rows = attributes[:'RenderHiddenRows']
|
130
116
|
end
|
131
117
|
|
132
|
-
if attributes.key?(:'
|
133
|
-
self.
|
118
|
+
if attributes.key?(:'RenderHiddenColumns')
|
119
|
+
self.render_hidden_columns = attributes[:'RenderHiddenColumns']
|
134
120
|
end
|
135
121
|
|
136
|
-
if attributes.key?(:'
|
137
|
-
self.
|
138
|
-
end
|
139
|
-
|
140
|
-
if attributes.key?(:'renderPrintAreaOnly')
|
141
|
-
self.render_print_area_only = attributes[:'renderPrintAreaOnly']
|
122
|
+
if attributes.key?(:'RenderPrintAreaOnly')
|
123
|
+
self.render_print_area_only = attributes[:'RenderPrintAreaOnly']
|
142
124
|
end
|
143
125
|
|
144
126
|
end
|
@@ -147,12 +129,52 @@ module GroupDocsViewerCloud
|
|
147
129
|
# @return Array for valid properies with the reasons
|
148
130
|
def list_invalid_properties
|
149
131
|
invalid_properties = []
|
132
|
+
if @paginate_sheets.nil?
|
133
|
+
invalid_properties.push("invalid value for 'paginate_sheets', paginate_sheets cannot be nil.")
|
134
|
+
end
|
135
|
+
|
136
|
+
if @count_rows_per_page.nil?
|
137
|
+
invalid_properties.push("invalid value for 'count_rows_per_page', count_rows_per_page cannot be nil.")
|
138
|
+
end
|
139
|
+
|
140
|
+
if @render_grid_lines.nil?
|
141
|
+
invalid_properties.push("invalid value for 'render_grid_lines', render_grid_lines cannot be nil.")
|
142
|
+
end
|
143
|
+
|
144
|
+
if @render_empty_rows.nil?
|
145
|
+
invalid_properties.push("invalid value for 'render_empty_rows', render_empty_rows cannot be nil.")
|
146
|
+
end
|
147
|
+
|
148
|
+
if @render_empty_columns.nil?
|
149
|
+
invalid_properties.push("invalid value for 'render_empty_columns', render_empty_columns cannot be nil.")
|
150
|
+
end
|
151
|
+
|
152
|
+
if @render_hidden_rows.nil?
|
153
|
+
invalid_properties.push("invalid value for 'render_hidden_rows', render_hidden_rows cannot be nil.")
|
154
|
+
end
|
155
|
+
|
156
|
+
if @render_hidden_columns.nil?
|
157
|
+
invalid_properties.push("invalid value for 'render_hidden_columns', render_hidden_columns cannot be nil.")
|
158
|
+
end
|
159
|
+
|
160
|
+
if @render_print_area_only.nil?
|
161
|
+
invalid_properties.push("invalid value for 'render_print_area_only', render_print_area_only cannot be nil.")
|
162
|
+
end
|
163
|
+
|
150
164
|
return invalid_properties
|
151
165
|
end
|
152
166
|
|
153
167
|
# Check to see if the all the properties in the model are valid
|
154
168
|
# @return true if the model is valid
|
155
169
|
def valid?
|
170
|
+
return false if @paginate_sheets.nil?
|
171
|
+
return false if @count_rows_per_page.nil?
|
172
|
+
return false if @render_grid_lines.nil?
|
173
|
+
return false if @render_empty_rows.nil?
|
174
|
+
return false if @render_empty_columns.nil?
|
175
|
+
return false if @render_hidden_rows.nil?
|
176
|
+
return false if @render_hidden_columns.nil?
|
177
|
+
return false if @render_print_area_only.nil?
|
156
178
|
return true
|
157
179
|
end
|
158
180
|
|
@@ -161,13 +183,11 @@ module GroupDocsViewerCloud
|
|
161
183
|
def ==(other)
|
162
184
|
return true if self.equal?(other)
|
163
185
|
self.class == other.class &&
|
164
|
-
render_grid_lines == other.render_grid_lines &&
|
165
186
|
paginate_sheets == other.paginate_sheets &&
|
166
187
|
count_rows_per_page == other.count_rows_per_page &&
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
text_overflow_mode == other.text_overflow_mode &&
|
188
|
+
render_grid_lines == other.render_grid_lines &&
|
189
|
+
render_empty_rows == other.render_empty_rows &&
|
190
|
+
render_empty_columns == other.render_empty_columns &&
|
171
191
|
render_hidden_rows == other.render_hidden_rows &&
|
172
192
|
render_hidden_columns == other.render_hidden_columns &&
|
173
193
|
render_print_area_only == other.render_print_area_only
|
@@ -182,7 +202,13 @@ module GroupDocsViewerCloud
|
|
182
202
|
# Calculates hash code according to all attributes.
|
183
203
|
# @return [Fixnum] Hash code
|
184
204
|
def hash
|
185
|
-
[
|
205
|
+
[paginate_sheets, count_rows_per_page, render_grid_lines, render_empty_rows, render_empty_columns, render_hidden_rows, render_hidden_columns, render_print_area_only].hash
|
206
|
+
end
|
207
|
+
|
208
|
+
# Downcases first letter.
|
209
|
+
# @return downcased string
|
210
|
+
def uncap(str)
|
211
|
+
str[0, 1].downcase + str[1..-1]
|
186
212
|
end
|
187
213
|
|
188
214
|
# Builds the object from hash
|
@@ -191,14 +217,16 @@ module GroupDocsViewerCloud
|
|
191
217
|
def build_from_hash(attributes)
|
192
218
|
return nil unless attributes.is_a?(Hash)
|
193
219
|
self.class.swagger_types.each_pair do |key, type|
|
220
|
+
pname = uncap(self.class.attribute_map[key]).intern
|
221
|
+
value = attributes[pname]
|
194
222
|
if type =~ /\AArray<(.*)>/i
|
195
223
|
# check to ensure the input is an array given that the the attribute
|
196
|
-
# is documented as an array but the input is not
|
197
|
-
if
|
198
|
-
self.send("#{key}=",
|
224
|
+
# is documented as an array but the input is not
|
225
|
+
if value.is_a?(Array)
|
226
|
+
self.send("#{key}=", value.map { |v| _deserialize($1, v) })
|
199
227
|
end
|
200
|
-
elsif !
|
201
|
-
self.send("#{key}=", _deserialize(type,
|
228
|
+
elsif !value.nil?
|
229
|
+
self.send("#{key}=", _deserialize(type, value))
|
202
230
|
end
|
203
231
|
# or else data not found in attributes(hash), not an issue as the data can be optional
|
204
232
|
end
|