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