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,63 @@
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 NotificationHub MpnsCredential.
10
+ #
11
+ class MpnsCredential
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [MpnsCredentialProperties] Gets or sets properties of
16
+ # NotificationHub MpnsCredential.
17
+ attr_accessor :properties
18
+
19
+ #
20
+ # Validate the object. Throws ValidationError if validation fails.
21
+ #
22
+ def validate
23
+ @properties.validate unless @properties.nil?
24
+ end
25
+
26
+ #
27
+ # Serializes given Model object into Ruby Hash.
28
+ # @param object Model object to serialize.
29
+ # @return [Hash] Serialized object in form of Ruby Hash.
30
+ #
31
+ def self.serialize_object(object)
32
+ object.validate
33
+ output_object = {}
34
+
35
+ serialized_property = object.properties
36
+ unless serialized_property.nil?
37
+ serialized_property = MpnsCredentialProperties.serialize_object(serialized_property)
38
+ end
39
+ output_object['properties'] = serialized_property unless serialized_property.nil?
40
+
41
+ output_object
42
+ end
43
+
44
+ #
45
+ # Deserializes given Ruby Hash into Model object.
46
+ # @param object [Hash] Ruby Hash object to deserialize.
47
+ # @return [MpnsCredential] Deserialized object.
48
+ #
49
+ def self.deserialize_object(object)
50
+ return if object.nil?
51
+ output_object = MpnsCredential.new
52
+
53
+ deserialized_property = object['properties']
54
+ unless deserialized_property.nil?
55
+ deserialized_property = MpnsCredentialProperties.deserialize_object(deserialized_property)
56
+ end
57
+ output_object.properties = deserialized_property
58
+
59
+ output_object
60
+ end
61
+ end
62
+ end
63
+ end
@@ -0,0 +1,74 @@
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 NotificationHub MpnsCredential.
10
+ #
11
+ class MpnsCredentialProperties
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Gets or sets the MPNS certificate.
16
+ attr_accessor :mpns_certificate
17
+
18
+ # @return [String] Gets or sets the certificate key for this credential.
19
+ attr_accessor :certificate_key
20
+
21
+ # @return [String] Gets or sets the Mpns certificate Thumbprint
22
+ attr_accessor :thumbprint
23
+
24
+ #
25
+ # Validate the object. Throws ValidationError if validation fails.
26
+ #
27
+ def validate
28
+ # Nothing to validate
29
+ end
30
+
31
+ #
32
+ # Serializes given Model object into Ruby Hash.
33
+ # @param object Model object to serialize.
34
+ # @return [Hash] Serialized object in form of Ruby Hash.
35
+ #
36
+ def self.serialize_object(object)
37
+ object.validate
38
+ output_object = {}
39
+
40
+ serialized_property = object.mpns_certificate
41
+ output_object['mpnsCertificate'] = serialized_property unless serialized_property.nil?
42
+
43
+ serialized_property = object.certificate_key
44
+ output_object['certificateKey'] = serialized_property unless serialized_property.nil?
45
+
46
+ serialized_property = object.thumbprint
47
+ output_object['thumbprint'] = serialized_property unless serialized_property.nil?
48
+
49
+ output_object
50
+ end
51
+
52
+ #
53
+ # Deserializes given Ruby Hash into Model object.
54
+ # @param object [Hash] Ruby Hash object to deserialize.
55
+ # @return [MpnsCredentialProperties] Deserialized object.
56
+ #
57
+ def self.deserialize_object(object)
58
+ return if object.nil?
59
+ output_object = MpnsCredentialProperties.new
60
+
61
+ deserialized_property = object['mpnsCertificate']
62
+ output_object.mpns_certificate = deserialized_property
63
+
64
+ deserialized_property = object['certificateKey']
65
+ output_object.certificate_key = deserialized_property
66
+
67
+ deserialized_property = object['thumbprint']
68
+ output_object.thumbprint = deserialized_property
69
+
70
+ output_object
71
+ end
72
+ end
73
+ end
74
+ end
@@ -0,0 +1,83 @@
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 Namespace operation.
10
+ #
11
+ class NamespaceCreateOrUpdateParameters
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Gets or sets Namespace data center location.
16
+ attr_accessor :location
17
+
18
+ # @return [Hash{String => String}] Gets or sets Namespace tags.
19
+ attr_accessor :tags
20
+
21
+ # @return [NamespaceProperties] Gets or sets properties of the Namespace.
22
+ attr_accessor :properties
23
+
24
+ #
25
+ # Validate the object. Throws ValidationError if validation fails.
26
+ #
27
+ def validate
28
+ fail MsRest::ValidationError, 'property location is nil' if @location.nil?
29
+ fail MsRest::ValidationError, 'property properties is nil' if @properties.nil?
30
+ @tags.each{ |e| e.validate if e.respond_to?(:validate) } unless @tags.nil?
31
+ @properties.validate unless @properties.nil?
32
+ end
33
+
34
+ #
35
+ # Serializes given Model object into Ruby Hash.
36
+ # @param object Model object to serialize.
37
+ # @return [Hash] Serialized object in form of Ruby Hash.
38
+ #
39
+ def self.serialize_object(object)
40
+ object.validate
41
+ output_object = {}
42
+
43
+ serialized_property = object.location
44
+ output_object['location'] = serialized_property unless serialized_property.nil?
45
+
46
+ serialized_property = object.properties
47
+ unless serialized_property.nil?
48
+ serialized_property = NamespaceProperties.serialize_object(serialized_property)
49
+ end
50
+ output_object['properties'] = serialized_property unless serialized_property.nil?
51
+
52
+ serialized_property = object.tags
53
+ output_object['tags'] = 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 [NamespaceCreateOrUpdateParameters] Deserialized object.
62
+ #
63
+ def self.deserialize_object(object)
64
+ return if object.nil?
65
+ output_object = NamespaceCreateOrUpdateParameters.new
66
+
67
+ deserialized_property = object['location']
68
+ output_object.location = deserialized_property
69
+
70
+ deserialized_property = object['properties']
71
+ unless deserialized_property.nil?
72
+ deserialized_property = NamespaceProperties.deserialize_object(deserialized_property)
73
+ end
74
+ output_object.properties = deserialized_property
75
+
76
+ deserialized_property = object['tags']
77
+ output_object.tags = deserialized_property
78
+
79
+ output_object
80
+ end
81
+ end
82
+ end
83
+ 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 Namespace operation.
10
+ #
11
+ class NamespaceListResult
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Array<NamespaceResource>] Gets or sets result of the List
16
+ # Namespace 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 Namespaces
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 = NamespaceResource.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 [NamespaceListResult] Deserialized object.
62
+ #
63
+ def self.deserialize_object(object)
64
+ return if object.nil?
65
+ output_object = NamespaceListResult.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 = NamespaceResource.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,159 @@
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
+ # Namespace properties.
10
+ #
11
+ class NamespaceProperties
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] The name of the namespace.
16
+ attr_accessor :name
17
+
18
+ # @return [String] Gets or sets provisioning state of the Namespace.
19
+ attr_accessor :provisioning_state
20
+
21
+ # @return [String] Specifies the targeted region in which the namespace
22
+ # should be created. It can be any of the following values: Australia
23
+ # EastAustralia SoutheastCentral USEast USEast US 2West USNorth Central
24
+ # USSouth Central USEast AsiaSoutheast AsiaBrazil SouthJapan EastJapan
25
+ # WestNorth EuropeWest Europe
26
+ attr_accessor :region
27
+
28
+ # @return [String] Status of the namespace. It can be any of these
29
+ # values:1 = Created/Active2 = Creating3 = Suspended4 = Deleting
30
+ attr_accessor :status
31
+
32
+ # @return [DateTime] The time the namespace was created.
33
+ attr_accessor :created_at
34
+
35
+ # @return [String] Endpoint you can use to perform NotificationHub
36
+ # operations.
37
+ attr_accessor :service_bus_endpoint
38
+
39
+ # @return [String] The Id of the Azure subscription associated with the
40
+ # namespace.
41
+ attr_accessor :subscription_id
42
+
43
+ # @return [String] ScaleUnit where the namespace gets created
44
+ attr_accessor :scale_unit
45
+
46
+ # @return [Boolean] Whether or not the namespace is currently enabled.
47
+ attr_accessor :enabled
48
+
49
+ # @return [Boolean] Whether or not the namespace is set as Critical.
50
+ attr_accessor :critical
51
+
52
+ # @return [NamespaceType] Gets or sets the namespace type. Possible
53
+ # values include: 'Messaging', 'NotificationHub'
54
+ attr_accessor :namespace_type
55
+
56
+ #
57
+ # Validate the object. Throws ValidationError if validation fails.
58
+ #
59
+ def validate
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.provisioning_state
75
+ output_object['provisioningState'] = serialized_property unless serialized_property.nil?
76
+
77
+ serialized_property = object.region
78
+ output_object['region'] = serialized_property unless serialized_property.nil?
79
+
80
+ serialized_property = object.status
81
+ output_object['status'] = serialized_property unless serialized_property.nil?
82
+
83
+ serialized_property = object.created_at
84
+ serialized_property = serialized_property.new_offset(0).strftime('%FT%TZ')
85
+ output_object['createdAt'] = serialized_property unless serialized_property.nil?
86
+
87
+ serialized_property = object.service_bus_endpoint
88
+ output_object['serviceBusEndpoint'] = serialized_property unless serialized_property.nil?
89
+
90
+ serialized_property = object.subscription_id
91
+ output_object['subscriptionId'] = serialized_property unless serialized_property.nil?
92
+
93
+ serialized_property = object.scale_unit
94
+ output_object['scaleUnit'] = serialized_property unless serialized_property.nil?
95
+
96
+ serialized_property = object.enabled
97
+ output_object['enabled'] = serialized_property unless serialized_property.nil?
98
+
99
+ serialized_property = object.critical
100
+ output_object['critical'] = serialized_property unless serialized_property.nil?
101
+
102
+ serialized_property = object.namespace_type
103
+ output_object['namespaceType'] = serialized_property unless serialized_property.nil?
104
+
105
+ output_object
106
+ end
107
+
108
+ #
109
+ # Deserializes given Ruby Hash into Model object.
110
+ # @param object [Hash] Ruby Hash object to deserialize.
111
+ # @return [NamespaceProperties] Deserialized object.
112
+ #
113
+ def self.deserialize_object(object)
114
+ return if object.nil?
115
+ output_object = NamespaceProperties.new
116
+
117
+ deserialized_property = object['name']
118
+ output_object.name = deserialized_property
119
+
120
+ deserialized_property = object['provisioningState']
121
+ output_object.provisioning_state = deserialized_property
122
+
123
+ deserialized_property = object['region']
124
+ output_object.region = deserialized_property
125
+
126
+ deserialized_property = object['status']
127
+ output_object.status = deserialized_property
128
+
129
+ deserialized_property = object['createdAt']
130
+ deserialized_property = DateTime.parse(deserialized_property) unless deserialized_property.to_s.empty?
131
+ output_object.created_at = deserialized_property
132
+
133
+ deserialized_property = object['serviceBusEndpoint']
134
+ output_object.service_bus_endpoint = deserialized_property
135
+
136
+ deserialized_property = object['subscriptionId']
137
+ output_object.subscription_id = deserialized_property
138
+
139
+ deserialized_property = object['scaleUnit']
140
+ output_object.scale_unit = deserialized_property
141
+
142
+ deserialized_property = object['enabled']
143
+ output_object.enabled = deserialized_property
144
+
145
+ deserialized_property = object['critical']
146
+ output_object.critical = deserialized_property
147
+
148
+ deserialized_property = object['namespaceType']
149
+ if (!deserialized_property.nil? && !deserialized_property.empty?)
150
+ enum_is_valid = NamespaceType.constants.any? { |e| NamespaceType.const_get(e).to_s.downcase == deserialized_property.downcase }
151
+ warn 'Enum NamespaceType does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid
152
+ end
153
+ output_object.namespace_type = deserialized_property
154
+
155
+ output_object
156
+ end
157
+ end
158
+ end
159
+ end