azure_mgmt_authorization 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_authorization.gemspec +34 -0
- data/lib/azure_mgmt_authorization/authorization_management_client.rb +84 -0
- data/lib/azure_mgmt_authorization/classic_administrators.rb +145 -0
- data/lib/azure_mgmt_authorization/models/classic_administrator.rb +90 -0
- data/lib/azure_mgmt_authorization/models/classic_administrator_list_result.rb +77 -0
- data/lib/azure_mgmt_authorization/models/classic_administrator_properties.rb +65 -0
- data/lib/azure_mgmt_authorization/models/permission.rb +66 -0
- data/lib/azure_mgmt_authorization/models/permission_get_result.rb +76 -0
- data/lib/azure_mgmt_authorization/models/provider_operation.rb +92 -0
- data/lib/azure_mgmt_authorization/models/provider_operations_metadata.rb +142 -0
- data/lib/azure_mgmt_authorization/models/provider_operations_metadata_list_result.rb +77 -0
- data/lib/azure_mgmt_authorization/models/resource_type.rb +95 -0
- data/lib/azure_mgmt_authorization/models/role_assignment.rb +90 -0
- data/lib/azure_mgmt_authorization/models/role_assignment_create_parameters.rb +63 -0
- data/lib/azure_mgmt_authorization/models/role_assignment_filter.rb +56 -0
- data/lib/azure_mgmt_authorization/models/role_assignment_list_result.rb +86 -0
- data/lib/azure_mgmt_authorization/models/role_assignment_properties.rb +65 -0
- data/lib/azure_mgmt_authorization/models/role_assignment_properties_with_scope.rb +74 -0
- data/lib/azure_mgmt_authorization/models/role_definition.rb +90 -0
- data/lib/azure_mgmt_authorization/models/role_definition_filter.rb +56 -0
- data/lib/azure_mgmt_authorization/models/role_definition_list_result.rb +76 -0
- data/lib/azure_mgmt_authorization/models/role_definition_properties.rb +113 -0
- data/lib/azure_mgmt_authorization/module_definition.rb +8 -0
- data/lib/azure_mgmt_authorization/permissions.rb +277 -0
- data/lib/azure_mgmt_authorization/provider_operations_metadata_operations.rb +207 -0
- data/lib/azure_mgmt_authorization/role_assignments.rb +907 -0
- data/lib/azure_mgmt_authorization/role_definitions.rb +408 -0
- data/lib/azure_mgmt_authorization/version.rb +8 -0
- data/lib/azure_mgmt_authorization.rb +50 -0
- metadata +147 -0
@@ -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::Authorization
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Role assignment properties.
|
10
|
+
#
|
11
|
+
class RoleAssignmentProperties
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] Gets or sets role definition id.
|
16
|
+
attr_accessor :role_definition_id
|
17
|
+
|
18
|
+
# @return [String] Gets or sets principal Id.
|
19
|
+
attr_accessor :principal_id
|
20
|
+
|
21
|
+
#
|
22
|
+
# Validate the object. Throws ValidationError if validation fails.
|
23
|
+
#
|
24
|
+
def validate
|
25
|
+
# Nothing to validate
|
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.role_definition_id
|
38
|
+
output_object['roleDefinitionId'] = serialized_property unless serialized_property.nil?
|
39
|
+
|
40
|
+
serialized_property = object.principal_id
|
41
|
+
output_object['principalId'] = 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 [RoleAssignmentProperties] Deserialized object.
|
50
|
+
#
|
51
|
+
def self.deserialize_object(object)
|
52
|
+
return if object.nil?
|
53
|
+
output_object = RoleAssignmentProperties.new
|
54
|
+
|
55
|
+
deserialized_property = object['roleDefinitionId']
|
56
|
+
output_object.role_definition_id = deserialized_property
|
57
|
+
|
58
|
+
deserialized_property = object['principalId']
|
59
|
+
output_object.principal_id = deserialized_property
|
60
|
+
|
61
|
+
output_object
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
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::Authorization
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Role assignment properties with scope.
|
10
|
+
#
|
11
|
+
class RoleAssignmentPropertiesWithScope
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] Gets or sets role assignment scope.
|
16
|
+
attr_accessor :scope
|
17
|
+
|
18
|
+
# @return [String] Gets or sets role definition id.
|
19
|
+
attr_accessor :role_definition_id
|
20
|
+
|
21
|
+
# @return [String] Gets or sets principal Id.
|
22
|
+
attr_accessor :principal_id
|
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.scope
|
41
|
+
output_object['scope'] = serialized_property unless serialized_property.nil?
|
42
|
+
|
43
|
+
serialized_property = object.role_definition_id
|
44
|
+
output_object['roleDefinitionId'] = serialized_property unless serialized_property.nil?
|
45
|
+
|
46
|
+
serialized_property = object.principal_id
|
47
|
+
output_object['principalId'] = 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 [RoleAssignmentPropertiesWithScope] Deserialized object.
|
56
|
+
#
|
57
|
+
def self.deserialize_object(object)
|
58
|
+
return if object.nil?
|
59
|
+
output_object = RoleAssignmentPropertiesWithScope.new
|
60
|
+
|
61
|
+
deserialized_property = object['scope']
|
62
|
+
output_object.scope = deserialized_property
|
63
|
+
|
64
|
+
deserialized_property = object['roleDefinitionId']
|
65
|
+
output_object.role_definition_id = deserialized_property
|
66
|
+
|
67
|
+
deserialized_property = object['principalId']
|
68
|
+
output_object.principal_id = deserialized_property
|
69
|
+
|
70
|
+
output_object
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
@@ -0,0 +1,90 @@
|
|
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::Authorization
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Role definition.
|
10
|
+
#
|
11
|
+
class RoleDefinition
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] Gets or sets role definition id.
|
16
|
+
attr_accessor :id
|
17
|
+
|
18
|
+
# @return [String] Gets or sets role definition name.
|
19
|
+
attr_accessor :name
|
20
|
+
|
21
|
+
# @return [String] Gets or sets role definition type.
|
22
|
+
attr_accessor :type
|
23
|
+
|
24
|
+
# @return [RoleDefinitionProperties] Gets or sets role definition
|
25
|
+
# properties.
|
26
|
+
attr_accessor :properties
|
27
|
+
|
28
|
+
#
|
29
|
+
# Validate the object. Throws ValidationError if validation fails.
|
30
|
+
#
|
31
|
+
def validate
|
32
|
+
@properties.validate unless @properties.nil?
|
33
|
+
end
|
34
|
+
|
35
|
+
#
|
36
|
+
# Serializes given Model object into Ruby Hash.
|
37
|
+
# @param object Model object to serialize.
|
38
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
39
|
+
#
|
40
|
+
def self.serialize_object(object)
|
41
|
+
object.validate
|
42
|
+
output_object = {}
|
43
|
+
|
44
|
+
serialized_property = object.id
|
45
|
+
output_object['id'] = serialized_property unless serialized_property.nil?
|
46
|
+
|
47
|
+
serialized_property = object.name
|
48
|
+
output_object['name'] = serialized_property unless serialized_property.nil?
|
49
|
+
|
50
|
+
serialized_property = object.type
|
51
|
+
output_object['type'] = serialized_property unless serialized_property.nil?
|
52
|
+
|
53
|
+
serialized_property = object.properties
|
54
|
+
unless serialized_property.nil?
|
55
|
+
serialized_property = RoleDefinitionProperties.serialize_object(serialized_property)
|
56
|
+
end
|
57
|
+
output_object['properties'] = serialized_property unless serialized_property.nil?
|
58
|
+
|
59
|
+
output_object
|
60
|
+
end
|
61
|
+
|
62
|
+
#
|
63
|
+
# Deserializes given Ruby Hash into Model object.
|
64
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
65
|
+
# @return [RoleDefinition] Deserialized object.
|
66
|
+
#
|
67
|
+
def self.deserialize_object(object)
|
68
|
+
return if object.nil?
|
69
|
+
output_object = RoleDefinition.new
|
70
|
+
|
71
|
+
deserialized_property = object['id']
|
72
|
+
output_object.id = deserialized_property
|
73
|
+
|
74
|
+
deserialized_property = object['name']
|
75
|
+
output_object.name = deserialized_property
|
76
|
+
|
77
|
+
deserialized_property = object['type']
|
78
|
+
output_object.type = deserialized_property
|
79
|
+
|
80
|
+
deserialized_property = object['properties']
|
81
|
+
unless deserialized_property.nil?
|
82
|
+
deserialized_property = RoleDefinitionProperties.deserialize_object(deserialized_property)
|
83
|
+
end
|
84
|
+
output_object.properties = deserialized_property
|
85
|
+
|
86
|
+
output_object
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
90
|
+
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::Authorization
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Role Definitions filter
|
10
|
+
#
|
11
|
+
class RoleDefinitionFilter
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] Returns role definition with the specific name.
|
16
|
+
attr_accessor :role_name
|
17
|
+
|
18
|
+
#
|
19
|
+
# Validate the object. Throws ValidationError if validation fails.
|
20
|
+
#
|
21
|
+
def validate
|
22
|
+
# Nothing to validate
|
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.role_name
|
35
|
+
output_object['roleName'] = 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 [RoleDefinitionFilter] Deserialized object.
|
44
|
+
#
|
45
|
+
def self.deserialize_object(object)
|
46
|
+
return if object.nil?
|
47
|
+
output_object = RoleDefinitionFilter.new
|
48
|
+
|
49
|
+
deserialized_property = object['roleName']
|
50
|
+
output_object.role_name = deserialized_property
|
51
|
+
|
52
|
+
output_object
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
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::Authorization
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Role definition list operation result.
|
10
|
+
#
|
11
|
+
class RoleDefinitionListResult
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [Array<RoleDefinition>] Role definition 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 = RoleDefinition.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 [RoleDefinitionListResult] Deserialized object.
|
54
|
+
#
|
55
|
+
def self.deserialize_object(object)
|
56
|
+
return if object.nil?
|
57
|
+
output_object = RoleDefinitionListResult.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 = RoleDefinition.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,113 @@
|
|
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::Authorization
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Role definition properties.
|
10
|
+
#
|
11
|
+
class RoleDefinitionProperties
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] Gets or sets role name.
|
16
|
+
attr_accessor :role_name
|
17
|
+
|
18
|
+
# @return [String] Gets or sets role definition description.
|
19
|
+
attr_accessor :description
|
20
|
+
|
21
|
+
# @return [String] Gets or sets role type.
|
22
|
+
attr_accessor :type
|
23
|
+
|
24
|
+
# @return [Array<Permission>] Gets or sets role definition permissions.
|
25
|
+
attr_accessor :permissions
|
26
|
+
|
27
|
+
# @return [Array<String>] Gets or sets role definition assignable scopes.
|
28
|
+
attr_accessor :assignable_scopes
|
29
|
+
|
30
|
+
#
|
31
|
+
# Validate the object. Throws ValidationError if validation fails.
|
32
|
+
#
|
33
|
+
def validate
|
34
|
+
@permissions.each{ |e| e.validate if e.respond_to?(:validate) } unless @permissions.nil?
|
35
|
+
@assignable_scopes.each{ |e| e.validate if e.respond_to?(:validate) } unless @assignable_scopes.nil?
|
36
|
+
end
|
37
|
+
|
38
|
+
#
|
39
|
+
# Serializes given Model object into Ruby Hash.
|
40
|
+
# @param object Model object to serialize.
|
41
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
42
|
+
#
|
43
|
+
def self.serialize_object(object)
|
44
|
+
object.validate
|
45
|
+
output_object = {}
|
46
|
+
|
47
|
+
serialized_property = object.role_name
|
48
|
+
output_object['roleName'] = serialized_property unless serialized_property.nil?
|
49
|
+
|
50
|
+
serialized_property = object.description
|
51
|
+
output_object['description'] = serialized_property unless serialized_property.nil?
|
52
|
+
|
53
|
+
serialized_property = object.type
|
54
|
+
output_object['type'] = serialized_property unless serialized_property.nil?
|
55
|
+
|
56
|
+
serialized_property = object.permissions
|
57
|
+
unless serialized_property.nil?
|
58
|
+
serializedArray = []
|
59
|
+
serialized_property.each do |element|
|
60
|
+
unless element.nil?
|
61
|
+
element = Permission.serialize_object(element)
|
62
|
+
end
|
63
|
+
serializedArray.push(element)
|
64
|
+
end
|
65
|
+
serialized_property = serializedArray
|
66
|
+
end
|
67
|
+
output_object['permissions'] = serialized_property unless serialized_property.nil?
|
68
|
+
|
69
|
+
serialized_property = object.assignable_scopes
|
70
|
+
output_object['assignableScopes'] = serialized_property unless serialized_property.nil?
|
71
|
+
|
72
|
+
output_object
|
73
|
+
end
|
74
|
+
|
75
|
+
#
|
76
|
+
# Deserializes given Ruby Hash into Model object.
|
77
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
78
|
+
# @return [RoleDefinitionProperties] Deserialized object.
|
79
|
+
#
|
80
|
+
def self.deserialize_object(object)
|
81
|
+
return if object.nil?
|
82
|
+
output_object = RoleDefinitionProperties.new
|
83
|
+
|
84
|
+
deserialized_property = object['roleName']
|
85
|
+
output_object.role_name = deserialized_property
|
86
|
+
|
87
|
+
deserialized_property = object['description']
|
88
|
+
output_object.description = deserialized_property
|
89
|
+
|
90
|
+
deserialized_property = object['type']
|
91
|
+
output_object.type = deserialized_property
|
92
|
+
|
93
|
+
deserialized_property = object['permissions']
|
94
|
+
unless deserialized_property.nil?
|
95
|
+
deserialized_array = []
|
96
|
+
deserialized_property.each do |element2|
|
97
|
+
unless element2.nil?
|
98
|
+
element2 = Permission.deserialize_object(element2)
|
99
|
+
end
|
100
|
+
deserialized_array.push(element2)
|
101
|
+
end
|
102
|
+
deserialized_property = deserialized_array
|
103
|
+
end
|
104
|
+
output_object.permissions = deserialized_property
|
105
|
+
|
106
|
+
deserialized_property = object['assignableScopes']
|
107
|
+
output_object.assignable_scopes = deserialized_property
|
108
|
+
|
109
|
+
output_object
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|