/// <summary>Snippet for SuggestFaqAnswers</summary> public void SuggestFaqAnswersResourceNames() { // Snippet: SuggestFaqAnswers(ParticipantName, CallSettings) // Create client ParticipantsClient participantsClient = ParticipantsClient.Create(); // Initialize request argument(s) ParticipantName parent = ParticipantName.FromProjectConversationParticipant("[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]"); // Make the request SuggestFaqAnswersResponse response = participantsClient.SuggestFaqAnswers(parent); // End snippet }
/// <summary>Snippet for GetParticipant</summary> public void GetParticipant() { // Snippet: GetParticipant(string, CallSettings) // Create client ParticipantsClient participantsClient = ParticipantsClient.Create(); // Initialize request argument(s) string name = "projects/[PROJECT]/conversations/[CONVERSATION]/participants/[PARTICIPANT]"; // Make the request Participant response = participantsClient.GetParticipant(name); // End snippet }
/// <summary>Snippet for GetParticipant</summary> public void GetParticipantResourceNames() { // Snippet: GetParticipant(ParticipantName, CallSettings) // Create client ParticipantsClient participantsClient = ParticipantsClient.Create(); // Initialize request argument(s) ParticipantName name = ParticipantName.FromProjectConversationParticipant("[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]"); // Make the request Participant response = participantsClient.GetParticipant(name); // End snippet }
/// <summary>Snippet for SuggestFaqAnswers</summary> public void SuggestFaqAnswers() { // Snippet: SuggestFaqAnswers(string, CallSettings) // Create client ParticipantsClient participantsClient = ParticipantsClient.Create(); // Initialize request argument(s) string parent = "projects/[PROJECT]/conversations/[CONVERSATION]/participants/[PARTICIPANT]"; // Make the request SuggestFaqAnswersResponse response = participantsClient.SuggestFaqAnswers(parent); // End snippet }
/// <summary>Snippet for AnalyzeContent</summary> public void AnalyzeContent2ResourceNames() { // Snippet: AnalyzeContent(ParticipantName, EventInput, CallSettings) // Create client ParticipantsClient participantsClient = ParticipantsClient.Create(); // Initialize request argument(s) ParticipantName participant = ParticipantName.FromProjectConversationParticipant("[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]"); EventInput eventInput = new EventInput(); // Make the request AnalyzeContentResponse response = participantsClient.AnalyzeContent(participant, eventInput); // End snippet }
/// <summary>Snippet for CreateParticipant</summary> public void CreateParticipantResourceNames() { // Snippet: CreateParticipant(ConversationName, Participant, CallSettings) // Create client ParticipantsClient participantsClient = ParticipantsClient.Create(); // Initialize request argument(s) ConversationName parent = ConversationName.FromProjectConversation("[PROJECT]", "[CONVERSATION]"); Participant participant = new Participant(); // Make the request Participant response = participantsClient.CreateParticipant(parent, participant); // End snippet }
/// <summary>Snippet for AnalyzeContent</summary> public void AnalyzeContent2() { // Snippet: AnalyzeContent(string, EventInput, CallSettings) // Create client ParticipantsClient participantsClient = ParticipantsClient.Create(); // Initialize request argument(s) string participant = "projects/[PROJECT]/conversations/[CONVERSATION]/participants/[PARTICIPANT]"; EventInput eventInput = new EventInput(); // Make the request AnalyzeContentResponse response = participantsClient.AnalyzeContent(participant, eventInput); // End snippet }
/// <summary>Snippet for UpdateParticipant</summary> public void UpdateParticipant() { // Snippet: UpdateParticipant(Participant, FieldMask, CallSettings) // Create client ParticipantsClient participantsClient = ParticipantsClient.Create(); // Initialize request argument(s) Participant participant = new Participant(); FieldMask updateMask = new FieldMask(); // Make the request Participant response = participantsClient.UpdateParticipant(participant, updateMask); // End snippet }
/// <summary>Snippet for CreateParticipant</summary> public void CreateParticipant() { // Snippet: CreateParticipant(string, Participant, CallSettings) // Create client ParticipantsClient participantsClient = ParticipantsClient.Create(); // Initialize request argument(s) string parent = "projects/[PROJECT]/conversations/[CONVERSATION]"; Participant participant = new Participant(); // Make the request Participant response = participantsClient.CreateParticipant(parent, participant); // End snippet }
/// <summary>Snippet for GetParticipant</summary> public void GetParticipantRequestObject() { // Snippet: GetParticipant(GetParticipantRequest, CallSettings) // Create client ParticipantsClient participantsClient = ParticipantsClient.Create(); // Initialize request argument(s) GetParticipantRequest request = new GetParticipantRequest { ParticipantName = ParticipantName.FromProjectConversationParticipant("[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]"), }; // Make the request Participant response = participantsClient.GetParticipant(request); // End snippet }
/// <summary>Snippet for SuggestFaqAnswersAsync</summary> public async Task SuggestFaqAnswersResourceNamesAsync() { // Snippet: SuggestFaqAnswersAsync(ParticipantName, CallSettings) // Additional: SuggestFaqAnswersAsync(ParticipantName, CancellationToken) // Create client ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync(); // Initialize request argument(s) ParticipantName parent = ParticipantName.FromProjectConversationParticipant("[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]"); // Make the request SuggestFaqAnswersResponse response = await participantsClient.SuggestFaqAnswersAsync(parent); // End snippet }
/// <summary>Snippet for SuggestFaqAnswersAsync</summary> public async Task SuggestFaqAnswersAsync() { // Snippet: SuggestFaqAnswersAsync(string, CallSettings) // Additional: SuggestFaqAnswersAsync(string, CancellationToken) // Create client ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync(); // Initialize request argument(s) string parent = "projects/[PROJECT]/conversations/[CONVERSATION]/participants/[PARTICIPANT]"; // Make the request SuggestFaqAnswersResponse response = await participantsClient.SuggestFaqAnswersAsync(parent); // End snippet }
/// <summary>Snippet for GetParticipantAsync</summary> public async Task GetParticipantAsync() { // Snippet: GetParticipantAsync(string, CallSettings) // Additional: GetParticipantAsync(string, CancellationToken) // Create client ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync(); // Initialize request argument(s) string name = "projects/[PROJECT]/conversations/[CONVERSATION]/participants/[PARTICIPANT]"; // Make the request Participant response = await participantsClient.GetParticipantAsync(name); // End snippet }
/// <summary>Snippet for UpdateParticipant</summary> public void UpdateParticipantRequestObject() { // Snippet: UpdateParticipant(UpdateParticipantRequest, CallSettings) // Create client ParticipantsClient participantsClient = ParticipantsClient.Create(); // Initialize request argument(s) UpdateParticipantRequest request = new UpdateParticipantRequest { Participant = new Participant(), UpdateMask = new FieldMask(), }; // Make the request Participant response = participantsClient.UpdateParticipant(request); // End snippet }
/// <summary>Snippet for AnalyzeContentAsync</summary> public async Task AnalyzeContent2Async() { // Snippet: AnalyzeContentAsync(string, EventInput, CallSettings) // Additional: AnalyzeContentAsync(string, EventInput, CancellationToken) // Create client ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync(); // Initialize request argument(s) string participant = "projects/[PROJECT]/conversations/[CONVERSATION]/participants/[PARTICIPANT]"; EventInput eventInput = new EventInput(); // Make the request AnalyzeContentResponse response = await participantsClient.AnalyzeContentAsync(participant, eventInput); // End snippet }
/// <summary>Snippet for UpdateParticipantAsync</summary> public async Task UpdateParticipantAsync() { // Snippet: UpdateParticipantAsync(Participant, FieldMask, CallSettings) // Additional: UpdateParticipantAsync(Participant, FieldMask, CancellationToken) // Create client ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync(); // Initialize request argument(s) Participant participant = new Participant(); FieldMask updateMask = new FieldMask(); // Make the request Participant response = await participantsClient.UpdateParticipantAsync(participant, updateMask); // End snippet }
/// <summary>Snippet for AnalyzeContentAsync</summary> public async Task AnalyzeContent2ResourceNamesAsync() { // Snippet: AnalyzeContentAsync(ParticipantName, EventInput, CallSettings) // Additional: AnalyzeContentAsync(ParticipantName, EventInput, CancellationToken) // Create client ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync(); // Initialize request argument(s) ParticipantName participant = ParticipantName.FromProjectConversationParticipant("[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]"); EventInput eventInput = new EventInput(); // Make the request AnalyzeContentResponse response = await participantsClient.AnalyzeContentAsync(participant, eventInput); // End snippet }
/// <summary>Snippet for CreateParticipant</summary> public void CreateParticipantRequestObject() { // Snippet: CreateParticipant(CreateParticipantRequest, CallSettings) // Create client ParticipantsClient participantsClient = ParticipantsClient.Create(); // Initialize request argument(s) CreateParticipantRequest request = new CreateParticipantRequest { ParentAsConversationName = ConversationName.FromProjectConversation("[PROJECT]", "[CONVERSATION]"), Participant = new Participant(), }; // Make the request Participant response = participantsClient.CreateParticipant(request); // End snippet }
/// <summary>Snippet for CreateParticipantAsync</summary> public async Task CreateParticipantResourceNamesAsync() { // Snippet: CreateParticipantAsync(ConversationName, Participant, CallSettings) // Additional: CreateParticipantAsync(ConversationName, Participant, CancellationToken) // Create client ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync(); // Initialize request argument(s) ConversationName parent = ConversationName.FromProjectConversation("[PROJECT]", "[CONVERSATION]"); Participant participant = new Participant(); // Make the request Participant response = await participantsClient.CreateParticipantAsync(parent, participant); // End snippet }
/// <summary>Snippet for CreateParticipantAsync</summary> public async Task CreateParticipantAsync() { // Snippet: CreateParticipantAsync(string, Participant, CallSettings) // Additional: CreateParticipantAsync(string, Participant, CancellationToken) // Create client ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync(); // Initialize request argument(s) string parent = "projects/[PROJECT]/conversations/[CONVERSATION]"; Participant participant = new Participant(); // Make the request Participant response = await participantsClient.CreateParticipantAsync(parent, participant); // End snippet }
/// <summary>Snippet for ListParticipants</summary> public async Task ListParticipantsRequestObjectAsync() { // Snippet: ListParticipantsAsync(ListParticipantsRequest, CallSettings) // Create client ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync(); // Initialize request argument(s) ListParticipantsRequest request = new ListParticipantsRequest { ParentAsConversationName = ConversationName.FromProjectConversation("[PROJECT]", "[CONVERSATION]"), }; // Make the request PagedAsyncEnumerable <ListParticipantsResponse, Participant> response = participantsClient.ListParticipantsAsync(request); // Iterate over all response items, lazily performing RPCs as required await response.ForEachAsync((Participant item) => { // Do something with each item Console.WriteLine(item); }); // Or iterate over pages (of server-defined size), performing one RPC per page await response.AsRawResponses().ForEachAsync((ListParticipantsResponse page) => { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (Participant item in page) { // Do something with each item Console.WriteLine(item); } }); // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required int pageSize = 10; Page <Participant> singlePage = await response.ReadPageAsync(pageSize); // Do something with the page of items Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); foreach (Participant item in singlePage) { // Do something with each item Console.WriteLine(item); } // Store the pageToken, for when the next page is required. string nextPageToken = singlePage.NextPageToken; // End snippet }
/// <summary>Snippet for SuggestFaqAnswers</summary> public void SuggestFaqAnswersRequestObject() { // Snippet: SuggestFaqAnswers(SuggestFaqAnswersRequest, CallSettings) // Create client ParticipantsClient participantsClient = ParticipantsClient.Create(); // Initialize request argument(s) SuggestFaqAnswersRequest request = new SuggestFaqAnswersRequest { ParentAsParticipantName = ParticipantName.FromProjectConversationParticipant("[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]"), LatestMessageAsMessageName = MessageName.FromProjectConversationMessage("[PROJECT]", "[CONVERSATION]", "[MESSAGE]"), ContextSize = 0, }; // Make the request SuggestFaqAnswersResponse response = participantsClient.SuggestFaqAnswers(request); // End snippet }
/// <summary>Snippet for GetParticipantAsync</summary> public async Task GetParticipantRequestObjectAsync() { // Snippet: GetParticipantAsync(GetParticipantRequest, CallSettings) // Additional: GetParticipantAsync(GetParticipantRequest, CancellationToken) // Create client ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync(); // Initialize request argument(s) GetParticipantRequest request = new GetParticipantRequest { ParticipantName = ParticipantName.FromProjectConversationParticipant("[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]"), }; // Make the request Participant response = await participantsClient.GetParticipantAsync(request); // End snippet }
/// <summary>Snippet for AnalyzeContent</summary> public void AnalyzeContentRequestObject() { // Snippet: AnalyzeContent(AnalyzeContentRequest, CallSettings) // Create client ParticipantsClient participantsClient = ParticipantsClient.Create(); // Initialize request argument(s) AnalyzeContentRequest request = new AnalyzeContentRequest { ParticipantAsParticipantName = ParticipantName.FromProjectConversationParticipant("[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]"), ReplyAudioConfig = new OutputAudioConfig(), TextInput = new TextInput(), QueryParams = new QueryParameters(), RequestId = "", }; // Make the request AnalyzeContentResponse response = participantsClient.AnalyzeContent(request); // End snippet }
/// <summary>Snippet for UpdateParticipantAsync</summary> public async Task UpdateParticipantRequestObjectAsync() { // Snippet: UpdateParticipantAsync(UpdateParticipantRequest, CallSettings) // Additional: UpdateParticipantAsync(UpdateParticipantRequest, CancellationToken) // Create client ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync(); // Initialize request argument(s) UpdateParticipantRequest request = new UpdateParticipantRequest { Participant = new Participant(), UpdateMask = new FieldMask(), }; // Make the request Participant response = await participantsClient.UpdateParticipantAsync(request); // End snippet }
/// <summary>Snippet for ListParticipants</summary> public void ListParticipantsResourceNames() { // Snippet: ListParticipants(ConversationName, string, int?, CallSettings) // Create client ParticipantsClient participantsClient = ParticipantsClient.Create(); // Initialize request argument(s) ConversationName parent = ConversationName.FromProjectConversation("[PROJECT]", "[CONVERSATION]"); // Make the request PagedEnumerable <ListParticipantsResponse, Participant> response = participantsClient.ListParticipants(parent); // Iterate over all response items, lazily performing RPCs as required foreach (Participant item in response) { // Do something with each item Console.WriteLine(item); } // Or iterate over pages (of server-defined size), performing one RPC per page foreach (ListParticipantsResponse page in response.AsRawResponses()) { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (Participant item in page) { // Do something with each item Console.WriteLine(item); } } // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required int pageSize = 10; Page <Participant> singlePage = response.ReadPage(pageSize); // Do something with the page of items Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); foreach (Participant item in singlePage) { // Do something with each item Console.WriteLine(item); } // Store the pageToken, for when the next page is required. string nextPageToken = singlePage.NextPageToken; // End snippet }
/// <summary>Snippet for SuggestArticlesAsync</summary> public async Task SuggestArticlesRequestObjectAsync() { // Snippet: SuggestArticlesAsync(SuggestArticlesRequest, CallSettings) // Additional: SuggestArticlesAsync(SuggestArticlesRequest, CancellationToken) // Create client ParticipantsClient participantsClient = await ParticipantsClient.CreateAsync(); // Initialize request argument(s) SuggestArticlesRequest request = new SuggestArticlesRequest { ParentAsParticipantName = ParticipantName.FromProjectConversationParticipant("[PROJECT]", "[CONVERSATION]", "[PARTICIPANT]"), LatestMessageAsMessageName = MessageName.FromProjectConversationMessage("[PROJECT]", "[CONVERSATION]", "[MESSAGE]"), ContextSize = 0, }; // Make the request SuggestArticlesResponse response = await participantsClient.SuggestArticlesAsync(request); // End snippet }