/// <summary>
        /// <para>Begins an asynchronous send to the lock route.</para>
        /// </summary>
        /// <param name="fileId">The API ID ("id:...") associated with the Cloud Doc</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 BeginLock(string fileId = "",
                                          sys.AsyncCallback callback = null,
                                          object callbackState       = null)
        {
            var lockArg = new LockArg(fileId);

            return(this.BeginLock(lockArg, callback, callbackState));
        }
        /// <summary>
        /// <para>Begins an asynchronous send to the lock route.</para>
        /// </summary>
        /// <param name="lockArg">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 BeginLock(LockArg lockArg, sys.AsyncCallback callback, object state = null)
        {
            var task = this.LockAsync(lockArg);

            return(enc.Util.ToApm(task, callback, state));
        }
        /// <summary>
        /// <para>Lock a Cloud Doc. This route requires Cloud Docs auth. Please make a request
        /// to cloud_docs/authorize and supply that token in the Authorization header.</para>
        /// </summary>
        /// <param name="fileId">The API ID ("id:...") associated with the Cloud Doc</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{TError}">Thrown if there is an error
        /// processing the request; This will contain a <see cref="LockingError"/>.</exception>
        public t.Task <LockResult> LockAsync(string fileId = "")
        {
            var lockArg = new LockArg(fileId);

            return(this.LockAsync(lockArg));
        }
 /// <summary>
 /// <para>Lock a Cloud Doc. This route requires Cloud Docs auth. Please make a request
 /// to cloud_docs/authorize and supply that token in the Authorization header.</para>
 /// </summary>
 /// <param name="lockArg">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{TError}">Thrown if there is an error
 /// processing the request; This will contain a <see cref="LockingError"/>.</exception>
 public t.Task <LockResult> LockAsync(LockArg lockArg)
 {
     return(this.Transport.SendRpcRequestAsync <LockArg, LockResult, LockingError>(lockArg, "api", "/cloud_docs/lock", "user", global::Dropbox.Api.CloudDocs.LockArg.Encoder, global::Dropbox.Api.CloudDocs.LockResult.Decoder, global::Dropbox.Api.CloudDocs.LockingError.Decoder));
 }