azure_mgmt_search 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 (31) hide show
  1. checksums.yaml +4 -4
  2. data/lib/{generated → 2015-08-19/generated}/azure_mgmt_search/admin_keys.rb +3 -3
  3. data/lib/{generated → 2015-08-19/generated}/azure_mgmt_search/models/admin_key_kind.rb +1 -1
  4. data/lib/{generated → 2015-08-19/generated}/azure_mgmt_search/models/admin_key_result.rb +1 -1
  5. data/lib/{generated → 2015-08-19/generated}/azure_mgmt_search/models/check_name_availability_input.rb +1 -1
  6. data/lib/{generated → 2015-08-19/generated}/azure_mgmt_search/models/check_name_availability_output.rb +1 -1
  7. data/lib/{generated → 2015-08-19/generated}/azure_mgmt_search/models/hosting_mode.rb +1 -1
  8. data/lib/{generated → 2015-08-19/generated}/azure_mgmt_search/models/provisioning_state.rb +1 -1
  9. data/lib/{generated → 2015-08-19/generated}/azure_mgmt_search/models/query_key.rb +1 -1
  10. data/lib/{generated → 2015-08-19/generated}/azure_mgmt_search/models/resource.rb +1 -1
  11. data/lib/{generated → 2015-08-19/generated}/azure_mgmt_search/models/search_management_request_options.rb +1 -1
  12. data/lib/{generated → 2015-08-19/generated}/azure_mgmt_search/models/search_service.rb +1 -1
  13. data/lib/{generated → 2015-08-19/generated}/azure_mgmt_search/models/search_service_status.rb +1 -1
  14. data/lib/{generated → 2015-08-19/generated}/azure_mgmt_search/models/sku.rb +1 -1
  15. data/lib/{generated → 2015-08-19/generated}/azure_mgmt_search/models/sku_name.rb +1 -1
  16. data/lib/{generated → 2015-08-19/generated}/azure_mgmt_search/models/unavailable_name_reason.rb +1 -1
  17. data/lib/{generated → 2015-08-19/generated}/azure_mgmt_search/module_definition.rb +3 -2
  18. data/lib/{generated → 2015-08-19/generated}/azure_mgmt_search/query_keys.rb +3 -3
  19. data/lib/{generated → 2015-08-19/generated}/azure_mgmt_search/search_management_client.rb +3 -3
  20. data/lib/{generated → 2015-08-19/generated}/azure_mgmt_search/services.rb +9 -9
  21. data/lib/{generated → 2015-08-19/generated}/azure_mgmt_search/version.rb +2 -2
  22. data/lib/{generated → 2015-08-19/generated}/azure_mgmt_search.rb +20 -20
  23. data/lib/azure_mgmt_search.rb +2 -1
  24. data/lib/module_definition.rb +7 -0
  25. data/lib/profiles/common/configurable.rb +73 -0
  26. data/lib/profiles/common/default.rb +68 -0
  27. data/lib/profiles/latest/modules/search_profile_module.rb +102 -0
  28. data/lib/profiles/latest/search_latest_profile_client.rb +33 -0
  29. data/lib/profiles/latest/search_module_definition.rb +9 -0
  30. data/lib/version.rb +7 -0
  31. metadata +30 -23
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ef9db060eb907c5e699e5dcacd1cc8f3edf33f9c
4
- data.tar.gz: cfac564dfb1587e495e92d4036995664a88b8487
3
+ metadata.gz: c3be57377bc32d8da37ed6f3b9304fb622469fab
4
+ data.tar.gz: 8da906e67d5b176d44afef2cf662ea6ed278a092
5
5
  SHA512:
6
- metadata.gz: 9b109de31b8f7f690c795d91c6dd2d20f1589ce13c0f693cc67a4e88aa0f230e0892ca1bc6bd5e719915a310b1a614aa6fa6cc50179db9c9df171ad0e2a34b40
7
- data.tar.gz: ea1fca7cf0185f05f2f71929be5682c145f825a162cfe783a387f9c6c68fd8609374829987dc403ab8c58df7c0536d744be827a8c3576df931ed5d009e047373
6
+ metadata.gz: 0fa936df49d18908df30fa95e37468cb8610fbd2fa3b33c84c6f5a98526d89adcdb9e16d02324dce8713cdc46531c48229d3fff149be38786b880cee099879b3
7
+ data.tar.gz: 5cb3806402f95234d88e768be300549c0afad4aab7ef1317b9d84b447c5c49529f618b9034f7f716d2f58e71488b3286b03959062dd35c6073d6fdaa5bd6777a
@@ -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::Search
6
+ module Azure::Search::Mgmt::V2015_08_19
7
7
  #
8
8
  # Client that can be used to manage Azure Search services and API keys.
9
9
  #
@@ -122,7 +122,7 @@ module Azure::ARM::Search
122
122
  if status_code == 200
123
123
  begin
124
124
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
125
- result_mapper = Azure::ARM::Search::Models::AdminKeyResult.mapper()
125
+ result_mapper = Azure::Search::Mgmt::V2015_08_19::Models::AdminKeyResult.mapper()
126
126
  result.body = @client.deserialize(result_mapper, parsed_response)
127
127
  rescue Exception => e
128
128
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -246,7 +246,7 @@ module Azure::ARM::Search
246
246
  if status_code == 200
247
247
  begin
248
248
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
249
- result_mapper = Azure::ARM::Search::Models::AdminKeyResult.mapper()
249
+ result_mapper = Azure::Search::Mgmt::V2015_08_19::Models::AdminKeyResult.mapper()
250
250
  result.body = @client.deserialize(result_mapper, parsed_response)
251
251
  rescue Exception => e
252
252
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -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::Search
6
+ module Azure::Search::Mgmt::V2015_08_19
7
7
  module Models
8
8
  #
9
9
  # Defines values for AdminKeyKind
@@ -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::Search
6
+ module Azure::Search::Mgmt::V2015_08_19
7
7
  module Models
8
8
  #
9
9
  # Response containing the primary and secondary admin API keys for a given
@@ -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::Search
6
+ module Azure::Search::Mgmt::V2015_08_19
7
7
  module Models
8
8
  #
9
9
  # Input of check name availability API.
@@ -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::Search
6
+ module Azure::Search::Mgmt::V2015_08_19
7
7
  module Models
8
8
  #
9
9
  # Output of check name availability API.
@@ -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::Search
6
+ module Azure::Search::Mgmt::V2015_08_19
7
7
  module Models
8
8
  #
9
9
  # Defines values for HostingMode
@@ -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::Search
6
+ module Azure::Search::Mgmt::V2015_08_19
7
7
  module Models
8
8
  #
9
9
  # Defines values for ProvisioningState
@@ -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::Search
6
+ module Azure::Search::Mgmt::V2015_08_19
7
7
  module Models
8
8
  #
9
9
  # Describes an API key for a given Azure Search service that has
@@ -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::Search
6
+ module Azure::Search::Mgmt::V2015_08_19
7
7
  module Models
8
8
  #
9
9
  # Base type for all Azure resources.
@@ -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::Search
6
+ module Azure::Search::Mgmt::V2015_08_19
7
7
  module Models
8
8
  #
9
9
  # Additional parameters for a set of operations.
@@ -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::Search
6
+ module Azure::Search::Mgmt::V2015_08_19
7
7
  module Models
8
8
  #
9
9
  # Describes an Azure Search service and its current state.
@@ -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::Search
6
+ module Azure::Search::Mgmt::V2015_08_19
7
7
  module Models
8
8
  #
9
9
  # Defines values for SearchServiceStatus
@@ -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::Search
6
+ module Azure::Search::Mgmt::V2015_08_19
7
7
  module Models
8
8
  #
9
9
  # Defines the SKU of an Azure Search Service, which determines price tier
@@ -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::Search
6
+ module Azure::Search::Mgmt::V2015_08_19
7
7
  module Models
8
8
  #
9
9
  # Defines values for SkuName
@@ -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::Search
6
+ module Azure::Search::Mgmt::V2015_08_19
7
7
  module Models
8
8
  #
9
9
  # Defines values for UnavailableNameReason
@@ -4,5 +4,6 @@
4
4
  # regenerated.
5
5
 
6
6
  module Azure end
7
- module Azure::ARM end
8
- module Azure::ARM::Search end
7
+ module Azure::Search end
8
+ module Azure::Search::Mgmt end
9
+ module Azure::Search::Mgmt::V2015_08_19 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::Search
6
+ module Azure::Search::Mgmt::V2015_08_19
7
7
  #
8
8
  # Client that can be used to manage Azure Search services and API keys.
9
9
  #
@@ -126,7 +126,7 @@ module Azure::ARM::Search
126
126
  if status_code == 200
127
127
  begin
128
128
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
129
- result_mapper = Azure::ARM::Search::Models::QueryKey.mapper()
129
+ result_mapper = Azure::Search::Mgmt::V2015_08_19::Models::QueryKey.mapper()
130
130
  result.body = @client.deserialize(result_mapper, parsed_response)
131
131
  rescue Exception => e
132
132
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -237,7 +237,7 @@ module Azure::ARM::Search
237
237
  if status_code == 200
238
238
  begin
239
239
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
240
- result_mapper = Azure::ARM::Search::Models::ListQueryKeysResult.mapper()
240
+ result_mapper = Azure::Search::Mgmt::V2015_08_19::Models::ListQueryKeysResult.mapper()
241
241
  result.body = @client.deserialize(result_mapper, parsed_response)
242
242
  rescue Exception => e
243
243
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -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::Search
6
+ module Azure::Search::Mgmt::V2015_08_19
7
7
  #
8
8
  # A service client - single point of access to the REST API.
9
9
  #
@@ -131,8 +131,8 @@ module Azure::ARM::Search
131
131
  #
132
132
  def add_telemetry
133
133
  sdk_information = 'azure_mgmt_search'
134
- if defined? Azure::ARM::Search::VERSION
135
- sdk_information = "#{sdk_information}/#{Azure::ARM::Search::VERSION}"
134
+ if defined? Azure::Search::Mgmt::V2015_08_19::VERSION
135
+ sdk_information = "#{sdk_information}/#{Azure::Search::Mgmt::V2015_08_19::VERSION}"
136
136
  end
137
137
  add_user_agent_information(sdk_information)
138
138
  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::Search
6
+ module Azure::Search::Mgmt::V2015_08_19
7
7
  #
8
8
  # Client that can be used to manage Azure Search services and API keys.
9
9
  #
@@ -78,7 +78,7 @@ module Azure::ARM::Search
78
78
  promise = promise.then do |response|
79
79
  # Defining deserialization method.
80
80
  deserialize_method = lambda do |parsed_response|
81
- result_mapper = Azure::ARM::Search::Models::SearchService.mapper()
81
+ result_mapper = Azure::Search::Mgmt::V2015_08_19::Models::SearchService.mapper()
82
82
  parsed_response = @client.deserialize(result_mapper, parsed_response)
83
83
  end
84
84
 
@@ -187,7 +187,7 @@ module Azure::ARM::Search
187
187
  if status_code == 200
188
188
  begin
189
189
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
190
- result_mapper = Azure::ARM::Search::Models::SearchService.mapper()
190
+ result_mapper = Azure::Search::Mgmt::V2015_08_19::Models::SearchService.mapper()
191
191
  result.body = @client.deserialize(result_mapper, parsed_response)
192
192
  rescue Exception => e
193
193
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -394,7 +394,7 @@ module Azure::ARM::Search
394
394
  if status_code == 200
395
395
  begin
396
396
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
397
- result_mapper = Azure::ARM::Search::Models::SearchServiceListResult.mapper()
397
+ result_mapper = Azure::Search::Mgmt::V2015_08_19::Models::SearchServiceListResult.mapper()
398
398
  result.body = @client.deserialize(result_mapper, parsed_response)
399
399
  rescue Exception => e
400
400
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -488,7 +488,7 @@ module Azure::ARM::Search
488
488
  request_headers['Content-Type'] = 'application/json; charset=utf-8'
489
489
 
490
490
  # Serialize Request
491
- request_mapper = Azure::ARM::Search::Models::CheckNameAvailabilityInput.mapper()
491
+ request_mapper = Azure::Search::Mgmt::V2015_08_19::Models::CheckNameAvailabilityInput.mapper()
492
492
  request_content = @client.serialize(request_mapper, check_name_availability_input)
493
493
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
494
494
 
@@ -520,7 +520,7 @@ module Azure::ARM::Search
520
520
  if status_code == 200
521
521
  begin
522
522
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
523
- result_mapper = Azure::ARM::Search::Models::CheckNameAvailabilityOutput.mapper()
523
+ result_mapper = Azure::Search::Mgmt::V2015_08_19::Models::CheckNameAvailabilityOutput.mapper()
524
524
  result.body = @client.deserialize(result_mapper, parsed_response)
525
525
  rescue Exception => e
526
526
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -636,7 +636,7 @@ module Azure::ARM::Search
636
636
  request_headers['Content-Type'] = 'application/json; charset=utf-8'
637
637
 
638
638
  # Serialize Request
639
- request_mapper = Azure::ARM::Search::Models::SearchService.mapper()
639
+ request_mapper = Azure::Search::Mgmt::V2015_08_19::Models::SearchService.mapper()
640
640
  request_content = @client.serialize(request_mapper, service)
641
641
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
642
642
 
@@ -668,7 +668,7 @@ module Azure::ARM::Search
668
668
  if status_code == 200
669
669
  begin
670
670
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
671
- result_mapper = Azure::ARM::Search::Models::SearchService.mapper()
671
+ result_mapper = Azure::Search::Mgmt::V2015_08_19::Models::SearchService.mapper()
672
672
  result.body = @client.deserialize(result_mapper, parsed_response)
673
673
  rescue Exception => e
674
674
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
@@ -678,7 +678,7 @@ module Azure::ARM::Search
678
678
  if status_code == 201
679
679
  begin
680
680
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
681
- result_mapper = Azure::ARM::Search::Models::SearchService.mapper()
681
+ result_mapper = Azure::Search::Mgmt::V2015_08_19::Models::SearchService.mapper()
682
682
  result.body = @client.deserialize(result_mapper, parsed_response)
683
683
  rescue Exception => e
684
684
  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::Search
7
- VERSION = '0.14.0'
6
+ module Azure::Search::Mgmt::V2015_08_19
7
+ VERSION = '0.15.0'
8
8
  end
@@ -16,29 +16,29 @@ require 'faraday'
16
16
  require 'faraday-cookie_jar'
17
17
  require 'concurrent'
18
18
  require 'ms_rest'
19
- require 'generated/azure_mgmt_search/module_definition'
19
+ require '2015-08-19/generated/azure_mgmt_search/module_definition'
20
20
  require 'ms_rest_azure'
21
21
 
22
- module Azure::ARM::Search
23
- autoload :AdminKeys, 'generated/azure_mgmt_search/admin_keys.rb'
24
- autoload :QueryKeys, 'generated/azure_mgmt_search/query_keys.rb'
25
- autoload :Services, 'generated/azure_mgmt_search/services.rb'
26
- autoload :SearchManagementClient, 'generated/azure_mgmt_search/search_management_client.rb'
22
+ module Azure::Search::Mgmt::V2015_08_19
23
+ autoload :AdminKeys, '2015-08-19/generated/azure_mgmt_search/admin_keys.rb'
24
+ autoload :QueryKeys, '2015-08-19/generated/azure_mgmt_search/query_keys.rb'
25
+ autoload :Services, '2015-08-19/generated/azure_mgmt_search/services.rb'
26
+ autoload :SearchManagementClient, '2015-08-19/generated/azure_mgmt_search/search_management_client.rb'
27
27
 
28
28
  module Models
29
- autoload :Sku, 'generated/azure_mgmt_search/models/sku.rb'
30
- autoload :CheckNameAvailabilityInput, 'generated/azure_mgmt_search/models/check_name_availability_input.rb'
31
- autoload :SearchManagementRequestOptions, 'generated/azure_mgmt_search/models/search_management_request_options.rb'
32
- autoload :AdminKeyResult, 'generated/azure_mgmt_search/models/admin_key_result.rb'
33
- autoload :Resource, 'generated/azure_mgmt_search/models/resource.rb'
34
- autoload :QueryKey, 'generated/azure_mgmt_search/models/query_key.rb'
35
- autoload :CheckNameAvailabilityOutput, 'generated/azure_mgmt_search/models/check_name_availability_output.rb'
36
- autoload :SearchService, 'generated/azure_mgmt_search/models/search_service.rb'
37
- autoload :UnavailableNameReason, 'generated/azure_mgmt_search/models/unavailable_name_reason.rb'
38
- autoload :SkuName, 'generated/azure_mgmt_search/models/sku_name.rb'
39
- autoload :HostingMode, 'generated/azure_mgmt_search/models/hosting_mode.rb'
40
- autoload :SearchServiceStatus, 'generated/azure_mgmt_search/models/search_service_status.rb'
41
- autoload :ProvisioningState, 'generated/azure_mgmt_search/models/provisioning_state.rb'
42
- autoload :AdminKeyKind, 'generated/azure_mgmt_search/models/admin_key_kind.rb'
29
+ autoload :Sku, '2015-08-19/generated/azure_mgmt_search/models/sku.rb'
30
+ autoload :CheckNameAvailabilityInput, '2015-08-19/generated/azure_mgmt_search/models/check_name_availability_input.rb'
31
+ autoload :SearchManagementRequestOptions, '2015-08-19/generated/azure_mgmt_search/models/search_management_request_options.rb'
32
+ autoload :AdminKeyResult, '2015-08-19/generated/azure_mgmt_search/models/admin_key_result.rb'
33
+ autoload :Resource, '2015-08-19/generated/azure_mgmt_search/models/resource.rb'
34
+ autoload :QueryKey, '2015-08-19/generated/azure_mgmt_search/models/query_key.rb'
35
+ autoload :CheckNameAvailabilityOutput, '2015-08-19/generated/azure_mgmt_search/models/check_name_availability_output.rb'
36
+ autoload :SearchService, '2015-08-19/generated/azure_mgmt_search/models/search_service.rb'
37
+ autoload :UnavailableNameReason, '2015-08-19/generated/azure_mgmt_search/models/unavailable_name_reason.rb'
38
+ autoload :SkuName, '2015-08-19/generated/azure_mgmt_search/models/sku_name.rb'
39
+ autoload :HostingMode, '2015-08-19/generated/azure_mgmt_search/models/hosting_mode.rb'
40
+ autoload :SearchServiceStatus, '2015-08-19/generated/azure_mgmt_search/models/search_service_status.rb'
41
+ autoload :ProvisioningState, '2015-08-19/generated/azure_mgmt_search/models/provisioning_state.rb'
42
+ autoload :AdminKeyKind, '2015-08-19/generated/azure_mgmt_search/models/admin_key_kind.rb'
43
43
  end
44
44
  end
@@ -2,4 +2,5 @@
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_search'
5
+ require '2015-08-19/generated/azure_mgmt_search'
6
+ require 'profiles/latest/search_latest_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::Search end
7
+ module Azure::Search::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,102 @@
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_search'
6
+
7
+ module Azure::Search::Profiles::Latest::Mgmt
8
+ AdminKeys = Azure::Search::Mgmt::V2015_08_19::AdminKeys
9
+ QueryKeys = Azure::Search::Mgmt::V2015_08_19::QueryKeys
10
+ Services = Azure::Search::Mgmt::V2015_08_19::Services
11
+
12
+ module Models
13
+ Sku = Azure::Search::Mgmt::V2015_08_19::Models::Sku
14
+ CheckNameAvailabilityInput = Azure::Search::Mgmt::V2015_08_19::Models::CheckNameAvailabilityInput
15
+ SearchManagementRequestOptions = Azure::Search::Mgmt::V2015_08_19::Models::SearchManagementRequestOptions
16
+ AdminKeyResult = Azure::Search::Mgmt::V2015_08_19::Models::AdminKeyResult
17
+ Resource = Azure::Search::Mgmt::V2015_08_19::Models::Resource
18
+ QueryKey = Azure::Search::Mgmt::V2015_08_19::Models::QueryKey
19
+ CheckNameAvailabilityOutput = Azure::Search::Mgmt::V2015_08_19::Models::CheckNameAvailabilityOutput
20
+ SearchService = Azure::Search::Mgmt::V2015_08_19::Models::SearchService
21
+ UnavailableNameReason = Azure::Search::Mgmt::V2015_08_19::Models::UnavailableNameReason
22
+ SkuName = Azure::Search::Mgmt::V2015_08_19::Models::SkuName
23
+ HostingMode = Azure::Search::Mgmt::V2015_08_19::Models::HostingMode
24
+ SearchServiceStatus = Azure::Search::Mgmt::V2015_08_19::Models::SearchServiceStatus
25
+ ProvisioningState = Azure::Search::Mgmt::V2015_08_19::Models::ProvisioningState
26
+ AdminKeyKind = Azure::Search::Mgmt::V2015_08_19::Models::AdminKeyKind
27
+ end
28
+
29
+ #
30
+ # Search
31
+ #
32
+ class SearchClass
33
+ attr_reader :admin_keys, :query_keys, :services, :configurable, :base_url, :options, :model_classes
34
+
35
+ def initialize(options = {})
36
+ if options.is_a?(Hash) && options.length == 0
37
+ @options = setup_options
38
+ else
39
+ @options = options
40
+ end
41
+
42
+ reset!(options)
43
+
44
+ @configurable, @base_url, @options = self, nil, nil
45
+
46
+ client_0 = Azure::Search::Mgmt::V2015_08_19::SearchManagementClient.new(configurable.credentials, base_url, options)
47
+ if(client_0.respond_to?(:subscription_id))
48
+ client_0.subscription_id = configurable.subscription_id
49
+ end
50
+ @admin_keys = client_0.admin_keys
51
+ @query_keys = client_0.query_keys
52
+ @services = client_0.services
53
+
54
+ @model_classes = ModelClasses.new
55
+ end
56
+
57
+ class ModelClasses
58
+ def sku
59
+ Azure::Search::Mgmt::V2015_08_19::Models::Sku
60
+ end
61
+ def check_name_availability_input
62
+ Azure::Search::Mgmt::V2015_08_19::Models::CheckNameAvailabilityInput
63
+ end
64
+ def search_management_request_options
65
+ Azure::Search::Mgmt::V2015_08_19::Models::SearchManagementRequestOptions
66
+ end
67
+ def admin_key_result
68
+ Azure::Search::Mgmt::V2015_08_19::Models::AdminKeyResult
69
+ end
70
+ def resource
71
+ Azure::Search::Mgmt::V2015_08_19::Models::Resource
72
+ end
73
+ def query_key
74
+ Azure::Search::Mgmt::V2015_08_19::Models::QueryKey
75
+ end
76
+ def check_name_availability_output
77
+ Azure::Search::Mgmt::V2015_08_19::Models::CheckNameAvailabilityOutput
78
+ end
79
+ def search_service
80
+ Azure::Search::Mgmt::V2015_08_19::Models::SearchService
81
+ end
82
+ def unavailable_name_reason
83
+ Azure::Search::Mgmt::V2015_08_19::Models::UnavailableNameReason
84
+ end
85
+ def sku_name
86
+ Azure::Search::Mgmt::V2015_08_19::Models::SkuName
87
+ end
88
+ def hosting_mode
89
+ Azure::Search::Mgmt::V2015_08_19::Models::HostingMode
90
+ end
91
+ def search_service_status
92
+ Azure::Search::Mgmt::V2015_08_19::Models::SearchServiceStatus
93
+ end
94
+ def provisioning_state
95
+ Azure::Search::Mgmt::V2015_08_19::Models::ProvisioningState
96
+ end
97
+ def admin_key_kind
98
+ Azure::Search::Mgmt::V2015_08_19::Models::AdminKeyKind
99
+ end
100
+ end
101
+ end
102
+ 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/search_module_definition'
6
+ require 'profiles/latest/modules/search_profile_module'
7
+ require 'profiles/common/configurable'
8
+ require 'profiles/common/default'
9
+
10
+ module Azure::Search::Profiles::Latest::Mgmt
11
+ #
12
+ # Client class for the Latest profile SDK.
13
+ #
14
+ class Client < SearchClass
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::Search end
7
+ module Azure::Search::Profiles end
8
+ module Azure::Search::Profiles::Latest end
9
+ module Azure::Search::Profiles::Latest::Mgmt 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::Search::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_search
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,28 +87,35 @@ extensions: []
87
87
  extra_rdoc_files: []
88
88
  files:
89
89
  - LICENSE.txt
90
+ - lib/2015-08-19/generated/azure_mgmt_search.rb
91
+ - lib/2015-08-19/generated/azure_mgmt_search/admin_keys.rb
92
+ - lib/2015-08-19/generated/azure_mgmt_search/models/admin_key_kind.rb
93
+ - lib/2015-08-19/generated/azure_mgmt_search/models/admin_key_result.rb
94
+ - lib/2015-08-19/generated/azure_mgmt_search/models/check_name_availability_input.rb
95
+ - lib/2015-08-19/generated/azure_mgmt_search/models/check_name_availability_output.rb
96
+ - lib/2015-08-19/generated/azure_mgmt_search/models/hosting_mode.rb
97
+ - lib/2015-08-19/generated/azure_mgmt_search/models/provisioning_state.rb
98
+ - lib/2015-08-19/generated/azure_mgmt_search/models/query_key.rb
99
+ - lib/2015-08-19/generated/azure_mgmt_search/models/resource.rb
100
+ - lib/2015-08-19/generated/azure_mgmt_search/models/search_management_request_options.rb
101
+ - lib/2015-08-19/generated/azure_mgmt_search/models/search_service.rb
102
+ - lib/2015-08-19/generated/azure_mgmt_search/models/search_service_status.rb
103
+ - lib/2015-08-19/generated/azure_mgmt_search/models/sku.rb
104
+ - lib/2015-08-19/generated/azure_mgmt_search/models/sku_name.rb
105
+ - lib/2015-08-19/generated/azure_mgmt_search/models/unavailable_name_reason.rb
106
+ - lib/2015-08-19/generated/azure_mgmt_search/module_definition.rb
107
+ - lib/2015-08-19/generated/azure_mgmt_search/query_keys.rb
108
+ - lib/2015-08-19/generated/azure_mgmt_search/search_management_client.rb
109
+ - lib/2015-08-19/generated/azure_mgmt_search/services.rb
110
+ - lib/2015-08-19/generated/azure_mgmt_search/version.rb
90
111
  - lib/azure_mgmt_search.rb
91
- - lib/generated/azure_mgmt_search.rb
92
- - lib/generated/azure_mgmt_search/admin_keys.rb
93
- - lib/generated/azure_mgmt_search/models/admin_key_kind.rb
94
- - lib/generated/azure_mgmt_search/models/admin_key_result.rb
95
- - lib/generated/azure_mgmt_search/models/check_name_availability_input.rb
96
- - lib/generated/azure_mgmt_search/models/check_name_availability_output.rb
97
- - lib/generated/azure_mgmt_search/models/hosting_mode.rb
98
- - lib/generated/azure_mgmt_search/models/provisioning_state.rb
99
- - lib/generated/azure_mgmt_search/models/query_key.rb
100
- - lib/generated/azure_mgmt_search/models/resource.rb
101
- - lib/generated/azure_mgmt_search/models/search_management_request_options.rb
102
- - lib/generated/azure_mgmt_search/models/search_service.rb
103
- - lib/generated/azure_mgmt_search/models/search_service_status.rb
104
- - lib/generated/azure_mgmt_search/models/sku.rb
105
- - lib/generated/azure_mgmt_search/models/sku_name.rb
106
- - lib/generated/azure_mgmt_search/models/unavailable_name_reason.rb
107
- - lib/generated/azure_mgmt_search/module_definition.rb
108
- - lib/generated/azure_mgmt_search/query_keys.rb
109
- - lib/generated/azure_mgmt_search/search_management_client.rb
110
- - lib/generated/azure_mgmt_search/services.rb
111
- - lib/generated/azure_mgmt_search/version.rb
112
+ - lib/module_definition.rb
113
+ - lib/profiles/common/configurable.rb
114
+ - lib/profiles/common/default.rb
115
+ - lib/profiles/latest/modules/search_profile_module.rb
116
+ - lib/profiles/latest/search_latest_profile_client.rb
117
+ - lib/profiles/latest/search_module_definition.rb
118
+ - lib/version.rb
112
119
  homepage: https://aka.ms/azure-sdk-for-ruby
113
120
  licenses:
114
121
  - MIT