{-# 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.IoTSiteWise.ListProjectAssets
-- 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)
--
-- Retrieves a paginated list of assets associated with an IoT SiteWise
-- Monitor project.
--
-- This operation returns paginated results.
module Amazonka.IoTSiteWise.ListProjectAssets
  ( -- * Creating a Request
    ListProjectAssets (..),
    newListProjectAssets,

    -- * Request Lenses
    listProjectAssets_nextToken,
    listProjectAssets_maxResults,
    listProjectAssets_projectId,

    -- * Destructuring the Response
    ListProjectAssetsResponse (..),
    newListProjectAssetsResponse,

    -- * Response Lenses
    listProjectAssetsResponse_nextToken,
    listProjectAssetsResponse_httpStatus,
    listProjectAssetsResponse_assetIds,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.IoTSiteWise.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:/ 'newListProjectAssets' smart constructor.
data ListProjectAssets = ListProjectAssets'
  { -- | The token to be used for the next set of paginated results.
    ListProjectAssets -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to return for each paginated request.
    --
    -- Default: 50
    ListProjectAssets -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The ID of the project.
    ListProjectAssets -> Text
projectId :: Prelude.Text
  }
  deriving (ListProjectAssets -> ListProjectAssets -> Bool
(ListProjectAssets -> ListProjectAssets -> Bool)
-> (ListProjectAssets -> ListProjectAssets -> Bool)
-> Eq ListProjectAssets
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListProjectAssets -> ListProjectAssets -> Bool
$c/= :: ListProjectAssets -> ListProjectAssets -> Bool
== :: ListProjectAssets -> ListProjectAssets -> Bool
$c== :: ListProjectAssets -> ListProjectAssets -> Bool
Prelude.Eq, ReadPrec [ListProjectAssets]
ReadPrec ListProjectAssets
Int -> ReadS ListProjectAssets
ReadS [ListProjectAssets]
(Int -> ReadS ListProjectAssets)
-> ReadS [ListProjectAssets]
-> ReadPrec ListProjectAssets
-> ReadPrec [ListProjectAssets]
-> Read ListProjectAssets
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListProjectAssets]
$creadListPrec :: ReadPrec [ListProjectAssets]
readPrec :: ReadPrec ListProjectAssets
$creadPrec :: ReadPrec ListProjectAssets
readList :: ReadS [ListProjectAssets]
$creadList :: ReadS [ListProjectAssets]
readsPrec :: Int -> ReadS ListProjectAssets
$creadsPrec :: Int -> ReadS ListProjectAssets
Prelude.Read, Int -> ListProjectAssets -> ShowS
[ListProjectAssets] -> ShowS
ListProjectAssets -> String
(Int -> ListProjectAssets -> ShowS)
-> (ListProjectAssets -> String)
-> ([ListProjectAssets] -> ShowS)
-> Show ListProjectAssets
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListProjectAssets] -> ShowS
$cshowList :: [ListProjectAssets] -> ShowS
show :: ListProjectAssets -> String
$cshow :: ListProjectAssets -> String
showsPrec :: Int -> ListProjectAssets -> ShowS
$cshowsPrec :: Int -> ListProjectAssets -> ShowS
Prelude.Show, (forall x. ListProjectAssets -> Rep ListProjectAssets x)
-> (forall x. Rep ListProjectAssets x -> ListProjectAssets)
-> Generic ListProjectAssets
forall x. Rep ListProjectAssets x -> ListProjectAssets
forall x. ListProjectAssets -> Rep ListProjectAssets x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListProjectAssets x -> ListProjectAssets
$cfrom :: forall x. ListProjectAssets -> Rep ListProjectAssets x
Prelude.Generic)

-- |
-- Create a value of 'ListProjectAssets' 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', 'listProjectAssets_nextToken' - The token to be used for the next set of paginated results.
--
-- 'maxResults', 'listProjectAssets_maxResults' - The maximum number of results to return for each paginated request.
--
-- Default: 50
--
-- 'projectId', 'listProjectAssets_projectId' - The ID of the project.
newListProjectAssets ::
  -- | 'projectId'
  Prelude.Text ->
  ListProjectAssets
newListProjectAssets :: Text -> ListProjectAssets
newListProjectAssets Text
pProjectId_ =
  ListProjectAssets' :: Maybe Text -> Maybe Natural -> Text -> ListProjectAssets
ListProjectAssets'
    { $sel:nextToken:ListProjectAssets' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListProjectAssets' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:projectId:ListProjectAssets' :: Text
projectId = Text
pProjectId_
    }

-- | The token to be used for the next set of paginated results.
listProjectAssets_nextToken :: Lens.Lens' ListProjectAssets (Prelude.Maybe Prelude.Text)
listProjectAssets_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListProjectAssets -> f ListProjectAssets
listProjectAssets_nextToken = (ListProjectAssets -> Maybe Text)
-> (ListProjectAssets -> Maybe Text -> ListProjectAssets)
-> Lens
     ListProjectAssets ListProjectAssets (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListProjectAssets' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListProjectAssets' :: ListProjectAssets -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListProjectAssets
s@ListProjectAssets' {} Maybe Text
a -> ListProjectAssets
s {$sel:nextToken:ListProjectAssets' :: Maybe Text
nextToken = Maybe Text
a} :: ListProjectAssets)

-- | The maximum number of results to return for each paginated request.
--
-- Default: 50
listProjectAssets_maxResults :: Lens.Lens' ListProjectAssets (Prelude.Maybe Prelude.Natural)
listProjectAssets_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListProjectAssets -> f ListProjectAssets
listProjectAssets_maxResults = (ListProjectAssets -> Maybe Natural)
-> (ListProjectAssets -> Maybe Natural -> ListProjectAssets)
-> Lens
     ListProjectAssets ListProjectAssets (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListProjectAssets' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListProjectAssets' :: ListProjectAssets -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListProjectAssets
s@ListProjectAssets' {} Maybe Natural
a -> ListProjectAssets
s {$sel:maxResults:ListProjectAssets' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListProjectAssets)

-- | The ID of the project.
listProjectAssets_projectId :: Lens.Lens' ListProjectAssets Prelude.Text
listProjectAssets_projectId :: (Text -> f Text) -> ListProjectAssets -> f ListProjectAssets
listProjectAssets_projectId = (ListProjectAssets -> Text)
-> (ListProjectAssets -> Text -> ListProjectAssets)
-> Lens ListProjectAssets ListProjectAssets Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListProjectAssets' {Text
projectId :: Text
$sel:projectId:ListProjectAssets' :: ListProjectAssets -> Text
projectId} -> Text
projectId) (\s :: ListProjectAssets
s@ListProjectAssets' {} Text
a -> ListProjectAssets
s {$sel:projectId:ListProjectAssets' :: Text
projectId = Text
a} :: ListProjectAssets)

instance Core.AWSPager ListProjectAssets where
  page :: ListProjectAssets
-> AWSResponse ListProjectAssets -> Maybe ListProjectAssets
page ListProjectAssets
rq AWSResponse ListProjectAssets
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListProjectAssets
ListProjectAssetsResponse
rs
            ListProjectAssetsResponse
-> Getting (First Text) ListProjectAssetsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListProjectAssetsResponse
-> Const (First Text) ListProjectAssetsResponse
Lens' ListProjectAssetsResponse (Maybe Text)
listProjectAssetsResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListProjectAssetsResponse
 -> Const (First Text) ListProjectAssetsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListProjectAssetsResponse 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 ListProjectAssets
forall a. Maybe a
Prelude.Nothing
    | [Text] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        (AWSResponse ListProjectAssets
ListProjectAssetsResponse
rs ListProjectAssetsResponse
-> Getting [Text] ListProjectAssetsResponse [Text] -> [Text]
forall s a. s -> Getting a s a -> a
Lens.^. Getting [Text] ListProjectAssetsResponse [Text]
Lens' ListProjectAssetsResponse [Text]
listProjectAssetsResponse_assetIds) =
      Maybe ListProjectAssets
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListProjectAssets -> Maybe ListProjectAssets
forall a. a -> Maybe a
Prelude.Just (ListProjectAssets -> Maybe ListProjectAssets)
-> ListProjectAssets -> Maybe ListProjectAssets
forall a b. (a -> b) -> a -> b
Prelude.$
        ListProjectAssets
rq
          ListProjectAssets
-> (ListProjectAssets -> ListProjectAssets) -> ListProjectAssets
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListProjectAssets -> Identity ListProjectAssets
Lens ListProjectAssets ListProjectAssets (Maybe Text) (Maybe Text)
listProjectAssets_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListProjectAssets -> Identity ListProjectAssets)
-> Maybe Text -> ListProjectAssets -> ListProjectAssets
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListProjectAssets
ListProjectAssetsResponse
rs
          ListProjectAssetsResponse
-> Getting (First Text) ListProjectAssetsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListProjectAssetsResponse
-> Const (First Text) ListProjectAssetsResponse
Lens' ListProjectAssetsResponse (Maybe Text)
listProjectAssetsResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListProjectAssetsResponse
 -> Const (First Text) ListProjectAssetsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListProjectAssetsResponse 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 ListProjectAssets where
  type
    AWSResponse ListProjectAssets =
      ListProjectAssetsResponse
  request :: ListProjectAssets -> Request ListProjectAssets
request = Service -> ListProjectAssets -> Request ListProjectAssets
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy ListProjectAssets
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListProjectAssets)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListProjectAssets))
-> Logger
-> Service
-> Proxy ListProjectAssets
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListProjectAssets)))
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 -> Int -> [Text] -> ListProjectAssetsResponse
ListProjectAssetsResponse'
            (Maybe Text -> Int -> [Text] -> ListProjectAssetsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> [Text] -> ListProjectAssetsResponse)
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 (Int -> [Text] -> ListProjectAssetsResponse)
-> Either String Int
-> Either String ([Text] -> ListProjectAssetsResponse)
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))
            Either String ([Text] -> ListProjectAssetsResponse)
-> Either String [Text] -> Either String ListProjectAssetsResponse
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
"assetIds" Either String (Maybe [Text]) -> [Text] -> Either String [Text]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Text]
forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable ListProjectAssets

instance Prelude.NFData ListProjectAssets

instance Core.ToHeaders ListProjectAssets where
  toHeaders :: ListProjectAssets -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListProjectAssets -> 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 ListProjectAssets where
  toPath :: ListProjectAssets -> ByteString
toPath ListProjectAssets' {Maybe Natural
Maybe Text
Text
projectId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:projectId:ListProjectAssets' :: ListProjectAssets -> Text
$sel:maxResults:ListProjectAssets' :: ListProjectAssets -> Maybe Natural
$sel:nextToken:ListProjectAssets' :: ListProjectAssets -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/projects/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
projectId, ByteString
"/assets"]

instance Core.ToQuery ListProjectAssets where
  toQuery :: ListProjectAssets -> QueryString
toQuery ListProjectAssets' {Maybe Natural
Maybe Text
Text
projectId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:projectId:ListProjectAssets' :: ListProjectAssets -> Text
$sel:maxResults:ListProjectAssets' :: ListProjectAssets -> Maybe Natural
$sel:nextToken:ListProjectAssets' :: ListProjectAssets -> 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:/ 'newListProjectAssetsResponse' smart constructor.
data ListProjectAssetsResponse = ListProjectAssetsResponse'
  { -- | The token for the next set of results, or null if there are no
    -- additional results.
    ListProjectAssetsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListProjectAssetsResponse -> Int
httpStatus :: Prelude.Int,
    -- | A list that contains the IDs of each asset associated with the project.
    ListProjectAssetsResponse -> [Text]
assetIds :: [Prelude.Text]
  }
  deriving (ListProjectAssetsResponse -> ListProjectAssetsResponse -> Bool
(ListProjectAssetsResponse -> ListProjectAssetsResponse -> Bool)
-> (ListProjectAssetsResponse -> ListProjectAssetsResponse -> Bool)
-> Eq ListProjectAssetsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListProjectAssetsResponse -> ListProjectAssetsResponse -> Bool
$c/= :: ListProjectAssetsResponse -> ListProjectAssetsResponse -> Bool
== :: ListProjectAssetsResponse -> ListProjectAssetsResponse -> Bool
$c== :: ListProjectAssetsResponse -> ListProjectAssetsResponse -> Bool
Prelude.Eq, ReadPrec [ListProjectAssetsResponse]
ReadPrec ListProjectAssetsResponse
Int -> ReadS ListProjectAssetsResponse
ReadS [ListProjectAssetsResponse]
(Int -> ReadS ListProjectAssetsResponse)
-> ReadS [ListProjectAssetsResponse]
-> ReadPrec ListProjectAssetsResponse
-> ReadPrec [ListProjectAssetsResponse]
-> Read ListProjectAssetsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListProjectAssetsResponse]
$creadListPrec :: ReadPrec [ListProjectAssetsResponse]
readPrec :: ReadPrec ListProjectAssetsResponse
$creadPrec :: ReadPrec ListProjectAssetsResponse
readList :: ReadS [ListProjectAssetsResponse]
$creadList :: ReadS [ListProjectAssetsResponse]
readsPrec :: Int -> ReadS ListProjectAssetsResponse
$creadsPrec :: Int -> ReadS ListProjectAssetsResponse
Prelude.Read, Int -> ListProjectAssetsResponse -> ShowS
[ListProjectAssetsResponse] -> ShowS
ListProjectAssetsResponse -> String
(Int -> ListProjectAssetsResponse -> ShowS)
-> (ListProjectAssetsResponse -> String)
-> ([ListProjectAssetsResponse] -> ShowS)
-> Show ListProjectAssetsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListProjectAssetsResponse] -> ShowS
$cshowList :: [ListProjectAssetsResponse] -> ShowS
show :: ListProjectAssetsResponse -> String
$cshow :: ListProjectAssetsResponse -> String
showsPrec :: Int -> ListProjectAssetsResponse -> ShowS
$cshowsPrec :: Int -> ListProjectAssetsResponse -> ShowS
Prelude.Show, (forall x.
 ListProjectAssetsResponse -> Rep ListProjectAssetsResponse x)
-> (forall x.
    Rep ListProjectAssetsResponse x -> ListProjectAssetsResponse)
-> Generic ListProjectAssetsResponse
forall x.
Rep ListProjectAssetsResponse x -> ListProjectAssetsResponse
forall x.
ListProjectAssetsResponse -> Rep ListProjectAssetsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListProjectAssetsResponse x -> ListProjectAssetsResponse
$cfrom :: forall x.
ListProjectAssetsResponse -> Rep ListProjectAssetsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListProjectAssetsResponse' 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', 'listProjectAssetsResponse_nextToken' - The token for the next set of results, or null if there are no
-- additional results.
--
-- 'httpStatus', 'listProjectAssetsResponse_httpStatus' - The response's http status code.
--
-- 'assetIds', 'listProjectAssetsResponse_assetIds' - A list that contains the IDs of each asset associated with the project.
newListProjectAssetsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListProjectAssetsResponse
newListProjectAssetsResponse :: Int -> ListProjectAssetsResponse
newListProjectAssetsResponse Int
pHttpStatus_ =
  ListProjectAssetsResponse' :: Maybe Text -> Int -> [Text] -> ListProjectAssetsResponse
ListProjectAssetsResponse'
    { $sel:nextToken:ListProjectAssetsResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListProjectAssetsResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:assetIds:ListProjectAssetsResponse' :: [Text]
assetIds = [Text]
forall a. Monoid a => a
Prelude.mempty
    }

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

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

-- | A list that contains the IDs of each asset associated with the project.
listProjectAssetsResponse_assetIds :: Lens.Lens' ListProjectAssetsResponse [Prelude.Text]
listProjectAssetsResponse_assetIds :: ([Text] -> f [Text])
-> ListProjectAssetsResponse -> f ListProjectAssetsResponse
listProjectAssetsResponse_assetIds = (ListProjectAssetsResponse -> [Text])
-> (ListProjectAssetsResponse
    -> [Text] -> ListProjectAssetsResponse)
-> Lens' ListProjectAssetsResponse [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListProjectAssetsResponse' {[Text]
assetIds :: [Text]
$sel:assetIds:ListProjectAssetsResponse' :: ListProjectAssetsResponse -> [Text]
assetIds} -> [Text]
assetIds) (\s :: ListProjectAssetsResponse
s@ListProjectAssetsResponse' {} [Text]
a -> ListProjectAssetsResponse
s {$sel:assetIds:ListProjectAssetsResponse' :: [Text]
assetIds = [Text]
a} :: ListProjectAssetsResponse) (([Text] -> f [Text])
 -> ListProjectAssetsResponse -> f ListProjectAssetsResponse)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> ListProjectAssetsResponse
-> f ListProjectAssetsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Prelude.NFData ListProjectAssetsResponse