{-# 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.SSM.DescribeActivations
(
DescribeActivations (..),
newDescribeActivations,
describeActivations_filters,
describeActivations_nextToken,
describeActivations_maxResults,
DescribeActivationsResponse (..),
newDescribeActivationsResponse,
describeActivationsResponse_activationList,
describeActivationsResponse_nextToken,
describeActivationsResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SSM.Types
data DescribeActivations = DescribeActivations'
{
DescribeActivations -> Maybe [DescribeActivationsFilter]
filters :: Prelude.Maybe [DescribeActivationsFilter],
DescribeActivations -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeActivations -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
}
deriving (DescribeActivations -> DescribeActivations -> Bool
(DescribeActivations -> DescribeActivations -> Bool)
-> (DescribeActivations -> DescribeActivations -> Bool)
-> Eq DescribeActivations
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeActivations -> DescribeActivations -> Bool
$c/= :: DescribeActivations -> DescribeActivations -> Bool
== :: DescribeActivations -> DescribeActivations -> Bool
$c== :: DescribeActivations -> DescribeActivations -> Bool
Prelude.Eq, ReadPrec [DescribeActivations]
ReadPrec DescribeActivations
Int -> ReadS DescribeActivations
ReadS [DescribeActivations]
(Int -> ReadS DescribeActivations)
-> ReadS [DescribeActivations]
-> ReadPrec DescribeActivations
-> ReadPrec [DescribeActivations]
-> Read DescribeActivations
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeActivations]
$creadListPrec :: ReadPrec [DescribeActivations]
readPrec :: ReadPrec DescribeActivations
$creadPrec :: ReadPrec DescribeActivations
readList :: ReadS [DescribeActivations]
$creadList :: ReadS [DescribeActivations]
readsPrec :: Int -> ReadS DescribeActivations
$creadsPrec :: Int -> ReadS DescribeActivations
Prelude.Read, Int -> DescribeActivations -> ShowS
[DescribeActivations] -> ShowS
DescribeActivations -> String
(Int -> DescribeActivations -> ShowS)
-> (DescribeActivations -> String)
-> ([DescribeActivations] -> ShowS)
-> Show DescribeActivations
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeActivations] -> ShowS
$cshowList :: [DescribeActivations] -> ShowS
show :: DescribeActivations -> String
$cshow :: DescribeActivations -> String
showsPrec :: Int -> DescribeActivations -> ShowS
$cshowsPrec :: Int -> DescribeActivations -> ShowS
Prelude.Show, (forall x. DescribeActivations -> Rep DescribeActivations x)
-> (forall x. Rep DescribeActivations x -> DescribeActivations)
-> Generic DescribeActivations
forall x. Rep DescribeActivations x -> DescribeActivations
forall x. DescribeActivations -> Rep DescribeActivations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeActivations x -> DescribeActivations
$cfrom :: forall x. DescribeActivations -> Rep DescribeActivations x
Prelude.Generic)
newDescribeActivations ::
DescribeActivations
newDescribeActivations :: DescribeActivations
newDescribeActivations =
DescribeActivations' :: Maybe [DescribeActivationsFilter]
-> Maybe Text -> Maybe Natural -> DescribeActivations
DescribeActivations'
{ $sel:filters:DescribeActivations' :: Maybe [DescribeActivationsFilter]
filters = Maybe [DescribeActivationsFilter]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeActivations' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:DescribeActivations' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
}
describeActivations_filters :: Lens.Lens' DescribeActivations (Prelude.Maybe [DescribeActivationsFilter])
describeActivations_filters :: (Maybe [DescribeActivationsFilter]
-> f (Maybe [DescribeActivationsFilter]))
-> DescribeActivations -> f DescribeActivations
describeActivations_filters = (DescribeActivations -> Maybe [DescribeActivationsFilter])
-> (DescribeActivations
-> Maybe [DescribeActivationsFilter] -> DescribeActivations)
-> Lens
DescribeActivations
DescribeActivations
(Maybe [DescribeActivationsFilter])
(Maybe [DescribeActivationsFilter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeActivations' {Maybe [DescribeActivationsFilter]
filters :: Maybe [DescribeActivationsFilter]
$sel:filters:DescribeActivations' :: DescribeActivations -> Maybe [DescribeActivationsFilter]
filters} -> Maybe [DescribeActivationsFilter]
filters) (\s :: DescribeActivations
s@DescribeActivations' {} Maybe [DescribeActivationsFilter]
a -> DescribeActivations
s {$sel:filters:DescribeActivations' :: Maybe [DescribeActivationsFilter]
filters = Maybe [DescribeActivationsFilter]
a} :: DescribeActivations) ((Maybe [DescribeActivationsFilter]
-> f (Maybe [DescribeActivationsFilter]))
-> DescribeActivations -> f DescribeActivations)
-> ((Maybe [DescribeActivationsFilter]
-> f (Maybe [DescribeActivationsFilter]))
-> Maybe [DescribeActivationsFilter]
-> f (Maybe [DescribeActivationsFilter]))
-> (Maybe [DescribeActivationsFilter]
-> f (Maybe [DescribeActivationsFilter]))
-> DescribeActivations
-> f DescribeActivations
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[DescribeActivationsFilter]
[DescribeActivationsFilter]
[DescribeActivationsFilter]
[DescribeActivationsFilter]
-> Iso
(Maybe [DescribeActivationsFilter])
(Maybe [DescribeActivationsFilter])
(Maybe [DescribeActivationsFilter])
(Maybe [DescribeActivationsFilter])
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
[DescribeActivationsFilter]
[DescribeActivationsFilter]
[DescribeActivationsFilter]
[DescribeActivationsFilter]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeActivations_nextToken :: Lens.Lens' DescribeActivations (Prelude.Maybe Prelude.Text)
describeActivations_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeActivations -> f DescribeActivations
describeActivations_nextToken = (DescribeActivations -> Maybe Text)
-> (DescribeActivations -> Maybe Text -> DescribeActivations)
-> Lens
DescribeActivations DescribeActivations (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeActivations' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeActivations' :: DescribeActivations -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeActivations
s@DescribeActivations' {} Maybe Text
a -> DescribeActivations
s {$sel:nextToken:DescribeActivations' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeActivations)
describeActivations_maxResults :: Lens.Lens' DescribeActivations (Prelude.Maybe Prelude.Natural)
describeActivations_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> DescribeActivations -> f DescribeActivations
describeActivations_maxResults = (DescribeActivations -> Maybe Natural)
-> (DescribeActivations -> Maybe Natural -> DescribeActivations)
-> Lens
DescribeActivations
DescribeActivations
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeActivations' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:DescribeActivations' :: DescribeActivations -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: DescribeActivations
s@DescribeActivations' {} Maybe Natural
a -> DescribeActivations
s {$sel:maxResults:DescribeActivations' :: Maybe Natural
maxResults = Maybe Natural
a} :: DescribeActivations)
instance Core.AWSPager DescribeActivations where
page :: DescribeActivations
-> AWSResponse DescribeActivations -> Maybe DescribeActivations
page DescribeActivations
rq AWSResponse DescribeActivations
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeActivations
DescribeActivationsResponse
rs
DescribeActivationsResponse
-> Getting (First Text) DescribeActivationsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeActivationsResponse
-> Const (First Text) DescribeActivationsResponse
Lens' DescribeActivationsResponse (Maybe Text)
describeActivationsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeActivationsResponse
-> Const (First Text) DescribeActivationsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeActivationsResponse 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 DescribeActivations
forall a. Maybe a
Prelude.Nothing
| Maybe [Activation] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse DescribeActivations
DescribeActivationsResponse
rs
DescribeActivationsResponse
-> Getting
(First [Activation]) DescribeActivationsResponse [Activation]
-> Maybe [Activation]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [Activation]
-> Const (First [Activation]) (Maybe [Activation]))
-> DescribeActivationsResponse
-> Const (First [Activation]) DescribeActivationsResponse
Lens' DescribeActivationsResponse (Maybe [Activation])
describeActivationsResponse_activationList
((Maybe [Activation]
-> Const (First [Activation]) (Maybe [Activation]))
-> DescribeActivationsResponse
-> Const (First [Activation]) DescribeActivationsResponse)
-> (([Activation] -> Const (First [Activation]) [Activation])
-> Maybe [Activation]
-> Const (First [Activation]) (Maybe [Activation]))
-> Getting
(First [Activation]) DescribeActivationsResponse [Activation]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Activation] -> Const (First [Activation]) [Activation])
-> Maybe [Activation]
-> Const (First [Activation]) (Maybe [Activation])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe DescribeActivations
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
DescribeActivations -> Maybe DescribeActivations
forall a. a -> Maybe a
Prelude.Just (DescribeActivations -> Maybe DescribeActivations)
-> DescribeActivations -> Maybe DescribeActivations
forall a b. (a -> b) -> a -> b
Prelude.$
DescribeActivations
rq
DescribeActivations
-> (DescribeActivations -> DescribeActivations)
-> DescribeActivations
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeActivations -> Identity DescribeActivations
Lens
DescribeActivations DescribeActivations (Maybe Text) (Maybe Text)
describeActivations_nextToken
((Maybe Text -> Identity (Maybe Text))
-> DescribeActivations -> Identity DescribeActivations)
-> Maybe Text -> DescribeActivations -> DescribeActivations
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeActivations
DescribeActivationsResponse
rs
DescribeActivationsResponse
-> Getting (First Text) DescribeActivationsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeActivationsResponse
-> Const (First Text) DescribeActivationsResponse
Lens' DescribeActivationsResponse (Maybe Text)
describeActivationsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeActivationsResponse
-> Const (First Text) DescribeActivationsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeActivationsResponse 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 DescribeActivations where
type
AWSResponse DescribeActivations =
DescribeActivationsResponse
request :: DescribeActivations -> Request DescribeActivations
request = Service -> DescribeActivations -> Request DescribeActivations
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeActivations
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeActivations)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DescribeActivations))
-> Logger
-> Service
-> Proxy DescribeActivations
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeActivations)))
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 [Activation]
-> Maybe Text -> Int -> DescribeActivationsResponse
DescribeActivationsResponse'
(Maybe [Activation]
-> Maybe Text -> Int -> DescribeActivationsResponse)
-> Either String (Maybe [Activation])
-> Either String (Maybe Text -> Int -> DescribeActivationsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [Activation]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ActivationList" Either String (Maybe (Maybe [Activation]))
-> Maybe [Activation] -> Either String (Maybe [Activation])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Activation]
forall a. Monoid a => a
Prelude.mempty)
Either String (Maybe Text -> Int -> DescribeActivationsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeActivationsResponse)
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 -> DescribeActivationsResponse)
-> Either String Int -> Either String DescribeActivationsResponse
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 DescribeActivations
instance Prelude.NFData DescribeActivations
instance Core.ToHeaders DescribeActivations where
toHeaders :: DescribeActivations -> ResponseHeaders
toHeaders =
ResponseHeaders -> DescribeActivations -> 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
"AmazonSSM.DescribeActivations" ::
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 DescribeActivations where
toJSON :: DescribeActivations -> Value
toJSON DescribeActivations' {Maybe Natural
Maybe [DescribeActivationsFilter]
Maybe Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
filters :: Maybe [DescribeActivationsFilter]
$sel:maxResults:DescribeActivations' :: DescribeActivations -> Maybe Natural
$sel:nextToken:DescribeActivations' :: DescribeActivations -> Maybe Text
$sel:filters:DescribeActivations' :: DescribeActivations -> Maybe [DescribeActivationsFilter]
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"Filters" Text -> [DescribeActivationsFilter] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([DescribeActivationsFilter] -> Pair)
-> Maybe [DescribeActivationsFilter] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [DescribeActivationsFilter]
filters,
(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
]
)
instance Core.ToPath DescribeActivations where
toPath :: DescribeActivations -> ByteString
toPath = ByteString -> DescribeActivations -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DescribeActivations where
toQuery :: DescribeActivations -> QueryString
toQuery = QueryString -> DescribeActivations -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DescribeActivationsResponse = DescribeActivationsResponse'
{
DescribeActivationsResponse -> Maybe [Activation]
activationList :: Prelude.Maybe [Activation],
DescribeActivationsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeActivationsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeActivationsResponse -> DescribeActivationsResponse -> Bool
(DescribeActivationsResponse
-> DescribeActivationsResponse -> Bool)
-> (DescribeActivationsResponse
-> DescribeActivationsResponse -> Bool)
-> Eq DescribeActivationsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeActivationsResponse -> DescribeActivationsResponse -> Bool
$c/= :: DescribeActivationsResponse -> DescribeActivationsResponse -> Bool
== :: DescribeActivationsResponse -> DescribeActivationsResponse -> Bool
$c== :: DescribeActivationsResponse -> DescribeActivationsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeActivationsResponse]
ReadPrec DescribeActivationsResponse
Int -> ReadS DescribeActivationsResponse
ReadS [DescribeActivationsResponse]
(Int -> ReadS DescribeActivationsResponse)
-> ReadS [DescribeActivationsResponse]
-> ReadPrec DescribeActivationsResponse
-> ReadPrec [DescribeActivationsResponse]
-> Read DescribeActivationsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeActivationsResponse]
$creadListPrec :: ReadPrec [DescribeActivationsResponse]
readPrec :: ReadPrec DescribeActivationsResponse
$creadPrec :: ReadPrec DescribeActivationsResponse
readList :: ReadS [DescribeActivationsResponse]
$creadList :: ReadS [DescribeActivationsResponse]
readsPrec :: Int -> ReadS DescribeActivationsResponse
$creadsPrec :: Int -> ReadS DescribeActivationsResponse
Prelude.Read, Int -> DescribeActivationsResponse -> ShowS
[DescribeActivationsResponse] -> ShowS
DescribeActivationsResponse -> String
(Int -> DescribeActivationsResponse -> ShowS)
-> (DescribeActivationsResponse -> String)
-> ([DescribeActivationsResponse] -> ShowS)
-> Show DescribeActivationsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeActivationsResponse] -> ShowS
$cshowList :: [DescribeActivationsResponse] -> ShowS
show :: DescribeActivationsResponse -> String
$cshow :: DescribeActivationsResponse -> String
showsPrec :: Int -> DescribeActivationsResponse -> ShowS
$cshowsPrec :: Int -> DescribeActivationsResponse -> ShowS
Prelude.Show, (forall x.
DescribeActivationsResponse -> Rep DescribeActivationsResponse x)
-> (forall x.
Rep DescribeActivationsResponse x -> DescribeActivationsResponse)
-> Generic DescribeActivationsResponse
forall x.
Rep DescribeActivationsResponse x -> DescribeActivationsResponse
forall x.
DescribeActivationsResponse -> Rep DescribeActivationsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeActivationsResponse x -> DescribeActivationsResponse
$cfrom :: forall x.
DescribeActivationsResponse -> Rep DescribeActivationsResponse x
Prelude.Generic)
newDescribeActivationsResponse ::
Prelude.Int ->
DescribeActivationsResponse
newDescribeActivationsResponse :: Int -> DescribeActivationsResponse
newDescribeActivationsResponse Int
pHttpStatus_ =
DescribeActivationsResponse' :: Maybe [Activation]
-> Maybe Text -> Int -> DescribeActivationsResponse
DescribeActivationsResponse'
{ $sel:activationList:DescribeActivationsResponse' :: Maybe [Activation]
activationList =
Maybe [Activation]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeActivationsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeActivationsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeActivationsResponse_activationList :: Lens.Lens' DescribeActivationsResponse (Prelude.Maybe [Activation])
describeActivationsResponse_activationList :: (Maybe [Activation] -> f (Maybe [Activation]))
-> DescribeActivationsResponse -> f DescribeActivationsResponse
describeActivationsResponse_activationList = (DescribeActivationsResponse -> Maybe [Activation])
-> (DescribeActivationsResponse
-> Maybe [Activation] -> DescribeActivationsResponse)
-> Lens' DescribeActivationsResponse (Maybe [Activation])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeActivationsResponse' {Maybe [Activation]
activationList :: Maybe [Activation]
$sel:activationList:DescribeActivationsResponse' :: DescribeActivationsResponse -> Maybe [Activation]
activationList} -> Maybe [Activation]
activationList) (\s :: DescribeActivationsResponse
s@DescribeActivationsResponse' {} Maybe [Activation]
a -> DescribeActivationsResponse
s {$sel:activationList:DescribeActivationsResponse' :: Maybe [Activation]
activationList = Maybe [Activation]
a} :: DescribeActivationsResponse) ((Maybe [Activation] -> f (Maybe [Activation]))
-> DescribeActivationsResponse -> f DescribeActivationsResponse)
-> ((Maybe [Activation] -> f (Maybe [Activation]))
-> Maybe [Activation] -> f (Maybe [Activation]))
-> (Maybe [Activation] -> f (Maybe [Activation]))
-> DescribeActivationsResponse
-> f DescribeActivationsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Activation] [Activation] [Activation] [Activation]
-> Iso
(Maybe [Activation])
(Maybe [Activation])
(Maybe [Activation])
(Maybe [Activation])
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 [Activation] [Activation] [Activation] [Activation]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
describeActivationsResponse_nextToken :: Lens.Lens' DescribeActivationsResponse (Prelude.Maybe Prelude.Text)
describeActivationsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeActivationsResponse -> f DescribeActivationsResponse
describeActivationsResponse_nextToken = (DescribeActivationsResponse -> Maybe Text)
-> (DescribeActivationsResponse
-> Maybe Text -> DescribeActivationsResponse)
-> Lens' DescribeActivationsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeActivationsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeActivationsResponse' :: DescribeActivationsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeActivationsResponse
s@DescribeActivationsResponse' {} Maybe Text
a -> DescribeActivationsResponse
s {$sel:nextToken:DescribeActivationsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeActivationsResponse)
describeActivationsResponse_httpStatus :: Lens.Lens' DescribeActivationsResponse Prelude.Int
describeActivationsResponse_httpStatus :: (Int -> f Int)
-> DescribeActivationsResponse -> f DescribeActivationsResponse
describeActivationsResponse_httpStatus = (DescribeActivationsResponse -> Int)
-> (DescribeActivationsResponse
-> Int -> DescribeActivationsResponse)
-> Lens
DescribeActivationsResponse DescribeActivationsResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeActivationsResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeActivationsResponse' :: DescribeActivationsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeActivationsResponse
s@DescribeActivationsResponse' {} Int
a -> DescribeActivationsResponse
s {$sel:httpStatus:DescribeActivationsResponse' :: Int
httpStatus = Int
a} :: DescribeActivationsResponse)
instance Prelude.NFData DescribeActivationsResponse