{-# 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 #-}
module Amazonka.Pricing.GetAttributeValues
(
GetAttributeValues (..),
newGetAttributeValues,
getAttributeValues_nextToken,
getAttributeValues_maxResults,
getAttributeValues_serviceCode,
getAttributeValues_attributeName,
GetAttributeValuesResponse (..),
newGetAttributeValuesResponse,
getAttributeValuesResponse_attributeValues,
getAttributeValuesResponse_nextToken,
getAttributeValuesResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Pricing.Types
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data GetAttributeValues = GetAttributeValues'
{
GetAttributeValues -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
GetAttributeValues -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
GetAttributeValues -> Text
serviceCode :: Prelude.Text,
GetAttributeValues -> Text
attributeName :: Prelude.Text
}
deriving (GetAttributeValues -> GetAttributeValues -> Bool
(GetAttributeValues -> GetAttributeValues -> Bool)
-> (GetAttributeValues -> GetAttributeValues -> Bool)
-> Eq GetAttributeValues
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]
(Int -> ReadS GetAttributeValues)
-> ReadS [GetAttributeValues]
-> ReadPrec GetAttributeValues
-> ReadPrec [GetAttributeValues]
-> Read 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
(Int -> GetAttributeValues -> ShowS)
-> (GetAttributeValues -> String)
-> ([GetAttributeValues] -> ShowS)
-> Show GetAttributeValues
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. GetAttributeValues -> Rep GetAttributeValues x)
-> (forall x. Rep GetAttributeValues x -> GetAttributeValues)
-> Generic GetAttributeValues
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)
newGetAttributeValues ::
Prelude.Text ->
Prelude.Text ->
GetAttributeValues
newGetAttributeValues :: Text -> Text -> GetAttributeValues
newGetAttributeValues Text
pServiceCode_ Text
pAttributeName_ =
GetAttributeValues' :: Maybe Text -> Maybe Natural -> Text -> Text -> GetAttributeValues
GetAttributeValues'
{ $sel:nextToken:GetAttributeValues' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:GetAttributeValues' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:serviceCode:GetAttributeValues' :: Text
serviceCode = Text
pServiceCode_,
$sel:attributeName:GetAttributeValues' :: Text
attributeName = Text
pAttributeName_
}
getAttributeValues_nextToken :: Lens.Lens' GetAttributeValues (Prelude.Maybe Prelude.Text)
getAttributeValues_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetAttributeValues -> f GetAttributeValues
getAttributeValues_nextToken = (GetAttributeValues -> Maybe Text)
-> (GetAttributeValues -> Maybe Text -> GetAttributeValues)
-> Lens
GetAttributeValues GetAttributeValues (Maybe Text) (Maybe Text)
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)
getAttributeValues_maxResults :: Lens.Lens' GetAttributeValues (Prelude.Maybe Prelude.Natural)
getAttributeValues_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> GetAttributeValues -> f GetAttributeValues
getAttributeValues_maxResults = (GetAttributeValues -> Maybe Natural)
-> (GetAttributeValues -> Maybe Natural -> GetAttributeValues)
-> Lens
GetAttributeValues
GetAttributeValues
(Maybe Natural)
(Maybe Natural)
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)
getAttributeValues_serviceCode :: Lens.Lens' GetAttributeValues Prelude.Text
getAttributeValues_serviceCode :: (Text -> f Text) -> GetAttributeValues -> f GetAttributeValues
getAttributeValues_serviceCode = (GetAttributeValues -> Text)
-> (GetAttributeValues -> Text -> GetAttributeValues)
-> Lens GetAttributeValues GetAttributeValues Text Text
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)
getAttributeValues_attributeName :: Lens.Lens' GetAttributeValues Prelude.Text
getAttributeValues_attributeName :: (Text -> f Text) -> GetAttributeValues -> f GetAttributeValues
getAttributeValues_attributeName = (GetAttributeValues -> Text)
-> (GetAttributeValues -> Text -> GetAttributeValues)
-> Lens GetAttributeValues GetAttributeValues Text Text
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
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse GetAttributeValues
GetAttributeValuesResponse
rs
GetAttributeValuesResponse
-> Getting (First Text) GetAttributeValuesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> GetAttributeValuesResponse
-> Const (First Text) GetAttributeValuesResponse
Lens' GetAttributeValuesResponse (Maybe Text)
getAttributeValuesResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> GetAttributeValuesResponse
-> Const (First Text) GetAttributeValuesResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) GetAttributeValuesResponse 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 GetAttributeValues
forall a. Maybe a
Prelude.Nothing
| Maybe [AttributeValue] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse GetAttributeValues
GetAttributeValuesResponse
rs
GetAttributeValuesResponse
-> Getting
(First [AttributeValue])
GetAttributeValuesResponse
[AttributeValue]
-> Maybe [AttributeValue]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [AttributeValue]
-> Const (First [AttributeValue]) (Maybe [AttributeValue]))
-> GetAttributeValuesResponse
-> Const (First [AttributeValue]) GetAttributeValuesResponse
Lens' GetAttributeValuesResponse (Maybe [AttributeValue])
getAttributeValuesResponse_attributeValues
((Maybe [AttributeValue]
-> Const (First [AttributeValue]) (Maybe [AttributeValue]))
-> GetAttributeValuesResponse
-> Const (First [AttributeValue]) GetAttributeValuesResponse)
-> (([AttributeValue]
-> Const (First [AttributeValue]) [AttributeValue])
-> Maybe [AttributeValue]
-> Const (First [AttributeValue]) (Maybe [AttributeValue]))
-> Getting
(First [AttributeValue])
GetAttributeValuesResponse
[AttributeValue]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([AttributeValue]
-> Const (First [AttributeValue]) [AttributeValue])
-> Maybe [AttributeValue]
-> Const (First [AttributeValue]) (Maybe [AttributeValue])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe GetAttributeValues
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
GetAttributeValues -> Maybe GetAttributeValues
forall a. a -> Maybe a
Prelude.Just (GetAttributeValues -> Maybe GetAttributeValues)
-> GetAttributeValues -> Maybe GetAttributeValues
forall a b. (a -> b) -> a -> b
Prelude.$
GetAttributeValues
rq
GetAttributeValues
-> (GetAttributeValues -> GetAttributeValues) -> GetAttributeValues
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> GetAttributeValues -> Identity GetAttributeValues
Lens
GetAttributeValues GetAttributeValues (Maybe Text) (Maybe Text)
getAttributeValues_nextToken
((Maybe Text -> Identity (Maybe Text))
-> GetAttributeValues -> Identity GetAttributeValues)
-> Maybe Text -> GetAttributeValues -> GetAttributeValues
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse GetAttributeValues
GetAttributeValuesResponse
rs
GetAttributeValuesResponse
-> Getting (First Text) GetAttributeValuesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> GetAttributeValuesResponse
-> Const (First Text) GetAttributeValuesResponse
Lens' GetAttributeValuesResponse (Maybe Text)
getAttributeValuesResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> GetAttributeValuesResponse
-> Const (First Text) GetAttributeValuesResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) GetAttributeValuesResponse 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 GetAttributeValues where
type
AWSResponse GetAttributeValues =
GetAttributeValuesResponse
request :: GetAttributeValues -> Request GetAttributeValues
request = Service -> GetAttributeValues -> Request GetAttributeValues
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy GetAttributeValues
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetAttributeValues)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse GetAttributeValues))
-> Logger
-> Service
-> Proxy GetAttributeValues
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetAttributeValues)))
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 [AttributeValue]
-> Maybe Text -> Int -> GetAttributeValuesResponse
GetAttributeValuesResponse'
(Maybe [AttributeValue]
-> Maybe Text -> Int -> GetAttributeValuesResponse)
-> Either String (Maybe [AttributeValue])
-> Either String (Maybe Text -> Int -> GetAttributeValuesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Either String (Maybe (Maybe [AttributeValue]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"AttributeValues"
Either String (Maybe (Maybe [AttributeValue]))
-> Maybe [AttributeValue] -> Either String (Maybe [AttributeValue])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [AttributeValue]
forall a. Monoid a => a
Prelude.mempty
)
Either String (Maybe Text -> Int -> GetAttributeValuesResponse)
-> Either String (Maybe Text)
-> Either String (Int -> GetAttributeValuesResponse)
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
"NextToken")
Either String (Int -> GetAttributeValuesResponse)
-> Either String Int -> Either String GetAttributeValuesResponse
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 GetAttributeValues
instance Prelude.NFData GetAttributeValues
instance Core.ToHeaders GetAttributeValues where
toHeaders :: GetAttributeValues -> ResponseHeaders
toHeaders =
ResponseHeaders -> GetAttributeValues -> 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
"AWSPriceListService.GetAttributeValues" ::
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 GetAttributeValues where
toJSON :: GetAttributeValues -> Value
toJSON GetAttributeValues' {Maybe Natural
Maybe Text
Text
attributeName :: Text
serviceCode :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:attributeName:GetAttributeValues' :: GetAttributeValues -> Text
$sel:serviceCode:GetAttributeValues' :: GetAttributeValues -> Text
$sel:maxResults:GetAttributeValues' :: GetAttributeValues -> Maybe Natural
$sel:nextToken:GetAttributeValues' :: GetAttributeValues -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"NextToken" 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
nextToken,
(Text
"MaxResults" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ServiceCode" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
serviceCode),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"AttributeName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
attributeName)
]
)
instance Core.ToPath GetAttributeValues where
toPath :: GetAttributeValues -> ByteString
toPath = ByteString -> GetAttributeValues -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery GetAttributeValues where
toQuery :: GetAttributeValues -> QueryString
toQuery = QueryString -> GetAttributeValues -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data GetAttributeValuesResponse = GetAttributeValuesResponse'
{
GetAttributeValuesResponse -> Maybe [AttributeValue]
attributeValues :: Prelude.Maybe [AttributeValue],
GetAttributeValuesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
GetAttributeValuesResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetAttributeValuesResponse -> GetAttributeValuesResponse -> Bool
(GetAttributeValuesResponse -> GetAttributeValuesResponse -> Bool)
-> (GetAttributeValuesResponse
-> GetAttributeValuesResponse -> Bool)
-> Eq GetAttributeValuesResponse
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]
(Int -> ReadS GetAttributeValuesResponse)
-> ReadS [GetAttributeValuesResponse]
-> ReadPrec GetAttributeValuesResponse
-> ReadPrec [GetAttributeValuesResponse]
-> Read 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
(Int -> GetAttributeValuesResponse -> ShowS)
-> (GetAttributeValuesResponse -> String)
-> ([GetAttributeValuesResponse] -> ShowS)
-> Show GetAttributeValuesResponse
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.
GetAttributeValuesResponse -> Rep GetAttributeValuesResponse x)
-> (forall x.
Rep GetAttributeValuesResponse x -> GetAttributeValuesResponse)
-> Generic GetAttributeValuesResponse
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)
newGetAttributeValuesResponse ::
Prelude.Int ->
GetAttributeValuesResponse
newGetAttributeValuesResponse :: Int -> GetAttributeValuesResponse
newGetAttributeValuesResponse Int
pHttpStatus_ =
GetAttributeValuesResponse' :: Maybe [AttributeValue]
-> Maybe Text -> Int -> GetAttributeValuesResponse
GetAttributeValuesResponse'
{ $sel:attributeValues:GetAttributeValuesResponse' :: Maybe [AttributeValue]
attributeValues =
Maybe [AttributeValue]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:GetAttributeValuesResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetAttributeValuesResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getAttributeValuesResponse_attributeValues :: Lens.Lens' GetAttributeValuesResponse (Prelude.Maybe [AttributeValue])
getAttributeValuesResponse_attributeValues :: (Maybe [AttributeValue] -> f (Maybe [AttributeValue]))
-> GetAttributeValuesResponse -> f GetAttributeValuesResponse
getAttributeValuesResponse_attributeValues = (GetAttributeValuesResponse -> Maybe [AttributeValue])
-> (GetAttributeValuesResponse
-> Maybe [AttributeValue] -> GetAttributeValuesResponse)
-> Lens' GetAttributeValuesResponse (Maybe [AttributeValue])
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) ((Maybe [AttributeValue] -> f (Maybe [AttributeValue]))
-> GetAttributeValuesResponse -> f GetAttributeValuesResponse)
-> ((Maybe [AttributeValue] -> f (Maybe [AttributeValue]))
-> Maybe [AttributeValue] -> f (Maybe [AttributeValue]))
-> (Maybe [AttributeValue] -> f (Maybe [AttributeValue]))
-> GetAttributeValuesResponse
-> f GetAttributeValuesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[AttributeValue] [AttributeValue] [AttributeValue] [AttributeValue]
-> Iso
(Maybe [AttributeValue])
(Maybe [AttributeValue])
(Maybe [AttributeValue])
(Maybe [AttributeValue])
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
[AttributeValue] [AttributeValue] [AttributeValue] [AttributeValue]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
getAttributeValuesResponse_nextToken :: Lens.Lens' GetAttributeValuesResponse (Prelude.Maybe Prelude.Text)
getAttributeValuesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetAttributeValuesResponse -> f GetAttributeValuesResponse
getAttributeValuesResponse_nextToken = (GetAttributeValuesResponse -> Maybe Text)
-> (GetAttributeValuesResponse
-> Maybe Text -> GetAttributeValuesResponse)
-> Lens' GetAttributeValuesResponse (Maybe Text)
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)
getAttributeValuesResponse_httpStatus :: Lens.Lens' GetAttributeValuesResponse Prelude.Int
getAttributeValuesResponse_httpStatus :: (Int -> f Int)
-> GetAttributeValuesResponse -> f GetAttributeValuesResponse
getAttributeValuesResponse_httpStatus = (GetAttributeValuesResponse -> Int)
-> (GetAttributeValuesResponse
-> Int -> GetAttributeValuesResponse)
-> Lens
GetAttributeValuesResponse GetAttributeValuesResponse Int Int
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