azure_mgmt_locks 0.17.0 → 0.17.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 63f00029126ce88e2ba7e00b68c55be56c5b0123
4
- data.tar.gz: 1d09aeb6a3d18de1b0ec043d114b7320ae56337c
3
+ metadata.gz: 2dc6fc0ade3384bdc1aafc4b60798b4a43d5f764
4
+ data.tar.gz: 1b81c98c7511121c3dbdac55438ee7377347926e
5
5
  SHA512:
6
- metadata.gz: 575aa34f33e879331c98992c122ef9b4e38ed2bba4b111bdc208d033a62e1767552a506f6bfbb70699a7197ed79ac8c61d0ca3cbcdf2575c9f4de776badc746e
7
- data.tar.gz: b73d7f61181167d012cf941ffe553381f01132a07f79e9b366bea68d06fca287537fb5aed7098a413bc4583ce7c2656451901ba2afacb884d34a785e63e48b26
6
+ metadata.gz: a9dbd3a41aaff284db6845cc062e72d0fdc049acaa8967e6ebb1338b5169ddaa9e5ed2a0f123573161fd094a88fc20a5d58d2bdfcf6cf0cb1819ddf116587f70
7
+ data.tar.gz: 07c3e69f332e04413d6e19d0e46b30c6992bb910bc45d497d10bff081494c3585d98d02ec7acd084c4a54f4ab69df0baf687574be563eec474613aec1ebde79f
@@ -124,7 +124,7 @@ module Azure::Locks::Mgmt::V2015_01_01
124
124
  #
125
125
  def add_telemetry
126
126
  sdk_information = 'azure_mgmt_locks'
127
- sdk_information = "#{sdk_information}/0.17.0"
127
+ sdk_information = "#{sdk_information}/0.17.1"
128
128
  add_user_agent_information(sdk_information)
129
129
  end
130
130
  end
@@ -20,13 +20,17 @@ require '2016-09-01/generated/azure_mgmt_locks/module_definition'
20
20
  require 'ms_rest_azure'
21
21
 
22
22
  module Azure::Locks::Mgmt::V2016_09_01
23
+ autoload :AuthorizationOperations, '2016-09-01/generated/azure_mgmt_locks/authorization_operations.rb'
23
24
  autoload :ManagementLocks, '2016-09-01/generated/azure_mgmt_locks/management_locks.rb'
24
25
  autoload :ManagementLockClient, '2016-09-01/generated/azure_mgmt_locks/management_lock_client.rb'
25
26
 
26
27
  module Models
27
- autoload :ManagementLockObject, '2016-09-01/generated/azure_mgmt_locks/models/management_lock_object.rb'
28
- autoload :ManagementLockListResult, '2016-09-01/generated/azure_mgmt_locks/models/management_lock_list_result.rb'
28
+ autoload :OperationDisplay, '2016-09-01/generated/azure_mgmt_locks/models/operation_display.rb'
29
29
  autoload :ManagementLockOwner, '2016-09-01/generated/azure_mgmt_locks/models/management_lock_owner.rb'
30
+ autoload :Operation, '2016-09-01/generated/azure_mgmt_locks/models/operation.rb'
31
+ autoload :ManagementLockListResult, '2016-09-01/generated/azure_mgmt_locks/models/management_lock_list_result.rb'
32
+ autoload :OperationListResult, '2016-09-01/generated/azure_mgmt_locks/models/operation_list_result.rb'
33
+ autoload :ManagementLockObject, '2016-09-01/generated/azure_mgmt_locks/models/management_lock_object.rb'
30
34
  autoload :LockLevel, '2016-09-01/generated/azure_mgmt_locks/models/lock_level.rb'
31
35
  end
32
36
  end
@@ -0,0 +1,216 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::Locks::Mgmt::V2016_09_01
7
+ #
8
+ # Azure resources can be locked to prevent other users in your organization
9
+ # from deleting or modifying resources.
10
+ #
11
+ class AuthorizationOperations
12
+ include MsRestAzure
13
+
14
+ #
15
+ # Creates and initializes a new instance of the AuthorizationOperations class.
16
+ # @param client service class for accessing basic functionality.
17
+ #
18
+ def initialize(client)
19
+ @client = client
20
+ end
21
+
22
+ # @return [ManagementLockClient] reference to the ManagementLockClient
23
+ attr_reader :client
24
+
25
+ #
26
+ # Lists all of the available Microsoft.Authorization REST API operations.
27
+ #
28
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
29
+ # will be added to the HTTP request.
30
+ #
31
+ # @return [Array<Operation>] operation results.
32
+ #
33
+ def list(custom_headers:nil)
34
+ first_page = list_as_lazy(custom_headers:custom_headers)
35
+ first_page.get_all_items
36
+ end
37
+
38
+ #
39
+ # Lists all of the available Microsoft.Authorization REST API operations.
40
+ #
41
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
42
+ # will be added to the HTTP request.
43
+ #
44
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
45
+ #
46
+ def list_with_http_info(custom_headers:nil)
47
+ list_async(custom_headers:custom_headers).value!
48
+ end
49
+
50
+ #
51
+ # Lists all of the available Microsoft.Authorization REST API operations.
52
+ #
53
+ # @param [Hash{String => String}] A hash of custom headers that will be added
54
+ # to the HTTP request.
55
+ #
56
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
57
+ #
58
+ def list_async(custom_headers:nil)
59
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
60
+
61
+
62
+ request_headers = {}
63
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
64
+
65
+ # Set Headers
66
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
67
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
68
+ path_template = 'providers/Microsoft.Authorization/operations'
69
+
70
+ request_url = @base_url || @client.base_url
71
+
72
+ options = {
73
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
74
+ query_params: {'api-version' => @client.api_version},
75
+ headers: request_headers.merge(custom_headers || {}),
76
+ base_url: request_url
77
+ }
78
+ promise = @client.make_request_async(:get, path_template, options)
79
+
80
+ promise = promise.then do |result|
81
+ http_response = result.response
82
+ status_code = http_response.status
83
+ response_content = http_response.body
84
+ unless status_code == 200
85
+ error_model = JSON.load(response_content)
86
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
87
+ end
88
+
89
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
90
+ # Deserialize Response
91
+ if status_code == 200
92
+ begin
93
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
94
+ result_mapper = Azure::Locks::Mgmt::V2016_09_01::Models::OperationListResult.mapper()
95
+ result.body = @client.deserialize(result_mapper, parsed_response)
96
+ rescue Exception => e
97
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
98
+ end
99
+ end
100
+
101
+ result
102
+ end
103
+
104
+ promise.execute
105
+ end
106
+
107
+ #
108
+ # Lists all of the available Microsoft.Authorization REST API operations.
109
+ #
110
+ # @param next_page_link [String] The NextLink from the previous successful call
111
+ # to List operation.
112
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
113
+ # will be added to the HTTP request.
114
+ #
115
+ # @return [OperationListResult] operation results.
116
+ #
117
+ def list_next(next_page_link, custom_headers:nil)
118
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
119
+ response.body unless response.nil?
120
+ end
121
+
122
+ #
123
+ # Lists all of the available Microsoft.Authorization REST API operations.
124
+ #
125
+ # @param next_page_link [String] The NextLink from the previous successful call
126
+ # to List operation.
127
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
128
+ # will be added to the HTTP request.
129
+ #
130
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
131
+ #
132
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
133
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
134
+ end
135
+
136
+ #
137
+ # Lists all of the available Microsoft.Authorization REST API operations.
138
+ #
139
+ # @param next_page_link [String] The NextLink from the previous successful call
140
+ # to List operation.
141
+ # @param [Hash{String => String}] A hash of custom headers that will be added
142
+ # to the HTTP request.
143
+ #
144
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
145
+ #
146
+ def list_next_async(next_page_link, custom_headers:nil)
147
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
148
+
149
+
150
+ request_headers = {}
151
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
152
+
153
+ # Set Headers
154
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
155
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
156
+ path_template = '{nextLink}'
157
+
158
+ request_url = @base_url || @client.base_url
159
+
160
+ options = {
161
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
162
+ skip_encoding_path_params: {'nextLink' => next_page_link},
163
+ headers: request_headers.merge(custom_headers || {}),
164
+ base_url: request_url
165
+ }
166
+ promise = @client.make_request_async(:get, path_template, options)
167
+
168
+ promise = promise.then do |result|
169
+ http_response = result.response
170
+ status_code = http_response.status
171
+ response_content = http_response.body
172
+ unless status_code == 200
173
+ error_model = JSON.load(response_content)
174
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
175
+ end
176
+
177
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
178
+ # Deserialize Response
179
+ if status_code == 200
180
+ begin
181
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
182
+ result_mapper = Azure::Locks::Mgmt::V2016_09_01::Models::OperationListResult.mapper()
183
+ result.body = @client.deserialize(result_mapper, parsed_response)
184
+ rescue Exception => e
185
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
186
+ end
187
+ end
188
+
189
+ result
190
+ end
191
+
192
+ promise.execute
193
+ end
194
+
195
+ #
196
+ # Lists all of the available Microsoft.Authorization REST API operations.
197
+ #
198
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
199
+ # will be added to the HTTP request.
200
+ #
201
+ # @return [OperationListResult] which provide lazy access to pages of the
202
+ # response.
203
+ #
204
+ def list_as_lazy(custom_headers:nil)
205
+ response = list_async(custom_headers:custom_headers).value!
206
+ unless response.nil?
207
+ page = response.body
208
+ page.next_method = Proc.new do |next_page_link|
209
+ list_next_async(next_page_link, custom_headers:custom_headers)
210
+ end
211
+ page
212
+ end
213
+ end
214
+
215
+ end
216
+ end
@@ -35,6 +35,9 @@ module Azure::Locks::Mgmt::V2016_09_01
35
35
  # generated and included in each request. Default is true.
36
36
  attr_accessor :generate_client_request_id
37
37
 
38
+ # @return [AuthorizationOperations] authorization_operations
39
+ attr_reader :authorization_operations
40
+
38
41
  # @return [ManagementLocks] management_locks
39
42
  attr_reader :management_locks
40
43
 
@@ -51,6 +54,7 @@ module Azure::Locks::Mgmt::V2016_09_01
51
54
  fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
52
55
  @credentials = credentials
53
56
 
57
+ @authorization_operations = AuthorizationOperations.new(self)
54
58
  @management_locks = ManagementLocks.new(self)
55
59
  @api_version = '2016-09-01'
56
60
  @accept_language = 'en-US'
@@ -124,7 +128,7 @@ module Azure::Locks::Mgmt::V2016_09_01
124
128
  #
125
129
  def add_telemetry
126
130
  sdk_information = 'azure_mgmt_locks'
127
- sdk_information = "#{sdk_information}/0.17.0"
131
+ sdk_information = "#{sdk_information}/0.17.1"
128
132
  add_user_agent_information(sdk_information)
129
133
  end
130
134
  end
@@ -104,6 +104,7 @@ module Azure::Locks::Mgmt::V2016_09_01
104
104
  name: {
105
105
  client_side_validation: true,
106
106
  required: false,
107
+ read_only: true,
107
108
  serialized_name: 'name',
108
109
  type: {
109
110
  name: 'String'
@@ -0,0 +1,58 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::Locks::Mgmt::V2016_09_01
7
+ module Models
8
+ #
9
+ # Microsoft.Authorization operation
10
+ #
11
+ class Operation
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Operation name: {provider}/{resource}/{operation}
16
+ attr_accessor :name
17
+
18
+ # @return [OperationDisplay] The object that represents the operation.
19
+ attr_accessor :display
20
+
21
+
22
+ #
23
+ # Mapper for Operation class as Ruby Hash.
24
+ # This will be used for serialization/deserialization.
25
+ #
26
+ def self.mapper()
27
+ {
28
+ client_side_validation: true,
29
+ required: false,
30
+ serialized_name: 'Operation',
31
+ type: {
32
+ name: 'Composite',
33
+ class_name: 'Operation',
34
+ model_properties: {
35
+ name: {
36
+ client_side_validation: true,
37
+ required: false,
38
+ serialized_name: 'name',
39
+ type: {
40
+ name: 'String'
41
+ }
42
+ },
43
+ display: {
44
+ client_side_validation: true,
45
+ required: false,
46
+ serialized_name: 'display',
47
+ type: {
48
+ name: 'Composite',
49
+ class_name: 'OperationDisplay'
50
+ }
51
+ }
52
+ }
53
+ }
54
+ }
55
+ end
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,69 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::Locks::Mgmt::V2016_09_01
7
+ module Models
8
+ #
9
+ # The object that represents the operation.
10
+ #
11
+ class OperationDisplay
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Service provider: Microsoft.Authorization
16
+ attr_accessor :provider
17
+
18
+ # @return [String] Resource on which the operation is performed: Profile,
19
+ # endpoint, etc.
20
+ attr_accessor :resource
21
+
22
+ # @return [String] Operation type: Read, write, delete, etc.
23
+ attr_accessor :operation
24
+
25
+
26
+ #
27
+ # Mapper for OperationDisplay class as Ruby Hash.
28
+ # This will be used for serialization/deserialization.
29
+ #
30
+ def self.mapper()
31
+ {
32
+ client_side_validation: true,
33
+ required: false,
34
+ serialized_name: 'Operation_display',
35
+ type: {
36
+ name: 'Composite',
37
+ class_name: 'OperationDisplay',
38
+ model_properties: {
39
+ provider: {
40
+ client_side_validation: true,
41
+ required: false,
42
+ serialized_name: 'provider',
43
+ type: {
44
+ name: 'String'
45
+ }
46
+ },
47
+ resource: {
48
+ client_side_validation: true,
49
+ required: false,
50
+ serialized_name: 'resource',
51
+ type: {
52
+ name: 'String'
53
+ }
54
+ },
55
+ operation: {
56
+ client_side_validation: true,
57
+ required: false,
58
+ serialized_name: 'operation',
59
+ type: {
60
+ name: 'String'
61
+ }
62
+ }
63
+ }
64
+ }
65
+ }
66
+ end
67
+ end
68
+ end
69
+ end
@@ -0,0 +1,101 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::Locks::Mgmt::V2016_09_01
7
+ module Models
8
+ #
9
+ # Result of the request to list Microsoft.Authorization operations. It
10
+ # contains a list of operations and a URL link to get the next set of
11
+ # results.
12
+ #
13
+ class OperationListResult
14
+
15
+ include MsRestAzure
16
+
17
+ include MsRest::JSONable
18
+ # @return [Array<Operation>] List of Microsoft.Authorization operations.
19
+ attr_accessor :value
20
+
21
+ # @return [String] URL to get the next set of operation list results if
22
+ # there are any.
23
+ attr_accessor :next_link
24
+
25
+ # return [Proc] with next page method call.
26
+ attr_accessor :next_method
27
+
28
+ #
29
+ # Gets the rest of the items for the request, enabling auto-pagination.
30
+ #
31
+ # @return [Array<Operation>] operation results.
32
+ #
33
+ def get_all_items
34
+ items = @value
35
+ page = self
36
+ while page.next_link != nil do
37
+ page = page.get_next_page
38
+ items.concat(page.value)
39
+ end
40
+ items
41
+ end
42
+
43
+ #
44
+ # Gets the next page of results.
45
+ #
46
+ # @return [OperationListResult] with next page content.
47
+ #
48
+ def get_next_page
49
+ response = @next_method.call(@next_link).value! unless @next_method.nil?
50
+ unless response.nil?
51
+ @next_link = response.body.next_link
52
+ @value = response.body.value
53
+ self
54
+ end
55
+ end
56
+
57
+ #
58
+ # Mapper for OperationListResult class as Ruby Hash.
59
+ # This will be used for serialization/deserialization.
60
+ #
61
+ def self.mapper()
62
+ {
63
+ client_side_validation: true,
64
+ required: false,
65
+ serialized_name: 'OperationListResult',
66
+ type: {
67
+ name: 'Composite',
68
+ class_name: 'OperationListResult',
69
+ model_properties: {
70
+ value: {
71
+ client_side_validation: true,
72
+ required: false,
73
+ serialized_name: 'value',
74
+ type: {
75
+ name: 'Sequence',
76
+ element: {
77
+ client_side_validation: true,
78
+ required: false,
79
+ serialized_name: 'OperationElementType',
80
+ type: {
81
+ name: 'Composite',
82
+ class_name: 'Operation'
83
+ }
84
+ }
85
+ }
86
+ },
87
+ next_link: {
88
+ client_side_validation: true,
89
+ required: false,
90
+ serialized_name: 'nextLink',
91
+ type: {
92
+ name: 'String'
93
+ }
94
+ }
95
+ }
96
+ }
97
+ }
98
+ end
99
+ end
100
+ end
101
+ end
@@ -6,3 +6,4 @@ require '2015-01-01/generated/azure_mgmt_locks'
6
6
  require '2016-09-01/generated/azure_mgmt_locks'
7
7
  require 'profiles/v2017_03_09/locks_v2017_03_09_profile_client'
8
8
  require 'profiles/latest/locks_latest_profile_client'
9
+ require 'profiles/v2018_03_01/locks_v2018_03_01_profile_client'
@@ -6,12 +6,16 @@ require 'azure_mgmt_locks'
6
6
 
7
7
  module Azure::Locks::Profiles::Latest
8
8
  module Mgmt
9
+ AuthorizationOperations = Azure::Locks::Mgmt::V2016_09_01::AuthorizationOperations
9
10
  ManagementLocks = Azure::Locks::Mgmt::V2016_09_01::ManagementLocks
10
11
 
11
12
  module Models
12
- ManagementLockObject = Azure::Locks::Mgmt::V2016_09_01::Models::ManagementLockObject
13
- ManagementLockListResult = Azure::Locks::Mgmt::V2016_09_01::Models::ManagementLockListResult
13
+ OperationDisplay = Azure::Locks::Mgmt::V2016_09_01::Models::OperationDisplay
14
14
  ManagementLockOwner = Azure::Locks::Mgmt::V2016_09_01::Models::ManagementLockOwner
15
+ Operation = Azure::Locks::Mgmt::V2016_09_01::Models::Operation
16
+ ManagementLockListResult = Azure::Locks::Mgmt::V2016_09_01::Models::ManagementLockListResult
17
+ OperationListResult = Azure::Locks::Mgmt::V2016_09_01::Models::OperationListResult
18
+ ManagementLockObject = Azure::Locks::Mgmt::V2016_09_01::Models::ManagementLockObject
15
19
  LockLevel = Azure::Locks::Mgmt::V2016_09_01::Models::LockLevel
16
20
  end
17
21
 
@@ -19,7 +23,7 @@ module Azure::Locks::Profiles::Latest
19
23
  # LocksManagementClass
20
24
  #
21
25
  class LocksManagementClass
22
- attr_reader :management_locks, :configurable, :base_url, :options, :model_classes
26
+ attr_reader :authorization_operations, :management_locks, :configurable, :base_url, :options, :model_classes
23
27
 
24
28
  def initialize(options = {})
25
29
  if options.is_a?(Hash) && options.length == 0
@@ -39,6 +43,7 @@ module Azure::Locks::Profiles::Latest
39
43
  @client_0.subscription_id = configurable.subscription_id
40
44
  end
41
45
  add_telemetry(@client_0)
46
+ @authorization_operations = @client_0.authorization_operations
42
47
  @management_locks = @client_0.management_locks
43
48
 
44
49
  @model_classes = ModelClasses.new
@@ -60,14 +65,23 @@ module Azure::Locks::Profiles::Latest
60
65
  end
61
66
 
62
67
  class ModelClasses
63
- def management_lock_object
64
- Azure::Locks::Mgmt::V2016_09_01::Models::ManagementLockObject
68
+ def operation_display
69
+ Azure::Locks::Mgmt::V2016_09_01::Models::OperationDisplay
70
+ end
71
+ def management_lock_owner
72
+ Azure::Locks::Mgmt::V2016_09_01::Models::ManagementLockOwner
73
+ end
74
+ def operation
75
+ Azure::Locks::Mgmt::V2016_09_01::Models::Operation
65
76
  end
66
77
  def management_lock_list_result
67
78
  Azure::Locks::Mgmt::V2016_09_01::Models::ManagementLockListResult
68
79
  end
69
- def management_lock_owner
70
- Azure::Locks::Mgmt::V2016_09_01::Models::ManagementLockOwner
80
+ def operation_list_result
81
+ Azure::Locks::Mgmt::V2016_09_01::Models::OperationListResult
82
+ end
83
+ def management_lock_object
84
+ Azure::Locks::Mgmt::V2016_09_01::Models::ManagementLockObject
71
85
  end
72
86
  def lock_level
73
87
  Azure::Locks::Mgmt::V2016_09_01::Models::LockLevel
@@ -0,0 +1,8 @@
1
+ # encoding: utf-8
2
+ # Copyright (c) Microsoft Corporation. All rights reserved.
3
+ # Licensed under the MIT License. See License.txt in the project root for license information.
4
+
5
+ module Azure end
6
+ module Azure::Locks end
7
+ module Azure::Locks::Profiles end
8
+ module Azure::Locks::Profiles::V2018_03_01 end
@@ -0,0 +1,40 @@
1
+ # encoding: utf-8
2
+ # Copyright (c) Microsoft Corporation. All rights reserved.
3
+ # Licensed under the MIT License. See License.txt in the project root for license information.
4
+
5
+ require 'profiles/v2018_03_01/locks_module_definition'
6
+ require 'profiles/v2018_03_01/modules/locks_profile_module'
7
+
8
+ module Azure::Locks::Profiles::V2018_03_01
9
+ module Mgmt
10
+ #
11
+ # Client class for the V2018_03_01 profile SDK.
12
+ #
13
+ class Client < LocksManagementClass
14
+ include MsRestAzure::Common::Configurable
15
+
16
+ #
17
+ # Initializes a new instance of the Client class.
18
+ # @param options [Hash] hash of client options.
19
+ # options = {
20
+ # tenant_id: 'YOUR TENANT ID',
21
+ # client_id: 'YOUR CLIENT ID',
22
+ # client_secret: 'YOUR CLIENT SECRET',
23
+ # subscription_id: 'YOUR SUBSCRIPTION ID',
24
+ # credentials: credentials,
25
+ # active_directory_settings: active_directory_settings,
26
+ # base_url: 'YOUR BASE URL',
27
+ # options: options
28
+ # }
29
+ # 'credentials' are optional and if not passed in the hash, will be obtained
30
+ # from MsRest::TokenCredentials using MsRestAzure::ApplicationTokenProvider.
31
+ #
32
+ # Also, base_url, active_directory_settings & options are optional.
33
+ #
34
+ def initialize(options = {})
35
+ super(options)
36
+ end
37
+
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,91 @@
1
+ # encoding: utf-8
2
+ # Copyright (c) Microsoft Corporation. All rights reserved.
3
+ # Licensed under the MIT License. See License.txt in the project root for license information.
4
+
5
+ require 'azure_mgmt_locks'
6
+
7
+ module Azure::Locks::Profiles::V2018_03_01
8
+ module Mgmt
9
+ AuthorizationOperations = Azure::Locks::Mgmt::V2016_09_01::AuthorizationOperations
10
+ ManagementLocks = Azure::Locks::Mgmt::V2016_09_01::ManagementLocks
11
+
12
+ module Models
13
+ OperationDisplay = Azure::Locks::Mgmt::V2016_09_01::Models::OperationDisplay
14
+ ManagementLockOwner = Azure::Locks::Mgmt::V2016_09_01::Models::ManagementLockOwner
15
+ Operation = Azure::Locks::Mgmt::V2016_09_01::Models::Operation
16
+ ManagementLockListResult = Azure::Locks::Mgmt::V2016_09_01::Models::ManagementLockListResult
17
+ OperationListResult = Azure::Locks::Mgmt::V2016_09_01::Models::OperationListResult
18
+ ManagementLockObject = Azure::Locks::Mgmt::V2016_09_01::Models::ManagementLockObject
19
+ LockLevel = Azure::Locks::Mgmt::V2016_09_01::Models::LockLevel
20
+ end
21
+
22
+ #
23
+ # LocksManagementClass
24
+ #
25
+ class LocksManagementClass
26
+ attr_reader :authorization_operations, :management_locks, :configurable, :base_url, :options, :model_classes
27
+
28
+ def initialize(options = {})
29
+ if options.is_a?(Hash) && options.length == 0
30
+ @options = setup_default_options
31
+ else
32
+ @options = options
33
+ end
34
+
35
+ reset!(options)
36
+
37
+ @configurable = self
38
+ @base_url = options[:base_url].nil? ? nil:options[:base_url]
39
+ @options = options[:options].nil? ? nil:options[:options]
40
+
41
+ @client_0 = Azure::Locks::Mgmt::V2016_09_01::ManagementLockClient.new(configurable.credentials, base_url, options)
42
+ if(@client_0.respond_to?(:subscription_id))
43
+ @client_0.subscription_id = configurable.subscription_id
44
+ end
45
+ add_telemetry(@client_0)
46
+ @authorization_operations = @client_0.authorization_operations
47
+ @management_locks = @client_0.management_locks
48
+
49
+ @model_classes = ModelClasses.new
50
+ end
51
+
52
+ def add_telemetry(client)
53
+ profile_information = 'Profiles/V2018_03_01/Locks/Mgmt'
54
+ client.add_user_agent_information(profile_information)
55
+ end
56
+
57
+ def method_missing(method, *args)
58
+ if @client_0.respond_to?method
59
+ @client_0.send(method, *args)
60
+ else
61
+ super
62
+ end
63
+ end
64
+
65
+ end
66
+
67
+ class ModelClasses
68
+ def operation_display
69
+ Azure::Locks::Mgmt::V2016_09_01::Models::OperationDisplay
70
+ end
71
+ def management_lock_owner
72
+ Azure::Locks::Mgmt::V2016_09_01::Models::ManagementLockOwner
73
+ end
74
+ def operation
75
+ Azure::Locks::Mgmt::V2016_09_01::Models::Operation
76
+ end
77
+ def management_lock_list_result
78
+ Azure::Locks::Mgmt::V2016_09_01::Models::ManagementLockListResult
79
+ end
80
+ def operation_list_result
81
+ Azure::Locks::Mgmt::V2016_09_01::Models::OperationListResult
82
+ end
83
+ def management_lock_object
84
+ Azure::Locks::Mgmt::V2016_09_01::Models::ManagementLockObject
85
+ end
86
+ def lock_level
87
+ Azure::Locks::Mgmt::V2016_09_01::Models::LockLevel
88
+ end
89
+ end
90
+ end
91
+ end
@@ -3,5 +3,5 @@
3
3
  # Licensed under the MIT License. See License.txt in the project root for license information.
4
4
 
5
5
  module Azure::Locks::Mgmt
6
- VERSION = '0.17.0'
6
+ VERSION = '0.17.1'
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: azure_mgmt_locks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.0
4
+ version: 0.17.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Microsoft Corporation
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-31 00:00:00.000000000 Z
11
+ date: 2018-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -95,12 +95,16 @@ files:
95
95
  - lib/2015-01-01/generated/azure_mgmt_locks/models/management_lock_object.rb
96
96
  - lib/2015-01-01/generated/azure_mgmt_locks/module_definition.rb
97
97
  - lib/2016-09-01/generated/azure_mgmt_locks.rb
98
+ - lib/2016-09-01/generated/azure_mgmt_locks/authorization_operations.rb
98
99
  - lib/2016-09-01/generated/azure_mgmt_locks/management_lock_client.rb
99
100
  - lib/2016-09-01/generated/azure_mgmt_locks/management_locks.rb
100
101
  - lib/2016-09-01/generated/azure_mgmt_locks/models/lock_level.rb
101
102
  - lib/2016-09-01/generated/azure_mgmt_locks/models/management_lock_list_result.rb
102
103
  - lib/2016-09-01/generated/azure_mgmt_locks/models/management_lock_object.rb
103
104
  - lib/2016-09-01/generated/azure_mgmt_locks/models/management_lock_owner.rb
105
+ - lib/2016-09-01/generated/azure_mgmt_locks/models/operation.rb
106
+ - lib/2016-09-01/generated/azure_mgmt_locks/models/operation_display.rb
107
+ - lib/2016-09-01/generated/azure_mgmt_locks/models/operation_list_result.rb
104
108
  - lib/2016-09-01/generated/azure_mgmt_locks/module_definition.rb
105
109
  - lib/azure_mgmt_locks.rb
106
110
  - lib/module_definition.rb
@@ -110,6 +114,9 @@ files:
110
114
  - lib/profiles/v2017_03_09/locks_module_definition.rb
111
115
  - lib/profiles/v2017_03_09/locks_v2017_03_09_profile_client.rb
112
116
  - lib/profiles/v2017_03_09/modules/locks_profile_module.rb
117
+ - lib/profiles/v2018_03_01/locks_module_definition.rb
118
+ - lib/profiles/v2018_03_01/locks_v2018_03_01_profile_client.rb
119
+ - lib/profiles/v2018_03_01/modules/locks_profile_module.rb
113
120
  - lib/version.rb
114
121
  homepage: https://aka.ms/azure-sdk-for-ruby
115
122
  licenses: