Skip to content

Commit 1034d8e

Browse files
fix(specs): ingestion destination reject indexPrefix (#3478) (generated) [skip ci]
Co-authored-by: Clément Vannicatte <vannicattec@gmail.com>
1 parent 08a04de commit 1034d8e

File tree

44 files changed

+91
-1101
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+91
-1101
lines changed

Diff for: clients/algoliasearch-client-csharp/algoliasearch/Models/Ingestion/DestinationIndexPrefix.cs

-96
This file was deleted.

Diff for: clients/algoliasearch-client-csharp/algoliasearch/Models/Ingestion/DestinationInput.cs

-41
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,6 @@ namespace Algolia.Search.Models.Ingestion;
2020
[JsonConverter(typeof(DestinationInputJsonConverter))]
2121
public partial class DestinationInput : AbstractSchema
2222
{
23-
/// <summary>
24-
/// Initializes a new instance of the DestinationInput class
25-
/// with a DestinationIndexPrefix
26-
/// </summary>
27-
/// <param name="actualInstance">An instance of DestinationIndexPrefix.</param>
28-
public DestinationInput(DestinationIndexPrefix actualInstance)
29-
{
30-
ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null.");
31-
}
32-
3323
/// <summary>
3424
/// Initializes a new instance of the DestinationInput class
3525
/// with a DestinationIndexName
@@ -46,16 +36,6 @@ public DestinationInput(DestinationIndexName actualInstance)
4636
/// </summary>
4737
public sealed override object ActualInstance { get; set; }
4838

49-
/// <summary>
50-
/// Get the actual instance of `DestinationIndexPrefix`. If the actual instance is not `DestinationIndexPrefix`,
51-
/// the InvalidClassException will be thrown
52-
/// </summary>
53-
/// <returns>An instance of DestinationIndexPrefix</returns>
54-
public DestinationIndexPrefix AsDestinationIndexPrefix()
55-
{
56-
return (DestinationIndexPrefix)ActualInstance;
57-
}
58-
5939
/// <summary>
6040
/// Get the actual instance of `DestinationIndexName`. If the actual instance is not `DestinationIndexName`,
6141
/// the InvalidClassException will be thrown
@@ -67,15 +47,6 @@ public DestinationIndexName AsDestinationIndexName()
6747
}
6848

6949

70-
/// <summary>
71-
/// Check if the actual instance is of `DestinationIndexPrefix` type.
72-
/// </summary>
73-
/// <returns>Whether or not the instance is the type</returns>
74-
public bool IsDestinationIndexPrefix()
75-
{
76-
return ActualInstance.GetType() == typeof(DestinationIndexPrefix);
77-
}
78-
7950
/// <summary>
8051
/// Check if the actual instance is of `DestinationIndexName` type.
8152
/// </summary>
@@ -170,18 +141,6 @@ public override DestinationInput Read(ref Utf8JsonReader reader, Type typeToConv
170141
var jsonDocument = JsonDocument.ParseValue(ref reader);
171142
var root = jsonDocument.RootElement;
172143
if (root.ValueKind == JsonValueKind.Object)
173-
{
174-
try
175-
{
176-
return new DestinationInput(jsonDocument.Deserialize<DestinationIndexPrefix>(JsonConfig.Options));
177-
}
178-
catch (Exception exception)
179-
{
180-
// deserialization failed, try the next one
181-
System.Diagnostics.Debug.WriteLine($"Failed to deserialize into DestinationIndexPrefix: {exception}");
182-
}
183-
}
184-
if (root.ValueKind == JsonValueKind.Object)
185144
{
186145
try
187146
{

Diff for: clients/algoliasearch-client-go/algolia/ingestion/model_destination_index_prefix.go

-72
This file was deleted.

Diff for: clients/algoliasearch-client-go/algolia/ingestion/model_destination_input.go

+1-35
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/ingestion/DestinationIndexPrefix.java

-63
This file was deleted.

Diff for: clients/algoliasearch-client-java/algoliasearch/src/main/java/com/algolia/model/ingestion/DestinationInput.java

-11
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,6 @@ class Deserializer extends JsonDeserializer<DestinationInput> {
2121
@Override
2222
public DestinationInput deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException {
2323
JsonNode tree = jp.readValueAsTree();
24-
// deserialize DestinationIndexPrefix
25-
if (tree.isObject()) {
26-
try (JsonParser parser = tree.traverse(jp.getCodec())) {
27-
return parser.readValueAs(DestinationIndexPrefix.class);
28-
} catch (Exception e) {
29-
// deserialization failed, continue
30-
LOGGER.finest(
31-
"Failed to deserialize oneOf DestinationIndexPrefix (error: " + e.getMessage() + ") (type: DestinationIndexPrefix)"
32-
);
33-
}
34-
}
3524
// deserialize DestinationIndexName
3625
if (tree.isObject()) {
3726
try (JsonParser parser = tree.traverse(jp.getCodec())) {

Diff for: clients/algoliasearch-client-javascript/packages/ingestion/model/destinationIndexPrefix.ts

-8
This file was deleted.

0 commit comments

Comments
 (0)