Skip to content

Commit 27081d4

Browse files
algolia-botFluf22
andcommitted
chore(website): exclude schema from generated variables file (generated)
algolia/api-clients-automation#5306 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Thomas Raffray <[email protected]>
1 parent 1cb7333 commit 27081d4

File tree

3 files changed

+223
-1
lines changed

3 files changed

+223
-1
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+
}

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
}

0 commit comments

Comments
 (0)