Skip to content

Commit

Permalink
Fix SourceConfigParam url parameter serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
flobernd committed Sep 4, 2024
1 parent dee9c1b commit 32943d8
Showing 1 changed file with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System;

using Elastic.Transport;

#if ELASTICSEARCH_SERVERLESS
namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search;
#else
namespace Elastic.Clients.Elasticsearch.Core.Search;
#endif

public partial class SourceConfigParam :
IUrlParameter
{
public string GetString(ITransportConfiguration settings) =>
Tag switch
{
0 => UrlFormatter.CreateString(Item1, settings)!,
1 => UrlFormatter.CreateString(Item2, settings)!,
_ => throw new InvalidOperationException()
};
}

0 comments on commit 32943d8

Please sign in to comment.