azure_mgmt_locks 0.15.2 → 0.16.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.
@@ -5,17 +5,36 @@
5
5
  require 'profiles/latest/locks_module_definition'
6
6
  require 'profiles/latest/modules/locks_profile_module'
7
7
 
8
- module Azure::Locks::Profiles::Latest::Mgmt
9
- #
10
- # Client class for the Latest profile SDK.
11
- #
12
- class Client < LocksClass
13
- include MsRestAzure::Common::Configurable
8
+ module Azure::Locks::Profiles::Latest
9
+ module Mgmt
10
+ #
11
+ # Client class for the Latest profile SDK.
12
+ #
13
+ class Client < LocksManagementClass
14
+ include MsRestAzure::Common::Configurable
14
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
15
37
 
16
- def initialize(options = {})
17
- super(options)
18
38
  end
19
-
20
39
  end
21
40
  end
@@ -6,4 +6,3 @@ module Azure end
6
6
  module Azure::Locks end
7
7
  module Azure::Locks::Profiles end
8
8
  module Azure::Locks::Profiles::Latest end
9
- module Azure::Locks::Profiles::Latest::Mgmt end
@@ -4,7 +4,8 @@
4
4
 
5
5
  require 'azure_mgmt_locks'
6
6
 
7
- module Azure::Locks::Profiles::Latest::Mgmt
7
+ module Azure::Locks::Profiles::Latest
8
+ module Mgmt
8
9
  ManagementLocks = Azure::Locks::Mgmt::V2016_09_01::ManagementLocks
9
10
 
10
11
  module Models
@@ -15,9 +16,9 @@ module Azure::Locks::Profiles::Latest::Mgmt
15
16
  end
16
17
 
17
18
  #
18
- # Locks
19
+ # LocksManagementClass
19
20
  #
20
- class LocksClass
21
+ class LocksManagementClass
21
22
  attr_reader :management_locks, :configurable, :base_url, :options, :model_classes
22
23
 
23
24
  def initialize(options = {})
@@ -29,30 +30,48 @@ module Azure::Locks::Profiles::Latest::Mgmt
29
30
 
30
31
  reset!(options)
31
32
 
32
- @configurable, @base_url, @options = self, nil, nil
33
+ @configurable = self
34
+ @base_url = options[:base_url].nil? ? nil:options[:base_url]
35
+ @options = options[:options].nil? ? nil:options[:options]
33
36
 
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
+ @client_0 = Azure::Locks::Mgmt::V2016_09_01::ManagementLockClient.new(configurable.credentials, base_url, options)
38
+ if(@client_0.respond_to?(:subscription_id))
39
+ @client_0.subscription_id = configurable.subscription_id
37
40
  end
38
- @management_locks = client_0.management_locks
41
+ add_telemetry(@client_0)
42
+ @management_locks = @client_0.management_locks
39
43
 
40
44
  @model_classes = ModelClasses.new
41
45
  end
42
46
 
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
47
+ def add_telemetry(client)
48
+ profile_information = 'Profiles/Latest/Locks/Mgmt'
49
+ client.add_user_agent_information(profile_information)
50
+ end
51
+
52
+ def method_missing(method, *args)
53
+ if @client_0.respond_to?method
54
+ @client_0.send(method, *args)
55
+ else
56
+ super
55
57
  end
56
58
  end
59
+
60
+ end
61
+
62
+ class ModelClasses
63
+ def management_lock_object
64
+ Azure::Locks::Mgmt::V2016_09_01::Models::ManagementLockObject
65
+ end
66
+ def management_lock_list_result
67
+ Azure::Locks::Mgmt::V2016_09_01::Models::ManagementLockListResult
68
+ end
69
+ def management_lock_owner
70
+ Azure::Locks::Mgmt::V2016_09_01::Models::ManagementLockOwner
71
+ end
72
+ def lock_level
73
+ Azure::Locks::Mgmt::V2016_09_01::Models::LockLevel
74
+ end
57
75
  end
76
+ end
58
77
  end
@@ -6,4 +6,3 @@ module Azure end
6
6
  module Azure::Locks end
7
7
  module Azure::Locks::Profiles end
8
8
  module Azure::Locks::Profiles::V2017_03_09 end
9
- module Azure::Locks::Profiles::V2017_03_09::Mgmt end
@@ -5,17 +5,36 @@
5
5
  require 'profiles/v2017_03_09/locks_module_definition'
6
6
  require 'profiles/v2017_03_09/modules/locks_profile_module'
7
7
 
8
- module Azure::Locks::Profiles::V2017_03_09::Mgmt
9
- #
10
- # Client class for the V2017_03_09 profile SDK.
11
- #
12
- class Client < LocksClass
13
- include MsRestAzure::Common::Configurable
8
+ module Azure::Locks::Profiles::V2017_03_09
9
+ module Mgmt
10
+ #
11
+ # Client class for the V2017_03_09 profile SDK.
12
+ #
13
+ class Client < LocksManagementClass
14
+ include MsRestAzure::Common::Configurable
14
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
15
37
 
16
- def initialize(options = {})
17
- super(options)
18
38
  end
19
-
20
39
  end
21
40
  end
@@ -4,7 +4,8 @@
4
4
 
5
5
  require 'azure_mgmt_locks'
6
6
 
7
- module Azure::Locks::Profiles::V2017_03_09::Mgmt
7
+ module Azure::Locks::Profiles::V2017_03_09
8
+ module Mgmt
8
9
  ManagementLocks = Azure::Locks::Mgmt::V2015_01_01::ManagementLocks
9
10
 
10
11
  module Models
@@ -14,9 +15,9 @@ module Azure::Locks::Profiles::V2017_03_09::Mgmt
14
15
  end
15
16
 
16
17
  #
17
- # Locks
18
+ # LocksManagementClass
18
19
  #
19
- class LocksClass
20
+ class LocksManagementClass
20
21
  attr_reader :management_locks, :configurable, :base_url, :options, :model_classes
21
22
 
22
23
  def initialize(options = {})
@@ -28,27 +29,45 @@ module Azure::Locks::Profiles::V2017_03_09::Mgmt
28
29
 
29
30
  reset!(options)
30
31
 
31
- @configurable, @base_url, @options = self, nil, nil
32
+ @configurable = self
33
+ @base_url = options[:base_url].nil? ? nil:options[:base_url]
34
+ @options = options[:options].nil? ? nil:options[:options]
32
35
 
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
+ @client_0 = Azure::Locks::Mgmt::V2015_01_01::ManagementLockClient.new(configurable.credentials, base_url, options)
37
+ if(@client_0.respond_to?(:subscription_id))
38
+ @client_0.subscription_id = configurable.subscription_id
36
39
  end
37
- @management_locks = client_0.management_locks
40
+ add_telemetry(@client_0)
41
+ @management_locks = @client_0.management_locks
38
42
 
39
43
  @model_classes = ModelClasses.new
40
44
  end
41
45
 
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
46
+ def add_telemetry(client)
47
+ profile_information = 'Profiles/V2017_03_09/Locks/Mgmt'
48
+ client.add_user_agent_information(profile_information)
49
+ end
50
+
51
+ def method_missing(method, *args)
52
+ if @client_0.respond_to?method
53
+ @client_0.send(method, *args)
54
+ else
55
+ super
51
56
  end
52
57
  end
58
+
59
+ end
60
+
61
+ class ModelClasses
62
+ def management_lock_list_result
63
+ Azure::Locks::Mgmt::V2015_01_01::Models::ManagementLockListResult
64
+ end
65
+ def management_lock_object
66
+ Azure::Locks::Mgmt::V2015_01_01::Models::ManagementLockObject
67
+ end
68
+ def lock_level
69
+ Azure::Locks::Mgmt::V2015_01_01::Models::LockLevel
70
+ end
53
71
  end
72
+ end
54
73
  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.15.2'
6
+ VERSION = '0.16.0'
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.15.2
4
+ version: 0.16.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-12-19 00:00:00.000000000 Z
11
+ date: 2018-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -136,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
136
  version: '0'
137
137
  requirements: []
138
138
  rubyforge_project:
139
- rubygems_version: 2.5.1
139
+ rubygems_version: 2.6.10
140
140
  signing_key:
141
141
  specification_version: 4
142
142
  summary: Official Ruby client library to consume Microsoft Azure Resource Lock Management