Skip to content

Commit

Permalink
chore: generated code for commit 2ac508f. [skip ci]
Browse files Browse the repository at this point in the history
Co-authored-by: Mouaad Aallam <mouaad.aallam@algolia.com>
  • Loading branch information
algolia-bot and aallam committed Jul 28, 2023
1 parent 2ac508f commit 5494994
Show file tree
Hide file tree
Showing 75 changed files with 2,850 additions and 2,769 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export 'src/model/edit.dart';
export 'src/model/edit_type.dart';
export 'src/model/error_base.dart';
export 'src/model/exact_on_single_word_query.dart';
export 'src/model/facet_hits.dart';
export 'src/model/facet_ordering.dart';
export 'src/model/facets.dart';
export 'src/model/facets_stats.dart';
Expand Down Expand Up @@ -69,6 +70,7 @@ export 'src/model/remove_words_if_no_results.dart';
export 'src/model/rendering_content.dart';
export 'src/model/rule.dart';
export 'src/model/scope_type.dart';
export 'src/model/search_for_facet_values_response.dart';
export 'src/model/search_for_facets.dart';
export 'src/model/search_for_facets_options.dart';
export 'src/model/search_for_hits.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import 'package:algoliasearch/src/model/dictionary_entry.dart';
import 'package:algoliasearch/src/model/dictionary_language.dart';
import 'package:algoliasearch/src/model/edit.dart';
import 'package:algoliasearch/src/model/error_base.dart';
import 'package:algoliasearch/src/model/facet_hits.dart';
import 'package:algoliasearch/src/model/facet_ordering.dart';
import 'package:algoliasearch/src/model/facets.dart';
import 'package:algoliasearch/src/model/facets_stats.dart';
Expand All @@ -43,6 +44,7 @@ import 'package:algoliasearch/src/model/redirect_rule_index_metadata.dart';
import 'package:algoliasearch/src/model/redirect_rule_index_metadata_data.dart';
import 'package:algoliasearch/src/model/rendering_content.dart';
import 'package:algoliasearch/src/model/rule.dart';
import 'package:algoliasearch/src/model/search_for_facet_values_response.dart';
import 'package:algoliasearch/src/model/search_for_facets.dart';
import 'package:algoliasearch/src/model/search_for_facets_options.dart';
import 'package:algoliasearch/src/model/search_for_hits.dart';
Expand Down Expand Up @@ -158,6 +160,8 @@ ReturnType deserialize<ReturnType, BaseType>(dynamic value, String targetType,
case 'ErrorBase':
return ErrorBase.fromJson(value as Map<String, dynamic>) as ReturnType;
case 'ExactOnSingleWordQuery':
case 'FacetHits':
return FacetHits.fromJson(value as Map<String, dynamic>) as ReturnType;
case 'FacetOrdering':
return FacetOrdering.fromJson(value as Map<String, dynamic>)
as ReturnType;
Expand Down Expand Up @@ -223,6 +227,9 @@ ReturnType deserialize<ReturnType, BaseType>(dynamic value, String targetType,
case 'Rule':
return Rule.fromJson(value as Map<String, dynamic>) as ReturnType;
case 'ScopeType':
case 'SearchForFacetValuesResponse':
return SearchForFacetValuesResponse.fromJson(
value as Map<String, dynamic>) as ReturnType;
case 'SearchForFacets':
return SearchForFacets.fromJson(value as Map<String, dynamic>)
as ReturnType;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// 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.
// ignore_for_file: unused_element

import 'package:json_annotation/json_annotation.dart';

part 'facet_hits.g.dart';

@JsonSerializable()
final class FacetHits {
/// Returns a new [FacetHits] instance.
const FacetHits({
required this.value,
required this.highlighted,
required this.count,
});

/// Facet value.
@JsonKey(name: r'value')
final String value;

/// Markup text with `facetQuery` matches highlighted.
@JsonKey(name: r'highlighted')
final String highlighted;

/// Number of records containing this facet value. This takes into account the extra search parameters specified in the query. Like for a regular search query, the [counts may not be exhaustive](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-).
@JsonKey(name: r'count')
final int count;

@override
bool operator ==(Object other) =>
identical(this, other) ||
other is FacetHits &&
other.value == value &&
other.highlighted == highlighted &&
other.count == count;

@override
int get hashCode => value.hashCode + highlighted.hashCode + count.hashCode;

factory FacetHits.fromJson(Map<String, dynamic> json) =>
_$FacetHitsFromJson(json);

Map<String, dynamic> toJson() => _$FacetHitsToJson(this);

@override
String toString() {
return toJson().toString();
}
}

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
@@ -0,0 +1,36 @@
// 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.
// ignore_for_file: unused_element
import 'package:algoliasearch/src/model/facet_hits.dart';

import 'package:json_annotation/json_annotation.dart';

part 'search_for_facet_values_response.g.dart';

@JsonSerializable()
final class SearchForFacetValuesResponse {
/// Returns a new [SearchForFacetValuesResponse] instance.
const SearchForFacetValuesResponse({
required this.facetHits,
});

@JsonKey(name: r'facetHits')
final List<FacetHits> facetHits;

@override
bool operator ==(Object other) =>
identical(this, other) ||
other is SearchForFacetValuesResponse && other.facetHits == facetHits;

@override
int get hashCode => facetHits.hashCode;

factory SearchForFacetValuesResponse.fromJson(Map<String, dynamic> json) =>
_$SearchForFacetValuesResponseFromJson(json);

Map<String, dynamic> toJson() => _$SearchForFacetValuesResponseToJson(this);

@override
String toString() {
return toJson().toString();
}
}

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
@@ -1,6 +1,5 @@
// 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.
// ignore_for_file: unused_element
import 'package:algoliasearch/src/model/search_response.dart';

import 'package:json_annotation/json_annotation.dart';

Expand All @@ -14,7 +13,7 @@ final class SearchResponses {
});

@JsonKey(name: r'results')
final List<SearchResponse> results;
final Iterable<dynamic> results;

@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
@@ -1,6 +1,5 @@
// 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.
// ignore_for_file: unused_element
import 'package:algolia_client_search/src/model/search_response.dart';

import 'package:json_annotation/json_annotation.dart';

Expand All @@ -14,7 +13,7 @@ final class SearchResponses {
});

@JsonKey(name: r'results')
final List<SearchResponse> results;
final Iterable<dynamic> results;

@override
bool operator ==(Object other) =>
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.

Loading

0 comments on commit 5494994

Please sign in to comment.