@@ -70,16 +70,6 @@ public RecommendationsRequest(LookingSimilarQuery actualInstance)
70
70
ActualInstance = actualInstance ?? throw new ArgumentException ( "Invalid instance found. Must not be null." ) ;
71
71
}
72
72
73
- /// <summary>
74
- /// Initializes a new instance of the RecommendationsRequest class
75
- /// with a RecommendedForYouQuery
76
- /// </summary>
77
- /// <param name="actualInstance">An instance of RecommendedForYouQuery.</param>
78
- public RecommendationsRequest ( RecommendedForYouQuery actualInstance )
79
- {
80
- ActualInstance = actualInstance ?? throw new ArgumentException ( "Invalid instance found. Must not be null." ) ;
81
- }
82
-
83
73
84
74
/// <summary>
85
75
/// Gets or Sets ActualInstance
@@ -136,16 +126,6 @@ public LookingSimilarQuery AsLookingSimilarQuery()
136
126
return ( LookingSimilarQuery ) ActualInstance ;
137
127
}
138
128
139
- /// <summary>
140
- /// Get the actual instance of `RecommendedForYouQuery`. If the actual instance is not `RecommendedForYouQuery`,
141
- /// the InvalidClassException will be thrown
142
- /// </summary>
143
- /// <returns>An instance of RecommendedForYouQuery</returns>
144
- public RecommendedForYouQuery AsRecommendedForYouQuery ( )
145
- {
146
- return ( RecommendedForYouQuery ) ActualInstance ;
147
- }
148
-
149
129
150
130
/// <summary>
151
131
/// Check if the actual instance is of `BoughtTogetherQuery` type.
@@ -192,15 +172,6 @@ public bool IsLookingSimilarQuery()
192
172
return ActualInstance . GetType ( ) == typeof ( LookingSimilarQuery ) ;
193
173
}
194
174
195
- /// <summary>
196
- /// Check if the actual instance is of `RecommendedForYouQuery` type.
197
- /// </summary>
198
- /// <returns>Whether or not the instance is the type</returns>
199
- public bool IsRecommendedForYouQuery ( )
200
- {
201
- return ActualInstance . GetType ( ) == typeof ( RecommendedForYouQuery ) ;
202
- }
203
-
204
175
/// <summary>
205
176
/// Returns the string presentation of the object
206
177
/// </summary>
@@ -345,18 +316,6 @@ public override RecommendationsRequest Read(ref Utf8JsonReader reader, Type type
345
316
System . Diagnostics . Debug . WriteLine ( $ "Failed to deserialize into LookingSimilarQuery: { exception } ") ;
346
317
}
347
318
}
348
- if ( root . ValueKind == JsonValueKind . Object )
349
- {
350
- try
351
- {
352
- return new RecommendationsRequest ( jsonDocument . Deserialize < RecommendedForYouQuery > ( JsonConfig . Options ) ) ;
353
- }
354
- catch ( Exception exception )
355
- {
356
- // deserialization failed, try the next one
357
- System . Diagnostics . Debug . WriteLine ( $ "Failed to deserialize into RecommendedForYouQuery: { exception } ") ;
358
- }
359
- }
360
319
throw new InvalidDataException ( $ "The JSON string cannot be deserialized into any schema defined.") ;
361
320
}
362
321
0 commit comments