{-# 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.Route53RecoveryReadiness.ListReadinessChecks
-- 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)
--
-- Returns a collection of Readiness Checks.
--
-- This operation returns paginated results.
module Amazonka.Route53RecoveryReadiness.ListReadinessChecks
  ( -- * Creating a Request
    ListReadinessChecks (..),
    newListReadinessChecks,

    -- * Request Lenses
    listReadinessChecks_nextToken,
    listReadinessChecks_maxResults,

    -- * Destructuring the Response
    ListReadinessChecksResponse (..),
    newListReadinessChecksResponse,

    -- * Response Lenses
    listReadinessChecksResponse_readinessChecks,
    listReadinessChecksResponse_nextToken,
    listReadinessChecksResponse_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.Route53RecoveryReadiness.Types

-- | /See:/ 'newListReadinessChecks' smart constructor.
data ListReadinessChecks = ListReadinessChecks'
  { -- | A token used to resume pagination from the end of a previous request.
    ListReadinessChecks -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Upper bound on number of records to return.
    ListReadinessChecks -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListReadinessChecks -> ListReadinessChecks -> Bool
(ListReadinessChecks -> ListReadinessChecks -> Bool)
-> (ListReadinessChecks -> ListReadinessChecks -> Bool)
-> Eq ListReadinessChecks
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListReadinessChecks -> ListReadinessChecks -> Bool
$c/= :: ListReadinessChecks -> ListReadinessChecks -> Bool
== :: ListReadinessChecks -> ListReadinessChecks -> Bool
$c== :: ListReadinessChecks -> ListReadinessChecks -> Bool
Prelude.Eq, ReadPrec [ListReadinessChecks]
ReadPrec ListReadinessChecks
Int -> ReadS ListReadinessChecks
ReadS [ListReadinessChecks]
(Int -> ReadS ListReadinessChecks)
-> ReadS [ListReadinessChecks]
-> ReadPrec ListReadinessChecks
-> ReadPrec [ListReadinessChecks]
-> Read ListReadinessChecks
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListReadinessChecks]
$creadListPrec :: ReadPrec [ListReadinessChecks]
readPrec :: ReadPrec ListReadinessChecks
$creadPrec :: ReadPrec ListReadinessChecks
readList :: ReadS [ListReadinessChecks]
$creadList :: ReadS [ListReadinessChecks]
readsPrec :: Int -> ReadS ListReadinessChecks
$creadsPrec :: Int -> ReadS ListReadinessChecks
Prelude.Read, Int -> ListReadinessChecks -> ShowS
[ListReadinessChecks] -> ShowS
ListReadinessChecks -> String
(Int -> ListReadinessChecks -> ShowS)
-> (ListReadinessChecks -> String)
-> ([ListReadinessChecks] -> ShowS)
-> Show ListReadinessChecks
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListReadinessChecks] -> ShowS
$cshowList :: [ListReadinessChecks] -> ShowS
show :: ListReadinessChecks -> String
$cshow :: ListReadinessChecks -> String
showsPrec :: Int -> ListReadinessChecks -> ShowS
$cshowsPrec :: Int -> ListReadinessChecks -> ShowS
Prelude.Show, (forall x. ListReadinessChecks -> Rep ListReadinessChecks x)
-> (forall x. Rep ListReadinessChecks x -> ListReadinessChecks)
-> Generic ListReadinessChecks
forall x. Rep ListReadinessChecks x -> ListReadinessChecks
forall x. ListReadinessChecks -> Rep ListReadinessChecks x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListReadinessChecks x -> ListReadinessChecks
$cfrom :: forall x. ListReadinessChecks -> Rep ListReadinessChecks x
Prelude.Generic)

-- |
-- Create a value of 'ListReadinessChecks' 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', 'listReadinessChecks_nextToken' - A token used to resume pagination from the end of a previous request.
--
-- 'maxResults', 'listReadinessChecks_maxResults' - Upper bound on number of records to return.
newListReadinessChecks ::
  ListReadinessChecks
newListReadinessChecks :: ListReadinessChecks
newListReadinessChecks =
  ListReadinessChecks' :: Maybe Text -> Maybe Natural -> ListReadinessChecks
ListReadinessChecks'
    { $sel:nextToken:ListReadinessChecks' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListReadinessChecks' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | A token used to resume pagination from the end of a previous request.
listReadinessChecks_nextToken :: Lens.Lens' ListReadinessChecks (Prelude.Maybe Prelude.Text)
listReadinessChecks_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListReadinessChecks -> f ListReadinessChecks
listReadinessChecks_nextToken = (ListReadinessChecks -> Maybe Text)
-> (ListReadinessChecks -> Maybe Text -> ListReadinessChecks)
-> Lens
     ListReadinessChecks ListReadinessChecks (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListReadinessChecks' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListReadinessChecks' :: ListReadinessChecks -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListReadinessChecks
s@ListReadinessChecks' {} Maybe Text
a -> ListReadinessChecks
s {$sel:nextToken:ListReadinessChecks' :: Maybe Text
nextToken = Maybe Text
a} :: ListReadinessChecks)

-- | Upper bound on number of records to return.
listReadinessChecks_maxResults :: Lens.Lens' ListReadinessChecks (Prelude.Maybe Prelude.Natural)
listReadinessChecks_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListReadinessChecks -> f ListReadinessChecks
listReadinessChecks_maxResults = (ListReadinessChecks -> Maybe Natural)
-> (ListReadinessChecks -> Maybe Natural -> ListReadinessChecks)
-> Lens
     ListReadinessChecks
     ListReadinessChecks
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListReadinessChecks' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListReadinessChecks' :: ListReadinessChecks -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListReadinessChecks
s@ListReadinessChecks' {} Maybe Natural
a -> ListReadinessChecks
s {$sel:maxResults:ListReadinessChecks' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListReadinessChecks)

instance Core.AWSPager ListReadinessChecks where
  page :: ListReadinessChecks
-> AWSResponse ListReadinessChecks -> Maybe ListReadinessChecks
page ListReadinessChecks
rq AWSResponse ListReadinessChecks
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListReadinessChecks
ListReadinessChecksResponse
rs
            ListReadinessChecksResponse
-> Getting (First Text) ListReadinessChecksResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListReadinessChecksResponse
-> Const (First Text) ListReadinessChecksResponse
Lens' ListReadinessChecksResponse (Maybe Text)
listReadinessChecksResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListReadinessChecksResponse
 -> Const (First Text) ListReadinessChecksResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListReadinessChecksResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListReadinessChecks
forall a. Maybe a
Prelude.Nothing
    | Maybe [ReadinessCheckOutput] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListReadinessChecks
ListReadinessChecksResponse
rs
            ListReadinessChecksResponse
-> Getting
     (First [ReadinessCheckOutput])
     ListReadinessChecksResponse
     [ReadinessCheckOutput]
-> Maybe [ReadinessCheckOutput]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [ReadinessCheckOutput]
 -> Const
      (First [ReadinessCheckOutput]) (Maybe [ReadinessCheckOutput]))
-> ListReadinessChecksResponse
-> Const (First [ReadinessCheckOutput]) ListReadinessChecksResponse
Lens' ListReadinessChecksResponse (Maybe [ReadinessCheckOutput])
listReadinessChecksResponse_readinessChecks
              ((Maybe [ReadinessCheckOutput]
  -> Const
       (First [ReadinessCheckOutput]) (Maybe [ReadinessCheckOutput]))
 -> ListReadinessChecksResponse
 -> Const
      (First [ReadinessCheckOutput]) ListReadinessChecksResponse)
-> (([ReadinessCheckOutput]
     -> Const (First [ReadinessCheckOutput]) [ReadinessCheckOutput])
    -> Maybe [ReadinessCheckOutput]
    -> Const
         (First [ReadinessCheckOutput]) (Maybe [ReadinessCheckOutput]))
-> Getting
     (First [ReadinessCheckOutput])
     ListReadinessChecksResponse
     [ReadinessCheckOutput]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([ReadinessCheckOutput]
 -> Const (First [ReadinessCheckOutput]) [ReadinessCheckOutput])
-> Maybe [ReadinessCheckOutput]
-> Const
     (First [ReadinessCheckOutput]) (Maybe [ReadinessCheckOutput])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListReadinessChecks
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListReadinessChecks -> Maybe ListReadinessChecks
forall a. a -> Maybe a
Prelude.Just (ListReadinessChecks -> Maybe ListReadinessChecks)
-> ListReadinessChecks -> Maybe ListReadinessChecks
forall a b. (a -> b) -> a -> b
Prelude.$
        ListReadinessChecks
rq
          ListReadinessChecks
-> (ListReadinessChecks -> ListReadinessChecks)
-> ListReadinessChecks
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListReadinessChecks -> Identity ListReadinessChecks
Lens
  ListReadinessChecks ListReadinessChecks (Maybe Text) (Maybe Text)
listReadinessChecks_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListReadinessChecks -> Identity ListReadinessChecks)
-> Maybe Text -> ListReadinessChecks -> ListReadinessChecks
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListReadinessChecks
ListReadinessChecksResponse
rs
          ListReadinessChecksResponse
-> Getting (First Text) ListReadinessChecksResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListReadinessChecksResponse
-> Const (First Text) ListReadinessChecksResponse
Lens' ListReadinessChecksResponse (Maybe Text)
listReadinessChecksResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListReadinessChecksResponse
 -> Const (First Text) ListReadinessChecksResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListReadinessChecksResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListReadinessChecks where
  type
    AWSResponse ListReadinessChecks =
      ListReadinessChecksResponse
  request :: ListReadinessChecks -> Request ListReadinessChecks
request = Service -> ListReadinessChecks -> Request ListReadinessChecks
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy ListReadinessChecks
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListReadinessChecks)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListReadinessChecks))
-> Logger
-> Service
-> Proxy ListReadinessChecks
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListReadinessChecks)))
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 [ReadinessCheckOutput]
-> Maybe Text -> Int -> ListReadinessChecksResponse
ListReadinessChecksResponse'
            (Maybe [ReadinessCheckOutput]
 -> Maybe Text -> Int -> ListReadinessChecksResponse)
-> Either String (Maybe [ReadinessCheckOutput])
-> Either String (Maybe Text -> Int -> ListReadinessChecksResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object
-> Text -> Either String (Maybe (Maybe [ReadinessCheckOutput]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"readinessChecks"
                            Either String (Maybe (Maybe [ReadinessCheckOutput]))
-> Maybe [ReadinessCheckOutput]
-> Either String (Maybe [ReadinessCheckOutput])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [ReadinessCheckOutput]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either String (Maybe Text -> Int -> ListReadinessChecksResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListReadinessChecksResponse)
forall (f :: * -> *) a b. Applicative f => 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 (Int -> ListReadinessChecksResponse)
-> Either String Int -> Either String ListReadinessChecksResponse
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 ListReadinessChecks

instance Prelude.NFData ListReadinessChecks

instance Core.ToHeaders ListReadinessChecks where
  toHeaders :: ListReadinessChecks -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListReadinessChecks -> 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.ToPath ListReadinessChecks where
  toPath :: ListReadinessChecks -> ByteString
toPath = ByteString -> ListReadinessChecks -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/readinesschecks"

instance Core.ToQuery ListReadinessChecks where
  toQuery :: ListReadinessChecks -> QueryString
toQuery ListReadinessChecks' {Maybe Natural
Maybe Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:maxResults:ListReadinessChecks' :: ListReadinessChecks -> Maybe Natural
$sel:nextToken:ListReadinessChecks' :: ListReadinessChecks -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"nextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
        ByteString
"maxResults" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxResults
      ]

-- | /See:/ 'newListReadinessChecksResponse' smart constructor.
data ListReadinessChecksResponse = ListReadinessChecksResponse'
  { -- | A list of ReadinessCheck associated with the account
    ListReadinessChecksResponse -> Maybe [ReadinessCheckOutput]
readinessChecks :: Prelude.Maybe [ReadinessCheckOutput],
    -- | A token that can be used to resume pagination from the end of the
    -- collection.
    ListReadinessChecksResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListReadinessChecksResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListReadinessChecksResponse -> ListReadinessChecksResponse -> Bool
(ListReadinessChecksResponse
 -> ListReadinessChecksResponse -> Bool)
-> (ListReadinessChecksResponse
    -> ListReadinessChecksResponse -> Bool)
-> Eq ListReadinessChecksResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListReadinessChecksResponse -> ListReadinessChecksResponse -> Bool
$c/= :: ListReadinessChecksResponse -> ListReadinessChecksResponse -> Bool
== :: ListReadinessChecksResponse -> ListReadinessChecksResponse -> Bool
$c== :: ListReadinessChecksResponse -> ListReadinessChecksResponse -> Bool
Prelude.Eq, ReadPrec [ListReadinessChecksResponse]
ReadPrec ListReadinessChecksResponse
Int -> ReadS ListReadinessChecksResponse
ReadS [ListReadinessChecksResponse]
(Int -> ReadS ListReadinessChecksResponse)
-> ReadS [ListReadinessChecksResponse]
-> ReadPrec ListReadinessChecksResponse
-> ReadPrec [ListReadinessChecksResponse]
-> Read ListReadinessChecksResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListReadinessChecksResponse]
$creadListPrec :: ReadPrec [ListReadinessChecksResponse]
readPrec :: ReadPrec ListReadinessChecksResponse
$creadPrec :: ReadPrec ListReadinessChecksResponse
readList :: ReadS [ListReadinessChecksResponse]
$creadList :: ReadS [ListReadinessChecksResponse]
readsPrec :: Int -> ReadS ListReadinessChecksResponse
$creadsPrec :: Int -> ReadS ListReadinessChecksResponse
Prelude.Read, Int -> ListReadinessChecksResponse -> ShowS
[ListReadinessChecksResponse] -> ShowS
ListReadinessChecksResponse -> String
(Int -> ListReadinessChecksResponse -> ShowS)
-> (ListReadinessChecksResponse -> String)
-> ([ListReadinessChecksResponse] -> ShowS)
-> Show ListReadinessChecksResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListReadinessChecksResponse] -> ShowS
$cshowList :: [ListReadinessChecksResponse] -> ShowS
show :: ListReadinessChecksResponse -> String
$cshow :: ListReadinessChecksResponse -> String
showsPrec :: Int -> ListReadinessChecksResponse -> ShowS
$cshowsPrec :: Int -> ListReadinessChecksResponse -> ShowS
Prelude.Show, (forall x.
 ListReadinessChecksResponse -> Rep ListReadinessChecksResponse x)
-> (forall x.
    Rep ListReadinessChecksResponse x -> ListReadinessChecksResponse)
-> Generic ListReadinessChecksResponse
forall x.
Rep ListReadinessChecksResponse x -> ListReadinessChecksResponse
forall x.
ListReadinessChecksResponse -> Rep ListReadinessChecksResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListReadinessChecksResponse x -> ListReadinessChecksResponse
$cfrom :: forall x.
ListReadinessChecksResponse -> Rep ListReadinessChecksResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListReadinessChecksResponse' 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:
--
-- 'readinessChecks', 'listReadinessChecksResponse_readinessChecks' - A list of ReadinessCheck associated with the account
--
-- 'nextToken', 'listReadinessChecksResponse_nextToken' - A token that can be used to resume pagination from the end of the
-- collection.
--
-- 'httpStatus', 'listReadinessChecksResponse_httpStatus' - The response's http status code.
newListReadinessChecksResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListReadinessChecksResponse
newListReadinessChecksResponse :: Int -> ListReadinessChecksResponse
newListReadinessChecksResponse Int
pHttpStatus_ =
  ListReadinessChecksResponse' :: Maybe [ReadinessCheckOutput]
-> Maybe Text -> Int -> ListReadinessChecksResponse
ListReadinessChecksResponse'
    { $sel:readinessChecks:ListReadinessChecksResponse' :: Maybe [ReadinessCheckOutput]
readinessChecks =
        Maybe [ReadinessCheckOutput]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListReadinessChecksResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListReadinessChecksResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A list of ReadinessCheck associated with the account
listReadinessChecksResponse_readinessChecks :: Lens.Lens' ListReadinessChecksResponse (Prelude.Maybe [ReadinessCheckOutput])
listReadinessChecksResponse_readinessChecks :: (Maybe [ReadinessCheckOutput] -> f (Maybe [ReadinessCheckOutput]))
-> ListReadinessChecksResponse -> f ListReadinessChecksResponse
listReadinessChecksResponse_readinessChecks = (ListReadinessChecksResponse -> Maybe [ReadinessCheckOutput])
-> (ListReadinessChecksResponse
    -> Maybe [ReadinessCheckOutput] -> ListReadinessChecksResponse)
-> Lens' ListReadinessChecksResponse (Maybe [ReadinessCheckOutput])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListReadinessChecksResponse' {Maybe [ReadinessCheckOutput]
readinessChecks :: Maybe [ReadinessCheckOutput]
$sel:readinessChecks:ListReadinessChecksResponse' :: ListReadinessChecksResponse -> Maybe [ReadinessCheckOutput]
readinessChecks} -> Maybe [ReadinessCheckOutput]
readinessChecks) (\s :: ListReadinessChecksResponse
s@ListReadinessChecksResponse' {} Maybe [ReadinessCheckOutput]
a -> ListReadinessChecksResponse
s {$sel:readinessChecks:ListReadinessChecksResponse' :: Maybe [ReadinessCheckOutput]
readinessChecks = Maybe [ReadinessCheckOutput]
a} :: ListReadinessChecksResponse) ((Maybe [ReadinessCheckOutput] -> f (Maybe [ReadinessCheckOutput]))
 -> ListReadinessChecksResponse -> f ListReadinessChecksResponse)
-> ((Maybe [ReadinessCheckOutput]
     -> f (Maybe [ReadinessCheckOutput]))
    -> Maybe [ReadinessCheckOutput]
    -> f (Maybe [ReadinessCheckOutput]))
-> (Maybe [ReadinessCheckOutput]
    -> f (Maybe [ReadinessCheckOutput]))
-> ListReadinessChecksResponse
-> f ListReadinessChecksResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ReadinessCheckOutput]
  [ReadinessCheckOutput]
  [ReadinessCheckOutput]
  [ReadinessCheckOutput]
-> Iso
     (Maybe [ReadinessCheckOutput])
     (Maybe [ReadinessCheckOutput])
     (Maybe [ReadinessCheckOutput])
     (Maybe [ReadinessCheckOutput])
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
  [ReadinessCheckOutput]
  [ReadinessCheckOutput]
  [ReadinessCheckOutput]
  [ReadinessCheckOutput]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A token that can be used to resume pagination from the end of the
-- collection.
listReadinessChecksResponse_nextToken :: Lens.Lens' ListReadinessChecksResponse (Prelude.Maybe Prelude.Text)
listReadinessChecksResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListReadinessChecksResponse -> f ListReadinessChecksResponse
listReadinessChecksResponse_nextToken = (ListReadinessChecksResponse -> Maybe Text)
-> (ListReadinessChecksResponse
    -> Maybe Text -> ListReadinessChecksResponse)
-> Lens' ListReadinessChecksResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListReadinessChecksResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListReadinessChecksResponse' :: ListReadinessChecksResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListReadinessChecksResponse
s@ListReadinessChecksResponse' {} Maybe Text
a -> ListReadinessChecksResponse
s {$sel:nextToken:ListReadinessChecksResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListReadinessChecksResponse)

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

instance Prelude.NFData ListReadinessChecksResponse