{-# 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.CreateActivation
(
CreateActivation (..),
newCreateActivation,
createActivation_defaultInstanceName,
createActivation_registrationLimit,
createActivation_expirationDate,
createActivation_description,
createActivation_tags,
createActivation_iamRole,
CreateActivationResponse (..),
newCreateActivationResponse,
createActivationResponse_activationId,
createActivationResponse_activationCode,
createActivationResponse_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 CreateActivation = CreateActivation'
{
CreateActivation -> Maybe Text
defaultInstanceName :: Prelude.Maybe Prelude.Text,
CreateActivation -> Maybe Natural
registrationLimit :: Prelude.Maybe Prelude.Natural,
CreateActivation -> Maybe POSIX
expirationDate :: Prelude.Maybe Core.POSIX,
CreateActivation -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
CreateActivation -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
CreateActivation -> Text
iamRole :: Prelude.Text
}
deriving (CreateActivation -> CreateActivation -> Bool
(CreateActivation -> CreateActivation -> Bool)
-> (CreateActivation -> CreateActivation -> Bool)
-> Eq CreateActivation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateActivation -> CreateActivation -> Bool
$c/= :: CreateActivation -> CreateActivation -> Bool
== :: CreateActivation -> CreateActivation -> Bool
$c== :: CreateActivation -> CreateActivation -> Bool
Prelude.Eq, ReadPrec [CreateActivation]
ReadPrec CreateActivation
Int -> ReadS CreateActivation
ReadS [CreateActivation]
(Int -> ReadS CreateActivation)
-> ReadS [CreateActivation]
-> ReadPrec CreateActivation
-> ReadPrec [CreateActivation]
-> Read CreateActivation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateActivation]
$creadListPrec :: ReadPrec [CreateActivation]
readPrec :: ReadPrec CreateActivation
$creadPrec :: ReadPrec CreateActivation
readList :: ReadS [CreateActivation]
$creadList :: ReadS [CreateActivation]
readsPrec :: Int -> ReadS CreateActivation
$creadsPrec :: Int -> ReadS CreateActivation
Prelude.Read, Int -> CreateActivation -> ShowS
[CreateActivation] -> ShowS
CreateActivation -> String
(Int -> CreateActivation -> ShowS)
-> (CreateActivation -> String)
-> ([CreateActivation] -> ShowS)
-> Show CreateActivation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateActivation] -> ShowS
$cshowList :: [CreateActivation] -> ShowS
show :: CreateActivation -> String
$cshow :: CreateActivation -> String
showsPrec :: Int -> CreateActivation -> ShowS
$cshowsPrec :: Int -> CreateActivation -> ShowS
Prelude.Show, (forall x. CreateActivation -> Rep CreateActivation x)
-> (forall x. Rep CreateActivation x -> CreateActivation)
-> Generic CreateActivation
forall x. Rep CreateActivation x -> CreateActivation
forall x. CreateActivation -> Rep CreateActivation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateActivation x -> CreateActivation
$cfrom :: forall x. CreateActivation -> Rep CreateActivation x
Prelude.Generic)
newCreateActivation ::
Prelude.Text ->
CreateActivation
newCreateActivation :: Text -> CreateActivation
newCreateActivation Text
pIamRole_ =
CreateActivation' :: Maybe Text
-> Maybe Natural
-> Maybe POSIX
-> Maybe Text
-> Maybe [Tag]
-> Text
-> CreateActivation
CreateActivation'
{ $sel:defaultInstanceName:CreateActivation' :: Maybe Text
defaultInstanceName =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:registrationLimit:CreateActivation' :: Maybe Natural
registrationLimit = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:expirationDate:CreateActivation' :: Maybe POSIX
expirationDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:description:CreateActivation' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateActivation' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:iamRole:CreateActivation' :: Text
iamRole = Text
pIamRole_
}
createActivation_defaultInstanceName :: Lens.Lens' CreateActivation (Prelude.Maybe Prelude.Text)
createActivation_defaultInstanceName :: (Maybe Text -> f (Maybe Text))
-> CreateActivation -> f CreateActivation
createActivation_defaultInstanceName = (CreateActivation -> Maybe Text)
-> (CreateActivation -> Maybe Text -> CreateActivation)
-> Lens CreateActivation CreateActivation (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateActivation' {Maybe Text
defaultInstanceName :: Maybe Text
$sel:defaultInstanceName:CreateActivation' :: CreateActivation -> Maybe Text
defaultInstanceName} -> Maybe Text
defaultInstanceName) (\s :: CreateActivation
s@CreateActivation' {} Maybe Text
a -> CreateActivation
s {$sel:defaultInstanceName:CreateActivation' :: Maybe Text
defaultInstanceName = Maybe Text
a} :: CreateActivation)
createActivation_registrationLimit :: Lens.Lens' CreateActivation (Prelude.Maybe Prelude.Natural)
createActivation_registrationLimit :: (Maybe Natural -> f (Maybe Natural))
-> CreateActivation -> f CreateActivation
createActivation_registrationLimit = (CreateActivation -> Maybe Natural)
-> (CreateActivation -> Maybe Natural -> CreateActivation)
-> Lens
CreateActivation CreateActivation (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateActivation' {Maybe Natural
registrationLimit :: Maybe Natural
$sel:registrationLimit:CreateActivation' :: CreateActivation -> Maybe Natural
registrationLimit} -> Maybe Natural
registrationLimit) (\s :: CreateActivation
s@CreateActivation' {} Maybe Natural
a -> CreateActivation
s {$sel:registrationLimit:CreateActivation' :: Maybe Natural
registrationLimit = Maybe Natural
a} :: CreateActivation)
createActivation_expirationDate :: Lens.Lens' CreateActivation (Prelude.Maybe Prelude.UTCTime)
createActivation_expirationDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateActivation -> f CreateActivation
createActivation_expirationDate = (CreateActivation -> Maybe POSIX)
-> (CreateActivation -> Maybe POSIX -> CreateActivation)
-> Lens
CreateActivation CreateActivation (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateActivation' {Maybe POSIX
expirationDate :: Maybe POSIX
$sel:expirationDate:CreateActivation' :: CreateActivation -> Maybe POSIX
expirationDate} -> Maybe POSIX
expirationDate) (\s :: CreateActivation
s@CreateActivation' {} Maybe POSIX
a -> CreateActivation
s {$sel:expirationDate:CreateActivation' :: Maybe POSIX
expirationDate = Maybe POSIX
a} :: CreateActivation) ((Maybe POSIX -> f (Maybe POSIX))
-> CreateActivation -> f CreateActivation)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateActivation
-> f CreateActivation
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
createActivation_description :: Lens.Lens' CreateActivation (Prelude.Maybe Prelude.Text)
createActivation_description :: (Maybe Text -> f (Maybe Text))
-> CreateActivation -> f CreateActivation
createActivation_description = (CreateActivation -> Maybe Text)
-> (CreateActivation -> Maybe Text -> CreateActivation)
-> Lens CreateActivation CreateActivation (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateActivation' {Maybe Text
description :: Maybe Text
$sel:description:CreateActivation' :: CreateActivation -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateActivation
s@CreateActivation' {} Maybe Text
a -> CreateActivation
s {$sel:description:CreateActivation' :: Maybe Text
description = Maybe Text
a} :: CreateActivation)
createActivation_tags :: Lens.Lens' CreateActivation (Prelude.Maybe [Tag])
createActivation_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateActivation -> f CreateActivation
createActivation_tags = (CreateActivation -> Maybe [Tag])
-> (CreateActivation -> Maybe [Tag] -> CreateActivation)
-> Lens
CreateActivation CreateActivation (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateActivation' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateActivation' :: CreateActivation -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateActivation
s@CreateActivation' {} Maybe [Tag]
a -> CreateActivation
s {$sel:tags:CreateActivation' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateActivation) ((Maybe [Tag] -> f (Maybe [Tag]))
-> CreateActivation -> f CreateActivation)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateActivation
-> f CreateActivation
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createActivation_iamRole :: Lens.Lens' CreateActivation Prelude.Text
createActivation_iamRole :: (Text -> f Text) -> CreateActivation -> f CreateActivation
createActivation_iamRole = (CreateActivation -> Text)
-> (CreateActivation -> Text -> CreateActivation)
-> Lens CreateActivation CreateActivation Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateActivation' {Text
iamRole :: Text
$sel:iamRole:CreateActivation' :: CreateActivation -> Text
iamRole} -> Text
iamRole) (\s :: CreateActivation
s@CreateActivation' {} Text
a -> CreateActivation
s {$sel:iamRole:CreateActivation' :: Text
iamRole = Text
a} :: CreateActivation)
instance Core.AWSRequest CreateActivation where
type
AWSResponse CreateActivation =
CreateActivationResponse
request :: CreateActivation -> Request CreateActivation
request = Service -> CreateActivation -> Request CreateActivation
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateActivation
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateActivation)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateActivation))
-> Logger
-> Service
-> Proxy CreateActivation
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateActivation)))
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 -> Int -> CreateActivationResponse
CreateActivationResponse'
(Maybe Text -> Maybe Text -> Int -> CreateActivationResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> CreateActivationResponse)
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
"ActivationId")
Either String (Maybe Text -> Int -> CreateActivationResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateActivationResponse)
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
"ActivationCode")
Either String (Int -> CreateActivationResponse)
-> Either String Int -> Either String CreateActivationResponse
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 CreateActivation
instance Prelude.NFData CreateActivation
instance Core.ToHeaders CreateActivation where
toHeaders :: CreateActivation -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateActivation -> 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.CreateActivation" :: 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 CreateActivation where
toJSON :: CreateActivation -> Value
toJSON CreateActivation' {Maybe Natural
Maybe [Tag]
Maybe Text
Maybe POSIX
Text
iamRole :: Text
tags :: Maybe [Tag]
description :: Maybe Text
expirationDate :: Maybe POSIX
registrationLimit :: Maybe Natural
defaultInstanceName :: Maybe Text
$sel:iamRole:CreateActivation' :: CreateActivation -> Text
$sel:tags:CreateActivation' :: CreateActivation -> Maybe [Tag]
$sel:description:CreateActivation' :: CreateActivation -> Maybe Text
$sel:expirationDate:CreateActivation' :: CreateActivation -> Maybe POSIX
$sel:registrationLimit:CreateActivation' :: CreateActivation -> Maybe Natural
$sel:defaultInstanceName:CreateActivation' :: CreateActivation -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"DefaultInstanceName" 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
defaultInstanceName,
(Text
"RegistrationLimit" 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
registrationLimit,
(Text
"ExpirationDate" Text -> POSIX -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(POSIX -> Pair) -> Maybe POSIX -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
expirationDate,
(Text
"Description" 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
description,
(Text
"Tags" Text -> [Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Tag] -> Pair) -> Maybe [Tag] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"IamRole" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
iamRole)
]
)
instance Core.ToPath CreateActivation where
toPath :: CreateActivation -> ByteString
toPath = ByteString -> CreateActivation -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreateActivation where
toQuery :: CreateActivation -> QueryString
toQuery = QueryString -> CreateActivation -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateActivationResponse = CreateActivationResponse'
{
CreateActivationResponse -> Maybe Text
activationId :: Prelude.Maybe Prelude.Text,
CreateActivationResponse -> Maybe Text
activationCode :: Prelude.Maybe Prelude.Text,
CreateActivationResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateActivationResponse -> CreateActivationResponse -> Bool
(CreateActivationResponse -> CreateActivationResponse -> Bool)
-> (CreateActivationResponse -> CreateActivationResponse -> Bool)
-> Eq CreateActivationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateActivationResponse -> CreateActivationResponse -> Bool
$c/= :: CreateActivationResponse -> CreateActivationResponse -> Bool
== :: CreateActivationResponse -> CreateActivationResponse -> Bool
$c== :: CreateActivationResponse -> CreateActivationResponse -> Bool
Prelude.Eq, ReadPrec [CreateActivationResponse]
ReadPrec CreateActivationResponse
Int -> ReadS CreateActivationResponse
ReadS [CreateActivationResponse]
(Int -> ReadS CreateActivationResponse)
-> ReadS [CreateActivationResponse]
-> ReadPrec CreateActivationResponse
-> ReadPrec [CreateActivationResponse]
-> Read CreateActivationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateActivationResponse]
$creadListPrec :: ReadPrec [CreateActivationResponse]
readPrec :: ReadPrec CreateActivationResponse
$creadPrec :: ReadPrec CreateActivationResponse
readList :: ReadS [CreateActivationResponse]
$creadList :: ReadS [CreateActivationResponse]
readsPrec :: Int -> ReadS CreateActivationResponse
$creadsPrec :: Int -> ReadS CreateActivationResponse
Prelude.Read, Int -> CreateActivationResponse -> ShowS
[CreateActivationResponse] -> ShowS
CreateActivationResponse -> String
(Int -> CreateActivationResponse -> ShowS)
-> (CreateActivationResponse -> String)
-> ([CreateActivationResponse] -> ShowS)
-> Show CreateActivationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateActivationResponse] -> ShowS
$cshowList :: [CreateActivationResponse] -> ShowS
show :: CreateActivationResponse -> String
$cshow :: CreateActivationResponse -> String
showsPrec :: Int -> CreateActivationResponse -> ShowS
$cshowsPrec :: Int -> CreateActivationResponse -> ShowS
Prelude.Show, (forall x.
CreateActivationResponse -> Rep CreateActivationResponse x)
-> (forall x.
Rep CreateActivationResponse x -> CreateActivationResponse)
-> Generic CreateActivationResponse
forall x.
Rep CreateActivationResponse x -> CreateActivationResponse
forall x.
CreateActivationResponse -> Rep CreateActivationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateActivationResponse x -> CreateActivationResponse
$cfrom :: forall x.
CreateActivationResponse -> Rep CreateActivationResponse x
Prelude.Generic)
newCreateActivationResponse ::
Prelude.Int ->
CreateActivationResponse
newCreateActivationResponse :: Int -> CreateActivationResponse
newCreateActivationResponse Int
pHttpStatus_ =
CreateActivationResponse' :: Maybe Text -> Maybe Text -> Int -> CreateActivationResponse
CreateActivationResponse'
{ $sel:activationId:CreateActivationResponse' :: Maybe Text
activationId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:activationCode:CreateActivationResponse' :: Maybe Text
activationCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateActivationResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createActivationResponse_activationId :: Lens.Lens' CreateActivationResponse (Prelude.Maybe Prelude.Text)
createActivationResponse_activationId :: (Maybe Text -> f (Maybe Text))
-> CreateActivationResponse -> f CreateActivationResponse
createActivationResponse_activationId = (CreateActivationResponse -> Maybe Text)
-> (CreateActivationResponse
-> Maybe Text -> CreateActivationResponse)
-> Lens
CreateActivationResponse
CreateActivationResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateActivationResponse' {Maybe Text
activationId :: Maybe Text
$sel:activationId:CreateActivationResponse' :: CreateActivationResponse -> Maybe Text
activationId} -> Maybe Text
activationId) (\s :: CreateActivationResponse
s@CreateActivationResponse' {} Maybe Text
a -> CreateActivationResponse
s {$sel:activationId:CreateActivationResponse' :: Maybe Text
activationId = Maybe Text
a} :: CreateActivationResponse)
createActivationResponse_activationCode :: Lens.Lens' CreateActivationResponse (Prelude.Maybe Prelude.Text)
createActivationResponse_activationCode :: (Maybe Text -> f (Maybe Text))
-> CreateActivationResponse -> f CreateActivationResponse
createActivationResponse_activationCode = (CreateActivationResponse -> Maybe Text)
-> (CreateActivationResponse
-> Maybe Text -> CreateActivationResponse)
-> Lens
CreateActivationResponse
CreateActivationResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateActivationResponse' {Maybe Text
activationCode :: Maybe Text
$sel:activationCode:CreateActivationResponse' :: CreateActivationResponse -> Maybe Text
activationCode} -> Maybe Text
activationCode) (\s :: CreateActivationResponse
s@CreateActivationResponse' {} Maybe Text
a -> CreateActivationResponse
s {$sel:activationCode:CreateActivationResponse' :: Maybe Text
activationCode = Maybe Text
a} :: CreateActivationResponse)
createActivationResponse_httpStatus :: Lens.Lens' CreateActivationResponse Prelude.Int
createActivationResponse_httpStatus :: (Int -> f Int)
-> CreateActivationResponse -> f CreateActivationResponse
createActivationResponse_httpStatus = (CreateActivationResponse -> Int)
-> (CreateActivationResponse -> Int -> CreateActivationResponse)
-> Lens CreateActivationResponse CreateActivationResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateActivationResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateActivationResponse' :: CreateActivationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateActivationResponse
s@CreateActivationResponse' {} Int
a -> CreateActivationResponse
s {$sel:httpStatus:CreateActivationResponse' :: Int
httpStatus = Int
a} :: CreateActivationResponse)
instance Prelude.NFData CreateActivationResponse