Skip to content

Commit

Permalink
fix(specs): proper title with linter (generated)
Browse files Browse the repository at this point in the history
algolia/api-clients-automation#3444

Co-authored-by: algolia-bot <[email protected]>
Co-authored-by: Pierre Millot <[email protected]>
  • Loading branch information
algolia-bot and millotp committed Jul 30, 2024
1 parent c898247 commit 9adf819
Show file tree
Hide file tree
Showing 44 changed files with 321 additions and 179 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Foundation
#endif

/// Empty searches removed from the A/B test as a result of configuration settings.
public struct FilterEffectsEmptySearch: Codable, JSONEncodable {
public struct EmptySearchFilter: Codable, JSONEncodable {
/// Number of users removed from the A/B test.
public var usersCount: Int?
/// Number of tracked searches removed from the A/B test.
Expand All @@ -32,14 +32,14 @@ public struct FilterEffectsEmptySearch: Codable, JSONEncodable {
}
}

extension FilterEffectsEmptySearch: Equatable {
public static func ==(lhs: FilterEffectsEmptySearch, rhs: FilterEffectsEmptySearch) -> Bool {
extension EmptySearchFilter: Equatable {
public static func ==(lhs: EmptySearchFilter, rhs: EmptySearchFilter) -> Bool {
lhs.usersCount == rhs.usersCount &&
lhs.trackedSearchesCount == rhs.trackedSearchesCount
}
}

extension FilterEffectsEmptySearch: Hashable {
extension EmptySearchFilter: Hashable {
public func hash(into hasher: inout Hasher) {
hasher.combine(self.usersCount?.hashValue)
hasher.combine(self.trackedSearchesCount?.hashValue)
Expand Down
6 changes: 3 additions & 3 deletions Sources/Abtesting/Models/FilterEffects.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import Foundation

/// A/B test filter effects resulting from configuration settings.
public struct FilterEffects: Codable, JSONEncodable {
public var outliers: FilterEffectsOutliers?
public var emptySearch: FilterEffectsEmptySearch?
public var outliers: OutliersFilter?
public var emptySearch: EmptySearchFilter?

public init(outliers: FilterEffectsOutliers? = nil, emptySearch: FilterEffectsEmptySearch? = nil) {
public init(outliers: OutliersFilter? = nil, emptySearch: EmptySearchFilter? = nil) {
self.outliers = outliers
self.emptySearch = emptySearch
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Foundation
#endif

/// Outliers removed from the A/B test as a result of configuration settings.
public struct FilterEffectsOutliers: Codable, JSONEncodable {
public struct OutliersFilter: Codable, JSONEncodable {
/// Number of users removed from the A/B test.
public var usersCount: Int?
/// Number of tracked searches removed from the A/B test.
Expand All @@ -32,14 +32,14 @@ public struct FilterEffectsOutliers: Codable, JSONEncodable {
}
}

extension FilterEffectsOutliers: Equatable {
public static func ==(lhs: FilterEffectsOutliers, rhs: FilterEffectsOutliers) -> Bool {
extension OutliersFilter: Equatable {
public static func ==(lhs: OutliersFilter, rhs: OutliersFilter) -> Bool {
lhs.usersCount == rhs.usersCount &&
lhs.trackedSearchesCount == rhs.trackedSearchesCount
}
}

extension FilterEffectsOutliers: Hashable {
extension OutliersFilter: Hashable {
public func hash(into hasher: inout Hasher) {
hasher.combine(self.usersCount?.hashValue)
hasher.combine(self.trackedSearchesCount?.hashValue)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Foundation
#endif

/// Click position.
public struct ClickPositionsInner: Codable, JSONEncodable {
public struct ClickPosition: Codable, JSONEncodable {
/// Range of positions in the search results, using the pattern `[start,end]`. For positions 11 and up, click
/// events are summed over the specified range. `-1` indicates the end of the list of search results.
public var position: [Int]?
Expand All @@ -33,14 +33,14 @@ public struct ClickPositionsInner: Codable, JSONEncodable {
}
}

extension ClickPositionsInner: Equatable {
public static func ==(lhs: ClickPositionsInner, rhs: ClickPositionsInner) -> Bool {
extension ClickPosition: Equatable {
public static func ==(lhs: ClickPosition, rhs: ClickPosition) -> Bool {
lhs.position == rhs.position &&
lhs.clickCount == rhs.clickCount
}
}

extension ClickPositionsInner: Hashable {
extension ClickPosition: Hashable {
public func hash(into hasher: inout Hasher) {
hasher.combine(self.position?.hashValue)
hasher.combine(self.clickCount?.hashValue)
Expand Down
4 changes: 2 additions & 2 deletions Sources/Analytics/Models/GetClickPositionsResponse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import Foundation

public struct GetClickPositionsResponse: Codable, JSONEncodable {
/// List of positions in the search results and clicks associated with this search.
public var positions: [ClickPositionsInner]
public var positions: [ClickPosition]

public init(positions: [ClickPositionsInner]) {
public init(positions: [ClickPosition]) {
self.positions = positions
}

Expand Down
4 changes: 2 additions & 2 deletions Sources/Analytics/Models/TopSearchWithAnalytics.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public struct TopSearchWithAnalytics: Codable, JSONEncodable {
/// search requests with `clickAnalytics` set to true.
public var averageClickPosition: Double?
/// List of positions in the search results and clicks associated with this search.
public var clickPositions: [ClickPositionsInner]
public var clickPositions: [ClickPosition]
/// Conversion rate, calculated as number of tracked searches with at least one conversion event divided by the
/// number of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to
/// true.
Expand All @@ -37,7 +37,7 @@ public struct TopSearchWithAnalytics: Codable, JSONEncodable {
count: Int,
clickThroughRate: Double?,
averageClickPosition: Double?,
clickPositions: [ClickPositionsInner],
clickPositions: [ClickPosition],
conversionRate: Double?,
trackedSearchCount: Int,
clickCount: Int,
Expand Down
4 changes: 2 additions & 2 deletions Sources/Analytics/Models/TopSearchWithRevenueAnalytics.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public struct TopSearchWithRevenueAnalytics: Codable, JSONEncodable {
/// search requests with `clickAnalytics` set to true.
public var averageClickPosition: Double?
/// List of positions in the search results and clicks associated with this search.
public var clickPositions: [ClickPositionsInner]
public var clickPositions: [ClickPosition]
/// Conversion rate, calculated as number of tracked searches with at least one conversion event divided by the
/// number of tracked searches. If null, Algolia didn't receive any search requests with `clickAnalytics` set to
/// true.
Expand Down Expand Up @@ -50,7 +50,7 @@ public struct TopSearchWithRevenueAnalytics: Codable, JSONEncodable {
count: Int,
clickThroughRate: Double?,
averageClickPosition: Double?,
clickPositions: [ClickPositionsInner],
clickPositions: [ClickPosition],
conversionRate: Double?,
trackedSearchCount: Int,
clickCount: Int,
Expand Down
1 change: 1 addition & 0 deletions Sources/Ingestion/Models/DockerStreamsInput.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import Foundation
import Core
#endif

/// The selected streams of a singer or airbyte connector.
public struct DockerStreamsInput: Codable, JSONEncodable {
public var streams: AnyCodable

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Foundation
#endif

/// The error if the transformation failed.
public struct TransformationTryResponseError: Codable, JSONEncodable {
public struct TransformationError: Codable, JSONEncodable {
/// The error status code.
public var code: Int?
/// A descriptive message explaining the failure.
Expand All @@ -32,14 +32,14 @@ public struct TransformationTryResponseError: Codable, JSONEncodable {
}
}

extension TransformationTryResponseError: Equatable {
public static func ==(lhs: TransformationTryResponseError, rhs: TransformationTryResponseError) -> Bool {
extension TransformationError: Equatable {
public static func ==(lhs: TransformationError, rhs: TransformationError) -> Bool {
lhs.code == rhs.code &&
lhs.message == rhs.message
}
}

extension TransformationTryResponseError: Hashable {
extension TransformationError: Hashable {
public func hash(into hasher: inout Hasher) {
hasher.combine(self.code?.hashValue)
hasher.combine(self.message?.hashValue)
Expand Down
4 changes: 2 additions & 2 deletions Sources/Ingestion/Models/TransformationTryResponse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import Foundation
public struct TransformationTryResponse: Codable, JSONEncodable {
/// The array of records returned by the transformation service.
public var payloads: [AnyCodable]
public var error: TransformationTryResponseError?
public var error: TransformationError?

public init(payloads: [AnyCodable], error: TransformationTryResponseError? = nil) {
public init(payloads: [AnyCodable], error: TransformationError? = nil) {
self.payloads = payloads
self.error = error
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Foundation
import Core
#endif

public struct GetServers403Response: Codable, JSONEncodable {
public struct BadRequest: Codable, JSONEncodable {
public var reason: String?

public init(reason: String? = nil) {
Expand All @@ -25,13 +25,13 @@ public struct GetServers403Response: Codable, JSONEncodable {
}
}

extension GetServers403Response: Equatable {
public static func ==(lhs: GetServers403Response, rhs: GetServers403Response) -> Bool {
extension BadRequest: Equatable {
public static func ==(lhs: BadRequest, rhs: BadRequest) -> Bool {
lhs.reason == rhs.reason
}
}

extension GetServers403Response: Hashable {
extension BadRequest: Hashable {
public func hash(into hasher: inout Hasher) {
hasher.combine(self.reason?.hashValue)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Foundation
import Core
#endif

public struct IncidentsInner: Codable, JSONEncodable {
public struct IncidentEntry: Codable, JSONEncodable {
/// Timestamp, measured in milliseconds since the Unix epoch.
public var t: Int64?
public var v: Incident?
Expand All @@ -30,14 +30,14 @@ public struct IncidentsInner: Codable, JSONEncodable {
}
}

extension IncidentsInner: Equatable {
public static func ==(lhs: IncidentsInner, rhs: IncidentsInner) -> Bool {
extension IncidentEntry: Equatable {
public static func ==(lhs: IncidentEntry, rhs: IncidentEntry) -> Bool {
lhs.t == rhs.t &&
lhs.v == rhs.v
}
}

extension IncidentsInner: Hashable {
extension IncidentEntry: Hashable {
public func hash(into hasher: inout Hasher) {
hasher.combine(self.t?.hashValue)
hasher.combine(self.v?.hashValue)
Expand Down
4 changes: 2 additions & 2 deletions Sources/Monitoring/Models/IncidentsResponse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import Foundation
#endif

public struct IncidentsResponse: Codable, JSONEncodable {
public var incidents: [String: [IncidentsInner]]?
public var incidents: [String: [IncidentEntry]]?

public init(incidents: [String: [IncidentsInner]]? = nil) {
public init(incidents: [String: [IncidentEntry]]? = nil) {
self.incidents = incidents
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import Foundation
import Core
#endif

public struct IndexingTimeResponseMetrics: Codable, JSONEncodable {
public var indexing: [String: [TimeInner]]?
public struct IndexingMetric: Codable, JSONEncodable {
public var indexing: [String: [TimeEntry]]?

public init(indexing: [String: [TimeInner]]? = nil) {
public init(indexing: [String: [TimeEntry]]? = nil) {
self.indexing = indexing
}

Expand All @@ -25,13 +25,13 @@ public struct IndexingTimeResponseMetrics: Codable, JSONEncodable {
}
}

extension IndexingTimeResponseMetrics: Equatable {
public static func ==(lhs: IndexingTimeResponseMetrics, rhs: IndexingTimeResponseMetrics) -> Bool {
extension IndexingMetric: Equatable {
public static func ==(lhs: IndexingMetric, rhs: IndexingMetric) -> Bool {
lhs.indexing == rhs.indexing
}
}

extension IndexingTimeResponseMetrics: Hashable {
extension IndexingMetric: Hashable {
public func hash(into hasher: inout Hasher) {
hasher.combine(self.indexing?.hashValue)
}
Expand Down
4 changes: 2 additions & 2 deletions Sources/Monitoring/Models/IndexingTimeResponse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import Foundation
#endif

public struct IndexingTimeResponse: Codable, JSONEncodable {
public var metrics: IndexingTimeResponseMetrics?
public var metrics: IndexingMetric?

public init(metrics: IndexingTimeResponseMetrics? = nil) {
public init(metrics: IndexingMetric? = nil) {
self.metrics = metrics
}

Expand Down
4 changes: 2 additions & 2 deletions Sources/Monitoring/Models/InfrastructureResponse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import Foundation
#endif

public struct InfrastructureResponse: Codable, JSONEncodable {
public var metrics: InfrastructureResponseMetrics?
public var metrics: Metrics?

public init(metrics: InfrastructureResponseMetrics? = nil) {
public init(metrics: Metrics? = nil) {
self.metrics = metrics
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import Foundation
import Core
#endif

public struct LatencyResponseMetrics: Codable, JSONEncodable {
public var latency: [String: [TimeInner]]?
public struct LatencyMetric: Codable, JSONEncodable {
public var latency: [String: [TimeEntry]]?

public init(latency: [String: [TimeInner]]? = nil) {
public init(latency: [String: [TimeEntry]]? = nil) {
self.latency = latency
}

Expand All @@ -25,13 +25,13 @@ public struct LatencyResponseMetrics: Codable, JSONEncodable {
}
}

extension LatencyResponseMetrics: Equatable {
public static func ==(lhs: LatencyResponseMetrics, rhs: LatencyResponseMetrics) -> Bool {
extension LatencyMetric: Equatable {
public static func ==(lhs: LatencyMetric, rhs: LatencyMetric) -> Bool {
lhs.latency == rhs.latency
}
}

extension LatencyResponseMetrics: Hashable {
extension LatencyMetric: Hashable {
public func hash(into hasher: inout Hasher) {
hasher.combine(self.latency?.hashValue)
}
Expand Down
4 changes: 2 additions & 2 deletions Sources/Monitoring/Models/LatencyResponse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import Foundation
#endif

public struct LatencyResponse: Codable, JSONEncodable {
public var metrics: LatencyResponseMetrics?
public var metrics: LatencyMetric?

public init(metrics: LatencyResponseMetrics? = nil) {
public init(metrics: LatencyMetric? = nil) {
self.metrics = metrics
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Foundation
import Core
#endif

public struct InfrastructureResponseMetrics: Codable, JSONEncodable {
public struct Metrics: Codable, JSONEncodable {
/// CPU idleness in %.
public var cpuUsage: [String: [ProbesMetric]]?
/// RAM used for indexing in MB.
Expand Down Expand Up @@ -53,8 +53,8 @@ public struct InfrastructureResponseMetrics: Codable, JSONEncodable {
}
}

extension InfrastructureResponseMetrics: Equatable {
public static func ==(lhs: InfrastructureResponseMetrics, rhs: InfrastructureResponseMetrics) -> Bool {
extension Metrics: Equatable {
public static func ==(lhs: Metrics, rhs: Metrics) -> Bool {
lhs.cpuUsage == rhs.cpuUsage &&
lhs.ramIndexingUsage == rhs.ramIndexingUsage &&
lhs.ramSearchUsage == rhs.ramSearchUsage &&
Expand All @@ -63,7 +63,7 @@ extension InfrastructureResponseMetrics: Equatable {
}
}

extension InfrastructureResponseMetrics: Hashable {
extension Metrics: Hashable {
public func hash(into hasher: inout Hasher) {
hasher.combine(self.cpuUsage?.hashValue)
hasher.combine(self.ramIndexingUsage?.hashValue)
Expand Down
Loading

0 comments on commit 9adf819

Please sign in to comment.