/// <summary>
        /// <para>Begins an asynchronous send to the restore route.</para>
        /// </summary>
        /// <param name="path">The path to the file you want to restore.</param>
        /// <param name="rev">The revision to restore for the file.</param>
        /// <param name="callback">The method to be called when the asynchronous send is
        /// completed.</param>
        /// <param name="callbackState">A user provided object that distinguished this send
        /// from other send requests.</param>
        /// <returns>An object that represents the asynchronous send request.</returns>
        public sys.IAsyncResult BeginRestore(string path,
                                             string rev,
                                             sys.AsyncCallback callback,
                                             object callbackState = null)
        {
            var restoreArg = new RestoreArg(path,
                                            rev);

            return this.BeginRestore(restoreArg, callback, callbackState);
        }
        /// <summary>
        /// <para>Begins an asynchronous send to the restore route.</para>
        /// </summary>
        /// <param name="restoreArg">The request parameters.</param>
        /// <param name="callback">The method to be called when the asynchronous send is
        /// completed.</param>
        /// <param name="state">A user provided object that distinguished this send from other
        /// send requests.</param>
        /// <returns>An object that represents the asynchronous send request.</returns>
        public sys.IAsyncResult BeginRestore(RestoreArg restoreArg, sys.AsyncCallback callback, object state = null)
        {
            var task = this.RestoreAsync(restoreArg);

            return enc.Util.ToApm(task, callback, state);
        }
        /// <summary>
        /// <para>Restore a file to a specific revision</para>
        /// </summary>
        /// <param name="path">The path to the file you want to restore.</param>
        /// <param name="rev">The revision to restore for the file.</param>
        /// <returns>The task that represents the asynchronous send operation. The TResult
        /// parameter contains the response from the server.</returns>
        /// <exception cref="Dropbox.Api.ApiException{RestoreError}">Thrown if there is an
        /// error processing the request; This will contain a <see
        /// cref="RestoreError"/>.</exception>
        public t.Task<FileMetadata> RestoreAsync(string path,
                                                 string rev)
        {
            var restoreArg = new RestoreArg(path,
                                            rev);

            return this.RestoreAsync(restoreArg);
        }
 /// <summary>
 /// <para>Restore a file to a specific revision</para>
 /// </summary>
 /// <param name="restoreArg">The request parameters</param>
 /// <returns>The task that represents the asynchronous send operation. The TResult
 /// parameter contains the response from the server.</returns>
 /// <exception cref="Dropbox.Api.ApiException{RestoreError}">Thrown if there is an
 /// error processing the request; This will contain a <see
 /// cref="RestoreError"/>.</exception>
 public t.Task<FileMetadata> RestoreAsync(RestoreArg restoreArg)
 {
     return this.Transport.SendRpcRequestAsync<RestoreArg, FileMetadata, RestoreError>(restoreArg, "api", "/files/restore", RestoreArg.Encoder, FileMetadata.Decoder, RestoreError.Decoder);
 }