Skip to content

Commit 62bc809

Browse files
algolia-botkai687shortcuts
committed
fix(specs): dictionary entry for stopwords has type property (#3456) (generated) [skip ci]
Co-authored-by: Kai Welke <[email protected]> Co-authored-by: Clément Vannicatte <[email protected]>
1 parent e5d1417 commit 62bc809

File tree

29 files changed

+556
-10
lines changed

29 files changed

+556
-10
lines changed

clients/algoliasearch-client-csharp/algoliasearch/Models/Search/DictionaryEntry.cs

+10-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ public partial class DictionaryEntry
2828
/// </summary>
2929
[JsonPropertyName("state")]
3030
public DictionaryEntryState? State { get; set; }
31+
32+
/// <summary>
33+
/// Gets or Sets Type
34+
/// </summary>
35+
[JsonPropertyName("type")]
36+
public DictionaryEntryType? Type { get; set; }
3137
/// <summary>
3238
/// Initializes a new instance of the DictionaryEntry class.
3339
/// </summary>
@@ -94,6 +100,7 @@ public override string ToString()
94100
sb.Append(" Words: ").Append(Words).Append("\n");
95101
sb.Append(" Decomposition: ").Append(Decomposition).Append("\n");
96102
sb.Append(" State: ").Append(State).Append("\n");
103+
sb.Append(" Type: ").Append(Type).Append("\n");
97104
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
98105
sb.Append("}\n");
99106
return sb.ToString();
@@ -126,7 +133,8 @@ public override bool Equals(object obj)
126133
(Word == input.Word || (Word != null && Word.Equals(input.Word))) &&
127134
(Words == input.Words || Words != null && input.Words != null && Words.SequenceEqual(input.Words)) &&
128135
(Decomposition == input.Decomposition || Decomposition != null && input.Decomposition != null && Decomposition.SequenceEqual(input.Decomposition)) &&
129-
(State == input.State || State.Equals(input.State))
136+
(State == input.State || State.Equals(input.State)) &&
137+
(Type == input.Type || Type.Equals(input.Type))
130138
&& (AdditionalProperties.Count == input.AdditionalProperties.Count && !AdditionalProperties.Except(input.AdditionalProperties).Any());
131139
}
132140

@@ -157,6 +165,7 @@ public override int GetHashCode()
157165
hashCode = (hashCode * 59) + Decomposition.GetHashCode();
158166
}
159167
hashCode = (hashCode * 59) + State.GetHashCode();
168+
hashCode = (hashCode * 59) + Type.GetHashCode();
160169
if (AdditionalProperties != null)
161170
{
162171
hashCode = (hashCode * 59) + AdditionalProperties.GetHashCode();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
//
2+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
3+
//
4+
using System;
5+
using System.Text;
6+
using System.Linq;
7+
using System.Text.Json.Serialization;
8+
using System.Collections.Generic;
9+
using Algolia.Search.Serializer;
10+
using System.Text.Json;
11+
12+
namespace Algolia.Search.Models.Search;
13+
14+
/// <summary>
15+
/// Whether a dictionary entry is provided by Algolia (standard), or has been added by you (custom).
16+
/// </summary>
17+
/// <value>Whether a dictionary entry is provided by Algolia (standard), or has been added by you (custom).</value>
18+
public enum DictionaryEntryType
19+
{
20+
/// <summary>
21+
/// Enum Custom for value: custom
22+
/// </summary>
23+
[JsonPropertyName("custom")]
24+
Custom = 1,
25+
26+
/// <summary>
27+
/// Enum Standard for value: standard
28+
/// </summary>
29+
[JsonPropertyName("standard")]
30+
Standard = 2
31+
}
32+

clients/algoliasearch-client-dart/packages/client_search/lib/algolia_client_search.dart

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export 'src/model/deleted_at_response.dart';
4747
export 'src/model/dictionary_action.dart';
4848
export 'src/model/dictionary_entry.dart';
4949
export 'src/model/dictionary_entry_state.dart';
50+
export 'src/model/dictionary_entry_type.dart';
5051
export 'src/model/dictionary_language.dart';
5152
export 'src/model/dictionary_settings_params.dart';
5253
export 'src/model/dictionary_type.dart';

clients/algoliasearch-client-dart/packages/client_search/lib/src/deserialize.dart

+3
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ import 'package:algolia_client_search/src/model/deleted_at_response.dart';
4040
import 'package:algolia_client_search/src/model/dictionary_action.dart';
4141
import 'package:algolia_client_search/src/model/dictionary_entry.dart';
4242
import 'package:algolia_client_search/src/model/dictionary_entry_state.dart';
43+
import 'package:algolia_client_search/src/model/dictionary_entry_type.dart';
4344
import 'package:algolia_client_search/src/model/dictionary_language.dart';
4445
import 'package:algolia_client_search/src/model/dictionary_settings_params.dart';
4546
import 'package:algolia_client_search/src/model/dictionary_type.dart';
@@ -278,6 +279,8 @@ ReturnType deserialize<ReturnType, BaseType>(dynamic value, String targetType,
278279
as ReturnType;
279280
case 'DictionaryEntryState':
280281
return DictionaryEntryState.fromJson(value) as ReturnType;
282+
case 'DictionaryEntryType':
283+
return DictionaryEntryType.fromJson(value) as ReturnType;
281284
case 'DictionaryLanguage':
282285
return DictionaryLanguage.fromJson(value as Map<String, dynamic>)
283286
as ReturnType;

clients/algoliasearch-client-dart/packages/client_search/lib/src/model/dictionary_entry.dart

+8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
22
// ignore_for_file: unused_element
33
import 'package:algolia_client_search/src/model/supported_language.dart';
4+
import 'package:algolia_client_search/src/model/dictionary_entry_type.dart';
45
import 'package:algolia_client_search/src/model/dictionary_entry_state.dart';
56

67
import 'package:collection/collection.dart';
@@ -18,6 +19,7 @@ final class DictionaryEntry extends DelegatingMap<String, dynamic> {
1819
this.words,
1920
this.decomposition,
2021
this.state,
22+
this.type,
2123
Map<String, dynamic> additionalProperties = const {},
2224
}) : super(additionalProperties);
2325

@@ -43,6 +45,9 @@ final class DictionaryEntry extends DelegatingMap<String, dynamic> {
4345
@JsonKey(name: r'state')
4446
final DictionaryEntryState? state;
4547

48+
@JsonKey(name: r'type')
49+
final DictionaryEntryType? type;
50+
4651
@override
4752
bool operator ==(Object other) =>
4853
identical(this, other) ||
@@ -53,6 +58,7 @@ final class DictionaryEntry extends DelegatingMap<String, dynamic> {
5358
other.words == words &&
5459
other.decomposition == decomposition &&
5560
other.state == state &&
61+
other.type == type &&
5662
const MapEquality<String, dynamic>().equals(this, this);
5763

5864
@override
@@ -63,6 +69,7 @@ final class DictionaryEntry extends DelegatingMap<String, dynamic> {
6369
words.hashCode +
6470
decomposition.hashCode +
6571
state.hashCode +
72+
type.hashCode +
6673
const MapEquality<String, dynamic>().hash(this);
6774

6875
factory DictionaryEntry.fromJson(Map<String, dynamic> json) {
@@ -76,6 +83,7 @@ final class DictionaryEntry extends DelegatingMap<String, dynamic> {
7683
words: instance.words,
7784
decomposition: instance.decomposition,
7885
state: instance.state,
86+
type: instance.type,
7987
additionalProperties: additionalProperties,
8088
);
8189
}

clients/algoliasearch-client-dart/packages/client_search/lib/src/model/dictionary_entry.g.dart

+9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2+
// ignore_for_file: unused_element
3+
import 'package:json_annotation/json_annotation.dart';
4+
5+
/// Whether a dictionary entry is provided by Algolia (standard), or has been added by you (custom).
6+
@JsonEnum(valueField: 'raw')
7+
enum DictionaryEntryType {
8+
custom(r'custom'),
9+
standard(r'standard');
10+
11+
const DictionaryEntryType(this.raw);
12+
final dynamic raw;
13+
14+
dynamic toJson() => raw;
15+
16+
static DictionaryEntryType fromJson(dynamic json) {
17+
for (final value in values) {
18+
if (value.raw == json) return value;
19+
}
20+
throw ArgumentError.value(json, "raw", "No enum value with that value");
21+
}
22+
23+
@override
24+
String toString() => raw.toString();
25+
}

clients/algoliasearch-client-go/algolia/search/model_dictionary_entry.go

+45
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

clients/algoliasearch-client-go/algolia/search/model_dictionary_entry_type.go

+65
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)