{-# 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.QuickSight.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)
--
-- Lists dashboards in an Amazon Web Services account.
--
-- This operation returns paginated results.
module Amazonka.QuickSight.ListDashboards
  ( -- * Creating a Request
    ListDashboards (..),
    newListDashboards,

    -- * Request Lenses
    listDashboards_nextToken,
    listDashboards_maxResults,
    listDashboards_awsAccountId,

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

    -- * Response Lenses
    listDashboardsResponse_requestId,
    listDashboardsResponse_nextToken,
    listDashboardsResponse_dashboardSummaryList,
    listDashboardsResponse_status,
  )
where

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

-- | /See:/ 'newListDashboards' smart constructor.
data ListDashboards = ListDashboards'
  { -- | The token for the next set of results, or null if there are no more
    -- results.
    ListDashboards -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to be returned per request.
    ListDashboards -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The ID of the Amazon Web Services account that contains the dashboards
    -- that you\'re listing.
    ListDashboards -> Text
awsAccountId :: 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:
--
-- 'nextToken', 'listDashboards_nextToken' - The token for the next set of results, or null if there are no more
-- results.
--
-- 'maxResults', 'listDashboards_maxResults' - The maximum number of results to be returned per request.
--
-- 'awsAccountId', 'listDashboards_awsAccountId' - The ID of the Amazon Web Services account that contains the dashboards
-- that you\'re listing.
newListDashboards ::
  -- | 'awsAccountId'
  Prelude.Text ->
  ListDashboards
newListDashboards :: Text -> ListDashboards
newListDashboards Text
pAwsAccountId_ =
  ListDashboards' :: Maybe Text -> Maybe Natural -> Text -> ListDashboards
ListDashboards'
    { $sel:nextToken:ListDashboards' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListDashboards' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:awsAccountId:ListDashboards' :: Text
awsAccountId = Text
pAwsAccountId_
    }

-- | The token for the next set of results, or null if there are no more
-- results.
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)

-- | The maximum number of results to be returned per request.
listDashboards_maxResults :: Lens.Lens' ListDashboards (Prelude.Maybe Prelude.Natural)
listDashboards_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListDashboards -> f ListDashboards
listDashboards_maxResults = (ListDashboards -> Maybe Natural)
-> (ListDashboards -> Maybe Natural -> ListDashboards)
-> Lens
     ListDashboards ListDashboards (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDashboards' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListDashboards' :: ListDashboards -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListDashboards
s@ListDashboards' {} Maybe Natural
a -> ListDashboards
s {$sel:maxResults:ListDashboards' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListDashboards)

-- | The ID of the Amazon Web Services account that contains the dashboards
-- that you\'re listing.
listDashboards_awsAccountId :: Lens.Lens' ListDashboards Prelude.Text
listDashboards_awsAccountId :: (Text -> f Text) -> ListDashboards -> f ListDashboards
listDashboards_awsAccountId = (ListDashboards -> Text)
-> (ListDashboards -> Text -> ListDashboards)
-> Lens ListDashboards ListDashboards Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDashboards' {Text
awsAccountId :: Text
$sel:awsAccountId:ListDashboards' :: ListDashboards -> Text
awsAccountId} -> Text
awsAccountId) (\s :: ListDashboards
s@ListDashboards' {} Text
a -> ListDashboards
s {$sel:awsAccountId:ListDashboards' :: Text
awsAccountId = 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 [DashboardSummary] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListDashboards
ListDashboardsResponse
rs
            ListDashboardsResponse
-> Getting
     (First [DashboardSummary])
     ListDashboardsResponse
     [DashboardSummary]
-> Maybe [DashboardSummary]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [DashboardSummary]
 -> Const (First [DashboardSummary]) (Maybe [DashboardSummary]))
-> ListDashboardsResponse
-> Const (First [DashboardSummary]) ListDashboardsResponse
Lens' ListDashboardsResponse (Maybe [DashboardSummary])
listDashboardsResponse_dashboardSummaryList
              ((Maybe [DashboardSummary]
  -> Const (First [DashboardSummary]) (Maybe [DashboardSummary]))
 -> ListDashboardsResponse
 -> Const (First [DashboardSummary]) ListDashboardsResponse)
-> (([DashboardSummary]
     -> Const (First [DashboardSummary]) [DashboardSummary])
    -> Maybe [DashboardSummary]
    -> Const (First [DashboardSummary]) (Maybe [DashboardSummary]))
-> Getting
     (First [DashboardSummary])
     ListDashboardsResponse
     [DashboardSummary]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DashboardSummary]
 -> Const (First [DashboardSummary]) [DashboardSummary])
-> Maybe [DashboardSummary]
-> Const (First [DashboardSummary]) (Maybe [DashboardSummary])
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.get Service
defaultService
  response :: Logger
-> Service
-> Proxy ListDashboards
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListDashboards)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListDashboards))
-> Logger
-> Service
-> Proxy ListDashboards
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListDashboards)))
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 Text
-> Maybe [DashboardSummary]
-> Int
-> ListDashboardsResponse
ListDashboardsResponse'
            (Maybe Text
 -> Maybe Text
 -> Maybe [DashboardSummary]
 -> Int
 -> ListDashboardsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe [DashboardSummary] -> Int -> ListDashboardsResponse)
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
"RequestId")
            Either
  String
  (Maybe Text
   -> Maybe [DashboardSummary] -> Int -> ListDashboardsResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe [DashboardSummary] -> Int -> ListDashboardsResponse)
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 (Maybe [DashboardSummary] -> Int -> ListDashboardsResponse)
-> Either String (Maybe [DashboardSummary])
-> Either String (Int -> ListDashboardsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe (Maybe [DashboardSummary]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"DashboardSummaryList"
                            Either String (Maybe (Maybe [DashboardSummary]))
-> Maybe [DashboardSummary]
-> Either String (Maybe [DashboardSummary])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [DashboardSummary]
forall a. Monoid a => a
Prelude.mempty
                        )
            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] -> 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.0" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToPath ListDashboards where
  toPath :: ListDashboards -> ByteString
toPath ListDashboards' {Maybe Natural
Maybe Text
Text
awsAccountId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:awsAccountId:ListDashboards' :: ListDashboards -> Text
$sel:maxResults:ListDashboards' :: ListDashboards -> Maybe Natural
$sel:nextToken:ListDashboards' :: ListDashboards -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/accounts/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
awsAccountId, ByteString
"/dashboards"]

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

-- | /See:/ 'newListDashboardsResponse' smart constructor.
data ListDashboardsResponse = ListDashboardsResponse'
  { -- | The Amazon Web Services request ID for this operation.
    ListDashboardsResponse -> Maybe Text
requestId :: Prelude.Maybe Prelude.Text,
    -- | The token for the next set of results, or null if there are no more
    -- results.
    ListDashboardsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | A structure that contains all of the dashboards in your Amazon Web
    -- Services account. This structure provides basic information about the
    -- dashboards.
    ListDashboardsResponse -> Maybe [DashboardSummary]
dashboardSummaryList :: Prelude.Maybe [DashboardSummary],
    -- | The HTTP status of the request.
    ListDashboardsResponse -> Int
status :: 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:
--
-- 'requestId', 'listDashboardsResponse_requestId' - The Amazon Web Services request ID for this operation.
--
-- 'nextToken', 'listDashboardsResponse_nextToken' - The token for the next set of results, or null if there are no more
-- results.
--
-- 'dashboardSummaryList', 'listDashboardsResponse_dashboardSummaryList' - A structure that contains all of the dashboards in your Amazon Web
-- Services account. This structure provides basic information about the
-- dashboards.
--
-- 'status', 'listDashboardsResponse_status' - The HTTP status of the request.
newListDashboardsResponse ::
  -- | 'status'
  Prelude.Int ->
  ListDashboardsResponse
newListDashboardsResponse :: Int -> ListDashboardsResponse
newListDashboardsResponse Int
pStatus_ =
  ListDashboardsResponse' :: Maybe Text
-> Maybe Text
-> Maybe [DashboardSummary]
-> Int
-> ListDashboardsResponse
ListDashboardsResponse'
    { $sel:requestId:ListDashboardsResponse' :: Maybe Text
requestId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListDashboardsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dashboardSummaryList:ListDashboardsResponse' :: Maybe [DashboardSummary]
dashboardSummaryList = Maybe [DashboardSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:status:ListDashboardsResponse' :: Int
status = Int
pStatus_
    }

-- | The Amazon Web Services request ID for this operation.
listDashboardsResponse_requestId :: Lens.Lens' ListDashboardsResponse (Prelude.Maybe Prelude.Text)
listDashboardsResponse_requestId :: (Maybe Text -> f (Maybe Text))
-> ListDashboardsResponse -> f ListDashboardsResponse
listDashboardsResponse_requestId = (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
requestId :: Maybe Text
$sel:requestId:ListDashboardsResponse' :: ListDashboardsResponse -> Maybe Text
requestId} -> Maybe Text
requestId) (\s :: ListDashboardsResponse
s@ListDashboardsResponse' {} Maybe Text
a -> ListDashboardsResponse
s {$sel:requestId:ListDashboardsResponse' :: Maybe Text
requestId = Maybe Text
a} :: ListDashboardsResponse)

-- | The token for the next set of results, or null if there are no more
-- 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)

-- | A structure that contains all of the dashboards in your Amazon Web
-- Services account. This structure provides basic information about the
-- dashboards.
listDashboardsResponse_dashboardSummaryList :: Lens.Lens' ListDashboardsResponse (Prelude.Maybe [DashboardSummary])
listDashboardsResponse_dashboardSummaryList :: (Maybe [DashboardSummary] -> f (Maybe [DashboardSummary]))
-> ListDashboardsResponse -> f ListDashboardsResponse
listDashboardsResponse_dashboardSummaryList = (ListDashboardsResponse -> Maybe [DashboardSummary])
-> (ListDashboardsResponse
    -> Maybe [DashboardSummary] -> ListDashboardsResponse)
-> Lens' ListDashboardsResponse (Maybe [DashboardSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDashboardsResponse' {Maybe [DashboardSummary]
dashboardSummaryList :: Maybe [DashboardSummary]
$sel:dashboardSummaryList:ListDashboardsResponse' :: ListDashboardsResponse -> Maybe [DashboardSummary]
dashboardSummaryList} -> Maybe [DashboardSummary]
dashboardSummaryList) (\s :: ListDashboardsResponse
s@ListDashboardsResponse' {} Maybe [DashboardSummary]
a -> ListDashboardsResponse
s {$sel:dashboardSummaryList:ListDashboardsResponse' :: Maybe [DashboardSummary]
dashboardSummaryList = Maybe [DashboardSummary]
a} :: ListDashboardsResponse) ((Maybe [DashboardSummary] -> f (Maybe [DashboardSummary]))
 -> ListDashboardsResponse -> f ListDashboardsResponse)
-> ((Maybe [DashboardSummary] -> f (Maybe [DashboardSummary]))
    -> Maybe [DashboardSummary] -> f (Maybe [DashboardSummary]))
-> (Maybe [DashboardSummary] -> f (Maybe [DashboardSummary]))
-> ListDashboardsResponse
-> f ListDashboardsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [DashboardSummary]
  [DashboardSummary]
  [DashboardSummary]
  [DashboardSummary]
-> Iso
     (Maybe [DashboardSummary])
     (Maybe [DashboardSummary])
     (Maybe [DashboardSummary])
     (Maybe [DashboardSummary])
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
  [DashboardSummary]
  [DashboardSummary]
  [DashboardSummary]
  [DashboardSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The HTTP status of the request.
listDashboardsResponse_status :: Lens.Lens' ListDashboardsResponse Prelude.Int
listDashboardsResponse_status :: (Int -> f Int)
-> ListDashboardsResponse -> f ListDashboardsResponse
listDashboardsResponse_status = (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
status :: Int
$sel:status:ListDashboardsResponse' :: ListDashboardsResponse -> Int
status} -> Int
status) (\s :: ListDashboardsResponse
s@ListDashboardsResponse' {} Int
a -> ListDashboardsResponse
s {$sel:status:ListDashboardsResponse' :: Int
status = Int
a} :: ListDashboardsResponse)

instance Prelude.NFData ListDashboardsResponse