azure_mgmt_authorization 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.
- 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,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::Authorization
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Operation
|
10
|
+
#
|
11
|
+
class ProviderOperation
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] Gets or sets the operation name
|
16
|
+
attr_accessor :name
|
17
|
+
|
18
|
+
# @return [String] Gets or sets the operation display name
|
19
|
+
attr_accessor :display_name
|
20
|
+
|
21
|
+
# @return [String] Gets or sets the operation description
|
22
|
+
attr_accessor :description
|
23
|
+
|
24
|
+
# @return [String] Gets or sets the operation origin
|
25
|
+
attr_accessor :origin
|
26
|
+
|
27
|
+
# @return Gets or sets the operation properties
|
28
|
+
attr_accessor :properties
|
29
|
+
|
30
|
+
#
|
31
|
+
# Validate the object. Throws ValidationError if validation fails.
|
32
|
+
#
|
33
|
+
def validate
|
34
|
+
# Nothing to validate
|
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.name
|
47
|
+
output_object['name'] = serialized_property unless serialized_property.nil?
|
48
|
+
|
49
|
+
serialized_property = object.display_name
|
50
|
+
output_object['displayName'] = serialized_property unless serialized_property.nil?
|
51
|
+
|
52
|
+
serialized_property = object.description
|
53
|
+
output_object['description'] = serialized_property unless serialized_property.nil?
|
54
|
+
|
55
|
+
serialized_property = object.origin
|
56
|
+
output_object['origin'] = serialized_property unless serialized_property.nil?
|
57
|
+
|
58
|
+
serialized_property = object.properties
|
59
|
+
output_object['properties'] = 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 [ProviderOperation] Deserialized object.
|
68
|
+
#
|
69
|
+
def self.deserialize_object(object)
|
70
|
+
return if object.nil?
|
71
|
+
output_object = ProviderOperation.new
|
72
|
+
|
73
|
+
deserialized_property = object['name']
|
74
|
+
output_object.name = deserialized_property
|
75
|
+
|
76
|
+
deserialized_property = object['displayName']
|
77
|
+
output_object.display_name = deserialized_property
|
78
|
+
|
79
|
+
deserialized_property = object['description']
|
80
|
+
output_object.description = deserialized_property
|
81
|
+
|
82
|
+
deserialized_property = object['origin']
|
83
|
+
output_object.origin = deserialized_property
|
84
|
+
|
85
|
+
deserialized_property = object['properties']
|
86
|
+
output_object.properties = deserialized_property
|
87
|
+
|
88
|
+
output_object
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
@@ -0,0 +1,142 @@
|
|
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
|
+
# Provider Operations metadata
|
10
|
+
#
|
11
|
+
class ProviderOperationsMetadata
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] Gets or sets the provider id.
|
16
|
+
attr_accessor :id
|
17
|
+
|
18
|
+
# @return [String] Gets or sets the provider name
|
19
|
+
attr_accessor :name
|
20
|
+
|
21
|
+
# @return [String] Gets or sets the provider type
|
22
|
+
attr_accessor :type
|
23
|
+
|
24
|
+
# @return [String] Gets or sets the provider display name
|
25
|
+
attr_accessor :display_name
|
26
|
+
|
27
|
+
# @return [Array<ResourceType>] Gets or sets the provider resource types
|
28
|
+
attr_accessor :resource_types
|
29
|
+
|
30
|
+
# @return [Array<ProviderOperation>] Gets or sets the provider operations
|
31
|
+
attr_accessor :operations
|
32
|
+
|
33
|
+
#
|
34
|
+
# Validate the object. Throws ValidationError if validation fails.
|
35
|
+
#
|
36
|
+
def validate
|
37
|
+
@resource_types.each{ |e| e.validate if e.respond_to?(:validate) } unless @resource_types.nil?
|
38
|
+
@operations.each{ |e| e.validate if e.respond_to?(:validate) } unless @operations.nil?
|
39
|
+
end
|
40
|
+
|
41
|
+
#
|
42
|
+
# Serializes given Model object into Ruby Hash.
|
43
|
+
# @param object Model object to serialize.
|
44
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
45
|
+
#
|
46
|
+
def self.serialize_object(object)
|
47
|
+
object.validate
|
48
|
+
output_object = {}
|
49
|
+
|
50
|
+
serialized_property = object.id
|
51
|
+
output_object['id'] = serialized_property unless serialized_property.nil?
|
52
|
+
|
53
|
+
serialized_property = object.name
|
54
|
+
output_object['name'] = serialized_property unless serialized_property.nil?
|
55
|
+
|
56
|
+
serialized_property = object.type
|
57
|
+
output_object['type'] = serialized_property unless serialized_property.nil?
|
58
|
+
|
59
|
+
serialized_property = object.display_name
|
60
|
+
output_object['displayName'] = serialized_property unless serialized_property.nil?
|
61
|
+
|
62
|
+
serialized_property = object.resource_types
|
63
|
+
unless serialized_property.nil?
|
64
|
+
serializedArray = []
|
65
|
+
serialized_property.each do |element|
|
66
|
+
unless element.nil?
|
67
|
+
element = ResourceType.serialize_object(element)
|
68
|
+
end
|
69
|
+
serializedArray.push(element)
|
70
|
+
end
|
71
|
+
serialized_property = serializedArray
|
72
|
+
end
|
73
|
+
output_object['resourceTypes'] = serialized_property unless serialized_property.nil?
|
74
|
+
|
75
|
+
serialized_property = object.operations
|
76
|
+
unless serialized_property.nil?
|
77
|
+
serializedArray = []
|
78
|
+
serialized_property.each do |element1|
|
79
|
+
unless element1.nil?
|
80
|
+
element1 = ProviderOperation.serialize_object(element1)
|
81
|
+
end
|
82
|
+
serializedArray.push(element1)
|
83
|
+
end
|
84
|
+
serialized_property = serializedArray
|
85
|
+
end
|
86
|
+
output_object['operations'] = serialized_property unless serialized_property.nil?
|
87
|
+
|
88
|
+
output_object
|
89
|
+
end
|
90
|
+
|
91
|
+
#
|
92
|
+
# Deserializes given Ruby Hash into Model object.
|
93
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
94
|
+
# @return [ProviderOperationsMetadata] Deserialized object.
|
95
|
+
#
|
96
|
+
def self.deserialize_object(object)
|
97
|
+
return if object.nil?
|
98
|
+
output_object = ProviderOperationsMetadata.new
|
99
|
+
|
100
|
+
deserialized_property = object['id']
|
101
|
+
output_object.id = deserialized_property
|
102
|
+
|
103
|
+
deserialized_property = object['name']
|
104
|
+
output_object.name = deserialized_property
|
105
|
+
|
106
|
+
deserialized_property = object['type']
|
107
|
+
output_object.type = deserialized_property
|
108
|
+
|
109
|
+
deserialized_property = object['displayName']
|
110
|
+
output_object.display_name = deserialized_property
|
111
|
+
|
112
|
+
deserialized_property = object['resourceTypes']
|
113
|
+
unless deserialized_property.nil?
|
114
|
+
deserialized_array = []
|
115
|
+
deserialized_property.each do |element2|
|
116
|
+
unless element2.nil?
|
117
|
+
element2 = ResourceType.deserialize_object(element2)
|
118
|
+
end
|
119
|
+
deserialized_array.push(element2)
|
120
|
+
end
|
121
|
+
deserialized_property = deserialized_array
|
122
|
+
end
|
123
|
+
output_object.resource_types = deserialized_property
|
124
|
+
|
125
|
+
deserialized_property = object['operations']
|
126
|
+
unless deserialized_property.nil?
|
127
|
+
deserialized_array = []
|
128
|
+
deserialized_property.each do |element3|
|
129
|
+
unless element3.nil?
|
130
|
+
element3 = ProviderOperation.deserialize_object(element3)
|
131
|
+
end
|
132
|
+
deserialized_array.push(element3)
|
133
|
+
end
|
134
|
+
deserialized_property = deserialized_array
|
135
|
+
end
|
136
|
+
output_object.operations = deserialized_property
|
137
|
+
|
138
|
+
output_object
|
139
|
+
end
|
140
|
+
end
|
141
|
+
end
|
142
|
+
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::Authorization
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Provider operations metadata list
|
10
|
+
#
|
11
|
+
class ProviderOperationsMetadataListResult
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [Array<ProviderOperationsMetadata>] Gets or sets the list of
|
16
|
+
# providers.
|
17
|
+
attr_accessor :value
|
18
|
+
|
19
|
+
#
|
20
|
+
# Validate the object. Throws ValidationError if validation fails.
|
21
|
+
#
|
22
|
+
def validate
|
23
|
+
@value.each{ |e| e.validate if e.respond_to?(:validate) } unless @value.nil?
|
24
|
+
end
|
25
|
+
|
26
|
+
#
|
27
|
+
# Serializes given Model object into Ruby Hash.
|
28
|
+
# @param object Model object to serialize.
|
29
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
30
|
+
#
|
31
|
+
def self.serialize_object(object)
|
32
|
+
object.validate
|
33
|
+
output_object = {}
|
34
|
+
|
35
|
+
serialized_property = object.value
|
36
|
+
unless serialized_property.nil?
|
37
|
+
serializedArray = []
|
38
|
+
serialized_property.each do |element|
|
39
|
+
unless element.nil?
|
40
|
+
element = ProviderOperationsMetadata.serialize_object(element)
|
41
|
+
end
|
42
|
+
serializedArray.push(element)
|
43
|
+
end
|
44
|
+
serialized_property = serializedArray
|
45
|
+
end
|
46
|
+
output_object['value'] = serialized_property unless serialized_property.nil?
|
47
|
+
|
48
|
+
output_object
|
49
|
+
end
|
50
|
+
|
51
|
+
#
|
52
|
+
# Deserializes given Ruby Hash into Model object.
|
53
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
54
|
+
# @return [ProviderOperationsMetadataListResult] Deserialized object.
|
55
|
+
#
|
56
|
+
def self.deserialize_object(object)
|
57
|
+
return if object.nil?
|
58
|
+
output_object = ProviderOperationsMetadataListResult.new
|
59
|
+
|
60
|
+
deserialized_property = object['value']
|
61
|
+
unless deserialized_property.nil?
|
62
|
+
deserialized_array = []
|
63
|
+
deserialized_property.each do |element1|
|
64
|
+
unless element1.nil?
|
65
|
+
element1 = ProviderOperationsMetadata.deserialize_object(element1)
|
66
|
+
end
|
67
|
+
deserialized_array.push(element1)
|
68
|
+
end
|
69
|
+
deserialized_property = deserialized_array
|
70
|
+
end
|
71
|
+
output_object.value = deserialized_property
|
72
|
+
|
73
|
+
output_object
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
@@ -0,0 +1,95 @@
|
|
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
|
+
# Resource Type
|
10
|
+
#
|
11
|
+
class ResourceType
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] Gets or sets the resource type name
|
16
|
+
attr_accessor :name
|
17
|
+
|
18
|
+
# @return [String] Gets or sets the resource type display name
|
19
|
+
attr_accessor :display_name
|
20
|
+
|
21
|
+
# @return [Array<ProviderOperation>] Gets or sets the resource type
|
22
|
+
# operations
|
23
|
+
attr_accessor :operations
|
24
|
+
|
25
|
+
#
|
26
|
+
# Validate the object. Throws ValidationError if validation fails.
|
27
|
+
#
|
28
|
+
def validate
|
29
|
+
@operations.each{ |e| e.validate if e.respond_to?(:validate) } unless @operations.nil?
|
30
|
+
end
|
31
|
+
|
32
|
+
#
|
33
|
+
# Serializes given Model object into Ruby Hash.
|
34
|
+
# @param object Model object to serialize.
|
35
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
36
|
+
#
|
37
|
+
def self.serialize_object(object)
|
38
|
+
object.validate
|
39
|
+
output_object = {}
|
40
|
+
|
41
|
+
serialized_property = object.name
|
42
|
+
output_object['name'] = serialized_property unless serialized_property.nil?
|
43
|
+
|
44
|
+
serialized_property = object.display_name
|
45
|
+
output_object['displayName'] = serialized_property unless serialized_property.nil?
|
46
|
+
|
47
|
+
serialized_property = object.operations
|
48
|
+
unless serialized_property.nil?
|
49
|
+
serializedArray = []
|
50
|
+
serialized_property.each do |element|
|
51
|
+
unless element.nil?
|
52
|
+
element = ProviderOperation.serialize_object(element)
|
53
|
+
end
|
54
|
+
serializedArray.push(element)
|
55
|
+
end
|
56
|
+
serialized_property = serializedArray
|
57
|
+
end
|
58
|
+
output_object['operations'] = serialized_property unless serialized_property.nil?
|
59
|
+
|
60
|
+
output_object
|
61
|
+
end
|
62
|
+
|
63
|
+
#
|
64
|
+
# Deserializes given Ruby Hash into Model object.
|
65
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
66
|
+
# @return [ResourceType] Deserialized object.
|
67
|
+
#
|
68
|
+
def self.deserialize_object(object)
|
69
|
+
return if object.nil?
|
70
|
+
output_object = ResourceType.new
|
71
|
+
|
72
|
+
deserialized_property = object['name']
|
73
|
+
output_object.name = deserialized_property
|
74
|
+
|
75
|
+
deserialized_property = object['displayName']
|
76
|
+
output_object.display_name = deserialized_property
|
77
|
+
|
78
|
+
deserialized_property = object['operations']
|
79
|
+
unless deserialized_property.nil?
|
80
|
+
deserialized_array = []
|
81
|
+
deserialized_property.each do |element1|
|
82
|
+
unless element1.nil?
|
83
|
+
element1 = ProviderOperation.deserialize_object(element1)
|
84
|
+
end
|
85
|
+
deserialized_array.push(element1)
|
86
|
+
end
|
87
|
+
deserialized_property = deserialized_array
|
88
|
+
end
|
89
|
+
output_object.operations = deserialized_property
|
90
|
+
|
91
|
+
output_object
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
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 Assignments
|
10
|
+
#
|
11
|
+
class RoleAssignment
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] Gets or sets role assignment id.
|
16
|
+
attr_accessor :id
|
17
|
+
|
18
|
+
# @return [String] Gets or sets role assignment name.
|
19
|
+
attr_accessor :name
|
20
|
+
|
21
|
+
# @return [String] Gets or sets role assignment type.
|
22
|
+
attr_accessor :type
|
23
|
+
|
24
|
+
# @return [RoleAssignmentPropertiesWithScope] Gets or sets role
|
25
|
+
# assignment 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 = RoleAssignmentPropertiesWithScope.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 [RoleAssignment] Deserialized object.
|
66
|
+
#
|
67
|
+
def self.deserialize_object(object)
|
68
|
+
return if object.nil?
|
69
|
+
output_object = RoleAssignment.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 = RoleAssignmentPropertiesWithScope.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,63 @@
|
|
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 create parameters.
|
10
|
+
#
|
11
|
+
class RoleAssignmentCreateParameters
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [RoleAssignmentProperties] Gets or sets role assignment
|
16
|
+
# properties.
|
17
|
+
attr_accessor :properties
|
18
|
+
|
19
|
+
#
|
20
|
+
# Validate the object. Throws ValidationError if validation fails.
|
21
|
+
#
|
22
|
+
def validate
|
23
|
+
@properties.validate unless @properties.nil?
|
24
|
+
end
|
25
|
+
|
26
|
+
#
|
27
|
+
# Serializes given Model object into Ruby Hash.
|
28
|
+
# @param object Model object to serialize.
|
29
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
30
|
+
#
|
31
|
+
def self.serialize_object(object)
|
32
|
+
object.validate
|
33
|
+
output_object = {}
|
34
|
+
|
35
|
+
serialized_property = object.properties
|
36
|
+
unless serialized_property.nil?
|
37
|
+
serialized_property = RoleAssignmentProperties.serialize_object(serialized_property)
|
38
|
+
end
|
39
|
+
output_object['properties'] = serialized_property unless serialized_property.nil?
|
40
|
+
|
41
|
+
output_object
|
42
|
+
end
|
43
|
+
|
44
|
+
#
|
45
|
+
# Deserializes given Ruby Hash into Model object.
|
46
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
47
|
+
# @return [RoleAssignmentCreateParameters] Deserialized object.
|
48
|
+
#
|
49
|
+
def self.deserialize_object(object)
|
50
|
+
return if object.nil?
|
51
|
+
output_object = RoleAssignmentCreateParameters.new
|
52
|
+
|
53
|
+
deserialized_property = object['properties']
|
54
|
+
unless deserialized_property.nil?
|
55
|
+
deserialized_property = RoleAssignmentProperties.deserialize_object(deserialized_property)
|
56
|
+
end
|
57
|
+
output_object.properties = deserialized_property
|
58
|
+
|
59
|
+
output_object
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
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 Assignments filter
|
10
|
+
#
|
11
|
+
class RoleAssignmentFilter
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] Returns role assignment of the specific principal.
|
16
|
+
attr_accessor :principal_id
|
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.principal_id
|
35
|
+
output_object['principalId'] = 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 [RoleAssignmentFilter] Deserialized object.
|
44
|
+
#
|
45
|
+
def self.deserialize_object(object)
|
46
|
+
return if object.nil?
|
47
|
+
output_object = RoleAssignmentFilter.new
|
48
|
+
|
49
|
+
deserialized_property = object['principalId']
|
50
|
+
output_object.principal_id = 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::Authorization
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Role assignment list operation result.
|
10
|
+
#
|
11
|
+
class RoleAssignmentListResult
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [Array<RoleAssignment>] Role assignment list.
|
16
|
+
attr_accessor :value
|
17
|
+
|
18
|
+
# @return [String] Gets or sets the URL to get the next set of role
|
19
|
+
# assignment results.
|
20
|
+
attr_accessor :next_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 = RoleAssignment.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.next_link
|
52
|
+
output_object['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 [RoleAssignmentListResult] Deserialized object.
|
61
|
+
#
|
62
|
+
def self.deserialize_object(object)
|
63
|
+
return if object.nil?
|
64
|
+
output_object = RoleAssignmentListResult.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 = RoleAssignment.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['nextLink']
|
80
|
+
output_object.next_link = deserialized_property
|
81
|
+
|
82
|
+
output_object
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|