azure_mgmt_graph 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/azure_mgmt_graph.gemspec +4 -5
- data/lib/azure_mgmt_graph.rb +3 -54
- data/lib/generated/azure_mgmt_graph.rb +58 -0
- data/lib/{azure_mgmt_graph/application_operations.rb → generated/azure_mgmt_graph/applications.rb} +37 -33
- data/lib/{azure_mgmt_graph → generated/azure_mgmt_graph}/graph_rbac_management_client.rb +18 -18
- data/lib/{azure_mgmt_graph/group_operations.rb → generated/azure_mgmt_graph/groups.rb} +214 -62
- data/lib/generated/azure_mgmt_graph/models/aadobject.rb +142 -0
- data/lib/generated/azure_mgmt_graph/models/adgroup.rb +84 -0
- data/lib/generated/azure_mgmt_graph/models/application.rb +146 -0
- data/lib/generated/azure_mgmt_graph/models/application_create_parameters.rb +137 -0
- data/lib/generated/azure_mgmt_graph/models/application_list_result.rb +52 -0
- data/lib/generated/azure_mgmt_graph/models/application_update_parameters.rb +126 -0
- data/lib/generated/azure_mgmt_graph/models/check_group_membership_parameters.rb +55 -0
- data/lib/generated/azure_mgmt_graph/models/check_group_membership_result.rb +46 -0
- data/lib/generated/azure_mgmt_graph/models/get_objects_result.rb +93 -0
- data/lib/generated/azure_mgmt_graph/models/group_add_member_parameters.rb +48 -0
- data/lib/generated/azure_mgmt_graph/models/group_create_parameters.rb +82 -0
- data/lib/generated/azure_mgmt_graph/models/group_get_member_groups_parameters.rb +46 -0
- data/lib/generated/azure_mgmt_graph/models/group_get_member_groups_result.rb +51 -0
- data/lib/generated/azure_mgmt_graph/models/group_list_result.rb +93 -0
- data/lib/generated/azure_mgmt_graph/models/key_credential.rb +94 -0
- data/lib/generated/azure_mgmt_graph/models/password_credential.rb +74 -0
- data/lib/generated/azure_mgmt_graph/models/password_profile.rb +54 -0
- data/lib/generated/azure_mgmt_graph/models/service_principal.rb +91 -0
- data/lib/generated/azure_mgmt_graph/models/service_principal_create_parameters.rb +54 -0
- data/lib/generated/azure_mgmt_graph/models/service_principal_list_result.rb +94 -0
- data/lib/generated/azure_mgmt_graph/models/user.rb +104 -0
- data/lib/generated/azure_mgmt_graph/models/user_create_parameters.rb +100 -0
- data/lib/generated/azure_mgmt_graph/models/user_get_member_groups_parameters.rb +46 -0
- data/lib/generated/azure_mgmt_graph/models/user_get_member_groups_result.rb +51 -0
- data/lib/generated/azure_mgmt_graph/models/user_list_result.rb +93 -0
- data/lib/generated/azure_mgmt_graph/models/user_update_parameters.rb +76 -0
- data/lib/{azure_mgmt_graph → generated/azure_mgmt_graph}/module_definition.rb +0 -0
- data/lib/generated/azure_mgmt_graph/objects.rb +112 -0
- data/lib/{azure_mgmt_graph/service_principal_operations.rb → generated/azure_mgmt_graph/service_principals.rb} +50 -27
- data/lib/{azure_mgmt_graph/user_operations.rb → generated/azure_mgmt_graph/users.rb} +243 -115
- data/lib/{azure_mgmt_graph → generated/azure_mgmt_graph}/version.rb +1 -1
- metadata +56 -74
- data/lib/azure_mgmt_graph/models/aadobject.rb +0 -138
- data/lib/azure_mgmt_graph/models/adgroup.rb +0 -92
- data/lib/azure_mgmt_graph/models/application.rb +0 -122
- data/lib/azure_mgmt_graph/models/application_create_parameters.rb +0 -160
- data/lib/azure_mgmt_graph/models/application_filter.rb +0 -74
- data/lib/azure_mgmt_graph/models/application_list_result.rb +0 -76
- data/lib/azure_mgmt_graph/models/get_objects_parameters.rb +0 -77
- data/lib/azure_mgmt_graph/models/get_objects_result.rb +0 -85
- data/lib/azure_mgmt_graph/models/group_add_member_parameters.rb +0 -56
- data/lib/azure_mgmt_graph/models/group_create_parameters.rb +0 -86
- data/lib/azure_mgmt_graph/models/group_get_member_groups_parameters.rb +0 -58
- data/lib/azure_mgmt_graph/models/group_get_member_groups_result.rb +0 -56
- data/lib/azure_mgmt_graph/models/group_list_result.rb +0 -85
- data/lib/azure_mgmt_graph/models/key_credential.rb +0 -105
- data/lib/azure_mgmt_graph/models/password_credential.rb +0 -87
- data/lib/azure_mgmt_graph/models/service_principal.rb +0 -92
- data/lib/azure_mgmt_graph/models/service_principal_create_parameters.rb +0 -66
- data/lib/azure_mgmt_graph/models/service_principal_list_result.rb +0 -86
- data/lib/azure_mgmt_graph/models/user.rb +0 -101
- data/lib/azure_mgmt_graph/models/user_create_parameters.rb +0 -103
- data/lib/azure_mgmt_graph/models/user_create_parameters_password_profile.rb +0 -65
- data/lib/azure_mgmt_graph/models/user_get_member_groups_parameters.rb +0 -58
- data/lib/azure_mgmt_graph/models/user_get_member_groups_result.rb +0 -56
- data/lib/azure_mgmt_graph/models/user_list_result.rb +0 -85
- data/lib/azure_mgmt_graph/object_operations.rb +0 -302
@@ -1,85 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
|
3
|
-
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
-
# regenerated.
|
5
|
-
|
6
|
-
module Azure::ARM::Graph
|
7
|
-
module Models
|
8
|
-
#
|
9
|
-
# Server response for Active Directory objects inquiry API calls
|
10
|
-
#
|
11
|
-
class GetObjectsResult
|
12
|
-
|
13
|
-
include MsRestAzure
|
14
|
-
|
15
|
-
# @return [Array<AADObject>] Collection of Active Directory object
|
16
|
-
attr_accessor :value
|
17
|
-
|
18
|
-
# @return [String] Gets or sets the URL to get the next set of results.
|
19
|
-
attr_accessor :odatanext_link
|
20
|
-
|
21
|
-
#
|
22
|
-
# Validate the object. Throws ValidationError if validation fails.
|
23
|
-
#
|
24
|
-
def validate
|
25
|
-
@value.each{ |e| e.validate if e.respond_to?(:validate) } unless @value.nil?
|
26
|
-
end
|
27
|
-
|
28
|
-
#
|
29
|
-
# Serializes given Model object into Ruby Hash.
|
30
|
-
# @param object Model object to serialize.
|
31
|
-
# @return [Hash] Serialized object in form of Ruby Hash.
|
32
|
-
#
|
33
|
-
def self.serialize_object(object)
|
34
|
-
object.validate
|
35
|
-
output_object = {}
|
36
|
-
|
37
|
-
serialized_property = object.value
|
38
|
-
unless serialized_property.nil?
|
39
|
-
serializedArray = []
|
40
|
-
serialized_property.each do |element|
|
41
|
-
unless element.nil?
|
42
|
-
element = AADObject.serialize_object(element)
|
43
|
-
end
|
44
|
-
serializedArray.push(element)
|
45
|
-
end
|
46
|
-
serialized_property = serializedArray
|
47
|
-
end
|
48
|
-
output_object['value'] = serialized_property unless serialized_property.nil?
|
49
|
-
|
50
|
-
serialized_property = object.odatanext_link
|
51
|
-
output_object['odata.nextLink'] = serialized_property unless serialized_property.nil?
|
52
|
-
|
53
|
-
output_object
|
54
|
-
end
|
55
|
-
|
56
|
-
#
|
57
|
-
# Deserializes given Ruby Hash into Model object.
|
58
|
-
# @param object [Hash] Ruby Hash object to deserialize.
|
59
|
-
# @return [GetObjectsResult] Deserialized object.
|
60
|
-
#
|
61
|
-
def self.deserialize_object(object)
|
62
|
-
return if object.nil?
|
63
|
-
output_object = GetObjectsResult.new
|
64
|
-
|
65
|
-
deserialized_property = object['value']
|
66
|
-
unless deserialized_property.nil?
|
67
|
-
deserialized_array = []
|
68
|
-
deserialized_property.each do |element1|
|
69
|
-
unless element1.nil?
|
70
|
-
element1 = AADObject.deserialize_object(element1)
|
71
|
-
end
|
72
|
-
deserialized_array.push(element1)
|
73
|
-
end
|
74
|
-
deserialized_property = deserialized_array
|
75
|
-
end
|
76
|
-
output_object.value = deserialized_property
|
77
|
-
|
78
|
-
deserialized_property = object['odata.nextLink']
|
79
|
-
output_object.odatanext_link = deserialized_property
|
80
|
-
|
81
|
-
output_object
|
82
|
-
end
|
83
|
-
end
|
84
|
-
end
|
85
|
-
end
|
@@ -1,56 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
|
3
|
-
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
-
# regenerated.
|
5
|
-
|
6
|
-
module Azure::ARM::Graph
|
7
|
-
module Models
|
8
|
-
#
|
9
|
-
# Request parameters for adding members to a groups
|
10
|
-
#
|
11
|
-
class GroupAddMemberParameters
|
12
|
-
|
13
|
-
include MsRestAzure
|
14
|
-
|
15
|
-
# @return [String] Group display name
|
16
|
-
attr_accessor :url
|
17
|
-
|
18
|
-
#
|
19
|
-
# Validate the object. Throws ValidationError if validation fails.
|
20
|
-
#
|
21
|
-
def validate
|
22
|
-
fail MsRest::ValidationError, 'property url is nil' if @url.nil?
|
23
|
-
end
|
24
|
-
|
25
|
-
#
|
26
|
-
# Serializes given Model object into Ruby Hash.
|
27
|
-
# @param object Model object to serialize.
|
28
|
-
# @return [Hash] Serialized object in form of Ruby Hash.
|
29
|
-
#
|
30
|
-
def self.serialize_object(object)
|
31
|
-
object.validate
|
32
|
-
output_object = {}
|
33
|
-
|
34
|
-
serialized_property = object.url
|
35
|
-
output_object['url'] = serialized_property unless serialized_property.nil?
|
36
|
-
|
37
|
-
output_object
|
38
|
-
end
|
39
|
-
|
40
|
-
#
|
41
|
-
# Deserializes given Ruby Hash into Model object.
|
42
|
-
# @param object [Hash] Ruby Hash object to deserialize.
|
43
|
-
# @return [GroupAddMemberParameters] Deserialized object.
|
44
|
-
#
|
45
|
-
def self.deserialize_object(object)
|
46
|
-
return if object.nil?
|
47
|
-
output_object = GroupAddMemberParameters.new
|
48
|
-
|
49
|
-
deserialized_property = object['url']
|
50
|
-
output_object.url = deserialized_property
|
51
|
-
|
52
|
-
output_object
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|
@@ -1,86 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
|
3
|
-
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
-
# regenerated.
|
5
|
-
|
6
|
-
module Azure::ARM::Graph
|
7
|
-
module Models
|
8
|
-
#
|
9
|
-
# Request parameters for create a new group
|
10
|
-
#
|
11
|
-
class GroupCreateParameters
|
12
|
-
|
13
|
-
include MsRestAzure
|
14
|
-
|
15
|
-
# @return [String] Group display name
|
16
|
-
attr_accessor :display_name
|
17
|
-
|
18
|
-
# @return [Boolean] Mail
|
19
|
-
attr_accessor :mail_enabled
|
20
|
-
|
21
|
-
# @return [String] Mail nick name
|
22
|
-
attr_accessor :mail_nickname
|
23
|
-
|
24
|
-
# @return [Boolean] Is security enabled
|
25
|
-
attr_accessor :security_enabled
|
26
|
-
|
27
|
-
#
|
28
|
-
# Validate the object. Throws ValidationError if validation fails.
|
29
|
-
#
|
30
|
-
def validate
|
31
|
-
fail MsRest::ValidationError, 'property display_name is nil' if @display_name.nil?
|
32
|
-
fail MsRest::ValidationError, 'property mail_enabled is nil' if @mail_enabled.nil?
|
33
|
-
fail MsRest::ValidationError, 'property mail_nickname is nil' if @mail_nickname.nil?
|
34
|
-
fail MsRest::ValidationError, 'property security_enabled is nil' if @security_enabled.nil?
|
35
|
-
end
|
36
|
-
|
37
|
-
#
|
38
|
-
# Serializes given Model object into Ruby Hash.
|
39
|
-
# @param object Model object to serialize.
|
40
|
-
# @return [Hash] Serialized object in form of Ruby Hash.
|
41
|
-
#
|
42
|
-
def self.serialize_object(object)
|
43
|
-
object.validate
|
44
|
-
output_object = {}
|
45
|
-
|
46
|
-
serialized_property = object.display_name
|
47
|
-
output_object['displayName'] = serialized_property unless serialized_property.nil?
|
48
|
-
|
49
|
-
serialized_property = object.mail_enabled
|
50
|
-
output_object['mailEnabled'] = serialized_property unless serialized_property.nil?
|
51
|
-
|
52
|
-
serialized_property = object.mail_nickname
|
53
|
-
output_object['mailNickname'] = serialized_property unless serialized_property.nil?
|
54
|
-
|
55
|
-
serialized_property = object.security_enabled
|
56
|
-
output_object['securityEnabled'] = serialized_property unless serialized_property.nil?
|
57
|
-
|
58
|
-
output_object
|
59
|
-
end
|
60
|
-
|
61
|
-
#
|
62
|
-
# Deserializes given Ruby Hash into Model object.
|
63
|
-
# @param object [Hash] Ruby Hash object to deserialize.
|
64
|
-
# @return [GroupCreateParameters] Deserialized object.
|
65
|
-
#
|
66
|
-
def self.deserialize_object(object)
|
67
|
-
return if object.nil?
|
68
|
-
output_object = GroupCreateParameters.new
|
69
|
-
|
70
|
-
deserialized_property = object['displayName']
|
71
|
-
output_object.display_name = deserialized_property
|
72
|
-
|
73
|
-
deserialized_property = object['mailEnabled']
|
74
|
-
output_object.mail_enabled = deserialized_property
|
75
|
-
|
76
|
-
deserialized_property = object['mailNickname']
|
77
|
-
output_object.mail_nickname = deserialized_property
|
78
|
-
|
79
|
-
deserialized_property = object['securityEnabled']
|
80
|
-
output_object.security_enabled = deserialized_property
|
81
|
-
|
82
|
-
output_object
|
83
|
-
end
|
84
|
-
end
|
85
|
-
end
|
86
|
-
end
|
@@ -1,58 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
|
3
|
-
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
-
# regenerated.
|
5
|
-
|
6
|
-
module Azure::ARM::Graph
|
7
|
-
module Models
|
8
|
-
#
|
9
|
-
# Request parameters for GetMemberGroups API call
|
10
|
-
#
|
11
|
-
class GroupGetMemberGroupsParameters
|
12
|
-
|
13
|
-
include MsRestAzure
|
14
|
-
|
15
|
-
# @return [Boolean] If true only membership in security enabled groups
|
16
|
-
# should be checked. Otherwise membership in all groups should be
|
17
|
-
# checked
|
18
|
-
attr_accessor :security_enabled_only
|
19
|
-
|
20
|
-
#
|
21
|
-
# Validate the object. Throws ValidationError if validation fails.
|
22
|
-
#
|
23
|
-
def validate
|
24
|
-
fail MsRest::ValidationError, 'property security_enabled_only is nil' if @security_enabled_only.nil?
|
25
|
-
end
|
26
|
-
|
27
|
-
#
|
28
|
-
# Serializes given Model object into Ruby Hash.
|
29
|
-
# @param object Model object to serialize.
|
30
|
-
# @return [Hash] Serialized object in form of Ruby Hash.
|
31
|
-
#
|
32
|
-
def self.serialize_object(object)
|
33
|
-
object.validate
|
34
|
-
output_object = {}
|
35
|
-
|
36
|
-
serialized_property = object.security_enabled_only
|
37
|
-
output_object['securityEnabledOnly'] = serialized_property unless serialized_property.nil?
|
38
|
-
|
39
|
-
output_object
|
40
|
-
end
|
41
|
-
|
42
|
-
#
|
43
|
-
# Deserializes given Ruby Hash into Model object.
|
44
|
-
# @param object [Hash] Ruby Hash object to deserialize.
|
45
|
-
# @return [GroupGetMemberGroupsParameters] Deserialized object.
|
46
|
-
#
|
47
|
-
def self.deserialize_object(object)
|
48
|
-
return if object.nil?
|
49
|
-
output_object = GroupGetMemberGroupsParameters.new
|
50
|
-
|
51
|
-
deserialized_property = object['securityEnabledOnly']
|
52
|
-
output_object.security_enabled_only = deserialized_property
|
53
|
-
|
54
|
-
output_object
|
55
|
-
end
|
56
|
-
end
|
57
|
-
end
|
58
|
-
end
|
@@ -1,56 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
|
3
|
-
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
-
# regenerated.
|
5
|
-
|
6
|
-
module Azure::ARM::Graph
|
7
|
-
module Models
|
8
|
-
#
|
9
|
-
# Server response for GetMemberGroups API call
|
10
|
-
#
|
11
|
-
class GroupGetMemberGroupsResult
|
12
|
-
|
13
|
-
include MsRestAzure
|
14
|
-
|
15
|
-
# @return [Array<String>] Group Ids of which the group is a member
|
16
|
-
attr_accessor :value
|
17
|
-
|
18
|
-
#
|
19
|
-
# Validate the object. Throws ValidationError if validation fails.
|
20
|
-
#
|
21
|
-
def validate
|
22
|
-
@value.each{ |e| e.validate if e.respond_to?(:validate) } unless @value.nil?
|
23
|
-
end
|
24
|
-
|
25
|
-
#
|
26
|
-
# Serializes given Model object into Ruby Hash.
|
27
|
-
# @param object Model object to serialize.
|
28
|
-
# @return [Hash] Serialized object in form of Ruby Hash.
|
29
|
-
#
|
30
|
-
def self.serialize_object(object)
|
31
|
-
object.validate
|
32
|
-
output_object = {}
|
33
|
-
|
34
|
-
serialized_property = object.value
|
35
|
-
output_object['value'] = serialized_property unless serialized_property.nil?
|
36
|
-
|
37
|
-
output_object
|
38
|
-
end
|
39
|
-
|
40
|
-
#
|
41
|
-
# Deserializes given Ruby Hash into Model object.
|
42
|
-
# @param object [Hash] Ruby Hash object to deserialize.
|
43
|
-
# @return [GroupGetMemberGroupsResult] Deserialized object.
|
44
|
-
#
|
45
|
-
def self.deserialize_object(object)
|
46
|
-
return if object.nil?
|
47
|
-
output_object = GroupGetMemberGroupsResult.new
|
48
|
-
|
49
|
-
deserialized_property = object['value']
|
50
|
-
output_object.value = deserialized_property
|
51
|
-
|
52
|
-
output_object
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|
@@ -1,85 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
|
3
|
-
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
-
# regenerated.
|
5
|
-
|
6
|
-
module Azure::ARM::Graph
|
7
|
-
module Models
|
8
|
-
#
|
9
|
-
# Server response for Get tenant groups API call
|
10
|
-
#
|
11
|
-
class GroupListResult
|
12
|
-
|
13
|
-
include MsRestAzure
|
14
|
-
|
15
|
-
# @return [Array<ADGroup>] Gets or sets the list of groups.
|
16
|
-
attr_accessor :value
|
17
|
-
|
18
|
-
# @return [String] Gets or sets the URL to get the next set of results.
|
19
|
-
attr_accessor :odatanext_link
|
20
|
-
|
21
|
-
#
|
22
|
-
# Validate the object. Throws ValidationError if validation fails.
|
23
|
-
#
|
24
|
-
def validate
|
25
|
-
@value.each{ |e| e.validate if e.respond_to?(:validate) } unless @value.nil?
|
26
|
-
end
|
27
|
-
|
28
|
-
#
|
29
|
-
# Serializes given Model object into Ruby Hash.
|
30
|
-
# @param object Model object to serialize.
|
31
|
-
# @return [Hash] Serialized object in form of Ruby Hash.
|
32
|
-
#
|
33
|
-
def self.serialize_object(object)
|
34
|
-
object.validate
|
35
|
-
output_object = {}
|
36
|
-
|
37
|
-
serialized_property = object.value
|
38
|
-
unless serialized_property.nil?
|
39
|
-
serializedArray = []
|
40
|
-
serialized_property.each do |element|
|
41
|
-
unless element.nil?
|
42
|
-
element = ADGroup.serialize_object(element)
|
43
|
-
end
|
44
|
-
serializedArray.push(element)
|
45
|
-
end
|
46
|
-
serialized_property = serializedArray
|
47
|
-
end
|
48
|
-
output_object['value'] = serialized_property unless serialized_property.nil?
|
49
|
-
|
50
|
-
serialized_property = object.odatanext_link
|
51
|
-
output_object['odata.nextLink'] = serialized_property unless serialized_property.nil?
|
52
|
-
|
53
|
-
output_object
|
54
|
-
end
|
55
|
-
|
56
|
-
#
|
57
|
-
# Deserializes given Ruby Hash into Model object.
|
58
|
-
# @param object [Hash] Ruby Hash object to deserialize.
|
59
|
-
# @return [GroupListResult] Deserialized object.
|
60
|
-
#
|
61
|
-
def self.deserialize_object(object)
|
62
|
-
return if object.nil?
|
63
|
-
output_object = GroupListResult.new
|
64
|
-
|
65
|
-
deserialized_property = object['value']
|
66
|
-
unless deserialized_property.nil?
|
67
|
-
deserialized_array = []
|
68
|
-
deserialized_property.each do |element1|
|
69
|
-
unless element1.nil?
|
70
|
-
element1 = ADGroup.deserialize_object(element1)
|
71
|
-
end
|
72
|
-
deserialized_array.push(element1)
|
73
|
-
end
|
74
|
-
deserialized_property = deserialized_array
|
75
|
-
end
|
76
|
-
output_object.value = deserialized_property
|
77
|
-
|
78
|
-
deserialized_property = object['odata.nextLink']
|
79
|
-
output_object.odatanext_link = deserialized_property
|
80
|
-
|
81
|
-
output_object
|
82
|
-
end
|
83
|
-
end
|
84
|
-
end
|
85
|
-
end
|
@@ -1,105 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
|
3
|
-
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
-
# regenerated.
|
5
|
-
|
6
|
-
module Azure::ARM::Graph
|
7
|
-
module Models
|
8
|
-
#
|
9
|
-
# Active Directory service principal Key Credential information
|
10
|
-
#
|
11
|
-
class KeyCredential
|
12
|
-
|
13
|
-
include MsRestAzure
|
14
|
-
|
15
|
-
# @return [DateTime] Gets or sets start date
|
16
|
-
attr_accessor :start_date
|
17
|
-
|
18
|
-
# @return [DateTime] Gets or sets end date
|
19
|
-
attr_accessor :end_date
|
20
|
-
|
21
|
-
# @return [String] Gets or sets value
|
22
|
-
attr_accessor :value
|
23
|
-
|
24
|
-
# @return [String] Gets or sets key Id
|
25
|
-
attr_accessor :key_id
|
26
|
-
|
27
|
-
# @return [String] Gets or sets usage
|
28
|
-
attr_accessor :usage
|
29
|
-
|
30
|
-
# @return [String] Gets or sets type
|
31
|
-
attr_accessor :type
|
32
|
-
|
33
|
-
#
|
34
|
-
# Validate the object. Throws ValidationError if validation fails.
|
35
|
-
#
|
36
|
-
def validate
|
37
|
-
# Nothing to validate
|
38
|
-
end
|
39
|
-
|
40
|
-
#
|
41
|
-
# Serializes given Model object into Ruby Hash.
|
42
|
-
# @param object Model object to serialize.
|
43
|
-
# @return [Hash] Serialized object in form of Ruby Hash.
|
44
|
-
#
|
45
|
-
def self.serialize_object(object)
|
46
|
-
object.validate
|
47
|
-
output_object = {}
|
48
|
-
|
49
|
-
serialized_property = object.start_date
|
50
|
-
serialized_property = serialized_property.new_offset(0).strftime('%FT%TZ')
|
51
|
-
output_object['startDate'] = serialized_property unless serialized_property.nil?
|
52
|
-
|
53
|
-
serialized_property = object.end_date
|
54
|
-
serialized_property = serialized_property.new_offset(0).strftime('%FT%TZ')
|
55
|
-
output_object['endDate'] = serialized_property unless serialized_property.nil?
|
56
|
-
|
57
|
-
serialized_property = object.value
|
58
|
-
output_object['value'] = serialized_property unless serialized_property.nil?
|
59
|
-
|
60
|
-
serialized_property = object.key_id
|
61
|
-
output_object['keyId'] = serialized_property unless serialized_property.nil?
|
62
|
-
|
63
|
-
serialized_property = object.usage
|
64
|
-
output_object['usage'] = serialized_property unless serialized_property.nil?
|
65
|
-
|
66
|
-
serialized_property = object.type
|
67
|
-
output_object['type'] = serialized_property unless serialized_property.nil?
|
68
|
-
|
69
|
-
output_object
|
70
|
-
end
|
71
|
-
|
72
|
-
#
|
73
|
-
# Deserializes given Ruby Hash into Model object.
|
74
|
-
# @param object [Hash] Ruby Hash object to deserialize.
|
75
|
-
# @return [KeyCredential] Deserialized object.
|
76
|
-
#
|
77
|
-
def self.deserialize_object(object)
|
78
|
-
return if object.nil?
|
79
|
-
output_object = KeyCredential.new
|
80
|
-
|
81
|
-
deserialized_property = object['startDate']
|
82
|
-
deserialized_property = DateTime.parse(deserialized_property) unless deserialized_property.to_s.empty?
|
83
|
-
output_object.start_date = deserialized_property
|
84
|
-
|
85
|
-
deserialized_property = object['endDate']
|
86
|
-
deserialized_property = DateTime.parse(deserialized_property) unless deserialized_property.to_s.empty?
|
87
|
-
output_object.end_date = deserialized_property
|
88
|
-
|
89
|
-
deserialized_property = object['value']
|
90
|
-
output_object.value = deserialized_property
|
91
|
-
|
92
|
-
deserialized_property = object['keyId']
|
93
|
-
output_object.key_id = deserialized_property
|
94
|
-
|
95
|
-
deserialized_property = object['usage']
|
96
|
-
output_object.usage = deserialized_property
|
97
|
-
|
98
|
-
deserialized_property = object['type']
|
99
|
-
output_object.type = deserialized_property
|
100
|
-
|
101
|
-
output_object
|
102
|
-
end
|
103
|
-
end
|
104
|
-
end
|
105
|
-
end
|