|
| 1 | +# frozen_string_literal: true |
| 2 | +# This file was auto-generated by lib/tasks/web.rake |
| 3 | + |
| 4 | +desc 'AdminBarriers methods.' |
| 5 | +command 'admin_barriers' do |g| |
| 6 | + g.desc 'Create an Information Barrier' |
| 7 | + g.long_desc %( Create an Information Barrier ) |
| 8 | + g.command 'create' do |c| |
| 9 | + c.flag 'barriered_from_usergroup_ids', desc: 'A list of IDP Groups ids that the primary usergroup is to be barriered from.' |
| 10 | + c.flag 'primary_usergroup_id', desc: 'The id of the primary IDP Group.' |
| 11 | + c.flag 'restricted_subjects', desc: 'What kind of interactions are blocked by this barrier? For v1, we only support a list of all 3, eg im, mpim, call.' |
| 12 | + c.action do |_global_options, options, _args| |
| 13 | + puts JSON.dump($client.admin_barriers_create(options)) |
| 14 | + end |
| 15 | + end |
| 16 | + |
| 17 | + g.desc 'Delete an existing Information Barrier' |
| 18 | + g.long_desc %( Delete an existing Information Barrier ) |
| 19 | + g.command 'delete' do |c| |
| 20 | + c.flag 'barrier_id', desc: "The ID of the barrier you're trying to delete." |
| 21 | + c.action do |_global_options, options, _args| |
| 22 | + puts JSON.dump($client.admin_barriers_delete(options)) |
| 23 | + end |
| 24 | + end |
| 25 | + |
| 26 | + g.desc 'Get all Information Barriers for your organization' |
| 27 | + g.long_desc %( Get all Information Barriers for your organization ) |
| 28 | + g.command 'list' do |c| |
| 29 | + c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.' |
| 30 | + c.flag 'limit', desc: 'The maximum number of items to return. Must be between 1 - 1000 both inclusive.' |
| 31 | + c.action do |_global_options, options, _args| |
| 32 | + puts JSON.dump($client.admin_barriers_list(options)) |
| 33 | + end |
| 34 | + end |
| 35 | + |
| 36 | + g.desc 'Update an existing Information Barrier' |
| 37 | + g.long_desc %( Update an existing Information Barrier ) |
| 38 | + g.command 'update' do |c| |
| 39 | + c.flag 'barrier_id', desc: "The ID of the barrier you're trying to modify." |
| 40 | + c.flag 'barriered_from_usergroup_ids', desc: 'A list of IDP Groups ids that the primary usergroup is to be barriered from.' |
| 41 | + c.flag 'primary_usergroup_id', desc: 'The id of the primary IDP Group.' |
| 42 | + c.flag 'restricted_subjects', desc: 'What kind of interactions are blocked by this barrier? For v1, we only support a list of all 3, eg im, mpim, call.' |
| 43 | + c.action do |_global_options, options, _args| |
| 44 | + puts JSON.dump($client.admin_barriers_update(options)) |
| 45 | + end |
| 46 | + end |
| 47 | +end |
0 commit comments