{-# 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.DescribeServices
(
DescribeServices (..),
newDescribeServices,
describeServices_formatVersion,
describeServices_nextToken,
describeServices_serviceCode,
describeServices_maxResults,
DescribeServicesResponse (..),
newDescribeServicesResponse,
describeServicesResponse_formatVersion,
describeServicesResponse_nextToken,
describeServicesResponse_services,
describeServicesResponse_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 DescribeServices = DescribeServices'
{
DescribeServices -> Maybe Text
formatVersion :: Prelude.Maybe Prelude.Text,
DescribeServices -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeServices -> Maybe Text
serviceCode :: Prelude.Maybe Prelude.Text,
DescribeServices -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
}
deriving (DescribeServices -> DescribeServices -> Bool
(DescribeServices -> DescribeServices -> Bool)
-> (DescribeServices -> DescribeServices -> Bool)
-> Eq DescribeServices
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeServices -> DescribeServices -> Bool
$c/= :: DescribeServices -> DescribeServices -> Bool
== :: DescribeServices -> DescribeServices -> Bool
$c== :: DescribeServices -> DescribeServices -> Bool
Prelude.Eq, ReadPrec [DescribeServices]
ReadPrec DescribeServices
Int -> ReadS DescribeServices
ReadS [DescribeServices]
(Int -> ReadS DescribeServices)
-> ReadS [DescribeServices]
-> ReadPrec DescribeServices
-> ReadPrec [DescribeServices]
-> Read DescribeServices
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeServices]
$creadListPrec :: ReadPrec [DescribeServices]
readPrec :: ReadPrec DescribeServices
$creadPrec :: ReadPrec DescribeServices
readList :: ReadS [DescribeServices]
$creadList :: ReadS [DescribeServices]
readsPrec :: Int -> ReadS DescribeServices
$creadsPrec :: Int -> ReadS DescribeServices
Prelude.Read, Int -> DescribeServices -> ShowS
[DescribeServices] -> ShowS
DescribeServices -> String
(Int -> DescribeServices -> ShowS)
-> (DescribeServices -> String)
-> ([DescribeServices] -> ShowS)
-> Show DescribeServices
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeServices] -> ShowS
$cshowList :: [DescribeServices] -> ShowS
show :: DescribeServices -> String
$cshow :: DescribeServices -> String
showsPrec :: Int -> DescribeServices -> ShowS
$cshowsPrec :: Int -> DescribeServices -> ShowS
Prelude.Show, (forall x. DescribeServices -> Rep DescribeServices x)
-> (forall x. Rep DescribeServices x -> DescribeServices)
-> Generic DescribeServices
forall x. Rep DescribeServices x -> DescribeServices
forall x. DescribeServices -> Rep DescribeServices x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeServices x -> DescribeServices
$cfrom :: forall x. DescribeServices -> Rep DescribeServices x
Prelude.Generic)
newDescribeServices ::
DescribeServices
newDescribeServices :: DescribeServices
newDescribeServices =
DescribeServices' :: Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Natural -> DescribeServices
DescribeServices'
{ $sel:formatVersion:DescribeServices' :: Maybe Text
formatVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeServices' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:serviceCode:DescribeServices' :: Maybe Text
serviceCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:DescribeServices' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
}
describeServices_formatVersion :: Lens.Lens' DescribeServices (Prelude.Maybe Prelude.Text)
describeServices_formatVersion :: (Maybe Text -> f (Maybe Text))
-> DescribeServices -> f DescribeServices
describeServices_formatVersion = (DescribeServices -> Maybe Text)
-> (DescribeServices -> Maybe Text -> DescribeServices)
-> Lens DescribeServices DescribeServices (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeServices' {Maybe Text
formatVersion :: Maybe Text
$sel:formatVersion:DescribeServices' :: DescribeServices -> Maybe Text
formatVersion} -> Maybe Text
formatVersion) (\s :: DescribeServices
s@DescribeServices' {} Maybe Text
a -> DescribeServices
s {$sel:formatVersion:DescribeServices' :: Maybe Text
formatVersion = Maybe Text
a} :: DescribeServices)
describeServices_nextToken :: Lens.Lens' DescribeServices (Prelude.Maybe Prelude.Text)
describeServices_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeServices -> f DescribeServices
describeServices_nextToken = (DescribeServices -> Maybe Text)
-> (DescribeServices -> Maybe Text -> DescribeServices)
-> Lens DescribeServices DescribeServices (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeServices' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeServices' :: DescribeServices -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeServices
s@DescribeServices' {} Maybe Text
a -> DescribeServices
s {$sel:nextToken:DescribeServices' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeServices)
describeServices_serviceCode :: Lens.Lens' DescribeServices (Prelude.Maybe Prelude.Text)
describeServices_serviceCode :: (Maybe Text -> f (Maybe Text))
-> DescribeServices -> f DescribeServices
describeServices_serviceCode = (DescribeServices -> Maybe Text)
-> (DescribeServices -> Maybe Text -> DescribeServices)
-> Lens DescribeServices DescribeServices (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeServices' {Maybe Text
serviceCode :: Maybe Text
$sel:serviceCode:DescribeServices' :: DescribeServices -> Maybe Text
serviceCode} -> Maybe Text
serviceCode) (\s :: DescribeServices
s@DescribeServices' {} Maybe Text
a -> DescribeServices
s {$sel:serviceCode:DescribeServices' :: Maybe Text
serviceCode = Maybe Text
a} :: DescribeServices)
describeServices_maxResults :: Lens.Lens' DescribeServices (Prelude.Maybe Prelude.Natural)
describeServices_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> DescribeServices -> f DescribeServices
describeServices_maxResults = (DescribeServices -> Maybe Natural)
-> (DescribeServices -> Maybe Natural -> DescribeServices)
-> Lens
DescribeServices DescribeServices (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeServices' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:DescribeServices' :: DescribeServices -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: DescribeServices
s@DescribeServices' {} Maybe Natural
a -> DescribeServices
s {$sel:maxResults:DescribeServices' :: Maybe Natural
maxResults = Maybe Natural
a} :: DescribeServices)
instance Core.AWSPager DescribeServices where
page :: DescribeServices
-> AWSResponse DescribeServices -> Maybe DescribeServices
page DescribeServices
rq AWSResponse DescribeServices
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeServices
DescribeServicesResponse
rs
DescribeServicesResponse
-> Getting (First Text) DescribeServicesResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeServicesResponse
-> Const (First Text) DescribeServicesResponse
Lens' DescribeServicesResponse (Maybe Text)
describeServicesResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeServicesResponse
-> Const (First Text) DescribeServicesResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeServicesResponse 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 DescribeServices
forall a. Maybe a
Prelude.Nothing
| Maybe [PricingService] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeServices
DescribeServicesResponse
rs
DescribeServicesResponse
-> Getting
(First [PricingService]) DescribeServicesResponse [PricingService]
-> Maybe [PricingService]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [PricingService]
-> Const (First [PricingService]) (Maybe [PricingService]))
-> DescribeServicesResponse
-> Const (First [PricingService]) DescribeServicesResponse
Lens' DescribeServicesResponse (Maybe [PricingService])
describeServicesResponse_services
((Maybe [PricingService]
-> Const (First [PricingService]) (Maybe [PricingService]))
-> DescribeServicesResponse
-> Const (First [PricingService]) DescribeServicesResponse)
-> (([PricingService]
-> Const (First [PricingService]) [PricingService])
-> Maybe [PricingService]
-> Const (First [PricingService]) (Maybe [PricingService]))
-> Getting
(First [PricingService]) DescribeServicesResponse [PricingService]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([PricingService]
-> Const (First [PricingService]) [PricingService])
-> Maybe [PricingService]
-> Const (First [PricingService]) (Maybe [PricingService])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe DescribeServices
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
DescribeServices -> Maybe DescribeServices
forall a. a -> Maybe a
Prelude.Just (DescribeServices -> Maybe DescribeServices)
-> DescribeServices -> Maybe DescribeServices
forall a b. (a -> b) -> a -> b
Prelude.$
DescribeServices
rq
DescribeServices
-> (DescribeServices -> DescribeServices) -> DescribeServices
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeServices -> Identity DescribeServices
Lens DescribeServices DescribeServices (Maybe Text) (Maybe Text)
describeServices_nextToken
((Maybe Text -> Identity (Maybe Text))
-> DescribeServices -> Identity DescribeServices)
-> Maybe Text -> DescribeServices -> DescribeServices
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeServices
DescribeServicesResponse
rs
DescribeServicesResponse
-> Getting (First Text) DescribeServicesResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeServicesResponse
-> Const (First Text) DescribeServicesResponse
Lens' DescribeServicesResponse (Maybe Text)
describeServicesResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeServicesResponse
-> Const (First Text) DescribeServicesResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeServicesResponse 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 DescribeServices where
type
AWSResponse DescribeServices =
DescribeServicesResponse
request :: DescribeServices -> Request DescribeServices
request = Service -> DescribeServices -> Request DescribeServices
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeServices
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeServices)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DescribeServices))
-> Logger
-> Service
-> Proxy DescribeServices
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeServices)))
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
-> Maybe [PricingService]
-> Int
-> DescribeServicesResponse
DescribeServicesResponse'
(Maybe Text
-> Maybe Text
-> Maybe [PricingService]
-> Int
-> DescribeServicesResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe [PricingService] -> Int -> DescribeServicesResponse)
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
"FormatVersion")
Either
String
(Maybe Text
-> Maybe [PricingService] -> Int -> DescribeServicesResponse)
-> Either String (Maybe Text)
-> Either
String (Maybe [PricingService] -> Int -> DescribeServicesResponse)
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 (Maybe [PricingService] -> Int -> DescribeServicesResponse)
-> Either String (Maybe [PricingService])
-> Either String (Int -> DescribeServicesResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [PricingService]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Services" Either String (Maybe (Maybe [PricingService]))
-> Maybe [PricingService] -> Either String (Maybe [PricingService])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [PricingService]
forall a. Monoid a => a
Prelude.mempty)
Either String (Int -> DescribeServicesResponse)
-> Either String Int -> Either String DescribeServicesResponse
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 DescribeServices
instance Prelude.NFData DescribeServices
instance Core.ToHeaders DescribeServices where
toHeaders :: DescribeServices -> ResponseHeaders
toHeaders =
ResponseHeaders -> DescribeServices -> 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.DescribeServices" ::
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 DescribeServices where
toJSON :: DescribeServices -> Value
toJSON DescribeServices' {Maybe Natural
Maybe Text
maxResults :: Maybe Natural
serviceCode :: Maybe Text
nextToken :: Maybe Text
formatVersion :: Maybe Text
$sel:maxResults:DescribeServices' :: DescribeServices -> Maybe Natural
$sel:serviceCode:DescribeServices' :: DescribeServices -> Maybe Text
$sel:nextToken:DescribeServices' :: DescribeServices -> Maybe Text
$sel:formatVersion:DescribeServices' :: DescribeServices -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"FormatVersion" 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
formatVersion,
(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
"ServiceCode" 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
serviceCode,
(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
]
)
instance Core.ToPath DescribeServices where
toPath :: DescribeServices -> ByteString
toPath = ByteString -> DescribeServices -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DescribeServices where
toQuery :: DescribeServices -> QueryString
toQuery = QueryString -> DescribeServices -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DescribeServicesResponse = DescribeServicesResponse'
{
DescribeServicesResponse -> Maybe Text
formatVersion :: Prelude.Maybe Prelude.Text,
DescribeServicesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeServicesResponse -> Maybe [PricingService]
services :: Prelude.Maybe [PricingService],
DescribeServicesResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeServicesResponse -> DescribeServicesResponse -> Bool
(DescribeServicesResponse -> DescribeServicesResponse -> Bool)
-> (DescribeServicesResponse -> DescribeServicesResponse -> Bool)
-> Eq DescribeServicesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeServicesResponse -> DescribeServicesResponse -> Bool
$c/= :: DescribeServicesResponse -> DescribeServicesResponse -> Bool
== :: DescribeServicesResponse -> DescribeServicesResponse -> Bool
$c== :: DescribeServicesResponse -> DescribeServicesResponse -> Bool
Prelude.Eq, ReadPrec [DescribeServicesResponse]
ReadPrec DescribeServicesResponse
Int -> ReadS DescribeServicesResponse
ReadS [DescribeServicesResponse]
(Int -> ReadS DescribeServicesResponse)
-> ReadS [DescribeServicesResponse]
-> ReadPrec DescribeServicesResponse
-> ReadPrec [DescribeServicesResponse]
-> Read DescribeServicesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeServicesResponse]
$creadListPrec :: ReadPrec [DescribeServicesResponse]
readPrec :: ReadPrec DescribeServicesResponse
$creadPrec :: ReadPrec DescribeServicesResponse
readList :: ReadS [DescribeServicesResponse]
$creadList :: ReadS [DescribeServicesResponse]
readsPrec :: Int -> ReadS DescribeServicesResponse
$creadsPrec :: Int -> ReadS DescribeServicesResponse
Prelude.Read, Int -> DescribeServicesResponse -> ShowS
[DescribeServicesResponse] -> ShowS
DescribeServicesResponse -> String
(Int -> DescribeServicesResponse -> ShowS)
-> (DescribeServicesResponse -> String)
-> ([DescribeServicesResponse] -> ShowS)
-> Show DescribeServicesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeServicesResponse] -> ShowS
$cshowList :: [DescribeServicesResponse] -> ShowS
show :: DescribeServicesResponse -> String
$cshow :: DescribeServicesResponse -> String
showsPrec :: Int -> DescribeServicesResponse -> ShowS
$cshowsPrec :: Int -> DescribeServicesResponse -> ShowS
Prelude.Show, (forall x.
DescribeServicesResponse -> Rep DescribeServicesResponse x)
-> (forall x.
Rep DescribeServicesResponse x -> DescribeServicesResponse)
-> Generic DescribeServicesResponse
forall x.
Rep DescribeServicesResponse x -> DescribeServicesResponse
forall x.
DescribeServicesResponse -> Rep DescribeServicesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeServicesResponse x -> DescribeServicesResponse
$cfrom :: forall x.
DescribeServicesResponse -> Rep DescribeServicesResponse x
Prelude.Generic)
newDescribeServicesResponse ::
Prelude.Int ->
DescribeServicesResponse
newDescribeServicesResponse :: Int -> DescribeServicesResponse
newDescribeServicesResponse Int
pHttpStatus_ =
DescribeServicesResponse' :: Maybe Text
-> Maybe Text
-> Maybe [PricingService]
-> Int
-> DescribeServicesResponse
DescribeServicesResponse'
{ $sel:formatVersion:DescribeServicesResponse' :: Maybe Text
formatVersion =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeServicesResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:services:DescribeServicesResponse' :: Maybe [PricingService]
services = Maybe [PricingService]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeServicesResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeServicesResponse_formatVersion :: Lens.Lens' DescribeServicesResponse (Prelude.Maybe Prelude.Text)
describeServicesResponse_formatVersion :: (Maybe Text -> f (Maybe Text))
-> DescribeServicesResponse -> f DescribeServicesResponse
describeServicesResponse_formatVersion = (DescribeServicesResponse -> Maybe Text)
-> (DescribeServicesResponse
-> Maybe Text -> DescribeServicesResponse)
-> Lens' DescribeServicesResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeServicesResponse' {Maybe Text
formatVersion :: Maybe Text
$sel:formatVersion:DescribeServicesResponse' :: DescribeServicesResponse -> Maybe Text
formatVersion} -> Maybe Text
formatVersion) (\s :: DescribeServicesResponse
s@DescribeServicesResponse' {} Maybe Text
a -> DescribeServicesResponse
s {$sel:formatVersion:DescribeServicesResponse' :: Maybe Text
formatVersion = Maybe Text
a} :: DescribeServicesResponse)
describeServicesResponse_nextToken :: Lens.Lens' DescribeServicesResponse (Prelude.Maybe Prelude.Text)
describeServicesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeServicesResponse -> f DescribeServicesResponse
describeServicesResponse_nextToken = (DescribeServicesResponse -> Maybe Text)
-> (DescribeServicesResponse
-> Maybe Text -> DescribeServicesResponse)
-> Lens' DescribeServicesResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeServicesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeServicesResponse' :: DescribeServicesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeServicesResponse
s@DescribeServicesResponse' {} Maybe Text
a -> DescribeServicesResponse
s {$sel:nextToken:DescribeServicesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeServicesResponse)
describeServicesResponse_services :: Lens.Lens' DescribeServicesResponse (Prelude.Maybe [PricingService])
describeServicesResponse_services :: (Maybe [PricingService] -> f (Maybe [PricingService]))
-> DescribeServicesResponse -> f DescribeServicesResponse
describeServicesResponse_services = (DescribeServicesResponse -> Maybe [PricingService])
-> (DescribeServicesResponse
-> Maybe [PricingService] -> DescribeServicesResponse)
-> Lens' DescribeServicesResponse (Maybe [PricingService])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeServicesResponse' {Maybe [PricingService]
services :: Maybe [PricingService]
$sel:services:DescribeServicesResponse' :: DescribeServicesResponse -> Maybe [PricingService]
services} -> Maybe [PricingService]
services) (\s :: DescribeServicesResponse
s@DescribeServicesResponse' {} Maybe [PricingService]
a -> DescribeServicesResponse
s {$sel:services:DescribeServicesResponse' :: Maybe [PricingService]
services = Maybe [PricingService]
a} :: DescribeServicesResponse) ((Maybe [PricingService] -> f (Maybe [PricingService]))
-> DescribeServicesResponse -> f DescribeServicesResponse)
-> ((Maybe [PricingService] -> f (Maybe [PricingService]))
-> Maybe [PricingService] -> f (Maybe [PricingService]))
-> (Maybe [PricingService] -> f (Maybe [PricingService]))
-> DescribeServicesResponse
-> f DescribeServicesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[PricingService] [PricingService] [PricingService] [PricingService]
-> Iso
(Maybe [PricingService])
(Maybe [PricingService])
(Maybe [PricingService])
(Maybe [PricingService])
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
[PricingService] [PricingService] [PricingService] [PricingService]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeServicesResponse_httpStatus :: Lens.Lens' DescribeServicesResponse Prelude.Int
describeServicesResponse_httpStatus :: (Int -> f Int)
-> DescribeServicesResponse -> f DescribeServicesResponse
describeServicesResponse_httpStatus = (DescribeServicesResponse -> Int)
-> (DescribeServicesResponse -> Int -> DescribeServicesResponse)
-> Lens DescribeServicesResponse DescribeServicesResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeServicesResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeServicesResponse' :: DescribeServicesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeServicesResponse
s@DescribeServicesResponse' {} Int
a -> DescribeServicesResponse
s {$sel:httpStatus:DescribeServicesResponse' :: Int
httpStatus = Int
a} :: DescribeServicesResponse)
instance Prelude.NFData DescribeServicesResponse