{-# 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.MonitoringS3Output 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.ProcessingS3UploadMode
data MonitoringS3Output = MonitoringS3Output'
{
MonitoringS3Output -> Maybe ProcessingS3UploadMode
s3UploadMode :: Prelude.Maybe ProcessingS3UploadMode,
MonitoringS3Output -> Text
s3Uri :: Prelude.Text,
MonitoringS3Output -> Text
localPath :: Prelude.Text
}
deriving (MonitoringS3Output -> MonitoringS3Output -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MonitoringS3Output -> MonitoringS3Output -> Bool
$c/= :: MonitoringS3Output -> MonitoringS3Output -> Bool
== :: MonitoringS3Output -> MonitoringS3Output -> Bool
$c== :: MonitoringS3Output -> MonitoringS3Output -> Bool
Prelude.Eq, ReadPrec [MonitoringS3Output]
ReadPrec MonitoringS3Output
Int -> ReadS MonitoringS3Output
ReadS [MonitoringS3Output]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MonitoringS3Output]
$creadListPrec :: ReadPrec [MonitoringS3Output]
readPrec :: ReadPrec MonitoringS3Output
$creadPrec :: ReadPrec MonitoringS3Output
readList :: ReadS [MonitoringS3Output]
$creadList :: ReadS [MonitoringS3Output]
readsPrec :: Int -> ReadS MonitoringS3Output
$creadsPrec :: Int -> ReadS MonitoringS3Output
Prelude.Read, Int -> MonitoringS3Output -> ShowS
[MonitoringS3Output] -> ShowS
MonitoringS3Output -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MonitoringS3Output] -> ShowS
$cshowList :: [MonitoringS3Output] -> ShowS
show :: MonitoringS3Output -> String
$cshow :: MonitoringS3Output -> String
showsPrec :: Int -> MonitoringS3Output -> ShowS
$cshowsPrec :: Int -> MonitoringS3Output -> ShowS
Prelude.Show, forall x. Rep MonitoringS3Output x -> MonitoringS3Output
forall x. MonitoringS3Output -> Rep MonitoringS3Output x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MonitoringS3Output x -> MonitoringS3Output
$cfrom :: forall x. MonitoringS3Output -> Rep MonitoringS3Output x
Prelude.Generic)
newMonitoringS3Output ::
Prelude.Text ->
Prelude.Text ->
MonitoringS3Output
newMonitoringS3Output :: Text -> Text -> MonitoringS3Output
newMonitoringS3Output Text
pS3Uri_ Text
pLocalPath_ =
MonitoringS3Output'
{ $sel:s3UploadMode:MonitoringS3Output' :: Maybe ProcessingS3UploadMode
s3UploadMode = forall a. Maybe a
Prelude.Nothing,
$sel:s3Uri:MonitoringS3Output' :: Text
s3Uri = Text
pS3Uri_,
$sel:localPath:MonitoringS3Output' :: Text
localPath = Text
pLocalPath_
}
monitoringS3Output_s3UploadMode :: Lens.Lens' MonitoringS3Output (Prelude.Maybe ProcessingS3UploadMode)
monitoringS3Output_s3UploadMode :: Lens' MonitoringS3Output (Maybe ProcessingS3UploadMode)
monitoringS3Output_s3UploadMode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MonitoringS3Output' {Maybe ProcessingS3UploadMode
s3UploadMode :: Maybe ProcessingS3UploadMode
$sel:s3UploadMode:MonitoringS3Output' :: MonitoringS3Output -> Maybe ProcessingS3UploadMode
s3UploadMode} -> Maybe ProcessingS3UploadMode
s3UploadMode) (\s :: MonitoringS3Output
s@MonitoringS3Output' {} Maybe ProcessingS3UploadMode
a -> MonitoringS3Output
s {$sel:s3UploadMode:MonitoringS3Output' :: Maybe ProcessingS3UploadMode
s3UploadMode = Maybe ProcessingS3UploadMode
a} :: MonitoringS3Output)
monitoringS3Output_s3Uri :: Lens.Lens' MonitoringS3Output Prelude.Text
monitoringS3Output_s3Uri :: Lens' MonitoringS3Output Text
monitoringS3Output_s3Uri = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MonitoringS3Output' {Text
s3Uri :: Text
$sel:s3Uri:MonitoringS3Output' :: MonitoringS3Output -> Text
s3Uri} -> Text
s3Uri) (\s :: MonitoringS3Output
s@MonitoringS3Output' {} Text
a -> MonitoringS3Output
s {$sel:s3Uri:MonitoringS3Output' :: Text
s3Uri = Text
a} :: MonitoringS3Output)
monitoringS3Output_localPath :: Lens.Lens' MonitoringS3Output Prelude.Text
monitoringS3Output_localPath :: Lens' MonitoringS3Output Text
monitoringS3Output_localPath = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MonitoringS3Output' {Text
localPath :: Text
$sel:localPath:MonitoringS3Output' :: MonitoringS3Output -> Text
localPath} -> Text
localPath) (\s :: MonitoringS3Output
s@MonitoringS3Output' {} Text
a -> MonitoringS3Output
s {$sel:localPath:MonitoringS3Output' :: Text
localPath = Text
a} :: MonitoringS3Output)
instance Data.FromJSON MonitoringS3Output where
parseJSON :: Value -> Parser MonitoringS3Output
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"MonitoringS3Output"
( \Object
x ->
Maybe ProcessingS3UploadMode -> Text -> Text -> MonitoringS3Output
MonitoringS3Output'
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
"S3UploadMode")
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
"S3Uri")
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
"LocalPath")
)
instance Prelude.Hashable MonitoringS3Output where
hashWithSalt :: Int -> MonitoringS3Output -> Int
hashWithSalt Int
_salt MonitoringS3Output' {Maybe ProcessingS3UploadMode
Text
localPath :: Text
s3Uri :: Text
s3UploadMode :: Maybe ProcessingS3UploadMode
$sel:localPath:MonitoringS3Output' :: MonitoringS3Output -> Text
$sel:s3Uri:MonitoringS3Output' :: MonitoringS3Output -> Text
$sel:s3UploadMode:MonitoringS3Output' :: MonitoringS3Output -> Maybe ProcessingS3UploadMode
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ProcessingS3UploadMode
s3UploadMode
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
s3Uri
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
localPath
instance Prelude.NFData MonitoringS3Output where
rnf :: MonitoringS3Output -> ()
rnf MonitoringS3Output' {Maybe ProcessingS3UploadMode
Text
localPath :: Text
s3Uri :: Text
s3UploadMode :: Maybe ProcessingS3UploadMode
$sel:localPath:MonitoringS3Output' :: MonitoringS3Output -> Text
$sel:s3Uri:MonitoringS3Output' :: MonitoringS3Output -> Text
$sel:s3UploadMode:MonitoringS3Output' :: MonitoringS3Output -> Maybe ProcessingS3UploadMode
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe ProcessingS3UploadMode
s3UploadMode
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
s3Uri
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
localPath
instance Data.ToJSON MonitoringS3Output where
toJSON :: MonitoringS3Output -> Value
toJSON MonitoringS3Output' {Maybe ProcessingS3UploadMode
Text
localPath :: Text
s3Uri :: Text
s3UploadMode :: Maybe ProcessingS3UploadMode
$sel:localPath:MonitoringS3Output' :: MonitoringS3Output -> Text
$sel:s3Uri:MonitoringS3Output' :: MonitoringS3Output -> Text
$sel:s3UploadMode:MonitoringS3Output' :: MonitoringS3Output -> Maybe ProcessingS3UploadMode
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"S3UploadMode" 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 ProcessingS3UploadMode
s3UploadMode,
forall a. a -> Maybe a
Prelude.Just (Key
"S3Uri" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
s3Uri),
forall a. a -> Maybe a
Prelude.Just (Key
"LocalPath" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
localPath)
]
)