{-# 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.Lightsail.GetExportSnapshotRecords
-- 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 all export snapshot records created as a result of the
-- @export snapshot@ operation.
--
-- An export snapshot record can be used to create a new Amazon EC2
-- instance and its related resources with the CreateCloudFormationStack
-- action.
--
-- This operation returns paginated results.
module Amazonka.Lightsail.GetExportSnapshotRecords
  ( -- * Creating a Request
    GetExportSnapshotRecords (..),
    newGetExportSnapshotRecords,

    -- * Request Lenses
    getExportSnapshotRecords_pageToken,

    -- * Destructuring the Response
    GetExportSnapshotRecordsResponse (..),
    newGetExportSnapshotRecordsResponse,

    -- * Response Lenses
    getExportSnapshotRecordsResponse_nextPageToken,
    getExportSnapshotRecordsResponse_exportSnapshotRecords,
    getExportSnapshotRecordsResponse_httpStatus,
  )
where

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

-- | /See:/ 'newGetExportSnapshotRecords' smart constructor.
data GetExportSnapshotRecords = GetExportSnapshotRecords'
  { -- | The token to advance to the next page of results from your request.
    --
    -- To get a page token, perform an initial @GetExportSnapshotRecords@
    -- request. If your results are paginated, the response will return a next
    -- page token that you can specify as the page token in a subsequent
    -- request.
    GetExportSnapshotRecords -> Maybe Text
pageToken :: Prelude.Maybe Prelude.Text
  }
  deriving (GetExportSnapshotRecords -> GetExportSnapshotRecords -> Bool
(GetExportSnapshotRecords -> GetExportSnapshotRecords -> Bool)
-> (GetExportSnapshotRecords -> GetExportSnapshotRecords -> Bool)
-> Eq GetExportSnapshotRecords
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetExportSnapshotRecords -> GetExportSnapshotRecords -> Bool
$c/= :: GetExportSnapshotRecords -> GetExportSnapshotRecords -> Bool
== :: GetExportSnapshotRecords -> GetExportSnapshotRecords -> Bool
$c== :: GetExportSnapshotRecords -> GetExportSnapshotRecords -> Bool
Prelude.Eq, ReadPrec [GetExportSnapshotRecords]
ReadPrec GetExportSnapshotRecords
Int -> ReadS GetExportSnapshotRecords
ReadS [GetExportSnapshotRecords]
(Int -> ReadS GetExportSnapshotRecords)
-> ReadS [GetExportSnapshotRecords]
-> ReadPrec GetExportSnapshotRecords
-> ReadPrec [GetExportSnapshotRecords]
-> Read GetExportSnapshotRecords
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetExportSnapshotRecords]
$creadListPrec :: ReadPrec [GetExportSnapshotRecords]
readPrec :: ReadPrec GetExportSnapshotRecords
$creadPrec :: ReadPrec GetExportSnapshotRecords
readList :: ReadS [GetExportSnapshotRecords]
$creadList :: ReadS [GetExportSnapshotRecords]
readsPrec :: Int -> ReadS GetExportSnapshotRecords
$creadsPrec :: Int -> ReadS GetExportSnapshotRecords
Prelude.Read, Int -> GetExportSnapshotRecords -> ShowS
[GetExportSnapshotRecords] -> ShowS
GetExportSnapshotRecords -> String
(Int -> GetExportSnapshotRecords -> ShowS)
-> (GetExportSnapshotRecords -> String)
-> ([GetExportSnapshotRecords] -> ShowS)
-> Show GetExportSnapshotRecords
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetExportSnapshotRecords] -> ShowS
$cshowList :: [GetExportSnapshotRecords] -> ShowS
show :: GetExportSnapshotRecords -> String
$cshow :: GetExportSnapshotRecords -> String
showsPrec :: Int -> GetExportSnapshotRecords -> ShowS
$cshowsPrec :: Int -> GetExportSnapshotRecords -> ShowS
Prelude.Show, (forall x.
 GetExportSnapshotRecords -> Rep GetExportSnapshotRecords x)
-> (forall x.
    Rep GetExportSnapshotRecords x -> GetExportSnapshotRecords)
-> Generic GetExportSnapshotRecords
forall x.
Rep GetExportSnapshotRecords x -> GetExportSnapshotRecords
forall x.
GetExportSnapshotRecords -> Rep GetExportSnapshotRecords x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetExportSnapshotRecords x -> GetExportSnapshotRecords
$cfrom :: forall x.
GetExportSnapshotRecords -> Rep GetExportSnapshotRecords x
Prelude.Generic)

-- |
-- Create a value of 'GetExportSnapshotRecords' 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:
--
-- 'pageToken', 'getExportSnapshotRecords_pageToken' - The token to advance to the next page of results from your request.
--
-- To get a page token, perform an initial @GetExportSnapshotRecords@
-- request. If your results are paginated, the response will return a next
-- page token that you can specify as the page token in a subsequent
-- request.
newGetExportSnapshotRecords ::
  GetExportSnapshotRecords
newGetExportSnapshotRecords :: GetExportSnapshotRecords
newGetExportSnapshotRecords =
  GetExportSnapshotRecords' :: Maybe Text -> GetExportSnapshotRecords
GetExportSnapshotRecords'
    { $sel:pageToken:GetExportSnapshotRecords' :: Maybe Text
pageToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The token to advance to the next page of results from your request.
--
-- To get a page token, perform an initial @GetExportSnapshotRecords@
-- request. If your results are paginated, the response will return a next
-- page token that you can specify as the page token in a subsequent
-- request.
getExportSnapshotRecords_pageToken :: Lens.Lens' GetExportSnapshotRecords (Prelude.Maybe Prelude.Text)
getExportSnapshotRecords_pageToken :: (Maybe Text -> f (Maybe Text))
-> GetExportSnapshotRecords -> f GetExportSnapshotRecords
getExportSnapshotRecords_pageToken = (GetExportSnapshotRecords -> Maybe Text)
-> (GetExportSnapshotRecords
    -> Maybe Text -> GetExportSnapshotRecords)
-> Lens
     GetExportSnapshotRecords
     GetExportSnapshotRecords
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetExportSnapshotRecords' {Maybe Text
pageToken :: Maybe Text
$sel:pageToken:GetExportSnapshotRecords' :: GetExportSnapshotRecords -> Maybe Text
pageToken} -> Maybe Text
pageToken) (\s :: GetExportSnapshotRecords
s@GetExportSnapshotRecords' {} Maybe Text
a -> GetExportSnapshotRecords
s {$sel:pageToken:GetExportSnapshotRecords' :: Maybe Text
pageToken = Maybe Text
a} :: GetExportSnapshotRecords)

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

instance Prelude.NFData GetExportSnapshotRecords

instance Core.ToHeaders GetExportSnapshotRecords where
  toHeaders :: GetExportSnapshotRecords -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetExportSnapshotRecords -> 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
"Lightsail_20161128.GetExportSnapshotRecords" ::
                          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 GetExportSnapshotRecords where
  toJSON :: GetExportSnapshotRecords -> Value
toJSON GetExportSnapshotRecords' {Maybe Text
pageToken :: Maybe Text
$sel:pageToken:GetExportSnapshotRecords' :: GetExportSnapshotRecords -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [(Text
"pageToken" 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
pageToken]
      )

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

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

-- | /See:/ 'newGetExportSnapshotRecordsResponse' smart constructor.
data GetExportSnapshotRecordsResponse = GetExportSnapshotRecordsResponse'
  { -- | The token to advance to the next page of results from your request.
    --
    -- A next page token is not returned if there are no more results to
    -- display.
    --
    -- To get the next page of results, perform another
    -- @GetExportSnapshotRecords@ request and specify the next page token using
    -- the @pageToken@ parameter.
    GetExportSnapshotRecordsResponse -> Maybe Text
nextPageToken :: Prelude.Maybe Prelude.Text,
    -- | A list of objects describing the export snapshot records.
    GetExportSnapshotRecordsResponse -> Maybe [ExportSnapshotRecord]
exportSnapshotRecords :: Prelude.Maybe [ExportSnapshotRecord],
    -- | The response's http status code.
    GetExportSnapshotRecordsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetExportSnapshotRecordsResponse
-> GetExportSnapshotRecordsResponse -> Bool
(GetExportSnapshotRecordsResponse
 -> GetExportSnapshotRecordsResponse -> Bool)
-> (GetExportSnapshotRecordsResponse
    -> GetExportSnapshotRecordsResponse -> Bool)
-> Eq GetExportSnapshotRecordsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetExportSnapshotRecordsResponse
-> GetExportSnapshotRecordsResponse -> Bool
$c/= :: GetExportSnapshotRecordsResponse
-> GetExportSnapshotRecordsResponse -> Bool
== :: GetExportSnapshotRecordsResponse
-> GetExportSnapshotRecordsResponse -> Bool
$c== :: GetExportSnapshotRecordsResponse
-> GetExportSnapshotRecordsResponse -> Bool
Prelude.Eq, ReadPrec [GetExportSnapshotRecordsResponse]
ReadPrec GetExportSnapshotRecordsResponse
Int -> ReadS GetExportSnapshotRecordsResponse
ReadS [GetExportSnapshotRecordsResponse]
(Int -> ReadS GetExportSnapshotRecordsResponse)
-> ReadS [GetExportSnapshotRecordsResponse]
-> ReadPrec GetExportSnapshotRecordsResponse
-> ReadPrec [GetExportSnapshotRecordsResponse]
-> Read GetExportSnapshotRecordsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetExportSnapshotRecordsResponse]
$creadListPrec :: ReadPrec [GetExportSnapshotRecordsResponse]
readPrec :: ReadPrec GetExportSnapshotRecordsResponse
$creadPrec :: ReadPrec GetExportSnapshotRecordsResponse
readList :: ReadS [GetExportSnapshotRecordsResponse]
$creadList :: ReadS [GetExportSnapshotRecordsResponse]
readsPrec :: Int -> ReadS GetExportSnapshotRecordsResponse
$creadsPrec :: Int -> ReadS GetExportSnapshotRecordsResponse
Prelude.Read, Int -> GetExportSnapshotRecordsResponse -> ShowS
[GetExportSnapshotRecordsResponse] -> ShowS
GetExportSnapshotRecordsResponse -> String
(Int -> GetExportSnapshotRecordsResponse -> ShowS)
-> (GetExportSnapshotRecordsResponse -> String)
-> ([GetExportSnapshotRecordsResponse] -> ShowS)
-> Show GetExportSnapshotRecordsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetExportSnapshotRecordsResponse] -> ShowS
$cshowList :: [GetExportSnapshotRecordsResponse] -> ShowS
show :: GetExportSnapshotRecordsResponse -> String
$cshow :: GetExportSnapshotRecordsResponse -> String
showsPrec :: Int -> GetExportSnapshotRecordsResponse -> ShowS
$cshowsPrec :: Int -> GetExportSnapshotRecordsResponse -> ShowS
Prelude.Show, (forall x.
 GetExportSnapshotRecordsResponse
 -> Rep GetExportSnapshotRecordsResponse x)
-> (forall x.
    Rep GetExportSnapshotRecordsResponse x
    -> GetExportSnapshotRecordsResponse)
-> Generic GetExportSnapshotRecordsResponse
forall x.
Rep GetExportSnapshotRecordsResponse x
-> GetExportSnapshotRecordsResponse
forall x.
GetExportSnapshotRecordsResponse
-> Rep GetExportSnapshotRecordsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetExportSnapshotRecordsResponse x
-> GetExportSnapshotRecordsResponse
$cfrom :: forall x.
GetExportSnapshotRecordsResponse
-> Rep GetExportSnapshotRecordsResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetExportSnapshotRecordsResponse' 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:
--
-- 'nextPageToken', 'getExportSnapshotRecordsResponse_nextPageToken' - The token to advance to the next page of results from your request.
--
-- A next page token is not returned if there are no more results to
-- display.
--
-- To get the next page of results, perform another
-- @GetExportSnapshotRecords@ request and specify the next page token using
-- the @pageToken@ parameter.
--
-- 'exportSnapshotRecords', 'getExportSnapshotRecordsResponse_exportSnapshotRecords' - A list of objects describing the export snapshot records.
--
-- 'httpStatus', 'getExportSnapshotRecordsResponse_httpStatus' - The response's http status code.
newGetExportSnapshotRecordsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetExportSnapshotRecordsResponse
newGetExportSnapshotRecordsResponse :: Int -> GetExportSnapshotRecordsResponse
newGetExportSnapshotRecordsResponse Int
pHttpStatus_ =
  GetExportSnapshotRecordsResponse' :: Maybe Text
-> Maybe [ExportSnapshotRecord]
-> Int
-> GetExportSnapshotRecordsResponse
GetExportSnapshotRecordsResponse'
    { $sel:nextPageToken:GetExportSnapshotRecordsResponse' :: Maybe Text
nextPageToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:exportSnapshotRecords:GetExportSnapshotRecordsResponse' :: Maybe [ExportSnapshotRecord]
exportSnapshotRecords = Maybe [ExportSnapshotRecord]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetExportSnapshotRecordsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The token to advance to the next page of results from your request.
--
-- A next page token is not returned if there are no more results to
-- display.
--
-- To get the next page of results, perform another
-- @GetExportSnapshotRecords@ request and specify the next page token using
-- the @pageToken@ parameter.
getExportSnapshotRecordsResponse_nextPageToken :: Lens.Lens' GetExportSnapshotRecordsResponse (Prelude.Maybe Prelude.Text)
getExportSnapshotRecordsResponse_nextPageToken :: (Maybe Text -> f (Maybe Text))
-> GetExportSnapshotRecordsResponse
-> f GetExportSnapshotRecordsResponse
getExportSnapshotRecordsResponse_nextPageToken = (GetExportSnapshotRecordsResponse -> Maybe Text)
-> (GetExportSnapshotRecordsResponse
    -> Maybe Text -> GetExportSnapshotRecordsResponse)
-> Lens' GetExportSnapshotRecordsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetExportSnapshotRecordsResponse' {Maybe Text
nextPageToken :: Maybe Text
$sel:nextPageToken:GetExportSnapshotRecordsResponse' :: GetExportSnapshotRecordsResponse -> Maybe Text
nextPageToken} -> Maybe Text
nextPageToken) (\s :: GetExportSnapshotRecordsResponse
s@GetExportSnapshotRecordsResponse' {} Maybe Text
a -> GetExportSnapshotRecordsResponse
s {$sel:nextPageToken:GetExportSnapshotRecordsResponse' :: Maybe Text
nextPageToken = Maybe Text
a} :: GetExportSnapshotRecordsResponse)

-- | A list of objects describing the export snapshot records.
getExportSnapshotRecordsResponse_exportSnapshotRecords :: Lens.Lens' GetExportSnapshotRecordsResponse (Prelude.Maybe [ExportSnapshotRecord])
getExportSnapshotRecordsResponse_exportSnapshotRecords :: (Maybe [ExportSnapshotRecord] -> f (Maybe [ExportSnapshotRecord]))
-> GetExportSnapshotRecordsResponse
-> f GetExportSnapshotRecordsResponse
getExportSnapshotRecordsResponse_exportSnapshotRecords = (GetExportSnapshotRecordsResponse -> Maybe [ExportSnapshotRecord])
-> (GetExportSnapshotRecordsResponse
    -> Maybe [ExportSnapshotRecord]
    -> GetExportSnapshotRecordsResponse)
-> Lens'
     GetExportSnapshotRecordsResponse (Maybe [ExportSnapshotRecord])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetExportSnapshotRecordsResponse' {Maybe [ExportSnapshotRecord]
exportSnapshotRecords :: Maybe [ExportSnapshotRecord]
$sel:exportSnapshotRecords:GetExportSnapshotRecordsResponse' :: GetExportSnapshotRecordsResponse -> Maybe [ExportSnapshotRecord]
exportSnapshotRecords} -> Maybe [ExportSnapshotRecord]
exportSnapshotRecords) (\s :: GetExportSnapshotRecordsResponse
s@GetExportSnapshotRecordsResponse' {} Maybe [ExportSnapshotRecord]
a -> GetExportSnapshotRecordsResponse
s {$sel:exportSnapshotRecords:GetExportSnapshotRecordsResponse' :: Maybe [ExportSnapshotRecord]
exportSnapshotRecords = Maybe [ExportSnapshotRecord]
a} :: GetExportSnapshotRecordsResponse) ((Maybe [ExportSnapshotRecord] -> f (Maybe [ExportSnapshotRecord]))
 -> GetExportSnapshotRecordsResponse
 -> f GetExportSnapshotRecordsResponse)
-> ((Maybe [ExportSnapshotRecord]
     -> f (Maybe [ExportSnapshotRecord]))
    -> Maybe [ExportSnapshotRecord]
    -> f (Maybe [ExportSnapshotRecord]))
-> (Maybe [ExportSnapshotRecord]
    -> f (Maybe [ExportSnapshotRecord]))
-> GetExportSnapshotRecordsResponse
-> f GetExportSnapshotRecordsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ExportSnapshotRecord]
  [ExportSnapshotRecord]
  [ExportSnapshotRecord]
  [ExportSnapshotRecord]
-> Iso
     (Maybe [ExportSnapshotRecord])
     (Maybe [ExportSnapshotRecord])
     (Maybe [ExportSnapshotRecord])
     (Maybe [ExportSnapshotRecord])
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
  [ExportSnapshotRecord]
  [ExportSnapshotRecord]
  [ExportSnapshotRecord]
  [ExportSnapshotRecord]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    GetExportSnapshotRecordsResponse