# frozen_string_literal: true
# This file was auto-generated by lib/tasks/web.rake

module Slack
  module Web
    module Api
      module Endpoints
        module AdminConversationsWhitelist
          #
          # Add an allowlist of IDP groups for accessing a channel
          #
          # @option options [Object] :channel_id
          #   The channel to whitelist a group for.
          # @option options [Object] :group_id
          #   The IDP Group ID to whitelist for the private channel.
          # @option options [Object] :team_id
          #   The workspace where the IDP Group and channel exist.
          # @see https://api.slack.com/methods/admin.conversations.whitelist.add
          # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations.whitelist/admin.conversations.whitelist.add.json
          def admin_conversations_whitelist_add(options = {})
            throw ArgumentError.new('Required arguments :channel_id missing') if options[:channel_id].nil?
            throw ArgumentError.new('Required arguments :group_id missing') if options[:group_id].nil?
            logger.warn('admin.conversations.whitelist.add:  Alternative methods: .')
            post('admin.conversations.whitelist.add', options)
          end

          #
          # List all IDP Groups linked to a channel
          #
          # @option options [Object] :channel_id
          #   .
          # @option options [Object] :team_id
          #   The workspace where the channele exists. This argument is required for channels only tied to one workspace, and optional for channels that are shared across an organization.
          # @see https://api.slack.com/methods/admin.conversations.whitelist.listGroupsLinkedToChannel
          # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations.whitelist/admin.conversations.whitelist.listGroupsLinkedToChannel.json
          def admin_conversations_whitelist_listGroupsLinkedToChannel(options = {})
            throw ArgumentError.new('Required arguments :channel_id missing') if options[:channel_id].nil?
            logger.warn('admin.conversations.whitelist.listGroupsLinkedToChannel:  Alternative methods: .')
            post('admin.conversations.whitelist.listGroupsLinkedToChannel', options)
          end

          #
          # Remove an allowlisted IDP group linked to a private channel
          #
          # @option options [Object] :channel_id
          #   The channel to remove a whitelisted group for.
          # @option options [Object] :group_id
          #   The IDP Group ID to remove from the private channel whitelist.
          # @option options [Object] :team_id
          #   The workspace where the IDP Group and channel exist.
          # @see https://api.slack.com/methods/admin.conversations.whitelist.remove
          # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations.whitelist/admin.conversations.whitelist.remove.json
          def admin_conversations_whitelist_remove(options = {})
            throw ArgumentError.new('Required arguments :channel_id missing') if options[:channel_id].nil?
            throw ArgumentError.new('Required arguments :group_id missing') if options[:group_id].nil?
            throw ArgumentError.new('Required arguments :team_id missing') if options[:team_id].nil?
            logger.warn('admin.conversations.whitelist.remove:  Alternative methods: .')
            post('admin.conversations.whitelist.remove', options)
          end
        end
      end
    end
  end
end
