{-# 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.CloudWatch.ListDashboards
-- 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 list of the dashboards for your account. If you include
-- @DashboardNamePrefix@, only those dashboards with names starting with
-- the prefix are listed. Otherwise, all dashboards in your account are
-- listed.
--
-- @ListDashboards@ returns up to 1000 results on one page. If there are
-- more than 1000 dashboards, you can call @ListDashboards@ again and
-- include the value you received for @NextToken@ in the first call, to
-- receive the next 1000 results.
--
-- This operation returns paginated results.
module Amazonka.CloudWatch.ListDashboards
  ( -- * Creating a Request
    ListDashboards (..),
    newListDashboards,

    -- * Request Lenses
    listDashboards_dashboardNamePrefix,
    listDashboards_nextToken,

    -- * Destructuring the Response
    ListDashboardsResponse (..),
    newListDashboardsResponse,

    -- * Response Lenses
    listDashboardsResponse_dashboardEntries,
    listDashboardsResponse_nextToken,
    listDashboardsResponse_httpStatus,
  )
where

import Amazonka.CloudWatch.Types
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

-- | /See:/ 'newListDashboards' smart constructor.
data ListDashboards = ListDashboards'
  { -- | If you specify this parameter, only the dashboards with names starting
    -- with the specified string are listed. The maximum length is 255, and
    -- valid characters are A-Z, a-z, 0-9, \".\", \"-\", and \"_\".
    ListDashboards -> Maybe Text
dashboardNamePrefix :: Prelude.Maybe Prelude.Text,
    -- | The token returned by a previous call to indicate that there is more
    -- data available.
    ListDashboards -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
  }
  deriving (ListDashboards -> ListDashboards -> Bool
(ListDashboards -> ListDashboards -> Bool)
-> (ListDashboards -> ListDashboards -> Bool) -> Eq ListDashboards
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDashboards -> ListDashboards -> Bool
$c/= :: ListDashboards -> ListDashboards -> Bool
== :: ListDashboards -> ListDashboards -> Bool
$c== :: ListDashboards -> ListDashboards -> Bool
Prelude.Eq, ReadPrec [ListDashboards]
ReadPrec ListDashboards
Int -> ReadS ListDashboards
ReadS [ListDashboards]
(Int -> ReadS ListDashboards)
-> ReadS [ListDashboards]
-> ReadPrec ListDashboards
-> ReadPrec [ListDashboards]
-> Read ListDashboards
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDashboards]
$creadListPrec :: ReadPrec [ListDashboards]
readPrec :: ReadPrec ListDashboards
$creadPrec :: ReadPrec ListDashboards
readList :: ReadS [ListDashboards]
$creadList :: ReadS [ListDashboards]
readsPrec :: Int -> ReadS ListDashboards
$creadsPrec :: Int -> ReadS ListDashboards
Prelude.Read, Int -> ListDashboards -> ShowS
[ListDashboards] -> ShowS
ListDashboards -> String
(Int -> ListDashboards -> ShowS)
-> (ListDashboards -> String)
-> ([ListDashboards] -> ShowS)
-> Show ListDashboards
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDashboards] -> ShowS
$cshowList :: [ListDashboards] -> ShowS
show :: ListDashboards -> String
$cshow :: ListDashboards -> String
showsPrec :: Int -> ListDashboards -> ShowS
$cshowsPrec :: Int -> ListDashboards -> ShowS
Prelude.Show, (forall x. ListDashboards -> Rep ListDashboards x)
-> (forall x. Rep ListDashboards x -> ListDashboards)
-> Generic ListDashboards
forall x. Rep ListDashboards x -> ListDashboards
forall x. ListDashboards -> Rep ListDashboards x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListDashboards x -> ListDashboards
$cfrom :: forall x. ListDashboards -> Rep ListDashboards x
Prelude.Generic)

-- |
-- Create a value of 'ListDashboards' 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:
--
-- 'dashboardNamePrefix', 'listDashboards_dashboardNamePrefix' - If you specify this parameter, only the dashboards with names starting
-- with the specified string are listed. The maximum length is 255, and
-- valid characters are A-Z, a-z, 0-9, \".\", \"-\", and \"_\".
--
-- 'nextToken', 'listDashboards_nextToken' - The token returned by a previous call to indicate that there is more
-- data available.
newListDashboards ::
  ListDashboards
newListDashboards :: ListDashboards
newListDashboards =
  ListDashboards' :: Maybe Text -> Maybe Text -> ListDashboards
ListDashboards'
    { $sel:dashboardNamePrefix:ListDashboards' :: Maybe Text
dashboardNamePrefix =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListDashboards' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | If you specify this parameter, only the dashboards with names starting
-- with the specified string are listed. The maximum length is 255, and
-- valid characters are A-Z, a-z, 0-9, \".\", \"-\", and \"_\".
listDashboards_dashboardNamePrefix :: Lens.Lens' ListDashboards (Prelude.Maybe Prelude.Text)
listDashboards_dashboardNamePrefix :: (Maybe Text -> f (Maybe Text))
-> ListDashboards -> f ListDashboards
listDashboards_dashboardNamePrefix = (ListDashboards -> Maybe Text)
-> (ListDashboards -> Maybe Text -> ListDashboards)
-> Lens ListDashboards ListDashboards (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDashboards' {Maybe Text
dashboardNamePrefix :: Maybe Text
$sel:dashboardNamePrefix:ListDashboards' :: ListDashboards -> Maybe Text
dashboardNamePrefix} -> Maybe Text
dashboardNamePrefix) (\s :: ListDashboards
s@ListDashboards' {} Maybe Text
a -> ListDashboards
s {$sel:dashboardNamePrefix:ListDashboards' :: Maybe Text
dashboardNamePrefix = Maybe Text
a} :: ListDashboards)

-- | The token returned by a previous call to indicate that there is more
-- data available.
listDashboards_nextToken :: Lens.Lens' ListDashboards (Prelude.Maybe Prelude.Text)
listDashboards_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListDashboards -> f ListDashboards
listDashboards_nextToken = (ListDashboards -> Maybe Text)
-> (ListDashboards -> Maybe Text -> ListDashboards)
-> Lens ListDashboards ListDashboards (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDashboards' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListDashboards' :: ListDashboards -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListDashboards
s@ListDashboards' {} Maybe Text
a -> ListDashboards
s {$sel:nextToken:ListDashboards' :: Maybe Text
nextToken = Maybe Text
a} :: ListDashboards)

instance Core.AWSPager ListDashboards where
  page :: ListDashboards
-> AWSResponse ListDashboards -> Maybe ListDashboards
page ListDashboards
rq AWSResponse ListDashboards
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListDashboards
ListDashboardsResponse
rs
            ListDashboardsResponse
-> Getting (First Text) ListDashboardsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListDashboardsResponse
-> Const (First Text) ListDashboardsResponse
Lens' ListDashboardsResponse (Maybe Text)
listDashboardsResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListDashboardsResponse
 -> Const (First Text) ListDashboardsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListDashboardsResponse 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 ListDashboards
forall a. Maybe a
Prelude.Nothing
    | Maybe [DashboardEntry] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListDashboards
ListDashboardsResponse
rs
            ListDashboardsResponse
-> Getting
     (First [DashboardEntry]) ListDashboardsResponse [DashboardEntry]
-> Maybe [DashboardEntry]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [DashboardEntry]
 -> Const (First [DashboardEntry]) (Maybe [DashboardEntry]))
-> ListDashboardsResponse
-> Const (First [DashboardEntry]) ListDashboardsResponse
Lens' ListDashboardsResponse (Maybe [DashboardEntry])
listDashboardsResponse_dashboardEntries
              ((Maybe [DashboardEntry]
  -> Const (First [DashboardEntry]) (Maybe [DashboardEntry]))
 -> ListDashboardsResponse
 -> Const (First [DashboardEntry]) ListDashboardsResponse)
-> (([DashboardEntry]
     -> Const (First [DashboardEntry]) [DashboardEntry])
    -> Maybe [DashboardEntry]
    -> Const (First [DashboardEntry]) (Maybe [DashboardEntry]))
-> Getting
     (First [DashboardEntry]) ListDashboardsResponse [DashboardEntry]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DashboardEntry]
 -> Const (First [DashboardEntry]) [DashboardEntry])
-> Maybe [DashboardEntry]
-> Const (First [DashboardEntry]) (Maybe [DashboardEntry])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListDashboards
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListDashboards -> Maybe ListDashboards
forall a. a -> Maybe a
Prelude.Just (ListDashboards -> Maybe ListDashboards)
-> ListDashboards -> Maybe ListDashboards
forall a b. (a -> b) -> a -> b
Prelude.$
        ListDashboards
rq
          ListDashboards
-> (ListDashboards -> ListDashboards) -> ListDashboards
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListDashboards -> Identity ListDashboards
Lens ListDashboards ListDashboards (Maybe Text) (Maybe Text)
listDashboards_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListDashboards -> Identity ListDashboards)
-> Maybe Text -> ListDashboards -> ListDashboards
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListDashboards
ListDashboardsResponse
rs
          ListDashboardsResponse
-> Getting (First Text) ListDashboardsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListDashboardsResponse
-> Const (First Text) ListDashboardsResponse
Lens' ListDashboardsResponse (Maybe Text)
listDashboardsResponse_nextToken ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListDashboardsResponse
 -> Const (First Text) ListDashboardsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListDashboardsResponse 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 ListDashboards where
  type
    AWSResponse ListDashboards =
      ListDashboardsResponse
  request :: ListDashboards -> Request ListDashboards
request = Service -> ListDashboards -> Request ListDashboards
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy ListDashboards
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListDashboards)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse ListDashboards))
-> Logger
-> Service
-> Proxy ListDashboards
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListDashboards)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"ListDashboardsResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe [DashboardEntry]
-> Maybe Text -> Int -> ListDashboardsResponse
ListDashboardsResponse'
            (Maybe [DashboardEntry]
 -> Maybe Text -> Int -> ListDashboardsResponse)
-> Either String (Maybe [DashboardEntry])
-> Either String (Maybe Text -> Int -> ListDashboardsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"DashboardEntries"
                            Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                            Either String [Node]
-> ([Node] -> Either String (Maybe [DashboardEntry]))
-> Either String (Maybe [DashboardEntry])
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= ([Node] -> Either String [DashboardEntry])
-> [Node] -> Either String (Maybe [DashboardEntry])
forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (Text -> [Node] -> Either String [DashboardEntry]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"member")
                        )
            Either String (Maybe Text -> Int -> ListDashboardsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListDashboardsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"NextToken")
            Either String (Int -> ListDashboardsResponse)
-> Either String Int -> Either String ListDashboardsResponse
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 ListDashboards

instance Prelude.NFData ListDashboards

instance Core.ToHeaders ListDashboards where
  toHeaders :: ListDashboards -> ResponseHeaders
toHeaders = ResponseHeaders -> ListDashboards -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

instance Core.ToPath ListDashboards where
  toPath :: ListDashboards -> ByteString
toPath = ByteString -> ListDashboards -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery ListDashboards where
  toQuery :: ListDashboards -> QueryString
toQuery ListDashboards' {Maybe Text
nextToken :: Maybe Text
dashboardNamePrefix :: Maybe Text
$sel:nextToken:ListDashboards' :: ListDashboards -> Maybe Text
$sel:dashboardNamePrefix:ListDashboards' :: ListDashboards -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"ListDashboards" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-08-01" :: Prelude.ByteString),
        ByteString
"DashboardNamePrefix" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
dashboardNamePrefix,
        ByteString
"NextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken
      ]

-- | /See:/ 'newListDashboardsResponse' smart constructor.
data ListDashboardsResponse = ListDashboardsResponse'
  { -- | The list of matching dashboards.
    ListDashboardsResponse -> Maybe [DashboardEntry]
dashboardEntries :: Prelude.Maybe [DashboardEntry],
    -- | The token that marks the start of the next batch of returned results.
    ListDashboardsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListDashboardsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListDashboardsResponse -> ListDashboardsResponse -> Bool
(ListDashboardsResponse -> ListDashboardsResponse -> Bool)
-> (ListDashboardsResponse -> ListDashboardsResponse -> Bool)
-> Eq ListDashboardsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDashboardsResponse -> ListDashboardsResponse -> Bool
$c/= :: ListDashboardsResponse -> ListDashboardsResponse -> Bool
== :: ListDashboardsResponse -> ListDashboardsResponse -> Bool
$c== :: ListDashboardsResponse -> ListDashboardsResponse -> Bool
Prelude.Eq, ReadPrec [ListDashboardsResponse]
ReadPrec ListDashboardsResponse
Int -> ReadS ListDashboardsResponse
ReadS [ListDashboardsResponse]
(Int -> ReadS ListDashboardsResponse)
-> ReadS [ListDashboardsResponse]
-> ReadPrec ListDashboardsResponse
-> ReadPrec [ListDashboardsResponse]
-> Read ListDashboardsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDashboardsResponse]
$creadListPrec :: ReadPrec [ListDashboardsResponse]
readPrec :: ReadPrec ListDashboardsResponse
$creadPrec :: ReadPrec ListDashboardsResponse
readList :: ReadS [ListDashboardsResponse]
$creadList :: ReadS [ListDashboardsResponse]
readsPrec :: Int -> ReadS ListDashboardsResponse
$creadsPrec :: Int -> ReadS ListDashboardsResponse
Prelude.Read, Int -> ListDashboardsResponse -> ShowS
[ListDashboardsResponse] -> ShowS
ListDashboardsResponse -> String
(Int -> ListDashboardsResponse -> ShowS)
-> (ListDashboardsResponse -> String)
-> ([ListDashboardsResponse] -> ShowS)
-> Show ListDashboardsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDashboardsResponse] -> ShowS
$cshowList :: [ListDashboardsResponse] -> ShowS
show :: ListDashboardsResponse -> String
$cshow :: ListDashboardsResponse -> String
showsPrec :: Int -> ListDashboardsResponse -> ShowS
$cshowsPrec :: Int -> ListDashboardsResponse -> ShowS
Prelude.Show, (forall x. ListDashboardsResponse -> Rep ListDashboardsResponse x)
-> (forall x.
    Rep ListDashboardsResponse x -> ListDashboardsResponse)
-> Generic ListDashboardsResponse
forall x. Rep ListDashboardsResponse x -> ListDashboardsResponse
forall x. ListDashboardsResponse -> Rep ListDashboardsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListDashboardsResponse x -> ListDashboardsResponse
$cfrom :: forall x. ListDashboardsResponse -> Rep ListDashboardsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListDashboardsResponse' 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:
--
-- 'dashboardEntries', 'listDashboardsResponse_dashboardEntries' - The list of matching dashboards.
--
-- 'nextToken', 'listDashboardsResponse_nextToken' - The token that marks the start of the next batch of returned results.
--
-- 'httpStatus', 'listDashboardsResponse_httpStatus' - The response's http status code.
newListDashboardsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListDashboardsResponse
newListDashboardsResponse :: Int -> ListDashboardsResponse
newListDashboardsResponse Int
pHttpStatus_ =
  ListDashboardsResponse' :: Maybe [DashboardEntry]
-> Maybe Text -> Int -> ListDashboardsResponse
ListDashboardsResponse'
    { $sel:dashboardEntries:ListDashboardsResponse' :: Maybe [DashboardEntry]
dashboardEntries =
        Maybe [DashboardEntry]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListDashboardsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListDashboardsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The list of matching dashboards.
listDashboardsResponse_dashboardEntries :: Lens.Lens' ListDashboardsResponse (Prelude.Maybe [DashboardEntry])
listDashboardsResponse_dashboardEntries :: (Maybe [DashboardEntry] -> f (Maybe [DashboardEntry]))
-> ListDashboardsResponse -> f ListDashboardsResponse
listDashboardsResponse_dashboardEntries = (ListDashboardsResponse -> Maybe [DashboardEntry])
-> (ListDashboardsResponse
    -> Maybe [DashboardEntry] -> ListDashboardsResponse)
-> Lens' ListDashboardsResponse (Maybe [DashboardEntry])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDashboardsResponse' {Maybe [DashboardEntry]
dashboardEntries :: Maybe [DashboardEntry]
$sel:dashboardEntries:ListDashboardsResponse' :: ListDashboardsResponse -> Maybe [DashboardEntry]
dashboardEntries} -> Maybe [DashboardEntry]
dashboardEntries) (\s :: ListDashboardsResponse
s@ListDashboardsResponse' {} Maybe [DashboardEntry]
a -> ListDashboardsResponse
s {$sel:dashboardEntries:ListDashboardsResponse' :: Maybe [DashboardEntry]
dashboardEntries = Maybe [DashboardEntry]
a} :: ListDashboardsResponse) ((Maybe [DashboardEntry] -> f (Maybe [DashboardEntry]))
 -> ListDashboardsResponse -> f ListDashboardsResponse)
-> ((Maybe [DashboardEntry] -> f (Maybe [DashboardEntry]))
    -> Maybe [DashboardEntry] -> f (Maybe [DashboardEntry]))
-> (Maybe [DashboardEntry] -> f (Maybe [DashboardEntry]))
-> ListDashboardsResponse
-> f ListDashboardsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [DashboardEntry] [DashboardEntry] [DashboardEntry] [DashboardEntry]
-> Iso
     (Maybe [DashboardEntry])
     (Maybe [DashboardEntry])
     (Maybe [DashboardEntry])
     (Maybe [DashboardEntry])
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
  [DashboardEntry] [DashboardEntry] [DashboardEntry] [DashboardEntry]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The token that marks the start of the next batch of returned results.
listDashboardsResponse_nextToken :: Lens.Lens' ListDashboardsResponse (Prelude.Maybe Prelude.Text)
listDashboardsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListDashboardsResponse -> f ListDashboardsResponse
listDashboardsResponse_nextToken = (ListDashboardsResponse -> Maybe Text)
-> (ListDashboardsResponse -> Maybe Text -> ListDashboardsResponse)
-> Lens' ListDashboardsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDashboardsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListDashboardsResponse' :: ListDashboardsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListDashboardsResponse
s@ListDashboardsResponse' {} Maybe Text
a -> ListDashboardsResponse
s {$sel:nextToken:ListDashboardsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListDashboardsResponse)

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

instance Prelude.NFData ListDashboardsResponse