azure_mgmt_notification_hubs 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +7 -0
  2. data/.rspec +3 -0
  3. data/LICENSE.txt +21 -0
  4. data/Rakefile +5 -0
  5. data/azure_mgmt_notification_hubs.gemspec +35 -0
  6. data/lib/azure_mgmt_notification_hubs.rb +57 -0
  7. data/lib/azure_mgmt_notification_hubs/models/access_rights.rb +17 -0
  8. data/lib/azure_mgmt_notification_hubs/models/adm_credential.rb +63 -0
  9. data/lib/azure_mgmt_notification_hubs/models/adm_credential_properties.rb +74 -0
  10. data/lib/azure_mgmt_notification_hubs/models/apns_credential.rb +63 -0
  11. data/lib/azure_mgmt_notification_hubs/models/apns_credential_properties.rb +83 -0
  12. data/lib/azure_mgmt_notification_hubs/models/baidu_credential.rb +63 -0
  13. data/lib/azure_mgmt_notification_hubs/models/baidu_credential_properties.rb +74 -0
  14. data/lib/azure_mgmt_notification_hubs/models/check_availability_parameters.rb +86 -0
  15. data/lib/azure_mgmt_notification_hubs/models/check_availability_resource.rb +102 -0
  16. data/lib/azure_mgmt_notification_hubs/models/gcm_credential.rb +63 -0
  17. data/lib/azure_mgmt_notification_hubs/models/gcm_credential_properties.rb +65 -0
  18. data/lib/azure_mgmt_notification_hubs/models/mpns_credential.rb +63 -0
  19. data/lib/azure_mgmt_notification_hubs/models/mpns_credential_properties.rb +74 -0
  20. data/lib/azure_mgmt_notification_hubs/models/namespace_create_or_update_parameters.rb +83 -0
  21. data/lib/azure_mgmt_notification_hubs/models/namespace_list_result.rb +87 -0
  22. data/lib/azure_mgmt_notification_hubs/models/namespace_properties.rb +159 -0
  23. data/lib/azure_mgmt_notification_hubs/models/namespace_resource.rb +108 -0
  24. data/lib/azure_mgmt_notification_hubs/models/namespace_type.rb +16 -0
  25. data/lib/azure_mgmt_notification_hubs/models/notification_hub_create_or_update_parameters.rb +84 -0
  26. data/lib/azure_mgmt_notification_hubs/models/notification_hub_list_result.rb +87 -0
  27. data/lib/azure_mgmt_notification_hubs/models/notification_hub_properties.rb +197 -0
  28. data/lib/azure_mgmt_notification_hubs/models/notification_hub_resource.rb +111 -0
  29. data/lib/azure_mgmt_notification_hubs/models/resource_list_keys.rb +67 -0
  30. data/lib/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_create_or_update_parameters.rb +83 -0
  31. data/lib/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_list_result.rb +87 -0
  32. data/lib/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_properties.rb +145 -0
  33. data/lib/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_resource.rb +113 -0
  34. data/lib/azure_mgmt_notification_hubs/models/wns_credential.rb +63 -0
  35. data/lib/azure_mgmt_notification_hubs/models/wns_credential_properties.rb +74 -0
  36. data/lib/azure_mgmt_notification_hubs/module_definition.rb +8 -0
  37. data/lib/azure_mgmt_notification_hubs/namespaces.rb +1012 -0
  38. data/lib/azure_mgmt_notification_hubs/notification_hubs.rb +896 -0
  39. data/lib/azure_mgmt_notification_hubs/notification_hubs_management_client.rb +72 -0
  40. data/lib/azure_mgmt_notification_hubs/version.rb +8 -0
  41. metadata +167 -0
@@ -0,0 +1,108 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::NotificationHubs
7
+ module Models
8
+ #
9
+ # Description of a Namespace resource.
10
+ #
11
+ class NamespaceResource
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Gets or sets the id of the created Namespace.
16
+ attr_accessor :id
17
+
18
+ # @return [String] Gets or sets datacenter location of the Namespace.
19
+ attr_accessor :location
20
+
21
+ # @return [String] Gets or sets name of the Namespace.
22
+ attr_accessor :name
23
+
24
+ # @return [String] Gets or sets resource type of the Namespace.
25
+ attr_accessor :type
26
+
27
+ # @return [Hash{String => String}] Gets or sets tags of the Namespace.
28
+ attr_accessor :tags
29
+
30
+ # @return [NamespaceProperties] Gets or sets properties of the Namespace.
31
+ attr_accessor :properties
32
+
33
+ #
34
+ # Validate the object. Throws ValidationError if validation fails.
35
+ #
36
+ def validate
37
+ @tags.each{ |e| e.validate if e.respond_to?(:validate) } unless @tags.nil?
38
+ @properties.validate unless @properties.nil?
39
+ end
40
+
41
+ #
42
+ # Serializes given Model object into Ruby Hash.
43
+ # @param object Model object to serialize.
44
+ # @return [Hash] Serialized object in form of Ruby Hash.
45
+ #
46
+ def self.serialize_object(object)
47
+ object.validate
48
+ output_object = {}
49
+
50
+ serialized_property = object.id
51
+ output_object['id'] = serialized_property unless serialized_property.nil?
52
+
53
+ serialized_property = object.location
54
+ output_object['location'] = serialized_property unless serialized_property.nil?
55
+
56
+ serialized_property = object.name
57
+ output_object['name'] = serialized_property unless serialized_property.nil?
58
+
59
+ serialized_property = object.type
60
+ output_object['type'] = serialized_property unless serialized_property.nil?
61
+
62
+ serialized_property = object.tags
63
+ output_object['tags'] = serialized_property unless serialized_property.nil?
64
+
65
+ serialized_property = object.properties
66
+ unless serialized_property.nil?
67
+ serialized_property = NamespaceProperties.serialize_object(serialized_property)
68
+ end
69
+ output_object['properties'] = serialized_property unless serialized_property.nil?
70
+
71
+ output_object
72
+ end
73
+
74
+ #
75
+ # Deserializes given Ruby Hash into Model object.
76
+ # @param object [Hash] Ruby Hash object to deserialize.
77
+ # @return [NamespaceResource] Deserialized object.
78
+ #
79
+ def self.deserialize_object(object)
80
+ return if object.nil?
81
+ output_object = NamespaceResource.new
82
+
83
+ deserialized_property = object['id']
84
+ output_object.id = deserialized_property
85
+
86
+ deserialized_property = object['location']
87
+ output_object.location = deserialized_property
88
+
89
+ deserialized_property = object['name']
90
+ output_object.name = deserialized_property
91
+
92
+ deserialized_property = object['type']
93
+ output_object.type = deserialized_property
94
+
95
+ deserialized_property = object['tags']
96
+ output_object.tags = deserialized_property
97
+
98
+ deserialized_property = object['properties']
99
+ unless deserialized_property.nil?
100
+ deserialized_property = NamespaceProperties.deserialize_object(deserialized_property)
101
+ end
102
+ output_object.properties = deserialized_property
103
+
104
+ output_object
105
+ end
106
+ end
107
+ end
108
+ end
@@ -0,0 +1,16 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::NotificationHubs
7
+ module Models
8
+ #
9
+ # Defines values for NamespaceType
10
+ #
11
+ module NamespaceType
12
+ Messaging = "Messaging"
13
+ NotificationHub = "NotificationHub"
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,84 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::NotificationHubs
7
+ module Models
8
+ #
9
+ # Parameters supplied to the CreateOrUpdate NotificationHub operation.
10
+ #
11
+ class NotificationHubCreateOrUpdateParameters
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Gets or sets NotificationHub data center location.
16
+ attr_accessor :location
17
+
18
+ # @return [Hash{String => String}] Gets or sets NotificationHub tags.
19
+ attr_accessor :tags
20
+
21
+ # @return [NotificationHubProperties] Gets or sets properties of the
22
+ # NotificationHub.
23
+ attr_accessor :properties
24
+
25
+ #
26
+ # Validate the object. Throws ValidationError if validation fails.
27
+ #
28
+ def validate
29
+ fail MsRest::ValidationError, 'property location is nil' if @location.nil?
30
+ fail MsRest::ValidationError, 'property properties is nil' if @properties.nil?
31
+ @tags.each{ |e| e.validate if e.respond_to?(:validate) } unless @tags.nil?
32
+ @properties.validate unless @properties.nil?
33
+ end
34
+
35
+ #
36
+ # Serializes given Model object into Ruby Hash.
37
+ # @param object Model object to serialize.
38
+ # @return [Hash] Serialized object in form of Ruby Hash.
39
+ #
40
+ def self.serialize_object(object)
41
+ object.validate
42
+ output_object = {}
43
+
44
+ serialized_property = object.location
45
+ output_object['location'] = serialized_property unless serialized_property.nil?
46
+
47
+ serialized_property = object.properties
48
+ unless serialized_property.nil?
49
+ serialized_property = NotificationHubProperties.serialize_object(serialized_property)
50
+ end
51
+ output_object['properties'] = serialized_property unless serialized_property.nil?
52
+
53
+ serialized_property = object.tags
54
+ output_object['tags'] = serialized_property unless serialized_property.nil?
55
+
56
+ output_object
57
+ end
58
+
59
+ #
60
+ # Deserializes given Ruby Hash into Model object.
61
+ # @param object [Hash] Ruby Hash object to deserialize.
62
+ # @return [NotificationHubCreateOrUpdateParameters] Deserialized object.
63
+ #
64
+ def self.deserialize_object(object)
65
+ return if object.nil?
66
+ output_object = NotificationHubCreateOrUpdateParameters.new
67
+
68
+ deserialized_property = object['location']
69
+ output_object.location = deserialized_property
70
+
71
+ deserialized_property = object['properties']
72
+ unless deserialized_property.nil?
73
+ deserialized_property = NotificationHubProperties.deserialize_object(deserialized_property)
74
+ end
75
+ output_object.properties = deserialized_property
76
+
77
+ deserialized_property = object['tags']
78
+ output_object.tags = deserialized_property
79
+
80
+ output_object
81
+ end
82
+ end
83
+ end
84
+ end
@@ -0,0 +1,87 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::NotificationHubs
7
+ module Models
8
+ #
9
+ # The response of the List NotificationHub operation.
10
+ #
11
+ class NotificationHubListResult
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Array<NotificationHubResource>] Gets or sets result of the
16
+ # List NotificationHub operation.
17
+ attr_accessor :value
18
+
19
+ # @return [String] Gets or sets link to the next set of results. Not
20
+ # empty if Value contains incomplete list of NotificationHub
21
+ attr_accessor :next_link
22
+
23
+ #
24
+ # Validate the object. Throws ValidationError if validation fails.
25
+ #
26
+ def validate
27
+ @value.each{ |e| e.validate if e.respond_to?(:validate) } unless @value.nil?
28
+ end
29
+
30
+ #
31
+ # Serializes given Model object into Ruby Hash.
32
+ # @param object Model object to serialize.
33
+ # @return [Hash] Serialized object in form of Ruby Hash.
34
+ #
35
+ def self.serialize_object(object)
36
+ object.validate
37
+ output_object = {}
38
+
39
+ serialized_property = object.value
40
+ unless serialized_property.nil?
41
+ serializedArray = []
42
+ serialized_property.each do |element|
43
+ unless element.nil?
44
+ element = NotificationHubResource.serialize_object(element)
45
+ end
46
+ serializedArray.push(element)
47
+ end
48
+ serialized_property = serializedArray
49
+ end
50
+ output_object['value'] = serialized_property unless serialized_property.nil?
51
+
52
+ serialized_property = object.next_link
53
+ output_object['nextLink'] = serialized_property unless serialized_property.nil?
54
+
55
+ output_object
56
+ end
57
+
58
+ #
59
+ # Deserializes given Ruby Hash into Model object.
60
+ # @param object [Hash] Ruby Hash object to deserialize.
61
+ # @return [NotificationHubListResult] Deserialized object.
62
+ #
63
+ def self.deserialize_object(object)
64
+ return if object.nil?
65
+ output_object = NotificationHubListResult.new
66
+
67
+ deserialized_property = object['value']
68
+ unless deserialized_property.nil?
69
+ deserialized_array = []
70
+ deserialized_property.each do |element1|
71
+ unless element1.nil?
72
+ element1 = NotificationHubResource.deserialize_object(element1)
73
+ end
74
+ deserialized_array.push(element1)
75
+ end
76
+ deserialized_property = deserialized_array
77
+ end
78
+ output_object.value = deserialized_property
79
+
80
+ deserialized_property = object['nextLink']
81
+ output_object.next_link = deserialized_property
82
+
83
+ output_object
84
+ end
85
+ end
86
+ end
87
+ end
@@ -0,0 +1,197 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.16.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::NotificationHubs
7
+ module Models
8
+ #
9
+ # NotificationHub properties.
10
+ #
11
+ class NotificationHubProperties
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] The NotificationHub name.
16
+ attr_accessor :name
17
+
18
+ # @return [String] The RegistrationTtl of the created NotificationHub
19
+ attr_accessor :registration_ttl
20
+
21
+ # @return [Array<SharedAccessAuthorizationRuleProperties>] The
22
+ # AuthorizationRules of the created NotificationHub
23
+ attr_accessor :authorization_rules
24
+
25
+ # @return [ApnsCredential] The ApnsCredential of the created
26
+ # NotificationHub
27
+ attr_accessor :apns_credential
28
+
29
+ # @return [WnsCredential] The WnsCredential of the created
30
+ # NotificationHub
31
+ attr_accessor :wns_credential
32
+
33
+ # @return [GcmCredential] The GcmCredential of the created
34
+ # NotificationHub
35
+ attr_accessor :gcm_credential
36
+
37
+ # @return [MpnsCredential] The MpnsCredential of the created
38
+ # NotificationHub
39
+ attr_accessor :mpns_credential
40
+
41
+ # @return [AdmCredential] The AdmCredential of the created
42
+ # NotificationHub
43
+ attr_accessor :adm_credential
44
+
45
+ # @return [BaiduCredential] The BaiduCredential of the created
46
+ # NotificationHub
47
+ attr_accessor :baidu_credential
48
+
49
+ #
50
+ # Validate the object. Throws ValidationError if validation fails.
51
+ #
52
+ def validate
53
+ @authorization_rules.each{ |e| e.validate if e.respond_to?(:validate) } unless @authorization_rules.nil?
54
+ @apns_credential.validate unless @apns_credential.nil?
55
+ @wns_credential.validate unless @wns_credential.nil?
56
+ @gcm_credential.validate unless @gcm_credential.nil?
57
+ @mpns_credential.validate unless @mpns_credential.nil?
58
+ @adm_credential.validate unless @adm_credential.nil?
59
+ @baidu_credential.validate unless @baidu_credential.nil?
60
+ end
61
+
62
+ #
63
+ # Serializes given Model object into Ruby Hash.
64
+ # @param object Model object to serialize.
65
+ # @return [Hash] Serialized object in form of Ruby Hash.
66
+ #
67
+ def self.serialize_object(object)
68
+ object.validate
69
+ output_object = {}
70
+
71
+ serialized_property = object.name
72
+ output_object['name'] = serialized_property unless serialized_property.nil?
73
+
74
+ serialized_property = object.registration_ttl
75
+ output_object['registrationTtl'] = serialized_property unless serialized_property.nil?
76
+
77
+ serialized_property = object.authorization_rules
78
+ unless serialized_property.nil?
79
+ serializedArray = []
80
+ serialized_property.each do |element|
81
+ unless element.nil?
82
+ element = SharedAccessAuthorizationRuleProperties.serialize_object(element)
83
+ end
84
+ serializedArray.push(element)
85
+ end
86
+ serialized_property = serializedArray
87
+ end
88
+ output_object['authorizationRules'] = serialized_property unless serialized_property.nil?
89
+
90
+ serialized_property = object.apns_credential
91
+ unless serialized_property.nil?
92
+ serialized_property = ApnsCredential.serialize_object(serialized_property)
93
+ end
94
+ output_object['apnsCredential'] = serialized_property unless serialized_property.nil?
95
+
96
+ serialized_property = object.wns_credential
97
+ unless serialized_property.nil?
98
+ serialized_property = WnsCredential.serialize_object(serialized_property)
99
+ end
100
+ output_object['wnsCredential'] = serialized_property unless serialized_property.nil?
101
+
102
+ serialized_property = object.gcm_credential
103
+ unless serialized_property.nil?
104
+ serialized_property = GcmCredential.serialize_object(serialized_property)
105
+ end
106
+ output_object['gcmCredential'] = serialized_property unless serialized_property.nil?
107
+
108
+ serialized_property = object.mpns_credential
109
+ unless serialized_property.nil?
110
+ serialized_property = MpnsCredential.serialize_object(serialized_property)
111
+ end
112
+ output_object['mpnsCredential'] = serialized_property unless serialized_property.nil?
113
+
114
+ serialized_property = object.adm_credential
115
+ unless serialized_property.nil?
116
+ serialized_property = AdmCredential.serialize_object(serialized_property)
117
+ end
118
+ output_object['admCredential'] = serialized_property unless serialized_property.nil?
119
+
120
+ serialized_property = object.baidu_credential
121
+ unless serialized_property.nil?
122
+ serialized_property = BaiduCredential.serialize_object(serialized_property)
123
+ end
124
+ output_object['baiduCredential'] = serialized_property unless serialized_property.nil?
125
+
126
+ output_object
127
+ end
128
+
129
+ #
130
+ # Deserializes given Ruby Hash into Model object.
131
+ # @param object [Hash] Ruby Hash object to deserialize.
132
+ # @return [NotificationHubProperties] Deserialized object.
133
+ #
134
+ def self.deserialize_object(object)
135
+ return if object.nil?
136
+ output_object = NotificationHubProperties.new
137
+
138
+ deserialized_property = object['name']
139
+ output_object.name = deserialized_property
140
+
141
+ deserialized_property = object['registrationTtl']
142
+ output_object.registration_ttl = deserialized_property
143
+
144
+ deserialized_property = object['authorizationRules']
145
+ unless deserialized_property.nil?
146
+ deserialized_array = []
147
+ deserialized_property.each do |element1|
148
+ unless element1.nil?
149
+ element1 = SharedAccessAuthorizationRuleProperties.deserialize_object(element1)
150
+ end
151
+ deserialized_array.push(element1)
152
+ end
153
+ deserialized_property = deserialized_array
154
+ end
155
+ output_object.authorization_rules = deserialized_property
156
+
157
+ deserialized_property = object['apnsCredential']
158
+ unless deserialized_property.nil?
159
+ deserialized_property = ApnsCredential.deserialize_object(deserialized_property)
160
+ end
161
+ output_object.apns_credential = deserialized_property
162
+
163
+ deserialized_property = object['wnsCredential']
164
+ unless deserialized_property.nil?
165
+ deserialized_property = WnsCredential.deserialize_object(deserialized_property)
166
+ end
167
+ output_object.wns_credential = deserialized_property
168
+
169
+ deserialized_property = object['gcmCredential']
170
+ unless deserialized_property.nil?
171
+ deserialized_property = GcmCredential.deserialize_object(deserialized_property)
172
+ end
173
+ output_object.gcm_credential = deserialized_property
174
+
175
+ deserialized_property = object['mpnsCredential']
176
+ unless deserialized_property.nil?
177
+ deserialized_property = MpnsCredential.deserialize_object(deserialized_property)
178
+ end
179
+ output_object.mpns_credential = deserialized_property
180
+
181
+ deserialized_property = object['admCredential']
182
+ unless deserialized_property.nil?
183
+ deserialized_property = AdmCredential.deserialize_object(deserialized_property)
184
+ end
185
+ output_object.adm_credential = deserialized_property
186
+
187
+ deserialized_property = object['baiduCredential']
188
+ unless deserialized_property.nil?
189
+ deserialized_property = BaiduCredential.deserialize_object(deserialized_property)
190
+ end
191
+ output_object.baidu_credential = deserialized_property
192
+
193
+ output_object
194
+ end
195
+ end
196
+ end
197
+ end