{-# 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.KinesisAnalyticsV2.ListApplicationSnapshots
-- 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 information about the current application snapshots.
--
-- This operation returns paginated results.
module Amazonka.KinesisAnalyticsV2.ListApplicationSnapshots
  ( -- * Creating a Request
    ListApplicationSnapshots (..),
    newListApplicationSnapshots,

    -- * Request Lenses
    listApplicationSnapshots_nextToken,
    listApplicationSnapshots_limit,
    listApplicationSnapshots_applicationName,

    -- * Destructuring the Response
    ListApplicationSnapshotsResponse (..),
    newListApplicationSnapshotsResponse,

    -- * Response Lenses
    listApplicationSnapshotsResponse_snapshotSummaries,
    listApplicationSnapshotsResponse_nextToken,
    listApplicationSnapshotsResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.KinesisAnalyticsV2.Types
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:/ 'newListApplicationSnapshots' smart constructor.
data ListApplicationSnapshots = ListApplicationSnapshots'
  { -- | Use this parameter if you receive a @NextToken@ response in a previous
    -- request that indicates that there is more output available. Set it to
    -- the value of the previous call\'s @NextToken@ response to indicate where
    -- the output should continue from.
    ListApplicationSnapshots -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of application snapshots to list.
    ListApplicationSnapshots -> Maybe Natural
limit :: Prelude.Maybe Prelude.Natural,
    -- | The name of an existing application.
    ListApplicationSnapshots -> Text
applicationName :: Prelude.Text
  }
  deriving (ListApplicationSnapshots -> ListApplicationSnapshots -> Bool
(ListApplicationSnapshots -> ListApplicationSnapshots -> Bool)
-> (ListApplicationSnapshots -> ListApplicationSnapshots -> Bool)
-> Eq ListApplicationSnapshots
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListApplicationSnapshots -> ListApplicationSnapshots -> Bool
$c/= :: ListApplicationSnapshots -> ListApplicationSnapshots -> Bool
== :: ListApplicationSnapshots -> ListApplicationSnapshots -> Bool
$c== :: ListApplicationSnapshots -> ListApplicationSnapshots -> Bool
Prelude.Eq, ReadPrec [ListApplicationSnapshots]
ReadPrec ListApplicationSnapshots
Int -> ReadS ListApplicationSnapshots
ReadS [ListApplicationSnapshots]
(Int -> ReadS ListApplicationSnapshots)
-> ReadS [ListApplicationSnapshots]
-> ReadPrec ListApplicationSnapshots
-> ReadPrec [ListApplicationSnapshots]
-> Read ListApplicationSnapshots
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListApplicationSnapshots]
$creadListPrec :: ReadPrec [ListApplicationSnapshots]
readPrec :: ReadPrec ListApplicationSnapshots
$creadPrec :: ReadPrec ListApplicationSnapshots
readList :: ReadS [ListApplicationSnapshots]
$creadList :: ReadS [ListApplicationSnapshots]
readsPrec :: Int -> ReadS ListApplicationSnapshots
$creadsPrec :: Int -> ReadS ListApplicationSnapshots
Prelude.Read, Int -> ListApplicationSnapshots -> ShowS
[ListApplicationSnapshots] -> ShowS
ListApplicationSnapshots -> String
(Int -> ListApplicationSnapshots -> ShowS)
-> (ListApplicationSnapshots -> String)
-> ([ListApplicationSnapshots] -> ShowS)
-> Show ListApplicationSnapshots
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListApplicationSnapshots] -> ShowS
$cshowList :: [ListApplicationSnapshots] -> ShowS
show :: ListApplicationSnapshots -> String
$cshow :: ListApplicationSnapshots -> String
showsPrec :: Int -> ListApplicationSnapshots -> ShowS
$cshowsPrec :: Int -> ListApplicationSnapshots -> ShowS
Prelude.Show, (forall x.
 ListApplicationSnapshots -> Rep ListApplicationSnapshots x)
-> (forall x.
    Rep ListApplicationSnapshots x -> ListApplicationSnapshots)
-> Generic ListApplicationSnapshots
forall x.
Rep ListApplicationSnapshots x -> ListApplicationSnapshots
forall x.
ListApplicationSnapshots -> Rep ListApplicationSnapshots x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListApplicationSnapshots x -> ListApplicationSnapshots
$cfrom :: forall x.
ListApplicationSnapshots -> Rep ListApplicationSnapshots x
Prelude.Generic)

-- |
-- Create a value of 'ListApplicationSnapshots' 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', 'listApplicationSnapshots_nextToken' - Use this parameter if you receive a @NextToken@ response in a previous
-- request that indicates that there is more output available. Set it to
-- the value of the previous call\'s @NextToken@ response to indicate where
-- the output should continue from.
--
-- 'limit', 'listApplicationSnapshots_limit' - The maximum number of application snapshots to list.
--
-- 'applicationName', 'listApplicationSnapshots_applicationName' - The name of an existing application.
newListApplicationSnapshots ::
  -- | 'applicationName'
  Prelude.Text ->
  ListApplicationSnapshots
newListApplicationSnapshots :: Text -> ListApplicationSnapshots
newListApplicationSnapshots Text
pApplicationName_ =
  ListApplicationSnapshots' :: Maybe Text -> Maybe Natural -> Text -> ListApplicationSnapshots
ListApplicationSnapshots'
    { $sel:nextToken:ListApplicationSnapshots' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:limit:ListApplicationSnapshots' :: Maybe Natural
limit = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:applicationName:ListApplicationSnapshots' :: Text
applicationName = Text
pApplicationName_
    }

-- | Use this parameter if you receive a @NextToken@ response in a previous
-- request that indicates that there is more output available. Set it to
-- the value of the previous call\'s @NextToken@ response to indicate where
-- the output should continue from.
listApplicationSnapshots_nextToken :: Lens.Lens' ListApplicationSnapshots (Prelude.Maybe Prelude.Text)
listApplicationSnapshots_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListApplicationSnapshots -> f ListApplicationSnapshots
listApplicationSnapshots_nextToken = (ListApplicationSnapshots -> Maybe Text)
-> (ListApplicationSnapshots
    -> Maybe Text -> ListApplicationSnapshots)
-> Lens
     ListApplicationSnapshots
     ListApplicationSnapshots
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListApplicationSnapshots' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListApplicationSnapshots' :: ListApplicationSnapshots -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListApplicationSnapshots
s@ListApplicationSnapshots' {} Maybe Text
a -> ListApplicationSnapshots
s {$sel:nextToken:ListApplicationSnapshots' :: Maybe Text
nextToken = Maybe Text
a} :: ListApplicationSnapshots)

-- | The maximum number of application snapshots to list.
listApplicationSnapshots_limit :: Lens.Lens' ListApplicationSnapshots (Prelude.Maybe Prelude.Natural)
listApplicationSnapshots_limit :: (Maybe Natural -> f (Maybe Natural))
-> ListApplicationSnapshots -> f ListApplicationSnapshots
listApplicationSnapshots_limit = (ListApplicationSnapshots -> Maybe Natural)
-> (ListApplicationSnapshots
    -> Maybe Natural -> ListApplicationSnapshots)
-> Lens
     ListApplicationSnapshots
     ListApplicationSnapshots
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListApplicationSnapshots' {Maybe Natural
limit :: Maybe Natural
$sel:limit:ListApplicationSnapshots' :: ListApplicationSnapshots -> Maybe Natural
limit} -> Maybe Natural
limit) (\s :: ListApplicationSnapshots
s@ListApplicationSnapshots' {} Maybe Natural
a -> ListApplicationSnapshots
s {$sel:limit:ListApplicationSnapshots' :: Maybe Natural
limit = Maybe Natural
a} :: ListApplicationSnapshots)

-- | The name of an existing application.
listApplicationSnapshots_applicationName :: Lens.Lens' ListApplicationSnapshots Prelude.Text
listApplicationSnapshots_applicationName :: (Text -> f Text)
-> ListApplicationSnapshots -> f ListApplicationSnapshots
listApplicationSnapshots_applicationName = (ListApplicationSnapshots -> Text)
-> (ListApplicationSnapshots -> Text -> ListApplicationSnapshots)
-> Lens ListApplicationSnapshots ListApplicationSnapshots Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListApplicationSnapshots' {Text
applicationName :: Text
$sel:applicationName:ListApplicationSnapshots' :: ListApplicationSnapshots -> Text
applicationName} -> Text
applicationName) (\s :: ListApplicationSnapshots
s@ListApplicationSnapshots' {} Text
a -> ListApplicationSnapshots
s {$sel:applicationName:ListApplicationSnapshots' :: Text
applicationName = Text
a} :: ListApplicationSnapshots)

instance Core.AWSPager ListApplicationSnapshots where
  page :: ListApplicationSnapshots
-> AWSResponse ListApplicationSnapshots
-> Maybe ListApplicationSnapshots
page ListApplicationSnapshots
rq AWSResponse ListApplicationSnapshots
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListApplicationSnapshots
ListApplicationSnapshotsResponse
rs
            ListApplicationSnapshotsResponse
-> Getting (First Text) ListApplicationSnapshotsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListApplicationSnapshotsResponse
-> Const (First Text) ListApplicationSnapshotsResponse
Lens' ListApplicationSnapshotsResponse (Maybe Text)
listApplicationSnapshotsResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListApplicationSnapshotsResponse
 -> Const (First Text) ListApplicationSnapshotsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListApplicationSnapshotsResponse 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 ListApplicationSnapshots
forall a. Maybe a
Prelude.Nothing
    | Maybe [SnapshotDetails] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListApplicationSnapshots
ListApplicationSnapshotsResponse
rs
            ListApplicationSnapshotsResponse
-> Getting
     (First [SnapshotDetails])
     ListApplicationSnapshotsResponse
     [SnapshotDetails]
-> Maybe [SnapshotDetails]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [SnapshotDetails]
 -> Const (First [SnapshotDetails]) (Maybe [SnapshotDetails]))
-> ListApplicationSnapshotsResponse
-> Const (First [SnapshotDetails]) ListApplicationSnapshotsResponse
Lens' ListApplicationSnapshotsResponse (Maybe [SnapshotDetails])
listApplicationSnapshotsResponse_snapshotSummaries
              ((Maybe [SnapshotDetails]
  -> Const (First [SnapshotDetails]) (Maybe [SnapshotDetails]))
 -> ListApplicationSnapshotsResponse
 -> Const
      (First [SnapshotDetails]) ListApplicationSnapshotsResponse)
-> (([SnapshotDetails]
     -> Const (First [SnapshotDetails]) [SnapshotDetails])
    -> Maybe [SnapshotDetails]
    -> Const (First [SnapshotDetails]) (Maybe [SnapshotDetails]))
-> Getting
     (First [SnapshotDetails])
     ListApplicationSnapshotsResponse
     [SnapshotDetails]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([SnapshotDetails]
 -> Const (First [SnapshotDetails]) [SnapshotDetails])
-> Maybe [SnapshotDetails]
-> Const (First [SnapshotDetails]) (Maybe [SnapshotDetails])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListApplicationSnapshots
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListApplicationSnapshots -> Maybe ListApplicationSnapshots
forall a. a -> Maybe a
Prelude.Just (ListApplicationSnapshots -> Maybe ListApplicationSnapshots)
-> ListApplicationSnapshots -> Maybe ListApplicationSnapshots
forall a b. (a -> b) -> a -> b
Prelude.$
        ListApplicationSnapshots
rq
          ListApplicationSnapshots
-> (ListApplicationSnapshots -> ListApplicationSnapshots)
-> ListApplicationSnapshots
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListApplicationSnapshots -> Identity ListApplicationSnapshots
Lens
  ListApplicationSnapshots
  ListApplicationSnapshots
  (Maybe Text)
  (Maybe Text)
listApplicationSnapshots_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListApplicationSnapshots -> Identity ListApplicationSnapshots)
-> Maybe Text
-> ListApplicationSnapshots
-> ListApplicationSnapshots
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListApplicationSnapshots
ListApplicationSnapshotsResponse
rs
          ListApplicationSnapshotsResponse
-> Getting (First Text) ListApplicationSnapshotsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListApplicationSnapshotsResponse
-> Const (First Text) ListApplicationSnapshotsResponse
Lens' ListApplicationSnapshotsResponse (Maybe Text)
listApplicationSnapshotsResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListApplicationSnapshotsResponse
 -> Const (First Text) ListApplicationSnapshotsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListApplicationSnapshotsResponse 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 ListApplicationSnapshots where
  type
    AWSResponse ListApplicationSnapshots =
      ListApplicationSnapshotsResponse
  request :: ListApplicationSnapshots -> Request ListApplicationSnapshots
request = Service
-> ListApplicationSnapshots -> Request ListApplicationSnapshots
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListApplicationSnapshots
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListApplicationSnapshots)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListApplicationSnapshots))
-> Logger
-> Service
-> Proxy ListApplicationSnapshots
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListApplicationSnapshots)))
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 [SnapshotDetails]
-> Maybe Text -> Int -> ListApplicationSnapshotsResponse
ListApplicationSnapshotsResponse'
            (Maybe [SnapshotDetails]
 -> Maybe Text -> Int -> ListApplicationSnapshotsResponse)
-> Either String (Maybe [SnapshotDetails])
-> Either
     String (Maybe Text -> Int -> ListApplicationSnapshotsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Either String (Maybe (Maybe [SnapshotDetails]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"SnapshotSummaries"
                            Either String (Maybe (Maybe [SnapshotDetails]))
-> Maybe [SnapshotDetails]
-> Either String (Maybe [SnapshotDetails])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [SnapshotDetails]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String (Maybe Text -> Int -> ListApplicationSnapshotsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListApplicationSnapshotsResponse)
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 -> ListApplicationSnapshotsResponse)
-> Either String Int
-> Either String ListApplicationSnapshotsResponse
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 ListApplicationSnapshots

instance Prelude.NFData ListApplicationSnapshots

instance Core.ToHeaders ListApplicationSnapshots where
  toHeaders :: ListApplicationSnapshots -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListApplicationSnapshots -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"KinesisAnalytics_20180523.ListApplicationSnapshots" ::
                          Prelude.ByteString
                      ),
            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.ToJSON ListApplicationSnapshots where
  toJSON :: ListApplicationSnapshots -> Value
toJSON ListApplicationSnapshots' {Maybe Natural
Maybe Text
Text
applicationName :: Text
limit :: Maybe Natural
nextToken :: Maybe Text
$sel:applicationName:ListApplicationSnapshots' :: ListApplicationSnapshots -> Text
$sel:limit:ListApplicationSnapshots' :: ListApplicationSnapshots -> Maybe Natural
$sel:nextToken:ListApplicationSnapshots' :: ListApplicationSnapshots -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"NextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Text
"Limit" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
limit,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"ApplicationName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
applicationName)
          ]
      )

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

instance Core.ToQuery ListApplicationSnapshots where
  toQuery :: ListApplicationSnapshots -> QueryString
toQuery = QueryString -> ListApplicationSnapshots -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newListApplicationSnapshotsResponse' smart constructor.
data ListApplicationSnapshotsResponse = ListApplicationSnapshotsResponse'
  { -- | A collection of objects containing information about the application
    -- snapshots.
    ListApplicationSnapshotsResponse -> Maybe [SnapshotDetails]
snapshotSummaries :: Prelude.Maybe [SnapshotDetails],
    -- | The token for the next set of results, or @null@ if there are no
    -- additional results.
    ListApplicationSnapshotsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListApplicationSnapshotsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListApplicationSnapshotsResponse
-> ListApplicationSnapshotsResponse -> Bool
(ListApplicationSnapshotsResponse
 -> ListApplicationSnapshotsResponse -> Bool)
-> (ListApplicationSnapshotsResponse
    -> ListApplicationSnapshotsResponse -> Bool)
-> Eq ListApplicationSnapshotsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListApplicationSnapshotsResponse
-> ListApplicationSnapshotsResponse -> Bool
$c/= :: ListApplicationSnapshotsResponse
-> ListApplicationSnapshotsResponse -> Bool
== :: ListApplicationSnapshotsResponse
-> ListApplicationSnapshotsResponse -> Bool
$c== :: ListApplicationSnapshotsResponse
-> ListApplicationSnapshotsResponse -> Bool
Prelude.Eq, ReadPrec [ListApplicationSnapshotsResponse]
ReadPrec ListApplicationSnapshotsResponse
Int -> ReadS ListApplicationSnapshotsResponse
ReadS [ListApplicationSnapshotsResponse]
(Int -> ReadS ListApplicationSnapshotsResponse)
-> ReadS [ListApplicationSnapshotsResponse]
-> ReadPrec ListApplicationSnapshotsResponse
-> ReadPrec [ListApplicationSnapshotsResponse]
-> Read ListApplicationSnapshotsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListApplicationSnapshotsResponse]
$creadListPrec :: ReadPrec [ListApplicationSnapshotsResponse]
readPrec :: ReadPrec ListApplicationSnapshotsResponse
$creadPrec :: ReadPrec ListApplicationSnapshotsResponse
readList :: ReadS [ListApplicationSnapshotsResponse]
$creadList :: ReadS [ListApplicationSnapshotsResponse]
readsPrec :: Int -> ReadS ListApplicationSnapshotsResponse
$creadsPrec :: Int -> ReadS ListApplicationSnapshotsResponse
Prelude.Read, Int -> ListApplicationSnapshotsResponse -> ShowS
[ListApplicationSnapshotsResponse] -> ShowS
ListApplicationSnapshotsResponse -> String
(Int -> ListApplicationSnapshotsResponse -> ShowS)
-> (ListApplicationSnapshotsResponse -> String)
-> ([ListApplicationSnapshotsResponse] -> ShowS)
-> Show ListApplicationSnapshotsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListApplicationSnapshotsResponse] -> ShowS
$cshowList :: [ListApplicationSnapshotsResponse] -> ShowS
show :: ListApplicationSnapshotsResponse -> String
$cshow :: ListApplicationSnapshotsResponse -> String
showsPrec :: Int -> ListApplicationSnapshotsResponse -> ShowS
$cshowsPrec :: Int -> ListApplicationSnapshotsResponse -> ShowS
Prelude.Show, (forall x.
 ListApplicationSnapshotsResponse
 -> Rep ListApplicationSnapshotsResponse x)
-> (forall x.
    Rep ListApplicationSnapshotsResponse x
    -> ListApplicationSnapshotsResponse)
-> Generic ListApplicationSnapshotsResponse
forall x.
Rep ListApplicationSnapshotsResponse x
-> ListApplicationSnapshotsResponse
forall x.
ListApplicationSnapshotsResponse
-> Rep ListApplicationSnapshotsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListApplicationSnapshotsResponse x
-> ListApplicationSnapshotsResponse
$cfrom :: forall x.
ListApplicationSnapshotsResponse
-> Rep ListApplicationSnapshotsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListApplicationSnapshotsResponse' 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:
--
-- 'snapshotSummaries', 'listApplicationSnapshotsResponse_snapshotSummaries' - A collection of objects containing information about the application
-- snapshots.
--
-- 'nextToken', 'listApplicationSnapshotsResponse_nextToken' - The token for the next set of results, or @null@ if there are no
-- additional results.
--
-- 'httpStatus', 'listApplicationSnapshotsResponse_httpStatus' - The response's http status code.
newListApplicationSnapshotsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListApplicationSnapshotsResponse
newListApplicationSnapshotsResponse :: Int -> ListApplicationSnapshotsResponse
newListApplicationSnapshotsResponse Int
pHttpStatus_ =
  ListApplicationSnapshotsResponse' :: Maybe [SnapshotDetails]
-> Maybe Text -> Int -> ListApplicationSnapshotsResponse
ListApplicationSnapshotsResponse'
    { $sel:snapshotSummaries:ListApplicationSnapshotsResponse' :: Maybe [SnapshotDetails]
snapshotSummaries =
        Maybe [SnapshotDetails]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListApplicationSnapshotsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListApplicationSnapshotsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A collection of objects containing information about the application
-- snapshots.
listApplicationSnapshotsResponse_snapshotSummaries :: Lens.Lens' ListApplicationSnapshotsResponse (Prelude.Maybe [SnapshotDetails])
listApplicationSnapshotsResponse_snapshotSummaries :: (Maybe [SnapshotDetails] -> f (Maybe [SnapshotDetails]))
-> ListApplicationSnapshotsResponse
-> f ListApplicationSnapshotsResponse
listApplicationSnapshotsResponse_snapshotSummaries = (ListApplicationSnapshotsResponse -> Maybe [SnapshotDetails])
-> (ListApplicationSnapshotsResponse
    -> Maybe [SnapshotDetails] -> ListApplicationSnapshotsResponse)
-> Lens' ListApplicationSnapshotsResponse (Maybe [SnapshotDetails])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListApplicationSnapshotsResponse' {Maybe [SnapshotDetails]
snapshotSummaries :: Maybe [SnapshotDetails]
$sel:snapshotSummaries:ListApplicationSnapshotsResponse' :: ListApplicationSnapshotsResponse -> Maybe [SnapshotDetails]
snapshotSummaries} -> Maybe [SnapshotDetails]
snapshotSummaries) (\s :: ListApplicationSnapshotsResponse
s@ListApplicationSnapshotsResponse' {} Maybe [SnapshotDetails]
a -> ListApplicationSnapshotsResponse
s {$sel:snapshotSummaries:ListApplicationSnapshotsResponse' :: Maybe [SnapshotDetails]
snapshotSummaries = Maybe [SnapshotDetails]
a} :: ListApplicationSnapshotsResponse) ((Maybe [SnapshotDetails] -> f (Maybe [SnapshotDetails]))
 -> ListApplicationSnapshotsResponse
 -> f ListApplicationSnapshotsResponse)
-> ((Maybe [SnapshotDetails] -> f (Maybe [SnapshotDetails]))
    -> Maybe [SnapshotDetails] -> f (Maybe [SnapshotDetails]))
-> (Maybe [SnapshotDetails] -> f (Maybe [SnapshotDetails]))
-> ListApplicationSnapshotsResponse
-> f ListApplicationSnapshotsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [SnapshotDetails]
  [SnapshotDetails]
  [SnapshotDetails]
  [SnapshotDetails]
-> Iso
     (Maybe [SnapshotDetails])
     (Maybe [SnapshotDetails])
     (Maybe [SnapshotDetails])
     (Maybe [SnapshotDetails])
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
  [SnapshotDetails]
  [SnapshotDetails]
  [SnapshotDetails]
  [SnapshotDetails]
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
-- additional results.
listApplicationSnapshotsResponse_nextToken :: Lens.Lens' ListApplicationSnapshotsResponse (Prelude.Maybe Prelude.Text)
listApplicationSnapshotsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListApplicationSnapshotsResponse
-> f ListApplicationSnapshotsResponse
listApplicationSnapshotsResponse_nextToken = (ListApplicationSnapshotsResponse -> Maybe Text)
-> (ListApplicationSnapshotsResponse
    -> Maybe Text -> ListApplicationSnapshotsResponse)
-> Lens' ListApplicationSnapshotsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListApplicationSnapshotsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListApplicationSnapshotsResponse' :: ListApplicationSnapshotsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListApplicationSnapshotsResponse
s@ListApplicationSnapshotsResponse' {} Maybe Text
a -> ListApplicationSnapshotsResponse
s {$sel:nextToken:ListApplicationSnapshotsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListApplicationSnapshotsResponse)

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

instance
  Prelude.NFData
    ListApplicationSnapshotsResponse