{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Synthetics.Types.Canary
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Synthetics.Types.Canary where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Synthetics.Types.ArtifactConfigOutput
import Amazonka.Synthetics.Types.CanaryCodeOutput
import Amazonka.Synthetics.Types.CanaryRunConfigOutput
import Amazonka.Synthetics.Types.CanaryScheduleOutput
import Amazonka.Synthetics.Types.CanaryStatus
import Amazonka.Synthetics.Types.CanaryTimeline
import Amazonka.Synthetics.Types.VisualReferenceOutput
import Amazonka.Synthetics.Types.VpcConfigOutput

-- | This structure contains all information about one canary in your
-- account.
--
-- /See:/ 'newCanary' smart constructor.
data Canary = Canary'
  { -- | A structure that contains information about the canary\'s status.
    Canary -> Maybe CanaryStatus
status :: Prelude.Maybe CanaryStatus,
    -- | The number of days to retain data about successful runs of this canary.
    Canary -> Maybe Natural
successRetentionPeriodInDays :: Prelude.Maybe Prelude.Natural,
    -- | A structure that contains information about how often the canary is to
    -- run, and when these runs are to stop.
    Canary -> Maybe CanaryScheduleOutput
schedule :: Prelude.Maybe CanaryScheduleOutput,
    -- | The location in Amazon S3 where Synthetics stores artifacts from the
    -- runs of this canary. Artifacts include the log file, screenshots, and
    -- HAR files.
    Canary -> Maybe Text
artifactS3Location :: Prelude.Maybe Prelude.Text,
    Canary -> Maybe CanaryRunConfigOutput
runConfig :: Prelude.Maybe CanaryRunConfigOutput,
    -- | The ARN of the IAM role used to run the canary. This role must include
    -- @lambda.amazonaws.com@ as a principal in the trust policy.
    Canary -> Maybe Text
executionRoleArn :: Prelude.Maybe Prelude.Text,
    -- | Specifies the runtime version to use for the canary. For more
    -- information about runtime versions, see
    -- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Library.html Canary Runtime Versions>.
    Canary -> Maybe Text
runtimeVersion :: Prelude.Maybe Prelude.Text,
    -- | The number of days to retain data about failed runs of this canary.
    Canary -> Maybe Natural
failureRetentionPeriodInDays :: Prelude.Maybe Prelude.Natural,
    -- | A structure that contains the configuration for canary artifacts,
    -- including the encryption-at-rest settings for artifacts that the canary
    -- uploads to Amazon S3.
    Canary -> Maybe ArtifactConfigOutput
artifactConfig :: Prelude.Maybe ArtifactConfigOutput,
    Canary -> Maybe VpcConfigOutput
vpcConfig :: Prelude.Maybe VpcConfigOutput,
    -- | If this canary performs visual monitoring by comparing screenshots, this
    -- structure contains the ID of the canary run to use as the baseline for
    -- screenshots, and the coordinates of any parts of the screen to ignore
    -- during the visual monitoring comparison.
    Canary -> Maybe VisualReferenceOutput
visualReference :: Prelude.Maybe VisualReferenceOutput,
    -- | The name of the canary.
    Canary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The unique ID of this canary.
    Canary -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    Canary -> Maybe CanaryCodeOutput
code :: Prelude.Maybe CanaryCodeOutput,
    -- | A structure that contains information about when the canary was created,
    -- modified, and most recently run.
    Canary -> Maybe CanaryTimeline
timeline :: Prelude.Maybe CanaryTimeline,
    -- | The ARN of the Lambda function that is used as your canary\'s engine.
    -- For more information about Lambda ARN format, see
    -- <https://docs.aws.amazon.com/lambda/latest/dg/lambda-api-permissions-ref.html Resources and Conditions for Lambda Actions>.
    Canary -> Maybe Text
engineArn :: Prelude.Maybe Prelude.Text,
    -- | The list of key-value pairs that are associated with the canary.
    Canary -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
  }
  deriving (Canary -> Canary -> Bool
(Canary -> Canary -> Bool)
-> (Canary -> Canary -> Bool) -> Eq Canary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Canary -> Canary -> Bool
$c/= :: Canary -> Canary -> Bool
== :: Canary -> Canary -> Bool
$c== :: Canary -> Canary -> Bool
Prelude.Eq, ReadPrec [Canary]
ReadPrec Canary
Int -> ReadS Canary
ReadS [Canary]
(Int -> ReadS Canary)
-> ReadS [Canary]
-> ReadPrec Canary
-> ReadPrec [Canary]
-> Read Canary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Canary]
$creadListPrec :: ReadPrec [Canary]
readPrec :: ReadPrec Canary
$creadPrec :: ReadPrec Canary
readList :: ReadS [Canary]
$creadList :: ReadS [Canary]
readsPrec :: Int -> ReadS Canary
$creadsPrec :: Int -> ReadS Canary
Prelude.Read, Int -> Canary -> ShowS
[Canary] -> ShowS
Canary -> String
(Int -> Canary -> ShowS)
-> (Canary -> String) -> ([Canary] -> ShowS) -> Show Canary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Canary] -> ShowS
$cshowList :: [Canary] -> ShowS
show :: Canary -> String
$cshow :: Canary -> String
showsPrec :: Int -> Canary -> ShowS
$cshowsPrec :: Int -> Canary -> ShowS
Prelude.Show, (forall x. Canary -> Rep Canary x)
-> (forall x. Rep Canary x -> Canary) -> Generic Canary
forall x. Rep Canary x -> Canary
forall x. Canary -> Rep Canary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Canary x -> Canary
$cfrom :: forall x. Canary -> Rep Canary x
Prelude.Generic)

-- |
-- Create a value of 'Canary' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'status', 'canary_status' - A structure that contains information about the canary\'s status.
--
-- 'successRetentionPeriodInDays', 'canary_successRetentionPeriodInDays' - The number of days to retain data about successful runs of this canary.
--
-- 'schedule', 'canary_schedule' - A structure that contains information about how often the canary is to
-- run, and when these runs are to stop.
--
-- 'artifactS3Location', 'canary_artifactS3Location' - The location in Amazon S3 where Synthetics stores artifacts from the
-- runs of this canary. Artifacts include the log file, screenshots, and
-- HAR files.
--
-- 'runConfig', 'canary_runConfig' - Undocumented member.
--
-- 'executionRoleArn', 'canary_executionRoleArn' - The ARN of the IAM role used to run the canary. This role must include
-- @lambda.amazonaws.com@ as a principal in the trust policy.
--
-- 'runtimeVersion', 'canary_runtimeVersion' - Specifies the runtime version to use for the canary. For more
-- information about runtime versions, see
-- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Library.html Canary Runtime Versions>.
--
-- 'failureRetentionPeriodInDays', 'canary_failureRetentionPeriodInDays' - The number of days to retain data about failed runs of this canary.
--
-- 'artifactConfig', 'canary_artifactConfig' - A structure that contains the configuration for canary artifacts,
-- including the encryption-at-rest settings for artifacts that the canary
-- uploads to Amazon S3.
--
-- 'vpcConfig', 'canary_vpcConfig' - Undocumented member.
--
-- 'visualReference', 'canary_visualReference' - If this canary performs visual monitoring by comparing screenshots, this
-- structure contains the ID of the canary run to use as the baseline for
-- screenshots, and the coordinates of any parts of the screen to ignore
-- during the visual monitoring comparison.
--
-- 'name', 'canary_name' - The name of the canary.
--
-- 'id', 'canary_id' - The unique ID of this canary.
--
-- 'code', 'canary_code' - Undocumented member.
--
-- 'timeline', 'canary_timeline' - A structure that contains information about when the canary was created,
-- modified, and most recently run.
--
-- 'engineArn', 'canary_engineArn' - The ARN of the Lambda function that is used as your canary\'s engine.
-- For more information about Lambda ARN format, see
-- <https://docs.aws.amazon.com/lambda/latest/dg/lambda-api-permissions-ref.html Resources and Conditions for Lambda Actions>.
--
-- 'tags', 'canary_tags' - The list of key-value pairs that are associated with the canary.
newCanary ::
  Canary
newCanary :: Canary
newCanary =
  Canary' :: Maybe CanaryStatus
-> Maybe Natural
-> Maybe CanaryScheduleOutput
-> Maybe Text
-> Maybe CanaryRunConfigOutput
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe ArtifactConfigOutput
-> Maybe VpcConfigOutput
-> Maybe VisualReferenceOutput
-> Maybe Text
-> Maybe Text
-> Maybe CanaryCodeOutput
-> Maybe CanaryTimeline
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Canary
Canary'
    { $sel:status:Canary' :: Maybe CanaryStatus
status = Maybe CanaryStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:successRetentionPeriodInDays:Canary' :: Maybe Natural
successRetentionPeriodInDays = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:schedule:Canary' :: Maybe CanaryScheduleOutput
schedule = Maybe CanaryScheduleOutput
forall a. Maybe a
Prelude.Nothing,
      $sel:artifactS3Location:Canary' :: Maybe Text
artifactS3Location = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:runConfig:Canary' :: Maybe CanaryRunConfigOutput
runConfig = Maybe CanaryRunConfigOutput
forall a. Maybe a
Prelude.Nothing,
      $sel:executionRoleArn:Canary' :: Maybe Text
executionRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:runtimeVersion:Canary' :: Maybe Text
runtimeVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:failureRetentionPeriodInDays:Canary' :: Maybe Natural
failureRetentionPeriodInDays = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:artifactConfig:Canary' :: Maybe ArtifactConfigOutput
artifactConfig = Maybe ArtifactConfigOutput
forall a. Maybe a
Prelude.Nothing,
      $sel:vpcConfig:Canary' :: Maybe VpcConfigOutput
vpcConfig = Maybe VpcConfigOutput
forall a. Maybe a
Prelude.Nothing,
      $sel:visualReference:Canary' :: Maybe VisualReferenceOutput
visualReference = Maybe VisualReferenceOutput
forall a. Maybe a
Prelude.Nothing,
      $sel:name:Canary' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:id:Canary' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:code:Canary' :: Maybe CanaryCodeOutput
code = Maybe CanaryCodeOutput
forall a. Maybe a
Prelude.Nothing,
      $sel:timeline:Canary' :: Maybe CanaryTimeline
timeline = Maybe CanaryTimeline
forall a. Maybe a
Prelude.Nothing,
      $sel:engineArn:Canary' :: Maybe Text
engineArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:Canary' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing
    }

-- | A structure that contains information about the canary\'s status.
canary_status :: Lens.Lens' Canary (Prelude.Maybe CanaryStatus)
canary_status :: (Maybe CanaryStatus -> f (Maybe CanaryStatus))
-> Canary -> f Canary
canary_status = (Canary -> Maybe CanaryStatus)
-> (Canary -> Maybe CanaryStatus -> Canary)
-> Lens Canary Canary (Maybe CanaryStatus) (Maybe CanaryStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Canary' {Maybe CanaryStatus
status :: Maybe CanaryStatus
$sel:status:Canary' :: Canary -> Maybe CanaryStatus
status} -> Maybe CanaryStatus
status) (\s :: Canary
s@Canary' {} Maybe CanaryStatus
a -> Canary
s {$sel:status:Canary' :: Maybe CanaryStatus
status = Maybe CanaryStatus
a} :: Canary)

-- | The number of days to retain data about successful runs of this canary.
canary_successRetentionPeriodInDays :: Lens.Lens' Canary (Prelude.Maybe Prelude.Natural)
canary_successRetentionPeriodInDays :: (Maybe Natural -> f (Maybe Natural)) -> Canary -> f Canary
canary_successRetentionPeriodInDays = (Canary -> Maybe Natural)
-> (Canary -> Maybe Natural -> Canary)
-> Lens Canary Canary (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Canary' {Maybe Natural
successRetentionPeriodInDays :: Maybe Natural
$sel:successRetentionPeriodInDays:Canary' :: Canary -> Maybe Natural
successRetentionPeriodInDays} -> Maybe Natural
successRetentionPeriodInDays) (\s :: Canary
s@Canary' {} Maybe Natural
a -> Canary
s {$sel:successRetentionPeriodInDays:Canary' :: Maybe Natural
successRetentionPeriodInDays = Maybe Natural
a} :: Canary)

-- | A structure that contains information about how often the canary is to
-- run, and when these runs are to stop.
canary_schedule :: Lens.Lens' Canary (Prelude.Maybe CanaryScheduleOutput)
canary_schedule :: (Maybe CanaryScheduleOutput -> f (Maybe CanaryScheduleOutput))
-> Canary -> f Canary
canary_schedule = (Canary -> Maybe CanaryScheduleOutput)
-> (Canary -> Maybe CanaryScheduleOutput -> Canary)
-> Lens
     Canary
     Canary
     (Maybe CanaryScheduleOutput)
     (Maybe CanaryScheduleOutput)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Canary' {Maybe CanaryScheduleOutput
schedule :: Maybe CanaryScheduleOutput
$sel:schedule:Canary' :: Canary -> Maybe CanaryScheduleOutput
schedule} -> Maybe CanaryScheduleOutput
schedule) (\s :: Canary
s@Canary' {} Maybe CanaryScheduleOutput
a -> Canary
s {$sel:schedule:Canary' :: Maybe CanaryScheduleOutput
schedule = Maybe CanaryScheduleOutput
a} :: Canary)

-- | The location in Amazon S3 where Synthetics stores artifacts from the
-- runs of this canary. Artifacts include the log file, screenshots, and
-- HAR files.
canary_artifactS3Location :: Lens.Lens' Canary (Prelude.Maybe Prelude.Text)
canary_artifactS3Location :: (Maybe Text -> f (Maybe Text)) -> Canary -> f Canary
canary_artifactS3Location = (Canary -> Maybe Text)
-> (Canary -> Maybe Text -> Canary)
-> Lens Canary Canary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Canary' {Maybe Text
artifactS3Location :: Maybe Text
$sel:artifactS3Location:Canary' :: Canary -> Maybe Text
artifactS3Location} -> Maybe Text
artifactS3Location) (\s :: Canary
s@Canary' {} Maybe Text
a -> Canary
s {$sel:artifactS3Location:Canary' :: Maybe Text
artifactS3Location = Maybe Text
a} :: Canary)

-- | Undocumented member.
canary_runConfig :: Lens.Lens' Canary (Prelude.Maybe CanaryRunConfigOutput)
canary_runConfig :: (Maybe CanaryRunConfigOutput -> f (Maybe CanaryRunConfigOutput))
-> Canary -> f Canary
canary_runConfig = (Canary -> Maybe CanaryRunConfigOutput)
-> (Canary -> Maybe CanaryRunConfigOutput -> Canary)
-> Lens
     Canary
     Canary
     (Maybe CanaryRunConfigOutput)
     (Maybe CanaryRunConfigOutput)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Canary' {Maybe CanaryRunConfigOutput
runConfig :: Maybe CanaryRunConfigOutput
$sel:runConfig:Canary' :: Canary -> Maybe CanaryRunConfigOutput
runConfig} -> Maybe CanaryRunConfigOutput
runConfig) (\s :: Canary
s@Canary' {} Maybe CanaryRunConfigOutput
a -> Canary
s {$sel:runConfig:Canary' :: Maybe CanaryRunConfigOutput
runConfig = Maybe CanaryRunConfigOutput
a} :: Canary)

-- | The ARN of the IAM role used to run the canary. This role must include
-- @lambda.amazonaws.com@ as a principal in the trust policy.
canary_executionRoleArn :: Lens.Lens' Canary (Prelude.Maybe Prelude.Text)
canary_executionRoleArn :: (Maybe Text -> f (Maybe Text)) -> Canary -> f Canary
canary_executionRoleArn = (Canary -> Maybe Text)
-> (Canary -> Maybe Text -> Canary)
-> Lens Canary Canary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Canary' {Maybe Text
executionRoleArn :: Maybe Text
$sel:executionRoleArn:Canary' :: Canary -> Maybe Text
executionRoleArn} -> Maybe Text
executionRoleArn) (\s :: Canary
s@Canary' {} Maybe Text
a -> Canary
s {$sel:executionRoleArn:Canary' :: Maybe Text
executionRoleArn = Maybe Text
a} :: Canary)

-- | Specifies the runtime version to use for the canary. For more
-- information about runtime versions, see
-- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Synthetics_Canaries_Library.html Canary Runtime Versions>.
canary_runtimeVersion :: Lens.Lens' Canary (Prelude.Maybe Prelude.Text)
canary_runtimeVersion :: (Maybe Text -> f (Maybe Text)) -> Canary -> f Canary
canary_runtimeVersion = (Canary -> Maybe Text)
-> (Canary -> Maybe Text -> Canary)
-> Lens Canary Canary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Canary' {Maybe Text
runtimeVersion :: Maybe Text
$sel:runtimeVersion:Canary' :: Canary -> Maybe Text
runtimeVersion} -> Maybe Text
runtimeVersion) (\s :: Canary
s@Canary' {} Maybe Text
a -> Canary
s {$sel:runtimeVersion:Canary' :: Maybe Text
runtimeVersion = Maybe Text
a} :: Canary)

-- | The number of days to retain data about failed runs of this canary.
canary_failureRetentionPeriodInDays :: Lens.Lens' Canary (Prelude.Maybe Prelude.Natural)
canary_failureRetentionPeriodInDays :: (Maybe Natural -> f (Maybe Natural)) -> Canary -> f Canary
canary_failureRetentionPeriodInDays = (Canary -> Maybe Natural)
-> (Canary -> Maybe Natural -> Canary)
-> Lens Canary Canary (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Canary' {Maybe Natural
failureRetentionPeriodInDays :: Maybe Natural
$sel:failureRetentionPeriodInDays:Canary' :: Canary -> Maybe Natural
failureRetentionPeriodInDays} -> Maybe Natural
failureRetentionPeriodInDays) (\s :: Canary
s@Canary' {} Maybe Natural
a -> Canary
s {$sel:failureRetentionPeriodInDays:Canary' :: Maybe Natural
failureRetentionPeriodInDays = Maybe Natural
a} :: Canary)

-- | A structure that contains the configuration for canary artifacts,
-- including the encryption-at-rest settings for artifacts that the canary
-- uploads to Amazon S3.
canary_artifactConfig :: Lens.Lens' Canary (Prelude.Maybe ArtifactConfigOutput)
canary_artifactConfig :: (Maybe ArtifactConfigOutput -> f (Maybe ArtifactConfigOutput))
-> Canary -> f Canary
canary_artifactConfig = (Canary -> Maybe ArtifactConfigOutput)
-> (Canary -> Maybe ArtifactConfigOutput -> Canary)
-> Lens
     Canary
     Canary
     (Maybe ArtifactConfigOutput)
     (Maybe ArtifactConfigOutput)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Canary' {Maybe ArtifactConfigOutput
artifactConfig :: Maybe ArtifactConfigOutput
$sel:artifactConfig:Canary' :: Canary -> Maybe ArtifactConfigOutput
artifactConfig} -> Maybe ArtifactConfigOutput
artifactConfig) (\s :: Canary
s@Canary' {} Maybe ArtifactConfigOutput
a -> Canary
s {$sel:artifactConfig:Canary' :: Maybe ArtifactConfigOutput
artifactConfig = Maybe ArtifactConfigOutput
a} :: Canary)

-- | Undocumented member.
canary_vpcConfig :: Lens.Lens' Canary (Prelude.Maybe VpcConfigOutput)
canary_vpcConfig :: (Maybe VpcConfigOutput -> f (Maybe VpcConfigOutput))
-> Canary -> f Canary
canary_vpcConfig = (Canary -> Maybe VpcConfigOutput)
-> (Canary -> Maybe VpcConfigOutput -> Canary)
-> Lens
     Canary Canary (Maybe VpcConfigOutput) (Maybe VpcConfigOutput)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Canary' {Maybe VpcConfigOutput
vpcConfig :: Maybe VpcConfigOutput
$sel:vpcConfig:Canary' :: Canary -> Maybe VpcConfigOutput
vpcConfig} -> Maybe VpcConfigOutput
vpcConfig) (\s :: Canary
s@Canary' {} Maybe VpcConfigOutput
a -> Canary
s {$sel:vpcConfig:Canary' :: Maybe VpcConfigOutput
vpcConfig = Maybe VpcConfigOutput
a} :: Canary)

-- | If this canary performs visual monitoring by comparing screenshots, this
-- structure contains the ID of the canary run to use as the baseline for
-- screenshots, and the coordinates of any parts of the screen to ignore
-- during the visual monitoring comparison.
canary_visualReference :: Lens.Lens' Canary (Prelude.Maybe VisualReferenceOutput)
canary_visualReference :: (Maybe VisualReferenceOutput -> f (Maybe VisualReferenceOutput))
-> Canary -> f Canary
canary_visualReference = (Canary -> Maybe VisualReferenceOutput)
-> (Canary -> Maybe VisualReferenceOutput -> Canary)
-> Lens
     Canary
     Canary
     (Maybe VisualReferenceOutput)
     (Maybe VisualReferenceOutput)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Canary' {Maybe VisualReferenceOutput
visualReference :: Maybe VisualReferenceOutput
$sel:visualReference:Canary' :: Canary -> Maybe VisualReferenceOutput
visualReference} -> Maybe VisualReferenceOutput
visualReference) (\s :: Canary
s@Canary' {} Maybe VisualReferenceOutput
a -> Canary
s {$sel:visualReference:Canary' :: Maybe VisualReferenceOutput
visualReference = Maybe VisualReferenceOutput
a} :: Canary)

-- | The name of the canary.
canary_name :: Lens.Lens' Canary (Prelude.Maybe Prelude.Text)
canary_name :: (Maybe Text -> f (Maybe Text)) -> Canary -> f Canary
canary_name = (Canary -> Maybe Text)
-> (Canary -> Maybe Text -> Canary)
-> Lens Canary Canary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Canary' {Maybe Text
name :: Maybe Text
$sel:name:Canary' :: Canary -> Maybe Text
name} -> Maybe Text
name) (\s :: Canary
s@Canary' {} Maybe Text
a -> Canary
s {$sel:name:Canary' :: Maybe Text
name = Maybe Text
a} :: Canary)

-- | The unique ID of this canary.
canary_id :: Lens.Lens' Canary (Prelude.Maybe Prelude.Text)
canary_id :: (Maybe Text -> f (Maybe Text)) -> Canary -> f Canary
canary_id = (Canary -> Maybe Text)
-> (Canary -> Maybe Text -> Canary)
-> Lens Canary Canary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Canary' {Maybe Text
id :: Maybe Text
$sel:id:Canary' :: Canary -> Maybe Text
id} -> Maybe Text
id) (\s :: Canary
s@Canary' {} Maybe Text
a -> Canary
s {$sel:id:Canary' :: Maybe Text
id = Maybe Text
a} :: Canary)

-- | Undocumented member.
canary_code :: Lens.Lens' Canary (Prelude.Maybe CanaryCodeOutput)
canary_code :: (Maybe CanaryCodeOutput -> f (Maybe CanaryCodeOutput))
-> Canary -> f Canary
canary_code = (Canary -> Maybe CanaryCodeOutput)
-> (Canary -> Maybe CanaryCodeOutput -> Canary)
-> Lens
     Canary Canary (Maybe CanaryCodeOutput) (Maybe CanaryCodeOutput)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Canary' {Maybe CanaryCodeOutput
code :: Maybe CanaryCodeOutput
$sel:code:Canary' :: Canary -> Maybe CanaryCodeOutput
code} -> Maybe CanaryCodeOutput
code) (\s :: Canary
s@Canary' {} Maybe CanaryCodeOutput
a -> Canary
s {$sel:code:Canary' :: Maybe CanaryCodeOutput
code = Maybe CanaryCodeOutput
a} :: Canary)

-- | A structure that contains information about when the canary was created,
-- modified, and most recently run.
canary_timeline :: Lens.Lens' Canary (Prelude.Maybe CanaryTimeline)
canary_timeline :: (Maybe CanaryTimeline -> f (Maybe CanaryTimeline))
-> Canary -> f Canary
canary_timeline = (Canary -> Maybe CanaryTimeline)
-> (Canary -> Maybe CanaryTimeline -> Canary)
-> Lens Canary Canary (Maybe CanaryTimeline) (Maybe CanaryTimeline)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Canary' {Maybe CanaryTimeline
timeline :: Maybe CanaryTimeline
$sel:timeline:Canary' :: Canary -> Maybe CanaryTimeline
timeline} -> Maybe CanaryTimeline
timeline) (\s :: Canary
s@Canary' {} Maybe CanaryTimeline
a -> Canary
s {$sel:timeline:Canary' :: Maybe CanaryTimeline
timeline = Maybe CanaryTimeline
a} :: Canary)

-- | The ARN of the Lambda function that is used as your canary\'s engine.
-- For more information about Lambda ARN format, see
-- <https://docs.aws.amazon.com/lambda/latest/dg/lambda-api-permissions-ref.html Resources and Conditions for Lambda Actions>.
canary_engineArn :: Lens.Lens' Canary (Prelude.Maybe Prelude.Text)
canary_engineArn :: (Maybe Text -> f (Maybe Text)) -> Canary -> f Canary
canary_engineArn = (Canary -> Maybe Text)
-> (Canary -> Maybe Text -> Canary)
-> Lens Canary Canary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Canary' {Maybe Text
engineArn :: Maybe Text
$sel:engineArn:Canary' :: Canary -> Maybe Text
engineArn} -> Maybe Text
engineArn) (\s :: Canary
s@Canary' {} Maybe Text
a -> Canary
s {$sel:engineArn:Canary' :: Maybe Text
engineArn = Maybe Text
a} :: Canary)

-- | The list of key-value pairs that are associated with the canary.
canary_tags :: Lens.Lens' Canary (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
canary_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Canary -> f Canary
canary_tags = (Canary -> Maybe (HashMap Text Text))
-> (Canary -> Maybe (HashMap Text Text) -> Canary)
-> Lens
     Canary
     Canary
     (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 (\Canary' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:Canary' :: Canary -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: Canary
s@Canary' {} Maybe (HashMap Text Text)
a -> Canary
s {$sel:tags:Canary' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: Canary) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> Canary -> f Canary)
-> ((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)))
-> Canary
-> f Canary
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

instance Core.FromJSON Canary where
  parseJSON :: Value -> Parser Canary
parseJSON =
    String -> (Object -> Parser Canary) -> Value -> Parser Canary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Canary"
      ( \Object
x ->
          Maybe CanaryStatus
-> Maybe Natural
-> Maybe CanaryScheduleOutput
-> Maybe Text
-> Maybe CanaryRunConfigOutput
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe ArtifactConfigOutput
-> Maybe VpcConfigOutput
-> Maybe VisualReferenceOutput
-> Maybe Text
-> Maybe Text
-> Maybe CanaryCodeOutput
-> Maybe CanaryTimeline
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Canary
Canary'
            (Maybe CanaryStatus
 -> Maybe Natural
 -> Maybe CanaryScheduleOutput
 -> Maybe Text
 -> Maybe CanaryRunConfigOutput
 -> Maybe Text
 -> Maybe Text
 -> Maybe Natural
 -> Maybe ArtifactConfigOutput
 -> Maybe VpcConfigOutput
 -> Maybe VisualReferenceOutput
 -> Maybe Text
 -> Maybe Text
 -> Maybe CanaryCodeOutput
 -> Maybe CanaryTimeline
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Canary)
-> Parser (Maybe CanaryStatus)
-> Parser
     (Maybe Natural
      -> Maybe CanaryScheduleOutput
      -> Maybe Text
      -> Maybe CanaryRunConfigOutput
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe ArtifactConfigOutput
      -> Maybe VpcConfigOutput
      -> Maybe VisualReferenceOutput
      -> Maybe Text
      -> Maybe Text
      -> Maybe CanaryCodeOutput
      -> Maybe CanaryTimeline
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Canary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe CanaryStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
            Parser
  (Maybe Natural
   -> Maybe CanaryScheduleOutput
   -> Maybe Text
   -> Maybe CanaryRunConfigOutput
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe ArtifactConfigOutput
   -> Maybe VpcConfigOutput
   -> Maybe VisualReferenceOutput
   -> Maybe Text
   -> Maybe Text
   -> Maybe CanaryCodeOutput
   -> Maybe CanaryTimeline
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Canary)
-> Parser (Maybe Natural)
-> Parser
     (Maybe CanaryScheduleOutput
      -> Maybe Text
      -> Maybe CanaryRunConfigOutput
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe ArtifactConfigOutput
      -> Maybe VpcConfigOutput
      -> Maybe VisualReferenceOutput
      -> Maybe Text
      -> Maybe Text
      -> Maybe CanaryCodeOutput
      -> Maybe CanaryTimeline
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Canary)
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
"SuccessRetentionPeriodInDays")
            Parser
  (Maybe CanaryScheduleOutput
   -> Maybe Text
   -> Maybe CanaryRunConfigOutput
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe ArtifactConfigOutput
   -> Maybe VpcConfigOutput
   -> Maybe VisualReferenceOutput
   -> Maybe Text
   -> Maybe Text
   -> Maybe CanaryCodeOutput
   -> Maybe CanaryTimeline
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Canary)
-> Parser (Maybe CanaryScheduleOutput)
-> Parser
     (Maybe Text
      -> Maybe CanaryRunConfigOutput
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe ArtifactConfigOutput
      -> Maybe VpcConfigOutput
      -> Maybe VisualReferenceOutput
      -> Maybe Text
      -> Maybe Text
      -> Maybe CanaryCodeOutput
      -> Maybe CanaryTimeline
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Canary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe CanaryScheduleOutput)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Schedule")
            Parser
  (Maybe Text
   -> Maybe CanaryRunConfigOutput
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe ArtifactConfigOutput
   -> Maybe VpcConfigOutput
   -> Maybe VisualReferenceOutput
   -> Maybe Text
   -> Maybe Text
   -> Maybe CanaryCodeOutput
   -> Maybe CanaryTimeline
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Canary)
-> Parser (Maybe Text)
-> Parser
     (Maybe CanaryRunConfigOutput
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe ArtifactConfigOutput
      -> Maybe VpcConfigOutput
      -> Maybe VisualReferenceOutput
      -> Maybe Text
      -> Maybe Text
      -> Maybe CanaryCodeOutput
      -> Maybe CanaryTimeline
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Canary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ArtifactS3Location")
            Parser
  (Maybe CanaryRunConfigOutput
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe ArtifactConfigOutput
   -> Maybe VpcConfigOutput
   -> Maybe VisualReferenceOutput
   -> Maybe Text
   -> Maybe Text
   -> Maybe CanaryCodeOutput
   -> Maybe CanaryTimeline
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Canary)
-> Parser (Maybe CanaryRunConfigOutput)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe ArtifactConfigOutput
      -> Maybe VpcConfigOutput
      -> Maybe VisualReferenceOutput
      -> Maybe Text
      -> Maybe Text
      -> Maybe CanaryCodeOutput
      -> Maybe CanaryTimeline
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Canary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe CanaryRunConfigOutput)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RunConfig")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe ArtifactConfigOutput
   -> Maybe VpcConfigOutput
   -> Maybe VisualReferenceOutput
   -> Maybe Text
   -> Maybe Text
   -> Maybe CanaryCodeOutput
   -> Maybe CanaryTimeline
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Canary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Natural
      -> Maybe ArtifactConfigOutput
      -> Maybe VpcConfigOutput
      -> Maybe VisualReferenceOutput
      -> Maybe Text
      -> Maybe Text
      -> Maybe CanaryCodeOutput
      -> Maybe CanaryTimeline
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Canary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ExecutionRoleArn")
            Parser
  (Maybe Text
   -> Maybe Natural
   -> Maybe ArtifactConfigOutput
   -> Maybe VpcConfigOutput
   -> Maybe VisualReferenceOutput
   -> Maybe Text
   -> Maybe Text
   -> Maybe CanaryCodeOutput
   -> Maybe CanaryTimeline
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Canary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Natural
      -> Maybe ArtifactConfigOutput
      -> Maybe VpcConfigOutput
      -> Maybe VisualReferenceOutput
      -> Maybe Text
      -> Maybe Text
      -> Maybe CanaryCodeOutput
      -> Maybe CanaryTimeline
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Canary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RuntimeVersion")
            Parser
  (Maybe Natural
   -> Maybe ArtifactConfigOutput
   -> Maybe VpcConfigOutput
   -> Maybe VisualReferenceOutput
   -> Maybe Text
   -> Maybe Text
   -> Maybe CanaryCodeOutput
   -> Maybe CanaryTimeline
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Canary)
-> Parser (Maybe Natural)
-> Parser
     (Maybe ArtifactConfigOutput
      -> Maybe VpcConfigOutput
      -> Maybe VisualReferenceOutput
      -> Maybe Text
      -> Maybe Text
      -> Maybe CanaryCodeOutput
      -> Maybe CanaryTimeline
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Canary)
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
"FailureRetentionPeriodInDays")
            Parser
  (Maybe ArtifactConfigOutput
   -> Maybe VpcConfigOutput
   -> Maybe VisualReferenceOutput
   -> Maybe Text
   -> Maybe Text
   -> Maybe CanaryCodeOutput
   -> Maybe CanaryTimeline
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Canary)
-> Parser (Maybe ArtifactConfigOutput)
-> Parser
     (Maybe VpcConfigOutput
      -> Maybe VisualReferenceOutput
      -> Maybe Text
      -> Maybe Text
      -> Maybe CanaryCodeOutput
      -> Maybe CanaryTimeline
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Canary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ArtifactConfigOutput)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ArtifactConfig")
            Parser
  (Maybe VpcConfigOutput
   -> Maybe VisualReferenceOutput
   -> Maybe Text
   -> Maybe Text
   -> Maybe CanaryCodeOutput
   -> Maybe CanaryTimeline
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Canary)
-> Parser (Maybe VpcConfigOutput)
-> Parser
     (Maybe VisualReferenceOutput
      -> Maybe Text
      -> Maybe Text
      -> Maybe CanaryCodeOutput
      -> Maybe CanaryTimeline
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Canary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe VpcConfigOutput)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"VpcConfig")
            Parser
  (Maybe VisualReferenceOutput
   -> Maybe Text
   -> Maybe Text
   -> Maybe CanaryCodeOutput
   -> Maybe CanaryTimeline
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Canary)
-> Parser (Maybe VisualReferenceOutput)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe CanaryCodeOutput
      -> Maybe CanaryTimeline
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Canary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe VisualReferenceOutput)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"VisualReference")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe CanaryCodeOutput
   -> Maybe CanaryTimeline
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Canary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe CanaryCodeOutput
      -> Maybe CanaryTimeline
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Canary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Name")
            Parser
  (Maybe Text
   -> Maybe CanaryCodeOutput
   -> Maybe CanaryTimeline
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Canary)
-> Parser (Maybe Text)
-> Parser
     (Maybe CanaryCodeOutput
      -> Maybe CanaryTimeline
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Canary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Id")
            Parser
  (Maybe CanaryCodeOutput
   -> Maybe CanaryTimeline
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Canary)
-> Parser (Maybe CanaryCodeOutput)
-> Parser
     (Maybe CanaryTimeline
      -> Maybe Text -> Maybe (HashMap Text Text) -> Canary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe CanaryCodeOutput)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Code")
            Parser
  (Maybe CanaryTimeline
   -> Maybe Text -> Maybe (HashMap Text Text) -> Canary)
-> Parser (Maybe CanaryTimeline)
-> Parser (Maybe Text -> Maybe (HashMap Text Text) -> Canary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe CanaryTimeline)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Timeline")
            Parser (Maybe Text -> Maybe (HashMap Text Text) -> Canary)
-> Parser (Maybe Text)
-> Parser (Maybe (HashMap Text Text) -> Canary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EngineArn")
            Parser (Maybe (HashMap Text Text) -> Canary)
-> Parser (Maybe (HashMap Text Text)) -> Parser Canary
forall (f :: * -> *) a b. Applicative f => 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
"Tags" 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)
      )

instance Prelude.Hashable Canary

instance Prelude.NFData Canary