async IAsyncEnumerable <ListOpenWorkflowExecutionsResponse> IPaginator <ListOpenWorkflowExecutionsResponse> .PaginateAsync(CancellationToken cancellationToken = default)
        {
            if (Interlocked.Exchange(ref _isPaginatorInUse, 1) != 0)
            {
                throw new System.InvalidOperationException("Paginator has already been consumed and cannot be reused. Please create a new instance.");
            }
            var nextPageToken = _request.NextPageToken;
            ListOpenWorkflowExecutionsResponse response;

            do
            {
                _request.NextPageToken = nextPageToken;
                response = await _client.ListOpenWorkflowExecutionsAsync(_request, cancellationToken).ConfigureAwait(false);

                nextPageToken = response.WorkflowExecutionInfos.NextPageToken;
                cancellationToken.ThrowIfCancellationRequested();
                yield return(response);
            }while (nextPageToken != null);
        }