/// <summary> /// <para>Initializes a new instance of the <see cref="MembersRemoveArg" /> /// class.</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> public MembersRemoveArg(UserSelectorArg user, bool wipeData = true, UserSelectorArg transferDestId = null, UserSelectorArg transferAdminId = null) : base(user, wipeData) { this.TransferDestId = transferDestId; this.TransferAdminId = transferAdminId; }
/// <summary> /// <para>Initializes a new instance of the <see cref="MembersUnsuspendArg" /> /// class.</para> /// </summary> /// <param name="user">Identity of user to unsuspend.</param> public MembersUnsuspendArg(UserSelectorArg user) { if (user == null) { throw new sys.ArgumentNullException("user"); } this.User = user; }
/// <summary> /// <para>Initializes a new instance of the <see cref="MembersDeleteProfilePhotoArg" /> /// class.</para> /// </summary> /// <param name="user">Identity of the user whose profile photo will be /// deleted.</param> public MembersDeleteProfilePhotoArg(UserSelectorArg user) { if (user == null) { throw new sys.ArgumentNullException("user"); } this.User = user; }
/// <summary> /// <para>Initializes a new instance of the <see cref="MembersDeactivateBaseArg" /> /// class.</para> /// </summary> /// <param name="user">Identity of user to remove/suspend/have their files /// moved.</param> public MembersDeactivateBaseArg(UserSelectorArg user) { if (user == null) { throw new sys.ArgumentNullException("user"); } this.User = user; }
/// <summary> /// <para>Initializes a new instance of the <see cref="MembersRemoveArg" /> /// class.</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="keepAccount">Downgrade the member to a Basic account. The user will /// retain the email address associated with their Dropbox account and data in their /// account that is not restricted to team members. In order to keep the account the /// argument wipe_data should be set to False.</param> public MembersRemoveArg(UserSelectorArg user, bool wipeData = true, UserSelectorArg transferDestId = null, UserSelectorArg transferAdminId = null, bool keepAccount = false) : base(user, wipeData) { this.TransferDestId = transferDestId; this.TransferAdminId = transferAdminId; this.KeepAccount = keepAccount; }
/// <summary> /// <para>Initializes a new instance of the <see cref="MembersDeactivateArg" /> /// class.</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> public MembersDeactivateArg(UserSelectorArg user, bool wipeData = true) { if (user == null) { throw new sys.ArgumentNullException("user"); } this.User = user; this.WipeData = wipeData; }
/// <summary> /// <para>Initializes a new instance of the <see cref="GroupMembersSetAccessTypeArg" /> /// class.</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> public GroupMembersSetAccessTypeArg(GroupSelector @group, UserSelectorArg user, GroupAccessType accessType) : base(@group, user) { if (accessType == null) { throw new sys.ArgumentNullException("accessType"); } this.AccessType = accessType; }
/// <summary> /// <para>Initializes a new instance of the <see cref="GroupMemberSelector" /> /// class.</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> public GroupMemberSelector(GroupSelector @group, UserSelectorArg user) { if (@group == null) { throw new sys.ArgumentNullException("@group"); } if (user == null) { throw new sys.ArgumentNullException("user"); } this.Group = @group; this.User = user; }
/// <summary> /// <para>Initializes a new instance of the <see cref="UserCustomQuotaArg" /> /// class.</para> /// </summary> /// <param name="user">The user</param> /// <param name="quotaGb">The quota gb</param> public UserCustomQuotaArg(UserSelectorArg user, uint quotaGb) { if (user == null) { throw new sys.ArgumentNullException("user"); } if (quotaGb < 15U) { throw new sys.ArgumentOutOfRangeException("quotaGb", "Value should be greater or equal than 15"); } this.User = user; this.QuotaGb = quotaGb; }
/// <summary> /// <para>Initializes a new instance of the <see cref="MembersSetPermissionsArg" /> /// class.</para> /// </summary> /// <param name="user">Identity of user whose role will be set.</param> /// <param name="newRole">The new role of the member.</param> public MembersSetPermissionsArg(UserSelectorArg user, AdminTier newRole) { if (user == null) { throw new sys.ArgumentNullException("user"); } if (newRole == null) { throw new sys.ArgumentNullException("newRole"); } this.User = user; this.NewRole = newRole; }
/// <summary> /// <para>Initializes a new instance of the <see cref="MembersSetProfilePhotoArg" /> /// class.</para> /// </summary> /// <param name="user">Identity of the user whose profile photo will be set.</param> /// <param name="photo">Image to set as the member's new profile photo.</param> public MembersSetProfilePhotoArg(UserSelectorArg user, global::Dropbox.Api.Account.PhotoSourceArg photo) { if (user == null) { throw new sys.ArgumentNullException("user"); } if (photo == null) { throw new sys.ArgumentNullException("photo"); } this.User = user; this.Photo = photo; }
/// <summary> /// <para>Initializes a new instance of the <see cref="MemberAccess" /> class.</para> /// </summary> /// <param name="user">Identity of a user.</param> /// <param name="accessType">Access type.</param> public MemberAccess(UserSelectorArg user, GroupAccessType accessType) { if (user == null) { throw new sys.ArgumentNullException("user"); } if (accessType == null) { throw new sys.ArgumentNullException("accessType"); } this.User = user; this.AccessType = accessType; }
/// <summary> /// <para>Initializes a new instance of the <see cref="MembersSetProfileArg" /> /// class.</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> public MembersSetProfileArg(UserSelectorArg user, string newEmail = null, string newExternalId = null, string newGivenName = null, string newSurname = null) { if (user == null) { throw new sys.ArgumentNullException("user"); } this.User = user; this.NewEmail = newEmail; this.NewExternalId = newExternalId; this.NewGivenName = newGivenName; this.NewSurname = newSurname; }
/// <summary> /// <para>Initializes a new instance of the <see cref="UserSecondaryEmailsArg" /> /// class.</para> /// </summary> /// <param name="user">The user</param> /// <param name="secondaryEmails">The secondary emails</param> public UserSecondaryEmailsArg(UserSelectorArg user, col.IEnumerable <string> secondaryEmails) { if (user == null) { throw new sys.ArgumentNullException("user"); } var secondaryEmailsList = enc.Util.ToList(secondaryEmails); if (secondaryEmails == null) { throw new sys.ArgumentNullException("secondaryEmails"); } this.User = user; this.SecondaryEmails = secondaryEmailsList; }
/// <summary> /// <para>Initializes a new instance of the <see cref="UserDeleteEmailsResult" /> /// class.</para> /// </summary> /// <param name="user">The user</param> /// <param name="results">The results</param> public UserDeleteEmailsResult(UserSelectorArg user, col.IEnumerable <DeleteSecondaryEmailResult> results) { if (user == null) { throw new sys.ArgumentNullException("user"); } var resultsList = enc.Util.ToList(results); if (results == null) { throw new sys.ArgumentNullException("results"); } this.User = user; this.Results = resultsList; }
/// <summary> /// <para>Initializes a new instance of the <see cref="MembersDataTransferArg" /> /// class.</para> /// </summary> /// <param name="user">Identity of user to remove/suspend/have their files /// moved.</param> /// <param name="transferDestId">Files from the deleted member account will be /// transferred to this user.</param> /// <param name="transferAdminId">Errors during the transfer process will be sent via /// email to this user.</param> public MembersDataTransferArg(UserSelectorArg user, UserSelectorArg transferDestId, UserSelectorArg transferAdminId) : base(user) { if (transferDestId == null) { throw new sys.ArgumentNullException("transferDestId"); } if (transferAdminId == null) { throw new sys.ArgumentNullException("transferAdminId"); } this.TransferDestId = transferDestId; this.TransferAdminId = transferAdminId; }
/// <summary> /// <para>Initializes a new instance of the <see cref="Unverified" /> class.</para> /// </summary> /// <param name="value">The value</param> public Unverified(UserSelectorArg value) { this.Value = value; }
/// <summary> /// <para>Initializes a new instance of the <see cref="MembersDeactivateArg" /> /// class.</para> /// </summary> /// <param name="user">Identity of user to remove/suspend/have their files /// moved.</param> /// <param name="wipeData">If provided, controls if the user's data will be deleted on /// their linked devices.</param> public MembersDeactivateArg(UserSelectorArg user, bool wipeData = true) : base(user) { this.WipeData = wipeData; }
/// <summary> /// <para>Initializes a new instance of the <see cref="InvalidUser" /> /// class.</para> /// </summary> /// <param name="value">The value</param> public InvalidUser(UserSelectorArg value) { this.Value = value; }
/// <summary> /// <para>Initializes a new instance of the <see cref="MembersSetProfileArg" /> /// class.</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="newPersistentId">New persistent ID. This field only available to teams /// using persistent ID SAML configuration.</param> public MembersSetProfileArg(UserSelectorArg user, string newEmail = null, string newExternalId = null, string newGivenName = null, string newSurname = null, string newPersistentId = null) { if (user == null) { throw new sys.ArgumentNullException("user"); } if (newEmail != null) { if (newEmail.Length > 255) { throw new sys.ArgumentOutOfRangeException("newEmail", "Length should be at most 255"); } if (!re.Regex.IsMatch(newEmail, @"\A(?:^['&A-Za-z0-9._%+-]+@[A-Za-z0-9-][A-Za-z0-9.-]*.[A-Za-z]{2,15}$)\z")) { throw new sys.ArgumentOutOfRangeException("newEmail", @"Value should match pattern '\A(?:^['&A-Za-z0-9._%+-]+@[A-Za-z0-9-][A-Za-z0-9.-]*.[A-Za-z]{2,15}$)\z'"); } } if (newExternalId != null) { if (newExternalId.Length > 64) { throw new sys.ArgumentOutOfRangeException("newExternalId", "Length should be at most 64"); } } if (newGivenName != null) { if (newGivenName.Length < 1) { throw new sys.ArgumentOutOfRangeException("newGivenName", "Length should be at least 1"); } if (newGivenName.Length > 100) { throw new sys.ArgumentOutOfRangeException("newGivenName", "Length should be at most 100"); } if (!re.Regex.IsMatch(newGivenName, @"\A(?:[^/:?*<>""|]*)\z")) { throw new sys.ArgumentOutOfRangeException("newGivenName", @"Value should match pattern '\A(?:[^/:?*<>""|]*)\z'"); } } if (newSurname != null) { if (newSurname.Length < 1) { throw new sys.ArgumentOutOfRangeException("newSurname", "Length should be at least 1"); } if (newSurname.Length > 100) { throw new sys.ArgumentOutOfRangeException("newSurname", "Length should be at most 100"); } if (!re.Regex.IsMatch(newSurname, @"\A(?:[^/:?*<>""|]*)\z")) { throw new sys.ArgumentOutOfRangeException("newSurname", @"Value should match pattern '\A(?:[^/:?*<>""|]*)\z'"); } } this.User = user; this.NewEmail = newEmail; this.NewExternalId = newExternalId; this.NewGivenName = newGivenName; this.NewSurname = newSurname; this.NewPersistentId = newPersistentId; }
/// <summary> /// <para>Initializes a new instance of the <see cref="PlaceholderUser" /> /// class.</para> /// </summary> /// <param name="value">The value</param> public PlaceholderUser(UserSelectorArg value) { this.Value = value; }
/// <summary> /// <para>Initializes a new instance of the <see cref="Success" /> class.</para> /// </summary> /// <param name="value">The value</param> public Success(UserSelectorArg value) { this.Value = value; }