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