-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
Copy pathDeleteAsyncSearchResponse.g.cs
89 lines (77 loc) · 3.76 KB
/
DeleteAsyncSearchResponse.g.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
//
// ███╗ ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗ ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║ ██║ ██║ ██║██║ █████╗
// ██║╚██╗██║██║ ██║ ██║ ██║██║ ██╔══╝
// ██║ ╚████║╚██████╔╝ ██║ ██║╚██████╗███████╗
// ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝
// ------------------------------------------------
//
// This file is automatically generated.
// Please do not edit these files manually.
//
// ------------------------------------------------
#nullable restore
using System;
using System.Linq;
using Elastic.Clients.Elasticsearch.Serialization;
namespace Elastic.Clients.Elasticsearch.AsyncSearch;
internal sealed partial class DeleteAsyncSearchResponseConverter : System.Text.Json.Serialization.JsonConverter<Elastic.Clients.Elasticsearch.AsyncSearch.DeleteAsyncSearchResponse>
{
private static readonly System.Text.Json.JsonEncodedText PropAcknowledged = System.Text.Json.JsonEncodedText.Encode("acknowledged");
public override Elastic.Clients.Elasticsearch.AsyncSearch.DeleteAsyncSearchResponse Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options)
{
reader.ValidateToken(System.Text.Json.JsonTokenType.StartObject);
LocalJsonValue<bool> propAcknowledged = default;
while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
{
if (propAcknowledged.TryReadProperty(ref reader, options, PropAcknowledged, null))
{
continue;
}
if (options.UnmappedMemberHandling is System.Text.Json.Serialization.JsonUnmappedMemberHandling.Skip)
{
reader.Skip();
continue;
}
throw new System.Text.Json.JsonException($"Unknown JSON property '{reader.GetString()}' for type '{typeToConvert.Name}'.");
}
reader.ValidateToken(System.Text.Json.JsonTokenType.EndObject);
return new Elastic.Clients.Elasticsearch.AsyncSearch.DeleteAsyncSearchResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel.Instance)
{
Acknowledged = propAcknowledged.Value
};
}
public override void Write(System.Text.Json.Utf8JsonWriter writer, Elastic.Clients.Elasticsearch.AsyncSearch.DeleteAsyncSearchResponse value, System.Text.Json.JsonSerializerOptions options)
{
writer.WriteStartObject();
writer.WriteProperty(options, PropAcknowledged, value.Acknowledged, null, null);
writer.WriteEndObject();
}
}
[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.AsyncSearch.DeleteAsyncSearchResponseConverter))]
public sealed partial class DeleteAsyncSearchResponse : Elastic.Transport.Products.Elasticsearch.ElasticsearchResponse
{
[System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
public DeleteAsyncSearchResponse()
{
}
[System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
internal DeleteAsyncSearchResponse(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel)
{
_ = sentinel;
}
/// <summary>
/// <para>
/// For a successful response, this value is always true. On failure, an exception is returned instead.
/// </para>
/// </summary>
public
#if NET7_0_OR_GREATER
required
#endif
bool Acknowledged { get; set; }
}