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,111 @@
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 NotificatioHub Resource.
10
+ #
11
+ class NotificationHubResource
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Gets or sets the id of the created NotificatioHub.
16
+ attr_accessor :id
17
+
18
+ # @return [String] Gets or sets datacenter location of the
19
+ # NotificatioHub.
20
+ attr_accessor :location
21
+
22
+ # @return [String] Gets or sets name of the NotificatioHub.
23
+ attr_accessor :name
24
+
25
+ # @return [String] Gets or sets resource type of the NotificatioHub.
26
+ attr_accessor :type
27
+
28
+ # @return [Hash{String => String}] Gets or sets tags of the
29
+ # NotificatioHub.
30
+ attr_accessor :tags
31
+
32
+ # @return [NotificationHubProperties] Gets or sets properties of the
33
+ # NotificatioHub.
34
+ attr_accessor :properties
35
+
36
+ #
37
+ # Validate the object. Throws ValidationError if validation fails.
38
+ #
39
+ def validate
40
+ @tags.each{ |e| e.validate if e.respond_to?(:validate) } unless @tags.nil?
41
+ @properties.validate unless @properties.nil?
42
+ end
43
+
44
+ #
45
+ # Serializes given Model object into Ruby Hash.
46
+ # @param object Model object to serialize.
47
+ # @return [Hash] Serialized object in form of Ruby Hash.
48
+ #
49
+ def self.serialize_object(object)
50
+ object.validate
51
+ output_object = {}
52
+
53
+ serialized_property = object.id
54
+ output_object['id'] = serialized_property unless serialized_property.nil?
55
+
56
+ serialized_property = object.location
57
+ output_object['location'] = serialized_property unless serialized_property.nil?
58
+
59
+ serialized_property = object.name
60
+ output_object['name'] = serialized_property unless serialized_property.nil?
61
+
62
+ serialized_property = object.type
63
+ output_object['type'] = serialized_property unless serialized_property.nil?
64
+
65
+ serialized_property = object.tags
66
+ output_object['tags'] = serialized_property unless serialized_property.nil?
67
+
68
+ serialized_property = object.properties
69
+ unless serialized_property.nil?
70
+ serialized_property = NotificationHubProperties.serialize_object(serialized_property)
71
+ end
72
+ output_object['properties'] = serialized_property unless serialized_property.nil?
73
+
74
+ output_object
75
+ end
76
+
77
+ #
78
+ # Deserializes given Ruby Hash into Model object.
79
+ # @param object [Hash] Ruby Hash object to deserialize.
80
+ # @return [NotificationHubResource] Deserialized object.
81
+ #
82
+ def self.deserialize_object(object)
83
+ return if object.nil?
84
+ output_object = NotificationHubResource.new
85
+
86
+ deserialized_property = object['id']
87
+ output_object.id = deserialized_property
88
+
89
+ deserialized_property = object['location']
90
+ output_object.location = deserialized_property
91
+
92
+ deserialized_property = object['name']
93
+ output_object.name = deserialized_property
94
+
95
+ deserialized_property = object['type']
96
+ output_object.type = deserialized_property
97
+
98
+ deserialized_property = object['tags']
99
+ output_object.tags = deserialized_property
100
+
101
+ deserialized_property = object['properties']
102
+ unless deserialized_property.nil?
103
+ deserialized_property = NotificationHubProperties.deserialize_object(deserialized_property)
104
+ end
105
+ output_object.properties = deserialized_property
106
+
107
+ output_object
108
+ end
109
+ end
110
+ end
111
+ end
@@ -0,0 +1,67 @@
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/NotificationHub Connection String
10
+ #
11
+ class ResourceListKeys
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Gets or sets the primaryConnectionString of the
16
+ # created Namespace AuthorizationRule.
17
+ attr_accessor :primary_connection_string
18
+
19
+ # @return [String] Gets or sets the secondaryConnectionString of the
20
+ # created Namespace AuthorizationRule
21
+ attr_accessor :secondary_connection_string
22
+
23
+ #
24
+ # Validate the object. Throws ValidationError if validation fails.
25
+ #
26
+ def validate
27
+ # Nothing to validate
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.primary_connection_string
40
+ output_object['primaryConnectionString'] = serialized_property unless serialized_property.nil?
41
+
42
+ serialized_property = object.secondary_connection_string
43
+ output_object['secondaryConnectionString'] = serialized_property unless serialized_property.nil?
44
+
45
+ output_object
46
+ end
47
+
48
+ #
49
+ # Deserializes given Ruby Hash into Model object.
50
+ # @param object [Hash] Ruby Hash object to deserialize.
51
+ # @return [ResourceListKeys] Deserialized object.
52
+ #
53
+ def self.deserialize_object(object)
54
+ return if object.nil?
55
+ output_object = ResourceListKeys.new
56
+
57
+ deserialized_property = object['primaryConnectionString']
58
+ output_object.primary_connection_string = deserialized_property
59
+
60
+ deserialized_property = object['secondaryConnectionString']
61
+ output_object.secondary_connection_string = deserialized_property
62
+
63
+ output_object
64
+ end
65
+ end
66
+ end
67
+ 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 AuthorizationRules.
10
+ #
11
+ class SharedAccessAuthorizationRuleCreateOrUpdateParameters
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Gets or sets Namespace data center location.
16
+ attr_accessor :location
17
+
18
+ # @return [String] Gets or sets Name of the Namespace AuthorizationRule.
19
+ attr_accessor :name
20
+
21
+ # @return [SharedAccessAuthorizationRuleProperties] Gets or sets
22
+ # properties of the Namespace AuthorizationRules.
23
+ attr_accessor :properties
24
+
25
+ #
26
+ # Validate the object. Throws ValidationError if validation fails.
27
+ #
28
+ def validate
29
+ fail MsRest::ValidationError, 'property properties is nil' if @properties.nil?
30
+ @properties.validate unless @properties.nil?
31
+ end
32
+
33
+ #
34
+ # Serializes given Model object into Ruby Hash.
35
+ # @param object Model object to serialize.
36
+ # @return [Hash] Serialized object in form of Ruby Hash.
37
+ #
38
+ def self.serialize_object(object)
39
+ object.validate
40
+ output_object = {}
41
+
42
+ serialized_property = object.properties
43
+ unless serialized_property.nil?
44
+ serialized_property = SharedAccessAuthorizationRuleProperties.serialize_object(serialized_property)
45
+ end
46
+ output_object['properties'] = serialized_property unless serialized_property.nil?
47
+
48
+ serialized_property = object.location
49
+ output_object['location'] = serialized_property unless serialized_property.nil?
50
+
51
+ serialized_property = object.name
52
+ output_object['name'] = serialized_property unless serialized_property.nil?
53
+
54
+ output_object
55
+ end
56
+
57
+ #
58
+ # Deserializes given Ruby Hash into Model object.
59
+ # @param object [Hash] Ruby Hash object to deserialize.
60
+ # @return [SharedAccessAuthorizationRuleCreateOrUpdateParameters]
61
+ # Deserialized object.
62
+ #
63
+ def self.deserialize_object(object)
64
+ return if object.nil?
65
+ output_object = SharedAccessAuthorizationRuleCreateOrUpdateParameters.new
66
+
67
+ deserialized_property = object['properties']
68
+ unless deserialized_property.nil?
69
+ deserialized_property = SharedAccessAuthorizationRuleProperties.deserialize_object(deserialized_property)
70
+ end
71
+ output_object.properties = deserialized_property
72
+
73
+ deserialized_property = object['location']
74
+ output_object.location = deserialized_property
75
+
76
+ deserialized_property = object['name']
77
+ output_object.name = 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 SharedAccessAuthorizationRuleListResult
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Array<SharedAccessAuthorizationRuleResource>] Gets or sets
16
+ # result of the List AuthorizationRules 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 AuthorizationRules
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 = SharedAccessAuthorizationRuleResource.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 [SharedAccessAuthorizationRuleListResult] Deserialized object.
62
+ #
63
+ def self.deserialize_object(object)
64
+ return if object.nil?
65
+ output_object = SharedAccessAuthorizationRuleListResult.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 = SharedAccessAuthorizationRuleResource.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,145 @@
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
+ # SharedAccessAuthorizationRule properties.
10
+ #
11
+ class SharedAccessAuthorizationRuleProperties
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] The primary key that was used.
16
+ attr_accessor :primary_key
17
+
18
+ # @return [String] The secondary key that was used.
19
+ attr_accessor :secondary_key
20
+
21
+ # @return [String] The name of the key that was used.
22
+ attr_accessor :key_name
23
+
24
+ # @return [String] The type of the claim.
25
+ attr_accessor :claim_type
26
+
27
+ # @return [String] The value of the claim.
28
+ attr_accessor :claim_value
29
+
30
+ # @return [Array<AccessRights>] The rights associated with the rule.
31
+ attr_accessor :rights
32
+
33
+ # @return [DateTime] The time at which the authorization rule was
34
+ # created.
35
+ attr_accessor :created_time
36
+
37
+ # @return [DateTime] The most recent time the rule was updated.
38
+ attr_accessor :modified_time
39
+
40
+ # @return [Integer] The revision number for the rule.
41
+ attr_accessor :revision
42
+
43
+ #
44
+ # Validate the object. Throws ValidationError if validation fails.
45
+ #
46
+ def validate
47
+ @rights.each{ |e| e.validate if e.respond_to?(:validate) } unless @rights.nil?
48
+ end
49
+
50
+ #
51
+ # Serializes given Model object into Ruby Hash.
52
+ # @param object Model object to serialize.
53
+ # @return [Hash] Serialized object in form of Ruby Hash.
54
+ #
55
+ def self.serialize_object(object)
56
+ object.validate
57
+ output_object = {}
58
+
59
+ serialized_property = object.primary_key
60
+ output_object['primaryKey'] = serialized_property unless serialized_property.nil?
61
+
62
+ serialized_property = object.secondary_key
63
+ output_object['secondaryKey'] = serialized_property unless serialized_property.nil?
64
+
65
+ serialized_property = object.key_name
66
+ output_object['keyName'] = serialized_property unless serialized_property.nil?
67
+
68
+ serialized_property = object.claim_type
69
+ output_object['claimType'] = serialized_property unless serialized_property.nil?
70
+
71
+ serialized_property = object.claim_value
72
+ output_object['claimValue'] = serialized_property unless serialized_property.nil?
73
+
74
+ serialized_property = object.rights
75
+ output_object['rights'] = serialized_property unless serialized_property.nil?
76
+
77
+ serialized_property = object.created_time
78
+ serialized_property = serialized_property.new_offset(0).strftime('%FT%TZ')
79
+ output_object['createdTime'] = serialized_property unless serialized_property.nil?
80
+
81
+ serialized_property = object.modified_time
82
+ serialized_property = serialized_property.new_offset(0).strftime('%FT%TZ')
83
+ output_object['modifiedTime'] = serialized_property unless serialized_property.nil?
84
+
85
+ serialized_property = object.revision
86
+ output_object['revision'] = serialized_property unless serialized_property.nil?
87
+
88
+ output_object
89
+ end
90
+
91
+ #
92
+ # Deserializes given Ruby Hash into Model object.
93
+ # @param object [Hash] Ruby Hash object to deserialize.
94
+ # @return [SharedAccessAuthorizationRuleProperties] Deserialized object.
95
+ #
96
+ def self.deserialize_object(object)
97
+ return if object.nil?
98
+ output_object = SharedAccessAuthorizationRuleProperties.new
99
+
100
+ deserialized_property = object['primaryKey']
101
+ output_object.primary_key = deserialized_property
102
+
103
+ deserialized_property = object['secondaryKey']
104
+ output_object.secondary_key = deserialized_property
105
+
106
+ deserialized_property = object['keyName']
107
+ output_object.key_name = deserialized_property
108
+
109
+ deserialized_property = object['claimType']
110
+ output_object.claim_type = deserialized_property
111
+
112
+ deserialized_property = object['claimValue']
113
+ output_object.claim_value = deserialized_property
114
+
115
+ deserialized_property = object['rights']
116
+ unless deserialized_property.nil?
117
+ deserialized_array = []
118
+ deserialized_property.each do |element1|
119
+ if (!element1.nil? && !element1.empty?)
120
+ enum_is_valid = AccessRights.constants.any? { |e| AccessRights.const_get(e).to_s.downcase == element1.downcase }
121
+ warn 'Enum AccessRights does not contain ' + element1.downcase + ', but was received from the server.' unless enum_is_valid
122
+ end
123
+ deserialized_array.push(element1)
124
+ end
125
+ deserialized_property = deserialized_array
126
+ end
127
+ output_object.rights = deserialized_property
128
+
129
+ deserialized_property = object['createdTime']
130
+ deserialized_property = DateTime.parse(deserialized_property) unless deserialized_property.to_s.empty?
131
+ output_object.created_time = deserialized_property
132
+
133
+ deserialized_property = object['modifiedTime']
134
+ deserialized_property = DateTime.parse(deserialized_property) unless deserialized_property.to_s.empty?
135
+ output_object.modified_time = deserialized_property
136
+
137
+ deserialized_property = object['revision']
138
+ deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
139
+ output_object.revision = deserialized_property
140
+
141
+ output_object
142
+ end
143
+ end
144
+ end
145
+ end