{-# 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.CanaryCodeOutput 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 CanaryCodeOutput = CanaryCodeOutput'
{
CanaryCodeOutput -> Maybe Text
handler :: Prelude.Maybe Prelude.Text,
CanaryCodeOutput -> Maybe Text
sourceLocationArn :: Prelude.Maybe Prelude.Text
}
deriving (CanaryCodeOutput -> CanaryCodeOutput -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CanaryCodeOutput -> CanaryCodeOutput -> Bool
$c/= :: CanaryCodeOutput -> CanaryCodeOutput -> Bool
== :: CanaryCodeOutput -> CanaryCodeOutput -> Bool
$c== :: CanaryCodeOutput -> CanaryCodeOutput -> Bool
Prelude.Eq, ReadPrec [CanaryCodeOutput]
ReadPrec CanaryCodeOutput
Int -> ReadS CanaryCodeOutput
ReadS [CanaryCodeOutput]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CanaryCodeOutput]
$creadListPrec :: ReadPrec [CanaryCodeOutput]
readPrec :: ReadPrec CanaryCodeOutput
$creadPrec :: ReadPrec CanaryCodeOutput
readList :: ReadS [CanaryCodeOutput]
$creadList :: ReadS [CanaryCodeOutput]
readsPrec :: Int -> ReadS CanaryCodeOutput
$creadsPrec :: Int -> ReadS CanaryCodeOutput
Prelude.Read, Int -> CanaryCodeOutput -> ShowS
[CanaryCodeOutput] -> ShowS
CanaryCodeOutput -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CanaryCodeOutput] -> ShowS
$cshowList :: [CanaryCodeOutput] -> ShowS
show :: CanaryCodeOutput -> String
$cshow :: CanaryCodeOutput -> String
showsPrec :: Int -> CanaryCodeOutput -> ShowS
$cshowsPrec :: Int -> CanaryCodeOutput -> ShowS
Prelude.Show, forall x. Rep CanaryCodeOutput x -> CanaryCodeOutput
forall x. CanaryCodeOutput -> Rep CanaryCodeOutput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CanaryCodeOutput x -> CanaryCodeOutput
$cfrom :: forall x. CanaryCodeOutput -> Rep CanaryCodeOutput x
Prelude.Generic)
newCanaryCodeOutput ::
CanaryCodeOutput
newCanaryCodeOutput :: CanaryCodeOutput
newCanaryCodeOutput =
CanaryCodeOutput'
{ $sel:handler:CanaryCodeOutput' :: Maybe Text
handler = forall a. Maybe a
Prelude.Nothing,
$sel:sourceLocationArn:CanaryCodeOutput' :: Maybe Text
sourceLocationArn = forall a. Maybe a
Prelude.Nothing
}
canaryCodeOutput_handler :: Lens.Lens' CanaryCodeOutput (Prelude.Maybe Prelude.Text)
canaryCodeOutput_handler :: Lens' CanaryCodeOutput (Maybe Text)
canaryCodeOutput_handler = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CanaryCodeOutput' {Maybe Text
handler :: Maybe Text
$sel:handler:CanaryCodeOutput' :: CanaryCodeOutput -> Maybe Text
handler} -> Maybe Text
handler) (\s :: CanaryCodeOutput
s@CanaryCodeOutput' {} Maybe Text
a -> CanaryCodeOutput
s {$sel:handler:CanaryCodeOutput' :: Maybe Text
handler = Maybe Text
a} :: CanaryCodeOutput)
canaryCodeOutput_sourceLocationArn :: Lens.Lens' CanaryCodeOutput (Prelude.Maybe Prelude.Text)
canaryCodeOutput_sourceLocationArn :: Lens' CanaryCodeOutput (Maybe Text)
canaryCodeOutput_sourceLocationArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CanaryCodeOutput' {Maybe Text
sourceLocationArn :: Maybe Text
$sel:sourceLocationArn:CanaryCodeOutput' :: CanaryCodeOutput -> Maybe Text
sourceLocationArn} -> Maybe Text
sourceLocationArn) (\s :: CanaryCodeOutput
s@CanaryCodeOutput' {} Maybe Text
a -> CanaryCodeOutput
s {$sel:sourceLocationArn:CanaryCodeOutput' :: Maybe Text
sourceLocationArn = Maybe Text
a} :: CanaryCodeOutput)
instance Data.FromJSON CanaryCodeOutput where
parseJSON :: Value -> Parser CanaryCodeOutput
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"CanaryCodeOutput"
( \Object
x ->
Maybe Text -> Maybe Text -> CanaryCodeOutput
CanaryCodeOutput'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Handler")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SourceLocationArn")
)
instance Prelude.Hashable CanaryCodeOutput where
hashWithSalt :: Int -> CanaryCodeOutput -> Int
hashWithSalt Int
_salt CanaryCodeOutput' {Maybe Text
sourceLocationArn :: Maybe Text
handler :: Maybe Text
$sel:sourceLocationArn:CanaryCodeOutput' :: CanaryCodeOutput -> Maybe Text
$sel:handler:CanaryCodeOutput' :: CanaryCodeOutput -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
handler
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
sourceLocationArn
instance Prelude.NFData CanaryCodeOutput where
rnf :: CanaryCodeOutput -> ()
rnf CanaryCodeOutput' {Maybe Text
sourceLocationArn :: Maybe Text
handler :: Maybe Text
$sel:sourceLocationArn:CanaryCodeOutput' :: CanaryCodeOutput -> Maybe Text
$sel:handler:CanaryCodeOutput' :: CanaryCodeOutput -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
handler
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
sourceLocationArn