{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.SSM.Types.Activation
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.SSM.Types.Activation where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SSM.Types.Tag

-- | An activation registers one or more on-premises servers or virtual
-- machines (VMs) with Amazon Web Services so that you can configure those
-- servers or VMs using Run Command. A server or VM that has been
-- registered with Amazon Web Services Systems Manager is called a managed
-- instance.
--
-- /See:/ 'newActivation' smart constructor.
data Activation = Activation'
  { -- | Whether or not the activation is expired.
    Activation -> Maybe Bool
expired :: Prelude.Maybe Prelude.Bool,
    -- | A name for the managed instance when it is created.
    Activation -> Maybe Text
defaultInstanceName :: Prelude.Maybe Prelude.Text,
    -- | The ID created by Systems Manager when you submitted the activation.
    Activation -> Maybe Text
activationId :: Prelude.Maybe Prelude.Text,
    -- | The date the activation was created.
    Activation -> Maybe POSIX
createdDate :: Prelude.Maybe Core.POSIX,
    -- | The maximum number of managed instances that can be registered using
    -- this activation.
    Activation -> Maybe Natural
registrationLimit :: Prelude.Maybe Prelude.Natural,
    -- | The date when this activation can no longer be used to register managed
    -- instances.
    Activation -> Maybe POSIX
expirationDate :: Prelude.Maybe Core.POSIX,
    -- | A user defined description of the activation.
    Activation -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | Tags assigned to the activation.
    Activation -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The number of managed instances already registered with this activation.
    Activation -> Maybe Natural
registrationsCount :: Prelude.Maybe Prelude.Natural,
    -- | The Identity and Access Management (IAM) role to assign to the managed
    -- instance.
    Activation -> Maybe Text
iamRole :: Prelude.Maybe Prelude.Text
  }
  deriving (Activation -> Activation -> Bool
(Activation -> Activation -> Bool)
-> (Activation -> Activation -> Bool) -> Eq Activation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Activation -> Activation -> Bool
$c/= :: Activation -> Activation -> Bool
== :: Activation -> Activation -> Bool
$c== :: Activation -> Activation -> Bool
Prelude.Eq, ReadPrec [Activation]
ReadPrec Activation
Int -> ReadS Activation
ReadS [Activation]
(Int -> ReadS Activation)
-> ReadS [Activation]
-> ReadPrec Activation
-> ReadPrec [Activation]
-> Read Activation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Activation]
$creadListPrec :: ReadPrec [Activation]
readPrec :: ReadPrec Activation
$creadPrec :: ReadPrec Activation
readList :: ReadS [Activation]
$creadList :: ReadS [Activation]
readsPrec :: Int -> ReadS Activation
$creadsPrec :: Int -> ReadS Activation
Prelude.Read, Int -> Activation -> ShowS
[Activation] -> ShowS
Activation -> String
(Int -> Activation -> ShowS)
-> (Activation -> String)
-> ([Activation] -> ShowS)
-> Show Activation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Activation] -> ShowS
$cshowList :: [Activation] -> ShowS
show :: Activation -> String
$cshow :: Activation -> String
showsPrec :: Int -> Activation -> ShowS
$cshowsPrec :: Int -> Activation -> ShowS
Prelude.Show, (forall x. Activation -> Rep Activation x)
-> (forall x. Rep Activation x -> Activation) -> Generic Activation
forall x. Rep Activation x -> Activation
forall x. Activation -> Rep Activation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Activation x -> Activation
$cfrom :: forall x. Activation -> Rep Activation x
Prelude.Generic)

-- |
-- Create a value of 'Activation' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'expired', 'activation_expired' - Whether or not the activation is expired.
--
-- 'defaultInstanceName', 'activation_defaultInstanceName' - A name for the managed instance when it is created.
--
-- 'activationId', 'activation_activationId' - The ID created by Systems Manager when you submitted the activation.
--
-- 'createdDate', 'activation_createdDate' - The date the activation was created.
--
-- 'registrationLimit', 'activation_registrationLimit' - The maximum number of managed instances that can be registered using
-- this activation.
--
-- 'expirationDate', 'activation_expirationDate' - The date when this activation can no longer be used to register managed
-- instances.
--
-- 'description', 'activation_description' - A user defined description of the activation.
--
-- 'tags', 'activation_tags' - Tags assigned to the activation.
--
-- 'registrationsCount', 'activation_registrationsCount' - The number of managed instances already registered with this activation.
--
-- 'iamRole', 'activation_iamRole' - The Identity and Access Management (IAM) role to assign to the managed
-- instance.
newActivation ::
  Activation
newActivation :: Activation
newActivation =
  Activation' :: Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Natural
-> Maybe POSIX
-> Maybe Text
-> Maybe [Tag]
-> Maybe Natural
-> Maybe Text
-> Activation
Activation'
    { $sel:expired:Activation' :: Maybe Bool
expired = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:defaultInstanceName:Activation' :: Maybe Text
defaultInstanceName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:activationId:Activation' :: Maybe Text
activationId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdDate:Activation' :: Maybe POSIX
createdDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:registrationLimit:Activation' :: Maybe Natural
registrationLimit = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:expirationDate:Activation' :: Maybe POSIX
expirationDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:description:Activation' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:Activation' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
      $sel:registrationsCount:Activation' :: Maybe Natural
registrationsCount = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:iamRole:Activation' :: Maybe Text
iamRole = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | Whether or not the activation is expired.
activation_expired :: Lens.Lens' Activation (Prelude.Maybe Prelude.Bool)
activation_expired :: (Maybe Bool -> f (Maybe Bool)) -> Activation -> f Activation
activation_expired = (Activation -> Maybe Bool)
-> (Activation -> Maybe Bool -> Activation)
-> Lens Activation Activation (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Activation' {Maybe Bool
expired :: Maybe Bool
$sel:expired:Activation' :: Activation -> Maybe Bool
expired} -> Maybe Bool
expired) (\s :: Activation
s@Activation' {} Maybe Bool
a -> Activation
s {$sel:expired:Activation' :: Maybe Bool
expired = Maybe Bool
a} :: Activation)

-- | A name for the managed instance when it is created.
activation_defaultInstanceName :: Lens.Lens' Activation (Prelude.Maybe Prelude.Text)
activation_defaultInstanceName :: (Maybe Text -> f (Maybe Text)) -> Activation -> f Activation
activation_defaultInstanceName = (Activation -> Maybe Text)
-> (Activation -> Maybe Text -> Activation)
-> Lens Activation Activation (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Activation' {Maybe Text
defaultInstanceName :: Maybe Text
$sel:defaultInstanceName:Activation' :: Activation -> Maybe Text
defaultInstanceName} -> Maybe Text
defaultInstanceName) (\s :: Activation
s@Activation' {} Maybe Text
a -> Activation
s {$sel:defaultInstanceName:Activation' :: Maybe Text
defaultInstanceName = Maybe Text
a} :: Activation)

-- | The ID created by Systems Manager when you submitted the activation.
activation_activationId :: Lens.Lens' Activation (Prelude.Maybe Prelude.Text)
activation_activationId :: (Maybe Text -> f (Maybe Text)) -> Activation -> f Activation
activation_activationId = (Activation -> Maybe Text)
-> (Activation -> Maybe Text -> Activation)
-> Lens Activation Activation (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Activation' {Maybe Text
activationId :: Maybe Text
$sel:activationId:Activation' :: Activation -> Maybe Text
activationId} -> Maybe Text
activationId) (\s :: Activation
s@Activation' {} Maybe Text
a -> Activation
s {$sel:activationId:Activation' :: Maybe Text
activationId = Maybe Text
a} :: Activation)

-- | The date the activation was created.
activation_createdDate :: Lens.Lens' Activation (Prelude.Maybe Prelude.UTCTime)
activation_createdDate :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Activation -> f Activation
activation_createdDate = (Activation -> Maybe POSIX)
-> (Activation -> Maybe POSIX -> Activation)
-> Lens Activation Activation (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Activation' {Maybe POSIX
createdDate :: Maybe POSIX
$sel:createdDate:Activation' :: Activation -> Maybe POSIX
createdDate} -> Maybe POSIX
createdDate) (\s :: Activation
s@Activation' {} Maybe POSIX
a -> Activation
s {$sel:createdDate:Activation' :: Maybe POSIX
createdDate = Maybe POSIX
a} :: Activation) ((Maybe POSIX -> f (Maybe POSIX)) -> Activation -> f Activation)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Activation
-> f Activation
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

-- | The maximum number of managed instances that can be registered using
-- this activation.
activation_registrationLimit :: Lens.Lens' Activation (Prelude.Maybe Prelude.Natural)
activation_registrationLimit :: (Maybe Natural -> f (Maybe Natural)) -> Activation -> f Activation
activation_registrationLimit = (Activation -> Maybe Natural)
-> (Activation -> Maybe Natural -> Activation)
-> Lens Activation Activation (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Activation' {Maybe Natural
registrationLimit :: Maybe Natural
$sel:registrationLimit:Activation' :: Activation -> Maybe Natural
registrationLimit} -> Maybe Natural
registrationLimit) (\s :: Activation
s@Activation' {} Maybe Natural
a -> Activation
s {$sel:registrationLimit:Activation' :: Maybe Natural
registrationLimit = Maybe Natural
a} :: Activation)

-- | The date when this activation can no longer be used to register managed
-- instances.
activation_expirationDate :: Lens.Lens' Activation (Prelude.Maybe Prelude.UTCTime)
activation_expirationDate :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Activation -> f Activation
activation_expirationDate = (Activation -> Maybe POSIX)
-> (Activation -> Maybe POSIX -> Activation)
-> Lens Activation Activation (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Activation' {Maybe POSIX
expirationDate :: Maybe POSIX
$sel:expirationDate:Activation' :: Activation -> Maybe POSIX
expirationDate} -> Maybe POSIX
expirationDate) (\s :: Activation
s@Activation' {} Maybe POSIX
a -> Activation
s {$sel:expirationDate:Activation' :: Maybe POSIX
expirationDate = Maybe POSIX
a} :: Activation) ((Maybe POSIX -> f (Maybe POSIX)) -> Activation -> f Activation)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Activation
-> f Activation
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

-- | A user defined description of the activation.
activation_description :: Lens.Lens' Activation (Prelude.Maybe Prelude.Text)
activation_description :: (Maybe Text -> f (Maybe Text)) -> Activation -> f Activation
activation_description = (Activation -> Maybe Text)
-> (Activation -> Maybe Text -> Activation)
-> Lens Activation Activation (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Activation' {Maybe Text
description :: Maybe Text
$sel:description:Activation' :: Activation -> Maybe Text
description} -> Maybe Text
description) (\s :: Activation
s@Activation' {} Maybe Text
a -> Activation
s {$sel:description:Activation' :: Maybe Text
description = Maybe Text
a} :: Activation)

-- | Tags assigned to the activation.
activation_tags :: Lens.Lens' Activation (Prelude.Maybe [Tag])
activation_tags :: (Maybe [Tag] -> f (Maybe [Tag])) -> Activation -> f Activation
activation_tags = (Activation -> Maybe [Tag])
-> (Activation -> Maybe [Tag] -> Activation)
-> Lens Activation Activation (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Activation' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:Activation' :: Activation -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: Activation
s@Activation' {} Maybe [Tag]
a -> Activation
s {$sel:tags:Activation' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: Activation) ((Maybe [Tag] -> f (Maybe [Tag])) -> Activation -> f Activation)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> Activation
-> f Activation
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

-- | The number of managed instances already registered with this activation.
activation_registrationsCount :: Lens.Lens' Activation (Prelude.Maybe Prelude.Natural)
activation_registrationsCount :: (Maybe Natural -> f (Maybe Natural)) -> Activation -> f Activation
activation_registrationsCount = (Activation -> Maybe Natural)
-> (Activation -> Maybe Natural -> Activation)
-> Lens Activation Activation (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Activation' {Maybe Natural
registrationsCount :: Maybe Natural
$sel:registrationsCount:Activation' :: Activation -> Maybe Natural
registrationsCount} -> Maybe Natural
registrationsCount) (\s :: Activation
s@Activation' {} Maybe Natural
a -> Activation
s {$sel:registrationsCount:Activation' :: Maybe Natural
registrationsCount = Maybe Natural
a} :: Activation)

-- | The Identity and Access Management (IAM) role to assign to the managed
-- instance.
activation_iamRole :: Lens.Lens' Activation (Prelude.Maybe Prelude.Text)
activation_iamRole :: (Maybe Text -> f (Maybe Text)) -> Activation -> f Activation
activation_iamRole = (Activation -> Maybe Text)
-> (Activation -> Maybe Text -> Activation)
-> Lens Activation Activation (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Activation' {Maybe Text
iamRole :: Maybe Text
$sel:iamRole:Activation' :: Activation -> Maybe Text
iamRole} -> Maybe Text
iamRole) (\s :: Activation
s@Activation' {} Maybe Text
a -> Activation
s {$sel:iamRole:Activation' :: Maybe Text
iamRole = Maybe Text
a} :: Activation)

instance Core.FromJSON Activation where
  parseJSON :: Value -> Parser Activation
parseJSON =
    String
-> (Object -> Parser Activation) -> Value -> Parser Activation
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Activation"
      ( \Object
x ->
          Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Natural
-> Maybe POSIX
-> Maybe Text
-> Maybe [Tag]
-> Maybe Natural
-> Maybe Text
-> Activation
Activation'
            (Maybe Bool
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Natural
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe [Tag]
 -> Maybe Natural
 -> Maybe Text
 -> Activation)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Natural
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe [Tag]
      -> Maybe Natural
      -> Maybe Text
      -> Activation)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Expired")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Natural
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe [Tag]
   -> Maybe Natural
   -> Maybe Text
   -> Activation)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Natural
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe [Tag]
      -> Maybe Natural
      -> Maybe Text
      -> Activation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DefaultInstanceName")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Natural
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe [Tag]
   -> Maybe Natural
   -> Maybe Text
   -> Activation)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Natural
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe [Tag]
      -> Maybe Natural
      -> Maybe Text
      -> Activation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ActivationId")
            Parser
  (Maybe POSIX
   -> Maybe Natural
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe [Tag]
   -> Maybe Natural
   -> Maybe Text
   -> Activation)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Natural
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe [Tag]
      -> Maybe Natural
      -> Maybe Text
      -> Activation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreatedDate")
            Parser
  (Maybe Natural
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe [Tag]
   -> Maybe Natural
   -> Maybe Text
   -> Activation)
-> Parser (Maybe Natural)
-> Parser
     (Maybe POSIX
      -> Maybe Text
      -> Maybe [Tag]
      -> Maybe Natural
      -> Maybe Text
      -> Activation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RegistrationLimit")
            Parser
  (Maybe POSIX
   -> Maybe Text
   -> Maybe [Tag]
   -> Maybe Natural
   -> Maybe Text
   -> Activation)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe [Tag] -> Maybe Natural -> Maybe Text -> Activation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ExpirationDate")
            Parser
  (Maybe Text
   -> Maybe [Tag] -> Maybe Natural -> Maybe Text -> Activation)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Tag] -> Maybe Natural -> Maybe Text -> Activation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Description")
            Parser (Maybe [Tag] -> Maybe Natural -> Maybe Text -> Activation)
-> Parser (Maybe [Tag])
-> Parser (Maybe Natural -> Maybe Text -> Activation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Tag]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Tags" Parser (Maybe (Maybe [Tag])) -> Maybe [Tag] -> Parser (Maybe [Tag])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Tag]
forall a. Monoid a => a
Prelude.mempty)
            Parser (Maybe Natural -> Maybe Text -> Activation)
-> Parser (Maybe Natural) -> Parser (Maybe Text -> Activation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RegistrationsCount")
            Parser (Maybe Text -> Activation)
-> Parser (Maybe Text) -> Parser Activation
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IamRole")
      )

instance Prelude.Hashable Activation

instance Prelude.NFData Activation