azure_mgmt_graph 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_graph.gemspec +35 -0
- data/lib/azure_mgmt_graph.rb +55 -0
- data/lib/azure_mgmt_graph/application_operations.rb +336 -0
- data/lib/azure_mgmt_graph/graph_rbac_management_client.rb +82 -0
- data/lib/azure_mgmt_graph/group_operations.rb +647 -0
- data/lib/azure_mgmt_graph/models/aadobject.rb +138 -0
- data/lib/azure_mgmt_graph/models/adgroup.rb +92 -0
- data/lib/azure_mgmt_graph/models/application.rb +122 -0
- data/lib/azure_mgmt_graph/models/application_create_parameters.rb +160 -0
- data/lib/azure_mgmt_graph/models/application_filter.rb +74 -0
- data/lib/azure_mgmt_graph/models/application_list_result.rb +76 -0
- data/lib/azure_mgmt_graph/models/get_objects_parameters.rb +77 -0
- data/lib/azure_mgmt_graph/models/get_objects_result.rb +85 -0
- data/lib/azure_mgmt_graph/models/group_add_member_parameters.rb +56 -0
- data/lib/azure_mgmt_graph/models/group_create_parameters.rb +86 -0
- data/lib/azure_mgmt_graph/models/group_get_member_groups_parameters.rb +58 -0
- data/lib/azure_mgmt_graph/models/group_get_member_groups_result.rb +56 -0
- data/lib/azure_mgmt_graph/models/group_list_result.rb +85 -0
- data/lib/azure_mgmt_graph/models/key_credential.rb +105 -0
- data/lib/azure_mgmt_graph/models/password_credential.rb +87 -0
- data/lib/azure_mgmt_graph/models/service_principal.rb +92 -0
- data/lib/azure_mgmt_graph/models/service_principal_create_parameters.rb +66 -0
- data/lib/azure_mgmt_graph/models/service_principal_list_result.rb +86 -0
- data/lib/azure_mgmt_graph/models/user.rb +101 -0
- data/lib/azure_mgmt_graph/models/user_create_parameters.rb +103 -0
- data/lib/azure_mgmt_graph/models/user_create_parameters_password_profile.rb +65 -0
- data/lib/azure_mgmt_graph/models/user_get_member_groups_parameters.rb +58 -0
- data/lib/azure_mgmt_graph/models/user_get_member_groups_result.rb +56 -0
- data/lib/azure_mgmt_graph/models/user_list_result.rb +85 -0
- data/lib/azure_mgmt_graph/module_definition.rb +8 -0
- data/lib/azure_mgmt_graph/object_operations.rb +217 -0
- data/lib/azure_mgmt_graph/service_principal_operations.rb +331 -0
- data/lib/azure_mgmt_graph/user_operations.rb +408 -0
- data/lib/azure_mgmt_graph/version.rb +8 -0
- metadata +166 -0
@@ -0,0 +1,58 @@
|
|
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::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
|
@@ -0,0 +1,56 @@
|
|
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::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
|
@@ -0,0 +1,85 @@
|
|
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::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
|
@@ -0,0 +1,105 @@
|
|
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::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
|
@@ -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::Graph
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Active Directory service principal Password Credential information
|
10
|
+
#
|
11
|
+
class PasswordCredential
|
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 key Id
|
22
|
+
attr_accessor :key_id
|
23
|
+
|
24
|
+
# @return [String] Gets or sets value
|
25
|
+
attr_accessor :value
|
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.start_date
|
44
|
+
serialized_property = serialized_property.new_offset(0).strftime('%FT%TZ')
|
45
|
+
output_object['startDate'] = serialized_property unless serialized_property.nil?
|
46
|
+
|
47
|
+
serialized_property = object.end_date
|
48
|
+
serialized_property = serialized_property.new_offset(0).strftime('%FT%TZ')
|
49
|
+
output_object['endDate'] = serialized_property unless serialized_property.nil?
|
50
|
+
|
51
|
+
serialized_property = object.key_id
|
52
|
+
output_object['keyId'] = serialized_property unless serialized_property.nil?
|
53
|
+
|
54
|
+
serialized_property = object.value
|
55
|
+
output_object['value'] = serialized_property unless serialized_property.nil?
|
56
|
+
|
57
|
+
output_object
|
58
|
+
end
|
59
|
+
|
60
|
+
#
|
61
|
+
# Deserializes given Ruby Hash into Model object.
|
62
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
63
|
+
# @return [PasswordCredential] Deserialized object.
|
64
|
+
#
|
65
|
+
def self.deserialize_object(object)
|
66
|
+
return if object.nil?
|
67
|
+
output_object = PasswordCredential.new
|
68
|
+
|
69
|
+
deserialized_property = object['startDate']
|
70
|
+
deserialized_property = DateTime.parse(deserialized_property) unless deserialized_property.to_s.empty?
|
71
|
+
output_object.start_date = deserialized_property
|
72
|
+
|
73
|
+
deserialized_property = object['endDate']
|
74
|
+
deserialized_property = DateTime.parse(deserialized_property) unless deserialized_property.to_s.empty?
|
75
|
+
output_object.end_date = deserialized_property
|
76
|
+
|
77
|
+
deserialized_property = object['keyId']
|
78
|
+
output_object.key_id = deserialized_property
|
79
|
+
|
80
|
+
deserialized_property = object['value']
|
81
|
+
output_object.value = deserialized_property
|
82
|
+
|
83
|
+
output_object
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
@@ -0,0 +1,92 @@
|
|
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::Graph
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Active Directory service principal information
|
10
|
+
#
|
11
|
+
class ServicePrincipal
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] Gets or sets object Id
|
16
|
+
attr_accessor :object_id
|
17
|
+
|
18
|
+
# @return [String] Gets or sets object type
|
19
|
+
attr_accessor :object_type
|
20
|
+
|
21
|
+
# @return [String] Gets or sets service principal display name
|
22
|
+
attr_accessor :display_name
|
23
|
+
|
24
|
+
# @return [String] Gets or sets app id
|
25
|
+
attr_accessor :app_id
|
26
|
+
|
27
|
+
# @return [Array<String>] Gets or sets the list of names.
|
28
|
+
attr_accessor :service_principal_names
|
29
|
+
|
30
|
+
#
|
31
|
+
# Validate the object. Throws ValidationError if validation fails.
|
32
|
+
#
|
33
|
+
def validate
|
34
|
+
@service_principal_names.each{ |e| e.validate if e.respond_to?(:validate) } unless @service_principal_names.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.object_id
|
47
|
+
output_object['objectId'] = serialized_property unless serialized_property.nil?
|
48
|
+
|
49
|
+
serialized_property = object.object_type
|
50
|
+
output_object['objectType'] = serialized_property unless serialized_property.nil?
|
51
|
+
|
52
|
+
serialized_property = object.display_name
|
53
|
+
output_object['displayName'] = serialized_property unless serialized_property.nil?
|
54
|
+
|
55
|
+
serialized_property = object.app_id
|
56
|
+
output_object['appId'] = serialized_property unless serialized_property.nil?
|
57
|
+
|
58
|
+
serialized_property = object.service_principal_names
|
59
|
+
output_object['servicePrincipalNames'] = serialized_property unless serialized_property.nil?
|
60
|
+
|
61
|
+
output_object
|
62
|
+
end
|
63
|
+
|
64
|
+
#
|
65
|
+
# Deserializes given Ruby Hash into Model object.
|
66
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
67
|
+
# @return [ServicePrincipal] Deserialized object.
|
68
|
+
#
|
69
|
+
def self.deserialize_object(object)
|
70
|
+
return if object.nil?
|
71
|
+
output_object = ServicePrincipal.new
|
72
|
+
|
73
|
+
deserialized_property = object['objectId']
|
74
|
+
output_object.object_id = deserialized_property
|
75
|
+
|
76
|
+
deserialized_property = object['objectType']
|
77
|
+
output_object.object_type = deserialized_property
|
78
|
+
|
79
|
+
deserialized_property = object['displayName']
|
80
|
+
output_object.display_name = deserialized_property
|
81
|
+
|
82
|
+
deserialized_property = object['appId']
|
83
|
+
output_object.app_id = deserialized_property
|
84
|
+
|
85
|
+
deserialized_property = object['servicePrincipalNames']
|
86
|
+
output_object.service_principal_names = deserialized_property
|
87
|
+
|
88
|
+
output_object
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|