public override void Configure(CommandLineApplication command) { _app = command; command.Description = "Create a new Box User"; _name = command.Argument("name", "The user's name"); _login = command.Argument("login", "The user's email address, not required when creating app users."); _path = BulkFilePathOption.ConfigureOption(command); _appUser = command.Option("--app-user", "Set this user as an app user", CommandOptionType.NoValue); _idOnly = IdOnlyOption.ConfigureOption(command); _role = command.Option("-r|--role", "Role of user. Enter user or coadmin", CommandOptionType.SingleValue); _language = command.Option("-l|--language", "Language of the user (ISO 639-1 Language Code)", CommandOptionType.SingleValue); _syncEnable = command.Option("--sync-enable", "Enable Sync for this user", CommandOptionType.NoValue); _syncDisable = command.Option("--sync-disable", "Disable Box Sync for this user", CommandOptionType.NoValue); _jobTitle = command.Option("-j|--job-title", "Job title of the user", CommandOptionType.SingleValue); _phoneNumber = command.Option("-p|--phone-number", "Phone number of the user", CommandOptionType.SingleValue); _address = command.Option("-a|--address", "Address of the user", CommandOptionType.SingleValue); _spaceAmount = command.Option("-d|--disk-space", "User's available storage in bytes. Value of -1 grants unlimited storage", CommandOptionType.SingleValue); _status = command.Option("-s|--status", "User status. Enter active, inactive, cannot_delete_edit, or cannot_delete_edit_upload", CommandOptionType.SingleValue); _isExemptFromDeviceLimits = command.Option("--is-exempt-from-device-limits", "Exempt user from device limits", CommandOptionType.NoValue); _notExemptFromDeviceLimits = command.Option("--not-exempt-from-device-limits", "User is not exempt from device limits", CommandOptionType.NoValue); _isExemptFromLoginVerificaton = command.Option("--is-exempt-login-verification", "Exempt user from two-factor auth", CommandOptionType.NoValue); _notExemptFromLoginVerification = command.Option("--not-exempt-login-verification", "User is not exempt from two-factor auth", CommandOptionType.NoValue); _isPasswordResetRequired = command.Option("--password-reset", "Force the user to reset password", CommandOptionType.NoValue); command.OnExecute(async() => { return(await this.Execute()); }); base.Configure(command); }
public override void Configure(CommandLineApplication command) { _app = command; command.Description = "Create a collaboration for a Box item."; _path = FilePathOption.ConfigureOption(command); _bulkPath = BulkFilePathOption.ConfigureOption(command); _save = SaveOption.ConfigureOption(command); _fileFormat = FileFormatOption.ConfigureOption(command); _fieldsOption = FieldsOption.ConfigureOption(command); _editor = command.Option("--editor", "Set the role to editor.", CommandOptionType.NoValue); _viewer = command.Option("--viewer", "Set the role to viewer.", CommandOptionType.NoValue); _previewer = command.Option("--previewer", "Set the role to previewer.", CommandOptionType.NoValue); _uploader = command.Option("--uploader", "Set the role to uploader.", CommandOptionType.NoValue); _previewerUploader = command.Option("--previewer-uploader", "Set the role to previewer uploader.", CommandOptionType.NoValue); _viewerUploader = command.Option("--viewer-uploader", "Set the role to viewer uploader.", CommandOptionType.NoValue); _coowner = command.Option("--co-owner", "Set the role to co-owner.", CommandOptionType.NoValue); _role = command.Option("-r|--role", "An option to manually enter the role", CommandOptionType.SingleValue); _userId = command.Option("--user-id", "Id for user to collaborate", CommandOptionType.SingleValue); _groupId = command.Option("--group-id", "Id for group to collaborate", CommandOptionType.SingleValue); _login = command.Option("--login", "Login for user to collaborate", CommandOptionType.SingleValue); _canViewPath = command.Option("--can-view-path", "Whether view path collaboration feature is enabled or not.", CommandOptionType.NoValue); _idOnly = IdOnlyOption.ConfigureOption(command); _id = command.Argument("boxItemId", "Id of the Box item"); if (base._t == BoxType.enterprise) { _type = command.Argument("boxItemType", "Type of Box item"); } command.OnExecute(async() => { return(await this.Execute()); }); base.Configure(command); }
public override void Configure(CommandLineApplication command) { _app = command; command.Description = "Create a task on a file."; _fileId = command.Argument("fileId", "Id of file"); _message = command.Option("--message", "Message for task.", CommandOptionType.SingleValue); _due = command.Option("--due-at", "When this task is due, use format 05h for 5 hours for example.", CommandOptionType.SingleValue); _idOnly = IdOnlyOption.ConfigureOption(command); command.OnExecute(async() => { return(await this.Execute()); }); base.Configure(command); }
public override void Configure(CommandLineApplication command) { _app = command; command.Description = "Move a folder to a different folder."; _folderId = command.Argument("folderId", "Id of folder to move"); _parentFolderId = command.Argument("parentFolderId", "Id of new parent folder"); _etag = command.Option("--etag", "Only move if etag value matches", CommandOptionType.SingleValue); _idOnly = IdOnlyOption.ConfigureOption(command); command.OnExecute(async() => { return(await this.Execute()); }); base.Configure(command); }
public override void Configure(CommandLineApplication command) { _app = command; command.Description = "Copy a folder to a different folder."; _folderId = command.Argument("folderId", "Id of folder to copy"); _parentFolderId = command.Argument("parentFolderId", "Id of new parent folder"); _name = command.Option("-n|--name", "An optional new name for the folder", CommandOptionType.SingleValue); _idOnly = IdOnlyOption.ConfigureOption(command); command.OnExecute(async() => { return(await this.Execute()); }); base.Configure(command); }
public override void Configure(CommandLineApplication command) { _app = command; command.Description = "Create a new webhook"; _path = BulkFilePathOption.ConfigureOption(command); _save = SaveOption.ConfigureOption(command); _idOnly = IdOnlyOption.ConfigureOption(command); _id = command.Argument("boxItemId", "Id of the Box item"); _type = command.Argument("boxItemType", "Type of Box item"); _triggers = command.Argument("triggers", "Triggers for webhook, enter as comma separated list. For example: FILE.DELETED,FILE.PREVIEWED"); _address = command.Argument("address", "URL for your webhook handler"); command.OnExecute(async() => { return(await this.Execute()); }); base.Configure(command); }
public override void Configure(CommandLineApplication command) { _app = command; command.Description = "Create a new folder"; _bulkPath = BulkFilePathOption.ConfigureOption(command); _filePath = FilePathOption.ConfigureOption(command); _fileFormat = FileFormatOption.ConfigureOption(command); _save = SaveOption.ConfigureOption(command); _idOnly = IdOnlyOption.ConfigureOption(command); _parentFolderId = command.Argument("parentFolderId", "Id of parent folder to add new folder to, use '0' for the root folder"); _name = command.Argument("name", "Name of new folder"); command.OnExecute(async() => { return(await this.Execute()); }); base.Configure(command); }
public override void Configure(CommandLineApplication command) { _app = command; command.Description = "Upload a file"; _parentFolderId = command.Option("-p|--parent-folder", "Id of folder to upload file to, defaults to the root folder", CommandOptionType.SingleValue); _path = command.Argument("filePath", "Local path to file"); _name = command.Option("-n|--name", "Provide different name for uploaded file", CommandOptionType.SingleValue); _bulkPath = BulkFilePathOption.ConfigureOption(command); _idOnly = IdOnlyOption.ConfigureOption(command); command.OnExecute(async() => { return(await this.Execute()); }); base.Configure(command); }
public override void Configure(CommandLineApplication command) { _app = command; command.Description = "Upload a local folder to create a new folder in Box"; // _bulkPath = BulkFilePathOption.ConfigureOption(command); // _filePath = FilePathOption.ConfigureOption(command); // _fileFormat = FileFormatOption.ConfigureOption(command); // _save = SaveOption.ConfigureOption(command); _idOnly = IdOnlyOption.ConfigureOption(command); _alternativeFolderName = command.Option("--folder-name", "Name to use for folder if not using local folder name.", CommandOptionType.SingleValue); _parentFolderId = command.Option("-p|--parent-folder", "Id of folder to upload to, defaults to the root folder", CommandOptionType.SingleValue); _folderPath = command.Argument("localFolderPath", "Path to local folder"); command.OnExecute(async() => { return(await this.Execute()); }); base.Configure(command); }
public override void Configure(CommandLineApplication command) { _app = command; command.Description = "Create a new metadata template"; _scope = command.Argument("scope", "The scope of the metadata template"); _name = command.Argument("displayName", "The display name of the template."); _templateKey = command.Option("--template-key", "A unique identifier for the template.", CommandOptionType.SingleValue); _hidden = command.Option("--hidden", "Whether this template is hidden in the UI.", CommandOptionType.NoValue); _bulkFilePaths = command.Option("--bulk-file-path-csv", "Provide file paths for the metadata template CSV file and metadata template fields CSV file, ex: box metadata-templates create --bulk-file-path-csv /path/to/template.csv --bulk-file-path-csv /path/to/fields.csv", CommandOptionType.MultipleValue); _bulkFilePath = BulkFilePathOption.ConfigureOption(command); _idOnly = IdOnlyOption.ConfigureOption(command); command.OnExecute(async() => { return(await this.Execute()); }); base.Configure(command); }
public override void Configure(CommandLineApplication command) { _app = command; command.Description = "Create a group."; _name = command.Argument("name", "Group name"); _bulkPath = BulkFilePathOption.ConfigureOption(command); _save = SaveOption.ConfigureOption(command); _inviteLevel = command.Option("-i|--invite", "Specifies who can invite the group to collaborate. Enter admins_only, admins_and_members, or all_managed_users", CommandOptionType.SingleValue); _viewMembershipLevel = command.Option("-m|--view-members", "Specifies who can view the members of the group. Enter admins_only, admins_and_members, or all_managed_users", CommandOptionType.SingleValue); _idOnly = IdOnlyOption.ConfigureOption(command); command.OnExecute(async() => { return(await this.Execute()); }); base.Configure(command); }