azure_mgmt_graph 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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,66 @@
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 service principal
10
+ #
11
+ class ServicePrincipalCreateParameters
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Gets or sets application Id
16
+ attr_accessor :app_id
17
+
18
+ # @return [Boolean] Specifies if the account is enabled
19
+ attr_accessor :account_enabled
20
+
21
+ #
22
+ # Validate the object. Throws ValidationError if validation fails.
23
+ #
24
+ def validate
25
+ fail MsRest::ValidationError, 'property app_id is nil' if @app_id.nil?
26
+ fail MsRest::ValidationError, 'property account_enabled is nil' if @account_enabled.nil?
27
+ end
28
+
29
+ #
30
+ # Serializes given Model object into Ruby Hash.
31
+ # @param object Model object to serialize.
32
+ # @return [Hash] Serialized object in form of Ruby Hash.
33
+ #
34
+ def self.serialize_object(object)
35
+ object.validate
36
+ output_object = {}
37
+
38
+ serialized_property = object.app_id
39
+ output_object['appId'] = serialized_property unless serialized_property.nil?
40
+
41
+ serialized_property = object.account_enabled
42
+ output_object['accountEnabled'] = serialized_property unless serialized_property.nil?
43
+
44
+ output_object
45
+ end
46
+
47
+ #
48
+ # Deserializes given Ruby Hash into Model object.
49
+ # @param object [Hash] Ruby Hash object to deserialize.
50
+ # @return [ServicePrincipalCreateParameters] Deserialized object.
51
+ #
52
+ def self.deserialize_object(object)
53
+ return if object.nil?
54
+ output_object = ServicePrincipalCreateParameters.new
55
+
56
+ deserialized_property = object['appId']
57
+ output_object.app_id = deserialized_property
58
+
59
+ deserialized_property = object['accountEnabled']
60
+ output_object.account_enabled = deserialized_property
61
+
62
+ output_object
63
+ end
64
+ end
65
+ end
66
+ 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
+ # Server response for get tenant service principals API call
10
+ #
11
+ class ServicePrincipalListResult
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Array<ServicePrincipal>] Gets or sets the list of service
16
+ # principals.
17
+ attr_accessor :value
18
+
19
+ # @return [String] Gets or sets the URL to get the next set of results.
20
+ attr_accessor :odatanext_link
21
+
22
+ #
23
+ # Validate the object. Throws ValidationError if validation fails.
24
+ #
25
+ def validate
26
+ @value.each{ |e| e.validate if e.respond_to?(:validate) } unless @value.nil?
27
+ end
28
+
29
+ #
30
+ # Serializes given Model object into Ruby Hash.
31
+ # @param object Model object to serialize.
32
+ # @return [Hash] Serialized object in form of Ruby Hash.
33
+ #
34
+ def self.serialize_object(object)
35
+ object.validate
36
+ output_object = {}
37
+
38
+ serialized_property = object.value
39
+ unless serialized_property.nil?
40
+ serializedArray = []
41
+ serialized_property.each do |element|
42
+ unless element.nil?
43
+ element = ServicePrincipal.serialize_object(element)
44
+ end
45
+ serializedArray.push(element)
46
+ end
47
+ serialized_property = serializedArray
48
+ end
49
+ output_object['value'] = serialized_property unless serialized_property.nil?
50
+
51
+ serialized_property = object.odatanext_link
52
+ output_object['odata.nextLink'] = 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 [ServicePrincipalListResult] Deserialized object.
61
+ #
62
+ def self.deserialize_object(object)
63
+ return if object.nil?
64
+ output_object = ServicePrincipalListResult.new
65
+
66
+ deserialized_property = object['value']
67
+ unless deserialized_property.nil?
68
+ deserialized_array = []
69
+ deserialized_property.each do |element1|
70
+ unless element1.nil?
71
+ element1 = ServicePrincipal.deserialize_object(element1)
72
+ end
73
+ deserialized_array.push(element1)
74
+ end
75
+ deserialized_property = deserialized_array
76
+ end
77
+ output_object.value = deserialized_property
78
+
79
+ deserialized_property = object['odata.nextLink']
80
+ output_object.odatanext_link = deserialized_property
81
+
82
+ output_object
83
+ end
84
+ end
85
+ end
86
+ end
@@ -0,0 +1,101 @@
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 user information
10
+ #
11
+ class User
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 user principal name
22
+ attr_accessor :user_principal_name
23
+
24
+ # @return [String] Gets or sets user display name
25
+ attr_accessor :display_name
26
+
27
+ # @return [String] Gets or sets user signIn name
28
+ attr_accessor :sign_in_name
29
+
30
+ # @return [String] Gets or sets user mail
31
+ attr_accessor :mail
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.object_id
50
+ output_object['objectId'] = serialized_property unless serialized_property.nil?
51
+
52
+ serialized_property = object.object_type
53
+ output_object['objectType'] = serialized_property unless serialized_property.nil?
54
+
55
+ serialized_property = object.user_principal_name
56
+ output_object['userPrincipalName'] = serialized_property unless serialized_property.nil?
57
+
58
+ serialized_property = object.display_name
59
+ output_object['displayName'] = serialized_property unless serialized_property.nil?
60
+
61
+ serialized_property = object.sign_in_name
62
+ output_object['signInName'] = serialized_property unless serialized_property.nil?
63
+
64
+ serialized_property = object.mail
65
+ output_object['mail'] = serialized_property unless serialized_property.nil?
66
+
67
+ output_object
68
+ end
69
+
70
+ #
71
+ # Deserializes given Ruby Hash into Model object.
72
+ # @param object [Hash] Ruby Hash object to deserialize.
73
+ # @return [User] Deserialized object.
74
+ #
75
+ def self.deserialize_object(object)
76
+ return if object.nil?
77
+ output_object = User.new
78
+
79
+ deserialized_property = object['objectId']
80
+ output_object.object_id = deserialized_property
81
+
82
+ deserialized_property = object['objectType']
83
+ output_object.object_type = deserialized_property
84
+
85
+ deserialized_property = object['userPrincipalName']
86
+ output_object.user_principal_name = deserialized_property
87
+
88
+ deserialized_property = object['displayName']
89
+ output_object.display_name = deserialized_property
90
+
91
+ deserialized_property = object['signInName']
92
+ output_object.sign_in_name = deserialized_property
93
+
94
+ deserialized_property = object['mail']
95
+ output_object.mail = deserialized_property
96
+
97
+ output_object
98
+ end
99
+ end
100
+ end
101
+ end
@@ -0,0 +1,103 @@
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 user
10
+ #
11
+ class UserCreateParameters
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] User Principal Name
16
+ attr_accessor :user_principal_name
17
+
18
+ # @return [Boolean] Enable the account
19
+ attr_accessor :account_enabled
20
+
21
+ # @return [String] User display name
22
+ attr_accessor :display_name
23
+
24
+ # @return [String] Mail nick name
25
+ attr_accessor :mail_nickname
26
+
27
+ # @return [UserCreateParametersPasswordProfile] Password Profile
28
+ attr_accessor :password_profile
29
+
30
+ #
31
+ # Validate the object. Throws ValidationError if validation fails.
32
+ #
33
+ def validate
34
+ fail MsRest::ValidationError, 'property user_principal_name is nil' if @user_principal_name.nil?
35
+ fail MsRest::ValidationError, 'property account_enabled is nil' if @account_enabled.nil?
36
+ fail MsRest::ValidationError, 'property display_name is nil' if @display_name.nil?
37
+ fail MsRest::ValidationError, 'property mail_nickname is nil' if @mail_nickname.nil?
38
+ fail MsRest::ValidationError, 'property password_profile is nil' if @password_profile.nil?
39
+ @password_profile.validate unless @password_profile.nil?
40
+ end
41
+
42
+ #
43
+ # Serializes given Model object into Ruby Hash.
44
+ # @param object Model object to serialize.
45
+ # @return [Hash] Serialized object in form of Ruby Hash.
46
+ #
47
+ def self.serialize_object(object)
48
+ object.validate
49
+ output_object = {}
50
+
51
+ serialized_property = object.user_principal_name
52
+ output_object['userPrincipalName'] = serialized_property unless serialized_property.nil?
53
+
54
+ serialized_property = object.account_enabled
55
+ output_object['accountEnabled'] = serialized_property unless serialized_property.nil?
56
+
57
+ serialized_property = object.display_name
58
+ output_object['displayName'] = serialized_property unless serialized_property.nil?
59
+
60
+ serialized_property = object.mail_nickname
61
+ output_object['mailNickname'] = serialized_property unless serialized_property.nil?
62
+
63
+ serialized_property = object.password_profile
64
+ unless serialized_property.nil?
65
+ serialized_property = UserCreateParametersPasswordProfile.serialize_object(serialized_property)
66
+ end
67
+ output_object['passwordProfile'] = 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 [UserCreateParameters] Deserialized object.
76
+ #
77
+ def self.deserialize_object(object)
78
+ return if object.nil?
79
+ output_object = UserCreateParameters.new
80
+
81
+ deserialized_property = object['userPrincipalName']
82
+ output_object.user_principal_name = deserialized_property
83
+
84
+ deserialized_property = object['accountEnabled']
85
+ output_object.account_enabled = deserialized_property
86
+
87
+ deserialized_property = object['displayName']
88
+ output_object.display_name = deserialized_property
89
+
90
+ deserialized_property = object['mailNickname']
91
+ output_object.mail_nickname = deserialized_property
92
+
93
+ deserialized_property = object['passwordProfile']
94
+ unless deserialized_property.nil?
95
+ deserialized_property = UserCreateParametersPasswordProfile.deserialize_object(deserialized_property)
96
+ end
97
+ output_object.password_profile = deserialized_property
98
+
99
+ output_object
100
+ end
101
+ end
102
+ end
103
+ end
@@ -0,0 +1,65 @@
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
+ # Model object.
10
+ #
11
+ class UserCreateParametersPasswordProfile
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Password
16
+ attr_accessor :password
17
+
18
+ # @return [Boolean] Force change password on next login
19
+ attr_accessor :force_change_password_next_login
20
+
21
+ #
22
+ # Validate the object. Throws ValidationError if validation fails.
23
+ #
24
+ def validate
25
+ fail MsRest::ValidationError, 'property password is nil' if @password.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.password
38
+ output_object['password'] = serialized_property unless serialized_property.nil?
39
+
40
+ serialized_property = object.force_change_password_next_login
41
+ output_object['forceChangePasswordNextLogin'] = serialized_property unless serialized_property.nil?
42
+
43
+ output_object
44
+ end
45
+
46
+ #
47
+ # Deserializes given Ruby Hash into Model object.
48
+ # @param object [Hash] Ruby Hash object to deserialize.
49
+ # @return [UserCreateParametersPasswordProfile] Deserialized object.
50
+ #
51
+ def self.deserialize_object(object)
52
+ return if object.nil?
53
+ output_object = UserCreateParametersPasswordProfile.new
54
+
55
+ deserialized_property = object['password']
56
+ output_object.password = deserialized_property
57
+
58
+ deserialized_property = object['forceChangePasswordNextLogin']
59
+ output_object.force_change_password_next_login = deserialized_property
60
+
61
+ output_object
62
+ end
63
+ end
64
+ end
65
+ end
@@ -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 UserGetMemberGroupsParameters
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 [UserGetMemberGroupsParameters] Deserialized object.
46
+ #
47
+ def self.deserialize_object(object)
48
+ return if object.nil?
49
+ output_object = UserGetMemberGroupsParameters.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