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.
Files changed (111) hide show
  1. checksums.yaml +4 -4
  2. data/lib/groupdocs_viewer_cloud.rb +27 -32
  3. data/lib/groupdocs_viewer_cloud/api/file_api.rb +729 -0
  4. data/lib/groupdocs_viewer_cloud/api/folder_api.rb +694 -0
  5. data/lib/groupdocs_viewer_cloud/api/storage_api.rb +541 -0
  6. data/lib/groupdocs_viewer_cloud/api/viewer_api.rb +232 -5069
  7. data/lib/groupdocs_viewer_cloud/api_client.rb +5 -5
  8. data/lib/groupdocs_viewer_cloud/api_error.rb +6 -6
  9. data/lib/groupdocs_viewer_cloud/configuration.rb +4 -4
  10. data/lib/groupdocs_viewer_cloud/models/attachment_info.rb +22 -34
  11. data/lib/groupdocs_viewer_cloud/models/{html_page.rb → attachment_view.rb} +39 -33
  12. data/lib/groupdocs_viewer_cloud/models/cad_options.rb +44 -65
  13. data/lib/groupdocs_viewer_cloud/models/{font_family.rb → delete_view_options.rb} +25 -17
  14. data/lib/groupdocs_viewer_cloud/models/{reorder_options.rb → disc_usage.rb} +42 -34
  15. data/lib/groupdocs_viewer_cloud/models/email_options.rb +23 -25
  16. data/lib/groupdocs_viewer_cloud/models/{image_page_collection.rb → error.rb} +46 -40
  17. data/lib/groupdocs_viewer_cloud/models/{outlook_options.rb → error_details.rb} +40 -17
  18. data/lib/groupdocs_viewer_cloud/models/field_label.rb +20 -12
  19. data/lib/groupdocs_viewer_cloud/models/{transform_options_base.rb → file_info.rb} +49 -21
  20. data/lib/groupdocs_viewer_cloud/models/{html_attachment_page_collection.rb → file_version.rb} +91 -40
  21. data/lib/groupdocs_viewer_cloud/models/{page_info_collection.rb → file_versions.rb} +26 -18
  22. data/lib/groupdocs_viewer_cloud/models/{font_collection.rb → files_list.rb} +26 -18
  23. data/lib/groupdocs_viewer_cloud/models/{image_page.rb → files_upload_result.rb} +36 -24
  24. data/lib/groupdocs_viewer_cloud/models/format.rb +30 -22
  25. data/lib/groupdocs_viewer_cloud/models/{format_collection.rb → formats_result.rb} +19 -11
  26. data/lib/groupdocs_viewer_cloud/models/html_options.rb +108 -209
  27. data/lib/groupdocs_viewer_cloud/models/html_resource.rb +234 -0
  28. data/lib/groupdocs_viewer_cloud/models/image_options.rb +129 -163
  29. data/lib/groupdocs_viewer_cloud/models/{attachment_collection.rb → info_result.rb} +32 -32
  30. data/lib/groupdocs_viewer_cloud/models/{rotate_options.rb → object_exist.rb} +42 -34
  31. data/lib/groupdocs_viewer_cloud/models/page_info.rb +48 -55
  32. data/lib/groupdocs_viewer_cloud/models/{pdf_file_info.rb → page_view.rb} +53 -38
  33. data/lib/groupdocs_viewer_cloud/models/{project_options.rb → project_management_options.rb} +39 -21
  34. data/lib/groupdocs_viewer_cloud/models/render_options.rb +92 -146
  35. data/lib/groupdocs_viewer_cloud/models/resource.rb +30 -22
  36. data/lib/groupdocs_viewer_cloud/models/{row_info.rb → row.rb} +65 -37
  37. data/lib/groupdocs_viewer_cloud/models/{cells_options.rb → spreadsheet_options.rb} +95 -67
  38. data/lib/groupdocs_viewer_cloud/models/{attachment.rb → storage_exist.rb} +30 -27
  39. data/lib/groupdocs_viewer_cloud/models/{image_attachment_page_collection.rb → storage_file.rb} +66 -40
  40. data/lib/groupdocs_viewer_cloud/models/{document_info.rb → view_options.rb} +99 -105
  41. data/lib/groupdocs_viewer_cloud/models/{html_page_collection.rb → view_result.rb} +43 -33
  42. data/lib/groupdocs_viewer_cloud/models/watermark.rb +35 -22
  43. data/lib/groupdocs_viewer_cloud/version.rb +2 -2
  44. metadata +27 -110
  45. data/lib/groupdocs_viewer_cloud/models/document_info_options.rb +0 -358
  46. data/lib/groupdocs_viewer_cloud/models/file_response.rb +0 -196
  47. data/lib/groupdocs_viewer_cloud/models/pdf_file_options.rb +0 -358
  48. data/lib/groupdocs_viewer_cloud/models/pdf_options.rb +0 -236
  49. data/lib/groupdocs_viewer_cloud/models/render_options_base.rb +0 -358
  50. data/lib/groupdocs_viewer_cloud/models/requests/html_create_attachment_pages_cache_request.rb +0 -65
  51. data/lib/groupdocs_viewer_cloud/models/requests/html_create_pages_cache_from_content_request.rb +0 -65
  52. data/lib/groupdocs_viewer_cloud/models/requests/html_create_pages_cache_from_url_request.rb +0 -65
  53. data/lib/groupdocs_viewer_cloud/models/requests/html_create_pages_cache_request.rb +0 -61
  54. data/lib/groupdocs_viewer_cloud/models/requests/html_create_pdf_file_from_content_request.rb +0 -65
  55. data/lib/groupdocs_viewer_cloud/models/requests/html_create_pdf_file_from_url_request.rb +0 -65
  56. data/lib/groupdocs_viewer_cloud/models/requests/html_create_pdf_file_request.rb +0 -61
  57. data/lib/groupdocs_viewer_cloud/models/requests/html_delete_attachment_pages_cache_request.rb +0 -57
  58. data/lib/groupdocs_viewer_cloud/models/requests/html_delete_pages_cache_request.rb +0 -53
  59. data/lib/groupdocs_viewer_cloud/models/requests/html_get_attachment_info_request.rb +0 -65
  60. data/lib/groupdocs_viewer_cloud/models/requests/html_get_attachment_info_with_options_request.rb +0 -61
  61. data/lib/groupdocs_viewer_cloud/models/requests/html_get_attachment_page_request.rb +0 -109
  62. data/lib/groupdocs_viewer_cloud/models/requests/html_get_attachment_page_resource_request.rb +0 -65
  63. data/lib/groupdocs_viewer_cloud/models/requests/html_get_attachment_pages_request.rb +0 -113
  64. data/lib/groupdocs_viewer_cloud/models/requests/html_get_attachment_request.rb +0 -61
  65. data/lib/groupdocs_viewer_cloud/models/requests/html_get_attachments_request.rb +0 -57
  66. data/lib/groupdocs_viewer_cloud/models/requests/html_get_document_info_from_content_request.rb +0 -61
  67. data/lib/groupdocs_viewer_cloud/models/requests/html_get_document_info_from_url_request.rb +0 -69
  68. data/lib/groupdocs_viewer_cloud/models/requests/html_get_document_info_from_url_with_options_request.rb +0 -61
  69. data/lib/groupdocs_viewer_cloud/models/requests/html_get_document_info_request.rb +0 -65
  70. data/lib/groupdocs_viewer_cloud/models/requests/html_get_document_info_with_options_request.rb +0 -57
  71. data/lib/groupdocs_viewer_cloud/models/requests/html_get_page_request.rb +0 -101
  72. data/lib/groupdocs_viewer_cloud/models/requests/html_get_page_resource_request.rb +0 -61
  73. data/lib/groupdocs_viewer_cloud/models/requests/html_get_pages_from_url_request.rb +0 -109
  74. data/lib/groupdocs_viewer_cloud/models/requests/html_get_pages_request.rb +0 -105
  75. data/lib/groupdocs_viewer_cloud/models/requests/html_get_pdf_file_from_url_request.rb +0 -77
  76. data/lib/groupdocs_viewer_cloud/models/requests/html_get_pdf_file_request.rb +0 -73
  77. data/lib/groupdocs_viewer_cloud/models/requests/html_get_zip_with_attachment_pages_request.rb +0 -113
  78. data/lib/groupdocs_viewer_cloud/models/requests/html_get_zip_with_pages_request.rb +0 -105
  79. data/lib/groupdocs_viewer_cloud/models/requests/html_transform_pages_request.rb +0 -57
  80. data/lib/groupdocs_viewer_cloud/models/requests/image_create_attachment_pages_cache_request.rb +0 -65
  81. data/lib/groupdocs_viewer_cloud/models/requests/image_create_pages_cache_from_content_request.rb +0 -65
  82. data/lib/groupdocs_viewer_cloud/models/requests/image_create_pages_cache_from_url_request.rb +0 -65
  83. data/lib/groupdocs_viewer_cloud/models/requests/image_create_pages_cache_request.rb +0 -61
  84. data/lib/groupdocs_viewer_cloud/models/requests/image_create_pdf_file_from_content_request.rb +0 -65
  85. data/lib/groupdocs_viewer_cloud/models/requests/image_create_pdf_file_from_url_request.rb +0 -65
  86. data/lib/groupdocs_viewer_cloud/models/requests/image_create_pdf_file_request.rb +0 -61
  87. data/lib/groupdocs_viewer_cloud/models/requests/image_delete_attachment_pages_cache_request.rb +0 -57
  88. data/lib/groupdocs_viewer_cloud/models/requests/image_delete_pages_cache_request.rb +0 -53
  89. data/lib/groupdocs_viewer_cloud/models/requests/image_get_attachment_info_request.rb +0 -69
  90. data/lib/groupdocs_viewer_cloud/models/requests/image_get_attachment_info_with_options_request.rb +0 -61
  91. data/lib/groupdocs_viewer_cloud/models/requests/image_get_attachment_page_request.rb +0 -105
  92. data/lib/groupdocs_viewer_cloud/models/requests/image_get_attachment_pages_request.rb +0 -109
  93. data/lib/groupdocs_viewer_cloud/models/requests/image_get_attachment_request.rb +0 -61
  94. data/lib/groupdocs_viewer_cloud/models/requests/image_get_attachments_request.rb +0 -57
  95. data/lib/groupdocs_viewer_cloud/models/requests/image_get_document_info_from_content_request.rb +0 -61
  96. data/lib/groupdocs_viewer_cloud/models/requests/image_get_document_info_from_url_request.rb +0 -73
  97. data/lib/groupdocs_viewer_cloud/models/requests/image_get_document_info_from_url_with_options_request.rb +0 -61
  98. data/lib/groupdocs_viewer_cloud/models/requests/image_get_document_info_request.rb +0 -69
  99. data/lib/groupdocs_viewer_cloud/models/requests/image_get_document_info_with_options_request.rb +0 -57
  100. data/lib/groupdocs_viewer_cloud/models/requests/image_get_page_request.rb +0 -97
  101. data/lib/groupdocs_viewer_cloud/models/requests/image_get_pages_from_url_request.rb +0 -105
  102. data/lib/groupdocs_viewer_cloud/models/requests/image_get_pages_request.rb +0 -101
  103. data/lib/groupdocs_viewer_cloud/models/requests/image_get_pdf_file_from_url_request.rb +0 -77
  104. data/lib/groupdocs_viewer_cloud/models/requests/image_get_pdf_file_request.rb +0 -73
  105. data/lib/groupdocs_viewer_cloud/models/requests/image_get_zip_with_attachment_pages_request.rb +0 -109
  106. data/lib/groupdocs_viewer_cloud/models/requests/image_get_zip_with_pages_request.rb +0 -101
  107. data/lib/groupdocs_viewer_cloud/models/requests/image_transform_pages_request.rb +0 -57
  108. data/lib/groupdocs_viewer_cloud/models/resource_url.rb +0 -206
  109. data/lib/groupdocs_viewer_cloud/models/slides_options.rb +0 -206
  110. data/lib/groupdocs_viewer_cloud/models/tile.rb +0 -236
  111. 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="outlook_options.rb">
4
- # Copyright (c) 2003-2018 Aspose Pty Ltd
3
+ # <copyright company="Aspose Pty Ltd" file="error_details.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,28 @@
28
28
  require 'date'
29
29
 
30
30
  module GroupDocsViewerCloud
31
- # The Outlook data files rendering options.
32
- class OutlookOptions
31
+ # The error details
32
+ class ErrorDetails
33
33
 
34
- # The limit of items to render in mailbox folders
35
- attr_accessor :max_items_in_folder
34
+ # The request id
35
+ attr_accessor :request_id
36
+
37
+ # Date
38
+ attr_accessor :date
36
39
 
37
40
  # Attribute mapping from ruby-style variable name to JSON key.
38
41
  def self.attribute_map
39
42
  {
40
- :'max_items_in_folder' => :'maxItemsInFolder'
43
+ :'request_id' => :'RequestId',
44
+ :'date' => :'Date'
41
45
  }
42
46
  end
43
47
 
44
48
  # Attribute type mapping.
45
49
  def self.swagger_types
46
50
  {
47
- :'max_items_in_folder' => :'Integer'
51
+ :'request_id' => :'String',
52
+ :'date' => :'DateTime'
48
53
  }
49
54
  end
50
55
 
@@ -56,8 +61,12 @@ module GroupDocsViewerCloud
56
61
  # convert string to symbol for hash key
57
62
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
58
63
 
59
- if attributes.key?(:'maxItemsInFolder')
60
- self.max_items_in_folder = attributes[:'maxItemsInFolder']
64
+ if attributes.key?(:'RequestId')
65
+ self.request_id = attributes[:'RequestId']
66
+ end
67
+
68
+ if attributes.key?(:'Date')
69
+ self.date = attributes[:'Date']
61
70
  end
62
71
 
63
72
  end
@@ -66,12 +75,17 @@ module GroupDocsViewerCloud
66
75
  # @return Array for valid properies with the reasons
67
76
  def list_invalid_properties
68
77
  invalid_properties = []
78
+ if @date.nil?
79
+ invalid_properties.push("invalid value for 'date', date cannot be nil.")
80
+ end
81
+
69
82
  return invalid_properties
70
83
  end
71
84
 
72
85
  # Check to see if the all the properties in the model are valid
73
86
  # @return true if the model is valid
74
87
  def valid?
88
+ return false if @date.nil?
75
89
  return true
76
90
  end
77
91
 
@@ -80,7 +94,8 @@ module GroupDocsViewerCloud
80
94
  def ==(other)
81
95
  return true if self.equal?(other)
82
96
  self.class == other.class &&
83
- max_items_in_folder == other.max_items_in_folder
97
+ request_id == other.request_id &&
98
+ date == other.date
84
99
  end
85
100
 
86
101
  # @see the `==` method
@@ -92,7 +107,13 @@ module GroupDocsViewerCloud
92
107
  # Calculates hash code according to all attributes.
93
108
  # @return [Fixnum] Hash code
94
109
  def hash
95
- [max_items_in_folder].hash
110
+ [request_id, date].hash
111
+ end
112
+
113
+ # Downcases first letter.
114
+ # @return downcased string
115
+ def uncap(str)
116
+ str[0, 1].downcase + str[1..-1]
96
117
  end
97
118
 
98
119
  # Builds the object from hash
@@ -101,14 +122,16 @@ module GroupDocsViewerCloud
101
122
  def build_from_hash(attributes)
102
123
  return nil unless attributes.is_a?(Hash)
103
124
  self.class.swagger_types.each_pair do |key, type|
125
+ pname = uncap(self.class.attribute_map[key]).intern
126
+ value = attributes[pname]
104
127
  if type =~ /\AArray<(.*)>/i
105
128
  # check to ensure the input is an array given that the the attribute
106
- # is documented as an array but the input is not
107
- if attributes[self.class.attribute_map[key]].is_a?(Array)
108
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
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) })
109
132
  end
110
- elsif !attributes[self.class.attribute_map[key]].nil?
111
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
133
+ elsif !value.nil?
134
+ self.send("#{key}=", _deserialize(type, value))
112
135
  end
113
136
  # or else data not found in attributes(hash), not an issue as the data can be optional
114
137
  end
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # --------------------------------------------------------------------------------------------------------------------
3
3
  # <copyright company="Aspose Pty Ltd" file="field_label.rb">
4
- # Copyright (c) 2003-2018 Aspose Pty Ltd
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
@@ -40,8 +40,8 @@ module GroupDocsViewerCloud
40
40
  # Attribute mapping from ruby-style variable name to JSON key.
41
41
  def self.attribute_map
42
42
  {
43
- :'field' => :'field',
44
- :'label' => :'label'
43
+ :'field' => :'Field',
44
+ :'label' => :'Label'
45
45
  }
46
46
  end
47
47
 
@@ -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?(:'field')
65
- self.field = attributes[:'field']
64
+ if attributes.key?(:'Field')
65
+ self.field = attributes[:'Field']
66
66
  end
67
67
 
68
- if attributes.key?(:'label')
69
- self.label = attributes[:'label']
68
+ if attributes.key?(:'Label')
69
+ self.label = attributes[:'Label']
70
70
  end
71
71
 
72
72
  end
@@ -105,20 +105,28 @@ module GroupDocsViewerCloud
105
105
  [field, label].hash
106
106
  end
107
107
 
108
+ # Downcases first letter.
109
+ # @return downcased string
110
+ def uncap(str)
111
+ str[0, 1].downcase + str[1..-1]
112
+ end
113
+
108
114
  # Builds the object from hash
109
115
  # @param [Hash] attributes Model attributes in the form of hash
110
116
  # @return [Object] Returns the model itself
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 attributes[self.class.attribute_map[key]].is_a?(Array)
118
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
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 !attributes[self.class.attribute_map[key]].nil?
121
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
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="transform_options_base.rb">
4
- # Copyright (c) 2003-2018 Aspose Pty Ltd
3
+ # <copyright company="Aspose Pty Ltd" file="file_info.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,27 +28,37 @@
28
28
  require 'date'
29
29
 
30
30
  module GroupDocsViewerCloud
31
- # Base transformation options.
32
- class TransformOptionsBase
31
+ # File info
32
+ class FileInfo
33
33
 
34
- # The page number to transform.
35
- attr_accessor :page_number
34
+ # File path in storage
35
+ attr_accessor :file_path
36
36
 
37
- # Allows to specify document password in case when document is password-protected.
37
+ # Storage name
38
+ attr_accessor :storage_name
39
+
40
+ # Version ID
41
+ attr_accessor :version_id
42
+
43
+ # Password to open file
38
44
  attr_accessor :password
39
45
 
40
46
  # Attribute mapping from ruby-style variable name to JSON key.
41
47
  def self.attribute_map
42
48
  {
43
- :'page_number' => :'pageNumber',
44
- :'password' => :'password'
49
+ :'file_path' => :'FilePath',
50
+ :'storage_name' => :'StorageName',
51
+ :'version_id' => :'VersionId',
52
+ :'password' => :'Password'
45
53
  }
46
54
  end
47
55
 
48
56
  # Attribute type mapping.
49
57
  def self.swagger_types
50
58
  {
51
- :'page_number' => :'Integer',
59
+ :'file_path' => :'String',
60
+ :'storage_name' => :'String',
61
+ :'version_id' => :'String',
52
62
  :'password' => :'String'
53
63
  }
54
64
  end
@@ -61,12 +71,20 @@ module GroupDocsViewerCloud
61
71
  # convert string to symbol for hash key
62
72
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
63
73
 
64
- if attributes.key?(:'pageNumber')
65
- self.page_number = attributes[:'pageNumber']
74
+ if attributes.key?(:'FilePath')
75
+ self.file_path = attributes[:'FilePath']
76
+ end
77
+
78
+ if attributes.key?(:'StorageName')
79
+ self.storage_name = attributes[:'StorageName']
66
80
  end
67
81
 
68
- if attributes.key?(:'password')
69
- self.password = attributes[:'password']
82
+ if attributes.key?(:'VersionId')
83
+ self.version_id = attributes[:'VersionId']
84
+ end
85
+
86
+ if attributes.key?(:'Password')
87
+ self.password = attributes[:'Password']
70
88
  end
71
89
 
72
90
  end
@@ -89,7 +107,9 @@ module GroupDocsViewerCloud
89
107
  def ==(other)
90
108
  return true if self.equal?(other)
91
109
  self.class == other.class &&
92
- page_number == other.page_number &&
110
+ file_path == other.file_path &&
111
+ storage_name == other.storage_name &&
112
+ version_id == other.version_id &&
93
113
  password == other.password
94
114
  end
95
115
 
@@ -102,7 +122,13 @@ module GroupDocsViewerCloud
102
122
  # Calculates hash code according to all attributes.
103
123
  # @return [Fixnum] Hash code
104
124
  def hash
105
- [page_number, password].hash
125
+ [file_path, storage_name, version_id, password].hash
126
+ end
127
+
128
+ # Downcases first letter.
129
+ # @return downcased string
130
+ def uncap(str)
131
+ str[0, 1].downcase + str[1..-1]
106
132
  end
107
133
 
108
134
  # Builds the object from hash
@@ -111,14 +137,16 @@ module GroupDocsViewerCloud
111
137
  def build_from_hash(attributes)
112
138
  return nil unless attributes.is_a?(Hash)
113
139
  self.class.swagger_types.each_pair do |key, type|
140
+ pname = uncap(self.class.attribute_map[key]).intern
141
+ value = attributes[pname]
114
142
  if type =~ /\AArray<(.*)>/i
115
143
  # 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 attributes[self.class.attribute_map[key]].is_a?(Array)
118
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
144
+ # is documented as an array but the input is not
145
+ if value.is_a?(Array)
146
+ self.send("#{key}=", value.map { |v| _deserialize($1, v) })
119
147
  end
120
- elsif !attributes[self.class.attribute_map[key]].nil?
121
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
148
+ elsif !value.nil?
149
+ self.send("#{key}=", _deserialize(type, value))
122
150
  end
123
151
  # or else data not found in attributes(hash), not an issue as the data can be optional
124
152
  end
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # --------------------------------------------------------------------------------------------------------------------
3
- # <copyright company="Aspose Pty Ltd" file="html_attachment_page_collection.rb">
4
- # Copyright (c) 2003-2018 Aspose Pty Ltd
3
+ # <copyright company="Aspose Pty Ltd" file="file_version.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,38 +28,53 @@
28
28
  require 'date'
29
29
 
30
30
  module GroupDocsViewerCloud
31
- # Describes attachment pages.
32
- class HtmlAttachmentPageCollection
31
+ # File Version
32
+ class FileVersion
33
33
 
34
- # The file name.
35
- attr_accessor :file_name
34
+ # File or folder name.
35
+ attr_accessor :name
36
36
 
37
- # File folder.
38
- attr_accessor :folder
37
+ # True if it is a folder.
38
+ attr_accessor :is_folder
39
39
 
40
- # Attachment name.
41
- attr_accessor :attachment_name
40
+ # File or folder last modified DateTime.
41
+ attr_accessor :modified_date
42
42
 
43
- # Pages list.
44
- attr_accessor :pages
43
+ # File or folder size.
44
+ attr_accessor :size
45
+
46
+ # File or folder path.
47
+ attr_accessor :path
48
+
49
+ # File Version ID.
50
+ attr_accessor :version_id
51
+
52
+ # Specifies whether the file is (true) or is not (false) the latest version of an file.
53
+ attr_accessor :is_latest
45
54
 
46
55
  # Attribute mapping from ruby-style variable name to JSON key.
47
56
  def self.attribute_map
48
57
  {
49
- :'file_name' => :'fileName',
50
- :'folder' => :'folder',
51
- :'attachment_name' => :'attachmentName',
52
- :'pages' => :'pages'
58
+ :'name' => :'Name',
59
+ :'is_folder' => :'IsFolder',
60
+ :'modified_date' => :'ModifiedDate',
61
+ :'size' => :'Size',
62
+ :'path' => :'Path',
63
+ :'version_id' => :'VersionId',
64
+ :'is_latest' => :'IsLatest'
53
65
  }
54
66
  end
55
67
 
56
68
  # Attribute type mapping.
57
69
  def self.swagger_types
58
70
  {
59
- :'file_name' => :'String',
60
- :'folder' => :'String',
61
- :'attachment_name' => :'String',
62
- :'pages' => :'Array<HtmlPage>'
71
+ :'name' => :'String',
72
+ :'is_folder' => :'BOOLEAN',
73
+ :'modified_date' => :'DateTime',
74
+ :'size' => :'Integer',
75
+ :'path' => :'String',
76
+ :'version_id' => :'String',
77
+ :'is_latest' => :'BOOLEAN'
63
78
  }
64
79
  end
65
80
 
@@ -71,22 +86,32 @@ module GroupDocsViewerCloud
71
86
  # convert string to symbol for hash key
72
87
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
73
88
 
74
- if attributes.key?(:'fileName')
75
- self.file_name = attributes[:'fileName']
89
+ if attributes.key?(:'Name')
90
+ self.name = attributes[:'Name']
76
91
  end
77
92
 
78
- if attributes.key?(:'folder')
79
- self.folder = attributes[:'folder']
93
+ if attributes.key?(:'IsFolder')
94
+ self.is_folder = attributes[:'IsFolder']
80
95
  end
81
96
 
82
- if attributes.key?(:'attachmentName')
83
- self.attachment_name = attributes[:'attachmentName']
97
+ if attributes.key?(:'ModifiedDate')
98
+ self.modified_date = attributes[:'ModifiedDate']
84
99
  end
85
100
 
86
- if attributes.key?(:'pages')
87
- if (value = attributes[:'pages']).is_a?(Array)
88
- self.pages = value
89
- end
101
+ if attributes.key?(:'Size')
102
+ self.size = attributes[:'Size']
103
+ end
104
+
105
+ if attributes.key?(:'Path')
106
+ self.path = attributes[:'Path']
107
+ end
108
+
109
+ if attributes.key?(:'VersionId')
110
+ self.version_id = attributes[:'VersionId']
111
+ end
112
+
113
+ if attributes.key?(:'IsLatest')
114
+ self.is_latest = attributes[:'IsLatest']
90
115
  end
91
116
 
92
117
  end
@@ -95,12 +120,27 @@ module GroupDocsViewerCloud
95
120
  # @return Array for valid properies with the reasons
96
121
  def list_invalid_properties
97
122
  invalid_properties = []
123
+ if @is_folder.nil?
124
+ invalid_properties.push("invalid value for 'is_folder', is_folder cannot be nil.")
125
+ end
126
+
127
+ if @size.nil?
128
+ invalid_properties.push("invalid value for 'size', size cannot be nil.")
129
+ end
130
+
131
+ if @is_latest.nil?
132
+ invalid_properties.push("invalid value for 'is_latest', is_latest cannot be nil.")
133
+ end
134
+
98
135
  return invalid_properties
99
136
  end
100
137
 
101
138
  # Check to see if the all the properties in the model are valid
102
139
  # @return true if the model is valid
103
140
  def valid?
141
+ return false if @is_folder.nil?
142
+ return false if @size.nil?
143
+ return false if @is_latest.nil?
104
144
  return true
105
145
  end
106
146
 
@@ -109,10 +149,13 @@ module GroupDocsViewerCloud
109
149
  def ==(other)
110
150
  return true if self.equal?(other)
111
151
  self.class == other.class &&
112
- file_name == other.file_name &&
113
- folder == other.folder &&
114
- attachment_name == other.attachment_name &&
115
- pages == other.pages
152
+ name == other.name &&
153
+ is_folder == other.is_folder &&
154
+ modified_date == other.modified_date &&
155
+ size == other.size &&
156
+ path == other.path &&
157
+ version_id == other.version_id &&
158
+ is_latest == other.is_latest
116
159
  end
117
160
 
118
161
  # @see the `==` method
@@ -124,7 +167,13 @@ module GroupDocsViewerCloud
124
167
  # Calculates hash code according to all attributes.
125
168
  # @return [Fixnum] Hash code
126
169
  def hash
127
- [file_name, folder, attachment_name, pages].hash
170
+ [name, is_folder, modified_date, size, path, version_id, is_latest].hash
171
+ end
172
+
173
+ # Downcases first letter.
174
+ # @return downcased string
175
+ def uncap(str)
176
+ str[0, 1].downcase + str[1..-1]
128
177
  end
129
178
 
130
179
  # Builds the object from hash
@@ -133,14 +182,16 @@ module GroupDocsViewerCloud
133
182
  def build_from_hash(attributes)
134
183
  return nil unless attributes.is_a?(Hash)
135
184
  self.class.swagger_types.each_pair do |key, type|
185
+ pname = uncap(self.class.attribute_map[key]).intern
186
+ value = attributes[pname]
136
187
  if type =~ /\AArray<(.*)>/i
137
188
  # check to ensure the input is an array given that the the attribute
138
- # is documented as an array but the input is not
139
- if attributes[self.class.attribute_map[key]].is_a?(Array)
140
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
189
+ # is documented as an array but the input is not
190
+ if value.is_a?(Array)
191
+ self.send("#{key}=", value.map { |v| _deserialize($1, v) })
141
192
  end
142
- elsif !attributes[self.class.attribute_map[key]].nil?
143
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
193
+ elsif !value.nil?
194
+ self.send("#{key}=", _deserialize(type, value))
144
195
  end
145
196
  # or else data not found in attributes(hash), not an issue as the data can be optional
146
197
  end