azure_mgmt_notification_hubs 0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +5 -13
  2. data/azure_mgmt_notification_hubs.gemspec +4 -5
  3. data/lib/azure_mgmt_notification_hubs.rb +3 -56
  4. data/lib/generated/azure_mgmt_notification_hubs.rb +58 -0
  5. data/lib/{azure_mgmt_notification_hubs → generated/azure_mgmt_notification_hubs}/models/access_rights.rb +0 -0
  6. data/lib/generated/azure_mgmt_notification_hubs/models/adm_credential.rb +46 -0
  7. data/lib/generated/azure_mgmt_notification_hubs/models/adm_credential_properties.rb +64 -0
  8. data/lib/generated/azure_mgmt_notification_hubs/models/apns_credential.rb +46 -0
  9. data/lib/generated/azure_mgmt_notification_hubs/models/apns_credential_properties.rb +74 -0
  10. data/lib/generated/azure_mgmt_notification_hubs/models/baidu_credential.rb +46 -0
  11. data/lib/generated/azure_mgmt_notification_hubs/models/baidu_credential_properties.rb +64 -0
  12. data/lib/generated/azure_mgmt_notification_hubs/models/check_availability_parameters.rb +83 -0
  13. data/lib/generated/azure_mgmt_notification_hubs/models/check_availability_resource.rb +102 -0
  14. data/lib/generated/azure_mgmt_notification_hubs/models/gcm_credential.rb +46 -0
  15. data/lib/generated/azure_mgmt_notification_hubs/models/gcm_credential_properties.rb +54 -0
  16. data/lib/generated/azure_mgmt_notification_hubs/models/mpns_credential.rb +46 -0
  17. data/lib/generated/azure_mgmt_notification_hubs/models/mpns_credential_properties.rb +64 -0
  18. data/lib/generated/azure_mgmt_notification_hubs/models/namespace_create_or_update_parameters.rb +72 -0
  19. data/lib/generated/azure_mgmt_notification_hubs/models/namespace_list_result.rb +95 -0
  20. data/lib/generated/azure_mgmt_notification_hubs/models/namespace_properties.rb +153 -0
  21. data/lib/generated/azure_mgmt_notification_hubs/models/namespace_resource.rb +102 -0
  22. data/lib/{azure_mgmt_notification_hubs → generated/azure_mgmt_notification_hubs}/models/namespace_type.rb +0 -0
  23. data/lib/generated/azure_mgmt_notification_hubs/models/notification_hub_create_or_update_parameters.rb +73 -0
  24. data/lib/generated/azure_mgmt_notification_hubs/models/notification_hub_list_result.rb +95 -0
  25. data/lib/generated/azure_mgmt_notification_hubs/models/notification_hub_properties.rb +145 -0
  26. data/lib/generated/azure_mgmt_notification_hubs/models/notification_hub_resource.rb +105 -0
  27. data/lib/generated/azure_mgmt_notification_hubs/models/resource_list_keys.rb +56 -0
  28. data/lib/generated/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_create_or_update_parameters.rb +67 -0
  29. data/lib/generated/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_list_result.rb +97 -0
  30. data/lib/generated/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_properties.rb +133 -0
  31. data/lib/generated/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_resource.rb +107 -0
  32. data/lib/generated/azure_mgmt_notification_hubs/models/wns_credential.rb +46 -0
  33. data/lib/generated/azure_mgmt_notification_hubs/models/wns_credential_properties.rb +64 -0
  34. data/lib/{azure_mgmt_notification_hubs → generated/azure_mgmt_notification_hubs}/module_definition.rb +0 -0
  35. data/lib/{azure_mgmt_notification_hubs → generated/azure_mgmt_notification_hubs}/namespaces.rb +166 -82
  36. data/lib/{azure_mgmt_notification_hubs → generated/azure_mgmt_notification_hubs}/notification_hubs.rb +119 -72
  37. data/lib/{azure_mgmt_notification_hubs → generated/azure_mgmt_notification_hubs}/notification_hubs_management_client.rb +4 -4
  38. data/lib/{azure_mgmt_notification_hubs → generated/azure_mgmt_notification_hubs}/version.rb +1 -1
  39. metadata +56 -76
  40. data/lib/azure_mgmt_notification_hubs/models/adm_credential.rb +0 -63
  41. data/lib/azure_mgmt_notification_hubs/models/adm_credential_properties.rb +0 -74
  42. data/lib/azure_mgmt_notification_hubs/models/apns_credential.rb +0 -63
  43. data/lib/azure_mgmt_notification_hubs/models/apns_credential_properties.rb +0 -83
  44. data/lib/azure_mgmt_notification_hubs/models/baidu_credential.rb +0 -63
  45. data/lib/azure_mgmt_notification_hubs/models/baidu_credential_properties.rb +0 -74
  46. data/lib/azure_mgmt_notification_hubs/models/check_availability_parameters.rb +0 -86
  47. data/lib/azure_mgmt_notification_hubs/models/check_availability_resource.rb +0 -102
  48. data/lib/azure_mgmt_notification_hubs/models/gcm_credential.rb +0 -63
  49. data/lib/azure_mgmt_notification_hubs/models/gcm_credential_properties.rb +0 -65
  50. data/lib/azure_mgmt_notification_hubs/models/mpns_credential.rb +0 -63
  51. data/lib/azure_mgmt_notification_hubs/models/mpns_credential_properties.rb +0 -74
  52. data/lib/azure_mgmt_notification_hubs/models/namespace_create_or_update_parameters.rb +0 -83
  53. data/lib/azure_mgmt_notification_hubs/models/namespace_list_result.rb +0 -87
  54. data/lib/azure_mgmt_notification_hubs/models/namespace_properties.rb +0 -159
  55. data/lib/azure_mgmt_notification_hubs/models/namespace_resource.rb +0 -108
  56. data/lib/azure_mgmt_notification_hubs/models/notification_hub_create_or_update_parameters.rb +0 -84
  57. data/lib/azure_mgmt_notification_hubs/models/notification_hub_list_result.rb +0 -87
  58. data/lib/azure_mgmt_notification_hubs/models/notification_hub_properties.rb +0 -197
  59. data/lib/azure_mgmt_notification_hubs/models/notification_hub_resource.rb +0 -111
  60. data/lib/azure_mgmt_notification_hubs/models/resource_list_keys.rb +0 -67
  61. data/lib/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_create_or_update_parameters.rb +0 -83
  62. data/lib/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_list_result.rb +0 -87
  63. data/lib/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_properties.rb +0 -145
  64. data/lib/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_resource.rb +0 -113
  65. data/lib/azure_mgmt_notification_hubs/models/wns_credential.rb +0 -63
  66. data/lib/azure_mgmt_notification_hubs/models/wns_credential_properties.rb +0 -74
@@ -68,21 +68,23 @@ module Azure::ARM::NotificationHubs
68
68
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
69
69
  fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
70
70
  fail ArgumentError, 'parameters is nil' if parameters.nil?
71
- parameters.validate unless parameters.nil?
72
71
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
73
72
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
73
+
74
+
74
75
  request_headers = {}
75
76
 
76
77
  # Set Headers
77
78
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
78
79
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
79
80
 
80
- # Serialize Request
81
81
  request_headers['Content-Type'] = 'application/json; charset=utf-8'
82
- unless parameters.nil?
83
- parameters = CheckAvailabilityParameters.serialize_object(parameters)
84
- end
85
- request_content = parameters != nil ? JSON.generate(parameters, quirks_mode: true) : nil
82
+
83
+ # Serialize Request
84
+ request_mapper = CheckAvailabilityParameters.mapper()
85
+ request_content = @client.serialize(request_mapper, parameters, 'parameters')
86
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
87
+
86
88
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/checkNotificationHubAvailability'
87
89
  options = {
88
90
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
@@ -114,10 +116,8 @@ module Azure::ARM::NotificationHubs
114
116
  if status_code == 200
115
117
  begin
116
118
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
117
- unless parsed_response.nil?
118
- parsed_response = CheckAvailabilityResource.deserialize_object(parsed_response)
119
- end
120
- result.body = parsed_response
119
+ result_mapper = CheckAvailabilityResource.mapper()
120
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
121
121
  rescue Exception => e
122
122
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
123
123
  end
@@ -182,21 +182,23 @@ module Azure::ARM::NotificationHubs
182
182
  fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
183
183
  fail ArgumentError, 'notification_hub_name is nil' if notification_hub_name.nil?
184
184
  fail ArgumentError, 'parameters is nil' if parameters.nil?
185
- parameters.validate unless parameters.nil?
186
185
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
187
186
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
187
+
188
+
188
189
  request_headers = {}
189
190
 
190
191
  # Set Headers
191
192
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
192
193
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
193
194
 
194
- # Serialize Request
195
195
  request_headers['Content-Type'] = 'application/json; charset=utf-8'
196
- unless parameters.nil?
197
- parameters = NotificationHubCreateOrUpdateParameters.serialize_object(parameters)
198
- end
199
- request_content = parameters != nil ? JSON.generate(parameters, quirks_mode: true) : nil
196
+
197
+ # Serialize Request
198
+ request_mapper = NotificationHubCreateOrUpdateParameters.mapper()
199
+ request_content = @client.serialize(request_mapper, parameters, 'parameters')
200
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
201
+
200
202
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}'
201
203
  options = {
202
204
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
@@ -228,10 +230,8 @@ module Azure::ARM::NotificationHubs
228
230
  if status_code == 200
229
231
  begin
230
232
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
231
- unless parsed_response.nil?
232
- parsed_response = NotificationHubResource.deserialize_object(parsed_response)
233
- end
234
- result.body = parsed_response
233
+ result_mapper = NotificationHubResource.mapper()
234
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
235
235
  rescue Exception => e
236
236
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
237
237
  end
@@ -240,10 +240,8 @@ module Azure::ARM::NotificationHubs
240
240
  if status_code == 201
241
241
  begin
242
242
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
243
- unless parsed_response.nil?
244
- parsed_response = NotificationHubResource.deserialize_object(parsed_response)
245
- end
246
- result.body = parsed_response
243
+ result_mapper = NotificationHubResource.mapper()
244
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
247
245
  rescue Exception => e
248
246
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
249
247
  end
@@ -302,6 +300,8 @@ module Azure::ARM::NotificationHubs
302
300
  fail ArgumentError, 'notification_hub_name is nil' if notification_hub_name.nil?
303
301
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
304
302
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
303
+
304
+
305
305
  request_headers = {}
306
306
 
307
307
  # Set Headers
@@ -388,6 +388,8 @@ module Azure::ARM::NotificationHubs
388
388
  fail ArgumentError, 'notification_hub_name is nil' if notification_hub_name.nil?
389
389
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
390
390
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
391
+
392
+
391
393
  request_headers = {}
392
394
 
393
395
  # Set Headers
@@ -423,10 +425,8 @@ module Azure::ARM::NotificationHubs
423
425
  if status_code == 200
424
426
  begin
425
427
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
426
- unless parsed_response.nil?
427
- parsed_response = NotificationHubResource.deserialize_object(parsed_response)
428
- end
429
- result.body = parsed_response
428
+ result_mapper = NotificationHubResource.mapper()
429
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
430
430
  rescue Exception => e
431
431
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
432
432
  end
@@ -495,21 +495,23 @@ module Azure::ARM::NotificationHubs
495
495
  fail ArgumentError, 'notification_hub_name is nil' if notification_hub_name.nil?
496
496
  fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil?
497
497
  fail ArgumentError, 'parameters is nil' if parameters.nil?
498
- parameters.validate unless parameters.nil?
499
498
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
500
499
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
500
+
501
+
501
502
  request_headers = {}
502
503
 
503
504
  # Set Headers
504
505
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
505
506
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
506
507
 
507
- # Serialize Request
508
508
  request_headers['Content-Type'] = 'application/json; charset=utf-8'
509
- unless parameters.nil?
510
- parameters = SharedAccessAuthorizationRuleCreateOrUpdateParameters.serialize_object(parameters)
511
- end
512
- request_content = parameters != nil ? JSON.generate(parameters, quirks_mode: true) : nil
509
+
510
+ # Serialize Request
511
+ request_mapper = SharedAccessAuthorizationRuleCreateOrUpdateParameters.mapper()
512
+ request_content = @client.serialize(request_mapper, parameters, 'parameters')
513
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
514
+
513
515
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NotificationHubs/namespaces/{namespaceName}/notificationHubs/{notificationHubName}/AuthorizationRules/{authorizationRuleName}'
514
516
  options = {
515
517
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
@@ -541,10 +543,8 @@ module Azure::ARM::NotificationHubs
541
543
  if status_code == 200
542
544
  begin
543
545
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
544
- unless parsed_response.nil?
545
- parsed_response = SharedAccessAuthorizationRuleResource.deserialize_object(parsed_response)
546
- end
547
- result.body = parsed_response
546
+ result_mapper = SharedAccessAuthorizationRuleResource.mapper()
547
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
548
548
  rescue Exception => e
549
549
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
550
550
  end
@@ -607,6 +607,8 @@ module Azure::ARM::NotificationHubs
607
607
  fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil?
608
608
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
609
609
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
610
+
611
+
610
612
  request_headers = {}
611
613
 
612
614
  # Set Headers
@@ -697,6 +699,8 @@ module Azure::ARM::NotificationHubs
697
699
  fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil?
698
700
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
699
701
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
702
+
703
+
700
704
  request_headers = {}
701
705
 
702
706
  # Set Headers
@@ -732,10 +736,8 @@ module Azure::ARM::NotificationHubs
732
736
  if status_code == 200
733
737
  begin
734
738
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
735
- unless parsed_response.nil?
736
- parsed_response = SharedAccessAuthorizationRuleResource.deserialize_object(parsed_response)
737
- end
738
- result.body = parsed_response
739
+ result_mapper = SharedAccessAuthorizationRuleResource.mapper()
740
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
739
741
  rescue Exception => e
740
742
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
741
743
  end
@@ -755,11 +757,33 @@ module Azure::ARM::NotificationHubs
755
757
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
756
758
  # will be added to the HTTP request.
757
759
  #
758
- # @return [NotificationHubListResult] operation results.
760
+ # @return [NotificationHubListResult] which provide lazy access to pages of
761
+ # the response.
759
762
  #
760
- def list(resource_group_name, namespace_name, custom_headers = nil)
763
+ def list_as_lazy(resource_group_name, namespace_name, custom_headers = nil)
761
764
  response = list_async(resource_group_name, namespace_name, custom_headers).value!
762
- response.body unless response.nil?
765
+ unless response.nil?
766
+ page = response.body
767
+ page.next_method = Proc.new do |next_link|
768
+ list_next_async(next_link, custom_headers)
769
+ end
770
+ page
771
+ end
772
+ end
773
+
774
+ #
775
+ # Lists the notification hubs associated with a namespace.
776
+ #
777
+ # @param resource_group_name [String] The name of the resource group.
778
+ # @param namespace_name [String] The namespace name.
779
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
780
+ # will be added to the HTTP request.
781
+ #
782
+ # @return [Array<NotificationHubResource>] operation results.
783
+ #
784
+ def list(resource_group_name, namespace_name, custom_headers = nil)
785
+ first_page = list_as_lazy(resource_group_name, namespace_name, custom_headers)
786
+ first_page.get_all_items
763
787
  end
764
788
 
765
789
  #
@@ -791,6 +815,8 @@ module Azure::ARM::NotificationHubs
791
815
  fail ArgumentError, 'namespace_name is nil' if namespace_name.nil?
792
816
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
793
817
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
818
+
819
+
794
820
  request_headers = {}
795
821
 
796
822
  # Set Headers
@@ -826,10 +852,8 @@ module Azure::ARM::NotificationHubs
826
852
  if status_code == 200
827
853
  begin
828
854
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
829
- unless parsed_response.nil?
830
- parsed_response = NotificationHubListResult.deserialize_object(parsed_response)
831
- end
832
- result.body = parsed_response
855
+ result_mapper = NotificationHubListResult.mapper()
856
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
833
857
  rescue Exception => e
834
858
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
835
859
  end
@@ -850,11 +874,34 @@ module Azure::ARM::NotificationHubs
850
874
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
851
875
  # will be added to the HTTP request.
852
876
  #
853
- # @return [SharedAccessAuthorizationRuleListResult] operation results.
877
+ # @return [SharedAccessAuthorizationRuleListResult] which provide lazy access
878
+ # to pages of the response.
854
879
  #
855
- def list_authorization_rules(resource_group_name, namespace_name, notification_hub_name, custom_headers = nil)
880
+ def list_authorization_rules_as_lazy(resource_group_name, namespace_name, notification_hub_name, custom_headers = nil)
856
881
  response = list_authorization_rules_async(resource_group_name, namespace_name, notification_hub_name, custom_headers).value!
857
- response.body unless response.nil?
882
+ unless response.nil?
883
+ page = response.body
884
+ page.next_method = Proc.new do |next_link|
885
+ list_authorization_rules_next_async(next_link, custom_headers)
886
+ end
887
+ page
888
+ end
889
+ end
890
+
891
+ #
892
+ # Gets the authorization rules for a NotificationHub.
893
+ #
894
+ # @param resource_group_name [String] The name of the resource group.
895
+ # @param namespace_name [String] The namespace name
896
+ # @param notification_hub_name [String] The notification hub name.
897
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
898
+ # will be added to the HTTP request.
899
+ #
900
+ # @return [Array<SharedAccessAuthorizationRuleResource>] operation results.
901
+ #
902
+ def list_authorization_rules(resource_group_name, namespace_name, notification_hub_name, custom_headers = nil)
903
+ first_page = list_authorization_rules_as_lazy(resource_group_name, namespace_name, notification_hub_name, custom_headers)
904
+ first_page.get_all_items
858
905
  end
859
906
 
860
907
  #
@@ -889,6 +936,8 @@ module Azure::ARM::NotificationHubs
889
936
  fail ArgumentError, 'notification_hub_name is nil' if notification_hub_name.nil?
890
937
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
891
938
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
939
+
940
+
892
941
  request_headers = {}
893
942
 
894
943
  # Set Headers
@@ -924,10 +973,8 @@ module Azure::ARM::NotificationHubs
924
973
  if status_code == 200
925
974
  begin
926
975
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
927
- unless parsed_response.nil?
928
- parsed_response = SharedAccessAuthorizationRuleListResult.deserialize_object(parsed_response)
929
- end
930
- result.body = parsed_response
976
+ result_mapper = SharedAccessAuthorizationRuleListResult.mapper()
977
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
931
978
  rescue Exception => e
932
979
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
933
980
  end
@@ -994,6 +1041,8 @@ module Azure::ARM::NotificationHubs
994
1041
  fail ArgumentError, 'authorization_rule_name is nil' if authorization_rule_name.nil?
995
1042
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
996
1043
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1044
+
1045
+
997
1046
  request_headers = {}
998
1047
 
999
1048
  # Set Headers
@@ -1029,10 +1078,8 @@ module Azure::ARM::NotificationHubs
1029
1078
  if status_code == 200
1030
1079
  begin
1031
1080
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1032
- unless parsed_response.nil?
1033
- parsed_response = ResourceListKeys.deserialize_object(parsed_response)
1034
- end
1035
- result.body = parsed_response
1081
+ result_mapper = ResourceListKeys.mapper()
1082
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
1036
1083
  rescue Exception => e
1037
1084
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1038
1085
  end
@@ -1092,6 +1139,8 @@ module Azure::ARM::NotificationHubs
1092
1139
  fail ArgumentError, 'notification_hub_name is nil' if notification_hub_name.nil?
1093
1140
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
1094
1141
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
1142
+
1143
+
1095
1144
  request_headers = {}
1096
1145
 
1097
1146
  # Set Headers
@@ -1127,10 +1176,8 @@ module Azure::ARM::NotificationHubs
1127
1176
  if status_code == 200
1128
1177
  begin
1129
1178
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1130
- unless parsed_response.nil?
1131
- parsed_response = NotificationHubResource.deserialize_object(parsed_response)
1132
- end
1133
- result.body = parsed_response
1179
+ result_mapper = NotificationHubResource.mapper()
1180
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
1134
1181
  rescue Exception => e
1135
1182
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1136
1183
  end
@@ -1183,6 +1230,8 @@ module Azure::ARM::NotificationHubs
1183
1230
  #
1184
1231
  def list_next_async(next_page_link, custom_headers = nil)
1185
1232
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1233
+
1234
+
1186
1235
  request_headers = {}
1187
1236
 
1188
1237
  # Set Headers
@@ -1217,10 +1266,8 @@ module Azure::ARM::NotificationHubs
1217
1266
  if status_code == 200
1218
1267
  begin
1219
1268
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1220
- unless parsed_response.nil?
1221
- parsed_response = NotificationHubListResult.deserialize_object(parsed_response)
1222
- end
1223
- result.body = parsed_response
1269
+ result_mapper = NotificationHubListResult.mapper()
1270
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
1224
1271
  rescue Exception => e
1225
1272
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1226
1273
  end
@@ -1273,6 +1320,8 @@ module Azure::ARM::NotificationHubs
1273
1320
  #
1274
1321
  def list_authorization_rules_next_async(next_page_link, custom_headers = nil)
1275
1322
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
1323
+
1324
+
1276
1325
  request_headers = {}
1277
1326
 
1278
1327
  # Set Headers
@@ -1307,10 +1356,8 @@ module Azure::ARM::NotificationHubs
1307
1356
  if status_code == 200
1308
1357
  begin
1309
1358
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
1310
- unless parsed_response.nil?
1311
- parsed_response = SharedAccessAuthorizationRuleListResult.deserialize_object(parsed_response)
1312
- end
1313
- result.body = parsed_response
1359
+ result_mapper = SharedAccessAuthorizationRuleListResult.mapper()
1360
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
1314
1361
  rescue Exception => e
1315
1362
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
1316
1363
  end
@@ -8,13 +8,13 @@ module Azure::ARM::NotificationHubs
8
8
  # A service client - single point of access to the REST API.
9
9
  #
10
10
  class NotificationHubsManagementClient < MsRestAzure::AzureServiceClient
11
- include Azure::ARM::NotificationHubs::Models
11
+ include MsRest::Serialization
12
12
  include MsRestAzure
13
13
 
14
14
  # @return [String] the base URI of the service.
15
15
  attr_accessor :base_url
16
16
 
17
- # @return Gets Azure subscription credentials.
17
+ # @return Credentials needed for the client to connect to Azure.
18
18
  attr_reader :credentials
19
19
 
20
20
  # @return [String] Gets subscription credentials which uniquely identify
@@ -40,10 +40,10 @@ module Azure::ARM::NotificationHubs
40
40
  # subscription.
41
41
  attr_accessor :credentials
42
42
 
43
- # @return namespaces
43
+ # @return [Namespaces] namespaces
44
44
  attr_reader :namespaces
45
45
 
46
- # @return notification_hubs
46
+ # @return [NotificationHubs] notification_hubs
47
47
  attr_reader :notification_hubs
48
48
 
49
49
  #
@@ -4,5 +4,5 @@
4
4
  # regenerated.
5
5
 
6
6
  module Azure::ARM::NotificationHubs
7
- VERSION = '0.3.1'
7
+ VERSION = '0.4.0'
8
8
  end
metadata CHANGED
@@ -1,152 +1,132 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: azure_mgmt_notification_hubs
3
3
  version: !ruby/object:Gem::Version
4
- version: !binary |-
5
- MC4zLjE=
4
+ version: 0.4.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Microsoft Corporation
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2016-05-24 00:00:00.000000000 Z
11
+ date: 2016-07-22 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: bundler
16
15
  requirement: !ruby/object:Gem::Requirement
17
16
  requirements:
18
- - - ~>
17
+ - - "~>"
19
18
  - !ruby/object:Gem::Version
20
19
  version: '1.9'
21
20
  type: :development
22
21
  prerelease: false
23
22
  version_requirements: !ruby/object:Gem::Requirement
24
23
  requirements:
25
- - - ~>
24
+ - - "~>"
26
25
  - !ruby/object:Gem::Version
27
26
  version: '1.9'
28
27
  - !ruby/object:Gem::Dependency
29
28
  name: rake
30
29
  requirement: !ruby/object:Gem::Requirement
31
30
  requirements:
32
- - - ~>
31
+ - - "~>"
33
32
  - !ruby/object:Gem::Version
34
33
  version: '10'
35
34
  type: :development
36
35
  prerelease: false
37
36
  version_requirements: !ruby/object:Gem::Requirement
38
37
  requirements:
39
- - - ~>
38
+ - - "~>"
40
39
  - !ruby/object:Gem::Version
41
40
  version: '10'
42
41
  - !ruby/object:Gem::Dependency
43
42
  name: rspec
44
43
  requirement: !ruby/object:Gem::Requirement
45
44
  requirements:
46
- - - ~>
45
+ - - "~>"
47
46
  - !ruby/object:Gem::Version
48
- version: !binary |-
49
- Mw==
47
+ version: '3'
50
48
  type: :development
51
49
  prerelease: false
52
50
  version_requirements: !ruby/object:Gem::Requirement
53
51
  requirements:
54
- - - ~>
52
+ - - "~>"
55
53
  - !ruby/object:Gem::Version
56
- version: !binary |-
57
- Mw==
54
+ version: '3'
58
55
  - !ruby/object:Gem::Dependency
59
56
  name: dotenv
60
57
  requirement: !ruby/object:Gem::Requirement
61
58
  requirements:
62
- - - ~>
59
+ - - "~>"
63
60
  - !ruby/object:Gem::Version
64
61
  version: '2'
65
62
  type: :development
66
63
  prerelease: false
67
64
  version_requirements: !ruby/object:Gem::Requirement
68
65
  requirements:
69
- - - ~>
66
+ - - "~>"
70
67
  - !ruby/object:Gem::Version
71
68
  version: '2'
72
- - !ruby/object:Gem::Dependency
73
- name: azure_mgmt_resources
74
- requirement: !ruby/object:Gem::Requirement
75
- requirements:
76
- - - ~>
77
- - !ruby/object:Gem::Version
78
- version: !binary |-
79
- MC4z
80
- type: :development
81
- prerelease: false
82
- version_requirements: !ruby/object:Gem::Requirement
83
- requirements:
84
- - - ~>
85
- - !ruby/object:Gem::Version
86
- version: !binary |-
87
- MC4z
88
69
  - !ruby/object:Gem::Dependency
89
70
  name: ms_rest_azure
90
71
  requirement: !ruby/object:Gem::Requirement
91
72
  requirements:
92
- - - ~>
73
+ - - "~>"
93
74
  - !ruby/object:Gem::Version
94
- version: !binary |-
95
- MC4yLjM=
75
+ version: 0.3.0
96
76
  type: :runtime
97
77
  prerelease: false
98
78
  version_requirements: !ruby/object:Gem::Requirement
99
79
  requirements:
100
- - - ~>
80
+ - - "~>"
101
81
  - !ruby/object:Gem::Version
102
- version: !binary |-
103
- MC4yLjM=
82
+ version: 0.3.0
104
83
  description: Microsoft Azure Notification Hubs Management Client Library for Ruby
105
84
  email: azrubyteam@microsoft.com
106
85
  executables: []
107
86
  extensions: []
108
87
  extra_rdoc_files: []
109
88
  files:
110
- - .rspec
89
+ - ".rspec"
111
90
  - LICENSE.txt
112
91
  - Rakefile
113
92
  - azure_mgmt_notification_hubs.gemspec
114
93
  - lib/azure_mgmt_notification_hubs.rb
115
- - lib/azure_mgmt_notification_hubs/models/access_rights.rb
116
- - lib/azure_mgmt_notification_hubs/models/adm_credential.rb
117
- - lib/azure_mgmt_notification_hubs/models/adm_credential_properties.rb
118
- - lib/azure_mgmt_notification_hubs/models/apns_credential.rb
119
- - lib/azure_mgmt_notification_hubs/models/apns_credential_properties.rb
120
- - lib/azure_mgmt_notification_hubs/models/baidu_credential.rb
121
- - lib/azure_mgmt_notification_hubs/models/baidu_credential_properties.rb
122
- - lib/azure_mgmt_notification_hubs/models/check_availability_parameters.rb
123
- - lib/azure_mgmt_notification_hubs/models/check_availability_resource.rb
124
- - lib/azure_mgmt_notification_hubs/models/gcm_credential.rb
125
- - lib/azure_mgmt_notification_hubs/models/gcm_credential_properties.rb
126
- - lib/azure_mgmt_notification_hubs/models/mpns_credential.rb
127
- - lib/azure_mgmt_notification_hubs/models/mpns_credential_properties.rb
128
- - lib/azure_mgmt_notification_hubs/models/namespace_create_or_update_parameters.rb
129
- - lib/azure_mgmt_notification_hubs/models/namespace_list_result.rb
130
- - lib/azure_mgmt_notification_hubs/models/namespace_properties.rb
131
- - lib/azure_mgmt_notification_hubs/models/namespace_resource.rb
132
- - lib/azure_mgmt_notification_hubs/models/namespace_type.rb
133
- - lib/azure_mgmt_notification_hubs/models/notification_hub_create_or_update_parameters.rb
134
- - lib/azure_mgmt_notification_hubs/models/notification_hub_list_result.rb
135
- - lib/azure_mgmt_notification_hubs/models/notification_hub_properties.rb
136
- - lib/azure_mgmt_notification_hubs/models/notification_hub_resource.rb
137
- - lib/azure_mgmt_notification_hubs/models/resource_list_keys.rb
138
- - lib/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_create_or_update_parameters.rb
139
- - lib/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_list_result.rb
140
- - lib/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_properties.rb
141
- - lib/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_resource.rb
142
- - lib/azure_mgmt_notification_hubs/models/wns_credential.rb
143
- - lib/azure_mgmt_notification_hubs/models/wns_credential_properties.rb
144
- - lib/azure_mgmt_notification_hubs/module_definition.rb
145
- - lib/azure_mgmt_notification_hubs/namespaces.rb
146
- - lib/azure_mgmt_notification_hubs/notification_hubs.rb
147
- - lib/azure_mgmt_notification_hubs/notification_hubs_management_client.rb
148
- - lib/azure_mgmt_notification_hubs/version.rb
149
- homepage: http://github.com/azure/azure-sdk-ruby
94
+ - lib/generated/azure_mgmt_notification_hubs.rb
95
+ - lib/generated/azure_mgmt_notification_hubs/models/access_rights.rb
96
+ - lib/generated/azure_mgmt_notification_hubs/models/adm_credential.rb
97
+ - lib/generated/azure_mgmt_notification_hubs/models/adm_credential_properties.rb
98
+ - lib/generated/azure_mgmt_notification_hubs/models/apns_credential.rb
99
+ - lib/generated/azure_mgmt_notification_hubs/models/apns_credential_properties.rb
100
+ - lib/generated/azure_mgmt_notification_hubs/models/baidu_credential.rb
101
+ - lib/generated/azure_mgmt_notification_hubs/models/baidu_credential_properties.rb
102
+ - lib/generated/azure_mgmt_notification_hubs/models/check_availability_parameters.rb
103
+ - lib/generated/azure_mgmt_notification_hubs/models/check_availability_resource.rb
104
+ - lib/generated/azure_mgmt_notification_hubs/models/gcm_credential.rb
105
+ - lib/generated/azure_mgmt_notification_hubs/models/gcm_credential_properties.rb
106
+ - lib/generated/azure_mgmt_notification_hubs/models/mpns_credential.rb
107
+ - lib/generated/azure_mgmt_notification_hubs/models/mpns_credential_properties.rb
108
+ - lib/generated/azure_mgmt_notification_hubs/models/namespace_create_or_update_parameters.rb
109
+ - lib/generated/azure_mgmt_notification_hubs/models/namespace_list_result.rb
110
+ - lib/generated/azure_mgmt_notification_hubs/models/namespace_properties.rb
111
+ - lib/generated/azure_mgmt_notification_hubs/models/namespace_resource.rb
112
+ - lib/generated/azure_mgmt_notification_hubs/models/namespace_type.rb
113
+ - lib/generated/azure_mgmt_notification_hubs/models/notification_hub_create_or_update_parameters.rb
114
+ - lib/generated/azure_mgmt_notification_hubs/models/notification_hub_list_result.rb
115
+ - lib/generated/azure_mgmt_notification_hubs/models/notification_hub_properties.rb
116
+ - lib/generated/azure_mgmt_notification_hubs/models/notification_hub_resource.rb
117
+ - lib/generated/azure_mgmt_notification_hubs/models/resource_list_keys.rb
118
+ - lib/generated/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_create_or_update_parameters.rb
119
+ - lib/generated/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_list_result.rb
120
+ - lib/generated/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_properties.rb
121
+ - lib/generated/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_resource.rb
122
+ - lib/generated/azure_mgmt_notification_hubs/models/wns_credential.rb
123
+ - lib/generated/azure_mgmt_notification_hubs/models/wns_credential_properties.rb
124
+ - lib/generated/azure_mgmt_notification_hubs/module_definition.rb
125
+ - lib/generated/azure_mgmt_notification_hubs/namespaces.rb
126
+ - lib/generated/azure_mgmt_notification_hubs/notification_hubs.rb
127
+ - lib/generated/azure_mgmt_notification_hubs/notification_hubs_management_client.rb
128
+ - lib/generated/azure_mgmt_notification_hubs/version.rb
129
+ homepage: https://aka.ms/azure-sdk-for-ruby
150
130
  licenses:
151
131
  - MIT
152
132
  metadata: {}
@@ -156,17 +136,17 @@ require_paths:
156
136
  - lib
157
137
  required_ruby_version: !ruby/object:Gem::Requirement
158
138
  requirements:
159
- - - ! '>='
139
+ - - ">="
160
140
  - !ruby/object:Gem::Version
161
141
  version: 1.9.3
162
142
  required_rubygems_version: !ruby/object:Gem::Requirement
163
143
  requirements:
164
- - - ! '>='
144
+ - - ">="
165
145
  - !ruby/object:Gem::Version
166
146
  version: '0'
167
147
  requirements: []
168
148
  rubyforge_project:
169
- rubygems_version: 2.4.5
149
+ rubygems_version: 2.4.6
170
150
  signing_key:
171
151
  specification_version: 4
172
152
  summary: Official Ruby client library to consume Microsoft Azure Notification Hubs