azure_mgmt_links 0.14.0 → 0.15.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (23) hide show
  1. checksums.yaml +4 -4
  2. data/lib/{generated → 2016-09-01/generated}/azure_mgmt_links.rb +9 -9
  3. data/lib/{generated → 2016-09-01/generated}/azure_mgmt_links/management_link_client.rb +3 -3
  4. data/lib/{generated → 2016-09-01/generated}/azure_mgmt_links/models/filter.rb +1 -1
  5. data/lib/{generated → 2016-09-01/generated}/azure_mgmt_links/models/resource_link.rb +1 -1
  6. data/lib/{generated → 2016-09-01/generated}/azure_mgmt_links/models/resource_link_filter.rb +1 -1
  7. data/lib/{generated → 2016-09-01/generated}/azure_mgmt_links/models/resource_link_properties.rb +1 -1
  8. data/lib/{generated → 2016-09-01/generated}/azure_mgmt_links/models/resource_link_result.rb +1 -1
  9. data/lib/{generated → 2016-09-01/generated}/azure_mgmt_links/module_definition.rb +3 -2
  10. data/lib/{generated → 2016-09-01/generated}/azure_mgmt_links/resource_links.rb +9 -9
  11. data/lib/{generated → 2016-09-01/generated}/azure_mgmt_links/version.rb +2 -2
  12. data/lib/azure_mgmt_links.rb +3 -3
  13. data/lib/module_definition.rb +7 -0
  14. data/lib/profiles/common/configurable.rb +73 -0
  15. data/lib/profiles/common/default.rb +68 -0
  16. data/lib/profiles/latest/links_latest_profile_client.rb +33 -0
  17. data/lib/profiles/latest/links_module_definition.rb +9 -0
  18. data/lib/profiles/latest/modules/links_profile_module.rb +62 -0
  19. data/lib/profiles/v2017_03_09/links_module_definition.rb +9 -0
  20. data/lib/profiles/v2017_03_09/links_v2017_03_09_profile_client.rb +33 -0
  21. data/lib/profiles/v2017_03_09/modules/links_profile_module.rb +62 -0
  22. data/lib/version.rb +7 -0
  23. metadata +22 -12
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e46489ae9b403f702ebcf97d835be246ce7eee4a
4
- data.tar.gz: bade94019ff28a5266da59ee1e0837b8e2b7fe4b
3
+ metadata.gz: 4db68dba9147eb21008ae36fb7567f9a85e1f746
4
+ data.tar.gz: 50b57a8d2c1f9cad6f773041d5d87d84c468ebf0
5
5
  SHA512:
6
- metadata.gz: 120a9f6f8226cdfe5b77e86b9b1d35857f06b8131f0794d1b77a29752e4cbf52c5c5ad97d207e0c58c888de68f8a6475052611f085e87f0a9ee0308a0ff1cf63
7
- data.tar.gz: 1221400383e0e19be1f5471842fb3f35d4f6fbdc36fadf564b599aa830ecf92c3f3bd0ac9a0e96807909f198d1a89065e7ea3c7af92a2b7ed8de240312b3af9a
6
+ metadata.gz: 1f00ae3a47377ef1b09ea2b7242caae81f723859584e62c71650ad1d6882f9e7a21943ea961d41097a7e6514a5b2d538eaaf9952c61fa78739de9fd8a8c954f4
7
+ data.tar.gz: c1c2daba6e8ea26d2c793e97c9c2d8d131d68f746de818c23004b3702ca89699a97f8504372d1d1e0a81700b6fe3a5f811acd8939c2406272a6fcfc1209a0472
@@ -16,18 +16,18 @@ require 'faraday'
16
16
  require 'faraday-cookie_jar'
17
17
  require 'concurrent'
18
18
  require 'ms_rest'
19
- require 'generated/azure_mgmt_links/module_definition'
19
+ require '2016-09-01/generated/azure_mgmt_links/module_definition'
20
20
  require 'ms_rest_azure'
21
21
 
22
- module Azure::ARM::Links
23
- autoload :ResourceLinks, 'generated/azure_mgmt_links/resource_links.rb'
24
- autoload :ManagementLinkClient, 'generated/azure_mgmt_links/management_link_client.rb'
22
+ module Azure::Links::Mgmt::V2016_09_01
23
+ autoload :ResourceLinks, '2016-09-01/generated/azure_mgmt_links/resource_links.rb'
24
+ autoload :ManagementLinkClient, '2016-09-01/generated/azure_mgmt_links/management_link_client.rb'
25
25
 
26
26
  module Models
27
- autoload :ResourceLink, 'generated/azure_mgmt_links/models/resource_link.rb'
28
- autoload :ResourceLinkFilter, 'generated/azure_mgmt_links/models/resource_link_filter.rb'
29
- autoload :ResourceLinkResult, 'generated/azure_mgmt_links/models/resource_link_result.rb'
30
- autoload :ResourceLinkProperties, 'generated/azure_mgmt_links/models/resource_link_properties.rb'
31
- autoload :Filter, 'generated/azure_mgmt_links/models/filter.rb'
27
+ autoload :ResourceLink, '2016-09-01/generated/azure_mgmt_links/models/resource_link.rb'
28
+ autoload :ResourceLinkFilter, '2016-09-01/generated/azure_mgmt_links/models/resource_link_filter.rb'
29
+ autoload :ResourceLinkResult, '2016-09-01/generated/azure_mgmt_links/models/resource_link_result.rb'
30
+ autoload :ResourceLinkProperties, '2016-09-01/generated/azure_mgmt_links/models/resource_link_properties.rb'
31
+ autoload :Filter, '2016-09-01/generated/azure_mgmt_links/models/filter.rb'
32
32
  end
33
33
  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::Links
6
+ module Azure::Links::Mgmt::V2016_09_01
7
7
  #
8
8
  # A service client - single point of access to the REST API.
9
9
  #
@@ -120,8 +120,8 @@ module Azure::ARM::Links
120
120
  #
121
121
  def add_telemetry
122
122
  sdk_information = 'azure_mgmt_links'
123
- if defined? Azure::ARM::Links::VERSION
124
- sdk_information = "#{sdk_information}/#{Azure::ARM::Links::VERSION}"
123
+ if defined? Azure::Links::Mgmt::V2016_09_01::VERSION
124
+ sdk_information = "#{sdk_information}/#{Azure::Links::Mgmt::V2016_09_01::VERSION}"
125
125
  end
126
126
  add_user_agent_information(sdk_information)
127
127
  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::Links
6
+ module Azure::Links::Mgmt::V2016_09_01
7
7
  module Models
8
8
  #
9
9
  # Defines values for Filter
@@ -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::Links
6
+ module Azure::Links::Mgmt::V2016_09_01
7
7
  module Models
8
8
  #
9
9
  # The resource link.
@@ -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::Links
6
+ module Azure::Links::Mgmt::V2016_09_01
7
7
  module Models
8
8
  #
9
9
  # Resource link filter.
@@ -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::Links
6
+ module Azure::Links::Mgmt::V2016_09_01
7
7
  module Models
8
8
  #
9
9
  # The resource link properties.
@@ -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::Links
6
+ module Azure::Links::Mgmt::V2016_09_01
7
7
  module Models
8
8
  #
9
9
  # List of resource links.
@@ -4,5 +4,6 @@
4
4
  # regenerated.
5
5
 
6
6
  module Azure end
7
- module Azure::ARM end
8
- module Azure::ARM::Links end
7
+ module Azure::Links end
8
+ module Azure::Links::Mgmt end
9
+ module Azure::Links::Mgmt::V2016_09_01 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::Links
6
+ module Azure::Links::Mgmt::V2016_09_01
7
7
  #
8
8
  # Azure resources can be linked together to form logical relationships. You
9
9
  # can establish links between resources belonging to different resource
@@ -182,7 +182,7 @@ module Azure::ARM::Links
182
182
  request_headers['Content-Type'] = 'application/json; charset=utf-8'
183
183
 
184
184
  # Serialize Request
185
- request_mapper = Azure::ARM::Links::Models::ResourceLink.mapper()
185
+ request_mapper = Azure::Links::Mgmt::V2016_09_01::Models::ResourceLink.mapper()
186
186
  request_content = @client.serialize(request_mapper, parameters)
187
187
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
188
188
 
@@ -214,7 +214,7 @@ module Azure::ARM::Links
214
214
  if status_code == 201
215
215
  begin
216
216
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
217
- result_mapper = Azure::ARM::Links::Models::ResourceLink.mapper()
217
+ result_mapper = Azure::Links::Mgmt::V2016_09_01::Models::ResourceLink.mapper()
218
218
  result.body = @client.deserialize(result_mapper, parsed_response)
219
219
  rescue Exception => e
220
220
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -224,7 +224,7 @@ module Azure::ARM::Links
224
224
  if status_code == 200
225
225
  begin
226
226
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
227
- result_mapper = Azure::ARM::Links::Models::ResourceLink.mapper()
227
+ result_mapper = Azure::Links::Mgmt::V2016_09_01::Models::ResourceLink.mapper()
228
228
  result.body = @client.deserialize(result_mapper, parsed_response)
229
229
  rescue Exception => e
230
230
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -316,7 +316,7 @@ module Azure::ARM::Links
316
316
  if status_code == 200
317
317
  begin
318
318
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
319
- result_mapper = Azure::ARM::Links::Models::ResourceLink.mapper()
319
+ result_mapper = Azure::Links::Mgmt::V2016_09_01::Models::ResourceLink.mapper()
320
320
  result.body = @client.deserialize(result_mapper, parsed_response)
321
321
  rescue Exception => e
322
322
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -408,7 +408,7 @@ module Azure::ARM::Links
408
408
  if status_code == 200
409
409
  begin
410
410
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
411
- result_mapper = Azure::ARM::Links::Models::ResourceLinkResult.mapper()
411
+ result_mapper = Azure::Links::Mgmt::V2016_09_01::Models::ResourceLinkResult.mapper()
412
412
  result.body = @client.deserialize(result_mapper, parsed_response)
413
413
  rescue Exception => e
414
414
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -512,7 +512,7 @@ module Azure::ARM::Links
512
512
  if status_code == 200
513
513
  begin
514
514
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
515
- result_mapper = Azure::ARM::Links::Models::ResourceLinkResult.mapper()
515
+ result_mapper = Azure::Links::Mgmt::V2016_09_01::Models::ResourceLinkResult.mapper()
516
516
  result.body = @client.deserialize(result_mapper, parsed_response)
517
517
  rescue Exception => e
518
518
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -599,7 +599,7 @@ module Azure::ARM::Links
599
599
  if status_code == 200
600
600
  begin
601
601
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
602
- result_mapper = Azure::ARM::Links::Models::ResourceLinkResult.mapper()
602
+ result_mapper = Azure::Links::Mgmt::V2016_09_01::Models::ResourceLinkResult.mapper()
603
603
  result.body = @client.deserialize(result_mapper, parsed_response)
604
604
  rescue Exception => e
605
605
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -686,7 +686,7 @@ module Azure::ARM::Links
686
686
  if status_code == 200
687
687
  begin
688
688
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
689
- result_mapper = Azure::ARM::Links::Models::ResourceLinkResult.mapper()
689
+ result_mapper = Azure::Links::Mgmt::V2016_09_01::Models::ResourceLinkResult.mapper()
690
690
  result.body = @client.deserialize(result_mapper, parsed_response)
691
691
  rescue Exception => e
692
692
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -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::ARM::Links
7
- VERSION = '0.14.0'
6
+ module Azure::Links::Mgmt::V2016_09_01
7
+ VERSION = '0.15.0'
8
8
  end
@@ -2,6 +2,6 @@
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_links'
6
-
7
-
5
+ require '2016-09-01/generated/azure_mgmt_links'
6
+ require 'profiles/latest/links_latest_profile_client'
7
+ require 'profiles/v2017_03_09/links_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::Links end
7
+ module Azure::Links::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/links_module_definition'
6
+ require 'profiles/latest/modules/links_profile_module'
7
+ require 'profiles/common/configurable'
8
+ require 'profiles/common/default'
9
+
10
+ module Azure::Links::Profiles::Latest::Mgmt
11
+ #
12
+ # Client class for the Latest profile SDK.
13
+ #
14
+ class Client < LinksClass
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::Links end
7
+ module Azure::Links::Profiles end
8
+ module Azure::Links::Profiles::Latest end
9
+ module Azure::Links::Profiles::Latest::Mgmt end
@@ -0,0 +1,62 @@
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_links'
6
+
7
+ module Azure::Links::Profiles::Latest::Mgmt
8
+ ResourceLinks = Azure::Links::Mgmt::V2016_09_01::ResourceLinks
9
+
10
+ module Models
11
+ ResourceLink = Azure::Links::Mgmt::V2016_09_01::Models::ResourceLink
12
+ ResourceLinkFilter = Azure::Links::Mgmt::V2016_09_01::Models::ResourceLinkFilter
13
+ ResourceLinkResult = Azure::Links::Mgmt::V2016_09_01::Models::ResourceLinkResult
14
+ ResourceLinkProperties = Azure::Links::Mgmt::V2016_09_01::Models::ResourceLinkProperties
15
+ Filter = Azure::Links::Mgmt::V2016_09_01::Models::Filter
16
+ end
17
+
18
+ #
19
+ # Links
20
+ #
21
+ class LinksClass
22
+ attr_reader :resource_links, :configurable, :base_url, :options, :model_classes
23
+
24
+ def initialize(options = {})
25
+ if options.is_a?(Hash) && options.length == 0
26
+ @options = setup_options
27
+ else
28
+ @options = options
29
+ end
30
+
31
+ reset!(options)
32
+
33
+ @configurable, @base_url, @options = self, nil, nil
34
+
35
+ client_0 = Azure::Links::Mgmt::V2016_09_01::ManagementLinkClient.new(configurable.credentials, base_url, options)
36
+ if(client_0.respond_to?(:subscription_id))
37
+ client_0.subscription_id = configurable.subscription_id
38
+ end
39
+ @resource_links = client_0.resource_links
40
+
41
+ @model_classes = ModelClasses.new
42
+ end
43
+
44
+ class ModelClasses
45
+ def resource_link
46
+ Azure::Links::Mgmt::V2016_09_01::Models::ResourceLink
47
+ end
48
+ def resource_link_filter
49
+ Azure::Links::Mgmt::V2016_09_01::Models::ResourceLinkFilter
50
+ end
51
+ def resource_link_result
52
+ Azure::Links::Mgmt::V2016_09_01::Models::ResourceLinkResult
53
+ end
54
+ def resource_link_properties
55
+ Azure::Links::Mgmt::V2016_09_01::Models::ResourceLinkProperties
56
+ end
57
+ def filter
58
+ Azure::Links::Mgmt::V2016_09_01::Models::Filter
59
+ end
60
+ end
61
+ end
62
+ 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::Links end
7
+ module Azure::Links::Profiles end
8
+ module Azure::Links::Profiles::V2017_03_09 end
9
+ module Azure::Links::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/links_module_definition'
6
+ require 'profiles/v2017_03_09/modules/links_profile_module'
7
+ require 'profiles/common/configurable'
8
+ require 'profiles/common/default'
9
+
10
+ module Azure::Links::Profiles::V2017_03_09::Mgmt
11
+ #
12
+ # Client class for the V2017_03_09 profile SDK.
13
+ #
14
+ class Client < LinksClass
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,62 @@
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_links'
6
+
7
+ module Azure::Links::Profiles::V2017_03_09::Mgmt
8
+ ResourceLinks = Azure::Links::Mgmt::V2016_09_01::ResourceLinks
9
+
10
+ module Models
11
+ ResourceLink = Azure::Links::Mgmt::V2016_09_01::Models::ResourceLink
12
+ ResourceLinkFilter = Azure::Links::Mgmt::V2016_09_01::Models::ResourceLinkFilter
13
+ ResourceLinkResult = Azure::Links::Mgmt::V2016_09_01::Models::ResourceLinkResult
14
+ ResourceLinkProperties = Azure::Links::Mgmt::V2016_09_01::Models::ResourceLinkProperties
15
+ Filter = Azure::Links::Mgmt::V2016_09_01::Models::Filter
16
+ end
17
+
18
+ #
19
+ # Links
20
+ #
21
+ class LinksClass
22
+ attr_reader :resource_links, :configurable, :base_url, :options, :model_classes
23
+
24
+ def initialize(options = {})
25
+ if options.is_a?(Hash) && options.length == 0
26
+ @options = setup_options
27
+ else
28
+ @options = options
29
+ end
30
+
31
+ reset!(options)
32
+
33
+ @configurable, @base_url, @options = self, nil, nil
34
+
35
+ client_0 = Azure::Links::Mgmt::V2016_09_01::ManagementLinkClient.new(configurable.credentials, base_url, options)
36
+ if(client_0.respond_to?(:subscription_id))
37
+ client_0.subscription_id = configurable.subscription_id
38
+ end
39
+ @resource_links = client_0.resource_links
40
+
41
+ @model_classes = ModelClasses.new
42
+ end
43
+
44
+ class ModelClasses
45
+ def resource_link
46
+ Azure::Links::Mgmt::V2016_09_01::Models::ResourceLink
47
+ end
48
+ def resource_link_filter
49
+ Azure::Links::Mgmt::V2016_09_01::Models::ResourceLinkFilter
50
+ end
51
+ def resource_link_result
52
+ Azure::Links::Mgmt::V2016_09_01::Models::ResourceLinkResult
53
+ end
54
+ def resource_link_properties
55
+ Azure::Links::Mgmt::V2016_09_01::Models::ResourceLinkProperties
56
+ end
57
+ def filter
58
+ Azure::Links::Mgmt::V2016_09_01::Models::Filter
59
+ end
60
+ end
61
+ end
62
+ end
data/lib/version.rb ADDED
@@ -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::Links::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_links
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,17 +87,27 @@ extensions: []
87
87
  extra_rdoc_files: []
88
88
  files:
89
89
  - LICENSE.txt
90
+ - lib/2016-09-01/generated/azure_mgmt_links.rb
91
+ - lib/2016-09-01/generated/azure_mgmt_links/management_link_client.rb
92
+ - lib/2016-09-01/generated/azure_mgmt_links/models/filter.rb
93
+ - lib/2016-09-01/generated/azure_mgmt_links/models/resource_link.rb
94
+ - lib/2016-09-01/generated/azure_mgmt_links/models/resource_link_filter.rb
95
+ - lib/2016-09-01/generated/azure_mgmt_links/models/resource_link_properties.rb
96
+ - lib/2016-09-01/generated/azure_mgmt_links/models/resource_link_result.rb
97
+ - lib/2016-09-01/generated/azure_mgmt_links/module_definition.rb
98
+ - lib/2016-09-01/generated/azure_mgmt_links/resource_links.rb
99
+ - lib/2016-09-01/generated/azure_mgmt_links/version.rb
90
100
  - lib/azure_mgmt_links.rb
91
- - lib/generated/azure_mgmt_links.rb
92
- - lib/generated/azure_mgmt_links/management_link_client.rb
93
- - lib/generated/azure_mgmt_links/models/filter.rb
94
- - lib/generated/azure_mgmt_links/models/resource_link.rb
95
- - lib/generated/azure_mgmt_links/models/resource_link_filter.rb
96
- - lib/generated/azure_mgmt_links/models/resource_link_properties.rb
97
- - lib/generated/azure_mgmt_links/models/resource_link_result.rb
98
- - lib/generated/azure_mgmt_links/module_definition.rb
99
- - lib/generated/azure_mgmt_links/resource_links.rb
100
- - lib/generated/azure_mgmt_links/version.rb
101
+ - lib/module_definition.rb
102
+ - lib/profiles/common/configurable.rb
103
+ - lib/profiles/common/default.rb
104
+ - lib/profiles/latest/links_latest_profile_client.rb
105
+ - lib/profiles/latest/links_module_definition.rb
106
+ - lib/profiles/latest/modules/links_profile_module.rb
107
+ - lib/profiles/v2017_03_09/links_module_definition.rb
108
+ - lib/profiles/v2017_03_09/links_v2017_03_09_profile_client.rb
109
+ - lib/profiles/v2017_03_09/modules/links_profile_module.rb
110
+ - lib/version.rb
101
111
  homepage: https://aka.ms/azure-sdk-for-ruby
102
112
  licenses:
103
113
  - MIT