/// <summary>
        /// Restore files from trash
        /// </summary>
        public static async Task RestoreFromTrashAndWaitAsyncAsync([NotNull] this ICommandsClient client, [NotNull] RestoreFromTrashRequest request, CancellationToken cancellationToken = default(CancellationToken), TimeSpan?pullPeriod = null)
        {
            var link = await client.RestoreFromTrashAsync(request, cancellationToken).ConfigureAwait(false);

            if (link.HttpStatusCode == HttpStatusCode.Accepted)
            {
                await client.WaitOperationAsync(link, cancellationToken, pullPeriod).ConfigureAwait(false);
            }
        }
 public Task <Link> RestoreFromTrashAsync(RestoreFromTrashRequest request, CancellationToken cancellationToken = default)
 {
     return(PutAsync <RestoreFromTrashRequest, object, Link>("trash/resources", request, /*requestBody*/ null, cancellationToken));
 }
 public static Task RestoreFromTrashAndWaitAsyncAsync([NotNull] this ICommandsClient client, [NotNull] RestoreFromTrashRequest request, CancellationToken cancellationToken, int pullPeriod)
 {
     return(RestoreFromTrashAndWaitAsyncAsync(client, request, cancellationToken, TimeSpan.FromSeconds(pullPeriod)));
 }