azure_mgmt_notification_hubs 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rspec +3 -0
- data/LICENSE.txt +21 -0
- data/Rakefile +5 -0
- data/azure_mgmt_notification_hubs.gemspec +35 -0
- data/lib/azure_mgmt_notification_hubs.rb +57 -0
- data/lib/azure_mgmt_notification_hubs/models/access_rights.rb +17 -0
- data/lib/azure_mgmt_notification_hubs/models/adm_credential.rb +63 -0
- data/lib/azure_mgmt_notification_hubs/models/adm_credential_properties.rb +74 -0
- data/lib/azure_mgmt_notification_hubs/models/apns_credential.rb +63 -0
- data/lib/azure_mgmt_notification_hubs/models/apns_credential_properties.rb +83 -0
- data/lib/azure_mgmt_notification_hubs/models/baidu_credential.rb +63 -0
- data/lib/azure_mgmt_notification_hubs/models/baidu_credential_properties.rb +74 -0
- data/lib/azure_mgmt_notification_hubs/models/check_availability_parameters.rb +86 -0
- data/lib/azure_mgmt_notification_hubs/models/check_availability_resource.rb +102 -0
- data/lib/azure_mgmt_notification_hubs/models/gcm_credential.rb +63 -0
- data/lib/azure_mgmt_notification_hubs/models/gcm_credential_properties.rb +65 -0
- data/lib/azure_mgmt_notification_hubs/models/mpns_credential.rb +63 -0
- data/lib/azure_mgmt_notification_hubs/models/mpns_credential_properties.rb +74 -0
- data/lib/azure_mgmt_notification_hubs/models/namespace_create_or_update_parameters.rb +83 -0
- data/lib/azure_mgmt_notification_hubs/models/namespace_list_result.rb +87 -0
- data/lib/azure_mgmt_notification_hubs/models/namespace_properties.rb +159 -0
- data/lib/azure_mgmt_notification_hubs/models/namespace_resource.rb +108 -0
- data/lib/azure_mgmt_notification_hubs/models/namespace_type.rb +16 -0
- data/lib/azure_mgmt_notification_hubs/models/notification_hub_create_or_update_parameters.rb +84 -0
- data/lib/azure_mgmt_notification_hubs/models/notification_hub_list_result.rb +87 -0
- data/lib/azure_mgmt_notification_hubs/models/notification_hub_properties.rb +197 -0
- data/lib/azure_mgmt_notification_hubs/models/notification_hub_resource.rb +111 -0
- data/lib/azure_mgmt_notification_hubs/models/resource_list_keys.rb +67 -0
- data/lib/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_create_or_update_parameters.rb +83 -0
- data/lib/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_list_result.rb +87 -0
- data/lib/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_properties.rb +145 -0
- data/lib/azure_mgmt_notification_hubs/models/shared_access_authorization_rule_resource.rb +113 -0
- data/lib/azure_mgmt_notification_hubs/models/wns_credential.rb +63 -0
- data/lib/azure_mgmt_notification_hubs/models/wns_credential_properties.rb +74 -0
- data/lib/azure_mgmt_notification_hubs/module_definition.rb +8 -0
- data/lib/azure_mgmt_notification_hubs/namespaces.rb +1012 -0
- data/lib/azure_mgmt_notification_hubs/notification_hubs.rb +896 -0
- data/lib/azure_mgmt_notification_hubs/notification_hubs_management_client.rb +72 -0
- data/lib/azure_mgmt_notification_hubs/version.rb +8 -0
- metadata +167 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 7a8c4064e026b2763e14c6dcf03916be33b5e431
|
4
|
+
data.tar.gz: e21a4cfde7fa6240a5227d467522f6cdce78a0c4
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 6e5ad5f2576e03762a0ffbe9a0e23a129a60e874f5031505f241aae74f8a66c6c1d02b28e929a540178a55e998a2c12964d73bb9ddada6de1d48b411689c7eaa
|
7
|
+
data.tar.gz: aaae451b78a02dc1036be4c1cbb9df381931531da14cd17cf7f94b00e7807e3698354aa79da0f45f43d56bff2803af23bc829e5730067273c361a3a087ca642d
|
data/.rspec
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 Microsoft Corporation
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/Rakefile
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Copyright (c) Microsoft Corporation. All rights reserved.
|
3
|
+
# Licensed under the MIT License. See License.txt in the project root for license information.
|
4
|
+
|
5
|
+
lib = File.expand_path('../lib', __FILE__)
|
6
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
7
|
+
|
8
|
+
require 'azure_mgmt_notification_hubs/module_definition'
|
9
|
+
require 'azure_mgmt_notification_hubs/version'
|
10
|
+
|
11
|
+
Gem::Specification.new do |spec|
|
12
|
+
spec.name = 'azure_mgmt_notification_hubs'
|
13
|
+
spec.version = Azure::ARM::NotificationHubs::VERSION
|
14
|
+
spec.authors = 'Microsoft Corporation'
|
15
|
+
spec.email = 'azrubyteam@microsoft.com'
|
16
|
+
spec.description = 'Microsoft Azure Notification Hubs Management Client Library for Ruby'
|
17
|
+
spec.summary = 'Official Ruby client library to consume Microsoft Azure Notification Hubs Management services.'
|
18
|
+
spec.homepage = 'http://github.com/azure/azure-sdk-for-ruby'
|
19
|
+
spec.license = 'MIT'
|
20
|
+
|
21
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
22
|
+
spec.bindir = 'bin'
|
23
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
|
+
spec.require_paths = ['lib']
|
25
|
+
|
26
|
+
spec.required_ruby_version = '>= 1.9.3'
|
27
|
+
|
28
|
+
spec.add_development_dependency 'bundler', '~> 1.9'
|
29
|
+
spec.add_development_dependency 'rake', '~> 10'
|
30
|
+
spec.add_development_dependency 'rspec', '~> 3'
|
31
|
+
spec.add_development_dependency 'dotenv', '~> 2'
|
32
|
+
spec.add_development_dependency 'azure_mgmt_resources', '~> 0.2'
|
33
|
+
|
34
|
+
spec.add_runtime_dependency 'ms_rest_azure', '~> 0.2.0'
|
35
|
+
end
|
@@ -0,0 +1,57 @@
|
|
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
|
+
require 'uri'
|
7
|
+
require 'cgi'
|
8
|
+
require 'date'
|
9
|
+
require 'json'
|
10
|
+
require 'base64'
|
11
|
+
require 'erb'
|
12
|
+
require 'securerandom'
|
13
|
+
require 'time'
|
14
|
+
require 'timeliness'
|
15
|
+
require 'faraday'
|
16
|
+
require 'faraday-cookie_jar'
|
17
|
+
require 'concurrent'
|
18
|
+
require 'ms_rest'
|
19
|
+
require 'ms_rest_azure'
|
20
|
+
|
21
|
+
module Azure::ARM::NotificationHubs
|
22
|
+
autoload :Namespaces, 'azure_mgmt_notification_hubs/namespaces.rb'
|
23
|
+
autoload :NotificationHubs, 'azure_mgmt_notification_hubs/notification_hubs.rb'
|
24
|
+
autoload :NotificationHubsManagementClient, 'azure_mgmt_notification_hubs/notification_hubs_management_client.rb'
|
25
|
+
|
26
|
+
module Models
|
27
|
+
autoload :CheckAvailabilityParameters, 'azure_mgmt_notification_hubs/models/check_availability_parameters.rb'
|
28
|
+
autoload :CheckAvailabilityResource, 'azure_mgmt_notification_hubs/models/check_availability_resource.rb'
|
29
|
+
autoload :NamespaceProperties, 'azure_mgmt_notification_hubs/models/namespace_properties.rb'
|
30
|
+
autoload :NamespaceCreateOrUpdateParameters, 'azure_mgmt_notification_hubs/models/namespace_create_or_update_parameters.rb'
|
31
|
+
autoload :NamespaceResource, 'azure_mgmt_notification_hubs/models/namespace_resource.rb'
|
32
|
+
autoload :SharedAccessAuthorizationRuleProperties, 'azure_mgmt_notification_hubs/models/shared_access_authorization_rule_properties.rb'
|
33
|
+
autoload :SharedAccessAuthorizationRuleCreateOrUpdateParameters, 'azure_mgmt_notification_hubs/models/shared_access_authorization_rule_create_or_update_parameters.rb'
|
34
|
+
autoload :SharedAccessAuthorizationRuleResource, 'azure_mgmt_notification_hubs/models/shared_access_authorization_rule_resource.rb'
|
35
|
+
autoload :NamespaceListResult, 'azure_mgmt_notification_hubs/models/namespace_list_result.rb'
|
36
|
+
autoload :SharedAccessAuthorizationRuleListResult, 'azure_mgmt_notification_hubs/models/shared_access_authorization_rule_list_result.rb'
|
37
|
+
autoload :ResourceListKeys, 'azure_mgmt_notification_hubs/models/resource_list_keys.rb'
|
38
|
+
autoload :ApnsCredentialProperties, 'azure_mgmt_notification_hubs/models/apns_credential_properties.rb'
|
39
|
+
autoload :ApnsCredential, 'azure_mgmt_notification_hubs/models/apns_credential.rb'
|
40
|
+
autoload :WnsCredentialProperties, 'azure_mgmt_notification_hubs/models/wns_credential_properties.rb'
|
41
|
+
autoload :WnsCredential, 'azure_mgmt_notification_hubs/models/wns_credential.rb'
|
42
|
+
autoload :GcmCredentialProperties, 'azure_mgmt_notification_hubs/models/gcm_credential_properties.rb'
|
43
|
+
autoload :GcmCredential, 'azure_mgmt_notification_hubs/models/gcm_credential.rb'
|
44
|
+
autoload :MpnsCredentialProperties, 'azure_mgmt_notification_hubs/models/mpns_credential_properties.rb'
|
45
|
+
autoload :MpnsCredential, 'azure_mgmt_notification_hubs/models/mpns_credential.rb'
|
46
|
+
autoload :AdmCredentialProperties, 'azure_mgmt_notification_hubs/models/adm_credential_properties.rb'
|
47
|
+
autoload :AdmCredential, 'azure_mgmt_notification_hubs/models/adm_credential.rb'
|
48
|
+
autoload :BaiduCredentialProperties, 'azure_mgmt_notification_hubs/models/baidu_credential_properties.rb'
|
49
|
+
autoload :BaiduCredential, 'azure_mgmt_notification_hubs/models/baidu_credential.rb'
|
50
|
+
autoload :NotificationHubProperties, 'azure_mgmt_notification_hubs/models/notification_hub_properties.rb'
|
51
|
+
autoload :NotificationHubCreateOrUpdateParameters, 'azure_mgmt_notification_hubs/models/notification_hub_create_or_update_parameters.rb'
|
52
|
+
autoload :NotificationHubResource, 'azure_mgmt_notification_hubs/models/notification_hub_resource.rb'
|
53
|
+
autoload :NotificationHubListResult, 'azure_mgmt_notification_hubs/models/notification_hub_list_result.rb'
|
54
|
+
autoload :NamespaceType, 'azure_mgmt_notification_hubs/models/namespace_type.rb'
|
55
|
+
autoload :AccessRights, 'azure_mgmt_notification_hubs/models/access_rights.rb'
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,17 @@
|
|
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 AccessRights
|
10
|
+
#
|
11
|
+
module AccessRights
|
12
|
+
Manage = "Manage"
|
13
|
+
Send = "Send"
|
14
|
+
Listen = "Listen"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -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 AdmCredential.
|
10
|
+
#
|
11
|
+
class AdmCredential
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [AdmCredentialProperties] Gets or sets properties of
|
16
|
+
# NotificationHub AdmCredential.
|
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 = AdmCredentialProperties.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 [AdmCredential] Deserialized object.
|
48
|
+
#
|
49
|
+
def self.deserialize_object(object)
|
50
|
+
return if object.nil?
|
51
|
+
output_object = AdmCredential.new
|
52
|
+
|
53
|
+
deserialized_property = object['properties']
|
54
|
+
unless deserialized_property.nil?
|
55
|
+
deserialized_property = AdmCredentialProperties.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 AdmCredential.
|
10
|
+
#
|
11
|
+
class AdmCredentialProperties
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] Gets or sets the client identifier.
|
16
|
+
attr_accessor :client_id
|
17
|
+
|
18
|
+
# @return [String] Gets or sets the credential secret access key.
|
19
|
+
attr_accessor :client_secret
|
20
|
+
|
21
|
+
# @return [String] Gets or sets the URL of the authorization token.
|
22
|
+
attr_accessor :auth_token_url
|
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.client_id
|
41
|
+
output_object['clientId'] = serialized_property unless serialized_property.nil?
|
42
|
+
|
43
|
+
serialized_property = object.client_secret
|
44
|
+
output_object['clientSecret'] = serialized_property unless serialized_property.nil?
|
45
|
+
|
46
|
+
serialized_property = object.auth_token_url
|
47
|
+
output_object['authTokenUrl'] = 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 [AdmCredentialProperties] Deserialized object.
|
56
|
+
#
|
57
|
+
def self.deserialize_object(object)
|
58
|
+
return if object.nil?
|
59
|
+
output_object = AdmCredentialProperties.new
|
60
|
+
|
61
|
+
deserialized_property = object['clientId']
|
62
|
+
output_object.client_id = deserialized_property
|
63
|
+
|
64
|
+
deserialized_property = object['clientSecret']
|
65
|
+
output_object.client_secret = deserialized_property
|
66
|
+
|
67
|
+
deserialized_property = object['authTokenUrl']
|
68
|
+
output_object.auth_token_url = deserialized_property
|
69
|
+
|
70
|
+
output_object
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
@@ -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 ApnsCredential.
|
10
|
+
#
|
11
|
+
class ApnsCredential
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [ApnsCredentialProperties] Gets or sets properties of
|
16
|
+
# NotificationHub ApnsCredential.
|
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 = ApnsCredentialProperties.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 [ApnsCredential] Deserialized object.
|
48
|
+
#
|
49
|
+
def self.deserialize_object(object)
|
50
|
+
return if object.nil?
|
51
|
+
output_object = ApnsCredential.new
|
52
|
+
|
53
|
+
deserialized_property = object['properties']
|
54
|
+
unless deserialized_property.nil?
|
55
|
+
deserialized_property = ApnsCredentialProperties.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,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
|
+
# Description of a NotificationHub ApnsCredential.
|
10
|
+
#
|
11
|
+
class ApnsCredentialProperties
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] Gets or sets the APNS certificate.
|
16
|
+
attr_accessor :apns_certificate
|
17
|
+
|
18
|
+
# @return [String] Gets or sets the certificate key.
|
19
|
+
attr_accessor :certificate_key
|
20
|
+
|
21
|
+
# @return [String] Gets or sets the endpoint of this credential.
|
22
|
+
attr_accessor :endpoint
|
23
|
+
|
24
|
+
# @return [String] Gets or sets the Apns certificate Thumbprint
|
25
|
+
attr_accessor :thumbprint
|
26
|
+
|
27
|
+
#
|
28
|
+
# Validate the object. Throws ValidationError if validation fails.
|
29
|
+
#
|
30
|
+
def validate
|
31
|
+
# Nothing to validate
|
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.apns_certificate
|
44
|
+
output_object['apnsCertificate'] = serialized_property unless serialized_property.nil?
|
45
|
+
|
46
|
+
serialized_property = object.certificate_key
|
47
|
+
output_object['certificateKey'] = serialized_property unless serialized_property.nil?
|
48
|
+
|
49
|
+
serialized_property = object.endpoint
|
50
|
+
output_object['endpoint'] = serialized_property unless serialized_property.nil?
|
51
|
+
|
52
|
+
serialized_property = object.thumbprint
|
53
|
+
output_object['thumbprint'] = 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 [ApnsCredentialProperties] Deserialized object.
|
62
|
+
#
|
63
|
+
def self.deserialize_object(object)
|
64
|
+
return if object.nil?
|
65
|
+
output_object = ApnsCredentialProperties.new
|
66
|
+
|
67
|
+
deserialized_property = object['apnsCertificate']
|
68
|
+
output_object.apns_certificate = deserialized_property
|
69
|
+
|
70
|
+
deserialized_property = object['certificateKey']
|
71
|
+
output_object.certificate_key = deserialized_property
|
72
|
+
|
73
|
+
deserialized_property = object['endpoint']
|
74
|
+
output_object.endpoint = deserialized_property
|
75
|
+
|
76
|
+
deserialized_property = object['thumbprint']
|
77
|
+
output_object.thumbprint = deserialized_property
|
78
|
+
|
79
|
+
output_object
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|