Example #1
0
        /// <summary>
        /// <para>Begins an asynchronous send to the members unsuspend route.</para>
        /// </summary>
        /// <param name="user">Identity of user to unsuspend.</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 BeginMembersUnsuspend(UserSelectorArg user,
                                                      sys.AsyncCallback callback,
                                                      object callbackState = null)
        {
            var membersUnsuspendArg = new MembersUnsuspendArg(user);

            return this.BeginMembersUnsuspend(membersUnsuspendArg, callback, callbackState);
        }
Example #2
0
        /// <summary>
        /// <para>Begins an asynchronous send to the members suspend route.</para>
        /// </summary>
        /// <param name="user">Identity of user to remove/suspend.</param>
        /// <param name="wipeData">If provided, controls if the user's data will be deleted on
        /// their linked devices.</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 BeginMembersSuspend(UserSelectorArg user,
                                                    bool wipeData = true,
                                                    sys.AsyncCallback callback = null,
                                                    object callbackState = null)
        {
            var membersDeactivateArg = new MembersDeactivateArg(user,
                                                                wipeData);

            return this.BeginMembersSuspend(membersDeactivateArg, callback, callbackState);
        }
Example #3
0
        /// <summary>
        /// <para>Unsuspend a member from a team.</para>
        /// <para>Permission : Team member management</para>
        /// <para>Exactly one of team_member_id, email, or external_id must be provided to
        /// identify the user account.</para>
        /// </summary>
        /// <param name="user">Identity of user to unsuspend.</param>
        /// <returns>The task that represents the asynchronous send operation.</returns>
        /// <exception cref="Dropbox.Api.ApiException{MembersUnsuspendError}">Thrown if there
        /// is an error processing the request; This will contain a <see
        /// cref="MembersUnsuspendError"/>.</exception>
        public t.Task MembersUnsuspendAsync(UserSelectorArg user)
        {
            var membersUnsuspendArg = new MembersUnsuspendArg(user);

            return this.MembersUnsuspendAsync(membersUnsuspendArg);
        }
Example #4
0
        /// <summary>
        /// <para>Begins an asynchronous send to the members remove route.</para>
        /// </summary>
        /// <param name="user">Identity of user to remove/suspend.</param>
        /// <param name="wipeData">If provided, controls if the user's data will be deleted on
        /// their linked devices.</param>
        /// <param name="transferDestId">If provided, files from the deleted member account
        /// will be transferred to this user.</param>
        /// <param name="transferAdminId">If provided, errors during the transfer process will
        /// be sent via email to this user. If the transfer_dest_id argument was provided, then
        /// this argument must be provided as well.</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 BeginMembersRemove(UserSelectorArg user,
                                                   bool wipeData = true,
                                                   UserSelectorArg transferDestId = null,
                                                   UserSelectorArg transferAdminId = null,
                                                   sys.AsyncCallback callback = null,
                                                   object callbackState = null)
        {
            var membersRemoveArg = new MembersRemoveArg(user,
                                                        wipeData,
                                                        transferDestId,
                                                        transferAdminId);

            return this.BeginMembersRemove(membersRemoveArg, callback, callbackState);
        }
Example #5
0
        /// <summary>
        /// <para>Suspend a member from a team.</para>
        /// <para>Permission : Team member management</para>
        /// <para>Exactly one of team_member_id, email, or external_id must be provided to
        /// identify the user account.</para>
        /// </summary>
        /// <param name="user">Identity of user to remove/suspend.</param>
        /// <param name="wipeData">If provided, controls if the user's data will be deleted on
        /// their linked devices.</param>
        /// <returns>The task that represents the asynchronous send operation.</returns>
        /// <exception cref="Dropbox.Api.ApiException{MembersSuspendError}">Thrown if there is
        /// an error processing the request; This will contain a <see
        /// cref="MembersSuspendError"/>.</exception>
        public t.Task MembersSuspendAsync(UserSelectorArg user,
                                          bool wipeData = true)
        {
            var membersDeactivateArg = new MembersDeactivateArg(user,
                                                                wipeData);

            return this.MembersSuspendAsync(membersDeactivateArg);
        }
Example #6
0
        /// <summary>
        /// <para>Begins an asynchronous send to the members send welcome email route.</para>
        /// </summary>
        /// <param name="userSelectorArg">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 BeginMembersSendWelcomeEmail(UserSelectorArg userSelectorArg, sys.AsyncCallback callback, object state = null)
        {
            var task = this.MembersSendWelcomeEmailAsync(userSelectorArg);

            return enc.Util.ToApm(task, callback, state);
        }
Example #7
0
        /// <summary>
        /// <para>Removes a member from a team.</para>
        /// <para>Permission : Team member management</para>
        /// <para>Exactly one of team_member_id, email, or external_id must be provided to
        /// identify the user account.</para>
        /// <para>This is not a deactivation where the account can be re-activated again.
        /// Calling <see cref="Dropbox.Api.Team.Routes.TeamRoutes.MembersAddAsync" /> with the
        /// removed user's email address will create a new account with a new team_member_id
        /// that will not have access to any content that was shared with the initial
        /// account.</para>
        /// <para>This endpoint can also be used to cancel a pending invite to join the
        /// team.</para>
        /// <para>This endpoint may initiate an asynchronous job. To obtain the final result of
        /// the job, the client should periodically poll <see
        /// cref="Dropbox.Api.Team.Routes.TeamRoutes.MembersRemoveJobStatusGetAsync" />.</para>
        /// </summary>
        /// <param name="user">Identity of user to remove/suspend.</param>
        /// <param name="wipeData">If provided, controls if the user's data will be deleted on
        /// their linked devices.</param>
        /// <param name="transferDestId">If provided, files from the deleted member account
        /// will be transferred to this user.</param>
        /// <param name="transferAdminId">If provided, errors during the transfer process will
        /// be sent via email to this user. If the transfer_dest_id argument was provided, then
        /// this argument must be provided as well.</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{MembersRemoveError}">Thrown if there is
        /// an error processing the request; This will contain a <see
        /// cref="MembersRemoveError"/>.</exception>
        public t.Task<Dropbox.Api.Async.LaunchEmptyResult> MembersRemoveAsync(UserSelectorArg user,
                                                                              bool wipeData = true,
                                                                              UserSelectorArg transferDestId = null,
                                                                              UserSelectorArg transferAdminId = null)
        {
            var membersRemoveArg = new MembersRemoveArg(user,
                                                        wipeData,
                                                        transferDestId,
                                                        transferAdminId);

            return this.MembersRemoveAsync(membersRemoveArg);
        }
Example #8
0
        /// <summary>
        /// <para>Begins an asynchronous send to the members set admin permissions
        /// route.</para>
        /// </summary>
        /// <param name="user">Identity of user whose role will be set.</param>
        /// <param name="newRole">The new role of the member.</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 BeginMembersSetAdminPermissions(UserSelectorArg user,
                                                                AdminTier newRole,
                                                                sys.AsyncCallback callback,
                                                                object callbackState = null)
        {
            var membersSetPermissionsArg = new MembersSetPermissionsArg(user,
                                                                        newRole);

            return this.BeginMembersSetAdminPermissions(membersSetPermissionsArg, callback, callbackState);
        }
Example #9
0
 /// <summary>
 /// <para>Sends welcome email to pending team member.</para>
 /// <para>Permission : Team member management</para>
 /// <para>Exactly one of team_member_id, email, or external_id must be provided to
 /// identify the user account.</para>
 /// <para>No-op if team member is not pending.</para>
 /// </summary>
 /// <param name="userSelectorArg">The request parameters</param>
 /// <returns>The task that represents the asynchronous send operation.</returns>
 /// <exception cref="Dropbox.Api.ApiException{MembersSendWelcomeError}">Thrown if there
 /// is an error processing the request; This will contain a <see
 /// cref="MembersSendWelcomeError"/>.</exception>
 public t.Task MembersSendWelcomeEmailAsync(UserSelectorArg userSelectorArg)
 {
     return this.Transport.SendRpcRequestAsync<UserSelectorArg, enc.Empty, MembersSendWelcomeError>(userSelectorArg, "api", "/team/members/send_welcome_email", Dropbox.Api.Team.UserSelectorArg.Encoder, enc.EmptyDecoder.Instance, Dropbox.Api.Team.MembersSendWelcomeError.Decoder);
 }
Example #10
0
        /// <summary>
        /// <para>Updates a team member's permissions.</para>
        /// <para>Permission : Team member management</para>
        /// </summary>
        /// <param name="user">Identity of user whose role will be set.</param>
        /// <param name="newRole">The new role of the member.</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{MembersSetPermissionsError}">Thrown if
        /// there is an error processing the request; This will contain a <see
        /// cref="MembersSetPermissionsError"/>.</exception>
        public t.Task<MembersSetPermissionsResult> MembersSetAdminPermissionsAsync(UserSelectorArg user,
                                                                                   AdminTier newRole)
        {
            var membersSetPermissionsArg = new MembersSetPermissionsArg(user,
                                                                        newRole);

            return this.MembersSetAdminPermissionsAsync(membersSetPermissionsArg);
        }
Example #11
0
        /// <summary>
        /// <para>Begins an asynchronous send to the members set profile route.</para>
        /// </summary>
        /// <param name="user">Identity of user whose profile will be set.</param>
        /// <param name="newEmail">New email for member.</param>
        /// <param name="newExternalId">New external ID for member.</param>
        /// <param name="newGivenName">New given name for member.</param>
        /// <param name="newSurname">New surname for member.</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 BeginMembersSetProfile(UserSelectorArg user,
                                                       string newEmail = null,
                                                       string newExternalId = null,
                                                       string newGivenName = null,
                                                       string newSurname = null,
                                                       sys.AsyncCallback callback = null,
                                                       object callbackState = null)
        {
            var membersSetProfileArg = new MembersSetProfileArg(user,
                                                                newEmail,
                                                                newExternalId,
                                                                newGivenName,
                                                                newSurname);

            return this.BeginMembersSetProfile(membersSetProfileArg, callback, callbackState);
        }
Example #12
0
        /// <summary>
        /// <para>Updates a team member's profile.</para>
        /// <para>Permission : Team member management</para>
        /// </summary>
        /// <param name="user">Identity of user whose profile will be set.</param>
        /// <param name="newEmail">New email for member.</param>
        /// <param name="newExternalId">New external ID for member.</param>
        /// <param name="newGivenName">New given name for member.</param>
        /// <param name="newSurname">New surname for member.</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{MembersSetProfileError}">Thrown if there
        /// is an error processing the request; This will contain a <see
        /// cref="MembersSetProfileError"/>.</exception>
        public t.Task<TeamMemberInfo> MembersSetProfileAsync(UserSelectorArg user,
                                                             string newEmail = null,
                                                             string newExternalId = null,
                                                             string newGivenName = null,
                                                             string newSurname = null)
        {
            var membersSetProfileArg = new MembersSetProfileArg(user,
                                                                newEmail,
                                                                newExternalId,
                                                                newGivenName,
                                                                newSurname);

            return this.MembersSetProfileAsync(membersSetProfileArg);
        }
Example #13
0
        /// <summary>
        /// <para>Begins an asynchronous send to the groups members set access type
        /// route.</para>
        /// </summary>
        /// <param name="group">Specify a group.</param>
        /// <param name="user">Identity of a user that is a member of <paramref name="@group"
        /// />.</param>
        /// <param name="accessType">New group access type the user will have.</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 BeginGroupsMembersSetAccessType(GroupSelector @group,
                                                                UserSelectorArg user,
                                                                GroupAccessType accessType,
                                                                sys.AsyncCallback callback,
                                                                object callbackState = null)
        {
            var groupMembersSetAccessTypeArg = new GroupMembersSetAccessTypeArg(@group,
                                                                                user,
                                                                                accessType);

            return this.BeginGroupsMembersSetAccessType(groupMembersSetAccessTypeArg, callback, callbackState);
        }
Example #14
0
        /// <summary>
        /// <para>Sets a member's access type in a group.</para>
        /// <para>Permission : Team member management</para>
        /// </summary>
        /// <param name="group">Specify a group.</param>
        /// <param name="user">Identity of a user that is a member of <paramref name="@group"
        /// />.</param>
        /// <param name="accessType">New group access type the user will have.</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{GroupMemberSelectorError}">Thrown if
        /// there is an error processing the request; This will contain a <see
        /// cref="GroupMemberSelectorError"/>.</exception>
        public t.Task<col.List<GroupsGetInfoItem>> GroupsMembersSetAccessTypeAsync(GroupSelector @group,
                                                                                   UserSelectorArg user,
                                                                                   GroupAccessType accessType)
        {
            var groupMembersSetAccessTypeArg = new GroupMembersSetAccessTypeArg(@group,
                                                                                user,
                                                                                accessType);

            return this.GroupsMembersSetAccessTypeAsync(groupMembersSetAccessTypeArg);
        }