{-# 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.MonitoringOutput where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMaker.Types.MonitoringS3Output
data MonitoringOutput = MonitoringOutput'
{
MonitoringOutput -> MonitoringS3Output
s3Output :: MonitoringS3Output
}
deriving (MonitoringOutput -> MonitoringOutput -> Bool
(MonitoringOutput -> MonitoringOutput -> Bool)
-> (MonitoringOutput -> MonitoringOutput -> Bool)
-> Eq MonitoringOutput
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MonitoringOutput -> MonitoringOutput -> Bool
$c/= :: MonitoringOutput -> MonitoringOutput -> Bool
== :: MonitoringOutput -> MonitoringOutput -> Bool
$c== :: MonitoringOutput -> MonitoringOutput -> Bool
Prelude.Eq, ReadPrec [MonitoringOutput]
ReadPrec MonitoringOutput
Int -> ReadS MonitoringOutput
ReadS [MonitoringOutput]
(Int -> ReadS MonitoringOutput)
-> ReadS [MonitoringOutput]
-> ReadPrec MonitoringOutput
-> ReadPrec [MonitoringOutput]
-> Read MonitoringOutput
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MonitoringOutput]
$creadListPrec :: ReadPrec [MonitoringOutput]
readPrec :: ReadPrec MonitoringOutput
$creadPrec :: ReadPrec MonitoringOutput
readList :: ReadS [MonitoringOutput]
$creadList :: ReadS [MonitoringOutput]
readsPrec :: Int -> ReadS MonitoringOutput
$creadsPrec :: Int -> ReadS MonitoringOutput
Prelude.Read, Int -> MonitoringOutput -> ShowS
[MonitoringOutput] -> ShowS
MonitoringOutput -> String
(Int -> MonitoringOutput -> ShowS)
-> (MonitoringOutput -> String)
-> ([MonitoringOutput] -> ShowS)
-> Show MonitoringOutput
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MonitoringOutput] -> ShowS
$cshowList :: [MonitoringOutput] -> ShowS
show :: MonitoringOutput -> String
$cshow :: MonitoringOutput -> String
showsPrec :: Int -> MonitoringOutput -> ShowS
$cshowsPrec :: Int -> MonitoringOutput -> ShowS
Prelude.Show, (forall x. MonitoringOutput -> Rep MonitoringOutput x)
-> (forall x. Rep MonitoringOutput x -> MonitoringOutput)
-> Generic MonitoringOutput
forall x. Rep MonitoringOutput x -> MonitoringOutput
forall x. MonitoringOutput -> Rep MonitoringOutput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MonitoringOutput x -> MonitoringOutput
$cfrom :: forall x. MonitoringOutput -> Rep MonitoringOutput x
Prelude.Generic)
newMonitoringOutput ::
MonitoringS3Output ->
MonitoringOutput
newMonitoringOutput :: MonitoringS3Output -> MonitoringOutput
newMonitoringOutput MonitoringS3Output
pS3Output_ =
MonitoringOutput' :: MonitoringS3Output -> MonitoringOutput
MonitoringOutput' {$sel:s3Output:MonitoringOutput' :: MonitoringS3Output
s3Output = MonitoringS3Output
pS3Output_}
monitoringOutput_s3Output :: Lens.Lens' MonitoringOutput MonitoringS3Output
monitoringOutput_s3Output :: (MonitoringS3Output -> f MonitoringS3Output)
-> MonitoringOutput -> f MonitoringOutput
monitoringOutput_s3Output = (MonitoringOutput -> MonitoringS3Output)
-> (MonitoringOutput -> MonitoringS3Output -> MonitoringOutput)
-> Lens
MonitoringOutput
MonitoringOutput
MonitoringS3Output
MonitoringS3Output
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MonitoringOutput' {MonitoringS3Output
s3Output :: MonitoringS3Output
$sel:s3Output:MonitoringOutput' :: MonitoringOutput -> MonitoringS3Output
s3Output} -> MonitoringS3Output
s3Output) (\s :: MonitoringOutput
s@MonitoringOutput' {} MonitoringS3Output
a -> MonitoringOutput
s {$sel:s3Output:MonitoringOutput' :: MonitoringS3Output
s3Output = MonitoringS3Output
a} :: MonitoringOutput)
instance Core.FromJSON MonitoringOutput where
parseJSON :: Value -> Parser MonitoringOutput
parseJSON =
String
-> (Object -> Parser MonitoringOutput)
-> Value
-> Parser MonitoringOutput
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"MonitoringOutput"
( \Object
x ->
MonitoringS3Output -> MonitoringOutput
MonitoringOutput' (MonitoringS3Output -> MonitoringOutput)
-> Parser MonitoringS3Output -> Parser MonitoringOutput
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser MonitoringS3Output
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"S3Output")
)
instance Prelude.Hashable MonitoringOutput
instance Prelude.NFData MonitoringOutput
instance Core.ToJSON MonitoringOutput where
toJSON :: MonitoringOutput -> Value
toJSON MonitoringOutput' {MonitoringS3Output
s3Output :: MonitoringS3Output
$sel:s3Output:MonitoringOutput' :: MonitoringOutput -> MonitoringS3Output
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"S3Output" Text -> MonitoringS3Output -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= MonitoringS3Output
s3Output)]
)