Skip to content

Commit de00805

Browse files
Fix SourceConfigParam url parameter serialization (#8328) (#8332)
Co-authored-by: Florian Bernd <git@flobernd.de>
1 parent dfc6788 commit de00805

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Licensed to Elasticsearch B.V under one or more agreements.
2+
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
3+
// See the LICENSE file in the project root for more information.
4+
5+
using System;
6+
7+
using Elastic.Transport;
8+
9+
#if ELASTICSEARCH_SERVERLESS
10+
namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search;
11+
#else
12+
namespace Elastic.Clients.Elasticsearch.Core.Search;
13+
#endif
14+
15+
public partial class SourceConfigParam :
16+
IUrlParameter
17+
{
18+
public string GetString(ITransportConfiguration settings) =>
19+
Tag switch
20+
{
21+
0 => UrlFormatter.CreateString(Item1, settings)!,
22+
1 => UrlFormatter.CreateString(Item2, settings)!,
23+
_ => throw new InvalidOperationException()
24+
};
25+
}

0 commit comments

Comments
 (0)