{-# 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.FSx.ListTagsForResource
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Lists tags for Amazon FSx resources.
--
-- When retrieving all tags, you can optionally specify the @MaxResults@
-- parameter to limit the number of tags in a response. If more tags
-- remain, Amazon FSx returns a @NextToken@ value in the response. In this
-- case, send a later request with the @NextToken@ request parameter set to
-- the value of @NextToken@ from the last response.
--
-- This action is used in an iterative process to retrieve a list of your
-- tags. @ListTagsForResource@ is called first without a @NextToken@value.
-- Then the action continues to be called with the @NextToken@ parameter
-- set to the value of the last @NextToken@ value until a response has no
-- @NextToken@.
--
-- When using this action, keep the following in mind:
--
-- -   The implementation might return fewer than @MaxResults@ file system
--     descriptions while still including a @NextToken@ value.
--
-- -   The order of tags returned in the response of one
--     @ListTagsForResource@ call and the order of tags returned across the
--     responses of a multi-call iteration is unspecified.
--
-- This operation returns paginated results.
module Amazonka.FSx.ListTagsForResource
  ( -- * Creating a Request
    ListTagsForResource (..),
    newListTagsForResource,

    -- * Request Lenses
    listTagsForResource_maxResults,
    listTagsForResource_nextToken,
    listTagsForResource_resourceARN,

    -- * Destructuring the Response
    ListTagsForResourceResponse (..),
    newListTagsForResourceResponse,

    -- * Response Lenses
    listTagsForResourceResponse_nextToken,
    listTagsForResourceResponse_tags,
    listTagsForResourceResponse_httpStatus,
  )
where

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

-- | The request object for @ListTagsForResource@ operation.
--
-- /See:/ 'newListTagsForResource' smart constructor.
data ListTagsForResource = ListTagsForResource'
  { -- | Maximum number of tags to return in the response (integer). This
    -- parameter value must be greater than 0. The number of items that Amazon
    -- FSx returns is the minimum of the @MaxResults@ parameter specified in
    -- the request and the service\'s internal maximum number of items per
    -- page.
    ListTagsForResource -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | Opaque pagination token returned from a previous @ListTagsForResource@
    -- operation (String). If a token present, the action continues the list
    -- from where the returning call left off.
    ListTagsForResource -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the Amazon FSx resource that will have its tags listed.
    ListTagsForResource -> Text
resourceARN :: Prelude.Text
  }
  deriving (ListTagsForResource -> ListTagsForResource -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListTagsForResource -> ListTagsForResource -> Bool
$c/= :: ListTagsForResource -> ListTagsForResource -> Bool
== :: ListTagsForResource -> ListTagsForResource -> Bool
$c== :: ListTagsForResource -> ListTagsForResource -> Bool
Prelude.Eq, ReadPrec [ListTagsForResource]
ReadPrec ListTagsForResource
Int -> ReadS ListTagsForResource
ReadS [ListTagsForResource]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListTagsForResource]
$creadListPrec :: ReadPrec [ListTagsForResource]
readPrec :: ReadPrec ListTagsForResource
$creadPrec :: ReadPrec ListTagsForResource
readList :: ReadS [ListTagsForResource]
$creadList :: ReadS [ListTagsForResource]
readsPrec :: Int -> ReadS ListTagsForResource
$creadsPrec :: Int -> ReadS ListTagsForResource
Prelude.Read, Int -> ListTagsForResource -> ShowS
[ListTagsForResource] -> ShowS
ListTagsForResource -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListTagsForResource] -> ShowS
$cshowList :: [ListTagsForResource] -> ShowS
show :: ListTagsForResource -> String
$cshow :: ListTagsForResource -> String
showsPrec :: Int -> ListTagsForResource -> ShowS
$cshowsPrec :: Int -> ListTagsForResource -> ShowS
Prelude.Show, forall x. Rep ListTagsForResource x -> ListTagsForResource
forall x. ListTagsForResource -> Rep ListTagsForResource x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListTagsForResource x -> ListTagsForResource
$cfrom :: forall x. ListTagsForResource -> Rep ListTagsForResource x
Prelude.Generic)

-- |
-- Create a value of 'ListTagsForResource' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'maxResults', 'listTagsForResource_maxResults' - Maximum number of tags to return in the response (integer). This
-- parameter value must be greater than 0. The number of items that Amazon
-- FSx returns is the minimum of the @MaxResults@ parameter specified in
-- the request and the service\'s internal maximum number of items per
-- page.
--
-- 'nextToken', 'listTagsForResource_nextToken' - Opaque pagination token returned from a previous @ListTagsForResource@
-- operation (String). If a token present, the action continues the list
-- from where the returning call left off.
--
-- 'resourceARN', 'listTagsForResource_resourceARN' - The ARN of the Amazon FSx resource that will have its tags listed.
newListTagsForResource ::
  -- | 'resourceARN'
  Prelude.Text ->
  ListTagsForResource
newListTagsForResource :: Text -> ListTagsForResource
newListTagsForResource Text
pResourceARN_ =
  ListTagsForResource'
    { $sel:maxResults:ListTagsForResource' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListTagsForResource' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:resourceARN:ListTagsForResource' :: Text
resourceARN = Text
pResourceARN_
    }

-- | Maximum number of tags to return in the response (integer). This
-- parameter value must be greater than 0. The number of items that Amazon
-- FSx returns is the minimum of the @MaxResults@ parameter specified in
-- the request and the service\'s internal maximum number of items per
-- page.
listTagsForResource_maxResults :: Lens.Lens' ListTagsForResource (Prelude.Maybe Prelude.Natural)
listTagsForResource_maxResults :: Lens' ListTagsForResource (Maybe Natural)
listTagsForResource_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTagsForResource' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListTagsForResource' :: ListTagsForResource -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListTagsForResource
s@ListTagsForResource' {} Maybe Natural
a -> ListTagsForResource
s {$sel:maxResults:ListTagsForResource' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListTagsForResource)

-- | Opaque pagination token returned from a previous @ListTagsForResource@
-- operation (String). If a token present, the action continues the list
-- from where the returning call left off.
listTagsForResource_nextToken :: Lens.Lens' ListTagsForResource (Prelude.Maybe Prelude.Text)
listTagsForResource_nextToken :: Lens' ListTagsForResource (Maybe Text)
listTagsForResource_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTagsForResource' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListTagsForResource' :: ListTagsForResource -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListTagsForResource
s@ListTagsForResource' {} Maybe Text
a -> ListTagsForResource
s {$sel:nextToken:ListTagsForResource' :: Maybe Text
nextToken = Maybe Text
a} :: ListTagsForResource)

-- | The ARN of the Amazon FSx resource that will have its tags listed.
listTagsForResource_resourceARN :: Lens.Lens' ListTagsForResource Prelude.Text
listTagsForResource_resourceARN :: Lens' ListTagsForResource Text
listTagsForResource_resourceARN = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTagsForResource' {Text
resourceARN :: Text
$sel:resourceARN:ListTagsForResource' :: ListTagsForResource -> Text
resourceARN} -> Text
resourceARN) (\s :: ListTagsForResource
s@ListTagsForResource' {} Text
a -> ListTagsForResource
s {$sel:resourceARN:ListTagsForResource' :: Text
resourceARN = Text
a} :: ListTagsForResource)

instance Core.AWSPager ListTagsForResource where
  page :: ListTagsForResource
-> AWSResponse ListTagsForResource -> Maybe ListTagsForResource
page ListTagsForResource
rq AWSResponse ListTagsForResource
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListTagsForResource
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListTagsForResourceResponse (Maybe Text)
listTagsForResourceResponse_nextToken
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListTagsForResource
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListTagsForResourceResponse (Maybe (NonEmpty Tag))
listTagsForResourceResponse_tags
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (p :: * -> * -> *) (f :: * -> *) s a.
(Profunctor p, Contravariant f) =>
(s -> a) -> Optic' p f s a
Lens.to forall l. IsList l => l -> [Item l]
Prelude.toList
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ ListTagsForResource
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListTagsForResource (Maybe Text)
listTagsForResource_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListTagsForResource
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListTagsForResourceResponse (Maybe Text)
listTagsForResourceResponse_nextToken
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListTagsForResource where
  type
    AWSResponse ListTagsForResource =
      ListTagsForResourceResponse
  request :: (Service -> Service)
-> ListTagsForResource -> Request ListTagsForResource
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListTagsForResource
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListTagsForResource)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe (NonEmpty Tag) -> Int -> ListTagsForResourceResponse
ListTagsForResourceResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"NextToken")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Tags")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

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

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

instance Data.ToHeaders ListTagsForResource where
  toHeaders :: ListTagsForResource -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"AWSSimbaAPIService_v20180301.ListTagsForResource" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON ListTagsForResource where
  toJSON :: ListTagsForResource -> Value
toJSON ListTagsForResource' {Maybe Natural
Maybe Text
Text
resourceARN :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:resourceARN:ListTagsForResource' :: ListTagsForResource -> Text
$sel:nextToken:ListTagsForResource' :: ListTagsForResource -> Maybe Text
$sel:maxResults:ListTagsForResource' :: ListTagsForResource -> Maybe Natural
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"MaxResults" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
            (Key
"NextToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            forall a. a -> Maybe a
Prelude.Just (Key
"ResourceARN" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
resourceARN)
          ]
      )

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

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

-- | The response object for @ListTagsForResource@ operation.
--
-- /See:/ 'newListTagsForResourceResponse' smart constructor.
data ListTagsForResourceResponse = ListTagsForResourceResponse'
  { -- | This is present if there are more tags than returned in the response
    -- (String). You can use the @NextToken@ value in the later request to
    -- fetch the tags.
    ListTagsForResourceResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | A list of tags on the resource.
    ListTagsForResourceResponse -> Maybe (NonEmpty Tag)
tags :: Prelude.Maybe (Prelude.NonEmpty Tag),
    -- | The response's http status code.
    ListTagsForResourceResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListTagsForResourceResponse -> ListTagsForResourceResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListTagsForResourceResponse -> ListTagsForResourceResponse -> Bool
$c/= :: ListTagsForResourceResponse -> ListTagsForResourceResponse -> Bool
== :: ListTagsForResourceResponse -> ListTagsForResourceResponse -> Bool
$c== :: ListTagsForResourceResponse -> ListTagsForResourceResponse -> Bool
Prelude.Eq, ReadPrec [ListTagsForResourceResponse]
ReadPrec ListTagsForResourceResponse
Int -> ReadS ListTagsForResourceResponse
ReadS [ListTagsForResourceResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListTagsForResourceResponse]
$creadListPrec :: ReadPrec [ListTagsForResourceResponse]
readPrec :: ReadPrec ListTagsForResourceResponse
$creadPrec :: ReadPrec ListTagsForResourceResponse
readList :: ReadS [ListTagsForResourceResponse]
$creadList :: ReadS [ListTagsForResourceResponse]
readsPrec :: Int -> ReadS ListTagsForResourceResponse
$creadsPrec :: Int -> ReadS ListTagsForResourceResponse
Prelude.Read, Int -> ListTagsForResourceResponse -> ShowS
[ListTagsForResourceResponse] -> ShowS
ListTagsForResourceResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListTagsForResourceResponse] -> ShowS
$cshowList :: [ListTagsForResourceResponse] -> ShowS
show :: ListTagsForResourceResponse -> String
$cshow :: ListTagsForResourceResponse -> String
showsPrec :: Int -> ListTagsForResourceResponse -> ShowS
$cshowsPrec :: Int -> ListTagsForResourceResponse -> ShowS
Prelude.Show, forall x.
Rep ListTagsForResourceResponse x -> ListTagsForResourceResponse
forall x.
ListTagsForResourceResponse -> Rep ListTagsForResourceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListTagsForResourceResponse x -> ListTagsForResourceResponse
$cfrom :: forall x.
ListTagsForResourceResponse -> Rep ListTagsForResourceResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListTagsForResourceResponse' 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', 'listTagsForResourceResponse_nextToken' - This is present if there are more tags than returned in the response
-- (String). You can use the @NextToken@ value in the later request to
-- fetch the tags.
--
-- 'tags', 'listTagsForResourceResponse_tags' - A list of tags on the resource.
--
-- 'httpStatus', 'listTagsForResourceResponse_httpStatus' - The response's http status code.
newListTagsForResourceResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListTagsForResourceResponse
newListTagsForResourceResponse :: Int -> ListTagsForResourceResponse
newListTagsForResourceResponse Int
pHttpStatus_ =
  ListTagsForResourceResponse'
    { $sel:nextToken:ListTagsForResourceResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:tags:ListTagsForResourceResponse' :: Maybe (NonEmpty Tag)
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListTagsForResourceResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | This is present if there are more tags than returned in the response
-- (String). You can use the @NextToken@ value in the later request to
-- fetch the tags.
listTagsForResourceResponse_nextToken :: Lens.Lens' ListTagsForResourceResponse (Prelude.Maybe Prelude.Text)
listTagsForResourceResponse_nextToken :: Lens' ListTagsForResourceResponse (Maybe Text)
listTagsForResourceResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTagsForResourceResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListTagsForResourceResponse' :: ListTagsForResourceResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListTagsForResourceResponse
s@ListTagsForResourceResponse' {} Maybe Text
a -> ListTagsForResourceResponse
s {$sel:nextToken:ListTagsForResourceResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListTagsForResourceResponse)

-- | A list of tags on the resource.
listTagsForResourceResponse_tags :: Lens.Lens' ListTagsForResourceResponse (Prelude.Maybe (Prelude.NonEmpty Tag))
listTagsForResourceResponse_tags :: Lens' ListTagsForResourceResponse (Maybe (NonEmpty Tag))
listTagsForResourceResponse_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTagsForResourceResponse' {Maybe (NonEmpty Tag)
tags :: Maybe (NonEmpty Tag)
$sel:tags:ListTagsForResourceResponse' :: ListTagsForResourceResponse -> Maybe (NonEmpty Tag)
tags} -> Maybe (NonEmpty Tag)
tags) (\s :: ListTagsForResourceResponse
s@ListTagsForResourceResponse' {} Maybe (NonEmpty Tag)
a -> ListTagsForResourceResponse
s {$sel:tags:ListTagsForResourceResponse' :: Maybe (NonEmpty Tag)
tags = Maybe (NonEmpty Tag)
a} :: ListTagsForResourceResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData ListTagsForResourceResponse where
  rnf :: ListTagsForResourceResponse -> ()
rnf ListTagsForResourceResponse' {Int
Maybe (NonEmpty Tag)
Maybe Text
httpStatus :: Int
tags :: Maybe (NonEmpty Tag)
nextToken :: Maybe Text
$sel:httpStatus:ListTagsForResourceResponse' :: ListTagsForResourceResponse -> Int
$sel:tags:ListTagsForResourceResponse' :: ListTagsForResourceResponse -> Maybe (NonEmpty Tag)
$sel:nextToken:ListTagsForResourceResponse' :: ListTagsForResourceResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty Tag)
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus