azure_mgmt_scheduler 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +13 -5
  2. data/azure_mgmt_scheduler.gemspec +2 -2
  3. data/lib/azure_mgmt_scheduler.rb +1 -1
  4. data/lib/azure_mgmt_scheduler/job_collections.rb +437 -56
  5. data/lib/azure_mgmt_scheduler/jobs.rb +359 -48
  6. data/lib/azure_mgmt_scheduler/models/basic_authentication.rb +1 -1
  7. data/lib/azure_mgmt_scheduler/models/client_cert_authentication.rb +1 -1
  8. data/lib/azure_mgmt_scheduler/models/day_of_week.rb +1 -1
  9. data/lib/azure_mgmt_scheduler/models/http_authentication.rb +1 -1
  10. data/lib/azure_mgmt_scheduler/models/http_authentication_type.rb +1 -1
  11. data/lib/azure_mgmt_scheduler/models/http_request.rb +1 -1
  12. data/lib/azure_mgmt_scheduler/models/job_action.rb +1 -1
  13. data/lib/azure_mgmt_scheduler/models/job_action_type.rb +1 -1
  14. data/lib/azure_mgmt_scheduler/models/job_collection_definition.rb +1 -1
  15. data/lib/azure_mgmt_scheduler/models/job_collection_list_result.rb +1 -1
  16. data/lib/azure_mgmt_scheduler/models/job_collection_properties.rb +1 -1
  17. data/lib/azure_mgmt_scheduler/models/job_collection_quota.rb +1 -1
  18. data/lib/azure_mgmt_scheduler/models/job_collection_state.rb +1 -1
  19. data/lib/azure_mgmt_scheduler/models/job_definition.rb +1 -1
  20. data/lib/azure_mgmt_scheduler/models/job_error_action.rb +1 -1
  21. data/lib/azure_mgmt_scheduler/models/job_execution_status.rb +1 -1
  22. data/lib/azure_mgmt_scheduler/models/job_history_action_name.rb +1 -1
  23. data/lib/azure_mgmt_scheduler/models/job_history_definition.rb +1 -1
  24. data/lib/azure_mgmt_scheduler/models/job_history_definition_properties.rb +1 -1
  25. data/lib/azure_mgmt_scheduler/models/job_history_filter.rb +1 -1
  26. data/lib/azure_mgmt_scheduler/models/job_history_list_result.rb +1 -1
  27. data/lib/azure_mgmt_scheduler/models/job_list_result.rb +1 -1
  28. data/lib/azure_mgmt_scheduler/models/job_max_recurrence.rb +1 -1
  29. data/lib/azure_mgmt_scheduler/models/job_properties.rb +1 -1
  30. data/lib/azure_mgmt_scheduler/models/job_recurrence.rb +1 -1
  31. data/lib/azure_mgmt_scheduler/models/job_recurrence_schedule.rb +1 -1
  32. data/lib/azure_mgmt_scheduler/models/job_recurrence_schedule_monthly_occurrence.rb +1 -1
  33. data/lib/azure_mgmt_scheduler/models/job_schedule_day.rb +1 -1
  34. data/lib/azure_mgmt_scheduler/models/job_state.rb +1 -1
  35. data/lib/azure_mgmt_scheduler/models/job_state_filter.rb +1 -1
  36. data/lib/azure_mgmt_scheduler/models/job_status.rb +1 -1
  37. data/lib/azure_mgmt_scheduler/models/oauth_authentication.rb +1 -1
  38. data/lib/azure_mgmt_scheduler/models/recurrence_frequency.rb +1 -1
  39. data/lib/azure_mgmt_scheduler/models/retry_policy.rb +1 -1
  40. data/lib/azure_mgmt_scheduler/models/retry_type.rb +1 -1
  41. data/lib/azure_mgmt_scheduler/models/service_bus_authentication.rb +1 -1
  42. data/lib/azure_mgmt_scheduler/models/service_bus_authentication_type.rb +1 -1
  43. data/lib/azure_mgmt_scheduler/models/service_bus_brokered_message_properties.rb +1 -1
  44. data/lib/azure_mgmt_scheduler/models/service_bus_message.rb +1 -1
  45. data/lib/azure_mgmt_scheduler/models/service_bus_queue_message.rb +1 -1
  46. data/lib/azure_mgmt_scheduler/models/service_bus_topic_message.rb +1 -1
  47. data/lib/azure_mgmt_scheduler/models/service_bus_transport_type.rb +1 -1
  48. data/lib/azure_mgmt_scheduler/models/sku.rb +2 -2
  49. data/lib/azure_mgmt_scheduler/models/sku_definition.rb +3 -2
  50. data/lib/azure_mgmt_scheduler/models/storage_queue_message.rb +1 -1
  51. data/lib/azure_mgmt_scheduler/module_definition.rb +1 -1
  52. data/lib/azure_mgmt_scheduler/scheduler_management_client.rb +2 -2
  53. data/lib/azure_mgmt_scheduler/version.rb +2 -2
  54. metadata +31 -24
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
@@ -28,13 +28,43 @@ module Azure::ARM::Scheduler
28
28
  # @param resource_group_name [String] The resource group name.
29
29
  # @param job_collection_name [String] The job collection name.
30
30
  # @param job_name [String] The job name.
31
- # @param [Hash{String => String}] The hash of custom headers need to be
32
- # applied to HTTP request.
31
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
32
+ # will be added to the HTTP request.
33
33
  #
34
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
35
- # response.
34
+ # @return [JobDefinition] operation results.
36
35
  #
37
36
  def get(resource_group_name, job_collection_name, job_name, custom_headers = nil)
37
+ response = get_async(resource_group_name, job_collection_name, job_name, custom_headers).value!
38
+ response.body unless response.nil?
39
+ end
40
+
41
+ #
42
+ # Gets a job.
43
+ #
44
+ # @param resource_group_name [String] The resource group name.
45
+ # @param job_collection_name [String] The job collection name.
46
+ # @param job_name [String] The job name.
47
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
48
+ # will be added to the HTTP request.
49
+ #
50
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
51
+ #
52
+ def get_with_http_info(resource_group_name, job_collection_name, job_name, custom_headers = nil)
53
+ get_async(resource_group_name, job_collection_name, job_name, custom_headers).value!
54
+ end
55
+
56
+ #
57
+ # Gets a job.
58
+ #
59
+ # @param resource_group_name [String] The resource group name.
60
+ # @param job_collection_name [String] The job collection name.
61
+ # @param job_name [String] The job name.
62
+ # @param [Hash{String => String}] A hash of custom headers that will be added
63
+ # to the HTTP request.
64
+ #
65
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
66
+ #
67
+ def get_async(resource_group_name, job_collection_name, job_name, custom_headers = nil)
38
68
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
39
69
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
40
70
  fail ArgumentError, 'job_collection_name is nil' if job_collection_name.nil?
@@ -52,7 +82,10 @@ module Azure::ARM::Scheduler
52
82
  query_params: {'api-version' => @client.api_version},
53
83
  headers: request_headers.merge(custom_headers || {})
54
84
  }
55
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
85
+
86
+ request_url = @base_url || @client.base_url
87
+
88
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
56
89
  promise = request.run_promise do |req|
57
90
  @client.credentials.sign_request(req) unless @client.credentials.nil?
58
91
  end
@@ -94,13 +127,45 @@ module Azure::ARM::Scheduler
94
127
  # @param job_collection_name [String] The job collection name.
95
128
  # @param job_name [String] The job name.
96
129
  # @param job [JobDefinition] The job definition.
97
- # @param [Hash{String => String}] The hash of custom headers need to be
98
- # applied to HTTP request.
130
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
131
+ # will be added to the HTTP request.
99
132
  #
100
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
101
- # response.
133
+ # @return [JobDefinition] operation results.
102
134
  #
103
135
  def create_or_update(resource_group_name, job_collection_name, job_name, job, custom_headers = nil)
136
+ response = create_or_update_async(resource_group_name, job_collection_name, job_name, job, custom_headers).value!
137
+ response.body unless response.nil?
138
+ end
139
+
140
+ #
141
+ # Provisions a new job or updates an existing job.
142
+ #
143
+ # @param resource_group_name [String] The resource group name.
144
+ # @param job_collection_name [String] The job collection name.
145
+ # @param job_name [String] The job name.
146
+ # @param job [JobDefinition] The job definition.
147
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
148
+ # will be added to the HTTP request.
149
+ #
150
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
151
+ #
152
+ def create_or_update_with_http_info(resource_group_name, job_collection_name, job_name, job, custom_headers = nil)
153
+ create_or_update_async(resource_group_name, job_collection_name, job_name, job, custom_headers).value!
154
+ end
155
+
156
+ #
157
+ # Provisions a new job or updates an existing job.
158
+ #
159
+ # @param resource_group_name [String] The resource group name.
160
+ # @param job_collection_name [String] The job collection name.
161
+ # @param job_name [String] The job name.
162
+ # @param job [JobDefinition] The job definition.
163
+ # @param [Hash{String => String}] A hash of custom headers that will be added
164
+ # to the HTTP request.
165
+ #
166
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
167
+ #
168
+ def create_or_update_async(resource_group_name, job_collection_name, job_name, job, custom_headers = nil)
104
169
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
105
170
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
106
171
  fail ArgumentError, 'job_collection_name is nil' if job_collection_name.nil?
@@ -119,7 +184,7 @@ module Azure::ARM::Scheduler
119
184
  unless job.nil?
120
185
  job = JobDefinition.serialize_object(job)
121
186
  end
122
- request_content = JSON.generate(job, quirks_mode: true)
187
+ request_content = job != nil ? JSON.generate(job, quirks_mode: true) : nil
123
188
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs/{jobName}'
124
189
  options = {
125
190
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
@@ -128,7 +193,10 @@ module Azure::ARM::Scheduler
128
193
  body: request_content,
129
194
  headers: request_headers.merge(custom_headers || {})
130
195
  }
131
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :put, options)
196
+
197
+ request_url = @base_url || @client.base_url
198
+
199
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
132
200
  promise = request.run_promise do |req|
133
201
  @client.credentials.sign_request(req) unless @client.credentials.nil?
134
202
  end
@@ -182,13 +250,45 @@ module Azure::ARM::Scheduler
182
250
  # @param job_collection_name [String] The job collection name.
183
251
  # @param job_name [String] The job name.
184
252
  # @param job [JobDefinition] The job definition.
185
- # @param [Hash{String => String}] The hash of custom headers need to be
186
- # applied to HTTP request.
253
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
254
+ # will be added to the HTTP request.
187
255
  #
188
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
189
- # response.
256
+ # @return [JobDefinition] operation results.
190
257
  #
191
258
  def patch(resource_group_name, job_collection_name, job_name, job, custom_headers = nil)
259
+ response = patch_async(resource_group_name, job_collection_name, job_name, job, custom_headers).value!
260
+ response.body unless response.nil?
261
+ end
262
+
263
+ #
264
+ # Patches an existing job.
265
+ #
266
+ # @param resource_group_name [String] The resource group name.
267
+ # @param job_collection_name [String] The job collection name.
268
+ # @param job_name [String] The job name.
269
+ # @param job [JobDefinition] The job definition.
270
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
271
+ # will be added to the HTTP request.
272
+ #
273
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
274
+ #
275
+ def patch_with_http_info(resource_group_name, job_collection_name, job_name, job, custom_headers = nil)
276
+ patch_async(resource_group_name, job_collection_name, job_name, job, custom_headers).value!
277
+ end
278
+
279
+ #
280
+ # Patches an existing job.
281
+ #
282
+ # @param resource_group_name [String] The resource group name.
283
+ # @param job_collection_name [String] The job collection name.
284
+ # @param job_name [String] The job name.
285
+ # @param job [JobDefinition] The job definition.
286
+ # @param [Hash{String => String}] A hash of custom headers that will be added
287
+ # to the HTTP request.
288
+ #
289
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
290
+ #
291
+ def patch_async(resource_group_name, job_collection_name, job_name, job, custom_headers = nil)
192
292
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
193
293
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
194
294
  fail ArgumentError, 'job_collection_name is nil' if job_collection_name.nil?
@@ -207,7 +307,7 @@ module Azure::ARM::Scheduler
207
307
  unless job.nil?
208
308
  job = JobDefinition.serialize_object(job)
209
309
  end
210
- request_content = JSON.generate(job, quirks_mode: true)
310
+ request_content = job != nil ? JSON.generate(job, quirks_mode: true) : nil
211
311
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs/{jobName}'
212
312
  options = {
213
313
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
@@ -216,7 +316,10 @@ module Azure::ARM::Scheduler
216
316
  body: request_content,
217
317
  headers: request_headers.merge(custom_headers || {})
218
318
  }
219
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :patch, options)
319
+
320
+ request_url = @base_url || @client.base_url
321
+
322
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :patch, options)
220
323
  promise = request.run_promise do |req|
221
324
  @client.credentials.sign_request(req) unless @client.credentials.nil?
222
325
  end
@@ -257,13 +360,42 @@ module Azure::ARM::Scheduler
257
360
  # @param resource_group_name [String] The resource group name.
258
361
  # @param job_collection_name [String] The job collection name.
259
362
  # @param job_name [String] The job name.
260
- # @param [Hash{String => String}] The hash of custom headers need to be
261
- # applied to HTTP request.
363
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
364
+ # will be added to the HTTP request.
262
365
  #
263
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
264
- # response.
265
366
  #
266
367
  def delete(resource_group_name, job_collection_name, job_name, custom_headers = nil)
368
+ response = delete_async(resource_group_name, job_collection_name, job_name, custom_headers).value!
369
+ nil
370
+ end
371
+
372
+ #
373
+ # Deletes a job.
374
+ #
375
+ # @param resource_group_name [String] The resource group name.
376
+ # @param job_collection_name [String] The job collection name.
377
+ # @param job_name [String] The job name.
378
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
379
+ # will be added to the HTTP request.
380
+ #
381
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
382
+ #
383
+ def delete_with_http_info(resource_group_name, job_collection_name, job_name, custom_headers = nil)
384
+ delete_async(resource_group_name, job_collection_name, job_name, custom_headers).value!
385
+ end
386
+
387
+ #
388
+ # Deletes a job.
389
+ #
390
+ # @param resource_group_name [String] The resource group name.
391
+ # @param job_collection_name [String] The job collection name.
392
+ # @param job_name [String] The job name.
393
+ # @param [Hash{String => String}] A hash of custom headers that will be added
394
+ # to the HTTP request.
395
+ #
396
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
397
+ #
398
+ def delete_async(resource_group_name, job_collection_name, job_name, custom_headers = nil)
267
399
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
268
400
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
269
401
  fail ArgumentError, 'job_collection_name is nil' if job_collection_name.nil?
@@ -281,7 +413,10 @@ module Azure::ARM::Scheduler
281
413
  query_params: {'api-version' => @client.api_version},
282
414
  headers: request_headers.merge(custom_headers || {})
283
415
  }
284
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :delete, options)
416
+
417
+ request_url = @base_url || @client.base_url
418
+
419
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :delete, options)
285
420
  promise = request.run_promise do |req|
286
421
  @client.credentials.sign_request(req) unless @client.credentials.nil?
287
422
  end
@@ -310,13 +445,42 @@ module Azure::ARM::Scheduler
310
445
  # @param resource_group_name [String] The resource group name.
311
446
  # @param job_collection_name [String] The job collection name.
312
447
  # @param job_name [String] The job name.
313
- # @param [Hash{String => String}] The hash of custom headers need to be
314
- # applied to HTTP request.
448
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
449
+ # will be added to the HTTP request.
315
450
  #
316
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
317
- # response.
318
451
  #
319
452
  def run(resource_group_name, job_collection_name, job_name, custom_headers = nil)
453
+ response = run_async(resource_group_name, job_collection_name, job_name, custom_headers).value!
454
+ nil
455
+ end
456
+
457
+ #
458
+ # Runs a job.
459
+ #
460
+ # @param resource_group_name [String] The resource group name.
461
+ # @param job_collection_name [String] The job collection name.
462
+ # @param job_name [String] The job name.
463
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
464
+ # will be added to the HTTP request.
465
+ #
466
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
467
+ #
468
+ def run_with_http_info(resource_group_name, job_collection_name, job_name, custom_headers = nil)
469
+ run_async(resource_group_name, job_collection_name, job_name, custom_headers).value!
470
+ end
471
+
472
+ #
473
+ # Runs a job.
474
+ #
475
+ # @param resource_group_name [String] The resource group name.
476
+ # @param job_collection_name [String] The job collection name.
477
+ # @param job_name [String] The job name.
478
+ # @param [Hash{String => String}] A hash of custom headers that will be added
479
+ # to the HTTP request.
480
+ #
481
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
482
+ #
483
+ def run_async(resource_group_name, job_collection_name, job_name, custom_headers = nil)
320
484
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
321
485
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
322
486
  fail ArgumentError, 'job_collection_name is nil' if job_collection_name.nil?
@@ -334,7 +498,10 @@ module Azure::ARM::Scheduler
334
498
  query_params: {'api-version' => @client.api_version},
335
499
  headers: request_headers.merge(custom_headers || {})
336
500
  }
337
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :post, options)
501
+
502
+ request_url = @base_url || @client.base_url
503
+
504
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
338
505
  promise = request.run_promise do |req|
339
506
  @client.credentials.sign_request(req) unless @client.credentials.nil?
340
507
  end
@@ -366,13 +533,49 @@ module Azure::ARM::Scheduler
366
533
  # @param skip [Integer] The (0-based) index of the job history list from which
367
534
  # to begin requesting entries.
368
535
  # @param filter [String] The filter to apply on the job state.
369
- # @param [Hash{String => String}] The hash of custom headers need to be
370
- # applied to HTTP request.
536
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
537
+ # will be added to the HTTP request.
371
538
  #
372
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
373
- # response.
539
+ # @return [JobListResult] operation results.
374
540
  #
375
541
  def list(resource_group_name, job_collection_name, top = nil, skip = nil, filter = nil, custom_headers = nil)
542
+ response = list_async(resource_group_name, job_collection_name, top, skip, filter, custom_headers).value!
543
+ response.body unless response.nil?
544
+ end
545
+
546
+ #
547
+ # Lists all jobs under the specified job collection.
548
+ #
549
+ # @param resource_group_name [String] The resource group name.
550
+ # @param job_collection_name [String] The job collection name.
551
+ # @param top [Integer] The number of jobs to request, in the of range [1..100].
552
+ # @param skip [Integer] The (0-based) index of the job history list from which
553
+ # to begin requesting entries.
554
+ # @param filter [String] The filter to apply on the job state.
555
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
556
+ # will be added to the HTTP request.
557
+ #
558
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
559
+ #
560
+ def list_with_http_info(resource_group_name, job_collection_name, top = nil, skip = nil, filter = nil, custom_headers = nil)
561
+ list_async(resource_group_name, job_collection_name, top, skip, filter, custom_headers).value!
562
+ end
563
+
564
+ #
565
+ # Lists all jobs under the specified job collection.
566
+ #
567
+ # @param resource_group_name [String] The resource group name.
568
+ # @param job_collection_name [String] The job collection name.
569
+ # @param top [Integer] The number of jobs to request, in the of range [1..100].
570
+ # @param skip [Integer] The (0-based) index of the job history list from which
571
+ # to begin requesting entries.
572
+ # @param filter [String] The filter to apply on the job state.
573
+ # @param [Hash{String => String}] A hash of custom headers that will be added
574
+ # to the HTTP request.
575
+ #
576
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
577
+ #
578
+ def list_async(resource_group_name, job_collection_name, top = nil, skip = nil, filter = nil, custom_headers = nil)
376
579
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
377
580
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
378
581
  fail ArgumentError, 'job_collection_name is nil' if job_collection_name.nil?
@@ -389,7 +592,10 @@ module Azure::ARM::Scheduler
389
592
  query_params: {'api-version' => @client.api_version,'$top' => top,'$skip' => skip,'$filter' => filter},
390
593
  headers: request_headers.merge(custom_headers || {})
391
594
  }
392
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
595
+
596
+ request_url = @base_url || @client.base_url
597
+
598
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
393
599
  promise = request.run_promise do |req|
394
600
  @client.credentials.sign_request(req) unless @client.credentials.nil?
395
601
  end
@@ -435,13 +641,53 @@ module Azure::ARM::Scheduler
435
641
  # @param skip [Integer] The (0-based) index of the job history list from which
436
642
  # to begin requesting entries.
437
643
  # @param filter [String] The filter to apply on the job state.
438
- # @param [Hash{String => String}] The hash of custom headers need to be
439
- # applied to HTTP request.
644
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
645
+ # will be added to the HTTP request.
440
646
  #
441
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
442
- # response.
647
+ # @return [JobHistoryListResult] operation results.
443
648
  #
444
649
  def list_job_history(resource_group_name, job_collection_name, job_name, top = nil, skip = nil, filter = nil, custom_headers = nil)
650
+ response = list_job_history_async(resource_group_name, job_collection_name, job_name, top, skip, filter, custom_headers).value!
651
+ response.body unless response.nil?
652
+ end
653
+
654
+ #
655
+ # Lists job history.
656
+ #
657
+ # @param resource_group_name [String] The resource group name.
658
+ # @param job_collection_name [String] The job collection name.
659
+ # @param job_name [String] The job name.
660
+ # @param top [Integer] the number of job history to request, in the of range
661
+ # [1..100].
662
+ # @param skip [Integer] The (0-based) index of the job history list from which
663
+ # to begin requesting entries.
664
+ # @param filter [String] The filter to apply on the job state.
665
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
666
+ # will be added to the HTTP request.
667
+ #
668
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
669
+ #
670
+ def list_job_history_with_http_info(resource_group_name, job_collection_name, job_name, top = nil, skip = nil, filter = nil, custom_headers = nil)
671
+ list_job_history_async(resource_group_name, job_collection_name, job_name, top, skip, filter, custom_headers).value!
672
+ end
673
+
674
+ #
675
+ # Lists job history.
676
+ #
677
+ # @param resource_group_name [String] The resource group name.
678
+ # @param job_collection_name [String] The job collection name.
679
+ # @param job_name [String] The job name.
680
+ # @param top [Integer] the number of job history to request, in the of range
681
+ # [1..100].
682
+ # @param skip [Integer] The (0-based) index of the job history list from which
683
+ # to begin requesting entries.
684
+ # @param filter [String] The filter to apply on the job state.
685
+ # @param [Hash{String => String}] A hash of custom headers that will be added
686
+ # to the HTTP request.
687
+ #
688
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
689
+ #
690
+ def list_job_history_async(resource_group_name, job_collection_name, job_name, top = nil, skip = nil, filter = nil, custom_headers = nil)
445
691
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
446
692
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
447
693
  fail ArgumentError, 'job_collection_name is nil' if job_collection_name.nil?
@@ -459,7 +705,10 @@ module Azure::ARM::Scheduler
459
705
  query_params: {'api-version' => @client.api_version,'$top' => top,'$skip' => skip,'$filter' => filter},
460
706
  headers: request_headers.merge(custom_headers || {})
461
707
  }
462
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
708
+
709
+ request_url = @base_url || @client.base_url
710
+
711
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
463
712
  promise = request.run_promise do |req|
464
713
  @client.credentials.sign_request(req) unless @client.credentials.nil?
465
714
  end
@@ -499,13 +748,41 @@ module Azure::ARM::Scheduler
499
748
  #
500
749
  # @param next_page_link [String] The NextLink from the previous successful
501
750
  # call to List operation.
502
- # @param [Hash{String => String}] The hash of custom headers need to be
503
- # applied to HTTP request.
751
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
752
+ # will be added to the HTTP request.
504
753
  #
505
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
506
- # response.
754
+ # @return [JobListResult] operation results.
507
755
  #
508
756
  def list_next(next_page_link, custom_headers = nil)
757
+ response = list_next_async(next_page_link, custom_headers).value!
758
+ response.body unless response.nil?
759
+ end
760
+
761
+ #
762
+ # Lists all jobs under the specified job collection.
763
+ #
764
+ # @param next_page_link [String] The NextLink from the previous successful
765
+ # call to List operation.
766
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
767
+ # will be added to the HTTP request.
768
+ #
769
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
770
+ #
771
+ def list_next_with_http_info(next_page_link, custom_headers = nil)
772
+ list_next_async(next_page_link, custom_headers).value!
773
+ end
774
+
775
+ #
776
+ # Lists all jobs under the specified job collection.
777
+ #
778
+ # @param next_page_link [String] The NextLink from the previous successful
779
+ # call to List operation.
780
+ # @param [Hash{String => String}] A hash of custom headers that will be added
781
+ # to the HTTP request.
782
+ #
783
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
784
+ #
785
+ def list_next_async(next_page_link, custom_headers = nil)
509
786
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
510
787
  request_headers = {}
511
788
 
@@ -518,7 +795,10 @@ module Azure::ARM::Scheduler
518
795
  skip_encoding_path_params: {'nextLink' => next_page_link},
519
796
  headers: request_headers.merge(custom_headers || {})
520
797
  }
521
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
798
+
799
+ request_url = @base_url || @client.base_url
800
+
801
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
522
802
  promise = request.run_promise do |req|
523
803
  @client.credentials.sign_request(req) unless @client.credentials.nil?
524
804
  end
@@ -558,13 +838,41 @@ module Azure::ARM::Scheduler
558
838
  #
559
839
  # @param next_page_link [String] The NextLink from the previous successful
560
840
  # call to List operation.
561
- # @param [Hash{String => String}] The hash of custom headers need to be
562
- # applied to HTTP request.
841
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
842
+ # will be added to the HTTP request.
563
843
  #
564
- # @return [Concurrent::Promise] Promise object which allows to get HTTP
565
- # response.
844
+ # @return [JobHistoryListResult] operation results.
566
845
  #
567
846
  def list_job_history_next(next_page_link, custom_headers = nil)
847
+ response = list_job_history_next_async(next_page_link, custom_headers).value!
848
+ response.body unless response.nil?
849
+ end
850
+
851
+ #
852
+ # Lists job history.
853
+ #
854
+ # @param next_page_link [String] The NextLink from the previous successful
855
+ # call to List operation.
856
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
857
+ # will be added to the HTTP request.
858
+ #
859
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
860
+ #
861
+ def list_job_history_next_with_http_info(next_page_link, custom_headers = nil)
862
+ list_job_history_next_async(next_page_link, custom_headers).value!
863
+ end
864
+
865
+ #
866
+ # Lists job history.
867
+ #
868
+ # @param next_page_link [String] The NextLink from the previous successful
869
+ # call to List operation.
870
+ # @param [Hash{String => String}] A hash of custom headers that will be added
871
+ # to the HTTP request.
872
+ #
873
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
874
+ #
875
+ def list_job_history_next_async(next_page_link, custom_headers = nil)
568
876
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
569
877
  request_headers = {}
570
878
 
@@ -577,7 +885,10 @@ module Azure::ARM::Scheduler
577
885
  skip_encoding_path_params: {'nextLink' => next_page_link},
578
886
  headers: request_headers.merge(custom_headers || {})
579
887
  }
580
- request = MsRest::HttpOperationRequest.new(@base_url || @client.base_url, path_template, :get, options)
888
+
889
+ request_url = @base_url || @client.base_url
890
+
891
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
581
892
  promise = request.run_promise do |req|
582
893
  @client.credentials.sign_request(req) unless @client.credentials.nil?
583
894
  end