{-# 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.CanaryRunConfigInput where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CanaryRunConfigInput = CanaryRunConfigInput'
{
CanaryRunConfigInput -> Maybe Natural
timeoutInSeconds :: Prelude.Maybe Prelude.Natural,
CanaryRunConfigInput -> Maybe (HashMap Text Text)
environmentVariables :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CanaryRunConfigInput -> Maybe Bool
activeTracing :: Prelude.Maybe Prelude.Bool,
CanaryRunConfigInput -> Maybe Natural
memoryInMB :: Prelude.Maybe Prelude.Natural
}
deriving (CanaryRunConfigInput -> CanaryRunConfigInput -> Bool
(CanaryRunConfigInput -> CanaryRunConfigInput -> Bool)
-> (CanaryRunConfigInput -> CanaryRunConfigInput -> Bool)
-> Eq CanaryRunConfigInput
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CanaryRunConfigInput -> CanaryRunConfigInput -> Bool
$c/= :: CanaryRunConfigInput -> CanaryRunConfigInput -> Bool
== :: CanaryRunConfigInput -> CanaryRunConfigInput -> Bool
$c== :: CanaryRunConfigInput -> CanaryRunConfigInput -> Bool
Prelude.Eq, ReadPrec [CanaryRunConfigInput]
ReadPrec CanaryRunConfigInput
Int -> ReadS CanaryRunConfigInput
ReadS [CanaryRunConfigInput]
(Int -> ReadS CanaryRunConfigInput)
-> ReadS [CanaryRunConfigInput]
-> ReadPrec CanaryRunConfigInput
-> ReadPrec [CanaryRunConfigInput]
-> Read CanaryRunConfigInput
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CanaryRunConfigInput]
$creadListPrec :: ReadPrec [CanaryRunConfigInput]
readPrec :: ReadPrec CanaryRunConfigInput
$creadPrec :: ReadPrec CanaryRunConfigInput
readList :: ReadS [CanaryRunConfigInput]
$creadList :: ReadS [CanaryRunConfigInput]
readsPrec :: Int -> ReadS CanaryRunConfigInput
$creadsPrec :: Int -> ReadS CanaryRunConfigInput
Prelude.Read, Int -> CanaryRunConfigInput -> ShowS
[CanaryRunConfigInput] -> ShowS
CanaryRunConfigInput -> String
(Int -> CanaryRunConfigInput -> ShowS)
-> (CanaryRunConfigInput -> String)
-> ([CanaryRunConfigInput] -> ShowS)
-> Show CanaryRunConfigInput
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CanaryRunConfigInput] -> ShowS
$cshowList :: [CanaryRunConfigInput] -> ShowS
show :: CanaryRunConfigInput -> String
$cshow :: CanaryRunConfigInput -> String
showsPrec :: Int -> CanaryRunConfigInput -> ShowS
$cshowsPrec :: Int -> CanaryRunConfigInput -> ShowS
Prelude.Show, (forall x. CanaryRunConfigInput -> Rep CanaryRunConfigInput x)
-> (forall x. Rep CanaryRunConfigInput x -> CanaryRunConfigInput)
-> Generic CanaryRunConfigInput
forall x. Rep CanaryRunConfigInput x -> CanaryRunConfigInput
forall x. CanaryRunConfigInput -> Rep CanaryRunConfigInput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CanaryRunConfigInput x -> CanaryRunConfigInput
$cfrom :: forall x. CanaryRunConfigInput -> Rep CanaryRunConfigInput x
Prelude.Generic)
newCanaryRunConfigInput ::
CanaryRunConfigInput
newCanaryRunConfigInput :: CanaryRunConfigInput
newCanaryRunConfigInput =
CanaryRunConfigInput' :: Maybe Natural
-> Maybe (HashMap Text Text)
-> Maybe Bool
-> Maybe Natural
-> CanaryRunConfigInput
CanaryRunConfigInput'
{ $sel:timeoutInSeconds:CanaryRunConfigInput' :: Maybe Natural
timeoutInSeconds =
Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:environmentVariables:CanaryRunConfigInput' :: Maybe (HashMap Text Text)
environmentVariables = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:activeTracing:CanaryRunConfigInput' :: Maybe Bool
activeTracing = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:memoryInMB:CanaryRunConfigInput' :: Maybe Natural
memoryInMB = Maybe Natural
forall a. Maybe a
Prelude.Nothing
}
canaryRunConfigInput_timeoutInSeconds :: Lens.Lens' CanaryRunConfigInput (Prelude.Maybe Prelude.Natural)
canaryRunConfigInput_timeoutInSeconds :: (Maybe Natural -> f (Maybe Natural))
-> CanaryRunConfigInput -> f CanaryRunConfigInput
canaryRunConfigInput_timeoutInSeconds = (CanaryRunConfigInput -> Maybe Natural)
-> (CanaryRunConfigInput -> Maybe Natural -> CanaryRunConfigInput)
-> Lens
CanaryRunConfigInput
CanaryRunConfigInput
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CanaryRunConfigInput' {Maybe Natural
timeoutInSeconds :: Maybe Natural
$sel:timeoutInSeconds:CanaryRunConfigInput' :: CanaryRunConfigInput -> Maybe Natural
timeoutInSeconds} -> Maybe Natural
timeoutInSeconds) (\s :: CanaryRunConfigInput
s@CanaryRunConfigInput' {} Maybe Natural
a -> CanaryRunConfigInput
s {$sel:timeoutInSeconds:CanaryRunConfigInput' :: Maybe Natural
timeoutInSeconds = Maybe Natural
a} :: CanaryRunConfigInput)
canaryRunConfigInput_environmentVariables :: Lens.Lens' CanaryRunConfigInput (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
canaryRunConfigInput_environmentVariables :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CanaryRunConfigInput -> f CanaryRunConfigInput
canaryRunConfigInput_environmentVariables = (CanaryRunConfigInput -> Maybe (HashMap Text Text))
-> (CanaryRunConfigInput
-> Maybe (HashMap Text Text) -> CanaryRunConfigInput)
-> Lens
CanaryRunConfigInput
CanaryRunConfigInput
(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 (\CanaryRunConfigInput' {Maybe (HashMap Text Text)
environmentVariables :: Maybe (HashMap Text Text)
$sel:environmentVariables:CanaryRunConfigInput' :: CanaryRunConfigInput -> Maybe (HashMap Text Text)
environmentVariables} -> Maybe (HashMap Text Text)
environmentVariables) (\s :: CanaryRunConfigInput
s@CanaryRunConfigInput' {} Maybe (HashMap Text Text)
a -> CanaryRunConfigInput
s {$sel:environmentVariables:CanaryRunConfigInput' :: Maybe (HashMap Text Text)
environmentVariables = Maybe (HashMap Text Text)
a} :: CanaryRunConfigInput) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CanaryRunConfigInput -> f CanaryRunConfigInput)
-> ((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)))
-> CanaryRunConfigInput
-> f CanaryRunConfigInput
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
canaryRunConfigInput_activeTracing :: Lens.Lens' CanaryRunConfigInput (Prelude.Maybe Prelude.Bool)
canaryRunConfigInput_activeTracing :: (Maybe Bool -> f (Maybe Bool))
-> CanaryRunConfigInput -> f CanaryRunConfigInput
canaryRunConfigInput_activeTracing = (CanaryRunConfigInput -> Maybe Bool)
-> (CanaryRunConfigInput -> Maybe Bool -> CanaryRunConfigInput)
-> Lens
CanaryRunConfigInput CanaryRunConfigInput (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CanaryRunConfigInput' {Maybe Bool
activeTracing :: Maybe Bool
$sel:activeTracing:CanaryRunConfigInput' :: CanaryRunConfigInput -> Maybe Bool
activeTracing} -> Maybe Bool
activeTracing) (\s :: CanaryRunConfigInput
s@CanaryRunConfigInput' {} Maybe Bool
a -> CanaryRunConfigInput
s {$sel:activeTracing:CanaryRunConfigInput' :: Maybe Bool
activeTracing = Maybe Bool
a} :: CanaryRunConfigInput)
canaryRunConfigInput_memoryInMB :: Lens.Lens' CanaryRunConfigInput (Prelude.Maybe Prelude.Natural)
canaryRunConfigInput_memoryInMB :: (Maybe Natural -> f (Maybe Natural))
-> CanaryRunConfigInput -> f CanaryRunConfigInput
canaryRunConfigInput_memoryInMB = (CanaryRunConfigInput -> Maybe Natural)
-> (CanaryRunConfigInput -> Maybe Natural -> CanaryRunConfigInput)
-> Lens
CanaryRunConfigInput
CanaryRunConfigInput
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CanaryRunConfigInput' {Maybe Natural
memoryInMB :: Maybe Natural
$sel:memoryInMB:CanaryRunConfigInput' :: CanaryRunConfigInput -> Maybe Natural
memoryInMB} -> Maybe Natural
memoryInMB) (\s :: CanaryRunConfigInput
s@CanaryRunConfigInput' {} Maybe Natural
a -> CanaryRunConfigInput
s {$sel:memoryInMB:CanaryRunConfigInput' :: Maybe Natural
memoryInMB = Maybe Natural
a} :: CanaryRunConfigInput)
instance Prelude.Hashable CanaryRunConfigInput
instance Prelude.NFData CanaryRunConfigInput
instance Core.ToJSON CanaryRunConfigInput where
toJSON :: CanaryRunConfigInput -> Value
toJSON CanaryRunConfigInput' {Maybe Bool
Maybe Natural
Maybe (HashMap Text Text)
memoryInMB :: Maybe Natural
activeTracing :: Maybe Bool
environmentVariables :: Maybe (HashMap Text Text)
timeoutInSeconds :: Maybe Natural
$sel:memoryInMB:CanaryRunConfigInput' :: CanaryRunConfigInput -> Maybe Natural
$sel:activeTracing:CanaryRunConfigInput' :: CanaryRunConfigInput -> Maybe Bool
$sel:environmentVariables:CanaryRunConfigInput' :: CanaryRunConfigInput -> Maybe (HashMap Text Text)
$sel:timeoutInSeconds:CanaryRunConfigInput' :: CanaryRunConfigInput -> Maybe Natural
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"TimeoutInSeconds" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
timeoutInSeconds,
(Text
"EnvironmentVariables" 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)
environmentVariables,
(Text
"ActiveTracing" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
activeTracing,
(Text
"MemoryInMB" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
memoryInMB
]
)