aws-sdk-glacier 1.0.0.rc1 → 1.0.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,524 +1,522 @@
1
1
  # WARNING ABOUT GENERATED CODE
2
2
  #
3
- # This file is generated. See the contributing for info on making contributions:
3
+ # This file is generated. See the contributing guide for more information:
4
4
  # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
5
5
  #
6
6
  # WARNING ABOUT GENERATED CODE
7
7
 
8
- module Aws
9
- module Glacier
10
- class Vault
11
-
12
- extend Aws::Deprecations
13
-
14
- # @overload def initialize(account_id, name, options = {})
15
- # @param [String] account_id
16
- # @param [String] name
17
- # @option options [Client] :client
18
- # @overload def initialize(options = {})
19
- # @option options [required, String] :account_id
20
- # @option options [required, String] :name
21
- # @option options [Client] :client
22
- def initialize(*args)
23
- options = Hash === args.last ? args.pop.dup : {}
24
- @account_id = extract_account_id(args, options)
25
- @name = extract_name(args, options)
26
- @data = options.delete(:data)
27
- @client = options.delete(:client) || Client.new(options)
28
- end
8
+ module Aws::Glacier
9
+ class Vault
10
+
11
+ extend Aws::Deprecations
12
+
13
+ # @overload def initialize(account_id, name, options = {})
14
+ # @param [String] account_id
15
+ # @param [String] name
16
+ # @option options [Client] :client
17
+ # @overload def initialize(options = {})
18
+ # @option options [required, String] :account_id
19
+ # @option options [required, String] :name
20
+ # @option options [Client] :client
21
+ def initialize(*args)
22
+ options = Hash === args.last ? args.pop.dup : {}
23
+ @account_id = extract_account_id(args, options)
24
+ @name = extract_name(args, options)
25
+ @data = options.delete(:data)
26
+ @client = options.delete(:client) || Client.new(options)
27
+ end
29
28
 
30
- # @!group Read-Only Attributes
29
+ # @!group Read-Only Attributes
31
30
 
32
- # @return [String]
33
- def account_id
34
- @account_id
35
- end
31
+ # @return [String]
32
+ def account_id
33
+ @account_id
34
+ end
36
35
 
37
- # @return [String]
38
- def name
39
- @name
40
- end
41
- alias :vault_name :name
36
+ # @return [String]
37
+ def name
38
+ @name
39
+ end
40
+ alias :vault_name :name
42
41
 
43
- # The Amazon Resource Name (ARN) of the vault.
44
- # @return [String]
45
- def vault_arn
46
- data.vault_arn
47
- end
42
+ # The Amazon Resource Name (ARN) of the vault.
43
+ # @return [String]
44
+ def vault_arn
45
+ data.vault_arn
46
+ end
48
47
 
49
- # The Universal Coordinated Time (UTC) date when the vault was created.
50
- # This value should be a string in the ISO 8601 date format, for example
51
- # `2012-03-20T17:03:43.221Z`.
52
- # @return [Time]
53
- def creation_date
54
- data.creation_date
55
- end
48
+ # The Universal Coordinated Time (UTC) date when the vault was created.
49
+ # This value should be a string in the ISO 8601 date format, for example
50
+ # `2012-03-20T17:03:43.221Z`.
51
+ # @return [Time]
52
+ def creation_date
53
+ data.creation_date
54
+ end
56
55
 
57
- # The Universal Coordinated Time (UTC) date when Amazon Glacier
58
- # completed the last vault inventory. This value should be a string in
59
- # the ISO 8601 date format, for example `2012-03-20T17:03:43.221Z`.
60
- # @return [Time]
61
- def last_inventory_date
62
- data.last_inventory_date
63
- end
56
+ # The Universal Coordinated Time (UTC) date when Amazon Glacier
57
+ # completed the last vault inventory. This value should be a string in
58
+ # the ISO 8601 date format, for example `2012-03-20T17:03:43.221Z`.
59
+ # @return [Time]
60
+ def last_inventory_date
61
+ data.last_inventory_date
62
+ end
64
63
 
65
- # The number of archives in the vault as of the last inventory date.
66
- # This field will return `null` if an inventory has not yet run on the
67
- # vault, for example if you just created the vault.
68
- # @return [Integer]
69
- def number_of_archives
70
- data.number_of_archives
71
- end
64
+ # The number of archives in the vault as of the last inventory date.
65
+ # This field will return `null` if an inventory has not yet run on the
66
+ # vault, for example if you just created the vault.
67
+ # @return [Integer]
68
+ def number_of_archives
69
+ data.number_of_archives
70
+ end
72
71
 
73
- # Total size, in bytes, of the archives in the vault as of the last
74
- # inventory date. This field will return null if an inventory has not
75
- # yet run on the vault, for example if you just created the vault.
76
- # @return [Integer]
77
- def size_in_bytes
78
- data.size_in_bytes
79
- end
72
+ # Total size, in bytes, of the archives in the vault as of the last
73
+ # inventory date. This field will return null if an inventory has not
74
+ # yet run on the vault, for example if you just created the vault.
75
+ # @return [Integer]
76
+ def size_in_bytes
77
+ data.size_in_bytes
78
+ end
80
79
 
81
- # @!endgroup
80
+ # @!endgroup
82
81
 
83
- # @return [Client]
84
- def client
85
- @client
86
- end
82
+ # @return [Client]
83
+ def client
84
+ @client
85
+ end
87
86
 
88
- # Loads, or reloads {#data} for the current {Vault}.
89
- # Returns `self` making it possible to chain methods.
90
- #
91
- # vault.reload.data
92
- #
93
- # @return [self]
94
- def load
95
- resp = @client.describe_vault(
96
- vault_name: @name,
97
- account_id: @account_id
98
- )
99
- @data = resp.data
100
- self
101
- end
102
- alias :reload :load
103
-
104
- # @return [Types::DescribeVaultOutput]
105
- # Returns the data for this {Vault}. Calls
106
- # {Client#describe_vault} if {#data_loaded?} is `false`.
107
- def data
108
- load unless @data
109
- @data
110
- end
87
+ # Loads, or reloads {#data} for the current {Vault}.
88
+ # Returns `self` making it possible to chain methods.
89
+ #
90
+ # vault.reload.data
91
+ #
92
+ # @return [self]
93
+ def load
94
+ resp = @client.describe_vault(
95
+ vault_name: @name,
96
+ account_id: @account_id
97
+ )
98
+ @data = resp.data
99
+ self
100
+ end
101
+ alias :reload :load
102
+
103
+ # @return [Types::DescribeVaultOutput]
104
+ # Returns the data for this {Vault}. Calls
105
+ # {Client#describe_vault} if {#data_loaded?} is `false`.
106
+ def data
107
+ load unless @data
108
+ @data
109
+ end
111
110
 
112
- # @return [Boolean]
113
- # Returns `true` if this resource is loaded. Accessing attributes or
114
- # {#data} on an unloaded resource will trigger a call to {#load}.
115
- def data_loaded?
116
- !!@data
117
- end
111
+ # @return [Boolean]
112
+ # Returns `true` if this resource is loaded. Accessing attributes or
113
+ # {#data} on an unloaded resource will trigger a call to {#load}.
114
+ def data_loaded?
115
+ !!@data
116
+ end
117
+
118
+ # @!group Actions
119
+
120
+ # @example Request syntax with placeholder values
121
+ #
122
+ # vault.create()
123
+ # @param [Hash] options ({})
124
+ # @return [Types::CreateVaultOutput]
125
+ def create(options = {})
126
+ options = options.merge(
127
+ vault_name: @name,
128
+ account_id: @account_id
129
+ )
130
+ resp = @client.create_vault(options)
131
+ resp.data
132
+ end
118
133
 
119
- # @!group Actions
134
+ # @example Request syntax with placeholder values
135
+ #
136
+ # vault.delete()
137
+ # @param [Hash] options ({})
138
+ # @return [EmptyStructure]
139
+ def delete(options = {})
140
+ options = options.merge(
141
+ vault_name: @name,
142
+ account_id: @account_id
143
+ )
144
+ resp = @client.delete_vault(options)
145
+ resp.data
146
+ end
120
147
 
121
- # @example Request syntax with placeholder values
122
- #
123
- # vault.create()
124
- # @param [Hash] options ({})
125
- # @return [Types::CreateVaultOutput]
126
- def create(options = {})
127
- options = options.merge(
128
- vault_name: @name,
129
- account_id: @account_id
130
- )
131
- resp = @client.create_vault(options)
132
- resp.data
133
- end
148
+ # @example Request syntax with placeholder values
149
+ #
150
+ # vault.initiate_inventory_retrieval()
151
+ # @param [Hash] options ({})
152
+ # @return [Job]
153
+ def initiate_inventory_retrieval(options = {})
154
+ options = Aws::Util.deep_merge(options,
155
+ vault_name: @name,
156
+ account_id: @account_id,
157
+ job_parameters: {
158
+ type: "inventory-retrieval"
159
+ }
160
+ )
161
+ resp = @client.initiate_job(options)
162
+ Job.new(
163
+ id: resp.data.job_id,
164
+ account_id: @account_id,
165
+ vault_name: @name,
166
+ client: @client
167
+ )
168
+ end
134
169
 
135
- # @example Request syntax with placeholder values
136
- #
137
- # vault.delete()
138
- # @param [Hash] options ({})
139
- # @return [EmptyStructure]
140
- def delete(options = {})
141
- options = options.merge(
142
- vault_name: @name,
143
- account_id: @account_id
144
- )
145
- resp = @client.delete_vault(options)
146
- resp.data
147
- end
170
+ # @example Request syntax with placeholder values
171
+ #
172
+ # multipartupload = vault.initiate_multipart_upload({
173
+ # archive_description: "string",
174
+ # part_size: 1,
175
+ # })
176
+ # @param [Hash] options ({})
177
+ # @option options [String] :archive_description
178
+ # The archive description that you are uploading in parts.
179
+ #
180
+ # The part size must be a megabyte (1024 KB) multiplied by a power of 2,
181
+ # for example 1048576 (1 MB), 2097152 (2 MB), 4194304 (4 MB), 8388608 (8
182
+ # MB), and so on. The minimum allowable part size is 1 MB, and the
183
+ # maximum is 4 GB (4096 MB).
184
+ # @option options [Integer] :part_size
185
+ # The size of each part except the last, in bytes. The last part can be
186
+ # smaller than this part size.
187
+ # @return [MultipartUpload]
188
+ def initiate_multipart_upload(options = {})
189
+ options = options.merge(
190
+ vault_name: @name,
191
+ account_id: @account_id
192
+ )
193
+ resp = @client.initiate_multipart_upload(options)
194
+ MultipartUpload.new(
195
+ id: resp.data.upload_id,
196
+ account_id: @account_id,
197
+ vault_name: @name,
198
+ client: @client
199
+ )
200
+ end
148
201
 
149
- # @example Request syntax with placeholder values
150
- #
151
- # job = vault.initiate_inventory_retrieval()
152
- # @param [Hash] options ({})
153
- # @return [Job]
154
- def initiate_inventory_retrieval(options = {})
155
- options = Aws::Util.deep_merge(options,
156
- vault_name: @name,
157
- account_id: @account_id,
158
- job_parameters: {
159
- type: "inventory-retrieval"
160
- }
161
- )
162
- resp = @client.initiate_job(options)
163
- Job.new(
164
- id: resp.data.job_id,
165
- account_id: @account_id,
166
- vault_name: @name,
167
- client: @client
168
- )
169
- end
202
+ # @example Request syntax with placeholder values
203
+ #
204
+ # archive = vault.upload_archive({
205
+ # archive_description: "string",
206
+ # checksum: "string",
207
+ # body: "data",
208
+ # })
209
+ # @param [Hash] options ({})
210
+ # @option options [String] :archive_description
211
+ # The optional description of the archive you are uploading.
212
+ # @option options [String] :checksum
213
+ # The SHA256 tree hash of the data being uploaded.
214
+ # @option options [String, IO] :body
215
+ # The data to upload.
216
+ # @return [Archive]
217
+ def upload_archive(options = {})
218
+ options = options.merge(
219
+ vault_name: @name,
220
+ account_id: @account_id
221
+ )
222
+ resp = @client.upload_archive(options)
223
+ Archive.new(
224
+ id: resp.data.archive_id,
225
+ account_id: @account_id,
226
+ vault_name: @name,
227
+ client: @client
228
+ )
229
+ end
230
+
231
+ # @!group Associations
232
+
233
+ # @return [Account]
234
+ def account
235
+ Account.new(
236
+ id: @account_id,
237
+ client: @client
238
+ )
239
+ end
240
+
241
+ # @param [String] id
242
+ # @return [Archive]
243
+ def archive(id)
244
+ Archive.new(
245
+ account_id: @account_id,
246
+ vault_name: @name,
247
+ id: id,
248
+ client: @client
249
+ )
250
+ end
170
251
 
171
- # @example Request syntax with placeholder values
172
- #
173
- # multipartupload = vault.initiate_multipart_upload({
174
- # archive_description: "string",
175
- # part_size: 1,
176
- # })
177
- # @param [Hash] options ({})
178
- # @option options [String] :archive_description
179
- # The archive description that you are uploading in parts.
180
- #
181
- # The part size must be a megabyte (1024 KB) multiplied by a power of 2,
182
- # for example 1048576 (1 MB), 2097152 (2 MB), 4194304 (4 MB), 8388608 (8
183
- # MB), and so on. The minimum allowable part size is 1 MB, and the
184
- # maximum is 4 GB (4096 MB).
185
- # @option options [Integer] :part_size
186
- # The size of each part except the last, in bytes. The last part can be
187
- # smaller than this part size.
188
- # @return [MultipartUpload]
189
- def initiate_multipart_upload(options = {})
252
+ # @example Request syntax with placeholder values
253
+ #
254
+ # completed_jobs = vault.completed_jobs({
255
+ # statuscode: "string",
256
+ # })
257
+ # @param [Hash] options ({})
258
+ # @option options [String] :statuscode
259
+ # The type of job status to return. You can specify the following
260
+ # values: `InProgress`, `Succeeded`, or `Failed`.
261
+ # @return [Job::Collection]
262
+ def completed_jobs(options = {})
263
+ batches = Enumerator.new do |y|
190
264
  options = options.merge(
191
- vault_name: @name,
192
- account_id: @account_id
193
- )
194
- resp = @client.initiate_multipart_upload(options)
195
- MultipartUpload.new(
196
- id: resp.data.upload_id,
197
265
  account_id: @account_id,
198
266
  vault_name: @name,
199
- client: @client
267
+ completed: "true"
200
268
  )
269
+ resp = @client.list_jobs(options)
270
+ resp.each_page do |page|
271
+ batch = []
272
+ page.data.job_list.each do |j|
273
+ batch << Job.new(
274
+ account_id: @account_id,
275
+ vault_name: @name,
276
+ id: j.job_id,
277
+ data: j,
278
+ client: @client
279
+ )
280
+ end
281
+ y.yield(batch)
282
+ end
201
283
  end
284
+ Job::Collection.new(batches)
285
+ end
202
286
 
203
- # @example Request syntax with placeholder values
204
- #
205
- # archive = vault.upload_archive({
206
- # archive_description: "string",
207
- # checksum: "string",
208
- # body: "data",
209
- # })
210
- # @param [Hash] options ({})
211
- # @option options [String] :archive_description
212
- # The optional description of the archive you are uploading.
213
- # @option options [String] :checksum
214
- # The SHA256 tree hash of the data being uploaded.
215
- # @option options [String, IO] :body
216
- # The data to upload.
217
- # @return [Archive]
218
- def upload_archive(options = {})
287
+ # @example Request syntax with placeholder values
288
+ #
289
+ # failed_jobs = vault.failed_jobs({
290
+ # completed: "string",
291
+ # })
292
+ # @param [Hash] options ({})
293
+ # @option options [String] :completed
294
+ # The state of the jobs to return. You can specify `true` or `false`.
295
+ # @return [Job::Collection]
296
+ def failed_jobs(options = {})
297
+ batches = Enumerator.new do |y|
219
298
  options = options.merge(
220
- vault_name: @name,
221
- account_id: @account_id
222
- )
223
- resp = @client.upload_archive(options)
224
- Archive.new(
225
- id: resp.data.archive_id,
226
299
  account_id: @account_id,
227
300
  vault_name: @name,
228
- client: @client
301
+ statuscode: "Failed"
229
302
  )
303
+ resp = @client.list_jobs(options)
304
+ resp.each_page do |page|
305
+ batch = []
306
+ page.data.job_list.each do |j|
307
+ batch << Job.new(
308
+ account_id: @account_id,
309
+ vault_name: @name,
310
+ id: j.job_id,
311
+ data: j,
312
+ client: @client
313
+ )
314
+ end
315
+ y.yield(batch)
316
+ end
230
317
  end
318
+ Job::Collection.new(batches)
319
+ end
231
320
 
232
- # @!group Associations
233
-
234
- # @return [Account]
235
- def account
236
- Account.new(
237
- id: @account_id,
238
- client: @client
239
- )
240
- end
321
+ # @param [String] id
322
+ # @return [Job]
323
+ def job(id)
324
+ Job.new(
325
+ account_id: @account_id,
326
+ vault_name: @name,
327
+ id: id,
328
+ client: @client
329
+ )
330
+ end
241
331
 
242
- # @param [String] id
243
- # @return [Archive]
244
- def archive(id)
245
- Archive.new(
332
+ # @example Request syntax with placeholder values
333
+ #
334
+ # jobs = vault.jobs({
335
+ # statuscode: "string",
336
+ # completed: "string",
337
+ # })
338
+ # @param [Hash] options ({})
339
+ # @option options [String] :statuscode
340
+ # The type of job status to return. You can specify the following
341
+ # values: `InProgress`, `Succeeded`, or `Failed`.
342
+ # @option options [String] :completed
343
+ # The state of the jobs to return. You can specify `true` or `false`.
344
+ # @return [Job::Collection]
345
+ def jobs(options = {})
346
+ batches = Enumerator.new do |y|
347
+ options = options.merge(
246
348
  account_id: @account_id,
247
- vault_name: @name,
248
- id: id,
249
- client: @client
349
+ vault_name: @name
250
350
  )
251
- end
252
-
253
- # @example Request syntax with placeholder values
254
- #
255
- # completedjobs = vault.completed_jobs({
256
- # statuscode: "string",
257
- # })
258
- # @param [Hash] options ({})
259
- # @option options [String] :statuscode
260
- # The type of job status to return. You can specify the following
261
- # values: `InProgress`, `Succeeded`, or `Failed`.
262
- # @return [Job::Collection]
263
- def completed_jobs(options = {})
264
- batches = Enumerator.new do |y|
265
- options = options.merge(
266
- account_id: @account_id,
267
- vault_name: @name,
268
- completed: "true"
269
- )
270
- resp = @client.list_jobs(options)
271
- resp.each_page do |page|
272
- batch = []
273
- page.data.job_list.each do |j|
274
- batch << Job.new(
275
- account_id: @account_id,
276
- vault_name: @name,
277
- id: j.job_id,
278
- data: j,
279
- client: @client
280
- )
281
- end
282
- y.yield(batch)
283
- end
284
- end
285
- Job::Collection.new(batches)
286
- end
287
-
288
- # @example Request syntax with placeholder values
289
- #
290
- # failedjobs = vault.failed_jobs({
291
- # completed: "string",
292
- # })
293
- # @param [Hash] options ({})
294
- # @option options [String] :completed
295
- # The state of the jobs to return. You can specify `true` or `false`.
296
- # @return [Job::Collection]
297
- def failed_jobs(options = {})
298
- batches = Enumerator.new do |y|
299
- options = options.merge(
300
- account_id: @account_id,
301
- vault_name: @name,
302
- statuscode: "Failed"
303
- )
304
- resp = @client.list_jobs(options)
305
- resp.each_page do |page|
306
- batch = []
307
- page.data.job_list.each do |j|
308
- batch << Job.new(
309
- account_id: @account_id,
310
- vault_name: @name,
311
- id: j.job_id,
312
- data: j,
313
- client: @client
314
- )
315
- end
316
- y.yield(batch)
351
+ resp = @client.list_jobs(options)
352
+ resp.each_page do |page|
353
+ batch = []
354
+ page.data.job_list.each do |j|
355
+ batch << Job.new(
356
+ account_id: @account_id,
357
+ vault_name: @name,
358
+ id: j.job_id,
359
+ data: j,
360
+ client: @client
361
+ )
317
362
  end
363
+ y.yield(batch)
318
364
  end
319
- Job::Collection.new(batches)
320
365
  end
366
+ Job::Collection.new(batches)
367
+ end
321
368
 
322
- # @param [String] id
323
- # @return [Job]
324
- def job(id)
325
- Job.new(
369
+ # @example Request syntax with placeholder values
370
+ #
371
+ # jobs_in_progress = vault.jobs_in_progress({
372
+ # completed: "string",
373
+ # })
374
+ # @param [Hash] options ({})
375
+ # @option options [String] :completed
376
+ # The state of the jobs to return. You can specify `true` or `false`.
377
+ # @return [Job::Collection]
378
+ def jobs_in_progress(options = {})
379
+ batches = Enumerator.new do |y|
380
+ options = options.merge(
326
381
  account_id: @account_id,
327
382
  vault_name: @name,
328
- id: id,
329
- client: @client
383
+ statuscode: "InProgress"
330
384
  )
331
- end
332
-
333
- # @example Request syntax with placeholder values
334
- #
335
- # jobs = vault.jobs({
336
- # statuscode: "string",
337
- # completed: "string",
338
- # })
339
- # @param [Hash] options ({})
340
- # @option options [String] :statuscode
341
- # The type of job status to return. You can specify the following
342
- # values: `InProgress`, `Succeeded`, or `Failed`.
343
- # @option options [String] :completed
344
- # The state of the jobs to return. You can specify `true` or `false`.
345
- # @return [Job::Collection]
346
- def jobs(options = {})
347
- batches = Enumerator.new do |y|
348
- options = options.merge(
349
- account_id: @account_id,
350
- vault_name: @name
351
- )
352
- resp = @client.list_jobs(options)
353
- resp.each_page do |page|
354
- batch = []
355
- page.data.job_list.each do |j|
356
- batch << Job.new(
357
- account_id: @account_id,
358
- vault_name: @name,
359
- id: j.job_id,
360
- data: j,
361
- client: @client
362
- )
363
- end
364
- y.yield(batch)
385
+ resp = @client.list_jobs(options)
386
+ resp.each_page do |page|
387
+ batch = []
388
+ page.data.job_list.each do |j|
389
+ batch << Job.new(
390
+ account_id: @account_id,
391
+ vault_name: @name,
392
+ id: j.job_id,
393
+ data: j,
394
+ client: @client
395
+ )
365
396
  end
397
+ y.yield(batch)
366
398
  end
367
- Job::Collection.new(batches)
368
399
  end
400
+ Job::Collection.new(batches)
401
+ end
369
402
 
370
- # @example Request syntax with placeholder values
371
- #
372
- # jobsinprogress = vault.jobs_in_progress({
373
- # completed: "string",
374
- # })
375
- # @param [Hash] options ({})
376
- # @option options [String] :completed
377
- # The state of the jobs to return. You can specify `true` or `false`.
378
- # @return [Job::Collection]
379
- def jobs_in_progress(options = {})
380
- batches = Enumerator.new do |y|
381
- options = options.merge(
382
- account_id: @account_id,
383
- vault_name: @name,
384
- statuscode: "InProgress"
385
- )
386
- resp = @client.list_jobs(options)
387
- resp.each_page do |page|
388
- batch = []
389
- page.data.job_list.each do |j|
390
- batch << Job.new(
391
- account_id: @account_id,
392
- vault_name: @name,
393
- id: j.job_id,
394
- data: j,
395
- client: @client
396
- )
397
- end
398
- y.yield(batch)
403
+ # @example Request syntax with placeholder values
404
+ #
405
+ # vault.multipart_uplaods()
406
+ # @param [Hash] options ({})
407
+ # @return [MultipartUpload::Collection]
408
+ def multipart_uplaods(options = {})
409
+ batches = Enumerator.new do |y|
410
+ options = options.merge(
411
+ vault_name: @name,
412
+ account_id: @account_id
413
+ )
414
+ resp = @client.list_multipart_uploads(options)
415
+ resp.each_page do |page|
416
+ batch = []
417
+ page.data.uploads_list.each do |u|
418
+ batch << MultipartUpload.new(
419
+ account_id: @account_id,
420
+ vault_name: @name,
421
+ id: u.multipart_upload_id,
422
+ data: u,
423
+ client: @client
424
+ )
399
425
  end
426
+ y.yield(batch)
400
427
  end
401
- Job::Collection.new(batches)
402
428
  end
429
+ MultipartUpload::Collection.new(batches)
430
+ end
403
431
 
404
- # @example Request syntax with placeholder values
405
- #
406
- # multipartuplaods = vault.multipart_uplaods()
407
- # @param [Hash] options ({})
408
- # @return [MultipartUpload::Collection]
409
- def multipart_uplaods(options = {})
410
- batches = Enumerator.new do |y|
411
- options = options.merge(
412
- vault_name: @name,
413
- account_id: @account_id
414
- )
415
- resp = @client.list_multipart_uploads(options)
416
- resp.each_page do |page|
417
- batch = []
418
- page.data.uploads_list.each do |u|
419
- batch << MultipartUpload.new(
420
- account_id: @account_id,
421
- vault_name: @name,
422
- id: u.multipart_upload_id,
423
- data: u,
424
- client: @client
425
- )
426
- end
427
- y.yield(batch)
428
- end
429
- end
430
- MultipartUpload::Collection.new(batches)
431
- end
432
+ # @param [String] id
433
+ # @return [MultipartUpload]
434
+ def multipart_upload(id)
435
+ MultipartUpload.new(
436
+ account_id: @account_id,
437
+ vault_name: @name,
438
+ id: id,
439
+ client: @client
440
+ )
441
+ end
432
442
 
433
- # @param [String] id
434
- # @return [MultipartUpload]
435
- def multipart_upload(id)
436
- MultipartUpload.new(
437
- account_id: @account_id,
438
- vault_name: @name,
439
- id: id,
440
- client: @client
441
- )
442
- end
443
+ # @return [Notification]
444
+ def notification
445
+ Notification.new(
446
+ account_id: @account_id,
447
+ vault_name: @name,
448
+ client: @client
449
+ )
450
+ end
443
451
 
444
- # @return [Notification]
445
- def notification
446
- Notification.new(
452
+ # @example Request syntax with placeholder values
453
+ #
454
+ # succeeded_jobs = vault.succeeded_jobs({
455
+ # completed: "string",
456
+ # })
457
+ # @param [Hash] options ({})
458
+ # @option options [String] :completed
459
+ # The state of the jobs to return. You can specify `true` or `false`.
460
+ # @return [Job::Collection]
461
+ def succeeded_jobs(options = {})
462
+ batches = Enumerator.new do |y|
463
+ options = options.merge(
447
464
  account_id: @account_id,
448
465
  vault_name: @name,
449
- client: @client
466
+ statuscode: "Succeeded"
450
467
  )
451
- end
452
-
453
- # @example Request syntax with placeholder values
454
- #
455
- # succeededjobs = vault.succeeded_jobs({
456
- # completed: "string",
457
- # })
458
- # @param [Hash] options ({})
459
- # @option options [String] :completed
460
- # The state of the jobs to return. You can specify `true` or `false`.
461
- # @return [Job::Collection]
462
- def succeeded_jobs(options = {})
463
- batches = Enumerator.new do |y|
464
- options = options.merge(
465
- account_id: @account_id,
466
- vault_name: @name,
467
- statuscode: "Succeeded"
468
- )
469
- resp = @client.list_jobs(options)
470
- resp.each_page do |page|
471
- batch = []
472
- page.data.job_list.each do |j|
473
- batch << Job.new(
474
- account_id: @account_id,
475
- vault_name: @name,
476
- id: j.job_id,
477
- data: j,
478
- client: @client
479
- )
480
- end
481
- y.yield(batch)
468
+ resp = @client.list_jobs(options)
469
+ resp.each_page do |page|
470
+ batch = []
471
+ page.data.job_list.each do |j|
472
+ batch << Job.new(
473
+ account_id: @account_id,
474
+ vault_name: @name,
475
+ id: j.job_id,
476
+ data: j,
477
+ client: @client
478
+ )
482
479
  end
480
+ y.yield(batch)
483
481
  end
484
- Job::Collection.new(batches)
485
482
  end
483
+ Job::Collection.new(batches)
484
+ end
486
485
 
487
- # @deprecated
488
- # @api private
489
- def identifiers
490
- {
491
- account_id: @account_id,
492
- name: @name
493
- }
494
- end
495
- deprecated(:identifiers)
496
-
497
- private
498
-
499
- def extract_account_id(args, options)
500
- value = args[0] || options.delete(:account_id)
501
- case value
502
- when String then value
503
- when nil then raise ArgumentError, "missing required option :account_id"
504
- else
505
- msg = "expected :account_id to be a String, got #{value.class}"
506
- raise ArgumentError, msg
507
- end
486
+ # @deprecated
487
+ # @api private
488
+ def identifiers
489
+ {
490
+ account_id: @account_id,
491
+ name: @name
492
+ }
493
+ end
494
+ deprecated(:identifiers)
495
+
496
+ private
497
+
498
+ def extract_account_id(args, options)
499
+ value = args[0] || options.delete(:account_id)
500
+ case value
501
+ when String then value
502
+ when nil then raise ArgumentError, "missing required option :account_id"
503
+ else
504
+ msg = "expected :account_id to be a String, got #{value.class}"
505
+ raise ArgumentError, msg
508
506
  end
507
+ end
509
508
 
510
- def extract_name(args, options)
511
- value = args[1] || options.delete(:name)
512
- case value
513
- when String then value
514
- when nil then raise ArgumentError, "missing required option :name"
515
- else
516
- msg = "expected :name to be a String, got #{value.class}"
517
- raise ArgumentError, msg
518
- end
509
+ def extract_name(args, options)
510
+ value = args[1] || options.delete(:name)
511
+ case value
512
+ when String then value
513
+ when nil then raise ArgumentError, "missing required option :name"
514
+ else
515
+ msg = "expected :name to be a String, got #{value.class}"
516
+ raise ArgumentError, msg
519
517
  end
520
-
521
- class Collection < Aws::Resources::Collection; end
522
518
  end
519
+
520
+ class Collection < Aws::Resources::Collection; end
523
521
  end
524
522
  end