{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# 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.DescribeCanariesLastRun
-- 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)
--
-- Use this operation to see information from the most recent run of each
-- canary that you have created.
module Amazonka.Synthetics.DescribeCanariesLastRun
  ( -- * Creating a Request
    DescribeCanariesLastRun (..),
    newDescribeCanariesLastRun,

    -- * Request Lenses
    describeCanariesLastRun_nextToken,
    describeCanariesLastRun_maxResults,

    -- * Destructuring the Response
    DescribeCanariesLastRunResponse (..),
    newDescribeCanariesLastRunResponse,

    -- * Response Lenses
    describeCanariesLastRunResponse_nextToken,
    describeCanariesLastRunResponse_canariesLastRun,
    describeCanariesLastRunResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.Synthetics.Types

-- | /See:/ 'newDescribeCanariesLastRun' smart constructor.
data DescribeCanariesLastRun = DescribeCanariesLastRun'
  { -- | A token that indicates that there is more data available. You can use
    -- this token in a subsequent @DescribeCanaries@ operation to retrieve the
    -- next set of results.
    DescribeCanariesLastRun -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Specify this parameter to limit how many runs are returned each time you
    -- use the @DescribeLastRun@ operation. If you omit this parameter, the
    -- default of 100 is used.
    DescribeCanariesLastRun -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (DescribeCanariesLastRun -> DescribeCanariesLastRun -> Bool
(DescribeCanariesLastRun -> DescribeCanariesLastRun -> Bool)
-> (DescribeCanariesLastRun -> DescribeCanariesLastRun -> Bool)
-> Eq DescribeCanariesLastRun
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeCanariesLastRun -> DescribeCanariesLastRun -> Bool
$c/= :: DescribeCanariesLastRun -> DescribeCanariesLastRun -> Bool
== :: DescribeCanariesLastRun -> DescribeCanariesLastRun -> Bool
$c== :: DescribeCanariesLastRun -> DescribeCanariesLastRun -> Bool
Prelude.Eq, ReadPrec [DescribeCanariesLastRun]
ReadPrec DescribeCanariesLastRun
Int -> ReadS DescribeCanariesLastRun
ReadS [DescribeCanariesLastRun]
(Int -> ReadS DescribeCanariesLastRun)
-> ReadS [DescribeCanariesLastRun]
-> ReadPrec DescribeCanariesLastRun
-> ReadPrec [DescribeCanariesLastRun]
-> Read DescribeCanariesLastRun
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeCanariesLastRun]
$creadListPrec :: ReadPrec [DescribeCanariesLastRun]
readPrec :: ReadPrec DescribeCanariesLastRun
$creadPrec :: ReadPrec DescribeCanariesLastRun
readList :: ReadS [DescribeCanariesLastRun]
$creadList :: ReadS [DescribeCanariesLastRun]
readsPrec :: Int -> ReadS DescribeCanariesLastRun
$creadsPrec :: Int -> ReadS DescribeCanariesLastRun
Prelude.Read, Int -> DescribeCanariesLastRun -> ShowS
[DescribeCanariesLastRun] -> ShowS
DescribeCanariesLastRun -> String
(Int -> DescribeCanariesLastRun -> ShowS)
-> (DescribeCanariesLastRun -> String)
-> ([DescribeCanariesLastRun] -> ShowS)
-> Show DescribeCanariesLastRun
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeCanariesLastRun] -> ShowS
$cshowList :: [DescribeCanariesLastRun] -> ShowS
show :: DescribeCanariesLastRun -> String
$cshow :: DescribeCanariesLastRun -> String
showsPrec :: Int -> DescribeCanariesLastRun -> ShowS
$cshowsPrec :: Int -> DescribeCanariesLastRun -> ShowS
Prelude.Show, (forall x.
 DescribeCanariesLastRun -> Rep DescribeCanariesLastRun x)
-> (forall x.
    Rep DescribeCanariesLastRun x -> DescribeCanariesLastRun)
-> Generic DescribeCanariesLastRun
forall x. Rep DescribeCanariesLastRun x -> DescribeCanariesLastRun
forall x. DescribeCanariesLastRun -> Rep DescribeCanariesLastRun x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeCanariesLastRun x -> DescribeCanariesLastRun
$cfrom :: forall x. DescribeCanariesLastRun -> Rep DescribeCanariesLastRun x
Prelude.Generic)

-- |
-- Create a value of 'DescribeCanariesLastRun' 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:
--
-- 'nextToken', 'describeCanariesLastRun_nextToken' - A token that indicates that there is more data available. You can use
-- this token in a subsequent @DescribeCanaries@ operation to retrieve the
-- next set of results.
--
-- 'maxResults', 'describeCanariesLastRun_maxResults' - Specify this parameter to limit how many runs are returned each time you
-- use the @DescribeLastRun@ operation. If you omit this parameter, the
-- default of 100 is used.
newDescribeCanariesLastRun ::
  DescribeCanariesLastRun
newDescribeCanariesLastRun :: DescribeCanariesLastRun
newDescribeCanariesLastRun =
  DescribeCanariesLastRun' :: Maybe Text -> Maybe Natural -> DescribeCanariesLastRun
DescribeCanariesLastRun'
    { $sel:nextToken:DescribeCanariesLastRun' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:DescribeCanariesLastRun' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | A token that indicates that there is more data available. You can use
-- this token in a subsequent @DescribeCanaries@ operation to retrieve the
-- next set of results.
describeCanariesLastRun_nextToken :: Lens.Lens' DescribeCanariesLastRun (Prelude.Maybe Prelude.Text)
describeCanariesLastRun_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeCanariesLastRun -> f DescribeCanariesLastRun
describeCanariesLastRun_nextToken = (DescribeCanariesLastRun -> Maybe Text)
-> (DescribeCanariesLastRun
    -> Maybe Text -> DescribeCanariesLastRun)
-> Lens
     DescribeCanariesLastRun
     DescribeCanariesLastRun
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCanariesLastRun' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeCanariesLastRun' :: DescribeCanariesLastRun -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeCanariesLastRun
s@DescribeCanariesLastRun' {} Maybe Text
a -> DescribeCanariesLastRun
s {$sel:nextToken:DescribeCanariesLastRun' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeCanariesLastRun)

-- | Specify this parameter to limit how many runs are returned each time you
-- use the @DescribeLastRun@ operation. If you omit this parameter, the
-- default of 100 is used.
describeCanariesLastRun_maxResults :: Lens.Lens' DescribeCanariesLastRun (Prelude.Maybe Prelude.Natural)
describeCanariesLastRun_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> DescribeCanariesLastRun -> f DescribeCanariesLastRun
describeCanariesLastRun_maxResults = (DescribeCanariesLastRun -> Maybe Natural)
-> (DescribeCanariesLastRun
    -> Maybe Natural -> DescribeCanariesLastRun)
-> Lens
     DescribeCanariesLastRun
     DescribeCanariesLastRun
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCanariesLastRun' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:DescribeCanariesLastRun' :: DescribeCanariesLastRun -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: DescribeCanariesLastRun
s@DescribeCanariesLastRun' {} Maybe Natural
a -> DescribeCanariesLastRun
s {$sel:maxResults:DescribeCanariesLastRun' :: Maybe Natural
maxResults = Maybe Natural
a} :: DescribeCanariesLastRun)

instance Core.AWSRequest DescribeCanariesLastRun where
  type
    AWSResponse DescribeCanariesLastRun =
      DescribeCanariesLastRunResponse
  request :: DescribeCanariesLastRun -> Request DescribeCanariesLastRun
request = Service
-> DescribeCanariesLastRun -> Request DescribeCanariesLastRun
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeCanariesLastRun
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeCanariesLastRun)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeCanariesLastRun))
-> Logger
-> Service
-> Proxy DescribeCanariesLastRun
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeCanariesLastRun)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe [CanaryLastRun] -> Int -> DescribeCanariesLastRunResponse
DescribeCanariesLastRunResponse'
            (Maybe Text
 -> Maybe [CanaryLastRun] -> Int -> DescribeCanariesLastRunResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [CanaryLastRun] -> Int -> DescribeCanariesLastRunResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NextToken")
            Either
  String
  (Maybe [CanaryLastRun] -> Int -> DescribeCanariesLastRunResponse)
-> Either String (Maybe [CanaryLastRun])
-> Either String (Int -> DescribeCanariesLastRunResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe (Maybe [CanaryLastRun]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CanariesLastRun"
                            Either String (Maybe (Maybe [CanaryLastRun]))
-> Maybe [CanaryLastRun] -> Either String (Maybe [CanaryLastRun])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [CanaryLastRun]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either String (Int -> DescribeCanariesLastRunResponse)
-> Either String Int
-> Either String DescribeCanariesLastRunResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable DescribeCanariesLastRun

instance Prelude.NFData DescribeCanariesLastRun

instance Core.ToHeaders DescribeCanariesLastRun where
  toHeaders :: DescribeCanariesLastRun -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeCanariesLastRun -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON DescribeCanariesLastRun where
  toJSON :: DescribeCanariesLastRun -> Value
toJSON DescribeCanariesLastRun' {Maybe Natural
Maybe Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:maxResults:DescribeCanariesLastRun' :: DescribeCanariesLastRun -> Maybe Natural
$sel:nextToken:DescribeCanariesLastRun' :: DescribeCanariesLastRun -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"NextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Text
"MaxResults" 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
maxResults
          ]
      )

instance Core.ToPath DescribeCanariesLastRun where
  toPath :: DescribeCanariesLastRun -> ByteString
toPath = ByteString -> DescribeCanariesLastRun -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/canaries/last-run"

instance Core.ToQuery DescribeCanariesLastRun where
  toQuery :: DescribeCanariesLastRun -> QueryString
toQuery = QueryString -> DescribeCanariesLastRun -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newDescribeCanariesLastRunResponse' smart constructor.
data DescribeCanariesLastRunResponse = DescribeCanariesLastRunResponse'
  { -- | A token that indicates that there is more data available. You can use
    -- this token in a subsequent @DescribeCanariesLastRun@ operation to
    -- retrieve the next set of results.
    DescribeCanariesLastRunResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | An array that contains the information from the most recent run of each
    -- canary.
    DescribeCanariesLastRunResponse -> Maybe [CanaryLastRun]
canariesLastRun :: Prelude.Maybe [CanaryLastRun],
    -- | The response's http status code.
    DescribeCanariesLastRunResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeCanariesLastRunResponse
-> DescribeCanariesLastRunResponse -> Bool
(DescribeCanariesLastRunResponse
 -> DescribeCanariesLastRunResponse -> Bool)
-> (DescribeCanariesLastRunResponse
    -> DescribeCanariesLastRunResponse -> Bool)
-> Eq DescribeCanariesLastRunResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeCanariesLastRunResponse
-> DescribeCanariesLastRunResponse -> Bool
$c/= :: DescribeCanariesLastRunResponse
-> DescribeCanariesLastRunResponse -> Bool
== :: DescribeCanariesLastRunResponse
-> DescribeCanariesLastRunResponse -> Bool
$c== :: DescribeCanariesLastRunResponse
-> DescribeCanariesLastRunResponse -> Bool
Prelude.Eq, ReadPrec [DescribeCanariesLastRunResponse]
ReadPrec DescribeCanariesLastRunResponse
Int -> ReadS DescribeCanariesLastRunResponse
ReadS [DescribeCanariesLastRunResponse]
(Int -> ReadS DescribeCanariesLastRunResponse)
-> ReadS [DescribeCanariesLastRunResponse]
-> ReadPrec DescribeCanariesLastRunResponse
-> ReadPrec [DescribeCanariesLastRunResponse]
-> Read DescribeCanariesLastRunResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeCanariesLastRunResponse]
$creadListPrec :: ReadPrec [DescribeCanariesLastRunResponse]
readPrec :: ReadPrec DescribeCanariesLastRunResponse
$creadPrec :: ReadPrec DescribeCanariesLastRunResponse
readList :: ReadS [DescribeCanariesLastRunResponse]
$creadList :: ReadS [DescribeCanariesLastRunResponse]
readsPrec :: Int -> ReadS DescribeCanariesLastRunResponse
$creadsPrec :: Int -> ReadS DescribeCanariesLastRunResponse
Prelude.Read, Int -> DescribeCanariesLastRunResponse -> ShowS
[DescribeCanariesLastRunResponse] -> ShowS
DescribeCanariesLastRunResponse -> String
(Int -> DescribeCanariesLastRunResponse -> ShowS)
-> (DescribeCanariesLastRunResponse -> String)
-> ([DescribeCanariesLastRunResponse] -> ShowS)
-> Show DescribeCanariesLastRunResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeCanariesLastRunResponse] -> ShowS
$cshowList :: [DescribeCanariesLastRunResponse] -> ShowS
show :: DescribeCanariesLastRunResponse -> String
$cshow :: DescribeCanariesLastRunResponse -> String
showsPrec :: Int -> DescribeCanariesLastRunResponse -> ShowS
$cshowsPrec :: Int -> DescribeCanariesLastRunResponse -> ShowS
Prelude.Show, (forall x.
 DescribeCanariesLastRunResponse
 -> Rep DescribeCanariesLastRunResponse x)
-> (forall x.
    Rep DescribeCanariesLastRunResponse x
    -> DescribeCanariesLastRunResponse)
-> Generic DescribeCanariesLastRunResponse
forall x.
Rep DescribeCanariesLastRunResponse x
-> DescribeCanariesLastRunResponse
forall x.
DescribeCanariesLastRunResponse
-> Rep DescribeCanariesLastRunResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeCanariesLastRunResponse x
-> DescribeCanariesLastRunResponse
$cfrom :: forall x.
DescribeCanariesLastRunResponse
-> Rep DescribeCanariesLastRunResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeCanariesLastRunResponse' 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:
--
-- 'nextToken', 'describeCanariesLastRunResponse_nextToken' - A token that indicates that there is more data available. You can use
-- this token in a subsequent @DescribeCanariesLastRun@ operation to
-- retrieve the next set of results.
--
-- 'canariesLastRun', 'describeCanariesLastRunResponse_canariesLastRun' - An array that contains the information from the most recent run of each
-- canary.
--
-- 'httpStatus', 'describeCanariesLastRunResponse_httpStatus' - The response's http status code.
newDescribeCanariesLastRunResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeCanariesLastRunResponse
newDescribeCanariesLastRunResponse :: Int -> DescribeCanariesLastRunResponse
newDescribeCanariesLastRunResponse Int
pHttpStatus_ =
  DescribeCanariesLastRunResponse' :: Maybe Text
-> Maybe [CanaryLastRun] -> Int -> DescribeCanariesLastRunResponse
DescribeCanariesLastRunResponse'
    { $sel:nextToken:DescribeCanariesLastRunResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:canariesLastRun:DescribeCanariesLastRunResponse' :: Maybe [CanaryLastRun]
canariesLastRun = Maybe [CanaryLastRun]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeCanariesLastRunResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A token that indicates that there is more data available. You can use
-- this token in a subsequent @DescribeCanariesLastRun@ operation to
-- retrieve the next set of results.
describeCanariesLastRunResponse_nextToken :: Lens.Lens' DescribeCanariesLastRunResponse (Prelude.Maybe Prelude.Text)
describeCanariesLastRunResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeCanariesLastRunResponse
-> f DescribeCanariesLastRunResponse
describeCanariesLastRunResponse_nextToken = (DescribeCanariesLastRunResponse -> Maybe Text)
-> (DescribeCanariesLastRunResponse
    -> Maybe Text -> DescribeCanariesLastRunResponse)
-> Lens
     DescribeCanariesLastRunResponse
     DescribeCanariesLastRunResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCanariesLastRunResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeCanariesLastRunResponse' :: DescribeCanariesLastRunResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeCanariesLastRunResponse
s@DescribeCanariesLastRunResponse' {} Maybe Text
a -> DescribeCanariesLastRunResponse
s {$sel:nextToken:DescribeCanariesLastRunResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeCanariesLastRunResponse)

-- | An array that contains the information from the most recent run of each
-- canary.
describeCanariesLastRunResponse_canariesLastRun :: Lens.Lens' DescribeCanariesLastRunResponse (Prelude.Maybe [CanaryLastRun])
describeCanariesLastRunResponse_canariesLastRun :: (Maybe [CanaryLastRun] -> f (Maybe [CanaryLastRun]))
-> DescribeCanariesLastRunResponse
-> f DescribeCanariesLastRunResponse
describeCanariesLastRunResponse_canariesLastRun = (DescribeCanariesLastRunResponse -> Maybe [CanaryLastRun])
-> (DescribeCanariesLastRunResponse
    -> Maybe [CanaryLastRun] -> DescribeCanariesLastRunResponse)
-> Lens
     DescribeCanariesLastRunResponse
     DescribeCanariesLastRunResponse
     (Maybe [CanaryLastRun])
     (Maybe [CanaryLastRun])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCanariesLastRunResponse' {Maybe [CanaryLastRun]
canariesLastRun :: Maybe [CanaryLastRun]
$sel:canariesLastRun:DescribeCanariesLastRunResponse' :: DescribeCanariesLastRunResponse -> Maybe [CanaryLastRun]
canariesLastRun} -> Maybe [CanaryLastRun]
canariesLastRun) (\s :: DescribeCanariesLastRunResponse
s@DescribeCanariesLastRunResponse' {} Maybe [CanaryLastRun]
a -> DescribeCanariesLastRunResponse
s {$sel:canariesLastRun:DescribeCanariesLastRunResponse' :: Maybe [CanaryLastRun]
canariesLastRun = Maybe [CanaryLastRun]
a} :: DescribeCanariesLastRunResponse) ((Maybe [CanaryLastRun] -> f (Maybe [CanaryLastRun]))
 -> DescribeCanariesLastRunResponse
 -> f DescribeCanariesLastRunResponse)
-> ((Maybe [CanaryLastRun] -> f (Maybe [CanaryLastRun]))
    -> Maybe [CanaryLastRun] -> f (Maybe [CanaryLastRun]))
-> (Maybe [CanaryLastRun] -> f (Maybe [CanaryLastRun]))
-> DescribeCanariesLastRunResponse
-> f DescribeCanariesLastRunResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [CanaryLastRun] [CanaryLastRun] [CanaryLastRun] [CanaryLastRun]
-> Iso
     (Maybe [CanaryLastRun])
     (Maybe [CanaryLastRun])
     (Maybe [CanaryLastRun])
     (Maybe [CanaryLastRun])
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
  [CanaryLastRun] [CanaryLastRun] [CanaryLastRun] [CanaryLastRun]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The response's http status code.
describeCanariesLastRunResponse_httpStatus :: Lens.Lens' DescribeCanariesLastRunResponse Prelude.Int
describeCanariesLastRunResponse_httpStatus :: (Int -> f Int)
-> DescribeCanariesLastRunResponse
-> f DescribeCanariesLastRunResponse
describeCanariesLastRunResponse_httpStatus = (DescribeCanariesLastRunResponse -> Int)
-> (DescribeCanariesLastRunResponse
    -> Int -> DescribeCanariesLastRunResponse)
-> Lens
     DescribeCanariesLastRunResponse
     DescribeCanariesLastRunResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeCanariesLastRunResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeCanariesLastRunResponse' :: DescribeCanariesLastRunResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeCanariesLastRunResponse
s@DescribeCanariesLastRunResponse' {} Int
a -> DescribeCanariesLastRunResponse
s {$sel:httpStatus:DescribeCanariesLastRunResponse' :: Int
httpStatus = Int
a} :: DescribeCanariesLastRunResponse)

instance
  Prelude.NFData
    DescribeCanariesLastRunResponse