{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data CanaryRunConfigInput = CanaryRunConfigInput'
{
CanaryRunConfigInput -> Maybe Bool
activeTracing :: Prelude.Maybe Prelude.Bool,
CanaryRunConfigInput -> Maybe (HashMap Text Text)
environmentVariables :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CanaryRunConfigInput -> Maybe Natural
memoryInMB :: Prelude.Maybe Prelude.Natural,
CanaryRunConfigInput -> Maybe Natural
timeoutInSeconds :: Prelude.Maybe Prelude.Natural
}
deriving (CanaryRunConfigInput -> CanaryRunConfigInput -> Bool
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]
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
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. 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'
{ $sel:activeTracing:CanaryRunConfigInput' :: Maybe Bool
activeTracing =
forall a. Maybe a
Prelude.Nothing,
$sel:environmentVariables:CanaryRunConfigInput' :: Maybe (HashMap Text Text)
environmentVariables = forall a. Maybe a
Prelude.Nothing,
$sel:memoryInMB:CanaryRunConfigInput' :: Maybe Natural
memoryInMB = forall a. Maybe a
Prelude.Nothing,
$sel:timeoutInSeconds:CanaryRunConfigInput' :: Maybe Natural
timeoutInSeconds = forall a. Maybe a
Prelude.Nothing
}
canaryRunConfigInput_activeTracing :: Lens.Lens' CanaryRunConfigInput (Prelude.Maybe Prelude.Bool)
canaryRunConfigInput_activeTracing :: Lens' CanaryRunConfigInput (Maybe Bool)
canaryRunConfigInput_activeTracing = 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_environmentVariables :: Lens.Lens' CanaryRunConfigInput (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
canaryRunConfigInput_environmentVariables :: Lens' CanaryRunConfigInput (Maybe (HashMap Text Text))
canaryRunConfigInput_environmentVariables = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
canaryRunConfigInput_memoryInMB :: Lens.Lens' CanaryRunConfigInput (Prelude.Maybe Prelude.Natural)
canaryRunConfigInput_memoryInMB :: Lens' CanaryRunConfigInput (Maybe Natural)
canaryRunConfigInput_memoryInMB = 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)
canaryRunConfigInput_timeoutInSeconds :: Lens.Lens' CanaryRunConfigInput (Prelude.Maybe Prelude.Natural)
canaryRunConfigInput_timeoutInSeconds :: Lens' CanaryRunConfigInput (Maybe Natural)
canaryRunConfigInput_timeoutInSeconds = 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)
instance Prelude.Hashable CanaryRunConfigInput where
hashWithSalt :: Int -> CanaryRunConfigInput -> Int
hashWithSalt Int
_salt CanaryRunConfigInput' {Maybe Bool
Maybe Natural
Maybe (HashMap Text Text)
timeoutInSeconds :: Maybe Natural
memoryInMB :: Maybe Natural
environmentVariables :: Maybe (HashMap Text Text)
activeTracing :: Maybe Bool
$sel:timeoutInSeconds:CanaryRunConfigInput' :: CanaryRunConfigInput -> Maybe Natural
$sel:memoryInMB:CanaryRunConfigInput' :: CanaryRunConfigInput -> Maybe Natural
$sel:environmentVariables:CanaryRunConfigInput' :: CanaryRunConfigInput -> Maybe (HashMap Text Text)
$sel:activeTracing:CanaryRunConfigInput' :: CanaryRunConfigInput -> Maybe Bool
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
activeTracing
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
environmentVariables
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
memoryInMB
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
timeoutInSeconds
instance Prelude.NFData CanaryRunConfigInput where
rnf :: CanaryRunConfigInput -> ()
rnf CanaryRunConfigInput' {Maybe Bool
Maybe Natural
Maybe (HashMap Text Text)
timeoutInSeconds :: Maybe Natural
memoryInMB :: Maybe Natural
environmentVariables :: Maybe (HashMap Text Text)
activeTracing :: Maybe Bool
$sel:timeoutInSeconds:CanaryRunConfigInput' :: CanaryRunConfigInput -> Maybe Natural
$sel:memoryInMB:CanaryRunConfigInput' :: CanaryRunConfigInput -> Maybe Natural
$sel:environmentVariables:CanaryRunConfigInput' :: CanaryRunConfigInput -> Maybe (HashMap Text Text)
$sel:activeTracing:CanaryRunConfigInput' :: CanaryRunConfigInput -> Maybe Bool
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
activeTracing
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
environmentVariables
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
memoryInMB
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
timeoutInSeconds
instance Data.ToJSON CanaryRunConfigInput where
toJSON :: CanaryRunConfigInput -> Value
toJSON CanaryRunConfigInput' {Maybe Bool
Maybe Natural
Maybe (HashMap Text Text)
timeoutInSeconds :: Maybe Natural
memoryInMB :: Maybe Natural
environmentVariables :: Maybe (HashMap Text Text)
activeTracing :: Maybe Bool
$sel:timeoutInSeconds:CanaryRunConfigInput' :: CanaryRunConfigInput -> Maybe Natural
$sel:memoryInMB:CanaryRunConfigInput' :: CanaryRunConfigInput -> Maybe Natural
$sel:environmentVariables:CanaryRunConfigInput' :: CanaryRunConfigInput -> Maybe (HashMap Text Text)
$sel:activeTracing:CanaryRunConfigInput' :: CanaryRunConfigInput -> Maybe Bool
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"ActiveTracing" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
activeTracing,
(Key
"EnvironmentVariables" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
environmentVariables,
(Key
"MemoryInMB" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
memoryInMB,
(Key
"TimeoutInSeconds" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
timeoutInSeconds
]
)