Skip to content

Commit 41e692e

Browse files
chore: generated code for commit 9776cb3b. [skip ci]
algolia/api-clients-automation@9776cb3 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Clément Vannicatte <[email protected]>
1 parent 3aa9d8c commit 41e692e

File tree

6 files changed

+98
-6
lines changed

6 files changed

+98
-6
lines changed

Sources/Recommend/Models/RecommendRedirect.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ import Foundation
77
#endif
88

99
/// [Redirect results to a
10-
/// URL](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/redirects/).
10+
/// URL](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/redirects/), this
11+
/// this parameter is for internal use only.
1112
public struct RecommendRedirect: Codable, JSONEncodable {
1213
public var index: [RecommendRedirectRuleIndexMetadata]?
1314

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on
2+
// https://github.com/algolia/api-clients-automation. DO NOT EDIT.
3+
4+
import Foundation
5+
#if canImport(Core)
6+
import Core
7+
#endif
8+
9+
/// The redirect rule container.
10+
public struct RecommendRedirectURL: Codable, JSONEncodable {
11+
public var url: String?
12+
13+
public init(url: String? = nil) {
14+
self.url = url
15+
}
16+
17+
public enum CodingKeys: String, CodingKey, CaseIterable {
18+
case url
19+
}
20+
21+
// Encodable protocol methods
22+
23+
public func encode(to encoder: Encoder) throws {
24+
var container = encoder.container(keyedBy: CodingKeys.self)
25+
try container.encodeIfPresent(self.url, forKey: .url)
26+
}
27+
}
28+
29+
extension RecommendRedirectURL: Equatable {
30+
public static func ==(lhs: RecommendRedirectURL, rhs: RecommendRedirectURL) -> Bool {
31+
lhs.url == rhs.url
32+
}
33+
}
34+
35+
extension RecommendRedirectURL: Hashable {
36+
public func hash(into hasher: inout Hasher) {
37+
hasher.combine(self.url?.hashValue)
38+
}
39+
}

Sources/Recommend/Models/RecommendRenderingContent.swift

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,31 +10,37 @@ import Foundation
1010
/// order of facet names and values without changing your frontend code.
1111
public struct RecommendRenderingContent: Codable, JSONEncodable {
1212
public var facetOrdering: RecommendFacetOrdering?
13+
public var redirect: RecommendRedirectURL?
1314

14-
public init(facetOrdering: RecommendFacetOrdering? = nil) {
15+
public init(facetOrdering: RecommendFacetOrdering? = nil, redirect: RecommendRedirectURL? = nil) {
1516
self.facetOrdering = facetOrdering
17+
self.redirect = redirect
1618
}
1719

1820
public enum CodingKeys: String, CodingKey, CaseIterable {
1921
case facetOrdering
22+
case redirect
2023
}
2124

2225
// Encodable protocol methods
2326

2427
public func encode(to encoder: Encoder) throws {
2528
var container = encoder.container(keyedBy: CodingKeys.self)
2629
try container.encodeIfPresent(self.facetOrdering, forKey: .facetOrdering)
30+
try container.encodeIfPresent(self.redirect, forKey: .redirect)
2731
}
2832
}
2933

3034
extension RecommendRenderingContent: Equatable {
3135
public static func ==(lhs: RecommendRenderingContent, rhs: RecommendRenderingContent) -> Bool {
32-
lhs.facetOrdering == rhs.facetOrdering
36+
lhs.facetOrdering == rhs.facetOrdering &&
37+
lhs.redirect == rhs.redirect
3338
}
3439
}
3540

3641
extension RecommendRenderingContent: Hashable {
3742
public func hash(into hasher: inout Hasher) {
3843
hasher.combine(self.facetOrdering?.hashValue)
44+
hasher.combine(self.redirect?.hashValue)
3945
}
4046
}

Sources/Search/Models/SearchRedirect.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ import Foundation
77
#endif
88

99
/// [Redirect results to a
10-
/// URL](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/redirects/).
10+
/// URL](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/redirects/), this
11+
/// this parameter is for internal use only.
1112
public struct SearchRedirect: Codable, JSONEncodable {
1213
public var index: [SearchRedirectRuleIndexMetadata]?
1314

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on
2+
// https://github.com/algolia/api-clients-automation. DO NOT EDIT.
3+
4+
import Foundation
5+
#if canImport(Core)
6+
import Core
7+
#endif
8+
9+
/// The redirect rule container.
10+
public struct SearchRedirectURL: Codable, JSONEncodable {
11+
public var url: String?
12+
13+
public init(url: String? = nil) {
14+
self.url = url
15+
}
16+
17+
public enum CodingKeys: String, CodingKey, CaseIterable {
18+
case url
19+
}
20+
21+
// Encodable protocol methods
22+
23+
public func encode(to encoder: Encoder) throws {
24+
var container = encoder.container(keyedBy: CodingKeys.self)
25+
try container.encodeIfPresent(self.url, forKey: .url)
26+
}
27+
}
28+
29+
extension SearchRedirectURL: Equatable {
30+
public static func ==(lhs: SearchRedirectURL, rhs: SearchRedirectURL) -> Bool {
31+
lhs.url == rhs.url
32+
}
33+
}
34+
35+
extension SearchRedirectURL: Hashable {
36+
public func hash(into hasher: inout Hasher) {
37+
hasher.combine(self.url?.hashValue)
38+
}
39+
}

Sources/Search/Models/SearchRenderingContent.swift

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,31 +10,37 @@ import Foundation
1010
/// order of facet names and values without changing your frontend code.
1111
public struct SearchRenderingContent: Codable, JSONEncodable {
1212
public var facetOrdering: SearchFacetOrdering?
13+
public var redirect: SearchRedirectURL?
1314

14-
public init(facetOrdering: SearchFacetOrdering? = nil) {
15+
public init(facetOrdering: SearchFacetOrdering? = nil, redirect: SearchRedirectURL? = nil) {
1516
self.facetOrdering = facetOrdering
17+
self.redirect = redirect
1618
}
1719

1820
public enum CodingKeys: String, CodingKey, CaseIterable {
1921
case facetOrdering
22+
case redirect
2023
}
2124

2225
// Encodable protocol methods
2326

2427
public func encode(to encoder: Encoder) throws {
2528
var container = encoder.container(keyedBy: CodingKeys.self)
2629
try container.encodeIfPresent(self.facetOrdering, forKey: .facetOrdering)
30+
try container.encodeIfPresent(self.redirect, forKey: .redirect)
2731
}
2832
}
2933

3034
extension SearchRenderingContent: Equatable {
3135
public static func ==(lhs: SearchRenderingContent, rhs: SearchRenderingContent) -> Bool {
32-
lhs.facetOrdering == rhs.facetOrdering
36+
lhs.facetOrdering == rhs.facetOrdering &&
37+
lhs.redirect == rhs.redirect
3338
}
3439
}
3540

3641
extension SearchRenderingContent: Hashable {
3742
public func hash(into hasher: inout Hasher) {
3843
hasher.combine(self.facetOrdering?.hashValue)
44+
hasher.combine(self.redirect?.hashValue)
3945
}
4046
}

0 commit comments

Comments
 (0)