{-# 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.LicenseManager.Types.LicenseOperationFailure
-- 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.LicenseManager.Types.LicenseOperationFailure where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.LicenseManager.Types.Metadata
import Amazonka.LicenseManager.Types.ResourceType
import qualified Amazonka.Prelude as Prelude

-- | Describes the failure of a license operation.
--
-- /See:/ 'newLicenseOperationFailure' smart constructor.
data LicenseOperationFailure = LicenseOperationFailure'
  { -- | Resource type.
    LicenseOperationFailure -> Maybe ResourceType
resourceType :: Prelude.Maybe ResourceType,
    -- | The requester is \"License Manager Automated Discovery\".
    LicenseOperationFailure -> Maybe Text
operationRequestedBy :: Prelude.Maybe Prelude.Text,
    -- | Amazon Resource Name (ARN) of the resource.
    LicenseOperationFailure -> Maybe Text
resourceArn :: Prelude.Maybe Prelude.Text,
    -- | Reserved.
    LicenseOperationFailure -> Maybe [Metadata]
metadataList :: Prelude.Maybe [Metadata],
    -- | Name of the operation.
    LicenseOperationFailure -> Maybe Text
operationName :: Prelude.Maybe Prelude.Text,
    -- | Failure time.
    LicenseOperationFailure -> Maybe POSIX
failureTime :: Prelude.Maybe Core.POSIX,
    -- | Error message.
    LicenseOperationFailure -> Maybe Text
errorMessage :: Prelude.Maybe Prelude.Text,
    -- | ID of the Amazon Web Services account that owns the resource.
    LicenseOperationFailure -> Maybe Text
resourceOwnerId :: Prelude.Maybe Prelude.Text
  }
  deriving (LicenseOperationFailure -> LicenseOperationFailure -> Bool
(LicenseOperationFailure -> LicenseOperationFailure -> Bool)
-> (LicenseOperationFailure -> LicenseOperationFailure -> Bool)
-> Eq LicenseOperationFailure
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LicenseOperationFailure -> LicenseOperationFailure -> Bool
$c/= :: LicenseOperationFailure -> LicenseOperationFailure -> Bool
== :: LicenseOperationFailure -> LicenseOperationFailure -> Bool
$c== :: LicenseOperationFailure -> LicenseOperationFailure -> Bool
Prelude.Eq, ReadPrec [LicenseOperationFailure]
ReadPrec LicenseOperationFailure
Int -> ReadS LicenseOperationFailure
ReadS [LicenseOperationFailure]
(Int -> ReadS LicenseOperationFailure)
-> ReadS [LicenseOperationFailure]
-> ReadPrec LicenseOperationFailure
-> ReadPrec [LicenseOperationFailure]
-> Read LicenseOperationFailure
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LicenseOperationFailure]
$creadListPrec :: ReadPrec [LicenseOperationFailure]
readPrec :: ReadPrec LicenseOperationFailure
$creadPrec :: ReadPrec LicenseOperationFailure
readList :: ReadS [LicenseOperationFailure]
$creadList :: ReadS [LicenseOperationFailure]
readsPrec :: Int -> ReadS LicenseOperationFailure
$creadsPrec :: Int -> ReadS LicenseOperationFailure
Prelude.Read, Int -> LicenseOperationFailure -> ShowS
[LicenseOperationFailure] -> ShowS
LicenseOperationFailure -> String
(Int -> LicenseOperationFailure -> ShowS)
-> (LicenseOperationFailure -> String)
-> ([LicenseOperationFailure] -> ShowS)
-> Show LicenseOperationFailure
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LicenseOperationFailure] -> ShowS
$cshowList :: [LicenseOperationFailure] -> ShowS
show :: LicenseOperationFailure -> String
$cshow :: LicenseOperationFailure -> String
showsPrec :: Int -> LicenseOperationFailure -> ShowS
$cshowsPrec :: Int -> LicenseOperationFailure -> ShowS
Prelude.Show, (forall x.
 LicenseOperationFailure -> Rep LicenseOperationFailure x)
-> (forall x.
    Rep LicenseOperationFailure x -> LicenseOperationFailure)
-> Generic LicenseOperationFailure
forall x. Rep LicenseOperationFailure x -> LicenseOperationFailure
forall x. LicenseOperationFailure -> Rep LicenseOperationFailure x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LicenseOperationFailure x -> LicenseOperationFailure
$cfrom :: forall x. LicenseOperationFailure -> Rep LicenseOperationFailure x
Prelude.Generic)

-- |
-- Create a value of 'LicenseOperationFailure' 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:
--
-- 'resourceType', 'licenseOperationFailure_resourceType' - Resource type.
--
-- 'operationRequestedBy', 'licenseOperationFailure_operationRequestedBy' - The requester is \"License Manager Automated Discovery\".
--
-- 'resourceArn', 'licenseOperationFailure_resourceArn' - Amazon Resource Name (ARN) of the resource.
--
-- 'metadataList', 'licenseOperationFailure_metadataList' - Reserved.
--
-- 'operationName', 'licenseOperationFailure_operationName' - Name of the operation.
--
-- 'failureTime', 'licenseOperationFailure_failureTime' - Failure time.
--
-- 'errorMessage', 'licenseOperationFailure_errorMessage' - Error message.
--
-- 'resourceOwnerId', 'licenseOperationFailure_resourceOwnerId' - ID of the Amazon Web Services account that owns the resource.
newLicenseOperationFailure ::
  LicenseOperationFailure
newLicenseOperationFailure :: LicenseOperationFailure
newLicenseOperationFailure =
  LicenseOperationFailure' :: Maybe ResourceType
-> Maybe Text
-> Maybe Text
-> Maybe [Metadata]
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> LicenseOperationFailure
LicenseOperationFailure'
    { $sel:resourceType:LicenseOperationFailure' :: Maybe ResourceType
resourceType =
        Maybe ResourceType
forall a. Maybe a
Prelude.Nothing,
      $sel:operationRequestedBy:LicenseOperationFailure' :: Maybe Text
operationRequestedBy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceArn:LicenseOperationFailure' :: Maybe Text
resourceArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:metadataList:LicenseOperationFailure' :: Maybe [Metadata]
metadataList = Maybe [Metadata]
forall a. Maybe a
Prelude.Nothing,
      $sel:operationName:LicenseOperationFailure' :: Maybe Text
operationName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:failureTime:LicenseOperationFailure' :: Maybe POSIX
failureTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:errorMessage:LicenseOperationFailure' :: Maybe Text
errorMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:resourceOwnerId:LicenseOperationFailure' :: Maybe Text
resourceOwnerId = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | Resource type.
licenseOperationFailure_resourceType :: Lens.Lens' LicenseOperationFailure (Prelude.Maybe ResourceType)
licenseOperationFailure_resourceType :: (Maybe ResourceType -> f (Maybe ResourceType))
-> LicenseOperationFailure -> f LicenseOperationFailure
licenseOperationFailure_resourceType = (LicenseOperationFailure -> Maybe ResourceType)
-> (LicenseOperationFailure
    -> Maybe ResourceType -> LicenseOperationFailure)
-> Lens
     LicenseOperationFailure
     LicenseOperationFailure
     (Maybe ResourceType)
     (Maybe ResourceType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LicenseOperationFailure' {Maybe ResourceType
resourceType :: Maybe ResourceType
$sel:resourceType:LicenseOperationFailure' :: LicenseOperationFailure -> Maybe ResourceType
resourceType} -> Maybe ResourceType
resourceType) (\s :: LicenseOperationFailure
s@LicenseOperationFailure' {} Maybe ResourceType
a -> LicenseOperationFailure
s {$sel:resourceType:LicenseOperationFailure' :: Maybe ResourceType
resourceType = Maybe ResourceType
a} :: LicenseOperationFailure)

-- | The requester is \"License Manager Automated Discovery\".
licenseOperationFailure_operationRequestedBy :: Lens.Lens' LicenseOperationFailure (Prelude.Maybe Prelude.Text)
licenseOperationFailure_operationRequestedBy :: (Maybe Text -> f (Maybe Text))
-> LicenseOperationFailure -> f LicenseOperationFailure
licenseOperationFailure_operationRequestedBy = (LicenseOperationFailure -> Maybe Text)
-> (LicenseOperationFailure
    -> Maybe Text -> LicenseOperationFailure)
-> Lens
     LicenseOperationFailure
     LicenseOperationFailure
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LicenseOperationFailure' {Maybe Text
operationRequestedBy :: Maybe Text
$sel:operationRequestedBy:LicenseOperationFailure' :: LicenseOperationFailure -> Maybe Text
operationRequestedBy} -> Maybe Text
operationRequestedBy) (\s :: LicenseOperationFailure
s@LicenseOperationFailure' {} Maybe Text
a -> LicenseOperationFailure
s {$sel:operationRequestedBy:LicenseOperationFailure' :: Maybe Text
operationRequestedBy = Maybe Text
a} :: LicenseOperationFailure)

-- | Amazon Resource Name (ARN) of the resource.
licenseOperationFailure_resourceArn :: Lens.Lens' LicenseOperationFailure (Prelude.Maybe Prelude.Text)
licenseOperationFailure_resourceArn :: (Maybe Text -> f (Maybe Text))
-> LicenseOperationFailure -> f LicenseOperationFailure
licenseOperationFailure_resourceArn = (LicenseOperationFailure -> Maybe Text)
-> (LicenseOperationFailure
    -> Maybe Text -> LicenseOperationFailure)
-> Lens
     LicenseOperationFailure
     LicenseOperationFailure
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LicenseOperationFailure' {Maybe Text
resourceArn :: Maybe Text
$sel:resourceArn:LicenseOperationFailure' :: LicenseOperationFailure -> Maybe Text
resourceArn} -> Maybe Text
resourceArn) (\s :: LicenseOperationFailure
s@LicenseOperationFailure' {} Maybe Text
a -> LicenseOperationFailure
s {$sel:resourceArn:LicenseOperationFailure' :: Maybe Text
resourceArn = Maybe Text
a} :: LicenseOperationFailure)

-- | Reserved.
licenseOperationFailure_metadataList :: Lens.Lens' LicenseOperationFailure (Prelude.Maybe [Metadata])
licenseOperationFailure_metadataList :: (Maybe [Metadata] -> f (Maybe [Metadata]))
-> LicenseOperationFailure -> f LicenseOperationFailure
licenseOperationFailure_metadataList = (LicenseOperationFailure -> Maybe [Metadata])
-> (LicenseOperationFailure
    -> Maybe [Metadata] -> LicenseOperationFailure)
-> Lens
     LicenseOperationFailure
     LicenseOperationFailure
     (Maybe [Metadata])
     (Maybe [Metadata])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LicenseOperationFailure' {Maybe [Metadata]
metadataList :: Maybe [Metadata]
$sel:metadataList:LicenseOperationFailure' :: LicenseOperationFailure -> Maybe [Metadata]
metadataList} -> Maybe [Metadata]
metadataList) (\s :: LicenseOperationFailure
s@LicenseOperationFailure' {} Maybe [Metadata]
a -> LicenseOperationFailure
s {$sel:metadataList:LicenseOperationFailure' :: Maybe [Metadata]
metadataList = Maybe [Metadata]
a} :: LicenseOperationFailure) ((Maybe [Metadata] -> f (Maybe [Metadata]))
 -> LicenseOperationFailure -> f LicenseOperationFailure)
-> ((Maybe [Metadata] -> f (Maybe [Metadata]))
    -> Maybe [Metadata] -> f (Maybe [Metadata]))
-> (Maybe [Metadata] -> f (Maybe [Metadata]))
-> LicenseOperationFailure
-> f LicenseOperationFailure
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Metadata] [Metadata] [Metadata] [Metadata]
-> Iso
     (Maybe [Metadata])
     (Maybe [Metadata])
     (Maybe [Metadata])
     (Maybe [Metadata])
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 [Metadata] [Metadata] [Metadata] [Metadata]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Name of the operation.
licenseOperationFailure_operationName :: Lens.Lens' LicenseOperationFailure (Prelude.Maybe Prelude.Text)
licenseOperationFailure_operationName :: (Maybe Text -> f (Maybe Text))
-> LicenseOperationFailure -> f LicenseOperationFailure
licenseOperationFailure_operationName = (LicenseOperationFailure -> Maybe Text)
-> (LicenseOperationFailure
    -> Maybe Text -> LicenseOperationFailure)
-> Lens
     LicenseOperationFailure
     LicenseOperationFailure
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LicenseOperationFailure' {Maybe Text
operationName :: Maybe Text
$sel:operationName:LicenseOperationFailure' :: LicenseOperationFailure -> Maybe Text
operationName} -> Maybe Text
operationName) (\s :: LicenseOperationFailure
s@LicenseOperationFailure' {} Maybe Text
a -> LicenseOperationFailure
s {$sel:operationName:LicenseOperationFailure' :: Maybe Text
operationName = Maybe Text
a} :: LicenseOperationFailure)

-- | Failure time.
licenseOperationFailure_failureTime :: Lens.Lens' LicenseOperationFailure (Prelude.Maybe Prelude.UTCTime)
licenseOperationFailure_failureTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> LicenseOperationFailure -> f LicenseOperationFailure
licenseOperationFailure_failureTime = (LicenseOperationFailure -> Maybe POSIX)
-> (LicenseOperationFailure
    -> Maybe POSIX -> LicenseOperationFailure)
-> Lens
     LicenseOperationFailure
     LicenseOperationFailure
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LicenseOperationFailure' {Maybe POSIX
failureTime :: Maybe POSIX
$sel:failureTime:LicenseOperationFailure' :: LicenseOperationFailure -> Maybe POSIX
failureTime} -> Maybe POSIX
failureTime) (\s :: LicenseOperationFailure
s@LicenseOperationFailure' {} Maybe POSIX
a -> LicenseOperationFailure
s {$sel:failureTime:LicenseOperationFailure' :: Maybe POSIX
failureTime = Maybe POSIX
a} :: LicenseOperationFailure) ((Maybe POSIX -> f (Maybe POSIX))
 -> LicenseOperationFailure -> f LicenseOperationFailure)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> LicenseOperationFailure
-> f LicenseOperationFailure
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

-- | Error message.
licenseOperationFailure_errorMessage :: Lens.Lens' LicenseOperationFailure (Prelude.Maybe Prelude.Text)
licenseOperationFailure_errorMessage :: (Maybe Text -> f (Maybe Text))
-> LicenseOperationFailure -> f LicenseOperationFailure
licenseOperationFailure_errorMessage = (LicenseOperationFailure -> Maybe Text)
-> (LicenseOperationFailure
    -> Maybe Text -> LicenseOperationFailure)
-> Lens
     LicenseOperationFailure
     LicenseOperationFailure
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LicenseOperationFailure' {Maybe Text
errorMessage :: Maybe Text
$sel:errorMessage:LicenseOperationFailure' :: LicenseOperationFailure -> Maybe Text
errorMessage} -> Maybe Text
errorMessage) (\s :: LicenseOperationFailure
s@LicenseOperationFailure' {} Maybe Text
a -> LicenseOperationFailure
s {$sel:errorMessage:LicenseOperationFailure' :: Maybe Text
errorMessage = Maybe Text
a} :: LicenseOperationFailure)

-- | ID of the Amazon Web Services account that owns the resource.
licenseOperationFailure_resourceOwnerId :: Lens.Lens' LicenseOperationFailure (Prelude.Maybe Prelude.Text)
licenseOperationFailure_resourceOwnerId :: (Maybe Text -> f (Maybe Text))
-> LicenseOperationFailure -> f LicenseOperationFailure
licenseOperationFailure_resourceOwnerId = (LicenseOperationFailure -> Maybe Text)
-> (LicenseOperationFailure
    -> Maybe Text -> LicenseOperationFailure)
-> Lens
     LicenseOperationFailure
     LicenseOperationFailure
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LicenseOperationFailure' {Maybe Text
resourceOwnerId :: Maybe Text
$sel:resourceOwnerId:LicenseOperationFailure' :: LicenseOperationFailure -> Maybe Text
resourceOwnerId} -> Maybe Text
resourceOwnerId) (\s :: LicenseOperationFailure
s@LicenseOperationFailure' {} Maybe Text
a -> LicenseOperationFailure
s {$sel:resourceOwnerId:LicenseOperationFailure' :: Maybe Text
resourceOwnerId = Maybe Text
a} :: LicenseOperationFailure)

instance Core.FromJSON LicenseOperationFailure where
  parseJSON :: Value -> Parser LicenseOperationFailure
parseJSON =
    String
-> (Object -> Parser LicenseOperationFailure)
-> Value
-> Parser LicenseOperationFailure
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"LicenseOperationFailure"
      ( \Object
x ->
          Maybe ResourceType
-> Maybe Text
-> Maybe Text
-> Maybe [Metadata]
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> LicenseOperationFailure
LicenseOperationFailure'
            (Maybe ResourceType
 -> Maybe Text
 -> Maybe Text
 -> Maybe [Metadata]
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> LicenseOperationFailure)
-> Parser (Maybe ResourceType)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe [Metadata]
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> LicenseOperationFailure)
forall (f :: * -> *) a b. Functor 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 Text
   -> Maybe Text
   -> Maybe [Metadata]
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> LicenseOperationFailure)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe [Metadata]
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> LicenseOperationFailure)
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
"OperationRequestedBy")
            Parser
  (Maybe Text
   -> Maybe [Metadata]
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> LicenseOperationFailure)
-> Parser (Maybe Text)
-> Parser
     (Maybe [Metadata]
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> LicenseOperationFailure)
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
"ResourceArn")
            Parser
  (Maybe [Metadata]
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> LicenseOperationFailure)
-> Parser (Maybe [Metadata])
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Maybe Text
      -> LicenseOperationFailure)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Metadata]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MetadataList" Parser (Maybe (Maybe [Metadata]))
-> Maybe [Metadata] -> Parser (Maybe [Metadata])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Metadata]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Maybe Text
   -> LicenseOperationFailure)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe Text -> Maybe Text -> LicenseOperationFailure)
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
"OperationName")
            Parser
  (Maybe POSIX
   -> Maybe Text -> Maybe Text -> LicenseOperationFailure)
-> Parser (Maybe POSIX)
-> Parser (Maybe Text -> Maybe Text -> LicenseOperationFailure)
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
"FailureTime")
            Parser (Maybe Text -> Maybe Text -> LicenseOperationFailure)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> LicenseOperationFailure)
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
"ErrorMessage")
            Parser (Maybe Text -> LicenseOperationFailure)
-> Parser (Maybe Text) -> Parser LicenseOperationFailure
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
"ResourceOwnerId")
      )

instance Prelude.Hashable LicenseOperationFailure

instance Prelude.NFData LicenseOperationFailure