-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(specs): add /schedule endpoint (generated)
algolia/api-clients-automation#3350 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Fernando Beck <[email protected]> Co-authored-by: Pierre Millot <[email protected]>
- Loading branch information
1 parent
cbe090f
commit e415046
Showing
3 changed files
with
145 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// 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. | ||
|
||
import Foundation | ||
#if canImport(Core) | ||
import Core | ||
#endif | ||
|
||
public struct ScheduleABTestResponse: Codable, JSONEncodable { | ||
/// Unique scheduled A/B test identifier. | ||
public var abTestScheduleID: Int | ||
|
||
public init(abTestScheduleID: Int) { | ||
self.abTestScheduleID = abTestScheduleID | ||
} | ||
|
||
public enum CodingKeys: String, CodingKey, CaseIterable { | ||
case abTestScheduleID | ||
} | ||
|
||
// Encodable protocol methods | ||
|
||
public func encode(to encoder: Encoder) throws { | ||
var container = encoder.container(keyedBy: CodingKeys.self) | ||
try container.encode(self.abTestScheduleID, forKey: .abTestScheduleID) | ||
} | ||
} | ||
|
||
extension ScheduleABTestResponse: Equatable { | ||
public static func ==(lhs: ScheduleABTestResponse, rhs: ScheduleABTestResponse) -> Bool { | ||
lhs.abTestScheduleID == rhs.abTestScheduleID | ||
} | ||
} | ||
|
||
extension ScheduleABTestResponse: Hashable { | ||
public func hash(into hasher: inout Hasher) { | ||
hasher.combine(self.abTestScheduleID.hashValue) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
// 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. | ||
|
||
import Foundation | ||
#if canImport(Core) | ||
import Core | ||
#endif | ||
|
||
public struct ScheduleABTestsRequest: Codable, JSONEncodable { | ||
/// A/B test name. | ||
public var name: String | ||
/// A/B test variants. | ||
public var variants: [AddABTestsVariant] | ||
/// Date and time when the A/B test is scheduled to start, in RFC 3339 format. | ||
public var scheduledAt: String | ||
/// End date and time of the A/B test, in RFC 3339 format. | ||
public var endAt: String | ||
|
||
public init(name: String, variants: [AddABTestsVariant], scheduledAt: String, endAt: String) { | ||
self.name = name | ||
self.variants = variants | ||
self.scheduledAt = scheduledAt | ||
self.endAt = endAt | ||
} | ||
|
||
public enum CodingKeys: String, CodingKey, CaseIterable { | ||
case name | ||
case variants | ||
case scheduledAt | ||
case endAt | ||
} | ||
|
||
// Encodable protocol methods | ||
|
||
public func encode(to encoder: Encoder) throws { | ||
var container = encoder.container(keyedBy: CodingKeys.self) | ||
try container.encode(self.name, forKey: .name) | ||
try container.encode(self.variants, forKey: .variants) | ||
try container.encode(self.scheduledAt, forKey: .scheduledAt) | ||
try container.encode(self.endAt, forKey: .endAt) | ||
} | ||
} | ||
|
||
extension ScheduleABTestsRequest: Equatable { | ||
public static func ==(lhs: ScheduleABTestsRequest, rhs: ScheduleABTestsRequest) -> Bool { | ||
lhs.name == rhs.name && | ||
lhs.variants == rhs.variants && | ||
lhs.scheduledAt == rhs.scheduledAt && | ||
lhs.endAt == rhs.endAt | ||
} | ||
} | ||
|
||
extension ScheduleABTestsRequest: Hashable { | ||
public func hash(into hasher: inout Hasher) { | ||
hasher.combine(self.name.hashValue) | ||
hasher.combine(self.variants.hashValue) | ||
hasher.combine(self.scheduledAt.hashValue) | ||
hasher.combine(self.endAt.hashValue) | ||
} | ||
} |