xml/Azure.Communication.Messages/ConversationThreadClient.xml (1,623 lines of code) (raw):

<Type Name="ConversationThreadClient" FullName="Azure.Communication.Messages.ConversationThreadClient"> <TypeSignature Language="C#" Value="public class ConversationThreadClient" /> <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit ConversationThreadClient extends System.Object" /> <TypeSignature Language="DocId" Value="T:Azure.Communication.Messages.ConversationThreadClient" /> <TypeSignature Language="VB.NET" Value="Public Class ConversationThreadClient" /> <TypeSignature Language="F#" Value="type ConversationThreadClient = class" /> <AssemblyInfo> <AssemblyName>Azure.Communication.Messages</AssemblyName> <AssemblyVersion>1.3.0.0</AssemblyVersion> </AssemblyInfo> <Base> <BaseTypeName>System.Object</BaseTypeName> </Base> <Interfaces /> <Docs> <summary> The Azure Communication Services Conversation Thread client. </summary> <remarks>To be added.</remarks> </Docs> <Members> <Member MemberName=".ctor"> <MemberSignature Language="C#" Value="protected ConversationThreadClient ();" /> <MemberSignature Language="ILAsm" Value=".method familyhidebysig specialname rtspecialname instance void .ctor() cil managed" /> <MemberSignature Language="DocId" Value="M:Azure.Communication.Messages.ConversationThreadClient.#ctor" /> <MemberSignature Language="VB.NET" Value="Protected Sub New ()" /> <MemberType>Constructor</MemberType> <AssemblyInfo> <AssemblyName>Azure.Communication.Messages</AssemblyName> <AssemblyVersion>1.3.0.0</AssemblyVersion> </AssemblyInfo> <Parameters /> <Docs> <summary>Initializes a new instance of <see cref="T:Azure.Communication.Messages.ConversationThreadClient" /> for mocking.</summary> <remarks>To be added.</remarks> </Docs> </Member> <Member MemberName=".ctor"> <MemberSignature Language="C#" Value="public ConversationThreadClient (Uri endpoint, Azure.Core.TokenCredential credential);" /> <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.Uri endpoint, class Azure.Core.TokenCredential credential) cil managed" /> <MemberSignature Language="DocId" Value="M:Azure.Communication.Messages.ConversationThreadClient.#ctor(System.Uri,Azure.Core.TokenCredential)" /> <MemberSignature Language="VB.NET" Value="Public Sub New (endpoint As Uri, credential As TokenCredential)" /> <MemberSignature Language="F#" Value="new Azure.Communication.Messages.ConversationThreadClient : Uri * Azure.Core.TokenCredential -&gt; Azure.Communication.Messages.ConversationThreadClient" Usage="new Azure.Communication.Messages.ConversationThreadClient (endpoint, credential)" /> <MemberType>Constructor</MemberType> <AssemblyInfo> <AssemblyName>Azure.Communication.Messages</AssemblyName> <AssemblyVersion>1.3.0.0</AssemblyVersion> </AssemblyInfo> <Parameters> <Parameter Name="endpoint" Type="System.Uri" /> <Parameter Name="credential" Type="Azure.Core.TokenCredential" /> </Parameters> <Docs> <param name="endpoint"> The communication resource, for example https://my-resource.communication.azure.com. </param> <param name="credential"> A credential used to authenticate to an Azure Service. </param> <summary> Initializes a new instance of ConversationThreadClient. </summary> <remarks>To be added.</remarks> <exception cref="T:System.ArgumentNullException"> <paramref name="endpoint" /> or <paramref name="credential" /> is null. </exception> </Docs> </Member> <Member MemberName=".ctor"> <MemberSignature Language="C#" Value="public ConversationThreadClient (Uri endpoint, Azure.Communication.CommunicationTokenCredential communicationTokenCredential, Azure.Communication.Messages.CommunicationMessagesClientOptions options = default);" /> <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.Uri endpoint, class Azure.Communication.CommunicationTokenCredential communicationTokenCredential, class Azure.Communication.Messages.CommunicationMessagesClientOptions options) cil managed" /> <MemberSignature Language="DocId" Value="M:Azure.Communication.Messages.ConversationThreadClient.#ctor(System.Uri,Azure.Communication.CommunicationTokenCredential,Azure.Communication.Messages.CommunicationMessagesClientOptions)" /> <MemberSignature Language="VB.NET" Value="Public Sub New (endpoint As Uri, communicationTokenCredential As CommunicationTokenCredential, Optional options As CommunicationMessagesClientOptions = Nothing)" /> <MemberSignature Language="F#" Value="new Azure.Communication.Messages.ConversationThreadClient : Uri * Azure.Communication.CommunicationTokenCredential * Azure.Communication.Messages.CommunicationMessagesClientOptions -&gt; Azure.Communication.Messages.ConversationThreadClient" Usage="new Azure.Communication.Messages.ConversationThreadClient (endpoint, communicationTokenCredential, options)" /> <MemberType>Constructor</MemberType> <AssemblyInfo> <AssemblyName>Azure.Communication.Messages</AssemblyName> <AssemblyVersion>1.3.0.0</AssemblyVersion> </AssemblyInfo> <Parameters> <Parameter Name="endpoint" Type="System.Uri" /> <Parameter Name="communicationTokenCredential" Type="Azure.Communication.CommunicationTokenCredential" /> <Parameter Name="options" Type="Azure.Communication.Messages.CommunicationMessagesClientOptions" /> </Parameters> <Docs> <param name="endpoint">The URI of the Azure Communication Services resource.</param> <param name="communicationTokenCredential">The <see cref="T:Azure.Communication.CommunicationTokenCredential" /> used to authenticate requests.</param> <param name="options">Client options exposing <see cref="P:Azure.Core.ClientOptions.Diagnostics" />, <see cref="P:Azure.Core.ClientOptions.Retry" />, <see cref="P:Azure.Core.ClientOptions.Transport" />, etc.</param> <summary> Initializes a new instance of the <see cref="T:Azure.Communication.Messages.ConversationThreadClient" /> class. </summary> <remarks>To be added.</remarks> </Docs> </Member> <Member MemberName=".ctor"> <MemberSignature Language="C#" Value="public ConversationThreadClient (Uri endpoint, Azure.Core.TokenCredential credential, Azure.Communication.Messages.CommunicationMessagesClientOptions options);" /> <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.Uri endpoint, class Azure.Core.TokenCredential credential, class Azure.Communication.Messages.CommunicationMessagesClientOptions options) cil managed" /> <MemberSignature Language="DocId" Value="M:Azure.Communication.Messages.ConversationThreadClient.#ctor(System.Uri,Azure.Core.TokenCredential,Azure.Communication.Messages.CommunicationMessagesClientOptions)" /> <MemberSignature Language="VB.NET" Value="Public Sub New (endpoint As Uri, credential As TokenCredential, options As CommunicationMessagesClientOptions)" /> <MemberSignature Language="F#" Value="new Azure.Communication.Messages.ConversationThreadClient : Uri * Azure.Core.TokenCredential * Azure.Communication.Messages.CommunicationMessagesClientOptions -&gt; Azure.Communication.Messages.ConversationThreadClient" Usage="new Azure.Communication.Messages.ConversationThreadClient (endpoint, credential, options)" /> <MemberType>Constructor</MemberType> <AssemblyInfo> <AssemblyName>Azure.Communication.Messages</AssemblyName> <AssemblyVersion>1.3.0.0</AssemblyVersion> </AssemblyInfo> <Parameters> <Parameter Name="endpoint" Type="System.Uri" /> <Parameter Name="credential" Type="Azure.Core.TokenCredential" /> <Parameter Name="options" Type="Azure.Communication.Messages.CommunicationMessagesClientOptions" /> </Parameters> <Docs> <param name="endpoint"> The communication resource, for example https://my-resource.communication.azure.com. </param> <param name="credential"> A credential used to authenticate to an Azure Service. </param> <param name="options"> The options for configuring the client. </param> <summary> Initializes a new instance of ConversationThreadClient. </summary> <remarks>To be added.</remarks> <exception cref="T:System.ArgumentNullException"> <paramref name="endpoint" /> or <paramref name="credential" /> is null. </exception> </Docs> </Member> <Member MemberName="AddParticipants"> <MemberSignature Language="C#" Value="public virtual Azure.Response&lt;Azure.Communication.Messages.AddParticipantsResult&gt; AddParticipants (string conversationId, Azure.Communication.Messages.AddParticipantsOptions options, System.Threading.CancellationToken cancellationToken = default);" /> <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.Response`1&lt;class Azure.Communication.Messages.AddParticipantsResult&gt; AddParticipants(string conversationId, class Azure.Communication.Messages.AddParticipantsOptions options, valuetype System.Threading.CancellationToken cancellationToken) cil managed" /> <MemberSignature Language="DocId" Value="M:Azure.Communication.Messages.ConversationThreadClient.AddParticipants(System.String,Azure.Communication.Messages.AddParticipantsOptions,System.Threading.CancellationToken)" /> <MemberSignature Language="VB.NET" Value="Public Overridable Function AddParticipants (conversationId As String, options As AddParticipantsOptions, Optional cancellationToken As CancellationToken = Nothing) As Response(Of AddParticipantsResult)" /> <MemberSignature Language="F#" Value="abstract member AddParticipants : string * Azure.Communication.Messages.AddParticipantsOptions * System.Threading.CancellationToken -&gt; Azure.Response&lt;Azure.Communication.Messages.AddParticipantsResult&gt;&#xA;override this.AddParticipants : string * Azure.Communication.Messages.AddParticipantsOptions * System.Threading.CancellationToken -&gt; Azure.Response&lt;Azure.Communication.Messages.AddParticipantsResult&gt;" Usage="conversationThreadClient.AddParticipants (conversationId, options, cancellationToken)" /> <MemberType>Method</MemberType> <AssemblyInfo> <AssemblyName>Azure.Communication.Messages</AssemblyName> <AssemblyVersion>1.3.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>Azure.Response&lt;Azure.Communication.Messages.AddParticipantsResult&gt;</ReturnType> </ReturnValue> <Parameters> <Parameter Name="conversationId" Type="System.String" /> <Parameter Name="options" Type="Azure.Communication.Messages.AddParticipantsOptions" /> <Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" /> </Parameters> <Docs> <param name="conversationId"> The conversation ID. </param> <param name="options"> Details of the payload for adding participants to a conversation. </param> <param name="cancellationToken"> The cancellation token to use. </param> <summary> Adds participants to a specific conversation. </summary> <returns>To be added.</returns> <remarks>To be added.</remarks> <exception cref="T:System.ArgumentNullException"> <paramref name="conversationId" /> or <paramref name="options" /> is null. </exception> <exception cref="T:System.ArgumentException"> <paramref name="conversationId" /> is an empty string, and was expected to be non-empty. </exception> <example> This sample shows how to call AddParticipants. <code><![CDATA[ Uri endpoint = new Uri("<endpoint>"); TokenCredential credential = new DefaultAzureCredential(); ConversationThreadClient client = new ConversationThreadClient(endpoint, credential); AddParticipantsOptions options = new AddParticipantsOptions(new ConversationParticipant[] { new InternalConversationParticipant(new CommunicationContact("<id>")) }); Response<AddParticipantsResult> response = client.AddParticipants("<conversationId>", options); ]]></code> This sample shows how to call AddParticipants with all parameters. <code><![CDATA[ Uri endpoint = new Uri("<endpoint>"); TokenCredential credential = new DefaultAzureCredential(); ConversationThreadClient client = new ConversationThreadClient(endpoint, credential); AddParticipantsOptions options = new AddParticipantsOptions(new ConversationParticipant[] { new InternalConversationParticipant(new CommunicationContact("<id>")) { DisplayName = "<displayName>", } }); Response<AddParticipantsResult> response = client.AddParticipants("<conversationId>", options); ]]></code></example> </Docs> </Member> <Member MemberName="AddParticipants"> <MemberSignature Language="C#" Value="public virtual Azure.Response AddParticipants (string conversationId, Azure.Core.RequestContent content, Azure.RequestContext context = default);" /> <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.Response AddParticipants(string conversationId, class Azure.Core.RequestContent content, class Azure.RequestContext context) cil managed" /> <MemberSignature Language="DocId" Value="M:Azure.Communication.Messages.ConversationThreadClient.AddParticipants(System.String,Azure.Core.RequestContent,Azure.RequestContext)" /> <MemberSignature Language="VB.NET" Value="Public Overridable Function AddParticipants (conversationId As String, content As RequestContent, Optional context As RequestContext = Nothing) As Response" /> <MemberSignature Language="F#" Value="abstract member AddParticipants : string * Azure.Core.RequestContent * Azure.RequestContext -&gt; Azure.Response&#xA;override this.AddParticipants : string * Azure.Core.RequestContent * Azure.RequestContext -&gt; Azure.Response" Usage="conversationThreadClient.AddParticipants (conversationId, content, context)" /> <MemberType>Method</MemberType> <AssemblyInfo> <AssemblyName>Azure.Communication.Messages</AssemblyName> <AssemblyVersion>1.3.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>Azure.Response</ReturnType> </ReturnValue> <Parameters> <Parameter Name="conversationId" Type="System.String" /> <Parameter Name="content" Type="Azure.Core.RequestContent" /> <Parameter Name="context" Type="Azure.RequestContext" /> </Parameters> <Docs> <param name="conversationId"> The conversation ID. </param> <param name="content"> The content to send as the body of the request. </param> <param name="context"> The request context, which can override default behaviors of the client pipeline on a per-call basis. </param> <summary> [Protocol Method] Adds participants to a specific conversation. <list type="bullet"><item><description> This <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/ProtocolMethods.md">protocol method</see> allows explicit creation of the request and processing of the response for advanced scenarios. </description></item><item><description> Please try the simpler <see cref="M:Azure.Communication.Messages.ConversationThreadClient.AddParticipants(System.String,Azure.Communication.Messages.AddParticipantsOptions,System.Threading.CancellationToken)" /> convenience overload with strongly typed models first. </description></item></list></summary> <returns> The response returned from the service. </returns> <remarks>To be added.</remarks> <exception cref="T:System.ArgumentNullException"> <paramref name="conversationId" /> or <paramref name="content" /> is null. </exception> <exception cref="T:System.ArgumentException"> <paramref name="conversationId" /> is an empty string, and was expected to be non-empty. </exception> <exception cref="T:Azure.RequestFailedException"> Service returned a non-success status code. </exception> <example> This sample shows how to call AddParticipants and parse the result. <code><![CDATA[ Uri endpoint = new Uri("<endpoint>"); TokenCredential credential = new DefaultAzureCredential(); ConversationThreadClient client = new ConversationThreadClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { participants = new object[] { new { kind = "internal", contact = new { kind = "communication", id = "<id>", }, } }, }); Response response = client.AddParticipants("<conversationId>", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("invalidParticipants")[0].GetProperty("id").ToString()); ]]></code> This sample shows how to call AddParticipants with all parameters and request content and parse the result. <code><![CDATA[ Uri endpoint = new Uri("<endpoint>"); TokenCredential credential = new DefaultAzureCredential(); ConversationThreadClient client = new ConversationThreadClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { participants = new object[] { new { kind = "internal", contact = new { kind = "communication", id = "<id>", }, displayName = "<displayName>", } }, }); Response response = client.AddParticipants("<conversationId>", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("invalidParticipants")[0].GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("invalidParticipants")[0].GetProperty("error").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("invalidParticipants")[0].GetProperty("error").GetProperty("message").ToString()); Console.WriteLine(result.GetProperty("invalidParticipants")[0].GetProperty("error").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("invalidParticipants")[0].GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); ]]></code></example> </Docs> </Member> <Member MemberName="AddParticipantsAsync"> <MemberSignature Language="C#" Value="public virtual System.Threading.Tasks.Task&lt;Azure.Response&lt;Azure.Communication.Messages.AddParticipantsResult&gt;&gt; AddParticipantsAsync (string conversationId, Azure.Communication.Messages.AddParticipantsOptions options, System.Threading.CancellationToken cancellationToken = default);" /> <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1&lt;class Azure.Response`1&lt;class Azure.Communication.Messages.AddParticipantsResult&gt;&gt; AddParticipantsAsync(string conversationId, class Azure.Communication.Messages.AddParticipantsOptions options, valuetype System.Threading.CancellationToken cancellationToken) cil managed" /> <MemberSignature Language="DocId" Value="M:Azure.Communication.Messages.ConversationThreadClient.AddParticipantsAsync(System.String,Azure.Communication.Messages.AddParticipantsOptions,System.Threading.CancellationToken)" /> <MemberSignature Language="VB.NET" Value="Public Overridable Function AddParticipantsAsync (conversationId As String, options As AddParticipantsOptions, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of AddParticipantsResult))" /> <MemberSignature Language="F#" Value="abstract member AddParticipantsAsync : string * Azure.Communication.Messages.AddParticipantsOptions * System.Threading.CancellationToken -&gt; System.Threading.Tasks.Task&lt;Azure.Response&lt;Azure.Communication.Messages.AddParticipantsResult&gt;&gt;&#xA;override this.AddParticipantsAsync : string * Azure.Communication.Messages.AddParticipantsOptions * System.Threading.CancellationToken -&gt; System.Threading.Tasks.Task&lt;Azure.Response&lt;Azure.Communication.Messages.AddParticipantsResult&gt;&gt;" Usage="conversationThreadClient.AddParticipantsAsync (conversationId, options, cancellationToken)" /> <MemberType>Method</MemberType> <AssemblyInfo> <AssemblyName>Azure.Communication.Messages</AssemblyName> <AssemblyVersion>1.3.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>System.Threading.Tasks.Task&lt;Azure.Response&lt;Azure.Communication.Messages.AddParticipantsResult&gt;&gt;</ReturnType> </ReturnValue> <Parameters> <Parameter Name="conversationId" Type="System.String" /> <Parameter Name="options" Type="Azure.Communication.Messages.AddParticipantsOptions" /> <Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" /> </Parameters> <Docs> <param name="conversationId"> The conversation ID. </param> <param name="options"> Details of the payload for adding participants to a conversation. </param> <param name="cancellationToken"> The cancellation token to use. </param> <summary> Adds participants to a specific conversation. </summary> <returns>To be added.</returns> <remarks>To be added.</remarks> <exception cref="T:System.ArgumentNullException"> <paramref name="conversationId" /> or <paramref name="options" /> is null. </exception> <exception cref="T:System.ArgumentException"> <paramref name="conversationId" /> is an empty string, and was expected to be non-empty. </exception> <example> This sample shows how to call AddParticipantsAsync. <code><![CDATA[ Uri endpoint = new Uri("<endpoint>"); TokenCredential credential = new DefaultAzureCredential(); ConversationThreadClient client = new ConversationThreadClient(endpoint, credential); AddParticipantsOptions options = new AddParticipantsOptions(new ConversationParticipant[] { new InternalConversationParticipant(new CommunicationContact("<id>")) }); Response<AddParticipantsResult> response = await client.AddParticipantsAsync("<conversationId>", options); ]]></code> This sample shows how to call AddParticipantsAsync with all parameters. <code><![CDATA[ Uri endpoint = new Uri("<endpoint>"); TokenCredential credential = new DefaultAzureCredential(); ConversationThreadClient client = new ConversationThreadClient(endpoint, credential); AddParticipantsOptions options = new AddParticipantsOptions(new ConversationParticipant[] { new InternalConversationParticipant(new CommunicationContact("<id>")) { DisplayName = "<displayName>", } }); Response<AddParticipantsResult> response = await client.AddParticipantsAsync("<conversationId>", options); ]]></code></example> </Docs> </Member> <Member MemberName="AddParticipantsAsync"> <MemberSignature Language="C#" Value="public virtual System.Threading.Tasks.Task&lt;Azure.Response&gt; AddParticipantsAsync (string conversationId, Azure.Core.RequestContent content, Azure.RequestContext context = default);" /> <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1&lt;class Azure.Response&gt; AddParticipantsAsync(string conversationId, class Azure.Core.RequestContent content, class Azure.RequestContext context) cil managed" /> <MemberSignature Language="DocId" Value="M:Azure.Communication.Messages.ConversationThreadClient.AddParticipantsAsync(System.String,Azure.Core.RequestContent,Azure.RequestContext)" /> <MemberSignature Language="VB.NET" Value="Public Overridable Function AddParticipantsAsync (conversationId As String, content As RequestContent, Optional context As RequestContext = Nothing) As Task(Of Response)" /> <MemberSignature Language="F#" Value="abstract member AddParticipantsAsync : string * Azure.Core.RequestContent * Azure.RequestContext -&gt; System.Threading.Tasks.Task&lt;Azure.Response&gt;&#xA;override this.AddParticipantsAsync : string * Azure.Core.RequestContent * Azure.RequestContext -&gt; System.Threading.Tasks.Task&lt;Azure.Response&gt;" Usage="conversationThreadClient.AddParticipantsAsync (conversationId, content, context)" /> <MemberType>Method</MemberType> <AssemblyInfo> <AssemblyName>Azure.Communication.Messages</AssemblyName> <AssemblyVersion>1.3.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>System.Threading.Tasks.Task&lt;Azure.Response&gt;</ReturnType> </ReturnValue> <Parameters> <Parameter Name="conversationId" Type="System.String" /> <Parameter Name="content" Type="Azure.Core.RequestContent" /> <Parameter Name="context" Type="Azure.RequestContext" /> </Parameters> <Docs> <param name="conversationId"> The conversation ID. </param> <param name="content"> The content to send as the body of the request. </param> <param name="context"> The request context, which can override default behaviors of the client pipeline on a per-call basis. </param> <summary> [Protocol Method] Adds participants to a specific conversation. <list type="bullet"><item><description> This <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/ProtocolMethods.md">protocol method</see> allows explicit creation of the request and processing of the response for advanced scenarios. </description></item><item><description> Please try the simpler <see cref="M:Azure.Communication.Messages.ConversationThreadClient.AddParticipantsAsync(System.String,Azure.Communication.Messages.AddParticipantsOptions,System.Threading.CancellationToken)" /> convenience overload with strongly typed models first. </description></item></list></summary> <returns> The response returned from the service. </returns> <remarks>To be added.</remarks> <exception cref="T:System.ArgumentNullException"> <paramref name="conversationId" /> or <paramref name="content" /> is null. </exception> <exception cref="T:System.ArgumentException"> <paramref name="conversationId" /> is an empty string, and was expected to be non-empty. </exception> <exception cref="T:Azure.RequestFailedException"> Service returned a non-success status code. </exception> <example> This sample shows how to call AddParticipantsAsync and parse the result. <code><![CDATA[ Uri endpoint = new Uri("<endpoint>"); TokenCredential credential = new DefaultAzureCredential(); ConversationThreadClient client = new ConversationThreadClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { participants = new object[] { new { kind = "internal", contact = new { kind = "communication", id = "<id>", }, } }, }); Response response = await client.AddParticipantsAsync("<conversationId>", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("invalidParticipants")[0].GetProperty("id").ToString()); ]]></code> This sample shows how to call AddParticipantsAsync with all parameters and request content and parse the result. <code><![CDATA[ Uri endpoint = new Uri("<endpoint>"); TokenCredential credential = new DefaultAzureCredential(); ConversationThreadClient client = new ConversationThreadClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { participants = new object[] { new { kind = "internal", contact = new { kind = "communication", id = "<id>", }, displayName = "<displayName>", } }, }); Response response = await client.AddParticipantsAsync("<conversationId>", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("invalidParticipants")[0].GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("invalidParticipants")[0].GetProperty("error").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("invalidParticipants")[0].GetProperty("error").GetProperty("message").ToString()); Console.WriteLine(result.GetProperty("invalidParticipants")[0].GetProperty("error").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("invalidParticipants")[0].GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); ]]></code></example> </Docs> </Member> <Member MemberName="AnalyzeConversation"> <MemberSignature Language="C#" Value="public virtual Azure.Response AnalyzeConversation (string conversationId, Azure.RequestContext context);" /> <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.Response AnalyzeConversation(string conversationId, class Azure.RequestContext context) cil managed" /> <MemberSignature Language="DocId" Value="M:Azure.Communication.Messages.ConversationThreadClient.AnalyzeConversation(System.String,Azure.RequestContext)" /> <MemberSignature Language="VB.NET" Value="Public Overridable Function AnalyzeConversation (conversationId As String, context As RequestContext) As Response" /> <MemberSignature Language="F#" Value="abstract member AnalyzeConversation : string * Azure.RequestContext -&gt; Azure.Response&#xA;override this.AnalyzeConversation : string * Azure.RequestContext -&gt; Azure.Response" Usage="conversationThreadClient.AnalyzeConversation (conversationId, context)" /> <MemberType>Method</MemberType> <AssemblyInfo> <AssemblyName>Azure.Communication.Messages</AssemblyName> <AssemblyVersion>1.3.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>Azure.Response</ReturnType> </ReturnValue> <Parameters> <Parameter Name="conversationId" Type="System.String" /> <Parameter Name="context" Type="Azure.RequestContext" /> </Parameters> <Docs> <param name="conversationId"> The conversation ID. </param> <param name="context"> The request context, which can override default behaviors of the client pipeline on a per-call basis. </param> <summary> [Protocol Method] Get AI Analysis of a conversation. <list type="bullet"><item><description> This <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/ProtocolMethods.md">protocol method</see> allows explicit creation of the request and processing of the response for advanced scenarios. </description></item><item><description> Please try the simpler <see cref="M:Azure.Communication.Messages.ConversationThreadClient.AnalyzeConversation(System.String,System.Threading.CancellationToken)" /> convenience overload with strongly typed models first. </description></item></list></summary> <returns> The response returned from the service. </returns> <remarks>To be added.</remarks> <exception cref="T:System.ArgumentNullException"> <paramref name="conversationId" /> is null. </exception> <exception cref="T:System.ArgumentException"> <paramref name="conversationId" /> is an empty string, and was expected to be non-empty. </exception> <exception cref="T:Azure.RequestFailedException"> Service returned a non-success status code. </exception> <example> This sample shows how to call AnalyzeConversation and parse the result. <code><![CDATA[ Uri endpoint = new Uri("<endpoint>"); TokenCredential credential = new DefaultAzureCredential(); ConversationThreadClient client = new ConversationThreadClient(endpoint, credential); Response response = client.AnalyzeConversation("<conversationId>", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("summary").ToString()); ]]></code> This sample shows how to call AnalyzeConversation with all parameters and parse the result. <code><![CDATA[ Uri endpoint = new Uri("<endpoint>"); TokenCredential credential = new DefaultAzureCredential(); ConversationThreadClient client = new ConversationThreadClient(endpoint, credential); Response response = client.AnalyzeConversation("<conversationId>", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("summary").ToString()); ]]></code></example> </Docs> </Member> <Member MemberName="AnalyzeConversation"> <MemberSignature Language="C#" Value="public virtual Azure.Response&lt;Azure.Communication.Messages.GetConversationThreadAnalysisResult&gt; AnalyzeConversation (string conversationId, System.Threading.CancellationToken cancellationToken = default);" /> <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.Response`1&lt;class Azure.Communication.Messages.GetConversationThreadAnalysisResult&gt; AnalyzeConversation(string conversationId, valuetype System.Threading.CancellationToken cancellationToken) cil managed" /> <MemberSignature Language="DocId" Value="M:Azure.Communication.Messages.ConversationThreadClient.AnalyzeConversation(System.String,System.Threading.CancellationToken)" /> <MemberSignature Language="VB.NET" Value="Public Overridable Function AnalyzeConversation (conversationId As String, Optional cancellationToken As CancellationToken = Nothing) As Response(Of GetConversationThreadAnalysisResult)" /> <MemberSignature Language="F#" Value="abstract member AnalyzeConversation : string * System.Threading.CancellationToken -&gt; Azure.Response&lt;Azure.Communication.Messages.GetConversationThreadAnalysisResult&gt;&#xA;override this.AnalyzeConversation : string * System.Threading.CancellationToken -&gt; Azure.Response&lt;Azure.Communication.Messages.GetConversationThreadAnalysisResult&gt;" Usage="conversationThreadClient.AnalyzeConversation (conversationId, cancellationToken)" /> <MemberType>Method</MemberType> <AssemblyInfo> <AssemblyName>Azure.Communication.Messages</AssemblyName> <AssemblyVersion>1.3.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>Azure.Response&lt;Azure.Communication.Messages.GetConversationThreadAnalysisResult&gt;</ReturnType> </ReturnValue> <Parameters> <Parameter Name="conversationId" Type="System.String" /> <Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" /> </Parameters> <Docs> <param name="conversationId"> The conversation ID. </param> <param name="cancellationToken"> The cancellation token to use. </param> <summary> Get AI Analysis of a conversation. </summary> <returns>To be added.</returns> <remarks>To be added.</remarks> <exception cref="T:System.ArgumentNullException"> <paramref name="conversationId" /> is null. </exception> <exception cref="T:System.ArgumentException"> <paramref name="conversationId" /> is an empty string, and was expected to be non-empty. </exception> <example> This sample shows how to call AnalyzeConversation. <code><![CDATA[ Uri endpoint = new Uri("<endpoint>"); TokenCredential credential = new DefaultAzureCredential(); ConversationThreadClient client = new ConversationThreadClient(endpoint, credential); Response<GetConversationThreadAnalysisResult> response = client.AnalyzeConversation("<conversationId>"); ]]></code> This sample shows how to call AnalyzeConversation with all parameters. <code><![CDATA[ Uri endpoint = new Uri("<endpoint>"); TokenCredential credential = new DefaultAzureCredential(); ConversationThreadClient client = new ConversationThreadClient(endpoint, credential); Response<GetConversationThreadAnalysisResult> response = client.AnalyzeConversation("<conversationId>"); ]]></code></example> </Docs> </Member> <Member MemberName="AnalyzeConversationAsync"> <MemberSignature Language="C#" Value="public virtual System.Threading.Tasks.Task&lt;Azure.Response&gt; AnalyzeConversationAsync (string conversationId, Azure.RequestContext context);" /> <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1&lt;class Azure.Response&gt; AnalyzeConversationAsync(string conversationId, class Azure.RequestContext context) cil managed" /> <MemberSignature Language="DocId" Value="M:Azure.Communication.Messages.ConversationThreadClient.AnalyzeConversationAsync(System.String,Azure.RequestContext)" /> <MemberSignature Language="VB.NET" Value="Public Overridable Function AnalyzeConversationAsync (conversationId As String, context As RequestContext) As Task(Of Response)" /> <MemberSignature Language="F#" Value="abstract member AnalyzeConversationAsync : string * Azure.RequestContext -&gt; System.Threading.Tasks.Task&lt;Azure.Response&gt;&#xA;override this.AnalyzeConversationAsync : string * Azure.RequestContext -&gt; System.Threading.Tasks.Task&lt;Azure.Response&gt;" Usage="conversationThreadClient.AnalyzeConversationAsync (conversationId, context)" /> <MemberType>Method</MemberType> <AssemblyInfo> <AssemblyName>Azure.Communication.Messages</AssemblyName> <AssemblyVersion>1.3.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>System.Threading.Tasks.Task&lt;Azure.Response&gt;</ReturnType> </ReturnValue> <Parameters> <Parameter Name="conversationId" Type="System.String" /> <Parameter Name="context" Type="Azure.RequestContext" /> </Parameters> <Docs> <param name="conversationId"> The conversation ID. </param> <param name="context"> The request context, which can override default behaviors of the client pipeline on a per-call basis. </param> <summary> [Protocol Method] Get AI Analysis of a conversation. <list type="bullet"><item><description> This <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/ProtocolMethods.md">protocol method</see> allows explicit creation of the request and processing of the response for advanced scenarios. </description></item><item><description> Please try the simpler <see cref="M:Azure.Communication.Messages.ConversationThreadClient.AnalyzeConversationAsync(System.String,System.Threading.CancellationToken)" /> convenience overload with strongly typed models first. </description></item></list></summary> <returns> The response returned from the service. </returns> <remarks>To be added.</remarks> <exception cref="T:System.ArgumentNullException"> <paramref name="conversationId" /> is null. </exception> <exception cref="T:System.ArgumentException"> <paramref name="conversationId" /> is an empty string, and was expected to be non-empty. </exception> <exception cref="T:Azure.RequestFailedException"> Service returned a non-success status code. </exception> <example> This sample shows how to call AnalyzeConversationAsync and parse the result. <code><![CDATA[ Uri endpoint = new Uri("<endpoint>"); TokenCredential credential = new DefaultAzureCredential(); ConversationThreadClient client = new ConversationThreadClient(endpoint, credential); Response response = await client.AnalyzeConversationAsync("<conversationId>", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("summary").ToString()); ]]></code> This sample shows how to call AnalyzeConversationAsync with all parameters and parse the result. <code><![CDATA[ Uri endpoint = new Uri("<endpoint>"); TokenCredential credential = new DefaultAzureCredential(); ConversationThreadClient client = new ConversationThreadClient(endpoint, credential); Response response = await client.AnalyzeConversationAsync("<conversationId>", null); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("summary").ToString()); ]]></code></example> </Docs> </Member> <Member MemberName="AnalyzeConversationAsync"> <MemberSignature Language="C#" Value="public virtual System.Threading.Tasks.Task&lt;Azure.Response&lt;Azure.Communication.Messages.GetConversationThreadAnalysisResult&gt;&gt; AnalyzeConversationAsync (string conversationId, System.Threading.CancellationToken cancellationToken = default);" /> <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1&lt;class Azure.Response`1&lt;class Azure.Communication.Messages.GetConversationThreadAnalysisResult&gt;&gt; AnalyzeConversationAsync(string conversationId, valuetype System.Threading.CancellationToken cancellationToken) cil managed" /> <MemberSignature Language="DocId" Value="M:Azure.Communication.Messages.ConversationThreadClient.AnalyzeConversationAsync(System.String,System.Threading.CancellationToken)" /> <MemberSignature Language="VB.NET" Value="Public Overridable Function AnalyzeConversationAsync (conversationId As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of GetConversationThreadAnalysisResult))" /> <MemberSignature Language="F#" Value="abstract member AnalyzeConversationAsync : string * System.Threading.CancellationToken -&gt; System.Threading.Tasks.Task&lt;Azure.Response&lt;Azure.Communication.Messages.GetConversationThreadAnalysisResult&gt;&gt;&#xA;override this.AnalyzeConversationAsync : string * System.Threading.CancellationToken -&gt; System.Threading.Tasks.Task&lt;Azure.Response&lt;Azure.Communication.Messages.GetConversationThreadAnalysisResult&gt;&gt;" Usage="conversationThreadClient.AnalyzeConversationAsync (conversationId, cancellationToken)" /> <MemberType>Method</MemberType> <AssemblyInfo> <AssemblyName>Azure.Communication.Messages</AssemblyName> <AssemblyVersion>1.3.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>System.Threading.Tasks.Task&lt;Azure.Response&lt;Azure.Communication.Messages.GetConversationThreadAnalysisResult&gt;&gt;</ReturnType> </ReturnValue> <Parameters> <Parameter Name="conversationId" Type="System.String" /> <Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" /> </Parameters> <Docs> <param name="conversationId"> The conversation ID. </param> <param name="cancellationToken"> The cancellation token to use. </param> <summary> Get AI Analysis of a conversation. </summary> <returns>To be added.</returns> <remarks>To be added.</remarks> <exception cref="T:System.ArgumentNullException"> <paramref name="conversationId" /> is null. </exception> <exception cref="T:System.ArgumentException"> <paramref name="conversationId" /> is an empty string, and was expected to be non-empty. </exception> <example> This sample shows how to call AnalyzeConversationAsync. <code><![CDATA[ Uri endpoint = new Uri("<endpoint>"); TokenCredential credential = new DefaultAzureCredential(); ConversationThreadClient client = new ConversationThreadClient(endpoint, credential); Response<GetConversationThreadAnalysisResult> response = await client.AnalyzeConversationAsync("<conversationId>"); ]]></code> This sample shows how to call AnalyzeConversationAsync with all parameters. <code><![CDATA[ Uri endpoint = new Uri("<endpoint>"); TokenCredential credential = new DefaultAzureCredential(); ConversationThreadClient client = new ConversationThreadClient(endpoint, credential); Response<GetConversationThreadAnalysisResult> response = await client.AnalyzeConversationAsync("<conversationId>"); ]]></code></example> </Docs> </Member> <Member MemberName="GetConversations"> <MemberSignature Language="C#" Value="public virtual Azure.Pageable&lt;BinaryData&gt; GetConversations (int? maxPageSize, string participantId, Guid? channelId, Azure.RequestContext context);" /> <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.Pageable`1&lt;class System.BinaryData&gt; GetConversations(valuetype System.Nullable`1&lt;int32&gt; maxPageSize, string participantId, valuetype System.Nullable`1&lt;valuetype System.Guid&gt; channelId, class Azure.RequestContext context) cil managed" /> <MemberSignature Language="DocId" Value="M:Azure.Communication.Messages.ConversationThreadClient.GetConversations(System.Nullable{System.Int32},System.String,System.Nullable{System.Guid},Azure.RequestContext)" /> <MemberSignature Language="VB.NET" Value="Public Overridable Function GetConversations (maxPageSize As Nullable(Of Integer), participantId As String, channelId As Nullable(Of Guid), context As RequestContext) As Pageable(Of BinaryData)" /> <MemberSignature Language="F#" Value="abstract member GetConversations : Nullable&lt;int&gt; * string * Nullable&lt;Guid&gt; * Azure.RequestContext -&gt; Azure.Pageable&lt;BinaryData&gt;&#xA;override this.GetConversations : Nullable&lt;int&gt; * string * Nullable&lt;Guid&gt; * Azure.RequestContext -&gt; Azure.Pageable&lt;BinaryData&gt;" Usage="conversationThreadClient.GetConversations (maxPageSize, participantId, channelId, context)" /> <MemberType>Method</MemberType> <AssemblyInfo> <AssemblyName>Azure.Communication.Messages</AssemblyName> <AssemblyVersion>1.3.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>Azure.Pageable&lt;System.BinaryData&gt;</ReturnType> </ReturnValue> <Parameters> <Parameter Name="maxPageSize" Type="System.Nullable&lt;System.Int32&gt;" /> <Parameter Name="participantId" Type="System.String" /> <Parameter Name="channelId" Type="System.Nullable&lt;System.Guid&gt;" /> <Parameter Name="context" Type="Azure.RequestContext" /> </Parameters> <Docs> <param name="maxPageSize"> Number of objects to return per page. </param> <param name="participantId"> The participant user ID. </param> <param name="channelId"> The id of channel. </param> <param name="context"> The request context, which can override default behaviors of the client pipeline on a per-call basis. </param> <summary> [Protocol Method] Retrieves list of conversations. <list type="bullet"><item><description> This <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/ProtocolMethods.md">protocol method</see> allows explicit creation of the request and processing of the response for advanced scenarios. </description></item><item><description> Please try the simpler <see cref="M:Azure.Communication.Messages.ConversationThreadClient.GetConversations(System.Nullable{System.Int32},System.String,System.Nullable{System.Guid},System.Threading.CancellationToken)" /> convenience overload with strongly typed models first. </description></item></list></summary> <returns> The <see cref="T:Azure.Pageable`1" /> from the service containing a list of <see cref="T:System.BinaryData" /> objects. Details of the body schema for each item in the collection are in the Remarks section below. </returns> <remarks>To be added.</remarks> <exception cref="T:Azure.RequestFailedException"> Service returned a non-success status code. </exception> <example> This sample shows how to call GetConversations and parse the result. <code><![CDATA[ Uri endpoint = new Uri("<endpoint>"); TokenCredential credential = new DefaultAzureCredential(); ConversationThreadClient client = new ConversationThreadClient(endpoint, credential); foreach (BinaryData item in client.GetConversations(null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); } ]]></code> This sample shows how to call GetConversations with all parameters and parse the result. <code><![CDATA[ Uri endpoint = new Uri("<endpoint>"); TokenCredential credential = new DefaultAzureCredential(); ConversationThreadClient client = new ConversationThreadClient(endpoint, credential); foreach (BinaryData item in client.GetConversations(1234, "<participantId>", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("topic").ToString()); Console.WriteLine(result.GetProperty("deliveryChannelIds")[0].ToString()); Console.WriteLine(result.GetProperty("outboundDeliveryStrategy").ToString()); Console.WriteLine(result.GetProperty("participants")[0].GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("participants")[0].GetProperty("displayName").ToString()); Console.WriteLine(result.GetProperty("participants")[0].GetProperty("kind").ToString()); } ]]></code></example> </Docs> </Member> <Member MemberName="GetConversations"> <MemberSignature Language="C#" Value="public virtual Azure.Pageable&lt;Azure.Communication.Messages.CommunicationConversation&gt; GetConversations (int? maxPageSize = default, string participantId = default, Guid? channelId = default, System.Threading.CancellationToken cancellationToken = default);" /> <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.Pageable`1&lt;class Azure.Communication.Messages.CommunicationConversation&gt; GetConversations(valuetype System.Nullable`1&lt;int32&gt; maxPageSize, string participantId, valuetype System.Nullable`1&lt;valuetype System.Guid&gt; channelId, valuetype System.Threading.CancellationToken cancellationToken) cil managed" /> <MemberSignature Language="DocId" Value="M:Azure.Communication.Messages.ConversationThreadClient.GetConversations(System.Nullable{System.Int32},System.String,System.Nullable{System.Guid},System.Threading.CancellationToken)" /> <MemberSignature Language="VB.NET" Value="Public Overridable Function GetConversations (Optional maxPageSize As Nullable(Of Integer) = Nothing, Optional participantId As String = Nothing, Optional channelId As Nullable(Of Guid) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Pageable(Of CommunicationConversation)" /> <MemberSignature Language="F#" Value="abstract member GetConversations : Nullable&lt;int&gt; * string * Nullable&lt;Guid&gt; * System.Threading.CancellationToken -&gt; Azure.Pageable&lt;Azure.Communication.Messages.CommunicationConversation&gt;&#xA;override this.GetConversations : Nullable&lt;int&gt; * string * Nullable&lt;Guid&gt; * System.Threading.CancellationToken -&gt; Azure.Pageable&lt;Azure.Communication.Messages.CommunicationConversation&gt;" Usage="conversationThreadClient.GetConversations (maxPageSize, participantId, channelId, cancellationToken)" /> <MemberType>Method</MemberType> <AssemblyInfo> <AssemblyName>Azure.Communication.Messages</AssemblyName> <AssemblyVersion>1.3.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>Azure.Pageable&lt;Azure.Communication.Messages.CommunicationConversation&gt;</ReturnType> </ReturnValue> <Parameters> <Parameter Name="maxPageSize" Type="System.Nullable&lt;System.Int32&gt;" /> <Parameter Name="participantId" Type="System.String" /> <Parameter Name="channelId" Type="System.Nullable&lt;System.Guid&gt;" /> <Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" /> </Parameters> <Docs> <param name="maxPageSize"> Number of objects to return per page. </param> <param name="participantId"> The participant user ID. </param> <param name="channelId"> The id of channel. </param> <param name="cancellationToken"> The cancellation token to use. </param> <summary> Retrieves list of conversations. </summary> <returns>To be added.</returns> <remarks>To be added.</remarks> <example> This sample shows how to call GetConversations. <code><![CDATA[ Uri endpoint = new Uri("<endpoint>"); TokenCredential credential = new DefaultAzureCredential(); ConversationThreadClient client = new ConversationThreadClient(endpoint, credential); foreach (CommunicationConversation item in client.GetConversations()) { } ]]></code> This sample shows how to call GetConversations with all parameters. <code><![CDATA[ Uri endpoint = new Uri("<endpoint>"); TokenCredential credential = new DefaultAzureCredential(); ConversationThreadClient client = new ConversationThreadClient(endpoint, credential); foreach (CommunicationConversation item in client.GetConversations(maxPageSize: 1234, participantId: "<participantId>", channelId: Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"))) { } ]]></code></example> </Docs> </Member> <Member MemberName="GetConversationsAsync"> <MemberSignature Language="C#" Value="public virtual Azure.AsyncPageable&lt;BinaryData&gt; GetConversationsAsync (int? maxPageSize, string participantId, Guid? channelId, Azure.RequestContext context);" /> <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.AsyncPageable`1&lt;class System.BinaryData&gt; GetConversationsAsync(valuetype System.Nullable`1&lt;int32&gt; maxPageSize, string participantId, valuetype System.Nullable`1&lt;valuetype System.Guid&gt; channelId, class Azure.RequestContext context) cil managed" /> <MemberSignature Language="DocId" Value="M:Azure.Communication.Messages.ConversationThreadClient.GetConversationsAsync(System.Nullable{System.Int32},System.String,System.Nullable{System.Guid},Azure.RequestContext)" /> <MemberSignature Language="VB.NET" Value="Public Overridable Function GetConversationsAsync (maxPageSize As Nullable(Of Integer), participantId As String, channelId As Nullable(Of Guid), context As RequestContext) As AsyncPageable(Of BinaryData)" /> <MemberSignature Language="F#" Value="abstract member GetConversationsAsync : Nullable&lt;int&gt; * string * Nullable&lt;Guid&gt; * Azure.RequestContext -&gt; Azure.AsyncPageable&lt;BinaryData&gt;&#xA;override this.GetConversationsAsync : Nullable&lt;int&gt; * string * Nullable&lt;Guid&gt; * Azure.RequestContext -&gt; Azure.AsyncPageable&lt;BinaryData&gt;" Usage="conversationThreadClient.GetConversationsAsync (maxPageSize, participantId, channelId, context)" /> <MemberType>Method</MemberType> <AssemblyInfo> <AssemblyName>Azure.Communication.Messages</AssemblyName> <AssemblyVersion>1.3.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>Azure.AsyncPageable&lt;System.BinaryData&gt;</ReturnType> </ReturnValue> <Parameters> <Parameter Name="maxPageSize" Type="System.Nullable&lt;System.Int32&gt;" /> <Parameter Name="participantId" Type="System.String" /> <Parameter Name="channelId" Type="System.Nullable&lt;System.Guid&gt;" /> <Parameter Name="context" Type="Azure.RequestContext" /> </Parameters> <Docs> <param name="maxPageSize"> Number of objects to return per page. </param> <param name="participantId"> The participant user ID. </param> <param name="channelId"> The id of channel. </param> <param name="context"> The request context, which can override default behaviors of the client pipeline on a per-call basis. </param> <summary> [Protocol Method] Retrieves list of conversations. <list type="bullet"><item><description> This <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/ProtocolMethods.md">protocol method</see> allows explicit creation of the request and processing of the response for advanced scenarios. </description></item><item><description> Please try the simpler <see cref="M:Azure.Communication.Messages.ConversationThreadClient.GetConversationsAsync(System.Nullable{System.Int32},System.String,System.Nullable{System.Guid},System.Threading.CancellationToken)" /> convenience overload with strongly typed models first. </description></item></list></summary> <returns> The <see cref="T:Azure.AsyncPageable`1" /> from the service containing a list of <see cref="T:System.BinaryData" /> objects. Details of the body schema for each item in the collection are in the Remarks section below. </returns> <remarks>To be added.</remarks> <exception cref="T:Azure.RequestFailedException"> Service returned a non-success status code. </exception> <example> This sample shows how to call GetConversationsAsync and parse the result. <code><![CDATA[ Uri endpoint = new Uri("<endpoint>"); TokenCredential credential = new DefaultAzureCredential(); ConversationThreadClient client = new ConversationThreadClient(endpoint, credential); await foreach (BinaryData item in client.GetConversationsAsync(null, null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); } ]]></code> This sample shows how to call GetConversationsAsync with all parameters and parse the result. <code><![CDATA[ Uri endpoint = new Uri("<endpoint>"); TokenCredential credential = new DefaultAzureCredential(); ConversationThreadClient client = new ConversationThreadClient(endpoint, credential); await foreach (BinaryData item in client.GetConversationsAsync(1234, "<participantId>", Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"), null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("topic").ToString()); Console.WriteLine(result.GetProperty("deliveryChannelIds")[0].ToString()); Console.WriteLine(result.GetProperty("outboundDeliveryStrategy").ToString()); Console.WriteLine(result.GetProperty("participants")[0].GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("participants")[0].GetProperty("displayName").ToString()); Console.WriteLine(result.GetProperty("participants")[0].GetProperty("kind").ToString()); } ]]></code></example> </Docs> </Member> <Member MemberName="GetConversationsAsync"> <MemberSignature Language="C#" Value="public virtual Azure.AsyncPageable&lt;Azure.Communication.Messages.CommunicationConversation&gt; GetConversationsAsync (int? maxPageSize = default, string participantId = default, Guid? channelId = default, System.Threading.CancellationToken cancellationToken = default);" /> <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.AsyncPageable`1&lt;class Azure.Communication.Messages.CommunicationConversation&gt; GetConversationsAsync(valuetype System.Nullable`1&lt;int32&gt; maxPageSize, string participantId, valuetype System.Nullable`1&lt;valuetype System.Guid&gt; channelId, valuetype System.Threading.CancellationToken cancellationToken) cil managed" /> <MemberSignature Language="DocId" Value="M:Azure.Communication.Messages.ConversationThreadClient.GetConversationsAsync(System.Nullable{System.Int32},System.String,System.Nullable{System.Guid},System.Threading.CancellationToken)" /> <MemberSignature Language="VB.NET" Value="Public Overridable Function GetConversationsAsync (Optional maxPageSize As Nullable(Of Integer) = Nothing, Optional participantId As String = Nothing, Optional channelId As Nullable(Of Guid) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of CommunicationConversation)" /> <MemberSignature Language="F#" Value="abstract member GetConversationsAsync : Nullable&lt;int&gt; * string * Nullable&lt;Guid&gt; * System.Threading.CancellationToken -&gt; Azure.AsyncPageable&lt;Azure.Communication.Messages.CommunicationConversation&gt;&#xA;override this.GetConversationsAsync : Nullable&lt;int&gt; * string * Nullable&lt;Guid&gt; * System.Threading.CancellationToken -&gt; Azure.AsyncPageable&lt;Azure.Communication.Messages.CommunicationConversation&gt;" Usage="conversationThreadClient.GetConversationsAsync (maxPageSize, participantId, channelId, cancellationToken)" /> <MemberType>Method</MemberType> <AssemblyInfo> <AssemblyName>Azure.Communication.Messages</AssemblyName> <AssemblyVersion>1.3.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>Azure.AsyncPageable&lt;Azure.Communication.Messages.CommunicationConversation&gt;</ReturnType> </ReturnValue> <Parameters> <Parameter Name="maxPageSize" Type="System.Nullable&lt;System.Int32&gt;" /> <Parameter Name="participantId" Type="System.String" /> <Parameter Name="channelId" Type="System.Nullable&lt;System.Guid&gt;" /> <Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" /> </Parameters> <Docs> <param name="maxPageSize"> Number of objects to return per page. </param> <param name="participantId"> The participant user ID. </param> <param name="channelId"> The id of channel. </param> <param name="cancellationToken"> The cancellation token to use. </param> <summary> Retrieves list of conversations. </summary> <returns>To be added.</returns> <remarks>To be added.</remarks> <example> This sample shows how to call GetConversationsAsync. <code><![CDATA[ Uri endpoint = new Uri("<endpoint>"); TokenCredential credential = new DefaultAzureCredential(); ConversationThreadClient client = new ConversationThreadClient(endpoint, credential); await foreach (CommunicationConversation item in client.GetConversationsAsync()) { } ]]></code> This sample shows how to call GetConversationsAsync with all parameters. <code><![CDATA[ Uri endpoint = new Uri("<endpoint>"); TokenCredential credential = new DefaultAzureCredential(); ConversationThreadClient client = new ConversationThreadClient(endpoint, credential); await foreach (CommunicationConversation item in client.GetConversationsAsync(maxPageSize: 1234, participantId: "<participantId>", channelId: Guid.Parse("73f411fe-4f43-4b4b-9cbd-6828d8f4cf9a"))) { } ]]></code></example> </Docs> </Member> <Member MemberName="GetMessages"> <MemberSignature Language="C#" Value="public virtual Azure.Pageable&lt;BinaryData&gt; GetMessages (string conversationId, int? maxPageSize, string participantId, Azure.RequestContext context);" /> <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.Pageable`1&lt;class System.BinaryData&gt; GetMessages(string conversationId, valuetype System.Nullable`1&lt;int32&gt; maxPageSize, string participantId, class Azure.RequestContext context) cil managed" /> <MemberSignature Language="DocId" Value="M:Azure.Communication.Messages.ConversationThreadClient.GetMessages(System.String,System.Nullable{System.Int32},System.String,Azure.RequestContext)" /> <MemberSignature Language="VB.NET" Value="Public Overridable Function GetMessages (conversationId As String, maxPageSize As Nullable(Of Integer), participantId As String, context As RequestContext) As Pageable(Of BinaryData)" /> <MemberSignature Language="F#" Value="abstract member GetMessages : string * Nullable&lt;int&gt; * string * Azure.RequestContext -&gt; Azure.Pageable&lt;BinaryData&gt;&#xA;override this.GetMessages : string * Nullable&lt;int&gt; * string * Azure.RequestContext -&gt; Azure.Pageable&lt;BinaryData&gt;" Usage="conversationThreadClient.GetMessages (conversationId, maxPageSize, participantId, context)" /> <MemberType>Method</MemberType> <AssemblyInfo> <AssemblyName>Azure.Communication.Messages</AssemblyName> <AssemblyVersion>1.3.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>Azure.Pageable&lt;System.BinaryData&gt;</ReturnType> </ReturnValue> <Parameters> <Parameter Name="conversationId" Type="System.String" /> <Parameter Name="maxPageSize" Type="System.Nullable&lt;System.Int32&gt;" /> <Parameter Name="participantId" Type="System.String" /> <Parameter Name="context" Type="Azure.RequestContext" /> </Parameters> <Docs> <param name="conversationId"> The conversation ID. </param> <param name="maxPageSize"> Number of objects to return per page. </param> <param name="participantId"> The participant user ID. </param> <param name="context"> The request context, which can override default behaviors of the client pipeline on a per-call basis. </param> <summary> [Protocol Method] Retrieves list of conversation messages. <list type="bullet"><item><description> This <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/ProtocolMethods.md">protocol method</see> allows explicit creation of the request and processing of the response for advanced scenarios. </description></item><item><description> Please try the simpler <see cref="M:Azure.Communication.Messages.ConversationThreadClient.GetMessages(System.String,System.Nullable{System.Int32},System.String,System.Threading.CancellationToken)" /> convenience overload with strongly typed models first. </description></item></list></summary> <returns> The <see cref="T:Azure.Pageable`1" /> from the service containing a list of <see cref="T:System.BinaryData" /> objects. Details of the body schema for each item in the collection are in the Remarks section below. </returns> <remarks>To be added.</remarks> <exception cref="T:System.ArgumentNullException"> <paramref name="conversationId" /> is null. </exception> <exception cref="T:System.ArgumentException"> <paramref name="conversationId" /> is an empty string, and was expected to be non-empty. </exception> <exception cref="T:Azure.RequestFailedException"> Service returned a non-success status code. </exception> <example> This sample shows how to call GetMessages and parse the result. <code><![CDATA[ Uri endpoint = new Uri("<endpoint>"); TokenCredential credential = new DefaultAzureCredential(); ConversationThreadClient client = new ConversationThreadClient(endpoint, credential); foreach (BinaryData item in client.GetMessages("<conversationId>", null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("message").GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("senderCommunicationIdentifier").ToString()); Console.WriteLine(result.GetProperty("createdOn").ToString()); } ]]></code> This sample shows how to call GetMessages with all parameters and parse the result. <code><![CDATA[ Uri endpoint = new Uri("<endpoint>"); TokenCredential credential = new DefaultAzureCredential(); ConversationThreadClient client = new ConversationThreadClient(endpoint, credential); foreach (BinaryData item in client.GetMessages("<conversationId>", 1234, "<participantId>", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("sequenceId").ToString()); Console.WriteLine(result.GetProperty("message").GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("senderDisplayName").ToString()); Console.WriteLine(result.GetProperty("senderCommunicationIdentifier").ToString()); Console.WriteLine(result.GetProperty("createdOn").ToString()); } ]]></code></example> </Docs> </Member> <Member MemberName="GetMessages"> <MemberSignature Language="C#" Value="public virtual Azure.Pageable&lt;Azure.Communication.Messages.ConversationMessageItem&gt; GetMessages (string conversationId, int? maxPageSize = default, string participantId = default, System.Threading.CancellationToken cancellationToken = default);" /> <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.Pageable`1&lt;class Azure.Communication.Messages.ConversationMessageItem&gt; GetMessages(string conversationId, valuetype System.Nullable`1&lt;int32&gt; maxPageSize, string participantId, valuetype System.Threading.CancellationToken cancellationToken) cil managed" /> <MemberSignature Language="DocId" Value="M:Azure.Communication.Messages.ConversationThreadClient.GetMessages(System.String,System.Nullable{System.Int32},System.String,System.Threading.CancellationToken)" /> <MemberSignature Language="VB.NET" Value="Public Overridable Function GetMessages (conversationId As String, Optional maxPageSize As Nullable(Of Integer) = Nothing, Optional participantId As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Pageable(Of ConversationMessageItem)" /> <MemberSignature Language="F#" Value="abstract member GetMessages : string * Nullable&lt;int&gt; * string * System.Threading.CancellationToken -&gt; Azure.Pageable&lt;Azure.Communication.Messages.ConversationMessageItem&gt;&#xA;override this.GetMessages : string * Nullable&lt;int&gt; * string * System.Threading.CancellationToken -&gt; Azure.Pageable&lt;Azure.Communication.Messages.ConversationMessageItem&gt;" Usage="conversationThreadClient.GetMessages (conversationId, maxPageSize, participantId, cancellationToken)" /> <MemberType>Method</MemberType> <AssemblyInfo> <AssemblyName>Azure.Communication.Messages</AssemblyName> <AssemblyVersion>1.3.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>Azure.Pageable&lt;Azure.Communication.Messages.ConversationMessageItem&gt;</ReturnType> </ReturnValue> <Parameters> <Parameter Name="conversationId" Type="System.String" /> <Parameter Name="maxPageSize" Type="System.Nullable&lt;System.Int32&gt;" /> <Parameter Name="participantId" Type="System.String" /> <Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" /> </Parameters> <Docs> <param name="conversationId"> The conversation ID. </param> <param name="maxPageSize"> Number of objects to return per page. </param> <param name="participantId"> The participant user ID. </param> <param name="cancellationToken"> The cancellation token to use. </param> <summary> Retrieves list of conversation messages. </summary> <returns>To be added.</returns> <remarks>To be added.</remarks> <exception cref="T:System.ArgumentNullException"> <paramref name="conversationId" /> is null. </exception> <exception cref="T:System.ArgumentException"> <paramref name="conversationId" /> is an empty string, and was expected to be non-empty. </exception> <example> This sample shows how to call GetMessages. <code><![CDATA[ Uri endpoint = new Uri("<endpoint>"); TokenCredential credential = new DefaultAzureCredential(); ConversationThreadClient client = new ConversationThreadClient(endpoint, credential); foreach (ConversationMessageItem item in client.GetMessages("<conversationId>")) { } ]]></code> This sample shows how to call GetMessages with all parameters. <code><![CDATA[ Uri endpoint = new Uri("<endpoint>"); TokenCredential credential = new DefaultAzureCredential(); ConversationThreadClient client = new ConversationThreadClient(endpoint, credential); foreach (ConversationMessageItem item in client.GetMessages("<conversationId>", maxPageSize: 1234, participantId: "<participantId>")) { } ]]></code></example> </Docs> </Member> <Member MemberName="GetMessagesAsync"> <MemberSignature Language="C#" Value="public virtual Azure.AsyncPageable&lt;BinaryData&gt; GetMessagesAsync (string conversationId, int? maxPageSize, string participantId, Azure.RequestContext context);" /> <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.AsyncPageable`1&lt;class System.BinaryData&gt; GetMessagesAsync(string conversationId, valuetype System.Nullable`1&lt;int32&gt; maxPageSize, string participantId, class Azure.RequestContext context) cil managed" /> <MemberSignature Language="DocId" Value="M:Azure.Communication.Messages.ConversationThreadClient.GetMessagesAsync(System.String,System.Nullable{System.Int32},System.String,Azure.RequestContext)" /> <MemberSignature Language="VB.NET" Value="Public Overridable Function GetMessagesAsync (conversationId As String, maxPageSize As Nullable(Of Integer), participantId As String, context As RequestContext) As AsyncPageable(Of BinaryData)" /> <MemberSignature Language="F#" Value="abstract member GetMessagesAsync : string * Nullable&lt;int&gt; * string * Azure.RequestContext -&gt; Azure.AsyncPageable&lt;BinaryData&gt;&#xA;override this.GetMessagesAsync : string * Nullable&lt;int&gt; * string * Azure.RequestContext -&gt; Azure.AsyncPageable&lt;BinaryData&gt;" Usage="conversationThreadClient.GetMessagesAsync (conversationId, maxPageSize, participantId, context)" /> <MemberType>Method</MemberType> <AssemblyInfo> <AssemblyName>Azure.Communication.Messages</AssemblyName> <AssemblyVersion>1.3.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>Azure.AsyncPageable&lt;System.BinaryData&gt;</ReturnType> </ReturnValue> <Parameters> <Parameter Name="conversationId" Type="System.String" /> <Parameter Name="maxPageSize" Type="System.Nullable&lt;System.Int32&gt;" /> <Parameter Name="participantId" Type="System.String" /> <Parameter Name="context" Type="Azure.RequestContext" /> </Parameters> <Docs> <param name="conversationId"> The conversation ID. </param> <param name="maxPageSize"> Number of objects to return per page. </param> <param name="participantId"> The participant user ID. </param> <param name="context"> The request context, which can override default behaviors of the client pipeline on a per-call basis. </param> <summary> [Protocol Method] Retrieves list of conversation messages. <list type="bullet"><item><description> This <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/ProtocolMethods.md">protocol method</see> allows explicit creation of the request and processing of the response for advanced scenarios. </description></item><item><description> Please try the simpler <see cref="M:Azure.Communication.Messages.ConversationThreadClient.GetMessagesAsync(System.String,System.Nullable{System.Int32},System.String,System.Threading.CancellationToken)" /> convenience overload with strongly typed models first. </description></item></list></summary> <returns> The <see cref="T:Azure.AsyncPageable`1" /> from the service containing a list of <see cref="T:System.BinaryData" /> objects. Details of the body schema for each item in the collection are in the Remarks section below. </returns> <remarks>To be added.</remarks> <exception cref="T:System.ArgumentNullException"> <paramref name="conversationId" /> is null. </exception> <exception cref="T:System.ArgumentException"> <paramref name="conversationId" /> is an empty string, and was expected to be non-empty. </exception> <exception cref="T:Azure.RequestFailedException"> Service returned a non-success status code. </exception> <example> This sample shows how to call GetMessagesAsync and parse the result. <code><![CDATA[ Uri endpoint = new Uri("<endpoint>"); TokenCredential credential = new DefaultAzureCredential(); ConversationThreadClient client = new ConversationThreadClient(endpoint, credential); await foreach (BinaryData item in client.GetMessagesAsync("<conversationId>", null, null, null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("message").GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("senderCommunicationIdentifier").ToString()); Console.WriteLine(result.GetProperty("createdOn").ToString()); } ]]></code> This sample shows how to call GetMessagesAsync with all parameters and parse the result. <code><![CDATA[ Uri endpoint = new Uri("<endpoint>"); TokenCredential credential = new DefaultAzureCredential(); ConversationThreadClient client = new ConversationThreadClient(endpoint, credential); await foreach (BinaryData item in client.GetMessagesAsync("<conversationId>", 1234, "<participantId>", null)) { JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; Console.WriteLine(result.GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("sequenceId").ToString()); Console.WriteLine(result.GetProperty("message").GetProperty("kind").ToString()); Console.WriteLine(result.GetProperty("senderDisplayName").ToString()); Console.WriteLine(result.GetProperty("senderCommunicationIdentifier").ToString()); Console.WriteLine(result.GetProperty("createdOn").ToString()); } ]]></code></example> </Docs> </Member> <Member MemberName="GetMessagesAsync"> <MemberSignature Language="C#" Value="public virtual Azure.AsyncPageable&lt;Azure.Communication.Messages.ConversationMessageItem&gt; GetMessagesAsync (string conversationId, int? maxPageSize = default, string participantId = default, System.Threading.CancellationToken cancellationToken = default);" /> <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.AsyncPageable`1&lt;class Azure.Communication.Messages.ConversationMessageItem&gt; GetMessagesAsync(string conversationId, valuetype System.Nullable`1&lt;int32&gt; maxPageSize, string participantId, valuetype System.Threading.CancellationToken cancellationToken) cil managed" /> <MemberSignature Language="DocId" Value="M:Azure.Communication.Messages.ConversationThreadClient.GetMessagesAsync(System.String,System.Nullable{System.Int32},System.String,System.Threading.CancellationToken)" /> <MemberSignature Language="VB.NET" Value="Public Overridable Function GetMessagesAsync (conversationId As String, Optional maxPageSize As Nullable(Of Integer) = Nothing, Optional participantId As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of ConversationMessageItem)" /> <MemberSignature Language="F#" Value="abstract member GetMessagesAsync : string * Nullable&lt;int&gt; * string * System.Threading.CancellationToken -&gt; Azure.AsyncPageable&lt;Azure.Communication.Messages.ConversationMessageItem&gt;&#xA;override this.GetMessagesAsync : string * Nullable&lt;int&gt; * string * System.Threading.CancellationToken -&gt; Azure.AsyncPageable&lt;Azure.Communication.Messages.ConversationMessageItem&gt;" Usage="conversationThreadClient.GetMessagesAsync (conversationId, maxPageSize, participantId, cancellationToken)" /> <MemberType>Method</MemberType> <AssemblyInfo> <AssemblyName>Azure.Communication.Messages</AssemblyName> <AssemblyVersion>1.3.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>Azure.AsyncPageable&lt;Azure.Communication.Messages.ConversationMessageItem&gt;</ReturnType> </ReturnValue> <Parameters> <Parameter Name="conversationId" Type="System.String" /> <Parameter Name="maxPageSize" Type="System.Nullable&lt;System.Int32&gt;" /> <Parameter Name="participantId" Type="System.String" /> <Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" /> </Parameters> <Docs> <param name="conversationId"> The conversation ID. </param> <param name="maxPageSize"> Number of objects to return per page. </param> <param name="participantId"> The participant user ID. </param> <param name="cancellationToken"> The cancellation token to use. </param> <summary> Retrieves list of conversation messages. </summary> <returns>To be added.</returns> <remarks>To be added.</remarks> <exception cref="T:System.ArgumentNullException"> <paramref name="conversationId" /> is null. </exception> <exception cref="T:System.ArgumentException"> <paramref name="conversationId" /> is an empty string, and was expected to be non-empty. </exception> <example> This sample shows how to call GetMessagesAsync. <code><![CDATA[ Uri endpoint = new Uri("<endpoint>"); TokenCredential credential = new DefaultAzureCredential(); ConversationThreadClient client = new ConversationThreadClient(endpoint, credential); await foreach (ConversationMessageItem item in client.GetMessagesAsync("<conversationId>")) { } ]]></code> This sample shows how to call GetMessagesAsync with all parameters. <code><![CDATA[ Uri endpoint = new Uri("<endpoint>"); TokenCredential credential = new DefaultAzureCredential(); ConversationThreadClient client = new ConversationThreadClient(endpoint, credential); await foreach (ConversationMessageItem item in client.GetMessagesAsync("<conversationId>", maxPageSize: 1234, participantId: "<participantId>")) { } ]]></code></example> </Docs> </Member> <Member MemberName="Pipeline"> <MemberSignature Language="C#" Value="public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get; }" /> <MemberSignature Language="ILAsm" Value=".property instance class Azure.Core.Pipeline.HttpPipeline Pipeline" /> <MemberSignature Language="DocId" Value="P:Azure.Communication.Messages.ConversationThreadClient.Pipeline" /> <MemberSignature Language="VB.NET" Value="Public Overridable ReadOnly Property Pipeline As HttpPipeline" /> <MemberSignature Language="F#" Value="member this.Pipeline : Azure.Core.Pipeline.HttpPipeline" Usage="Azure.Communication.Messages.ConversationThreadClient.Pipeline" /> <MemberType>Property</MemberType> <AssemblyInfo> <AssemblyName>Azure.Communication.Messages</AssemblyName> <AssemblyVersion>1.3.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>Azure.Core.Pipeline.HttpPipeline</ReturnType> </ReturnValue> <Docs> <summary> The HTTP pipeline for sending and receiving REST requests and responses. </summary> <value>To be added.</value> <remarks>To be added.</remarks> </Docs> </Member> <Member MemberName="RemoveParticipants"> <MemberSignature Language="C#" Value="public virtual Azure.Response&lt;Azure.Communication.Messages.RemoveParticipantsResult&gt; RemoveParticipants (string conversationId, Azure.Communication.Messages.RemoveParticipantsOptions options, System.Threading.CancellationToken cancellationToken = default);" /> <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.Response`1&lt;class Azure.Communication.Messages.RemoveParticipantsResult&gt; RemoveParticipants(string conversationId, class Azure.Communication.Messages.RemoveParticipantsOptions options, valuetype System.Threading.CancellationToken cancellationToken) cil managed" /> <MemberSignature Language="DocId" Value="M:Azure.Communication.Messages.ConversationThreadClient.RemoveParticipants(System.String,Azure.Communication.Messages.RemoveParticipantsOptions,System.Threading.CancellationToken)" /> <MemberSignature Language="VB.NET" Value="Public Overridable Function RemoveParticipants (conversationId As String, options As RemoveParticipantsOptions, Optional cancellationToken As CancellationToken = Nothing) As Response(Of RemoveParticipantsResult)" /> <MemberSignature Language="F#" Value="abstract member RemoveParticipants : string * Azure.Communication.Messages.RemoveParticipantsOptions * System.Threading.CancellationToken -&gt; Azure.Response&lt;Azure.Communication.Messages.RemoveParticipantsResult&gt;&#xA;override this.RemoveParticipants : string * Azure.Communication.Messages.RemoveParticipantsOptions * System.Threading.CancellationToken -&gt; Azure.Response&lt;Azure.Communication.Messages.RemoveParticipantsResult&gt;" Usage="conversationThreadClient.RemoveParticipants (conversationId, options, cancellationToken)" /> <MemberType>Method</MemberType> <AssemblyInfo> <AssemblyName>Azure.Communication.Messages</AssemblyName> <AssemblyVersion>1.3.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>Azure.Response&lt;Azure.Communication.Messages.RemoveParticipantsResult&gt;</ReturnType> </ReturnValue> <Parameters> <Parameter Name="conversationId" Type="System.String" /> <Parameter Name="options" Type="Azure.Communication.Messages.RemoveParticipantsOptions" /> <Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" /> </Parameters> <Docs> <param name="conversationId"> The conversation ID. </param> <param name="options"> Details of the request body for removing participants from a conversation. </param> <param name="cancellationToken"> The cancellation token to use. </param> <summary> remove a participant from a conversation. </summary> <returns>To be added.</returns> <remarks>To be added.</remarks> <exception cref="T:System.ArgumentNullException"> <paramref name="conversationId" /> or <paramref name="options" /> is null. </exception> <exception cref="T:System.ArgumentException"> <paramref name="conversationId" /> is an empty string, and was expected to be non-empty. </exception> <example> This sample shows how to call RemoveParticipants. <code><![CDATA[ Uri endpoint = new Uri("<endpoint>"); TokenCredential credential = new DefaultAzureCredential(); ConversationThreadClient client = new ConversationThreadClient(endpoint, credential); RemoveParticipantsOptions options = new RemoveParticipantsOptions(new string[] { "<participantIds>" }); Response<RemoveParticipantsResult> response = client.RemoveParticipants("<conversationId>", options); ]]></code> This sample shows how to call RemoveParticipants with all parameters. <code><![CDATA[ Uri endpoint = new Uri("<endpoint>"); TokenCredential credential = new DefaultAzureCredential(); ConversationThreadClient client = new ConversationThreadClient(endpoint, credential); RemoveParticipantsOptions options = new RemoveParticipantsOptions(new string[] { "<participantIds>" }); Response<RemoveParticipantsResult> response = client.RemoveParticipants("<conversationId>", options); ]]></code></example> </Docs> </Member> <Member MemberName="RemoveParticipants"> <MemberSignature Language="C#" Value="public virtual Azure.Response RemoveParticipants (string conversationId, Azure.Core.RequestContent content, Azure.RequestContext context = default);" /> <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.Response RemoveParticipants(string conversationId, class Azure.Core.RequestContent content, class Azure.RequestContext context) cil managed" /> <MemberSignature Language="DocId" Value="M:Azure.Communication.Messages.ConversationThreadClient.RemoveParticipants(System.String,Azure.Core.RequestContent,Azure.RequestContext)" /> <MemberSignature Language="VB.NET" Value="Public Overridable Function RemoveParticipants (conversationId As String, content As RequestContent, Optional context As RequestContext = Nothing) As Response" /> <MemberSignature Language="F#" Value="abstract member RemoveParticipants : string * Azure.Core.RequestContent * Azure.RequestContext -&gt; Azure.Response&#xA;override this.RemoveParticipants : string * Azure.Core.RequestContent * Azure.RequestContext -&gt; Azure.Response" Usage="conversationThreadClient.RemoveParticipants (conversationId, content, context)" /> <MemberType>Method</MemberType> <AssemblyInfo> <AssemblyName>Azure.Communication.Messages</AssemblyName> <AssemblyVersion>1.3.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>Azure.Response</ReturnType> </ReturnValue> <Parameters> <Parameter Name="conversationId" Type="System.String" /> <Parameter Name="content" Type="Azure.Core.RequestContent" /> <Parameter Name="context" Type="Azure.RequestContext" /> </Parameters> <Docs> <param name="conversationId"> The conversation ID. </param> <param name="content"> The content to send as the body of the request. </param> <param name="context"> The request context, which can override default behaviors of the client pipeline on a per-call basis. </param> <summary> [Protocol Method] remove a participant from a conversation <list type="bullet"><item><description> This <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/ProtocolMethods.md">protocol method</see> allows explicit creation of the request and processing of the response for advanced scenarios. </description></item><item><description> Please try the simpler <see cref="M:Azure.Communication.Messages.ConversationThreadClient.RemoveParticipants(System.String,Azure.Communication.Messages.RemoveParticipantsOptions,System.Threading.CancellationToken)" /> convenience overload with strongly typed models first. </description></item></list></summary> <returns> The response returned from the service. </returns> <remarks>To be added.</remarks> <exception cref="T:System.ArgumentNullException"> <paramref name="conversationId" /> or <paramref name="content" /> is null. </exception> <exception cref="T:System.ArgumentException"> <paramref name="conversationId" /> is an empty string, and was expected to be non-empty. </exception> <exception cref="T:Azure.RequestFailedException"> Service returned a non-success status code. </exception> <example> This sample shows how to call RemoveParticipants and parse the result. <code><![CDATA[ Uri endpoint = new Uri("<endpoint>"); TokenCredential credential = new DefaultAzureCredential(); ConversationThreadClient client = new ConversationThreadClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { participantIds = new object[] { "<participantIds>" }, }); Response response = client.RemoveParticipants("<conversationId>", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("invalidParticipants")[0].GetProperty("id").ToString()); ]]></code> This sample shows how to call RemoveParticipants with all parameters and request content and parse the result. <code><![CDATA[ Uri endpoint = new Uri("<endpoint>"); TokenCredential credential = new DefaultAzureCredential(); ConversationThreadClient client = new ConversationThreadClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { participantIds = new object[] { "<participantIds>" }, }); Response response = client.RemoveParticipants("<conversationId>", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("invalidParticipants")[0].GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("invalidParticipants")[0].GetProperty("error").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("invalidParticipants")[0].GetProperty("error").GetProperty("message").ToString()); Console.WriteLine(result.GetProperty("invalidParticipants")[0].GetProperty("error").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("invalidParticipants")[0].GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); ]]></code></example> </Docs> </Member> <Member MemberName="RemoveParticipantsAsync"> <MemberSignature Language="C#" Value="public virtual System.Threading.Tasks.Task&lt;Azure.Response&lt;Azure.Communication.Messages.RemoveParticipantsResult&gt;&gt; RemoveParticipantsAsync (string conversationId, Azure.Communication.Messages.RemoveParticipantsOptions options, System.Threading.CancellationToken cancellationToken = default);" /> <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1&lt;class Azure.Response`1&lt;class Azure.Communication.Messages.RemoveParticipantsResult&gt;&gt; RemoveParticipantsAsync(string conversationId, class Azure.Communication.Messages.RemoveParticipantsOptions options, valuetype System.Threading.CancellationToken cancellationToken) cil managed" /> <MemberSignature Language="DocId" Value="M:Azure.Communication.Messages.ConversationThreadClient.RemoveParticipantsAsync(System.String,Azure.Communication.Messages.RemoveParticipantsOptions,System.Threading.CancellationToken)" /> <MemberSignature Language="VB.NET" Value="Public Overridable Function RemoveParticipantsAsync (conversationId As String, options As RemoveParticipantsOptions, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of RemoveParticipantsResult))" /> <MemberSignature Language="F#" Value="abstract member RemoveParticipantsAsync : string * Azure.Communication.Messages.RemoveParticipantsOptions * System.Threading.CancellationToken -&gt; System.Threading.Tasks.Task&lt;Azure.Response&lt;Azure.Communication.Messages.RemoveParticipantsResult&gt;&gt;&#xA;override this.RemoveParticipantsAsync : string * Azure.Communication.Messages.RemoveParticipantsOptions * System.Threading.CancellationToken -&gt; System.Threading.Tasks.Task&lt;Azure.Response&lt;Azure.Communication.Messages.RemoveParticipantsResult&gt;&gt;" Usage="conversationThreadClient.RemoveParticipantsAsync (conversationId, options, cancellationToken)" /> <MemberType>Method</MemberType> <AssemblyInfo> <AssemblyName>Azure.Communication.Messages</AssemblyName> <AssemblyVersion>1.3.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>System.Threading.Tasks.Task&lt;Azure.Response&lt;Azure.Communication.Messages.RemoveParticipantsResult&gt;&gt;</ReturnType> </ReturnValue> <Parameters> <Parameter Name="conversationId" Type="System.String" /> <Parameter Name="options" Type="Azure.Communication.Messages.RemoveParticipantsOptions" /> <Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" /> </Parameters> <Docs> <param name="conversationId"> The conversation ID. </param> <param name="options"> Details of the request body for removing participants from a conversation. </param> <param name="cancellationToken"> The cancellation token to use. </param> <summary> remove a participant from a conversation. </summary> <returns>To be added.</returns> <remarks>To be added.</remarks> <exception cref="T:System.ArgumentNullException"> <paramref name="conversationId" /> or <paramref name="options" /> is null. </exception> <exception cref="T:System.ArgumentException"> <paramref name="conversationId" /> is an empty string, and was expected to be non-empty. </exception> <example> This sample shows how to call RemoveParticipantsAsync. <code><![CDATA[ Uri endpoint = new Uri("<endpoint>"); TokenCredential credential = new DefaultAzureCredential(); ConversationThreadClient client = new ConversationThreadClient(endpoint, credential); RemoveParticipantsOptions options = new RemoveParticipantsOptions(new string[] { "<participantIds>" }); Response<RemoveParticipantsResult> response = await client.RemoveParticipantsAsync("<conversationId>", options); ]]></code> This sample shows how to call RemoveParticipantsAsync with all parameters. <code><![CDATA[ Uri endpoint = new Uri("<endpoint>"); TokenCredential credential = new DefaultAzureCredential(); ConversationThreadClient client = new ConversationThreadClient(endpoint, credential); RemoveParticipantsOptions options = new RemoveParticipantsOptions(new string[] { "<participantIds>" }); Response<RemoveParticipantsResult> response = await client.RemoveParticipantsAsync("<conversationId>", options); ]]></code></example> </Docs> </Member> <Member MemberName="RemoveParticipantsAsync"> <MemberSignature Language="C#" Value="public virtual System.Threading.Tasks.Task&lt;Azure.Response&gt; RemoveParticipantsAsync (string conversationId, Azure.Core.RequestContent content, Azure.RequestContext context = default);" /> <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1&lt;class Azure.Response&gt; RemoveParticipantsAsync(string conversationId, class Azure.Core.RequestContent content, class Azure.RequestContext context) cil managed" /> <MemberSignature Language="DocId" Value="M:Azure.Communication.Messages.ConversationThreadClient.RemoveParticipantsAsync(System.String,Azure.Core.RequestContent,Azure.RequestContext)" /> <MemberSignature Language="VB.NET" Value="Public Overridable Function RemoveParticipantsAsync (conversationId As String, content As RequestContent, Optional context As RequestContext = Nothing) As Task(Of Response)" /> <MemberSignature Language="F#" Value="abstract member RemoveParticipantsAsync : string * Azure.Core.RequestContent * Azure.RequestContext -&gt; System.Threading.Tasks.Task&lt;Azure.Response&gt;&#xA;override this.RemoveParticipantsAsync : string * Azure.Core.RequestContent * Azure.RequestContext -&gt; System.Threading.Tasks.Task&lt;Azure.Response&gt;" Usage="conversationThreadClient.RemoveParticipantsAsync (conversationId, content, context)" /> <MemberType>Method</MemberType> <AssemblyInfo> <AssemblyName>Azure.Communication.Messages</AssemblyName> <AssemblyVersion>1.3.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>System.Threading.Tasks.Task&lt;Azure.Response&gt;</ReturnType> </ReturnValue> <Parameters> <Parameter Name="conversationId" Type="System.String" /> <Parameter Name="content" Type="Azure.Core.RequestContent" /> <Parameter Name="context" Type="Azure.RequestContext" /> </Parameters> <Docs> <param name="conversationId"> The conversation ID. </param> <param name="content"> The content to send as the body of the request. </param> <param name="context"> The request context, which can override default behaviors of the client pipeline on a per-call basis. </param> <summary> [Protocol Method] remove a participant from a conversation <list type="bullet"><item><description> This <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/ProtocolMethods.md">protocol method</see> allows explicit creation of the request and processing of the response for advanced scenarios. </description></item><item><description> Please try the simpler <see cref="M:Azure.Communication.Messages.ConversationThreadClient.RemoveParticipantsAsync(System.String,Azure.Communication.Messages.RemoveParticipantsOptions,System.Threading.CancellationToken)" /> convenience overload with strongly typed models first. </description></item></list></summary> <returns> The response returned from the service. </returns> <remarks>To be added.</remarks> <exception cref="T:System.ArgumentNullException"> <paramref name="conversationId" /> or <paramref name="content" /> is null. </exception> <exception cref="T:System.ArgumentException"> <paramref name="conversationId" /> is an empty string, and was expected to be non-empty. </exception> <exception cref="T:Azure.RequestFailedException"> Service returned a non-success status code. </exception> <example> This sample shows how to call RemoveParticipantsAsync and parse the result. <code><![CDATA[ Uri endpoint = new Uri("<endpoint>"); TokenCredential credential = new DefaultAzureCredential(); ConversationThreadClient client = new ConversationThreadClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { participantIds = new object[] { "<participantIds>" }, }); Response response = await client.RemoveParticipantsAsync("<conversationId>", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("invalidParticipants")[0].GetProperty("id").ToString()); ]]></code> This sample shows how to call RemoveParticipantsAsync with all parameters and request content and parse the result. <code><![CDATA[ Uri endpoint = new Uri("<endpoint>"); TokenCredential credential = new DefaultAzureCredential(); ConversationThreadClient client = new ConversationThreadClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { participantIds = new object[] { "<participantIds>" }, }); Response response = await client.RemoveParticipantsAsync("<conversationId>", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("invalidParticipants")[0].GetProperty("id").ToString()); Console.WriteLine(result.GetProperty("invalidParticipants")[0].GetProperty("error").GetProperty("code").ToString()); Console.WriteLine(result.GetProperty("invalidParticipants")[0].GetProperty("error").GetProperty("message").ToString()); Console.WriteLine(result.GetProperty("invalidParticipants")[0].GetProperty("error").GetProperty("target").ToString()); Console.WriteLine(result.GetProperty("invalidParticipants")[0].GetProperty("error").GetProperty("innererror").GetProperty("code").ToString()); ]]></code></example> </Docs> </Member> <Member MemberName="SendMessage"> <MemberSignature Language="C#" Value="public virtual Azure.Response&lt;Azure.Communication.Messages.SendConversationMessageResult&gt; SendMessage (string conversationId, Azure.Communication.Messages.SendConversationMessageOptions options, System.Threading.CancellationToken cancellationToken = default);" /> <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.Response`1&lt;class Azure.Communication.Messages.SendConversationMessageResult&gt; SendMessage(string conversationId, class Azure.Communication.Messages.SendConversationMessageOptions options, valuetype System.Threading.CancellationToken cancellationToken) cil managed" /> <MemberSignature Language="DocId" Value="M:Azure.Communication.Messages.ConversationThreadClient.SendMessage(System.String,Azure.Communication.Messages.SendConversationMessageOptions,System.Threading.CancellationToken)" /> <MemberSignature Language="VB.NET" Value="Public Overridable Function SendMessage (conversationId As String, options As SendConversationMessageOptions, Optional cancellationToken As CancellationToken = Nothing) As Response(Of SendConversationMessageResult)" /> <MemberSignature Language="F#" Value="abstract member SendMessage : string * Azure.Communication.Messages.SendConversationMessageOptions * System.Threading.CancellationToken -&gt; Azure.Response&lt;Azure.Communication.Messages.SendConversationMessageResult&gt;&#xA;override this.SendMessage : string * Azure.Communication.Messages.SendConversationMessageOptions * System.Threading.CancellationToken -&gt; Azure.Response&lt;Azure.Communication.Messages.SendConversationMessageResult&gt;" Usage="conversationThreadClient.SendMessage (conversationId, options, cancellationToken)" /> <MemberType>Method</MemberType> <AssemblyInfo> <AssemblyName>Azure.Communication.Messages</AssemblyName> <AssemblyVersion>1.3.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>Azure.Response&lt;Azure.Communication.Messages.SendConversationMessageResult&gt;</ReturnType> </ReturnValue> <Parameters> <Parameter Name="conversationId" Type="System.String" /> <Parameter Name="options" Type="Azure.Communication.Messages.SendConversationMessageOptions" /> <Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" /> </Parameters> <Docs> <param name="conversationId"> The conversation ID. </param> <param name="options"> Details of the conversation message to send. </param> <param name="cancellationToken"> The cancellation token to use. </param> <summary> Sends a conversation message from Business to User. </summary> <returns>To be added.</returns> <remarks>To be added.</remarks> <exception cref="T:System.ArgumentNullException"> <paramref name="conversationId" /> or <paramref name="options" /> is null. </exception> <exception cref="T:System.ArgumentException"> <paramref name="conversationId" /> is an empty string, and was expected to be non-empty. </exception> <example> This sample shows how to call SendMessage. <code><![CDATA[ Uri endpoint = new Uri("<endpoint>"); TokenCredential credential = new DefaultAzureCredential(); ConversationThreadClient client = new ConversationThreadClient(endpoint, credential); SendConversationMessageOptions options = new SendConversationMessageOptions(new TextConversationMessageContent("<content>")); Response<SendConversationMessageResult> response = client.SendMessage("<conversationId>", options); ]]></code> This sample shows how to call SendMessage with all parameters. <code><![CDATA[ Uri endpoint = new Uri("<endpoint>"); TokenCredential credential = new DefaultAzureCredential(); ConversationThreadClient client = new ConversationThreadClient(endpoint, credential); SendConversationMessageOptions options = new SendConversationMessageOptions(new TextConversationMessageContent("<content>")) { OutboundDeliveryStrategy = OutboundDeliveryStrategyKind.InternalOnly, }; Response<SendConversationMessageResult> response = client.SendMessage("<conversationId>", options); ]]></code></example> </Docs> </Member> <Member MemberName="SendMessage"> <MemberSignature Language="C#" Value="public virtual Azure.Response SendMessage (string conversationId, Azure.Core.RequestContent content, Azure.RequestContext context = default);" /> <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class Azure.Response SendMessage(string conversationId, class Azure.Core.RequestContent content, class Azure.RequestContext context) cil managed" /> <MemberSignature Language="DocId" Value="M:Azure.Communication.Messages.ConversationThreadClient.SendMessage(System.String,Azure.Core.RequestContent,Azure.RequestContext)" /> <MemberSignature Language="VB.NET" Value="Public Overridable Function SendMessage (conversationId As String, content As RequestContent, Optional context As RequestContext = Nothing) As Response" /> <MemberSignature Language="F#" Value="abstract member SendMessage : string * Azure.Core.RequestContent * Azure.RequestContext -&gt; Azure.Response&#xA;override this.SendMessage : string * Azure.Core.RequestContent * Azure.RequestContext -&gt; Azure.Response" Usage="conversationThreadClient.SendMessage (conversationId, content, context)" /> <MemberType>Method</MemberType> <AssemblyInfo> <AssemblyName>Azure.Communication.Messages</AssemblyName> <AssemblyVersion>1.3.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>Azure.Response</ReturnType> </ReturnValue> <Parameters> <Parameter Name="conversationId" Type="System.String" /> <Parameter Name="content" Type="Azure.Core.RequestContent" /> <Parameter Name="context" Type="Azure.RequestContext" /> </Parameters> <Docs> <param name="conversationId"> The conversation ID. </param> <param name="content"> The content to send as the body of the request. </param> <param name="context"> The request context, which can override default behaviors of the client pipeline on a per-call basis. </param> <summary> [Protocol Method] Sends a conversation message from Business to User. <list type="bullet"><item><description> This <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/ProtocolMethods.md">protocol method</see> allows explicit creation of the request and processing of the response for advanced scenarios. </description></item><item><description> Please try the simpler <see cref="M:Azure.Communication.Messages.ConversationThreadClient.SendMessage(System.String,Azure.Communication.Messages.SendConversationMessageOptions,System.Threading.CancellationToken)" /> convenience overload with strongly typed models first. </description></item></list></summary> <returns> The response returned from the service. </returns> <remarks>To be added.</remarks> <exception cref="T:System.ArgumentNullException"> <paramref name="conversationId" /> or <paramref name="content" /> is null. </exception> <exception cref="T:System.ArgumentException"> <paramref name="conversationId" /> is an empty string, and was expected to be non-empty. </exception> <exception cref="T:Azure.RequestFailedException"> Service returned a non-success status code. </exception> <example> This sample shows how to call SendMessage and parse the result. <code><![CDATA[ Uri endpoint = new Uri("<endpoint>"); TokenCredential credential = new DefaultAzureCredential(); ConversationThreadClient client = new ConversationThreadClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { request = new { kind = "text", content = "<content>", }, }); Response response = client.SendMessage("<conversationId>", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("messageId").ToString()); ]]></code> This sample shows how to call SendMessage with all parameters and request content and parse the result. <code><![CDATA[ Uri endpoint = new Uri("<endpoint>"); TokenCredential credential = new DefaultAzureCredential(); ConversationThreadClient client = new ConversationThreadClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { request = new { kind = "text", content = "<content>", }, outboundDeliveryStrategy = "internalOnly", }); Response response = client.SendMessage("<conversationId>", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("messageId").ToString()); ]]></code></example> </Docs> </Member> <Member MemberName="SendMessageAsync"> <MemberSignature Language="C#" Value="public virtual System.Threading.Tasks.Task&lt;Azure.Response&lt;Azure.Communication.Messages.SendConversationMessageResult&gt;&gt; SendMessageAsync (string conversationId, Azure.Communication.Messages.SendConversationMessageOptions options, System.Threading.CancellationToken cancellationToken = default);" /> <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1&lt;class Azure.Response`1&lt;class Azure.Communication.Messages.SendConversationMessageResult&gt;&gt; SendMessageAsync(string conversationId, class Azure.Communication.Messages.SendConversationMessageOptions options, valuetype System.Threading.CancellationToken cancellationToken) cil managed" /> <MemberSignature Language="DocId" Value="M:Azure.Communication.Messages.ConversationThreadClient.SendMessageAsync(System.String,Azure.Communication.Messages.SendConversationMessageOptions,System.Threading.CancellationToken)" /> <MemberSignature Language="VB.NET" Value="Public Overridable Function SendMessageAsync (conversationId As String, options As SendConversationMessageOptions, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of SendConversationMessageResult))" /> <MemberSignature Language="F#" Value="abstract member SendMessageAsync : string * Azure.Communication.Messages.SendConversationMessageOptions * System.Threading.CancellationToken -&gt; System.Threading.Tasks.Task&lt;Azure.Response&lt;Azure.Communication.Messages.SendConversationMessageResult&gt;&gt;&#xA;override this.SendMessageAsync : string * Azure.Communication.Messages.SendConversationMessageOptions * System.Threading.CancellationToken -&gt; System.Threading.Tasks.Task&lt;Azure.Response&lt;Azure.Communication.Messages.SendConversationMessageResult&gt;&gt;" Usage="conversationThreadClient.SendMessageAsync (conversationId, options, cancellationToken)" /> <MemberType>Method</MemberType> <AssemblyInfo> <AssemblyName>Azure.Communication.Messages</AssemblyName> <AssemblyVersion>1.3.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>System.Threading.Tasks.Task&lt;Azure.Response&lt;Azure.Communication.Messages.SendConversationMessageResult&gt;&gt;</ReturnType> </ReturnValue> <Parameters> <Parameter Name="conversationId" Type="System.String" /> <Parameter Name="options" Type="Azure.Communication.Messages.SendConversationMessageOptions" /> <Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" /> </Parameters> <Docs> <param name="conversationId"> The conversation ID. </param> <param name="options"> Details of the conversation message to send. </param> <param name="cancellationToken"> The cancellation token to use. </param> <summary> Sends a conversation message from Business to User. </summary> <returns>To be added.</returns> <remarks>To be added.</remarks> <exception cref="T:System.ArgumentNullException"> <paramref name="conversationId" /> or <paramref name="options" /> is null. </exception> <exception cref="T:System.ArgumentException"> <paramref name="conversationId" /> is an empty string, and was expected to be non-empty. </exception> <example> This sample shows how to call SendMessageAsync. <code><![CDATA[ Uri endpoint = new Uri("<endpoint>"); TokenCredential credential = new DefaultAzureCredential(); ConversationThreadClient client = new ConversationThreadClient(endpoint, credential); SendConversationMessageOptions options = new SendConversationMessageOptions(new TextConversationMessageContent("<content>")); Response<SendConversationMessageResult> response = await client.SendMessageAsync("<conversationId>", options); ]]></code> This sample shows how to call SendMessageAsync with all parameters. <code><![CDATA[ Uri endpoint = new Uri("<endpoint>"); TokenCredential credential = new DefaultAzureCredential(); ConversationThreadClient client = new ConversationThreadClient(endpoint, credential); SendConversationMessageOptions options = new SendConversationMessageOptions(new TextConversationMessageContent("<content>")) { OutboundDeliveryStrategy = OutboundDeliveryStrategyKind.InternalOnly, }; Response<SendConversationMessageResult> response = await client.SendMessageAsync("<conversationId>", options); ]]></code></example> </Docs> </Member> <Member MemberName="SendMessageAsync"> <MemberSignature Language="C#" Value="public virtual System.Threading.Tasks.Task&lt;Azure.Response&gt; SendMessageAsync (string conversationId, Azure.Core.RequestContent content, Azure.RequestContext context = default);" /> <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Threading.Tasks.Task`1&lt;class Azure.Response&gt; SendMessageAsync(string conversationId, class Azure.Core.RequestContent content, class Azure.RequestContext context) cil managed" /> <MemberSignature Language="DocId" Value="M:Azure.Communication.Messages.ConversationThreadClient.SendMessageAsync(System.String,Azure.Core.RequestContent,Azure.RequestContext)" /> <MemberSignature Language="VB.NET" Value="Public Overridable Function SendMessageAsync (conversationId As String, content As RequestContent, Optional context As RequestContext = Nothing) As Task(Of Response)" /> <MemberSignature Language="F#" Value="abstract member SendMessageAsync : string * Azure.Core.RequestContent * Azure.RequestContext -&gt; System.Threading.Tasks.Task&lt;Azure.Response&gt;&#xA;override this.SendMessageAsync : string * Azure.Core.RequestContent * Azure.RequestContext -&gt; System.Threading.Tasks.Task&lt;Azure.Response&gt;" Usage="conversationThreadClient.SendMessageAsync (conversationId, content, context)" /> <MemberType>Method</MemberType> <AssemblyInfo> <AssemblyName>Azure.Communication.Messages</AssemblyName> <AssemblyVersion>1.3.0.0</AssemblyVersion> </AssemblyInfo> <ReturnValue> <ReturnType>System.Threading.Tasks.Task&lt;Azure.Response&gt;</ReturnType> </ReturnValue> <Parameters> <Parameter Name="conversationId" Type="System.String" /> <Parameter Name="content" Type="Azure.Core.RequestContent" /> <Parameter Name="context" Type="Azure.RequestContext" /> </Parameters> <Docs> <param name="conversationId"> The conversation ID. </param> <param name="content"> The content to send as the body of the request. </param> <param name="context"> The request context, which can override default behaviors of the client pipeline on a per-call basis. </param> <summary> [Protocol Method] Sends a conversation message from Business to User. <list type="bullet"><item><description> This <see href="https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/ProtocolMethods.md">protocol method</see> allows explicit creation of the request and processing of the response for advanced scenarios. </description></item><item><description> Please try the simpler <see cref="M:Azure.Communication.Messages.ConversationThreadClient.SendMessageAsync(System.String,Azure.Communication.Messages.SendConversationMessageOptions,System.Threading.CancellationToken)" /> convenience overload with strongly typed models first. </description></item></list></summary> <returns> The response returned from the service. </returns> <remarks>To be added.</remarks> <exception cref="T:System.ArgumentNullException"> <paramref name="conversationId" /> or <paramref name="content" /> is null. </exception> <exception cref="T:System.ArgumentException"> <paramref name="conversationId" /> is an empty string, and was expected to be non-empty. </exception> <exception cref="T:Azure.RequestFailedException"> Service returned a non-success status code. </exception> <example> This sample shows how to call SendMessageAsync and parse the result. <code><![CDATA[ Uri endpoint = new Uri("<endpoint>"); TokenCredential credential = new DefaultAzureCredential(); ConversationThreadClient client = new ConversationThreadClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { request = new { kind = "text", content = "<content>", }, }); Response response = await client.SendMessageAsync("<conversationId>", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("messageId").ToString()); ]]></code> This sample shows how to call SendMessageAsync with all parameters and request content and parse the result. <code><![CDATA[ Uri endpoint = new Uri("<endpoint>"); TokenCredential credential = new DefaultAzureCredential(); ConversationThreadClient client = new ConversationThreadClient(endpoint, credential); using RequestContent content = RequestContent.Create(new { request = new { kind = "text", content = "<content>", }, outboundDeliveryStrategy = "internalOnly", }); Response response = await client.SendMessageAsync("<conversationId>", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("messageId").ToString()); ]]></code></example> </Docs> </Member> </Members> </Type>