{-# 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.ElasticSearch.Types.DomainPackageDetails
-- 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.ElasticSearch.Types.DomainPackageDetails where

import qualified Amazonka.Core as Core
import Amazonka.ElasticSearch.Types.DomainPackageStatus
import Amazonka.ElasticSearch.Types.ErrorDetails
import Amazonka.ElasticSearch.Types.PackageType
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Information on a package that is associated with a domain.
--
-- /See:/ 'newDomainPackageDetails' smart constructor.
data DomainPackageDetails = DomainPackageDetails'
  { -- | Timestamp of the most-recent update to the association status.
    DomainPackageDetails -> Maybe POSIX
lastUpdated :: Prelude.Maybe Core.POSIX,
    -- | Internal ID of the package.
    DomainPackageDetails -> Maybe Text
packageID :: Prelude.Maybe Prelude.Text,
    -- | Currently supports only TXT-DICTIONARY.
    DomainPackageDetails -> Maybe PackageType
packageType :: Prelude.Maybe PackageType,
    -- | User specified name of the package.
    DomainPackageDetails -> Maybe Text
packageName :: Prelude.Maybe Prelude.Text,
    DomainPackageDetails -> Maybe Text
packageVersion :: Prelude.Maybe Prelude.Text,
    -- | State of the association. Values are
    -- ASSOCIATING\/ASSOCIATION_FAILED\/ACTIVE\/DISSOCIATING\/DISSOCIATION_FAILED.
    DomainPackageDetails -> Maybe DomainPackageStatus
domainPackageStatus :: Prelude.Maybe DomainPackageStatus,
    -- | Name of the domain you\'ve associated a package with.
    DomainPackageDetails -> Maybe Text
domainName :: Prelude.Maybe Prelude.Text,
    -- | Additional information if the package is in an error state. Null
    -- otherwise.
    DomainPackageDetails -> Maybe ErrorDetails
errorDetails :: Prelude.Maybe ErrorDetails,
    -- | The relative path on Amazon ES nodes, which can be used as synonym_path
    -- when the package is synonym file.
    DomainPackageDetails -> Maybe Text
referencePath :: Prelude.Maybe Prelude.Text
  }
  deriving (DomainPackageDetails -> DomainPackageDetails -> Bool
(DomainPackageDetails -> DomainPackageDetails -> Bool)
-> (DomainPackageDetails -> DomainPackageDetails -> Bool)
-> Eq DomainPackageDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DomainPackageDetails -> DomainPackageDetails -> Bool
$c/= :: DomainPackageDetails -> DomainPackageDetails -> Bool
== :: DomainPackageDetails -> DomainPackageDetails -> Bool
$c== :: DomainPackageDetails -> DomainPackageDetails -> Bool
Prelude.Eq, ReadPrec [DomainPackageDetails]
ReadPrec DomainPackageDetails
Int -> ReadS DomainPackageDetails
ReadS [DomainPackageDetails]
(Int -> ReadS DomainPackageDetails)
-> ReadS [DomainPackageDetails]
-> ReadPrec DomainPackageDetails
-> ReadPrec [DomainPackageDetails]
-> Read DomainPackageDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DomainPackageDetails]
$creadListPrec :: ReadPrec [DomainPackageDetails]
readPrec :: ReadPrec DomainPackageDetails
$creadPrec :: ReadPrec DomainPackageDetails
readList :: ReadS [DomainPackageDetails]
$creadList :: ReadS [DomainPackageDetails]
readsPrec :: Int -> ReadS DomainPackageDetails
$creadsPrec :: Int -> ReadS DomainPackageDetails
Prelude.Read, Int -> DomainPackageDetails -> ShowS
[DomainPackageDetails] -> ShowS
DomainPackageDetails -> String
(Int -> DomainPackageDetails -> ShowS)
-> (DomainPackageDetails -> String)
-> ([DomainPackageDetails] -> ShowS)
-> Show DomainPackageDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DomainPackageDetails] -> ShowS
$cshowList :: [DomainPackageDetails] -> ShowS
show :: DomainPackageDetails -> String
$cshow :: DomainPackageDetails -> String
showsPrec :: Int -> DomainPackageDetails -> ShowS
$cshowsPrec :: Int -> DomainPackageDetails -> ShowS
Prelude.Show, (forall x. DomainPackageDetails -> Rep DomainPackageDetails x)
-> (forall x. Rep DomainPackageDetails x -> DomainPackageDetails)
-> Generic DomainPackageDetails
forall x. Rep DomainPackageDetails x -> DomainPackageDetails
forall x. DomainPackageDetails -> Rep DomainPackageDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DomainPackageDetails x -> DomainPackageDetails
$cfrom :: forall x. DomainPackageDetails -> Rep DomainPackageDetails x
Prelude.Generic)

-- |
-- Create a value of 'DomainPackageDetails' 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:
--
-- 'lastUpdated', 'domainPackageDetails_lastUpdated' - Timestamp of the most-recent update to the association status.
--
-- 'packageID', 'domainPackageDetails_packageID' - Internal ID of the package.
--
-- 'packageType', 'domainPackageDetails_packageType' - Currently supports only TXT-DICTIONARY.
--
-- 'packageName', 'domainPackageDetails_packageName' - User specified name of the package.
--
-- 'packageVersion', 'domainPackageDetails_packageVersion' - Undocumented member.
--
-- 'domainPackageStatus', 'domainPackageDetails_domainPackageStatus' - State of the association. Values are
-- ASSOCIATING\/ASSOCIATION_FAILED\/ACTIVE\/DISSOCIATING\/DISSOCIATION_FAILED.
--
-- 'domainName', 'domainPackageDetails_domainName' - Name of the domain you\'ve associated a package with.
--
-- 'errorDetails', 'domainPackageDetails_errorDetails' - Additional information if the package is in an error state. Null
-- otherwise.
--
-- 'referencePath', 'domainPackageDetails_referencePath' - The relative path on Amazon ES nodes, which can be used as synonym_path
-- when the package is synonym file.
newDomainPackageDetails ::
  DomainPackageDetails
newDomainPackageDetails :: DomainPackageDetails
newDomainPackageDetails =
  DomainPackageDetails' :: Maybe POSIX
-> Maybe Text
-> Maybe PackageType
-> Maybe Text
-> Maybe Text
-> Maybe DomainPackageStatus
-> Maybe Text
-> Maybe ErrorDetails
-> Maybe Text
-> DomainPackageDetails
DomainPackageDetails'
    { $sel:lastUpdated:DomainPackageDetails' :: Maybe POSIX
lastUpdated =
        Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:packageID:DomainPackageDetails' :: Maybe Text
packageID = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:packageType:DomainPackageDetails' :: Maybe PackageType
packageType = Maybe PackageType
forall a. Maybe a
Prelude.Nothing,
      $sel:packageName:DomainPackageDetails' :: Maybe Text
packageName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:packageVersion:DomainPackageDetails' :: Maybe Text
packageVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:domainPackageStatus:DomainPackageDetails' :: Maybe DomainPackageStatus
domainPackageStatus = Maybe DomainPackageStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:domainName:DomainPackageDetails' :: Maybe Text
domainName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:errorDetails:DomainPackageDetails' :: Maybe ErrorDetails
errorDetails = Maybe ErrorDetails
forall a. Maybe a
Prelude.Nothing,
      $sel:referencePath:DomainPackageDetails' :: Maybe Text
referencePath = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | Timestamp of the most-recent update to the association status.
domainPackageDetails_lastUpdated :: Lens.Lens' DomainPackageDetails (Prelude.Maybe Prelude.UTCTime)
domainPackageDetails_lastUpdated :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DomainPackageDetails -> f DomainPackageDetails
domainPackageDetails_lastUpdated = (DomainPackageDetails -> Maybe POSIX)
-> (DomainPackageDetails -> Maybe POSIX -> DomainPackageDetails)
-> Lens
     DomainPackageDetails
     DomainPackageDetails
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainPackageDetails' {Maybe POSIX
lastUpdated :: Maybe POSIX
$sel:lastUpdated:DomainPackageDetails' :: DomainPackageDetails -> Maybe POSIX
lastUpdated} -> Maybe POSIX
lastUpdated) (\s :: DomainPackageDetails
s@DomainPackageDetails' {} Maybe POSIX
a -> DomainPackageDetails
s {$sel:lastUpdated:DomainPackageDetails' :: Maybe POSIX
lastUpdated = Maybe POSIX
a} :: DomainPackageDetails) ((Maybe POSIX -> f (Maybe POSIX))
 -> DomainPackageDetails -> f DomainPackageDetails)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DomainPackageDetails
-> f DomainPackageDetails
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

-- | Internal ID of the package.
domainPackageDetails_packageID :: Lens.Lens' DomainPackageDetails (Prelude.Maybe Prelude.Text)
domainPackageDetails_packageID :: (Maybe Text -> f (Maybe Text))
-> DomainPackageDetails -> f DomainPackageDetails
domainPackageDetails_packageID = (DomainPackageDetails -> Maybe Text)
-> (DomainPackageDetails -> Maybe Text -> DomainPackageDetails)
-> Lens
     DomainPackageDetails DomainPackageDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainPackageDetails' {Maybe Text
packageID :: Maybe Text
$sel:packageID:DomainPackageDetails' :: DomainPackageDetails -> Maybe Text
packageID} -> Maybe Text
packageID) (\s :: DomainPackageDetails
s@DomainPackageDetails' {} Maybe Text
a -> DomainPackageDetails
s {$sel:packageID:DomainPackageDetails' :: Maybe Text
packageID = Maybe Text
a} :: DomainPackageDetails)

-- | Currently supports only TXT-DICTIONARY.
domainPackageDetails_packageType :: Lens.Lens' DomainPackageDetails (Prelude.Maybe PackageType)
domainPackageDetails_packageType :: (Maybe PackageType -> f (Maybe PackageType))
-> DomainPackageDetails -> f DomainPackageDetails
domainPackageDetails_packageType = (DomainPackageDetails -> Maybe PackageType)
-> (DomainPackageDetails
    -> Maybe PackageType -> DomainPackageDetails)
-> Lens
     DomainPackageDetails
     DomainPackageDetails
     (Maybe PackageType)
     (Maybe PackageType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainPackageDetails' {Maybe PackageType
packageType :: Maybe PackageType
$sel:packageType:DomainPackageDetails' :: DomainPackageDetails -> Maybe PackageType
packageType} -> Maybe PackageType
packageType) (\s :: DomainPackageDetails
s@DomainPackageDetails' {} Maybe PackageType
a -> DomainPackageDetails
s {$sel:packageType:DomainPackageDetails' :: Maybe PackageType
packageType = Maybe PackageType
a} :: DomainPackageDetails)

-- | User specified name of the package.
domainPackageDetails_packageName :: Lens.Lens' DomainPackageDetails (Prelude.Maybe Prelude.Text)
domainPackageDetails_packageName :: (Maybe Text -> f (Maybe Text))
-> DomainPackageDetails -> f DomainPackageDetails
domainPackageDetails_packageName = (DomainPackageDetails -> Maybe Text)
-> (DomainPackageDetails -> Maybe Text -> DomainPackageDetails)
-> Lens
     DomainPackageDetails DomainPackageDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainPackageDetails' {Maybe Text
packageName :: Maybe Text
$sel:packageName:DomainPackageDetails' :: DomainPackageDetails -> Maybe Text
packageName} -> Maybe Text
packageName) (\s :: DomainPackageDetails
s@DomainPackageDetails' {} Maybe Text
a -> DomainPackageDetails
s {$sel:packageName:DomainPackageDetails' :: Maybe Text
packageName = Maybe Text
a} :: DomainPackageDetails)

-- | Undocumented member.
domainPackageDetails_packageVersion :: Lens.Lens' DomainPackageDetails (Prelude.Maybe Prelude.Text)
domainPackageDetails_packageVersion :: (Maybe Text -> f (Maybe Text))
-> DomainPackageDetails -> f DomainPackageDetails
domainPackageDetails_packageVersion = (DomainPackageDetails -> Maybe Text)
-> (DomainPackageDetails -> Maybe Text -> DomainPackageDetails)
-> Lens
     DomainPackageDetails DomainPackageDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainPackageDetails' {Maybe Text
packageVersion :: Maybe Text
$sel:packageVersion:DomainPackageDetails' :: DomainPackageDetails -> Maybe Text
packageVersion} -> Maybe Text
packageVersion) (\s :: DomainPackageDetails
s@DomainPackageDetails' {} Maybe Text
a -> DomainPackageDetails
s {$sel:packageVersion:DomainPackageDetails' :: Maybe Text
packageVersion = Maybe Text
a} :: DomainPackageDetails)

-- | State of the association. Values are
-- ASSOCIATING\/ASSOCIATION_FAILED\/ACTIVE\/DISSOCIATING\/DISSOCIATION_FAILED.
domainPackageDetails_domainPackageStatus :: Lens.Lens' DomainPackageDetails (Prelude.Maybe DomainPackageStatus)
domainPackageDetails_domainPackageStatus :: (Maybe DomainPackageStatus -> f (Maybe DomainPackageStatus))
-> DomainPackageDetails -> f DomainPackageDetails
domainPackageDetails_domainPackageStatus = (DomainPackageDetails -> Maybe DomainPackageStatus)
-> (DomainPackageDetails
    -> Maybe DomainPackageStatus -> DomainPackageDetails)
-> Lens
     DomainPackageDetails
     DomainPackageDetails
     (Maybe DomainPackageStatus)
     (Maybe DomainPackageStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainPackageDetails' {Maybe DomainPackageStatus
domainPackageStatus :: Maybe DomainPackageStatus
$sel:domainPackageStatus:DomainPackageDetails' :: DomainPackageDetails -> Maybe DomainPackageStatus
domainPackageStatus} -> Maybe DomainPackageStatus
domainPackageStatus) (\s :: DomainPackageDetails
s@DomainPackageDetails' {} Maybe DomainPackageStatus
a -> DomainPackageDetails
s {$sel:domainPackageStatus:DomainPackageDetails' :: Maybe DomainPackageStatus
domainPackageStatus = Maybe DomainPackageStatus
a} :: DomainPackageDetails)

-- | Name of the domain you\'ve associated a package with.
domainPackageDetails_domainName :: Lens.Lens' DomainPackageDetails (Prelude.Maybe Prelude.Text)
domainPackageDetails_domainName :: (Maybe Text -> f (Maybe Text))
-> DomainPackageDetails -> f DomainPackageDetails
domainPackageDetails_domainName = (DomainPackageDetails -> Maybe Text)
-> (DomainPackageDetails -> Maybe Text -> DomainPackageDetails)
-> Lens
     DomainPackageDetails DomainPackageDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainPackageDetails' {Maybe Text
domainName :: Maybe Text
$sel:domainName:DomainPackageDetails' :: DomainPackageDetails -> Maybe Text
domainName} -> Maybe Text
domainName) (\s :: DomainPackageDetails
s@DomainPackageDetails' {} Maybe Text
a -> DomainPackageDetails
s {$sel:domainName:DomainPackageDetails' :: Maybe Text
domainName = Maybe Text
a} :: DomainPackageDetails)

-- | Additional information if the package is in an error state. Null
-- otherwise.
domainPackageDetails_errorDetails :: Lens.Lens' DomainPackageDetails (Prelude.Maybe ErrorDetails)
domainPackageDetails_errorDetails :: (Maybe ErrorDetails -> f (Maybe ErrorDetails))
-> DomainPackageDetails -> f DomainPackageDetails
domainPackageDetails_errorDetails = (DomainPackageDetails -> Maybe ErrorDetails)
-> (DomainPackageDetails
    -> Maybe ErrorDetails -> DomainPackageDetails)
-> Lens
     DomainPackageDetails
     DomainPackageDetails
     (Maybe ErrorDetails)
     (Maybe ErrorDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainPackageDetails' {Maybe ErrorDetails
errorDetails :: Maybe ErrorDetails
$sel:errorDetails:DomainPackageDetails' :: DomainPackageDetails -> Maybe ErrorDetails
errorDetails} -> Maybe ErrorDetails
errorDetails) (\s :: DomainPackageDetails
s@DomainPackageDetails' {} Maybe ErrorDetails
a -> DomainPackageDetails
s {$sel:errorDetails:DomainPackageDetails' :: Maybe ErrorDetails
errorDetails = Maybe ErrorDetails
a} :: DomainPackageDetails)

-- | The relative path on Amazon ES nodes, which can be used as synonym_path
-- when the package is synonym file.
domainPackageDetails_referencePath :: Lens.Lens' DomainPackageDetails (Prelude.Maybe Prelude.Text)
domainPackageDetails_referencePath :: (Maybe Text -> f (Maybe Text))
-> DomainPackageDetails -> f DomainPackageDetails
domainPackageDetails_referencePath = (DomainPackageDetails -> Maybe Text)
-> (DomainPackageDetails -> Maybe Text -> DomainPackageDetails)
-> Lens
     DomainPackageDetails DomainPackageDetails (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainPackageDetails' {Maybe Text
referencePath :: Maybe Text
$sel:referencePath:DomainPackageDetails' :: DomainPackageDetails -> Maybe Text
referencePath} -> Maybe Text
referencePath) (\s :: DomainPackageDetails
s@DomainPackageDetails' {} Maybe Text
a -> DomainPackageDetails
s {$sel:referencePath:DomainPackageDetails' :: Maybe Text
referencePath = Maybe Text
a} :: DomainPackageDetails)

instance Core.FromJSON DomainPackageDetails where
  parseJSON :: Value -> Parser DomainPackageDetails
parseJSON =
    String
-> (Object -> Parser DomainPackageDetails)
-> Value
-> Parser DomainPackageDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"DomainPackageDetails"
      ( \Object
x ->
          Maybe POSIX
-> Maybe Text
-> Maybe PackageType
-> Maybe Text
-> Maybe Text
-> Maybe DomainPackageStatus
-> Maybe Text
-> Maybe ErrorDetails
-> Maybe Text
-> DomainPackageDetails
DomainPackageDetails'
            (Maybe POSIX
 -> Maybe Text
 -> Maybe PackageType
 -> Maybe Text
 -> Maybe Text
 -> Maybe DomainPackageStatus
 -> Maybe Text
 -> Maybe ErrorDetails
 -> Maybe Text
 -> DomainPackageDetails)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe Text
      -> Maybe PackageType
      -> Maybe Text
      -> Maybe Text
      -> Maybe DomainPackageStatus
      -> Maybe Text
      -> Maybe ErrorDetails
      -> Maybe Text
      -> DomainPackageDetails)
forall (f :: * -> *) a b. Functor 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
"LastUpdated")
            Parser
  (Maybe Text
   -> Maybe PackageType
   -> Maybe Text
   -> Maybe Text
   -> Maybe DomainPackageStatus
   -> Maybe Text
   -> Maybe ErrorDetails
   -> Maybe Text
   -> DomainPackageDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe PackageType
      -> Maybe Text
      -> Maybe Text
      -> Maybe DomainPackageStatus
      -> Maybe Text
      -> Maybe ErrorDetails
      -> Maybe Text
      -> DomainPackageDetails)
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
"PackageID")
            Parser
  (Maybe PackageType
   -> Maybe Text
   -> Maybe Text
   -> Maybe DomainPackageStatus
   -> Maybe Text
   -> Maybe ErrorDetails
   -> Maybe Text
   -> DomainPackageDetails)
-> Parser (Maybe PackageType)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe DomainPackageStatus
      -> Maybe Text
      -> Maybe ErrorDetails
      -> Maybe Text
      -> DomainPackageDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe PackageType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PackageType")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe DomainPackageStatus
   -> Maybe Text
   -> Maybe ErrorDetails
   -> Maybe Text
   -> DomainPackageDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe DomainPackageStatus
      -> Maybe Text
      -> Maybe ErrorDetails
      -> Maybe Text
      -> DomainPackageDetails)
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
"PackageName")
            Parser
  (Maybe Text
   -> Maybe DomainPackageStatus
   -> Maybe Text
   -> Maybe ErrorDetails
   -> Maybe Text
   -> DomainPackageDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe DomainPackageStatus
      -> Maybe Text
      -> Maybe ErrorDetails
      -> Maybe Text
      -> DomainPackageDetails)
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
"PackageVersion")
            Parser
  (Maybe DomainPackageStatus
   -> Maybe Text
   -> Maybe ErrorDetails
   -> Maybe Text
   -> DomainPackageDetails)
-> Parser (Maybe DomainPackageStatus)
-> Parser
     (Maybe Text
      -> Maybe ErrorDetails -> Maybe Text -> DomainPackageDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DomainPackageStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DomainPackageStatus")
            Parser
  (Maybe Text
   -> Maybe ErrorDetails -> Maybe Text -> DomainPackageDetails)
-> Parser (Maybe Text)
-> Parser
     (Maybe ErrorDetails -> Maybe Text -> DomainPackageDetails)
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
"DomainName")
            Parser (Maybe ErrorDetails -> Maybe Text -> DomainPackageDetails)
-> Parser (Maybe ErrorDetails)
-> Parser (Maybe Text -> DomainPackageDetails)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ErrorDetails)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ErrorDetails")
            Parser (Maybe Text -> DomainPackageDetails)
-> Parser (Maybe Text) -> Parser DomainPackageDetails
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
"ReferencePath")
      )

instance Prelude.Hashable DomainPackageDetails

instance Prelude.NFData DomainPackageDetails