{-# 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.Glue.Types.StorageDescriptor where
import qualified Amazonka.Core as Core
import Amazonka.Glue.Types.Column
import Amazonka.Glue.Types.Order
import Amazonka.Glue.Types.SchemaReference
import Amazonka.Glue.Types.SerDeInfo
import Amazonka.Glue.Types.SkewedInfo
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data StorageDescriptor = StorageDescriptor'
{
StorageDescriptor -> Maybe [Order]
sortColumns :: Prelude.Maybe [Order],
StorageDescriptor -> Maybe Bool
compressed :: Prelude.Maybe Prelude.Bool,
StorageDescriptor -> Maybe Text
location :: Prelude.Maybe Prelude.Text,
StorageDescriptor -> Maybe [Text]
bucketColumns :: Prelude.Maybe [Prelude.Text],
StorageDescriptor -> Maybe SerDeInfo
serdeInfo :: Prelude.Maybe SerDeInfo,
StorageDescriptor -> Maybe Text
outputFormat :: Prelude.Maybe Prelude.Text,
StorageDescriptor -> Maybe Int
numberOfBuckets :: Prelude.Maybe Prelude.Int,
StorageDescriptor -> Maybe SchemaReference
schemaReference :: Prelude.Maybe SchemaReference,
StorageDescriptor -> Maybe Bool
storedAsSubDirectories :: Prelude.Maybe Prelude.Bool,
StorageDescriptor -> Maybe (HashMap Text Text)
parameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
StorageDescriptor -> Maybe Text
inputFormat :: Prelude.Maybe Prelude.Text,
StorageDescriptor -> Maybe SkewedInfo
skewedInfo :: Prelude.Maybe SkewedInfo,
StorageDescriptor -> Maybe [Column]
columns :: Prelude.Maybe [Column]
}
deriving (StorageDescriptor -> StorageDescriptor -> Bool
(StorageDescriptor -> StorageDescriptor -> Bool)
-> (StorageDescriptor -> StorageDescriptor -> Bool)
-> Eq StorageDescriptor
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StorageDescriptor -> StorageDescriptor -> Bool
$c/= :: StorageDescriptor -> StorageDescriptor -> Bool
== :: StorageDescriptor -> StorageDescriptor -> Bool
$c== :: StorageDescriptor -> StorageDescriptor -> Bool
Prelude.Eq, ReadPrec [StorageDescriptor]
ReadPrec StorageDescriptor
Int -> ReadS StorageDescriptor
ReadS [StorageDescriptor]
(Int -> ReadS StorageDescriptor)
-> ReadS [StorageDescriptor]
-> ReadPrec StorageDescriptor
-> ReadPrec [StorageDescriptor]
-> Read StorageDescriptor
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StorageDescriptor]
$creadListPrec :: ReadPrec [StorageDescriptor]
readPrec :: ReadPrec StorageDescriptor
$creadPrec :: ReadPrec StorageDescriptor
readList :: ReadS [StorageDescriptor]
$creadList :: ReadS [StorageDescriptor]
readsPrec :: Int -> ReadS StorageDescriptor
$creadsPrec :: Int -> ReadS StorageDescriptor
Prelude.Read, Int -> StorageDescriptor -> ShowS
[StorageDescriptor] -> ShowS
StorageDescriptor -> String
(Int -> StorageDescriptor -> ShowS)
-> (StorageDescriptor -> String)
-> ([StorageDescriptor] -> ShowS)
-> Show StorageDescriptor
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StorageDescriptor] -> ShowS
$cshowList :: [StorageDescriptor] -> ShowS
show :: StorageDescriptor -> String
$cshow :: StorageDescriptor -> String
showsPrec :: Int -> StorageDescriptor -> ShowS
$cshowsPrec :: Int -> StorageDescriptor -> ShowS
Prelude.Show, (forall x. StorageDescriptor -> Rep StorageDescriptor x)
-> (forall x. Rep StorageDescriptor x -> StorageDescriptor)
-> Generic StorageDescriptor
forall x. Rep StorageDescriptor x -> StorageDescriptor
forall x. StorageDescriptor -> Rep StorageDescriptor x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StorageDescriptor x -> StorageDescriptor
$cfrom :: forall x. StorageDescriptor -> Rep StorageDescriptor x
Prelude.Generic)
newStorageDescriptor ::
StorageDescriptor
newStorageDescriptor :: StorageDescriptor
newStorageDescriptor =
StorageDescriptor' :: Maybe [Order]
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe SerDeInfo
-> Maybe Text
-> Maybe Int
-> Maybe SchemaReference
-> Maybe Bool
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe SkewedInfo
-> Maybe [Column]
-> StorageDescriptor
StorageDescriptor'
{ $sel:sortColumns:StorageDescriptor' :: Maybe [Order]
sortColumns = Maybe [Order]
forall a. Maybe a
Prelude.Nothing,
$sel:compressed:StorageDescriptor' :: Maybe Bool
compressed = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:location:StorageDescriptor' :: Maybe Text
location = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:bucketColumns:StorageDescriptor' :: Maybe [Text]
bucketColumns = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:serdeInfo:StorageDescriptor' :: Maybe SerDeInfo
serdeInfo = Maybe SerDeInfo
forall a. Maybe a
Prelude.Nothing,
$sel:outputFormat:StorageDescriptor' :: Maybe Text
outputFormat = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:numberOfBuckets:StorageDescriptor' :: Maybe Int
numberOfBuckets = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:schemaReference:StorageDescriptor' :: Maybe SchemaReference
schemaReference = Maybe SchemaReference
forall a. Maybe a
Prelude.Nothing,
$sel:storedAsSubDirectories:StorageDescriptor' :: Maybe Bool
storedAsSubDirectories = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:parameters:StorageDescriptor' :: Maybe (HashMap Text Text)
parameters = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:inputFormat:StorageDescriptor' :: Maybe Text
inputFormat = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:skewedInfo:StorageDescriptor' :: Maybe SkewedInfo
skewedInfo = Maybe SkewedInfo
forall a. Maybe a
Prelude.Nothing,
$sel:columns:StorageDescriptor' :: Maybe [Column]
columns = Maybe [Column]
forall a. Maybe a
Prelude.Nothing
}
storageDescriptor_sortColumns :: Lens.Lens' StorageDescriptor (Prelude.Maybe [Order])
storageDescriptor_sortColumns :: (Maybe [Order] -> f (Maybe [Order]))
-> StorageDescriptor -> f StorageDescriptor
storageDescriptor_sortColumns = (StorageDescriptor -> Maybe [Order])
-> (StorageDescriptor -> Maybe [Order] -> StorageDescriptor)
-> Lens
StorageDescriptor StorageDescriptor (Maybe [Order]) (Maybe [Order])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StorageDescriptor' {Maybe [Order]
sortColumns :: Maybe [Order]
$sel:sortColumns:StorageDescriptor' :: StorageDescriptor -> Maybe [Order]
sortColumns} -> Maybe [Order]
sortColumns) (\s :: StorageDescriptor
s@StorageDescriptor' {} Maybe [Order]
a -> StorageDescriptor
s {$sel:sortColumns:StorageDescriptor' :: Maybe [Order]
sortColumns = Maybe [Order]
a} :: StorageDescriptor) ((Maybe [Order] -> f (Maybe [Order]))
-> StorageDescriptor -> f StorageDescriptor)
-> ((Maybe [Order] -> f (Maybe [Order]))
-> Maybe [Order] -> f (Maybe [Order]))
-> (Maybe [Order] -> f (Maybe [Order]))
-> StorageDescriptor
-> f StorageDescriptor
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Order] [Order] [Order] [Order]
-> Iso
(Maybe [Order]) (Maybe [Order]) (Maybe [Order]) (Maybe [Order])
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 [Order] [Order] [Order] [Order]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
storageDescriptor_compressed :: Lens.Lens' StorageDescriptor (Prelude.Maybe Prelude.Bool)
storageDescriptor_compressed :: (Maybe Bool -> f (Maybe Bool))
-> StorageDescriptor -> f StorageDescriptor
storageDescriptor_compressed = (StorageDescriptor -> Maybe Bool)
-> (StorageDescriptor -> Maybe Bool -> StorageDescriptor)
-> Lens
StorageDescriptor StorageDescriptor (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StorageDescriptor' {Maybe Bool
compressed :: Maybe Bool
$sel:compressed:StorageDescriptor' :: StorageDescriptor -> Maybe Bool
compressed} -> Maybe Bool
compressed) (\s :: StorageDescriptor
s@StorageDescriptor' {} Maybe Bool
a -> StorageDescriptor
s {$sel:compressed:StorageDescriptor' :: Maybe Bool
compressed = Maybe Bool
a} :: StorageDescriptor)
storageDescriptor_location :: Lens.Lens' StorageDescriptor (Prelude.Maybe Prelude.Text)
storageDescriptor_location :: (Maybe Text -> f (Maybe Text))
-> StorageDescriptor -> f StorageDescriptor
storageDescriptor_location = (StorageDescriptor -> Maybe Text)
-> (StorageDescriptor -> Maybe Text -> StorageDescriptor)
-> Lens
StorageDescriptor StorageDescriptor (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StorageDescriptor' {Maybe Text
location :: Maybe Text
$sel:location:StorageDescriptor' :: StorageDescriptor -> Maybe Text
location} -> Maybe Text
location) (\s :: StorageDescriptor
s@StorageDescriptor' {} Maybe Text
a -> StorageDescriptor
s {$sel:location:StorageDescriptor' :: Maybe Text
location = Maybe Text
a} :: StorageDescriptor)
storageDescriptor_bucketColumns :: Lens.Lens' StorageDescriptor (Prelude.Maybe [Prelude.Text])
storageDescriptor_bucketColumns :: (Maybe [Text] -> f (Maybe [Text]))
-> StorageDescriptor -> f StorageDescriptor
storageDescriptor_bucketColumns = (StorageDescriptor -> Maybe [Text])
-> (StorageDescriptor -> Maybe [Text] -> StorageDescriptor)
-> Lens
StorageDescriptor StorageDescriptor (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StorageDescriptor' {Maybe [Text]
bucketColumns :: Maybe [Text]
$sel:bucketColumns:StorageDescriptor' :: StorageDescriptor -> Maybe [Text]
bucketColumns} -> Maybe [Text]
bucketColumns) (\s :: StorageDescriptor
s@StorageDescriptor' {} Maybe [Text]
a -> StorageDescriptor
s {$sel:bucketColumns:StorageDescriptor' :: Maybe [Text]
bucketColumns = Maybe [Text]
a} :: StorageDescriptor) ((Maybe [Text] -> f (Maybe [Text]))
-> StorageDescriptor -> f StorageDescriptor)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> StorageDescriptor
-> f StorageDescriptor
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
storageDescriptor_serdeInfo :: Lens.Lens' StorageDescriptor (Prelude.Maybe SerDeInfo)
storageDescriptor_serdeInfo :: (Maybe SerDeInfo -> f (Maybe SerDeInfo))
-> StorageDescriptor -> f StorageDescriptor
storageDescriptor_serdeInfo = (StorageDescriptor -> Maybe SerDeInfo)
-> (StorageDescriptor -> Maybe SerDeInfo -> StorageDescriptor)
-> Lens
StorageDescriptor
StorageDescriptor
(Maybe SerDeInfo)
(Maybe SerDeInfo)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StorageDescriptor' {Maybe SerDeInfo
serdeInfo :: Maybe SerDeInfo
$sel:serdeInfo:StorageDescriptor' :: StorageDescriptor -> Maybe SerDeInfo
serdeInfo} -> Maybe SerDeInfo
serdeInfo) (\s :: StorageDescriptor
s@StorageDescriptor' {} Maybe SerDeInfo
a -> StorageDescriptor
s {$sel:serdeInfo:StorageDescriptor' :: Maybe SerDeInfo
serdeInfo = Maybe SerDeInfo
a} :: StorageDescriptor)
storageDescriptor_outputFormat :: Lens.Lens' StorageDescriptor (Prelude.Maybe Prelude.Text)
storageDescriptor_outputFormat :: (Maybe Text -> f (Maybe Text))
-> StorageDescriptor -> f StorageDescriptor
storageDescriptor_outputFormat = (StorageDescriptor -> Maybe Text)
-> (StorageDescriptor -> Maybe Text -> StorageDescriptor)
-> Lens
StorageDescriptor StorageDescriptor (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StorageDescriptor' {Maybe Text
outputFormat :: Maybe Text
$sel:outputFormat:StorageDescriptor' :: StorageDescriptor -> Maybe Text
outputFormat} -> Maybe Text
outputFormat) (\s :: StorageDescriptor
s@StorageDescriptor' {} Maybe Text
a -> StorageDescriptor
s {$sel:outputFormat:StorageDescriptor' :: Maybe Text
outputFormat = Maybe Text
a} :: StorageDescriptor)
storageDescriptor_numberOfBuckets :: Lens.Lens' StorageDescriptor (Prelude.Maybe Prelude.Int)
storageDescriptor_numberOfBuckets :: (Maybe Int -> f (Maybe Int))
-> StorageDescriptor -> f StorageDescriptor
storageDescriptor_numberOfBuckets = (StorageDescriptor -> Maybe Int)
-> (StorageDescriptor -> Maybe Int -> StorageDescriptor)
-> Lens StorageDescriptor StorageDescriptor (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StorageDescriptor' {Maybe Int
numberOfBuckets :: Maybe Int
$sel:numberOfBuckets:StorageDescriptor' :: StorageDescriptor -> Maybe Int
numberOfBuckets} -> Maybe Int
numberOfBuckets) (\s :: StorageDescriptor
s@StorageDescriptor' {} Maybe Int
a -> StorageDescriptor
s {$sel:numberOfBuckets:StorageDescriptor' :: Maybe Int
numberOfBuckets = Maybe Int
a} :: StorageDescriptor)
storageDescriptor_schemaReference :: Lens.Lens' StorageDescriptor (Prelude.Maybe SchemaReference)
storageDescriptor_schemaReference :: (Maybe SchemaReference -> f (Maybe SchemaReference))
-> StorageDescriptor -> f StorageDescriptor
storageDescriptor_schemaReference = (StorageDescriptor -> Maybe SchemaReference)
-> (StorageDescriptor
-> Maybe SchemaReference -> StorageDescriptor)
-> Lens
StorageDescriptor
StorageDescriptor
(Maybe SchemaReference)
(Maybe SchemaReference)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StorageDescriptor' {Maybe SchemaReference
schemaReference :: Maybe SchemaReference
$sel:schemaReference:StorageDescriptor' :: StorageDescriptor -> Maybe SchemaReference
schemaReference} -> Maybe SchemaReference
schemaReference) (\s :: StorageDescriptor
s@StorageDescriptor' {} Maybe SchemaReference
a -> StorageDescriptor
s {$sel:schemaReference:StorageDescriptor' :: Maybe SchemaReference
schemaReference = Maybe SchemaReference
a} :: StorageDescriptor)
storageDescriptor_storedAsSubDirectories :: Lens.Lens' StorageDescriptor (Prelude.Maybe Prelude.Bool)
storageDescriptor_storedAsSubDirectories :: (Maybe Bool -> f (Maybe Bool))
-> StorageDescriptor -> f StorageDescriptor
storageDescriptor_storedAsSubDirectories = (StorageDescriptor -> Maybe Bool)
-> (StorageDescriptor -> Maybe Bool -> StorageDescriptor)
-> Lens
StorageDescriptor StorageDescriptor (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StorageDescriptor' {Maybe Bool
storedAsSubDirectories :: Maybe Bool
$sel:storedAsSubDirectories:StorageDescriptor' :: StorageDescriptor -> Maybe Bool
storedAsSubDirectories} -> Maybe Bool
storedAsSubDirectories) (\s :: StorageDescriptor
s@StorageDescriptor' {} Maybe Bool
a -> StorageDescriptor
s {$sel:storedAsSubDirectories:StorageDescriptor' :: Maybe Bool
storedAsSubDirectories = Maybe Bool
a} :: StorageDescriptor)
storageDescriptor_parameters :: Lens.Lens' StorageDescriptor (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
storageDescriptor_parameters :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> StorageDescriptor -> f StorageDescriptor
storageDescriptor_parameters = (StorageDescriptor -> Maybe (HashMap Text Text))
-> (StorageDescriptor
-> Maybe (HashMap Text Text) -> StorageDescriptor)
-> Lens
StorageDescriptor
StorageDescriptor
(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 (\StorageDescriptor' {Maybe (HashMap Text Text)
parameters :: Maybe (HashMap Text Text)
$sel:parameters:StorageDescriptor' :: StorageDescriptor -> Maybe (HashMap Text Text)
parameters} -> Maybe (HashMap Text Text)
parameters) (\s :: StorageDescriptor
s@StorageDescriptor' {} Maybe (HashMap Text Text)
a -> StorageDescriptor
s {$sel:parameters:StorageDescriptor' :: Maybe (HashMap Text Text)
parameters = Maybe (HashMap Text Text)
a} :: StorageDescriptor) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> StorageDescriptor -> f StorageDescriptor)
-> ((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)))
-> StorageDescriptor
-> f StorageDescriptor
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
storageDescriptor_inputFormat :: Lens.Lens' StorageDescriptor (Prelude.Maybe Prelude.Text)
storageDescriptor_inputFormat :: (Maybe Text -> f (Maybe Text))
-> StorageDescriptor -> f StorageDescriptor
storageDescriptor_inputFormat = (StorageDescriptor -> Maybe Text)
-> (StorageDescriptor -> Maybe Text -> StorageDescriptor)
-> Lens
StorageDescriptor StorageDescriptor (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StorageDescriptor' {Maybe Text
inputFormat :: Maybe Text
$sel:inputFormat:StorageDescriptor' :: StorageDescriptor -> Maybe Text
inputFormat} -> Maybe Text
inputFormat) (\s :: StorageDescriptor
s@StorageDescriptor' {} Maybe Text
a -> StorageDescriptor
s {$sel:inputFormat:StorageDescriptor' :: Maybe Text
inputFormat = Maybe Text
a} :: StorageDescriptor)
storageDescriptor_skewedInfo :: Lens.Lens' StorageDescriptor (Prelude.Maybe SkewedInfo)
storageDescriptor_skewedInfo :: (Maybe SkewedInfo -> f (Maybe SkewedInfo))
-> StorageDescriptor -> f StorageDescriptor
storageDescriptor_skewedInfo = (StorageDescriptor -> Maybe SkewedInfo)
-> (StorageDescriptor -> Maybe SkewedInfo -> StorageDescriptor)
-> Lens
StorageDescriptor
StorageDescriptor
(Maybe SkewedInfo)
(Maybe SkewedInfo)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StorageDescriptor' {Maybe SkewedInfo
skewedInfo :: Maybe SkewedInfo
$sel:skewedInfo:StorageDescriptor' :: StorageDescriptor -> Maybe SkewedInfo
skewedInfo} -> Maybe SkewedInfo
skewedInfo) (\s :: StorageDescriptor
s@StorageDescriptor' {} Maybe SkewedInfo
a -> StorageDescriptor
s {$sel:skewedInfo:StorageDescriptor' :: Maybe SkewedInfo
skewedInfo = Maybe SkewedInfo
a} :: StorageDescriptor)
storageDescriptor_columns :: Lens.Lens' StorageDescriptor (Prelude.Maybe [Column])
storageDescriptor_columns :: (Maybe [Column] -> f (Maybe [Column]))
-> StorageDescriptor -> f StorageDescriptor
storageDescriptor_columns = (StorageDescriptor -> Maybe [Column])
-> (StorageDescriptor -> Maybe [Column] -> StorageDescriptor)
-> Lens
StorageDescriptor
StorageDescriptor
(Maybe [Column])
(Maybe [Column])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StorageDescriptor' {Maybe [Column]
columns :: Maybe [Column]
$sel:columns:StorageDescriptor' :: StorageDescriptor -> Maybe [Column]
columns} -> Maybe [Column]
columns) (\s :: StorageDescriptor
s@StorageDescriptor' {} Maybe [Column]
a -> StorageDescriptor
s {$sel:columns:StorageDescriptor' :: Maybe [Column]
columns = Maybe [Column]
a} :: StorageDescriptor) ((Maybe [Column] -> f (Maybe [Column]))
-> StorageDescriptor -> f StorageDescriptor)
-> ((Maybe [Column] -> f (Maybe [Column]))
-> Maybe [Column] -> f (Maybe [Column]))
-> (Maybe [Column] -> f (Maybe [Column]))
-> StorageDescriptor
-> f StorageDescriptor
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Column] [Column] [Column] [Column]
-> Iso
(Maybe [Column]) (Maybe [Column]) (Maybe [Column]) (Maybe [Column])
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 [Column] [Column] [Column] [Column]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromJSON StorageDescriptor where
parseJSON :: Value -> Parser StorageDescriptor
parseJSON =
String
-> (Object -> Parser StorageDescriptor)
-> Value
-> Parser StorageDescriptor
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"StorageDescriptor"
( \Object
x ->
Maybe [Order]
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe SerDeInfo
-> Maybe Text
-> Maybe Int
-> Maybe SchemaReference
-> Maybe Bool
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe SkewedInfo
-> Maybe [Column]
-> StorageDescriptor
StorageDescriptor'
(Maybe [Order]
-> Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe SerDeInfo
-> Maybe Text
-> Maybe Int
-> Maybe SchemaReference
-> Maybe Bool
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe SkewedInfo
-> Maybe [Column]
-> StorageDescriptor)
-> Parser (Maybe [Order])
-> Parser
(Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe SerDeInfo
-> Maybe Text
-> Maybe Int
-> Maybe SchemaReference
-> Maybe Bool
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe SkewedInfo
-> Maybe [Column]
-> StorageDescriptor)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe (Maybe [Order]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SortColumns" Parser (Maybe (Maybe [Order]))
-> Maybe [Order] -> Parser (Maybe [Order])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Order]
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe Bool
-> Maybe Text
-> Maybe [Text]
-> Maybe SerDeInfo
-> Maybe Text
-> Maybe Int
-> Maybe SchemaReference
-> Maybe Bool
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe SkewedInfo
-> Maybe [Column]
-> StorageDescriptor)
-> Parser (Maybe Bool)
-> Parser
(Maybe Text
-> Maybe [Text]
-> Maybe SerDeInfo
-> Maybe Text
-> Maybe Int
-> Maybe SchemaReference
-> Maybe Bool
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe SkewedInfo
-> Maybe [Column]
-> StorageDescriptor)
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
"Compressed")
Parser
(Maybe Text
-> Maybe [Text]
-> Maybe SerDeInfo
-> Maybe Text
-> Maybe Int
-> Maybe SchemaReference
-> Maybe Bool
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe SkewedInfo
-> Maybe [Column]
-> StorageDescriptor)
-> Parser (Maybe Text)
-> Parser
(Maybe [Text]
-> Maybe SerDeInfo
-> Maybe Text
-> Maybe Int
-> Maybe SchemaReference
-> Maybe Bool
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe SkewedInfo
-> Maybe [Column]
-> StorageDescriptor)
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
"Location")
Parser
(Maybe [Text]
-> Maybe SerDeInfo
-> Maybe Text
-> Maybe Int
-> Maybe SchemaReference
-> Maybe Bool
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe SkewedInfo
-> Maybe [Column]
-> StorageDescriptor)
-> Parser (Maybe [Text])
-> Parser
(Maybe SerDeInfo
-> Maybe Text
-> Maybe Int
-> Maybe SchemaReference
-> Maybe Bool
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe SkewedInfo
-> Maybe [Column]
-> StorageDescriptor)
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
"BucketColumns" 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 SerDeInfo
-> Maybe Text
-> Maybe Int
-> Maybe SchemaReference
-> Maybe Bool
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe SkewedInfo
-> Maybe [Column]
-> StorageDescriptor)
-> Parser (Maybe SerDeInfo)
-> Parser
(Maybe Text
-> Maybe Int
-> Maybe SchemaReference
-> Maybe Bool
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe SkewedInfo
-> Maybe [Column]
-> StorageDescriptor)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe SerDeInfo)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SerdeInfo")
Parser
(Maybe Text
-> Maybe Int
-> Maybe SchemaReference
-> Maybe Bool
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe SkewedInfo
-> Maybe [Column]
-> StorageDescriptor)
-> Parser (Maybe Text)
-> Parser
(Maybe Int
-> Maybe SchemaReference
-> Maybe Bool
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe SkewedInfo
-> Maybe [Column]
-> StorageDescriptor)
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
"OutputFormat")
Parser
(Maybe Int
-> Maybe SchemaReference
-> Maybe Bool
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe SkewedInfo
-> Maybe [Column]
-> StorageDescriptor)
-> Parser (Maybe Int)
-> Parser
(Maybe SchemaReference
-> Maybe Bool
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe SkewedInfo
-> Maybe [Column]
-> StorageDescriptor)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NumberOfBuckets")
Parser
(Maybe SchemaReference
-> Maybe Bool
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe SkewedInfo
-> Maybe [Column]
-> StorageDescriptor)
-> Parser (Maybe SchemaReference)
-> Parser
(Maybe Bool
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe SkewedInfo
-> Maybe [Column]
-> StorageDescriptor)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe SchemaReference)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SchemaReference")
Parser
(Maybe Bool
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe SkewedInfo
-> Maybe [Column]
-> StorageDescriptor)
-> Parser (Maybe Bool)
-> Parser
(Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe SkewedInfo
-> Maybe [Column]
-> StorageDescriptor)
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
"StoredAsSubDirectories")
Parser
(Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe SkewedInfo
-> Maybe [Column]
-> StorageDescriptor)
-> Parser (Maybe (HashMap Text Text))
-> Parser
(Maybe Text
-> Maybe SkewedInfo -> Maybe [Column] -> StorageDescriptor)
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 Text
-> Maybe SkewedInfo -> Maybe [Column] -> StorageDescriptor)
-> Parser (Maybe Text)
-> Parser (Maybe SkewedInfo -> Maybe [Column] -> StorageDescriptor)
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
"InputFormat")
Parser (Maybe SkewedInfo -> Maybe [Column] -> StorageDescriptor)
-> Parser (Maybe SkewedInfo)
-> Parser (Maybe [Column] -> StorageDescriptor)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe SkewedInfo)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SkewedInfo")
Parser (Maybe [Column] -> StorageDescriptor)
-> Parser (Maybe [Column]) -> Parser StorageDescriptor
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Column]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Columns" Parser (Maybe (Maybe [Column]))
-> Maybe [Column] -> Parser (Maybe [Column])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Column]
forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable StorageDescriptor
instance Prelude.NFData StorageDescriptor
instance Core.ToJSON StorageDescriptor where
toJSON :: StorageDescriptor -> Value
toJSON StorageDescriptor' {Maybe Bool
Maybe Int
Maybe [Text]
Maybe [Column]
Maybe [Order]
Maybe Text
Maybe (HashMap Text Text)
Maybe SchemaReference
Maybe SerDeInfo
Maybe SkewedInfo
columns :: Maybe [Column]
skewedInfo :: Maybe SkewedInfo
inputFormat :: Maybe Text
parameters :: Maybe (HashMap Text Text)
storedAsSubDirectories :: Maybe Bool
schemaReference :: Maybe SchemaReference
numberOfBuckets :: Maybe Int
outputFormat :: Maybe Text
serdeInfo :: Maybe SerDeInfo
bucketColumns :: Maybe [Text]
location :: Maybe Text
compressed :: Maybe Bool
sortColumns :: Maybe [Order]
$sel:columns:StorageDescriptor' :: StorageDescriptor -> Maybe [Column]
$sel:skewedInfo:StorageDescriptor' :: StorageDescriptor -> Maybe SkewedInfo
$sel:inputFormat:StorageDescriptor' :: StorageDescriptor -> Maybe Text
$sel:parameters:StorageDescriptor' :: StorageDescriptor -> Maybe (HashMap Text Text)
$sel:storedAsSubDirectories:StorageDescriptor' :: StorageDescriptor -> Maybe Bool
$sel:schemaReference:StorageDescriptor' :: StorageDescriptor -> Maybe SchemaReference
$sel:numberOfBuckets:StorageDescriptor' :: StorageDescriptor -> Maybe Int
$sel:outputFormat:StorageDescriptor' :: StorageDescriptor -> Maybe Text
$sel:serdeInfo:StorageDescriptor' :: StorageDescriptor -> Maybe SerDeInfo
$sel:bucketColumns:StorageDescriptor' :: StorageDescriptor -> Maybe [Text]
$sel:location:StorageDescriptor' :: StorageDescriptor -> Maybe Text
$sel:compressed:StorageDescriptor' :: StorageDescriptor -> Maybe Bool
$sel:sortColumns:StorageDescriptor' :: StorageDescriptor -> Maybe [Order]
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"SortColumns" Text -> [Order] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Order] -> Pair) -> Maybe [Order] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Order]
sortColumns,
(Text
"Compressed" 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
compressed,
(Text
"Location" 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
location,
(Text
"BucketColumns" 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]
bucketColumns,
(Text
"SerdeInfo" Text -> SerDeInfo -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (SerDeInfo -> Pair) -> Maybe SerDeInfo -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SerDeInfo
serdeInfo,
(Text
"OutputFormat" 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
outputFormat,
(Text
"NumberOfBuckets" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
numberOfBuckets,
(Text
"SchemaReference" Text -> SchemaReference -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(SchemaReference -> Pair) -> Maybe SchemaReference -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SchemaReference
schemaReference,
(Text
"StoredAsSubDirectories" 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
storedAsSubDirectories,
(Text
"Parameters" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
parameters,
(Text
"InputFormat" 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
inputFormat,
(Text
"SkewedInfo" Text -> SkewedInfo -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (SkewedInfo -> Pair) -> Maybe SkewedInfo -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SkewedInfo
skewedInfo,
(Text
"Columns" Text -> [Column] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Column] -> Pair) -> Maybe [Column] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Column]
columns
]
)