{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Kendra.Types.AclConfiguration where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data AclConfiguration = AclConfiguration'
{
AclConfiguration -> Text
allowedGroupsColumnName :: Prelude.Text
}
deriving (AclConfiguration -> AclConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AclConfiguration -> AclConfiguration -> Bool
$c/= :: AclConfiguration -> AclConfiguration -> Bool
== :: AclConfiguration -> AclConfiguration -> Bool
$c== :: AclConfiguration -> AclConfiguration -> Bool
Prelude.Eq, ReadPrec [AclConfiguration]
ReadPrec AclConfiguration
Int -> ReadS AclConfiguration
ReadS [AclConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AclConfiguration]
$creadListPrec :: ReadPrec [AclConfiguration]
readPrec :: ReadPrec AclConfiguration
$creadPrec :: ReadPrec AclConfiguration
readList :: ReadS [AclConfiguration]
$creadList :: ReadS [AclConfiguration]
readsPrec :: Int -> ReadS AclConfiguration
$creadsPrec :: Int -> ReadS AclConfiguration
Prelude.Read, Int -> AclConfiguration -> ShowS
[AclConfiguration] -> ShowS
AclConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AclConfiguration] -> ShowS
$cshowList :: [AclConfiguration] -> ShowS
show :: AclConfiguration -> String
$cshow :: AclConfiguration -> String
showsPrec :: Int -> AclConfiguration -> ShowS
$cshowsPrec :: Int -> AclConfiguration -> ShowS
Prelude.Show, forall x. Rep AclConfiguration x -> AclConfiguration
forall x. AclConfiguration -> Rep AclConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AclConfiguration x -> AclConfiguration
$cfrom :: forall x. AclConfiguration -> Rep AclConfiguration x
Prelude.Generic)
newAclConfiguration ::
Prelude.Text ->
AclConfiguration
newAclConfiguration :: Text -> AclConfiguration
newAclConfiguration Text
pAllowedGroupsColumnName_ =
AclConfiguration'
{ $sel:allowedGroupsColumnName:AclConfiguration' :: Text
allowedGroupsColumnName =
Text
pAllowedGroupsColumnName_
}
aclConfiguration_allowedGroupsColumnName :: Lens.Lens' AclConfiguration Prelude.Text
aclConfiguration_allowedGroupsColumnName :: Lens' AclConfiguration Text
aclConfiguration_allowedGroupsColumnName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AclConfiguration' {Text
allowedGroupsColumnName :: Text
$sel:allowedGroupsColumnName:AclConfiguration' :: AclConfiguration -> Text
allowedGroupsColumnName} -> Text
allowedGroupsColumnName) (\s :: AclConfiguration
s@AclConfiguration' {} Text
a -> AclConfiguration
s {$sel:allowedGroupsColumnName:AclConfiguration' :: Text
allowedGroupsColumnName = Text
a} :: AclConfiguration)
instance Data.FromJSON AclConfiguration where
parseJSON :: Value -> Parser AclConfiguration
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"AclConfiguration"
( \Object
x ->
Text -> AclConfiguration
AclConfiguration'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"AllowedGroupsColumnName")
)
instance Prelude.Hashable AclConfiguration where
hashWithSalt :: Int -> AclConfiguration -> Int
hashWithSalt Int
_salt AclConfiguration' {Text
allowedGroupsColumnName :: Text
$sel:allowedGroupsColumnName:AclConfiguration' :: AclConfiguration -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
allowedGroupsColumnName
instance Prelude.NFData AclConfiguration where
rnf :: AclConfiguration -> ()
rnf AclConfiguration' {Text
allowedGroupsColumnName :: Text
$sel:allowedGroupsColumnName:AclConfiguration' :: AclConfiguration -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
allowedGroupsColumnName
instance Data.ToJSON AclConfiguration where
toJSON :: AclConfiguration -> Value
toJSON AclConfiguration' {Text
allowedGroupsColumnName :: Text
$sel:allowedGroupsColumnName:AclConfiguration' :: AclConfiguration -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
( Key
"AllowedGroupsColumnName"
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
allowedGroupsColumnName
)
]
)