How to add a synonym set at indexing

Hello,

I’m struggling to add a synonym at indexing using the EalsticSearch C# API, does anyone here has an example by any chance? My understanding is that I have to run the synonym association after I create my index. I close my index and then I try to run:

var putSynonymResponse = await client.Synonyms.PutSynonymAsync(
"my-synonym-set",
new PutSynonymSetRequest
{
SynonymsSet = new List
{
new() { Id = "rule-1", Synonyms = "foo, bar" }
}
}
);

But PutSynonymSetRequest is not defined. What am I doing wrong?

Thank you !!!