groupdocs_storage_cloud 18.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +7 -0
  2. data/lib/GroupDocs/Storage/api/storage_api.rb +982 -0
  3. data/lib/GroupDocs/Storage/api_client.rb +408 -0
  4. data/lib/GroupDocs/Storage/api_error.rb +54 -0
  5. data/lib/GroupDocs/Storage/configuration.rb +203 -0
  6. data/lib/GroupDocs/Storage/models/copy_file_response.rb +214 -0
  7. data/lib/GroupDocs/Storage/models/create_folder_response.rb +214 -0
  8. data/lib/GroupDocs/Storage/models/disc_usage.rb +219 -0
  9. data/lib/GroupDocs/Storage/models/disc_usage_response.rb +223 -0
  10. data/lib/GroupDocs/Storage/models/file_exist.rb +219 -0
  11. data/lib/GroupDocs/Storage/models/file_exist_response.rb +223 -0
  12. data/lib/GroupDocs/Storage/models/file_response.rb +265 -0
  13. data/lib/GroupDocs/Storage/models/file_version.rb +283 -0
  14. data/lib/GroupDocs/Storage/models/file_versions_response.rb +225 -0
  15. data/lib/GroupDocs/Storage/models/files_response.rb +225 -0
  16. data/lib/GroupDocs/Storage/models/group_docs_response.rb +214 -0
  17. data/lib/GroupDocs/Storage/models/move_file_response.rb +214 -0
  18. data/lib/GroupDocs/Storage/models/move_folder_response.rb +214 -0
  19. data/lib/GroupDocs/Storage/models/remove_file_response.rb +214 -0
  20. data/lib/GroupDocs/Storage/models/remove_folder_response.rb +214 -0
  21. data/lib/GroupDocs/Storage/models/requests/delete_file_request.rb +57 -0
  22. data/lib/GroupDocs/Storage/models/requests/delete_folder_request.rb +57 -0
  23. data/lib/GroupDocs/Storage/models/requests/get_disc_usage_request.rb +47 -0
  24. data/lib/GroupDocs/Storage/models/requests/get_download_request.rb +57 -0
  25. data/lib/GroupDocs/Storage/models/requests/get_is_exist_request.rb +57 -0
  26. data/lib/GroupDocs/Storage/models/requests/get_is_storage_exist_request.rb +47 -0
  27. data/lib/GroupDocs/Storage/models/requests/get_list_file_versions_request.rb +52 -0
  28. data/lib/GroupDocs/Storage/models/requests/get_list_files_request.rb +52 -0
  29. data/lib/GroupDocs/Storage/models/requests/post_move_file_request.rb +67 -0
  30. data/lib/GroupDocs/Storage/models/requests/post_move_folder_request.rb +62 -0
  31. data/lib/GroupDocs/Storage/models/requests/put_copy_folder_request.rb +62 -0
  32. data/lib/GroupDocs/Storage/models/requests/put_copy_request.rb +67 -0
  33. data/lib/GroupDocs/Storage/models/requests/put_create_folder_request.rb +57 -0
  34. data/lib/GroupDocs/Storage/models/requests/put_create_request.rb +62 -0
  35. data/lib/GroupDocs/Storage/models/storage_exist_response.rb +223 -0
  36. data/lib/GroupDocs/Storage/models/upload_response.rb +214 -0
  37. data/lib/GroupDocs/Storage/version.rb +29 -0
  38. data/lib/groupdocs_storage_cloud.rb +71 -0
  39. metadata +129 -0
@@ -0,0 +1,214 @@
1
+ module GroupDocsStorageCloud
2
+ #
3
+ # --------------------------------------------------------------------------------------------------------------------
4
+ # <copyright company="Aspose Pty Ltd" file="UploadResponse.rb">
5
+ # Copyright (c) 2018 GroupDocs.Storage for Cloud
6
+ # </copyright>
7
+ # <summary>
8
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ # of this software and associated documentation files (the "Software"), to deal
10
+ # in the Software without restriction, including without limitation the rights
11
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ # copies of the Software, and to permit persons to whom the Software is
13
+ # furnished to do so, subject to the following conditions:
14
+ #
15
+ # The above copyright notice and this permission notice shall be included in all
16
+ # copies or substantial portions of the Software.
17
+ #
18
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
+ # SOFTWARE.
25
+ # </summary>
26
+ # --------------------------------------------------------------------------------------------------------------------
27
+ #
28
+
29
+
30
+ class UploadResponse
31
+ attr_accessor :code
32
+
33
+ attr_accessor :status
34
+
35
+
36
+ # Attribute mapping from ruby-style variable name to JSON key.
37
+ def self.attribute_map
38
+ {
39
+ :'code' => :'Code',
40
+ :'status' => :'Status'
41
+ }
42
+ end
43
+
44
+ # Attribute type mapping.
45
+ def self.swagger_types
46
+ {
47
+ :'code' => :'Integer',
48
+ :'status' => :'String'
49
+ }
50
+ end
51
+
52
+ # Initializes the object
53
+ # @param [Hash] attributes Model attributes in the form of hash
54
+ def initialize(attributes = {})
55
+ return unless attributes.is_a?(Hash)
56
+
57
+ # convert string to symbol for hash key
58
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
59
+
60
+ if attributes.has_key?(:'Code')
61
+ self.code = attributes[:'Code']
62
+ end
63
+
64
+ if attributes.has_key?(:'Status')
65
+ self.status = attributes[:'Status']
66
+ end
67
+
68
+ end
69
+
70
+ # Show invalid properties with the reasons. Usually used together with valid?
71
+ # @return Array for valid properies with the reasons
72
+ def list_invalid_properties
73
+ invalid_properties = Array.new
74
+ if @code.nil?
75
+ invalid_properties.push("invalid value for 'code', code cannot be nil.")
76
+ end
77
+
78
+ return invalid_properties
79
+ end
80
+
81
+ # Check to see if the all the properties in the model are valid
82
+ # @return true if the model is valid
83
+ def valid?
84
+ return false if @code.nil?
85
+ return true
86
+ end
87
+
88
+ # Checks equality by comparing each attribute.
89
+ # @param [Object] Object to be compared
90
+ def ==(o)
91
+ return true if self.equal?(o)
92
+ self.class == o.class &&
93
+ code == o.code &&
94
+ status == o.status
95
+ end
96
+
97
+ # @see the `==` method
98
+ # @param [Object] Object to be compared
99
+ def eql?(o)
100
+ self == o
101
+ end
102
+
103
+ # Calculates hash code according to all attributes.
104
+ # @return [Fixnum] Hash code
105
+ def hash
106
+ [code, status].hash
107
+ end
108
+
109
+ # Builds the object from hash
110
+ # @param [Hash] attributes Model attributes in the form of hash
111
+ # @return [Object] Returns the model itself
112
+ def build_from_hash(attributes)
113
+ return nil unless attributes.is_a?(Hash)
114
+ self.class.swagger_types.each_pair do |key, type|
115
+ key_attr = self.class.attribute_map[key].to_s
116
+ key_attr[0] = key_attr[0].downcase
117
+ if type =~ /\AArray<(.*)>/i
118
+ # 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 attributes[key_attr.to_sym].is_a?(Array)
121
+ self.send("#{key}=", attributes[key_attr.to_sym].map{ |v| _deserialize($1, v) } )
122
+ end
123
+ elsif !attributes[key_attr.to_sym].nil?
124
+ self.send("#{key}=", _deserialize(type, attributes[key_attr.to_sym]))
125
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
126
+ end
127
+ self
128
+ end
129
+
130
+ # Deserializes the data based on type
131
+ # @param string type Data type
132
+ # @param string value Value to be deserialized
133
+ # @return [Object] Deserialized data
134
+ def _deserialize(type, value)
135
+ case type.to_sym
136
+ when :DateTime
137
+ DateTime.parse value
138
+ when :Date
139
+ Date.parse value
140
+ when :String
141
+ value.to_s
142
+ when :Integer
143
+ value.to_i
144
+ when :Float
145
+ value.to_f
146
+ when :BOOLEAN
147
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
148
+ true
149
+ else
150
+ false
151
+ end
152
+ when :Object
153
+ # generic object (usually a Hash), return directly
154
+ value
155
+ when /\AArray<(?<inner_type>.+)>\z/
156
+ inner_type = Regexp.last_match[:inner_type]
157
+ value.map { |v| _deserialize(inner_type, v) }
158
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
159
+ k_type = Regexp.last_match[:k_type]
160
+ v_type = Regexp.last_match[:v_type]
161
+ {}.tap do |hash|
162
+ value.each do |k, v|
163
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
164
+ end
165
+ end
166
+ else # model
167
+ temp_model = GroupDocsStorageCloud.const_get(type).new
168
+ temp_model.build_from_hash(value)
169
+ end
170
+ end
171
+
172
+ # Returns the string representation of the object
173
+ # @return [String] String presentation of the object
174
+ def to_s
175
+ to_hash.to_s
176
+ end
177
+
178
+ # to_body is an alias to to_hash (backward compatibility)
179
+ # @return [Hash] Returns the object in the form of hash
180
+ def to_body
181
+ to_hash
182
+ end
183
+
184
+ # Returns the object in the form of hash
185
+ # @return [Hash] Returns the object in the form of hash
186
+ def to_hash
187
+ hash = {}
188
+ self.class.attribute_map.each_pair do |attr, param|
189
+ value = self.send(attr)
190
+ next if value.nil?
191
+ hash[param] = _to_hash(value)
192
+ end
193
+ hash
194
+ end
195
+
196
+ # Outputs non-array value in the form of hash
197
+ # For object, use to_hash. Otherwise, just return the value
198
+ # @param [Object] value Any valid value
199
+ # @return [Hash] Returns the value in the form of hash
200
+ def _to_hash(value)
201
+ if value.is_a?(Array)
202
+ value.compact.map{ |v| _to_hash(v) }
203
+ elsif value.is_a?(Hash)
204
+ {}.tap do |hash|
205
+ value.each { |k, v| hash[k] = _to_hash(v) }
206
+ end
207
+ elsif value.respond_to? :to_hash
208
+ value.to_hash
209
+ else
210
+ value
211
+ end
212
+ end
213
+ end
214
+ end
@@ -0,0 +1,29 @@
1
+ #
2
+ # --------------------------------------------------------------------------------------------------------------------
3
+ # <copyright company="Aspose Pty Ltd" file="version.rb">
4
+ # Copyright (c) 2018 GroupDocs.Storage for Cloud
5
+ # </copyright>
6
+ # <summary>
7
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ # of this software and associated documentation files (the "Software"), to deal
9
+ # in the Software without restriction, including without limitation the rights
10
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ # copies of the Software, and to permit persons to whom the Software is
12
+ # furnished to do so, subject to the following conditions:
13
+ #
14
+ # The above copyright notice and this permission notice shall be included in all
15
+ # copies or substantial portions of the Software.
16
+ #
17
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ # SOFTWARE.
24
+ # </summary>
25
+ # --------------------------------------------------------------------------------------------------------------------
26
+ #
27
+ module GroupDocsStorageCloud
28
+ VERSION = "18.6.0"
29
+ end
@@ -0,0 +1,71 @@
1
+ # ------------------------------------------------------------------------------------
2
+ # <copyright company="Aspose Pty Ltd" file="groupdocs_storage_cloud.rb">
3
+ # Copyright (c) 2018 GroupDocs.Storage for Cloud
4
+ # </copyright>
5
+ # <summary>
6
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ # of this software and associated documentation files (the "Software"), to deal
8
+ # in the Software without restriction, including without limitation the rights
9
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ # copies of the Software, and to permit persons to whom the Software is
11
+ # furnished to do so, subject to the following conditions:
12
+ #
13
+ # The above copyright notice and this permission notice shall be included in all
14
+ # copies or substantial portions of the Software.
15
+ #
16
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ # SOFTWARE.
23
+ # </summary>
24
+ # ------------------------------------------------------------------------------------
25
+
26
+ # Common files
27
+ require_relative '../lib/GroupDocs/Storage/api_client'
28
+ require_relative '../lib/GroupDocs/Storage/api_error'
29
+ require_relative '../lib/GroupDocs/Storage/version'
30
+ require_relative '../lib/GroupDocs/Storage/configuration'
31
+
32
+ # Models
33
+ require_relative '../lib/GroupDocs/Storage/models/disc_usage'
34
+ require_relative '../lib/GroupDocs/Storage/models/file_exist'
35
+ require_relative '../lib/GroupDocs/Storage/models/file_response'
36
+ require_relative '../lib/GroupDocs/Storage/models/group_docs_response'
37
+ require_relative '../lib/GroupDocs/Storage/models/copy_file_response'
38
+ require_relative '../lib/GroupDocs/Storage/models/create_folder_response'
39
+ require_relative '../lib/GroupDocs/Storage/models/disc_usage_response'
40
+ require_relative '../lib/GroupDocs/Storage/models/file_exist_response'
41
+ require_relative '../lib/GroupDocs/Storage/models/file_version'
42
+ require_relative '../lib/GroupDocs/Storage/models/file_versions_response'
43
+ require_relative '../lib/GroupDocs/Storage/models/files_response'
44
+ require_relative '../lib/GroupDocs/Storage/models/move_file_response'
45
+ require_relative '../lib/GroupDocs/Storage/models/move_folder_response'
46
+ require_relative '../lib/GroupDocs/Storage/models/remove_file_response'
47
+ require_relative '../lib/GroupDocs/Storage/models/remove_folder_response'
48
+ require_relative '../lib/GroupDocs/Storage/models/storage_exist_response'
49
+ require_relative '../lib/GroupDocs/Storage/models/upload_response'
50
+
51
+ # APIs
52
+ require_relative '../lib/GroupDocs/Storage/api/storage_api'
53
+
54
+ module GroupDocsStorageCloud
55
+ # Main module
56
+ class << self
57
+ # Configure sdk using block.
58
+ # GroupDocsStorageCloud.configure do |config|
59
+ # config.username = "xxx"
60
+ # config.password = "xxx"
61
+ # end
62
+ # If no block given, return the configuration singleton instance.
63
+ def configure
64
+ if block_given?
65
+ yield Configuration.default
66
+ else
67
+ Configuration.default
68
+ end
69
+ end
70
+ end
71
+ end
metadata ADDED
@@ -0,0 +1,129 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: groupdocs_storage_cloud
3
+ version: !ruby/object:Gem::Version
4
+ version: 18.6.0
5
+ platform: ruby
6
+ authors:
7
+ - GroupDocs
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2018-07-02 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: faraday
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 0.14.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 0.14.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: mimemagic
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 0.3.2
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 0.3.2
41
+ - !ruby/object:Gem::Dependency
42
+ name: minitest
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '5.11'
48
+ - - ">="
49
+ - !ruby/object:Gem::Version
50
+ version: 5.11.3
51
+ type: :development
52
+ prerelease: false
53
+ version_requirements: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - "~>"
56
+ - !ruby/object:Gem::Version
57
+ version: '5.11'
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: 5.11.3
61
+ description: This SDK allows you to work with GroupDocs.Storage Cloud REST APIs in
62
+ your Ruby applications quickly and easily, with zero initial cost
63
+ email:
64
+ executables: []
65
+ extensions: []
66
+ extra_rdoc_files: []
67
+ files:
68
+ - lib/GroupDocs/Storage/api/storage_api.rb
69
+ - lib/GroupDocs/Storage/api_client.rb
70
+ - lib/GroupDocs/Storage/api_error.rb
71
+ - lib/GroupDocs/Storage/configuration.rb
72
+ - lib/GroupDocs/Storage/models/copy_file_response.rb
73
+ - lib/GroupDocs/Storage/models/create_folder_response.rb
74
+ - lib/GroupDocs/Storage/models/disc_usage.rb
75
+ - lib/GroupDocs/Storage/models/disc_usage_response.rb
76
+ - lib/GroupDocs/Storage/models/file_exist.rb
77
+ - lib/GroupDocs/Storage/models/file_exist_response.rb
78
+ - lib/GroupDocs/Storage/models/file_response.rb
79
+ - lib/GroupDocs/Storage/models/file_version.rb
80
+ - lib/GroupDocs/Storage/models/file_versions_response.rb
81
+ - lib/GroupDocs/Storage/models/files_response.rb
82
+ - lib/GroupDocs/Storage/models/group_docs_response.rb
83
+ - lib/GroupDocs/Storage/models/move_file_response.rb
84
+ - lib/GroupDocs/Storage/models/move_folder_response.rb
85
+ - lib/GroupDocs/Storage/models/remove_file_response.rb
86
+ - lib/GroupDocs/Storage/models/remove_folder_response.rb
87
+ - lib/GroupDocs/Storage/models/requests/delete_file_request.rb
88
+ - lib/GroupDocs/Storage/models/requests/delete_folder_request.rb
89
+ - lib/GroupDocs/Storage/models/requests/get_disc_usage_request.rb
90
+ - lib/GroupDocs/Storage/models/requests/get_download_request.rb
91
+ - lib/GroupDocs/Storage/models/requests/get_is_exist_request.rb
92
+ - lib/GroupDocs/Storage/models/requests/get_is_storage_exist_request.rb
93
+ - lib/GroupDocs/Storage/models/requests/get_list_file_versions_request.rb
94
+ - lib/GroupDocs/Storage/models/requests/get_list_files_request.rb
95
+ - lib/GroupDocs/Storage/models/requests/post_move_file_request.rb
96
+ - lib/GroupDocs/Storage/models/requests/post_move_folder_request.rb
97
+ - lib/GroupDocs/Storage/models/requests/put_copy_folder_request.rb
98
+ - lib/GroupDocs/Storage/models/requests/put_copy_request.rb
99
+ - lib/GroupDocs/Storage/models/requests/put_create_folder_request.rb
100
+ - lib/GroupDocs/Storage/models/requests/put_create_request.rb
101
+ - lib/GroupDocs/Storage/models/storage_exist_response.rb
102
+ - lib/GroupDocs/Storage/models/upload_response.rb
103
+ - lib/GroupDocs/Storage/version.rb
104
+ - lib/groupdocs_storage_cloud.rb
105
+ homepage: https://github.com/groupdocs-storage-cloud/groupdocs-storage-cloud-ruby
106
+ licenses:
107
+ - MIT
108
+ metadata: {}
109
+ post_install_message:
110
+ rdoc_options: []
111
+ require_paths:
112
+ - lib
113
+ required_ruby_version: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '2.3'
118
+ required_rubygems_version: !ruby/object:Gem::Requirement
119
+ requirements:
120
+ - - ">="
121
+ - !ruby/object:Gem::Version
122
+ version: '0'
123
+ requirements: []
124
+ rubyforge_project:
125
+ rubygems_version: 2.7.7
126
+ signing_key:
127
+ specification_version: 4
128
+ summary: Ruby library for communicating with the GroupDocs.Storage Cloud API
129
+ test_files: []