Skip to content

Commit 3b10b8e

Browse files
algolia-botFluf22
andcommitted
chore(website): exclude schema from generated variables file (#5306) (generated) [skip ci]
Co-authored-by: Thomas Raffray <[email protected]>
1 parent f4eee1c commit 3b10b8e

File tree

59 files changed

+2960
-95
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+2960
-95
lines changed
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
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.Collections.Generic;
6+
using System.Linq;
7+
using System.Text;
8+
using System.Text.Json;
9+
using System.Text.Json.Serialization;
10+
using Algolia.Search.Serializer;
11+
12+
namespace Algolia.Search.Models.Composition;
13+
14+
/// <summary>
15+
/// ExternalInjectedItem
16+
/// </summary>
17+
public partial class ExternalInjectedItem
18+
{
19+
/// <summary>
20+
/// Initializes a new instance of the ExternalInjectedItem class.
21+
/// </summary>
22+
[JsonConstructor]
23+
public ExternalInjectedItem() { }
24+
25+
/// <summary>
26+
/// Initializes a new instance of the ExternalInjectedItem class.
27+
/// </summary>
28+
/// <param name="items">items (required).</param>
29+
public ExternalInjectedItem(List<ExternalInjection> items)
30+
{
31+
Items = items ?? throw new ArgumentNullException(nameof(items));
32+
}
33+
34+
/// <summary>
35+
/// Gets or Sets Items
36+
/// </summary>
37+
[JsonPropertyName("items")]
38+
public List<ExternalInjection> Items { get; set; }
39+
40+
/// <summary>
41+
/// Returns the string presentation of the object
42+
/// </summary>
43+
/// <returns>String presentation of the object</returns>
44+
public override string ToString()
45+
{
46+
StringBuilder sb = new StringBuilder();
47+
sb.Append("class ExternalInjectedItem {\n");
48+
sb.Append(" Items: ").Append(Items).Append("\n");
49+
sb.Append("}\n");
50+
return sb.ToString();
51+
}
52+
53+
/// <summary>
54+
/// Returns the JSON string presentation of the object
55+
/// </summary>
56+
/// <returns>JSON string presentation of the object</returns>
57+
public virtual string ToJson()
58+
{
59+
return JsonSerializer.Serialize(this, JsonConfig.Options);
60+
}
61+
62+
/// <summary>
63+
/// Returns true if objects are equal
64+
/// </summary>
65+
/// <param name="obj">Object to be compared</param>
66+
/// <returns>Boolean</returns>
67+
public override bool Equals(object obj)
68+
{
69+
if (obj is not ExternalInjectedItem input)
70+
{
71+
return false;
72+
}
73+
74+
return (
75+
Items == input.Items
76+
|| Items != null && input.Items != null && Items.SequenceEqual(input.Items)
77+
);
78+
}
79+
80+
/// <summary>
81+
/// Gets the hash code
82+
/// </summary>
83+
/// <returns>Hash code</returns>
84+
public override int GetHashCode()
85+
{
86+
unchecked // Overflow is fine, just wrap
87+
{
88+
int hashCode = 41;
89+
if (Items != null)
90+
{
91+
hashCode = (hashCode * 59) + Items.GetHashCode();
92+
}
93+
return hashCode;
94+
}
95+
}
96+
}
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
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.Collections.Generic;
6+
using System.Linq;
7+
using System.Text;
8+
using System.Text.Json;
9+
using System.Text.Json.Serialization;
10+
using Algolia.Search.Serializer;
11+
12+
namespace Algolia.Search.Models.Composition;
13+
14+
/// <summary>
15+
/// ExternalInjection
16+
/// </summary>
17+
public partial class ExternalInjection
18+
{
19+
/// <summary>
20+
/// Initializes a new instance of the ExternalInjection class.
21+
/// </summary>
22+
[JsonConstructor]
23+
public ExternalInjection() { }
24+
25+
/// <summary>
26+
/// Initializes a new instance of the ExternalInjection class.
27+
/// </summary>
28+
/// <param name="objectID">An objectID injected into an external source. (required).</param>
29+
public ExternalInjection(string objectID)
30+
{
31+
ObjectID = objectID ?? throw new ArgumentNullException(nameof(objectID));
32+
}
33+
34+
/// <summary>
35+
/// An objectID injected into an external source.
36+
/// </summary>
37+
/// <value>An objectID injected into an external source.</value>
38+
[JsonPropertyName("objectID")]
39+
public string ObjectID { get; set; }
40+
41+
/// <summary>
42+
/// User-defined key-values that will be added to the injected item in the response. This is identical to Hits metadata defined in Composition or Composition Rule, with the benefit of being set at runtime.
43+
/// </summary>
44+
/// <value>User-defined key-values that will be added to the injected item in the response. This is identical to Hits metadata defined in Composition or Composition Rule, with the benefit of being set at runtime. </value>
45+
[JsonPropertyName("metadata")]
46+
public Dictionary<string, object> Metadata { get; set; }
47+
48+
/// <summary>
49+
/// Returns the string presentation of the object
50+
/// </summary>
51+
/// <returns>String presentation of the object</returns>
52+
public override string ToString()
53+
{
54+
StringBuilder sb = new StringBuilder();
55+
sb.Append("class ExternalInjection {\n");
56+
sb.Append(" ObjectID: ").Append(ObjectID).Append("\n");
57+
sb.Append(" Metadata: ").Append(Metadata).Append("\n");
58+
sb.Append("}\n");
59+
return sb.ToString();
60+
}
61+
62+
/// <summary>
63+
/// Returns the JSON string presentation of the object
64+
/// </summary>
65+
/// <returns>JSON string presentation of the object</returns>
66+
public virtual string ToJson()
67+
{
68+
return JsonSerializer.Serialize(this, JsonConfig.Options);
69+
}
70+
71+
/// <summary>
72+
/// Returns true if objects are equal
73+
/// </summary>
74+
/// <param name="obj">Object to be compared</param>
75+
/// <returns>Boolean</returns>
76+
public override bool Equals(object obj)
77+
{
78+
if (obj is not ExternalInjection input)
79+
{
80+
return false;
81+
}
82+
83+
return (ObjectID == input.ObjectID || (ObjectID != null && ObjectID.Equals(input.ObjectID)))
84+
&& (
85+
Metadata == input.Metadata
86+
|| Metadata != null && input.Metadata != null && Metadata.SequenceEqual(input.Metadata)
87+
);
88+
}
89+
90+
/// <summary>
91+
/// Gets the hash code
92+
/// </summary>
93+
/// <returns>Hash code</returns>
94+
public override int GetHashCode()
95+
{
96+
unchecked // Overflow is fine, just wrap
97+
{
98+
int hashCode = 41;
99+
if (ObjectID != null)
100+
{
101+
hashCode = (hashCode * 59) + ObjectID.GetHashCode();
102+
}
103+
if (Metadata != null)
104+
{
105+
hashCode = (hashCode * 59) + Metadata.GetHashCode();
106+
}
107+
return hashCode;
108+
}
109+
}
110+
}

clients/algoliasearch-client-csharp/algoliasearch/Models/Composition/Params.cs

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,13 @@ public Params() { }
197197
[JsonPropertyName("enableReRanking")]
198198
public bool? EnableReRanking { get; set; }
199199

200+
/// <summary>
201+
/// A list of extenrally injected objectID groups into from an external source.
202+
/// </summary>
203+
/// <value>A list of extenrally injected objectID groups into from an external source. </value>
204+
[JsonPropertyName("injectedItems")]
205+
public Dictionary<string, ExternalInjectedItem> InjectedItems { get; set; }
206+
200207
/// <summary>
201208
/// Returns the string presentation of the object
202209
/// </summary>
@@ -231,6 +238,7 @@ public override string ToString()
231238
sb.Append(" AnalyticsTags: ").Append(AnalyticsTags).Append("\n");
232239
sb.Append(" EnableABTest: ").Append(EnableABTest).Append("\n");
233240
sb.Append(" EnableReRanking: ").Append(EnableReRanking).Append("\n");
241+
sb.Append(" InjectedItems: ").Append(InjectedItems).Append("\n");
234242
sb.Append("}\n");
235243
return sb.ToString();
236244
}
@@ -336,8 +344,12 @@ public override bool Equals(object obj)
336344
&& AnalyticsTags.SequenceEqual(input.AnalyticsTags)
337345
)
338346
&& (EnableABTest == input.EnableABTest || EnableABTest.Equals(input.EnableABTest))
347+
&& (EnableReRanking == input.EnableReRanking || EnableReRanking.Equals(input.EnableReRanking))
339348
&& (
340-
EnableReRanking == input.EnableReRanking || EnableReRanking.Equals(input.EnableReRanking)
349+
InjectedItems == input.InjectedItems
350+
|| InjectedItems != null
351+
&& input.InjectedItems != null
352+
&& InjectedItems.SequenceEqual(input.InjectedItems)
341353
);
342354
}
343355

@@ -421,6 +433,10 @@ public override int GetHashCode()
421433
}
422434
hashCode = (hashCode * 59) + EnableABTest.GetHashCode();
423435
hashCode = (hashCode * 59) + EnableReRanking.GetHashCode();
436+
if (InjectedItems != null)
437+
{
438+
hashCode = (hashCode * 59) + InjectedItems.GetHashCode();
439+
}
424440
return hashCode;
425441
}
426442
}

clients/algoliasearch-client-dart/packages/client_composition/lib/algolia_client_composition.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ export 'src/model/composition_run_search_response.dart';
1919
export 'src/model/compositions_search_response.dart';
2020
export 'src/model/error_base.dart';
2121
export 'src/model/exhaustive.dart';
22+
export 'src/model/external_injected_item.dart';
23+
export 'src/model/external_injection.dart';
2224
export 'src/model/facet_hits.dart';
2325
export 'src/model/facet_ordering.dart';
2426
export 'src/model/facet_stats.dart';

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ import 'package:algolia_client_composition/src/model/composition_run_search_resp
1212
import 'package:algolia_client_composition/src/model/compositions_search_response.dart';
1313
import 'package:algolia_client_composition/src/model/error_base.dart';
1414
import 'package:algolia_client_composition/src/model/exhaustive.dart';
15+
import 'package:algolia_client_composition/src/model/external_injected_item.dart';
16+
import 'package:algolia_client_composition/src/model/external_injection.dart';
1517
import 'package:algolia_client_composition/src/model/facet_hits.dart';
1618
import 'package:algolia_client_composition/src/model/facet_ordering.dart';
1719
import 'package:algolia_client_composition/src/model/facet_stats.dart';
@@ -106,6 +108,12 @@ ReturnType deserialize<ReturnType, BaseType>(dynamic value, String targetType,
106108
return ErrorBase.fromJson(value as Map<String, dynamic>) as ReturnType;
107109
case 'Exhaustive':
108110
return Exhaustive.fromJson(value as Map<String, dynamic>) as ReturnType;
111+
case 'ExternalInjectedItem':
112+
return ExternalInjectedItem.fromJson(value as Map<String, dynamic>)
113+
as ReturnType;
114+
case 'ExternalInjection':
115+
return ExternalInjection.fromJson(value as Map<String, dynamic>)
116+
as ReturnType;
109117
case 'FacetHits':
110118
return FacetHits.fromJson(value as Map<String, dynamic>) as ReturnType;
111119
case 'FacetOrdering':
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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:algolia_client_composition/src/model/external_injection.dart';
4+
5+
import 'package:json_annotation/json_annotation.dart';
6+
7+
part 'external_injected_item.g.dart';
8+
9+
@JsonSerializable()
10+
final class ExternalInjectedItem {
11+
/// Returns a new [ExternalInjectedItem] instance.
12+
const ExternalInjectedItem({
13+
required this.items,
14+
});
15+
16+
@JsonKey(name: r'items')
17+
final List<ExternalInjection> items;
18+
19+
@override
20+
bool operator ==(Object other) =>
21+
identical(this, other) ||
22+
other is ExternalInjectedItem && other.items == items;
23+
24+
@override
25+
int get hashCode => items.hashCode;
26+
27+
factory ExternalInjectedItem.fromJson(Map<String, dynamic> json) =>
28+
_$ExternalInjectedItemFromJson(json);
29+
30+
Map<String, dynamic> toJson() => _$ExternalInjectedItemToJson(this);
31+
32+
@override
33+
String toString() {
34+
return toJson().toString();
35+
}
36+
}

clients/algoliasearch-client-dart/packages/client_composition/lib/src/model/external_injected_item.g.dart

Lines changed: 31 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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+
4+
import 'package:json_annotation/json_annotation.dart';
5+
6+
part 'external_injection.g.dart';
7+
8+
@JsonSerializable()
9+
final class ExternalInjection {
10+
/// Returns a new [ExternalInjection] instance.
11+
const ExternalInjection({
12+
required this.objectID,
13+
this.metadata,
14+
});
15+
16+
/// An objectID injected into an external source.
17+
@JsonKey(name: r'objectID')
18+
final String objectID;
19+
20+
/// User-defined key-values that will be added to the injected item in the response. This is identical to Hits metadata defined in Composition or Composition Rule, with the benefit of being set at runtime.
21+
@JsonKey(name: r'metadata')
22+
final Map<String, Object>? metadata;
23+
24+
@override
25+
bool operator ==(Object other) =>
26+
identical(this, other) ||
27+
other is ExternalInjection &&
28+
other.objectID == objectID &&
29+
other.metadata == metadata;
30+
31+
@override
32+
int get hashCode => objectID.hashCode + metadata.hashCode;
33+
34+
factory ExternalInjection.fromJson(Map<String, dynamic> json) =>
35+
_$ExternalInjectionFromJson(json);
36+
37+
Map<String, dynamic> toJson() => _$ExternalInjectionToJson(this);
38+
39+
@override
40+
String toString() {
41+
return toJson().toString();
42+
}
43+
}

0 commit comments

Comments
 (0)