azure_mgmt_iot_central 0.17.1 → 0.19.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (25) hide show
  1. checksums.yaml +5 -5
  2. data/lib/2017-07-01-privatepreview/generated/azure_mgmt_iot_central/apps.rb +18 -0
  3. data/lib/2017-07-01-privatepreview/generated/azure_mgmt_iot_central/iot_central_client.rb +1 -1
  4. data/lib/2017-07-01-privatepreview/generated/azure_mgmt_iot_central/models/app_list_result.rb +1 -1
  5. data/lib/2017-07-01-privatepreview/generated/azure_mgmt_iot_central/models/operation_list_result.rb +1 -1
  6. data/lib/2017-07-01-privatepreview/generated/azure_mgmt_iot_central/operations.rb +4 -0
  7. data/lib/2018-09-01/generated/azure_mgmt_iot_central.rb +6 -5
  8. data/lib/2018-09-01/generated/azure_mgmt_iot_central/apps.rb +328 -11
  9. data/lib/2018-09-01/generated/azure_mgmt_iot_central/iot_central_client.rb +1 -1
  10. data/lib/2018-09-01/generated/azure_mgmt_iot_central/models/app.rb +0 -6
  11. data/lib/2018-09-01/generated/azure_mgmt_iot_central/models/{app_name_availability_info.rb → app_availability_info.rb} +9 -10
  12. data/lib/2018-09-01/generated/azure_mgmt_iot_central/models/app_list_result.rb +1 -1
  13. data/lib/2018-09-01/generated/azure_mgmt_iot_central/models/app_patch.rb +0 -6
  14. data/lib/2018-09-01/generated/azure_mgmt_iot_central/models/app_sku.rb +3 -0
  15. data/lib/2018-09-01/generated/azure_mgmt_iot_central/models/app_sku_info.rb +1 -1
  16. data/lib/2018-09-01/generated/azure_mgmt_iot_central/models/app_template.rb +107 -0
  17. data/lib/2018-09-01/generated/azure_mgmt_iot_central/models/app_templates_result.rb +101 -0
  18. data/lib/2018-09-01/generated/azure_mgmt_iot_central/models/{error_details.rb → cloud_error_body.rb} +26 -5
  19. data/lib/2018-09-01/generated/azure_mgmt_iot_central/models/operation_inputs.rb +13 -0
  20. data/lib/2018-09-01/generated/azure_mgmt_iot_central/models/operation_list_result.rb +1 -1
  21. data/lib/2018-09-01/generated/azure_mgmt_iot_central/operations.rb +6 -2
  22. data/lib/profiles/latest/modules/iotcentral_profile_module.rb +20 -16
  23. data/lib/version.rb +1 -1
  24. metadata +9 -8
  25. data/lib/2018-09-01/generated/azure_mgmt_iot_central/models/app_name_unavailability_reason.rb +0 -16
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: fb3056287c716f2deb45bbada2e88f285365ad13
4
- data.tar.gz: 982157f3f54fcc0c60f69406d5346cc1bbe581e1
2
+ SHA256:
3
+ metadata.gz: ae93563b304ea7c3abe50857d7158fbc2c95715e4b043c5cc13bbc8ee7cbacac
4
+ data.tar.gz: f94ae9c3949c64b6864e635e64d2d511120c42a18e4bb1ad57a2f4e791b11666
5
5
  SHA512:
6
- metadata.gz: 196a22a8f411b02cd030b4c8dfad03ca9f5d870a094011c7425967d5a08cdae9513064214394401b74f89375082a4811d1b3148adced6931d5446819676fa55e
7
- data.tar.gz: 0aca4f79abcdcd85dec314459230c6c952bcbfede23cd95fb3218f46874e32ebc90736be80663658cd9574a48f7fc7335b54329c64ce96390c3c6ae84a385df7
6
+ metadata.gz: 3630433577f71cfdb785198203c89c6a67269c1bd68f60d30c6fcf196851d390e5f5d46ca2831274b84d252c4272c0a8daf6e350c75b84a860d6bd9a01597521
7
+ data.tar.gz: 99d35f73c9d14b3be4584add353a99a672f83947b298a86ee4adcb81538c59c665fa417e7e43c7fc9860ea62ac8003f7acea5415f7cc0678d173b6c3f74016ce
@@ -102,6 +102,8 @@ module Azure::IotCentral::Mgmt::V2017_07_01_privatepreview
102
102
  end
103
103
 
104
104
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
105
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
106
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
105
107
  # Deserialize Response
106
108
  if status_code == 200
107
109
  begin
@@ -329,6 +331,8 @@ module Azure::IotCentral::Mgmt::V2017_07_01_privatepreview
329
331
  end
330
332
 
331
333
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
334
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
335
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
332
336
  # Deserialize Response
333
337
  if status_code == 200
334
338
  begin
@@ -420,6 +424,8 @@ module Azure::IotCentral::Mgmt::V2017_07_01_privatepreview
420
424
  end
421
425
 
422
426
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
427
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
428
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
423
429
  # Deserialize Response
424
430
  if status_code == 200
425
431
  begin
@@ -521,6 +527,8 @@ module Azure::IotCentral::Mgmt::V2017_07_01_privatepreview
521
527
  end
522
528
 
523
529
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
530
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
531
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
524
532
  # Deserialize Response
525
533
  if status_code == 200
526
534
  begin
@@ -639,6 +647,8 @@ module Azure::IotCentral::Mgmt::V2017_07_01_privatepreview
639
647
  end
640
648
 
641
649
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
650
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
651
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
642
652
  # Deserialize Response
643
653
  if status_code == 200
644
654
  begin
@@ -761,6 +771,8 @@ module Azure::IotCentral::Mgmt::V2017_07_01_privatepreview
761
771
  end
762
772
 
763
773
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
774
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
775
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
764
776
  # Deserialize Response
765
777
  if status_code == 200
766
778
  begin
@@ -858,6 +870,8 @@ module Azure::IotCentral::Mgmt::V2017_07_01_privatepreview
858
870
  end
859
871
 
860
872
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
873
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
874
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
861
875
 
862
876
  result
863
877
  end
@@ -936,6 +950,8 @@ module Azure::IotCentral::Mgmt::V2017_07_01_privatepreview
936
950
  end
937
951
 
938
952
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
953
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
954
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
939
955
  # Deserialize Response
940
956
  if status_code == 200
941
957
  begin
@@ -1024,6 +1040,8 @@ module Azure::IotCentral::Mgmt::V2017_07_01_privatepreview
1024
1040
  end
1025
1041
 
1026
1042
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1043
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1044
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1027
1045
  # Deserialize Response
1028
1046
  if status_code == 200
1029
1047
  begin
@@ -128,7 +128,7 @@ module Azure::IotCentral::Mgmt::V2017_07_01_privatepreview
128
128
  #
129
129
  def add_telemetry
130
130
  sdk_information = 'azure_mgmt_iot_central'
131
- sdk_information = "#{sdk_information}/0.17.1"
131
+ sdk_information = "#{sdk_information}/0.19.1"
132
132
  add_user_agent_information(sdk_information)
133
133
  end
134
134
  end
@@ -31,7 +31,7 @@ module Azure::IotCentral::Mgmt::V2017_07_01_privatepreview
31
31
  def get_all_items
32
32
  items = @value
33
33
  page = self
34
- while page.next_link != nil do
34
+ while page.next_link != nil && !page.next_link.strip.empty? do
35
35
  page = page.get_next_page
36
36
  items.concat(page.value)
37
37
  end
@@ -33,7 +33,7 @@ module Azure::IotCentral::Mgmt::V2017_07_01_privatepreview
33
33
  def get_all_items
34
34
  items = @value
35
35
  page = self
36
- while page.next_link != nil do
36
+ while page.next_link != nil && !page.next_link.strip.empty? do
37
37
  page = page.get_next_page
38
38
  items.concat(page.value)
39
39
  end
@@ -86,6 +86,8 @@ module Azure::IotCentral::Mgmt::V2017_07_01_privatepreview
86
86
  end
87
87
 
88
88
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
89
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
90
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
89
91
  # Deserialize Response
90
92
  if status_code == 200
91
93
  begin
@@ -174,6 +176,8 @@ module Azure::IotCentral::Mgmt::V2017_07_01_privatepreview
174
176
  end
175
177
 
176
178
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
179
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
180
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
177
181
  # Deserialize Response
178
182
  if status_code == 200
179
183
  begin
@@ -27,16 +27,17 @@ module Azure::IotCentral::Mgmt::V2018_09_01
27
27
  module Models
28
28
  autoload :AppListResult, '2018-09-01/generated/azure_mgmt_iot_central/models/app_list_result.rb'
29
29
  autoload :OperationDisplay, '2018-09-01/generated/azure_mgmt_iot_central/models/operation_display.rb'
30
+ autoload :AppTemplatesResult, '2018-09-01/generated/azure_mgmt_iot_central/models/app_templates_result.rb'
30
31
  autoload :AppPatch, '2018-09-01/generated/azure_mgmt_iot_central/models/app_patch.rb'
31
32
  autoload :Operation, '2018-09-01/generated/azure_mgmt_iot_central/models/operation.rb'
32
- autoload :ErrorDetails, '2018-09-01/generated/azure_mgmt_iot_central/models/error_details.rb'
33
+ autoload :CloudErrorBody, '2018-09-01/generated/azure_mgmt_iot_central/models/cloud_error_body.rb'
33
34
  autoload :OperationListResult, '2018-09-01/generated/azure_mgmt_iot_central/models/operation_list_result.rb'
34
- autoload :Resource, '2018-09-01/generated/azure_mgmt_iot_central/models/resource.rb'
35
- autoload :OperationInputs, '2018-09-01/generated/azure_mgmt_iot_central/models/operation_inputs.rb'
36
35
  autoload :AppSkuInfo, '2018-09-01/generated/azure_mgmt_iot_central/models/app_sku_info.rb'
37
- autoload :AppNameAvailabilityInfo, '2018-09-01/generated/azure_mgmt_iot_central/models/app_name_availability_info.rb'
36
+ autoload :OperationInputs, '2018-09-01/generated/azure_mgmt_iot_central/models/operation_inputs.rb'
37
+ autoload :AppAvailabilityInfo, '2018-09-01/generated/azure_mgmt_iot_central/models/app_availability_info.rb'
38
+ autoload :Resource, '2018-09-01/generated/azure_mgmt_iot_central/models/resource.rb'
39
+ autoload :AppTemplate, '2018-09-01/generated/azure_mgmt_iot_central/models/app_template.rb'
38
40
  autoload :App, '2018-09-01/generated/azure_mgmt_iot_central/models/app.rb'
39
41
  autoload :AppSku, '2018-09-01/generated/azure_mgmt_iot_central/models/app_sku.rb'
40
- autoload :AppNameUnavailabilityReason, '2018-09-01/generated/azure_mgmt_iot_central/models/app_name_unavailability_reason.rb'
41
42
  end
42
43
  end
@@ -98,10 +98,12 @@ module Azure::IotCentral::Mgmt::V2018_09_01
98
98
  response_content = http_response.body
99
99
  unless status_code == 200
100
100
  error_model = JSON.load(response_content)
101
- fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
101
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
102
102
  end
103
103
 
104
104
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
105
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
106
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
105
107
  # Deserialize Response
106
108
  if status_code == 200
107
109
  begin
@@ -325,10 +327,12 @@ module Azure::IotCentral::Mgmt::V2018_09_01
325
327
  response_content = http_response.body
326
328
  unless status_code == 200
327
329
  error_model = JSON.load(response_content)
328
- fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
330
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
329
331
  end
330
332
 
331
333
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
334
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
335
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
332
336
  # Deserialize Response
333
337
  if status_code == 200
334
338
  begin
@@ -416,10 +420,12 @@ module Azure::IotCentral::Mgmt::V2018_09_01
416
420
  response_content = http_response.body
417
421
  unless status_code == 200
418
422
  error_model = JSON.load(response_content)
419
- fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
423
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
420
424
  end
421
425
 
422
426
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
427
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
428
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
423
429
  # Deserialize Response
424
430
  if status_code == 200
425
431
  begin
@@ -446,7 +452,7 @@ module Azure::IotCentral::Mgmt::V2018_09_01
446
452
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
447
453
  # will be added to the HTTP request.
448
454
  #
449
- # @return [AppNameAvailabilityInfo] operation results.
455
+ # @return [AppAvailabilityInfo] operation results.
450
456
  #
451
457
  def check_name_availability(operation_inputs, custom_headers:nil)
452
458
  response = check_name_availability_async(operation_inputs, custom_headers:custom_headers).value!
@@ -517,15 +523,206 @@ module Azure::IotCentral::Mgmt::V2018_09_01
517
523
  response_content = http_response.body
518
524
  unless status_code == 200
519
525
  error_model = JSON.load(response_content)
520
- fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
526
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
521
527
  end
522
528
 
523
529
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
530
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
531
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
524
532
  # Deserialize Response
525
533
  if status_code == 200
526
534
  begin
527
535
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
528
- result_mapper = Azure::IotCentral::Mgmt::V2018_09_01::Models::AppNameAvailabilityInfo.mapper()
536
+ result_mapper = Azure::IotCentral::Mgmt::V2018_09_01::Models::AppAvailabilityInfo.mapper()
537
+ result.body = @client.deserialize(result_mapper, parsed_response)
538
+ rescue Exception => e
539
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
540
+ end
541
+ end
542
+
543
+ result
544
+ end
545
+
546
+ promise.execute
547
+ end
548
+
549
+ #
550
+ # Check if an IoT Central application subdomain is available.
551
+ #
552
+ # @param operation_inputs [OperationInputs] Set the name parameter in the
553
+ # OperationInputs structure to the subdomain of the IoT Central application to
554
+ # check.
555
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
556
+ # will be added to the HTTP request.
557
+ #
558
+ # @return [AppAvailabilityInfo] operation results.
559
+ #
560
+ def check_subdomain_availability(operation_inputs, custom_headers:nil)
561
+ response = check_subdomain_availability_async(operation_inputs, custom_headers:custom_headers).value!
562
+ response.body unless response.nil?
563
+ end
564
+
565
+ #
566
+ # Check if an IoT Central application subdomain is available.
567
+ #
568
+ # @param operation_inputs [OperationInputs] Set the name parameter in the
569
+ # OperationInputs structure to the subdomain of the IoT Central application to
570
+ # check.
571
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
572
+ # will be added to the HTTP request.
573
+ #
574
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
575
+ #
576
+ def check_subdomain_availability_with_http_info(operation_inputs, custom_headers:nil)
577
+ check_subdomain_availability_async(operation_inputs, custom_headers:custom_headers).value!
578
+ end
579
+
580
+ #
581
+ # Check if an IoT Central application subdomain is available.
582
+ #
583
+ # @param operation_inputs [OperationInputs] Set the name parameter in the
584
+ # OperationInputs structure to the subdomain of the IoT Central application to
585
+ # check.
586
+ # @param [Hash{String => String}] A hash of custom headers that will be added
587
+ # to the HTTP request.
588
+ #
589
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
590
+ #
591
+ def check_subdomain_availability_async(operation_inputs, custom_headers:nil)
592
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
593
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
594
+ fail ArgumentError, 'operation_inputs is nil' if operation_inputs.nil?
595
+
596
+
597
+ request_headers = {}
598
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
599
+
600
+ # Set Headers
601
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
602
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
603
+
604
+ # Serialize Request
605
+ request_mapper = Azure::IotCentral::Mgmt::V2018_09_01::Models::OperationInputs.mapper()
606
+ request_content = @client.serialize(request_mapper, operation_inputs)
607
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
608
+
609
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.IoTCentral/checkSubdomainAvailability'
610
+
611
+ request_url = @base_url || @client.base_url
612
+
613
+ options = {
614
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
615
+ path_params: {'subscriptionId' => @client.subscription_id},
616
+ query_params: {'api-version' => @client.api_version},
617
+ body: request_content,
618
+ headers: request_headers.merge(custom_headers || {}),
619
+ base_url: request_url
620
+ }
621
+ promise = @client.make_request_async(:post, path_template, options)
622
+
623
+ promise = promise.then do |result|
624
+ http_response = result.response
625
+ status_code = http_response.status
626
+ response_content = http_response.body
627
+ unless status_code == 200
628
+ error_model = JSON.load(response_content)
629
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
630
+ end
631
+
632
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
633
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
634
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
635
+ # Deserialize Response
636
+ if status_code == 200
637
+ begin
638
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
639
+ result_mapper = Azure::IotCentral::Mgmt::V2018_09_01::Models::AppAvailabilityInfo.mapper()
640
+ result.body = @client.deserialize(result_mapper, parsed_response)
641
+ rescue Exception => e
642
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
643
+ end
644
+ end
645
+
646
+ result
647
+ end
648
+
649
+ promise.execute
650
+ end
651
+
652
+ #
653
+ # Get all available application templates.
654
+ #
655
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
656
+ # will be added to the HTTP request.
657
+ #
658
+ # @return [Array<AppTemplate>] operation results.
659
+ #
660
+ def list_templates(custom_headers:nil)
661
+ first_page = list_templates_as_lazy(custom_headers:custom_headers)
662
+ first_page.get_all_items
663
+ end
664
+
665
+ #
666
+ # Get all available application templates.
667
+ #
668
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
669
+ # will be added to the HTTP request.
670
+ #
671
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
672
+ #
673
+ def list_templates_with_http_info(custom_headers:nil)
674
+ list_templates_async(custom_headers:custom_headers).value!
675
+ end
676
+
677
+ #
678
+ # Get all available application templates.
679
+ #
680
+ # @param [Hash{String => String}] A hash of custom headers that will be added
681
+ # to the HTTP request.
682
+ #
683
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
684
+ #
685
+ def list_templates_async(custom_headers:nil)
686
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
687
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
688
+
689
+
690
+ request_headers = {}
691
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
692
+
693
+ # Set Headers
694
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
695
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
696
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.IoTCentral/appTemplates'
697
+
698
+ request_url = @base_url || @client.base_url
699
+
700
+ options = {
701
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
702
+ path_params: {'subscriptionId' => @client.subscription_id},
703
+ query_params: {'api-version' => @client.api_version},
704
+ headers: request_headers.merge(custom_headers || {}),
705
+ base_url: request_url
706
+ }
707
+ promise = @client.make_request_async(:post, path_template, options)
708
+
709
+ promise = promise.then do |result|
710
+ http_response = result.response
711
+ status_code = http_response.status
712
+ response_content = http_response.body
713
+ unless status_code == 200
714
+ error_model = JSON.load(response_content)
715
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
716
+ end
717
+
718
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
719
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
720
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
721
+ # Deserialize Response
722
+ if status_code == 200
723
+ begin
724
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
725
+ result_mapper = Azure::IotCentral::Mgmt::V2018_09_01::Models::AppTemplatesResult.mapper()
529
726
  result.body = @client.deserialize(result_mapper, parsed_response)
530
727
  rescue Exception => e
531
728
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -635,10 +832,12 @@ module Azure::IotCentral::Mgmt::V2018_09_01
635
832
  response_content = http_response.body
636
833
  unless status_code == 200 || status_code == 201 || status_code == 202
637
834
  error_model = JSON.load(response_content)
638
- fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
835
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
639
836
  end
640
837
 
641
838
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
839
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
840
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
642
841
  # Deserialize Response
643
842
  if status_code == 200
644
843
  begin
@@ -757,10 +956,12 @@ module Azure::IotCentral::Mgmt::V2018_09_01
757
956
  response_content = http_response.body
758
957
  unless status_code == 200 || status_code == 202
759
958
  error_model = JSON.load(response_content)
760
- fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
959
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
761
960
  end
762
961
 
763
962
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
963
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
964
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
764
965
  # Deserialize Response
765
966
  if status_code == 200
766
967
  begin
@@ -854,10 +1055,12 @@ module Azure::IotCentral::Mgmt::V2018_09_01
854
1055
  response_content = http_response.body
855
1056
  unless status_code == 200 || status_code == 202 || status_code == 204
856
1057
  error_model = JSON.load(response_content)
857
- fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1058
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
858
1059
  end
859
1060
 
860
1061
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1062
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1063
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
861
1064
 
862
1065
  result
863
1066
  end
@@ -932,10 +1135,12 @@ module Azure::IotCentral::Mgmt::V2018_09_01
932
1135
  response_content = http_response.body
933
1136
  unless status_code == 200
934
1137
  error_model = JSON.load(response_content)
935
- fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1138
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
936
1139
  end
937
1140
 
938
1141
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1142
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1143
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
939
1144
  # Deserialize Response
940
1145
  if status_code == 200
941
1146
  begin
@@ -1020,10 +1225,12 @@ module Azure::IotCentral::Mgmt::V2018_09_01
1020
1225
  response_content = http_response.body
1021
1226
  unless status_code == 200
1022
1227
  error_model = JSON.load(response_content)
1023
- fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
1228
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1024
1229
  end
1025
1230
 
1026
1231
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1232
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1233
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1027
1234
  # Deserialize Response
1028
1235
  if status_code == 200
1029
1236
  begin
@@ -1041,6 +1248,96 @@ module Azure::IotCentral::Mgmt::V2018_09_01
1041
1248
  promise.execute
1042
1249
  end
1043
1250
 
1251
+ #
1252
+ # Get all available application templates.
1253
+ #
1254
+ # @param next_page_link [String] The NextLink from the previous successful call
1255
+ # to List operation.
1256
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1257
+ # will be added to the HTTP request.
1258
+ #
1259
+ # @return [AppTemplatesResult] operation results.
1260
+ #
1261
+ def list_templates_next(next_page_link, custom_headers:nil)
1262
+ response = list_templates_next_async(next_page_link, custom_headers:custom_headers).value!
1263
+ response.body unless response.nil?
1264
+ end
1265
+
1266
+ #
1267
+ # Get all available application templates.
1268
+ #
1269
+ # @param next_page_link [String] The NextLink from the previous successful call
1270
+ # to List operation.
1271
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1272
+ # will be added to the HTTP request.
1273
+ #
1274
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
1275
+ #
1276
+ def list_templates_next_with_http_info(next_page_link, custom_headers:nil)
1277
+ list_templates_next_async(next_page_link, custom_headers:custom_headers).value!
1278
+ end
1279
+
1280
+ #
1281
+ # Get all available application templates.
1282
+ #
1283
+ # @param next_page_link [String] The NextLink from the previous successful call
1284
+ # to List operation.
1285
+ # @param [Hash{String => String}] A hash of custom headers that will be added
1286
+ # to the HTTP request.
1287
+ #
1288
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
1289
+ #
1290
+ def list_templates_next_async(next_page_link, custom_headers:nil)
1291
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1292
+
1293
+
1294
+ request_headers = {}
1295
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
1296
+
1297
+ # Set Headers
1298
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
1299
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
1300
+ path_template = '{nextLink}'
1301
+
1302
+ request_url = @base_url || @client.base_url
1303
+
1304
+ options = {
1305
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
1306
+ skip_encoding_path_params: {'nextLink' => next_page_link},
1307
+ headers: request_headers.merge(custom_headers || {}),
1308
+ base_url: request_url
1309
+ }
1310
+ promise = @client.make_request_async(:post, path_template, options)
1311
+
1312
+ promise = promise.then do |result|
1313
+ http_response = result.response
1314
+ status_code = http_response.status
1315
+ response_content = http_response.body
1316
+ unless status_code == 200
1317
+ error_model = JSON.load(response_content)
1318
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
1319
+ end
1320
+
1321
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
1322
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
1323
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
1324
+ # Deserialize Response
1325
+ if status_code == 200
1326
+ begin
1327
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1328
+ result_mapper = Azure::IotCentral::Mgmt::V2018_09_01::Models::AppTemplatesResult.mapper()
1329
+ result.body = @client.deserialize(result_mapper, parsed_response)
1330
+ rescue Exception => e
1331
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1332
+ end
1333
+ end
1334
+
1335
+ result
1336
+ end
1337
+
1338
+ promise.execute
1339
+ end
1340
+
1044
1341
  #
1045
1342
  # Get all IoT Central Applications in a subscription.
1046
1343
  #
@@ -1081,5 +1378,25 @@ module Azure::IotCentral::Mgmt::V2018_09_01
1081
1378
  end
1082
1379
  end
1083
1380
 
1381
+ #
1382
+ # Get all available application templates.
1383
+ #
1384
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
1385
+ # will be added to the HTTP request.
1386
+ #
1387
+ # @return [AppTemplatesResult] which provide lazy access to pages of the
1388
+ # response.
1389
+ #
1390
+ def list_templates_as_lazy(custom_headers:nil)
1391
+ response = list_templates_async(custom_headers:custom_headers).value!
1392
+ unless response.nil?
1393
+ page = response.body
1394
+ page.next_method = Proc.new do |next_page_link|
1395
+ list_templates_next_async(next_page_link, custom_headers:custom_headers)
1396
+ end
1397
+ page
1398
+ end
1399
+ end
1400
+
1084
1401
  end
1085
1402
  end
@@ -128,7 +128,7 @@ module Azure::IotCentral::Mgmt::V2018_09_01
128
128
  #
129
129
  def add_telemetry
130
130
  sdk_information = 'azure_mgmt_iot_central'
131
- sdk_information = "#{sdk_information}/0.17.1"
131
+ sdk_information = "#{sdk_information}/0.19.1"
132
132
  add_user_agent_information(sdk_information)
133
133
  end
134
134
  end
@@ -111,9 +111,6 @@ module Azure::IotCentral::Mgmt::V2018_09_01
111
111
  client_side_validation: true,
112
112
  required: false,
113
113
  serialized_name: 'properties.displayName',
114
- constraints: {
115
- Pattern: '^.{1,200}$'
116
- },
117
114
  type: {
118
115
  name: 'String'
119
116
  }
@@ -122,9 +119,6 @@ module Azure::IotCentral::Mgmt::V2018_09_01
122
119
  client_side_validation: true,
123
120
  required: false,
124
121
  serialized_name: 'properties.subdomain',
125
- constraints: {
126
- Pattern: '^[a-z0-9-]{1,63}$'
127
- },
128
122
  type: {
129
123
  name: 'String'
130
124
  }
@@ -6,10 +6,10 @@
6
6
  module Azure::IotCentral::Mgmt::V2018_09_01
7
7
  module Models
8
8
  #
9
- # The properties indicating whether a given IoT Central application name is
10
- # available.
9
+ # The properties indicating whether a given IoT Central application name or
10
+ # subdomain is available.
11
11
  #
12
- class AppNameAvailabilityInfo
12
+ class AppAvailabilityInfo
13
13
 
14
14
  include MsRestAzure
15
15
 
@@ -17,8 +17,7 @@ module Azure::IotCentral::Mgmt::V2018_09_01
17
17
  # is available.
18
18
  attr_accessor :name_available
19
19
 
20
- # @return [AppNameUnavailabilityReason] The reason for unavailability.
21
- # Possible values include: 'Invalid', 'AlreadyExists'
20
+ # @return [String] The reason for unavailability.
22
21
  attr_accessor :reason
23
22
 
24
23
  # @return [String] The detailed reason message.
@@ -26,17 +25,17 @@ module Azure::IotCentral::Mgmt::V2018_09_01
26
25
 
27
26
 
28
27
  #
29
- # Mapper for AppNameAvailabilityInfo class as Ruby Hash.
28
+ # Mapper for AppAvailabilityInfo class as Ruby Hash.
30
29
  # This will be used for serialization/deserialization.
31
30
  #
32
31
  def self.mapper()
33
32
  {
34
33
  client_side_validation: true,
35
34
  required: false,
36
- serialized_name: 'AppNameAvailabilityInfo',
35
+ serialized_name: 'AppAvailabilityInfo',
37
36
  type: {
38
37
  name: 'Composite',
39
- class_name: 'AppNameAvailabilityInfo',
38
+ class_name: 'AppAvailabilityInfo',
40
39
  model_properties: {
41
40
  name_available: {
42
41
  client_side_validation: true,
@@ -53,13 +52,13 @@ module Azure::IotCentral::Mgmt::V2018_09_01
53
52
  read_only: true,
54
53
  serialized_name: 'reason',
55
54
  type: {
56
- name: 'Enum',
57
- module: 'AppNameUnavailabilityReason'
55
+ name: 'String'
58
56
  }
59
57
  },
60
58
  message: {
61
59
  client_side_validation: true,
62
60
  required: false,
61
+ read_only: true,
63
62
  serialized_name: 'message',
64
63
  type: {
65
64
  name: 'String'
@@ -31,7 +31,7 @@ module Azure::IotCentral::Mgmt::V2018_09_01
31
31
  def get_all_items
32
32
  items = @value
33
33
  page = self
34
- while page.next_link != nil do
34
+ while page.next_link != nil && !page.next_link.strip.empty? do
35
35
  page = page.get_next_page
36
36
  items.concat(page.value)
37
37
  end
@@ -73,9 +73,6 @@ module Azure::IotCentral::Mgmt::V2018_09_01
73
73
  client_side_validation: true,
74
74
  required: false,
75
75
  serialized_name: 'properties.displayName',
76
- constraints: {
77
- Pattern: '^.{1,200}$'
78
- },
79
76
  type: {
80
77
  name: 'String'
81
78
  }
@@ -84,9 +81,6 @@ module Azure::IotCentral::Mgmt::V2018_09_01
84
81
  client_side_validation: true,
85
82
  required: false,
86
83
  serialized_name: 'properties.subdomain',
87
- constraints: {
88
- Pattern: '^[a-z0-9-]{1,63}$'
89
- },
90
84
  type: {
91
85
  name: 'String'
92
86
  }
@@ -11,6 +11,9 @@ module Azure::IotCentral::Mgmt::V2018_09_01
11
11
  module AppSku
12
12
  F1 = "F1"
13
13
  S1 = "S1"
14
+ ST0 = "ST0"
15
+ ST1 = "ST1"
16
+ ST2 = "ST2"
14
17
  end
15
18
  end
16
19
  end
@@ -13,7 +13,7 @@ module Azure::IotCentral::Mgmt::V2018_09_01
13
13
  include MsRestAzure
14
14
 
15
15
  # @return [AppSku] The name of the SKU. Possible values include: 'F1',
16
- # 'S1'
16
+ # 'S1', 'ST0', 'ST1', 'ST2'
17
17
  attr_accessor :name
18
18
 
19
19
 
@@ -0,0 +1,107 @@
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::IotCentral::Mgmt::V2018_09_01
7
+ module Models
8
+ #
9
+ # IoT Central Application Template.
10
+ #
11
+ class AppTemplate
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] The ID of the template.
16
+ attr_accessor :manifest_id
17
+
18
+ # @return [String] The version of the template.
19
+ attr_accessor :manifest_version
20
+
21
+ # @return [String] The name of the template.
22
+ attr_accessor :app_template_name
23
+
24
+ # @return [String] The title of the template.
25
+ attr_accessor :title
26
+
27
+ # @return [Float] The order of the template in the templates list.
28
+ attr_accessor :order
29
+
30
+ # @return [String] The description of the template.
31
+ attr_accessor :description
32
+
33
+
34
+ #
35
+ # Mapper for AppTemplate class as Ruby Hash.
36
+ # This will be used for serialization/deserialization.
37
+ #
38
+ def self.mapper()
39
+ {
40
+ client_side_validation: true,
41
+ required: false,
42
+ serialized_name: 'AppTemplate',
43
+ type: {
44
+ name: 'Composite',
45
+ class_name: 'AppTemplate',
46
+ model_properties: {
47
+ manifest_id: {
48
+ client_side_validation: true,
49
+ required: false,
50
+ read_only: true,
51
+ serialized_name: 'manifestId',
52
+ type: {
53
+ name: 'String'
54
+ }
55
+ },
56
+ manifest_version: {
57
+ client_side_validation: true,
58
+ required: false,
59
+ read_only: true,
60
+ serialized_name: 'manifestVersion',
61
+ type: {
62
+ name: 'String'
63
+ }
64
+ },
65
+ app_template_name: {
66
+ client_side_validation: true,
67
+ required: false,
68
+ read_only: true,
69
+ serialized_name: 'appTemplateName',
70
+ type: {
71
+ name: 'String'
72
+ }
73
+ },
74
+ title: {
75
+ client_side_validation: true,
76
+ required: false,
77
+ read_only: true,
78
+ serialized_name: 'title',
79
+ type: {
80
+ name: 'String'
81
+ }
82
+ },
83
+ order: {
84
+ client_side_validation: true,
85
+ required: false,
86
+ read_only: true,
87
+ serialized_name: 'order',
88
+ type: {
89
+ name: 'Double'
90
+ }
91
+ },
92
+ description: {
93
+ client_side_validation: true,
94
+ required: false,
95
+ read_only: true,
96
+ serialized_name: 'description',
97
+ type: {
98
+ name: 'String'
99
+ }
100
+ }
101
+ }
102
+ }
103
+ }
104
+ end
105
+ end
106
+ end
107
+ end
@@ -0,0 +1,101 @@
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::IotCentral::Mgmt::V2018_09_01
7
+ module Models
8
+ #
9
+ # A list of IoT Central Application Templates with a next link.
10
+ #
11
+ class AppTemplatesResult
12
+
13
+ include MsRestAzure
14
+
15
+ include MsRest::JSONable
16
+ # @return [String] The link used to get the next page of IoT Central
17
+ # application templates.
18
+ attr_accessor :next_link
19
+
20
+ # @return [Array<AppTemplate>] A list of IoT Central Application
21
+ # Templates.
22
+ attr_accessor :value
23
+
24
+ # return [Proc] with next page method call.
25
+ attr_accessor :next_method
26
+
27
+ #
28
+ # Gets the rest of the items for the request, enabling auto-pagination.
29
+ #
30
+ # @return [Array<AppTemplate>] operation results.
31
+ #
32
+ def get_all_items
33
+ items = @value
34
+ page = self
35
+ while page.next_link != nil && !page.next_link.strip.empty? do
36
+ page = page.get_next_page
37
+ items.concat(page.value)
38
+ end
39
+ items
40
+ end
41
+
42
+ #
43
+ # Gets the next page of results.
44
+ #
45
+ # @return [AppTemplatesResult] with next page content.
46
+ #
47
+ def get_next_page
48
+ response = @next_method.call(@next_link).value! unless @next_method.nil?
49
+ unless response.nil?
50
+ @next_link = response.body.next_link
51
+ @value = response.body.value
52
+ self
53
+ end
54
+ end
55
+
56
+ #
57
+ # Mapper for AppTemplatesResult class as Ruby Hash.
58
+ # This will be used for serialization/deserialization.
59
+ #
60
+ def self.mapper()
61
+ {
62
+ client_side_validation: true,
63
+ required: false,
64
+ serialized_name: 'AppTemplatesResult',
65
+ type: {
66
+ name: 'Composite',
67
+ class_name: 'AppTemplatesResult',
68
+ model_properties: {
69
+ next_link: {
70
+ client_side_validation: true,
71
+ required: false,
72
+ serialized_name: 'nextLink',
73
+ type: {
74
+ name: 'String'
75
+ }
76
+ },
77
+ value: {
78
+ client_side_validation: true,
79
+ required: false,
80
+ read_only: true,
81
+ serialized_name: 'value',
82
+ type: {
83
+ name: 'Sequence',
84
+ element: {
85
+ client_side_validation: true,
86
+ required: false,
87
+ serialized_name: 'AppTemplateElementType',
88
+ type: {
89
+ name: 'Composite',
90
+ class_name: 'AppTemplate'
91
+ }
92
+ }
93
+ }
94
+ }
95
+ }
96
+ }
97
+ }
98
+ end
99
+ end
100
+ end
101
+ end
@@ -6,9 +6,9 @@
6
6
  module Azure::IotCentral::Mgmt::V2018_09_01
7
7
  module Models
8
8
  #
9
- # Error details.
9
+ # Details of error response.
10
10
  #
11
- class ErrorDetails
11
+ class CloudErrorBody
12
12
 
13
13
  include MsRestAzure
14
14
 
@@ -21,19 +21,23 @@ module Azure::IotCentral::Mgmt::V2018_09_01
21
21
  # @return [String] The target of the particular error.
22
22
  attr_accessor :target
23
23
 
24
+ # @return [Array<CloudErrorBody>] A list of additional details about the
25
+ # error.
26
+ attr_accessor :details
27
+
24
28
 
25
29
  #
26
- # Mapper for ErrorDetails class as Ruby Hash.
30
+ # Mapper for CloudErrorBody class as Ruby Hash.
27
31
  # This will be used for serialization/deserialization.
28
32
  #
29
33
  def self.mapper()
30
34
  {
31
35
  client_side_validation: true,
32
36
  required: false,
33
- serialized_name: 'ErrorDetails',
37
+ serialized_name: 'CloudErrorBody',
34
38
  type: {
35
39
  name: 'Composite',
36
- class_name: 'ErrorDetails',
40
+ class_name: 'CloudErrorBody',
37
41
  model_properties: {
38
42
  code: {
39
43
  client_side_validation: true,
@@ -61,6 +65,23 @@ module Azure::IotCentral::Mgmt::V2018_09_01
61
65
  type: {
62
66
  name: 'String'
63
67
  }
68
+ },
69
+ details: {
70
+ client_side_validation: true,
71
+ required: false,
72
+ serialized_name: 'details',
73
+ type: {
74
+ name: 'Sequence',
75
+ element: {
76
+ client_side_validation: true,
77
+ required: false,
78
+ serialized_name: 'CloudErrorBodyElementType',
79
+ type: {
80
+ name: 'Composite',
81
+ class_name: 'CloudErrorBody'
82
+ }
83
+ }
84
+ }
64
85
  }
65
86
  }
66
87
  }
@@ -16,6 +16,10 @@ module Azure::IotCentral::Mgmt::V2018_09_01
16
16
  # check.
17
17
  attr_accessor :name
18
18
 
19
+ # @return [String] The type of the IoT Central resource to query. Default
20
+ # value: 'IoTApps' .
21
+ attr_accessor :type
22
+
19
23
 
20
24
  #
21
25
  # Mapper for OperationInputs class as Ruby Hash.
@@ -37,6 +41,15 @@ module Azure::IotCentral::Mgmt::V2018_09_01
37
41
  type: {
38
42
  name: 'String'
39
43
  }
44
+ },
45
+ type: {
46
+ client_side_validation: true,
47
+ required: false,
48
+ serialized_name: 'type',
49
+ default_value: 'IoTApps',
50
+ type: {
51
+ name: 'String'
52
+ }
40
53
  }
41
54
  }
42
55
  }
@@ -33,7 +33,7 @@ module Azure::IotCentral::Mgmt::V2018_09_01
33
33
  def get_all_items
34
34
  items = @value
35
35
  page = self
36
- while page.next_link != nil do
36
+ while page.next_link != nil && !page.next_link.strip.empty? do
37
37
  page = page.get_next_page
38
38
  items.concat(page.value)
39
39
  end
@@ -82,10 +82,12 @@ module Azure::IotCentral::Mgmt::V2018_09_01
82
82
  response_content = http_response.body
83
83
  unless status_code == 200
84
84
  error_model = JSON.load(response_content)
85
- fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
85
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
86
86
  end
87
87
 
88
88
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
89
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
90
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
89
91
  # Deserialize Response
90
92
  if status_code == 200
91
93
  begin
@@ -170,10 +172,12 @@ module Azure::IotCentral::Mgmt::V2018_09_01
170
172
  response_content = http_response.body
171
173
  unless status_code == 200
172
174
  error_model = JSON.load(response_content)
173
- fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
175
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
174
176
  end
175
177
 
176
178
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
179
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
180
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
177
181
  # Deserialize Response
178
182
  if status_code == 200
179
183
  begin
@@ -12,17 +12,18 @@ module Azure::IotCentral::Profiles::Latest
12
12
  module Models
13
13
  AppListResult = Azure::IotCentral::Mgmt::V2018_09_01::Models::AppListResult
14
14
  OperationDisplay = Azure::IotCentral::Mgmt::V2018_09_01::Models::OperationDisplay
15
+ AppTemplatesResult = Azure::IotCentral::Mgmt::V2018_09_01::Models::AppTemplatesResult
15
16
  AppPatch = Azure::IotCentral::Mgmt::V2018_09_01::Models::AppPatch
16
17
  Operation = Azure::IotCentral::Mgmt::V2018_09_01::Models::Operation
17
- ErrorDetails = Azure::IotCentral::Mgmt::V2018_09_01::Models::ErrorDetails
18
+ CloudErrorBody = Azure::IotCentral::Mgmt::V2018_09_01::Models::CloudErrorBody
18
19
  OperationListResult = Azure::IotCentral::Mgmt::V2018_09_01::Models::OperationListResult
19
- Resource = Azure::IotCentral::Mgmt::V2018_09_01::Models::Resource
20
- OperationInputs = Azure::IotCentral::Mgmt::V2018_09_01::Models::OperationInputs
21
20
  AppSkuInfo = Azure::IotCentral::Mgmt::V2018_09_01::Models::AppSkuInfo
22
- AppNameAvailabilityInfo = Azure::IotCentral::Mgmt::V2018_09_01::Models::AppNameAvailabilityInfo
21
+ OperationInputs = Azure::IotCentral::Mgmt::V2018_09_01::Models::OperationInputs
22
+ AppAvailabilityInfo = Azure::IotCentral::Mgmt::V2018_09_01::Models::AppAvailabilityInfo
23
+ Resource = Azure::IotCentral::Mgmt::V2018_09_01::Models::Resource
24
+ AppTemplate = Azure::IotCentral::Mgmt::V2018_09_01::Models::AppTemplate
23
25
  App = Azure::IotCentral::Mgmt::V2018_09_01::Models::App
24
26
  AppSku = Azure::IotCentral::Mgmt::V2018_09_01::Models::AppSku
25
- AppNameUnavailabilityReason = Azure::IotCentral::Mgmt::V2018_09_01::Models::AppNameUnavailabilityReason
26
27
  end
27
28
 
28
29
  #
@@ -77,29 +78,35 @@ module Azure::IotCentral::Profiles::Latest
77
78
  def operation_display
78
79
  Azure::IotCentral::Mgmt::V2018_09_01::Models::OperationDisplay
79
80
  end
81
+ def app_templates_result
82
+ Azure::IotCentral::Mgmt::V2018_09_01::Models::AppTemplatesResult
83
+ end
80
84
  def app_patch
81
85
  Azure::IotCentral::Mgmt::V2018_09_01::Models::AppPatch
82
86
  end
83
87
  def operation
84
88
  Azure::IotCentral::Mgmt::V2018_09_01::Models::Operation
85
89
  end
86
- def error_details
87
- Azure::IotCentral::Mgmt::V2018_09_01::Models::ErrorDetails
90
+ def cloud_error_body
91
+ Azure::IotCentral::Mgmt::V2018_09_01::Models::CloudErrorBody
88
92
  end
89
93
  def operation_list_result
90
94
  Azure::IotCentral::Mgmt::V2018_09_01::Models::OperationListResult
91
95
  end
92
- def resource
93
- Azure::IotCentral::Mgmt::V2018_09_01::Models::Resource
96
+ def app_sku_info
97
+ Azure::IotCentral::Mgmt::V2018_09_01::Models::AppSkuInfo
94
98
  end
95
99
  def operation_inputs
96
100
  Azure::IotCentral::Mgmt::V2018_09_01::Models::OperationInputs
97
101
  end
98
- def app_sku_info
99
- Azure::IotCentral::Mgmt::V2018_09_01::Models::AppSkuInfo
102
+ def app_availability_info
103
+ Azure::IotCentral::Mgmt::V2018_09_01::Models::AppAvailabilityInfo
100
104
  end
101
- def app_name_availability_info
102
- Azure::IotCentral::Mgmt::V2018_09_01::Models::AppNameAvailabilityInfo
105
+ def resource
106
+ Azure::IotCentral::Mgmt::V2018_09_01::Models::Resource
107
+ end
108
+ def app_template
109
+ Azure::IotCentral::Mgmt::V2018_09_01::Models::AppTemplate
103
110
  end
104
111
  def app
105
112
  Azure::IotCentral::Mgmt::V2018_09_01::Models::App
@@ -107,9 +114,6 @@ module Azure::IotCentral::Profiles::Latest
107
114
  def app_sku
108
115
  Azure::IotCentral::Mgmt::V2018_09_01::Models::AppSku
109
116
  end
110
- def app_name_unavailability_reason
111
- Azure::IotCentral::Mgmt::V2018_09_01::Models::AppNameUnavailabilityReason
112
- end
113
117
  end
114
118
  end
115
119
  end
@@ -3,5 +3,5 @@
3
3
  # Licensed under the MIT License. See License.txt in the project root for license information.
4
4
 
5
5
  module Azure::IotCentral::Mgmt
6
- VERSION = '0.17.1'
6
+ VERSION = '0.19.1'
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: azure_mgmt_iot_central
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.1
4
+ version: 0.19.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Microsoft Corporation
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-14 00:00:00.000000000 Z
11
+ date: 2020-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 0.11.0
75
+ version: 0.12.0
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 0.11.0
82
+ version: 0.12.0
83
83
  description: Microsoft Azure IotCentral Management Client Library for Ruby
84
84
  email: azrubyteam@microsoft.com
85
85
  executables: []
@@ -109,13 +109,14 @@ files:
109
109
  - lib/2018-09-01/generated/azure_mgmt_iot_central/apps.rb
110
110
  - lib/2018-09-01/generated/azure_mgmt_iot_central/iot_central_client.rb
111
111
  - lib/2018-09-01/generated/azure_mgmt_iot_central/models/app.rb
112
+ - lib/2018-09-01/generated/azure_mgmt_iot_central/models/app_availability_info.rb
112
113
  - lib/2018-09-01/generated/azure_mgmt_iot_central/models/app_list_result.rb
113
- - lib/2018-09-01/generated/azure_mgmt_iot_central/models/app_name_availability_info.rb
114
- - lib/2018-09-01/generated/azure_mgmt_iot_central/models/app_name_unavailability_reason.rb
115
114
  - lib/2018-09-01/generated/azure_mgmt_iot_central/models/app_patch.rb
116
115
  - lib/2018-09-01/generated/azure_mgmt_iot_central/models/app_sku.rb
117
116
  - lib/2018-09-01/generated/azure_mgmt_iot_central/models/app_sku_info.rb
118
- - lib/2018-09-01/generated/azure_mgmt_iot_central/models/error_details.rb
117
+ - lib/2018-09-01/generated/azure_mgmt_iot_central/models/app_template.rb
118
+ - lib/2018-09-01/generated/azure_mgmt_iot_central/models/app_templates_result.rb
119
+ - lib/2018-09-01/generated/azure_mgmt_iot_central/models/cloud_error_body.rb
119
120
  - lib/2018-09-01/generated/azure_mgmt_iot_central/models/operation.rb
120
121
  - lib/2018-09-01/generated/azure_mgmt_iot_central/models/operation_display.rb
121
122
  - lib/2018-09-01/generated/azure_mgmt_iot_central/models/operation_inputs.rb
@@ -154,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
154
155
  version: '0'
155
156
  requirements: []
156
157
  rubyforge_project:
157
- rubygems_version: 2.5.1
158
+ rubygems_version: 2.7.8
158
159
  signing_key:
159
160
  specification_version: 4
160
161
  summary: Official Ruby client library to consume Microsoft Azure IotCentral Management
@@ -1,16 +0,0 @@
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::IotCentral::Mgmt::V2018_09_01
7
- module Models
8
- #
9
- # Defines values for AppNameUnavailabilityReason
10
- #
11
- module AppNameUnavailabilityReason
12
- Invalid = "Invalid"
13
- AlreadyExists = "AlreadyExists"
14
- end
15
- end
16
- end