/// <summary> /// <para>Initializes a new instance of the <see cref="TeamMemberProfile" /> /// class.</para> /// </summary> /// <param name="teamMemberId">ID of user as a member of a team.</param> /// <param name="email">Email address of user.</param> /// <param name="emailVerified">Is true if the user's email is verified to be owned by /// the user.</param> /// <param name="status">The user's status as a member of a specific team.</param> /// <param name="name">Representations for a person's name.</param> /// <param name="membershipType">The user's membership type: full (normal team member) /// vs limited (does not use a license; no access to the team's shared quota).</param> /// <param name="groups">List of group IDs of groups that the user belongs to.</param> /// <param name="memberFolderId">The namespace id of the user's root folder.</param> /// <param name="externalId">External ID that a team can attach to the user. An /// application using the API may find it easier to use their own IDs instead of /// Dropbox IDs like account_id or team_member_id.</param> /// <param name="accountId">A user's account identifier.</param> /// <param name="joinedOn">The date and time the user joined as a member of a specific /// team.</param> /// <param name="persistentId">Persistent ID that a team can attach to the user. The /// persistent ID is unique ID to be used for SAML authentication.</param> /// <param name="isDirectoryRestricted">Whether the user is a directory restricted /// user.</param> public TeamMemberProfile(string teamMemberId, string email, bool emailVerified, TeamMemberStatus status, global::Dropbox.Api.Users.Name name, TeamMembershipType membershipType, col.IEnumerable <string> groups, string memberFolderId, string externalId = null, string accountId = null, sys.DateTime?joinedOn = null, string persistentId = null, bool?isDirectoryRestricted = null) : base(teamMemberId, email, emailVerified, status, name, membershipType, externalId, accountId, joinedOn, persistentId, isDirectoryRestricted) { var groupsList = enc.Util.ToList(groups); if (groups == null) { throw new sys.ArgumentNullException("groups"); } if (memberFolderId == null) { throw new sys.ArgumentNullException("memberFolderId"); } if (!re.Regex.IsMatch(memberFolderId, @"\A(?:[-_0-9a-zA-Z:]+)\z")) { throw new sys.ArgumentOutOfRangeException("memberFolderId", @"Value should match pattern '\A(?:[-_0-9a-zA-Z:]+)\z'"); } this.Groups = groupsList; this.MemberFolderId = memberFolderId; }
/// <summary> /// <para>Initializes a new instance of the <see cref="MemberProfile" /> class.</para> /// </summary> /// <param name="teamMemberId">ID of user as a member of a team.</param> /// <param name="email">Email address of user.</param> /// <param name="emailVerified">Is true if the user's email is verified to be owned by /// the user.</param> /// <param name="status">The user's status as a member of a specific team.</param> /// <param name="name">Representations for a person's name.</param> /// <param name="externalId">External ID that a team can attach to the user. An /// application using the API may find it easier to use their own IDs instead of /// Dropbox IDs like account_id or team_member_id.</param> public MemberProfile(string teamMemberId, string email, bool emailVerified, TeamMemberStatus status, Dropbox.Api.Users.Name name, string externalId = null) { if (teamMemberId == null) { throw new sys.ArgumentNullException("teamMemberId"); } if (email == null) { throw new sys.ArgumentNullException("email"); } if (status == null) { throw new sys.ArgumentNullException("status"); } if (name == null) { throw new sys.ArgumentNullException("name"); } this.TeamMemberId = teamMemberId; this.Email = email; this.EmailVerified = emailVerified; this.Status = status; this.Name = name; this.ExternalId = externalId; }
/// <summary> /// <para>Initializes a new instance of the <see cref="MemberProfile" /> class.</para> /// </summary> /// <param name="teamMemberId">ID of user as a member of a team.</param> /// <param name="email">Email address of user.</param> /// <param name="emailVerified">Is true if the user's email is verified to be owned by /// the user.</param> /// <param name="status">The user's status as a member of a specific team.</param> /// <param name="name">Representations for a person's name.</param> /// <param name="membershipType">The user's membership type: full (normal team member) /// vs limited (does not use a license; no access to the team's shared quota).</param> /// <param name="externalId">External ID that a team can attach to the user. An /// application using the API may find it easier to use their own IDs instead of /// Dropbox IDs like account_id or team_member_id.</param> /// <param name="accountId">A user's account identifier.</param> /// <param name="joinedOn">The date and time the user joined as a member of a specific /// team.</param> /// <param name="persistentId">Persistent ID that a team can attach to the user. The /// persistent ID is unique ID to be used for SAML authentication.</param> public MemberProfile(string teamMemberId, string email, bool emailVerified, TeamMemberStatus status, Dropbox.Api.Users.Name name, TeamMembershipType membershipType, string externalId = null, string accountId = null, sys.DateTime?joinedOn = null, string persistentId = null) { if (teamMemberId == null) { throw new sys.ArgumentNullException("teamMemberId"); } if (email == null) { throw new sys.ArgumentNullException("email"); } if (status == null) { throw new sys.ArgumentNullException("status"); } if (name == null) { throw new sys.ArgumentNullException("name"); } if (membershipType == null) { throw new sys.ArgumentNullException("membershipType"); } if (accountId != null) { if (accountId.Length < 40) { throw new sys.ArgumentOutOfRangeException("accountId", "Length should be at least 40"); } if (accountId.Length > 40) { throw new sys.ArgumentOutOfRangeException("accountId", "Length should be at most 40"); } } this.TeamMemberId = teamMemberId; this.Email = email; this.EmailVerified = emailVerified; this.Status = status; this.Name = name; this.MembershipType = membershipType; this.ExternalId = externalId; this.AccountId = accountId; this.JoinedOn = joinedOn; this.PersistentId = persistentId; }
/// <summary> /// <para>Initializes a new instance of the <see cref="TeamMemberProfile" /> /// class.</para> /// </summary> /// <param name="teamMemberId">ID of user as a member of a team.</param> /// <param name="email">Email address of user.</param> /// <param name="emailVerified">Is true if the user's email is verified to be owned by /// the user.</param> /// <param name="status">The user's status as a member of a specific team.</param> /// <param name="name">Representations for a person's name.</param> /// <param name="groups">List of group IDs of groups that the user belongs to.</param> /// <param name="externalId">External ID that a team can attach to the user. An /// application using the API may find it easier to use their own IDs instead of /// Dropbox IDs like account_id or team_member_id.</param> public TeamMemberProfile(string teamMemberId, string email, bool emailVerified, TeamMemberStatus status, Dropbox.Api.Users.Name name, col.IEnumerable <string> groups, string externalId = null) : base(teamMemberId, email, emailVerified, status, name, externalId) { var groupsList = enc.Util.ToList(groups); if (groups == null) { throw new sys.ArgumentNullException("groups"); } this.Groups = groupsList; }
/// <summary> /// <para>Initializes a new instance of the <see cref="TeamMemberProfile" /> /// class.</para> /// </summary> /// <param name="teamMemberId">ID of user as a member of a team.</param> /// <param name="email">Email address of user.</param> /// <param name="emailVerified">Is true if the user's email is verified to be owned by /// the user.</param> /// <param name="status">The user's status as a member of a specific team.</param> /// <param name="name">Representations for a person's name.</param> /// <param name="membershipType">The user's membership type: full (normal team member) /// vs limited (does not use a license; no access to the team's shared quota).</param> /// <param name="groups">List of group IDs of groups that the user belongs to.</param> /// <param name="externalId">External ID that a team can attach to the user. An /// application using the API may find it easier to use their own IDs instead of /// Dropbox IDs like account_id or team_member_id.</param> /// <param name="accountId">A user's account identifier.</param> /// <param name="joinedOn">The date and time the user joined as a member of a specific /// team.</param> /// <param name="persistentId">Persistent ID that a team can attach to the user. The /// persistent ID is unique ID to be used for SAML authentication.</param> public TeamMemberProfile(string teamMemberId, string email, bool emailVerified, TeamMemberStatus status, global::Dropbox.Api.Users.Name name, TeamMembershipType membershipType, col.IEnumerable <string> groups, string externalId = null, string accountId = null, sys.DateTime?joinedOn = null, string persistentId = null) : base(teamMemberId, email, emailVerified, status, name, membershipType, externalId, accountId, joinedOn, persistentId) { var groupsList = enc.Util.ToList(groups); if (groups == null) { throw new sys.ArgumentNullException("groups"); } this.Groups = groupsList; }
/// <summary> /// <para>Initializes a new instance of the <see cref="MemberProfile" /> class.</para> /// </summary> /// <param name="teamMemberId">ID of user as a member of a team.</param> /// <param name="email">Email address of user.</param> /// <param name="emailVerified">Is true if the user's email is verified to be owned by /// the user.</param> /// <param name="status">The user's status as a member of a specific team.</param> /// <param name="name">Representations for a person's name.</param> /// <param name="membershipType">The user's membership type: full (normal team member) /// vs limited (does not use a license; no access to the team's shared quota).</param> /// <param name="externalId">External ID that a team can attach to the user. An /// application using the API may find it easier to use their own IDs instead of /// Dropbox IDs like account_id or team_member_id.</param> /// <param name="accountId">A user's account identifier.</param> /// <param name="secondaryEmails">Secondary emails of a user.</param> /// <param name="invitedOn">The date and time the user was invited to the team /// (contains value only when the member's status matches <see /// cref="Dropbox.Api.Team.TeamMemberStatus.Invited" />).</param> /// <param name="joinedOn">The date and time the user joined as a member of a specific /// team.</param> /// <param name="suspendedOn">The date and time the user was suspended from the team /// (contains value only when the member's status matches <see /// cref="Dropbox.Api.Team.TeamMemberStatus.Suspended" />).</param> /// <param name="persistentId">Persistent ID that a team can attach to the user. The /// persistent ID is unique ID to be used for SAML authentication.</param> /// <param name="isDirectoryRestricted">Whether the user is a directory restricted /// user.</param> /// <param name="profilePhotoUrl">URL for the photo representing the user, if one is /// set.</param> public MemberProfile(string teamMemberId, string email, bool emailVerified, TeamMemberStatus status, global::Dropbox.Api.Users.Name name, TeamMembershipType membershipType, string externalId = null, string accountId = null, col.IEnumerable <global::Dropbox.Api.SecondaryEmails.SecondaryEmail> secondaryEmails = null, sys.DateTime?invitedOn = null, sys.DateTime?joinedOn = null, sys.DateTime?suspendedOn = null, string persistentId = null, bool?isDirectoryRestricted = null, string profilePhotoUrl = null) { if (teamMemberId == null) { throw new sys.ArgumentNullException("teamMemberId"); } if (email == null) { throw new sys.ArgumentNullException("email"); } if (status == null) { throw new sys.ArgumentNullException("status"); } if (name == null) { throw new sys.ArgumentNullException("name"); } if (membershipType == null) { throw new sys.ArgumentNullException("membershipType"); } if (accountId != null) { if (accountId.Length < 40) { throw new sys.ArgumentOutOfRangeException("accountId", "Length should be at least 40"); } if (accountId.Length > 40) { throw new sys.ArgumentOutOfRangeException("accountId", "Length should be at most 40"); } } var secondaryEmailsList = enc.Util.ToList(secondaryEmails); this.TeamMemberId = teamMemberId; this.Email = email; this.EmailVerified = emailVerified; this.Status = status; this.Name = name; this.MembershipType = membershipType; this.ExternalId = externalId; this.AccountId = accountId; this.SecondaryEmails = secondaryEmailsList; this.InvitedOn = invitedOn; this.JoinedOn = joinedOn; this.SuspendedOn = suspendedOn; this.PersistentId = persistentId; this.IsDirectoryRestricted = isDirectoryRestricted; this.ProfilePhotoUrl = profilePhotoUrl; }
/// <summary> /// <para>Initializes a new instance of the <see cref="LegalHoldHeldRevisionMetadata" /// /> class.</para> /// </summary> /// <param name="newFilename">The held revision filename.</param> /// <param name="originalRevisionId">The id of the held revision.</param> /// <param name="originalFilePath">The original path of the held revision.</param> /// <param name="serverModified">The last time the file was modified on /// Dropbox.</param> /// <param name="authorMemberId">The member id of the revision's author.</param> /// <param name="authorMemberStatus">The member status of the revision's /// author.</param> /// <param name="authorEmail">The email address of the held revision author.</param> /// <param name="fileType">The type of the held revision's file.</param> /// <param name="size">The file size in bytes.</param> /// <param name="contentHash">A hash of the file content. This field can be used to /// verify data integrity. For more information see our <a /// href="https://www.dropbox.com/developers/reference/content-hash">Content hash</a> /// page.</param> public LegalHoldHeldRevisionMetadata(string newFilename, string originalRevisionId, string originalFilePath, sys.DateTime serverModified, string authorMemberId, TeamMemberStatus authorMemberStatus, string authorEmail, string fileType, ulong size, string contentHash) { if (newFilename == null) { throw new sys.ArgumentNullException("newFilename"); } if (originalRevisionId == null) { throw new sys.ArgumentNullException("originalRevisionId"); } if (originalRevisionId.Length < 9) { throw new sys.ArgumentOutOfRangeException("originalRevisionId", "Length should be at least 9"); } if (!re.Regex.IsMatch(originalRevisionId, @"\A(?:[0-9a-f]+)\z")) { throw new sys.ArgumentOutOfRangeException("originalRevisionId", @"Value should match pattern '\A(?:[0-9a-f]+)\z'"); } if (originalFilePath == null) { throw new sys.ArgumentNullException("originalFilePath"); } if (!re.Regex.IsMatch(originalFilePath, @"\A(?:(/(.|[\r\n])*)?)\z")) { throw new sys.ArgumentOutOfRangeException("originalFilePath", @"Value should match pattern '\A(?:(/(.|[\r\n])*)?)\z'"); } if (authorMemberId == null) { throw new sys.ArgumentNullException("authorMemberId"); } if (authorMemberStatus == null) { throw new sys.ArgumentNullException("authorMemberStatus"); } if (authorEmail == null) { throw new sys.ArgumentNullException("authorEmail"); } if (authorEmail.Length > 255) { throw new sys.ArgumentOutOfRangeException("authorEmail", "Length should be at most 255"); } if (!re.Regex.IsMatch(authorEmail, @"\A(?:^['&A-Za-z0-9._%+-]+@[A-Za-z0-9-][A-Za-z0-9.-]*\.[A-Za-z]{2,15}$)\z")) { throw new sys.ArgumentOutOfRangeException("authorEmail", @"Value should match pattern '\A(?:^['&A-Za-z0-9._%+-]+@[A-Za-z0-9-][A-Za-z0-9.-]*\.[A-Za-z]{2,15}$)\z'"); } if (fileType == null) { throw new sys.ArgumentNullException("fileType"); } if (contentHash == null) { throw new sys.ArgumentNullException("contentHash"); } if (contentHash.Length < 64) { throw new sys.ArgumentOutOfRangeException("contentHash", "Length should be at least 64"); } if (contentHash.Length > 64) { throw new sys.ArgumentOutOfRangeException("contentHash", "Length should be at most 64"); } this.NewFilename = newFilename; this.OriginalRevisionId = originalRevisionId; this.OriginalFilePath = originalFilePath; this.ServerModified = serverModified; this.AuthorMemberId = authorMemberId; this.AuthorMemberStatus = authorMemberStatus; this.AuthorEmail = authorEmail; this.FileType = fileType; this.Size = size; this.ContentHash = contentHash; }