{-# 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.Firehose.Types.OrcSerDe where
import qualified Amazonka.Core as Core
import Amazonka.Firehose.Types.OrcCompression
import Amazonka.Firehose.Types.OrcFormatVersion
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data OrcSerDe = OrcSerDe'
{
OrcSerDe -> Maybe Double
bloomFilterFalsePositiveProbability :: Prelude.Maybe Prelude.Double,
OrcSerDe -> Maybe Double
dictionaryKeyThreshold :: Prelude.Maybe Prelude.Double,
OrcSerDe -> Maybe Bool
enablePadding :: Prelude.Maybe Prelude.Bool,
OrcSerDe -> Maybe OrcCompression
compression :: Prelude.Maybe OrcCompression,
OrcSerDe -> Maybe [Text]
bloomFilterColumns :: Prelude.Maybe [Prelude.Text],
OrcSerDe -> Maybe Natural
rowIndexStride :: Prelude.Maybe Prelude.Natural,
OrcSerDe -> Maybe OrcFormatVersion
formatVersion :: Prelude.Maybe OrcFormatVersion,
OrcSerDe -> Maybe Natural
blockSizeBytes :: Prelude.Maybe Prelude.Natural,
OrcSerDe -> Maybe Natural
stripeSizeBytes :: Prelude.Maybe Prelude.Natural,
OrcSerDe -> Maybe Double
paddingTolerance :: Prelude.Maybe Prelude.Double
}
deriving (OrcSerDe -> OrcSerDe -> Bool
(OrcSerDe -> OrcSerDe -> Bool)
-> (OrcSerDe -> OrcSerDe -> Bool) -> Eq OrcSerDe
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OrcSerDe -> OrcSerDe -> Bool
$c/= :: OrcSerDe -> OrcSerDe -> Bool
== :: OrcSerDe -> OrcSerDe -> Bool
$c== :: OrcSerDe -> OrcSerDe -> Bool
Prelude.Eq, ReadPrec [OrcSerDe]
ReadPrec OrcSerDe
Int -> ReadS OrcSerDe
ReadS [OrcSerDe]
(Int -> ReadS OrcSerDe)
-> ReadS [OrcSerDe]
-> ReadPrec OrcSerDe
-> ReadPrec [OrcSerDe]
-> Read OrcSerDe
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [OrcSerDe]
$creadListPrec :: ReadPrec [OrcSerDe]
readPrec :: ReadPrec OrcSerDe
$creadPrec :: ReadPrec OrcSerDe
readList :: ReadS [OrcSerDe]
$creadList :: ReadS [OrcSerDe]
readsPrec :: Int -> ReadS OrcSerDe
$creadsPrec :: Int -> ReadS OrcSerDe
Prelude.Read, Int -> OrcSerDe -> ShowS
[OrcSerDe] -> ShowS
OrcSerDe -> String
(Int -> OrcSerDe -> ShowS)
-> (OrcSerDe -> String) -> ([OrcSerDe] -> ShowS) -> Show OrcSerDe
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OrcSerDe] -> ShowS
$cshowList :: [OrcSerDe] -> ShowS
show :: OrcSerDe -> String
$cshow :: OrcSerDe -> String
showsPrec :: Int -> OrcSerDe -> ShowS
$cshowsPrec :: Int -> OrcSerDe -> ShowS
Prelude.Show, (forall x. OrcSerDe -> Rep OrcSerDe x)
-> (forall x. Rep OrcSerDe x -> OrcSerDe) -> Generic OrcSerDe
forall x. Rep OrcSerDe x -> OrcSerDe
forall x. OrcSerDe -> Rep OrcSerDe x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep OrcSerDe x -> OrcSerDe
$cfrom :: forall x. OrcSerDe -> Rep OrcSerDe x
Prelude.Generic)
newOrcSerDe ::
OrcSerDe
newOrcSerDe :: OrcSerDe
newOrcSerDe =
OrcSerDe' :: Maybe Double
-> Maybe Double
-> Maybe Bool
-> Maybe OrcCompression
-> Maybe [Text]
-> Maybe Natural
-> Maybe OrcFormatVersion
-> Maybe Natural
-> Maybe Natural
-> Maybe Double
-> OrcSerDe
OrcSerDe'
{ $sel:bloomFilterFalsePositiveProbability:OrcSerDe' :: Maybe Double
bloomFilterFalsePositiveProbability =
Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:dictionaryKeyThreshold:OrcSerDe' :: Maybe Double
dictionaryKeyThreshold = Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:enablePadding:OrcSerDe' :: Maybe Bool
enablePadding = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:compression:OrcSerDe' :: Maybe OrcCompression
compression = Maybe OrcCompression
forall a. Maybe a
Prelude.Nothing,
$sel:bloomFilterColumns:OrcSerDe' :: Maybe [Text]
bloomFilterColumns = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:rowIndexStride:OrcSerDe' :: Maybe Natural
rowIndexStride = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:formatVersion:OrcSerDe' :: Maybe OrcFormatVersion
formatVersion = Maybe OrcFormatVersion
forall a. Maybe a
Prelude.Nothing,
$sel:blockSizeBytes:OrcSerDe' :: Maybe Natural
blockSizeBytes = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:stripeSizeBytes:OrcSerDe' :: Maybe Natural
stripeSizeBytes = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:paddingTolerance:OrcSerDe' :: Maybe Double
paddingTolerance = Maybe Double
forall a. Maybe a
Prelude.Nothing
}
orcSerDe_bloomFilterFalsePositiveProbability :: Lens.Lens' OrcSerDe (Prelude.Maybe Prelude.Double)
orcSerDe_bloomFilterFalsePositiveProbability :: (Maybe Double -> f (Maybe Double)) -> OrcSerDe -> f OrcSerDe
orcSerDe_bloomFilterFalsePositiveProbability = (OrcSerDe -> Maybe Double)
-> (OrcSerDe -> Maybe Double -> OrcSerDe)
-> Lens OrcSerDe OrcSerDe (Maybe Double) (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrcSerDe' {Maybe Double
bloomFilterFalsePositiveProbability :: Maybe Double
$sel:bloomFilterFalsePositiveProbability:OrcSerDe' :: OrcSerDe -> Maybe Double
bloomFilterFalsePositiveProbability} -> Maybe Double
bloomFilterFalsePositiveProbability) (\s :: OrcSerDe
s@OrcSerDe' {} Maybe Double
a -> OrcSerDe
s {$sel:bloomFilterFalsePositiveProbability:OrcSerDe' :: Maybe Double
bloomFilterFalsePositiveProbability = Maybe Double
a} :: OrcSerDe)
orcSerDe_dictionaryKeyThreshold :: Lens.Lens' OrcSerDe (Prelude.Maybe Prelude.Double)
orcSerDe_dictionaryKeyThreshold :: (Maybe Double -> f (Maybe Double)) -> OrcSerDe -> f OrcSerDe
orcSerDe_dictionaryKeyThreshold = (OrcSerDe -> Maybe Double)
-> (OrcSerDe -> Maybe Double -> OrcSerDe)
-> Lens OrcSerDe OrcSerDe (Maybe Double) (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrcSerDe' {Maybe Double
dictionaryKeyThreshold :: Maybe Double
$sel:dictionaryKeyThreshold:OrcSerDe' :: OrcSerDe -> Maybe Double
dictionaryKeyThreshold} -> Maybe Double
dictionaryKeyThreshold) (\s :: OrcSerDe
s@OrcSerDe' {} Maybe Double
a -> OrcSerDe
s {$sel:dictionaryKeyThreshold:OrcSerDe' :: Maybe Double
dictionaryKeyThreshold = Maybe Double
a} :: OrcSerDe)
orcSerDe_enablePadding :: Lens.Lens' OrcSerDe (Prelude.Maybe Prelude.Bool)
orcSerDe_enablePadding :: (Maybe Bool -> f (Maybe Bool)) -> OrcSerDe -> f OrcSerDe
orcSerDe_enablePadding = (OrcSerDe -> Maybe Bool)
-> (OrcSerDe -> Maybe Bool -> OrcSerDe)
-> Lens OrcSerDe OrcSerDe (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrcSerDe' {Maybe Bool
enablePadding :: Maybe Bool
$sel:enablePadding:OrcSerDe' :: OrcSerDe -> Maybe Bool
enablePadding} -> Maybe Bool
enablePadding) (\s :: OrcSerDe
s@OrcSerDe' {} Maybe Bool
a -> OrcSerDe
s {$sel:enablePadding:OrcSerDe' :: Maybe Bool
enablePadding = Maybe Bool
a} :: OrcSerDe)
orcSerDe_compression :: Lens.Lens' OrcSerDe (Prelude.Maybe OrcCompression)
orcSerDe_compression :: (Maybe OrcCompression -> f (Maybe OrcCompression))
-> OrcSerDe -> f OrcSerDe
orcSerDe_compression = (OrcSerDe -> Maybe OrcCompression)
-> (OrcSerDe -> Maybe OrcCompression -> OrcSerDe)
-> Lens
OrcSerDe OrcSerDe (Maybe OrcCompression) (Maybe OrcCompression)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrcSerDe' {Maybe OrcCompression
compression :: Maybe OrcCompression
$sel:compression:OrcSerDe' :: OrcSerDe -> Maybe OrcCompression
compression} -> Maybe OrcCompression
compression) (\s :: OrcSerDe
s@OrcSerDe' {} Maybe OrcCompression
a -> OrcSerDe
s {$sel:compression:OrcSerDe' :: Maybe OrcCompression
compression = Maybe OrcCompression
a} :: OrcSerDe)
orcSerDe_bloomFilterColumns :: Lens.Lens' OrcSerDe (Prelude.Maybe [Prelude.Text])
orcSerDe_bloomFilterColumns :: (Maybe [Text] -> f (Maybe [Text])) -> OrcSerDe -> f OrcSerDe
orcSerDe_bloomFilterColumns = (OrcSerDe -> Maybe [Text])
-> (OrcSerDe -> Maybe [Text] -> OrcSerDe)
-> Lens OrcSerDe OrcSerDe (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrcSerDe' {Maybe [Text]
bloomFilterColumns :: Maybe [Text]
$sel:bloomFilterColumns:OrcSerDe' :: OrcSerDe -> Maybe [Text]
bloomFilterColumns} -> Maybe [Text]
bloomFilterColumns) (\s :: OrcSerDe
s@OrcSerDe' {} Maybe [Text]
a -> OrcSerDe
s {$sel:bloomFilterColumns:OrcSerDe' :: Maybe [Text]
bloomFilterColumns = Maybe [Text]
a} :: OrcSerDe) ((Maybe [Text] -> f (Maybe [Text])) -> OrcSerDe -> f OrcSerDe)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> OrcSerDe
-> f OrcSerDe
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
orcSerDe_rowIndexStride :: Lens.Lens' OrcSerDe (Prelude.Maybe Prelude.Natural)
orcSerDe_rowIndexStride :: (Maybe Natural -> f (Maybe Natural)) -> OrcSerDe -> f OrcSerDe
orcSerDe_rowIndexStride = (OrcSerDe -> Maybe Natural)
-> (OrcSerDe -> Maybe Natural -> OrcSerDe)
-> Lens OrcSerDe OrcSerDe (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrcSerDe' {Maybe Natural
rowIndexStride :: Maybe Natural
$sel:rowIndexStride:OrcSerDe' :: OrcSerDe -> Maybe Natural
rowIndexStride} -> Maybe Natural
rowIndexStride) (\s :: OrcSerDe
s@OrcSerDe' {} Maybe Natural
a -> OrcSerDe
s {$sel:rowIndexStride:OrcSerDe' :: Maybe Natural
rowIndexStride = Maybe Natural
a} :: OrcSerDe)
orcSerDe_formatVersion :: Lens.Lens' OrcSerDe (Prelude.Maybe OrcFormatVersion)
orcSerDe_formatVersion :: (Maybe OrcFormatVersion -> f (Maybe OrcFormatVersion))
-> OrcSerDe -> f OrcSerDe
orcSerDe_formatVersion = (OrcSerDe -> Maybe OrcFormatVersion)
-> (OrcSerDe -> Maybe OrcFormatVersion -> OrcSerDe)
-> Lens
OrcSerDe OrcSerDe (Maybe OrcFormatVersion) (Maybe OrcFormatVersion)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrcSerDe' {Maybe OrcFormatVersion
formatVersion :: Maybe OrcFormatVersion
$sel:formatVersion:OrcSerDe' :: OrcSerDe -> Maybe OrcFormatVersion
formatVersion} -> Maybe OrcFormatVersion
formatVersion) (\s :: OrcSerDe
s@OrcSerDe' {} Maybe OrcFormatVersion
a -> OrcSerDe
s {$sel:formatVersion:OrcSerDe' :: Maybe OrcFormatVersion
formatVersion = Maybe OrcFormatVersion
a} :: OrcSerDe)
orcSerDe_blockSizeBytes :: Lens.Lens' OrcSerDe (Prelude.Maybe Prelude.Natural)
orcSerDe_blockSizeBytes :: (Maybe Natural -> f (Maybe Natural)) -> OrcSerDe -> f OrcSerDe
orcSerDe_blockSizeBytes = (OrcSerDe -> Maybe Natural)
-> (OrcSerDe -> Maybe Natural -> OrcSerDe)
-> Lens OrcSerDe OrcSerDe (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrcSerDe' {Maybe Natural
blockSizeBytes :: Maybe Natural
$sel:blockSizeBytes:OrcSerDe' :: OrcSerDe -> Maybe Natural
blockSizeBytes} -> Maybe Natural
blockSizeBytes) (\s :: OrcSerDe
s@OrcSerDe' {} Maybe Natural
a -> OrcSerDe
s {$sel:blockSizeBytes:OrcSerDe' :: Maybe Natural
blockSizeBytes = Maybe Natural
a} :: OrcSerDe)
orcSerDe_stripeSizeBytes :: Lens.Lens' OrcSerDe (Prelude.Maybe Prelude.Natural)
orcSerDe_stripeSizeBytes :: (Maybe Natural -> f (Maybe Natural)) -> OrcSerDe -> f OrcSerDe
orcSerDe_stripeSizeBytes = (OrcSerDe -> Maybe Natural)
-> (OrcSerDe -> Maybe Natural -> OrcSerDe)
-> Lens OrcSerDe OrcSerDe (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrcSerDe' {Maybe Natural
stripeSizeBytes :: Maybe Natural
$sel:stripeSizeBytes:OrcSerDe' :: OrcSerDe -> Maybe Natural
stripeSizeBytes} -> Maybe Natural
stripeSizeBytes) (\s :: OrcSerDe
s@OrcSerDe' {} Maybe Natural
a -> OrcSerDe
s {$sel:stripeSizeBytes:OrcSerDe' :: Maybe Natural
stripeSizeBytes = Maybe Natural
a} :: OrcSerDe)
orcSerDe_paddingTolerance :: Lens.Lens' OrcSerDe (Prelude.Maybe Prelude.Double)
orcSerDe_paddingTolerance :: (Maybe Double -> f (Maybe Double)) -> OrcSerDe -> f OrcSerDe
orcSerDe_paddingTolerance = (OrcSerDe -> Maybe Double)
-> (OrcSerDe -> Maybe Double -> OrcSerDe)
-> Lens OrcSerDe OrcSerDe (Maybe Double) (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OrcSerDe' {Maybe Double
paddingTolerance :: Maybe Double
$sel:paddingTolerance:OrcSerDe' :: OrcSerDe -> Maybe Double
paddingTolerance} -> Maybe Double
paddingTolerance) (\s :: OrcSerDe
s@OrcSerDe' {} Maybe Double
a -> OrcSerDe
s {$sel:paddingTolerance:OrcSerDe' :: Maybe Double
paddingTolerance = Maybe Double
a} :: OrcSerDe)
instance Core.FromJSON OrcSerDe where
parseJSON :: Value -> Parser OrcSerDe
parseJSON =
String -> (Object -> Parser OrcSerDe) -> Value -> Parser OrcSerDe
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"OrcSerDe"
( \Object
x ->
Maybe Double
-> Maybe Double
-> Maybe Bool
-> Maybe OrcCompression
-> Maybe [Text]
-> Maybe Natural
-> Maybe OrcFormatVersion
-> Maybe Natural
-> Maybe Natural
-> Maybe Double
-> OrcSerDe
OrcSerDe'
(Maybe Double
-> Maybe Double
-> Maybe Bool
-> Maybe OrcCompression
-> Maybe [Text]
-> Maybe Natural
-> Maybe OrcFormatVersion
-> Maybe Natural
-> Maybe Natural
-> Maybe Double
-> OrcSerDe)
-> Parser (Maybe Double)
-> Parser
(Maybe Double
-> Maybe Bool
-> Maybe OrcCompression
-> Maybe [Text]
-> Maybe Natural
-> Maybe OrcFormatVersion
-> Maybe Natural
-> Maybe Natural
-> Maybe Double
-> OrcSerDe)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"BloomFilterFalsePositiveProbability")
Parser
(Maybe Double
-> Maybe Bool
-> Maybe OrcCompression
-> Maybe [Text]
-> Maybe Natural
-> Maybe OrcFormatVersion
-> Maybe Natural
-> Maybe Natural
-> Maybe Double
-> OrcSerDe)
-> Parser (Maybe Double)
-> Parser
(Maybe Bool
-> Maybe OrcCompression
-> Maybe [Text]
-> Maybe Natural
-> Maybe OrcFormatVersion
-> Maybe Natural
-> Maybe Natural
-> Maybe Double
-> OrcSerDe)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DictionaryKeyThreshold")
Parser
(Maybe Bool
-> Maybe OrcCompression
-> Maybe [Text]
-> Maybe Natural
-> Maybe OrcFormatVersion
-> Maybe Natural
-> Maybe Natural
-> Maybe Double
-> OrcSerDe)
-> Parser (Maybe Bool)
-> Parser
(Maybe OrcCompression
-> Maybe [Text]
-> Maybe Natural
-> Maybe OrcFormatVersion
-> Maybe Natural
-> Maybe Natural
-> Maybe Double
-> OrcSerDe)
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
"EnablePadding")
Parser
(Maybe OrcCompression
-> Maybe [Text]
-> Maybe Natural
-> Maybe OrcFormatVersion
-> Maybe Natural
-> Maybe Natural
-> Maybe Double
-> OrcSerDe)
-> Parser (Maybe OrcCompression)
-> Parser
(Maybe [Text]
-> Maybe Natural
-> Maybe OrcFormatVersion
-> Maybe Natural
-> Maybe Natural
-> Maybe Double
-> OrcSerDe)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe OrcCompression)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Compression")
Parser
(Maybe [Text]
-> Maybe Natural
-> Maybe OrcFormatVersion
-> Maybe Natural
-> Maybe Natural
-> Maybe Double
-> OrcSerDe)
-> Parser (Maybe [Text])
-> Parser
(Maybe Natural
-> Maybe OrcFormatVersion
-> Maybe Natural
-> Maybe Natural
-> Maybe Double
-> OrcSerDe)
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
"BloomFilterColumns"
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 Natural
-> Maybe OrcFormatVersion
-> Maybe Natural
-> Maybe Natural
-> Maybe Double
-> OrcSerDe)
-> Parser (Maybe Natural)
-> Parser
(Maybe OrcFormatVersion
-> Maybe Natural -> Maybe Natural -> Maybe Double -> OrcSerDe)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RowIndexStride")
Parser
(Maybe OrcFormatVersion
-> Maybe Natural -> Maybe Natural -> Maybe Double -> OrcSerDe)
-> Parser (Maybe OrcFormatVersion)
-> Parser
(Maybe Natural -> Maybe Natural -> Maybe Double -> OrcSerDe)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe OrcFormatVersion)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"FormatVersion")
Parser (Maybe Natural -> Maybe Natural -> Maybe Double -> OrcSerDe)
-> Parser (Maybe Natural)
-> Parser (Maybe Natural -> Maybe Double -> OrcSerDe)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"BlockSizeBytes")
Parser (Maybe Natural -> Maybe Double -> OrcSerDe)
-> Parser (Maybe Natural) -> Parser (Maybe Double -> OrcSerDe)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StripeSizeBytes")
Parser (Maybe Double -> OrcSerDe)
-> Parser (Maybe Double) -> Parser OrcSerDe
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Double)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PaddingTolerance")
)
instance Prelude.Hashable OrcSerDe
instance Prelude.NFData OrcSerDe
instance Core.ToJSON OrcSerDe where
toJSON :: OrcSerDe -> Value
toJSON OrcSerDe' {Maybe Bool
Maybe Double
Maybe Natural
Maybe [Text]
Maybe OrcCompression
Maybe OrcFormatVersion
paddingTolerance :: Maybe Double
stripeSizeBytes :: Maybe Natural
blockSizeBytes :: Maybe Natural
formatVersion :: Maybe OrcFormatVersion
rowIndexStride :: Maybe Natural
bloomFilterColumns :: Maybe [Text]
compression :: Maybe OrcCompression
enablePadding :: Maybe Bool
dictionaryKeyThreshold :: Maybe Double
bloomFilterFalsePositiveProbability :: Maybe Double
$sel:paddingTolerance:OrcSerDe' :: OrcSerDe -> Maybe Double
$sel:stripeSizeBytes:OrcSerDe' :: OrcSerDe -> Maybe Natural
$sel:blockSizeBytes:OrcSerDe' :: OrcSerDe -> Maybe Natural
$sel:formatVersion:OrcSerDe' :: OrcSerDe -> Maybe OrcFormatVersion
$sel:rowIndexStride:OrcSerDe' :: OrcSerDe -> Maybe Natural
$sel:bloomFilterColumns:OrcSerDe' :: OrcSerDe -> Maybe [Text]
$sel:compression:OrcSerDe' :: OrcSerDe -> Maybe OrcCompression
$sel:enablePadding:OrcSerDe' :: OrcSerDe -> Maybe Bool
$sel:dictionaryKeyThreshold:OrcSerDe' :: OrcSerDe -> Maybe Double
$sel:bloomFilterFalsePositiveProbability:OrcSerDe' :: OrcSerDe -> Maybe Double
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"BloomFilterFalsePositiveProbability" Text -> Double -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Double -> Pair) -> Maybe Double -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Double
bloomFilterFalsePositiveProbability,
(Text
"DictionaryKeyThreshold" Text -> Double -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Double -> Pair) -> Maybe Double -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Double
dictionaryKeyThreshold,
(Text
"EnablePadding" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
enablePadding,
(Text
"Compression" Text -> OrcCompression -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (OrcCompression -> Pair) -> Maybe OrcCompression -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OrcCompression
compression,
(Text
"BloomFilterColumns" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([Text] -> Pair) -> Maybe [Text] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
bloomFilterColumns,
(Text
"RowIndexStride" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
rowIndexStride,
(Text
"FormatVersion" Text -> OrcFormatVersion -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (OrcFormatVersion -> Pair) -> Maybe OrcFormatVersion -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe OrcFormatVersion
formatVersion,
(Text
"BlockSizeBytes" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
blockSizeBytes,
(Text
"StripeSizeBytes" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
stripeSizeBytes,
(Text
"PaddingTolerance" Text -> Double -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Double -> Pair) -> Maybe Double -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Double
paddingTolerance
]
)