Skip to content

Commit e5cfde5

Browse files
feat(specs): add renderingContent query parameter in Composition API main injection (#5549) (generated) [skip ci]
Co-authored-by: Clara Muller <5667350+ClaraMuller@users.noreply.github.com>
1 parent d9b21b4 commit e5cfde5

File tree

47 files changed

+265
-104
lines changed

Some content is hidden

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

47 files changed

+265
-104
lines changed

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,12 @@ public MainInjectionQueryParameters() { }
367367
[JsonPropertyName("maxValuesPerFacet")]
368368
public int? MaxValuesPerFacet { get; set; }
369369

370+
/// <summary>
371+
/// Gets or Sets RenderingContent
372+
/// </summary>
373+
[JsonPropertyName("renderingContent")]
374+
public RenderingContent RenderingContent { get; set; }
375+
370376
/// <summary>
371377
/// Order in which to retrieve facet values - `count`. Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value - `alpha`. Retrieve facet values alphabetically This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js).
372378
/// </summary>
@@ -446,6 +452,7 @@ public override string ToString()
446452
sb.Append(" Facets: ").Append(Facets).Append("\n");
447453
sb.Append(" HitsPerPage: ").Append(HitsPerPage).Append("\n");
448454
sb.Append(" MaxValuesPerFacet: ").Append(MaxValuesPerFacet).Append("\n");
455+
sb.Append(" RenderingContent: ").Append(RenderingContent).Append("\n");
449456
sb.Append(" SortFacetValuesBy: ").Append(SortFacetValuesBy).Append("\n");
450457
sb.Append(" SumOrFiltersScores: ").Append(SumOrFiltersScores).Append("\n");
451458
sb.Append("}\n");
@@ -658,6 +665,10 @@ public override bool Equals(object obj)
658665
MaxValuesPerFacet == input.MaxValuesPerFacet
659666
|| MaxValuesPerFacet.Equals(input.MaxValuesPerFacet)
660667
)
668+
&& (
669+
RenderingContent == input.RenderingContent
670+
|| (RenderingContent != null && RenderingContent.Equals(input.RenderingContent))
671+
)
661672
&& (
662673
SortFacetValuesBy == input.SortFacetValuesBy
663674
|| (SortFacetValuesBy != null && SortFacetValuesBy.Equals(input.SortFacetValuesBy))
@@ -803,6 +814,10 @@ public override int GetHashCode()
803814
}
804815
hashCode = (hashCode * 59) + HitsPerPage.GetHashCode();
805816
hashCode = (hashCode * 59) + MaxValuesPerFacet.GetHashCode();
817+
if (RenderingContent != null)
818+
{
819+
hashCode = (hashCode * 59) + RenderingContent.GetHashCode();
820+
}
806821
if (SortFacetValuesBy != null)
807822
{
808823
hashCode = (hashCode * 59) + SortFacetValuesBy.GetHashCode();

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import 'package:algolia_client_composition/src/model/query_type.dart';
55
import 'package:algolia_client_composition/src/model/supported_language.dart';
66
import 'package:algolia_client_composition/src/model/advanced_syntax_features.dart';
77
import 'package:algolia_client_composition/src/model/exact_on_single_word_query.dart';
8+
import 'package:algolia_client_composition/src/model/rendering_content.dart';
89
import 'package:algolia_client_composition/src/model/remove_words_if_no_results.dart';
910

1011
import 'package:json_annotation/json_annotation.dart';
@@ -66,6 +67,7 @@ final class MainInjectionQueryParameters {
6667
this.facets,
6768
this.hitsPerPage,
6869
this.maxValuesPerFacet,
70+
this.renderingContent,
6971
this.sortFacetValuesBy,
7072
this.sumOrFiltersScores,
7173
});
@@ -299,6 +301,9 @@ final class MainInjectionQueryParameters {
299301
@JsonKey(name: r'maxValuesPerFacet')
300302
final int? maxValuesPerFacet;
301303

304+
@JsonKey(name: r'renderingContent')
305+
final RenderingContent? renderingContent;
306+
302307
/// Order in which to retrieve facet values - `count`. Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value - `alpha`. Retrieve facet values alphabetically This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js).
303308
@JsonKey(name: r'sortFacetValuesBy')
304309
final String? sortFacetValuesBy;
@@ -365,6 +370,7 @@ final class MainInjectionQueryParameters {
365370
other.facets == facets &&
366371
other.hitsPerPage == hitsPerPage &&
367372
other.maxValuesPerFacet == maxValuesPerFacet &&
373+
other.renderingContent == renderingContent &&
368374
other.sortFacetValuesBy == sortFacetValuesBy &&
369375
other.sumOrFiltersScores == sumOrFiltersScores;
370376

@@ -421,6 +427,7 @@ final class MainInjectionQueryParameters {
421427
facets.hashCode +
422428
hitsPerPage.hashCode +
423429
maxValuesPerFacet.hashCode +
430+
renderingContent.hashCode +
424431
sortFacetValuesBy.hashCode +
425432
sumOrFiltersScores.hashCode;
426433

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

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

clients/algoliasearch-client-go/algolia/composition/model_main_injection_query_parameters.go

Lines changed: 50 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/composition/MainInjectionQueryParameters.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,9 @@ public class MainInjectionQueryParameters {
165165
@JsonProperty("maxValuesPerFacet")
166166
private Integer maxValuesPerFacet;
167167

168+
@JsonProperty("renderingContent")
169+
private RenderingContent renderingContent;
170+
168171
@JsonProperty("sortFacetValuesBy")
169172
private String sortFacetValuesBy;
170173

@@ -1013,6 +1016,17 @@ public Integer getMaxValuesPerFacet() {
10131016
return maxValuesPerFacet;
10141017
}
10151018

1019+
public MainInjectionQueryParameters setRenderingContent(RenderingContent renderingContent) {
1020+
this.renderingContent = renderingContent;
1021+
return this;
1022+
}
1023+
1024+
/** Get renderingContent */
1025+
@javax.annotation.Nullable
1026+
public RenderingContent getRenderingContent() {
1027+
return renderingContent;
1028+
}
1029+
10161030
public MainInjectionQueryParameters setSortFacetValuesBy(String sortFacetValuesBy) {
10171031
this.sortFacetValuesBy = sortFacetValuesBy;
10181032
return this;
@@ -1106,6 +1120,7 @@ public boolean equals(Object o) {
11061120
Objects.equals(this.facets, mainInjectionQueryParameters.facets) &&
11071121
Objects.equals(this.hitsPerPage, mainInjectionQueryParameters.hitsPerPage) &&
11081122
Objects.equals(this.maxValuesPerFacet, mainInjectionQueryParameters.maxValuesPerFacet) &&
1123+
Objects.equals(this.renderingContent, mainInjectionQueryParameters.renderingContent) &&
11091124
Objects.equals(this.sortFacetValuesBy, mainInjectionQueryParameters.sortFacetValuesBy) &&
11101125
Objects.equals(this.sumOrFiltersScores, mainInjectionQueryParameters.sumOrFiltersScores)
11111126
);
@@ -1165,6 +1180,7 @@ public int hashCode() {
11651180
facets,
11661181
hitsPerPage,
11671182
maxValuesPerFacet,
1183+
renderingContent,
11681184
sortFacetValuesBy,
11691185
sumOrFiltersScores
11701186
);
@@ -1228,6 +1244,7 @@ public String toString() {
12281244
sb.append(" facets: ").append(toIndentedString(facets)).append("\n");
12291245
sb.append(" hitsPerPage: ").append(toIndentedString(hitsPerPage)).append("\n");
12301246
sb.append(" maxValuesPerFacet: ").append(toIndentedString(maxValuesPerFacet)).append("\n");
1247+
sb.append(" renderingContent: ").append(toIndentedString(renderingContent)).append("\n");
12311248
sb.append(" sortFacetValuesBy: ").append(toIndentedString(sortFacetValuesBy)).append("\n");
12321249
sb.append(" sumOrFiltersScores: ").append(toIndentedString(sumOrFiltersScores)).append("\n");
12331250
sb.append("}");

clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/composition/MainInjectionQueryParameters.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ import kotlinx.serialization.json.*
189189
* [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts).
190190
* @param hitsPerPage Number of hits per page.
191191
* @param maxValuesPerFacet Maximum number of facet values to return for each facet.
192+
* @param renderingContent
192193
* @param sortFacetValuesBy Order in which to retrieve facet values - `count`. Facet values are
193194
* retrieved by decreasing count. The count is the number of matching records containing this
194195
* facet value - `alpha`. Retrieve facet values alphabetically This setting doesn't influence how
@@ -512,6 +513,7 @@ public data class MainInjectionQueryParameters(
512513

513514
/** Maximum number of facet values to return for each facet. */
514515
@SerialName(value = "maxValuesPerFacet") val maxValuesPerFacet: Int? = null,
516+
@SerialName(value = "renderingContent") val renderingContent: RenderingContent? = null,
515517

516518
/**
517519
* Order in which to retrieve facet values - `count`. Facet values are retrieved by decreasing

clients/algoliasearch-client-php/lib/Model/Composition/MainInjectionQueryParameters.php

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ class MainInjectionQueryParameters extends AbstractModel implements ModelInterfa
7171
'facets' => 'string[]',
7272
'hitsPerPage' => 'int',
7373
'maxValuesPerFacet' => 'int',
74+
'renderingContent' => '\Algolia\AlgoliaSearch\Model\Composition\RenderingContent',
7475
'sortFacetValuesBy' => 'string',
7576
'sumOrFiltersScores' => 'bool',
7677
];
@@ -132,6 +133,7 @@ class MainInjectionQueryParameters extends AbstractModel implements ModelInterfa
132133
'facets' => null,
133134
'hitsPerPage' => null,
134135
'maxValuesPerFacet' => null,
136+
'renderingContent' => null,
135137
'sortFacetValuesBy' => null,
136138
'sumOrFiltersScores' => null,
137139
];
@@ -194,6 +196,7 @@ class MainInjectionQueryParameters extends AbstractModel implements ModelInterfa
194196
'facets' => 'facets',
195197
'hitsPerPage' => 'hitsPerPage',
196198
'maxValuesPerFacet' => 'maxValuesPerFacet',
199+
'renderingContent' => 'renderingContent',
197200
'sortFacetValuesBy' => 'sortFacetValuesBy',
198201
'sumOrFiltersScores' => 'sumOrFiltersScores',
199202
];
@@ -255,6 +258,7 @@ class MainInjectionQueryParameters extends AbstractModel implements ModelInterfa
255258
'facets' => 'setFacets',
256259
'hitsPerPage' => 'setHitsPerPage',
257260
'maxValuesPerFacet' => 'setMaxValuesPerFacet',
261+
'renderingContent' => 'setRenderingContent',
258262
'sortFacetValuesBy' => 'setSortFacetValuesBy',
259263
'sumOrFiltersScores' => 'setSumOrFiltersScores',
260264
];
@@ -316,6 +320,7 @@ class MainInjectionQueryParameters extends AbstractModel implements ModelInterfa
316320
'facets' => 'getFacets',
317321
'hitsPerPage' => 'getHitsPerPage',
318322
'maxValuesPerFacet' => 'getMaxValuesPerFacet',
323+
'renderingContent' => 'getRenderingContent',
319324
'sortFacetValuesBy' => 'getSortFacetValuesBy',
320325
'sumOrFiltersScores' => 'getSumOrFiltersScores',
321326
];
@@ -487,6 +492,9 @@ public function __construct(?array $data = null)
487492
if (isset($data['maxValuesPerFacet'])) {
488493
$this->container['maxValuesPerFacet'] = $data['maxValuesPerFacet'];
489494
}
495+
if (isset($data['renderingContent'])) {
496+
$this->container['renderingContent'] = $data['renderingContent'];
497+
}
490498
if (isset($data['sortFacetValuesBy'])) {
491499
$this->container['sortFacetValuesBy'] = $data['sortFacetValuesBy'];
492500
}
@@ -1791,6 +1799,30 @@ public function setMaxValuesPerFacet($maxValuesPerFacet)
17911799
return $this;
17921800
}
17931801

1802+
/**
1803+
* Gets renderingContent.
1804+
*
1805+
* @return null|RenderingContent
1806+
*/
1807+
public function getRenderingContent()
1808+
{
1809+
return $this->container['renderingContent'] ?? null;
1810+
}
1811+
1812+
/**
1813+
* Sets renderingContent.
1814+
*
1815+
* @param null|RenderingContent $renderingContent renderingContent
1816+
*
1817+
* @return self
1818+
*/
1819+
public function setRenderingContent($renderingContent)
1820+
{
1821+
$this->container['renderingContent'] = $renderingContent;
1822+
1823+
return $this;
1824+
}
1825+
17941826
/**
17951827
* Gets sortFacetValuesBy.
17961828
*

clients/algoliasearch-client-python/algoliasearch/composition/models/main_injection_query_parameters.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
from algoliasearch.composition.models.remove_words_if_no_results import (
3737
RemoveWordsIfNoResults,
3838
)
39+
from algoliasearch.composition.models.rendering_content import RenderingContent
3940
from algoliasearch.composition.models.supported_language import SupportedLanguage
4041
from algoliasearch.composition.models.typo_tolerance import TypoTolerance
4142

@@ -91,6 +92,7 @@
9192
"facets": "facets",
9293
"hits_per_page": "hitsPerPage",
9394
"max_values_per_facet": "maxValuesPerFacet",
95+
"rendering_content": "renderingContent",
9496
"sort_facet_values_by": "sortFacetValuesBy",
9597
"sum_or_filters_scores": "sumOrFiltersScores",
9698
}
@@ -196,6 +198,7 @@ class MainInjectionQueryParameters(BaseModel):
196198
""" Number of hits per page. """
197199
max_values_per_facet: Optional[int] = None
198200
""" Maximum number of facet values to return for each facet. """
201+
rendering_content: Optional[RenderingContent] = None
199202
sort_facet_values_by: Optional[str] = None
200203
""" Order in which to retrieve facet values - `count`. Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value - `alpha`. Retrieve facet values alphabetically This setting doesn't influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js). """
201204
sum_or_filters_scores: Optional[bool] = None
@@ -283,5 +286,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
283286
if obj.get("typoTolerance") is not None
284287
else None
285288
)
289+
obj["renderingContent"] = (
290+
RenderingContent.from_dict(obj["renderingContent"])
291+
if obj.get("renderingContent") is not None
292+
else None
293+
)
286294

287295
return cls.model_validate(obj)

0 commit comments

Comments
 (0)