-
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 generate code endpoint to ingestion specs (generated)
algolia/api-clients-automation#3489 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Clément Vannicatte <[email protected]>
- Loading branch information
1 parent
036dcf4
commit d27589f
Showing
3 changed files
with
137 additions
and
1 deletion.
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
50 changes: 50 additions & 0 deletions
50
Sources/Ingestion/Models/GenerateTransformationCodePayload.swift
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,50 @@ | ||
// 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 GenerateTransformationCodePayload: Codable, JSONEncodable { | ||
public var id: String | ||
public var systemPrompt: String? | ||
public var userPrompt: String | ||
|
||
public init(id: String, systemPrompt: String? = nil, userPrompt: String) { | ||
self.id = id | ||
self.systemPrompt = systemPrompt | ||
self.userPrompt = userPrompt | ||
} | ||
|
||
public enum CodingKeys: String, CodingKey, CaseIterable { | ||
case id | ||
case systemPrompt | ||
case userPrompt | ||
} | ||
|
||
// Encodable protocol methods | ||
|
||
public func encode(to encoder: Encoder) throws { | ||
var container = encoder.container(keyedBy: CodingKeys.self) | ||
try container.encode(self.id, forKey: .id) | ||
try container.encodeIfPresent(self.systemPrompt, forKey: .systemPrompt) | ||
try container.encode(self.userPrompt, forKey: .userPrompt) | ||
} | ||
} | ||
|
||
extension GenerateTransformationCodePayload: Equatable { | ||
public static func ==(lhs: GenerateTransformationCodePayload, rhs: GenerateTransformationCodePayload) -> Bool { | ||
lhs.id == rhs.id && | ||
lhs.systemPrompt == rhs.systemPrompt && | ||
lhs.userPrompt == rhs.userPrompt | ||
} | ||
} | ||
|
||
extension GenerateTransformationCodePayload: Hashable { | ||
public func hash(into hasher: inout Hasher) { | ||
hasher.combine(self.id.hashValue) | ||
hasher.combine(self.systemPrompt?.hashValue) | ||
hasher.combine(self.userPrompt.hashValue) | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
Sources/Ingestion/Models/GenerateTransformationCodeResponse.swift
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,38 @@ | ||
// 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 GenerateTransformationCodeResponse: Codable, JSONEncodable { | ||
public var generatedCode: String? | ||
|
||
public init(generatedCode: String? = nil) { | ||
self.generatedCode = generatedCode | ||
} | ||
|
||
public enum CodingKeys: String, CodingKey, CaseIterable { | ||
case generatedCode | ||
} | ||
|
||
// Encodable protocol methods | ||
|
||
public func encode(to encoder: Encoder) throws { | ||
var container = encoder.container(keyedBy: CodingKeys.self) | ||
try container.encodeIfPresent(self.generatedCode, forKey: .generatedCode) | ||
} | ||
} | ||
|
||
extension GenerateTransformationCodeResponse: Equatable { | ||
public static func ==(lhs: GenerateTransformationCodeResponse, rhs: GenerateTransformationCodeResponse) -> Bool { | ||
lhs.generatedCode == rhs.generatedCode | ||
} | ||
} | ||
|
||
extension GenerateTransformationCodeResponse: Hashable { | ||
public func hash(into hasher: inout Hasher) { | ||
hasher.combine(self.generatedCode?.hashValue) | ||
} | ||
} |