@@ -20,16 +20,6 @@ namespace Algolia.Search.Models.Ingestion;
20
20
[ JsonConverter ( typeof ( DestinationInputJsonConverter ) ) ]
21
21
public partial class DestinationInput : AbstractSchema
22
22
{
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
-
33
23
/// <summary>
34
24
/// Initializes a new instance of the DestinationInput class
35
25
/// with a DestinationIndexName
@@ -46,16 +36,6 @@ public DestinationInput(DestinationIndexName actualInstance)
46
36
/// </summary>
47
37
public sealed override object ActualInstance { get ; set ; }
48
38
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
-
59
39
/// <summary>
60
40
/// Get the actual instance of `DestinationIndexName`. If the actual instance is not `DestinationIndexName`,
61
41
/// the InvalidClassException will be thrown
@@ -67,15 +47,6 @@ public DestinationIndexName AsDestinationIndexName()
67
47
}
68
48
69
49
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
-
79
50
/// <summary>
80
51
/// Check if the actual instance is of `DestinationIndexName` type.
81
52
/// </summary>
@@ -170,18 +141,6 @@ public override DestinationInput Read(ref Utf8JsonReader reader, Type typeToConv
170
141
var jsonDocument = JsonDocument . ParseValue ( ref reader ) ;
171
142
var root = jsonDocument . RootElement ;
172
143
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 )
185
144
{
186
145
try
187
146
{
0 commit comments