{-# 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.Pricing.GetAttributeValues
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns a list of attribute values. Attributes are similar to the
-- details in a Price List API offer file. For a list of available
-- attributes, see
-- <https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/reading-an-offer.html#pps-defs Offer File Definitions>
-- in the
-- <https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-what-is.html Billing and Cost Management User Guide>.
--
-- This operation returns paginated results.
module Amazonka.Pricing.GetAttributeValues
  ( -- * Creating a Request
    GetAttributeValues (..),
    newGetAttributeValues,

    -- * Request Lenses
    getAttributeValues_maxResults,
    getAttributeValues_nextToken,
    getAttributeValues_serviceCode,
    getAttributeValues_attributeName,

    -- * Destructuring the Response
    GetAttributeValuesResponse (..),
    newGetAttributeValuesResponse,

    -- * Response Lenses
    getAttributeValuesResponse_attributeValues,
    getAttributeValuesResponse_nextToken,
    getAttributeValuesResponse_httpStatus,
  )
where

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

-- | /See:/ 'newGetAttributeValues' smart constructor.
data GetAttributeValues = GetAttributeValues'
  { -- | The maximum number of results to return in response.
    GetAttributeValues -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The pagination token that indicates the next set of results that you
    -- want to retrieve.
    GetAttributeValues -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The service code for the service whose attributes you want to retrieve.
    -- For example, if you want the retrieve an EC2 attribute, use @AmazonEC2@.
    GetAttributeValues -> Text
serviceCode :: Prelude.Text,
    -- | The name of the attribute that you want to retrieve the values for, such
    -- as @volumeType@.
    GetAttributeValues -> Text
attributeName :: Prelude.Text
  }
  deriving (GetAttributeValues -> GetAttributeValues -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetAttributeValues -> GetAttributeValues -> Bool
$c/= :: GetAttributeValues -> GetAttributeValues -> Bool
== :: GetAttributeValues -> GetAttributeValues -> Bool
$c== :: GetAttributeValues -> GetAttributeValues -> Bool
Prelude.Eq, ReadPrec [GetAttributeValues]
ReadPrec GetAttributeValues
Int -> ReadS GetAttributeValues
ReadS [GetAttributeValues]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetAttributeValues]
$creadListPrec :: ReadPrec [GetAttributeValues]
readPrec :: ReadPrec GetAttributeValues
$creadPrec :: ReadPrec GetAttributeValues
readList :: ReadS [GetAttributeValues]
$creadList :: ReadS [GetAttributeValues]
readsPrec :: Int -> ReadS GetAttributeValues
$creadsPrec :: Int -> ReadS GetAttributeValues
Prelude.Read, Int -> GetAttributeValues -> ShowS
[GetAttributeValues] -> ShowS
GetAttributeValues -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetAttributeValues] -> ShowS
$cshowList :: [GetAttributeValues] -> ShowS
show :: GetAttributeValues -> String
$cshow :: GetAttributeValues -> String
showsPrec :: Int -> GetAttributeValues -> ShowS
$cshowsPrec :: Int -> GetAttributeValues -> ShowS
Prelude.Show, forall x. Rep GetAttributeValues x -> GetAttributeValues
forall x. GetAttributeValues -> Rep GetAttributeValues x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetAttributeValues x -> GetAttributeValues
$cfrom :: forall x. GetAttributeValues -> Rep GetAttributeValues x
Prelude.Generic)

-- |
-- Create a value of 'GetAttributeValues' 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', 'getAttributeValues_maxResults' - The maximum number of results to return in response.
--
-- 'nextToken', 'getAttributeValues_nextToken' - The pagination token that indicates the next set of results that you
-- want to retrieve.
--
-- 'serviceCode', 'getAttributeValues_serviceCode' - The service code for the service whose attributes you want to retrieve.
-- For example, if you want the retrieve an EC2 attribute, use @AmazonEC2@.
--
-- 'attributeName', 'getAttributeValues_attributeName' - The name of the attribute that you want to retrieve the values for, such
-- as @volumeType@.
newGetAttributeValues ::
  -- | 'serviceCode'
  Prelude.Text ->
  -- | 'attributeName'
  Prelude.Text ->
  GetAttributeValues
newGetAttributeValues :: Text -> Text -> GetAttributeValues
newGetAttributeValues Text
pServiceCode_ Text
pAttributeName_ =
  GetAttributeValues'
    { $sel:maxResults:GetAttributeValues' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:GetAttributeValues' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:serviceCode:GetAttributeValues' :: Text
serviceCode = Text
pServiceCode_,
      $sel:attributeName:GetAttributeValues' :: Text
attributeName = Text
pAttributeName_
    }

-- | The maximum number of results to return in response.
getAttributeValues_maxResults :: Lens.Lens' GetAttributeValues (Prelude.Maybe Prelude.Natural)
getAttributeValues_maxResults :: Lens' GetAttributeValues (Maybe Natural)
getAttributeValues_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAttributeValues' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:GetAttributeValues' :: GetAttributeValues -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: GetAttributeValues
s@GetAttributeValues' {} Maybe Natural
a -> GetAttributeValues
s {$sel:maxResults:GetAttributeValues' :: Maybe Natural
maxResults = Maybe Natural
a} :: GetAttributeValues)

-- | The pagination token that indicates the next set of results that you
-- want to retrieve.
getAttributeValues_nextToken :: Lens.Lens' GetAttributeValues (Prelude.Maybe Prelude.Text)
getAttributeValues_nextToken :: Lens' GetAttributeValues (Maybe Text)
getAttributeValues_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAttributeValues' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetAttributeValues' :: GetAttributeValues -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetAttributeValues
s@GetAttributeValues' {} Maybe Text
a -> GetAttributeValues
s {$sel:nextToken:GetAttributeValues' :: Maybe Text
nextToken = Maybe Text
a} :: GetAttributeValues)

-- | The service code for the service whose attributes you want to retrieve.
-- For example, if you want the retrieve an EC2 attribute, use @AmazonEC2@.
getAttributeValues_serviceCode :: Lens.Lens' GetAttributeValues Prelude.Text
getAttributeValues_serviceCode :: Lens' GetAttributeValues Text
getAttributeValues_serviceCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAttributeValues' {Text
serviceCode :: Text
$sel:serviceCode:GetAttributeValues' :: GetAttributeValues -> Text
serviceCode} -> Text
serviceCode) (\s :: GetAttributeValues
s@GetAttributeValues' {} Text
a -> GetAttributeValues
s {$sel:serviceCode:GetAttributeValues' :: Text
serviceCode = Text
a} :: GetAttributeValues)

-- | The name of the attribute that you want to retrieve the values for, such
-- as @volumeType@.
getAttributeValues_attributeName :: Lens.Lens' GetAttributeValues Prelude.Text
getAttributeValues_attributeName :: Lens' GetAttributeValues Text
getAttributeValues_attributeName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAttributeValues' {Text
attributeName :: Text
$sel:attributeName:GetAttributeValues' :: GetAttributeValues -> Text
attributeName} -> Text
attributeName) (\s :: GetAttributeValues
s@GetAttributeValues' {} Text
a -> GetAttributeValues
s {$sel:attributeName:GetAttributeValues' :: Text
attributeName = Text
a} :: GetAttributeValues)

instance Core.AWSPager GetAttributeValues where
  page :: GetAttributeValues
-> AWSResponse GetAttributeValues -> Maybe GetAttributeValues
page GetAttributeValues
rq AWSResponse GetAttributeValues
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse GetAttributeValues
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetAttributeValuesResponse (Maybe Text)
getAttributeValuesResponse_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 GetAttributeValues
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetAttributeValuesResponse (Maybe [AttributeValue])
getAttributeValuesResponse_attributeValues
            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
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ GetAttributeValues
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' GetAttributeValues (Maybe Text)
getAttributeValues_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse GetAttributeValues
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetAttributeValuesResponse (Maybe Text)
getAttributeValuesResponse_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 GetAttributeValues where
  type
    AWSResponse GetAttributeValues =
      GetAttributeValuesResponse
  request :: (Service -> Service)
-> GetAttributeValues -> Request GetAttributeValues
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 GetAttributeValues
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetAttributeValues)))
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 [AttributeValue]
-> Maybe Text -> Int -> GetAttributeValuesResponse
GetAttributeValuesResponse'
            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
"AttributeValues"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                        )
            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
"NextToken")
            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 GetAttributeValues where
  hashWithSalt :: Int -> GetAttributeValues -> Int
hashWithSalt Int
_salt GetAttributeValues' {Maybe Natural
Maybe Text
Text
attributeName :: Text
serviceCode :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:attributeName:GetAttributeValues' :: GetAttributeValues -> Text
$sel:serviceCode:GetAttributeValues' :: GetAttributeValues -> Text
$sel:nextToken:GetAttributeValues' :: GetAttributeValues -> Maybe Text
$sel:maxResults:GetAttributeValues' :: GetAttributeValues -> 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
serviceCode
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
attributeName

instance Prelude.NFData GetAttributeValues where
  rnf :: GetAttributeValues -> ()
rnf GetAttributeValues' {Maybe Natural
Maybe Text
Text
attributeName :: Text
serviceCode :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:attributeName:GetAttributeValues' :: GetAttributeValues -> Text
$sel:serviceCode:GetAttributeValues' :: GetAttributeValues -> Text
$sel:nextToken:GetAttributeValues' :: GetAttributeValues -> Maybe Text
$sel:maxResults:GetAttributeValues' :: GetAttributeValues -> 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
serviceCode
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
attributeName

instance Data.ToHeaders GetAttributeValues where
  toHeaders :: GetAttributeValues -> 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
"AWSPriceListService.GetAttributeValues" ::
                          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 GetAttributeValues where
  toJSON :: GetAttributeValues -> Value
toJSON GetAttributeValues' {Maybe Natural
Maybe Text
Text
attributeName :: Text
serviceCode :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:attributeName:GetAttributeValues' :: GetAttributeValues -> Text
$sel:serviceCode:GetAttributeValues' :: GetAttributeValues -> Text
$sel:nextToken:GetAttributeValues' :: GetAttributeValues -> Maybe Text
$sel:maxResults:GetAttributeValues' :: GetAttributeValues -> 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
"ServiceCode" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
serviceCode),
            forall a. a -> Maybe a
Prelude.Just
              (Key
"AttributeName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
attributeName)
          ]
      )

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

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

-- | /See:/ 'newGetAttributeValuesResponse' smart constructor.
data GetAttributeValuesResponse = GetAttributeValuesResponse'
  { -- | The list of values for an attribute. For example,
    -- @Throughput Optimized HDD@ and @Provisioned IOPS@ are two available
    -- values for the @AmazonEC2@ @volumeType@.
    GetAttributeValuesResponse -> Maybe [AttributeValue]
attributeValues :: Prelude.Maybe [AttributeValue],
    -- | The pagination token that indicates the next set of results to retrieve.
    GetAttributeValuesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    GetAttributeValuesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetAttributeValuesResponse -> GetAttributeValuesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetAttributeValuesResponse -> GetAttributeValuesResponse -> Bool
$c/= :: GetAttributeValuesResponse -> GetAttributeValuesResponse -> Bool
== :: GetAttributeValuesResponse -> GetAttributeValuesResponse -> Bool
$c== :: GetAttributeValuesResponse -> GetAttributeValuesResponse -> Bool
Prelude.Eq, ReadPrec [GetAttributeValuesResponse]
ReadPrec GetAttributeValuesResponse
Int -> ReadS GetAttributeValuesResponse
ReadS [GetAttributeValuesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetAttributeValuesResponse]
$creadListPrec :: ReadPrec [GetAttributeValuesResponse]
readPrec :: ReadPrec GetAttributeValuesResponse
$creadPrec :: ReadPrec GetAttributeValuesResponse
readList :: ReadS [GetAttributeValuesResponse]
$creadList :: ReadS [GetAttributeValuesResponse]
readsPrec :: Int -> ReadS GetAttributeValuesResponse
$creadsPrec :: Int -> ReadS GetAttributeValuesResponse
Prelude.Read, Int -> GetAttributeValuesResponse -> ShowS
[GetAttributeValuesResponse] -> ShowS
GetAttributeValuesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetAttributeValuesResponse] -> ShowS
$cshowList :: [GetAttributeValuesResponse] -> ShowS
show :: GetAttributeValuesResponse -> String
$cshow :: GetAttributeValuesResponse -> String
showsPrec :: Int -> GetAttributeValuesResponse -> ShowS
$cshowsPrec :: Int -> GetAttributeValuesResponse -> ShowS
Prelude.Show, forall x.
Rep GetAttributeValuesResponse x -> GetAttributeValuesResponse
forall x.
GetAttributeValuesResponse -> Rep GetAttributeValuesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetAttributeValuesResponse x -> GetAttributeValuesResponse
$cfrom :: forall x.
GetAttributeValuesResponse -> Rep GetAttributeValuesResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetAttributeValuesResponse' 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:
--
-- 'attributeValues', 'getAttributeValuesResponse_attributeValues' - The list of values for an attribute. For example,
-- @Throughput Optimized HDD@ and @Provisioned IOPS@ are two available
-- values for the @AmazonEC2@ @volumeType@.
--
-- 'nextToken', 'getAttributeValuesResponse_nextToken' - The pagination token that indicates the next set of results to retrieve.
--
-- 'httpStatus', 'getAttributeValuesResponse_httpStatus' - The response's http status code.
newGetAttributeValuesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetAttributeValuesResponse
newGetAttributeValuesResponse :: Int -> GetAttributeValuesResponse
newGetAttributeValuesResponse Int
pHttpStatus_ =
  GetAttributeValuesResponse'
    { $sel:attributeValues:GetAttributeValuesResponse' :: Maybe [AttributeValue]
attributeValues =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:GetAttributeValuesResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetAttributeValuesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The list of values for an attribute. For example,
-- @Throughput Optimized HDD@ and @Provisioned IOPS@ are two available
-- values for the @AmazonEC2@ @volumeType@.
getAttributeValuesResponse_attributeValues :: Lens.Lens' GetAttributeValuesResponse (Prelude.Maybe [AttributeValue])
getAttributeValuesResponse_attributeValues :: Lens' GetAttributeValuesResponse (Maybe [AttributeValue])
getAttributeValuesResponse_attributeValues = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAttributeValuesResponse' {Maybe [AttributeValue]
attributeValues :: Maybe [AttributeValue]
$sel:attributeValues:GetAttributeValuesResponse' :: GetAttributeValuesResponse -> Maybe [AttributeValue]
attributeValues} -> Maybe [AttributeValue]
attributeValues) (\s :: GetAttributeValuesResponse
s@GetAttributeValuesResponse' {} Maybe [AttributeValue]
a -> GetAttributeValuesResponse
s {$sel:attributeValues:GetAttributeValuesResponse' :: Maybe [AttributeValue]
attributeValues = Maybe [AttributeValue]
a} :: GetAttributeValuesResponse) 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 pagination token that indicates the next set of results to retrieve.
getAttributeValuesResponse_nextToken :: Lens.Lens' GetAttributeValuesResponse (Prelude.Maybe Prelude.Text)
getAttributeValuesResponse_nextToken :: Lens' GetAttributeValuesResponse (Maybe Text)
getAttributeValuesResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAttributeValuesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetAttributeValuesResponse' :: GetAttributeValuesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetAttributeValuesResponse
s@GetAttributeValuesResponse' {} Maybe Text
a -> GetAttributeValuesResponse
s {$sel:nextToken:GetAttributeValuesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: GetAttributeValuesResponse)

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

instance Prelude.NFData GetAttributeValuesResponse where
  rnf :: GetAttributeValuesResponse -> ()
rnf GetAttributeValuesResponse' {Int
Maybe [AttributeValue]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
attributeValues :: Maybe [AttributeValue]
$sel:httpStatus:GetAttributeValuesResponse' :: GetAttributeValuesResponse -> Int
$sel:nextToken:GetAttributeValuesResponse' :: GetAttributeValuesResponse -> Maybe Text
$sel:attributeValues:GetAttributeValuesResponse' :: GetAttributeValuesResponse -> Maybe [AttributeValue]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [AttributeValue]
attributeValues
      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 Int
httpStatus