{-# 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.Synthetics.Types.CanaryRunConfigOutput where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CanaryRunConfigOutput = CanaryRunConfigOutput'
{
CanaryRunConfigOutput -> Maybe Natural
timeoutInSeconds :: Prelude.Maybe Prelude.Natural,
CanaryRunConfigOutput -> Maybe Bool
activeTracing :: Prelude.Maybe Prelude.Bool,
CanaryRunConfigOutput -> Maybe Natural
memoryInMB :: Prelude.Maybe Prelude.Natural
}
deriving (CanaryRunConfigOutput -> CanaryRunConfigOutput -> Bool
(CanaryRunConfigOutput -> CanaryRunConfigOutput -> Bool)
-> (CanaryRunConfigOutput -> CanaryRunConfigOutput -> Bool)
-> Eq CanaryRunConfigOutput
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CanaryRunConfigOutput -> CanaryRunConfigOutput -> Bool
$c/= :: CanaryRunConfigOutput -> CanaryRunConfigOutput -> Bool
== :: CanaryRunConfigOutput -> CanaryRunConfigOutput -> Bool
$c== :: CanaryRunConfigOutput -> CanaryRunConfigOutput -> Bool
Prelude.Eq, ReadPrec [CanaryRunConfigOutput]
ReadPrec CanaryRunConfigOutput
Int -> ReadS CanaryRunConfigOutput
ReadS [CanaryRunConfigOutput]
(Int -> ReadS CanaryRunConfigOutput)
-> ReadS [CanaryRunConfigOutput]
-> ReadPrec CanaryRunConfigOutput
-> ReadPrec [CanaryRunConfigOutput]
-> Read CanaryRunConfigOutput
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CanaryRunConfigOutput]
$creadListPrec :: ReadPrec [CanaryRunConfigOutput]
readPrec :: ReadPrec CanaryRunConfigOutput
$creadPrec :: ReadPrec CanaryRunConfigOutput
readList :: ReadS [CanaryRunConfigOutput]
$creadList :: ReadS [CanaryRunConfigOutput]
readsPrec :: Int -> ReadS CanaryRunConfigOutput
$creadsPrec :: Int -> ReadS CanaryRunConfigOutput
Prelude.Read, Int -> CanaryRunConfigOutput -> ShowS
[CanaryRunConfigOutput] -> ShowS
CanaryRunConfigOutput -> String
(Int -> CanaryRunConfigOutput -> ShowS)
-> (CanaryRunConfigOutput -> String)
-> ([CanaryRunConfigOutput] -> ShowS)
-> Show CanaryRunConfigOutput
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CanaryRunConfigOutput] -> ShowS
$cshowList :: [CanaryRunConfigOutput] -> ShowS
show :: CanaryRunConfigOutput -> String
$cshow :: CanaryRunConfigOutput -> String
showsPrec :: Int -> CanaryRunConfigOutput -> ShowS
$cshowsPrec :: Int -> CanaryRunConfigOutput -> ShowS
Prelude.Show, (forall x. CanaryRunConfigOutput -> Rep CanaryRunConfigOutput x)
-> (forall x. Rep CanaryRunConfigOutput x -> CanaryRunConfigOutput)
-> Generic CanaryRunConfigOutput
forall x. Rep CanaryRunConfigOutput x -> CanaryRunConfigOutput
forall x. CanaryRunConfigOutput -> Rep CanaryRunConfigOutput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CanaryRunConfigOutput x -> CanaryRunConfigOutput
$cfrom :: forall x. CanaryRunConfigOutput -> Rep CanaryRunConfigOutput x
Prelude.Generic)
newCanaryRunConfigOutput ::
CanaryRunConfigOutput
newCanaryRunConfigOutput :: CanaryRunConfigOutput
newCanaryRunConfigOutput =
CanaryRunConfigOutput' :: Maybe Natural
-> Maybe Bool -> Maybe Natural -> CanaryRunConfigOutput
CanaryRunConfigOutput'
{ $sel:timeoutInSeconds:CanaryRunConfigOutput' :: Maybe Natural
timeoutInSeconds =
Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:activeTracing:CanaryRunConfigOutput' :: Maybe Bool
activeTracing = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:memoryInMB:CanaryRunConfigOutput' :: Maybe Natural
memoryInMB = Maybe Natural
forall a. Maybe a
Prelude.Nothing
}
canaryRunConfigOutput_timeoutInSeconds :: Lens.Lens' CanaryRunConfigOutput (Prelude.Maybe Prelude.Natural)
canaryRunConfigOutput_timeoutInSeconds :: (Maybe Natural -> f (Maybe Natural))
-> CanaryRunConfigOutput -> f CanaryRunConfigOutput
canaryRunConfigOutput_timeoutInSeconds = (CanaryRunConfigOutput -> Maybe Natural)
-> (CanaryRunConfigOutput
-> Maybe Natural -> CanaryRunConfigOutput)
-> Lens
CanaryRunConfigOutput
CanaryRunConfigOutput
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CanaryRunConfigOutput' {Maybe Natural
timeoutInSeconds :: Maybe Natural
$sel:timeoutInSeconds:CanaryRunConfigOutput' :: CanaryRunConfigOutput -> Maybe Natural
timeoutInSeconds} -> Maybe Natural
timeoutInSeconds) (\s :: CanaryRunConfigOutput
s@CanaryRunConfigOutput' {} Maybe Natural
a -> CanaryRunConfigOutput
s {$sel:timeoutInSeconds:CanaryRunConfigOutput' :: Maybe Natural
timeoutInSeconds = Maybe Natural
a} :: CanaryRunConfigOutput)
canaryRunConfigOutput_activeTracing :: Lens.Lens' CanaryRunConfigOutput (Prelude.Maybe Prelude.Bool)
canaryRunConfigOutput_activeTracing :: (Maybe Bool -> f (Maybe Bool))
-> CanaryRunConfigOutput -> f CanaryRunConfigOutput
canaryRunConfigOutput_activeTracing = (CanaryRunConfigOutput -> Maybe Bool)
-> (CanaryRunConfigOutput -> Maybe Bool -> CanaryRunConfigOutput)
-> Lens
CanaryRunConfigOutput
CanaryRunConfigOutput
(Maybe Bool)
(Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CanaryRunConfigOutput' {Maybe Bool
activeTracing :: Maybe Bool
$sel:activeTracing:CanaryRunConfigOutput' :: CanaryRunConfigOutput -> Maybe Bool
activeTracing} -> Maybe Bool
activeTracing) (\s :: CanaryRunConfigOutput
s@CanaryRunConfigOutput' {} Maybe Bool
a -> CanaryRunConfigOutput
s {$sel:activeTracing:CanaryRunConfigOutput' :: Maybe Bool
activeTracing = Maybe Bool
a} :: CanaryRunConfigOutput)
canaryRunConfigOutput_memoryInMB :: Lens.Lens' CanaryRunConfigOutput (Prelude.Maybe Prelude.Natural)
canaryRunConfigOutput_memoryInMB :: (Maybe Natural -> f (Maybe Natural))
-> CanaryRunConfigOutput -> f CanaryRunConfigOutput
canaryRunConfigOutput_memoryInMB = (CanaryRunConfigOutput -> Maybe Natural)
-> (CanaryRunConfigOutput
-> Maybe Natural -> CanaryRunConfigOutput)
-> Lens
CanaryRunConfigOutput
CanaryRunConfigOutput
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CanaryRunConfigOutput' {Maybe Natural
memoryInMB :: Maybe Natural
$sel:memoryInMB:CanaryRunConfigOutput' :: CanaryRunConfigOutput -> Maybe Natural
memoryInMB} -> Maybe Natural
memoryInMB) (\s :: CanaryRunConfigOutput
s@CanaryRunConfigOutput' {} Maybe Natural
a -> CanaryRunConfigOutput
s {$sel:memoryInMB:CanaryRunConfigOutput' :: Maybe Natural
memoryInMB = Maybe Natural
a} :: CanaryRunConfigOutput)
instance Core.FromJSON CanaryRunConfigOutput where
parseJSON :: Value -> Parser CanaryRunConfigOutput
parseJSON =
String
-> (Object -> Parser CanaryRunConfigOutput)
-> Value
-> Parser CanaryRunConfigOutput
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"CanaryRunConfigOutput"
( \Object
x ->
Maybe Natural
-> Maybe Bool -> Maybe Natural -> CanaryRunConfigOutput
CanaryRunConfigOutput'
(Maybe Natural
-> Maybe Bool -> Maybe Natural -> CanaryRunConfigOutput)
-> Parser (Maybe Natural)
-> Parser (Maybe Bool -> Maybe Natural -> CanaryRunConfigOutput)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TimeoutInSeconds")
Parser (Maybe Bool -> Maybe Natural -> CanaryRunConfigOutput)
-> Parser (Maybe Bool)
-> Parser (Maybe Natural -> CanaryRunConfigOutput)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ActiveTracing")
Parser (Maybe Natural -> CanaryRunConfigOutput)
-> Parser (Maybe Natural) -> Parser CanaryRunConfigOutput
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MemoryInMB")
)
instance Prelude.Hashable CanaryRunConfigOutput
instance Prelude.NFData CanaryRunConfigOutput