/// <summary>
        /// <para>Create a shared link.</para>
        /// <para>If a shared link already exists for the given path, that link is
        /// returned.</para>
        /// <para>Note that in the returned <see cref="PathLinkMetadata" />, the url field is
        /// the shortened URL if the short_url argument is set to <c>true</c>.</para>
        /// <para>This API is not supported for App Folder and filetypes apps.</para>
        /// </summary>
        /// <param name="path">The path to share.</param>
        /// <param name="shortUrl">Whether to return a shortened URL.</param>
        /// <param name="pendingUpload">If it's okay to share a path that does not yet exist,
        /// set this to either 'file' or 'folder' to indicate whether to assume it's a file or
        /// folder.</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{CreateSharedLinkError}">Thrown if there
        /// is an error processing the request; This will contain a <see
        /// cref="CreateSharedLinkError"/>.</exception>
        public t.Task <PathLinkMetadata> CreateSharedLinkAsync(string path,
                                                               bool shortUrl = false,
                                                               PendingUploadMode pendingUpload = null)
        {
            var createSharedLinkArg = new CreateSharedLinkArg(path,
                                                              shortUrl,
                                                              pendingUpload);

            return(this.CreateSharedLinkAsync(createSharedLinkArg));
        }
        /// <summary>
        /// <para>Begins an asynchronous send to the create shared link route.</para>
        /// </summary>
        /// <param name="path">The path to share.</param>
        /// <param name="shortUrl">Whether to return a shortened URL.</param>
        /// <param name="pendingUpload">If it's okay to share a path that does not yet exist,
        /// set this to either 'file' or 'folder' to indicate whether to assume it's a file or
        /// folder.</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 BeginCreateSharedLink(string path,
                                                      bool shortUrl = false,
                                                      PendingUploadMode pendingUpload = null,
                                                      sys.AsyncCallback callback = null,
                                                      object callbackState = null)
        {
            var createSharedLinkArg = new CreateSharedLinkArg(path,
                                                              shortUrl,
                                                              pendingUpload);

            return this.BeginCreateSharedLink(createSharedLinkArg, callback, callbackState);
        }
        /// <summary>
        /// <para>Begins an asynchronous send to the create shared link route.</para>
        /// </summary>
        /// <param name="path">The path to share.</param>
        /// <param name="shortUrl">Whether to return a shortened URL.</param>
        /// <param name="pendingUpload">If it's okay to share a path that does not yet exist,
        /// set this to either 'file' or 'folder' to indicate whether to assume it's a file or
        /// folder.</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 BeginCreateSharedLink(string path,
                                                      bool shortUrl = false,
                                                      PendingUploadMode pendingUpload = null,
                                                      sys.AsyncCallback callback      = null,
                                                      object callbackState            = null)
        {
            var createSharedLinkArg = new CreateSharedLinkArg(path,
                                                              shortUrl,
                                                              pendingUpload);

            return(this.BeginCreateSharedLink(createSharedLinkArg, callback, callbackState));
        }
        /// <summary>
        /// <para>Create a shared link.</para>
        /// <para>If a shared link already exists for the given path, that link is
        /// returned.</para>
        /// <para>Note that in the returned <see cref="PathLinkMetadata" />, the url field is
        /// the shortened URL if the short_url argument is set to <c>true</c>.</para>
        /// <para>This API is not supported for App Folder and filetypes apps.</para>
        /// </summary>
        /// <param name="path">The path to share.</param>
        /// <param name="shortUrl">Whether to return a shortened URL.</param>
        /// <param name="pendingUpload">If it's okay to share a path that does not yet exist,
        /// set this to either 'file' or 'folder' to indicate whether to assume it's a file or
        /// folder.</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{CreateSharedLinkError}">Thrown if there
        /// is an error processing the request; This will contain a <see
        /// cref="CreateSharedLinkError"/>.</exception>
        public t.Task<PathLinkMetadata> CreateSharedLinkAsync(string path,
                                                              bool shortUrl = false,
                                                              PendingUploadMode pendingUpload = null)
        {
            var createSharedLinkArg = new CreateSharedLinkArg(path,
                                                              shortUrl,
                                                              pendingUpload);

            return this.CreateSharedLinkAsync(createSharedLinkArg);
        }