Skip to content

Commit 32943d8

Browse files
committed
Fix SourceConfigParam url parameter serialization
1 parent dee9c1b commit 32943d8

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
using System;
2+
3+
using Elastic.Transport;
4+
5+
#if ELASTICSEARCH_SERVERLESS
6+
namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search;
7+
#else
8+
namespace Elastic.Clients.Elasticsearch.Core.Search;
9+
#endif
10+
11+
public partial class SourceConfigParam :
12+
IUrlParameter
13+
{
14+
public string GetString(ITransportConfiguration settings) =>
15+
Tag switch
16+
{
17+
0 => UrlFormatter.CreateString(Item1, settings)!,
18+
1 => UrlFormatter.CreateString(Item2, settings)!,
19+
_ => throw new InvalidOperationException()
20+
};
21+
}

0 commit comments

Comments
 (0)