/// <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> public TeamMemberProfile(string teamMemberId, string email, bool emailVerified, TeamMemberStatus status, Dropbox.Api.Users.Name name, TeamMembershipType membershipType, col.IEnumerable <string> groups, string externalId = null) : base(teamMemberId, email, emailVerified, status, name, membershipType, 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="CreateFolderBatchArg" /> /// class.</para> /// </summary> /// <param name="paths">List of paths to be created in the user's Dropbox. Duplicate /// path arguments in the batch are considered only once.</param> /// <param name="autorename">If there's a conflict, have the Dropbox server try to /// autorename the folder to avoid the conflict.</param> /// <param name="forceAsync">Whether to force the create to happen /// asynchronously.</param> public CreateFolderBatchArg(col.IEnumerable <string> paths, bool autorename = false, bool forceAsync = false) { var pathsList = enc.Util.ToList(paths); if (paths == null) { throw new sys.ArgumentNullException("paths"); } if (pathsList.Count > 10000) { throw new sys.ArgumentOutOfRangeException("paths", "List should at at most 10000 items"); } this.Paths = pathsList; this.Autorename = autorename; this.ForceAsync = forceAsync; }
/// <summary> /// <para>Initializes a new instance of the <see cref="GetFileMetadataBatchArg" /> /// class.</para> /// </summary> /// <param name="files">The files to query.</param> /// <param name="actions">File actions to query.</param> public GetFileMetadataBatchArg(col.IEnumerable <string> files, col.IEnumerable <FileAction> actions = null) { var filesList = enc.Util.ToList(files); if (files == null) { throw new sys.ArgumentNullException("files"); } if (filesList.Count > 100) { throw new sys.ArgumentOutOfRangeException("files", "List should at at most 100 items"); } var actionsList = enc.Util.ToList(actions); this.Files = filesList; this.Actions = actionsList; }
/// <summary> /// <para>Initializes a new instance of the <see cref="SharedFolderMetadata" /> /// class.</para> /// </summary> /// <param name="name">The name of the this shared folder.</param> /// <param name="sharedFolderId">The ID of the shared folder.</param> /// <param name="accessType">The current user's access level for this shared /// folder.</param> /// <param name="isTeamFolder">Whether this folder is a <a /// href="https://www.dropbox.com/en/help/986">team folder</a>.</param> /// <param name="policy">Policies governing this shared folder.</param> /// <param name="pathLower">The lower-cased full path of this shared folder. Absent for /// unmounted folders.</param> /// <param name="permissions">Actions the current user may perform on the folder and /// its contents. The set of permissions corresponds to the MemberActions in the /// request.</param> public SharedFolderMetadata(string name, string sharedFolderId, AccessLevel accessType, bool isTeamFolder, FolderPolicy policy, string pathLower = null, col.IEnumerable <FolderPermission> permissions = null) { if (name == null) { throw new sys.ArgumentNullException("name"); } if (sharedFolderId == null) { throw new sys.ArgumentNullException("sharedFolderId"); } else if (!re.Regex.IsMatch(sharedFolderId, @"\A(?:[-_0-9a-zA-Z:]+)\z")) { throw new sys.ArgumentOutOfRangeException("sharedFolderId"); } if (accessType == null) { throw new sys.ArgumentNullException("accessType"); } if (policy == null) { throw new sys.ArgumentNullException("policy"); } var permissionsList = enc.Util.ToList(permissions); this.Name = name; this.SharedFolderId = sharedFolderId; this.AccessType = accessType; this.IsTeamFolder = isTeamFolder; this.Policy = policy; this.PathLower = pathLower; this.Permissions = permissionsList; }
/// <summary> /// <para>Initializes a new instance of the <see cref="LegalHoldsPolicyUpdateArg" /> /// class.</para> /// </summary> /// <param name="id">The legal hold Id.</param> /// <param name="members">List of team members to apply the policy on.</param> /// <param name="name">Policy new name.</param> /// <param name="description">Policy new description.</param> public LegalHoldsPolicyUpdateArg(string id, col.IEnumerable <string> members, string name = null, string description = null) { if (id == null) { throw new sys.ArgumentNullException("id"); } if (!re.Regex.IsMatch(id, @"\A(?:^pid_dbhid:.+)\z")) { throw new sys.ArgumentOutOfRangeException("id", @"Value should match pattern '\A(?:^pid_dbhid:.+)\z'"); } var membersList = enc.Util.ToList(members); if (members == null) { throw new sys.ArgumentNullException("members"); } if (name != null) { if (name.Length > 140) { throw new sys.ArgumentOutOfRangeException("name", "Length should be at most 140"); } } if (description != null) { if (description.Length > 501) { throw new sys.ArgumentOutOfRangeException("description", "Length should be at most 501"); } } this.Id = id; this.Members = membersList; this.Name = name; this.Description = description; }
/// <summary> /// <para>Initializes a new instance of the <see cref="ListFileRequestsV2Result" /> /// class.</para> /// </summary> /// <param name="fileRequests">The file requests owned by this user. Apps with the app /// folder permission will only see file requests in their app folder.</param> /// <param name="cursor">Pass the cursor into <see /// cref="Dropbox.Api.FileRequests.Routes.FileRequestsUserRoutes.ListContinueAsync" /> /// to obtain additional file requests.</param> /// <param name="hasMore">Is true if there are additional file requests that have not /// been returned yet. An additional call to :route:list/continue` can retrieve /// them.</param> public ListFileRequestsV2Result(col.IEnumerable <FileRequest> fileRequests, string cursor, bool hasMore) { var fileRequestsList = enc.Util.ToList(fileRequests); if (fileRequests == null) { throw new sys.ArgumentNullException("fileRequests"); } if (cursor == null) { throw new sys.ArgumentNullException("cursor"); } this.FileRequests = fileRequestsList; this.Cursor = cursor; this.HasMore = hasMore; }
/// <summary> /// <para>Initializes a new instance of the <see cref="GroupsListResult" /> /// class.</para> /// </summary> /// <param name="groups">The groups</param> /// <param name="cursor">Pass the cursor into <see /// cref="Dropbox.Api.Team.Routes.TeamRoutes.MembersListContinueAsync" /> to obtain the /// additional members.</param> /// <param name="hasMore">Is true if there are additional team members that have not /// been returned yet. An additional call to <see /// cref="Dropbox.Api.Team.Routes.TeamRoutes.MembersListContinueAsync" /> can retrieve /// them.</param> public GroupsListResult(col.IEnumerable <GroupSummary> groups, string cursor, bool hasMore) { var groupsList = enc.Util.ToList(groups); if (groups == null) { throw new sys.ArgumentNullException("groups"); } if (cursor == null) { throw new sys.ArgumentNullException("cursor"); } this.Groups = groupsList; this.Cursor = cursor; this.HasMore = hasMore; }
/// <summary> /// <para>Initializes a new instance of the <see cref="GroupsMembersListResult" /> /// class.</para> /// </summary> /// <param name="members">The members</param> /// <param name="cursor">Pass the cursor into <see /// cref="Dropbox.Api.Team.Routes.TeamTeamRoutes.GroupsMembersListContinueAsync" /> to /// obtain additional group members.</param> /// <param name="hasMore">Is true if there are additional group members that have not /// been returned yet. An additional call to <see /// cref="Dropbox.Api.Team.Routes.TeamTeamRoutes.GroupsMembersListContinueAsync" /> can /// retrieve them.</param> public GroupsMembersListResult(col.IEnumerable <GroupMemberInfo> members, string cursor, bool hasMore) { var membersList = enc.Util.ToList(members); if (members == null) { throw new sys.ArgumentNullException("members"); } if (cursor == null) { throw new sys.ArgumentNullException("cursor"); } this.Members = membersList; this.Cursor = cursor; this.HasMore = hasMore; }
/// <summary> /// <para>Initializes a new instance of the <see cref="GetTeamEventsResult" /> /// class.</para> /// </summary> /// <param name="events">List of events.</param> /// <param name="cursor">Pass the cursor into <see /// cref="Dropbox.Api.TeamLog.Routes.TeamLogTeamRoutes.GetEventsContinueAsync" /> to /// obtain additional events.</param> /// <param name="hasMore">Is true if there are additional events that have not been /// returned yet. An additional call to <see /// cref="Dropbox.Api.TeamLog.Routes.TeamLogTeamRoutes.GetEventsContinueAsync" /> can /// retrieve them.</param> public GetTeamEventsResult(col.IEnumerable <TeamEvent> events, string cursor, bool hasMore) { var eventsList = enc.Util.ToList(events); if (events == null) { throw new sys.ArgumentNullException("events"); } if (cursor == null) { throw new sys.ArgumentNullException("cursor"); } this.Events = eventsList; this.Cursor = cursor; this.HasMore = hasMore; }
/// <summary> /// <para>Initializes a new instance of the <see cref="ListPaperDocsResponse" /> /// class.</para> /// </summary> /// <param name="docIds">The list of Paper doc IDs that can be used to access the given /// Paper docs or supplied to other API methods. The list is sorted in the order /// specified by the initial call to <see /// cref="Dropbox.Api.Paper.Routes.PaperUserRoutes.DocsListAsync" />.</param> /// <param name="cursor">Pass the cursor into <see /// cref="Dropbox.Api.Paper.Routes.PaperUserRoutes.DocsListContinueAsync" /> to /// paginate through all files. The cursor preserves all properties as specified in the /// original call to <see cref="Dropbox.Api.Paper.Routes.PaperUserRoutes.DocsListAsync" /// />.</param> /// <param name="hasMore">Will be set to True if a subsequent call with the provided /// cursor to <see /// cref="Dropbox.Api.Paper.Routes.PaperUserRoutes.DocsListContinueAsync" /> returns /// immediately with some results. If set to False please allow some delay before /// making another call to <see /// cref="Dropbox.Api.Paper.Routes.PaperUserRoutes.DocsListContinueAsync" />.</param> public ListPaperDocsResponse(col.IEnumerable <string> docIds, Cursor cursor, bool hasMore) { var docIdsList = enc.Util.ToList(docIds); if (docIds == null) { throw new sys.ArgumentNullException("docIds"); } if (cursor == null) { throw new sys.ArgumentNullException("cursor"); } this.DocIds = docIdsList; this.Cursor = cursor; this.HasMore = hasMore; }
/// <summary> /// <para>Initializes a new instance of the <see cref="GroupMembersAddArg" /> /// class.</para> /// </summary> /// <param name="group">Group to which users will be added.</param> /// <param name="members">List of users to be added to the group.</param> /// <param name="returnMembers">Whether to return the list of members in the group. /// Note that the default value will cause all the group members to be returned in the /// response. This may take a long time for large groups.</param> public GroupMembersAddArg(GroupSelector @group, col.IEnumerable <MemberAccess> members, bool returnMembers = true) : base(returnMembers) { if (@group == null) { throw new sys.ArgumentNullException("@group"); } var membersList = enc.Util.ToList(members); if (members == null) { throw new sys.ArgumentNullException("members"); } this.Group = @group; this.Members = membersList; }
/// <summary> /// <para>Initializes a new instance of the <see cref="TeamFolderListResult" /> /// class.</para> /// </summary> /// <param name="teamFolders">List of all team folders in the authenticated /// team.</param> /// <param name="cursor">Pass the cursor into <see /// cref="Dropbox.Api.Team.Routes.TeamTeamRoutes.TeamFolderListContinueAsync" /> to /// obtain additional team folders.</param> /// <param name="hasMore">Is true if there are additional team folders that have not /// been returned yet. An additional call to <see /// cref="Dropbox.Api.Team.Routes.TeamTeamRoutes.TeamFolderListContinueAsync" /> can /// retrieve them.</param> public TeamFolderListResult(col.IEnumerable <TeamFolderMetadata> teamFolders, string cursor, bool hasMore) { var teamFoldersList = enc.Util.ToList(teamFolders); if (teamFolders == null) { throw new sys.ArgumentNullException("teamFolders"); } if (cursor == null) { throw new sys.ArgumentNullException("cursor"); } this.TeamFolders = teamFoldersList; this.Cursor = cursor; this.HasMore = hasMore; }
/// <summary> /// <para>Initializes a new instance of the <see cref="ListFolderResult" /> /// class.</para> /// </summary> /// <param name="entries">The files and (direct) subfolders in the folder.</param> /// <param name="cursor">Pass the cursor into <see /// cref="Dropbox.Api.Files.Routes.FilesRoutes.ListFolderContinueAsync" /> to see /// what's changed in the folder since your previous query.</param> /// <param name="hasMore">If true, then there are more entries available. Pass the /// cursor to <see cref="Dropbox.Api.Files.Routes.FilesRoutes.ListFolderContinueAsync" /// /> to retrieve the rest.</param> public ListFolderResult(col.IEnumerable <Metadata> entries, string cursor, bool hasMore) { var entriesList = new col.List <Metadata>(entries ?? new Metadata[0]); if (entries == null) { throw new sys.ArgumentNullException("entries"); } if (cursor == null) { throw new sys.ArgumentNullException("cursor"); } this.Entries = entriesList; this.Cursor = cursor; this.HasMore = hasMore; }
/// <summary> /// <para>Initializes a new instance of the <see cref="GroupMembersRemoveArg" /> /// class.</para> /// </summary> /// <param name="group">Group from which users will be removed.</param> /// <param name="users">List of users to be removed from the group.</param> /// <param name="returnMembers">Whether to return the list of members in the group. /// Note that the default value will cause all the group members to be returned in the /// response. This may take a long time for large groups.</param> public GroupMembersRemoveArg(GroupSelector @group, col.IEnumerable <UserSelectorArg> users, bool returnMembers = true) : base(returnMembers) { if (@group == null) { throw new sys.ArgumentNullException("@group"); } var usersList = enc.Util.ToList(users); if (users == null) { throw new sys.ArgumentNullException("users"); } this.Group = @group; this.Users = usersList; }
/// <summary> /// <para>Initializes a new instance of the <see /// cref="TeamSharingWhitelistSubjectsChangedDetails" /> class.</para> /// </summary> /// <param name="addedWhitelistSubjects">Domains or emails added to the approved list /// for sharing externally.</param> /// <param name="removedWhitelistSubjects">Domains or emails removed from the approved /// list for sharing externally.</param> public TeamSharingWhitelistSubjectsChangedDetails(col.IEnumerable <string> addedWhitelistSubjects, col.IEnumerable <string> removedWhitelistSubjects) { var addedWhitelistSubjectsList = enc.Util.ToList(addedWhitelistSubjects); if (addedWhitelistSubjects == null) { throw new sys.ArgumentNullException("addedWhitelistSubjects"); } var removedWhitelistSubjectsList = enc.Util.ToList(removedWhitelistSubjects); if (removedWhitelistSubjects == null) { throw new sys.ArgumentNullException("removedWhitelistSubjects"); } this.AddedWhitelistSubjects = addedWhitelistSubjectsList; this.RemovedWhitelistSubjects = removedWhitelistSubjectsList; }
/// <summary> /// <para>Initializes a new instance of the <see cref="TeamNamespacesListResult" /> /// class.</para> /// </summary> /// <param name="namespaces">List of all namespaces the team can access.</param> /// <param name="cursor">Pass the cursor into <see /// cref="Dropbox.Api.Team.Routes.TeamTeamRoutes.NamespacesListContinueAsync" /> to /// obtain additional namespaces. Note that duplicate namespaces may be /// returned.</param> /// <param name="hasMore">Is true if there are additional namespaces that have not been /// returned yet.</param> public TeamNamespacesListResult(col.IEnumerable <NamespaceMetadata> namespaces, string cursor, bool hasMore) { var namespacesList = enc.Util.ToList(namespaces); if (namespaces == null) { throw new sys.ArgumentNullException("namespaces"); } if (cursor == null) { throw new sys.ArgumentNullException("cursor"); } this.Namespaces = namespacesList; this.Cursor = cursor; this.HasMore = hasMore; }
/// <summary> /// <para>Initializes a new instance of the <see cref="SearchOptions" /> class.</para> /// </summary> /// <param name="path">Scopes the search to a path in the user's Dropbox. Searches the /// entire Dropbox if not specified.</param> /// <param name="maxResults">The maximum number of search results to return.</param> /// <param name="orderBy">Specified property of the order of search results. By /// default, results are sorted by relevance.</param> /// <param name="fileStatus">Restricts search to the given file status.</param> /// <param name="filenameOnly">Restricts search to only match on filenames.</param> /// <param name="fileExtensions">Restricts search to only the extensions specified. /// Only supported for active file search.</param> /// <param name="fileCategories">Restricts search to only the file categories /// specified. Only supported for active file search.</param> public SearchOptions(string path = null, ulong maxResults = 100, SearchOrderBy orderBy = null, FileStatus fileStatus = null, bool filenameOnly = false, col.IEnumerable <string> fileExtensions = null, col.IEnumerable <FileCategory> fileCategories = null) { if (path != null) { if (!re.Regex.IsMatch(path, @"\A(?:(/(.|[\r\n])*)?|id:.*|(ns:[0-9]+(/.*)?))\z")) { throw new sys.ArgumentOutOfRangeException("path", @"Value should match pattern '\A(?:(/(.|[\r\n])*)?|id:.*|(ns:[0-9]+(/.*)?))\z'"); } } if (maxResults < 1UL) { throw new sys.ArgumentOutOfRangeException("maxResults", "Value should be greater or equal than 1"); } if (maxResults > 1000UL) { throw new sys.ArgumentOutOfRangeException("maxResults", "Value should be less of equal than 1000"); } if (fileStatus == null) { fileStatus = global::Dropbox.Api.Files.FileStatus.Active.Instance; } var fileExtensionsList = enc.Util.ToList(fileExtensions); var fileCategoriesList = enc.Util.ToList(fileCategories); this.Path = path; this.MaxResults = maxResults; this.OrderBy = orderBy; this.FileStatus = fileStatus; this.FilenameOnly = filenameOnly; this.FileExtensions = fileExtensionsList; this.FileCategories = fileCategoriesList; }
/// <summary> /// <para>Initializes a new instance of the <see cref="SharedFolderMetadata" /> /// class.</para> /// </summary> /// <param name="accessType">The current user's access level for this shared /// folder.</param> /// <param name="isTeamFolder">Whether this folder is a <a /// href="https://www.dropbox.com/en/help/986">team folder</a>.</param> /// <param name="policy">Policies governing this shared folder.</param> /// <param name="name">The name of the this shared folder.</param> /// <param name="sharedFolderId">The ID of the shared folder.</param> /// <param name="timeInvited">Timestamp indicating when the current user was invited to /// this shared folder.</param> /// <param name="previewUrl">URL for displaying a web preview of the shared /// folder.</param> /// <param name="ownerTeam">The team that owns the folder. This field is not present if /// the folder is not owned by a team.</param> /// <param name="parentSharedFolderId">The ID of the parent shared folder. This field /// is present only if the folder is contained within another shared folder.</param> /// <param name="pathLower">The lower-cased full path of this shared folder. Absent for /// unmounted folders.</param> /// <param name="permissions">Actions the current user may perform on the folder and /// its contents. The set of permissions corresponds to the FolderActions in the /// request.</param> public SharedFolderMetadata(AccessLevel accessType, bool isTeamFolder, FolderPolicy policy, string name, string sharedFolderId, sys.DateTime timeInvited, string previewUrl, Dropbox.Api.Users.Team ownerTeam = null, string parentSharedFolderId = null, string pathLower = null, col.IEnumerable <FolderPermission> permissions = null) : base(accessType, isTeamFolder, policy, ownerTeam, parentSharedFolderId) { if (name == null) { throw new sys.ArgumentNullException("name"); } if (sharedFolderId == null) { throw new sys.ArgumentNullException("sharedFolderId"); } if (!re.Regex.IsMatch(sharedFolderId, @"\A(?:[-_0-9a-zA-Z:]+)\z")) { throw new sys.ArgumentOutOfRangeException("sharedFolderId", @"Value should match pattern '\A(?:[-_0-9a-zA-Z:]+)\z'"); } if (previewUrl == null) { throw new sys.ArgumentNullException("previewUrl"); } var permissionsList = enc.Util.ToList(permissions); this.Name = name; this.SharedFolderId = sharedFolderId; this.TimeInvited = timeInvited; this.PreviewUrl = previewUrl; this.PathLower = pathLower; this.Permissions = permissionsList; }
/// <summary> /// <para>Initializes a new instance of the <see cref="JoinTeamDetails" /> /// class.</para> /// </summary> /// <param name="linkedApps">Linked applications. (Deprecated) Please use /// has_linked_apps boolean field instead.</param> /// <param name="linkedDevices">Linked devices. (Deprecated) Please use /// has_linked_devices boolean field instead.</param> /// <param name="linkedSharedFolders">Linked shared folders. (Deprecated) Please use /// has_linked_shared_folders boolean field instead.</param> /// <param name="wasLinkedAppsTruncated">(Deprecated) True if the linked_apps list was /// truncated to the maximum supported length (50).</param> /// <param name="wasLinkedDevicesTruncated">(Deprecated) True if the linked_devices /// list was truncated to the maximum supported length (50).</param> /// <param name="wasLinkedSharedFoldersTruncated">(Deprecated) True if the /// linked_shared_folders list was truncated to the maximum supported length /// (50).</param> /// <param name="hasLinkedApps">True if the user had linked apps at event time.</param> /// <param name="hasLinkedDevices">True if the user had linked apps at event /// time.</param> /// <param name="hasLinkedSharedFolders">True if the user had linked shared folders at /// event time.</param> public JoinTeamDetails(col.IEnumerable <UserLinkedAppLogInfo> linkedApps, col.IEnumerable <LinkedDeviceLogInfo> linkedDevices, col.IEnumerable <FolderLogInfo> linkedSharedFolders, bool?wasLinkedAppsTruncated = null, bool?wasLinkedDevicesTruncated = null, bool?wasLinkedSharedFoldersTruncated = null, bool?hasLinkedApps = null, bool?hasLinkedDevices = null, bool?hasLinkedSharedFolders = null) { var linkedAppsList = enc.Util.ToList(linkedApps); if (linkedApps == null) { throw new sys.ArgumentNullException("linkedApps"); } var linkedDevicesList = enc.Util.ToList(linkedDevices); if (linkedDevices == null) { throw new sys.ArgumentNullException("linkedDevices"); } var linkedSharedFoldersList = enc.Util.ToList(linkedSharedFolders); if (linkedSharedFolders == null) { throw new sys.ArgumentNullException("linkedSharedFolders"); } this.LinkedApps = linkedAppsList; this.LinkedDevices = linkedDevicesList; this.LinkedSharedFolders = linkedSharedFoldersList; this.WasLinkedAppsTruncated = wasLinkedAppsTruncated; this.WasLinkedDevicesTruncated = wasLinkedDevicesTruncated; this.WasLinkedSharedFoldersTruncated = wasLinkedSharedFoldersTruncated; this.HasLinkedApps = hasLinkedApps; this.HasLinkedDevices = hasLinkedDevices; this.HasLinkedSharedFolders = hasLinkedSharedFolders; }
/// <summary> /// <para>Initializes a new instance of the <see cref="TeamEvent" /> class.</para> /// </summary> /// <param name="timestamp">The Dropbox timestamp representing when the action was /// taken.</param> /// <param name="eventCategory">The category that this type of action belongs /// to.</param> /// <param name="eventType">The particular type of action taken.</param> /// <param name="details">The variable event schema applicable to this type of action, /// instantiated with respect to this particular action.</param> /// <param name="actor">The entity who actually performed the action. Might be missing /// due to historical data gap.</param> /// <param name="origin">The origin from which the actor performed the action including /// information about host, ip address, location, session, etc. If the action was /// performed programmatically via the API the origin represents the API /// client.</param> /// <param name="involveNonTeamMember">True if the action involved a non team member /// either as the actor or as one of the affected users. Might be missing due to /// historical data gap.</param> /// <param name="context">The user or team on whose behalf the actor performed the /// action. Might be missing due to historical data gap.</param> /// <param name="participants">Zero or more users and/or groups that are affected by /// the action. Note that this list doesn't include any actors or users in /// context.</param> /// <param name="assets">Zero or more content assets involved in the action. Currently /// these include Dropbox files and folders but in the future we might add other asset /// types such as Paper documents, folders, projects, etc.</param> public TeamEvent(sys.DateTime timestamp, EventCategory eventCategory, EventType eventType, EventDetails details, ActorLogInfo actor = null, OriginLogInfo origin = null, bool?involveNonTeamMember = null, ContextLogInfo context = null, col.IEnumerable <ParticipantLogInfo> participants = null, col.IEnumerable <AssetLogInfo> assets = null) { if (eventCategory == null) { throw new sys.ArgumentNullException("eventCategory"); } if (eventType == null) { throw new sys.ArgumentNullException("eventType"); } if (details == null) { throw new sys.ArgumentNullException("details"); } var participantsList = enc.Util.ToList(participants); var assetsList = enc.Util.ToList(assets); this.Timestamp = timestamp; this.EventCategory = eventCategory; this.EventType = eventType; this.Details = details; this.Actor = actor; this.Origin = origin; this.InvolveNonTeamMember = involveNonTeamMember; this.Context = context; this.Participants = participantsList; this.Assets = assetsList; }
/// <summary> /// <para>Initializes a new instance of the <see cref="RelocationBatchArg" /> /// class.</para> /// </summary> /// <param name="entries">List of entries to be moved or copied. Each entry is <see /// cref="RelocationPath" />.</param> /// <param name="allowSharedFolder">If true, <see /// cref="Dropbox.Api.Files.Routes.FilesUserRoutes.CopyBatchAsync" /> will copy /// contents in shared folder, otherwise <see /// cref="Dropbox.Api.Files.RelocationError.CantCopySharedFolder" /> will be returned /// if <see cref="Dropbox.Api.Files.RelocationPath.FromPath" /> contains shared folder. /// This field is always true for <see /// cref="Dropbox.Api.Files.Routes.FilesUserRoutes.MoveBatchAsync" />.</param> /// <param name="autorename">If there's a conflict with any file, have the Dropbox /// server try to autorename that file to avoid the conflict.</param> /// <param name="allowOwnershipTransfer">Allow moves by owner even if it would result /// in an ownership transfer for the content being moved. This does not apply to /// copies.</param> public RelocationBatchArg(col.IEnumerable <RelocationPath> entries, bool allowSharedFolder = false, bool autorename = false, bool allowOwnershipTransfer = false) { var entriesList = enc.Util.ToList(entries); if (entries == null) { throw new sys.ArgumentNullException("entries"); } if (entriesList.Count < 1) { throw new sys.ArgumentOutOfRangeException("entries", "List should at at least 1 items"); } this.Entries = entriesList; this.AllowSharedFolder = allowSharedFolder; this.Autorename = autorename; this.AllowOwnershipTransfer = allowOwnershipTransfer; }
/// <summary> /// <para>Initializes a new instance of the <see cref="GetFileMetadataArg" /> /// class.</para> /// </summary> /// <param name="file">The file to query.</param> /// <param name="actions">File actions to query.</param> public GetFileMetadataArg(string file, col.IEnumerable <FileAction> actions = null) { if (file == null) { throw new sys.ArgumentNullException("file"); } if (file.Length < 1) { throw new sys.ArgumentOutOfRangeException("file", "Length should be at least 1"); } if (!re.Regex.IsMatch(file, @"\A(?:((/|id:).*|nspath:[^:]*:[^:]*))\z")) { throw new sys.ArgumentOutOfRangeException("file", @"Value should match pattern '\A(?:((/|id:).*|nspath:[^:]*:[^:]*))\z'"); } var actionsList = enc.Util.ToList(actions); this.File = file; this.Actions = actionsList; }
/// <summary> /// <para>Initializes a new instance of the <see cref="AddPaperDocUser" /> /// class.</para> /// </summary> /// <param name="docId">The doc id</param> /// <param name="members">User which should be added to the Paper doc. Specify only /// email or Dropbox account id.</param> /// <param name="customMessage">A personal message that will be emailed to each /// successfully added member.</param> /// <param name="quiet">Clients should set this to true if no email shall be sent to /// added users.</param> public AddPaperDocUser(string docId, col.IEnumerable <AddMember> members, string customMessage = null, bool quiet = false) : base(docId) { var membersList = enc.Util.ToList(members); if (members == null) { throw new sys.ArgumentNullException("members"); } if (membersList.Count > 20) { throw new sys.ArgumentOutOfRangeException("members", "List should at at most 20 items"); } this.Members = membersList; this.CustomMessage = customMessage; this.Quiet = quiet; }
/// <summary> /// <para>Initializes a new instance of the <see cref="PropertiesSearchArg" /> /// class.</para> /// </summary> /// <param name="queries">Queries to search.</param> /// <param name="templateFilter">Filter results to contain only properties associated /// with these template IDs.</param> public PropertiesSearchArg(col.IEnumerable <PropertiesSearchQuery> queries, TemplateFilter templateFilter = null) { var queriesList = enc.Util.ToList(queries); if (queries == null) { throw new sys.ArgumentNullException("queries"); } if (queriesList.Count < 1) { throw new sys.ArgumentOutOfRangeException("queries", "List should at at least 1 items"); } if (templateFilter == null) { templateFilter = global::Dropbox.Api.FileProperties.TemplateFilter.FilterNone.Instance; } this.Queries = queriesList; this.TemplateFilter = templateFilter; }
/// <summary> /// <para>Initializes a new instance of the <see cref="PropertiesSearchResult" /> /// class.</para> /// </summary> /// <param name="matches">A list (possibly empty) of matches for the query.</param> /// <param name="cursor">Pass the cursor into <see /// cref="Dropbox.Api.FileProperties.Routes.FilePropertiesUserRoutes.PropertiesSearchContinueAsync" /// /> to continue to receive search results. Cursor will be null when there are no /// more results.</param> public PropertiesSearchResult(col.IEnumerable <PropertiesSearchMatch> matches, string cursor = null) { var matchesList = enc.Util.ToList(matches); if (matches == null) { throw new sys.ArgumentNullException("matches"); } if (cursor != null) { if (cursor.Length < 1) { throw new sys.ArgumentOutOfRangeException("cursor", "Length should be at least 1"); } } this.Matches = matchesList; this.Cursor = cursor; }
/// <summary> /// <para>Initializes a new instance of the <see cref="MemberDevices" /> class.</para> /// </summary> /// <param name="teamMemberId">The member unique Id</param> /// <param name="webSessions">List of web sessions made by this team member</param> /// <param name="desktopClients">List of desktop clients by this team member</param> /// <param name="mobileClients">List of mobile clients by this team member</param> public MemberDevices(string teamMemberId, col.IEnumerable <ActiveWebSession> webSessions = null, col.IEnumerable <DesktopClientSession> desktopClients = null, col.IEnumerable <MobileClientSession> mobileClients = null) { if (teamMemberId == null) { throw new sys.ArgumentNullException("teamMemberId"); } var webSessionsList = enc.Util.ToList(webSessions); var desktopClientsList = enc.Util.ToList(desktopClients); var mobileClientsList = enc.Util.ToList(mobileClients); this.TeamMemberId = teamMemberId; this.WebSessions = webSessionsList; this.DesktopClients = desktopClientsList; this.MobileClients = mobileClientsList; }
/// <summary> /// <para>Initializes a new instance of the <see cref="RemovePropertiesArg" /> /// class.</para> /// </summary> /// <param name="path">A unique identifier for the file.</param> /// <param name="propertyTemplateIds">A list of identifiers for a property template /// created by route properties/template/add.</param> public RemovePropertiesArg(string path, col.IEnumerable <string> propertyTemplateIds) { if (path == null) { throw new sys.ArgumentNullException("path"); } if (!re.Regex.IsMatch(path, @"\A(?:/(.|[\r\n])*|id:.*)\z")) { throw new sys.ArgumentOutOfRangeException("path", @"Value should match pattern '\A(?:/(.|[\r\n])*|id:.*)\z'"); } var propertyTemplateIdsList = enc.Util.ToList(propertyTemplateIds); if (propertyTemplateIds == null) { throw new sys.ArgumentNullException("propertyTemplateIds"); } this.Path = path; this.PropertyTemplateIds = propertyTemplateIdsList; }
/// <summary> /// <para>Initializes a new instance of the <see cref="AddPropertiesArg" /> /// class.</para> /// </summary> /// <param name="path">A unique identifier for the file or folder.</param> /// <param name="propertyGroups">The property groups which are to be added to a Dropbox /// file. No two groups in the input should refer to the same template.</param> public AddPropertiesArg(string path, col.IEnumerable <PropertyGroup> propertyGroups) { if (path == null) { throw new sys.ArgumentNullException("path"); } if (!re.Regex.IsMatch(path, @"\A(?:/(.|[\r\n])*|id:.*|(ns:[0-9]+(/.*)?))\z")) { throw new sys.ArgumentOutOfRangeException("path", @"Value should match pattern '\A(?:/(.|[\r\n])*|id:.*|(ns:[0-9]+(/.*)?))\z'"); } var propertyGroupsList = enc.Util.ToList(propertyGroups); if (propertyGroups == null) { throw new sys.ArgumentNullException("propertyGroups"); } this.Path = path; this.PropertyGroups = propertyGroupsList; }
/// <summary> /// <para>Initializes a new instance of the <see /// cref="GovernancePolicyRemoveFoldersDetails" /> class.</para> /// </summary> /// <param name="governancePolicyId">Policy ID.</param> /// <param name="name">Policy name.</param> /// <param name="policyType">Policy type.</param> /// <param name="folders">Folders.</param> public GovernancePolicyRemoveFoldersDetails(string governancePolicyId, string name, PolicyType policyType = null, col.IEnumerable <string> folders = null) { if (governancePolicyId == null) { throw new sys.ArgumentNullException("governancePolicyId"); } if (name == null) { throw new sys.ArgumentNullException("name"); } var foldersList = enc.Util.ToList(folders); this.GovernancePolicyId = governancePolicyId; this.Name = name; this.PolicyType = policyType; this.Folders = foldersList; }
/// <summary> /// <para>Initializes a new instance of the <see cref="UpdatePropertyGroupArg" /> /// class.</para> /// </summary> /// <param name="path">A unique identifier for the file.</param> /// <param name="updatePropertyGroups">Filled custom property templates associated with /// a file.</param> public UpdatePropertyGroupArg(string path, col.IEnumerable <PropertyGroupUpdate> updatePropertyGroups) { if (path == null) { throw new sys.ArgumentNullException("path"); } if (!re.Regex.IsMatch(path, @"\A(?:/(.|[\r\n])*|id:.*)\z")) { throw new sys.ArgumentOutOfRangeException("path", @"Value should match pattern '\A(?:/(.|[\r\n])*|id:.*)\z'"); } var updatePropertyGroupsList = enc.Util.ToList(updatePropertyGroups); if (updatePropertyGroups == null) { throw new sys.ArgumentNullException("updatePropertyGroups"); } this.Path = path; this.UpdatePropertyGroups = updatePropertyGroupsList; }