azure_mgmt_reservations 0.17.0 → 0.18.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +5 -5
  2. data/lib/2017-11-01/generated/azure_mgmt_reservations/operation.rb +4 -0
  3. data/lib/2017-11-01/generated/azure_mgmt_reservations/reservation.rb +16 -0
  4. data/lib/2017-11-01/generated/azure_mgmt_reservations/reservation_order.rb +6 -0
  5. data/lib/2017-11-01/generated/azure_mgmt_reservations/reservations_management_client.rb +5 -1
  6. data/lib/2018-06-01-preview/generated/azure_mgmt_reservations/operation.rb +4 -0
  7. data/lib/2018-06-01-preview/generated/azure_mgmt_reservations/reservation.rb +16 -0
  8. data/lib/2018-06-01-preview/generated/azure_mgmt_reservations/reservation_order.rb +6 -0
  9. data/lib/2018-06-01-preview/generated/azure_mgmt_reservations/reservations_management_client.rb +5 -1
  10. data/lib/2019-04-01-preview/generated/azure_mgmt_reservations.rb +29 -16
  11. data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/calculate_price_response_properties.rb +20 -0
  12. data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/catalog.rb +21 -0
  13. data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/catalog_billing_plans_item.rb +75 -0
  14. data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/patch.rb +23 -0
  15. data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/patch_properties_renew_properties.rb +48 -0
  16. data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/payment_detail.rb +118 -0
  17. data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/payment_status.rb +18 -0
  18. data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/price.rb +59 -0
  19. data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/properties.rb +48 -0
  20. data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/purchase_request.rb +25 -1
  21. data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/renew_properties_response.rb +76 -0
  22. data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/renew_properties_response_billing_currency_total.rb +59 -0
  23. data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/renew_properties_response_pricing_currency_total.rb +60 -0
  24. data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/reservation_billing_plan.rb +16 -0
  25. data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/reservation_order_billing_plan_information.rb +91 -0
  26. data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/reservation_order_response.rb +24 -0
  27. data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/reservation_properties.rb +85 -1
  28. data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/reserved_resource_type.rb +4 -0
  29. data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/scope_properties.rb +58 -0
  30. data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/models/subscription_scope_properties.rb +56 -0
  31. data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/operation.rb +4 -0
  32. data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/reservation.rb +202 -8
  33. data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/reservation_order.rb +19 -6
  34. data/lib/2019-04-01-preview/generated/azure_mgmt_reservations/reservations_management_client.rb +15 -8
  35. data/lib/azure_mgmt_reservations.rb +1 -1
  36. data/lib/profiles/latest/modules/reservations_profile_module.rb +100 -48
  37. data/lib/version.rb +1 -1
  38. metadata +18 -5
@@ -0,0 +1,56 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::Reservations::Mgmt::V2019_04_01_preview
7
+ module Models
8
+ #
9
+ # Model object.
10
+ #
11
+ #
12
+ class SubscriptionScopeProperties
13
+
14
+ include MsRestAzure
15
+
16
+ # @return [Array<ScopeProperties>]
17
+ attr_accessor :scopes
18
+
19
+
20
+ #
21
+ # Mapper for SubscriptionScopeProperties class as Ruby Hash.
22
+ # This will be used for serialization/deserialization.
23
+ #
24
+ def self.mapper()
25
+ {
26
+ client_side_validation: true,
27
+ required: false,
28
+ serialized_name: 'SubscriptionScopeProperties',
29
+ type: {
30
+ name: 'Composite',
31
+ class_name: 'SubscriptionScopeProperties',
32
+ model_properties: {
33
+ scopes: {
34
+ client_side_validation: true,
35
+ required: false,
36
+ serialized_name: 'scopes',
37
+ type: {
38
+ name: 'Sequence',
39
+ element: {
40
+ client_side_validation: true,
41
+ required: false,
42
+ serialized_name: 'ScopePropertiesElementType',
43
+ type: {
44
+ name: 'Composite',
45
+ class_name: 'ScopeProperties'
46
+ }
47
+ }
48
+ }
49
+ }
50
+ }
51
+ }
52
+ }
53
+ end
54
+ end
55
+ end
56
+ end
@@ -92,6 +92,8 @@ module Azure::Reservations::Mgmt::V2019_04_01_preview
92
92
  end
93
93
 
94
94
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
95
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
96
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
95
97
  # Deserialize Response
96
98
  if status_code == 200
97
99
  begin
@@ -186,6 +188,8 @@ module Azure::Reservations::Mgmt::V2019_04_01_preview
186
188
  end
187
189
 
188
190
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
191
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
192
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
189
193
  # Deserialize Response
190
194
  if status_code == 200
191
195
  begin
@@ -21,6 +21,53 @@ module Azure::Reservations::Mgmt::V2019_04_01_preview
21
21
  # @return [ReservationsManagementClient] reference to the ReservationsManagementClient
22
22
  attr_reader :client
23
23
 
24
+ #
25
+ # Get Available Scopes for `Reservation`.
26
+ #
27
+ # Get Available Scopes for `Reservation`.
28
+ #
29
+ #
30
+ # @param reservation_order_id [String] Order Id of the reservation
31
+ # @param reservation_id [String] Id of the Reservation Item
32
+ # @param body [Array<String>]
33
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
34
+ # will be added to the HTTP request.
35
+ #
36
+ # @return [Properties] operation results.
37
+ #
38
+ def available_scopes(reservation_order_id, reservation_id, body, custom_headers:nil)
39
+ response = available_scopes_async(reservation_order_id, reservation_id, body, custom_headers:custom_headers).value!
40
+ response.body unless response.nil?
41
+ end
42
+
43
+ #
44
+ # @param reservation_order_id [String] Order Id of the reservation
45
+ # @param reservation_id [String] Id of the Reservation Item
46
+ # @param body [Array<String>]
47
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
48
+ # will be added to the HTTP request.
49
+ #
50
+ # @return [Concurrent::Promise] promise which provides async access to http
51
+ # response.
52
+ #
53
+ def available_scopes_async(reservation_order_id, reservation_id, body, custom_headers:nil)
54
+ # Send request
55
+ promise = begin_available_scopes_async(reservation_order_id, reservation_id, body, custom_headers:custom_headers)
56
+
57
+ promise = promise.then do |response|
58
+ # Defining deserialization method.
59
+ deserialize_method = lambda do |parsed_response|
60
+ result_mapper = Azure::Reservations::Mgmt::V2019_04_01_preview::Models::Properties.mapper()
61
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
62
+ end
63
+
64
+ # Waiting for response.
65
+ @client.get_long_running_operation_result(response, deserialize_method)
66
+ end
67
+
68
+ promise
69
+ end
70
+
24
71
  #
25
72
  # Split the `Reservation`.
26
73
  #
@@ -76,7 +123,7 @@ module Azure::Reservations::Mgmt::V2019_04_01_preview
76
123
  end
77
124
 
78
125
  # Waiting for response.
79
- @client.get_long_running_operation_result(response, deserialize_method)
126
+ @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::LOCATION)
80
127
  end
81
128
 
82
129
  promise
@@ -139,7 +186,7 @@ module Azure::Reservations::Mgmt::V2019_04_01_preview
139
186
  end
140
187
 
141
188
  # Waiting for response.
142
- @client.get_long_running_operation_result(response, deserialize_method)
189
+ @client.get_long_running_operation_result(response, deserialize_method, FinalStateVia::LOCATION)
143
190
  end
144
191
 
145
192
  promise
@@ -221,6 +268,8 @@ module Azure::Reservations::Mgmt::V2019_04_01_preview
221
268
  end
222
269
 
223
270
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
271
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
272
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
224
273
  # Deserialize Response
225
274
  if status_code == 200
226
275
  begin
@@ -245,13 +294,14 @@ module Azure::Reservations::Mgmt::V2019_04_01_preview
245
294
  #
246
295
  # @param reservation_id [String] Id of the Reservation Item
247
296
  # @param reservation_order_id [String] Order Id of the reservation
297
+ # @param expand [String] Supported value of this query is renewProperties
248
298
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
249
299
  # will be added to the HTTP request.
250
300
  #
251
301
  # @return [ReservationResponse] operation results.
252
302
  #
253
- def get(reservation_id, reservation_order_id, custom_headers:nil)
254
- response = get_async(reservation_id, reservation_order_id, custom_headers:custom_headers).value!
303
+ def get(reservation_id, reservation_order_id, expand:nil, custom_headers:nil)
304
+ response = get_async(reservation_id, reservation_order_id, expand:expand, custom_headers:custom_headers).value!
255
305
  response.body unless response.nil?
256
306
  end
257
307
 
@@ -262,13 +312,14 @@ module Azure::Reservations::Mgmt::V2019_04_01_preview
262
312
  #
263
313
  # @param reservation_id [String] Id of the Reservation Item
264
314
  # @param reservation_order_id [String] Order Id of the reservation
315
+ # @param expand [String] Supported value of this query is renewProperties
265
316
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
266
317
  # will be added to the HTTP request.
267
318
  #
268
319
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
269
320
  #
270
- def get_with_http_info(reservation_id, reservation_order_id, custom_headers:nil)
271
- get_async(reservation_id, reservation_order_id, custom_headers:custom_headers).value!
321
+ def get_with_http_info(reservation_id, reservation_order_id, expand:nil, custom_headers:nil)
322
+ get_async(reservation_id, reservation_order_id, expand:expand, custom_headers:custom_headers).value!
272
323
  end
273
324
 
274
325
  #
@@ -278,12 +329,13 @@ module Azure::Reservations::Mgmt::V2019_04_01_preview
278
329
  #
279
330
  # @param reservation_id [String] Id of the Reservation Item
280
331
  # @param reservation_order_id [String] Order Id of the reservation
332
+ # @param expand [String] Supported value of this query is renewProperties
281
333
  # @param [Hash{String => String}] A hash of custom headers that will be added
282
334
  # to the HTTP request.
283
335
  #
284
336
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
285
337
  #
286
- def get_async(reservation_id, reservation_order_id, custom_headers:nil)
338
+ def get_async(reservation_id, reservation_order_id, expand:nil, custom_headers:nil)
287
339
  fail ArgumentError, 'reservation_id is nil' if reservation_id.nil?
288
340
  fail ArgumentError, 'reservation_order_id is nil' if reservation_order_id.nil?
289
341
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
@@ -302,7 +354,7 @@ module Azure::Reservations::Mgmt::V2019_04_01_preview
302
354
  options = {
303
355
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
304
356
  path_params: {'reservationId' => reservation_id,'reservationOrderId' => reservation_order_id},
305
- query_params: {'api-version' => @client.api_version},
357
+ query_params: {'api-version' => @client.api_version,'expand' => expand},
306
358
  headers: request_headers.merge(custom_headers || {}),
307
359
  base_url: request_url
308
360
  }
@@ -318,6 +370,8 @@ module Azure::Reservations::Mgmt::V2019_04_01_preview
318
370
  end
319
371
 
320
372
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
373
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
374
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
321
375
  # Deserialize Response
322
376
  if status_code == 200
323
377
  begin
@@ -461,6 +515,8 @@ module Azure::Reservations::Mgmt::V2019_04_01_preview
461
515
  end
462
516
 
463
517
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
518
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
519
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
464
520
  # Deserialize Response
465
521
  if status_code == 200
466
522
  begin
@@ -478,6 +534,134 @@ module Azure::Reservations::Mgmt::V2019_04_01_preview
478
534
  promise.execute
479
535
  end
480
536
 
537
+ #
538
+ # Get Available Scopes for `Reservation`.
539
+ #
540
+ # Get Available Scopes for `Reservation`.
541
+ #
542
+ #
543
+ # @param reservation_order_id [String] Order Id of the reservation
544
+ # @param reservation_id [String] Id of the Reservation Item
545
+ # @param body [Array<String>]
546
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
547
+ # will be added to the HTTP request.
548
+ #
549
+ # @return [Properties] operation results.
550
+ #
551
+ def begin_available_scopes(reservation_order_id, reservation_id, body, custom_headers:nil)
552
+ response = begin_available_scopes_async(reservation_order_id, reservation_id, body, custom_headers:custom_headers).value!
553
+ response.body unless response.nil?
554
+ end
555
+
556
+ #
557
+ # Get Available Scopes for `Reservation`.
558
+ #
559
+ # Get Available Scopes for `Reservation`.
560
+ #
561
+ #
562
+ # @param reservation_order_id [String] Order Id of the reservation
563
+ # @param reservation_id [String] Id of the Reservation Item
564
+ # @param body [Array<String>]
565
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
566
+ # will be added to the HTTP request.
567
+ #
568
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
569
+ #
570
+ def begin_available_scopes_with_http_info(reservation_order_id, reservation_id, body, custom_headers:nil)
571
+ begin_available_scopes_async(reservation_order_id, reservation_id, body, custom_headers:custom_headers).value!
572
+ end
573
+
574
+ #
575
+ # Get Available Scopes for `Reservation`.
576
+ #
577
+ # Get Available Scopes for `Reservation`.
578
+ #
579
+ #
580
+ # @param reservation_order_id [String] Order Id of the reservation
581
+ # @param reservation_id [String] Id of the Reservation Item
582
+ # @param body [Array<String>]
583
+ # @param [Hash{String => String}] A hash of custom headers that will be added
584
+ # to the HTTP request.
585
+ #
586
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
587
+ #
588
+ def begin_available_scopes_async(reservation_order_id, reservation_id, body, custom_headers:nil)
589
+ fail ArgumentError, 'reservation_order_id is nil' if reservation_order_id.nil?
590
+ fail ArgumentError, 'reservation_id is nil' if reservation_id.nil?
591
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
592
+ fail ArgumentError, 'body is nil' if body.nil?
593
+
594
+
595
+ request_headers = {}
596
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
597
+
598
+ # Set Headers
599
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
600
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
601
+
602
+ # Serialize Request
603
+ request_mapper = {
604
+ client_side_validation: true,
605
+ required: true,
606
+ serialized_name: 'body',
607
+ type: {
608
+ name: 'Sequence',
609
+ element: {
610
+ client_side_validation: true,
611
+ required: false,
612
+ serialized_name: 'StringElementType',
613
+ type: {
614
+ name: 'String'
615
+ }
616
+ }
617
+ }
618
+ }
619
+ request_content = @client.serialize(request_mapper, body)
620
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
621
+
622
+ path_template = 'providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/availableScopes'
623
+
624
+ request_url = @base_url || @client.base_url
625
+
626
+ options = {
627
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
628
+ path_params: {'reservationOrderId' => reservation_order_id,'reservationId' => reservation_id},
629
+ query_params: {'api-version' => @client.api_version},
630
+ body: request_content,
631
+ headers: request_headers.merge(custom_headers || {}),
632
+ base_url: request_url
633
+ }
634
+ promise = @client.make_request_async(:post, path_template, options)
635
+
636
+ promise = promise.then do |result|
637
+ http_response = result.response
638
+ status_code = http_response.status
639
+ response_content = http_response.body
640
+ unless status_code == 200
641
+ error_model = JSON.load(response_content)
642
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
643
+ end
644
+
645
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
646
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
647
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
648
+ # Deserialize Response
649
+ if status_code == 200
650
+ begin
651
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
652
+ result_mapper = Azure::Reservations::Mgmt::V2019_04_01_preview::Models::Properties.mapper()
653
+ result.body = @client.deserialize(result_mapper, parsed_response)
654
+ rescue Exception => e
655
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
656
+ end
657
+ end
658
+
659
+ result
660
+ end
661
+
662
+ promise.execute
663
+ end
664
+
481
665
  #
482
666
  # Split the `Reservation`.
483
667
  #
@@ -568,6 +752,8 @@ module Azure::Reservations::Mgmt::V2019_04_01_preview
568
752
  end
569
753
 
570
754
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
755
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
756
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
571
757
  # Deserialize Response
572
758
  if status_code == 200
573
759
  begin
@@ -694,6 +880,8 @@ module Azure::Reservations::Mgmt::V2019_04_01_preview
694
880
  end
695
881
 
696
882
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
883
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
884
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
697
885
  # Deserialize Response
698
886
  if status_code == 200
699
887
  begin
@@ -818,6 +1006,8 @@ module Azure::Reservations::Mgmt::V2019_04_01_preview
818
1006
  end
819
1007
 
820
1008
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1009
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1010
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
821
1011
  # Deserialize Response
822
1012
  if status_code == 200
823
1013
  begin
@@ -912,6 +1102,8 @@ module Azure::Reservations::Mgmt::V2019_04_01_preview
912
1102
  end
913
1103
 
914
1104
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1105
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1106
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
915
1107
  # Deserialize Response
916
1108
  if status_code == 200
917
1109
  begin
@@ -1006,6 +1198,8 @@ module Azure::Reservations::Mgmt::V2019_04_01_preview
1006
1198
  end
1007
1199
 
1008
1200
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1201
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1202
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1009
1203
  # Deserialize Response
1010
1204
  if status_code == 200
1011
1205
  begin
@@ -106,6 +106,8 @@ module Azure::Reservations::Mgmt::V2019_04_01_preview
106
106
  end
107
107
 
108
108
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
109
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
110
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
109
111
  # Deserialize Response
110
112
  if status_code == 200
111
113
  begin
@@ -197,6 +199,8 @@ module Azure::Reservations::Mgmt::V2019_04_01_preview
197
199
  end
198
200
 
199
201
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
202
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
203
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
200
204
  # Deserialize Response
201
205
  if status_code == 200
202
206
  begin
@@ -266,13 +270,14 @@ module Azure::Reservations::Mgmt::V2019_04_01_preview
266
270
  # Get the details of the `ReservationOrder`.
267
271
  #
268
272
  # @param reservation_order_id [String] Order Id of the reservation
273
+ # @param expand [String] May be used to expand the planInformation.
269
274
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
270
275
  # will be added to the HTTP request.
271
276
  #
272
277
  # @return [ReservationOrderResponse] operation results.
273
278
  #
274
- def get(reservation_order_id, custom_headers:nil)
275
- response = get_async(reservation_order_id, custom_headers:custom_headers).value!
279
+ def get(reservation_order_id, expand:nil, custom_headers:nil)
280
+ response = get_async(reservation_order_id, expand:expand, custom_headers:custom_headers).value!
276
281
  response.body unless response.nil?
277
282
  end
278
283
 
@@ -282,13 +287,14 @@ module Azure::Reservations::Mgmt::V2019_04_01_preview
282
287
  # Get the details of the `ReservationOrder`.
283
288
  #
284
289
  # @param reservation_order_id [String] Order Id of the reservation
290
+ # @param expand [String] May be used to expand the planInformation.
285
291
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
286
292
  # will be added to the HTTP request.
287
293
  #
288
294
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
289
295
  #
290
- def get_with_http_info(reservation_order_id, custom_headers:nil)
291
- get_async(reservation_order_id, custom_headers:custom_headers).value!
296
+ def get_with_http_info(reservation_order_id, expand:nil, custom_headers:nil)
297
+ get_async(reservation_order_id, expand:expand, custom_headers:custom_headers).value!
292
298
  end
293
299
 
294
300
  #
@@ -297,12 +303,13 @@ module Azure::Reservations::Mgmt::V2019_04_01_preview
297
303
  # Get the details of the `ReservationOrder`.
298
304
  #
299
305
  # @param reservation_order_id [String] Order Id of the reservation
306
+ # @param expand [String] May be used to expand the planInformation.
300
307
  # @param [Hash{String => String}] A hash of custom headers that will be added
301
308
  # to the HTTP request.
302
309
  #
303
310
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
304
311
  #
305
- def get_async(reservation_order_id, custom_headers:nil)
312
+ def get_async(reservation_order_id, expand:nil, custom_headers:nil)
306
313
  fail ArgumentError, 'reservation_order_id is nil' if reservation_order_id.nil?
307
314
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
308
315
 
@@ -320,7 +327,7 @@ module Azure::Reservations::Mgmt::V2019_04_01_preview
320
327
  options = {
321
328
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
322
329
  path_params: {'reservationOrderId' => reservation_order_id},
323
- query_params: {'api-version' => @client.api_version},
330
+ query_params: {'api-version' => @client.api_version,'$expand' => expand},
324
331
  headers: request_headers.merge(custom_headers || {}),
325
332
  base_url: request_url
326
333
  }
@@ -336,6 +343,8 @@ module Azure::Reservations::Mgmt::V2019_04_01_preview
336
343
  end
337
344
 
338
345
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
346
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
347
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
339
348
  # Deserialize Response
340
349
  if status_code == 200
341
350
  begin
@@ -443,6 +452,8 @@ module Azure::Reservations::Mgmt::V2019_04_01_preview
443
452
  end
444
453
 
445
454
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
455
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
456
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
446
457
  # Deserialize Response
447
458
  if status_code == 200
448
459
  begin
@@ -550,6 +561,8 @@ module Azure::Reservations::Mgmt::V2019_04_01_preview
550
561
  end
551
562
 
552
563
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
564
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
565
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
553
566
  # Deserialize Response
554
567
  if status_code == 200
555
568
  begin