{-# 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.ListDashboardVersions
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Lists all the versions of the dashboards in the Amazon QuickSight
-- subscription.
--
-- This operation returns paginated results.
module Amazonka.QuickSight.ListDashboardVersions
  ( -- * Creating a Request
    ListDashboardVersions (..),
    newListDashboardVersions,

    -- * Request Lenses
    listDashboardVersions_maxResults,
    listDashboardVersions_nextToken,
    listDashboardVersions_awsAccountId,
    listDashboardVersions_dashboardId,

    -- * Destructuring the Response
    ListDashboardVersionsResponse (..),
    newListDashboardVersionsResponse,

    -- * Response Lenses
    listDashboardVersionsResponse_dashboardVersionSummaryList,
    listDashboardVersionsResponse_nextToken,
    listDashboardVersionsResponse_requestId,
    listDashboardVersionsResponse_status,
  )
where

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

-- | /See:/ 'newListDashboardVersions' smart constructor.
data ListDashboardVersions = ListDashboardVersions'
  { -- | The maximum number of results to be returned per request.
    ListDashboardVersions -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The token for the next set of results, or null if there are no more
    -- results.
    ListDashboardVersions -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The ID of the Amazon Web Services account that contains the dashboard
    -- that you\'re listing versions for.
    ListDashboardVersions -> Text
awsAccountId :: Prelude.Text,
    -- | The ID for the dashboard.
    ListDashboardVersions -> Text
dashboardId :: Prelude.Text
  }
  deriving (ListDashboardVersions -> ListDashboardVersions -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDashboardVersions -> ListDashboardVersions -> Bool
$c/= :: ListDashboardVersions -> ListDashboardVersions -> Bool
== :: ListDashboardVersions -> ListDashboardVersions -> Bool
$c== :: ListDashboardVersions -> ListDashboardVersions -> Bool
Prelude.Eq, ReadPrec [ListDashboardVersions]
ReadPrec ListDashboardVersions
Int -> ReadS ListDashboardVersions
ReadS [ListDashboardVersions]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDashboardVersions]
$creadListPrec :: ReadPrec [ListDashboardVersions]
readPrec :: ReadPrec ListDashboardVersions
$creadPrec :: ReadPrec ListDashboardVersions
readList :: ReadS [ListDashboardVersions]
$creadList :: ReadS [ListDashboardVersions]
readsPrec :: Int -> ReadS ListDashboardVersions
$creadsPrec :: Int -> ReadS ListDashboardVersions
Prelude.Read, Int -> ListDashboardVersions -> ShowS
[ListDashboardVersions] -> ShowS
ListDashboardVersions -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDashboardVersions] -> ShowS
$cshowList :: [ListDashboardVersions] -> ShowS
show :: ListDashboardVersions -> String
$cshow :: ListDashboardVersions -> String
showsPrec :: Int -> ListDashboardVersions -> ShowS
$cshowsPrec :: Int -> ListDashboardVersions -> ShowS
Prelude.Show, forall x. Rep ListDashboardVersions x -> ListDashboardVersions
forall x. ListDashboardVersions -> Rep ListDashboardVersions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListDashboardVersions x -> ListDashboardVersions
$cfrom :: forall x. ListDashboardVersions -> Rep ListDashboardVersions x
Prelude.Generic)

-- |
-- Create a value of 'ListDashboardVersions' 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:
--
-- 'maxResults', 'listDashboardVersions_maxResults' - The maximum number of results to be returned per request.
--
-- 'nextToken', 'listDashboardVersions_nextToken' - The token for the next set of results, or null if there are no more
-- results.
--
-- 'awsAccountId', 'listDashboardVersions_awsAccountId' - The ID of the Amazon Web Services account that contains the dashboard
-- that you\'re listing versions for.
--
-- 'dashboardId', 'listDashboardVersions_dashboardId' - The ID for the dashboard.
newListDashboardVersions ::
  -- | 'awsAccountId'
  Prelude.Text ->
  -- | 'dashboardId'
  Prelude.Text ->
  ListDashboardVersions
newListDashboardVersions :: Text -> Text -> ListDashboardVersions
newListDashboardVersions Text
pAwsAccountId_ Text
pDashboardId_ =
  ListDashboardVersions'
    { $sel:maxResults:ListDashboardVersions' :: Maybe Natural
maxResults =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListDashboardVersions' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:awsAccountId:ListDashboardVersions' :: Text
awsAccountId = Text
pAwsAccountId_,
      $sel:dashboardId:ListDashboardVersions' :: Text
dashboardId = Text
pDashboardId_
    }

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

-- | The token for the next set of results, or null if there are no more
-- results.
listDashboardVersions_nextToken :: Lens.Lens' ListDashboardVersions (Prelude.Maybe Prelude.Text)
listDashboardVersions_nextToken :: Lens' ListDashboardVersions (Maybe Text)
listDashboardVersions_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDashboardVersions' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListDashboardVersions' :: ListDashboardVersions -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListDashboardVersions
s@ListDashboardVersions' {} Maybe Text
a -> ListDashboardVersions
s {$sel:nextToken:ListDashboardVersions' :: Maybe Text
nextToken = Maybe Text
a} :: ListDashboardVersions)

-- | The ID of the Amazon Web Services account that contains the dashboard
-- that you\'re listing versions for.
listDashboardVersions_awsAccountId :: Lens.Lens' ListDashboardVersions Prelude.Text
listDashboardVersions_awsAccountId :: Lens' ListDashboardVersions Text
listDashboardVersions_awsAccountId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDashboardVersions' {Text
awsAccountId :: Text
$sel:awsAccountId:ListDashboardVersions' :: ListDashboardVersions -> Text
awsAccountId} -> Text
awsAccountId) (\s :: ListDashboardVersions
s@ListDashboardVersions' {} Text
a -> ListDashboardVersions
s {$sel:awsAccountId:ListDashboardVersions' :: Text
awsAccountId = Text
a} :: ListDashboardVersions)

-- | The ID for the dashboard.
listDashboardVersions_dashboardId :: Lens.Lens' ListDashboardVersions Prelude.Text
listDashboardVersions_dashboardId :: Lens' ListDashboardVersions Text
listDashboardVersions_dashboardId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDashboardVersions' {Text
dashboardId :: Text
$sel:dashboardId:ListDashboardVersions' :: ListDashboardVersions -> Text
dashboardId} -> Text
dashboardId) (\s :: ListDashboardVersions
s@ListDashboardVersions' {} Text
a -> ListDashboardVersions
s {$sel:dashboardId:ListDashboardVersions' :: Text
dashboardId = Text
a} :: ListDashboardVersions)

instance Core.AWSPager ListDashboardVersions where
  page :: ListDashboardVersions
-> AWSResponse ListDashboardVersions -> Maybe ListDashboardVersions
page ListDashboardVersions
rq AWSResponse ListDashboardVersions
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListDashboardVersions
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListDashboardVersionsResponse (Maybe Text)
listDashboardVersionsResponse_nextToken
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListDashboardVersions
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  ListDashboardVersionsResponse (Maybe [DashboardVersionSummary])
listDashboardVersionsResponse_dashboardVersionSummaryList
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ ListDashboardVersions
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListDashboardVersions (Maybe Text)
listDashboardVersions_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListDashboardVersions
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListDashboardVersionsResponse (Maybe Text)
listDashboardVersionsResponse_nextToken
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListDashboardVersions where
  type
    AWSResponse ListDashboardVersions =
      ListDashboardVersionsResponse
  request :: (Service -> Service)
-> ListDashboardVersions -> Request ListDashboardVersions
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListDashboardVersions
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListDashboardVersions)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe [DashboardVersionSummary]
-> Maybe Text -> Maybe Text -> Int -> ListDashboardVersionsResponse
ListDashboardVersionsResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"DashboardVersionSummaryList"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"NextToken")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"RequestId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable ListDashboardVersions where
  hashWithSalt :: Int -> ListDashboardVersions -> Int
hashWithSalt Int
_salt ListDashboardVersions' {Maybe Natural
Maybe Text
Text
dashboardId :: Text
awsAccountId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:dashboardId:ListDashboardVersions' :: ListDashboardVersions -> Text
$sel:awsAccountId:ListDashboardVersions' :: ListDashboardVersions -> Text
$sel:nextToken:ListDashboardVersions' :: ListDashboardVersions -> Maybe Text
$sel:maxResults:ListDashboardVersions' :: ListDashboardVersions -> Maybe Natural
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
awsAccountId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
dashboardId

instance Prelude.NFData ListDashboardVersions where
  rnf :: ListDashboardVersions -> ()
rnf ListDashboardVersions' {Maybe Natural
Maybe Text
Text
dashboardId :: Text
awsAccountId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:dashboardId:ListDashboardVersions' :: ListDashboardVersions -> Text
$sel:awsAccountId:ListDashboardVersions' :: ListDashboardVersions -> Text
$sel:nextToken:ListDashboardVersions' :: ListDashboardVersions -> Maybe Text
$sel:maxResults:ListDashboardVersions' :: ListDashboardVersions -> Maybe Natural
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
awsAccountId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
dashboardId

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

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

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

-- | /See:/ 'newListDashboardVersionsResponse' smart constructor.
data ListDashboardVersionsResponse = ListDashboardVersionsResponse'
  { -- | A structure that contains information about each version of the
    -- dashboard.
    ListDashboardVersionsResponse -> Maybe [DashboardVersionSummary]
dashboardVersionSummaryList :: Prelude.Maybe [DashboardVersionSummary],
    -- | The token for the next set of results, or null if there are no more
    -- results.
    ListDashboardVersionsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Web Services request ID for this operation.
    ListDashboardVersionsResponse -> Maybe Text
requestId :: Prelude.Maybe Prelude.Text,
    -- | The HTTP status of the request.
    ListDashboardVersionsResponse -> Int
status :: Prelude.Int
  }
  deriving (ListDashboardVersionsResponse
-> ListDashboardVersionsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListDashboardVersionsResponse
-> ListDashboardVersionsResponse -> Bool
$c/= :: ListDashboardVersionsResponse
-> ListDashboardVersionsResponse -> Bool
== :: ListDashboardVersionsResponse
-> ListDashboardVersionsResponse -> Bool
$c== :: ListDashboardVersionsResponse
-> ListDashboardVersionsResponse -> Bool
Prelude.Eq, ReadPrec [ListDashboardVersionsResponse]
ReadPrec ListDashboardVersionsResponse
Int -> ReadS ListDashboardVersionsResponse
ReadS [ListDashboardVersionsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListDashboardVersionsResponse]
$creadListPrec :: ReadPrec [ListDashboardVersionsResponse]
readPrec :: ReadPrec ListDashboardVersionsResponse
$creadPrec :: ReadPrec ListDashboardVersionsResponse
readList :: ReadS [ListDashboardVersionsResponse]
$creadList :: ReadS [ListDashboardVersionsResponse]
readsPrec :: Int -> ReadS ListDashboardVersionsResponse
$creadsPrec :: Int -> ReadS ListDashboardVersionsResponse
Prelude.Read, Int -> ListDashboardVersionsResponse -> ShowS
[ListDashboardVersionsResponse] -> ShowS
ListDashboardVersionsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListDashboardVersionsResponse] -> ShowS
$cshowList :: [ListDashboardVersionsResponse] -> ShowS
show :: ListDashboardVersionsResponse -> String
$cshow :: ListDashboardVersionsResponse -> String
showsPrec :: Int -> ListDashboardVersionsResponse -> ShowS
$cshowsPrec :: Int -> ListDashboardVersionsResponse -> ShowS
Prelude.Show, forall x.
Rep ListDashboardVersionsResponse x
-> ListDashboardVersionsResponse
forall x.
ListDashboardVersionsResponse
-> Rep ListDashboardVersionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListDashboardVersionsResponse x
-> ListDashboardVersionsResponse
$cfrom :: forall x.
ListDashboardVersionsResponse
-> Rep ListDashboardVersionsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListDashboardVersionsResponse' 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:
--
-- 'dashboardVersionSummaryList', 'listDashboardVersionsResponse_dashboardVersionSummaryList' - A structure that contains information about each version of the
-- dashboard.
--
-- 'nextToken', 'listDashboardVersionsResponse_nextToken' - The token for the next set of results, or null if there are no more
-- results.
--
-- 'requestId', 'listDashboardVersionsResponse_requestId' - The Amazon Web Services request ID for this operation.
--
-- 'status', 'listDashboardVersionsResponse_status' - The HTTP status of the request.
newListDashboardVersionsResponse ::
  -- | 'status'
  Prelude.Int ->
  ListDashboardVersionsResponse
newListDashboardVersionsResponse :: Int -> ListDashboardVersionsResponse
newListDashboardVersionsResponse Int
pStatus_ =
  ListDashboardVersionsResponse'
    { $sel:dashboardVersionSummaryList:ListDashboardVersionsResponse' :: Maybe [DashboardVersionSummary]
dashboardVersionSummaryList =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListDashboardVersionsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:requestId:ListDashboardVersionsResponse' :: Maybe Text
requestId = forall a. Maybe a
Prelude.Nothing,
      $sel:status:ListDashboardVersionsResponse' :: Int
status = Int
pStatus_
    }

-- | A structure that contains information about each version of the
-- dashboard.
listDashboardVersionsResponse_dashboardVersionSummaryList :: Lens.Lens' ListDashboardVersionsResponse (Prelude.Maybe [DashboardVersionSummary])
listDashboardVersionsResponse_dashboardVersionSummaryList :: Lens'
  ListDashboardVersionsResponse (Maybe [DashboardVersionSummary])
listDashboardVersionsResponse_dashboardVersionSummaryList = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDashboardVersionsResponse' {Maybe [DashboardVersionSummary]
dashboardVersionSummaryList :: Maybe [DashboardVersionSummary]
$sel:dashboardVersionSummaryList:ListDashboardVersionsResponse' :: ListDashboardVersionsResponse -> Maybe [DashboardVersionSummary]
dashboardVersionSummaryList} -> Maybe [DashboardVersionSummary]
dashboardVersionSummaryList) (\s :: ListDashboardVersionsResponse
s@ListDashboardVersionsResponse' {} Maybe [DashboardVersionSummary]
a -> ListDashboardVersionsResponse
s {$sel:dashboardVersionSummaryList:ListDashboardVersionsResponse' :: Maybe [DashboardVersionSummary]
dashboardVersionSummaryList = Maybe [DashboardVersionSummary]
a} :: ListDashboardVersionsResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The token for the next set of results, or null if there are no more
-- results.
listDashboardVersionsResponse_nextToken :: Lens.Lens' ListDashboardVersionsResponse (Prelude.Maybe Prelude.Text)
listDashboardVersionsResponse_nextToken :: Lens' ListDashboardVersionsResponse (Maybe Text)
listDashboardVersionsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDashboardVersionsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListDashboardVersionsResponse' :: ListDashboardVersionsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListDashboardVersionsResponse
s@ListDashboardVersionsResponse' {} Maybe Text
a -> ListDashboardVersionsResponse
s {$sel:nextToken:ListDashboardVersionsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListDashboardVersionsResponse)

-- | The Amazon Web Services request ID for this operation.
listDashboardVersionsResponse_requestId :: Lens.Lens' ListDashboardVersionsResponse (Prelude.Maybe Prelude.Text)
listDashboardVersionsResponse_requestId :: Lens' ListDashboardVersionsResponse (Maybe Text)
listDashboardVersionsResponse_requestId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDashboardVersionsResponse' {Maybe Text
requestId :: Maybe Text
$sel:requestId:ListDashboardVersionsResponse' :: ListDashboardVersionsResponse -> Maybe Text
requestId} -> Maybe Text
requestId) (\s :: ListDashboardVersionsResponse
s@ListDashboardVersionsResponse' {} Maybe Text
a -> ListDashboardVersionsResponse
s {$sel:requestId:ListDashboardVersionsResponse' :: Maybe Text
requestId = Maybe Text
a} :: ListDashboardVersionsResponse)

-- | The HTTP status of the request.
listDashboardVersionsResponse_status :: Lens.Lens' ListDashboardVersionsResponse Prelude.Int
listDashboardVersionsResponse_status :: Lens' ListDashboardVersionsResponse Int
listDashboardVersionsResponse_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListDashboardVersionsResponse' {Int
status :: Int
$sel:status:ListDashboardVersionsResponse' :: ListDashboardVersionsResponse -> Int
status} -> Int
status) (\s :: ListDashboardVersionsResponse
s@ListDashboardVersionsResponse' {} Int
a -> ListDashboardVersionsResponse
s {$sel:status:ListDashboardVersionsResponse' :: Int
status = Int
a} :: ListDashboardVersionsResponse)

instance Prelude.NFData ListDashboardVersionsResponse where
  rnf :: ListDashboardVersionsResponse -> ()
rnf ListDashboardVersionsResponse' {Int
Maybe [DashboardVersionSummary]
Maybe Text
status :: Int
requestId :: Maybe Text
nextToken :: Maybe Text
dashboardVersionSummaryList :: Maybe [DashboardVersionSummary]
$sel:status:ListDashboardVersionsResponse' :: ListDashboardVersionsResponse -> Int
$sel:requestId:ListDashboardVersionsResponse' :: ListDashboardVersionsResponse -> Maybe Text
$sel:nextToken:ListDashboardVersionsResponse' :: ListDashboardVersionsResponse -> Maybe Text
$sel:dashboardVersionSummaryList:ListDashboardVersionsResponse' :: ListDashboardVersionsResponse -> Maybe [DashboardVersionSummary]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [DashboardVersionSummary]
dashboardVersionSummaryList
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
requestId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
status