{-# 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.Comprehend.Types.PiiOutputDataConfig where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data PiiOutputDataConfig = PiiOutputDataConfig'
{
PiiOutputDataConfig -> Maybe Text
kmsKeyId :: Prelude.Maybe Prelude.Text,
PiiOutputDataConfig -> Text
s3Uri :: Prelude.Text
}
deriving (PiiOutputDataConfig -> PiiOutputDataConfig -> Bool
(PiiOutputDataConfig -> PiiOutputDataConfig -> Bool)
-> (PiiOutputDataConfig -> PiiOutputDataConfig -> Bool)
-> Eq PiiOutputDataConfig
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PiiOutputDataConfig -> PiiOutputDataConfig -> Bool
$c/= :: PiiOutputDataConfig -> PiiOutputDataConfig -> Bool
== :: PiiOutputDataConfig -> PiiOutputDataConfig -> Bool
$c== :: PiiOutputDataConfig -> PiiOutputDataConfig -> Bool
Prelude.Eq, ReadPrec [PiiOutputDataConfig]
ReadPrec PiiOutputDataConfig
Int -> ReadS PiiOutputDataConfig
ReadS [PiiOutputDataConfig]
(Int -> ReadS PiiOutputDataConfig)
-> ReadS [PiiOutputDataConfig]
-> ReadPrec PiiOutputDataConfig
-> ReadPrec [PiiOutputDataConfig]
-> Read PiiOutputDataConfig
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PiiOutputDataConfig]
$creadListPrec :: ReadPrec [PiiOutputDataConfig]
readPrec :: ReadPrec PiiOutputDataConfig
$creadPrec :: ReadPrec PiiOutputDataConfig
readList :: ReadS [PiiOutputDataConfig]
$creadList :: ReadS [PiiOutputDataConfig]
readsPrec :: Int -> ReadS PiiOutputDataConfig
$creadsPrec :: Int -> ReadS PiiOutputDataConfig
Prelude.Read, Int -> PiiOutputDataConfig -> ShowS
[PiiOutputDataConfig] -> ShowS
PiiOutputDataConfig -> String
(Int -> PiiOutputDataConfig -> ShowS)
-> (PiiOutputDataConfig -> String)
-> ([PiiOutputDataConfig] -> ShowS)
-> Show PiiOutputDataConfig
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PiiOutputDataConfig] -> ShowS
$cshowList :: [PiiOutputDataConfig] -> ShowS
show :: PiiOutputDataConfig -> String
$cshow :: PiiOutputDataConfig -> String
showsPrec :: Int -> PiiOutputDataConfig -> ShowS
$cshowsPrec :: Int -> PiiOutputDataConfig -> ShowS
Prelude.Show, (forall x. PiiOutputDataConfig -> Rep PiiOutputDataConfig x)
-> (forall x. Rep PiiOutputDataConfig x -> PiiOutputDataConfig)
-> Generic PiiOutputDataConfig
forall x. Rep PiiOutputDataConfig x -> PiiOutputDataConfig
forall x. PiiOutputDataConfig -> Rep PiiOutputDataConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PiiOutputDataConfig x -> PiiOutputDataConfig
$cfrom :: forall x. PiiOutputDataConfig -> Rep PiiOutputDataConfig x
Prelude.Generic)
newPiiOutputDataConfig ::
Prelude.Text ->
PiiOutputDataConfig
newPiiOutputDataConfig :: Text -> PiiOutputDataConfig
newPiiOutputDataConfig Text
pS3Uri_ =
PiiOutputDataConfig' :: Maybe Text -> Text -> PiiOutputDataConfig
PiiOutputDataConfig'
{ $sel:kmsKeyId:PiiOutputDataConfig' :: Maybe Text
kmsKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:s3Uri:PiiOutputDataConfig' :: Text
s3Uri = Text
pS3Uri_
}
piiOutputDataConfig_kmsKeyId :: Lens.Lens' PiiOutputDataConfig (Prelude.Maybe Prelude.Text)
piiOutputDataConfig_kmsKeyId :: (Maybe Text -> f (Maybe Text))
-> PiiOutputDataConfig -> f PiiOutputDataConfig
piiOutputDataConfig_kmsKeyId = (PiiOutputDataConfig -> Maybe Text)
-> (PiiOutputDataConfig -> Maybe Text -> PiiOutputDataConfig)
-> Lens
PiiOutputDataConfig PiiOutputDataConfig (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PiiOutputDataConfig' {Maybe Text
kmsKeyId :: Maybe Text
$sel:kmsKeyId:PiiOutputDataConfig' :: PiiOutputDataConfig -> Maybe Text
kmsKeyId} -> Maybe Text
kmsKeyId) (\s :: PiiOutputDataConfig
s@PiiOutputDataConfig' {} Maybe Text
a -> PiiOutputDataConfig
s {$sel:kmsKeyId:PiiOutputDataConfig' :: Maybe Text
kmsKeyId = Maybe Text
a} :: PiiOutputDataConfig)
piiOutputDataConfig_s3Uri :: Lens.Lens' PiiOutputDataConfig Prelude.Text
piiOutputDataConfig_s3Uri :: (Text -> f Text) -> PiiOutputDataConfig -> f PiiOutputDataConfig
piiOutputDataConfig_s3Uri = (PiiOutputDataConfig -> Text)
-> (PiiOutputDataConfig -> Text -> PiiOutputDataConfig)
-> Lens PiiOutputDataConfig PiiOutputDataConfig Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PiiOutputDataConfig' {Text
s3Uri :: Text
$sel:s3Uri:PiiOutputDataConfig' :: PiiOutputDataConfig -> Text
s3Uri} -> Text
s3Uri) (\s :: PiiOutputDataConfig
s@PiiOutputDataConfig' {} Text
a -> PiiOutputDataConfig
s {$sel:s3Uri:PiiOutputDataConfig' :: Text
s3Uri = Text
a} :: PiiOutputDataConfig)
instance Core.FromJSON PiiOutputDataConfig where
parseJSON :: Value -> Parser PiiOutputDataConfig
parseJSON =
String
-> (Object -> Parser PiiOutputDataConfig)
-> Value
-> Parser PiiOutputDataConfig
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"PiiOutputDataConfig"
( \Object
x ->
Maybe Text -> Text -> PiiOutputDataConfig
PiiOutputDataConfig'
(Maybe Text -> Text -> PiiOutputDataConfig)
-> Parser (Maybe Text) -> Parser (Text -> PiiOutputDataConfig)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"KmsKeyId")
Parser (Text -> PiiOutputDataConfig)
-> Parser Text -> Parser PiiOutputDataConfig
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"S3Uri")
)
instance Prelude.Hashable PiiOutputDataConfig
instance Prelude.NFData PiiOutputDataConfig