algolia 3.2.2 → 3.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +1 -1
- data/lib/algolia/api/usage_client.rb +2 -9
- data/lib/algolia/api_client.rb +1 -1
- data/lib/algolia/models/abtesting/ab_test.rb +0 -22
- data/lib/algolia/models/abtesting/add_ab_tests_variant.rb +5 -2
- data/lib/algolia/models/abtesting/minimum_detectable_effect.rb +0 -22
- data/lib/algolia/models/analytics/get_top_filter_for_attribute.rb +0 -22
- data/lib/algolia/models/analytics/get_top_filters_no_results_value.rb +0 -22
- data/lib/algolia/models/analytics/get_top_hits_response.rb +5 -2
- data/lib/algolia/models/analytics/get_top_searches_response.rb +5 -2
- data/lib/algolia/models/ingestion/auth_input.rb +5 -2
- data/lib/algolia/models/ingestion/auth_input_partial.rb +5 -2
- data/lib/algolia/models/ingestion/authentication.rb +0 -22
- data/lib/algolia/models/ingestion/authentication_create.rb +0 -22
- data/lib/algolia/models/ingestion/authentication_update.rb +0 -22
- data/lib/algolia/models/ingestion/destination.rb +0 -22
- data/lib/algolia/models/ingestion/destination_create.rb +0 -22
- data/lib/algolia/models/ingestion/destination_index_name.rb +0 -22
- data/lib/algolia/models/ingestion/destination_input.rb +5 -2
- data/lib/algolia/models/ingestion/destination_update.rb +0 -22
- data/lib/algolia/models/ingestion/docker_streams.rb +0 -22
- data/lib/algolia/models/ingestion/event.rb +0 -22
- data/lib/algolia/models/ingestion/mapping_input.rb +0 -22
- data/lib/algolia/models/ingestion/on_demand_trigger.rb +0 -22
- data/lib/algolia/models/ingestion/on_demand_trigger_input.rb +0 -22
- data/lib/algolia/models/ingestion/platform_with_none.rb +5 -2
- data/lib/algolia/models/ingestion/push_task_payload.rb +0 -22
- data/lib/algolia/models/ingestion/run.rb +0 -22
- data/lib/algolia/models/ingestion/run_source_payload.rb +0 -22
- data/lib/algolia/models/ingestion/schedule_trigger.rb +0 -22
- data/lib/algolia/models/ingestion/schedule_trigger_input.rb +0 -22
- data/lib/algolia/models/ingestion/source.rb +0 -22
- data/lib/algolia/models/ingestion/source_big_query.rb +0 -22
- data/lib/algolia/models/ingestion/source_create.rb +0 -22
- data/lib/algolia/models/ingestion/source_csv.rb +0 -22
- data/lib/algolia/models/ingestion/source_docker.rb +0 -22
- data/lib/algolia/models/ingestion/source_input.rb +5 -2
- data/lib/algolia/models/ingestion/source_json.rb +0 -22
- data/lib/algolia/models/ingestion/source_update_docker.rb +0 -22
- data/lib/algolia/models/ingestion/source_update_input.rb +5 -2
- data/lib/algolia/models/ingestion/streaming_trigger.rb +0 -22
- data/lib/algolia/models/ingestion/subscription_trigger.rb +0 -22
- data/lib/algolia/models/ingestion/task.rb +0 -22
- data/lib/algolia/models/ingestion/task_create.rb +0 -22
- data/lib/algolia/models/ingestion/task_create_trigger.rb +5 -2
- data/lib/algolia/models/ingestion/task_create_v1.rb +0 -22
- data/lib/algolia/models/ingestion/task_input.rb +5 -2
- data/lib/algolia/models/ingestion/task_v1.rb +0 -22
- data/lib/algolia/models/ingestion/trigger.rb +5 -2
- data/lib/algolia/models/insights/added_to_cart_object_ids.rb +0 -22
- data/lib/algolia/models/insights/added_to_cart_object_ids_after_search.rb +0 -22
- data/lib/algolia/models/insights/clicked_filters.rb +0 -22
- data/lib/algolia/models/insights/clicked_object_ids.rb +0 -22
- data/lib/algolia/models/insights/clicked_object_ids_after_search.rb +0 -22
- data/lib/algolia/models/insights/converted_filters.rb +0 -22
- data/lib/algolia/models/insights/converted_object_ids.rb +0 -22
- data/lib/algolia/models/insights/converted_object_ids_after_search.rb +0 -22
- data/lib/algolia/models/insights/discount.rb +5 -2
- data/lib/algolia/models/insights/events_items.rb +5 -2
- data/lib/algolia/models/insights/price.rb +5 -2
- data/lib/algolia/models/insights/purchased_object_ids.rb +0 -22
- data/lib/algolia/models/insights/purchased_object_ids_after_search.rb +0 -22
- data/lib/algolia/models/insights/value.rb +5 -2
- data/lib/algolia/models/insights/viewed_filters.rb +0 -22
- data/lib/algolia/models/insights/viewed_object_ids.rb +0 -22
- data/lib/algolia/models/monitoring/incident.rb +0 -22
- data/lib/algolia/models/monitoring/server.rb +0 -22
- data/lib/algolia/models/personalization/event_scoring.rb +0 -22
- data/lib/algolia/models/query-suggestions/languages.rb +5 -2
- data/lib/algolia/models/query-suggestions/log_file.rb +0 -22
- data/lib/algolia/models/recommend/around_precision.rb +5 -2
- data/lib/algolia/models/recommend/around_radius.rb +5 -2
- data/lib/algolia/models/recommend/boolean_string.rb +32 -0
- data/lib/algolia/models/recommend/bought_together_query.rb +0 -22
- data/lib/algolia/models/recommend/distinct.rb +5 -2
- data/lib/algolia/models/recommend/facet_filters.rb +5 -2
- data/lib/algolia/models/recommend/fallback_params.rb +0 -22
- data/lib/algolia/models/recommend/get_recommend_task_response.rb +0 -22
- data/lib/algolia/models/recommend/highlight_result.rb +5 -2
- data/lib/algolia/models/recommend/highlight_result_option.rb +0 -22
- data/lib/algolia/models/recommend/ignore_plurals.rb +7 -3
- data/lib/algolia/models/recommend/looking_similar_query.rb +0 -22
- data/lib/algolia/models/recommend/numeric_filters.rb +5 -2
- data/lib/algolia/models/recommend/optional_filters.rb +5 -2
- data/lib/algolia/models/recommend/re_ranking_apply_filter.rb +5 -2
- data/lib/algolia/models/recommend/recommendations_hit.rb +5 -2
- data/lib/algolia/models/recommend/recommendations_request.rb +5 -2
- data/lib/algolia/models/recommend/recommended_for_you_query.rb +0 -22
- data/lib/algolia/models/recommend/related_query.rb +0 -22
- data/lib/algolia/models/recommend/remove_stop_words.rb +5 -2
- data/lib/algolia/models/recommend/search_params.rb +0 -22
- data/lib/algolia/models/recommend/search_params_object.rb +0 -22
- data/lib/algolia/models/recommend/snippet_result.rb +5 -2
- data/lib/algolia/models/recommend/snippet_result_option.rb +0 -22
- data/lib/algolia/models/recommend/tag_filters.rb +5 -2
- data/lib/algolia/models/recommend/trending_facets_query.rb +0 -22
- data/lib/algolia/models/recommend/trending_items_query.rb +0 -22
- data/lib/algolia/models/recommend/typo_tolerance.rb +5 -2
- data/lib/algolia/models/recommend/value.rb +0 -22
- data/lib/algolia/models/search/around_precision.rb +5 -2
- data/lib/algolia/models/search/around_radius.rb +5 -2
- data/lib/algolia/models/search/attribute_to_update.rb +5 -2
- data/lib/algolia/models/search/automatic_facet_filters.rb +5 -2
- data/lib/algolia/models/search/batch_dictionary_entries_request.rb +0 -22
- data/lib/algolia/models/search/batch_request.rb +0 -22
- data/lib/algolia/models/search/boolean_string.rb +32 -0
- data/lib/algolia/models/search/browse_params.rb +5 -2
- data/lib/algolia/models/search/browse_params_object.rb +0 -22
- data/lib/algolia/models/search/built_in_operation.rb +0 -22
- data/lib/algolia/models/search/built_in_operation_value.rb +5 -2
- data/lib/algolia/models/search/condition.rb +0 -22
- data/lib/algolia/models/search/consequence_params.rb +0 -22
- data/lib/algolia/models/search/consequence_query.rb +5 -2
- data/lib/algolia/models/search/dictionary_entry.rb +0 -22
- data/lib/algolia/models/search/distinct.rb +5 -2
- data/lib/algolia/models/search/edit.rb +0 -22
- data/lib/algolia/models/search/facet_filters.rb +5 -2
- data/lib/algolia/models/search/get_task_response.rb +0 -22
- data/lib/algolia/models/search/highlight_result.rb +5 -2
- data/lib/algolia/models/search/highlight_result_option.rb +0 -22
- data/lib/algolia/models/search/ignore_plurals.rb +7 -3
- data/lib/algolia/models/search/index_settings.rb +0 -22
- data/lib/algolia/models/search/multiple_batch_request.rb +0 -22
- data/lib/algolia/models/search/numeric_filters.rb +5 -2
- data/lib/algolia/models/search/operation_index_params.rb +0 -22
- data/lib/algolia/models/search/optional_filters.rb +5 -2
- data/lib/algolia/models/search/promote.rb +5 -2
- data/lib/algolia/models/search/re_ranking_apply_filter.rb +5 -2
- data/lib/algolia/models/search/remove_stop_words.rb +5 -2
- data/lib/algolia/models/search/search_dictionary_entries_params.rb +0 -22
- data/lib/algolia/models/search/search_for_facets.rb +0 -22
- data/lib/algolia/models/search/search_for_hits.rb +0 -22
- data/lib/algolia/models/search/search_method_params.rb +0 -22
- data/lib/algolia/models/search/search_params.rb +5 -2
- data/lib/algolia/models/search/search_params_object.rb +0 -22
- data/lib/algolia/models/search/search_query.rb +5 -2
- data/lib/algolia/models/search/search_result.rb +5 -2
- data/lib/algolia/models/search/search_rules_params.rb +0 -22
- data/lib/algolia/models/search/search_synonyms_params.rb +0 -22
- data/lib/algolia/models/search/settings_response.rb +0 -22
- data/lib/algolia/models/search/snippet_result.rb +5 -2
- data/lib/algolia/models/search/snippet_result_option.rb +0 -22
- data/lib/algolia/models/search/synonym_hit.rb +0 -22
- data/lib/algolia/models/search/tag_filters.rb +5 -2
- data/lib/algolia/models/search/typo_tolerance.rb +5 -2
- data/lib/algolia/models/search/value.rb +0 -22
- data/lib/algolia/models/usage/statistic_value.rb +5 -2
- data/lib/algolia/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4706b76785e8d1363306205b62fbba558cdaf56c565be86d1dc3eed231c3c586
|
4
|
+
data.tar.gz: c09d518ee7b650fc8c57362bd6958863e15bc4f7387b8865ceb344b339315718
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 470ce687f8468da226a68d367cf33951c483b10b85d04f1f7f59580127c4c9ee06d1992a7f068c9ad418bd09a493891c5f1b91847805e0eb3aa6859da82092ea
|
7
|
+
data.tar.gz: d5eccbfdebc8f7794c246e638712613822082ddadd15d3ad6b034ac6a8ecb68f20328c3d5164f22dfad186e2106ba76117a13490b281a6e0ae89c949c25c3c3e
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
## [3.2.3](https://github.com/algolia/algoliasearch-client-ruby/compare/3.2.2...3.2.3)
|
2
|
+
|
3
|
+
- [3d07a1e4f](https://github.com/algolia/api-clients-automation/commit/3d07a1e4f) fix(specs): ignorePlurals can be a boolean string ([#3620](https://github.com/algolia/api-clients-automation/pull/3620)) by [@millotp](https://github.com/millotp/)
|
4
|
+
- [c0675ff6b](https://github.com/algolia/api-clients-automation/commit/c0675ff6b) fix(clients): correly parse usage hosts ([#3622](https://github.com/algolia/api-clients-automation/pull/3622)) by [@shortcuts](https://github.com/shortcuts/)
|
5
|
+
|
1
6
|
## [3.2.2](https://github.com/algolia/algoliasearch-client-ruby/compare/3.2.1...3.2.2)
|
2
7
|
|
3
8
|
- [327e08d4e](https://github.com/algolia/api-clients-automation/commit/327e08d4e) fix(specs): ingestion push task payload [skip-bc] ([#3607](https://github.com/algolia/api-clients-automation/pull/3607)) by [@shortcuts](https://github.com/shortcuts/)
|
data/Gemfile.lock
CHANGED
@@ -14,15 +14,8 @@ module Algolia
|
|
14
14
|
|
15
15
|
def self.create(app_id, api_key, opts = {})
|
16
16
|
hosts = []
|
17
|
-
hosts << Transport::StatefulHost.new("
|
18
|
-
hosts << Transport::StatefulHost.new("
|
19
|
-
|
20
|
-
hosts += 1
|
21
|
-
.upto(3)
|
22
|
-
.map do |i|
|
23
|
-
Transport::StatefulHost.new("#{app_id}-#{i}.algolianet.com", accept: CallType::READ | CallType::WRITE)
|
24
|
-
end
|
25
|
-
.shuffle
|
17
|
+
hosts << Transport::StatefulHost.new("usage.algolia.com", accept: CallType::READ | CallType::WRITE)
|
18
|
+
hosts << Transport::StatefulHost.new("usage-dev.algolia.com", accept: CallType::READ | CallType::WRITE)
|
26
19
|
|
27
20
|
config = Algolia::Configuration.new(app_id, api_key, hosts, "Usage", opts)
|
28
21
|
create_with_config(config)
|
data/lib/algolia/api_client.rb
CHANGED
@@ -93,7 +93,7 @@ module Algolia
|
|
93
93
|
data.each { |k, v| hash[k] = convert_to_type(v, sub_type) }
|
94
94
|
end
|
95
95
|
else
|
96
|
-
# models (e.g. Pet) or oneOf
|
96
|
+
# models (e.g. Pet), enum, or oneOf
|
97
97
|
klass = Algolia.const_get(return_type)
|
98
98
|
klass.respond_to?(:openapi_one_of) ? klass.build(data) : klass.build_from_hash(data)
|
99
99
|
end
|
@@ -38,28 +38,6 @@ module Algolia
|
|
38
38
|
|
39
39
|
attr_accessor :configuration
|
40
40
|
|
41
|
-
class EnumAttributeValidator
|
42
|
-
attr_reader :datatype
|
43
|
-
attr_reader :allowable_values
|
44
|
-
|
45
|
-
def initialize(datatype, allowable_values)
|
46
|
-
@allowable_values = allowable_values.map do |value|
|
47
|
-
case datatype.to_s
|
48
|
-
when /Integer/i
|
49
|
-
value.to_i
|
50
|
-
when /Float/i
|
51
|
-
value.to_f
|
52
|
-
else
|
53
|
-
value
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|
57
|
-
|
58
|
-
def valid?(value)
|
59
|
-
!value || allowable_values.include?(value)
|
60
|
-
end
|
61
|
-
end
|
62
|
-
|
63
41
|
# Attribute mapping from ruby-style variable name to JSON key.
|
64
42
|
def self.attribute_map
|
65
43
|
{
|
@@ -80,13 +80,16 @@ module Algolia
|
|
80
80
|
else
|
81
81
|
const = Algolia::Abtesting.const_get(klass)
|
82
82
|
if const
|
83
|
-
# nested oneOf model
|
84
83
|
if const.respond_to?(:openapi_one_of)
|
84
|
+
# nested oneOf model
|
85
85
|
model = const.build(data)
|
86
|
-
|
86
|
+
elsif const.respond_to?(:acceptable_attributes)
|
87
87
|
# raise if data contains keys that are not known to the model
|
88
88
|
raise unless (data.keys - const.acceptable_attributes).empty?
|
89
89
|
model = const.build_from_hash(data)
|
90
|
+
else
|
91
|
+
# maybe it's an enum
|
92
|
+
model = const.build_from_hash(data)
|
90
93
|
end
|
91
94
|
|
92
95
|
return model if model
|
@@ -12,28 +12,6 @@ module Algolia
|
|
12
12
|
|
13
13
|
attr_accessor :effect
|
14
14
|
|
15
|
-
class EnumAttributeValidator
|
16
|
-
attr_reader :datatype
|
17
|
-
attr_reader :allowable_values
|
18
|
-
|
19
|
-
def initialize(datatype, allowable_values)
|
20
|
-
@allowable_values = allowable_values.map do |value|
|
21
|
-
case datatype.to_s
|
22
|
-
when /Integer/i
|
23
|
-
value.to_i
|
24
|
-
when /Float/i
|
25
|
-
value.to_f
|
26
|
-
else
|
27
|
-
value
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
def valid?(value)
|
33
|
-
!value || allowable_values.include?(value)
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
15
|
# Attribute mapping from ruby-style variable name to JSON key.
|
38
16
|
def self.attribute_map
|
39
17
|
{
|
@@ -17,28 +17,6 @@ module Algolia
|
|
17
17
|
# Number of occurrences.
|
18
18
|
attr_accessor :count
|
19
19
|
|
20
|
-
class EnumAttributeValidator
|
21
|
-
attr_reader :datatype
|
22
|
-
attr_reader :allowable_values
|
23
|
-
|
24
|
-
def initialize(datatype, allowable_values)
|
25
|
-
@allowable_values = allowable_values.map do |value|
|
26
|
-
case datatype.to_s
|
27
|
-
when /Integer/i
|
28
|
-
value.to_i
|
29
|
-
when /Float/i
|
30
|
-
value.to_f
|
31
|
-
else
|
32
|
-
value
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
def valid?(value)
|
38
|
-
!value || allowable_values.include?(value)
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
20
|
# Attribute mapping from ruby-style variable name to JSON key.
|
43
21
|
def self.attribute_map
|
44
22
|
{
|
@@ -14,28 +14,6 @@ module Algolia
|
|
14
14
|
# Attribute value.
|
15
15
|
attr_accessor :value
|
16
16
|
|
17
|
-
class EnumAttributeValidator
|
18
|
-
attr_reader :datatype
|
19
|
-
attr_reader :allowable_values
|
20
|
-
|
21
|
-
def initialize(datatype, allowable_values)
|
22
|
-
@allowable_values = allowable_values.map do |value|
|
23
|
-
case datatype.to_s
|
24
|
-
when /Integer/i
|
25
|
-
value.to_i
|
26
|
-
when /Float/i
|
27
|
-
value.to_f
|
28
|
-
else
|
29
|
-
value
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
def valid?(value)
|
35
|
-
!value || allowable_values.include?(value)
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
17
|
# Attribute mapping from ruby-style variable name to JSON key.
|
40
18
|
def self.attribute_map
|
41
19
|
{
|
@@ -81,13 +81,16 @@ module Algolia
|
|
81
81
|
else
|
82
82
|
const = Algolia::Analytics.const_get(klass)
|
83
83
|
if const
|
84
|
-
# nested oneOf model
|
85
84
|
if const.respond_to?(:openapi_one_of)
|
85
|
+
# nested oneOf model
|
86
86
|
model = const.build(data)
|
87
|
-
|
87
|
+
elsif const.respond_to?(:acceptable_attributes)
|
88
88
|
# raise if data contains keys that are not known to the model
|
89
89
|
raise unless (data.keys - const.acceptable_attributes).empty?
|
90
90
|
model = const.build_from_hash(data)
|
91
|
+
else
|
92
|
+
# maybe it's an enum
|
93
|
+
model = const.build_from_hash(data)
|
91
94
|
end
|
92
95
|
|
93
96
|
return model if model
|
@@ -81,13 +81,16 @@ module Algolia
|
|
81
81
|
else
|
82
82
|
const = Algolia::Analytics.const_get(klass)
|
83
83
|
if const
|
84
|
-
# nested oneOf model
|
85
84
|
if const.respond_to?(:openapi_one_of)
|
85
|
+
# nested oneOf model
|
86
86
|
model = const.build(data)
|
87
|
-
|
87
|
+
elsif const.respond_to?(:acceptable_attributes)
|
88
88
|
# raise if data contains keys that are not known to the model
|
89
89
|
raise unless (data.keys - const.acceptable_attributes).empty?
|
90
90
|
model = const.build_from_hash(data)
|
91
|
+
else
|
92
|
+
# maybe it's an enum
|
93
|
+
model = const.build_from_hash(data)
|
91
94
|
end
|
92
95
|
|
93
96
|
return model if model
|
@@ -84,13 +84,16 @@ module Algolia
|
|
84
84
|
else
|
85
85
|
const = Algolia::Ingestion.const_get(klass)
|
86
86
|
if const
|
87
|
-
# nested oneOf model
|
88
87
|
if const.respond_to?(:openapi_one_of)
|
88
|
+
# nested oneOf model
|
89
89
|
model = const.build(data)
|
90
|
-
|
90
|
+
elsif const.respond_to?(:acceptable_attributes)
|
91
91
|
# raise if data contains keys that are not known to the model
|
92
92
|
raise unless (data.keys - const.acceptable_attributes).empty?
|
93
93
|
model = const.build_from_hash(data)
|
94
|
+
else
|
95
|
+
# maybe it's an enum
|
96
|
+
model = const.build_from_hash(data)
|
94
97
|
end
|
95
98
|
|
96
99
|
return model if model
|
@@ -84,13 +84,16 @@ module Algolia
|
|
84
84
|
else
|
85
85
|
const = Algolia::Ingestion.const_get(klass)
|
86
86
|
if const
|
87
|
-
# nested oneOf model
|
88
87
|
if const.respond_to?(:openapi_one_of)
|
88
|
+
# nested oneOf model
|
89
89
|
model = const.build(data)
|
90
|
-
|
90
|
+
elsif const.respond_to?(:acceptable_attributes)
|
91
91
|
# raise if data contains keys that are not known to the model
|
92
92
|
raise unless (data.keys - const.acceptable_attributes).empty?
|
93
93
|
model = const.build_from_hash(data)
|
94
|
+
else
|
95
|
+
# maybe it's an enum
|
96
|
+
model = const.build_from_hash(data)
|
94
97
|
end
|
95
98
|
|
96
99
|
return model if model
|
@@ -25,28 +25,6 @@ module Algolia
|
|
25
25
|
# Date of last update in RFC 3339 format.
|
26
26
|
attr_accessor :updated_at
|
27
27
|
|
28
|
-
class EnumAttributeValidator
|
29
|
-
attr_reader :datatype
|
30
|
-
attr_reader :allowable_values
|
31
|
-
|
32
|
-
def initialize(datatype, allowable_values)
|
33
|
-
@allowable_values = allowable_values.map do |value|
|
34
|
-
case datatype.to_s
|
35
|
-
when /Integer/i
|
36
|
-
value.to_i
|
37
|
-
when /Float/i
|
38
|
-
value.to_f
|
39
|
-
else
|
40
|
-
value
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
def valid?(value)
|
46
|
-
!value || allowable_values.include?(value)
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
28
|
# Attribute mapping from ruby-style variable name to JSON key.
|
51
29
|
def self.attribute_map
|
52
30
|
{
|
@@ -16,28 +16,6 @@ module Algolia
|
|
16
16
|
|
17
17
|
attr_accessor :input
|
18
18
|
|
19
|
-
class EnumAttributeValidator
|
20
|
-
attr_reader :datatype
|
21
|
-
attr_reader :allowable_values
|
22
|
-
|
23
|
-
def initialize(datatype, allowable_values)
|
24
|
-
@allowable_values = allowable_values.map do |value|
|
25
|
-
case datatype.to_s
|
26
|
-
when /Integer/i
|
27
|
-
value.to_i
|
28
|
-
when /Float/i
|
29
|
-
value.to_f
|
30
|
-
else
|
31
|
-
value
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
def valid?(value)
|
37
|
-
!value || allowable_values.include?(value)
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
19
|
# Attribute mapping from ruby-style variable name to JSON key.
|
42
20
|
def self.attribute_map
|
43
21
|
{
|
@@ -16,28 +16,6 @@ module Algolia
|
|
16
16
|
|
17
17
|
attr_accessor :input
|
18
18
|
|
19
|
-
class EnumAttributeValidator
|
20
|
-
attr_reader :datatype
|
21
|
-
attr_reader :allowable_values
|
22
|
-
|
23
|
-
def initialize(datatype, allowable_values)
|
24
|
-
@allowable_values = allowable_values.map do |value|
|
25
|
-
case datatype.to_s
|
26
|
-
when /Integer/i
|
27
|
-
value.to_i
|
28
|
-
when /Float/i
|
29
|
-
value.to_f
|
30
|
-
else
|
31
|
-
value
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
def valid?(value)
|
37
|
-
!value || allowable_values.include?(value)
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
19
|
# Attribute mapping from ruby-style variable name to JSON key.
|
42
20
|
def self.attribute_map
|
43
21
|
{
|
@@ -28,28 +28,6 @@ module Algolia
|
|
28
28
|
|
29
29
|
attr_accessor :transformation_ids
|
30
30
|
|
31
|
-
class EnumAttributeValidator
|
32
|
-
attr_reader :datatype
|
33
|
-
attr_reader :allowable_values
|
34
|
-
|
35
|
-
def initialize(datatype, allowable_values)
|
36
|
-
@allowable_values = allowable_values.map do |value|
|
37
|
-
case datatype.to_s
|
38
|
-
when /Integer/i
|
39
|
-
value.to_i
|
40
|
-
when /Float/i
|
41
|
-
value.to_f
|
42
|
-
else
|
43
|
-
value
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
def valid?(value)
|
49
|
-
!value || allowable_values.include?(value)
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
31
|
# Attribute mapping from ruby-style variable name to JSON key.
|
54
32
|
def self.attribute_map
|
55
33
|
{
|
@@ -19,28 +19,6 @@ module Algolia
|
|
19
19
|
|
20
20
|
attr_accessor :transformation_ids
|
21
21
|
|
22
|
-
class EnumAttributeValidator
|
23
|
-
attr_reader :datatype
|
24
|
-
attr_reader :allowable_values
|
25
|
-
|
26
|
-
def initialize(datatype, allowable_values)
|
27
|
-
@allowable_values = allowable_values.map do |value|
|
28
|
-
case datatype.to_s
|
29
|
-
when /Integer/i
|
30
|
-
value.to_i
|
31
|
-
when /Float/i
|
32
|
-
value.to_f
|
33
|
-
else
|
34
|
-
value
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
def valid?(value)
|
40
|
-
!value || allowable_values.include?(value)
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
22
|
# Attribute mapping from ruby-style variable name to JSON key.
|
45
23
|
def self.attribute_map
|
46
24
|
{
|
@@ -14,28 +14,6 @@ module Algolia
|
|
14
14
|
# Attributes from your source to exclude from Algolia records. Not all your data attributes will be useful for searching. Keeping your Algolia records small increases indexing and search performance. - Exclude nested attributes with `.` notation. For example, `foo.bar` indexes the `foo` attribute and all its children **except** the `bar` attribute. - Exclude attributes from arrays with `[i]`, where `i` is the index of the array element. For example, `foo.[0].bar` only excludes the `bar` attribute from the first element of the `foo` array, but indexes the complete `foo` attribute for all other elements. Use `*` as wildcard: `foo.[*].bar` excludes `bar` from all elements of the `foo` array.
|
15
15
|
attr_accessor :attributes_to_exclude
|
16
16
|
|
17
|
-
class EnumAttributeValidator
|
18
|
-
attr_reader :datatype
|
19
|
-
attr_reader :allowable_values
|
20
|
-
|
21
|
-
def initialize(datatype, allowable_values)
|
22
|
-
@allowable_values = allowable_values.map do |value|
|
23
|
-
case datatype.to_s
|
24
|
-
when /Integer/i
|
25
|
-
value.to_i
|
26
|
-
when /Float/i
|
27
|
-
value.to_f
|
28
|
-
else
|
29
|
-
value
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
def valid?(value)
|
35
|
-
!value || allowable_values.include?(value)
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
17
|
# Attribute mapping from ruby-style variable name to JSON key.
|
40
18
|
def self.attribute_map
|
41
19
|
{
|
@@ -79,13 +79,16 @@ module Algolia
|
|
79
79
|
else
|
80
80
|
const = Algolia::Ingestion.const_get(klass)
|
81
81
|
if const
|
82
|
-
# nested oneOf model
|
83
82
|
if const.respond_to?(:openapi_one_of)
|
83
|
+
# nested oneOf model
|
84
84
|
model = const.build(data)
|
85
|
-
|
85
|
+
elsif const.respond_to?(:acceptable_attributes)
|
86
86
|
# raise if data contains keys that are not known to the model
|
87
87
|
raise unless (data.keys - const.acceptable_attributes).empty?
|
88
88
|
model = const.build_from_hash(data)
|
89
|
+
else
|
90
|
+
# maybe it's an enum
|
91
|
+
model = const.build_from_hash(data)
|
89
92
|
end
|
90
93
|
|
91
94
|
return model if model
|
@@ -19,28 +19,6 @@ module Algolia
|
|
19
19
|
|
20
20
|
attr_accessor :transformation_ids
|
21
21
|
|
22
|
-
class EnumAttributeValidator
|
23
|
-
attr_reader :datatype
|
24
|
-
attr_reader :allowable_values
|
25
|
-
|
26
|
-
def initialize(datatype, allowable_values)
|
27
|
-
@allowable_values = allowable_values.map do |value|
|
28
|
-
case datatype.to_s
|
29
|
-
when /Integer/i
|
30
|
-
value.to_i
|
31
|
-
when /Float/i
|
32
|
-
value.to_f
|
33
|
-
else
|
34
|
-
value
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
def valid?(value)
|
40
|
-
!value || allowable_values.include?(value)
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
22
|
# Attribute mapping from ruby-style variable name to JSON key.
|
45
23
|
def self.attribute_map
|
46
24
|
{
|
@@ -14,28 +14,6 @@ module Algolia
|
|
14
14
|
|
15
15
|
attr_accessor :sync_mode
|
16
16
|
|
17
|
-
class EnumAttributeValidator
|
18
|
-
attr_reader :datatype
|
19
|
-
attr_reader :allowable_values
|
20
|
-
|
21
|
-
def initialize(datatype, allowable_values)
|
22
|
-
@allowable_values = allowable_values.map do |value|
|
23
|
-
case datatype.to_s
|
24
|
-
when /Integer/i
|
25
|
-
value.to_i
|
26
|
-
when /Float/i
|
27
|
-
value.to_f
|
28
|
-
else
|
29
|
-
value
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
def valid?(value)
|
35
|
-
!value || allowable_values.include?(value)
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
17
|
# Attribute mapping from ruby-style variable name to JSON key.
|
40
18
|
def self.attribute_map
|
41
19
|
{
|
@@ -28,28 +28,6 @@ module Algolia
|
|
28
28
|
# Date of publish RFC 3339 format.
|
29
29
|
attr_accessor :published_at
|
30
30
|
|
31
|
-
class EnumAttributeValidator
|
32
|
-
attr_reader :datatype
|
33
|
-
attr_reader :allowable_values
|
34
|
-
|
35
|
-
def initialize(datatype, allowable_values)
|
36
|
-
@allowable_values = allowable_values.map do |value|
|
37
|
-
case datatype.to_s
|
38
|
-
when /Integer/i
|
39
|
-
value.to_i
|
40
|
-
when /Float/i
|
41
|
-
value.to_f
|
42
|
-
else
|
43
|
-
value
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
def valid?(value)
|
49
|
-
!value || allowable_values.include?(value)
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
31
|
# Attribute mapping from ruby-style variable name to JSON key.
|
54
32
|
def self.attribute_map
|
55
33
|
{
|
@@ -11,28 +11,6 @@ module Algolia
|
|
11
11
|
|
12
12
|
attr_accessor :actions
|
13
13
|
|
14
|
-
class EnumAttributeValidator
|
15
|
-
attr_reader :datatype
|
16
|
-
attr_reader :allowable_values
|
17
|
-
|
18
|
-
def initialize(datatype, allowable_values)
|
19
|
-
@allowable_values = allowable_values.map do |value|
|
20
|
-
case datatype.to_s
|
21
|
-
when /Integer/i
|
22
|
-
value.to_i
|
23
|
-
when /Float/i
|
24
|
-
value.to_f
|
25
|
-
else
|
26
|
-
value
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
|
31
|
-
def valid?(value)
|
32
|
-
!value || allowable_values.include?(value)
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
14
|
# Attribute mapping from ruby-style variable name to JSON key.
|
37
15
|
def self.attribute_map
|
38
16
|
{
|
@@ -12,28 +12,6 @@ module Algolia
|
|
12
12
|
# The last time the scheduled task ran in RFC 3339 format.
|
13
13
|
attr_accessor :last_run
|
14
14
|
|
15
|
-
class EnumAttributeValidator
|
16
|
-
attr_reader :datatype
|
17
|
-
attr_reader :allowable_values
|
18
|
-
|
19
|
-
def initialize(datatype, allowable_values)
|
20
|
-
@allowable_values = allowable_values.map do |value|
|
21
|
-
case datatype.to_s
|
22
|
-
when /Integer/i
|
23
|
-
value.to_i
|
24
|
-
when /Float/i
|
25
|
-
value.to_f
|
26
|
-
else
|
27
|
-
value
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
def valid?(value)
|
33
|
-
!value || allowable_values.include?(value)
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
15
|
# Attribute mapping from ruby-style variable name to JSON key.
|
38
16
|
def self.attribute_map
|
39
17
|
{
|
@@ -9,28 +9,6 @@ module Algolia
|
|
9
9
|
class OnDemandTriggerInput
|
10
10
|
attr_accessor :type
|
11
11
|
|
12
|
-
class EnumAttributeValidator
|
13
|
-
attr_reader :datatype
|
14
|
-
attr_reader :allowable_values
|
15
|
-
|
16
|
-
def initialize(datatype, allowable_values)
|
17
|
-
@allowable_values = allowable_values.map do |value|
|
18
|
-
case datatype.to_s
|
19
|
-
when /Integer/i
|
20
|
-
value.to_i
|
21
|
-
when /Float/i
|
22
|
-
value.to_f
|
23
|
-
else
|
24
|
-
value
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
def valid?(value)
|
30
|
-
!value || allowable_values.include?(value)
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
12
|
# Attribute mapping from ruby-style variable name to JSON key.
|
35
13
|
def self.attribute_map
|
36
14
|
{
|
@@ -80,13 +80,16 @@ module Algolia
|
|
80
80
|
else
|
81
81
|
const = Algolia::Ingestion.const_get(klass)
|
82
82
|
if const
|
83
|
-
# nested oneOf model
|
84
83
|
if const.respond_to?(:openapi_one_of)
|
84
|
+
# nested oneOf model
|
85
85
|
model = const.build(data)
|
86
|
-
|
86
|
+
elsif const.respond_to?(:acceptable_attributes)
|
87
87
|
# raise if data contains keys that are not known to the model
|
88
88
|
raise unless (data.keys - const.acceptable_attributes).empty?
|
89
89
|
model = const.build_from_hash(data)
|
90
|
+
else
|
91
|
+
# maybe it's an enum
|
92
|
+
model = const.build_from_hash(data)
|
90
93
|
end
|
91
94
|
|
92
95
|
return model if model
|