{-# 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.InferenceExperimentDataStorageConfig 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
import Amazonka.SageMaker.Types.CaptureContentTypeHeader
data InferenceExperimentDataStorageConfig = InferenceExperimentDataStorageConfig'
{ InferenceExperimentDataStorageConfig
-> Maybe CaptureContentTypeHeader
contentType :: Prelude.Maybe CaptureContentTypeHeader,
InferenceExperimentDataStorageConfig -> Maybe Text
kmsKey :: Prelude.Maybe Prelude.Text,
InferenceExperimentDataStorageConfig -> Text
destination :: Prelude.Text
}
deriving (InferenceExperimentDataStorageConfig
-> InferenceExperimentDataStorageConfig -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InferenceExperimentDataStorageConfig
-> InferenceExperimentDataStorageConfig -> Bool
$c/= :: InferenceExperimentDataStorageConfig
-> InferenceExperimentDataStorageConfig -> Bool
== :: InferenceExperimentDataStorageConfig
-> InferenceExperimentDataStorageConfig -> Bool
$c== :: InferenceExperimentDataStorageConfig
-> InferenceExperimentDataStorageConfig -> Bool
Prelude.Eq, ReadPrec [InferenceExperimentDataStorageConfig]
ReadPrec InferenceExperimentDataStorageConfig
Int -> ReadS InferenceExperimentDataStorageConfig
ReadS [InferenceExperimentDataStorageConfig]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [InferenceExperimentDataStorageConfig]
$creadListPrec :: ReadPrec [InferenceExperimentDataStorageConfig]
readPrec :: ReadPrec InferenceExperimentDataStorageConfig
$creadPrec :: ReadPrec InferenceExperimentDataStorageConfig
readList :: ReadS [InferenceExperimentDataStorageConfig]
$creadList :: ReadS [InferenceExperimentDataStorageConfig]
readsPrec :: Int -> ReadS InferenceExperimentDataStorageConfig
$creadsPrec :: Int -> ReadS InferenceExperimentDataStorageConfig
Prelude.Read, Int -> InferenceExperimentDataStorageConfig -> ShowS
[InferenceExperimentDataStorageConfig] -> ShowS
InferenceExperimentDataStorageConfig -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InferenceExperimentDataStorageConfig] -> ShowS
$cshowList :: [InferenceExperimentDataStorageConfig] -> ShowS
show :: InferenceExperimentDataStorageConfig -> String
$cshow :: InferenceExperimentDataStorageConfig -> String
showsPrec :: Int -> InferenceExperimentDataStorageConfig -> ShowS
$cshowsPrec :: Int -> InferenceExperimentDataStorageConfig -> ShowS
Prelude.Show, forall x.
Rep InferenceExperimentDataStorageConfig x
-> InferenceExperimentDataStorageConfig
forall x.
InferenceExperimentDataStorageConfig
-> Rep InferenceExperimentDataStorageConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep InferenceExperimentDataStorageConfig x
-> InferenceExperimentDataStorageConfig
$cfrom :: forall x.
InferenceExperimentDataStorageConfig
-> Rep InferenceExperimentDataStorageConfig x
Prelude.Generic)
newInferenceExperimentDataStorageConfig ::
Prelude.Text ->
InferenceExperimentDataStorageConfig
newInferenceExperimentDataStorageConfig :: Text -> InferenceExperimentDataStorageConfig
newInferenceExperimentDataStorageConfig Text
pDestination_ =
InferenceExperimentDataStorageConfig'
{ $sel:contentType:InferenceExperimentDataStorageConfig' :: Maybe CaptureContentTypeHeader
contentType =
forall a. Maybe a
Prelude.Nothing,
$sel:kmsKey:InferenceExperimentDataStorageConfig' :: Maybe Text
kmsKey = forall a. Maybe a
Prelude.Nothing,
$sel:destination:InferenceExperimentDataStorageConfig' :: Text
destination = Text
pDestination_
}
inferenceExperimentDataStorageConfig_contentType :: Lens.Lens' InferenceExperimentDataStorageConfig (Prelude.Maybe CaptureContentTypeHeader)
inferenceExperimentDataStorageConfig_contentType :: Lens'
InferenceExperimentDataStorageConfig
(Maybe CaptureContentTypeHeader)
inferenceExperimentDataStorageConfig_contentType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InferenceExperimentDataStorageConfig' {Maybe CaptureContentTypeHeader
contentType :: Maybe CaptureContentTypeHeader
$sel:contentType:InferenceExperimentDataStorageConfig' :: InferenceExperimentDataStorageConfig
-> Maybe CaptureContentTypeHeader
contentType} -> Maybe CaptureContentTypeHeader
contentType) (\s :: InferenceExperimentDataStorageConfig
s@InferenceExperimentDataStorageConfig' {} Maybe CaptureContentTypeHeader
a -> InferenceExperimentDataStorageConfig
s {$sel:contentType:InferenceExperimentDataStorageConfig' :: Maybe CaptureContentTypeHeader
contentType = Maybe CaptureContentTypeHeader
a} :: InferenceExperimentDataStorageConfig)
inferenceExperimentDataStorageConfig_kmsKey :: Lens.Lens' InferenceExperimentDataStorageConfig (Prelude.Maybe Prelude.Text)
inferenceExperimentDataStorageConfig_kmsKey :: Lens' InferenceExperimentDataStorageConfig (Maybe Text)
inferenceExperimentDataStorageConfig_kmsKey = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InferenceExperimentDataStorageConfig' {Maybe Text
kmsKey :: Maybe Text
$sel:kmsKey:InferenceExperimentDataStorageConfig' :: InferenceExperimentDataStorageConfig -> Maybe Text
kmsKey} -> Maybe Text
kmsKey) (\s :: InferenceExperimentDataStorageConfig
s@InferenceExperimentDataStorageConfig' {} Maybe Text
a -> InferenceExperimentDataStorageConfig
s {$sel:kmsKey:InferenceExperimentDataStorageConfig' :: Maybe Text
kmsKey = Maybe Text
a} :: InferenceExperimentDataStorageConfig)
inferenceExperimentDataStorageConfig_destination :: Lens.Lens' InferenceExperimentDataStorageConfig Prelude.Text
inferenceExperimentDataStorageConfig_destination :: Lens' InferenceExperimentDataStorageConfig Text
inferenceExperimentDataStorageConfig_destination = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InferenceExperimentDataStorageConfig' {Text
destination :: Text
$sel:destination:InferenceExperimentDataStorageConfig' :: InferenceExperimentDataStorageConfig -> Text
destination} -> Text
destination) (\s :: InferenceExperimentDataStorageConfig
s@InferenceExperimentDataStorageConfig' {} Text
a -> InferenceExperimentDataStorageConfig
s {$sel:destination:InferenceExperimentDataStorageConfig' :: Text
destination = Text
a} :: InferenceExperimentDataStorageConfig)
instance
Data.FromJSON
InferenceExperimentDataStorageConfig
where
parseJSON :: Value -> Parser InferenceExperimentDataStorageConfig
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"InferenceExperimentDataStorageConfig"
( \Object
x ->
Maybe CaptureContentTypeHeader
-> Maybe Text -> Text -> InferenceExperimentDataStorageConfig
InferenceExperimentDataStorageConfig'
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
"ContentType")
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
"KmsKey")
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
"Destination")
)
instance
Prelude.Hashable
InferenceExperimentDataStorageConfig
where
hashWithSalt :: Int -> InferenceExperimentDataStorageConfig -> Int
hashWithSalt
Int
_salt
InferenceExperimentDataStorageConfig' {Maybe Text
Maybe CaptureContentTypeHeader
Text
destination :: Text
kmsKey :: Maybe Text
contentType :: Maybe CaptureContentTypeHeader
$sel:destination:InferenceExperimentDataStorageConfig' :: InferenceExperimentDataStorageConfig -> Text
$sel:kmsKey:InferenceExperimentDataStorageConfig' :: InferenceExperimentDataStorageConfig -> Maybe Text
$sel:contentType:InferenceExperimentDataStorageConfig' :: InferenceExperimentDataStorageConfig
-> Maybe CaptureContentTypeHeader
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CaptureContentTypeHeader
contentType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
kmsKey
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
destination
instance
Prelude.NFData
InferenceExperimentDataStorageConfig
where
rnf :: InferenceExperimentDataStorageConfig -> ()
rnf InferenceExperimentDataStorageConfig' {Maybe Text
Maybe CaptureContentTypeHeader
Text
destination :: Text
kmsKey :: Maybe Text
contentType :: Maybe CaptureContentTypeHeader
$sel:destination:InferenceExperimentDataStorageConfig' :: InferenceExperimentDataStorageConfig -> Text
$sel:kmsKey:InferenceExperimentDataStorageConfig' :: InferenceExperimentDataStorageConfig -> Maybe Text
$sel:contentType:InferenceExperimentDataStorageConfig' :: InferenceExperimentDataStorageConfig
-> Maybe CaptureContentTypeHeader
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe CaptureContentTypeHeader
contentType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
kmsKey
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
destination
instance
Data.ToJSON
InferenceExperimentDataStorageConfig
where
toJSON :: InferenceExperimentDataStorageConfig -> Value
toJSON InferenceExperimentDataStorageConfig' {Maybe Text
Maybe CaptureContentTypeHeader
Text
destination :: Text
kmsKey :: Maybe Text
contentType :: Maybe CaptureContentTypeHeader
$sel:destination:InferenceExperimentDataStorageConfig' :: InferenceExperimentDataStorageConfig -> Text
$sel:kmsKey:InferenceExperimentDataStorageConfig' :: InferenceExperimentDataStorageConfig -> Maybe Text
$sel:contentType:InferenceExperimentDataStorageConfig' :: InferenceExperimentDataStorageConfig
-> Maybe CaptureContentTypeHeader
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"ContentType" 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 CaptureContentTypeHeader
contentType,
(Key
"KmsKey" 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
kmsKey,
forall a. a -> Maybe a
Prelude.Just (Key
"Destination" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
destination)
]
)