{-# 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.MonitoringJobDefinition where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMaker.Types.MonitoringAppSpecification
import Amazonka.SageMaker.Types.MonitoringBaselineConfig
import Amazonka.SageMaker.Types.MonitoringInput
import Amazonka.SageMaker.Types.MonitoringOutputConfig
import Amazonka.SageMaker.Types.MonitoringResources
import Amazonka.SageMaker.Types.MonitoringStoppingCondition
import Amazonka.SageMaker.Types.NetworkConfig
data MonitoringJobDefinition = MonitoringJobDefinition'
{
MonitoringJobDefinition -> Maybe (HashMap Text Text)
environment :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
MonitoringJobDefinition -> Maybe MonitoringStoppingCondition
stoppingCondition :: Prelude.Maybe MonitoringStoppingCondition,
MonitoringJobDefinition -> Maybe NetworkConfig
networkConfig :: Prelude.Maybe NetworkConfig,
MonitoringJobDefinition -> Maybe MonitoringBaselineConfig
baselineConfig :: Prelude.Maybe MonitoringBaselineConfig,
MonitoringJobDefinition -> NonEmpty MonitoringInput
monitoringInputs :: Prelude.NonEmpty MonitoringInput,
MonitoringJobDefinition -> MonitoringOutputConfig
monitoringOutputConfig :: MonitoringOutputConfig,
MonitoringJobDefinition -> MonitoringResources
monitoringResources :: MonitoringResources,
MonitoringJobDefinition -> MonitoringAppSpecification
monitoringAppSpecification :: MonitoringAppSpecification,
MonitoringJobDefinition -> Text
roleArn :: Prelude.Text
}
deriving (MonitoringJobDefinition -> MonitoringJobDefinition -> Bool
(MonitoringJobDefinition -> MonitoringJobDefinition -> Bool)
-> (MonitoringJobDefinition -> MonitoringJobDefinition -> Bool)
-> Eq MonitoringJobDefinition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MonitoringJobDefinition -> MonitoringJobDefinition -> Bool
$c/= :: MonitoringJobDefinition -> MonitoringJobDefinition -> Bool
== :: MonitoringJobDefinition -> MonitoringJobDefinition -> Bool
$c== :: MonitoringJobDefinition -> MonitoringJobDefinition -> Bool
Prelude.Eq, ReadPrec [MonitoringJobDefinition]
ReadPrec MonitoringJobDefinition
Int -> ReadS MonitoringJobDefinition
ReadS [MonitoringJobDefinition]
(Int -> ReadS MonitoringJobDefinition)
-> ReadS [MonitoringJobDefinition]
-> ReadPrec MonitoringJobDefinition
-> ReadPrec [MonitoringJobDefinition]
-> Read MonitoringJobDefinition
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MonitoringJobDefinition]
$creadListPrec :: ReadPrec [MonitoringJobDefinition]
readPrec :: ReadPrec MonitoringJobDefinition
$creadPrec :: ReadPrec MonitoringJobDefinition
readList :: ReadS [MonitoringJobDefinition]
$creadList :: ReadS [MonitoringJobDefinition]
readsPrec :: Int -> ReadS MonitoringJobDefinition
$creadsPrec :: Int -> ReadS MonitoringJobDefinition
Prelude.Read, Int -> MonitoringJobDefinition -> ShowS
[MonitoringJobDefinition] -> ShowS
MonitoringJobDefinition -> String
(Int -> MonitoringJobDefinition -> ShowS)
-> (MonitoringJobDefinition -> String)
-> ([MonitoringJobDefinition] -> ShowS)
-> Show MonitoringJobDefinition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MonitoringJobDefinition] -> ShowS
$cshowList :: [MonitoringJobDefinition] -> ShowS
show :: MonitoringJobDefinition -> String
$cshow :: MonitoringJobDefinition -> String
showsPrec :: Int -> MonitoringJobDefinition -> ShowS
$cshowsPrec :: Int -> MonitoringJobDefinition -> ShowS
Prelude.Show, (forall x.
MonitoringJobDefinition -> Rep MonitoringJobDefinition x)
-> (forall x.
Rep MonitoringJobDefinition x -> MonitoringJobDefinition)
-> Generic MonitoringJobDefinition
forall x. Rep MonitoringJobDefinition x -> MonitoringJobDefinition
forall x. MonitoringJobDefinition -> Rep MonitoringJobDefinition x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MonitoringJobDefinition x -> MonitoringJobDefinition
$cfrom :: forall x. MonitoringJobDefinition -> Rep MonitoringJobDefinition x
Prelude.Generic)
newMonitoringJobDefinition ::
Prelude.NonEmpty MonitoringInput ->
MonitoringOutputConfig ->
MonitoringResources ->
MonitoringAppSpecification ->
Prelude.Text ->
MonitoringJobDefinition
newMonitoringJobDefinition :: NonEmpty MonitoringInput
-> MonitoringOutputConfig
-> MonitoringResources
-> MonitoringAppSpecification
-> Text
-> MonitoringJobDefinition
newMonitoringJobDefinition
NonEmpty MonitoringInput
pMonitoringInputs_
MonitoringOutputConfig
pMonitoringOutputConfig_
MonitoringResources
pMonitoringResources_
MonitoringAppSpecification
pMonitoringAppSpecification_
Text
pRoleArn_ =
MonitoringJobDefinition' :: Maybe (HashMap Text Text)
-> Maybe MonitoringStoppingCondition
-> Maybe NetworkConfig
-> Maybe MonitoringBaselineConfig
-> NonEmpty MonitoringInput
-> MonitoringOutputConfig
-> MonitoringResources
-> MonitoringAppSpecification
-> Text
-> MonitoringJobDefinition
MonitoringJobDefinition'
{ $sel:environment:MonitoringJobDefinition' :: Maybe (HashMap Text Text)
environment =
Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:stoppingCondition:MonitoringJobDefinition' :: Maybe MonitoringStoppingCondition
stoppingCondition = Maybe MonitoringStoppingCondition
forall a. Maybe a
Prelude.Nothing,
$sel:networkConfig:MonitoringJobDefinition' :: Maybe NetworkConfig
networkConfig = Maybe NetworkConfig
forall a. Maybe a
Prelude.Nothing,
$sel:baselineConfig:MonitoringJobDefinition' :: Maybe MonitoringBaselineConfig
baselineConfig = Maybe MonitoringBaselineConfig
forall a. Maybe a
Prelude.Nothing,
$sel:monitoringInputs:MonitoringJobDefinition' :: NonEmpty MonitoringInput
monitoringInputs =
Tagged
(NonEmpty MonitoringInput) (Identity (NonEmpty MonitoringInput))
-> Tagged
(NonEmpty MonitoringInput) (Identity (NonEmpty MonitoringInput))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced (Tagged
(NonEmpty MonitoringInput) (Identity (NonEmpty MonitoringInput))
-> Tagged
(NonEmpty MonitoringInput) (Identity (NonEmpty MonitoringInput)))
-> NonEmpty MonitoringInput -> NonEmpty MonitoringInput
forall t b. AReview t b -> b -> t
Lens.# NonEmpty MonitoringInput
pMonitoringInputs_,
$sel:monitoringOutputConfig:MonitoringJobDefinition' :: MonitoringOutputConfig
monitoringOutputConfig = MonitoringOutputConfig
pMonitoringOutputConfig_,
$sel:monitoringResources:MonitoringJobDefinition' :: MonitoringResources
monitoringResources = MonitoringResources
pMonitoringResources_,
$sel:monitoringAppSpecification:MonitoringJobDefinition' :: MonitoringAppSpecification
monitoringAppSpecification =
MonitoringAppSpecification
pMonitoringAppSpecification_,
$sel:roleArn:MonitoringJobDefinition' :: Text
roleArn = Text
pRoleArn_
}
monitoringJobDefinition_environment :: Lens.Lens' MonitoringJobDefinition (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
monitoringJobDefinition_environment :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> MonitoringJobDefinition -> f MonitoringJobDefinition
monitoringJobDefinition_environment = (MonitoringJobDefinition -> Maybe (HashMap Text Text))
-> (MonitoringJobDefinition
-> Maybe (HashMap Text Text) -> MonitoringJobDefinition)
-> Lens
MonitoringJobDefinition
MonitoringJobDefinition
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MonitoringJobDefinition' {Maybe (HashMap Text Text)
environment :: Maybe (HashMap Text Text)
$sel:environment:MonitoringJobDefinition' :: MonitoringJobDefinition -> Maybe (HashMap Text Text)
environment} -> Maybe (HashMap Text Text)
environment) (\s :: MonitoringJobDefinition
s@MonitoringJobDefinition' {} Maybe (HashMap Text Text)
a -> MonitoringJobDefinition
s {$sel:environment:MonitoringJobDefinition' :: Maybe (HashMap Text Text)
environment = Maybe (HashMap Text Text)
a} :: MonitoringJobDefinition) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> MonitoringJobDefinition -> f MonitoringJobDefinition)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> MonitoringJobDefinition
-> f MonitoringJobDefinition
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
monitoringJobDefinition_stoppingCondition :: Lens.Lens' MonitoringJobDefinition (Prelude.Maybe MonitoringStoppingCondition)
monitoringJobDefinition_stoppingCondition :: (Maybe MonitoringStoppingCondition
-> f (Maybe MonitoringStoppingCondition))
-> MonitoringJobDefinition -> f MonitoringJobDefinition
monitoringJobDefinition_stoppingCondition = (MonitoringJobDefinition -> Maybe MonitoringStoppingCondition)
-> (MonitoringJobDefinition
-> Maybe MonitoringStoppingCondition -> MonitoringJobDefinition)
-> Lens
MonitoringJobDefinition
MonitoringJobDefinition
(Maybe MonitoringStoppingCondition)
(Maybe MonitoringStoppingCondition)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MonitoringJobDefinition' {Maybe MonitoringStoppingCondition
stoppingCondition :: Maybe MonitoringStoppingCondition
$sel:stoppingCondition:MonitoringJobDefinition' :: MonitoringJobDefinition -> Maybe MonitoringStoppingCondition
stoppingCondition} -> Maybe MonitoringStoppingCondition
stoppingCondition) (\s :: MonitoringJobDefinition
s@MonitoringJobDefinition' {} Maybe MonitoringStoppingCondition
a -> MonitoringJobDefinition
s {$sel:stoppingCondition:MonitoringJobDefinition' :: Maybe MonitoringStoppingCondition
stoppingCondition = Maybe MonitoringStoppingCondition
a} :: MonitoringJobDefinition)
monitoringJobDefinition_networkConfig :: Lens.Lens' MonitoringJobDefinition (Prelude.Maybe NetworkConfig)
monitoringJobDefinition_networkConfig :: (Maybe NetworkConfig -> f (Maybe NetworkConfig))
-> MonitoringJobDefinition -> f MonitoringJobDefinition
monitoringJobDefinition_networkConfig = (MonitoringJobDefinition -> Maybe NetworkConfig)
-> (MonitoringJobDefinition
-> Maybe NetworkConfig -> MonitoringJobDefinition)
-> Lens
MonitoringJobDefinition
MonitoringJobDefinition
(Maybe NetworkConfig)
(Maybe NetworkConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MonitoringJobDefinition' {Maybe NetworkConfig
networkConfig :: Maybe NetworkConfig
$sel:networkConfig:MonitoringJobDefinition' :: MonitoringJobDefinition -> Maybe NetworkConfig
networkConfig} -> Maybe NetworkConfig
networkConfig) (\s :: MonitoringJobDefinition
s@MonitoringJobDefinition' {} Maybe NetworkConfig
a -> MonitoringJobDefinition
s {$sel:networkConfig:MonitoringJobDefinition' :: Maybe NetworkConfig
networkConfig = Maybe NetworkConfig
a} :: MonitoringJobDefinition)
monitoringJobDefinition_baselineConfig :: Lens.Lens' MonitoringJobDefinition (Prelude.Maybe MonitoringBaselineConfig)
monitoringJobDefinition_baselineConfig :: (Maybe MonitoringBaselineConfig
-> f (Maybe MonitoringBaselineConfig))
-> MonitoringJobDefinition -> f MonitoringJobDefinition
monitoringJobDefinition_baselineConfig = (MonitoringJobDefinition -> Maybe MonitoringBaselineConfig)
-> (MonitoringJobDefinition
-> Maybe MonitoringBaselineConfig -> MonitoringJobDefinition)
-> Lens
MonitoringJobDefinition
MonitoringJobDefinition
(Maybe MonitoringBaselineConfig)
(Maybe MonitoringBaselineConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MonitoringJobDefinition' {Maybe MonitoringBaselineConfig
baselineConfig :: Maybe MonitoringBaselineConfig
$sel:baselineConfig:MonitoringJobDefinition' :: MonitoringJobDefinition -> Maybe MonitoringBaselineConfig
baselineConfig} -> Maybe MonitoringBaselineConfig
baselineConfig) (\s :: MonitoringJobDefinition
s@MonitoringJobDefinition' {} Maybe MonitoringBaselineConfig
a -> MonitoringJobDefinition
s {$sel:baselineConfig:MonitoringJobDefinition' :: Maybe MonitoringBaselineConfig
baselineConfig = Maybe MonitoringBaselineConfig
a} :: MonitoringJobDefinition)
monitoringJobDefinition_monitoringInputs :: Lens.Lens' MonitoringJobDefinition (Prelude.NonEmpty MonitoringInput)
monitoringJobDefinition_monitoringInputs :: (NonEmpty MonitoringInput -> f (NonEmpty MonitoringInput))
-> MonitoringJobDefinition -> f MonitoringJobDefinition
monitoringJobDefinition_monitoringInputs = (MonitoringJobDefinition -> NonEmpty MonitoringInput)
-> (MonitoringJobDefinition
-> NonEmpty MonitoringInput -> MonitoringJobDefinition)
-> Lens
MonitoringJobDefinition
MonitoringJobDefinition
(NonEmpty MonitoringInput)
(NonEmpty MonitoringInput)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MonitoringJobDefinition' {NonEmpty MonitoringInput
monitoringInputs :: NonEmpty MonitoringInput
$sel:monitoringInputs:MonitoringJobDefinition' :: MonitoringJobDefinition -> NonEmpty MonitoringInput
monitoringInputs} -> NonEmpty MonitoringInput
monitoringInputs) (\s :: MonitoringJobDefinition
s@MonitoringJobDefinition' {} NonEmpty MonitoringInput
a -> MonitoringJobDefinition
s {$sel:monitoringInputs:MonitoringJobDefinition' :: NonEmpty MonitoringInput
monitoringInputs = NonEmpty MonitoringInput
a} :: MonitoringJobDefinition) ((NonEmpty MonitoringInput -> f (NonEmpty MonitoringInput))
-> MonitoringJobDefinition -> f MonitoringJobDefinition)
-> ((NonEmpty MonitoringInput -> f (NonEmpty MonitoringInput))
-> NonEmpty MonitoringInput -> f (NonEmpty MonitoringInput))
-> (NonEmpty MonitoringInput -> f (NonEmpty MonitoringInput))
-> MonitoringJobDefinition
-> f MonitoringJobDefinition
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (NonEmpty MonitoringInput -> f (NonEmpty MonitoringInput))
-> NonEmpty MonitoringInput -> f (NonEmpty MonitoringInput)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
monitoringJobDefinition_monitoringOutputConfig :: Lens.Lens' MonitoringJobDefinition MonitoringOutputConfig
monitoringJobDefinition_monitoringOutputConfig :: (MonitoringOutputConfig -> f MonitoringOutputConfig)
-> MonitoringJobDefinition -> f MonitoringJobDefinition
monitoringJobDefinition_monitoringOutputConfig = (MonitoringJobDefinition -> MonitoringOutputConfig)
-> (MonitoringJobDefinition
-> MonitoringOutputConfig -> MonitoringJobDefinition)
-> Lens
MonitoringJobDefinition
MonitoringJobDefinition
MonitoringOutputConfig
MonitoringOutputConfig
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MonitoringJobDefinition' {MonitoringOutputConfig
monitoringOutputConfig :: MonitoringOutputConfig
$sel:monitoringOutputConfig:MonitoringJobDefinition' :: MonitoringJobDefinition -> MonitoringOutputConfig
monitoringOutputConfig} -> MonitoringOutputConfig
monitoringOutputConfig) (\s :: MonitoringJobDefinition
s@MonitoringJobDefinition' {} MonitoringOutputConfig
a -> MonitoringJobDefinition
s {$sel:monitoringOutputConfig:MonitoringJobDefinition' :: MonitoringOutputConfig
monitoringOutputConfig = MonitoringOutputConfig
a} :: MonitoringJobDefinition)
monitoringJobDefinition_monitoringResources :: Lens.Lens' MonitoringJobDefinition MonitoringResources
monitoringJobDefinition_monitoringResources :: (MonitoringResources -> f MonitoringResources)
-> MonitoringJobDefinition -> f MonitoringJobDefinition
monitoringJobDefinition_monitoringResources = (MonitoringJobDefinition -> MonitoringResources)
-> (MonitoringJobDefinition
-> MonitoringResources -> MonitoringJobDefinition)
-> Lens
MonitoringJobDefinition
MonitoringJobDefinition
MonitoringResources
MonitoringResources
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MonitoringJobDefinition' {MonitoringResources
monitoringResources :: MonitoringResources
$sel:monitoringResources:MonitoringJobDefinition' :: MonitoringJobDefinition -> MonitoringResources
monitoringResources} -> MonitoringResources
monitoringResources) (\s :: MonitoringJobDefinition
s@MonitoringJobDefinition' {} MonitoringResources
a -> MonitoringJobDefinition
s {$sel:monitoringResources:MonitoringJobDefinition' :: MonitoringResources
monitoringResources = MonitoringResources
a} :: MonitoringJobDefinition)
monitoringJobDefinition_monitoringAppSpecification :: Lens.Lens' MonitoringJobDefinition MonitoringAppSpecification
monitoringJobDefinition_monitoringAppSpecification :: (MonitoringAppSpecification -> f MonitoringAppSpecification)
-> MonitoringJobDefinition -> f MonitoringJobDefinition
monitoringJobDefinition_monitoringAppSpecification = (MonitoringJobDefinition -> MonitoringAppSpecification)
-> (MonitoringJobDefinition
-> MonitoringAppSpecification -> MonitoringJobDefinition)
-> Lens
MonitoringJobDefinition
MonitoringJobDefinition
MonitoringAppSpecification
MonitoringAppSpecification
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MonitoringJobDefinition' {MonitoringAppSpecification
monitoringAppSpecification :: MonitoringAppSpecification
$sel:monitoringAppSpecification:MonitoringJobDefinition' :: MonitoringJobDefinition -> MonitoringAppSpecification
monitoringAppSpecification} -> MonitoringAppSpecification
monitoringAppSpecification) (\s :: MonitoringJobDefinition
s@MonitoringJobDefinition' {} MonitoringAppSpecification
a -> MonitoringJobDefinition
s {$sel:monitoringAppSpecification:MonitoringJobDefinition' :: MonitoringAppSpecification
monitoringAppSpecification = MonitoringAppSpecification
a} :: MonitoringJobDefinition)
monitoringJobDefinition_roleArn :: Lens.Lens' MonitoringJobDefinition Prelude.Text
monitoringJobDefinition_roleArn :: (Text -> f Text)
-> MonitoringJobDefinition -> f MonitoringJobDefinition
monitoringJobDefinition_roleArn = (MonitoringJobDefinition -> Text)
-> (MonitoringJobDefinition -> Text -> MonitoringJobDefinition)
-> Lens MonitoringJobDefinition MonitoringJobDefinition Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MonitoringJobDefinition' {Text
roleArn :: Text
$sel:roleArn:MonitoringJobDefinition' :: MonitoringJobDefinition -> Text
roleArn} -> Text
roleArn) (\s :: MonitoringJobDefinition
s@MonitoringJobDefinition' {} Text
a -> MonitoringJobDefinition
s {$sel:roleArn:MonitoringJobDefinition' :: Text
roleArn = Text
a} :: MonitoringJobDefinition)
instance Core.FromJSON MonitoringJobDefinition where
parseJSON :: Value -> Parser MonitoringJobDefinition
parseJSON =
String
-> (Object -> Parser MonitoringJobDefinition)
-> Value
-> Parser MonitoringJobDefinition
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"MonitoringJobDefinition"
( \Object
x ->
Maybe (HashMap Text Text)
-> Maybe MonitoringStoppingCondition
-> Maybe NetworkConfig
-> Maybe MonitoringBaselineConfig
-> NonEmpty MonitoringInput
-> MonitoringOutputConfig
-> MonitoringResources
-> MonitoringAppSpecification
-> Text
-> MonitoringJobDefinition
MonitoringJobDefinition'
(Maybe (HashMap Text Text)
-> Maybe MonitoringStoppingCondition
-> Maybe NetworkConfig
-> Maybe MonitoringBaselineConfig
-> NonEmpty MonitoringInput
-> MonitoringOutputConfig
-> MonitoringResources
-> MonitoringAppSpecification
-> Text
-> MonitoringJobDefinition)
-> Parser (Maybe (HashMap Text Text))
-> Parser
(Maybe MonitoringStoppingCondition
-> Maybe NetworkConfig
-> Maybe MonitoringBaselineConfig
-> NonEmpty MonitoringInput
-> MonitoringOutputConfig
-> MonitoringResources
-> MonitoringAppSpecification
-> Text
-> MonitoringJobDefinition)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Environment" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe MonitoringStoppingCondition
-> Maybe NetworkConfig
-> Maybe MonitoringBaselineConfig
-> NonEmpty MonitoringInput
-> MonitoringOutputConfig
-> MonitoringResources
-> MonitoringAppSpecification
-> Text
-> MonitoringJobDefinition)
-> Parser (Maybe MonitoringStoppingCondition)
-> Parser
(Maybe NetworkConfig
-> Maybe MonitoringBaselineConfig
-> NonEmpty MonitoringInput
-> MonitoringOutputConfig
-> MonitoringResources
-> MonitoringAppSpecification
-> Text
-> MonitoringJobDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MonitoringStoppingCondition)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StoppingCondition")
Parser
(Maybe NetworkConfig
-> Maybe MonitoringBaselineConfig
-> NonEmpty MonitoringInput
-> MonitoringOutputConfig
-> MonitoringResources
-> MonitoringAppSpecification
-> Text
-> MonitoringJobDefinition)
-> Parser (Maybe NetworkConfig)
-> Parser
(Maybe MonitoringBaselineConfig
-> NonEmpty MonitoringInput
-> MonitoringOutputConfig
-> MonitoringResources
-> MonitoringAppSpecification
-> Text
-> MonitoringJobDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe NetworkConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NetworkConfig")
Parser
(Maybe MonitoringBaselineConfig
-> NonEmpty MonitoringInput
-> MonitoringOutputConfig
-> MonitoringResources
-> MonitoringAppSpecification
-> Text
-> MonitoringJobDefinition)
-> Parser (Maybe MonitoringBaselineConfig)
-> Parser
(NonEmpty MonitoringInput
-> MonitoringOutputConfig
-> MonitoringResources
-> MonitoringAppSpecification
-> Text
-> MonitoringJobDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MonitoringBaselineConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"BaselineConfig")
Parser
(NonEmpty MonitoringInput
-> MonitoringOutputConfig
-> MonitoringResources
-> MonitoringAppSpecification
-> Text
-> MonitoringJobDefinition)
-> Parser (NonEmpty MonitoringInput)
-> Parser
(MonitoringOutputConfig
-> MonitoringResources
-> MonitoringAppSpecification
-> Text
-> MonitoringJobDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (NonEmpty MonitoringInput)
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"MonitoringInputs")
Parser
(MonitoringOutputConfig
-> MonitoringResources
-> MonitoringAppSpecification
-> Text
-> MonitoringJobDefinition)
-> Parser MonitoringOutputConfig
-> Parser
(MonitoringResources
-> MonitoringAppSpecification -> Text -> MonitoringJobDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser MonitoringOutputConfig
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"MonitoringOutputConfig")
Parser
(MonitoringResources
-> MonitoringAppSpecification -> Text -> MonitoringJobDefinition)
-> Parser MonitoringResources
-> Parser
(MonitoringAppSpecification -> Text -> MonitoringJobDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser MonitoringResources
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"MonitoringResources")
Parser
(MonitoringAppSpecification -> Text -> MonitoringJobDefinition)
-> Parser MonitoringAppSpecification
-> Parser (Text -> MonitoringJobDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser MonitoringAppSpecification
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"MonitoringAppSpecification")
Parser (Text -> MonitoringJobDefinition)
-> Parser Text -> Parser MonitoringJobDefinition
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"RoleArn")
)
instance Prelude.Hashable MonitoringJobDefinition
instance Prelude.NFData MonitoringJobDefinition
instance Core.ToJSON MonitoringJobDefinition where
toJSON :: MonitoringJobDefinition -> Value
toJSON MonitoringJobDefinition' {Maybe (HashMap Text Text)
Maybe MonitoringBaselineConfig
Maybe MonitoringStoppingCondition
Maybe NetworkConfig
NonEmpty MonitoringInput
Text
MonitoringAppSpecification
MonitoringResources
MonitoringOutputConfig
roleArn :: Text
monitoringAppSpecification :: MonitoringAppSpecification
monitoringResources :: MonitoringResources
monitoringOutputConfig :: MonitoringOutputConfig
monitoringInputs :: NonEmpty MonitoringInput
baselineConfig :: Maybe MonitoringBaselineConfig
networkConfig :: Maybe NetworkConfig
stoppingCondition :: Maybe MonitoringStoppingCondition
environment :: Maybe (HashMap Text Text)
$sel:roleArn:MonitoringJobDefinition' :: MonitoringJobDefinition -> Text
$sel:monitoringAppSpecification:MonitoringJobDefinition' :: MonitoringJobDefinition -> MonitoringAppSpecification
$sel:monitoringResources:MonitoringJobDefinition' :: MonitoringJobDefinition -> MonitoringResources
$sel:monitoringOutputConfig:MonitoringJobDefinition' :: MonitoringJobDefinition -> MonitoringOutputConfig
$sel:monitoringInputs:MonitoringJobDefinition' :: MonitoringJobDefinition -> NonEmpty MonitoringInput
$sel:baselineConfig:MonitoringJobDefinition' :: MonitoringJobDefinition -> Maybe MonitoringBaselineConfig
$sel:networkConfig:MonitoringJobDefinition' :: MonitoringJobDefinition -> Maybe NetworkConfig
$sel:stoppingCondition:MonitoringJobDefinition' :: MonitoringJobDefinition -> Maybe MonitoringStoppingCondition
$sel:environment:MonitoringJobDefinition' :: MonitoringJobDefinition -> Maybe (HashMap Text Text)
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"Environment" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
environment,
(Text
"StoppingCondition" Text -> MonitoringStoppingCondition -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(MonitoringStoppingCondition -> Pair)
-> Maybe MonitoringStoppingCondition -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MonitoringStoppingCondition
stoppingCondition,
(Text
"NetworkConfig" Text -> NetworkConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NetworkConfig -> Pair) -> Maybe NetworkConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NetworkConfig
networkConfig,
(Text
"BaselineConfig" Text -> MonitoringBaselineConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(MonitoringBaselineConfig -> Pair)
-> Maybe MonitoringBaselineConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MonitoringBaselineConfig
baselineConfig,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"MonitoringInputs" Text -> NonEmpty MonitoringInput -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= NonEmpty MonitoringInput
monitoringInputs),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"MonitoringOutputConfig"
Text -> MonitoringOutputConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= MonitoringOutputConfig
monitoringOutputConfig
),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"MonitoringResources" Text -> MonitoringResources -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= MonitoringResources
monitoringResources),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"MonitoringAppSpecification"
Text -> MonitoringAppSpecification -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= MonitoringAppSpecification
monitoringAppSpecification
),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"RoleArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
roleArn)
]
)