/// <summary>Snippet for CompleteConversationAsync</summary>
        public async Task CompleteConversationResourceNamesAsync()
        {
            // Snippet: CompleteConversationAsync(ConversationName, CallSettings)
            // Additional: CompleteConversationAsync(ConversationName, CancellationToken)
            // Create client
            ConversationsClient conversationsClient = await ConversationsClient.CreateAsync();

            // Initialize request argument(s)
            ConversationName name = ConversationName.FromProjectConversation("[PROJECT]", "[CONVERSATION]");
            // Make the request
            Conversation response = await conversationsClient.CompleteConversationAsync(name);

            // End snippet
        }
        /// <summary>Snippet for CompleteConversationAsync</summary>
        public async Task CompleteConversationAsync()
        {
            // Snippet: CompleteConversationAsync(string, CallSettings)
            // Additional: CompleteConversationAsync(string, CancellationToken)
            // Create client
            ConversationsClient conversationsClient = await ConversationsClient.CreateAsync();

            // Initialize request argument(s)
            string name = "projects/[PROJECT]/conversations/[CONVERSATION]";
            // Make the request
            Conversation response = await conversationsClient.CompleteConversationAsync(name);

            // End snippet
        }
        /// <summary>Snippet for ListMessagesAsync</summary>
        public async Task ListMessagesRequestObjectAsync()
        {
            // Snippet: ListMessagesAsync(ListMessagesRequest, CallSettings)
            // Create client
            ConversationsClient conversationsClient = await ConversationsClient.CreateAsync();

            // Initialize request argument(s)
            ListMessagesRequest request = new ListMessagesRequest
            {
                ParentAsConversationName = ConversationName.FromProjectConversation("[PROJECT]", "[CONVERSATION]"),
                Filter = "",
            };
            // Make the request
            PagedAsyncEnumerable <ListMessagesResponse, Message> response = conversationsClient.ListMessagesAsync(request);

            // Iterate over all response items, lazily performing RPCs as required
            await response.ForEachAsync((Message 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((ListMessagesResponse page) =>
            {
                // Do something with each page of items
                Console.WriteLine("A page of results:");
                foreach (Message 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 <Message> 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 (Message 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 CreateConversationAsync</summary>
        public async Task CreateConversationAsync()
        {
            // Snippet: CreateConversationAsync(string, Conversation, CallSettings)
            // Additional: CreateConversationAsync(string, Conversation, CancellationToken)
            // Create client
            ConversationsClient conversationsClient = await ConversationsClient.CreateAsync();

            // Initialize request argument(s)
            string       parent       = "projects/[PROJECT]";
            Conversation conversation = new Conversation();
            // Make the request
            Conversation response = await conversationsClient.CreateConversationAsync(parent, conversation);

            // End snippet
        }
        /// <summary>Snippet for CreateConversationAsync</summary>
        public async Task CreateConversationResourceNames2Async()
        {
            // Snippet: CreateConversationAsync(LocationName, Conversation, CallSettings)
            // Additional: CreateConversationAsync(LocationName, Conversation, CancellationToken)
            // Create client
            ConversationsClient conversationsClient = await ConversationsClient.CreateAsync();

            // Initialize request argument(s)
            LocationName parent       = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
            Conversation conversation = new Conversation();
            // Make the request
            Conversation response = await conversationsClient.CreateConversationAsync(parent, conversation);

            // End snippet
        }
        /// <summary>Snippet for GetConversationAsync</summary>
        public async Task GetConversationRequestObjectAsync()
        {
            // Snippet: GetConversationAsync(GetConversationRequest, CallSettings)
            // Additional: GetConversationAsync(GetConversationRequest, CancellationToken)
            // Create client
            ConversationsClient conversationsClient = await ConversationsClient.CreateAsync();

            // Initialize request argument(s)
            GetConversationRequest request = new GetConversationRequest
            {
                ConversationName = ConversationName.FromProjectConversation("[PROJECT]", "[CONVERSATION]"),
            };
            // Make the request
            Conversation response = await conversationsClient.GetConversationAsync(request);

            // End snippet
        }
        /// <summary>Snippet for ListConversationsAsync</summary>
        public async Task ListConversationsAsync()
        {
            // Snippet: ListConversationsAsync(string, string, int?, CallSettings)
            // Create client
            ConversationsClient conversationsClient = await ConversationsClient.CreateAsync();

            // Initialize request argument(s)
            string parent = "projects/[PROJECT]";
            // Make the request
            PagedAsyncEnumerable <ListConversationsResponse, Conversation> response = conversationsClient.ListConversationsAsync(parent);

            // Iterate over all response items, lazily performing RPCs as required
            await response.ForEachAsync((Conversation 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((ListConversationsResponse page) =>
            {
                // Do something with each page of items
                Console.WriteLine("A page of results:");
                foreach (Conversation 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 <Conversation> 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 (Conversation 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 CreateConversationAsync</summary>
        public async Task CreateConversationRequestObjectAsync()
        {
            // Snippet: CreateConversationAsync(CreateConversationRequest, CallSettings)
            // Additional: CreateConversationAsync(CreateConversationRequest, CancellationToken)
            // Create client
            ConversationsClient conversationsClient = await ConversationsClient.CreateAsync();

            // Initialize request argument(s)
            CreateConversationRequest request = new CreateConversationRequest
            {
                ParentAsProjectName = ProjectName.FromProject("[PROJECT]"),
                Conversation        = new Conversation(),
                ConversationId      = "",
            };
            // Make the request
            Conversation response = await conversationsClient.CreateConversationAsync(request);

            // End snippet
        }