files.com 1.0.92

Sign up to get free protection for your applications and to get access to all the features.
Files changed (136) hide show
  1. checksums.yaml +7 -0
  2. data/CONTRIBUTORS +4 -0
  3. data/Gemfile +12 -0
  4. data/Gemfile.lock +82 -0
  5. data/LICENSE +21 -0
  6. data/README.md +119 -0
  7. data/Rakefile +12 -0
  8. data/SECURITY.md +24 -0
  9. data/_VERSION +1 -0
  10. data/bin/files +8 -0
  11. data/bin/files-console +16 -0
  12. data/docs/account_line_item.md +41 -0
  13. data/docs/action.md +37 -0
  14. data/docs/api_key.md +202 -0
  15. data/docs/app.md +59 -0
  16. data/docs/as2_key.md +133 -0
  17. data/docs/auto.md +11 -0
  18. data/docs/automation.md +190 -0
  19. data/docs/behavior.md +208 -0
  20. data/docs/bundle.md +252 -0
  21. data/docs/bundle_download.md +35 -0
  22. data/docs/clickwrap.md +143 -0
  23. data/docs/dns_record.md +35 -0
  24. data/docs/errors.md +17 -0
  25. data/docs/file.md +204 -0
  26. data/docs/file_action.md +126 -0
  27. data/docs/file_comment.md +116 -0
  28. data/docs/file_comment_reaction.md +62 -0
  29. data/docs/file_part_upload.md +37 -0
  30. data/docs/file_utils.md +4 -0
  31. data/docs/folder.md +90 -0
  32. data/docs/group.md +153 -0
  33. data/docs/group_user.md +124 -0
  34. data/docs/history.md +171 -0
  35. data/docs/history_export.md +174 -0
  36. data/docs/image.md +13 -0
  37. data/docs/invoice.md +72 -0
  38. data/docs/invoice_line_item.md +27 -0
  39. data/docs/ip_address.md +55 -0
  40. data/docs/lock.md +98 -0
  41. data/docs/message.md +147 -0
  42. data/docs/message_comment.md +132 -0
  43. data/docs/message_comment_reaction.md +94 -0
  44. data/docs/message_reaction.md +94 -0
  45. data/docs/notification.md +177 -0
  46. data/docs/payment.md +72 -0
  47. data/docs/payment_line_item.md +19 -0
  48. data/docs/permission.md +95 -0
  49. data/docs/preview.md +19 -0
  50. data/docs/project.md +121 -0
  51. data/docs/public_ip_address.md +13 -0
  52. data/docs/public_key.md +133 -0
  53. data/docs/remote_server.md +356 -0
  54. data/docs/request.md +100 -0
  55. data/docs/session.md +78 -0
  56. data/docs/site.md +448 -0
  57. data/docs/sso_strategy.md +114 -0
  58. data/docs/status.md +21 -0
  59. data/docs/style.md +93 -0
  60. data/docs/usage_daily_snapshot.md +45 -0
  61. data/docs/usage_snapshot.md +53 -0
  62. data/docs/user.md +535 -0
  63. data/docs/user_cipher_use.md +41 -0
  64. data/docs/user_request.md +93 -0
  65. data/files.com.gemspec +22 -0
  66. data/lib/files.com.rb +184 -0
  67. data/lib/files.com/api.rb +38 -0
  68. data/lib/files.com/api_client.rb +340 -0
  69. data/lib/files.com/errors.rb +41 -0
  70. data/lib/files.com/list.rb +95 -0
  71. data/lib/files.com/models/account_line_item.rb +82 -0
  72. data/lib/files.com/models/action.rb +77 -0
  73. data/lib/files.com/models/api_key.rb +270 -0
  74. data/lib/files.com/models/app.rb +106 -0
  75. data/lib/files.com/models/as2_key.rb +179 -0
  76. data/lib/files.com/models/auto.rb +17 -0
  77. data/lib/files.com/models/automation.rb +304 -0
  78. data/lib/files.com/models/behavior.rb +266 -0
  79. data/lib/files.com/models/bundle.rb +371 -0
  80. data/lib/files.com/models/bundle_download.rb +49 -0
  81. data/lib/files.com/models/clickwrap.rb +197 -0
  82. data/lib/files.com/models/dir.rb +3 -0
  83. data/lib/files.com/models/dns_record.rb +51 -0
  84. data/lib/files.com/models/errors.rb +22 -0
  85. data/lib/files.com/models/file.rb +968 -0
  86. data/lib/files.com/models/file_action.rb +126 -0
  87. data/lib/files.com/models/file_comment.rb +146 -0
  88. data/lib/files.com/models/file_comment_reaction.rb +100 -0
  89. data/lib/files.com/models/file_part_upload.rb +82 -0
  90. data/lib/files.com/models/file_utils.rb +118 -0
  91. data/lib/files.com/models/folder.rb +357 -0
  92. data/lib/files.com/models/group.rb +208 -0
  93. data/lib/files.com/models/group_user.rb +171 -0
  94. data/lib/files.com/models/history.rb +228 -0
  95. data/lib/files.com/models/history_export.rb +353 -0
  96. data/lib/files.com/models/image.rb +22 -0
  97. data/lib/files.com/models/invoice.rb +117 -0
  98. data/lib/files.com/models/invoice_line_item.rb +57 -0
  99. data/lib/files.com/models/ip_address.rb +66 -0
  100. data/lib/files.com/models/lock.rb +173 -0
  101. data/lib/files.com/models/message.rb +201 -0
  102. data/lib/files.com/models/message_comment.rb +165 -0
  103. data/lib/files.com/models/message_comment_reaction.rb +128 -0
  104. data/lib/files.com/models/message_reaction.rb +128 -0
  105. data/lib/files.com/models/notification.rb +263 -0
  106. data/lib/files.com/models/payment.rb +117 -0
  107. data/lib/files.com/models/payment_line_item.rb +37 -0
  108. data/lib/files.com/models/permission.rb +172 -0
  109. data/lib/files.com/models/preview.rb +37 -0
  110. data/lib/files.com/models/project.rb +140 -0
  111. data/lib/files.com/models/public_ip_address.rb +22 -0
  112. data/lib/files.com/models/public_key.rb +179 -0
  113. data/lib/files.com/models/remote_server.rb +680 -0
  114. data/lib/files.com/models/request.rb +179 -0
  115. data/lib/files.com/models/session.rb +247 -0
  116. data/lib/files.com/models/site.rb +733 -0
  117. data/lib/files.com/models/sso_strategy.rb +227 -0
  118. data/lib/files.com/models/status.rb +37 -0
  119. data/lib/files.com/models/style.rb +131 -0
  120. data/lib/files.com/models/usage_daily_snapshot.rb +66 -0
  121. data/lib/files.com/models/usage_snapshot.rb +96 -0
  122. data/lib/files.com/models/user.rb +876 -0
  123. data/lib/files.com/models/user_cipher_use.rb +63 -0
  124. data/lib/files.com/models/user_request.rb +127 -0
  125. data/lib/files.com/response.rb +25 -0
  126. data/lib/files.com/sizable_io.rb +32 -0
  127. data/lib/files.com/system_profiler.rb +56 -0
  128. data/lib/files.com/util.rb +106 -0
  129. data/lib/files.com/version.rb +5 -0
  130. data/spec/list_spec.rb +214 -0
  131. data/spec/models/file_spec.rb +68 -0
  132. data/spec/models/folder_spec.rb +40 -0
  133. data/spec/spec_helper.rb +36 -0
  134. data/test.sh +8 -0
  135. data/test/test.rb +75 -0
  136. metadata +235 -0
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Files
4
+ class PublicIpAddress
5
+ attr_reader :options, :attributes
6
+
7
+ def initialize(attributes = {}, options = {})
8
+ @attributes = attributes || {}
9
+ @options = options || {}
10
+ end
11
+
12
+ # string - The public IP address.
13
+ def ip_address
14
+ @attributes[:ip_address]
15
+ end
16
+
17
+ # string - The name of the frontend server.
18
+ def server_name
19
+ @attributes[:server_name]
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,179 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Files
4
+ class PublicKey
5
+ attr_reader :options, :attributes
6
+
7
+ def initialize(attributes = {}, options = {})
8
+ @attributes = attributes || {}
9
+ @options = options || {}
10
+ end
11
+
12
+ # int64 - Public key ID
13
+ def id
14
+ @attributes[:id]
15
+ end
16
+
17
+ def id=(value)
18
+ @attributes[:id] = value
19
+ end
20
+
21
+ # string - Public key title
22
+ def title
23
+ @attributes[:title]
24
+ end
25
+
26
+ def title=(value)
27
+ @attributes[:title] = value
28
+ end
29
+
30
+ # date-time - Public key created at date/time
31
+ def created_at
32
+ @attributes[:created_at]
33
+ end
34
+
35
+ # string - Public key fingerprint
36
+ def fingerprint
37
+ @attributes[:fingerprint]
38
+ end
39
+
40
+ def fingerprint=(value)
41
+ @attributes[:fingerprint] = value
42
+ end
43
+
44
+ # int64 - User ID. Provide a value of `0` to operate the current session's user.
45
+ def user_id
46
+ @attributes[:user_id]
47
+ end
48
+
49
+ def user_id=(value)
50
+ @attributes[:user_id] = value
51
+ end
52
+
53
+ # string - Actual contents of SSH key.
54
+ def public_key
55
+ @attributes[:public_key]
56
+ end
57
+
58
+ def public_key=(value)
59
+ @attributes[:public_key] = value
60
+ end
61
+
62
+ # Parameters:
63
+ # title (required) - string - Internal reference for key.
64
+ def update(params = {})
65
+ params ||= {}
66
+ params[:id] = @attributes[:id]
67
+ raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
68
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
69
+ raise InvalidParameterError.new("Bad parameter: title must be an String") if params.dig(:title) and !params.dig(:title).is_a?(String)
70
+ raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
71
+ raise MissingParameterError.new("Parameter missing: title") unless params.dig(:title)
72
+
73
+ Api.send_request("/public_keys/#{@attributes[:id]}", :patch, params, @options)
74
+ end
75
+
76
+ def delete(params = {})
77
+ params ||= {}
78
+ params[:id] = @attributes[:id]
79
+ raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
80
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
81
+ raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
82
+
83
+ Api.send_request("/public_keys/#{@attributes[:id]}", :delete, params, @options)
84
+ end
85
+
86
+ def destroy(params = {})
87
+ delete(params)
88
+ end
89
+
90
+ def save
91
+ if @attributes[:id]
92
+ update(@attributes)
93
+ else
94
+ new_obj = PublicKey.create(@attributes, @options)
95
+ @attributes = new_obj.attributes
96
+ end
97
+ end
98
+
99
+ # Parameters:
100
+ # user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
101
+ # page - int64 - Current page number.
102
+ # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
103
+ # action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
104
+ def self.list(params = {}, options = {})
105
+ raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params.dig(:user_id) and !params.dig(:user_id).is_a?(Integer)
106
+ raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
107
+ raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
108
+ raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
109
+
110
+ response, options = Api.send_request("/public_keys", :get, params, options)
111
+ response.data.map do |entity_data|
112
+ PublicKey.new(entity_data, options)
113
+ end
114
+ end
115
+
116
+ def self.all(params = {}, options = {})
117
+ list(params, options)
118
+ end
119
+
120
+ # Parameters:
121
+ # id (required) - int64 - Public Key ID.
122
+ def self.find(id, params = {}, options = {})
123
+ params ||= {}
124
+ params[:id] = id
125
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
126
+ raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
127
+
128
+ response, options = Api.send_request("/public_keys/#{params[:id]}", :get, params, options)
129
+ PublicKey.new(response.data, options)
130
+ end
131
+
132
+ def self.get(id, params = {}, options = {})
133
+ find(id, params, options)
134
+ end
135
+
136
+ # Parameters:
137
+ # user_id - int64 - User ID. Provide a value of `0` to operate the current session's user.
138
+ # title (required) - string - Internal reference for key.
139
+ # public_key (required) - string - Actual contents of SSH key.
140
+ def self.create(params = {}, options = {})
141
+ raise InvalidParameterError.new("Bad parameter: user_id must be an Integer") if params.dig(:user_id) and !params.dig(:user_id).is_a?(Integer)
142
+ raise InvalidParameterError.new("Bad parameter: title must be an String") if params.dig(:title) and !params.dig(:title).is_a?(String)
143
+ raise InvalidParameterError.new("Bad parameter: public_key must be an String") if params.dig(:public_key) and !params.dig(:public_key).is_a?(String)
144
+ raise MissingParameterError.new("Parameter missing: title") unless params.dig(:title)
145
+ raise MissingParameterError.new("Parameter missing: public_key") unless params.dig(:public_key)
146
+
147
+ response, options = Api.send_request("/public_keys", :post, params, options)
148
+ PublicKey.new(response.data, options)
149
+ end
150
+
151
+ # Parameters:
152
+ # title (required) - string - Internal reference for key.
153
+ def self.update(id, params = {}, options = {})
154
+ params ||= {}
155
+ params[:id] = id
156
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
157
+ raise InvalidParameterError.new("Bad parameter: title must be an String") if params.dig(:title) and !params.dig(:title).is_a?(String)
158
+ raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
159
+ raise MissingParameterError.new("Parameter missing: title") unless params.dig(:title)
160
+
161
+ response, options = Api.send_request("/public_keys/#{params[:id]}", :patch, params, options)
162
+ PublicKey.new(response.data, options)
163
+ end
164
+
165
+ def self.delete(id, params = {}, options = {})
166
+ params ||= {}
167
+ params[:id] = id
168
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
169
+ raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
170
+
171
+ response, _options = Api.send_request("/public_keys/#{params[:id]}", :delete, params, options)
172
+ response.data
173
+ end
174
+
175
+ def self.destroy(id, params = {}, options = {})
176
+ delete(id, params, options)
177
+ end
178
+ end
179
+ end
@@ -0,0 +1,680 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Files
4
+ class RemoteServer
5
+ attr_reader :options, :attributes
6
+
7
+ def initialize(attributes = {}, options = {})
8
+ @attributes = attributes || {}
9
+ @options = options || {}
10
+ end
11
+
12
+ # int64 - Remote server ID
13
+ def id
14
+ @attributes[:id]
15
+ end
16
+
17
+ def id=(value)
18
+ @attributes[:id] = value
19
+ end
20
+
21
+ # string - Type of authentication method
22
+ def authentication_method
23
+ @attributes[:authentication_method]
24
+ end
25
+
26
+ def authentication_method=(value)
27
+ @attributes[:authentication_method] = value
28
+ end
29
+
30
+ # string - Hostname or IP address
31
+ def hostname
32
+ @attributes[:hostname]
33
+ end
34
+
35
+ def hostname=(value)
36
+ @attributes[:hostname] = value
37
+ end
38
+
39
+ # string - Internal name for your reference
40
+ def name
41
+ @attributes[:name]
42
+ end
43
+
44
+ def name=(value)
45
+ @attributes[:name] = value
46
+ end
47
+
48
+ # int64 - Port for remote server. Not needed for S3.
49
+ def port
50
+ @attributes[:port]
51
+ end
52
+
53
+ def port=(value)
54
+ @attributes[:port] = value
55
+ end
56
+
57
+ # int64 - Max number of parallel connections. Ignored for S3 connections (we will parallelize these as much as possible).
58
+ def max_connections
59
+ @attributes[:max_connections]
60
+ end
61
+
62
+ def max_connections=(value)
63
+ @attributes[:max_connections] = value
64
+ end
65
+
66
+ # string - S3 bucket name
67
+ def s3_bucket
68
+ @attributes[:s3_bucket]
69
+ end
70
+
71
+ def s3_bucket=(value)
72
+ @attributes[:s3_bucket] = value
73
+ end
74
+
75
+ # string - S3 region
76
+ def s3_region
77
+ @attributes[:s3_region]
78
+ end
79
+
80
+ def s3_region=(value)
81
+ @attributes[:s3_region] = value
82
+ end
83
+
84
+ # string - Remote server certificate
85
+ def server_certificate
86
+ @attributes[:server_certificate]
87
+ end
88
+
89
+ def server_certificate=(value)
90
+ @attributes[:server_certificate] = value
91
+ end
92
+
93
+ # string - Remote server SSH Host Key. If provided, we will require that the server host key matches the provided key. Uses OpenSSH format similar to what would go into ~/.ssh/known_hosts
94
+ def server_host_key
95
+ @attributes[:server_host_key]
96
+ end
97
+
98
+ def server_host_key=(value)
99
+ @attributes[:server_host_key] = value
100
+ end
101
+
102
+ # string - Remote server type.
103
+ def server_type
104
+ @attributes[:server_type]
105
+ end
106
+
107
+ def server_type=(value)
108
+ @attributes[:server_type] = value
109
+ end
110
+
111
+ # string - Should we require SSL?
112
+ def ssl
113
+ @attributes[:ssl]
114
+ end
115
+
116
+ def ssl=(value)
117
+ @attributes[:ssl] = value
118
+ end
119
+
120
+ # string - Remote server username. Not needed for S3 buckets.
121
+ def username
122
+ @attributes[:username]
123
+ end
124
+
125
+ def username=(value)
126
+ @attributes[:username] = value
127
+ end
128
+
129
+ # string - Google Cloud Storage bucket name
130
+ def google_cloud_storage_bucket
131
+ @attributes[:google_cloud_storage_bucket]
132
+ end
133
+
134
+ def google_cloud_storage_bucket=(value)
135
+ @attributes[:google_cloud_storage_bucket] = value
136
+ end
137
+
138
+ # string - Google Cloud Project ID
139
+ def google_cloud_storage_project_id
140
+ @attributes[:google_cloud_storage_project_id]
141
+ end
142
+
143
+ def google_cloud_storage_project_id=(value)
144
+ @attributes[:google_cloud_storage_project_id] = value
145
+ end
146
+
147
+ # string - Backblaze B2 Cloud Storage S3 Endpoint
148
+ def backblaze_b2_s3_endpoint
149
+ @attributes[:backblaze_b2_s3_endpoint]
150
+ end
151
+
152
+ def backblaze_b2_s3_endpoint=(value)
153
+ @attributes[:backblaze_b2_s3_endpoint] = value
154
+ end
155
+
156
+ # string - Backblaze B2 Cloud Storage Bucket name
157
+ def backblaze_b2_bucket
158
+ @attributes[:backblaze_b2_bucket]
159
+ end
160
+
161
+ def backblaze_b2_bucket=(value)
162
+ @attributes[:backblaze_b2_bucket] = value
163
+ end
164
+
165
+ # string - Wasabi region
166
+ def wasabi_bucket
167
+ @attributes[:wasabi_bucket]
168
+ end
169
+
170
+ def wasabi_bucket=(value)
171
+ @attributes[:wasabi_bucket] = value
172
+ end
173
+
174
+ # string - Wasabi Bucket name
175
+ def wasabi_region
176
+ @attributes[:wasabi_region]
177
+ end
178
+
179
+ def wasabi_region=(value)
180
+ @attributes[:wasabi_region] = value
181
+ end
182
+
183
+ # string - Rackspace username used to login to the Rackspace Cloud Control Panel.
184
+ def rackspace_username
185
+ @attributes[:rackspace_username]
186
+ end
187
+
188
+ def rackspace_username=(value)
189
+ @attributes[:rackspace_username] = value
190
+ end
191
+
192
+ # string - Three letter airport code for Rackspace region. See https://support.rackspace.com/how-to/about-regions/
193
+ def rackspace_region
194
+ @attributes[:rackspace_region]
195
+ end
196
+
197
+ def rackspace_region=(value)
198
+ @attributes[:rackspace_region] = value
199
+ end
200
+
201
+ # string - The name of the container (top level directory) where files will sync.
202
+ def rackspace_container
203
+ @attributes[:rackspace_container]
204
+ end
205
+
206
+ def rackspace_container=(value)
207
+ @attributes[:rackspace_container] = value
208
+ end
209
+
210
+ # string - Returns link to login with an Oauth provider
211
+ def auth_setup_link
212
+ @attributes[:auth_setup_link]
213
+ end
214
+
215
+ def auth_setup_link=(value)
216
+ @attributes[:auth_setup_link] = value
217
+ end
218
+
219
+ # string - Either `in_setup` or `complete`
220
+ def auth_status
221
+ @attributes[:auth_status]
222
+ end
223
+
224
+ def auth_status=(value)
225
+ @attributes[:auth_status] = value
226
+ end
227
+
228
+ # string - Describes the authorized account
229
+ def auth_account_name
230
+ @attributes[:auth_account_name]
231
+ end
232
+
233
+ def auth_account_name=(value)
234
+ @attributes[:auth_account_name] = value
235
+ end
236
+
237
+ # string - Either personal or business_other account types
238
+ def one_drive_account_type
239
+ @attributes[:one_drive_account_type]
240
+ end
241
+
242
+ def one_drive_account_type=(value)
243
+ @attributes[:one_drive_account_type] = value
244
+ end
245
+
246
+ # string - Azure Blob Storage Account name
247
+ def azure_blob_storage_account
248
+ @attributes[:azure_blob_storage_account]
249
+ end
250
+
251
+ def azure_blob_storage_account=(value)
252
+ @attributes[:azure_blob_storage_account] = value
253
+ end
254
+
255
+ # string - Azure Blob Storage Container name
256
+ def azure_blob_storage_container
257
+ @attributes[:azure_blob_storage_container]
258
+ end
259
+
260
+ def azure_blob_storage_container=(value)
261
+ @attributes[:azure_blob_storage_container] = value
262
+ end
263
+
264
+ # string - AWS Access Key.
265
+ def aws_access_key
266
+ @attributes[:aws_access_key]
267
+ end
268
+
269
+ def aws_access_key=(value)
270
+ @attributes[:aws_access_key] = value
271
+ end
272
+
273
+ # string - AWS secret key.
274
+ def aws_secret_key
275
+ @attributes[:aws_secret_key]
276
+ end
277
+
278
+ def aws_secret_key=(value)
279
+ @attributes[:aws_secret_key] = value
280
+ end
281
+
282
+ # string - Password if needed.
283
+ def password
284
+ @attributes[:password]
285
+ end
286
+
287
+ def password=(value)
288
+ @attributes[:password] = value
289
+ end
290
+
291
+ # string - Private key if needed.
292
+ def private_key
293
+ @attributes[:private_key]
294
+ end
295
+
296
+ def private_key=(value)
297
+ @attributes[:private_key] = value
298
+ end
299
+
300
+ # string - A JSON file that contains the private key. To generate see https://cloud.google.com/storage/docs/json_api/v1/how-tos/authorizing#APIKey
301
+ def google_cloud_storage_credentials_json
302
+ @attributes[:google_cloud_storage_credentials_json]
303
+ end
304
+
305
+ def google_cloud_storage_credentials_json=(value)
306
+ @attributes[:google_cloud_storage_credentials_json] = value
307
+ end
308
+
309
+ # string - Wasabi access key.
310
+ def wasabi_access_key
311
+ @attributes[:wasabi_access_key]
312
+ end
313
+
314
+ def wasabi_access_key=(value)
315
+ @attributes[:wasabi_access_key] = value
316
+ end
317
+
318
+ # string - Wasabi secret key.
319
+ def wasabi_secret_key
320
+ @attributes[:wasabi_secret_key]
321
+ end
322
+
323
+ def wasabi_secret_key=(value)
324
+ @attributes[:wasabi_secret_key] = value
325
+ end
326
+
327
+ # string - Backblaze B2 Cloud Storage keyID.
328
+ def backblaze_b2_key_id
329
+ @attributes[:backblaze_b2_key_id]
330
+ end
331
+
332
+ def backblaze_b2_key_id=(value)
333
+ @attributes[:backblaze_b2_key_id] = value
334
+ end
335
+
336
+ # string - Backblaze B2 Cloud Storage applicationKey.
337
+ def backblaze_b2_application_key
338
+ @attributes[:backblaze_b2_application_key]
339
+ end
340
+
341
+ def backblaze_b2_application_key=(value)
342
+ @attributes[:backblaze_b2_application_key] = value
343
+ end
344
+
345
+ # string - Rackspace API key from the Rackspace Cloud Control Panel.
346
+ def rackspace_api_key
347
+ @attributes[:rackspace_api_key]
348
+ end
349
+
350
+ def rackspace_api_key=(value)
351
+ @attributes[:rackspace_api_key] = value
352
+ end
353
+
354
+ # boolean - Reset authenticated account
355
+ def reset_authentication
356
+ @attributes[:reset_authentication]
357
+ end
358
+
359
+ def reset_authentication=(value)
360
+ @attributes[:reset_authentication] = value
361
+ end
362
+
363
+ # string - Azure Blob Storage secret key.
364
+ def azure_blob_storage_access_key
365
+ @attributes[:azure_blob_storage_access_key]
366
+ end
367
+
368
+ def azure_blob_storage_access_key=(value)
369
+ @attributes[:azure_blob_storage_access_key] = value
370
+ end
371
+
372
+ # Parameters:
373
+ # aws_access_key - string - AWS Access Key.
374
+ # aws_secret_key - string - AWS secret key.
375
+ # password - string - Password if needed.
376
+ # private_key - string - Private key if needed.
377
+ # google_cloud_storage_credentials_json - string - A JSON file that contains the private key. To generate see https://cloud.google.com/storage/docs/json_api/v1/how-tos/authorizing#APIKey
378
+ # wasabi_access_key - string - Wasabi access key.
379
+ # wasabi_secret_key - string - Wasabi secret key.
380
+ # backblaze_b2_key_id - string - Backblaze B2 Cloud Storage keyID.
381
+ # backblaze_b2_application_key - string - Backblaze B2 Cloud Storage applicationKey.
382
+ # rackspace_api_key - string - Rackspace API key from the Rackspace Cloud Control Panel.
383
+ # reset_authentication - boolean - Reset authenticated account
384
+ # azure_blob_storage_access_key - string - Azure Blob Storage secret key.
385
+ # hostname - string - Hostname or IP address
386
+ # name - string - Internal name for your reference
387
+ # max_connections - int64 - Max number of parallel connections. Ignored for S3 connections (we will parallelize these as much as possible).
388
+ # port - int64 - Port for remote server. Not needed for S3.
389
+ # s3_bucket - string - S3 bucket name
390
+ # s3_region - string - S3 region
391
+ # server_certificate - string - Remote server certificate
392
+ # server_host_key - string - Remote server SSH Host Key. If provided, we will require that the server host key matches the provided key. Uses OpenSSH format similar to what would go into ~/.ssh/known_hosts
393
+ # server_type - string - Remote server type.
394
+ # ssl - string - Should we require SSL?
395
+ # username - string - Remote server username. Not needed for S3 buckets.
396
+ # google_cloud_storage_bucket - string - Google Cloud Storage bucket name
397
+ # google_cloud_storage_project_id - string - Google Cloud Project ID
398
+ # backblaze_b2_bucket - string - Backblaze B2 Cloud Storage Bucket name
399
+ # backblaze_b2_s3_endpoint - string - Backblaze B2 Cloud Storage S3 Endpoint
400
+ # wasabi_bucket - string - Wasabi region
401
+ # wasabi_region - string - Wasabi Bucket name
402
+ # rackspace_username - string - Rackspace username used to login to the Rackspace Cloud Control Panel.
403
+ # rackspace_region - string - Three letter airport code for Rackspace region. See https://support.rackspace.com/how-to/about-regions/
404
+ # rackspace_container - string - The name of the container (top level directory) where files will sync.
405
+ # one_drive_account_type - string - Either personal or business_other account types
406
+ # azure_blob_storage_account - string - Azure Blob Storage Account name
407
+ # azure_blob_storage_container - string - Azure Blob Storage Container name
408
+ def update(params = {})
409
+ params ||= {}
410
+ params[:id] = @attributes[:id]
411
+ raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
412
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
413
+ raise InvalidParameterError.new("Bad parameter: aws_access_key must be an String") if params.dig(:aws_access_key) and !params.dig(:aws_access_key).is_a?(String)
414
+ raise InvalidParameterError.new("Bad parameter: aws_secret_key must be an String") if params.dig(:aws_secret_key) and !params.dig(:aws_secret_key).is_a?(String)
415
+ raise InvalidParameterError.new("Bad parameter: password must be an String") if params.dig(:password) and !params.dig(:password).is_a?(String)
416
+ raise InvalidParameterError.new("Bad parameter: private_key must be an String") if params.dig(:private_key) and !params.dig(:private_key).is_a?(String)
417
+ raise InvalidParameterError.new("Bad parameter: google_cloud_storage_credentials_json must be an String") if params.dig(:google_cloud_storage_credentials_json) and !params.dig(:google_cloud_storage_credentials_json).is_a?(String)
418
+ raise InvalidParameterError.new("Bad parameter: wasabi_access_key must be an String") if params.dig(:wasabi_access_key) and !params.dig(:wasabi_access_key).is_a?(String)
419
+ raise InvalidParameterError.new("Bad parameter: wasabi_secret_key must be an String") if params.dig(:wasabi_secret_key) and !params.dig(:wasabi_secret_key).is_a?(String)
420
+ raise InvalidParameterError.new("Bad parameter: backblaze_b2_key_id must be an String") if params.dig(:backblaze_b2_key_id) and !params.dig(:backblaze_b2_key_id).is_a?(String)
421
+ raise InvalidParameterError.new("Bad parameter: backblaze_b2_application_key must be an String") if params.dig(:backblaze_b2_application_key) and !params.dig(:backblaze_b2_application_key).is_a?(String)
422
+ raise InvalidParameterError.new("Bad parameter: rackspace_api_key must be an String") if params.dig(:rackspace_api_key) and !params.dig(:rackspace_api_key).is_a?(String)
423
+ raise InvalidParameterError.new("Bad parameter: azure_blob_storage_access_key must be an String") if params.dig(:azure_blob_storage_access_key) and !params.dig(:azure_blob_storage_access_key).is_a?(String)
424
+ raise InvalidParameterError.new("Bad parameter: hostname must be an String") if params.dig(:hostname) and !params.dig(:hostname).is_a?(String)
425
+ raise InvalidParameterError.new("Bad parameter: name must be an String") if params.dig(:name) and !params.dig(:name).is_a?(String)
426
+ raise InvalidParameterError.new("Bad parameter: max_connections must be an Integer") if params.dig(:max_connections) and !params.dig(:max_connections).is_a?(Integer)
427
+ raise InvalidParameterError.new("Bad parameter: port must be an Integer") if params.dig(:port) and !params.dig(:port).is_a?(Integer)
428
+ raise InvalidParameterError.new("Bad parameter: s3_bucket must be an String") if params.dig(:s3_bucket) and !params.dig(:s3_bucket).is_a?(String)
429
+ raise InvalidParameterError.new("Bad parameter: s3_region must be an String") if params.dig(:s3_region) and !params.dig(:s3_region).is_a?(String)
430
+ raise InvalidParameterError.new("Bad parameter: server_certificate must be an String") if params.dig(:server_certificate) and !params.dig(:server_certificate).is_a?(String)
431
+ raise InvalidParameterError.new("Bad parameter: server_host_key must be an String") if params.dig(:server_host_key) and !params.dig(:server_host_key).is_a?(String)
432
+ raise InvalidParameterError.new("Bad parameter: server_type must be an String") if params.dig(:server_type) and !params.dig(:server_type).is_a?(String)
433
+ raise InvalidParameterError.new("Bad parameter: ssl must be an String") if params.dig(:ssl) and !params.dig(:ssl).is_a?(String)
434
+ raise InvalidParameterError.new("Bad parameter: username must be an String") if params.dig(:username) and !params.dig(:username).is_a?(String)
435
+ raise InvalidParameterError.new("Bad parameter: google_cloud_storage_bucket must be an String") if params.dig(:google_cloud_storage_bucket) and !params.dig(:google_cloud_storage_bucket).is_a?(String)
436
+ raise InvalidParameterError.new("Bad parameter: google_cloud_storage_project_id must be an String") if params.dig(:google_cloud_storage_project_id) and !params.dig(:google_cloud_storage_project_id).is_a?(String)
437
+ raise InvalidParameterError.new("Bad parameter: backblaze_b2_bucket must be an String") if params.dig(:backblaze_b2_bucket) and !params.dig(:backblaze_b2_bucket).is_a?(String)
438
+ raise InvalidParameterError.new("Bad parameter: backblaze_b2_s3_endpoint must be an String") if params.dig(:backblaze_b2_s3_endpoint) and !params.dig(:backblaze_b2_s3_endpoint).is_a?(String)
439
+ raise InvalidParameterError.new("Bad parameter: wasabi_bucket must be an String") if params.dig(:wasabi_bucket) and !params.dig(:wasabi_bucket).is_a?(String)
440
+ raise InvalidParameterError.new("Bad parameter: wasabi_region must be an String") if params.dig(:wasabi_region) and !params.dig(:wasabi_region).is_a?(String)
441
+ raise InvalidParameterError.new("Bad parameter: rackspace_username must be an String") if params.dig(:rackspace_username) and !params.dig(:rackspace_username).is_a?(String)
442
+ raise InvalidParameterError.new("Bad parameter: rackspace_region must be an String") if params.dig(:rackspace_region) and !params.dig(:rackspace_region).is_a?(String)
443
+ raise InvalidParameterError.new("Bad parameter: rackspace_container must be an String") if params.dig(:rackspace_container) and !params.dig(:rackspace_container).is_a?(String)
444
+ raise InvalidParameterError.new("Bad parameter: one_drive_account_type must be an String") if params.dig(:one_drive_account_type) and !params.dig(:one_drive_account_type).is_a?(String)
445
+ raise InvalidParameterError.new("Bad parameter: azure_blob_storage_account must be an String") if params.dig(:azure_blob_storage_account) and !params.dig(:azure_blob_storage_account).is_a?(String)
446
+ raise InvalidParameterError.new("Bad parameter: azure_blob_storage_container must be an String") if params.dig(:azure_blob_storage_container) and !params.dig(:azure_blob_storage_container).is_a?(String)
447
+ raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
448
+
449
+ Api.send_request("/remote_servers/#{@attributes[:id]}", :patch, params, @options)
450
+ end
451
+
452
+ def delete(params = {})
453
+ params ||= {}
454
+ params[:id] = @attributes[:id]
455
+ raise MissingParameterError.new("Current object doesn't have a id") unless @attributes[:id]
456
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
457
+ raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
458
+
459
+ Api.send_request("/remote_servers/#{@attributes[:id]}", :delete, params, @options)
460
+ end
461
+
462
+ def destroy(params = {})
463
+ delete(params)
464
+ end
465
+
466
+ def save
467
+ if @attributes[:id]
468
+ update(@attributes)
469
+ else
470
+ new_obj = RemoteServer.create(@attributes, @options)
471
+ @attributes = new_obj.attributes
472
+ end
473
+ end
474
+
475
+ # Parameters:
476
+ # page - int64 - Current page number.
477
+ # per_page - int64 - Number of records to show per page. (Max: 10,000, 1,000 or less is recommended).
478
+ # action - string - Deprecated: If set to `count` returns a count of matching records rather than the records themselves.
479
+ def self.list(params = {}, options = {})
480
+ raise InvalidParameterError.new("Bad parameter: page must be an Integer") if params.dig(:page) and !params.dig(:page).is_a?(Integer)
481
+ raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params.dig(:per_page) and !params.dig(:per_page).is_a?(Integer)
482
+ raise InvalidParameterError.new("Bad parameter: action must be an String") if params.dig(:action) and !params.dig(:action).is_a?(String)
483
+
484
+ response, options = Api.send_request("/remote_servers", :get, params, options)
485
+ response.data.map do |entity_data|
486
+ RemoteServer.new(entity_data, options)
487
+ end
488
+ end
489
+
490
+ def self.all(params = {}, options = {})
491
+ list(params, options)
492
+ end
493
+
494
+ # Parameters:
495
+ # id (required) - int64 - Remote Server ID.
496
+ def self.find(id, params = {}, options = {})
497
+ params ||= {}
498
+ params[:id] = id
499
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
500
+ raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
501
+
502
+ response, options = Api.send_request("/remote_servers/#{params[:id]}", :get, params, options)
503
+ RemoteServer.new(response.data, options)
504
+ end
505
+
506
+ def self.get(id, params = {}, options = {})
507
+ find(id, params, options)
508
+ end
509
+
510
+ # Parameters:
511
+ # aws_access_key - string - AWS Access Key.
512
+ # aws_secret_key - string - AWS secret key.
513
+ # password - string - Password if needed.
514
+ # private_key - string - Private key if needed.
515
+ # google_cloud_storage_credentials_json - string - A JSON file that contains the private key. To generate see https://cloud.google.com/storage/docs/json_api/v1/how-tos/authorizing#APIKey
516
+ # wasabi_access_key - string - Wasabi access key.
517
+ # wasabi_secret_key - string - Wasabi secret key.
518
+ # backblaze_b2_key_id - string - Backblaze B2 Cloud Storage keyID.
519
+ # backblaze_b2_application_key - string - Backblaze B2 Cloud Storage applicationKey.
520
+ # rackspace_api_key - string - Rackspace API key from the Rackspace Cloud Control Panel.
521
+ # reset_authentication - boolean - Reset authenticated account
522
+ # azure_blob_storage_access_key - string - Azure Blob Storage secret key.
523
+ # hostname - string - Hostname or IP address
524
+ # name - string - Internal name for your reference
525
+ # max_connections - int64 - Max number of parallel connections. Ignored for S3 connections (we will parallelize these as much as possible).
526
+ # port - int64 - Port for remote server. Not needed for S3.
527
+ # s3_bucket - string - S3 bucket name
528
+ # s3_region - string - S3 region
529
+ # server_certificate - string - Remote server certificate
530
+ # server_host_key - string - Remote server SSH Host Key. If provided, we will require that the server host key matches the provided key. Uses OpenSSH format similar to what would go into ~/.ssh/known_hosts
531
+ # server_type - string - Remote server type.
532
+ # ssl - string - Should we require SSL?
533
+ # username - string - Remote server username. Not needed for S3 buckets.
534
+ # google_cloud_storage_bucket - string - Google Cloud Storage bucket name
535
+ # google_cloud_storage_project_id - string - Google Cloud Project ID
536
+ # backblaze_b2_bucket - string - Backblaze B2 Cloud Storage Bucket name
537
+ # backblaze_b2_s3_endpoint - string - Backblaze B2 Cloud Storage S3 Endpoint
538
+ # wasabi_bucket - string - Wasabi region
539
+ # wasabi_region - string - Wasabi Bucket name
540
+ # rackspace_username - string - Rackspace username used to login to the Rackspace Cloud Control Panel.
541
+ # rackspace_region - string - Three letter airport code for Rackspace region. See https://support.rackspace.com/how-to/about-regions/
542
+ # rackspace_container - string - The name of the container (top level directory) where files will sync.
543
+ # one_drive_account_type - string - Either personal or business_other account types
544
+ # azure_blob_storage_account - string - Azure Blob Storage Account name
545
+ # azure_blob_storage_container - string - Azure Blob Storage Container name
546
+ def self.create(params = {}, options = {})
547
+ raise InvalidParameterError.new("Bad parameter: aws_access_key must be an String") if params.dig(:aws_access_key) and !params.dig(:aws_access_key).is_a?(String)
548
+ raise InvalidParameterError.new("Bad parameter: aws_secret_key must be an String") if params.dig(:aws_secret_key) and !params.dig(:aws_secret_key).is_a?(String)
549
+ raise InvalidParameterError.new("Bad parameter: password must be an String") if params.dig(:password) and !params.dig(:password).is_a?(String)
550
+ raise InvalidParameterError.new("Bad parameter: private_key must be an String") if params.dig(:private_key) and !params.dig(:private_key).is_a?(String)
551
+ raise InvalidParameterError.new("Bad parameter: google_cloud_storage_credentials_json must be an String") if params.dig(:google_cloud_storage_credentials_json) and !params.dig(:google_cloud_storage_credentials_json).is_a?(String)
552
+ raise InvalidParameterError.new("Bad parameter: wasabi_access_key must be an String") if params.dig(:wasabi_access_key) and !params.dig(:wasabi_access_key).is_a?(String)
553
+ raise InvalidParameterError.new("Bad parameter: wasabi_secret_key must be an String") if params.dig(:wasabi_secret_key) and !params.dig(:wasabi_secret_key).is_a?(String)
554
+ raise InvalidParameterError.new("Bad parameter: backblaze_b2_key_id must be an String") if params.dig(:backblaze_b2_key_id) and !params.dig(:backblaze_b2_key_id).is_a?(String)
555
+ raise InvalidParameterError.new("Bad parameter: backblaze_b2_application_key must be an String") if params.dig(:backblaze_b2_application_key) and !params.dig(:backblaze_b2_application_key).is_a?(String)
556
+ raise InvalidParameterError.new("Bad parameter: rackspace_api_key must be an String") if params.dig(:rackspace_api_key) and !params.dig(:rackspace_api_key).is_a?(String)
557
+ raise InvalidParameterError.new("Bad parameter: azure_blob_storage_access_key must be an String") if params.dig(:azure_blob_storage_access_key) and !params.dig(:azure_blob_storage_access_key).is_a?(String)
558
+ raise InvalidParameterError.new("Bad parameter: hostname must be an String") if params.dig(:hostname) and !params.dig(:hostname).is_a?(String)
559
+ raise InvalidParameterError.new("Bad parameter: name must be an String") if params.dig(:name) and !params.dig(:name).is_a?(String)
560
+ raise InvalidParameterError.new("Bad parameter: max_connections must be an Integer") if params.dig(:max_connections) and !params.dig(:max_connections).is_a?(Integer)
561
+ raise InvalidParameterError.new("Bad parameter: port must be an Integer") if params.dig(:port) and !params.dig(:port).is_a?(Integer)
562
+ raise InvalidParameterError.new("Bad parameter: s3_bucket must be an String") if params.dig(:s3_bucket) and !params.dig(:s3_bucket).is_a?(String)
563
+ raise InvalidParameterError.new("Bad parameter: s3_region must be an String") if params.dig(:s3_region) and !params.dig(:s3_region).is_a?(String)
564
+ raise InvalidParameterError.new("Bad parameter: server_certificate must be an String") if params.dig(:server_certificate) and !params.dig(:server_certificate).is_a?(String)
565
+ raise InvalidParameterError.new("Bad parameter: server_host_key must be an String") if params.dig(:server_host_key) and !params.dig(:server_host_key).is_a?(String)
566
+ raise InvalidParameterError.new("Bad parameter: server_type must be an String") if params.dig(:server_type) and !params.dig(:server_type).is_a?(String)
567
+ raise InvalidParameterError.new("Bad parameter: ssl must be an String") if params.dig(:ssl) and !params.dig(:ssl).is_a?(String)
568
+ raise InvalidParameterError.new("Bad parameter: username must be an String") if params.dig(:username) and !params.dig(:username).is_a?(String)
569
+ raise InvalidParameterError.new("Bad parameter: google_cloud_storage_bucket must be an String") if params.dig(:google_cloud_storage_bucket) and !params.dig(:google_cloud_storage_bucket).is_a?(String)
570
+ raise InvalidParameterError.new("Bad parameter: google_cloud_storage_project_id must be an String") if params.dig(:google_cloud_storage_project_id) and !params.dig(:google_cloud_storage_project_id).is_a?(String)
571
+ raise InvalidParameterError.new("Bad parameter: backblaze_b2_bucket must be an String") if params.dig(:backblaze_b2_bucket) and !params.dig(:backblaze_b2_bucket).is_a?(String)
572
+ raise InvalidParameterError.new("Bad parameter: backblaze_b2_s3_endpoint must be an String") if params.dig(:backblaze_b2_s3_endpoint) and !params.dig(:backblaze_b2_s3_endpoint).is_a?(String)
573
+ raise InvalidParameterError.new("Bad parameter: wasabi_bucket must be an String") if params.dig(:wasabi_bucket) and !params.dig(:wasabi_bucket).is_a?(String)
574
+ raise InvalidParameterError.new("Bad parameter: wasabi_region must be an String") if params.dig(:wasabi_region) and !params.dig(:wasabi_region).is_a?(String)
575
+ raise InvalidParameterError.new("Bad parameter: rackspace_username must be an String") if params.dig(:rackspace_username) and !params.dig(:rackspace_username).is_a?(String)
576
+ raise InvalidParameterError.new("Bad parameter: rackspace_region must be an String") if params.dig(:rackspace_region) and !params.dig(:rackspace_region).is_a?(String)
577
+ raise InvalidParameterError.new("Bad parameter: rackspace_container must be an String") if params.dig(:rackspace_container) and !params.dig(:rackspace_container).is_a?(String)
578
+ raise InvalidParameterError.new("Bad parameter: one_drive_account_type must be an String") if params.dig(:one_drive_account_type) and !params.dig(:one_drive_account_type).is_a?(String)
579
+ raise InvalidParameterError.new("Bad parameter: azure_blob_storage_account must be an String") if params.dig(:azure_blob_storage_account) and !params.dig(:azure_blob_storage_account).is_a?(String)
580
+ raise InvalidParameterError.new("Bad parameter: azure_blob_storage_container must be an String") if params.dig(:azure_blob_storage_container) and !params.dig(:azure_blob_storage_container).is_a?(String)
581
+
582
+ response, options = Api.send_request("/remote_servers", :post, params, options)
583
+ RemoteServer.new(response.data, options)
584
+ end
585
+
586
+ # Parameters:
587
+ # aws_access_key - string - AWS Access Key.
588
+ # aws_secret_key - string - AWS secret key.
589
+ # password - string - Password if needed.
590
+ # private_key - string - Private key if needed.
591
+ # google_cloud_storage_credentials_json - string - A JSON file that contains the private key. To generate see https://cloud.google.com/storage/docs/json_api/v1/how-tos/authorizing#APIKey
592
+ # wasabi_access_key - string - Wasabi access key.
593
+ # wasabi_secret_key - string - Wasabi secret key.
594
+ # backblaze_b2_key_id - string - Backblaze B2 Cloud Storage keyID.
595
+ # backblaze_b2_application_key - string - Backblaze B2 Cloud Storage applicationKey.
596
+ # rackspace_api_key - string - Rackspace API key from the Rackspace Cloud Control Panel.
597
+ # reset_authentication - boolean - Reset authenticated account
598
+ # azure_blob_storage_access_key - string - Azure Blob Storage secret key.
599
+ # hostname - string - Hostname or IP address
600
+ # name - string - Internal name for your reference
601
+ # max_connections - int64 - Max number of parallel connections. Ignored for S3 connections (we will parallelize these as much as possible).
602
+ # port - int64 - Port for remote server. Not needed for S3.
603
+ # s3_bucket - string - S3 bucket name
604
+ # s3_region - string - S3 region
605
+ # server_certificate - string - Remote server certificate
606
+ # server_host_key - string - Remote server SSH Host Key. If provided, we will require that the server host key matches the provided key. Uses OpenSSH format similar to what would go into ~/.ssh/known_hosts
607
+ # server_type - string - Remote server type.
608
+ # ssl - string - Should we require SSL?
609
+ # username - string - Remote server username. Not needed for S3 buckets.
610
+ # google_cloud_storage_bucket - string - Google Cloud Storage bucket name
611
+ # google_cloud_storage_project_id - string - Google Cloud Project ID
612
+ # backblaze_b2_bucket - string - Backblaze B2 Cloud Storage Bucket name
613
+ # backblaze_b2_s3_endpoint - string - Backblaze B2 Cloud Storage S3 Endpoint
614
+ # wasabi_bucket - string - Wasabi region
615
+ # wasabi_region - string - Wasabi Bucket name
616
+ # rackspace_username - string - Rackspace username used to login to the Rackspace Cloud Control Panel.
617
+ # rackspace_region - string - Three letter airport code for Rackspace region. See https://support.rackspace.com/how-to/about-regions/
618
+ # rackspace_container - string - The name of the container (top level directory) where files will sync.
619
+ # one_drive_account_type - string - Either personal or business_other account types
620
+ # azure_blob_storage_account - string - Azure Blob Storage Account name
621
+ # azure_blob_storage_container - string - Azure Blob Storage Container name
622
+ def self.update(id, params = {}, options = {})
623
+ params ||= {}
624
+ params[:id] = id
625
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
626
+ raise InvalidParameterError.new("Bad parameter: aws_access_key must be an String") if params.dig(:aws_access_key) and !params.dig(:aws_access_key).is_a?(String)
627
+ raise InvalidParameterError.new("Bad parameter: aws_secret_key must be an String") if params.dig(:aws_secret_key) and !params.dig(:aws_secret_key).is_a?(String)
628
+ raise InvalidParameterError.new("Bad parameter: password must be an String") if params.dig(:password) and !params.dig(:password).is_a?(String)
629
+ raise InvalidParameterError.new("Bad parameter: private_key must be an String") if params.dig(:private_key) and !params.dig(:private_key).is_a?(String)
630
+ raise InvalidParameterError.new("Bad parameter: google_cloud_storage_credentials_json must be an String") if params.dig(:google_cloud_storage_credentials_json) and !params.dig(:google_cloud_storage_credentials_json).is_a?(String)
631
+ raise InvalidParameterError.new("Bad parameter: wasabi_access_key must be an String") if params.dig(:wasabi_access_key) and !params.dig(:wasabi_access_key).is_a?(String)
632
+ raise InvalidParameterError.new("Bad parameter: wasabi_secret_key must be an String") if params.dig(:wasabi_secret_key) and !params.dig(:wasabi_secret_key).is_a?(String)
633
+ raise InvalidParameterError.new("Bad parameter: backblaze_b2_key_id must be an String") if params.dig(:backblaze_b2_key_id) and !params.dig(:backblaze_b2_key_id).is_a?(String)
634
+ raise InvalidParameterError.new("Bad parameter: backblaze_b2_application_key must be an String") if params.dig(:backblaze_b2_application_key) and !params.dig(:backblaze_b2_application_key).is_a?(String)
635
+ raise InvalidParameterError.new("Bad parameter: rackspace_api_key must be an String") if params.dig(:rackspace_api_key) and !params.dig(:rackspace_api_key).is_a?(String)
636
+ raise InvalidParameterError.new("Bad parameter: azure_blob_storage_access_key must be an String") if params.dig(:azure_blob_storage_access_key) and !params.dig(:azure_blob_storage_access_key).is_a?(String)
637
+ raise InvalidParameterError.new("Bad parameter: hostname must be an String") if params.dig(:hostname) and !params.dig(:hostname).is_a?(String)
638
+ raise InvalidParameterError.new("Bad parameter: name must be an String") if params.dig(:name) and !params.dig(:name).is_a?(String)
639
+ raise InvalidParameterError.new("Bad parameter: max_connections must be an Integer") if params.dig(:max_connections) and !params.dig(:max_connections).is_a?(Integer)
640
+ raise InvalidParameterError.new("Bad parameter: port must be an Integer") if params.dig(:port) and !params.dig(:port).is_a?(Integer)
641
+ raise InvalidParameterError.new("Bad parameter: s3_bucket must be an String") if params.dig(:s3_bucket) and !params.dig(:s3_bucket).is_a?(String)
642
+ raise InvalidParameterError.new("Bad parameter: s3_region must be an String") if params.dig(:s3_region) and !params.dig(:s3_region).is_a?(String)
643
+ raise InvalidParameterError.new("Bad parameter: server_certificate must be an String") if params.dig(:server_certificate) and !params.dig(:server_certificate).is_a?(String)
644
+ raise InvalidParameterError.new("Bad parameter: server_host_key must be an String") if params.dig(:server_host_key) and !params.dig(:server_host_key).is_a?(String)
645
+ raise InvalidParameterError.new("Bad parameter: server_type must be an String") if params.dig(:server_type) and !params.dig(:server_type).is_a?(String)
646
+ raise InvalidParameterError.new("Bad parameter: ssl must be an String") if params.dig(:ssl) and !params.dig(:ssl).is_a?(String)
647
+ raise InvalidParameterError.new("Bad parameter: username must be an String") if params.dig(:username) and !params.dig(:username).is_a?(String)
648
+ raise InvalidParameterError.new("Bad parameter: google_cloud_storage_bucket must be an String") if params.dig(:google_cloud_storage_bucket) and !params.dig(:google_cloud_storage_bucket).is_a?(String)
649
+ raise InvalidParameterError.new("Bad parameter: google_cloud_storage_project_id must be an String") if params.dig(:google_cloud_storage_project_id) and !params.dig(:google_cloud_storage_project_id).is_a?(String)
650
+ raise InvalidParameterError.new("Bad parameter: backblaze_b2_bucket must be an String") if params.dig(:backblaze_b2_bucket) and !params.dig(:backblaze_b2_bucket).is_a?(String)
651
+ raise InvalidParameterError.new("Bad parameter: backblaze_b2_s3_endpoint must be an String") if params.dig(:backblaze_b2_s3_endpoint) and !params.dig(:backblaze_b2_s3_endpoint).is_a?(String)
652
+ raise InvalidParameterError.new("Bad parameter: wasabi_bucket must be an String") if params.dig(:wasabi_bucket) and !params.dig(:wasabi_bucket).is_a?(String)
653
+ raise InvalidParameterError.new("Bad parameter: wasabi_region must be an String") if params.dig(:wasabi_region) and !params.dig(:wasabi_region).is_a?(String)
654
+ raise InvalidParameterError.new("Bad parameter: rackspace_username must be an String") if params.dig(:rackspace_username) and !params.dig(:rackspace_username).is_a?(String)
655
+ raise InvalidParameterError.new("Bad parameter: rackspace_region must be an String") if params.dig(:rackspace_region) and !params.dig(:rackspace_region).is_a?(String)
656
+ raise InvalidParameterError.new("Bad parameter: rackspace_container must be an String") if params.dig(:rackspace_container) and !params.dig(:rackspace_container).is_a?(String)
657
+ raise InvalidParameterError.new("Bad parameter: one_drive_account_type must be an String") if params.dig(:one_drive_account_type) and !params.dig(:one_drive_account_type).is_a?(String)
658
+ raise InvalidParameterError.new("Bad parameter: azure_blob_storage_account must be an String") if params.dig(:azure_blob_storage_account) and !params.dig(:azure_blob_storage_account).is_a?(String)
659
+ raise InvalidParameterError.new("Bad parameter: azure_blob_storage_container must be an String") if params.dig(:azure_blob_storage_container) and !params.dig(:azure_blob_storage_container).is_a?(String)
660
+ raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
661
+
662
+ response, options = Api.send_request("/remote_servers/#{params[:id]}", :patch, params, options)
663
+ RemoteServer.new(response.data, options)
664
+ end
665
+
666
+ def self.delete(id, params = {}, options = {})
667
+ params ||= {}
668
+ params[:id] = id
669
+ raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params.dig(:id) and !params.dig(:id).is_a?(Integer)
670
+ raise MissingParameterError.new("Parameter missing: id") unless params.dig(:id)
671
+
672
+ response, _options = Api.send_request("/remote_servers/#{params[:id]}", :delete, params, options)
673
+ response.data
674
+ end
675
+
676
+ def self.destroy(id, params = {}, options = {})
677
+ delete(id, params, options)
678
+ end
679
+ end
680
+ end