groupdocs_viewer_cloud 18.11 → 19.3
Sign up to get free protection for your applications and to get access to all the features.
- 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
|
-
# <copyright company="Aspose Pty Ltd" file="
|
4
|
-
# Copyright (c) 2003-
|
3
|
+
# <copyright company="Aspose Pty Ltd" file="file_versions.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,23 +28,23 @@
|
|
28
28
|
require 'date'
|
29
29
|
|
30
30
|
module GroupDocsViewerCloud
|
31
|
-
#
|
32
|
-
class
|
31
|
+
# File versions FileVersion.
|
32
|
+
class FileVersions
|
33
33
|
|
34
|
-
#
|
35
|
-
attr_accessor :
|
34
|
+
# File versions FileVersion.
|
35
|
+
attr_accessor :value
|
36
36
|
|
37
37
|
# Attribute mapping from ruby-style variable name to JSON key.
|
38
38
|
def self.attribute_map
|
39
39
|
{
|
40
|
-
:'
|
40
|
+
:'value' => :'Value'
|
41
41
|
}
|
42
42
|
end
|
43
43
|
|
44
44
|
# Attribute type mapping.
|
45
45
|
def self.swagger_types
|
46
46
|
{
|
47
|
-
:'
|
47
|
+
:'value' => :'Array<FileVersion>'
|
48
48
|
}
|
49
49
|
end
|
50
50
|
|
@@ -56,9 +56,9 @@ module GroupDocsViewerCloud
|
|
56
56
|
# convert string to symbol for hash key
|
57
57
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
58
58
|
|
59
|
-
if attributes.key?(:'
|
60
|
-
if (value = attributes[:'
|
61
|
-
self.
|
59
|
+
if attributes.key?(:'Value')
|
60
|
+
if (value = attributes[:'Value']).is_a?(Array)
|
61
|
+
self.value = value
|
62
62
|
end
|
63
63
|
end
|
64
64
|
|
@@ -82,7 +82,7 @@ module GroupDocsViewerCloud
|
|
82
82
|
def ==(other)
|
83
83
|
return true if self.equal?(other)
|
84
84
|
self.class == other.class &&
|
85
|
-
|
85
|
+
value == other.value
|
86
86
|
end
|
87
87
|
|
88
88
|
# @see the `==` method
|
@@ -94,7 +94,13 @@ module GroupDocsViewerCloud
|
|
94
94
|
# Calculates hash code according to all attributes.
|
95
95
|
# @return [Fixnum] Hash code
|
96
96
|
def hash
|
97
|
-
[
|
97
|
+
[value].hash
|
98
|
+
end
|
99
|
+
|
100
|
+
# Downcases first letter.
|
101
|
+
# @return downcased string
|
102
|
+
def uncap(str)
|
103
|
+
str[0, 1].downcase + str[1..-1]
|
98
104
|
end
|
99
105
|
|
100
106
|
# Builds the object from hash
|
@@ -103,14 +109,16 @@ module GroupDocsViewerCloud
|
|
103
109
|
def build_from_hash(attributes)
|
104
110
|
return nil unless attributes.is_a?(Hash)
|
105
111
|
self.class.swagger_types.each_pair do |key, type|
|
112
|
+
pname = uncap(self.class.attribute_map[key]).intern
|
113
|
+
value = attributes[pname]
|
106
114
|
if type =~ /\AArray<(.*)>/i
|
107
115
|
# check to ensure the input is an array given that the the attribute
|
108
|
-
# is documented as an array but the input is not
|
109
|
-
if
|
110
|
-
self.send("#{key}=",
|
116
|
+
# is documented as an array but the input is not
|
117
|
+
if value.is_a?(Array)
|
118
|
+
self.send("#{key}=", value.map { |v| _deserialize($1, v) })
|
111
119
|
end
|
112
|
-
elsif !
|
113
|
-
self.send("#{key}=", _deserialize(type,
|
120
|
+
elsif !value.nil?
|
121
|
+
self.send("#{key}=", _deserialize(type, value))
|
114
122
|
end
|
115
123
|
# or else data not found in attributes(hash), not an issue as the data can be optional
|
116
124
|
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="files_list.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,23 +28,23 @@
|
|
28
28
|
require 'date'
|
29
29
|
|
30
30
|
module GroupDocsViewerCloud
|
31
|
-
#
|
32
|
-
class
|
31
|
+
# Files list
|
32
|
+
class FilesList
|
33
33
|
|
34
|
-
#
|
35
|
-
attr_accessor :
|
34
|
+
# Files and folders contained by folder StorageFile.
|
35
|
+
attr_accessor :value
|
36
36
|
|
37
37
|
# Attribute mapping from ruby-style variable name to JSON key.
|
38
38
|
def self.attribute_map
|
39
39
|
{
|
40
|
-
:'
|
40
|
+
:'value' => :'Value'
|
41
41
|
}
|
42
42
|
end
|
43
43
|
|
44
44
|
# Attribute type mapping.
|
45
45
|
def self.swagger_types
|
46
46
|
{
|
47
|
-
:'
|
47
|
+
:'value' => :'Array<StorageFile>'
|
48
48
|
}
|
49
49
|
end
|
50
50
|
|
@@ -56,9 +56,9 @@ module GroupDocsViewerCloud
|
|
56
56
|
# convert string to symbol for hash key
|
57
57
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
58
58
|
|
59
|
-
if attributes.key?(:'
|
60
|
-
if (value = attributes[:'
|
61
|
-
self.
|
59
|
+
if attributes.key?(:'Value')
|
60
|
+
if (value = attributes[:'Value']).is_a?(Array)
|
61
|
+
self.value = value
|
62
62
|
end
|
63
63
|
end
|
64
64
|
|
@@ -82,7 +82,7 @@ module GroupDocsViewerCloud
|
|
82
82
|
def ==(other)
|
83
83
|
return true if self.equal?(other)
|
84
84
|
self.class == other.class &&
|
85
|
-
|
85
|
+
value == other.value
|
86
86
|
end
|
87
87
|
|
88
88
|
# @see the `==` method
|
@@ -94,7 +94,13 @@ module GroupDocsViewerCloud
|
|
94
94
|
# Calculates hash code according to all attributes.
|
95
95
|
# @return [Fixnum] Hash code
|
96
96
|
def hash
|
97
|
-
[
|
97
|
+
[value].hash
|
98
|
+
end
|
99
|
+
|
100
|
+
# Downcases first letter.
|
101
|
+
# @return downcased string
|
102
|
+
def uncap(str)
|
103
|
+
str[0, 1].downcase + str[1..-1]
|
98
104
|
end
|
99
105
|
|
100
106
|
# Builds the object from hash
|
@@ -103,14 +109,16 @@ module GroupDocsViewerCloud
|
|
103
109
|
def build_from_hash(attributes)
|
104
110
|
return nil unless attributes.is_a?(Hash)
|
105
111
|
self.class.swagger_types.each_pair do |key, type|
|
112
|
+
pname = uncap(self.class.attribute_map[key]).intern
|
113
|
+
value = attributes[pname]
|
106
114
|
if type =~ /\AArray<(.*)>/i
|
107
115
|
# check to ensure the input is an array given that the the attribute
|
108
|
-
# is documented as an array but the input is not
|
109
|
-
if
|
110
|
-
self.send("#{key}=",
|
116
|
+
# is documented as an array but the input is not
|
117
|
+
if value.is_a?(Array)
|
118
|
+
self.send("#{key}=", value.map { |v| _deserialize($1, v) })
|
111
119
|
end
|
112
|
-
elsif !
|
113
|
-
self.send("#{key}=", _deserialize(type,
|
120
|
+
elsif !value.nil?
|
121
|
+
self.send("#{key}=", _deserialize(type, value))
|
114
122
|
end
|
115
123
|
# or else data not found in attributes(hash), not an issue as the data can be optional
|
116
124
|
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="files_upload_result.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,28 +28,28 @@
|
|
28
28
|
require 'date'
|
29
29
|
|
30
30
|
module GroupDocsViewerCloud
|
31
|
-
#
|
32
|
-
class
|
31
|
+
# File upload result
|
32
|
+
class FilesUploadResult
|
33
33
|
|
34
|
-
#
|
35
|
-
attr_accessor :
|
34
|
+
# List of uploaded file names
|
35
|
+
attr_accessor :uploaded
|
36
36
|
|
37
|
-
#
|
38
|
-
attr_accessor :
|
37
|
+
# List of errors.
|
38
|
+
attr_accessor :errors
|
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
|
+
:'uploaded' => :'Uploaded',
|
44
|
+
:'errors' => :'Errors'
|
45
45
|
}
|
46
46
|
end
|
47
47
|
|
48
48
|
# Attribute type mapping.
|
49
49
|
def self.swagger_types
|
50
50
|
{
|
51
|
-
:'
|
52
|
-
:'
|
51
|
+
:'uploaded' => :'Array<String>',
|
52
|
+
:'errors' => :'Array<Error>'
|
53
53
|
}
|
54
54
|
end
|
55
55
|
|
@@ -61,12 +61,16 @@ 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
|
-
|
64
|
+
if attributes.key?(:'Uploaded')
|
65
|
+
if (value = attributes[:'Uploaded']).is_a?(Array)
|
66
|
+
self.uploaded = value
|
67
|
+
end
|
66
68
|
end
|
67
69
|
|
68
|
-
if attributes.key?(:'
|
69
|
-
|
70
|
+
if attributes.key?(:'Errors')
|
71
|
+
if (value = attributes[:'Errors']).is_a?(Array)
|
72
|
+
self.errors = value
|
73
|
+
end
|
70
74
|
end
|
71
75
|
|
72
76
|
end
|
@@ -89,8 +93,8 @@ module GroupDocsViewerCloud
|
|
89
93
|
def ==(other)
|
90
94
|
return true if self.equal?(other)
|
91
95
|
self.class == other.class &&
|
92
|
-
|
93
|
-
|
96
|
+
uploaded == other.uploaded &&
|
97
|
+
errors == other.errors
|
94
98
|
end
|
95
99
|
|
96
100
|
# @see the `==` method
|
@@ -102,7 +106,13 @@ module GroupDocsViewerCloud
|
|
102
106
|
# Calculates hash code according to all attributes.
|
103
107
|
# @return [Fixnum] Hash code
|
104
108
|
def hash
|
105
|
-
[
|
109
|
+
[uploaded, errors].hash
|
110
|
+
end
|
111
|
+
|
112
|
+
# Downcases first letter.
|
113
|
+
# @return downcased string
|
114
|
+
def uncap(str)
|
115
|
+
str[0, 1].downcase + str[1..-1]
|
106
116
|
end
|
107
117
|
|
108
118
|
# Builds the object from hash
|
@@ -111,14 +121,16 @@ module GroupDocsViewerCloud
|
|
111
121
|
def build_from_hash(attributes)
|
112
122
|
return nil unless attributes.is_a?(Hash)
|
113
123
|
self.class.swagger_types.each_pair do |key, type|
|
124
|
+
pname = uncap(self.class.attribute_map[key]).intern
|
125
|
+
value = attributes[pname]
|
114
126
|
if type =~ /\AArray<(.*)>/i
|
115
127
|
# 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}=",
|
128
|
+
# is documented as an array but the input is not
|
129
|
+
if value.is_a?(Array)
|
130
|
+
self.send("#{key}=", value.map { |v| _deserialize($1, v) })
|
119
131
|
end
|
120
|
-
elsif !
|
121
|
-
self.send("#{key}=", _deserialize(type,
|
132
|
+
elsif !value.nil?
|
133
|
+
self.send("#{key}=", _deserialize(type, value))
|
122
134
|
end
|
123
135
|
# or else data not found in attributes(hash), not an issue as the data can be optional
|
124
136
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="format.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
|
+
# File-format
|
32
32
|
class Format
|
33
33
|
|
34
|
-
# File
|
35
|
-
attr_accessor :file_format
|
36
|
-
|
37
|
-
# File extension.
|
34
|
+
# File extension
|
38
35
|
attr_accessor :extension
|
39
36
|
|
37
|
+
# File format
|
38
|
+
attr_accessor :file_format
|
39
|
+
|
40
40
|
# Attribute mapping from ruby-style variable name to JSON key.
|
41
41
|
def self.attribute_map
|
42
42
|
{
|
43
|
-
:'
|
44
|
-
:'
|
43
|
+
:'extension' => :'Extension',
|
44
|
+
:'file_format' => :'FileFormat'
|
45
45
|
}
|
46
46
|
end
|
47
47
|
|
48
48
|
# Attribute type mapping.
|
49
49
|
def self.swagger_types
|
50
50
|
{
|
51
|
-
:'
|
52
|
-
:'
|
51
|
+
:'extension' => :'String',
|
52
|
+
:'file_format' => :'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?(:'Extension')
|
65
|
+
self.extension = attributes[:'Extension']
|
66
66
|
end
|
67
67
|
|
68
|
-
if attributes.key?(:'
|
69
|
-
self.
|
68
|
+
if attributes.key?(:'FileFormat')
|
69
|
+
self.file_format = attributes[:'FileFormat']
|
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
|
+
extension == other.extension &&
|
93
|
+
file_format == other.file_format
|
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
|
+
[extension, file_format].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="formats_result.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
|
@@ -29,7 +29,7 @@ require 'date'
|
|
29
29
|
|
30
30
|
module GroupDocsViewerCloud
|
31
31
|
# Describes object which contains list of supported file formats.
|
32
|
-
class
|
32
|
+
class FormatsResult
|
33
33
|
|
34
34
|
# Supported file formats.
|
35
35
|
attr_accessor :formats
|
@@ -37,7 +37,7 @@ module GroupDocsViewerCloud
|
|
37
37
|
# Attribute mapping from ruby-style variable name to JSON key.
|
38
38
|
def self.attribute_map
|
39
39
|
{
|
40
|
-
:'formats' => :'
|
40
|
+
:'formats' => :'Formats'
|
41
41
|
}
|
42
42
|
end
|
43
43
|
|
@@ -56,8 +56,8 @@ module GroupDocsViewerCloud
|
|
56
56
|
# convert string to symbol for hash key
|
57
57
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
58
58
|
|
59
|
-
if attributes.key?(:'
|
60
|
-
if (value = attributes[:'
|
59
|
+
if attributes.key?(:'Formats')
|
60
|
+
if (value = attributes[:'Formats']).is_a?(Array)
|
61
61
|
self.formats = value
|
62
62
|
end
|
63
63
|
end
|
@@ -97,20 +97,28 @@ module GroupDocsViewerCloud
|
|
97
97
|
[formats].hash
|
98
98
|
end
|
99
99
|
|
100
|
+
# Downcases first letter.
|
101
|
+
# @return downcased string
|
102
|
+
def uncap(str)
|
103
|
+
str[0, 1].downcase + str[1..-1]
|
104
|
+
end
|
105
|
+
|
100
106
|
# Builds the object from hash
|
101
107
|
# @param [Hash] attributes Model attributes in the form of hash
|
102
108
|
# @return [Object] Returns the model itself
|
103
109
|
def build_from_hash(attributes)
|
104
110
|
return nil unless attributes.is_a?(Hash)
|
105
111
|
self.class.swagger_types.each_pair do |key, type|
|
112
|
+
pname = uncap(self.class.attribute_map[key]).intern
|
113
|
+
value = attributes[pname]
|
106
114
|
if type =~ /\AArray<(.*)>/i
|
107
115
|
# check to ensure the input is an array given that the the attribute
|
108
|
-
# is documented as an array but the input is not
|
109
|
-
if
|
110
|
-
self.send("#{key}=",
|
116
|
+
# is documented as an array but the input is not
|
117
|
+
if value.is_a?(Array)
|
118
|
+
self.send("#{key}=", value.map { |v| _deserialize($1, v) })
|
111
119
|
end
|
112
|
-
elsif !
|
113
|
-
self.send("#{key}=", _deserialize(type,
|
120
|
+
elsif !value.nil?
|
121
|
+
self.send("#{key}=", _deserialize(type, value))
|
114
122
|
end
|
115
123
|
# or else data not found in attributes(hash), not an issue as the data can be optional
|
116
124
|
end
|