diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Ingestion/DestinationIndexPrefix.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Ingestion/DestinationIndexPrefix.cs deleted file mode 100644 index 93d9a50131..0000000000 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Ingestion/DestinationIndexPrefix.cs +++ /dev/null @@ -1,96 +0,0 @@ -// -// 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. -// -using System; -using System.Text; -using System.Linq; -using System.Text.Json.Serialization; -using System.Collections.Generic; -using Algolia.Search.Serializer; -using System.Text.Json; - -namespace Algolia.Search.Models.Ingestion; - -/// -/// DestinationIndexPrefix -/// -public partial class DestinationIndexPrefix -{ - /// - /// Initializes a new instance of the DestinationIndexPrefix class. - /// - [JsonConstructor] - public DestinationIndexPrefix() { } - /// - /// Initializes a new instance of the DestinationIndexPrefix class. - /// - /// String added to the beginning of all indices created by this destination. (required). - public DestinationIndexPrefix(string indexPrefix) - { - IndexPrefix = indexPrefix ?? throw new ArgumentNullException(nameof(indexPrefix)); - } - - /// - /// String added to the beginning of all indices created by this destination. - /// - /// String added to the beginning of all indices created by this destination. - [JsonPropertyName("indexPrefix")] - public string IndexPrefix { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class DestinationIndexPrefix {\n"); - sb.Append(" IndexPrefix: ").Append(IndexPrefix).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonSerializer.Serialize(this, JsonConfig.Options); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object obj) - { - if (obj is not DestinationIndexPrefix input) - { - return false; - } - - return - (IndexPrefix == input.IndexPrefix || (IndexPrefix != null && IndexPrefix.Equals(input.IndexPrefix))); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (IndexPrefix != null) - { - hashCode = (hashCode * 59) + IndexPrefix.GetHashCode(); - } - return hashCode; - } - } - -} - diff --git a/clients/algoliasearch-client-csharp/algoliasearch/Models/Ingestion/DestinationInput.cs b/clients/algoliasearch-client-csharp/algoliasearch/Models/Ingestion/DestinationInput.cs index 6deba2eb40..9301b3576f 100644 --- a/clients/algoliasearch-client-csharp/algoliasearch/Models/Ingestion/DestinationInput.cs +++ b/clients/algoliasearch-client-csharp/algoliasearch/Models/Ingestion/DestinationInput.cs @@ -20,16 +20,6 @@ namespace Algolia.Search.Models.Ingestion; [JsonConverter(typeof(DestinationInputJsonConverter))] public partial class DestinationInput : AbstractSchema { - /// - /// Initializes a new instance of the DestinationInput class - /// with a DestinationIndexPrefix - /// - /// An instance of DestinationIndexPrefix. - public DestinationInput(DestinationIndexPrefix actualInstance) - { - ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); - } - /// /// Initializes a new instance of the DestinationInput class /// with a DestinationIndexName @@ -46,16 +36,6 @@ public DestinationInput(DestinationIndexName actualInstance) /// public sealed override object ActualInstance { get; set; } - /// - /// Get the actual instance of `DestinationIndexPrefix`. If the actual instance is not `DestinationIndexPrefix`, - /// the InvalidClassException will be thrown - /// - /// An instance of DestinationIndexPrefix - public DestinationIndexPrefix AsDestinationIndexPrefix() - { - return (DestinationIndexPrefix)ActualInstance; - } - /// /// Get the actual instance of `DestinationIndexName`. If the actual instance is not `DestinationIndexName`, /// the InvalidClassException will be thrown @@ -67,15 +47,6 @@ public DestinationIndexName AsDestinationIndexName() } - /// - /// Check if the actual instance is of `DestinationIndexPrefix` type. - /// - /// Whether or not the instance is the type - public bool IsDestinationIndexPrefix() - { - return ActualInstance.GetType() == typeof(DestinationIndexPrefix); - } - /// /// Check if the actual instance is of `DestinationIndexName` type. /// @@ -170,18 +141,6 @@ public override DestinationInput Read(ref Utf8JsonReader reader, Type typeToConv var jsonDocument = JsonDocument.ParseValue(ref reader); var root = jsonDocument.RootElement; if (root.ValueKind == JsonValueKind.Object) - { - try - { - return new DestinationInput(jsonDocument.Deserialize(JsonConfig.Options)); - } - catch (Exception exception) - { - // deserialization failed, try the next one - System.Diagnostics.Debug.WriteLine($"Failed to deserialize into DestinationIndexPrefix: {exception}"); - } - } - if (root.ValueKind == JsonValueKind.Object) { try { diff --git a/clients/algoliasearch-client-go/algolia/ingestion/model_destination_index_prefix.go b/clients/algoliasearch-client-go/algolia/ingestion/model_destination_index_prefix.go deleted file mode 100644 index e937fb197d..0000000000 --- a/clients/algoliasearch-client-go/algolia/ingestion/model_destination_index_prefix.go +++ /dev/null @@ -1,72 +0,0 @@ -// 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. -package ingestion - -import ( - "encoding/json" - "fmt" -) - -// DestinationIndexPrefix struct for DestinationIndexPrefix. -type DestinationIndexPrefix struct { - // String added to the beginning of all indices created by this destination. - IndexPrefix string `json:"indexPrefix"` -} - -// NewDestinationIndexPrefix instantiates a new DestinationIndexPrefix object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed. -func NewDestinationIndexPrefix(indexPrefix string) *DestinationIndexPrefix { - this := &DestinationIndexPrefix{} - this.IndexPrefix = indexPrefix - return this -} - -// NewEmptyDestinationIndexPrefix return a pointer to an empty DestinationIndexPrefix object. -func NewEmptyDestinationIndexPrefix() *DestinationIndexPrefix { - return &DestinationIndexPrefix{} -} - -// GetIndexPrefix returns the IndexPrefix field value. -func (o *DestinationIndexPrefix) GetIndexPrefix() string { - if o == nil { - var ret string - return ret - } - - return o.IndexPrefix -} - -// GetIndexPrefixOk returns a tuple with the IndexPrefix field value -// and a boolean to check if the value has been set. -func (o *DestinationIndexPrefix) GetIndexPrefixOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.IndexPrefix, true -} - -// SetIndexPrefix sets field value. -func (o *DestinationIndexPrefix) SetIndexPrefix(v string) *DestinationIndexPrefix { - o.IndexPrefix = v - return o -} - -func (o DestinationIndexPrefix) MarshalJSON() ([]byte, error) { - toSerialize := map[string]any{} - if true { - toSerialize["indexPrefix"] = o.IndexPrefix - } - serialized, err := json.Marshal(toSerialize) - if err != nil { - return nil, fmt.Errorf("failed to marshal DestinationIndexPrefix: %w", err) - } - - return serialized, nil -} - -func (o DestinationIndexPrefix) String() string { - out := "" - out += fmt.Sprintf(" indexPrefix=%v\n", o.IndexPrefix) - return fmt.Sprintf("DestinationIndexPrefix {\n%s}", out) -} diff --git a/clients/algoliasearch-client-go/algolia/ingestion/model_destination_input.go b/clients/algoliasearch-client-go/algolia/ingestion/model_destination_input.go index 9a0f11b248..e8ce483b5a 100644 --- a/clients/algoliasearch-client-go/algolia/ingestion/model_destination_input.go +++ b/clients/algoliasearch-client-go/algolia/ingestion/model_destination_input.go @@ -8,15 +8,7 @@ import ( // DestinationInput - struct for DestinationInput. type DestinationInput struct { - DestinationIndexName *DestinationIndexName - DestinationIndexPrefix *DestinationIndexPrefix -} - -// DestinationIndexPrefixAsDestinationInput is a convenience function that returns DestinationIndexPrefix wrapped in DestinationInput. -func DestinationIndexPrefixAsDestinationInput(v *DestinationIndexPrefix) *DestinationInput { - return &DestinationInput{ - DestinationIndexPrefix: v, - } + DestinationIndexName *DestinationIndexName } // DestinationIndexNameAsDestinationInput is a convenience function that returns DestinationIndexName wrapped in DestinationInput. @@ -42,19 +34,6 @@ func (dst *DestinationInput) UnmarshalJSON(data []byte) error { dst.DestinationIndexName = nil } - // try to unmarshal data into DestinationIndexPrefix - err = newStrictDecoder(data).Decode(&dst.DestinationIndexPrefix) - if err == nil && validateStruct(dst.DestinationIndexPrefix) == nil { - jsonDestinationIndexPrefix, _ := json.Marshal(dst.DestinationIndexPrefix) - if string(jsonDestinationIndexPrefix) == "{}" { // empty struct - dst.DestinationIndexPrefix = nil - } else { - return nil - } - } else { - dst.DestinationIndexPrefix = nil - } - return fmt.Errorf("Data failed to match schemas in oneOf(DestinationInput)") } @@ -69,15 +48,6 @@ func (src DestinationInput) MarshalJSON() ([]byte, error) { return serialized, nil } - if src.DestinationIndexPrefix != nil { - serialized, err := json.Marshal(&src.DestinationIndexPrefix) - if err != nil { - return nil, fmt.Errorf("failed to unmarshal one of DestinationIndexPrefix of DestinationInput: %w", err) - } - - return serialized, nil - } - return nil, nil // no data in oneOf schemas } @@ -87,10 +57,6 @@ func (obj DestinationInput) GetActualInstance() any { return *obj.DestinationIndexName } - if obj.DestinationIndexPrefix != nil { - return *obj.DestinationIndexPrefix - } - // all schemas are nil return nil } diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/ingestion/DestinationIndexPrefix.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/ingestion/DestinationIndexPrefix.java deleted file mode 100644 index b4891e908b..0000000000 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/ingestion/DestinationIndexPrefix.java +++ /dev/null @@ -1,63 +0,0 @@ -// 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. - -package com.algolia.model.ingestion; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.databind.annotation.*; -import java.util.Objects; - -/** DestinationIndexPrefix */ -@JsonDeserialize(as = DestinationIndexPrefix.class) -public class DestinationIndexPrefix implements DestinationInput { - - @JsonProperty("indexPrefix") - private String indexPrefix; - - public DestinationIndexPrefix setIndexPrefix(String indexPrefix) { - this.indexPrefix = indexPrefix; - return this; - } - - /** String added to the beginning of all indices created by this destination. */ - @javax.annotation.Nonnull - public String getIndexPrefix() { - return indexPrefix; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DestinationIndexPrefix destinationIndexPrefix = (DestinationIndexPrefix) o; - return Objects.equals(this.indexPrefix, destinationIndexPrefix.indexPrefix); - } - - @Override - public int hashCode() { - return Objects.hash(indexPrefix); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DestinationIndexPrefix {\n"); - sb.append(" indexPrefix: ").append(toIndentedString(indexPrefix)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/ingestion/DestinationInput.java b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/ingestion/DestinationInput.java index ddeca14b1f..6318430b56 100644 --- a/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/ingestion/DestinationInput.java +++ b/clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/ingestion/DestinationInput.java @@ -21,17 +21,6 @@ class Deserializer extends JsonDeserializer { @Override public DestinationInput deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { JsonNode tree = jp.readValueAsTree(); - // deserialize DestinationIndexPrefix - if (tree.isObject()) { - try (JsonParser parser = tree.traverse(jp.getCodec())) { - return parser.readValueAs(DestinationIndexPrefix.class); - } catch (Exception e) { - // deserialization failed, continue - LOGGER.finest( - "Failed to deserialize oneOf DestinationIndexPrefix (error: " + e.getMessage() + ") (type: DestinationIndexPrefix)" - ); - } - } // deserialize DestinationIndexName if (tree.isObject()) { try (JsonParser parser = tree.traverse(jp.getCodec())) { diff --git a/clients/algoliasearch-client-javascript/packages/ingestion/model/destinationIndexPrefix.ts b/clients/algoliasearch-client-javascript/packages/ingestion/model/destinationIndexPrefix.ts deleted file mode 100644 index f7724aa3dc..0000000000 --- a/clients/algoliasearch-client-javascript/packages/ingestion/model/destinationIndexPrefix.ts +++ /dev/null @@ -1,8 +0,0 @@ -// 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. - -export type DestinationIndexPrefix = { - /** - * String added to the beginning of all indices created by this destination. - */ - indexPrefix: string; -}; diff --git a/clients/algoliasearch-client-javascript/packages/ingestion/model/destinationInput.ts b/clients/algoliasearch-client-javascript/packages/ingestion/model/destinationInput.ts index a7b67d0b29..c1a5498268 100644 --- a/clients/algoliasearch-client-javascript/packages/ingestion/model/destinationInput.ts +++ b/clients/algoliasearch-client-javascript/packages/ingestion/model/destinationInput.ts @@ -1,6 +1,5 @@ // 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 type { DestinationIndexName } from './destinationIndexName'; -import type { DestinationIndexPrefix } from './destinationIndexPrefix'; -export type DestinationInput = DestinationIndexName | DestinationIndexPrefix; +export type DestinationInput = DestinationIndexName; diff --git a/clients/algoliasearch-client-javascript/packages/ingestion/model/index.ts b/clients/algoliasearch-client-javascript/packages/ingestion/model/index.ts index 801b99e692..5e89e10552 100644 --- a/clients/algoliasearch-client-javascript/packages/ingestion/model/index.ts +++ b/clients/algoliasearch-client-javascript/packages/ingestion/model/index.ts @@ -35,7 +35,6 @@ export * from './destination'; export * from './destinationCreate'; export * from './destinationCreateResponse'; export * from './destinationIndexName'; -export * from './destinationIndexPrefix'; export * from './destinationInput'; export * from './destinationSearch'; export * from './destinationSortKeys'; diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/ingestion/DestinationIndexPrefix.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/ingestion/DestinationIndexPrefix.kt deleted file mode 100644 index 2d1a7b6d4d..0000000000 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/ingestion/DestinationIndexPrefix.kt +++ /dev/null @@ -1,17 +0,0 @@ -/** 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. */ -package com.algolia.client.model.ingestion - -import kotlinx.serialization.* -import kotlinx.serialization.json.* - -/** - * DestinationIndexPrefix - * - * @param indexPrefix String added to the beginning of all indices created by this destination. - */ -@Serializable -public data class DestinationIndexPrefix( - - /** String added to the beginning of all indices created by this destination. */ - @SerialName(value = "indexPrefix") val indexPrefix: String, -) : DestinationInput diff --git a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/ingestion/DestinationInput.kt b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/ingestion/DestinationInput.kt index 4a5af3148c..c931620f3c 100644 --- a/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/ingestion/DestinationInput.kt +++ b/clients/algoliasearch-client-kotlin/client/src/commonMain/kotlin/com/algolia/client/model/ingestion/DestinationInput.kt @@ -14,7 +14,6 @@ import kotlinx.serialization.json.* * * Implementations: * - [DestinationIndexName] - * - [DestinationIndexPrefix] */ @Serializable(DestinationInputSerializer::class) public sealed interface DestinationInput { @@ -26,7 +25,6 @@ public sealed interface DestinationInput { internal class DestinationInputSerializer : JsonContentPolymorphicSerializer(DestinationInput::class) { override fun selectDeserializer(element: JsonElement): DeserializationStrategy { return when { - element is JsonObject -> DestinationIndexPrefix.serializer() element is JsonObject -> DestinationIndexName.serializer() else -> throw AlgoliaClientException("Failed to deserialize json element: $element") } diff --git a/clients/algoliasearch-client-php/lib/Model/Ingestion/DestinationIndexPrefix.php b/clients/algoliasearch-client-php/lib/Model/Ingestion/DestinationIndexPrefix.php deleted file mode 100644 index fe5b77077d..0000000000 --- a/clients/algoliasearch-client-php/lib/Model/Ingestion/DestinationIndexPrefix.php +++ /dev/null @@ -1,231 +0,0 @@ - 'string', - ]; - - /** - * Array of property to format mappings. Used for (de)serialization. - * - * @var string[] - */ - protected static $modelFormats = [ - 'indexPrefix' => null, - ]; - - /** - * Array of attributes where the key is the local name, - * and the value is the original name. - * - * @var string[] - */ - protected static $attributeMap = [ - 'indexPrefix' => 'indexPrefix', - ]; - - /** - * Array of attributes to setter functions (for deserialization of responses). - * - * @var string[] - */ - protected static $setters = [ - 'indexPrefix' => 'setIndexPrefix', - ]; - - /** - * Array of attributes to getter functions (for serialization of requests). - * - * @var string[] - */ - protected static $getters = [ - 'indexPrefix' => 'getIndexPrefix', - ]; - - /** - * Associative array for storing property values. - * - * @var mixed[] - */ - protected $container = []; - - /** - * Constructor. - * - * @param mixed[] $data Associated array of property values - */ - public function __construct(?array $data = null) - { - if (isset($data['indexPrefix'])) { - $this->container['indexPrefix'] = $data['indexPrefix']; - } - } - - /** - * Array of attributes where the key is the local name, - * and the value is the original name. - * - * @return array - */ - public static function attributeMap() - { - return self::$attributeMap; - } - - /** - * Array of property to type mappings. Used for (de)serialization. - * - * @return array - */ - public static function modelTypes() - { - return self::$modelTypes; - } - - /** - * Array of property to format mappings. Used for (de)serialization. - * - * @return array - */ - public static function modelFormats() - { - return self::$modelFormats; - } - - /** - * Array of attributes to setter functions (for deserialization of responses). - * - * @return array - */ - public static function setters() - { - return self::$setters; - } - - /** - * Array of attributes to getter functions (for serialization of requests). - * - * @return array - */ - public static function getters() - { - return self::$getters; - } - - /** - * Show all the invalid properties with reasons. - * - * @return array invalid properties with reasons - */ - public function listInvalidProperties() - { - $invalidProperties = []; - - if (!isset($this->container['indexPrefix']) || null === $this->container['indexPrefix']) { - $invalidProperties[] = "'indexPrefix' can't be null"; - } - - return $invalidProperties; - } - - /** - * Validate all the properties in the model - * return true if all passed. - * - * @return bool True if all properties are valid - */ - public function valid() - { - return 0 === count($this->listInvalidProperties()); - } - - /** - * Gets indexPrefix. - * - * @return string - */ - public function getIndexPrefix() - { - return $this->container['indexPrefix'] ?? null; - } - - /** - * Sets indexPrefix. - * - * @param string $indexPrefix string added to the beginning of all indices created by this destination - * - * @return self - */ - public function setIndexPrefix($indexPrefix) - { - $this->container['indexPrefix'] = $indexPrefix; - - return $this; - } - - /** - * Returns true if offset exists. False otherwise. - * - * @param int $offset Offset - * - * @return bool - */ - public function offsetExists($offset) - { - return isset($this->container[$offset]); - } - - /** - * Gets offset. - * - * @param int $offset Offset - * - * @return null|mixed - */ - public function offsetGet($offset) - { - return $this->container[$offset] ?? null; - } - - /** - * Sets value based on offset. - * - * @param null|int $offset Offset - * @param mixed $value Value to be set - */ - public function offsetSet($offset, $value) - { - if (is_null($offset)) { - $this->container[] = $value; - } else { - $this->container[$offset] = $value; - } - } - - /** - * Unsets offset. - * - * @param int $offset Offset - */ - public function offsetUnset($offset) - { - unset($this->container[$offset]); - } -} diff --git a/clients/algoliasearch-client-php/lib/Model/Ingestion/DestinationInput.php b/clients/algoliasearch-client-php/lib/Model/Ingestion/DestinationInput.php index a67811efd2..bf08979e95 100644 --- a/clients/algoliasearch-client-php/lib/Model/Ingestion/DestinationInput.php +++ b/clients/algoliasearch-client-php/lib/Model/Ingestion/DestinationInput.php @@ -19,7 +19,6 @@ class DestinationInput extends AbstractModel implements ModelInterface, \ArrayAc * @var string[] */ protected static $modelTypes = [ - 'indexPrefix' => 'string', 'indexName' => 'string', 'recordType' => '\Algolia\AlgoliaSearch\Model\Ingestion\RecordType', 'attributesToExclude' => 'string[]', @@ -31,7 +30,6 @@ class DestinationInput extends AbstractModel implements ModelInterface, \ArrayAc * @var string[] */ protected static $modelFormats = [ - 'indexPrefix' => null, 'indexName' => null, 'recordType' => null, 'attributesToExclude' => null, @@ -44,7 +42,6 @@ class DestinationInput extends AbstractModel implements ModelInterface, \ArrayAc * @var string[] */ protected static $attributeMap = [ - 'indexPrefix' => 'indexPrefix', 'indexName' => 'indexName', 'recordType' => 'recordType', 'attributesToExclude' => 'attributesToExclude', @@ -56,7 +53,6 @@ class DestinationInput extends AbstractModel implements ModelInterface, \ArrayAc * @var string[] */ protected static $setters = [ - 'indexPrefix' => 'setIndexPrefix', 'indexName' => 'setIndexName', 'recordType' => 'setRecordType', 'attributesToExclude' => 'setAttributesToExclude', @@ -68,7 +64,6 @@ class DestinationInput extends AbstractModel implements ModelInterface, \ArrayAc * @var string[] */ protected static $getters = [ - 'indexPrefix' => 'getIndexPrefix', 'indexName' => 'getIndexName', 'recordType' => 'getRecordType', 'attributesToExclude' => 'getAttributesToExclude', @@ -88,9 +83,6 @@ class DestinationInput extends AbstractModel implements ModelInterface, \ArrayAc */ public function __construct(?array $data = null) { - if (isset($data['indexPrefix'])) { - $this->container['indexPrefix'] = $data['indexPrefix']; - } if (isset($data['indexName'])) { $this->container['indexName'] = $data['indexName']; } @@ -162,9 +154,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if (!isset($this->container['indexPrefix']) || null === $this->container['indexPrefix']) { - $invalidProperties[] = "'indexPrefix' can't be null"; - } if (!isset($this->container['indexName']) || null === $this->container['indexName']) { $invalidProperties[] = "'indexName' can't be null"; } @@ -183,30 +172,6 @@ public function valid() return 0 === count($this->listInvalidProperties()); } - /** - * Gets indexPrefix. - * - * @return string - */ - public function getIndexPrefix() - { - return $this->container['indexPrefix'] ?? null; - } - - /** - * Sets indexPrefix. - * - * @param string $indexPrefix string added to the beginning of all indices created by this destination - * - * @return self - */ - public function setIndexPrefix($indexPrefix) - { - $this->container['indexPrefix'] = $indexPrefix; - - return $this; - } - /** * Gets indexName. * diff --git a/clients/algoliasearch-client-python/algoliasearch/ingestion/models/destination_index_prefix.py b/clients/algoliasearch-client-python/algoliasearch/ingestion/models/destination_index_prefix.py deleted file mode 100644 index 32c48cf2e9..0000000000 --- a/clients/algoliasearch-client-python/algoliasearch/ingestion/models/destination_index_prefix.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" -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. -""" - -from __future__ import annotations - -from json import loads -from typing import Any, Dict, Self - -from pydantic import BaseModel, ConfigDict, Field, StrictStr - - -class DestinationIndexPrefix(BaseModel): - """ - DestinationIndexPrefix - """ - - index_prefix: StrictStr = Field( - description="String added to the beginning of all indices created by this destination.", - alias="indexPrefix", - ) - - model_config = ConfigDict( - use_enum_values=True, populate_by_name=True, validate_assignment=True - ) - - def to_json(self) -> str: - return self.model_dump_json(by_alias=True, exclude_unset=True) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Create an instance of DestinationIndexPrefix from a JSON string""" - return cls.from_dict(loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - _dict = self.model_dump( - by_alias=True, - exclude={}, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Dict) -> Self: - """Create an instance of DestinationIndexPrefix from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({"indexPrefix": obj.get("indexPrefix")}) - return _obj diff --git a/clients/algoliasearch-client-python/algoliasearch/ingestion/models/destination_input.py b/clients/algoliasearch-client-python/algoliasearch/ingestion/models/destination_input.py index 109b64bc7e..a5ee94ddfb 100644 --- a/clients/algoliasearch-client-python/algoliasearch/ingestion/models/destination_input.py +++ b/clients/algoliasearch-client-python/algoliasearch/ingestion/models/destination_input.py @@ -12,9 +12,6 @@ from pydantic import BaseModel, ValidationError, model_serializer from algoliasearch.ingestion.models.destination_index_name import DestinationIndexName -from algoliasearch.ingestion.models.destination_index_prefix import ( - DestinationIndexPrefix, -) class DestinationInput(BaseModel): @@ -22,11 +19,8 @@ class DestinationInput(BaseModel): DestinationInput """ - oneof_schema_1_validator: Optional[DestinationIndexPrefix] = None - oneof_schema_2_validator: Optional[DestinationIndexName] = None - actual_instance: Optional[Union[DestinationIndexName, DestinationIndexPrefix]] = ( - None - ) + oneof_schema_1_validator: Optional[DestinationIndexName] = None + actual_instance: Optional[Union[DestinationIndexName]] = None def __init__(self, *args, **kwargs) -> None: if args: @@ -43,9 +37,7 @@ def __init__(self, *args, **kwargs) -> None: super().__init__(**kwargs) @model_serializer - def unwrap_actual_instance( - self, - ) -> Optional[Union[DestinationIndexName, DestinationIndexPrefix]]: + def unwrap_actual_instance(self) -> Optional[Union[DestinationIndexName]]: """ Unwraps the `actual_instance` when calling the `to_json` method. """ @@ -61,12 +53,6 @@ def from_json(cls, json_str: str) -> Self: instance = cls.model_construct() error_messages = [] - try: - instance.actual_instance = DestinationIndexPrefix.from_json(json_str) - - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) try: instance.actual_instance = DestinationIndexName.from_json(json_str) @@ -75,7 +61,7 @@ def from_json(cls, json_str: str) -> Self: error_messages.append(str(e)) raise ValueError( - "No match found when deserializing the JSON string into DestinationInput with oneOf schemas: DestinationIndexName, DestinationIndexPrefix. Details: " + "No match found when deserializing the JSON string into DestinationInput with oneOf schemas: DestinationIndexName. Details: " + ", ".join(error_messages) ) diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/ingestion/destination_index_prefix.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/ingestion/destination_index_prefix.rb deleted file mode 100644 index cceea4eb04..0000000000 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/ingestion/destination_index_prefix.rb +++ /dev/null @@ -1,214 +0,0 @@ -# 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. - -require "date" -require "time" - -module Algolia - module Ingestion - class DestinationIndexPrefix - # String added to the beginning of all indices created by this destination. - attr_accessor :index_prefix - - # Attribute mapping from ruby-style variable name to JSON key. - def self.attribute_map - { - :index_prefix => :indexPrefix - } - end - - # Returns all the JSON keys this model knows about - def self.acceptable_attributes - attribute_map.values - end - - # Attribute type mapping. - def self.types_mapping - { - :index_prefix => :"String" - } - end - - # List of attributes with nullable: true - def self.openapi_nullable - Set.new( - [] - ) - end - - # Initializes the object - # @param [Hash] attributes Model attributes in the form of hash - def initialize(attributes = {}) - if (!attributes.is_a?(Hash)) - raise( - ArgumentError, - "The input argument (attributes) must be a hash in `Algolia::DestinationIndexPrefix` initialize method" - ) - end - - # check to see if the attribute exists and convert string to symbol for hash key - attributes = attributes.each_with_object({}) { |(k, v), h| - if (!self.class.attribute_map.key?(k.to_sym)) - raise( - ArgumentError, - "`#{k}` is not a valid attribute in `Algolia::DestinationIndexPrefix`. Please check the name to make sure it's valid. List of attributes: " + - self.class.attribute_map.keys.inspect - ) - end - - h[k.to_sym] = v - } - - if attributes.key?(:index_prefix) - self.index_prefix = attributes[:index_prefix] - else - self.index_prefix = nil - end - end - - # Checks equality by comparing each attribute. - # @param [Object] Object to be compared - def ==(other) - return true if self.equal?(other) - self.class == other.class && - index_prefix == other.index_prefix - end - - # @see the `==` method - # @param [Object] Object to be compared - def eql?(other) - self == other - end - - # Calculates hash code according to all attributes. - # @return [Integer] Hash code - def hash - [index_prefix].hash - end - - # Builds the object from hash - # @param [Hash] attributes Model attributes in the form of hash - # @return [Object] Returns the model itself - def self.build_from_hash(attributes) - return nil unless attributes.is_a?(Hash) - attributes = attributes.transform_keys(&:to_sym) - transformed_hash = {} - types_mapping.each_pair do |key, type| - if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? - transformed_hash[key.to_sym] = nil - elsif type =~ /\AArray<(.*)>/i - # check to ensure the input is an array given that the attribute - # is documented as an array but the input is not - if attributes[attribute_map[key]].is_a?(Array) - transformed_hash[key.to_sym] = attributes[attribute_map[key]].map { |v| - _deserialize(::Regexp.last_match(1), v) - } - end - elsif !attributes[attribute_map[key]].nil? - transformed_hash[key.to_sym] = _deserialize(type, attributes[attribute_map[key]]) - end - end - - new(transformed_hash) - end - - # Deserializes the data based on type - # @param string type Data type - # @param string value Value to be deserialized - # @return [Object] Deserialized data - def self._deserialize(type, value) - case type.to_sym - when :Time - Time.parse(value) - when :Date - Date.parse(value) - when :String - value.to_s - when :Integer - value.to_i - when :Float - value.to_f - when :Boolean - if value.to_s =~ /\A(true|t|yes|y|1)\z/i - true - else - false - end - - when :Object - # generic object (usually a Hash), return directly - value - when /\AArray<(?.+)>\z/ - inner_type = Regexp.last_match[:inner_type] - value.map { |v| _deserialize(inner_type, v) } - when /\AHash<(?.+?), (?.+)>\z/ - k_type = Regexp.last_match[:k_type] - v_type = Regexp.last_match[:v_type] - {}.tap do |hash| - value.each do |k, v| - hash[_deserialize(k_type, k)] = _deserialize(v_type, v) - end - end - # model - else - # models (e.g. Pet) or oneOf - klass = Algolia::Ingestion.const_get(type) - klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass - .build_from_hash(value) - end - end - - # Returns the string representation of the object - # @return [String] String presentation of the object - def to_s - to_hash.to_s - end - - # to_body is an alias to to_hash (backward compatibility) - # @return [Hash] Returns the object in the form of hash - def to_body - to_hash - end - - def to_json(*_args) - to_hash.to_json - end - - # Returns the object in the form of hash - # @return [Hash] Returns the object in the form of hash - def to_hash - hash = {} - self.class.attribute_map.each_pair do |attr, param| - value = send(attr) - if value.nil? - is_nullable = self.class.openapi_nullable.include?(attr) - next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) - end - - hash[param] = _to_hash(value) - end - - hash - end - - # Outputs non-array value in the form of hash - # For object, use to_hash. Otherwise, just return the value - # @param [Object] value Any valid value - # @return [Hash] Returns the value in the form of hash - def _to_hash(value) - if value.is_a?(Array) - value.compact.map { |v| _to_hash(v) } - elsif value.is_a?(Hash) - {}.tap do |hash| - value.each { |k, v| hash[k] = _to_hash(v) } - end - elsif value.respond_to?(:to_hash) - value.to_hash - else - value - end - end - - end - - end -end diff --git a/clients/algoliasearch-client-ruby/lib/algolia/models/ingestion/destination_input.rb b/clients/algoliasearch-client-ruby/lib/algolia/models/ingestion/destination_input.rb index 7b73fc91eb..294db8f78e 100644 --- a/clients/algoliasearch-client-ruby/lib/algolia/models/ingestion/destination_input.rb +++ b/clients/algoliasearch-client-ruby/lib/algolia/models/ingestion/destination_input.rb @@ -10,8 +10,7 @@ class << self # List of class defined in oneOf (OpenAPI v3) def openapi_one_of [ - :"DestinationIndexName", - :"DestinationIndexPrefix" + :"DestinationIndexName" ] end diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/ingestion/DestinationIndexPrefix.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/ingestion/DestinationIndexPrefix.scala deleted file mode 100644 index ab531b02b3..0000000000 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/ingestion/DestinationIndexPrefix.scala +++ /dev/null @@ -1,33 +0,0 @@ -/** Ingestion API The Ingestion API lets you connect third-party services and platforms with Algolia and schedule tasks - * to ingest your data. The Ingestion API powers the no-code [data - * connectors](https://dashboard.algolia.com/connectors). ## Base URLs The base URLs for requests to the Ingestion API - * are: - `https://data.us.algolia.com` - `https://data.eu.algolia.com` Use the URL that matches your [analytics - * region](https://dashboard.algolia.com/account/infrastructure/analytics). **All requests must use HTTPS.** ## - * Authentication To authenticate your API requests, add these headers: - `x-algolia-application-id`. Your Algolia - * application ID. - `x-algolia-api-key`. An API key with the necessary permissions to make the request. The required - * access control list (ACL) to make a request is listed in each endpoint's reference. You can find your application ID - * and API key in the [Algolia dashboard](https://dashboard.algolia.com/account). ## Request format Request bodies must - * be JSON objects. ## Response status and errors Response bodies are JSON objects. Deleting a user token returns an - * empty response body with rate-limiting information as headers. Successful responses return a `2xx` status. Client - * errors return a `4xx` status. Server errors are indicated by a `5xx` status. Error responses have a `message` - * property with more information. The Insights API doesn't validate if the event parameters such as `indexName`, - * `objectIDs`, or `userToken`, correspond to anything in the Search API. It justs checks if they're formatted - * correctly. Check the [Events](https://dashboard.algolia.com/events/health) health section, whether your events can - * be used for Algolia features such as Analytics, or Dynamic Re-Ranking. ## Version The current version of the - * Insights API is version 1, as indicated by the `/1/` in each endpoint's URL. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech Do not edit the class manually. - */ -package algoliasearch.ingestion - -/** DestinationIndexPrefix - * - * @param indexPrefix - * String added to the beginning of all indices created by this destination. - */ -case class DestinationIndexPrefix( - indexPrefix: String -) extends DestinationInputTrait diff --git a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/ingestion/DestinationInput.scala b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/ingestion/DestinationInput.scala index 7a63db4bc7..c92e85a6a6 100644 --- a/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/ingestion/DestinationInput.scala +++ b/clients/algoliasearch-client-scala/src/main/scala/algoliasearch/ingestion/DestinationInput.scala @@ -40,7 +40,6 @@ object DestinationInputSerializer extends Serializer[DestinationInput] { case (TypeInfo(clazz, _), json) if clazz == classOf[DestinationInput] => json match { - case value: JObject => Extraction.extract[DestinationIndexPrefix](value) case value: JObject => Extraction.extract[DestinationIndexName](value) case _ => throw new MappingException("Can't convert " + json + " to DestinationInput") } @@ -48,8 +47,7 @@ object DestinationInputSerializer extends Serializer[DestinationInput] { override def serialize(implicit format: Formats): PartialFunction[Any, JValue] = { case value: DestinationInput => value match { - case value: DestinationIndexPrefix => Extraction.decompose(value)(format - this) - case value: DestinationIndexName => Extraction.decompose(value)(format - this) + case value: DestinationIndexName => Extraction.decompose(value)(format - this) } } } diff --git a/clients/algoliasearch-client-swift/Sources/Ingestion/Models/DestinationIndexPrefix.swift b/clients/algoliasearch-client-swift/Sources/Ingestion/Models/DestinationIndexPrefix.swift deleted file mode 100644 index f449bd6ed5..0000000000 --- a/clients/algoliasearch-client-swift/Sources/Ingestion/Models/DestinationIndexPrefix.swift +++ /dev/null @@ -1,39 +0,0 @@ -// 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 DestinationIndexPrefix: Codable, JSONEncodable { - /// String added to the beginning of all indices created by this destination. - public var indexPrefix: String - - public init(indexPrefix: String) { - self.indexPrefix = indexPrefix - } - - public enum CodingKeys: String, CodingKey, CaseIterable { - case indexPrefix - } - - // Encodable protocol methods - - public func encode(to encoder: Encoder) throws { - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(self.indexPrefix, forKey: .indexPrefix) - } -} - -extension DestinationIndexPrefix: Equatable { - public static func ==(lhs: DestinationIndexPrefix, rhs: DestinationIndexPrefix) -> Bool { - lhs.indexPrefix == rhs.indexPrefix - } -} - -extension DestinationIndexPrefix: Hashable { - public func hash(into hasher: inout Hasher) { - hasher.combine(self.indexPrefix.hashValue) - } -} diff --git a/clients/algoliasearch-client-swift/Sources/Ingestion/Models/DestinationInput.swift b/clients/algoliasearch-client-swift/Sources/Ingestion/Models/DestinationInput.swift index 8e115d51ee..6cf1032556 100644 --- a/clients/algoliasearch-client-swift/Sources/Ingestion/Models/DestinationInput.swift +++ b/clients/algoliasearch-client-swift/Sources/Ingestion/Models/DestinationInput.swift @@ -7,14 +7,11 @@ import Foundation #endif public enum DestinationInput: Codable, JSONEncodable, AbstractEncodable { - case destinationIndexPrefix(DestinationIndexPrefix) case destinationIndexName(DestinationIndexName) public func encode(to encoder: Encoder) throws { var container = encoder.singleValueContainer() switch self { - case let .destinationIndexPrefix(value): - try container.encode(value) case let .destinationIndexName(value): try container.encode(value) } @@ -22,9 +19,7 @@ public enum DestinationInput: Codable, JSONEncodable, AbstractEncodable { public init(from decoder: Decoder) throws { let container = try decoder.singleValueContainer() - if let value = try? container.decode(DestinationIndexPrefix.self) { - self = .destinationIndexPrefix(value) - } else if let value = try? container.decode(DestinationIndexName.self) { + if let value = try? container.decode(DestinationIndexName.self) { self = .destinationIndexName(value) } else { throw DecodingError.typeMismatch( @@ -36,8 +31,6 @@ public enum DestinationInput: Codable, JSONEncodable, AbstractEncodable { public func GetActualInstance() -> Encodable { switch self { - case let .destinationIndexPrefix(value): - value as DestinationIndexPrefix case let .destinationIndexName(value): value as DestinationIndexName } diff --git a/snippets/csharp/src/Ingestion.cs b/snippets/csharp/src/Ingestion.cs index 040003a364..603d4db89b 100644 --- a/snippets/csharp/src/Ingestion.cs +++ b/snippets/csharp/src/Ingestion.cs @@ -59,7 +59,7 @@ public async Task SnippetForIngestionClientCreateDestination() { Type = Enum.Parse("Search"), Name = "destinationName", - Input = new DestinationInput(new DestinationIndexPrefix { IndexPrefix = "prefix_", }), + Input = new DestinationInput(new DestinationIndexName { IndexName = "full_name______", }), AuthenticationID = "6c02aeb1-775e-418e-870b-1faccd4b2c0f", } ); diff --git a/snippets/go/src/ingestion.go b/snippets/go/src/ingestion.go index 3c75963bfe..d98d18b077 100644 --- a/snippets/go/src/ingestion.go +++ b/snippets/go/src/ingestion.go @@ -54,8 +54,8 @@ func SnippetForCreateDestinationOfIngestion() { // Call the API response, err := client.CreateDestination(client.NewApiCreateDestinationRequest( - ingestion.NewEmptyDestinationCreate().SetType(ingestion.DestinationType("search")).SetName("destinationName").SetInput(ingestion.DestinationIndexPrefixAsDestinationInput( - ingestion.NewEmptyDestinationIndexPrefix().SetIndexPrefix("prefix_"))).SetAuthenticationID("6c02aeb1-775e-418e-870b-1faccd4b2c0f"), + ingestion.NewEmptyDestinationCreate().SetType(ingestion.DestinationType("search")).SetName("destinationName").SetInput(ingestion.DestinationIndexNameAsDestinationInput( + ingestion.NewEmptyDestinationIndexName().SetIndexName("full_name______"))).SetAuthenticationID("6c02aeb1-775e-418e-870b-1faccd4b2c0f"), )) if err != nil { // handle the eventual error diff --git a/snippets/guides/ingestion-snippets.json b/snippets/guides/ingestion-snippets.json index 42512735ba..c6027ccba4 100644 --- a/snippets/guides/ingestion-snippets.json +++ b/snippets/guides/ingestion-snippets.json @@ -7,7 +7,7 @@ "default": "var response = await client.CreateAuthenticationAsync(\n new AuthenticationCreate\n {\n Type = Enum.Parse(\"Oauth\"),\n Name = \"authName\",\n Input = new AuthInput(\n new AuthOAuth\n {\n Url = \"http://test.oauth\",\n ClientId = \"myID\",\n ClientSecret = \"mySecret\",\n }\n ),\n }\n);" }, "createDestination": { - "default": "var response = await client.CreateDestinationAsync(\n new DestinationCreate\n {\n Type = Enum.Parse(\"Search\"),\n Name = \"destinationName\",\n Input = new DestinationInput(new DestinationIndexPrefix { IndexPrefix = \"prefix_\", }),\n AuthenticationID = \"6c02aeb1-775e-418e-870b-1faccd4b2c0f\",\n }\n);" + "default": "var response = await client.CreateDestinationAsync(\n new DestinationCreate\n {\n Type = Enum.Parse(\"Search\"),\n Name = \"destinationName\",\n Input = new DestinationInput(new DestinationIndexName { IndexName = \"full_name______\", }),\n AuthenticationID = \"6c02aeb1-775e-418e-870b-1faccd4b2c0f\",\n }\n);" }, "createSource": { "default": "var response = await client.CreateSourceAsync(\n new SourceCreate\n {\n Type = Enum.Parse(\"Commercetools\"),\n Name = \"sourceName\",\n Input = new SourceInput(\n new SourceCommercetools\n {\n StoreKeys = new List { \"myStore\" },\n Locales = new List { \"de\" },\n Url = \"http://commercetools.com\",\n ProjectKey = \"keyID\",\n }\n ),\n AuthenticationID = \"6c02aeb1-775e-418e-870b-1faccd4b2c0f\",\n }\n);" @@ -211,7 +211,7 @@ "default": "// Initialize the client with your application region, eg. ingestion.YOUR_APP_ID_REGION\nclient, err := ingestion.NewClient(\"YOUR_APP_ID\", \"YOUR_API_KEY\", ingestion.US)\nif err != nil {\n // The client can fail to initialize if you pass an invalid parameter.\n panic(err)\n}\n\n// Call the API\nresponse, err := client.CreateAuthentication(client.NewApiCreateAuthenticationRequest(\n\n ingestion.NewEmptyAuthenticationCreate().SetType(ingestion.AuthenticationType(\"oauth\")).SetName(\"authName\").SetInput(ingestion.AuthOAuthAsAuthInput(\n ingestion.NewEmptyAuthOAuth().SetUrl(\"http://test.oauth\").SetClientId(\"myID\").SetClientSecret(\"mySecret\"))),\n))\nif err != nil {\n // handle the eventual error\n panic(err)\n}\n\n// use the model directly\nprint(response)\n" }, "createDestination": { - "default": "// Initialize the client with your application region, eg. ingestion.YOUR_APP_ID_REGION\nclient, err := ingestion.NewClient(\"YOUR_APP_ID\", \"YOUR_API_KEY\", ingestion.US)\nif err != nil {\n // The client can fail to initialize if you pass an invalid parameter.\n panic(err)\n}\n\n// Call the API\nresponse, err := client.CreateDestination(client.NewApiCreateDestinationRequest(\n\n ingestion.NewEmptyDestinationCreate().SetType(ingestion.DestinationType(\"search\")).SetName(\"destinationName\").SetInput(ingestion.DestinationIndexPrefixAsDestinationInput(\n ingestion.NewEmptyDestinationIndexPrefix().SetIndexPrefix(\"prefix_\"))).SetAuthenticationID(\"6c02aeb1-775e-418e-870b-1faccd4b2c0f\"),\n))\nif err != nil {\n // handle the eventual error\n panic(err)\n}\n\n// use the model directly\nprint(response)\n" + "default": "// Initialize the client with your application region, eg. ingestion.YOUR_APP_ID_REGION\nclient, err := ingestion.NewClient(\"YOUR_APP_ID\", \"YOUR_API_KEY\", ingestion.US)\nif err != nil {\n // The client can fail to initialize if you pass an invalid parameter.\n panic(err)\n}\n\n// Call the API\nresponse, err := client.CreateDestination(client.NewApiCreateDestinationRequest(\n\n ingestion.NewEmptyDestinationCreate().SetType(ingestion.DestinationType(\"search\")).SetName(\"destinationName\").SetInput(ingestion.DestinationIndexNameAsDestinationInput(\n ingestion.NewEmptyDestinationIndexName().SetIndexName(\"full_name______\"))).SetAuthenticationID(\"6c02aeb1-775e-418e-870b-1faccd4b2c0f\"),\n))\nif err != nil {\n // handle the eventual error\n panic(err)\n}\n\n// use the model directly\nprint(response)\n" }, "createSource": { "default": "// Initialize the client with your application region, eg. ingestion.YOUR_APP_ID_REGION\nclient, err := ingestion.NewClient(\"YOUR_APP_ID\", \"YOUR_API_KEY\", ingestion.US)\nif err != nil {\n // The client can fail to initialize if you pass an invalid parameter.\n panic(err)\n}\n\n// Call the API\nresponse, err := client.CreateSource(client.NewApiCreateSourceRequest(\n\n ingestion.NewEmptySourceCreate().SetType(ingestion.SourceType(\"commercetools\")).SetName(\"sourceName\").SetInput(ingestion.SourceCommercetoolsAsSourceInput(\n ingestion.NewEmptySourceCommercetools().SetStoreKeys(\n []string{\"myStore\"}).SetLocales(\n []string{\"de\"}).SetUrl(\"http://commercetools.com\").SetProjectKey(\"keyID\"))).SetAuthenticationID(\"6c02aeb1-775e-418e-870b-1faccd4b2c0f\"),\n))\nif err != nil {\n // handle the eventual error\n panic(err)\n}\n\n// use the model directly\nprint(response)\n" @@ -397,7 +397,7 @@ "default": "client.createAuthentication(\n new AuthenticationCreate()\n .setType(AuthenticationType.OAUTH)\n .setName(\"authName\")\n .setInput(new AuthOAuth().setUrl(\"http://test.oauth\").setClientId(\"myID\").setClientSecret(\"mySecret\"))\n);" }, "createDestination": { - "default": "client.createDestination(\n new DestinationCreate()\n .setType(DestinationType.SEARCH)\n .setName(\"destinationName\")\n .setInput(new DestinationIndexPrefix().setIndexPrefix(\"prefix_\"))\n .setAuthenticationID(\"6c02aeb1-775e-418e-870b-1faccd4b2c0f\")\n);" + "default": "client.createDestination(\n new DestinationCreate()\n .setType(DestinationType.SEARCH)\n .setName(\"destinationName\")\n .setInput(new DestinationIndexName().setIndexName(\"full_name______\"))\n .setAuthenticationID(\"6c02aeb1-775e-418e-870b-1faccd4b2c0f\")\n);" }, "createSource": { "default": "client.createSource(\n new SourceCreate()\n .setType(SourceType.COMMERCETOOLS)\n .setName(\"sourceName\")\n .setInput(\n new SourceCommercetools()\n .setStoreKeys(List.of(\"myStore\"))\n .setLocales(List.of(\"de\"))\n .setUrl(\"http://commercetools.com\")\n .setProjectKey(\"keyID\")\n )\n .setAuthenticationID(\"6c02aeb1-775e-418e-870b-1faccd4b2c0f\")\n);" @@ -586,7 +586,7 @@ "default": "const response = await client.createAuthentication({\n type: 'oauth',\n name: 'authName',\n input: {\n url: 'http://test.oauth',\n client_id: 'myID',\n client_secret: 'mySecret',\n },\n});\n\n// use typed response\nconsole.log(response);" }, "createDestination": { - "default": "const response = await client.createDestination({\n type: 'search',\n name: 'destinationName',\n input: { indexPrefix: 'prefix_' },\n authenticationID: '6c02aeb1-775e-418e-870b-1faccd4b2c0f',\n});\n\n// use typed response\nconsole.log(response);" + "default": "const response = await client.createDestination({\n type: 'search',\n name: 'destinationName',\n input: { indexName: 'full_name______' },\n authenticationID: '6c02aeb1-775e-418e-870b-1faccd4b2c0f',\n});\n\n// use typed response\nconsole.log(response);" }, "createSource": { "default": "const response = await client.createSource({\n type: 'commercetools',\n name: 'sourceName',\n input: {\n storeKeys: ['myStore'],\n locales: ['de'],\n url: 'http://commercetools.com',\n projectKey: 'keyID',\n },\n authenticationID: '6c02aeb1-775e-418e-870b-1faccd4b2c0f',\n});\n\n// use typed response\nconsole.log(response);" @@ -775,7 +775,7 @@ "default": "var response = client.createAuthentication(\n authenticationCreate = AuthenticationCreate(\n type = AuthenticationType.entries.first { it.value == \"oauth\" },\n name = \"authName\",\n input = AuthOAuth(\n url = \"http://test.oauth\",\n clientId = \"myID\",\n clientSecret = \"mySecret\",\n ),\n ),\n)\n\n// Use the response\nprintln(response)" }, "createDestination": { - "default": "var response = client.createDestination(\n destinationCreate = DestinationCreate(\n type = DestinationType.entries.first { it.value == \"search\" },\n name = \"destinationName\",\n input = DestinationIndexPrefix(\n indexPrefix = \"prefix_\",\n ),\n authenticationID = \"6c02aeb1-775e-418e-870b-1faccd4b2c0f\",\n ),\n)\n\n// Use the response\nprintln(response)" + "default": "var response = client.createDestination(\n destinationCreate = DestinationCreate(\n type = DestinationType.entries.first { it.value == \"search\" },\n name = \"destinationName\",\n input = DestinationIndexName(\n indexName = \"full_name______\",\n ),\n authenticationID = \"6c02aeb1-775e-418e-870b-1faccd4b2c0f\",\n ),\n)\n\n// Use the response\nprintln(response)" }, "createSource": { "default": "var response = client.createSource(\n sourceCreate = SourceCreate(\n type = SourceType.entries.first { it.value == \"commercetools\" },\n name = \"sourceName\",\n input = SourceCommercetools(\n storeKeys = listOf(\"myStore\"),\n locales = listOf(\"de\"),\n url = \"http://commercetools.com\",\n projectKey = \"keyID\",\n ),\n authenticationID = \"6c02aeb1-775e-418e-870b-1faccd4b2c0f\",\n ),\n)\n\n// Use the response\nprintln(response)" @@ -964,7 +964,7 @@ "default": "$response = $client->createAuthentication(\n ['type' => 'oauth',\n 'name' => 'authName',\n 'input' => ['url' => 'http://test.oauth',\n 'client_id' => 'myID',\n 'client_secret' => 'mySecret',\n ],\n ],\n);\n\n// play with the response\nvar_dump($response);" }, "createDestination": { - "default": "$response = $client->createDestination(\n ['type' => 'search',\n 'name' => 'destinationName',\n 'input' => ['indexPrefix' => 'prefix_',\n ],\n 'authenticationID' => '6c02aeb1-775e-418e-870b-1faccd4b2c0f',\n ],\n);\n\n// play with the response\nvar_dump($response);" + "default": "$response = $client->createDestination(\n ['type' => 'search',\n 'name' => 'destinationName',\n 'input' => ['indexName' => 'full_name______',\n ],\n 'authenticationID' => '6c02aeb1-775e-418e-870b-1faccd4b2c0f',\n ],\n);\n\n// play with the response\nvar_dump($response);" }, "createSource": { "default": "$response = $client->createSource(\n ['type' => 'commercetools',\n 'name' => 'sourceName',\n 'input' => ['storeKeys' => [\n 'myStore',\n ],\n 'locales' => [\n 'de',\n ],\n 'url' => 'http://commercetools.com',\n 'projectKey' => 'keyID',\n ],\n 'authenticationID' => '6c02aeb1-775e-418e-870b-1faccd4b2c0f',\n ],\n);\n\n// play with the response\nvar_dump($response);" @@ -1153,7 +1153,7 @@ "default": "response = await _client.create_authentication(\n authentication_create={\n \"type\": \"oauth\",\n \"name\": \"authName\",\n \"input\": {\n \"url\": \"http://test.oauth\",\n \"client_id\": \"myID\",\n \"client_secret\": \"mySecret\",\n },\n },\n)\n\n# use the class directly\nprint(response)\n\n# print the JSON response\nprint(response.to_json())" }, "createDestination": { - "default": "response = await _client.create_destination(\n destination_create={\n \"type\": \"search\",\n \"name\": \"destinationName\",\n \"input\": {\n \"indexPrefix\": \"prefix_\",\n },\n \"authenticationID\": \"6c02aeb1-775e-418e-870b-1faccd4b2c0f\",\n },\n)\n\n# use the class directly\nprint(response)\n\n# print the JSON response\nprint(response.to_json())" + "default": "response = await _client.create_destination(\n destination_create={\n \"type\": \"search\",\n \"name\": \"destinationName\",\n \"input\": {\n \"indexName\": \"full_name______\",\n },\n \"authenticationID\": \"6c02aeb1-775e-418e-870b-1faccd4b2c0f\",\n },\n)\n\n# use the class directly\nprint(response)\n\n# print the JSON response\nprint(response.to_json())" }, "createSource": { "default": "response = await _client.create_source(\n source_create={\n \"type\": \"commercetools\",\n \"name\": \"sourceName\",\n \"input\": {\n \"storeKeys\": [\n \"myStore\",\n ],\n \"locales\": [\n \"de\",\n ],\n \"url\": \"http://commercetools.com\",\n \"projectKey\": \"keyID\",\n },\n \"authenticationID\": \"6c02aeb1-775e-418e-870b-1faccd4b2c0f\",\n },\n)\n\n# use the class directly\nprint(response)\n\n# print the JSON response\nprint(response.to_json())" @@ -1342,7 +1342,7 @@ "default": "response = client.create_authentication(\n AuthenticationCreate.new(\n type: \"oauth\",\n name: \"authName\",\n input: AuthOAuth.new(url: \"http://test.oauth\", client_id: \"myID\", client_secret: \"mySecret\")\n )\n)\n\n# use the class directly\nputs(response)\n\n# print the JSON response\nputs(response.to_json)" }, "createDestination": { - "default": "response = client.create_destination(\n DestinationCreate.new(\n type: \"search\",\n name: \"destinationName\",\n input: DestinationIndexPrefix.new(index_prefix: \"prefix_\"),\n authentication_id: \"6c02aeb1-775e-418e-870b-1faccd4b2c0f\"\n )\n)\n\n# use the class directly\nputs(response)\n\n# print the JSON response\nputs(response.to_json)" + "default": "response = client.create_destination(\n DestinationCreate.new(\n type: \"search\",\n name: \"destinationName\",\n input: DestinationIndexName.new(index_name: \"full_name______\"),\n authentication_id: \"6c02aeb1-775e-418e-870b-1faccd4b2c0f\"\n )\n)\n\n# use the class directly\nputs(response)\n\n# print the JSON response\nputs(response.to_json)" }, "createSource": { "default": "response = client.create_source(\n SourceCreate.new(\n type: \"commercetools\",\n name: \"sourceName\",\n input: SourceCommercetools.new(\n store_keys: [\"myStore\"],\n locales: [\"de\"],\n url: \"http://commercetools.com\",\n project_key: \"keyID\"\n ),\n authentication_id: \"6c02aeb1-775e-418e-870b-1faccd4b2c0f\"\n )\n)\n\n# use the class directly\nputs(response)\n\n# print the JSON response\nputs(response.to_json)" @@ -1531,7 +1531,7 @@ "default": "val response = client.createAuthentication(\n authenticationCreate = AuthenticationCreate(\n `type` = AuthenticationType.withName(\"oauth\"),\n name = \"authName\",\n input = AuthOAuth(\n url = \"http://test.oauth\",\n client_id = \"myID\",\n client_secret = \"mySecret\"\n )\n )\n)\n\n// Use the response\nval value = Await.result(response, Duration(100, \"sec\"))" }, "createDestination": { - "default": "val response = client.createDestination(\n destinationCreate = DestinationCreate(\n `type` = DestinationType.withName(\"search\"),\n name = \"destinationName\",\n input = DestinationIndexPrefix(\n indexPrefix = \"prefix_\"\n ),\n authenticationID = Some(\"6c02aeb1-775e-418e-870b-1faccd4b2c0f\")\n )\n)\n\n// Use the response\nval value = Await.result(response, Duration(100, \"sec\"))" + "default": "val response = client.createDestination(\n destinationCreate = DestinationCreate(\n `type` = DestinationType.withName(\"search\"),\n name = \"destinationName\",\n input = DestinationIndexName(\n indexName = \"full_name______\"\n ),\n authenticationID = Some(\"6c02aeb1-775e-418e-870b-1faccd4b2c0f\")\n )\n)\n\n// Use the response\nval value = Await.result(response, Duration(100, \"sec\"))" }, "createSource": { "default": "val response = client.createSource(\n sourceCreate = SourceCreate(\n `type` = SourceType.withName(\"commercetools\"),\n name = \"sourceName\",\n input = SourceCommercetools(\n storeKeys = Some(Seq(\"myStore\")),\n locales = Some(Seq(\"de\")),\n url = \"http://commercetools.com\",\n projectKey = \"keyID\"\n ),\n authenticationID = Some(\"6c02aeb1-775e-418e-870b-1faccd4b2c0f\")\n )\n)\n\n// Use the response\nval value = Await.result(response, Duration(100, \"sec\"))" @@ -1720,7 +1720,7 @@ "default": "let response = try await client.createAuthentication(authenticationCreate: AuthenticationCreate(\n type: AuthenticationType.oauth,\n name: \"authName\",\n input: AuthInput.authOAuth(AuthOAuth(url: \"http://test.oauth\", clientId: \"myID\", clientSecret: \"mySecret\"))\n))" }, "createDestination": { - "default": "let response = try await client.createDestination(destinationCreate: DestinationCreate(\n type: DestinationType.search,\n name: \"destinationName\",\n input: DestinationInput.destinationIndexPrefix(DestinationIndexPrefix(indexPrefix: \"prefix_\")),\n authenticationID: \"6c02aeb1-775e-418e-870b-1faccd4b2c0f\"\n))" + "default": "let response = try await client.createDestination(destinationCreate: DestinationCreate(\n type: DestinationType.search,\n name: \"destinationName\",\n input: DestinationInput.destinationIndexName(DestinationIndexName(indexName: \"full_name______\")),\n authenticationID: \"6c02aeb1-775e-418e-870b-1faccd4b2c0f\"\n))" }, "createSource": { "default": "let response = try await client.createSource(sourceCreate: SourceCreate(\n type: SourceType.commercetools,\n name: \"sourceName\",\n input: SourceInput.sourceCommercetools(SourceCommercetools(\n storeKeys: [\"myStore\"],\n locales: [\"de\"],\n url: \"http://commercetools.com\",\n projectKey: \"keyID\"\n )),\n authenticationID: \"6c02aeb1-775e-418e-870b-1faccd4b2c0f\"\n))" diff --git a/snippets/java/src/test/java/com/algolia/Ingestion.java b/snippets/java/src/test/java/com/algolia/Ingestion.java index 926266b339..b892e2f412 100644 --- a/snippets/java/src/test/java/com/algolia/Ingestion.java +++ b/snippets/java/src/test/java/com/algolia/Ingestion.java @@ -39,7 +39,7 @@ void snippetForCreateDestination() { new DestinationCreate() .setType(DestinationType.SEARCH) .setName("destinationName") - .setInput(new DestinationIndexPrefix().setIndexPrefix("prefix_")) + .setInput(new DestinationIndexName().setIndexName("full_name______")) .setAuthenticationID("6c02aeb1-775e-418e-870b-1faccd4b2c0f") ); // SEPARATOR< diff --git a/snippets/javascript/src/ingestion.ts b/snippets/javascript/src/ingestion.ts index dc0c41c2a8..61968613ce 100644 --- a/snippets/javascript/src/ingestion.ts +++ b/snippets/javascript/src/ingestion.ts @@ -49,7 +49,7 @@ export async function snippetForCreateDestination(): Promise { const response = await client.createDestination({ type: 'search', name: 'destinationName', - input: { indexPrefix: 'prefix_' }, + input: { indexName: 'full_name______' }, authenticationID: '6c02aeb1-775e-418e-870b-1faccd4b2c0f', }); diff --git a/snippets/kotlin/src/main/kotlin/com/algolia/snippets/Ingestion.kt b/snippets/kotlin/src/main/kotlin/com/algolia/snippets/Ingestion.kt index 36e49ddaed..0795269540 100644 --- a/snippets/kotlin/src/main/kotlin/com/algolia/snippets/Ingestion.kt +++ b/snippets/kotlin/src/main/kotlin/com/algolia/snippets/Ingestion.kt @@ -45,8 +45,8 @@ class SnippetIngestionClient { destinationCreate = DestinationCreate( type = DestinationType.entries.first { it.value == "search" }, name = "destinationName", - input = DestinationIndexPrefix( - indexPrefix = "prefix_", + input = DestinationIndexName( + indexName = "full_name______", ), authenticationID = "6c02aeb1-775e-418e-870b-1faccd4b2c0f", ), diff --git a/snippets/php/src/Ingestion.php b/snippets/php/src/Ingestion.php index d7bea21167..3aa59d820d 100644 --- a/snippets/php/src/Ingestion.php +++ b/snippets/php/src/Ingestion.php @@ -53,7 +53,7 @@ public function snippetForCreateDestination() $response = $client->createDestination( ['type' => 'search', 'name' => 'destinationName', - 'input' => ['indexPrefix' => 'prefix_', + 'input' => ['indexName' => 'full_name______', ], 'authenticationID' => '6c02aeb1-775e-418e-870b-1faccd4b2c0f', ], diff --git a/snippets/python/ingestion.py b/snippets/python/ingestion.py index 13f7fdb775..ee540485b1 100644 --- a/snippets/python/ingestion.py +++ b/snippets/python/ingestion.py @@ -51,7 +51,7 @@ async def snippet_for_create_destination(): "type": "search", "name": "destinationName", "input": { - "indexPrefix": "prefix_", + "indexName": "full_name______", }, "authenticationID": "6c02aeb1-775e-418e-870b-1faccd4b2c0f", }, diff --git a/snippets/ruby/ingestion.rb b/snippets/ruby/ingestion.rb index 24854e8fba..e5d60d0bd8 100644 --- a/snippets/ruby/ingestion.rb +++ b/snippets/ruby/ingestion.rb @@ -42,7 +42,7 @@ def snippet_for_create_destination DestinationCreate.new( type: "search", name: "destinationName", - input: DestinationIndexPrefix.new(index_prefix: "prefix_"), + input: DestinationIndexName.new(index_name: "full_name______"), authentication_id: "6c02aeb1-775e-418e-870b-1faccd4b2c0f" ) ) diff --git a/snippets/scala/src/main/scala/Ingestion.scala b/snippets/scala/src/main/scala/Ingestion.scala index dcc81e7e24..366bf05058 100644 --- a/snippets/scala/src/main/scala/Ingestion.scala +++ b/snippets/scala/src/main/scala/Ingestion.scala @@ -57,8 +57,8 @@ class SnippetIngestionClient { destinationCreate = DestinationCreate( `type` = DestinationType.withName("search"), name = "destinationName", - input = DestinationIndexPrefix( - indexPrefix = "prefix_" + input = DestinationIndexName( + indexName = "full_name______" ), authenticationID = Some("6c02aeb1-775e-418e-870b-1faccd4b2c0f") ) diff --git a/snippets/swift/Sources/Ingestion.swift b/snippets/swift/Sources/Ingestion.swift index 5e19f2bf29..9bf557b7c1 100644 --- a/snippets/swift/Sources/Ingestion.swift +++ b/snippets/swift/Sources/Ingestion.swift @@ -36,7 +36,7 @@ final class IngestionClientSnippet { let response = try await client.createDestination(destinationCreate: DestinationCreate( type: DestinationType.search, name: "destinationName", - input: DestinationInput.destinationIndexPrefix(DestinationIndexPrefix(indexPrefix: "prefix_")), + input: DestinationInput.destinationIndexName(DestinationIndexName(indexName: "full_name______")), authenticationID: "6c02aeb1-775e-418e-870b-1faccd4b2c0f" )) // SEPARATOR< diff --git a/specs/bundled/ingestion.doc.yml b/specs/bundled/ingestion.doc.yml index 2ce80cd90d..ab2e87ebbe 100644 --- a/specs/bundled/ingestion.doc.yml +++ b/specs/bundled/ingestion.doc.yml @@ -2647,7 +2647,7 @@ paths: { Type = Enum.Parse("Search"), Name = "destinationName", - Input = new DestinationInput(new DestinationIndexPrefix { IndexPrefix = "prefix_", }), + Input = new DestinationInput(new DestinationIndexName { IndexName = "full_name______", }), AuthenticationID = "6c02aeb1-775e-418e-870b-1faccd4b2c0f", } ); @@ -2671,8 +2671,8 @@ paths: response, err := client.CreateDestination(client.NewApiCreateDestinationRequest( - ingestion.NewEmptyDestinationCreate().SetType(ingestion.DestinationType("search")).SetName("destinationName").SetInput(ingestion.DestinationIndexPrefixAsDestinationInput( - ingestion.NewEmptyDestinationIndexPrefix().SetIndexPrefix("prefix_"))).SetAuthenticationID("6c02aeb1-775e-418e-870b-1faccd4b2c0f"), + ingestion.NewEmptyDestinationCreate().SetType(ingestion.DestinationType("search")).SetName("destinationName").SetInput(ingestion.DestinationIndexNameAsDestinationInput( + ingestion.NewEmptyDestinationIndexName().SetIndexName("full_name______"))).SetAuthenticationID("6c02aeb1-775e-418e-870b-1faccd4b2c0f"), )) if err != nil { @@ -2699,7 +2699,7 @@ paths: new DestinationCreate() .setType(DestinationType.SEARCH) .setName("destinationName") - .setInput(new DestinationIndexPrefix().setIndexPrefix("prefix_")) + .setInput(new DestinationIndexName().setIndexName("full_name______")) .setAuthenticationID("6c02aeb1-775e-418e-870b-1faccd4b2c0f") ); - lang: javascript @@ -2716,7 +2716,7 @@ paths: const response = await client.createDestination({ type: 'search', name: 'destinationName', - input: { indexPrefix: 'prefix_' }, + input: { indexName: 'full_name______' }, authenticationID: '6c02aeb1-775e-418e-870b-1faccd4b2c0f', }); @@ -2737,8 +2737,8 @@ paths: destinationCreate = DestinationCreate( type = DestinationType.entries.first { it.value == "search" }, name = "destinationName", - input = DestinationIndexPrefix( - indexPrefix = "prefix_", + input = DestinationIndexName( + indexName = "full_name______", ), authenticationID = "6c02aeb1-775e-418e-870b-1faccd4b2c0f", ), @@ -2762,7 +2762,7 @@ paths: $response = $client->createDestination( ['type' => 'search', 'name' => 'destinationName', - 'input' => ['indexPrefix' => 'prefix_', + 'input' => ['indexName' => 'full_name______', ], 'authenticationID' => '6c02aeb1-775e-418e-870b-1faccd4b2c0f', ], @@ -2788,7 +2788,7 @@ paths: "type": "search", "name": "destinationName", "input": { - "indexPrefix": "prefix_", + "indexName": "full_name______", }, "authenticationID": "6c02aeb1-775e-418e-870b-1faccd4b2c0f", }, @@ -2818,7 +2818,7 @@ paths: DestinationCreate.new( type: "search", name: "destinationName", - input: DestinationIndexPrefix.new(index_prefix: "prefix_"), + input: DestinationIndexName.new(index_name: "full_name______"), authentication_id: "6c02aeb1-775e-418e-870b-1faccd4b2c0f" ) ) @@ -2847,8 +2847,8 @@ paths: destinationCreate = DestinationCreate( `type` = DestinationType.withName("search"), name = "destinationName", - input = DestinationIndexPrefix( - indexPrefix = "prefix_" + input = DestinationIndexName( + indexName = "full_name______" ), authenticationID = Some("6c02aeb1-775e-418e-870b-1faccd4b2c0f") ) @@ -2873,7 +2873,7 @@ paths: DestinationCreate( type: DestinationType.search, name: "destinationName", - input: DestinationInput.destinationIndexPrefix(DestinationIndexPrefix(indexPrefix: "prefix_")), + input: DestinationInput.destinationIndexName(DestinationIndexName(indexName: "full_name______")), authenticationID: "6c02aeb1-775e-418e-870b-1faccd4b2c0f" )) /1/destinations/search: @@ -14038,17 +14038,6 @@ components: type: string description: Universally unique identifier (UUID) of a destination resource. example: 6c02aeb1-775e-418e-870b-1faccd4b2c0f - DestinationIndexPrefix: - type: object - additionalProperties: false - properties: - indexPrefix: - type: string - description: >- - String added to the beginning of all indices created by this - destination. - required: - - indexPrefix RecordType: type: string description: Record type for ecommerce sources. @@ -14092,7 +14081,6 @@ components: - indexName DestinationInput: oneOf: - - $ref: '#/components/schemas/DestinationIndexPrefix' - $ref: '#/components/schemas/DestinationIndexName' transformationID: type: string diff --git a/specs/bundled/ingestion.yml b/specs/bundled/ingestion.yml index 3713ecdd32..264a79670a 100644 --- a/specs/bundled/ingestion.yml +++ b/specs/bundled/ingestion.yml @@ -2434,17 +2434,6 @@ components: type: string description: Universally unique identifier (UUID) of a destination resource. example: 6c02aeb1-775e-418e-870b-1faccd4b2c0f - DestinationIndexPrefix: - type: object - additionalProperties: false - properties: - indexPrefix: - type: string - description: >- - String added to the beginning of all indices created by this - destination. - required: - - indexPrefix RecordType: type: string description: Record type for ecommerce sources. @@ -2488,7 +2477,6 @@ components: - indexName DestinationInput: oneOf: - - $ref: '#/components/schemas/DestinationIndexPrefix' - $ref: '#/components/schemas/DestinationIndexName' transformationID: type: string diff --git a/tests/output/csharp/src/generated/requests/Ingestion.test.cs b/tests/output/csharp/src/generated/requests/Ingestion.test.cs index 2a541b0d87..323d95fbb3 100644 --- a/tests/output/csharp/src/generated/requests/Ingestion.test.cs +++ b/tests/output/csharp/src/generated/requests/Ingestion.test.cs @@ -85,7 +85,7 @@ await client.CreateDestinationAsync( { Type = Enum.Parse("Search"), Name = "destinationName", - Input = new DestinationInput(new DestinationIndexPrefix { IndexPrefix = "prefix_", }), + Input = new DestinationInput(new DestinationIndexName { IndexName = "full_name______", }), AuthenticationID = "6c02aeb1-775e-418e-870b-1faccd4b2c0f", } ); @@ -94,7 +94,7 @@ await client.CreateDestinationAsync( Assert.Equal("/1/destinations", req.Path); Assert.Equal("POST", req.Method.ToString()); JsonAssert.EqualOverrideDefault( - "{\"type\":\"search\",\"name\":\"destinationName\",\"input\":{\"indexPrefix\":\"prefix_\"},\"authenticationID\":\"6c02aeb1-775e-418e-870b-1faccd4b2c0f\"}", + "{\"type\":\"search\",\"name\":\"destinationName\",\"input\":{\"indexName\":\"full_name______\"},\"authenticationID\":\"6c02aeb1-775e-418e-870b-1faccd4b2c0f\"}", req.Body, new JsonDiffConfig(false) ); @@ -108,7 +108,7 @@ await client.CreateDestinationAsync( { Type = Enum.Parse("Search"), Name = "destinationName", - Input = new DestinationInput(new DestinationIndexPrefix { IndexPrefix = "prefix_", }), + Input = new DestinationInput(new DestinationIndexName { IndexName = "full_name______", }), TransformationIDs = new List { "6c02aeb1-775e-418e-870b-1faccd4b2c0f" }, } ); @@ -117,7 +117,7 @@ await client.CreateDestinationAsync( Assert.Equal("/1/destinations", req.Path); Assert.Equal("POST", req.Method.ToString()); JsonAssert.EqualOverrideDefault( - "{\"type\":\"search\",\"name\":\"destinationName\",\"input\":{\"indexPrefix\":\"prefix_\"},\"transformationIDs\":[\"6c02aeb1-775e-418e-870b-1faccd4b2c0f\"]}", + "{\"type\":\"search\",\"name\":\"destinationName\",\"input\":{\"indexName\":\"full_name______\"},\"transformationIDs\":[\"6c02aeb1-775e-418e-870b-1faccd4b2c0f\"]}", req.Body, new JsonDiffConfig(false) ); diff --git a/tests/output/go/tests/requests/ingestion_test.go b/tests/output/go/tests/requests/ingestion_test.go index 5076de7e35..ba56c14f84 100644 --- a/tests/output/go/tests/requests/ingestion_test.go +++ b/tests/output/go/tests/requests/ingestion_test.go @@ -73,8 +73,8 @@ func TestIngestion_CreateDestination(t *testing.T) { t.Run("createDestination", func(t *testing.T) { _, err := client.CreateDestination(client.NewApiCreateDestinationRequest( - ingestion.NewEmptyDestinationCreate().SetType(ingestion.DestinationType("search")).SetName("destinationName").SetInput(ingestion.DestinationIndexPrefixAsDestinationInput( - ingestion.NewEmptyDestinationIndexPrefix().SetIndexPrefix("prefix_"))).SetAuthenticationID("6c02aeb1-775e-418e-870b-1faccd4b2c0f"), + ingestion.NewEmptyDestinationCreate().SetType(ingestion.DestinationType("search")).SetName("destinationName").SetInput(ingestion.DestinationIndexNameAsDestinationInput( + ingestion.NewEmptyDestinationIndexName().SetIndexName("full_name______"))).SetAuthenticationID("6c02aeb1-775e-418e-870b-1faccd4b2c0f"), )) require.NoError(t, err) @@ -82,13 +82,13 @@ func TestIngestion_CreateDestination(t *testing.T) { require.Equal(t, "POST", echo.Method) ja := jsonassert.New(t) - ja.Assertf(*echo.Body, `{"type":"search","name":"destinationName","input":{"indexPrefix":"prefix_"},"authenticationID":"6c02aeb1-775e-418e-870b-1faccd4b2c0f"}`) + ja.Assertf(*echo.Body, `{"type":"search","name":"destinationName","input":{"indexName":"full_name______"},"authenticationID":"6c02aeb1-775e-418e-870b-1faccd4b2c0f"}`) }) t.Run("with transformationIDs", func(t *testing.T) { _, err := client.CreateDestination(client.NewApiCreateDestinationRequest( - ingestion.NewEmptyDestinationCreate().SetType(ingestion.DestinationType("search")).SetName("destinationName").SetInput(ingestion.DestinationIndexPrefixAsDestinationInput( - ingestion.NewEmptyDestinationIndexPrefix().SetIndexPrefix("prefix_"))).SetTransformationIDs( + ingestion.NewEmptyDestinationCreate().SetType(ingestion.DestinationType("search")).SetName("destinationName").SetInput(ingestion.DestinationIndexNameAsDestinationInput( + ingestion.NewEmptyDestinationIndexName().SetIndexName("full_name______"))).SetTransformationIDs( []string{"6c02aeb1-775e-418e-870b-1faccd4b2c0f"}), )) require.NoError(t, err) @@ -97,7 +97,7 @@ func TestIngestion_CreateDestination(t *testing.T) { require.Equal(t, "POST", echo.Method) ja := jsonassert.New(t) - ja.Assertf(*echo.Body, `{"type":"search","name":"destinationName","input":{"indexPrefix":"prefix_"},"transformationIDs":["6c02aeb1-775e-418e-870b-1faccd4b2c0f"]}`) + ja.Assertf(*echo.Body, `{"type":"search","name":"destinationName","input":{"indexName":"full_name______"},"transformationIDs":["6c02aeb1-775e-418e-870b-1faccd4b2c0f"]}`) }) } diff --git a/tests/output/java/src/test/java/com/algolia/requests/Ingestion.test.java b/tests/output/java/src/test/java/com/algolia/requests/Ingestion.test.java index d8b33005fe..688c2d4277 100644 --- a/tests/output/java/src/test/java/com/algolia/requests/Ingestion.test.java +++ b/tests/output/java/src/test/java/com/algolia/requests/Ingestion.test.java @@ -94,7 +94,7 @@ void createDestinationTest() { new DestinationCreate() .setType(DestinationType.SEARCH) .setName("destinationName") - .setInput(new DestinationIndexPrefix().setIndexPrefix("prefix_")) + .setInput(new DestinationIndexName().setIndexName("full_name______")) .setAuthenticationID("6c02aeb1-775e-418e-870b-1faccd4b2c0f") ); }); @@ -103,7 +103,7 @@ void createDestinationTest() { assertEquals("POST", req.method); assertDoesNotThrow(() -> JSONAssert.assertEquals( - "{\"type\":\"search\",\"name\":\"destinationName\",\"input\":{\"indexPrefix\":\"prefix_\"},\"authenticationID\":\"6c02aeb1-775e-418e-870b-1faccd4b2c0f\"}", + "{\"type\":\"search\",\"name\":\"destinationName\",\"input\":{\"indexName\":\"full_name______\"},\"authenticationID\":\"6c02aeb1-775e-418e-870b-1faccd4b2c0f\"}", req.body, JSONCompareMode.STRICT ) @@ -118,7 +118,7 @@ void createDestinationTest1() { new DestinationCreate() .setType(DestinationType.SEARCH) .setName("destinationName") - .setInput(new DestinationIndexPrefix().setIndexPrefix("prefix_")) + .setInput(new DestinationIndexName().setIndexName("full_name______")) .setTransformationIDs(List.of("6c02aeb1-775e-418e-870b-1faccd4b2c0f")) ); }); @@ -127,7 +127,7 @@ void createDestinationTest1() { assertEquals("POST", req.method); assertDoesNotThrow(() -> JSONAssert.assertEquals( - "{\"type\":\"search\",\"name\":\"destinationName\",\"input\":{\"indexPrefix\":\"prefix_\"},\"transformationIDs\":[\"6c02aeb1-775e-418e-870b-1faccd4b2c0f\"]}", + "{\"type\":\"search\",\"name\":\"destinationName\",\"input\":{\"indexName\":\"full_name______\"},\"transformationIDs\":[\"6c02aeb1-775e-418e-870b-1faccd4b2c0f\"]}", req.body, JSONCompareMode.STRICT ) diff --git a/tests/output/javascript/src/requests/ingestion.test.ts b/tests/output/javascript/src/requests/ingestion.test.ts index c72086c677..81c7524560 100644 --- a/tests/output/javascript/src/requests/ingestion.test.ts +++ b/tests/output/javascript/src/requests/ingestion.test.ts @@ -59,7 +59,7 @@ describe('createDestination', () => { const req = (await client.createDestination({ type: 'search', name: 'destinationName', - input: { indexPrefix: 'prefix_' }, + input: { indexName: 'full_name______' }, authenticationID: '6c02aeb1-775e-418e-870b-1faccd4b2c0f', })) as unknown as EchoResponse; @@ -68,7 +68,7 @@ describe('createDestination', () => { expect(req.data).toEqual({ type: 'search', name: 'destinationName', - input: { indexPrefix: 'prefix_' }, + input: { indexName: 'full_name______' }, authenticationID: '6c02aeb1-775e-418e-870b-1faccd4b2c0f', }); expect(req.searchParams).toStrictEqual(undefined); @@ -78,7 +78,7 @@ describe('createDestination', () => { const req = (await client.createDestination({ type: 'search', name: 'destinationName', - input: { indexPrefix: 'prefix_' }, + input: { indexName: 'full_name______' }, transformationIDs: ['6c02aeb1-775e-418e-870b-1faccd4b2c0f'], })) as unknown as EchoResponse; @@ -87,7 +87,7 @@ describe('createDestination', () => { expect(req.data).toEqual({ type: 'search', name: 'destinationName', - input: { indexPrefix: 'prefix_' }, + input: { indexName: 'full_name______' }, transformationIDs: ['6c02aeb1-775e-418e-870b-1faccd4b2c0f'], }); expect(req.searchParams).toStrictEqual(undefined); diff --git a/tests/output/kotlin/src/commonTest/kotlin/com/algolia/requests/IngestionTest.kt b/tests/output/kotlin/src/commonTest/kotlin/com/algolia/requests/IngestionTest.kt index 66cf6d902e..3b1d503ba2 100644 --- a/tests/output/kotlin/src/commonTest/kotlin/com/algolia/requests/IngestionTest.kt +++ b/tests/output/kotlin/src/commonTest/kotlin/com/algolia/requests/IngestionTest.kt @@ -78,8 +78,8 @@ class IngestionTest { destinationCreate = DestinationCreate( type = DestinationType.entries.first { it.value == "search" }, name = "destinationName", - input = DestinationIndexPrefix( - indexPrefix = "prefix_", + input = DestinationIndexName( + indexName = "full_name______", ), authenticationID = "6c02aeb1-775e-418e-870b-1faccd4b2c0f", ), @@ -88,7 +88,7 @@ class IngestionTest { intercept = { assertEquals("/1/destinations".toPathSegments(), it.url.pathSegments) assertEquals(HttpMethod.parse("POST"), it.method) - assertJsonBody("""{"type":"search","name":"destinationName","input":{"indexPrefix":"prefix_"},"authenticationID":"6c02aeb1-775e-418e-870b-1faccd4b2c0f"}""", it.body) + assertJsonBody("""{"type":"search","name":"destinationName","input":{"indexName":"full_name______"},"authenticationID":"6c02aeb1-775e-418e-870b-1faccd4b2c0f"}""", it.body) }, ) } @@ -101,8 +101,8 @@ class IngestionTest { destinationCreate = DestinationCreate( type = DestinationType.entries.first { it.value == "search" }, name = "destinationName", - input = DestinationIndexPrefix( - indexPrefix = "prefix_", + input = DestinationIndexName( + indexName = "full_name______", ), transformationIDs = listOf("6c02aeb1-775e-418e-870b-1faccd4b2c0f"), ), @@ -111,7 +111,7 @@ class IngestionTest { intercept = { assertEquals("/1/destinations".toPathSegments(), it.url.pathSegments) assertEquals(HttpMethod.parse("POST"), it.method) - assertJsonBody("""{"type":"search","name":"destinationName","input":{"indexPrefix":"prefix_"},"transformationIDs":["6c02aeb1-775e-418e-870b-1faccd4b2c0f"]}""", it.body) + assertJsonBody("""{"type":"search","name":"destinationName","input":{"indexName":"full_name______"},"transformationIDs":["6c02aeb1-775e-418e-870b-1faccd4b2c0f"]}""", it.body) }, ) } diff --git a/tests/output/php/src/requests/IngestionTest.php b/tests/output/php/src/requests/IngestionTest.php index 1fdd7b624f..597c26704e 100644 --- a/tests/output/php/src/requests/IngestionTest.php +++ b/tests/output/php/src/requests/IngestionTest.php @@ -83,7 +83,7 @@ public function testCreateDestination() $client->createDestination( ['type' => 'search', 'name' => 'destinationName', - 'input' => ['indexPrefix' => 'prefix_', + 'input' => ['indexName' => 'full_name______', ], 'authenticationID' => '6c02aeb1-775e-418e-870b-1faccd4b2c0f', ], @@ -93,7 +93,7 @@ public function testCreateDestination() [ 'path' => '/1/destinations', 'method' => 'POST', - 'body' => json_decode('{"type":"search","name":"destinationName","input":{"indexPrefix":"prefix_"},"authenticationID":"6c02aeb1-775e-418e-870b-1faccd4b2c0f"}'), + 'body' => json_decode('{"type":"search","name":"destinationName","input":{"indexName":"full_name______"},"authenticationID":"6c02aeb1-775e-418e-870b-1faccd4b2c0f"}'), ], ]); } @@ -105,7 +105,7 @@ public function testCreateDestination1() $client->createDestination( ['type' => 'search', 'name' => 'destinationName', - 'input' => ['indexPrefix' => 'prefix_', + 'input' => ['indexName' => 'full_name______', ], 'transformationIDs' => [ '6c02aeb1-775e-418e-870b-1faccd4b2c0f', @@ -117,7 +117,7 @@ public function testCreateDestination1() [ 'path' => '/1/destinations', 'method' => 'POST', - 'body' => json_decode('{"type":"search","name":"destinationName","input":{"indexPrefix":"prefix_"},"transformationIDs":["6c02aeb1-775e-418e-870b-1faccd4b2c0f"]}'), + 'body' => json_decode('{"type":"search","name":"destinationName","input":{"indexName":"full_name______"},"transformationIDs":["6c02aeb1-775e-418e-870b-1faccd4b2c0f"]}'), ], ]); } diff --git a/tests/output/python/tests/requests/ingestion_test.py b/tests/output/python/tests/requests/ingestion_test.py index 94915d1f7e..b05360e348 100644 --- a/tests/output/python/tests/requests/ingestion_test.py +++ b/tests/output/python/tests/requests/ingestion_test.py @@ -67,7 +67,7 @@ async def test_create_destination_(self): "type": "search", "name": "destinationName", "input": { - "indexPrefix": "prefix_", + "indexName": "full_name______", }, "authenticationID": "6c02aeb1-775e-418e-870b-1faccd4b2c0f", }, @@ -78,7 +78,7 @@ async def test_create_destination_(self): assert _req.query_parameters.items() == {}.items() assert _req.headers.items() >= {}.items() assert loads(_req.data) == loads( - """{"type":"search","name":"destinationName","input":{"indexPrefix":"prefix_"},"authenticationID":"6c02aeb1-775e-418e-870b-1faccd4b2c0f"}""" + """{"type":"search","name":"destinationName","input":{"indexName":"full_name______"},"authenticationID":"6c02aeb1-775e-418e-870b-1faccd4b2c0f"}""" ) async def test_create_destination_1(self): @@ -90,7 +90,7 @@ async def test_create_destination_1(self): "type": "search", "name": "destinationName", "input": { - "indexPrefix": "prefix_", + "indexName": "full_name______", }, "transformationIDs": [ "6c02aeb1-775e-418e-870b-1faccd4b2c0f", @@ -103,7 +103,7 @@ async def test_create_destination_1(self): assert _req.query_parameters.items() == {}.items() assert _req.headers.items() >= {}.items() assert loads(_req.data) == loads( - """{"type":"search","name":"destinationName","input":{"indexPrefix":"prefix_"},"transformationIDs":["6c02aeb1-775e-418e-870b-1faccd4b2c0f"]}""" + """{"type":"search","name":"destinationName","input":{"indexName":"full_name______"},"transformationIDs":["6c02aeb1-775e-418e-870b-1faccd4b2c0f"]}""" ) async def test_create_source_(self): diff --git a/tests/output/ruby/test/requests/ingestion_test.rb b/tests/output/ruby/test/requests/ingestion_test.rb index 51518b5d0e..184cfa12ee 100644 --- a/tests/output/ruby/test/requests/ingestion_test.rb +++ b/tests/output/ruby/test/requests/ingestion_test.rb @@ -63,7 +63,7 @@ def test_create_destination DestinationCreate.new( type: "search", name: "destinationName", - input: DestinationIndexPrefix.new(index_prefix: "prefix_"), + input: DestinationIndexName.new(index_name: "full_name______"), authentication_id: "6c02aeb1-775e-418e-870b-1faccd4b2c0f" ) ) @@ -74,7 +74,7 @@ def test_create_destination assert(({}.to_a - req.headers.to_a).empty?, req.headers.to_s) assert_equal( JSON.parse( - "{\"type\":\"search\",\"name\":\"destinationName\",\"input\":{\"indexPrefix\":\"prefix_\"},\"authenticationID\":\"6c02aeb1-775e-418e-870b-1faccd4b2c0f\"}" + "{\"type\":\"search\",\"name\":\"destinationName\",\"input\":{\"indexName\":\"full_name______\"},\"authenticationID\":\"6c02aeb1-775e-418e-870b-1faccd4b2c0f\"}" ), JSON.parse(req.body) ) @@ -86,7 +86,7 @@ def test_create_destination1 DestinationCreate.new( type: "search", name: "destinationName", - input: DestinationIndexPrefix.new(index_prefix: "prefix_"), + input: DestinationIndexName.new(index_name: "full_name______"), transformation_ids: ["6c02aeb1-775e-418e-870b-1faccd4b2c0f"] ) ) @@ -97,7 +97,7 @@ def test_create_destination1 assert(({}.to_a - req.headers.to_a).empty?, req.headers.to_s) assert_equal( JSON.parse( - "{\"type\":\"search\",\"name\":\"destinationName\",\"input\":{\"indexPrefix\":\"prefix_\"},\"transformationIDs\":[\"6c02aeb1-775e-418e-870b-1faccd4b2c0f\"]}" + "{\"type\":\"search\",\"name\":\"destinationName\",\"input\":{\"indexName\":\"full_name______\"},\"transformationIDs\":[\"6c02aeb1-775e-418e-870b-1faccd4b2c0f\"]}" ), JSON.parse(req.body) ) diff --git a/tests/output/scala/src/test/scala/algoliasearch/requests/IngestionTest.scala b/tests/output/scala/src/test/scala/algoliasearch/requests/IngestionTest.scala index c2bca1e87a..726df88b84 100644 --- a/tests/output/scala/src/test/scala/algoliasearch/requests/IngestionTest.scala +++ b/tests/output/scala/src/test/scala/algoliasearch/requests/IngestionTest.scala @@ -88,8 +88,8 @@ class IngestionTest extends AnyFunSuite { destinationCreate = DestinationCreate( `type` = DestinationType.withName("search"), name = "destinationName", - input = DestinationIndexPrefix( - indexPrefix = "prefix_" + input = DestinationIndexName( + indexName = "full_name______" ), authenticationID = Some("6c02aeb1-775e-418e-870b-1faccd4b2c0f") ) @@ -101,7 +101,7 @@ class IngestionTest extends AnyFunSuite { assert(res.path == "/1/destinations") assert(res.method == "POST") val expectedBody = parse( - """{"type":"search","name":"destinationName","input":{"indexPrefix":"prefix_"},"authenticationID":"6c02aeb1-775e-418e-870b-1faccd4b2c0f"}""" + """{"type":"search","name":"destinationName","input":{"indexName":"full_name______"},"authenticationID":"6c02aeb1-775e-418e-870b-1faccd4b2c0f"}""" ) val actualBody = parse(res.body.get) assert(actualBody == expectedBody) @@ -113,8 +113,8 @@ class IngestionTest extends AnyFunSuite { destinationCreate = DestinationCreate( `type` = DestinationType.withName("search"), name = "destinationName", - input = DestinationIndexPrefix( - indexPrefix = "prefix_" + input = DestinationIndexName( + indexName = "full_name______" ), transformationIDs = Some(Seq("6c02aeb1-775e-418e-870b-1faccd4b2c0f")) ) @@ -126,7 +126,7 @@ class IngestionTest extends AnyFunSuite { assert(res.path == "/1/destinations") assert(res.method == "POST") val expectedBody = parse( - """{"type":"search","name":"destinationName","input":{"indexPrefix":"prefix_"},"transformationIDs":["6c02aeb1-775e-418e-870b-1faccd4b2c0f"]}""" + """{"type":"search","name":"destinationName","input":{"indexName":"full_name______"},"transformationIDs":["6c02aeb1-775e-418e-870b-1faccd4b2c0f"]}""" ) val actualBody = parse(res.body.get) assert(actualBody == expectedBody) diff --git a/tests/output/swift/Tests/requests/IngestionTests.swift b/tests/output/swift/Tests/requests/IngestionTests.swift index 38aa3a6142..051a2707c8 100644 --- a/tests/output/swift/Tests/requests/IngestionTests.swift +++ b/tests/output/swift/Tests/requests/IngestionTests.swift @@ -92,7 +92,7 @@ final class IngestionClientRequestsTests: XCTestCase { let response = try await client.createDestinationWithHTTPInfo(destinationCreate: DestinationCreate( type: DestinationType.search, name: "destinationName", - input: DestinationInput.destinationIndexPrefix(DestinationIndexPrefix(indexPrefix: "prefix_")), + input: DestinationInput.destinationIndexName(DestinationIndexName(indexName: "full_name______")), authenticationID: "6c02aeb1-775e-418e-870b-1faccd4b2c0f" )) let responseBodyData = try XCTUnwrap(response.bodyData) @@ -102,7 +102,7 @@ final class IngestionClientRequestsTests: XCTestCase { let echoResponseBodyJSON = try XCTUnwrap(echoResponseBodyData.jsonString) let expectedBodyData = - "{\"type\":\"search\",\"name\":\"destinationName\",\"input\":{\"indexPrefix\":\"prefix_\"},\"authenticationID\":\"6c02aeb1-775e-418e-870b-1faccd4b2c0f\"}" + "{\"type\":\"search\",\"name\":\"destinationName\",\"input\":{\"indexName\":\"full_name______\"},\"authenticationID\":\"6c02aeb1-775e-418e-870b-1faccd4b2c0f\"}" .data(using: .utf8) let expectedBodyJSON = try XCTUnwrap(expectedBodyData?.jsonString) @@ -127,7 +127,7 @@ final class IngestionClientRequestsTests: XCTestCase { let response = try await client.createDestinationWithHTTPInfo(destinationCreate: DestinationCreate( type: DestinationType.search, name: "destinationName", - input: DestinationInput.destinationIndexPrefix(DestinationIndexPrefix(indexPrefix: "prefix_")), + input: DestinationInput.destinationIndexName(DestinationIndexName(indexName: "full_name______")), transformationIDs: ["6c02aeb1-775e-418e-870b-1faccd4b2c0f"] )) let responseBodyData = try XCTUnwrap(response.bodyData) @@ -137,7 +137,7 @@ final class IngestionClientRequestsTests: XCTestCase { let echoResponseBodyJSON = try XCTUnwrap(echoResponseBodyData.jsonString) let expectedBodyData = - "{\"type\":\"search\",\"name\":\"destinationName\",\"input\":{\"indexPrefix\":\"prefix_\"},\"transformationIDs\":[\"6c02aeb1-775e-418e-870b-1faccd4b2c0f\"]}" + "{\"type\":\"search\",\"name\":\"destinationName\",\"input\":{\"indexName\":\"full_name______\"},\"transformationIDs\":[\"6c02aeb1-775e-418e-870b-1faccd4b2c0f\"]}" .data(using: .utf8) let expectedBodyJSON = try XCTUnwrap(expectedBodyData?.jsonString)