Ejemplo n.º 1
0
 public override void Configure(CommandLineApplication command)
 {
     _app = command;
     command.Description = "Update a Box User";
     _userId             = command.Argument("userId",
                                            "User ID to Update");
     _enterprise  = command.Option("--remove", "Remove the user from the enterprise, convert to free account", CommandOptionType.NoValue);
     _name        = command.Option("-n|--name", "New name of user", CommandOptionType.SingleValue);
     _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);
     _dontPrompt   = SuppressDeletePromptOption.ConfigureOption(command);
     _bulkFilePath = BulkFilePathOption.ConfigureOption(command);
     command.OnExecute(async() =>
     {
         return(await this.Execute());
     });
     base.Configure(command);
 }
Ejemplo n.º 2
0
 public override void Configure(CommandLineApplication command)
 {
     _app = command;
     command.Description = "Delete a Box environment.";
     _name = command.Argument("name",
                              "Name of the environment");
     _dontPrompt = SuppressDeletePromptOption.ConfigureOption(command);
     command.OnExecute(() =>
     {
         return(this.Execute());
     });
     base.Configure(command);
 }
Ejemplo n.º 3
0
 public override void Configure(CommandLineApplication command)
 {
     _app = command;
     command.Description = "Delete a task.";
     _taskId             = command.Argument("taskId",
                                            "Id of task");
     _dontPrompt = SuppressDeletePromptOption.ConfigureOption(command);
     command.OnExecute(async() =>
     {
         return(await this.Execute());
     });
     base.Configure(command);
 }
Ejemplo n.º 4
0
 public override void Configure(CommandLineApplication command)
 {
     _app = command;
     command.Description = "Remove a collaboration";
     _id = command.Argument("collaborationId",
                            "ID of the collaboration");
     _dontPrompt = SuppressDeletePromptOption.ConfigureOption(command);
     command.OnExecute(async() =>
     {
         return(await this.Execute());
     });
     base.Configure(command);
 }
Ejemplo n.º 5
0
 public override void Configure(CommandLineApplication command)
 {
     _app = command;
     command.Description = "Delete a group.";
     _groupId            = command.Argument("groupId",
                                            "Id of group");
     _bulkPath   = BulkFilePathOption.ConfigureOption(command);
     _dontPrompt = SuppressDeletePromptOption.ConfigureOption(command);
     command.OnExecute(async() =>
     {
         return(await this.Execute());
     });
     base.Configure(command);
 }
Ejemplo n.º 6
0
 public override void Configure(CommandLineApplication command)
 {
     _app = command;
     command.Description = "Delete a file.";
     _fileId             = command.Argument("fileId",
                                            "Id of file to delete");
     _etag       = command.Option("--etag", "Only delete if etag value matches", CommandOptionType.SingleValue);
     _force      = command.Option("-f|--force", "Permanently delete a file", CommandOptionType.NoValue);
     _dontPrompt = SuppressDeletePromptOption.ConfigureOption(command);
     command.OnExecute(async() =>
     {
         return(await this.Execute());
     });
     base.Configure(command);
 }
Ejemplo n.º 7
0
 public override void Configure(CommandLineApplication command)
 {
     _app = command;
     command.Description = "Permanently delete an item.";
     _type = command.Argument("type",
                              "Type of item to permanently delete");
     _itemId = command.Argument("itemId",
                                "Id of item to permanently delete");
     _dontPrompt = SuppressDeletePromptOption.ConfigureOption(command);
     command.OnExecute(async() =>
     {
         return(await this.Execute());
     });
     base.Configure(command);
 }
Ejemplo n.º 8
0
 public override void Configure(CommandLineApplication command)
 {
     _app = command;
     command.Description = "Delete a folder";
     _folderId           = command.Argument("folderId",
                                            "Id of folder to delete");
     _recursive  = command.Option("-r|--recursive", "Whether to delete this folder if it has items inside of it.", CommandOptionType.NoValue);
     _force      = command.Option("-f|--force", "Permanently delete a folder", CommandOptionType.NoValue);
     _etag       = command.Option("--etag", "Only delete if etag value matches", CommandOptionType.SingleValue);
     _dontPrompt = SuppressDeletePromptOption.ConfigureOption(command);
     command.OnExecute(async() =>
     {
         return(await this.Execute());
     });
     base.Configure(command);
 }
Ejemplo n.º 9
0
 public override void Configure(CommandLineApplication command)
 {
     _app = command;
     command.Description = "Delete a Box User";
     _userId = command.Argument("userId",
                            "User ID to Delete");
     _notify = command.Option("--notify", "The user should be notified", CommandOptionType.NoValue);
     _force = command.Option("-f|--force", "Delete user even if they own files", CommandOptionType.NoValue);
     _dontPrompt = SuppressDeletePromptOption.ConfigureOption(command);
     _path = BulkFilePathOption.ConfigureOption(command);
     command.OnExecute(async () =>
     {
         return await this.Execute();
     });
     base.Configure(command);
 }
Ejemplo n.º 10
0
 public override void Configure(CommandLineApplication command)
 {
     _app = command;
     command.Description = "Get information about a metadata object.";
     _id = command.Argument("boxItemId",
                            "Id of the Box item");
     _scope = command.Argument("scope",
                               "The scope of the metadata object");
     _template = command.Argument("template",
                                  "The key of the template");
     _dontPrompt = SuppressDeletePromptOption.ConfigureOption(command);
     command.OnExecute(async() =>
     {
         return(await this.Execute());
     });
     base.Configure(command);
 }
Ejemplo n.º 11
0
        public override void Configure(CommandLineApplication command)
        {
            _app = command;
            command.Description = "Delete a shared link for a Box item.";
            _dontPrompt         = SuppressDeletePromptOption.ConfigureOption(command);
            _id = command.Argument("boxItemId",
                                   "Id of the Box item");

            if (base._t == BoxType.enterprise)
            {
                _type = command.Argument("itemType", "Type of item for shared link: either file or folder.");
            }
            command.OnExecute(async() =>
            {
                return(await this.Execute());
            });
            base.Configure(command);
        }