azure_mgmt_search 0.2.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 +7 -0
- data/.rspec +3 -0
- data/LICENSE.txt +21 -0
- data/Rakefile +5 -0
- data/azure_mgmt_search.gemspec +35 -0
- data/lib/azure_mgmt_search.rb +41 -0
- data/lib/azure_mgmt_search/admin_keys.rb +92 -0
- data/lib/azure_mgmt_search/models/admin_key_result.rb +66 -0
- data/lib/azure_mgmt_search/models/list_query_keys_result.rb +77 -0
- data/lib/azure_mgmt_search/models/provisioning_state.rb +17 -0
- data/lib/azure_mgmt_search/models/query_key.rb +66 -0
- data/lib/azure_mgmt_search/models/search_service_create_or_update_parameters.rb +84 -0
- data/lib/azure_mgmt_search/models/search_service_list_result.rb +78 -0
- data/lib/azure_mgmt_search/models/search_service_properties.rb +85 -0
- data/lib/azure_mgmt_search/models/search_service_readable_properties.rb +124 -0
- data/lib/azure_mgmt_search/models/search_service_resource.rb +102 -0
- data/lib/azure_mgmt_search/models/search_service_status.rb +20 -0
- data/lib/azure_mgmt_search/models/sku.rb +61 -0
- data/lib/azure_mgmt_search/models/sku_type.rb +17 -0
- data/lib/azure_mgmt_search/module_definition.rb +8 -0
- data/lib/azure_mgmt_search/query_keys.rb +91 -0
- data/lib/azure_mgmt_search/search_management_client.rb +76 -0
- data/lib/azure_mgmt_search/services.rb +232 -0
- data/lib/azure_mgmt_search/version.rb +8 -0
- metadata +151 -0
@@ -0,0 +1,84 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.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
|
+
# Properties that describe an Azure Search service.
|
10
|
+
#
|
11
|
+
class SearchServiceCreateOrUpdateParameters
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] Gets or sets the geographic location of the Search
|
16
|
+
# service.
|
17
|
+
attr_accessor :location
|
18
|
+
|
19
|
+
# @return [Hash{String => String}] Gets or sets tags to help categorize
|
20
|
+
# the Search service in the Azure Portal.
|
21
|
+
attr_accessor :tags
|
22
|
+
|
23
|
+
# @return [SearchServiceProperties] Gets or sets properties of the
|
24
|
+
# Search service.
|
25
|
+
attr_accessor :properties
|
26
|
+
|
27
|
+
#
|
28
|
+
# Validate the object. Throws ValidationError if validation fails.
|
29
|
+
#
|
30
|
+
def validate
|
31
|
+
@tags.each{ |e| e.validate if e.respond_to?(:validate) } unless @tags.nil?
|
32
|
+
@properties.validate unless @properties.nil?
|
33
|
+
end
|
34
|
+
|
35
|
+
#
|
36
|
+
# Serializes given Model object into Ruby Hash.
|
37
|
+
# @param object Model object to serialize.
|
38
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
39
|
+
#
|
40
|
+
def self.serialize_object(object)
|
41
|
+
object.validate
|
42
|
+
output_object = {}
|
43
|
+
|
44
|
+
serialized_property = object.location
|
45
|
+
output_object['location'] = serialized_property unless serialized_property.nil?
|
46
|
+
|
47
|
+
serialized_property = object.tags
|
48
|
+
output_object['tags'] = serialized_property unless serialized_property.nil?
|
49
|
+
|
50
|
+
serialized_property = object.properties
|
51
|
+
unless serialized_property.nil?
|
52
|
+
serialized_property = SearchServiceProperties.serialize_object(serialized_property)
|
53
|
+
end
|
54
|
+
output_object['properties'] = serialized_property unless serialized_property.nil?
|
55
|
+
|
56
|
+
output_object
|
57
|
+
end
|
58
|
+
|
59
|
+
#
|
60
|
+
# Deserializes given Ruby Hash into Model object.
|
61
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
62
|
+
# @return [SearchServiceCreateOrUpdateParameters] Deserialized object.
|
63
|
+
#
|
64
|
+
def self.deserialize_object(object)
|
65
|
+
return if object.nil?
|
66
|
+
output_object = SearchServiceCreateOrUpdateParameters.new
|
67
|
+
|
68
|
+
deserialized_property = object['location']
|
69
|
+
output_object.location = deserialized_property
|
70
|
+
|
71
|
+
deserialized_property = object['tags']
|
72
|
+
output_object.tags = deserialized_property
|
73
|
+
|
74
|
+
deserialized_property = object['properties']
|
75
|
+
unless deserialized_property.nil?
|
76
|
+
deserialized_property = SearchServiceProperties.deserialize_object(deserialized_property)
|
77
|
+
end
|
78
|
+
output_object.properties = deserialized_property
|
79
|
+
|
80
|
+
output_object
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
@@ -0,0 +1,78 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.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
|
+
# Response containing a list of Azure Search services for a given resource
|
10
|
+
# group.
|
11
|
+
#
|
12
|
+
class SearchServiceListResult
|
13
|
+
|
14
|
+
include MsRestAzure
|
15
|
+
|
16
|
+
# @return [Array<SearchServiceResource>] Gets the Search services in the
|
17
|
+
# resource group.
|
18
|
+
attr_accessor :value
|
19
|
+
|
20
|
+
#
|
21
|
+
# Validate the object. Throws ValidationError if validation fails.
|
22
|
+
#
|
23
|
+
def validate
|
24
|
+
@value.each{ |e| e.validate if e.respond_to?(:validate) } unless @value.nil?
|
25
|
+
end
|
26
|
+
|
27
|
+
#
|
28
|
+
# Serializes given Model object into Ruby Hash.
|
29
|
+
# @param object Model object to serialize.
|
30
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
31
|
+
#
|
32
|
+
def self.serialize_object(object)
|
33
|
+
object.validate
|
34
|
+
output_object = {}
|
35
|
+
|
36
|
+
serialized_property = object.value
|
37
|
+
unless serialized_property.nil?
|
38
|
+
serializedArray = []
|
39
|
+
serialized_property.each do |element|
|
40
|
+
unless element.nil?
|
41
|
+
element = SearchServiceResource.serialize_object(element)
|
42
|
+
end
|
43
|
+
serializedArray.push(element)
|
44
|
+
end
|
45
|
+
serialized_property = serializedArray
|
46
|
+
end
|
47
|
+
output_object['value'] = serialized_property unless serialized_property.nil?
|
48
|
+
|
49
|
+
output_object
|
50
|
+
end
|
51
|
+
|
52
|
+
#
|
53
|
+
# Deserializes given Ruby Hash into Model object.
|
54
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
55
|
+
# @return [SearchServiceListResult] Deserialized object.
|
56
|
+
#
|
57
|
+
def self.deserialize_object(object)
|
58
|
+
return if object.nil?
|
59
|
+
output_object = SearchServiceListResult.new
|
60
|
+
|
61
|
+
deserialized_property = object['value']
|
62
|
+
unless deserialized_property.nil?
|
63
|
+
deserialized_array = []
|
64
|
+
deserialized_property.each do |element1|
|
65
|
+
unless element1.nil?
|
66
|
+
element1 = SearchServiceResource.deserialize_object(element1)
|
67
|
+
end
|
68
|
+
deserialized_array.push(element1)
|
69
|
+
end
|
70
|
+
deserialized_property = deserialized_array
|
71
|
+
end
|
72
|
+
output_object.value = deserialized_property
|
73
|
+
|
74
|
+
output_object
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
@@ -0,0 +1,85 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.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] Gets or sets the SKU of the Search Service, which
|
16
|
+
# determines price tier and capacity limits.
|
17
|
+
attr_accessor :sku
|
18
|
+
|
19
|
+
# @return [Integer] Gets or sets the number of replicas in the Search
|
20
|
+
# service. If specified, it must be a value between 1 and 6 inclusive.
|
21
|
+
attr_accessor :replica_count
|
22
|
+
|
23
|
+
# @return [Integer] Gets or sets the number of partitions in the Search
|
24
|
+
# service; if specified, it can be 1, 2, 3, 4, 6, or 12.
|
25
|
+
attr_accessor :partition_count
|
26
|
+
|
27
|
+
#
|
28
|
+
# Validate the object. Throws ValidationError if validation fails.
|
29
|
+
#
|
30
|
+
def validate
|
31
|
+
@sku.validate unless @sku.nil?
|
32
|
+
end
|
33
|
+
|
34
|
+
#
|
35
|
+
# Serializes given Model object into Ruby Hash.
|
36
|
+
# @param object Model object to serialize.
|
37
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
38
|
+
#
|
39
|
+
def self.serialize_object(object)
|
40
|
+
object.validate
|
41
|
+
output_object = {}
|
42
|
+
|
43
|
+
serialized_property = object.sku
|
44
|
+
unless serialized_property.nil?
|
45
|
+
serialized_property = Sku.serialize_object(serialized_property)
|
46
|
+
end
|
47
|
+
output_object['sku'] = serialized_property unless serialized_property.nil?
|
48
|
+
|
49
|
+
serialized_property = object.replica_count
|
50
|
+
output_object['replicaCount'] = serialized_property unless serialized_property.nil?
|
51
|
+
|
52
|
+
serialized_property = object.partition_count
|
53
|
+
output_object['partitionCount'] = serialized_property unless serialized_property.nil?
|
54
|
+
|
55
|
+
output_object
|
56
|
+
end
|
57
|
+
|
58
|
+
#
|
59
|
+
# Deserializes given Ruby Hash into Model object.
|
60
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
61
|
+
# @return [SearchServiceProperties] Deserialized object.
|
62
|
+
#
|
63
|
+
def self.deserialize_object(object)
|
64
|
+
return if object.nil?
|
65
|
+
output_object = SearchServiceProperties.new
|
66
|
+
|
67
|
+
deserialized_property = object['sku']
|
68
|
+
unless deserialized_property.nil?
|
69
|
+
deserialized_property = Sku.deserialize_object(deserialized_property)
|
70
|
+
end
|
71
|
+
output_object.sku = deserialized_property
|
72
|
+
|
73
|
+
deserialized_property = object['replicaCount']
|
74
|
+
deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
|
75
|
+
output_object.replica_count = deserialized_property
|
76
|
+
|
77
|
+
deserialized_property = object['partitionCount']
|
78
|
+
deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
|
79
|
+
output_object.partition_count = deserialized_property
|
80
|
+
|
81
|
+
output_object
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
@@ -0,0 +1,124 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.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] Gets 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] Gets the details of the Search service status.
|
21
|
+
attr_accessor :status_details
|
22
|
+
|
23
|
+
# @return [ProvisioningState] Gets 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] Gets or sets the SKU of the Search Service, which
|
29
|
+
# determines price tier and capacity limits.
|
30
|
+
attr_accessor :sku
|
31
|
+
|
32
|
+
# @return [Integer] Gets or sets the number of replicas in the Search
|
33
|
+
# service. If specified, it must be a value between 1 and 6 inclusive.
|
34
|
+
attr_accessor :replica_count
|
35
|
+
|
36
|
+
# @return [Integer] Gets or sets the number of partitions in the Search
|
37
|
+
# service; if specified, it can be 1, 2, 3, 4, 6, or 12.
|
38
|
+
attr_accessor :partition_count
|
39
|
+
|
40
|
+
#
|
41
|
+
# Validate the object. Throws ValidationError if validation fails.
|
42
|
+
#
|
43
|
+
def validate
|
44
|
+
@sku.validate unless @sku.nil?
|
45
|
+
end
|
46
|
+
|
47
|
+
#
|
48
|
+
# Serializes given Model object into Ruby Hash.
|
49
|
+
# @param object Model object to serialize.
|
50
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
51
|
+
#
|
52
|
+
def self.serialize_object(object)
|
53
|
+
object.validate
|
54
|
+
output_object = {}
|
55
|
+
|
56
|
+
serialized_property = object.status
|
57
|
+
output_object['status'] = serialized_property unless serialized_property.nil?
|
58
|
+
|
59
|
+
serialized_property = object.status_details
|
60
|
+
output_object['statusDetails'] = serialized_property unless serialized_property.nil?
|
61
|
+
|
62
|
+
serialized_property = object.provisioning_state
|
63
|
+
output_object['provisioningState'] = serialized_property unless serialized_property.nil?
|
64
|
+
|
65
|
+
serialized_property = object.sku
|
66
|
+
unless serialized_property.nil?
|
67
|
+
serialized_property = Sku.serialize_object(serialized_property)
|
68
|
+
end
|
69
|
+
output_object['sku'] = serialized_property unless serialized_property.nil?
|
70
|
+
|
71
|
+
serialized_property = object.replica_count
|
72
|
+
output_object['replicaCount'] = serialized_property unless serialized_property.nil?
|
73
|
+
|
74
|
+
serialized_property = object.partition_count
|
75
|
+
output_object['partitionCount'] = serialized_property unless serialized_property.nil?
|
76
|
+
|
77
|
+
output_object
|
78
|
+
end
|
79
|
+
|
80
|
+
#
|
81
|
+
# Deserializes given Ruby Hash into Model object.
|
82
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
83
|
+
# @return [SearchServiceReadableProperties] Deserialized object.
|
84
|
+
#
|
85
|
+
def self.deserialize_object(object)
|
86
|
+
return if object.nil?
|
87
|
+
output_object = SearchServiceReadableProperties.new
|
88
|
+
|
89
|
+
deserialized_property = object['status']
|
90
|
+
if (!deserialized_property.nil? && !deserialized_property.empty?)
|
91
|
+
enum_is_valid = SearchServiceStatus.constants.any? { |e| SearchServiceStatus.const_get(e).to_s.downcase == deserialized_property.downcase }
|
92
|
+
warn 'Enum SearchServiceStatus does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid
|
93
|
+
end
|
94
|
+
output_object.status = deserialized_property
|
95
|
+
|
96
|
+
deserialized_property = object['statusDetails']
|
97
|
+
output_object.status_details = deserialized_property
|
98
|
+
|
99
|
+
deserialized_property = object['provisioningState']
|
100
|
+
if (!deserialized_property.nil? && !deserialized_property.empty?)
|
101
|
+
enum_is_valid = ProvisioningState.constants.any? { |e| ProvisioningState.const_get(e).to_s.downcase == deserialized_property.downcase }
|
102
|
+
warn 'Enum ProvisioningState does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid
|
103
|
+
end
|
104
|
+
output_object.provisioning_state = deserialized_property
|
105
|
+
|
106
|
+
deserialized_property = object['sku']
|
107
|
+
unless deserialized_property.nil?
|
108
|
+
deserialized_property = Sku.deserialize_object(deserialized_property)
|
109
|
+
end
|
110
|
+
output_object.sku = deserialized_property
|
111
|
+
|
112
|
+
deserialized_property = object['replicaCount']
|
113
|
+
deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
|
114
|
+
output_object.replica_count = deserialized_property
|
115
|
+
|
116
|
+
deserialized_property = object['partitionCount']
|
117
|
+
deserialized_property = Integer(deserialized_property) unless deserialized_property.to_s.empty?
|
118
|
+
output_object.partition_count = deserialized_property
|
119
|
+
|
120
|
+
output_object
|
121
|
+
end
|
122
|
+
end
|
123
|
+
end
|
124
|
+
end
|
@@ -0,0 +1,102 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.16.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] Resource Id
|
16
|
+
attr_accessor :id
|
17
|
+
|
18
|
+
# @return [String] Gets or sets the name of the Search service.
|
19
|
+
attr_accessor :name
|
20
|
+
|
21
|
+
# @return [String] Gets or sets the geographic location of the Search
|
22
|
+
# service.
|
23
|
+
attr_accessor :location
|
24
|
+
|
25
|
+
# @return [Hash{String => String}] Gets or sets tags to help categorize
|
26
|
+
# the Search service in the Azure Portal.
|
27
|
+
attr_accessor :tags
|
28
|
+
|
29
|
+
# @return [SearchServiceReadableProperties] Gets properties of the
|
30
|
+
# Search service.
|
31
|
+
attr_accessor :properties
|
32
|
+
|
33
|
+
#
|
34
|
+
# Validate the object. Throws ValidationError if validation fails.
|
35
|
+
#
|
36
|
+
def validate
|
37
|
+
@tags.each{ |e| e.validate if e.respond_to?(:validate) } unless @tags.nil?
|
38
|
+
@properties.validate unless @properties.nil?
|
39
|
+
end
|
40
|
+
|
41
|
+
#
|
42
|
+
# Serializes given Model object into Ruby Hash.
|
43
|
+
# @param object Model object to serialize.
|
44
|
+
# @return [Hash] Serialized object in form of Ruby Hash.
|
45
|
+
#
|
46
|
+
def self.serialize_object(object)
|
47
|
+
object.validate
|
48
|
+
output_object = {}
|
49
|
+
|
50
|
+
serialized_property = object.id
|
51
|
+
output_object['id'] = serialized_property unless serialized_property.nil?
|
52
|
+
|
53
|
+
serialized_property = object.name
|
54
|
+
output_object['name'] = serialized_property unless serialized_property.nil?
|
55
|
+
|
56
|
+
serialized_property = object.location
|
57
|
+
output_object['location'] = serialized_property unless serialized_property.nil?
|
58
|
+
|
59
|
+
serialized_property = object.tags
|
60
|
+
output_object['tags'] = serialized_property unless serialized_property.nil?
|
61
|
+
|
62
|
+
serialized_property = object.properties
|
63
|
+
unless serialized_property.nil?
|
64
|
+
serialized_property = SearchServiceReadableProperties.serialize_object(serialized_property)
|
65
|
+
end
|
66
|
+
output_object['properties'] = serialized_property unless serialized_property.nil?
|
67
|
+
|
68
|
+
output_object
|
69
|
+
end
|
70
|
+
|
71
|
+
#
|
72
|
+
# Deserializes given Ruby Hash into Model object.
|
73
|
+
# @param object [Hash] Ruby Hash object to deserialize.
|
74
|
+
# @return [SearchServiceResource] Deserialized object.
|
75
|
+
#
|
76
|
+
def self.deserialize_object(object)
|
77
|
+
return if object.nil?
|
78
|
+
output_object = SearchServiceResource.new
|
79
|
+
|
80
|
+
deserialized_property = object['id']
|
81
|
+
output_object.id = deserialized_property
|
82
|
+
|
83
|
+
deserialized_property = object['name']
|
84
|
+
output_object.name = deserialized_property
|
85
|
+
|
86
|
+
deserialized_property = object['location']
|
87
|
+
output_object.location = deserialized_property
|
88
|
+
|
89
|
+
deserialized_property = object['tags']
|
90
|
+
output_object.tags = deserialized_property
|
91
|
+
|
92
|
+
deserialized_property = object['properties']
|
93
|
+
unless deserialized_property.nil?
|
94
|
+
deserialized_property = SearchServiceReadableProperties.deserialize_object(deserialized_property)
|
95
|
+
end
|
96
|
+
output_object.properties = deserialized_property
|
97
|
+
|
98
|
+
output_object
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|