{-# 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.EC2.GetGroupsForCapacityReservation
(
GetGroupsForCapacityReservation (..),
newGetGroupsForCapacityReservation,
getGroupsForCapacityReservation_dryRun,
getGroupsForCapacityReservation_maxResults,
getGroupsForCapacityReservation_nextToken,
getGroupsForCapacityReservation_capacityReservationId,
GetGroupsForCapacityReservationResponse (..),
newGetGroupsForCapacityReservationResponse,
getGroupsForCapacityReservationResponse_capacityReservationGroups,
getGroupsForCapacityReservationResponse_nextToken,
getGroupsForCapacityReservationResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EC2.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data GetGroupsForCapacityReservation = GetGroupsForCapacityReservation'
{
GetGroupsForCapacityReservation -> Maybe Bool
dryRun :: Prelude.Maybe Prelude.Bool,
GetGroupsForCapacityReservation -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
GetGroupsForCapacityReservation -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
GetGroupsForCapacityReservation -> Text
capacityReservationId :: Prelude.Text
}
deriving (GetGroupsForCapacityReservation
-> GetGroupsForCapacityReservation -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetGroupsForCapacityReservation
-> GetGroupsForCapacityReservation -> Bool
$c/= :: GetGroupsForCapacityReservation
-> GetGroupsForCapacityReservation -> Bool
== :: GetGroupsForCapacityReservation
-> GetGroupsForCapacityReservation -> Bool
$c== :: GetGroupsForCapacityReservation
-> GetGroupsForCapacityReservation -> Bool
Prelude.Eq, ReadPrec [GetGroupsForCapacityReservation]
ReadPrec GetGroupsForCapacityReservation
Int -> ReadS GetGroupsForCapacityReservation
ReadS [GetGroupsForCapacityReservation]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetGroupsForCapacityReservation]
$creadListPrec :: ReadPrec [GetGroupsForCapacityReservation]
readPrec :: ReadPrec GetGroupsForCapacityReservation
$creadPrec :: ReadPrec GetGroupsForCapacityReservation
readList :: ReadS [GetGroupsForCapacityReservation]
$creadList :: ReadS [GetGroupsForCapacityReservation]
readsPrec :: Int -> ReadS GetGroupsForCapacityReservation
$creadsPrec :: Int -> ReadS GetGroupsForCapacityReservation
Prelude.Read, Int -> GetGroupsForCapacityReservation -> ShowS
[GetGroupsForCapacityReservation] -> ShowS
GetGroupsForCapacityReservation -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetGroupsForCapacityReservation] -> ShowS
$cshowList :: [GetGroupsForCapacityReservation] -> ShowS
show :: GetGroupsForCapacityReservation -> String
$cshow :: GetGroupsForCapacityReservation -> String
showsPrec :: Int -> GetGroupsForCapacityReservation -> ShowS
$cshowsPrec :: Int -> GetGroupsForCapacityReservation -> ShowS
Prelude.Show, forall x.
Rep GetGroupsForCapacityReservation x
-> GetGroupsForCapacityReservation
forall x.
GetGroupsForCapacityReservation
-> Rep GetGroupsForCapacityReservation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetGroupsForCapacityReservation x
-> GetGroupsForCapacityReservation
$cfrom :: forall x.
GetGroupsForCapacityReservation
-> Rep GetGroupsForCapacityReservation x
Prelude.Generic)
newGetGroupsForCapacityReservation ::
Prelude.Text ->
GetGroupsForCapacityReservation
newGetGroupsForCapacityReservation :: Text -> GetGroupsForCapacityReservation
newGetGroupsForCapacityReservation
Text
pCapacityReservationId_ =
GetGroupsForCapacityReservation'
{ $sel:dryRun:GetGroupsForCapacityReservation' :: Maybe Bool
dryRun =
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:GetGroupsForCapacityReservation' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:GetGroupsForCapacityReservation' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
$sel:capacityReservationId:GetGroupsForCapacityReservation' :: Text
capacityReservationId =
Text
pCapacityReservationId_
}
getGroupsForCapacityReservation_dryRun :: Lens.Lens' GetGroupsForCapacityReservation (Prelude.Maybe Prelude.Bool)
getGroupsForCapacityReservation_dryRun :: Lens' GetGroupsForCapacityReservation (Maybe Bool)
getGroupsForCapacityReservation_dryRun = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetGroupsForCapacityReservation' {Maybe Bool
dryRun :: Maybe Bool
$sel:dryRun:GetGroupsForCapacityReservation' :: GetGroupsForCapacityReservation -> Maybe Bool
dryRun} -> Maybe Bool
dryRun) (\s :: GetGroupsForCapacityReservation
s@GetGroupsForCapacityReservation' {} Maybe Bool
a -> GetGroupsForCapacityReservation
s {$sel:dryRun:GetGroupsForCapacityReservation' :: Maybe Bool
dryRun = Maybe Bool
a} :: GetGroupsForCapacityReservation)
getGroupsForCapacityReservation_maxResults :: Lens.Lens' GetGroupsForCapacityReservation (Prelude.Maybe Prelude.Natural)
getGroupsForCapacityReservation_maxResults :: Lens' GetGroupsForCapacityReservation (Maybe Natural)
getGroupsForCapacityReservation_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetGroupsForCapacityReservation' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:GetGroupsForCapacityReservation' :: GetGroupsForCapacityReservation -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: GetGroupsForCapacityReservation
s@GetGroupsForCapacityReservation' {} Maybe Natural
a -> GetGroupsForCapacityReservation
s {$sel:maxResults:GetGroupsForCapacityReservation' :: Maybe Natural
maxResults = Maybe Natural
a} :: GetGroupsForCapacityReservation)
getGroupsForCapacityReservation_nextToken :: Lens.Lens' GetGroupsForCapacityReservation (Prelude.Maybe Prelude.Text)
getGroupsForCapacityReservation_nextToken :: Lens' GetGroupsForCapacityReservation (Maybe Text)
getGroupsForCapacityReservation_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetGroupsForCapacityReservation' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetGroupsForCapacityReservation' :: GetGroupsForCapacityReservation -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetGroupsForCapacityReservation
s@GetGroupsForCapacityReservation' {} Maybe Text
a -> GetGroupsForCapacityReservation
s {$sel:nextToken:GetGroupsForCapacityReservation' :: Maybe Text
nextToken = Maybe Text
a} :: GetGroupsForCapacityReservation)
getGroupsForCapacityReservation_capacityReservationId :: Lens.Lens' GetGroupsForCapacityReservation Prelude.Text
getGroupsForCapacityReservation_capacityReservationId :: Lens' GetGroupsForCapacityReservation Text
getGroupsForCapacityReservation_capacityReservationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetGroupsForCapacityReservation' {Text
capacityReservationId :: Text
$sel:capacityReservationId:GetGroupsForCapacityReservation' :: GetGroupsForCapacityReservation -> Text
capacityReservationId} -> Text
capacityReservationId) (\s :: GetGroupsForCapacityReservation
s@GetGroupsForCapacityReservation' {} Text
a -> GetGroupsForCapacityReservation
s {$sel:capacityReservationId:GetGroupsForCapacityReservation' :: Text
capacityReservationId = Text
a} :: GetGroupsForCapacityReservation)
instance
Core.AWSPager
GetGroupsForCapacityReservation
where
page :: GetGroupsForCapacityReservation
-> AWSResponse GetGroupsForCapacityReservation
-> Maybe GetGroupsForCapacityReservation
page GetGroupsForCapacityReservation
rq AWSResponse GetGroupsForCapacityReservation
rs
| forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse GetGroupsForCapacityReservation
rs
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetGroupsForCapacityReservationResponse (Maybe Text)
getGroupsForCapacityReservationResponse_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 GetGroupsForCapacityReservation
rs
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
GetGroupsForCapacityReservationResponse
(Maybe [CapacityReservationGroup])
getGroupsForCapacityReservationResponse_capacityReservationGroups
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.$ GetGroupsForCapacityReservation
rq
forall a b. a -> (a -> b) -> b
Prelude.& Lens' GetGroupsForCapacityReservation (Maybe Text)
getGroupsForCapacityReservation_nextToken
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse GetGroupsForCapacityReservation
rs
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetGroupsForCapacityReservationResponse (Maybe Text)
getGroupsForCapacityReservationResponse_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
GetGroupsForCapacityReservation
where
type
AWSResponse GetGroupsForCapacityReservation =
GetGroupsForCapacityReservationResponse
request :: (Service -> Service)
-> GetGroupsForCapacityReservation
-> Request GetGroupsForCapacityReservation
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetGroupsForCapacityReservation
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse GetGroupsForCapacityReservation)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXML
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe [CapacityReservationGroup]
-> Maybe Text -> Int -> GetGroupsForCapacityReservationResponse
GetGroupsForCapacityReservationResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( [Node]
x
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"capacityReservationGroupSet"
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"item")
)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"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
GetGroupsForCapacityReservation
where
hashWithSalt :: Int -> GetGroupsForCapacityReservation -> Int
hashWithSalt
Int
_salt
GetGroupsForCapacityReservation' {Maybe Bool
Maybe Natural
Maybe Text
Text
capacityReservationId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
dryRun :: Maybe Bool
$sel:capacityReservationId:GetGroupsForCapacityReservation' :: GetGroupsForCapacityReservation -> Text
$sel:nextToken:GetGroupsForCapacityReservation' :: GetGroupsForCapacityReservation -> Maybe Text
$sel:maxResults:GetGroupsForCapacityReservation' :: GetGroupsForCapacityReservation -> Maybe Natural
$sel:dryRun:GetGroupsForCapacityReservation' :: GetGroupsForCapacityReservation -> Maybe Bool
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
dryRun
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
capacityReservationId
instance
Prelude.NFData
GetGroupsForCapacityReservation
where
rnf :: GetGroupsForCapacityReservation -> ()
rnf GetGroupsForCapacityReservation' {Maybe Bool
Maybe Natural
Maybe Text
Text
capacityReservationId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
dryRun :: Maybe Bool
$sel:capacityReservationId:GetGroupsForCapacityReservation' :: GetGroupsForCapacityReservation -> Text
$sel:nextToken:GetGroupsForCapacityReservation' :: GetGroupsForCapacityReservation -> Maybe Text
$sel:maxResults:GetGroupsForCapacityReservation' :: GetGroupsForCapacityReservation -> Maybe Natural
$sel:dryRun:GetGroupsForCapacityReservation' :: GetGroupsForCapacityReservation -> Maybe Bool
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
dryRun
seq :: forall a b. a -> b -> b
`Prelude.seq` 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
capacityReservationId
instance
Data.ToHeaders
GetGroupsForCapacityReservation
where
toHeaders :: GetGroupsForCapacityReservation -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath GetGroupsForCapacityReservation where
toPath :: GetGroupsForCapacityReservation -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery GetGroupsForCapacityReservation where
toQuery :: GetGroupsForCapacityReservation -> QueryString
toQuery GetGroupsForCapacityReservation' {Maybe Bool
Maybe Natural
Maybe Text
Text
capacityReservationId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
dryRun :: Maybe Bool
$sel:capacityReservationId:GetGroupsForCapacityReservation' :: GetGroupsForCapacityReservation -> Text
$sel:nextToken:GetGroupsForCapacityReservation' :: GetGroupsForCapacityReservation -> Maybe Text
$sel:maxResults:GetGroupsForCapacityReservation' :: GetGroupsForCapacityReservation -> Maybe Natural
$sel:dryRun:GetGroupsForCapacityReservation' :: GetGroupsForCapacityReservation -> Maybe Bool
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: ( ByteString
"GetGroupsForCapacityReservation" ::
Prelude.ByteString
),
ByteString
"Version"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2016-11-15" :: Prelude.ByteString),
ByteString
"DryRun" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
dryRun,
ByteString
"MaxResults" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
maxResults,
ByteString
"NextToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken,
ByteString
"CapacityReservationId"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
capacityReservationId
]
data GetGroupsForCapacityReservationResponse = GetGroupsForCapacityReservationResponse'
{
GetGroupsForCapacityReservationResponse
-> Maybe [CapacityReservationGroup]
capacityReservationGroups :: Prelude.Maybe [CapacityReservationGroup],
GetGroupsForCapacityReservationResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
GetGroupsForCapacityReservationResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetGroupsForCapacityReservationResponse
-> GetGroupsForCapacityReservationResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetGroupsForCapacityReservationResponse
-> GetGroupsForCapacityReservationResponse -> Bool
$c/= :: GetGroupsForCapacityReservationResponse
-> GetGroupsForCapacityReservationResponse -> Bool
== :: GetGroupsForCapacityReservationResponse
-> GetGroupsForCapacityReservationResponse -> Bool
$c== :: GetGroupsForCapacityReservationResponse
-> GetGroupsForCapacityReservationResponse -> Bool
Prelude.Eq, ReadPrec [GetGroupsForCapacityReservationResponse]
ReadPrec GetGroupsForCapacityReservationResponse
Int -> ReadS GetGroupsForCapacityReservationResponse
ReadS [GetGroupsForCapacityReservationResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetGroupsForCapacityReservationResponse]
$creadListPrec :: ReadPrec [GetGroupsForCapacityReservationResponse]
readPrec :: ReadPrec GetGroupsForCapacityReservationResponse
$creadPrec :: ReadPrec GetGroupsForCapacityReservationResponse
readList :: ReadS [GetGroupsForCapacityReservationResponse]
$creadList :: ReadS [GetGroupsForCapacityReservationResponse]
readsPrec :: Int -> ReadS GetGroupsForCapacityReservationResponse
$creadsPrec :: Int -> ReadS GetGroupsForCapacityReservationResponse
Prelude.Read, Int -> GetGroupsForCapacityReservationResponse -> ShowS
[GetGroupsForCapacityReservationResponse] -> ShowS
GetGroupsForCapacityReservationResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetGroupsForCapacityReservationResponse] -> ShowS
$cshowList :: [GetGroupsForCapacityReservationResponse] -> ShowS
show :: GetGroupsForCapacityReservationResponse -> String
$cshow :: GetGroupsForCapacityReservationResponse -> String
showsPrec :: Int -> GetGroupsForCapacityReservationResponse -> ShowS
$cshowsPrec :: Int -> GetGroupsForCapacityReservationResponse -> ShowS
Prelude.Show, forall x.
Rep GetGroupsForCapacityReservationResponse x
-> GetGroupsForCapacityReservationResponse
forall x.
GetGroupsForCapacityReservationResponse
-> Rep GetGroupsForCapacityReservationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetGroupsForCapacityReservationResponse x
-> GetGroupsForCapacityReservationResponse
$cfrom :: forall x.
GetGroupsForCapacityReservationResponse
-> Rep GetGroupsForCapacityReservationResponse x
Prelude.Generic)
newGetGroupsForCapacityReservationResponse ::
Prelude.Int ->
GetGroupsForCapacityReservationResponse
newGetGroupsForCapacityReservationResponse :: Int -> GetGroupsForCapacityReservationResponse
newGetGroupsForCapacityReservationResponse
Int
pHttpStatus_ =
GetGroupsForCapacityReservationResponse'
{ $sel:capacityReservationGroups:GetGroupsForCapacityReservationResponse' :: Maybe [CapacityReservationGroup]
capacityReservationGroups =
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:GetGroupsForCapacityReservationResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetGroupsForCapacityReservationResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getGroupsForCapacityReservationResponse_capacityReservationGroups :: Lens.Lens' GetGroupsForCapacityReservationResponse (Prelude.Maybe [CapacityReservationGroup])
getGroupsForCapacityReservationResponse_capacityReservationGroups :: Lens'
GetGroupsForCapacityReservationResponse
(Maybe [CapacityReservationGroup])
getGroupsForCapacityReservationResponse_capacityReservationGroups = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetGroupsForCapacityReservationResponse' {Maybe [CapacityReservationGroup]
capacityReservationGroups :: Maybe [CapacityReservationGroup]
$sel:capacityReservationGroups:GetGroupsForCapacityReservationResponse' :: GetGroupsForCapacityReservationResponse
-> Maybe [CapacityReservationGroup]
capacityReservationGroups} -> Maybe [CapacityReservationGroup]
capacityReservationGroups) (\s :: GetGroupsForCapacityReservationResponse
s@GetGroupsForCapacityReservationResponse' {} Maybe [CapacityReservationGroup]
a -> GetGroupsForCapacityReservationResponse
s {$sel:capacityReservationGroups:GetGroupsForCapacityReservationResponse' :: Maybe [CapacityReservationGroup]
capacityReservationGroups = Maybe [CapacityReservationGroup]
a} :: GetGroupsForCapacityReservationResponse) 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
getGroupsForCapacityReservationResponse_nextToken :: Lens.Lens' GetGroupsForCapacityReservationResponse (Prelude.Maybe Prelude.Text)
getGroupsForCapacityReservationResponse_nextToken :: Lens' GetGroupsForCapacityReservationResponse (Maybe Text)
getGroupsForCapacityReservationResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetGroupsForCapacityReservationResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetGroupsForCapacityReservationResponse' :: GetGroupsForCapacityReservationResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetGroupsForCapacityReservationResponse
s@GetGroupsForCapacityReservationResponse' {} Maybe Text
a -> GetGroupsForCapacityReservationResponse
s {$sel:nextToken:GetGroupsForCapacityReservationResponse' :: Maybe Text
nextToken = Maybe Text
a} :: GetGroupsForCapacityReservationResponse)
getGroupsForCapacityReservationResponse_httpStatus :: Lens.Lens' GetGroupsForCapacityReservationResponse Prelude.Int
getGroupsForCapacityReservationResponse_httpStatus :: Lens' GetGroupsForCapacityReservationResponse Int
getGroupsForCapacityReservationResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetGroupsForCapacityReservationResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetGroupsForCapacityReservationResponse' :: GetGroupsForCapacityReservationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetGroupsForCapacityReservationResponse
s@GetGroupsForCapacityReservationResponse' {} Int
a -> GetGroupsForCapacityReservationResponse
s {$sel:httpStatus:GetGroupsForCapacityReservationResponse' :: Int
httpStatus = Int
a} :: GetGroupsForCapacityReservationResponse)
instance
Prelude.NFData
GetGroupsForCapacityReservationResponse
where
rnf :: GetGroupsForCapacityReservationResponse -> ()
rnf GetGroupsForCapacityReservationResponse' {Int
Maybe [CapacityReservationGroup]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
capacityReservationGroups :: Maybe [CapacityReservationGroup]
$sel:httpStatus:GetGroupsForCapacityReservationResponse' :: GetGroupsForCapacityReservationResponse -> Int
$sel:nextToken:GetGroupsForCapacityReservationResponse' :: GetGroupsForCapacityReservationResponse -> Maybe Text
$sel:capacityReservationGroups:GetGroupsForCapacityReservationResponse' :: GetGroupsForCapacityReservationResponse
-> Maybe [CapacityReservationGroup]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [CapacityReservationGroup]
capacityReservationGroups
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