Skip to content

Commit 412b1b3

Browse files
fix(specs): ingestion destination reject indexPrefix (generated)
algolia/api-clients-automation#3478 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Clément Vannicatte <[email protected]>
1 parent 259d2f9 commit 412b1b3

File tree

2 files changed

+0
-137
lines changed

2 files changed

+0
-137
lines changed

algoliasearch/Models/Ingestion/DestinationIndexPrefix.cs

Lines changed: 0 additions & 96 deletions
This file was deleted.

algoliasearch/Models/Ingestion/DestinationInput.cs

Lines changed: 0 additions & 41 deletions
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
{

0 commit comments

Comments
 (0)