{-# 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.ResourceGroupsTagging.GetTagValues
-- 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 tag values for the specified key that are used in the
-- specified AWS Region for the calling AWS account.
--
-- This operation supports pagination, where the response can be sent in
-- multiple pages. You should check the @PaginationToken@ response
-- parameter to determine if there are additional results available to
-- return. Repeat the query, passing the @PaginationToken@ response
-- parameter value as an input to the next request until you recieve a
-- @null@ value. A null value for @PaginationToken@ indicates that there
-- are no more results waiting to be returned.
--
-- This operation returns paginated results.
module Amazonka.ResourceGroupsTagging.GetTagValues
  ( -- * Creating a Request
    GetTagValues (..),
    newGetTagValues,

    -- * Request Lenses
    getTagValues_paginationToken,
    getTagValues_key,

    -- * Destructuring the Response
    GetTagValuesResponse (..),
    newGetTagValuesResponse,

    -- * Response Lenses
    getTagValuesResponse_paginationToken,
    getTagValuesResponse_tagValues,
    getTagValuesResponse_httpStatus,
  )
where

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

-- | /See:/ 'newGetTagValues' smart constructor.
data GetTagValues = GetTagValues'
  { -- | Specifies a @PaginationToken@ response value from a previous request to
    -- indicate that you want the next page of results. Leave this parameter
    -- empty in your initial request.
    GetTagValues -> Maybe Text
paginationToken :: Prelude.Maybe Prelude.Text,
    -- | Specifies the tag key for which you want to list all existing values
    -- that are currently used in the specified AWS Region for the calling AWS
    -- account.
    GetTagValues -> Text
key :: Prelude.Text
  }
  deriving (GetTagValues -> GetTagValues -> Bool
(GetTagValues -> GetTagValues -> Bool)
-> (GetTagValues -> GetTagValues -> Bool) -> Eq GetTagValues
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetTagValues -> GetTagValues -> Bool
$c/= :: GetTagValues -> GetTagValues -> Bool
== :: GetTagValues -> GetTagValues -> Bool
$c== :: GetTagValues -> GetTagValues -> Bool
Prelude.Eq, ReadPrec [GetTagValues]
ReadPrec GetTagValues
Int -> ReadS GetTagValues
ReadS [GetTagValues]
(Int -> ReadS GetTagValues)
-> ReadS [GetTagValues]
-> ReadPrec GetTagValues
-> ReadPrec [GetTagValues]
-> Read GetTagValues
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetTagValues]
$creadListPrec :: ReadPrec [GetTagValues]
readPrec :: ReadPrec GetTagValues
$creadPrec :: ReadPrec GetTagValues
readList :: ReadS [GetTagValues]
$creadList :: ReadS [GetTagValues]
readsPrec :: Int -> ReadS GetTagValues
$creadsPrec :: Int -> ReadS GetTagValues
Prelude.Read, Int -> GetTagValues -> ShowS
[GetTagValues] -> ShowS
GetTagValues -> String
(Int -> GetTagValues -> ShowS)
-> (GetTagValues -> String)
-> ([GetTagValues] -> ShowS)
-> Show GetTagValues
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetTagValues] -> ShowS
$cshowList :: [GetTagValues] -> ShowS
show :: GetTagValues -> String
$cshow :: GetTagValues -> String
showsPrec :: Int -> GetTagValues -> ShowS
$cshowsPrec :: Int -> GetTagValues -> ShowS
Prelude.Show, (forall x. GetTagValues -> Rep GetTagValues x)
-> (forall x. Rep GetTagValues x -> GetTagValues)
-> Generic GetTagValues
forall x. Rep GetTagValues x -> GetTagValues
forall x. GetTagValues -> Rep GetTagValues x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetTagValues x -> GetTagValues
$cfrom :: forall x. GetTagValues -> Rep GetTagValues x
Prelude.Generic)

-- |
-- Create a value of 'GetTagValues' 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:
--
-- 'paginationToken', 'getTagValues_paginationToken' - Specifies a @PaginationToken@ response value from a previous request to
-- indicate that you want the next page of results. Leave this parameter
-- empty in your initial request.
--
-- 'key', 'getTagValues_key' - Specifies the tag key for which you want to list all existing values
-- that are currently used in the specified AWS Region for the calling AWS
-- account.
newGetTagValues ::
  -- | 'key'
  Prelude.Text ->
  GetTagValues
newGetTagValues :: Text -> GetTagValues
newGetTagValues Text
pKey_ =
  GetTagValues' :: Maybe Text -> Text -> GetTagValues
GetTagValues'
    { $sel:paginationToken:GetTagValues' :: Maybe Text
paginationToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:key:GetTagValues' :: Text
key = Text
pKey_
    }

-- | Specifies a @PaginationToken@ response value from a previous request to
-- indicate that you want the next page of results. Leave this parameter
-- empty in your initial request.
getTagValues_paginationToken :: Lens.Lens' GetTagValues (Prelude.Maybe Prelude.Text)
getTagValues_paginationToken :: (Maybe Text -> f (Maybe Text)) -> GetTagValues -> f GetTagValues
getTagValues_paginationToken = (GetTagValues -> Maybe Text)
-> (GetTagValues -> Maybe Text -> GetTagValues)
-> Lens GetTagValues GetTagValues (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetTagValues' {Maybe Text
paginationToken :: Maybe Text
$sel:paginationToken:GetTagValues' :: GetTagValues -> Maybe Text
paginationToken} -> Maybe Text
paginationToken) (\s :: GetTagValues
s@GetTagValues' {} Maybe Text
a -> GetTagValues
s {$sel:paginationToken:GetTagValues' :: Maybe Text
paginationToken = Maybe Text
a} :: GetTagValues)

-- | Specifies the tag key for which you want to list all existing values
-- that are currently used in the specified AWS Region for the calling AWS
-- account.
getTagValues_key :: Lens.Lens' GetTagValues Prelude.Text
getTagValues_key :: (Text -> f Text) -> GetTagValues -> f GetTagValues
getTagValues_key = (GetTagValues -> Text)
-> (GetTagValues -> Text -> GetTagValues)
-> Lens GetTagValues GetTagValues Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetTagValues' {Text
key :: Text
$sel:key:GetTagValues' :: GetTagValues -> Text
key} -> Text
key) (\s :: GetTagValues
s@GetTagValues' {} Text
a -> GetTagValues
s {$sel:key:GetTagValues' :: Text
key = Text
a} :: GetTagValues)

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

instance Prelude.NFData GetTagValues

instance Core.ToHeaders GetTagValues where
  toHeaders :: GetTagValues -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetTagValues -> 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
"ResourceGroupsTaggingAPI_20170126.GetTagValues" ::
                          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 GetTagValues where
  toJSON :: GetTagValues -> Value
toJSON GetTagValues' {Maybe Text
Text
key :: Text
paginationToken :: Maybe Text
$sel:key:GetTagValues' :: GetTagValues -> Text
$sel:paginationToken:GetTagValues' :: GetTagValues -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"PaginationToken" 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
paginationToken,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Key" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
key)
          ]
      )

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

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

-- | /See:/ 'newGetTagValuesResponse' smart constructor.
data GetTagValuesResponse = GetTagValuesResponse'
  { -- | A string that indicates that there is more data available than this
    -- response contains. To receive the next part of the response, specify
    -- this response value as the @PaginationToken@ value in the request for
    -- the next page.
    GetTagValuesResponse -> Maybe Text
paginationToken :: Prelude.Maybe Prelude.Text,
    -- | A list of all tag values for the specified key currently used in the
    -- specified AWS Region for the calling AWS account.
    GetTagValuesResponse -> Maybe [Text]
tagValues :: Prelude.Maybe [Prelude.Text],
    -- | The response's http status code.
    GetTagValuesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetTagValuesResponse -> GetTagValuesResponse -> Bool
(GetTagValuesResponse -> GetTagValuesResponse -> Bool)
-> (GetTagValuesResponse -> GetTagValuesResponse -> Bool)
-> Eq GetTagValuesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetTagValuesResponse -> GetTagValuesResponse -> Bool
$c/= :: GetTagValuesResponse -> GetTagValuesResponse -> Bool
== :: GetTagValuesResponse -> GetTagValuesResponse -> Bool
$c== :: GetTagValuesResponse -> GetTagValuesResponse -> Bool
Prelude.Eq, ReadPrec [GetTagValuesResponse]
ReadPrec GetTagValuesResponse
Int -> ReadS GetTagValuesResponse
ReadS [GetTagValuesResponse]
(Int -> ReadS GetTagValuesResponse)
-> ReadS [GetTagValuesResponse]
-> ReadPrec GetTagValuesResponse
-> ReadPrec [GetTagValuesResponse]
-> Read GetTagValuesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetTagValuesResponse]
$creadListPrec :: ReadPrec [GetTagValuesResponse]
readPrec :: ReadPrec GetTagValuesResponse
$creadPrec :: ReadPrec GetTagValuesResponse
readList :: ReadS [GetTagValuesResponse]
$creadList :: ReadS [GetTagValuesResponse]
readsPrec :: Int -> ReadS GetTagValuesResponse
$creadsPrec :: Int -> ReadS GetTagValuesResponse
Prelude.Read, Int -> GetTagValuesResponse -> ShowS
[GetTagValuesResponse] -> ShowS
GetTagValuesResponse -> String
(Int -> GetTagValuesResponse -> ShowS)
-> (GetTagValuesResponse -> String)
-> ([GetTagValuesResponse] -> ShowS)
-> Show GetTagValuesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetTagValuesResponse] -> ShowS
$cshowList :: [GetTagValuesResponse] -> ShowS
show :: GetTagValuesResponse -> String
$cshow :: GetTagValuesResponse -> String
showsPrec :: Int -> GetTagValuesResponse -> ShowS
$cshowsPrec :: Int -> GetTagValuesResponse -> ShowS
Prelude.Show, (forall x. GetTagValuesResponse -> Rep GetTagValuesResponse x)
-> (forall x. Rep GetTagValuesResponse x -> GetTagValuesResponse)
-> Generic GetTagValuesResponse
forall x. Rep GetTagValuesResponse x -> GetTagValuesResponse
forall x. GetTagValuesResponse -> Rep GetTagValuesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetTagValuesResponse x -> GetTagValuesResponse
$cfrom :: forall x. GetTagValuesResponse -> Rep GetTagValuesResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetTagValuesResponse' 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:
--
-- 'paginationToken', 'getTagValuesResponse_paginationToken' - A string that indicates that there is more data available than this
-- response contains. To receive the next part of the response, specify
-- this response value as the @PaginationToken@ value in the request for
-- the next page.
--
-- 'tagValues', 'getTagValuesResponse_tagValues' - A list of all tag values for the specified key currently used in the
-- specified AWS Region for the calling AWS account.
--
-- 'httpStatus', 'getTagValuesResponse_httpStatus' - The response's http status code.
newGetTagValuesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetTagValuesResponse
newGetTagValuesResponse :: Int -> GetTagValuesResponse
newGetTagValuesResponse Int
pHttpStatus_ =
  GetTagValuesResponse' :: Maybe Text -> Maybe [Text] -> Int -> GetTagValuesResponse
GetTagValuesResponse'
    { $sel:paginationToken:GetTagValuesResponse' :: Maybe Text
paginationToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tagValues:GetTagValuesResponse' :: Maybe [Text]
tagValues = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetTagValuesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A string that indicates that there is more data available than this
-- response contains. To receive the next part of the response, specify
-- this response value as the @PaginationToken@ value in the request for
-- the next page.
getTagValuesResponse_paginationToken :: Lens.Lens' GetTagValuesResponse (Prelude.Maybe Prelude.Text)
getTagValuesResponse_paginationToken :: (Maybe Text -> f (Maybe Text))
-> GetTagValuesResponse -> f GetTagValuesResponse
getTagValuesResponse_paginationToken = (GetTagValuesResponse -> Maybe Text)
-> (GetTagValuesResponse -> Maybe Text -> GetTagValuesResponse)
-> Lens' GetTagValuesResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetTagValuesResponse' {Maybe Text
paginationToken :: Maybe Text
$sel:paginationToken:GetTagValuesResponse' :: GetTagValuesResponse -> Maybe Text
paginationToken} -> Maybe Text
paginationToken) (\s :: GetTagValuesResponse
s@GetTagValuesResponse' {} Maybe Text
a -> GetTagValuesResponse
s {$sel:paginationToken:GetTagValuesResponse' :: Maybe Text
paginationToken = Maybe Text
a} :: GetTagValuesResponse)

-- | A list of all tag values for the specified key currently used in the
-- specified AWS Region for the calling AWS account.
getTagValuesResponse_tagValues :: Lens.Lens' GetTagValuesResponse (Prelude.Maybe [Prelude.Text])
getTagValuesResponse_tagValues :: (Maybe [Text] -> f (Maybe [Text]))
-> GetTagValuesResponse -> f GetTagValuesResponse
getTagValuesResponse_tagValues = (GetTagValuesResponse -> Maybe [Text])
-> (GetTagValuesResponse -> Maybe [Text] -> GetTagValuesResponse)
-> Lens' GetTagValuesResponse (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetTagValuesResponse' {Maybe [Text]
tagValues :: Maybe [Text]
$sel:tagValues:GetTagValuesResponse' :: GetTagValuesResponse -> Maybe [Text]
tagValues} -> Maybe [Text]
tagValues) (\s :: GetTagValuesResponse
s@GetTagValuesResponse' {} Maybe [Text]
a -> GetTagValuesResponse
s {$sel:tagValues:GetTagValuesResponse' :: Maybe [Text]
tagValues = Maybe [Text]
a} :: GetTagValuesResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> GetTagValuesResponse -> f GetTagValuesResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> GetTagValuesResponse
-> f GetTagValuesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData GetTagValuesResponse