azure_mgmt_authorization 0.3.1 → 0.4.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 (51) hide show
  1. checksums.yaml +5 -13
  2. data/azure_mgmt_authorization.gemspec +4 -4
  3. data/lib/azure_mgmt_authorization.rb +3 -49
  4. data/lib/{azure_mgmt_authorization → generated/azure_mgmt_authorization}/authorization_management_client.rb +8 -7
  5. data/lib/{azure_mgmt_authorization → generated/azure_mgmt_authorization}/classic_administrators.rb +32 -11
  6. data/lib/generated/azure_mgmt_authorization/models/classic_administrator.rb +76 -0
  7. data/lib/generated/azure_mgmt_authorization/models/classic_administrator_list_result.rb +84 -0
  8. data/lib/generated/azure_mgmt_authorization/models/classic_administrator_properties.rb +54 -0
  9. data/lib/generated/azure_mgmt_authorization/models/permission.rb +68 -0
  10. data/lib/generated/azure_mgmt_authorization/models/permission_get_result.rb +83 -0
  11. data/lib/generated/azure_mgmt_authorization/models/provider_operation.rb +84 -0
  12. data/lib/generated/azure_mgmt_authorization/models/provider_operations_metadata.rb +110 -0
  13. data/lib/generated/azure_mgmt_authorization/models/provider_operations_metadata_list_result.rb +84 -0
  14. data/lib/generated/azure_mgmt_authorization/models/resource_type.rb +73 -0
  15. data/lib/generated/azure_mgmt_authorization/models/role_assignment.rb +76 -0
  16. data/lib/generated/azure_mgmt_authorization/models/role_assignment_create_parameters.rb +46 -0
  17. data/lib/generated/azure_mgmt_authorization/models/role_assignment_filter.rb +44 -0
  18. data/lib/generated/azure_mgmt_authorization/models/role_assignment_list_result.rb +94 -0
  19. data/lib/generated/azure_mgmt_authorization/models/role_assignment_properties.rb +54 -0
  20. data/lib/generated/azure_mgmt_authorization/models/role_assignment_properties_with_scope.rb +64 -0
  21. data/lib/generated/azure_mgmt_authorization/models/role_definition.rb +76 -0
  22. data/lib/generated/azure_mgmt_authorization/models/role_definition_filter.rb +44 -0
  23. data/lib/generated/azure_mgmt_authorization/models/role_definition_list_result.rb +83 -0
  24. data/lib/generated/azure_mgmt_authorization/models/role_definition_properties.rb +99 -0
  25. data/lib/{azure_mgmt_authorization → generated/azure_mgmt_authorization}/module_definition.rb +0 -0
  26. data/lib/{azure_mgmt_authorization → generated/azure_mgmt_authorization}/permissions.rb +70 -22
  27. data/lib/{azure_mgmt_authorization → generated/azure_mgmt_authorization}/provider_operations_metadata_operations.rb +37 -15
  28. data/lib/{azure_mgmt_authorization → generated/azure_mgmt_authorization}/role_assignments.rb +171 -80
  29. data/lib/{azure_mgmt_authorization → generated/azure_mgmt_authorization}/role_definitions.rb +56 -33
  30. data/lib/{azure_mgmt_authorization → generated/azure_mgmt_authorization}/version.rb +1 -1
  31. data/lib/generated/azure_mgmt_authorization.rb +51 -0
  32. metadata +49 -53
  33. data/lib/azure_mgmt_authorization/models/classic_administrator.rb +0 -90
  34. data/lib/azure_mgmt_authorization/models/classic_administrator_list_result.rb +0 -77
  35. data/lib/azure_mgmt_authorization/models/classic_administrator_properties.rb +0 -65
  36. data/lib/azure_mgmt_authorization/models/permission.rb +0 -66
  37. data/lib/azure_mgmt_authorization/models/permission_get_result.rb +0 -76
  38. data/lib/azure_mgmt_authorization/models/provider_operation.rb +0 -92
  39. data/lib/azure_mgmt_authorization/models/provider_operations_metadata.rb +0 -142
  40. data/lib/azure_mgmt_authorization/models/provider_operations_metadata_list_result.rb +0 -77
  41. data/lib/azure_mgmt_authorization/models/resource_type.rb +0 -95
  42. data/lib/azure_mgmt_authorization/models/role_assignment.rb +0 -90
  43. data/lib/azure_mgmt_authorization/models/role_assignment_create_parameters.rb +0 -63
  44. data/lib/azure_mgmt_authorization/models/role_assignment_filter.rb +0 -56
  45. data/lib/azure_mgmt_authorization/models/role_assignment_list_result.rb +0 -86
  46. data/lib/azure_mgmt_authorization/models/role_assignment_properties.rb +0 -65
  47. data/lib/azure_mgmt_authorization/models/role_assignment_properties_with_scope.rb +0 -74
  48. data/lib/azure_mgmt_authorization/models/role_definition.rb +0 -90
  49. data/lib/azure_mgmt_authorization/models/role_definition_filter.rb +0 -56
  50. data/lib/azure_mgmt_authorization/models/role_definition_list_result.rb +0 -76
  51. data/lib/azure_mgmt_authorization/models/role_definition_properties.rb +0 -113
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ODIwYjg1ZDI0ODZkNmU0ZTNlMjNjOTIxM2U2MDI0ZDVlMWEwOWYwZQ==
5
- data.tar.gz: !binary |-
6
- N2ZjNjEzMWQzMjg2OTlkMGI5M2IyMjE4YjM1MTk0NmM0MjRhMTQ2OQ==
2
+ SHA1:
3
+ metadata.gz: f7f93b45e86101d409f1184a65dcc783ed4f53e5
4
+ data.tar.gz: 053ae1cd3a5159871f87395e44a51b6f07ccb94d
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- NzE4YzdkOTk3NjExMWQzMmQwYTA5ZDVhYjAzNjU1Nzg0NTY5NGIyYmI1NmU3
10
- MTRkNmQ5MDJhNmU3N2YyNzc0YjUwNjZjNGRkNTYxNTIwYzIwNDI0MGRhYzBk
11
- ZTBhZjM4OWZmZmExNWYxZmNlMDMyYTQzYzZjZGJhOTlkODg0ZTE=
12
- data.tar.gz: !binary |-
13
- ZjZiZmRjMDdhMGMwYmVmNWI4NjlmNWYyNGEzMjQyZWE3OWE3YjRhMmM0OTky
14
- NjRkOTVlNDdkMDdhNDVkYTNlOGYzYjA3MmEwODY4N2QyY2E2NDcxMjkyZTcz
15
- MjI1MDg2ZGViYjJjMzBiZGRmZjAzNTA4ODRmMTZjNmUyZjRkZDA=
6
+ metadata.gz: 7a12462c23e64109678022e1a81b40b01c1add222c6f4e4984982342cb8eb65545d1c21f83a4f12dafb37fa87acd167fdad85f2a9cdb2f8b87efed1fc761cb1f
7
+ data.tar.gz: 42289e4d6c1ef54deb08169af34b669700214de317376ed57a37e5f3f7c581dd46c0d71cdd16cc70bd0e859a165b6a702b58d1d1ab56b5ba59cea865391f1656
@@ -5,8 +5,8 @@
5
5
  lib = File.expand_path('../lib', __FILE__)
6
6
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
7
7
 
8
- require 'azure_mgmt_authorization/module_definition'
9
- require 'azure_mgmt_authorization/version'
8
+ require 'generated/azure_mgmt_authorization/module_definition'
9
+ require 'generated/azure_mgmt_authorization/version'
10
10
 
11
11
  Gem::Specification.new do |spec|
12
12
  spec.name = 'azure_mgmt_authorization'
@@ -15,7 +15,7 @@ Gem::Specification.new do |spec|
15
15
  spec.email = 'azrubyteam@microsoft.com'
16
16
  spec.description = 'Microsoft Azure Role Based Authorization Management Client Library for Ruby'
17
17
  spec.summary = 'Official Ruby client library to consume Microsoft Azure Role Based Authorization Management services.'
18
- spec.homepage = 'http://github.com/azure/azure-sdk-ruby'
18
+ spec.homepage = 'https://aka.ms/azure-sdk-for-ruby'
19
19
  spec.license = 'MIT'
20
20
 
21
21
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
@@ -30,5 +30,5 @@ Gem::Specification.new do |spec|
30
30
  spec.add_development_dependency 'rspec', '~> 3'
31
31
  spec.add_development_dependency 'dotenv', '~> 2'
32
32
 
33
- spec.add_runtime_dependency 'ms_rest_azure', '~> 0.2.3'
33
+ spec.add_runtime_dependency 'ms_rest_azure', '~> 0.3.0'
34
34
  end
@@ -1,51 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
- # Changes may cause incorrect behavior and will be lost if the code is
4
- # regenerated.
2
+ # Copyright (c) Microsoft Corporation. All rights reserved.
3
+ # Licensed under the MIT License. See License.txt in the project root for license information.
5
4
 
6
- require 'uri'
7
- require 'cgi'
8
- require 'date'
9
- require 'json'
10
- require 'base64'
11
- require 'erb'
12
- require 'securerandom'
13
- require 'time'
14
- require 'timeliness'
15
- require 'faraday'
16
- require 'faraday-cookie_jar'
17
- require 'concurrent'
18
- require 'ms_rest'
19
- require 'azure_mgmt_authorization/module_definition'
20
- require 'ms_rest_azure'
21
-
22
- module Azure::ARM::Authorization
23
- autoload :ClassicAdministrators, 'azure_mgmt_authorization/classic_administrators.rb'
24
- autoload :Permissions, 'azure_mgmt_authorization/permissions.rb'
25
- autoload :ProviderOperationsMetadataOperations, 'azure_mgmt_authorization/provider_operations_metadata_operations.rb'
26
- autoload :RoleAssignments, 'azure_mgmt_authorization/role_assignments.rb'
27
- autoload :RoleDefinitions, 'azure_mgmt_authorization/role_definitions.rb'
28
- autoload :AuthorizationManagementClient, 'azure_mgmt_authorization/authorization_management_client.rb'
29
-
30
- module Models
31
- autoload :RoleAssignmentFilter, 'azure_mgmt_authorization/models/role_assignment_filter.rb'
32
- autoload :RoleDefinitionFilter, 'azure_mgmt_authorization/models/role_definition_filter.rb'
33
- autoload :ClassicAdministratorProperties, 'azure_mgmt_authorization/models/classic_administrator_properties.rb'
34
- autoload :ClassicAdministrator, 'azure_mgmt_authorization/models/classic_administrator.rb'
35
- autoload :ClassicAdministratorListResult, 'azure_mgmt_authorization/models/classic_administrator_list_result.rb'
36
- autoload :Permission, 'azure_mgmt_authorization/models/permission.rb'
37
- autoload :PermissionGetResult, 'azure_mgmt_authorization/models/permission_get_result.rb'
38
- autoload :ProviderOperation, 'azure_mgmt_authorization/models/provider_operation.rb'
39
- autoload :ResourceType, 'azure_mgmt_authorization/models/resource_type.rb'
40
- autoload :ProviderOperationsMetadata, 'azure_mgmt_authorization/models/provider_operations_metadata.rb'
41
- autoload :ProviderOperationsMetadataListResult, 'azure_mgmt_authorization/models/provider_operations_metadata_list_result.rb'
42
- autoload :RoleAssignmentPropertiesWithScope, 'azure_mgmt_authorization/models/role_assignment_properties_with_scope.rb'
43
- autoload :RoleAssignment, 'azure_mgmt_authorization/models/role_assignment.rb'
44
- autoload :RoleAssignmentListResult, 'azure_mgmt_authorization/models/role_assignment_list_result.rb'
45
- autoload :RoleAssignmentProperties, 'azure_mgmt_authorization/models/role_assignment_properties.rb'
46
- autoload :RoleAssignmentCreateParameters, 'azure_mgmt_authorization/models/role_assignment_create_parameters.rb'
47
- autoload :RoleDefinitionProperties, 'azure_mgmt_authorization/models/role_definition_properties.rb'
48
- autoload :RoleDefinition, 'azure_mgmt_authorization/models/role_definition.rb'
49
- autoload :RoleDefinitionListResult, 'azure_mgmt_authorization/models/role_definition_list_result.rb'
50
- end
51
- end
5
+ require 'generated/azure_mgmt_authorization'
@@ -8,13 +8,13 @@ module Azure::ARM::Authorization
8
8
  # A service client - single point of access to the REST API.
9
9
  #
10
10
  class AuthorizationManagementClient < MsRestAzure::AzureServiceClient
11
- include Azure::ARM::Authorization::Models
11
+ include MsRest::Serialization
12
12
  include MsRestAzure
13
13
 
14
14
  # @return [String] the base URI of the service.
15
15
  attr_accessor :base_url
16
16
 
17
- # @return Gets Azure subscription credentials.
17
+ # @return Credentials needed for the client to connect to Azure.
18
18
  attr_reader :credentials
19
19
 
20
20
  # @return [String] Gets subscription credentials which uniquely identify
@@ -40,19 +40,20 @@ module Azure::ARM::Authorization
40
40
  # subscription.
41
41
  attr_accessor :credentials
42
42
 
43
- # @return classic_administrators
43
+ # @return [ClassicAdministrators] classic_administrators
44
44
  attr_reader :classic_administrators
45
45
 
46
- # @return permissions
46
+ # @return [Permissions] permissions
47
47
  attr_reader :permissions
48
48
 
49
- # @return provider_operations_metadata_operations
49
+ # @return [ProviderOperationsMetadataOperations]
50
+ # provider_operations_metadata_operations
50
51
  attr_reader :provider_operations_metadata_operations
51
52
 
52
- # @return role_assignments
53
+ # @return [RoleAssignments] role_assignments
53
54
  attr_reader :role_assignments
54
55
 
55
- # @return role_definitions
56
+ # @return [RoleDefinitions] role_definitions
56
57
  attr_reader :role_definitions
57
58
 
58
59
  #
@@ -29,11 +29,32 @@ module Azure::ARM::Authorization
29
29
  # @param custom_headers [Hash{String => String}] A hash of custom headers that
30
30
  # will be added to the HTTP request.
31
31
  #
32
- # @return [ClassicAdministratorListResult] operation results.
32
+ # @return [ClassicAdministratorListResult] which provide lazy access to pages
33
+ # of the response.
33
34
  #
34
- def list(api_version, custom_headers = nil)
35
+ def list_as_lazy(api_version, custom_headers = nil)
35
36
  response = list_async(api_version, custom_headers).value!
36
- response.body unless response.nil?
37
+ unless response.nil?
38
+ page = response.body
39
+ page.next_method = Proc.new do |next_link|
40
+ list_next_async(next_link, custom_headers)
41
+ end
42
+ page
43
+ end
44
+ end
45
+
46
+ #
47
+ # Gets a list of classic administrators for the subscription.
48
+ #
49
+ # @param api_version [String]
50
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
51
+ # will be added to the HTTP request.
52
+ #
53
+ # @return [Array<ClassicAdministrator>] operation results.
54
+ #
55
+ def list(api_version, custom_headers = nil)
56
+ first_page = list_as_lazy(api_version, custom_headers)
57
+ first_page.get_all_items
37
58
  end
38
59
 
39
60
  #
@@ -61,6 +82,8 @@ module Azure::ARM::Authorization
61
82
  def list_async(api_version, custom_headers = nil)
62
83
  fail ArgumentError, 'api_version is nil' if api_version.nil?
63
84
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
85
+
86
+
64
87
  request_headers = {}
65
88
 
66
89
  # Set Headers
@@ -96,10 +119,8 @@ module Azure::ARM::Authorization
96
119
  if status_code == 200
97
120
  begin
98
121
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
99
- unless parsed_response.nil?
100
- parsed_response = ClassicAdministratorListResult.deserialize_object(parsed_response)
101
- end
102
- result.body = parsed_response
122
+ result_mapper = ClassicAdministratorListResult.mapper()
123
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
103
124
  rescue Exception => e
104
125
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
105
126
  end
@@ -152,6 +173,8 @@ module Azure::ARM::Authorization
152
173
  #
153
174
  def list_next_async(next_page_link, custom_headers = nil)
154
175
  fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
176
+
177
+
155
178
  request_headers = {}
156
179
 
157
180
  # Set Headers
@@ -186,10 +209,8 @@ module Azure::ARM::Authorization
186
209
  if status_code == 200
187
210
  begin
188
211
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
189
- unless parsed_response.nil?
190
- parsed_response = ClassicAdministratorListResult.deserialize_object(parsed_response)
191
- end
192
- result.body = parsed_response
212
+ result_mapper = ClassicAdministratorListResult.mapper()
213
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
193
214
  rescue Exception => e
194
215
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
195
216
  end
@@ -0,0 +1,76 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.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
+ # Classic Administrators
10
+ #
11
+ class ClassicAdministrator
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Gets or sets the classic administrator id.
16
+ attr_accessor :id
17
+
18
+ # @return [String] Gets or sets the classic administrator name.
19
+ attr_accessor :name
20
+
21
+ # @return [String] Gets or sets the classic administrator type.
22
+ attr_accessor :type
23
+
24
+ # @return [ClassicAdministratorProperties] Gets or sets the classic
25
+ # administrator properties.
26
+ attr_accessor :properties
27
+
28
+
29
+ #
30
+ # Mapper for ClassicAdministrator class as Ruby Hash.
31
+ # This will be used for serialization/deserialization.
32
+ #
33
+ def self.mapper()
34
+ {
35
+ required: false,
36
+ serialized_name: 'ClassicAdministrator',
37
+ type: {
38
+ name: 'Composite',
39
+ class_name: 'ClassicAdministrator',
40
+ model_properties: {
41
+ id: {
42
+ required: false,
43
+ serialized_name: 'id',
44
+ type: {
45
+ name: 'String'
46
+ }
47
+ },
48
+ name: {
49
+ required: false,
50
+ serialized_name: 'name',
51
+ type: {
52
+ name: 'String'
53
+ }
54
+ },
55
+ type: {
56
+ required: false,
57
+ serialized_name: 'type',
58
+ type: {
59
+ name: 'String'
60
+ }
61
+ },
62
+ properties: {
63
+ required: false,
64
+ serialized_name: 'properties',
65
+ type: {
66
+ name: 'Composite',
67
+ class_name: 'ClassicAdministratorProperties'
68
+ }
69
+ }
70
+ }
71
+ }
72
+ }
73
+ end
74
+ end
75
+ end
76
+ end
@@ -0,0 +1,84 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.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
+ # ClassicAdministrator list result information.
10
+ #
11
+ class ClassicAdministratorListResult
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Array<ClassicAdministrator>] Gets or sets
16
+ # ClassicAdministrators.
17
+ attr_accessor :value
18
+
19
+ # return [Proc] with next page method call.
20
+ attr_accessor :next_method
21
+
22
+ #
23
+ # Gets the rest of the items for the request, enabling auto-pagination.
24
+ #
25
+ # @return [Array<ClassicAdministrator>] operation results.
26
+ #
27
+ def get_all_items
28
+ items = @value
29
+ page = self
30
+ while page.next_link != nil do
31
+ page = page.get_next_page
32
+ items.concat(page.value)
33
+ end
34
+ items
35
+ end
36
+
37
+ #
38
+ # Gets the next page of results.
39
+ #
40
+ # @return [ClassicAdministratorListResult] with next page content.
41
+ #
42
+ def get_next_page
43
+ response = @next_method.call(@next_link).value! unless @next_method.nil?
44
+ unless response.nil?
45
+ @next_link = response.body.next_link
46
+ @value = response.body.value
47
+ self
48
+ end
49
+ end
50
+
51
+ #
52
+ # Mapper for ClassicAdministratorListResult class as Ruby Hash.
53
+ # This will be used for serialization/deserialization.
54
+ #
55
+ def self.mapper()
56
+ {
57
+ required: false,
58
+ serialized_name: 'ClassicAdministratorListResult',
59
+ type: {
60
+ name: 'Composite',
61
+ class_name: 'ClassicAdministratorListResult',
62
+ model_properties: {
63
+ value: {
64
+ required: false,
65
+ serialized_name: 'value',
66
+ type: {
67
+ name: 'Sequence',
68
+ element: {
69
+ required: false,
70
+ serialized_name: 'ClassicAdministratorElementType',
71
+ type: {
72
+ name: 'Composite',
73
+ class_name: 'ClassicAdministrator'
74
+ }
75
+ }
76
+ }
77
+ }
78
+ }
79
+ }
80
+ }
81
+ end
82
+ end
83
+ end
84
+ end
@@ -0,0 +1,54 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.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
+ # Classic Administrator properties.
10
+ #
11
+ class ClassicAdministratorProperties
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Gets or sets the email address
16
+ attr_accessor :email_address
17
+
18
+ # @return [String] Gets or sets the role
19
+ attr_accessor :role
20
+
21
+
22
+ #
23
+ # Mapper for ClassicAdministratorProperties class as Ruby Hash.
24
+ # This will be used for serialization/deserialization.
25
+ #
26
+ def self.mapper()
27
+ {
28
+ required: false,
29
+ serialized_name: 'ClassicAdministratorProperties',
30
+ type: {
31
+ name: 'Composite',
32
+ class_name: 'ClassicAdministratorProperties',
33
+ model_properties: {
34
+ email_address: {
35
+ required: false,
36
+ serialized_name: 'emailAddress',
37
+ type: {
38
+ name: 'String'
39
+ }
40
+ },
41
+ role: {
42
+ required: false,
43
+ serialized_name: 'role',
44
+ type: {
45
+ name: 'String'
46
+ }
47
+ }
48
+ }
49
+ }
50
+ }
51
+ end
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,68 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.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 permissions.
10
+ #
11
+ class Permission
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Array<String>] Role definition allowed actions.
16
+ attr_accessor :actions
17
+
18
+ # @return [Array<String>] Role definition denied actions.
19
+ attr_accessor :not_actions
20
+
21
+
22
+ #
23
+ # Mapper for Permission class as Ruby Hash.
24
+ # This will be used for serialization/deserialization.
25
+ #
26
+ def self.mapper()
27
+ {
28
+ required: false,
29
+ serialized_name: 'Permission',
30
+ type: {
31
+ name: 'Composite',
32
+ class_name: 'Permission',
33
+ model_properties: {
34
+ actions: {
35
+ required: false,
36
+ serialized_name: 'actions',
37
+ type: {
38
+ name: 'Sequence',
39
+ element: {
40
+ required: false,
41
+ serialized_name: 'StringElementType',
42
+ type: {
43
+ name: 'String'
44
+ }
45
+ }
46
+ }
47
+ },
48
+ not_actions: {
49
+ required: false,
50
+ serialized_name: 'notActions',
51
+ type: {
52
+ name: 'Sequence',
53
+ element: {
54
+ required: false,
55
+ serialized_name: 'StringElementType',
56
+ type: {
57
+ name: 'String'
58
+ }
59
+ }
60
+ }
61
+ }
62
+ }
63
+ }
64
+ }
65
+ end
66
+ end
67
+ end
68
+ end
@@ -0,0 +1,83 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.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
+ # Permissions information.
10
+ #
11
+ class PermissionGetResult
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Array<Permission>] Gets or sets permissions.
16
+ attr_accessor :value
17
+
18
+ # return [Proc] with next page method call.
19
+ attr_accessor :next_method
20
+
21
+ #
22
+ # Gets the rest of the items for the request, enabling auto-pagination.
23
+ #
24
+ # @return [Array<Permission>] operation results.
25
+ #
26
+ def get_all_items
27
+ items = @value
28
+ page = self
29
+ while page.next_link != nil do
30
+ page = page.get_next_page
31
+ items.concat(page.value)
32
+ end
33
+ items
34
+ end
35
+
36
+ #
37
+ # Gets the next page of results.
38
+ #
39
+ # @return [PermissionGetResult] with next page content.
40
+ #
41
+ def get_next_page
42
+ response = @next_method.call(@next_link).value! unless @next_method.nil?
43
+ unless response.nil?
44
+ @next_link = response.body.next_link
45
+ @value = response.body.value
46
+ self
47
+ end
48
+ end
49
+
50
+ #
51
+ # Mapper for PermissionGetResult class as Ruby Hash.
52
+ # This will be used for serialization/deserialization.
53
+ #
54
+ def self.mapper()
55
+ {
56
+ required: false,
57
+ serialized_name: 'PermissionGetResult',
58
+ type: {
59
+ name: 'Composite',
60
+ class_name: 'PermissionGetResult',
61
+ model_properties: {
62
+ value: {
63
+ required: false,
64
+ serialized_name: 'value',
65
+ type: {
66
+ name: 'Sequence',
67
+ element: {
68
+ required: false,
69
+ serialized_name: 'PermissionElementType',
70
+ type: {
71
+ name: 'Composite',
72
+ class_name: 'Permission'
73
+ }
74
+ }
75
+ }
76
+ }
77
+ }
78
+ }
79
+ }
80
+ end
81
+ end
82
+ end
83
+ end
@@ -0,0 +1,84 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.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
+ #
32
+ # Mapper for ProviderOperation class as Ruby Hash.
33
+ # This will be used for serialization/deserialization.
34
+ #
35
+ def self.mapper()
36
+ {
37
+ required: false,
38
+ serialized_name: 'ProviderOperation',
39
+ type: {
40
+ name: 'Composite',
41
+ class_name: 'ProviderOperation',
42
+ model_properties: {
43
+ name: {
44
+ required: false,
45
+ serialized_name: 'name',
46
+ type: {
47
+ name: 'String'
48
+ }
49
+ },
50
+ display_name: {
51
+ required: false,
52
+ serialized_name: 'displayName',
53
+ type: {
54
+ name: 'String'
55
+ }
56
+ },
57
+ description: {
58
+ required: false,
59
+ serialized_name: 'description',
60
+ type: {
61
+ name: 'String'
62
+ }
63
+ },
64
+ origin: {
65
+ required: false,
66
+ serialized_name: 'origin',
67
+ type: {
68
+ name: 'String'
69
+ }
70
+ },
71
+ properties: {
72
+ required: false,
73
+ serialized_name: 'properties',
74
+ type: {
75
+ name: 'Object'
76
+ }
77
+ }
78
+ }
79
+ }
80
+ }
81
+ end
82
+ end
83
+ end
84
+ end