/// <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="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, global::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="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; }