/// <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 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 }