azure_mgmt_graph 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) 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_graph.gemspec +35 -0
  6. data/lib/azure_mgmt_graph.rb +55 -0
  7. data/lib/azure_mgmt_graph/application_operations.rb +336 -0
  8. data/lib/azure_mgmt_graph/graph_rbac_management_client.rb +82 -0
  9. data/lib/azure_mgmt_graph/group_operations.rb +647 -0
  10. data/lib/azure_mgmt_graph/models/aadobject.rb +138 -0
  11. data/lib/azure_mgmt_graph/models/adgroup.rb +92 -0
  12. data/lib/azure_mgmt_graph/models/application.rb +122 -0
  13. data/lib/azure_mgmt_graph/models/application_create_parameters.rb +160 -0
  14. data/lib/azure_mgmt_graph/models/application_filter.rb +74 -0
  15. data/lib/azure_mgmt_graph/models/application_list_result.rb +76 -0
  16. data/lib/azure_mgmt_graph/models/get_objects_parameters.rb +77 -0
  17. data/lib/azure_mgmt_graph/models/get_objects_result.rb +85 -0
  18. data/lib/azure_mgmt_graph/models/group_add_member_parameters.rb +56 -0
  19. data/lib/azure_mgmt_graph/models/group_create_parameters.rb +86 -0
  20. data/lib/azure_mgmt_graph/models/group_get_member_groups_parameters.rb +58 -0
  21. data/lib/azure_mgmt_graph/models/group_get_member_groups_result.rb +56 -0
  22. data/lib/azure_mgmt_graph/models/group_list_result.rb +85 -0
  23. data/lib/azure_mgmt_graph/models/key_credential.rb +105 -0
  24. data/lib/azure_mgmt_graph/models/password_credential.rb +87 -0
  25. data/lib/azure_mgmt_graph/models/service_principal.rb +92 -0
  26. data/lib/azure_mgmt_graph/models/service_principal_create_parameters.rb +66 -0
  27. data/lib/azure_mgmt_graph/models/service_principal_list_result.rb +86 -0
  28. data/lib/azure_mgmt_graph/models/user.rb +101 -0
  29. data/lib/azure_mgmt_graph/models/user_create_parameters.rb +103 -0
  30. data/lib/azure_mgmt_graph/models/user_create_parameters_password_profile.rb +65 -0
  31. data/lib/azure_mgmt_graph/models/user_get_member_groups_parameters.rb +58 -0
  32. data/lib/azure_mgmt_graph/models/user_get_member_groups_result.rb +56 -0
  33. data/lib/azure_mgmt_graph/models/user_list_result.rb +85 -0
  34. data/lib/azure_mgmt_graph/module_definition.rb +8 -0
  35. data/lib/azure_mgmt_graph/object_operations.rb +217 -0
  36. data/lib/azure_mgmt_graph/service_principal_operations.rb +331 -0
  37. data/lib/azure_mgmt_graph/user_operations.rb +408 -0
  38. data/lib/azure_mgmt_graph/version.rb +8 -0
  39. metadata +166 -0
@@ -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::Graph
7
+ module Models
8
+ #
9
+ # Filter parameters for listing applications
10
+ #
11
+ class ApplicationFilter
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Application display name starts with
16
+ attr_accessor :display_name_starts_with
17
+
18
+ # @return [String] ApplicationId
19
+ attr_accessor :app_id
20
+
21
+ # @return [String] Identifier Uri
22
+ attr_accessor :identifier_uri
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.display_name_starts_with
41
+ output_object['displayNameStartsWith'] = serialized_property unless serialized_property.nil?
42
+
43
+ serialized_property = object.app_id
44
+ output_object['appId'] = serialized_property unless serialized_property.nil?
45
+
46
+ serialized_property = object.identifier_uri
47
+ output_object['identifierUri'] = 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 [ApplicationFilter] Deserialized object.
56
+ #
57
+ def self.deserialize_object(object)
58
+ return if object.nil?
59
+ output_object = ApplicationFilter.new
60
+
61
+ deserialized_property = object['displayNameStartsWith']
62
+ output_object.display_name_starts_with = deserialized_property
63
+
64
+ deserialized_property = object['appId']
65
+ output_object.app_id = deserialized_property
66
+
67
+ deserialized_property = object['identifierUri']
68
+ output_object.identifier_uri = deserialized_property
69
+
70
+ output_object
71
+ end
72
+ end
73
+ end
74
+ end
@@ -0,0 +1,76 @@
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
+ # Role assignment list operation result.
10
+ #
11
+ class ApplicationListResult
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Array<Application>] Application list.
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
+ unless serialized_property.nil?
36
+ serializedArray = []
37
+ serialized_property.each do |element|
38
+ unless element.nil?
39
+ element = Application.serialize_object(element)
40
+ end
41
+ serializedArray.push(element)
42
+ end
43
+ serialized_property = serializedArray
44
+ end
45
+ output_object['value'] = serialized_property unless serialized_property.nil?
46
+
47
+ output_object
48
+ end
49
+
50
+ #
51
+ # Deserializes given Ruby Hash into Model object.
52
+ # @param object [Hash] Ruby Hash object to deserialize.
53
+ # @return [ApplicationListResult] Deserialized object.
54
+ #
55
+ def self.deserialize_object(object)
56
+ return if object.nil?
57
+ output_object = ApplicationListResult.new
58
+
59
+ deserialized_property = object['value']
60
+ unless deserialized_property.nil?
61
+ deserialized_array = []
62
+ deserialized_property.each do |element1|
63
+ unless element1.nil?
64
+ element1 = Application.deserialize_object(element1)
65
+ end
66
+ deserialized_array.push(element1)
67
+ end
68
+ deserialized_property = deserialized_array
69
+ end
70
+ output_object.value = deserialized_property
71
+
72
+ output_object
73
+ end
74
+ end
75
+ end
76
+ end
@@ -0,0 +1,77 @@
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 GetObjectsByObjectIds API call
10
+ #
11
+ class GetObjectsParameters
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Array<String>] Requested object Ids
16
+ attr_accessor :object_ids
17
+
18
+ # @return [Array<String>] Requested object types
19
+ attr_accessor :types
20
+
21
+ # @return [Boolean] If true, also searches for object ids in the partner
22
+ # tenant
23
+ attr_accessor :include_directory_object_references
24
+
25
+ #
26
+ # Validate the object. Throws ValidationError if validation fails.
27
+ #
28
+ def validate
29
+ fail MsRest::ValidationError, 'property include_directory_object_references is nil' if @include_directory_object_references.nil?
30
+ @object_ids.each{ |e| e.validate if e.respond_to?(:validate) } unless @object_ids.nil?
31
+ @types.each{ |e| e.validate if e.respond_to?(:validate) } unless @types.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.include_directory_object_references
44
+ output_object['includeDirectoryObjectReferences'] = serialized_property unless serialized_property.nil?
45
+
46
+ serialized_property = object.object_ids
47
+ output_object['objectIds'] = serialized_property unless serialized_property.nil?
48
+
49
+ serialized_property = object.types
50
+ output_object['types'] = serialized_property unless serialized_property.nil?
51
+
52
+ output_object
53
+ end
54
+
55
+ #
56
+ # Deserializes given Ruby Hash into Model object.
57
+ # @param object [Hash] Ruby Hash object to deserialize.
58
+ # @return [GetObjectsParameters] Deserialized object.
59
+ #
60
+ def self.deserialize_object(object)
61
+ return if object.nil?
62
+ output_object = GetObjectsParameters.new
63
+
64
+ deserialized_property = object['includeDirectoryObjectReferences']
65
+ output_object.include_directory_object_references = deserialized_property
66
+
67
+ deserialized_property = object['objectIds']
68
+ output_object.object_ids = deserialized_property
69
+
70
+ deserialized_property = object['types']
71
+ output_object.types = deserialized_property
72
+
73
+ output_object
74
+ end
75
+ end
76
+ end
77
+ 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 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
@@ -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
+ # 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
@@ -0,0 +1,86 @@
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 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