{-# 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.AccessControlListConfiguration 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 AccessControlListConfiguration = AccessControlListConfiguration'
{
AccessControlListConfiguration -> Maybe Text
keyPath :: Prelude.Maybe Prelude.Text
}
deriving (AccessControlListConfiguration
-> AccessControlListConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AccessControlListConfiguration
-> AccessControlListConfiguration -> Bool
$c/= :: AccessControlListConfiguration
-> AccessControlListConfiguration -> Bool
== :: AccessControlListConfiguration
-> AccessControlListConfiguration -> Bool
$c== :: AccessControlListConfiguration
-> AccessControlListConfiguration -> Bool
Prelude.Eq, ReadPrec [AccessControlListConfiguration]
ReadPrec AccessControlListConfiguration
Int -> ReadS AccessControlListConfiguration
ReadS [AccessControlListConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AccessControlListConfiguration]
$creadListPrec :: ReadPrec [AccessControlListConfiguration]
readPrec :: ReadPrec AccessControlListConfiguration
$creadPrec :: ReadPrec AccessControlListConfiguration
readList :: ReadS [AccessControlListConfiguration]
$creadList :: ReadS [AccessControlListConfiguration]
readsPrec :: Int -> ReadS AccessControlListConfiguration
$creadsPrec :: Int -> ReadS AccessControlListConfiguration
Prelude.Read, Int -> AccessControlListConfiguration -> ShowS
[AccessControlListConfiguration] -> ShowS
AccessControlListConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AccessControlListConfiguration] -> ShowS
$cshowList :: [AccessControlListConfiguration] -> ShowS
show :: AccessControlListConfiguration -> String
$cshow :: AccessControlListConfiguration -> String
showsPrec :: Int -> AccessControlListConfiguration -> ShowS
$cshowsPrec :: Int -> AccessControlListConfiguration -> ShowS
Prelude.Show, forall x.
Rep AccessControlListConfiguration x
-> AccessControlListConfiguration
forall x.
AccessControlListConfiguration
-> Rep AccessControlListConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AccessControlListConfiguration x
-> AccessControlListConfiguration
$cfrom :: forall x.
AccessControlListConfiguration
-> Rep AccessControlListConfiguration x
Prelude.Generic)
newAccessControlListConfiguration ::
AccessControlListConfiguration
newAccessControlListConfiguration :: AccessControlListConfiguration
newAccessControlListConfiguration =
AccessControlListConfiguration'
{ $sel:keyPath:AccessControlListConfiguration' :: Maybe Text
keyPath =
forall a. Maybe a
Prelude.Nothing
}
accessControlListConfiguration_keyPath :: Lens.Lens' AccessControlListConfiguration (Prelude.Maybe Prelude.Text)
accessControlListConfiguration_keyPath :: Lens' AccessControlListConfiguration (Maybe Text)
accessControlListConfiguration_keyPath = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AccessControlListConfiguration' {Maybe Text
keyPath :: Maybe Text
$sel:keyPath:AccessControlListConfiguration' :: AccessControlListConfiguration -> Maybe Text
keyPath} -> Maybe Text
keyPath) (\s :: AccessControlListConfiguration
s@AccessControlListConfiguration' {} Maybe Text
a -> AccessControlListConfiguration
s {$sel:keyPath:AccessControlListConfiguration' :: Maybe Text
keyPath = Maybe Text
a} :: AccessControlListConfiguration)
instance Data.FromJSON AccessControlListConfiguration where
parseJSON :: Value -> Parser AccessControlListConfiguration
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"AccessControlListConfiguration"
( \Object
x ->
Maybe Text -> AccessControlListConfiguration
AccessControlListConfiguration'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"KeyPath")
)
instance
Prelude.Hashable
AccessControlListConfiguration
where
hashWithSalt :: Int -> AccessControlListConfiguration -> Int
hashWithSalt
Int
_salt
AccessControlListConfiguration' {Maybe Text
keyPath :: Maybe Text
$sel:keyPath:AccessControlListConfiguration' :: AccessControlListConfiguration -> Maybe Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
keyPath
instance
Prelude.NFData
AccessControlListConfiguration
where
rnf :: AccessControlListConfiguration -> ()
rnf AccessControlListConfiguration' {Maybe Text
keyPath :: Maybe Text
$sel:keyPath:AccessControlListConfiguration' :: AccessControlListConfiguration -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
keyPath
instance Data.ToJSON AccessControlListConfiguration where
toJSON :: AccessControlListConfiguration -> Value
toJSON AccessControlListConfiguration' {Maybe Text
keyPath :: Maybe Text
$sel:keyPath:AccessControlListConfiguration' :: AccessControlListConfiguration -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Key
"KeyPath" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
keyPath]
)