Skip to content

Commit

Permalink
fix(specs): recommend is optional (#3967) (generated) [skip ci]
Browse files Browse the repository at this point in the history
Co-authored-by: Clément Vannicatte <[email protected]>
  • Loading branch information
algolia-bot committed Oct 14, 2024
1 parent 6c04971 commit 91b8d89
Show file tree
Hide file tree
Showing 34 changed files with 141 additions and 119 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,9 @@ public RecommendHit()
/// Initializes a new instance of the RecommendHit class.
/// </summary>
/// <param name="objectID">Unique record identifier. (required).</param>
/// <param name="score">Recommendation score. (required).</param>
public RecommendHit(string objectID, double score)
public RecommendHit(string objectID)
{
ObjectID = objectID ?? throw new ArgumentNullException(nameof(objectID));
Score = score;
AdditionalProperties = new Dictionary<string, object>();
}

Expand Down Expand Up @@ -74,7 +72,7 @@ public RecommendHit(string objectID, double score)
/// </summary>
/// <value>Recommendation score.</value>
[JsonPropertyName("_score")]
public double Score { get; set; }
public double? Score { get; set; }

/// <summary>
/// Gets or Sets additional properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,10 @@ public TrendingFacetHit() { }
/// <summary>
/// Initializes a new instance of the TrendingFacetHit class.
/// </summary>
/// <param name="score">Recommendation score. (required).</param>
/// <param name="facetName">Facet attribute. To be used in combination with &#x60;facetValue&#x60;. If specified, only recommendations matching the facet filter will be returned. (required).</param>
/// <param name="facetValue">Facet value. To be used in combination with &#x60;facetName&#x60;. If specified, only recommendations matching the facet filter will be returned. (required).</param>
public TrendingFacetHit(double score, string facetName, string facetValue)
public TrendingFacetHit(string facetName, string facetValue)
{
Score = score;
FacetName = facetName ?? throw new ArgumentNullException(nameof(facetName));
FacetValue = facetValue ?? throw new ArgumentNullException(nameof(facetValue));
}
Expand All @@ -39,7 +37,7 @@ public TrendingFacetHit(double score, string facetName, string facetValue)
/// </summary>
/// <value>Recommendation score.</value>
[JsonPropertyName("_score")]
public double Score { get; set; }
public double? Score { get; set; }

/// <summary>
/// Facet attribute. To be used in combination with `facetValue`. If specified, only recommendations matching the facet filter will be returned.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ final class RecommendHit extends DelegatingMap<String, dynamic> {
this.snippetResult,
this.rankingInfo,
this.distinctSeqID,
required this.score,
this.score,
Map<String, dynamic> additionalProperties = const {},
}) : super(additionalProperties);

Expand All @@ -42,7 +42,7 @@ final class RecommendHit extends DelegatingMap<String, dynamic> {
// minimum: 0
// maximum: 100
@JsonKey(name: r'_score')
final double score;
final double? score;

@override
bool operator ==(Object other) =>
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ part 'trending_facet_hit.g.dart';
final class TrendingFacetHit {
/// Returns a new [TrendingFacetHit] instance.
const TrendingFacetHit({
required this.score,
this.score,
required this.facetName,
required this.facetValue,
});
Expand All @@ -18,7 +18,7 @@ final class TrendingFacetHit {
// minimum: 0
// maximum: 100
@JsonKey(name: r'_score')
final double score;
final double? score;

/// Facet attribute. To be used in combination with `facetValue`. If specified, only recommendations matching the facet filter will be returned.
@JsonKey(name: r'facetName')
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ final class RecommendHit extends DelegatingMap<String, dynamic> {
this.snippetResult,
this.rankingInfo,
this.distinctSeqID,
required this.score,
this.score,
Map<String, dynamic> additionalProperties = const {},
}) : super(additionalProperties);

Expand All @@ -42,7 +42,7 @@ final class RecommendHit extends DelegatingMap<String, dynamic> {
// minimum: 0
// maximum: 100
@JsonKey(name: r'_score')
final double score;
final double? score;

@override
bool operator ==(Object other) =>
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ part 'trending_facet_hit.g.dart';
final class TrendingFacetHit {
/// Returns a new [TrendingFacetHit] instance.
const TrendingFacetHit({
required this.score,
this.score,
required this.facetName,
required this.facetValue,
});
Expand All @@ -18,7 +18,7 @@ final class TrendingFacetHit {
// minimum: 0
// maximum: 100
@JsonKey(name: r'_score')
final double score;
final double? score;

/// Facet attribute. To be used in combination with `facetValue`. If specified, only recommendations matching the facet filter will be returned.
@JsonKey(name: r'facetName')
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 91b8d89

Please sign in to comment.