{-# 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.Glue.Types.Partition
-- 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.Glue.Types.Partition where

import qualified Amazonka.Core as Core
import Amazonka.Glue.Types.StorageDescriptor
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Represents a slice of table data.
--
-- /See:/ 'newPartition' smart constructor.
data Partition = Partition'
  { -- | The time at which the partition was created.
    Partition -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
    -- | The values of the partition.
    Partition -> Maybe [Text]
values :: Prelude.Maybe [Prelude.Text],
    -- | The ID of the Data Catalog in which the partition resides.
    Partition -> Maybe Text
catalogId :: Prelude.Maybe Prelude.Text,
    -- | The last time at which column statistics were computed for this
    -- partition.
    Partition -> Maybe POSIX
lastAnalyzedTime :: Prelude.Maybe Core.POSIX,
    -- | Provides information about the physical location where the partition is
    -- stored.
    Partition -> Maybe StorageDescriptor
storageDescriptor :: Prelude.Maybe StorageDescriptor,
    -- | The name of the catalog database in which to create the partition.
    Partition -> Maybe Text
databaseName :: Prelude.Maybe Prelude.Text,
    -- | These key-value pairs define partition parameters.
    Partition -> Maybe (HashMap Text Text)
parameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The last time at which the partition was accessed.
    Partition -> Maybe POSIX
lastAccessTime :: Prelude.Maybe Core.POSIX,
    -- | The name of the database table in which to create the partition.
    Partition -> Maybe Text
tableName :: Prelude.Maybe Prelude.Text
  }
  deriving (Partition -> Partition -> Bool
(Partition -> Partition -> Bool)
-> (Partition -> Partition -> Bool) -> Eq Partition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Partition -> Partition -> Bool
$c/= :: Partition -> Partition -> Bool
== :: Partition -> Partition -> Bool
$c== :: Partition -> Partition -> Bool
Prelude.Eq, ReadPrec [Partition]
ReadPrec Partition
Int -> ReadS Partition
ReadS [Partition]
(Int -> ReadS Partition)
-> ReadS [Partition]
-> ReadPrec Partition
-> ReadPrec [Partition]
-> Read Partition
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Partition]
$creadListPrec :: ReadPrec [Partition]
readPrec :: ReadPrec Partition
$creadPrec :: ReadPrec Partition
readList :: ReadS [Partition]
$creadList :: ReadS [Partition]
readsPrec :: Int -> ReadS Partition
$creadsPrec :: Int -> ReadS Partition
Prelude.Read, Int -> Partition -> ShowS
[Partition] -> ShowS
Partition -> String
(Int -> Partition -> ShowS)
-> (Partition -> String)
-> ([Partition] -> ShowS)
-> Show Partition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Partition] -> ShowS
$cshowList :: [Partition] -> ShowS
show :: Partition -> String
$cshow :: Partition -> String
showsPrec :: Int -> Partition -> ShowS
$cshowsPrec :: Int -> Partition -> ShowS
Prelude.Show, (forall x. Partition -> Rep Partition x)
-> (forall x. Rep Partition x -> Partition) -> Generic Partition
forall x. Rep Partition x -> Partition
forall x. Partition -> Rep Partition x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Partition x -> Partition
$cfrom :: forall x. Partition -> Rep Partition x
Prelude.Generic)

-- |
-- Create a value of 'Partition' 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:
--
-- 'creationTime', 'partition_creationTime' - The time at which the partition was created.
--
-- 'values', 'partition_values' - The values of the partition.
--
-- 'catalogId', 'partition_catalogId' - The ID of the Data Catalog in which the partition resides.
--
-- 'lastAnalyzedTime', 'partition_lastAnalyzedTime' - The last time at which column statistics were computed for this
-- partition.
--
-- 'storageDescriptor', 'partition_storageDescriptor' - Provides information about the physical location where the partition is
-- stored.
--
-- 'databaseName', 'partition_databaseName' - The name of the catalog database in which to create the partition.
--
-- 'parameters', 'partition_parameters' - These key-value pairs define partition parameters.
--
-- 'lastAccessTime', 'partition_lastAccessTime' - The last time at which the partition was accessed.
--
-- 'tableName', 'partition_tableName' - The name of the database table in which to create the partition.
newPartition ::
  Partition
newPartition :: Partition
newPartition =
  Partition' :: Maybe POSIX
-> Maybe [Text]
-> Maybe Text
-> Maybe POSIX
-> Maybe StorageDescriptor
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe POSIX
-> Maybe Text
-> Partition
Partition'
    { $sel:creationTime:Partition' :: Maybe POSIX
creationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:values:Partition' :: Maybe [Text]
values = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:catalogId:Partition' :: Maybe Text
catalogId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastAnalyzedTime:Partition' :: Maybe POSIX
lastAnalyzedTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:storageDescriptor:Partition' :: Maybe StorageDescriptor
storageDescriptor = Maybe StorageDescriptor
forall a. Maybe a
Prelude.Nothing,
      $sel:databaseName:Partition' :: Maybe Text
databaseName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:parameters:Partition' :: Maybe (HashMap Text Text)
parameters = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:lastAccessTime:Partition' :: Maybe POSIX
lastAccessTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:tableName:Partition' :: Maybe Text
tableName = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The time at which the partition was created.
partition_creationTime :: Lens.Lens' Partition (Prelude.Maybe Prelude.UTCTime)
partition_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Partition -> f Partition
partition_creationTime = (Partition -> Maybe POSIX)
-> (Partition -> Maybe POSIX -> Partition)
-> Lens Partition Partition (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Partition' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:Partition' :: Partition -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: Partition
s@Partition' {} Maybe POSIX
a -> Partition
s {$sel:creationTime:Partition' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: Partition) ((Maybe POSIX -> f (Maybe POSIX)) -> Partition -> f Partition)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Partition
-> f Partition
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 values of the partition.
partition_values :: Lens.Lens' Partition (Prelude.Maybe [Prelude.Text])
partition_values :: (Maybe [Text] -> f (Maybe [Text])) -> Partition -> f Partition
partition_values = (Partition -> Maybe [Text])
-> (Partition -> Maybe [Text] -> Partition)
-> Lens Partition Partition (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Partition' {Maybe [Text]
values :: Maybe [Text]
$sel:values:Partition' :: Partition -> Maybe [Text]
values} -> Maybe [Text]
values) (\s :: Partition
s@Partition' {} Maybe [Text]
a -> Partition
s {$sel:values:Partition' :: Maybe [Text]
values = Maybe [Text]
a} :: Partition) ((Maybe [Text] -> f (Maybe [Text])) -> Partition -> f Partition)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> Partition
-> f Partition
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The ID of the Data Catalog in which the partition resides.
partition_catalogId :: Lens.Lens' Partition (Prelude.Maybe Prelude.Text)
partition_catalogId :: (Maybe Text -> f (Maybe Text)) -> Partition -> f Partition
partition_catalogId = (Partition -> Maybe Text)
-> (Partition -> Maybe Text -> Partition)
-> Lens Partition Partition (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Partition' {Maybe Text
catalogId :: Maybe Text
$sel:catalogId:Partition' :: Partition -> Maybe Text
catalogId} -> Maybe Text
catalogId) (\s :: Partition
s@Partition' {} Maybe Text
a -> Partition
s {$sel:catalogId:Partition' :: Maybe Text
catalogId = Maybe Text
a} :: Partition)

-- | The last time at which column statistics were computed for this
-- partition.
partition_lastAnalyzedTime :: Lens.Lens' Partition (Prelude.Maybe Prelude.UTCTime)
partition_lastAnalyzedTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Partition -> f Partition
partition_lastAnalyzedTime = (Partition -> Maybe POSIX)
-> (Partition -> Maybe POSIX -> Partition)
-> Lens Partition Partition (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Partition' {Maybe POSIX
lastAnalyzedTime :: Maybe POSIX
$sel:lastAnalyzedTime:Partition' :: Partition -> Maybe POSIX
lastAnalyzedTime} -> Maybe POSIX
lastAnalyzedTime) (\s :: Partition
s@Partition' {} Maybe POSIX
a -> Partition
s {$sel:lastAnalyzedTime:Partition' :: Maybe POSIX
lastAnalyzedTime = Maybe POSIX
a} :: Partition) ((Maybe POSIX -> f (Maybe POSIX)) -> Partition -> f Partition)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Partition
-> f Partition
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

-- | Provides information about the physical location where the partition is
-- stored.
partition_storageDescriptor :: Lens.Lens' Partition (Prelude.Maybe StorageDescriptor)
partition_storageDescriptor :: (Maybe StorageDescriptor -> f (Maybe StorageDescriptor))
-> Partition -> f Partition
partition_storageDescriptor = (Partition -> Maybe StorageDescriptor)
-> (Partition -> Maybe StorageDescriptor -> Partition)
-> Lens
     Partition
     Partition
     (Maybe StorageDescriptor)
     (Maybe StorageDescriptor)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Partition' {Maybe StorageDescriptor
storageDescriptor :: Maybe StorageDescriptor
$sel:storageDescriptor:Partition' :: Partition -> Maybe StorageDescriptor
storageDescriptor} -> Maybe StorageDescriptor
storageDescriptor) (\s :: Partition
s@Partition' {} Maybe StorageDescriptor
a -> Partition
s {$sel:storageDescriptor:Partition' :: Maybe StorageDescriptor
storageDescriptor = Maybe StorageDescriptor
a} :: Partition)

-- | The name of the catalog database in which to create the partition.
partition_databaseName :: Lens.Lens' Partition (Prelude.Maybe Prelude.Text)
partition_databaseName :: (Maybe Text -> f (Maybe Text)) -> Partition -> f Partition
partition_databaseName = (Partition -> Maybe Text)
-> (Partition -> Maybe Text -> Partition)
-> Lens Partition Partition (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Partition' {Maybe Text
databaseName :: Maybe Text
$sel:databaseName:Partition' :: Partition -> Maybe Text
databaseName} -> Maybe Text
databaseName) (\s :: Partition
s@Partition' {} Maybe Text
a -> Partition
s {$sel:databaseName:Partition' :: Maybe Text
databaseName = Maybe Text
a} :: Partition)

-- | These key-value pairs define partition parameters.
partition_parameters :: Lens.Lens' Partition (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
partition_parameters :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Partition -> f Partition
partition_parameters = (Partition -> Maybe (HashMap Text Text))
-> (Partition -> Maybe (HashMap Text Text) -> Partition)
-> Lens
     Partition
     Partition
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Partition' {Maybe (HashMap Text Text)
parameters :: Maybe (HashMap Text Text)
$sel:parameters:Partition' :: Partition -> Maybe (HashMap Text Text)
parameters} -> Maybe (HashMap Text Text)
parameters) (\s :: Partition
s@Partition' {} Maybe (HashMap Text Text)
a -> Partition
s {$sel:parameters:Partition' :: Maybe (HashMap Text Text)
parameters = Maybe (HashMap Text Text)
a} :: Partition) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> Partition -> f Partition)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Partition
-> f Partition
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
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
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The last time at which the partition was accessed.
partition_lastAccessTime :: Lens.Lens' Partition (Prelude.Maybe Prelude.UTCTime)
partition_lastAccessTime :: (Maybe UTCTime -> f (Maybe UTCTime)) -> Partition -> f Partition
partition_lastAccessTime = (Partition -> Maybe POSIX)
-> (Partition -> Maybe POSIX -> Partition)
-> Lens Partition Partition (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Partition' {Maybe POSIX
lastAccessTime :: Maybe POSIX
$sel:lastAccessTime:Partition' :: Partition -> Maybe POSIX
lastAccessTime} -> Maybe POSIX
lastAccessTime) (\s :: Partition
s@Partition' {} Maybe POSIX
a -> Partition
s {$sel:lastAccessTime:Partition' :: Maybe POSIX
lastAccessTime = Maybe POSIX
a} :: Partition) ((Maybe POSIX -> f (Maybe POSIX)) -> Partition -> f Partition)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> Partition
-> f Partition
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 name of the database table in which to create the partition.
partition_tableName :: Lens.Lens' Partition (Prelude.Maybe Prelude.Text)
partition_tableName :: (Maybe Text -> f (Maybe Text)) -> Partition -> f Partition
partition_tableName = (Partition -> Maybe Text)
-> (Partition -> Maybe Text -> Partition)
-> Lens Partition Partition (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Partition' {Maybe Text
tableName :: Maybe Text
$sel:tableName:Partition' :: Partition -> Maybe Text
tableName} -> Maybe Text
tableName) (\s :: Partition
s@Partition' {} Maybe Text
a -> Partition
s {$sel:tableName:Partition' :: Maybe Text
tableName = Maybe Text
a} :: Partition)

instance Core.FromJSON Partition where
  parseJSON :: Value -> Parser Partition
parseJSON =
    String -> (Object -> Parser Partition) -> Value -> Parser Partition
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"Partition"
      ( \Object
x ->
          Maybe POSIX
-> Maybe [Text]
-> Maybe Text
-> Maybe POSIX
-> Maybe StorageDescriptor
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe POSIX
-> Maybe Text
-> Partition
Partition'
            (Maybe POSIX
 -> Maybe [Text]
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe StorageDescriptor
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Maybe POSIX
 -> Maybe Text
 -> Partition)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe [Text]
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe StorageDescriptor
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe POSIX
      -> Maybe Text
      -> Partition)
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
"CreationTime")
            Parser
  (Maybe [Text]
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe StorageDescriptor
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe POSIX
   -> Maybe Text
   -> Partition)
-> Parser (Maybe [Text])
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe StorageDescriptor
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe POSIX
      -> Maybe Text
      -> Partition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Values" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe StorageDescriptor
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe POSIX
   -> Maybe Text
   -> Partition)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe StorageDescriptor
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe POSIX
      -> Maybe Text
      -> Partition)
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
"CatalogId")
            Parser
  (Maybe POSIX
   -> Maybe StorageDescriptor
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe POSIX
   -> Maybe Text
   -> Partition)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe StorageDescriptor
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe POSIX
      -> Maybe Text
      -> Partition)
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
"LastAnalyzedTime")
            Parser
  (Maybe StorageDescriptor
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe POSIX
   -> Maybe Text
   -> Partition)
-> Parser (Maybe StorageDescriptor)
-> Parser
     (Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe POSIX
      -> Maybe Text
      -> Partition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe StorageDescriptor)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StorageDescriptor")
            Parser
  (Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe POSIX
   -> Maybe Text
   -> Partition)
-> Parser (Maybe Text)
-> Parser
     (Maybe (HashMap Text Text)
      -> Maybe POSIX -> Maybe Text -> Partition)
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
"DatabaseName")
            Parser
  (Maybe (HashMap Text Text)
   -> Maybe POSIX -> Maybe Text -> Partition)
-> Parser (Maybe (HashMap Text Text))
-> Parser (Maybe POSIX -> Maybe Text -> Partition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Parameters" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Parser (Maybe POSIX -> Maybe Text -> Partition)
-> Parser (Maybe POSIX) -> Parser (Maybe Text -> Partition)
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
"LastAccessTime")
            Parser (Maybe Text -> Partition)
-> Parser (Maybe Text) -> Parser Partition
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
"TableName")
      )

instance Prelude.Hashable Partition

instance Prelude.NFData Partition