{-# 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.AutoScaling.Types.Activity
-- 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.AutoScaling.Types.Activity where

import Amazonka.AutoScaling.Types.ScalingActivityStatusCode
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Describes scaling activity, which is a long-running process that
-- represents a change to your Auto Scaling group, such as changing its
-- size or replacing an instance.
--
-- /See:/ 'newActivity' smart constructor.
data Activity = Activity'
  { -- | A value between 0 and 100 that indicates the progress of the activity.
    Activity -> Maybe Int
progress :: Prelude.Maybe Prelude.Int,
    -- | A friendly, more verbose description of the activity status.
    Activity -> Maybe Text
statusMessage :: Prelude.Maybe Prelude.Text,
    -- | The state of the Auto Scaling group, which is either @InService@ or
    -- @Deleted@.
    Activity -> Maybe Text
autoScalingGroupState :: Prelude.Maybe Prelude.Text,
    -- | The end time of the activity.
    Activity -> Maybe ISO8601
endTime :: Prelude.Maybe Core.ISO8601,
    -- | The details about the activity.
    Activity -> Maybe Text
details :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the Auto Scaling group.
    Activity -> Maybe Text
autoScalingGroupARN :: Prelude.Maybe Prelude.Text,
    -- | A friendly, more verbose description of the activity.
    Activity -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The ID of the activity.
    Activity -> Text
activityId :: Prelude.Text,
    -- | The name of the Auto Scaling group.
    Activity -> Text
autoScalingGroupName :: Prelude.Text,
    -- | The reason the activity began.
    Activity -> Text
cause :: Prelude.Text,
    -- | The start time of the activity.
    Activity -> ISO8601
startTime :: Core.ISO8601,
    -- | The current status of the activity.
    Activity -> ScalingActivityStatusCode
statusCode :: ScalingActivityStatusCode
  }
  deriving (Activity -> Activity -> Bool
(Activity -> Activity -> Bool)
-> (Activity -> Activity -> Bool) -> Eq Activity
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Activity -> Activity -> Bool
$c/= :: Activity -> Activity -> Bool
== :: Activity -> Activity -> Bool
$c== :: Activity -> Activity -> Bool
Prelude.Eq, ReadPrec [Activity]
ReadPrec Activity
Int -> ReadS Activity
ReadS [Activity]
(Int -> ReadS Activity)
-> ReadS [Activity]
-> ReadPrec Activity
-> ReadPrec [Activity]
-> Read Activity
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Activity]
$creadListPrec :: ReadPrec [Activity]
readPrec :: ReadPrec Activity
$creadPrec :: ReadPrec Activity
readList :: ReadS [Activity]
$creadList :: ReadS [Activity]
readsPrec :: Int -> ReadS Activity
$creadsPrec :: Int -> ReadS Activity
Prelude.Read, Int -> Activity -> ShowS
[Activity] -> ShowS
Activity -> String
(Int -> Activity -> ShowS)
-> (Activity -> String) -> ([Activity] -> ShowS) -> Show Activity
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Activity] -> ShowS
$cshowList :: [Activity] -> ShowS
show :: Activity -> String
$cshow :: Activity -> String
showsPrec :: Int -> Activity -> ShowS
$cshowsPrec :: Int -> Activity -> ShowS
Prelude.Show, (forall x. Activity -> Rep Activity x)
-> (forall x. Rep Activity x -> Activity) -> Generic Activity
forall x. Rep Activity x -> Activity
forall x. Activity -> Rep Activity x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Activity x -> Activity
$cfrom :: forall x. Activity -> Rep Activity x
Prelude.Generic)

-- |
-- Create a value of 'Activity' 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:
--
-- 'progress', 'activity_progress' - A value between 0 and 100 that indicates the progress of the activity.
--
-- 'statusMessage', 'activity_statusMessage' - A friendly, more verbose description of the activity status.
--
-- 'autoScalingGroupState', 'activity_autoScalingGroupState' - The state of the Auto Scaling group, which is either @InService@ or
-- @Deleted@.
--
-- 'endTime', 'activity_endTime' - The end time of the activity.
--
-- 'details', 'activity_details' - The details about the activity.
--
-- 'autoScalingGroupARN', 'activity_autoScalingGroupARN' - The Amazon Resource Name (ARN) of the Auto Scaling group.
--
-- 'description', 'activity_description' - A friendly, more verbose description of the activity.
--
-- 'activityId', 'activity_activityId' - The ID of the activity.
--
-- 'autoScalingGroupName', 'activity_autoScalingGroupName' - The name of the Auto Scaling group.
--
-- 'cause', 'activity_cause' - The reason the activity began.
--
-- 'startTime', 'activity_startTime' - The start time of the activity.
--
-- 'statusCode', 'activity_statusCode' - The current status of the activity.
newActivity ::
  -- | 'activityId'
  Prelude.Text ->
  -- | 'autoScalingGroupName'
  Prelude.Text ->
  -- | 'cause'
  Prelude.Text ->
  -- | 'startTime'
  Prelude.UTCTime ->
  -- | 'statusCode'
  ScalingActivityStatusCode ->
  Activity
newActivity :: Text
-> Text -> Text -> UTCTime -> ScalingActivityStatusCode -> Activity
newActivity
  Text
pActivityId_
  Text
pAutoScalingGroupName_
  Text
pCause_
  UTCTime
pStartTime_
  ScalingActivityStatusCode
pStatusCode_ =
    Activity' :: Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Text
-> ISO8601
-> ScalingActivityStatusCode
-> Activity
Activity'
      { $sel:progress:Activity' :: Maybe Int
progress = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:statusMessage:Activity' :: Maybe Text
statusMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:autoScalingGroupState:Activity' :: Maybe Text
autoScalingGroupState = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:endTime:Activity' :: Maybe ISO8601
endTime = Maybe ISO8601
forall a. Maybe a
Prelude.Nothing,
        $sel:details:Activity' :: Maybe Text
details = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:autoScalingGroupARN:Activity' :: Maybe Text
autoScalingGroupARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:description:Activity' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:activityId:Activity' :: Text
activityId = Text
pActivityId_,
        $sel:autoScalingGroupName:Activity' :: Text
autoScalingGroupName = Text
pAutoScalingGroupName_,
        $sel:cause:Activity' :: Text
cause = Text
pCause_,
        $sel:startTime:Activity' :: ISO8601
startTime = Tagged UTCTime (Identity UTCTime)
-> Tagged ISO8601 (Identity ISO8601)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
 -> Tagged ISO8601 (Identity ISO8601))
-> UTCTime -> ISO8601
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pStartTime_,
        $sel:statusCode:Activity' :: ScalingActivityStatusCode
statusCode = ScalingActivityStatusCode
pStatusCode_
      }

-- | A value between 0 and 100 that indicates the progress of the activity.
activity_progress :: Lens.Lens' Activity (Prelude.Maybe Prelude.Int)
activity_progress :: (Maybe Int -> f (Maybe Int)) -> Activity -> f Activity
activity_progress = (Activity -> Maybe Int)
-> (Activity -> Maybe Int -> Activity)
-> Lens Activity Activity (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Activity' {Maybe Int
progress :: Maybe Int
$sel:progress:Activity' :: Activity -> Maybe Int
progress} -> Maybe Int
progress) (\s :: Activity
s@Activity' {} Maybe Int
a -> Activity
s {$sel:progress:Activity' :: Maybe Int
progress = Maybe Int
a} :: Activity)

-- | A friendly, more verbose description of the activity status.
activity_statusMessage :: Lens.Lens' Activity (Prelude.Maybe Prelude.Text)
activity_statusMessage :: (Maybe Text -> f (Maybe Text)) -> Activity -> f Activity
activity_statusMessage = (Activity -> Maybe Text)
-> (Activity -> Maybe Text -> Activity)
-> Lens Activity Activity (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Activity' {Maybe Text
statusMessage :: Maybe Text
$sel:statusMessage:Activity' :: Activity -> Maybe Text
statusMessage} -> Maybe Text
statusMessage) (\s :: Activity
s@Activity' {} Maybe Text
a -> Activity
s {$sel:statusMessage:Activity' :: Maybe Text
statusMessage = Maybe Text
a} :: Activity)

-- | The state of the Auto Scaling group, which is either @InService@ or
-- @Deleted@.
activity_autoScalingGroupState :: Lens.Lens' Activity (Prelude.Maybe Prelude.Text)
activity_autoScalingGroupState :: (Maybe Text -> f (Maybe Text)) -> Activity -> f Activity
activity_autoScalingGroupState = (Activity -> Maybe Text)
-> (Activity -> Maybe Text -> Activity)
-> Lens Activity Activity (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Activity' {Maybe Text
autoScalingGroupState :: Maybe Text
$sel:autoScalingGroupState:Activity' :: Activity -> Maybe Text
autoScalingGroupState} -> Maybe Text
autoScalingGroupState) (\s :: Activity
s@Activity' {} Maybe Text
a -> Activity
s {$sel:autoScalingGroupState:Activity' :: Maybe Text
autoScalingGroupState = Maybe Text
a} :: Activity)

-- | The end time of the activity.
activity_endTime :: Lens.Lens' Activity (Prelude.Maybe Prelude.UTCTime)
activity_endTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Activity -> f Activity
activity_endTime = (Activity -> Maybe ISO8601)
-> (Activity -> Maybe ISO8601 -> Activity)
-> Lens Activity Activity (Maybe ISO8601) (Maybe ISO8601)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Activity' {Maybe ISO8601
endTime :: Maybe ISO8601
$sel:endTime:Activity' :: Activity -> Maybe ISO8601
endTime} -> Maybe ISO8601
endTime) (\s :: Activity
s@Activity' {} Maybe ISO8601
a -> Activity
s {$sel:endTime:Activity' :: Maybe ISO8601
endTime = Maybe ISO8601
a} :: Activity) ((Maybe ISO8601 -> f (Maybe ISO8601)) -> Activity -> f Activity)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe ISO8601 -> f (Maybe ISO8601))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Activity
-> f Activity
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso ISO8601 ISO8601 UTCTime UTCTime
-> Iso
     (Maybe ISO8601) (Maybe ISO8601) (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 ISO8601 ISO8601 UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The details about the activity.
activity_details :: Lens.Lens' Activity (Prelude.Maybe Prelude.Text)
activity_details :: (Maybe Text -> f (Maybe Text)) -> Activity -> f Activity
activity_details = (Activity -> Maybe Text)
-> (Activity -> Maybe Text -> Activity)
-> Lens Activity Activity (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Activity' {Maybe Text
details :: Maybe Text
$sel:details:Activity' :: Activity -> Maybe Text
details} -> Maybe Text
details) (\s :: Activity
s@Activity' {} Maybe Text
a -> Activity
s {$sel:details:Activity' :: Maybe Text
details = Maybe Text
a} :: Activity)

-- | The Amazon Resource Name (ARN) of the Auto Scaling group.
activity_autoScalingGroupARN :: Lens.Lens' Activity (Prelude.Maybe Prelude.Text)
activity_autoScalingGroupARN :: (Maybe Text -> f (Maybe Text)) -> Activity -> f Activity
activity_autoScalingGroupARN = (Activity -> Maybe Text)
-> (Activity -> Maybe Text -> Activity)
-> Lens Activity Activity (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Activity' {Maybe Text
autoScalingGroupARN :: Maybe Text
$sel:autoScalingGroupARN:Activity' :: Activity -> Maybe Text
autoScalingGroupARN} -> Maybe Text
autoScalingGroupARN) (\s :: Activity
s@Activity' {} Maybe Text
a -> Activity
s {$sel:autoScalingGroupARN:Activity' :: Maybe Text
autoScalingGroupARN = Maybe Text
a} :: Activity)

-- | A friendly, more verbose description of the activity.
activity_description :: Lens.Lens' Activity (Prelude.Maybe Prelude.Text)
activity_description :: (Maybe Text -> f (Maybe Text)) -> Activity -> f Activity
activity_description = (Activity -> Maybe Text)
-> (Activity -> Maybe Text -> Activity)
-> Lens Activity Activity (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Activity' {Maybe Text
description :: Maybe Text
$sel:description:Activity' :: Activity -> Maybe Text
description} -> Maybe Text
description) (\s :: Activity
s@Activity' {} Maybe Text
a -> Activity
s {$sel:description:Activity' :: Maybe Text
description = Maybe Text
a} :: Activity)

-- | The ID of the activity.
activity_activityId :: Lens.Lens' Activity Prelude.Text
activity_activityId :: (Text -> f Text) -> Activity -> f Activity
activity_activityId = (Activity -> Text)
-> (Activity -> Text -> Activity)
-> Lens Activity Activity Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Activity' {Text
activityId :: Text
$sel:activityId:Activity' :: Activity -> Text
activityId} -> Text
activityId) (\s :: Activity
s@Activity' {} Text
a -> Activity
s {$sel:activityId:Activity' :: Text
activityId = Text
a} :: Activity)

-- | The name of the Auto Scaling group.
activity_autoScalingGroupName :: Lens.Lens' Activity Prelude.Text
activity_autoScalingGroupName :: (Text -> f Text) -> Activity -> f Activity
activity_autoScalingGroupName = (Activity -> Text)
-> (Activity -> Text -> Activity)
-> Lens Activity Activity Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Activity' {Text
autoScalingGroupName :: Text
$sel:autoScalingGroupName:Activity' :: Activity -> Text
autoScalingGroupName} -> Text
autoScalingGroupName) (\s :: Activity
s@Activity' {} Text
a -> Activity
s {$sel:autoScalingGroupName:Activity' :: Text
autoScalingGroupName = Text
a} :: Activity)

-- | The reason the activity began.
activity_cause :: Lens.Lens' Activity Prelude.Text
activity_cause :: (Text -> f Text) -> Activity -> f Activity
activity_cause = (Activity -> Text)
-> (Activity -> Text -> Activity)
-> Lens Activity Activity Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Activity' {Text
cause :: Text
$sel:cause:Activity' :: Activity -> Text
cause} -> Text
cause) (\s :: Activity
s@Activity' {} Text
a -> Activity
s {$sel:cause:Activity' :: Text
cause = Text
a} :: Activity)

-- | The start time of the activity.
activity_startTime :: Lens.Lens' Activity Prelude.UTCTime
activity_startTime :: (UTCTime -> f UTCTime) -> Activity -> f Activity
activity_startTime = (Activity -> ISO8601)
-> (Activity -> ISO8601 -> Activity)
-> Lens Activity Activity ISO8601 ISO8601
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Activity' {ISO8601
startTime :: ISO8601
$sel:startTime:Activity' :: Activity -> ISO8601
startTime} -> ISO8601
startTime) (\s :: Activity
s@Activity' {} ISO8601
a -> Activity
s {$sel:startTime:Activity' :: ISO8601
startTime = ISO8601
a} :: Activity) ((ISO8601 -> f ISO8601) -> Activity -> f Activity)
-> ((UTCTime -> f UTCTime) -> ISO8601 -> f ISO8601)
-> (UTCTime -> f UTCTime)
-> Activity
-> f Activity
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> ISO8601 -> f ISO8601
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The current status of the activity.
activity_statusCode :: Lens.Lens' Activity ScalingActivityStatusCode
activity_statusCode :: (ScalingActivityStatusCode -> f ScalingActivityStatusCode)
-> Activity -> f Activity
activity_statusCode = (Activity -> ScalingActivityStatusCode)
-> (Activity -> ScalingActivityStatusCode -> Activity)
-> Lens
     Activity
     Activity
     ScalingActivityStatusCode
     ScalingActivityStatusCode
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Activity' {ScalingActivityStatusCode
statusCode :: ScalingActivityStatusCode
$sel:statusCode:Activity' :: Activity -> ScalingActivityStatusCode
statusCode} -> ScalingActivityStatusCode
statusCode) (\s :: Activity
s@Activity' {} ScalingActivityStatusCode
a -> Activity
s {$sel:statusCode:Activity' :: ScalingActivityStatusCode
statusCode = ScalingActivityStatusCode
a} :: Activity)

instance Core.FromXML Activity where
  parseXML :: [Node] -> Either String Activity
parseXML [Node]
x =
    Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> Text
-> ISO8601
-> ScalingActivityStatusCode
-> Activity
Activity'
      (Maybe Int
 -> Maybe Text
 -> Maybe Text
 -> Maybe ISO8601
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Text
 -> Text
 -> Text
 -> ISO8601
 -> ScalingActivityStatusCode
 -> Activity)
-> Either String (Maybe Int)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Text
      -> Text
      -> ISO8601
      -> ScalingActivityStatusCode
      -> Activity)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Int)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Progress")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Text
   -> Text
   -> ISO8601
   -> ScalingActivityStatusCode
   -> Activity)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe ISO8601
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Text
      -> Text
      -> ISO8601
      -> ScalingActivityStatusCode
      -> Activity)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"StatusMessage")
      Either
  String
  (Maybe Text
   -> Maybe ISO8601
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Text
   -> Text
   -> ISO8601
   -> ScalingActivityStatusCode
   -> Activity)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe ISO8601
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Text
      -> Text
      -> ISO8601
      -> ScalingActivityStatusCode
      -> Activity)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"AutoScalingGroupState")
      Either
  String
  (Maybe ISO8601
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Text
   -> Text
   -> ISO8601
   -> ScalingActivityStatusCode
   -> Activity)
-> Either String (Maybe ISO8601)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Text
      -> Text
      -> ISO8601
      -> ScalingActivityStatusCode
      -> Activity)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe ISO8601)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"EndTime")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Text
   -> Text
   -> ISO8601
   -> ScalingActivityStatusCode
   -> Activity)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Text
      -> Text
      -> Text
      -> ISO8601
      -> ScalingActivityStatusCode
      -> Activity)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Details")
      Either
  String
  (Maybe Text
   -> Maybe Text
   -> Text
   -> Text
   -> Text
   -> ISO8601
   -> ScalingActivityStatusCode
   -> Activity)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Text
      -> Text
      -> Text
      -> ISO8601
      -> ScalingActivityStatusCode
      -> Activity)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"AutoScalingGroupARN")
      Either
  String
  (Maybe Text
   -> Text
   -> Text
   -> Text
   -> ISO8601
   -> ScalingActivityStatusCode
   -> Activity)
-> Either String (Maybe Text)
-> Either
     String
     (Text
      -> Text
      -> Text
      -> ISO8601
      -> ScalingActivityStatusCode
      -> Activity)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Description")
      Either
  String
  (Text
   -> Text
   -> Text
   -> ISO8601
   -> ScalingActivityStatusCode
   -> Activity)
-> Either String Text
-> Either
     String
     (Text -> Text -> ISO8601 -> ScalingActivityStatusCode -> Activity)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"ActivityId")
      Either
  String
  (Text -> Text -> ISO8601 -> ScalingActivityStatusCode -> Activity)
-> Either String Text
-> Either
     String (Text -> ISO8601 -> ScalingActivityStatusCode -> Activity)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"AutoScalingGroupName")
      Either
  String (Text -> ISO8601 -> ScalingActivityStatusCode -> Activity)
-> Either String Text
-> Either String (ISO8601 -> ScalingActivityStatusCode -> Activity)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"Cause")
      Either String (ISO8601 -> ScalingActivityStatusCode -> Activity)
-> Either String ISO8601
-> Either String (ScalingActivityStatusCode -> Activity)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String ISO8601
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"StartTime")
      Either String (ScalingActivityStatusCode -> Activity)
-> Either String ScalingActivityStatusCode
-> Either String Activity
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String ScalingActivityStatusCode
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"StatusCode")

instance Prelude.Hashable Activity

instance Prelude.NFData Activity