{-# LANGUAGE NamedFieldPuns    #-}
{-# LANGUAGE OverloadedStrings #-}

module Qi.Config.AWS.ApiGw.ApiAuthorizer.Accessors where

import           Control.Lens
import           Data.Char            (isAlphaNum)
import qualified Data.HashMap.Strict  as SHM
import qualified Data.Text            as T
import           Protolude

import           Qi.Config.AWS
import           Qi.Config.AWS.ApiGw
import           Qi.Config.Identifier


getChildren
  :: ApiId
  -> Config
  -> [ApiAuthorizerId]
getChildren aid config =
  SHM.lookupDefault [] aid $ config^.apiGwConfig.acApiAuthorizerDeps




# LANGUAGE NamedFieldPuns    #
# LANGUAGE OverloadedStrings #

module Qi.Config.AWS.ApiGw.ApiAuthorizer.Accessors where

import           Control.Lens
import           Data.Char            (isAlphaNum)
import qualified Data.HashMap.Strict  as SHM
import qualified Data.Text            as T
import           Protolude

import           Qi.Config.AWS
import           Qi.Config.AWS.ApiGw
import           Qi.Config.Identifier


getChildren
  :: ApiId
  -> Config
  -> [ApiAuthorizerId]
getChildren aid config =
  SHM.lookupDefault [] aid $ config^.apiGwConfig.acApiAuthorizerDeps



