|
| 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 | + ) |
0 commit comments