{-# 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 #-}
module Amazonka.Lightsail.Types.Operation where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Lightsail.Types.OperationStatus
import Amazonka.Lightsail.Types.OperationType
import Amazonka.Lightsail.Types.ResourceLocation
import Amazonka.Lightsail.Types.ResourceType
import qualified Amazonka.Prelude as Prelude
data Operation = Operation'
{
Operation -> Maybe OperationStatus
status :: Prelude.Maybe OperationStatus,
Operation -> Maybe Text
operationDetails :: Prelude.Maybe Prelude.Text,
Operation -> Maybe ResourceType
resourceType :: Prelude.Maybe ResourceType,
Operation -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
Operation -> Maybe Text
resourceName :: Prelude.Maybe Prelude.Text,
Operation -> Maybe ResourceLocation
location :: Prelude.Maybe ResourceLocation,
Operation -> Maybe POSIX
statusChangedAt :: Prelude.Maybe Core.POSIX,
Operation -> Maybe Text
errorDetails :: Prelude.Maybe Prelude.Text,
Operation -> Maybe Text
errorCode :: Prelude.Maybe Prelude.Text,
Operation -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
Operation -> Maybe OperationType
operationType :: Prelude.Maybe OperationType,
Operation -> Maybe Bool
isTerminal :: Prelude.Maybe Prelude.Bool
}
deriving (Operation -> Operation -> Bool
(Operation -> Operation -> Bool)
-> (Operation -> Operation -> Bool) -> Eq Operation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Operation -> Operation -> Bool
$c/= :: Operation -> Operation -> Bool
== :: Operation -> Operation -> Bool
$c== :: Operation -> Operation -> Bool
Prelude.Eq, ReadPrec [Operation]
ReadPrec Operation
Int -> ReadS Operation
ReadS [Operation]
(Int -> ReadS Operation)
-> ReadS [Operation]
-> ReadPrec Operation
-> ReadPrec [Operation]
-> Read Operation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Operation]
$creadListPrec :: ReadPrec [Operation]
readPrec :: ReadPrec Operation
$creadPrec :: ReadPrec Operation
readList :: ReadS [Operation]
$creadList :: ReadS [Operation]
readsPrec :: Int -> ReadS Operation
$creadsPrec :: Int -> ReadS Operation
Prelude.Read, Int -> Operation -> ShowS
[Operation] -> ShowS
Operation -> String
(Int -> Operation -> ShowS)
-> (Operation -> String)
-> ([Operation] -> ShowS)
-> Show Operation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Operation] -> ShowS
$cshowList :: [Operation] -> ShowS
show :: Operation -> String
$cshow :: Operation -> String
showsPrec :: Int -> Operation -> ShowS
$cshowsPrec :: Int -> Operation -> ShowS
Prelude.Show, (forall x. Operation -> Rep Operation x)
-> (forall x. Rep Operation x -> Operation) -> Generic Operation
forall x. Rep Operation x -> Operation
forall x. Operation -> Rep Operation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Operation x -> Operation
$cfrom :: forall x. Operation -> Rep Operation x
Prelude.Generic)
newOperation ::
Operation
newOperation :: Operation
newOperation =
Operation' :: Maybe OperationStatus
-> Maybe Text
-> Maybe ResourceType
-> Maybe POSIX
-> Maybe Text
-> Maybe ResourceLocation
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe OperationType
-> Maybe Bool
-> Operation
Operation'
{ $sel:status:Operation' :: Maybe OperationStatus
status = Maybe OperationStatus
forall a. Maybe a
Prelude.Nothing,
$sel:operationDetails:Operation' :: Maybe Text
operationDetails = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:resourceType:Operation' :: Maybe ResourceType
resourceType = Maybe ResourceType
forall a. Maybe a
Prelude.Nothing,
$sel:createdAt:Operation' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:resourceName:Operation' :: Maybe Text
resourceName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:location:Operation' :: Maybe ResourceLocation
location = Maybe ResourceLocation
forall a. Maybe a
Prelude.Nothing,
$sel:statusChangedAt:Operation' :: Maybe POSIX
statusChangedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:errorDetails:Operation' :: Maybe Text
errorDetails = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:errorCode:Operation' :: Maybe Text
errorCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:id:Operation' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:operationType:Operation' :: Maybe OperationType
operationType = Maybe OperationType
forall a. Maybe a
Prelude.Nothing,
$sel:isTerminal:Operation' :: Maybe Bool
isTerminal = Maybe Bool
forall a. Maybe a
Prelude.Nothing
}
operation_status :: Lens.Lens' Operation (Prelude.Maybe OperationStatus)
operation_status :: (Maybe OperationStatus -> f (Maybe OperationStatus))
-> Operation -> f Operation
operation_status = (Operation -> Maybe OperationStatus)
-> (Operation -> Maybe OperationStatus -> Operation)
-> Lens
Operation Operation (Maybe OperationStatus) (Maybe OperationStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Operation' {Maybe OperationStatus
status :: Maybe OperationStatus
$sel:status:Operation' :: Operation -> Maybe OperationStatus
status} -> Maybe OperationStatus
status) (\s :: Operation
s@Operation' {} Maybe OperationStatus
a -> Operation
s {$sel:status:Operation' :: Maybe OperationStatus
status = Maybe OperationStatus
a} :: Operation)
operation_operationDetails :: Lens.Lens' Operation (Prelude.Maybe Prelude.Text)
operation_operationDetails :: (Maybe Text -> f (Maybe Text)) -> Operation -> f Operation
operation_operationDetails = (Operation -> Maybe Text)
-> (Operation -> Maybe Text -> Operation)
-> Lens Operation Operation (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Operation' {Maybe Text
operationDetails :: Maybe Text
$sel:operationDetails:Operation' :: Operation -> Maybe Text
operationDetails} -> Maybe Text
operationDetails) (\s :: Operation
s@Operation' {} Maybe Text
a -> Operation
s {$sel:operationDetails:Operation' :: Maybe Text
operationDetails = Maybe Text
a} :: Operation)
operation_resourceType :: Lens.Lens' Operation (Prelude.Maybe ResourceType)
operation_resourceType :: (Maybe ResourceType -> f (Maybe ResourceType))
-> Operation -> f Operation
operation_resourceType = (Operation -> Maybe ResourceType)
-> (Operation -> Maybe ResourceType -> Operation)
-> Lens
Operation Operation (Maybe ResourceType) (Maybe ResourceType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Operation' {Maybe ResourceType
resourceType :: Maybe ResourceType
$sel:resourceType:Operation' :: Operation -> Maybe ResourceType
resourceType} -> Maybe ResourceType
resourceType) (\s :: Operation
s@Operation' {} Maybe ResourceType
a -> Operation
s {$sel:resourceType:Operation' :: Maybe ResourceType
resourceType = Maybe ResourceType
a} :: Operation)
operation_createdAt :: Lens.Lens' Operation (Prelude.Maybe Prelude.UTCTime)
operation_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Operation -> f Operation
operation_createdAt = (Operation -> Maybe POSIX)
-> (Operation -> Maybe POSIX -> Operation)
-> Lens Operation Operation (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Operation' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:Operation' :: Operation -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: Operation
s@Operation' {} Maybe POSIX
a -> Operation
s {$sel:createdAt:Operation' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: Operation) ((Maybe POSIX -> f (Maybe POSIX)) -> Operation -> f Operation)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Operation
-> f Operation
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
operation_resourceName :: Lens.Lens' Operation (Prelude.Maybe Prelude.Text)
operation_resourceName :: (Maybe Text -> f (Maybe Text)) -> Operation -> f Operation
operation_resourceName = (Operation -> Maybe Text)
-> (Operation -> Maybe Text -> Operation)
-> Lens Operation Operation (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Operation' {Maybe Text
resourceName :: Maybe Text
$sel:resourceName:Operation' :: Operation -> Maybe Text
resourceName} -> Maybe Text
resourceName) (\s :: Operation
s@Operation' {} Maybe Text
a -> Operation
s {$sel:resourceName:Operation' :: Maybe Text
resourceName = Maybe Text
a} :: Operation)
operation_location :: Lens.Lens' Operation (Prelude.Maybe ResourceLocation)
operation_location :: (Maybe ResourceLocation -> f (Maybe ResourceLocation))
-> Operation -> f Operation
operation_location = (Operation -> Maybe ResourceLocation)
-> (Operation -> Maybe ResourceLocation -> Operation)
-> Lens
Operation
Operation
(Maybe ResourceLocation)
(Maybe ResourceLocation)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Operation' {Maybe ResourceLocation
location :: Maybe ResourceLocation
$sel:location:Operation' :: Operation -> Maybe ResourceLocation
location} -> Maybe ResourceLocation
location) (\s :: Operation
s@Operation' {} Maybe ResourceLocation
a -> Operation
s {$sel:location:Operation' :: Maybe ResourceLocation
location = Maybe ResourceLocation
a} :: Operation)
operation_statusChangedAt :: Lens.Lens' Operation (Prelude.Maybe Prelude.UTCTime)
operation_statusChangedAt :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Operation -> f Operation
operation_statusChangedAt = (Operation -> Maybe POSIX)
-> (Operation -> Maybe POSIX -> Operation)
-> Lens Operation Operation (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Operation' {Maybe POSIX
statusChangedAt :: Maybe POSIX
$sel:statusChangedAt:Operation' :: Operation -> Maybe POSIX
statusChangedAt} -> Maybe POSIX
statusChangedAt) (\s :: Operation
s@Operation' {} Maybe POSIX
a -> Operation
s {$sel:statusChangedAt:Operation' :: Maybe POSIX
statusChangedAt = Maybe POSIX
a} :: Operation) ((Maybe POSIX -> f (Maybe POSIX)) -> Operation -> f Operation)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Operation
-> f Operation
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
operation_errorDetails :: Lens.Lens' Operation (Prelude.Maybe Prelude.Text)
operation_errorDetails :: (Maybe Text -> f (Maybe Text)) -> Operation -> f Operation
operation_errorDetails = (Operation -> Maybe Text)
-> (Operation -> Maybe Text -> Operation)
-> Lens Operation Operation (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Operation' {Maybe Text
errorDetails :: Maybe Text
$sel:errorDetails:Operation' :: Operation -> Maybe Text
errorDetails} -> Maybe Text
errorDetails) (\s :: Operation
s@Operation' {} Maybe Text
a -> Operation
s {$sel:errorDetails:Operation' :: Maybe Text
errorDetails = Maybe Text
a} :: Operation)
operation_errorCode :: Lens.Lens' Operation (Prelude.Maybe Prelude.Text)
operation_errorCode :: (Maybe Text -> f (Maybe Text)) -> Operation -> f Operation
operation_errorCode = (Operation -> Maybe Text)
-> (Operation -> Maybe Text -> Operation)
-> Lens Operation Operation (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Operation' {Maybe Text
errorCode :: Maybe Text
$sel:errorCode:Operation' :: Operation -> Maybe Text
errorCode} -> Maybe Text
errorCode) (\s :: Operation
s@Operation' {} Maybe Text
a -> Operation
s {$sel:errorCode:Operation' :: Maybe Text
errorCode = Maybe Text
a} :: Operation)
operation_id :: Lens.Lens' Operation (Prelude.Maybe Prelude.Text)
operation_id :: (Maybe Text -> f (Maybe Text)) -> Operation -> f Operation
operation_id = (Operation -> Maybe Text)
-> (Operation -> Maybe Text -> Operation)
-> Lens Operation Operation (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Operation' {Maybe Text
id :: Maybe Text
$sel:id:Operation' :: Operation -> Maybe Text
id} -> Maybe Text
id) (\s :: Operation
s@Operation' {} Maybe Text
a -> Operation
s {$sel:id:Operation' :: Maybe Text
id = Maybe Text
a} :: Operation)
operation_operationType :: Lens.Lens' Operation (Prelude.Maybe OperationType)
operation_operationType :: (Maybe OperationType -> f (Maybe OperationType))
-> Operation -> f Operation
operation_operationType = (Operation -> Maybe OperationType)
-> (Operation -> Maybe OperationType -> Operation)
-> Lens
Operation Operation (Maybe OperationType) (Maybe OperationType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Operation' {Maybe OperationType
operationType :: Maybe OperationType
$sel:operationType:Operation' :: Operation -> Maybe OperationType
operationType} -> Maybe OperationType
operationType) (\s :: Operation
s@Operation' {} Maybe OperationType
a -> Operation
s {$sel:operationType:Operation' :: Maybe OperationType
operationType = Maybe OperationType
a} :: Operation)
operation_isTerminal :: Lens.Lens' Operation (Prelude.Maybe Prelude.Bool)
operation_isTerminal :: (Maybe Bool -> f (Maybe Bool)) -> Operation -> f Operation
operation_isTerminal = (Operation -> Maybe Bool)
-> (Operation -> Maybe Bool -> Operation)
-> Lens Operation Operation (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Operation' {Maybe Bool
isTerminal :: Maybe Bool
$sel:isTerminal:Operation' :: Operation -> Maybe Bool
isTerminal} -> Maybe Bool
isTerminal) (\s :: Operation
s@Operation' {} Maybe Bool
a -> Operation
s {$sel:isTerminal:Operation' :: Maybe Bool
isTerminal = Maybe Bool
a} :: Operation)
instance Core.FromJSON Operation where
parseJSON :: Value -> Parser Operation
parseJSON =
String -> (Object -> Parser Operation) -> Value -> Parser Operation
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Operation"
( \Object
x ->
Maybe OperationStatus
-> Maybe Text
-> Maybe ResourceType
-> Maybe POSIX
-> Maybe Text
-> Maybe ResourceLocation
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe OperationType
-> Maybe Bool
-> Operation
Operation'
(Maybe OperationStatus
-> Maybe Text
-> Maybe ResourceType
-> Maybe POSIX
-> Maybe Text
-> Maybe ResourceLocation
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe OperationType
-> Maybe Bool
-> Operation)
-> Parser (Maybe OperationStatus)
-> Parser
(Maybe Text
-> Maybe ResourceType
-> Maybe POSIX
-> Maybe Text
-> Maybe ResourceLocation
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe OperationType
-> Maybe Bool
-> Operation)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe OperationStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"status")
Parser
(Maybe Text
-> Maybe ResourceType
-> Maybe POSIX
-> Maybe Text
-> Maybe ResourceLocation
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe OperationType
-> Maybe Bool
-> Operation)
-> Parser (Maybe Text)
-> Parser
(Maybe ResourceType
-> Maybe POSIX
-> Maybe Text
-> Maybe ResourceLocation
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe OperationType
-> Maybe Bool
-> Operation)
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
"operationDetails")
Parser
(Maybe ResourceType
-> Maybe POSIX
-> Maybe Text
-> Maybe ResourceLocation
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe OperationType
-> Maybe Bool
-> Operation)
-> Parser (Maybe ResourceType)
-> Parser
(Maybe POSIX
-> Maybe Text
-> Maybe ResourceLocation
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe OperationType
-> Maybe Bool
-> Operation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ResourceType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"resourceType")
Parser
(Maybe POSIX
-> Maybe Text
-> Maybe ResourceLocation
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe OperationType
-> Maybe Bool
-> Operation)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe ResourceLocation
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe OperationType
-> Maybe Bool
-> Operation)
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
"createdAt")
Parser
(Maybe Text
-> Maybe ResourceLocation
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe OperationType
-> Maybe Bool
-> Operation)
-> Parser (Maybe Text)
-> Parser
(Maybe ResourceLocation
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe OperationType
-> Maybe Bool
-> Operation)
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
"resourceName")
Parser
(Maybe ResourceLocation
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe OperationType
-> Maybe Bool
-> Operation)
-> Parser (Maybe ResourceLocation)
-> Parser
(Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe OperationType
-> Maybe Bool
-> Operation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ResourceLocation)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"location")
Parser
(Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe OperationType
-> Maybe Bool
-> Operation)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe OperationType
-> Maybe Bool
-> Operation)
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
"statusChangedAt")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe OperationType
-> Maybe Bool
-> Operation)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe OperationType -> Maybe Bool -> Operation)
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
"errorDetails")
Parser
(Maybe Text
-> Maybe Text -> Maybe OperationType -> Maybe Bool -> Operation)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe OperationType -> Maybe Bool -> Operation)
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
"errorCode")
Parser
(Maybe Text -> Maybe OperationType -> Maybe Bool -> Operation)
-> Parser (Maybe Text)
-> Parser (Maybe OperationType -> Maybe Bool -> Operation)
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
"id")
Parser (Maybe OperationType -> Maybe Bool -> Operation)
-> Parser (Maybe OperationType) -> Parser (Maybe Bool -> Operation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe OperationType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"operationType")
Parser (Maybe Bool -> Operation)
-> Parser (Maybe Bool) -> Parser Operation
forall (f :: * -> *) a b. Applicative f => 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
"isTerminal")
)
instance Prelude.Hashable Operation
instance Prelude.NFData Operation