azure_mgmt_locks 0.14.0 → 0.15.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 (30) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2015-01-01/generated/azure_mgmt_locks.rb +31 -0
  3. data/lib/2015-01-01/generated/azure_mgmt_locks/management_lock_client.rb +131 -0
  4. data/lib/2015-01-01/generated/azure_mgmt_locks/management_locks.rb +1434 -0
  5. data/lib/{generated → 2015-01-01/generated}/azure_mgmt_locks/models/lock_level.rb +1 -1
  6. data/lib/2015-01-01/generated/azure_mgmt_locks/models/management_lock_list_result.rb +94 -0
  7. data/lib/2015-01-01/generated/azure_mgmt_locks/models/management_lock_object.rb +85 -0
  8. data/lib/2015-01-01/generated/azure_mgmt_locks/module_definition.rb +9 -0
  9. data/lib/{generated → 2015-01-01/generated}/azure_mgmt_locks/version.rb +2 -2
  10. data/lib/{generated → 2016-09-01/generated}/azure_mgmt_locks.rb +8 -8
  11. data/lib/{generated → 2016-09-01/generated}/azure_mgmt_locks/management_lock_client.rb +3 -3
  12. data/lib/{generated → 2016-09-01/generated}/azure_mgmt_locks/management_locks.rb +23 -23
  13. data/lib/2016-09-01/generated/azure_mgmt_locks/models/lock_level.rb +17 -0
  14. data/lib/{generated → 2016-09-01/generated}/azure_mgmt_locks/models/management_lock_list_result.rb +1 -1
  15. data/lib/{generated → 2016-09-01/generated}/azure_mgmt_locks/models/management_lock_object.rb +1 -1
  16. data/lib/{generated → 2016-09-01/generated}/azure_mgmt_locks/models/management_lock_owner.rb +1 -1
  17. data/lib/2016-09-01/generated/azure_mgmt_locks/module_definition.rb +9 -0
  18. data/lib/{generated/azure_mgmt_locks/module_definition.rb → 2016-09-01/generated/azure_mgmt_locks/version.rb} +3 -3
  19. data/lib/azure_mgmt_locks.rb +4 -1
  20. data/lib/module_definition.rb +7 -0
  21. data/lib/profiles/common/configurable.rb +73 -0
  22. data/lib/profiles/common/default.rb +68 -0
  23. data/lib/profiles/latest/locks_latest_profile_client.rb +33 -0
  24. data/lib/profiles/latest/locks_module_definition.rb +9 -0
  25. data/lib/profiles/latest/modules/locks_profile_module.rb +58 -0
  26. data/lib/profiles/v2017_03_09/locks_module_definition.rb +9 -0
  27. data/lib/profiles/v2017_03_09/locks_v2017_03_09_profile_client.rb +33 -0
  28. data/lib/profiles/v2017_03_09/modules/locks_profile_module.rb +54 -0
  29. data/lib/version.rb +7 -0
  30. metadata +29 -11
@@ -0,0 +1,17 @@
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
+ # Defines values for LockLevel
10
+ #
11
+ module LockLevel
12
+ NotSpecified = "NotSpecified"
13
+ CanNotDelete = "CanNotDelete"
14
+ ReadOnly = "ReadOnly"
15
+ end
16
+ end
17
+ end
@@ -3,7 +3,7 @@
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
6
- module Azure::ARM::Locks
6
+ module Azure::Locks::Mgmt::V2016_09_01
7
7
  module Models
8
8
  #
9
9
  # The list of locks.
@@ -3,7 +3,7 @@
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
6
- module Azure::ARM::Locks
6
+ module Azure::Locks::Mgmt::V2016_09_01
7
7
  module Models
8
8
  #
9
9
  # The lock information.
@@ -3,7 +3,7 @@
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
6
- module Azure::ARM::Locks
6
+ module Azure::Locks::Mgmt::V2016_09_01
7
7
  module Models
8
8
  #
9
9
  # Lock owner properties.
@@ -0,0 +1,9 @@
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 end
7
+ module Azure::Locks end
8
+ module Azure::Locks::Mgmt end
9
+ module Azure::Locks::Mgmt::V2016_09_01 end
@@ -3,6 +3,6 @@
3
3
  # Changes may cause incorrect behavior and will be lost if the code is
4
4
  # regenerated.
5
5
 
6
- module Azure end
7
- module Azure::ARM end
8
- module Azure::ARM::Locks end
6
+ module Azure::Locks::Mgmt::V2016_09_01
7
+ VERSION = '0.15.0'
8
+ end
@@ -2,4 +2,7 @@
2
2
  # Copyright (c) Microsoft Corporation. All rights reserved.
3
3
  # Licensed under the MIT License. See License.txt in the project root for license information.
4
4
 
5
- require 'generated/azure_mgmt_locks'
5
+ require '2015-01-01/generated/azure_mgmt_locks'
6
+ require '2016-09-01/generated/azure_mgmt_locks'
7
+ require 'profiles/latest/locks_latest_profile_client'
8
+ require 'profiles/v2017_03_09/locks_v2017_03_09_profile_client'
@@ -0,0 +1,7 @@
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::Mgmt end
@@ -0,0 +1,73 @@
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::ARM
6
+ # The Azure::ARM::Configurable module provides basic configuration for Azure ARM activities.
7
+ module Configurable
8
+ # @return [String] Azure tenant id (also known as domain).
9
+ attr_accessor :tenant_id
10
+
11
+ # @return [String] Azure client id.
12
+ attr_accessor :client_id
13
+
14
+ # @return [String] Azure secret key.
15
+ attr_accessor :client_secret
16
+
17
+ # @return [String] Azure subscription id.
18
+ attr_accessor :subscription_id
19
+
20
+ # @return [MsRestAzure::ActiveDirectoryServiceSettings] Azure active directory service settings.
21
+ attr_accessor :active_directory_settings
22
+
23
+ # @return [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
24
+ attr_accessor :credentials
25
+
26
+ class << self
27
+ #
28
+ # List of configurable keys for {Azure::ARM::Client}.
29
+ # @return [Array] of option keys.
30
+ #
31
+ def keys
32
+ @keys ||= [:tenant_id, :client_id, :client_secret, :subscription_id, :active_directory_settings, :credentials]
33
+ end
34
+ end
35
+
36
+ #
37
+ # Set configuration options using a block.
38
+ #
39
+ def configure
40
+ yield self
41
+ end
42
+
43
+ #
44
+ # Resets the configurable options to provided options or defaults.
45
+ # This will also creates MsRest::TokenCredentials to be used for subsequent Azure Resource Manager clients.
46
+ #
47
+ def reset!(options = {})
48
+ Azure::ARM::Configurable.keys.each do |key|
49
+ default_value = Azure::ARM::Default.options[key]
50
+ instance_variable_set(:"@#{key}", options.fetch(key, default_value))
51
+ end
52
+
53
+ self
54
+ end
55
+
56
+ def config
57
+ self
58
+ end
59
+
60
+ private
61
+
62
+ #
63
+ # configures configurable options to default values
64
+ #
65
+ def setup_options
66
+ opts = {}
67
+ Azure::ARM::Configurable.keys.map do |key|
68
+ opts[key] = Azure::ARM::Default.options[key]
69
+ end
70
+ opts
71
+ end
72
+ end
73
+ end
@@ -0,0 +1,68 @@
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::ARM
6
+ # Default configuration options for {Azure::ARM.Client}
7
+ module Default
8
+ class << self
9
+ #
10
+ # Default Azure Tenant Id.
11
+ # @return [String] Azure Tenant Id.
12
+ #
13
+ def tenant_id
14
+ ENV['AZURE_TENANT_ID']
15
+ end
16
+
17
+ #
18
+ # Default Azure Client Id.
19
+ # @return [String] Azure Client Id.
20
+ #
21
+ def client_id
22
+ ENV['AZURE_CLIENT_ID']
23
+ end
24
+
25
+ #
26
+ # Default Azure Client Secret.
27
+ # @return [String] Azure Client Secret.
28
+ #
29
+ def client_secret
30
+ ENV['AZURE_CLIENT_SECRET']
31
+ end
32
+
33
+ #
34
+ # Default Azure Subscription Id.
35
+ # @return [String] Azure Subscription Id.
36
+ #
37
+ def subscription_id
38
+ ENV['AZURE_SUBSCRIPTION_ID']
39
+ end
40
+
41
+ #
42
+ # Default Azure credentials to authorize HTTP requests made by the service client.
43
+ # @return [MsRest::ServiceClientCredentials] Azure credentials to authorize HTTP requests made by the service client.
44
+ #
45
+ def credentials
46
+ MsRest::TokenCredentials.new(
47
+ MsRestAzure::ApplicationTokenProvider.new(
48
+ self.tenant_id, self.client_id, self.client_secret, self.active_directory_settings))
49
+ end
50
+
51
+ #
52
+ # Default Azure Active Directory Service Settings.
53
+ # @return [MsRestAzure::ActiveDirectoryServiceSettings] Azure Active Directory Service Settings.
54
+ #
55
+ def active_directory_settings
56
+ MsRestAzure::ActiveDirectoryServiceSettings.get_azure_settings
57
+ end
58
+
59
+ #
60
+ # Configuration options.
61
+ # @return [Hash] Configuration options.
62
+ #
63
+ def options
64
+ Hash[Azure::ARM::Configurable.keys.map{|key| [key, send(key)]}]
65
+ end
66
+ end
67
+ end
68
+ end
@@ -0,0 +1,33 @@
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/latest/locks_module_definition'
6
+ require 'profiles/latest/modules/locks_profile_module'
7
+ require 'profiles/common/configurable'
8
+ require 'profiles/common/default'
9
+
10
+ module Azure::Locks::Profiles::Latest::Mgmt
11
+ #
12
+ # Client class for the Latest profile SDK.
13
+ #
14
+ class Client < LocksClass
15
+ include Azure::ARM::Configurable
16
+
17
+
18
+ def initialize(options = {})
19
+ super(options)
20
+ end
21
+
22
+ def credentials
23
+ if @credentials.nil?
24
+ self.active_directory_settings ||= Azure::ARM::Default.active_directory_settings
25
+
26
+ @credentials = MsRest::TokenCredentials.new(
27
+ MsRestAzure::ApplicationTokenProvider.new(
28
+ self.tenant_id, self.client_id, self.client_secret, self.active_directory_settings))
29
+ end
30
+ @credentials
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,9 @@
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::Latest end
9
+ module Azure::Locks::Profiles::Latest::Mgmt end
@@ -0,0 +1,58 @@
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::Latest::Mgmt
8
+ ManagementLocks = Azure::Locks::Mgmt::V2016_09_01::ManagementLocks
9
+
10
+ module Models
11
+ ManagementLockObject = Azure::Locks::Mgmt::V2016_09_01::Models::ManagementLockObject
12
+ ManagementLockListResult = Azure::Locks::Mgmt::V2016_09_01::Models::ManagementLockListResult
13
+ ManagementLockOwner = Azure::Locks::Mgmt::V2016_09_01::Models::ManagementLockOwner
14
+ LockLevel = Azure::Locks::Mgmt::V2016_09_01::Models::LockLevel
15
+ end
16
+
17
+ #
18
+ # Locks
19
+ #
20
+ class LocksClass
21
+ attr_reader :management_locks, :configurable, :base_url, :options, :model_classes
22
+
23
+ def initialize(options = {})
24
+ if options.is_a?(Hash) && options.length == 0
25
+ @options = setup_options
26
+ else
27
+ @options = options
28
+ end
29
+
30
+ reset!(options)
31
+
32
+ @configurable, @base_url, @options = self, nil, nil
33
+
34
+ client_0 = Azure::Locks::Mgmt::V2016_09_01::ManagementLockClient.new(configurable.credentials, base_url, options)
35
+ if(client_0.respond_to?(:subscription_id))
36
+ client_0.subscription_id = configurable.subscription_id
37
+ end
38
+ @management_locks = client_0.management_locks
39
+
40
+ @model_classes = ModelClasses.new
41
+ end
42
+
43
+ class ModelClasses
44
+ def management_lock_object
45
+ Azure::Locks::Mgmt::V2016_09_01::Models::ManagementLockObject
46
+ end
47
+ def management_lock_list_result
48
+ Azure::Locks::Mgmt::V2016_09_01::Models::ManagementLockListResult
49
+ end
50
+ def management_lock_owner
51
+ Azure::Locks::Mgmt::V2016_09_01::Models::ManagementLockOwner
52
+ end
53
+ def lock_level
54
+ Azure::Locks::Mgmt::V2016_09_01::Models::LockLevel
55
+ end
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,9 @@
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::V2017_03_09 end
9
+ module Azure::Locks::Profiles::V2017_03_09::Mgmt end
@@ -0,0 +1,33 @@
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/v2017_03_09/locks_module_definition'
6
+ require 'profiles/v2017_03_09/modules/locks_profile_module'
7
+ require 'profiles/common/configurable'
8
+ require 'profiles/common/default'
9
+
10
+ module Azure::Locks::Profiles::V2017_03_09::Mgmt
11
+ #
12
+ # Client class for the V2017_03_09 profile SDK.
13
+ #
14
+ class Client < LocksClass
15
+ include Azure::ARM::Configurable
16
+
17
+
18
+ def initialize(options = {})
19
+ super(options)
20
+ end
21
+
22
+ def credentials
23
+ if @credentials.nil?
24
+ self.active_directory_settings ||= Azure::ARM::Default.active_directory_settings
25
+
26
+ @credentials = MsRest::TokenCredentials.new(
27
+ MsRestAzure::ApplicationTokenProvider.new(
28
+ self.tenant_id, self.client_id, self.client_secret, self.active_directory_settings))
29
+ end
30
+ @credentials
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,54 @@
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::V2017_03_09::Mgmt
8
+ ManagementLocks = Azure::Locks::Mgmt::V2015_01_01::ManagementLocks
9
+
10
+ module Models
11
+ ManagementLockListResult = Azure::Locks::Mgmt::V2015_01_01::Models::ManagementLockListResult
12
+ ManagementLockObject = Azure::Locks::Mgmt::V2015_01_01::Models::ManagementLockObject
13
+ LockLevel = Azure::Locks::Mgmt::V2015_01_01::Models::LockLevel
14
+ end
15
+
16
+ #
17
+ # Locks
18
+ #
19
+ class LocksClass
20
+ attr_reader :management_locks, :configurable, :base_url, :options, :model_classes
21
+
22
+ def initialize(options = {})
23
+ if options.is_a?(Hash) && options.length == 0
24
+ @options = setup_options
25
+ else
26
+ @options = options
27
+ end
28
+
29
+ reset!(options)
30
+
31
+ @configurable, @base_url, @options = self, nil, nil
32
+
33
+ client_0 = Azure::Locks::Mgmt::V2015_01_01::ManagementLockClient.new(configurable.credentials, base_url, options)
34
+ if(client_0.respond_to?(:subscription_id))
35
+ client_0.subscription_id = configurable.subscription_id
36
+ end
37
+ @management_locks = client_0.management_locks
38
+
39
+ @model_classes = ModelClasses.new
40
+ end
41
+
42
+ class ModelClasses
43
+ def management_lock_list_result
44
+ Azure::Locks::Mgmt::V2015_01_01::Models::ManagementLockListResult
45
+ end
46
+ def management_lock_object
47
+ Azure::Locks::Mgmt::V2015_01_01::Models::ManagementLockObject
48
+ end
49
+ def lock_level
50
+ Azure::Locks::Mgmt::V2015_01_01::Models::LockLevel
51
+ end
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,7 @@
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::Locks::Mgmt
6
+ VERSION = '0.15.0'
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.14.0
4
+ version: 0.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Microsoft Corporation
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-09 00:00:00.000000000 Z
11
+ date: 2017-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -87,16 +87,34 @@ extensions: []
87
87
  extra_rdoc_files: []
88
88
  files:
89
89
  - LICENSE.txt
90
+ - lib/2015-01-01/generated/azure_mgmt_locks.rb
91
+ - lib/2015-01-01/generated/azure_mgmt_locks/management_lock_client.rb
92
+ - lib/2015-01-01/generated/azure_mgmt_locks/management_locks.rb
93
+ - lib/2015-01-01/generated/azure_mgmt_locks/models/lock_level.rb
94
+ - lib/2015-01-01/generated/azure_mgmt_locks/models/management_lock_list_result.rb
95
+ - lib/2015-01-01/generated/azure_mgmt_locks/models/management_lock_object.rb
96
+ - lib/2015-01-01/generated/azure_mgmt_locks/module_definition.rb
97
+ - lib/2015-01-01/generated/azure_mgmt_locks/version.rb
98
+ - lib/2016-09-01/generated/azure_mgmt_locks.rb
99
+ - lib/2016-09-01/generated/azure_mgmt_locks/management_lock_client.rb
100
+ - lib/2016-09-01/generated/azure_mgmt_locks/management_locks.rb
101
+ - lib/2016-09-01/generated/azure_mgmt_locks/models/lock_level.rb
102
+ - lib/2016-09-01/generated/azure_mgmt_locks/models/management_lock_list_result.rb
103
+ - lib/2016-09-01/generated/azure_mgmt_locks/models/management_lock_object.rb
104
+ - lib/2016-09-01/generated/azure_mgmt_locks/models/management_lock_owner.rb
105
+ - lib/2016-09-01/generated/azure_mgmt_locks/module_definition.rb
106
+ - lib/2016-09-01/generated/azure_mgmt_locks/version.rb
90
107
  - lib/azure_mgmt_locks.rb
91
- - lib/generated/azure_mgmt_locks.rb
92
- - lib/generated/azure_mgmt_locks/management_lock_client.rb
93
- - lib/generated/azure_mgmt_locks/management_locks.rb
94
- - lib/generated/azure_mgmt_locks/models/lock_level.rb
95
- - lib/generated/azure_mgmt_locks/models/management_lock_list_result.rb
96
- - lib/generated/azure_mgmt_locks/models/management_lock_object.rb
97
- - lib/generated/azure_mgmt_locks/models/management_lock_owner.rb
98
- - lib/generated/azure_mgmt_locks/module_definition.rb
99
- - lib/generated/azure_mgmt_locks/version.rb
108
+ - lib/module_definition.rb
109
+ - lib/profiles/common/configurable.rb
110
+ - lib/profiles/common/default.rb
111
+ - lib/profiles/latest/locks_latest_profile_client.rb
112
+ - lib/profiles/latest/locks_module_definition.rb
113
+ - lib/profiles/latest/modules/locks_profile_module.rb
114
+ - lib/profiles/v2017_03_09/locks_module_definition.rb
115
+ - lib/profiles/v2017_03_09/locks_v2017_03_09_profile_client.rb
116
+ - lib/profiles/v2017_03_09/modules/locks_profile_module.rb
117
+ - lib/version.rb
100
118
  homepage: https://aka.ms/azure-sdk-for-ruby
101
119
  licenses:
102
120
  - MIT