/// <summary>Snippet for RejoinUserEventsAsync</summary> public async Task RejoinUserEventsRequestObjectAsync() { // Snippet: RejoinUserEventsAsync(RejoinUserEventsRequest, CallSettings) // Additional: RejoinUserEventsAsync(RejoinUserEventsRequest, CancellationToken) // Create client UserEventServiceClient userEventServiceClient = await UserEventServiceClient.CreateAsync(); // Initialize request argument(s) RejoinUserEventsRequest request = new RejoinUserEventsRequest { Parent = "", UserEventRejoinScope = RejoinUserEventsRequest.Types.UserEventRejoinScope.Unspecified, }; // Make the request Operation <RejoinUserEventsResponse, RejoinUserEventsMetadata> response = await userEventServiceClient.RejoinUserEventsAsync(request); // Poll until the returned long-running operation is complete Operation <RejoinUserEventsResponse, RejoinUserEventsMetadata> completedResponse = await response.PollUntilCompletedAsync(); // Retrieve the operation result RejoinUserEventsResponse result = completedResponse.Result; // Or get the name of the operation string operationName = response.Name; // This name can be stored, then the long-running operation retrieved later by name Operation <RejoinUserEventsResponse, RejoinUserEventsMetadata> retrievedResponse = await userEventServiceClient.PollOnceRejoinUserEventsAsync(operationName); // Check if the retrieved long-running operation has completed if (retrievedResponse.IsCompleted) { // If it has completed, then access the result RejoinUserEventsResponse retrievedResult = retrievedResponse.Result; } // End snippet }