Skip to content

Commit a1bad70

Browse files
fix(specs): ingestion docker task input (generated)
algolia/api-clients-automation#3488 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Clément Vannicatte <[email protected]>
1 parent 50be05c commit a1bad70

File tree

5 files changed

+100
-3
lines changed

5 files changed

+100
-3
lines changed

src/main/scala/algoliasearch/api/IngestionClient.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1440,10 +1440,10 @@ class IngestionClient(
14401440
* - deleteIndex
14411441
* - editSettings
14421442
*/
1443-
def tryTransformations(transformationTry: TransformationTry, requestOptions: Option[RequestOptions] = None)(implicit
1443+
def tryTransformation(transformationTry: TransformationTry, requestOptions: Option[RequestOptions] = None)(implicit
14441444
ec: ExecutionContext
14451445
): Future[TransformationTryResponse] = Future {
1446-
requireNotNull(transformationTry, "Parameter `transformationTry` is required when calling `tryTransformations`.")
1446+
requireNotNull(transformationTry, "Parameter `transformationTry` is required when calling `tryTransformation`.")
14471447

14481448
val request = HttpRequest
14491449
.builder()
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/** Ingestion API The Ingestion API lets you connect third-party services and platforms with Algolia and schedule tasks
2+
* to ingest your data. The Ingestion API powers the no-code [data
3+
* connectors](https://dashboard.algolia.com/connectors). ## Base URLs The base URLs for requests to the Ingestion API
4+
* are: - `https://data.us.algolia.com` - `https://data.eu.algolia.com` Use the URL that matches your [analytics
5+
* region](https://dashboard.algolia.com/account/infrastructure/analytics). **All requests must use HTTPS.** ##
6+
* Authentication To authenticate your API requests, add these headers: - `x-algolia-application-id`. Your Algolia
7+
* application ID. - `x-algolia-api-key`. An API key with the necessary permissions to make the request. The required
8+
* access control list (ACL) to make a request is listed in each endpoint's reference. You can find your application ID
9+
* and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). ## Request format Request bodies must
10+
* be JSON objects. ## Response status and errors Response bodies are JSON objects. Deleting a user token returns an
11+
* empty response body with rate-limiting information as headers. Successful responses return a `2xx` status. Client
12+
* errors return a `4xx` status. Server errors are indicated by a `5xx` status. Error responses have a `message`
13+
* property with more information. The Insights API doesn't validate if the event parameters such as `indexName`,
14+
* `objectIDs`, or `userToken`, correspond to anything in the Search API. It justs checks if they're formatted
15+
* correctly. Check the [Events](https://dashboard.algolia.com/events/health) health section, whether your events can
16+
* be used for Algolia features such as Analytics, or Dynamic Re-Ranking. ## Version The current version of the
17+
* Insights API is version 1, as indicated by the `/1/` in each endpoint's URL.
18+
*
19+
* The version of the OpenAPI document: 1.0.0
20+
*
21+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
22+
* https://openapi-generator.tech Do not edit the class manually.
23+
*/
24+
package algoliasearch.ingestion
25+
26+
import algoliasearch.ingestion.DockerStreamsSyncMode._
27+
28+
/** DockerStreams
29+
*
30+
* @param name
31+
* The name of the stream to fetch the data from (e.g. table name).
32+
* @param properties
33+
* The properties of the stream to select (e.g. column).
34+
*/
35+
case class DockerStreams(
36+
name: String,
37+
properties: Option[Seq[String]] = scala.None,
38+
syncMode: DockerStreamsSyncMode
39+
)

src/main/scala/algoliasearch/ingestion/DockerStreamsInput.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ package algoliasearch.ingestion
2626
/** The selected streams of a singer or airbyte connector.
2727
*/
2828
case class DockerStreamsInput(
29-
streams: Any
29+
streams: Seq[DockerStreams]
3030
) extends TaskInputTrait
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
/** Ingestion API The Ingestion API lets you connect third-party services and platforms with Algolia and schedule tasks
2+
* to ingest your data. The Ingestion API powers the no-code [data
3+
* connectors](https://dashboard.algolia.com/connectors). ## Base URLs The base URLs for requests to the Ingestion API
4+
* are: - `https://data.us.algolia.com` - `https://data.eu.algolia.com` Use the URL that matches your [analytics
5+
* region](https://dashboard.algolia.com/account/infrastructure/analytics). **All requests must use HTTPS.** ##
6+
* Authentication To authenticate your API requests, add these headers: - `x-algolia-application-id`. Your Algolia
7+
* application ID. - `x-algolia-api-key`. An API key with the necessary permissions to make the request. The required
8+
* access control list (ACL) to make a request is listed in each endpoint's reference. You can find your application ID
9+
* and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). ## Request format Request bodies must
10+
* be JSON objects. ## Response status and errors Response bodies are JSON objects. Deleting a user token returns an
11+
* empty response body with rate-limiting information as headers. Successful responses return a `2xx` status. Client
12+
* errors return a `4xx` status. Server errors are indicated by a `5xx` status. Error responses have a `message`
13+
* property with more information. The Insights API doesn't validate if the event parameters such as `indexName`,
14+
* `objectIDs`, or `userToken`, correspond to anything in the Search API. It justs checks if they're formatted
15+
* correctly. Check the [Events](https://dashboard.algolia.com/events/health) health section, whether your events can
16+
* be used for Algolia features such as Analytics, or Dynamic Re-Ranking. ## Version The current version of the
17+
* Insights API is version 1, as indicated by the `/1/` in each endpoint's URL.
18+
*
19+
* The version of the OpenAPI document: 1.0.0
20+
*
21+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
22+
* https://openapi-generator.tech Do not edit the class manually.
23+
*/
24+
package algoliasearch.ingestion
25+
26+
import org.json4s._
27+
28+
sealed trait DockerStreamsSyncMode
29+
30+
/** The strategy to use to fetch the data.
31+
*/
32+
object DockerStreamsSyncMode {
33+
case object Incremental extends DockerStreamsSyncMode {
34+
override def toString = "incremental"
35+
}
36+
case object FullTable extends DockerStreamsSyncMode {
37+
override def toString = "fullTable"
38+
}
39+
val values: Seq[DockerStreamsSyncMode] = Seq(Incremental, FullTable)
40+
41+
def withName(name: String): DockerStreamsSyncMode = DockerStreamsSyncMode.values
42+
.find(_.toString == name)
43+
.getOrElse(throw new MappingException(s"Unknown DockerStreamsSyncMode value: $name"))
44+
}
45+
46+
class DockerStreamsSyncModeSerializer
47+
extends CustomSerializer[DockerStreamsSyncMode](_ =>
48+
(
49+
{
50+
case JString(value) => DockerStreamsSyncMode.withName(value)
51+
case JNull => null
52+
},
53+
{ case value: DockerStreamsSyncMode =>
54+
JString(value.toString)
55+
}
56+
)
57+
)

src/main/scala/algoliasearch/ingestion/JsonSupport.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ object JsonSupport {
3636
new DestinationTypeSerializer() :+
3737
new DockerImageTypeSerializer() :+
3838
new DockerRegistrySerializer() :+
39+
new DockerStreamsSyncModeSerializer() :+
3940
new EntityTypeSerializer() :+
4041
new EventSortKeysSerializer() :+
4142
new EventStatusSerializer() :+

0 commit comments

Comments
 (0)