Skip to content

Commit d1c651e

Browse files
committed
Improve union (de-)serialization
1 parent 55b8b2e commit d1c651e

File tree

731 files changed

+9693
-9223
lines changed

Some content is hidden

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

731 files changed

+9693
-9223
lines changed

Diff for: src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchStatusResponse.g.cs

+24-24
Original file line numberDiff line numberDiff line change
@@ -60,62 +60,62 @@ public override AsyncSearchStatusResponse Read(ref System.Text.Json.Utf8JsonRead
6060
LocalJsonValue<long> propStartTimeInMillis = default;
6161
while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
6262
{
63-
if (propClusters.TryRead(ref reader, options, PropClusters))
63+
if (propClusters.TryReadProperty(ref reader, options, PropClusters, null))
6464
{
6565
continue;
6666
}
6767

68-
if (propCompletionStatus.TryRead(ref reader, options, PropCompletionStatus))
68+
if (propCompletionStatus.TryReadProperty(ref reader, options, PropCompletionStatus, null))
6969
{
7070
continue;
7171
}
7272

73-
if (propCompletionTime.TryRead(ref reader, options, PropCompletionTime))
73+
if (propCompletionTime.TryReadProperty(ref reader, options, PropCompletionTime, null))
7474
{
7575
continue;
7676
}
7777

78-
if (propCompletionTimeInMillis.TryRead(ref reader, options, PropCompletionTimeInMillis))
78+
if (propCompletionTimeInMillis.TryReadProperty(ref reader, options, PropCompletionTimeInMillis, null))
7979
{
8080
continue;
8181
}
8282

83-
if (propExpirationTime.TryRead(ref reader, options, PropExpirationTime))
83+
if (propExpirationTime.TryReadProperty(ref reader, options, PropExpirationTime, null))
8484
{
8585
continue;
8686
}
8787

88-
if (propExpirationTimeInMillis.TryRead(ref reader, options, PropExpirationTimeInMillis))
88+
if (propExpirationTimeInMillis.TryReadProperty(ref reader, options, PropExpirationTimeInMillis, null))
8989
{
9090
continue;
9191
}
9292

93-
if (propId.TryRead(ref reader, options, PropId))
93+
if (propId.TryReadProperty(ref reader, options, PropId, null))
9494
{
9595
continue;
9696
}
9797

98-
if (propIsPartial.TryRead(ref reader, options, PropIsPartial))
98+
if (propIsPartial.TryReadProperty(ref reader, options, PropIsPartial, null))
9999
{
100100
continue;
101101
}
102102

103-
if (propIsRunning.TryRead(ref reader, options, PropIsRunning))
103+
if (propIsRunning.TryReadProperty(ref reader, options, PropIsRunning, null))
104104
{
105105
continue;
106106
}
107107

108-
if (propShards.TryRead(ref reader, options, PropShards))
108+
if (propShards.TryReadProperty(ref reader, options, PropShards, null))
109109
{
110110
continue;
111111
}
112112

113-
if (propStartTime.TryRead(ref reader, options, PropStartTime))
113+
if (propStartTime.TryReadProperty(ref reader, options, PropStartTime, null))
114114
{
115115
continue;
116116
}
117117

118-
if (propStartTimeInMillis.TryRead(ref reader, options, PropStartTimeInMillis))
118+
if (propStartTimeInMillis.TryReadProperty(ref reader, options, PropStartTimeInMillis, null))
119119
{
120120
continue;
121121
}
@@ -155,18 +155,18 @@ public override AsyncSearchStatusResponse Read(ref System.Text.Json.Utf8JsonRead
155155
public override void Write(System.Text.Json.Utf8JsonWriter writer, AsyncSearchStatusResponse value, System.Text.Json.JsonSerializerOptions options)
156156
{
157157
writer.WriteStartObject();
158-
writer.WriteProperty(options, PropClusters, value.Clusters);
159-
writer.WriteProperty(options, PropCompletionStatus, value.CompletionStatus);
160-
writer.WriteProperty(options, PropCompletionTime, value.CompletionTime);
161-
writer.WriteProperty(options, PropCompletionTimeInMillis, value.CompletionTimeInMillis);
162-
writer.WriteProperty(options, PropExpirationTime, value.ExpirationTime);
163-
writer.WriteProperty(options, PropExpirationTimeInMillis, value.ExpirationTimeInMillis);
164-
writer.WriteProperty(options, PropId, value.Id);
165-
writer.WriteProperty(options, PropIsPartial, value.IsPartial);
166-
writer.WriteProperty(options, PropIsRunning, value.IsRunning);
167-
writer.WriteProperty(options, PropShards, value.Shards);
168-
writer.WriteProperty(options, PropStartTime, value.StartTime);
169-
writer.WriteProperty(options, PropStartTimeInMillis, value.StartTimeInMillis);
158+
writer.WriteProperty(options, PropClusters, value.Clusters, null, null);
159+
writer.WriteProperty(options, PropCompletionStatus, value.CompletionStatus, null, null);
160+
writer.WriteProperty(options, PropCompletionTime, value.CompletionTime, null, null);
161+
writer.WriteProperty(options, PropCompletionTimeInMillis, value.CompletionTimeInMillis, null, null);
162+
writer.WriteProperty(options, PropExpirationTime, value.ExpirationTime, null, null);
163+
writer.WriteProperty(options, PropExpirationTimeInMillis, value.ExpirationTimeInMillis, null, null);
164+
writer.WriteProperty(options, PropId, value.Id, null, null);
165+
writer.WriteProperty(options, PropIsPartial, value.IsPartial, null, null);
166+
writer.WriteProperty(options, PropIsRunning, value.IsRunning, null, null);
167+
writer.WriteProperty(options, PropShards, value.Shards, null, null);
168+
writer.WriteProperty(options, PropStartTime, value.StartTime, null, null);
169+
writer.WriteProperty(options, PropStartTimeInMillis, value.StartTimeInMillis, null, null);
170170
writer.WriteEndObject();
171171
}
172172
}

Diff for: src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/DeleteAsyncSearchResponse.g.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public override DeleteAsyncSearchResponse Read(ref System.Text.Json.Utf8JsonRead
3838
LocalJsonValue<bool> propAcknowledged = default;
3939
while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
4040
{
41-
if (propAcknowledged.TryRead(ref reader, options, PropAcknowledged))
41+
if (propAcknowledged.TryReadProperty(ref reader, options, PropAcknowledged, null))
4242
{
4343
continue;
4444
}
@@ -56,7 +56,7 @@ public override DeleteAsyncSearchResponse Read(ref System.Text.Json.Utf8JsonRead
5656
public override void Write(System.Text.Json.Utf8JsonWriter writer, DeleteAsyncSearchResponse value, System.Text.Json.JsonSerializerOptions options)
5757
{
5858
writer.WriteStartObject();
59-
writer.WriteProperty(options, PropAcknowledged, value.Acknowledged);
59+
writer.WriteProperty(options, PropAcknowledged, value.Acknowledged, null, null);
6060
writer.WriteEndObject();
6161
}
6262
}

Diff for: src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/GetAsyncSearchResponse.g.cs

+20-20
Original file line numberDiff line numberDiff line change
@@ -56,52 +56,52 @@ public override GetAsyncSearchResponse<TDocument> Read(ref System.Text.Json.Utf8
5656
LocalJsonValue<long> propStartTimeInMillis = default;
5757
while (reader.Read() && reader.TokenType is System.Text.Json.JsonTokenType.PropertyName)
5858
{
59-
if (propCompletionTime.TryRead(ref reader, options, PropCompletionTime))
59+
if (propCompletionTime.TryReadProperty(ref reader, options, PropCompletionTime, null))
6060
{
6161
continue;
6262
}
6363

64-
if (propCompletionTimeInMillis.TryRead(ref reader, options, PropCompletionTimeInMillis))
64+
if (propCompletionTimeInMillis.TryReadProperty(ref reader, options, PropCompletionTimeInMillis, null))
6565
{
6666
continue;
6767
}
6868

69-
if (propExpirationTime.TryRead(ref reader, options, PropExpirationTime))
69+
if (propExpirationTime.TryReadProperty(ref reader, options, PropExpirationTime, null))
7070
{
7171
continue;
7272
}
7373

74-
if (propExpirationTimeInMillis.TryRead(ref reader, options, PropExpirationTimeInMillis))
74+
if (propExpirationTimeInMillis.TryReadProperty(ref reader, options, PropExpirationTimeInMillis, null))
7575
{
7676
continue;
7777
}
7878

79-
if (propId.TryRead(ref reader, options, PropId))
79+
if (propId.TryReadProperty(ref reader, options, PropId, null))
8080
{
8181
continue;
8282
}
8383

84-
if (propIsPartial.TryRead(ref reader, options, PropIsPartial))
84+
if (propIsPartial.TryReadProperty(ref reader, options, PropIsPartial, null))
8585
{
8686
continue;
8787
}
8888

89-
if (propIsRunning.TryRead(ref reader, options, PropIsRunning))
89+
if (propIsRunning.TryReadProperty(ref reader, options, PropIsRunning, null))
9090
{
9191
continue;
9292
}
9393

94-
if (propResponse.TryRead(ref reader, options, PropResponse))
94+
if (propResponse.TryReadProperty(ref reader, options, PropResponse, null))
9595
{
9696
continue;
9797
}
9898

99-
if (propStartTime.TryRead(ref reader, options, PropStartTime))
99+
if (propStartTime.TryReadProperty(ref reader, options, PropStartTime, null))
100100
{
101101
continue;
102102
}
103103

104-
if (propStartTimeInMillis.TryRead(ref reader, options, PropStartTimeInMillis))
104+
if (propStartTimeInMillis.TryReadProperty(ref reader, options, PropStartTimeInMillis, null))
105105
{
106106
continue;
107107
}
@@ -137,16 +137,16 @@ public override GetAsyncSearchResponse<TDocument> Read(ref System.Text.Json.Utf8
137137
public override void Write(System.Text.Json.Utf8JsonWriter writer, GetAsyncSearchResponse<TDocument> value, System.Text.Json.JsonSerializerOptions options)
138138
{
139139
writer.WriteStartObject();
140-
writer.WriteProperty(options, PropCompletionTime, value.CompletionTime);
141-
writer.WriteProperty(options, PropCompletionTimeInMillis, value.CompletionTimeInMillis);
142-
writer.WriteProperty(options, PropExpirationTime, value.ExpirationTime);
143-
writer.WriteProperty(options, PropExpirationTimeInMillis, value.ExpirationTimeInMillis);
144-
writer.WriteProperty(options, PropId, value.Id);
145-
writer.WriteProperty(options, PropIsPartial, value.IsPartial);
146-
writer.WriteProperty(options, PropIsRunning, value.IsRunning);
147-
writer.WriteProperty(options, PropResponse, value.Response);
148-
writer.WriteProperty(options, PropStartTime, value.StartTime);
149-
writer.WriteProperty(options, PropStartTimeInMillis, value.StartTimeInMillis);
140+
writer.WriteProperty(options, PropCompletionTime, value.CompletionTime, null, null);
141+
writer.WriteProperty(options, PropCompletionTimeInMillis, value.CompletionTimeInMillis, null, null);
142+
writer.WriteProperty(options, PropExpirationTime, value.ExpirationTime, null, null);
143+
writer.WriteProperty(options, PropExpirationTimeInMillis, value.ExpirationTimeInMillis, null, null);
144+
writer.WriteProperty(options, PropId, value.Id, null, null);
145+
writer.WriteProperty(options, PropIsPartial, value.IsPartial, null, null);
146+
writer.WriteProperty(options, PropIsRunning, value.IsRunning, null, null);
147+
writer.WriteProperty(options, PropResponse, value.Response, null, null);
148+
writer.WriteProperty(options, PropStartTime, value.StartTime, null, null);
149+
writer.WriteProperty(options, PropStartTimeInMillis, value.StartTimeInMillis, null, null);
150150
writer.WriteEndObject();
151151
}
152152
}

0 commit comments

Comments
 (0)