azure_mgmt_search 0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. checksums.yaml +5 -13
  2. data/azure_mgmt_search.gemspec +4 -5
  3. data/lib/azure_mgmt_search.rb +3 -40
  4. data/lib/generated/azure_mgmt_search.rb +42 -0
  5. data/lib/{azure_mgmt_search → generated/azure_mgmt_search}/admin_keys.rb +4 -4
  6. data/lib/generated/azure_mgmt_search/models/admin_key_result.rb +57 -0
  7. data/lib/generated/azure_mgmt_search/models/list_query_keys_result.rb +53 -0
  8. data/lib/{azure_mgmt_search → generated/azure_mgmt_search}/models/provisioning_state.rb +0 -0
  9. data/lib/generated/azure_mgmt_search/models/query_key.rb +57 -0
  10. data/lib/generated/azure_mgmt_search/models/search_service_create_or_update_parameters.rb +73 -0
  11. data/lib/generated/azure_mgmt_search/models/search_service_list_result.rb +55 -0
  12. data/lib/generated/azure_mgmt_search/models/search_service_properties.rb +68 -0
  13. data/lib/generated/azure_mgmt_search/models/search_service_readable_properties.rb +107 -0
  14. data/lib/generated/azure_mgmt_search/models/search_service_resource.rb +96 -0
  15. data/lib/{azure_mgmt_search → generated/azure_mgmt_search}/models/search_service_status.rb +0 -0
  16. data/lib/generated/azure_mgmt_search/models/sku.rb +47 -0
  17. data/lib/{azure_mgmt_search → generated/azure_mgmt_search}/models/sku_type.rb +0 -0
  18. data/lib/{azure_mgmt_search → generated/azure_mgmt_search}/module_definition.rb +0 -0
  19. data/lib/{azure_mgmt_search → generated/azure_mgmt_search}/query_keys.rb +4 -4
  20. data/lib/{azure_mgmt_search → generated/azure_mgmt_search}/search_management_client.rb +5 -5
  21. data/lib/{azure_mgmt_search → generated/azure_mgmt_search}/services.rb +18 -18
  22. data/lib/{azure_mgmt_search → generated/azure_mgmt_search}/version.rb +1 -1
  23. metadata +40 -60
  24. data/lib/azure_mgmt_search/models/admin_key_result.rb +0 -66
  25. data/lib/azure_mgmt_search/models/list_query_keys_result.rb +0 -77
  26. data/lib/azure_mgmt_search/models/query_key.rb +0 -66
  27. data/lib/azure_mgmt_search/models/search_service_create_or_update_parameters.rb +0 -84
  28. data/lib/azure_mgmt_search/models/search_service_list_result.rb +0 -78
  29. data/lib/azure_mgmt_search/models/search_service_properties.rb +0 -85
  30. data/lib/azure_mgmt_search/models/search_service_readable_properties.rb +0 -124
  31. data/lib/azure_mgmt_search/models/search_service_resource.rb +0 -102
  32. data/lib/azure_mgmt_search/models/sku.rb +0 -61
@@ -0,0 +1,68 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::Search
7
+ module Models
8
+ #
9
+ # Defines properties of an Azure Search service that can be modified.
10
+ #
11
+ class SearchServiceProperties
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Sku] The SKU of the Search Service, which determines price
16
+ # tier and capacity limits.
17
+ attr_accessor :sku
18
+
19
+ # @return [Integer] The number of replicas in the Search service. If
20
+ # specified, it must be a value between 1 and 6 inclusive.
21
+ attr_accessor :replica_count
22
+
23
+ # @return [Integer] The number of partitions in the Search service; if
24
+ # specified, it can be 1, 2, 3, 4, 6, or 12.
25
+ attr_accessor :partition_count
26
+
27
+
28
+ #
29
+ # Mapper for SearchServiceProperties class as Ruby Hash.
30
+ # This will be used for serialization/deserialization.
31
+ #
32
+ def self.mapper()
33
+ {
34
+ required: false,
35
+ serialized_name: 'SearchServiceProperties',
36
+ type: {
37
+ name: 'Composite',
38
+ class_name: 'SearchServiceProperties',
39
+ model_properties: {
40
+ sku: {
41
+ required: false,
42
+ serialized_name: 'sku',
43
+ type: {
44
+ name: 'Composite',
45
+ class_name: 'Sku'
46
+ }
47
+ },
48
+ replica_count: {
49
+ required: false,
50
+ serialized_name: 'replicaCount',
51
+ type: {
52
+ name: 'Number'
53
+ }
54
+ },
55
+ partition_count: {
56
+ required: false,
57
+ serialized_name: 'partitionCount',
58
+ type: {
59
+ name: 'Number'
60
+ }
61
+ }
62
+ }
63
+ }
64
+ }
65
+ end
66
+ end
67
+ end
68
+ end
@@ -0,0 +1,107 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::Search
7
+ module Models
8
+ #
9
+ # Defines all the properties of an Azure Search service.
10
+ #
11
+ class SearchServiceReadableProperties
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [SearchServiceStatus] The status of the Search service.
16
+ # Possible values include: 'running', 'provisioning', 'deleting',
17
+ # 'degraded', 'disabled', 'error'
18
+ attr_accessor :status
19
+
20
+ # @return [String] The details of the Search service status.
21
+ attr_accessor :status_details
22
+
23
+ # @return [ProvisioningState] The state of the last provisioning
24
+ # operation performed on the Search service. Possible values include:
25
+ # 'succeeded', 'provisioning', 'failed'
26
+ attr_accessor :provisioning_state
27
+
28
+ # @return [Sku] The SKU of the Search Service, which determines price
29
+ # tier and capacity limits.
30
+ attr_accessor :sku
31
+
32
+ # @return [Integer] The number of replicas in the Search service. If
33
+ # specified, it must be a value between 1 and 6 inclusive.
34
+ attr_accessor :replica_count
35
+
36
+ # @return [Integer] The number of partitions in the Search service; if
37
+ # specified, it can be 1, 2, 3, 4, 6, or 12.
38
+ attr_accessor :partition_count
39
+
40
+
41
+ #
42
+ # Mapper for SearchServiceReadableProperties class as Ruby Hash.
43
+ # This will be used for serialization/deserialization.
44
+ #
45
+ def self.mapper()
46
+ {
47
+ required: false,
48
+ serialized_name: 'SearchServiceReadableProperties',
49
+ type: {
50
+ name: 'Composite',
51
+ class_name: 'SearchServiceReadableProperties',
52
+ model_properties: {
53
+ status: {
54
+ required: false,
55
+ read_only: true,
56
+ serialized_name: 'status',
57
+ type: {
58
+ name: 'Enum',
59
+ module: 'SearchServiceStatus'
60
+ }
61
+ },
62
+ status_details: {
63
+ required: false,
64
+ read_only: true,
65
+ serialized_name: 'statusDetails',
66
+ type: {
67
+ name: 'String'
68
+ }
69
+ },
70
+ provisioning_state: {
71
+ required: false,
72
+ read_only: true,
73
+ serialized_name: 'provisioningState',
74
+ type: {
75
+ name: 'Enum',
76
+ module: 'ProvisioningState'
77
+ }
78
+ },
79
+ sku: {
80
+ required: false,
81
+ serialized_name: 'sku',
82
+ type: {
83
+ name: 'Composite',
84
+ class_name: 'Sku'
85
+ }
86
+ },
87
+ replica_count: {
88
+ required: false,
89
+ serialized_name: 'replicaCount',
90
+ type: {
91
+ name: 'Number'
92
+ }
93
+ },
94
+ partition_count: {
95
+ required: false,
96
+ serialized_name: 'partitionCount',
97
+ type: {
98
+ name: 'Number'
99
+ }
100
+ }
101
+ }
102
+ }
103
+ }
104
+ end
105
+ end
106
+ end
107
+ end
@@ -0,0 +1,96 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::Search
7
+ module Models
8
+ #
9
+ # Describes an Azure Search service and its current state.
10
+ #
11
+ class SearchServiceResource
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] The resource Id of the Azure Search service.
16
+ attr_accessor :id
17
+
18
+ # @return [String] The name of the Search service.
19
+ attr_accessor :name
20
+
21
+ # @return [String] The geographic location of the Search service.
22
+ attr_accessor :location
23
+
24
+ # @return [Hash{String => String}] Tags to help categorize the Search
25
+ # service in the Azure Portal.
26
+ attr_accessor :tags
27
+
28
+ # @return [SearchServiceReadableProperties] Properties of the Search
29
+ # service.
30
+ attr_accessor :properties
31
+
32
+
33
+ #
34
+ # Mapper for SearchServiceResource class as Ruby Hash.
35
+ # This will be used for serialization/deserialization.
36
+ #
37
+ def self.mapper()
38
+ {
39
+ required: false,
40
+ serialized_name: 'SearchServiceResource',
41
+ type: {
42
+ name: 'Composite',
43
+ class_name: 'SearchServiceResource',
44
+ model_properties: {
45
+ id: {
46
+ required: false,
47
+ read_only: true,
48
+ serialized_name: 'id',
49
+ type: {
50
+ name: 'String'
51
+ }
52
+ },
53
+ name: {
54
+ required: false,
55
+ serialized_name: 'name',
56
+ type: {
57
+ name: 'String'
58
+ }
59
+ },
60
+ location: {
61
+ required: false,
62
+ serialized_name: 'location',
63
+ type: {
64
+ name: 'String'
65
+ }
66
+ },
67
+ tags: {
68
+ required: false,
69
+ serialized_name: 'tags',
70
+ type: {
71
+ name: 'Dictionary',
72
+ value: {
73
+ required: false,
74
+ serialized_name: 'StringElementType',
75
+ type: {
76
+ name: 'String'
77
+ }
78
+ }
79
+ }
80
+ },
81
+ properties: {
82
+ required: false,
83
+ read_only: true,
84
+ serialized_name: 'properties',
85
+ type: {
86
+ name: 'Composite',
87
+ class_name: 'SearchServiceReadableProperties'
88
+ }
89
+ }
90
+ }
91
+ }
92
+ }
93
+ end
94
+ end
95
+ end
96
+ end
@@ -0,0 +1,47 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::Search
7
+ module Models
8
+ #
9
+ # Defines the SKU of an Azure Search Service, which determines price tier
10
+ # and capacity limits.
11
+ #
12
+ class Sku
13
+
14
+ include MsRestAzure
15
+
16
+ # @return [SkuType] The SKU of the Search service. Possible values
17
+ # include: 'free', 'standard', 'standard2'
18
+ attr_accessor :name
19
+
20
+
21
+ #
22
+ # Mapper for Sku class as Ruby Hash.
23
+ # This will be used for serialization/deserialization.
24
+ #
25
+ def self.mapper()
26
+ {
27
+ required: false,
28
+ serialized_name: 'Sku',
29
+ type: {
30
+ name: 'Composite',
31
+ class_name: 'Sku',
32
+ model_properties: {
33
+ name: {
34
+ required: false,
35
+ serialized_name: 'name',
36
+ type: {
37
+ name: 'Enum',
38
+ module: 'SkuType'
39
+ }
40
+ }
41
+ }
42
+ }
43
+ }
44
+ end
45
+ end
46
+ end
47
+ end
@@ -72,6 +72,8 @@ module Azure::ARM::Search
72
72
  fail ArgumentError, 'service_name is nil' if service_name.nil?
73
73
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
74
74
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
75
+
76
+
75
77
  request_headers = {}
76
78
 
77
79
  # Set Headers
@@ -107,10 +109,8 @@ module Azure::ARM::Search
107
109
  if status_code == 200
108
110
  begin
109
111
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
110
- unless parsed_response.nil?
111
- parsed_response = ListQueryKeysResult.deserialize_object(parsed_response)
112
- end
113
- result.body = parsed_response
112
+ result_mapper = ListQueryKeysResult.mapper()
113
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
114
114
  rescue Exception => e
115
115
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
116
116
  end
@@ -8,13 +8,13 @@ module Azure::ARM::Search
8
8
  # A service client - single point of access to the REST API.
9
9
  #
10
10
  class SearchManagementClient < MsRestAzure::AzureServiceClient
11
- include Azure::ARM::Search::Models
11
+ include MsRest::Serialization
12
12
  include MsRestAzure
13
13
 
14
14
  # @return [String] the base URI of the service.
15
15
  attr_accessor :base_url
16
16
 
17
- # @return Gets Azure subscription credentials.
17
+ # @return Credentials needed for the client to connect to Azure.
18
18
  attr_reader :credentials
19
19
 
20
20
  # @return [String] Gets subscription credentials which uniquely identify
@@ -40,13 +40,13 @@ module Azure::ARM::Search
40
40
  # subscription.
41
41
  attr_accessor :credentials
42
42
 
43
- # @return admin_keys
43
+ # @return [AdminKeys] admin_keys
44
44
  attr_reader :admin_keys
45
45
 
46
- # @return query_keys
46
+ # @return [QueryKeys] query_keys
47
47
  attr_reader :query_keys
48
48
 
49
- # @return services
49
+ # @return [Services] services
50
50
  attr_reader :services
51
51
 
52
52
  #
@@ -83,21 +83,23 @@ module Azure::ARM::Search
83
83
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
84
84
  fail ArgumentError, 'service_name is nil' if service_name.nil?
85
85
  fail ArgumentError, 'parameters is nil' if parameters.nil?
86
- parameters.validate unless parameters.nil?
87
86
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
88
87
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
88
+
89
+
89
90
  request_headers = {}
90
91
 
91
92
  # Set Headers
92
93
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
93
94
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
94
95
 
95
- # Serialize Request
96
96
  request_headers['Content-Type'] = 'application/json; charset=utf-8'
97
- unless parameters.nil?
98
- parameters = SearchServiceCreateOrUpdateParameters.serialize_object(parameters)
99
- end
100
- request_content = parameters != nil ? JSON.generate(parameters, quirks_mode: true) : nil
97
+
98
+ # Serialize Request
99
+ request_mapper = SearchServiceCreateOrUpdateParameters.mapper()
100
+ request_content = @client.serialize(request_mapper, parameters, 'parameters')
101
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
102
+
101
103
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{serviceName}'
102
104
  options = {
103
105
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
@@ -129,10 +131,8 @@ module Azure::ARM::Search
129
131
  if status_code == 200
130
132
  begin
131
133
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
132
- unless parsed_response.nil?
133
- parsed_response = SearchServiceResource.deserialize_object(parsed_response)
134
- end
135
- result.body = parsed_response
134
+ result_mapper = SearchServiceResource.mapper()
135
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
136
136
  rescue Exception => e
137
137
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
138
138
  end
@@ -141,10 +141,8 @@ module Azure::ARM::Search
141
141
  if status_code == 201
142
142
  begin
143
143
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
144
- unless parsed_response.nil?
145
- parsed_response = SearchServiceResource.deserialize_object(parsed_response)
146
- end
147
- result.body = parsed_response
144
+ result_mapper = SearchServiceResource.mapper()
145
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
148
146
  rescue Exception => e
149
147
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
150
148
  end
@@ -205,6 +203,8 @@ module Azure::ARM::Search
205
203
  fail ArgumentError, 'service_name is nil' if service_name.nil?
206
204
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
207
205
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
206
+
207
+
208
208
  request_headers = {}
209
209
 
210
210
  # Set Headers
@@ -286,6 +286,8 @@ module Azure::ARM::Search
286
286
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
287
287
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
288
288
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
289
+
290
+
289
291
  request_headers = {}
290
292
 
291
293
  # Set Headers
@@ -321,10 +323,8 @@ module Azure::ARM::Search
321
323
  if status_code == 200
322
324
  begin
323
325
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
324
- unless parsed_response.nil?
325
- parsed_response = SearchServiceListResult.deserialize_object(parsed_response)
326
- end
327
- result.body = parsed_response
326
+ result_mapper = SearchServiceListResult.mapper()
327
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
328
328
  rescue Exception => e
329
329
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
330
330
  end