{-# 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.GetCellReadinessSummary
-- 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 information about readiness of a Cell.
--
-- This operation returns paginated results.
module Amazonka.Route53RecoveryReadiness.GetCellReadinessSummary
  ( -- * Creating a Request
    GetCellReadinessSummary (..),
    newGetCellReadinessSummary,

    -- * Request Lenses
    getCellReadinessSummary_nextToken,
    getCellReadinessSummary_maxResults,
    getCellReadinessSummary_cellName,

    -- * Destructuring the Response
    GetCellReadinessSummaryResponse (..),
    newGetCellReadinessSummaryResponse,

    -- * Response Lenses
    getCellReadinessSummaryResponse_readinessChecks,
    getCellReadinessSummaryResponse_readiness,
    getCellReadinessSummaryResponse_nextToken,
    getCellReadinessSummaryResponse_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:/ 'newGetCellReadinessSummary' smart constructor.
data GetCellReadinessSummary = GetCellReadinessSummary'
  { -- | A token used to resume pagination from the end of a previous request.
    GetCellReadinessSummary -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Upper bound on number of records to return.
    GetCellReadinessSummary -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The name of the Cell
    GetCellReadinessSummary -> Text
cellName :: Prelude.Text
  }
  deriving (GetCellReadinessSummary -> GetCellReadinessSummary -> Bool
(GetCellReadinessSummary -> GetCellReadinessSummary -> Bool)
-> (GetCellReadinessSummary -> GetCellReadinessSummary -> Bool)
-> Eq GetCellReadinessSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetCellReadinessSummary -> GetCellReadinessSummary -> Bool
$c/= :: GetCellReadinessSummary -> GetCellReadinessSummary -> Bool
== :: GetCellReadinessSummary -> GetCellReadinessSummary -> Bool
$c== :: GetCellReadinessSummary -> GetCellReadinessSummary -> Bool
Prelude.Eq, ReadPrec [GetCellReadinessSummary]
ReadPrec GetCellReadinessSummary
Int -> ReadS GetCellReadinessSummary
ReadS [GetCellReadinessSummary]
(Int -> ReadS GetCellReadinessSummary)
-> ReadS [GetCellReadinessSummary]
-> ReadPrec GetCellReadinessSummary
-> ReadPrec [GetCellReadinessSummary]
-> Read GetCellReadinessSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetCellReadinessSummary]
$creadListPrec :: ReadPrec [GetCellReadinessSummary]
readPrec :: ReadPrec GetCellReadinessSummary
$creadPrec :: ReadPrec GetCellReadinessSummary
readList :: ReadS [GetCellReadinessSummary]
$creadList :: ReadS [GetCellReadinessSummary]
readsPrec :: Int -> ReadS GetCellReadinessSummary
$creadsPrec :: Int -> ReadS GetCellReadinessSummary
Prelude.Read, Int -> GetCellReadinessSummary -> ShowS
[GetCellReadinessSummary] -> ShowS
GetCellReadinessSummary -> String
(Int -> GetCellReadinessSummary -> ShowS)
-> (GetCellReadinessSummary -> String)
-> ([GetCellReadinessSummary] -> ShowS)
-> Show GetCellReadinessSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetCellReadinessSummary] -> ShowS
$cshowList :: [GetCellReadinessSummary] -> ShowS
show :: GetCellReadinessSummary -> String
$cshow :: GetCellReadinessSummary -> String
showsPrec :: Int -> GetCellReadinessSummary -> ShowS
$cshowsPrec :: Int -> GetCellReadinessSummary -> ShowS
Prelude.Show, (forall x.
 GetCellReadinessSummary -> Rep GetCellReadinessSummary x)
-> (forall x.
    Rep GetCellReadinessSummary x -> GetCellReadinessSummary)
-> Generic GetCellReadinessSummary
forall x. Rep GetCellReadinessSummary x -> GetCellReadinessSummary
forall x. GetCellReadinessSummary -> Rep GetCellReadinessSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetCellReadinessSummary x -> GetCellReadinessSummary
$cfrom :: forall x. GetCellReadinessSummary -> Rep GetCellReadinessSummary x
Prelude.Generic)

-- |
-- Create a value of 'GetCellReadinessSummary' 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', 'getCellReadinessSummary_nextToken' - A token used to resume pagination from the end of a previous request.
--
-- 'maxResults', 'getCellReadinessSummary_maxResults' - Upper bound on number of records to return.
--
-- 'cellName', 'getCellReadinessSummary_cellName' - The name of the Cell
newGetCellReadinessSummary ::
  -- | 'cellName'
  Prelude.Text ->
  GetCellReadinessSummary
newGetCellReadinessSummary :: Text -> GetCellReadinessSummary
newGetCellReadinessSummary Text
pCellName_ =
  GetCellReadinessSummary' :: Maybe Text -> Maybe Natural -> Text -> GetCellReadinessSummary
GetCellReadinessSummary'
    { $sel:nextToken:GetCellReadinessSummary' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:GetCellReadinessSummary' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:cellName:GetCellReadinessSummary' :: Text
cellName = Text
pCellName_
    }

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

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

-- | The name of the Cell
getCellReadinessSummary_cellName :: Lens.Lens' GetCellReadinessSummary Prelude.Text
getCellReadinessSummary_cellName :: (Text -> f Text)
-> GetCellReadinessSummary -> f GetCellReadinessSummary
getCellReadinessSummary_cellName = (GetCellReadinessSummary -> Text)
-> (GetCellReadinessSummary -> Text -> GetCellReadinessSummary)
-> Lens GetCellReadinessSummary GetCellReadinessSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCellReadinessSummary' {Text
cellName :: Text
$sel:cellName:GetCellReadinessSummary' :: GetCellReadinessSummary -> Text
cellName} -> Text
cellName) (\s :: GetCellReadinessSummary
s@GetCellReadinessSummary' {} Text
a -> GetCellReadinessSummary
s {$sel:cellName:GetCellReadinessSummary' :: Text
cellName = Text
a} :: GetCellReadinessSummary)

instance Core.AWSPager GetCellReadinessSummary where
  page :: GetCellReadinessSummary
-> AWSResponse GetCellReadinessSummary
-> Maybe GetCellReadinessSummary
page GetCellReadinessSummary
rq AWSResponse GetCellReadinessSummary
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse GetCellReadinessSummary
GetCellReadinessSummaryResponse
rs
            GetCellReadinessSummaryResponse
-> Getting (First Text) GetCellReadinessSummaryResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> GetCellReadinessSummaryResponse
-> Const (First Text) GetCellReadinessSummaryResponse
Lens' GetCellReadinessSummaryResponse (Maybe Text)
getCellReadinessSummaryResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> GetCellReadinessSummaryResponse
 -> Const (First Text) GetCellReadinessSummaryResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) GetCellReadinessSummaryResponse 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 GetCellReadinessSummary
forall a. Maybe a
Prelude.Nothing
    | Maybe [ReadinessCheckSummary] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse GetCellReadinessSummary
GetCellReadinessSummaryResponse
rs
            GetCellReadinessSummaryResponse
-> Getting
     (First [ReadinessCheckSummary])
     GetCellReadinessSummaryResponse
     [ReadinessCheckSummary]
-> Maybe [ReadinessCheckSummary]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [ReadinessCheckSummary]
 -> Const
      (First [ReadinessCheckSummary]) (Maybe [ReadinessCheckSummary]))
-> GetCellReadinessSummaryResponse
-> Const
     (First [ReadinessCheckSummary]) GetCellReadinessSummaryResponse
Lens'
  GetCellReadinessSummaryResponse (Maybe [ReadinessCheckSummary])
getCellReadinessSummaryResponse_readinessChecks
              ((Maybe [ReadinessCheckSummary]
  -> Const
       (First [ReadinessCheckSummary]) (Maybe [ReadinessCheckSummary]))
 -> GetCellReadinessSummaryResponse
 -> Const
      (First [ReadinessCheckSummary]) GetCellReadinessSummaryResponse)
-> (([ReadinessCheckSummary]
     -> Const (First [ReadinessCheckSummary]) [ReadinessCheckSummary])
    -> Maybe [ReadinessCheckSummary]
    -> Const
         (First [ReadinessCheckSummary]) (Maybe [ReadinessCheckSummary]))
-> Getting
     (First [ReadinessCheckSummary])
     GetCellReadinessSummaryResponse
     [ReadinessCheckSummary]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([ReadinessCheckSummary]
 -> Const (First [ReadinessCheckSummary]) [ReadinessCheckSummary])
-> Maybe [ReadinessCheckSummary]
-> Const
     (First [ReadinessCheckSummary]) (Maybe [ReadinessCheckSummary])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe GetCellReadinessSummary
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      GetCellReadinessSummary -> Maybe GetCellReadinessSummary
forall a. a -> Maybe a
Prelude.Just (GetCellReadinessSummary -> Maybe GetCellReadinessSummary)
-> GetCellReadinessSummary -> Maybe GetCellReadinessSummary
forall a b. (a -> b) -> a -> b
Prelude.$
        GetCellReadinessSummary
rq
          GetCellReadinessSummary
-> (GetCellReadinessSummary -> GetCellReadinessSummary)
-> GetCellReadinessSummary
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> GetCellReadinessSummary -> Identity GetCellReadinessSummary
Lens
  GetCellReadinessSummary
  GetCellReadinessSummary
  (Maybe Text)
  (Maybe Text)
getCellReadinessSummary_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> GetCellReadinessSummary -> Identity GetCellReadinessSummary)
-> Maybe Text -> GetCellReadinessSummary -> GetCellReadinessSummary
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse GetCellReadinessSummary
GetCellReadinessSummaryResponse
rs
          GetCellReadinessSummaryResponse
-> Getting (First Text) GetCellReadinessSummaryResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> GetCellReadinessSummaryResponse
-> Const (First Text) GetCellReadinessSummaryResponse
Lens' GetCellReadinessSummaryResponse (Maybe Text)
getCellReadinessSummaryResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> GetCellReadinessSummaryResponse
 -> Const (First Text) GetCellReadinessSummaryResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) GetCellReadinessSummaryResponse 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 GetCellReadinessSummary where
  type
    AWSResponse GetCellReadinessSummary =
      GetCellReadinessSummaryResponse
  request :: GetCellReadinessSummary -> Request GetCellReadinessSummary
request = Service
-> GetCellReadinessSummary -> Request GetCellReadinessSummary
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy GetCellReadinessSummary
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetCellReadinessSummary)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetCellReadinessSummary))
-> Logger
-> Service
-> Proxy GetCellReadinessSummary
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetCellReadinessSummary)))
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 [ReadinessCheckSummary]
-> Maybe Readiness
-> Maybe Text
-> Int
-> GetCellReadinessSummaryResponse
GetCellReadinessSummaryResponse'
            (Maybe [ReadinessCheckSummary]
 -> Maybe Readiness
 -> Maybe Text
 -> Int
 -> GetCellReadinessSummaryResponse)
-> Either String (Maybe [ReadinessCheckSummary])
-> Either
     String
     (Maybe Readiness
      -> Maybe Text -> Int -> GetCellReadinessSummaryResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object
-> Text -> Either String (Maybe (Maybe [ReadinessCheckSummary]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"readinessChecks"
                            Either String (Maybe (Maybe [ReadinessCheckSummary]))
-> Maybe [ReadinessCheckSummary]
-> Either String (Maybe [ReadinessCheckSummary])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [ReadinessCheckSummary]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String
  (Maybe Readiness
   -> Maybe Text -> Int -> GetCellReadinessSummaryResponse)
-> Either String (Maybe Readiness)
-> Either
     String (Maybe Text -> Int -> GetCellReadinessSummaryResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Readiness)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"readiness")
            Either
  String (Maybe Text -> Int -> GetCellReadinessSummaryResponse)
-> Either String (Maybe Text)
-> Either String (Int -> GetCellReadinessSummaryResponse)
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 -> GetCellReadinessSummaryResponse)
-> Either String Int
-> Either String GetCellReadinessSummaryResponse
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 GetCellReadinessSummary

instance Prelude.NFData GetCellReadinessSummary

instance Core.ToHeaders GetCellReadinessSummary where
  toHeaders :: GetCellReadinessSummary -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetCellReadinessSummary -> 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 GetCellReadinessSummary where
  toPath :: GetCellReadinessSummary -> ByteString
toPath GetCellReadinessSummary' {Maybe Natural
Maybe Text
Text
cellName :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:cellName:GetCellReadinessSummary' :: GetCellReadinessSummary -> Text
$sel:maxResults:GetCellReadinessSummary' :: GetCellReadinessSummary -> Maybe Natural
$sel:nextToken:GetCellReadinessSummary' :: GetCellReadinessSummary -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/cellreadiness/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
cellName]

instance Core.ToQuery GetCellReadinessSummary where
  toQuery :: GetCellReadinessSummary -> QueryString
toQuery GetCellReadinessSummary' {Maybe Natural
Maybe Text
Text
cellName :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:cellName:GetCellReadinessSummary' :: GetCellReadinessSummary -> Text
$sel:maxResults:GetCellReadinessSummary' :: GetCellReadinessSummary -> Maybe Natural
$sel:nextToken:GetCellReadinessSummary' :: GetCellReadinessSummary -> 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:/ 'newGetCellReadinessSummaryResponse' smart constructor.
data GetCellReadinessSummaryResponse = GetCellReadinessSummaryResponse'
  { -- | Summaries for the ReadinessChecks making up the Cell
    GetCellReadinessSummaryResponse -> Maybe [ReadinessCheckSummary]
readinessChecks :: Prelude.Maybe [ReadinessCheckSummary],
    -- | The readiness at Cell level.
    GetCellReadinessSummaryResponse -> Maybe Readiness
readiness :: Prelude.Maybe Readiness,
    -- | A token that can be used to resume pagination from the end of the
    -- collection.
    GetCellReadinessSummaryResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    GetCellReadinessSummaryResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetCellReadinessSummaryResponse
-> GetCellReadinessSummaryResponse -> Bool
(GetCellReadinessSummaryResponse
 -> GetCellReadinessSummaryResponse -> Bool)
-> (GetCellReadinessSummaryResponse
    -> GetCellReadinessSummaryResponse -> Bool)
-> Eq GetCellReadinessSummaryResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetCellReadinessSummaryResponse
-> GetCellReadinessSummaryResponse -> Bool
$c/= :: GetCellReadinessSummaryResponse
-> GetCellReadinessSummaryResponse -> Bool
== :: GetCellReadinessSummaryResponse
-> GetCellReadinessSummaryResponse -> Bool
$c== :: GetCellReadinessSummaryResponse
-> GetCellReadinessSummaryResponse -> Bool
Prelude.Eq, ReadPrec [GetCellReadinessSummaryResponse]
ReadPrec GetCellReadinessSummaryResponse
Int -> ReadS GetCellReadinessSummaryResponse
ReadS [GetCellReadinessSummaryResponse]
(Int -> ReadS GetCellReadinessSummaryResponse)
-> ReadS [GetCellReadinessSummaryResponse]
-> ReadPrec GetCellReadinessSummaryResponse
-> ReadPrec [GetCellReadinessSummaryResponse]
-> Read GetCellReadinessSummaryResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetCellReadinessSummaryResponse]
$creadListPrec :: ReadPrec [GetCellReadinessSummaryResponse]
readPrec :: ReadPrec GetCellReadinessSummaryResponse
$creadPrec :: ReadPrec GetCellReadinessSummaryResponse
readList :: ReadS [GetCellReadinessSummaryResponse]
$creadList :: ReadS [GetCellReadinessSummaryResponse]
readsPrec :: Int -> ReadS GetCellReadinessSummaryResponse
$creadsPrec :: Int -> ReadS GetCellReadinessSummaryResponse
Prelude.Read, Int -> GetCellReadinessSummaryResponse -> ShowS
[GetCellReadinessSummaryResponse] -> ShowS
GetCellReadinessSummaryResponse -> String
(Int -> GetCellReadinessSummaryResponse -> ShowS)
-> (GetCellReadinessSummaryResponse -> String)
-> ([GetCellReadinessSummaryResponse] -> ShowS)
-> Show GetCellReadinessSummaryResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetCellReadinessSummaryResponse] -> ShowS
$cshowList :: [GetCellReadinessSummaryResponse] -> ShowS
show :: GetCellReadinessSummaryResponse -> String
$cshow :: GetCellReadinessSummaryResponse -> String
showsPrec :: Int -> GetCellReadinessSummaryResponse -> ShowS
$cshowsPrec :: Int -> GetCellReadinessSummaryResponse -> ShowS
Prelude.Show, (forall x.
 GetCellReadinessSummaryResponse
 -> Rep GetCellReadinessSummaryResponse x)
-> (forall x.
    Rep GetCellReadinessSummaryResponse x
    -> GetCellReadinessSummaryResponse)
-> Generic GetCellReadinessSummaryResponse
forall x.
Rep GetCellReadinessSummaryResponse x
-> GetCellReadinessSummaryResponse
forall x.
GetCellReadinessSummaryResponse
-> Rep GetCellReadinessSummaryResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetCellReadinessSummaryResponse x
-> GetCellReadinessSummaryResponse
$cfrom :: forall x.
GetCellReadinessSummaryResponse
-> Rep GetCellReadinessSummaryResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetCellReadinessSummaryResponse' 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', 'getCellReadinessSummaryResponse_readinessChecks' - Summaries for the ReadinessChecks making up the Cell
--
-- 'readiness', 'getCellReadinessSummaryResponse_readiness' - The readiness at Cell level.
--
-- 'nextToken', 'getCellReadinessSummaryResponse_nextToken' - A token that can be used to resume pagination from the end of the
-- collection.
--
-- 'httpStatus', 'getCellReadinessSummaryResponse_httpStatus' - The response's http status code.
newGetCellReadinessSummaryResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetCellReadinessSummaryResponse
newGetCellReadinessSummaryResponse :: Int -> GetCellReadinessSummaryResponse
newGetCellReadinessSummaryResponse Int
pHttpStatus_ =
  GetCellReadinessSummaryResponse' :: Maybe [ReadinessCheckSummary]
-> Maybe Readiness
-> Maybe Text
-> Int
-> GetCellReadinessSummaryResponse
GetCellReadinessSummaryResponse'
    { $sel:readinessChecks:GetCellReadinessSummaryResponse' :: Maybe [ReadinessCheckSummary]
readinessChecks =
        Maybe [ReadinessCheckSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:readiness:GetCellReadinessSummaryResponse' :: Maybe Readiness
readiness = Maybe Readiness
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:GetCellReadinessSummaryResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetCellReadinessSummaryResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Summaries for the ReadinessChecks making up the Cell
getCellReadinessSummaryResponse_readinessChecks :: Lens.Lens' GetCellReadinessSummaryResponse (Prelude.Maybe [ReadinessCheckSummary])
getCellReadinessSummaryResponse_readinessChecks :: (Maybe [ReadinessCheckSummary]
 -> f (Maybe [ReadinessCheckSummary]))
-> GetCellReadinessSummaryResponse
-> f GetCellReadinessSummaryResponse
getCellReadinessSummaryResponse_readinessChecks = (GetCellReadinessSummaryResponse -> Maybe [ReadinessCheckSummary])
-> (GetCellReadinessSummaryResponse
    -> Maybe [ReadinessCheckSummary]
    -> GetCellReadinessSummaryResponse)
-> Lens'
     GetCellReadinessSummaryResponse (Maybe [ReadinessCheckSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCellReadinessSummaryResponse' {Maybe [ReadinessCheckSummary]
readinessChecks :: Maybe [ReadinessCheckSummary]
$sel:readinessChecks:GetCellReadinessSummaryResponse' :: GetCellReadinessSummaryResponse -> Maybe [ReadinessCheckSummary]
readinessChecks} -> Maybe [ReadinessCheckSummary]
readinessChecks) (\s :: GetCellReadinessSummaryResponse
s@GetCellReadinessSummaryResponse' {} Maybe [ReadinessCheckSummary]
a -> GetCellReadinessSummaryResponse
s {$sel:readinessChecks:GetCellReadinessSummaryResponse' :: Maybe [ReadinessCheckSummary]
readinessChecks = Maybe [ReadinessCheckSummary]
a} :: GetCellReadinessSummaryResponse) ((Maybe [ReadinessCheckSummary]
  -> f (Maybe [ReadinessCheckSummary]))
 -> GetCellReadinessSummaryResponse
 -> f GetCellReadinessSummaryResponse)
-> ((Maybe [ReadinessCheckSummary]
     -> f (Maybe [ReadinessCheckSummary]))
    -> Maybe [ReadinessCheckSummary]
    -> f (Maybe [ReadinessCheckSummary]))
-> (Maybe [ReadinessCheckSummary]
    -> f (Maybe [ReadinessCheckSummary]))
-> GetCellReadinessSummaryResponse
-> f GetCellReadinessSummaryResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ReadinessCheckSummary]
  [ReadinessCheckSummary]
  [ReadinessCheckSummary]
  [ReadinessCheckSummary]
-> Iso
     (Maybe [ReadinessCheckSummary])
     (Maybe [ReadinessCheckSummary])
     (Maybe [ReadinessCheckSummary])
     (Maybe [ReadinessCheckSummary])
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
  [ReadinessCheckSummary]
  [ReadinessCheckSummary]
  [ReadinessCheckSummary]
  [ReadinessCheckSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The readiness at Cell level.
getCellReadinessSummaryResponse_readiness :: Lens.Lens' GetCellReadinessSummaryResponse (Prelude.Maybe Readiness)
getCellReadinessSummaryResponse_readiness :: (Maybe Readiness -> f (Maybe Readiness))
-> GetCellReadinessSummaryResponse
-> f GetCellReadinessSummaryResponse
getCellReadinessSummaryResponse_readiness = (GetCellReadinessSummaryResponse -> Maybe Readiness)
-> (GetCellReadinessSummaryResponse
    -> Maybe Readiness -> GetCellReadinessSummaryResponse)
-> Lens
     GetCellReadinessSummaryResponse
     GetCellReadinessSummaryResponse
     (Maybe Readiness)
     (Maybe Readiness)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCellReadinessSummaryResponse' {Maybe Readiness
readiness :: Maybe Readiness
$sel:readiness:GetCellReadinessSummaryResponse' :: GetCellReadinessSummaryResponse -> Maybe Readiness
readiness} -> Maybe Readiness
readiness) (\s :: GetCellReadinessSummaryResponse
s@GetCellReadinessSummaryResponse' {} Maybe Readiness
a -> GetCellReadinessSummaryResponse
s {$sel:readiness:GetCellReadinessSummaryResponse' :: Maybe Readiness
readiness = Maybe Readiness
a} :: GetCellReadinessSummaryResponse)

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

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

instance
  Prelude.NFData
    GetCellReadinessSummaryResponse