azure_mgmt_search 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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0fb3bfd696da3f4fd4bf5f6d5fd86d3605f52907
4
- data.tar.gz: c7bff0c23cff1e77d5527069c3d7611985b1561f
3
+ metadata.gz: 22cdcd1536bcd745cab2e8a92ab061ae46c7810c
4
+ data.tar.gz: cac4708bbd8f3b67915220e60fde682520ef5de6
5
5
  SHA512:
6
- metadata.gz: a89e278811da514fb440621691855cf007e2eee41c45135ceeb9e8ee613d4df37a2d141888981fc1f351819fc35bd020fccb716b8bf776ee4f991fbada4cbcff
7
- data.tar.gz: e2e70525fee3e11ac326e890243b066ac20a2cd1569c8f79b98737eb394cdedc3238f769a624558529f4fd9e11e9a4be8127d99aae75ea13036cda6bfe01e2ad
6
+ metadata.gz: 88129af013d69dcf66c5f17e1838441694267a6ccda252d845a008b5cde8875be7f47295661c835cf5ed5de4e13107f9621a9cdfe012889f3699625001b2c1ae
7
+ data.tar.gz: 8f05c2a9fe4c1fd39ace19b253af24aaf3f0cba383fbb320be95f7c35d7972c04524760e0a7da11f044c9dfd34b45e521f155996a2bd3d5fce970f83703ff02a
@@ -20,19 +20,23 @@ require '2015-08-19/generated/azure_mgmt_search/module_definition'
20
20
  require 'ms_rest_azure'
21
21
 
22
22
  module Azure::Search::Mgmt::V2015_08_19
23
+ autoload :Operations, '2015-08-19/generated/azure_mgmt_search/operations.rb'
23
24
  autoload :AdminKeys, '2015-08-19/generated/azure_mgmt_search/admin_keys.rb'
24
25
  autoload :QueryKeys, '2015-08-19/generated/azure_mgmt_search/query_keys.rb'
25
26
  autoload :Services, '2015-08-19/generated/azure_mgmt_search/services.rb'
26
27
  autoload :SearchManagementClient, '2015-08-19/generated/azure_mgmt_search/search_management_client.rb'
27
28
 
28
29
  module Models
29
- autoload :Sku, '2015-08-19/generated/azure_mgmt_search/models/sku.rb'
30
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
31
  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'
32
+ autoload :AdminKeyResult, '2015-08-19/generated/azure_mgmt_search/models/admin_key_result.rb'
33
+ autoload :SearchManagementRequestOptions, '2015-08-19/generated/azure_mgmt_search/models/search_management_request_options.rb'
35
34
  autoload :CheckNameAvailabilityOutput, '2015-08-19/generated/azure_mgmt_search/models/check_name_availability_output.rb'
35
+ autoload :OperationDisplay, '2015-08-19/generated/azure_mgmt_search/models/operation_display.rb'
36
+ autoload :Sku, '2015-08-19/generated/azure_mgmt_search/models/sku.rb'
37
+ autoload :Operation, '2015-08-19/generated/azure_mgmt_search/models/operation.rb'
38
+ autoload :QueryKey, '2015-08-19/generated/azure_mgmt_search/models/query_key.rb'
39
+ autoload :OperationListResult, '2015-08-19/generated/azure_mgmt_search/models/operation_list_result.rb'
36
40
  autoload :SearchService, '2015-08-19/generated/azure_mgmt_search/models/search_service.rb'
37
41
  autoload :UnavailableNameReason, '2015-08-19/generated/azure_mgmt_search/models/unavailable_name_reason.rb'
38
42
  autoload :SkuName, '2015-08-19/generated/azure_mgmt_search/models/sku_name.rb'
@@ -37,8 +37,8 @@ module Azure::Search::Mgmt::V2015_08_19
37
37
  #
38
38
  # @return [AdminKeyResult] operation results.
39
39
  #
40
- def get(resource_group_name, search_service_name, search_management_request_options = nil, custom_headers = nil)
41
- response = get_async(resource_group_name, search_service_name, search_management_request_options, custom_headers).value!
40
+ def get(resource_group_name, search_service_name, search_management_request_options:nil, custom_headers:nil)
41
+ response = get_async(resource_group_name, search_service_name, search_management_request_options:search_management_request_options, custom_headers:custom_headers).value!
42
42
  response.body unless response.nil?
43
43
  end
44
44
 
@@ -58,8 +58,8 @@ module Azure::Search::Mgmt::V2015_08_19
58
58
  #
59
59
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
60
60
  #
61
- def get_with_http_info(resource_group_name, search_service_name, search_management_request_options = nil, custom_headers = nil)
62
- get_async(resource_group_name, search_service_name, search_management_request_options, custom_headers).value!
61
+ def get_with_http_info(resource_group_name, search_service_name, search_management_request_options:nil, custom_headers:nil)
62
+ get_async(resource_group_name, search_service_name, search_management_request_options:search_management_request_options, custom_headers:custom_headers).value!
63
63
  end
64
64
 
65
65
  #
@@ -78,7 +78,7 @@ module Azure::Search::Mgmt::V2015_08_19
78
78
  #
79
79
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
80
80
  #
81
- def get_async(resource_group_name, search_service_name, search_management_request_options = nil, custom_headers = nil)
81
+ def get_async(resource_group_name, search_service_name, search_management_request_options:nil, custom_headers:nil)
82
82
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
83
83
  fail ArgumentError, 'search_service_name is nil' if search_service_name.nil?
84
84
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
@@ -90,6 +90,7 @@ module Azure::Search::Mgmt::V2015_08_19
90
90
  end
91
91
 
92
92
  request_headers = {}
93
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
93
94
 
94
95
  # Set Headers
95
96
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -154,8 +155,8 @@ module Azure::Search::Mgmt::V2015_08_19
154
155
  #
155
156
  # @return [AdminKeyResult] operation results.
156
157
  #
157
- def regenerate(resource_group_name, search_service_name, key_kind, search_management_request_options = nil, custom_headers = nil)
158
- response = regenerate_async(resource_group_name, search_service_name, key_kind, search_management_request_options, custom_headers).value!
158
+ def regenerate(resource_group_name, search_service_name, key_kind, search_management_request_options:nil, custom_headers:nil)
159
+ response = regenerate_async(resource_group_name, search_service_name, key_kind, search_management_request_options:search_management_request_options, custom_headers:custom_headers).value!
159
160
  response.body unless response.nil?
160
161
  end
161
162
 
@@ -178,8 +179,8 @@ module Azure::Search::Mgmt::V2015_08_19
178
179
  #
179
180
  # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
180
181
  #
181
- def regenerate_with_http_info(resource_group_name, search_service_name, key_kind, search_management_request_options = nil, custom_headers = nil)
182
- regenerate_async(resource_group_name, search_service_name, key_kind, search_management_request_options, custom_headers).value!
182
+ def regenerate_with_http_info(resource_group_name, search_service_name, key_kind, search_management_request_options:nil, custom_headers:nil)
183
+ regenerate_async(resource_group_name, search_service_name, key_kind, search_management_request_options:search_management_request_options, custom_headers:custom_headers).value!
183
184
  end
184
185
 
185
186
  #
@@ -201,7 +202,7 @@ module Azure::Search::Mgmt::V2015_08_19
201
202
  #
202
203
  # @return [Concurrent::Promise] Promise object which holds the HTTP response.
203
204
  #
204
- def regenerate_async(resource_group_name, search_service_name, key_kind, search_management_request_options = nil, custom_headers = nil)
205
+ def regenerate_async(resource_group_name, search_service_name, key_kind, search_management_request_options:nil, custom_headers:nil)
205
206
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
206
207
  fail ArgumentError, 'search_service_name is nil' if search_service_name.nil?
207
208
  fail ArgumentError, 'key_kind is nil' if key_kind.nil?
@@ -214,6 +215,7 @@ module Azure::Search::Mgmt::V2015_08_19
214
215
  end
215
216
 
216
217
  request_headers = {}
218
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
217
219
 
218
220
  # Set Headers
219
221
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
@@ -0,0 +1,61 @@
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::Search::Mgmt::V2015_08_19
7
+ module Models
8
+ #
9
+ # Describes a REST API operation.
10
+ #
11
+ class Operation
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] The name of the operation. This name is of the form
16
+ # {provider}/{resource}/{operation}.
17
+ attr_accessor :name
18
+
19
+ # @return [OperationDisplay] The object that describes the operation.
20
+ attr_accessor :display
21
+
22
+
23
+ #
24
+ # Mapper for Operation class as Ruby Hash.
25
+ # This will be used for serialization/deserialization.
26
+ #
27
+ def self.mapper()
28
+ {
29
+ client_side_validation: true,
30
+ required: false,
31
+ serialized_name: 'Operation',
32
+ type: {
33
+ name: 'Composite',
34
+ class_name: 'Operation',
35
+ model_properties: {
36
+ name: {
37
+ client_side_validation: true,
38
+ required: false,
39
+ read_only: true,
40
+ serialized_name: 'name',
41
+ type: {
42
+ name: 'String'
43
+ }
44
+ },
45
+ display: {
46
+ client_side_validation: true,
47
+ required: false,
48
+ read_only: true,
49
+ serialized_name: 'display',
50
+ type: {
51
+ name: 'Composite',
52
+ class_name: 'OperationDisplay'
53
+ }
54
+ }
55
+ }
56
+ }
57
+ }
58
+ end
59
+ end
60
+ end
61
+ end
@@ -0,0 +1,84 @@
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::Search::Mgmt::V2015_08_19
7
+ module Models
8
+ #
9
+ # The object that describes the operation.
10
+ #
11
+ class OperationDisplay
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] The friendly name of the resource provider.
16
+ attr_accessor :provider
17
+
18
+ # @return [String] The operation type: read, write, delete,
19
+ # listKeys/action, etc.
20
+ attr_accessor :operation
21
+
22
+ # @return [String] The resource type on which the operation is performed.
23
+ attr_accessor :resource
24
+
25
+ # @return [String] The friendly name of the operation.
26
+ attr_accessor :description
27
+
28
+
29
+ #
30
+ # Mapper for OperationDisplay class as Ruby Hash.
31
+ # This will be used for serialization/deserialization.
32
+ #
33
+ def self.mapper()
34
+ {
35
+ client_side_validation: true,
36
+ required: false,
37
+ serialized_name: 'Operation_display',
38
+ type: {
39
+ name: 'Composite',
40
+ class_name: 'OperationDisplay',
41
+ model_properties: {
42
+ provider: {
43
+ client_side_validation: true,
44
+ required: false,
45
+ read_only: true,
46
+ serialized_name: 'provider',
47
+ type: {
48
+ name: 'String'
49
+ }
50
+ },
51
+ operation: {
52
+ client_side_validation: true,
53
+ required: false,
54
+ read_only: true,
55
+ serialized_name: 'operation',
56
+ type: {
57
+ name: 'String'
58
+ }
59
+ },
60
+ resource: {
61
+ client_side_validation: true,
62
+ required: false,
63
+ read_only: true,
64
+ serialized_name: 'resource',
65
+ type: {
66
+ name: 'String'
67
+ }
68
+ },
69
+ description: {
70
+ client_side_validation: true,
71
+ required: false,
72
+ read_only: true,
73
+ serialized_name: 'description',
74
+ type: {
75
+ name: 'String'
76
+ }
77
+ }
78
+ }
79
+ }
80
+ }
81
+ end
82
+ end
83
+ end
84
+ end
@@ -0,0 +1,71 @@
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::Search::Mgmt::V2015_08_19
7
+ module Models
8
+ #
9
+ # The result of the request to list REST API operations. It contains a list
10
+ # of operations and a URL to get the next set of results.
11
+ #
12
+ class OperationListResult
13
+
14
+ include MsRestAzure
15
+
16
+ # @return [Array<Operation>] The list of operations supported by the
17
+ # resource provider.
18
+ attr_accessor :value
19
+
20
+ # @return [String] The URL to get the next set of operation list results,
21
+ # if any.
22
+ attr_accessor :next_link
23
+
24
+
25
+ #
26
+ # Mapper for OperationListResult class as Ruby Hash.
27
+ # This will be used for serialization/deserialization.
28
+ #
29
+ def self.mapper()
30
+ {
31
+ client_side_validation: true,
32
+ required: false,
33
+ serialized_name: 'OperationListResult',
34
+ type: {
35
+ name: 'Composite',
36
+ class_name: 'OperationListResult',
37
+ model_properties: {
38
+ value: {
39
+ client_side_validation: true,
40
+ required: false,
41
+ read_only: true,
42
+ serialized_name: 'value',
43
+ type: {
44
+ name: 'Sequence',
45
+ element: {
46
+ client_side_validation: true,
47
+ required: false,
48
+ serialized_name: 'OperationElementType',
49
+ type: {
50
+ name: 'Composite',
51
+ class_name: 'Operation'
52
+ }
53
+ }
54
+ }
55
+ },
56
+ next_link: {
57
+ client_side_validation: true,
58
+ required: false,
59
+ read_only: true,
60
+ serialized_name: 'nextLink',
61
+ type: {
62
+ name: 'String'
63
+ }
64
+ }
65
+ }
66
+ }
67
+ }
68
+ end
69
+ end
70
+ end
71
+ end
@@ -24,7 +24,8 @@ module Azure::Search::Mgmt::V2015_08_19
24
24
 
25
25
  # @return [String] The geographic location of the resource. This must be
26
26
  # one of the supported and registered Azure Geo Regions (for example,
27
- # West US, East US, Southeast Asia, and so forth).
27
+ # West US, East US, Southeast Asia, and so forth). This property is
28
+ # required when creating a new resource.
28
29
  attr_accessor :location
29
30
 
30
31
  # @return [Hash{String => String}] Tags to help categorize the resource
@@ -74,7 +75,7 @@ module Azure::Search::Mgmt::V2015_08_19
74
75
  },
75
76
  location: {
76
77
  client_side_validation: true,
77
- required: true,
78
+ required: false,
78
79
  serialized_name: 'location',
79
80
  type: {
80
81
  name: 'String'
@@ -68,7 +68,8 @@ module Azure::Search::Mgmt::V2015_08_19
68
68
  attr_accessor :provisioning_state
69
69
 
70
70
  # @return [Sku] The SKU of the Search Service, which determines price
71
- # tier and capacity limits.
71
+ # tier and capacity limits. This property is required when creating a new
72
+ # Search Service.
72
73
  attr_accessor :sku
73
74
 
74
75
 
@@ -114,7 +115,7 @@ module Azure::Search::Mgmt::V2015_08_19
114
115
  },
115
116
  location: {
116
117
  client_side_validation: true,
117
- required: true,
118
+ required: false,
118
119
  serialized_name: 'location',
119
120
  type: {
120
121
  name: 'String'
@@ -203,7 +204,7 @@ module Azure::Search::Mgmt::V2015_08_19
203
204
  },
204
205
  sku: {
205
206
  client_side_validation: true,
206
- required: true,
207
+ required: false,
207
208
  serialized_name: 'sku',
208
209
  type: {
209
210
  name: 'Composite',
@@ -0,0 +1,110 @@
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::Search::Mgmt::V2015_08_19
7
+ #
8
+ # Client that can be used to manage Azure Search services and API keys.
9
+ #
10
+ class Operations
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Operations class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [SearchManagementClient] reference to the SearchManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Lists all of the available REST API operations of the Microsoft.Search
26
+ # provider.
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 [OperationListResult] operation results.
32
+ #
33
+ def list(custom_headers:nil)
34
+ response = list_async(custom_headers:custom_headers).value!
35
+ response.body unless response.nil?
36
+ end
37
+
38
+ #
39
+ # Lists all of the available REST API operations of the Microsoft.Search
40
+ # provider.
41
+ #
42
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
43
+ # will be added to the HTTP request.
44
+ #
45
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
46
+ #
47
+ def list_with_http_info(custom_headers:nil)
48
+ list_async(custom_headers:custom_headers).value!
49
+ end
50
+
51
+ #
52
+ # Lists all of the available REST API operations of the Microsoft.Search
53
+ # provider.
54
+ #
55
+ # @param [Hash{String => String}] A hash of custom headers that will be added
56
+ # to the HTTP request.
57
+ #
58
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
59
+ #
60
+ def list_async(custom_headers:nil)
61
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
62
+
63
+
64
+ request_headers = {}
65
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
66
+
67
+ # Set Headers
68
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
69
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
70
+ path_template = 'providers/Microsoft.Search/operations'
71
+
72
+ request_url = @base_url || @client.base_url
73
+
74
+ options = {
75
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
76
+ query_params: {'api-version' => @client.api_version},
77
+ headers: request_headers.merge(custom_headers || {}),
78
+ base_url: request_url
79
+ }
80
+ promise = @client.make_request_async(:get, path_template, options)
81
+
82
+ promise = promise.then do |result|
83
+ http_response = result.response
84
+ status_code = http_response.status
85
+ response_content = http_response.body
86
+ unless status_code == 200
87
+ error_model = JSON.load(response_content)
88
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
89
+ end
90
+
91
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
92
+ # Deserialize Response
93
+ if status_code == 200
94
+ begin
95
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
96
+ result_mapper = Azure::Search::Mgmt::V2015_08_19::Models::OperationListResult.mapper()
97
+ result.body = @client.deserialize(result_mapper, parsed_response)
98
+ rescue Exception => e
99
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
100
+ end
101
+ end
102
+
103
+ result
104
+ end
105
+
106
+ promise.execute
107
+ end
108
+
109
+ end
110
+ end