{-# 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.DataExchange.ListRevisionAssets
-- 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)
--
-- This operation lists a revision\'s assets sorted alphabetically in
-- descending order.
--
-- This operation returns paginated results.
module Amazonka.DataExchange.ListRevisionAssets
  ( -- * Creating a Request
    ListRevisionAssets (..),
    newListRevisionAssets,

    -- * Request Lenses
    listRevisionAssets_nextToken,
    listRevisionAssets_maxResults,
    listRevisionAssets_revisionId,
    listRevisionAssets_dataSetId,

    -- * Destructuring the Response
    ListRevisionAssetsResponse (..),
    newListRevisionAssetsResponse,

    -- * Response Lenses
    listRevisionAssetsResponse_nextToken,
    listRevisionAssetsResponse_assets,
    listRevisionAssetsResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.DataExchange.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:/ 'newListRevisionAssets' smart constructor.
data ListRevisionAssets = ListRevisionAssets'
  { -- | The token value retrieved from a previous call to access the next page
    -- of results.
    ListRevisionAssets -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results returned by a single call.
    ListRevisionAssets -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The unique identifier for a revision.
    ListRevisionAssets -> Text
revisionId :: Prelude.Text,
    -- | The unique identifier for a data set.
    ListRevisionAssets -> Text
dataSetId :: Prelude.Text
  }
  deriving (ListRevisionAssets -> ListRevisionAssets -> Bool
(ListRevisionAssets -> ListRevisionAssets -> Bool)
-> (ListRevisionAssets -> ListRevisionAssets -> Bool)
-> Eq ListRevisionAssets
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListRevisionAssets -> ListRevisionAssets -> Bool
$c/= :: ListRevisionAssets -> ListRevisionAssets -> Bool
== :: ListRevisionAssets -> ListRevisionAssets -> Bool
$c== :: ListRevisionAssets -> ListRevisionAssets -> Bool
Prelude.Eq, ReadPrec [ListRevisionAssets]
ReadPrec ListRevisionAssets
Int -> ReadS ListRevisionAssets
ReadS [ListRevisionAssets]
(Int -> ReadS ListRevisionAssets)
-> ReadS [ListRevisionAssets]
-> ReadPrec ListRevisionAssets
-> ReadPrec [ListRevisionAssets]
-> Read ListRevisionAssets
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListRevisionAssets]
$creadListPrec :: ReadPrec [ListRevisionAssets]
readPrec :: ReadPrec ListRevisionAssets
$creadPrec :: ReadPrec ListRevisionAssets
readList :: ReadS [ListRevisionAssets]
$creadList :: ReadS [ListRevisionAssets]
readsPrec :: Int -> ReadS ListRevisionAssets
$creadsPrec :: Int -> ReadS ListRevisionAssets
Prelude.Read, Int -> ListRevisionAssets -> ShowS
[ListRevisionAssets] -> ShowS
ListRevisionAssets -> String
(Int -> ListRevisionAssets -> ShowS)
-> (ListRevisionAssets -> String)
-> ([ListRevisionAssets] -> ShowS)
-> Show ListRevisionAssets
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListRevisionAssets] -> ShowS
$cshowList :: [ListRevisionAssets] -> ShowS
show :: ListRevisionAssets -> String
$cshow :: ListRevisionAssets -> String
showsPrec :: Int -> ListRevisionAssets -> ShowS
$cshowsPrec :: Int -> ListRevisionAssets -> ShowS
Prelude.Show, (forall x. ListRevisionAssets -> Rep ListRevisionAssets x)
-> (forall x. Rep ListRevisionAssets x -> ListRevisionAssets)
-> Generic ListRevisionAssets
forall x. Rep ListRevisionAssets x -> ListRevisionAssets
forall x. ListRevisionAssets -> Rep ListRevisionAssets x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListRevisionAssets x -> ListRevisionAssets
$cfrom :: forall x. ListRevisionAssets -> Rep ListRevisionAssets x
Prelude.Generic)

-- |
-- Create a value of 'ListRevisionAssets' 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', 'listRevisionAssets_nextToken' - The token value retrieved from a previous call to access the next page
-- of results.
--
-- 'maxResults', 'listRevisionAssets_maxResults' - The maximum number of results returned by a single call.
--
-- 'revisionId', 'listRevisionAssets_revisionId' - The unique identifier for a revision.
--
-- 'dataSetId', 'listRevisionAssets_dataSetId' - The unique identifier for a data set.
newListRevisionAssets ::
  -- | 'revisionId'
  Prelude.Text ->
  -- | 'dataSetId'
  Prelude.Text ->
  ListRevisionAssets
newListRevisionAssets :: Text -> Text -> ListRevisionAssets
newListRevisionAssets Text
pRevisionId_ Text
pDataSetId_ =
  ListRevisionAssets' :: Maybe Text -> Maybe Natural -> Text -> Text -> ListRevisionAssets
ListRevisionAssets'
    { $sel:nextToken:ListRevisionAssets' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListRevisionAssets' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:revisionId:ListRevisionAssets' :: Text
revisionId = Text
pRevisionId_,
      $sel:dataSetId:ListRevisionAssets' :: Text
dataSetId = Text
pDataSetId_
    }

-- | The token value retrieved from a previous call to access the next page
-- of results.
listRevisionAssets_nextToken :: Lens.Lens' ListRevisionAssets (Prelude.Maybe Prelude.Text)
listRevisionAssets_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListRevisionAssets -> f ListRevisionAssets
listRevisionAssets_nextToken = (ListRevisionAssets -> Maybe Text)
-> (ListRevisionAssets -> Maybe Text -> ListRevisionAssets)
-> Lens
     ListRevisionAssets ListRevisionAssets (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRevisionAssets' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListRevisionAssets' :: ListRevisionAssets -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListRevisionAssets
s@ListRevisionAssets' {} Maybe Text
a -> ListRevisionAssets
s {$sel:nextToken:ListRevisionAssets' :: Maybe Text
nextToken = Maybe Text
a} :: ListRevisionAssets)

-- | The maximum number of results returned by a single call.
listRevisionAssets_maxResults :: Lens.Lens' ListRevisionAssets (Prelude.Maybe Prelude.Natural)
listRevisionAssets_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListRevisionAssets -> f ListRevisionAssets
listRevisionAssets_maxResults = (ListRevisionAssets -> Maybe Natural)
-> (ListRevisionAssets -> Maybe Natural -> ListRevisionAssets)
-> Lens
     ListRevisionAssets
     ListRevisionAssets
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRevisionAssets' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListRevisionAssets' :: ListRevisionAssets -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListRevisionAssets
s@ListRevisionAssets' {} Maybe Natural
a -> ListRevisionAssets
s {$sel:maxResults:ListRevisionAssets' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListRevisionAssets)

-- | The unique identifier for a revision.
listRevisionAssets_revisionId :: Lens.Lens' ListRevisionAssets Prelude.Text
listRevisionAssets_revisionId :: (Text -> f Text) -> ListRevisionAssets -> f ListRevisionAssets
listRevisionAssets_revisionId = (ListRevisionAssets -> Text)
-> (ListRevisionAssets -> Text -> ListRevisionAssets)
-> Lens ListRevisionAssets ListRevisionAssets Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRevisionAssets' {Text
revisionId :: Text
$sel:revisionId:ListRevisionAssets' :: ListRevisionAssets -> Text
revisionId} -> Text
revisionId) (\s :: ListRevisionAssets
s@ListRevisionAssets' {} Text
a -> ListRevisionAssets
s {$sel:revisionId:ListRevisionAssets' :: Text
revisionId = Text
a} :: ListRevisionAssets)

-- | The unique identifier for a data set.
listRevisionAssets_dataSetId :: Lens.Lens' ListRevisionAssets Prelude.Text
listRevisionAssets_dataSetId :: (Text -> f Text) -> ListRevisionAssets -> f ListRevisionAssets
listRevisionAssets_dataSetId = (ListRevisionAssets -> Text)
-> (ListRevisionAssets -> Text -> ListRevisionAssets)
-> Lens ListRevisionAssets ListRevisionAssets Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRevisionAssets' {Text
dataSetId :: Text
$sel:dataSetId:ListRevisionAssets' :: ListRevisionAssets -> Text
dataSetId} -> Text
dataSetId) (\s :: ListRevisionAssets
s@ListRevisionAssets' {} Text
a -> ListRevisionAssets
s {$sel:dataSetId:ListRevisionAssets' :: Text
dataSetId = Text
a} :: ListRevisionAssets)

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

instance Prelude.NFData ListRevisionAssets

instance Core.ToHeaders ListRevisionAssets where
  toHeaders :: ListRevisionAssets -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListRevisionAssets -> 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.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToPath ListRevisionAssets where
  toPath :: ListRevisionAssets -> ByteString
toPath ListRevisionAssets' {Maybe Natural
Maybe Text
Text
dataSetId :: Text
revisionId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:dataSetId:ListRevisionAssets' :: ListRevisionAssets -> Text
$sel:revisionId:ListRevisionAssets' :: ListRevisionAssets -> Text
$sel:maxResults:ListRevisionAssets' :: ListRevisionAssets -> Maybe Natural
$sel:nextToken:ListRevisionAssets' :: ListRevisionAssets -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/v1/data-sets/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
dataSetId,
        ByteString
"/revisions/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
revisionId,
        ByteString
"/assets"
      ]

instance Core.ToQuery ListRevisionAssets where
  toQuery :: ListRevisionAssets -> QueryString
toQuery ListRevisionAssets' {Maybe Natural
Maybe Text
Text
dataSetId :: Text
revisionId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:dataSetId:ListRevisionAssets' :: ListRevisionAssets -> Text
$sel:revisionId:ListRevisionAssets' :: ListRevisionAssets -> Text
$sel:maxResults:ListRevisionAssets' :: ListRevisionAssets -> Maybe Natural
$sel:nextToken:ListRevisionAssets' :: ListRevisionAssets -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"nextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
        ByteString
"maxResults" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxResults
      ]

-- | /See:/ 'newListRevisionAssetsResponse' smart constructor.
data ListRevisionAssetsResponse = ListRevisionAssetsResponse'
  { -- | The token value retrieved from a previous call to access the next page
    -- of results.
    ListRevisionAssetsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The asset objects listed by the request.
    ListRevisionAssetsResponse -> Maybe [AssetEntry]
assets :: Prelude.Maybe [AssetEntry],
    -- | The response's http status code.
    ListRevisionAssetsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListRevisionAssetsResponse -> ListRevisionAssetsResponse -> Bool
(ListRevisionAssetsResponse -> ListRevisionAssetsResponse -> Bool)
-> (ListRevisionAssetsResponse
    -> ListRevisionAssetsResponse -> Bool)
-> Eq ListRevisionAssetsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListRevisionAssetsResponse -> ListRevisionAssetsResponse -> Bool
$c/= :: ListRevisionAssetsResponse -> ListRevisionAssetsResponse -> Bool
== :: ListRevisionAssetsResponse -> ListRevisionAssetsResponse -> Bool
$c== :: ListRevisionAssetsResponse -> ListRevisionAssetsResponse -> Bool
Prelude.Eq, ReadPrec [ListRevisionAssetsResponse]
ReadPrec ListRevisionAssetsResponse
Int -> ReadS ListRevisionAssetsResponse
ReadS [ListRevisionAssetsResponse]
(Int -> ReadS ListRevisionAssetsResponse)
-> ReadS [ListRevisionAssetsResponse]
-> ReadPrec ListRevisionAssetsResponse
-> ReadPrec [ListRevisionAssetsResponse]
-> Read ListRevisionAssetsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListRevisionAssetsResponse]
$creadListPrec :: ReadPrec [ListRevisionAssetsResponse]
readPrec :: ReadPrec ListRevisionAssetsResponse
$creadPrec :: ReadPrec ListRevisionAssetsResponse
readList :: ReadS [ListRevisionAssetsResponse]
$creadList :: ReadS [ListRevisionAssetsResponse]
readsPrec :: Int -> ReadS ListRevisionAssetsResponse
$creadsPrec :: Int -> ReadS ListRevisionAssetsResponse
Prelude.Read, Int -> ListRevisionAssetsResponse -> ShowS
[ListRevisionAssetsResponse] -> ShowS
ListRevisionAssetsResponse -> String
(Int -> ListRevisionAssetsResponse -> ShowS)
-> (ListRevisionAssetsResponse -> String)
-> ([ListRevisionAssetsResponse] -> ShowS)
-> Show ListRevisionAssetsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListRevisionAssetsResponse] -> ShowS
$cshowList :: [ListRevisionAssetsResponse] -> ShowS
show :: ListRevisionAssetsResponse -> String
$cshow :: ListRevisionAssetsResponse -> String
showsPrec :: Int -> ListRevisionAssetsResponse -> ShowS
$cshowsPrec :: Int -> ListRevisionAssetsResponse -> ShowS
Prelude.Show, (forall x.
 ListRevisionAssetsResponse -> Rep ListRevisionAssetsResponse x)
-> (forall x.
    Rep ListRevisionAssetsResponse x -> ListRevisionAssetsResponse)
-> Generic ListRevisionAssetsResponse
forall x.
Rep ListRevisionAssetsResponse x -> ListRevisionAssetsResponse
forall x.
ListRevisionAssetsResponse -> Rep ListRevisionAssetsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListRevisionAssetsResponse x -> ListRevisionAssetsResponse
$cfrom :: forall x.
ListRevisionAssetsResponse -> Rep ListRevisionAssetsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListRevisionAssetsResponse' 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', 'listRevisionAssetsResponse_nextToken' - The token value retrieved from a previous call to access the next page
-- of results.
--
-- 'assets', 'listRevisionAssetsResponse_assets' - The asset objects listed by the request.
--
-- 'httpStatus', 'listRevisionAssetsResponse_httpStatus' - The response's http status code.
newListRevisionAssetsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListRevisionAssetsResponse
newListRevisionAssetsResponse :: Int -> ListRevisionAssetsResponse
newListRevisionAssetsResponse Int
pHttpStatus_ =
  ListRevisionAssetsResponse' :: Maybe Text
-> Maybe [AssetEntry] -> Int -> ListRevisionAssetsResponse
ListRevisionAssetsResponse'
    { $sel:nextToken:ListRevisionAssetsResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:assets:ListRevisionAssetsResponse' :: Maybe [AssetEntry]
assets = Maybe [AssetEntry]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListRevisionAssetsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The token value retrieved from a previous call to access the next page
-- of results.
listRevisionAssetsResponse_nextToken :: Lens.Lens' ListRevisionAssetsResponse (Prelude.Maybe Prelude.Text)
listRevisionAssetsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListRevisionAssetsResponse -> f ListRevisionAssetsResponse
listRevisionAssetsResponse_nextToken = (ListRevisionAssetsResponse -> Maybe Text)
-> (ListRevisionAssetsResponse
    -> Maybe Text -> ListRevisionAssetsResponse)
-> Lens' ListRevisionAssetsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRevisionAssetsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListRevisionAssetsResponse' :: ListRevisionAssetsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListRevisionAssetsResponse
s@ListRevisionAssetsResponse' {} Maybe Text
a -> ListRevisionAssetsResponse
s {$sel:nextToken:ListRevisionAssetsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListRevisionAssetsResponse)

-- | The asset objects listed by the request.
listRevisionAssetsResponse_assets :: Lens.Lens' ListRevisionAssetsResponse (Prelude.Maybe [AssetEntry])
listRevisionAssetsResponse_assets :: (Maybe [AssetEntry] -> f (Maybe [AssetEntry]))
-> ListRevisionAssetsResponse -> f ListRevisionAssetsResponse
listRevisionAssetsResponse_assets = (ListRevisionAssetsResponse -> Maybe [AssetEntry])
-> (ListRevisionAssetsResponse
    -> Maybe [AssetEntry] -> ListRevisionAssetsResponse)
-> Lens' ListRevisionAssetsResponse (Maybe [AssetEntry])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRevisionAssetsResponse' {Maybe [AssetEntry]
assets :: Maybe [AssetEntry]
$sel:assets:ListRevisionAssetsResponse' :: ListRevisionAssetsResponse -> Maybe [AssetEntry]
assets} -> Maybe [AssetEntry]
assets) (\s :: ListRevisionAssetsResponse
s@ListRevisionAssetsResponse' {} Maybe [AssetEntry]
a -> ListRevisionAssetsResponse
s {$sel:assets:ListRevisionAssetsResponse' :: Maybe [AssetEntry]
assets = Maybe [AssetEntry]
a} :: ListRevisionAssetsResponse) ((Maybe [AssetEntry] -> f (Maybe [AssetEntry]))
 -> ListRevisionAssetsResponse -> f ListRevisionAssetsResponse)
-> ((Maybe [AssetEntry] -> f (Maybe [AssetEntry]))
    -> Maybe [AssetEntry] -> f (Maybe [AssetEntry]))
-> (Maybe [AssetEntry] -> f (Maybe [AssetEntry]))
-> ListRevisionAssetsResponse
-> f ListRevisionAssetsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [AssetEntry] [AssetEntry] [AssetEntry] [AssetEntry]
-> Iso
     (Maybe [AssetEntry])
     (Maybe [AssetEntry])
     (Maybe [AssetEntry])
     (Maybe [AssetEntry])
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 [AssetEntry] [AssetEntry] [AssetEntry] [AssetEntry]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData ListRevisionAssetsResponse