{-# 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.ColumnImportance where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ColumnImportance = ColumnImportance'
{
ColumnImportance -> Maybe Double
importance :: Prelude.Maybe Prelude.Double,
ColumnImportance -> Maybe Text
columnName :: Prelude.Maybe Prelude.Text
}
deriving (ColumnImportance -> ColumnImportance -> Bool
(ColumnImportance -> ColumnImportance -> Bool)
-> (ColumnImportance -> ColumnImportance -> Bool)
-> Eq ColumnImportance
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ColumnImportance -> ColumnImportance -> Bool
$c/= :: ColumnImportance -> ColumnImportance -> Bool
== :: ColumnImportance -> ColumnImportance -> Bool
$c== :: ColumnImportance -> ColumnImportance -> Bool
Prelude.Eq, ReadPrec [ColumnImportance]
ReadPrec ColumnImportance
Int -> ReadS ColumnImportance
ReadS [ColumnImportance]
(Int -> ReadS ColumnImportance)
-> ReadS [ColumnImportance]
-> ReadPrec ColumnImportance
-> ReadPrec [ColumnImportance]
-> Read ColumnImportance
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ColumnImportance]
$creadListPrec :: ReadPrec [ColumnImportance]
readPrec :: ReadPrec ColumnImportance
$creadPrec :: ReadPrec ColumnImportance
readList :: ReadS [ColumnImportance]
$creadList :: ReadS [ColumnImportance]
readsPrec :: Int -> ReadS ColumnImportance
$creadsPrec :: Int -> ReadS ColumnImportance
Prelude.Read, Int -> ColumnImportance -> ShowS
[ColumnImportance] -> ShowS
ColumnImportance -> String
(Int -> ColumnImportance -> ShowS)
-> (ColumnImportance -> String)
-> ([ColumnImportance] -> ShowS)
-> Show ColumnImportance
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ColumnImportance] -> ShowS
$cshowList :: [ColumnImportance] -> ShowS
show :: ColumnImportance -> String
$cshow :: ColumnImportance -> String
showsPrec :: Int -> ColumnImportance -> ShowS
$cshowsPrec :: Int -> ColumnImportance -> ShowS
Prelude.Show, (forall x. ColumnImportance -> Rep ColumnImportance x)
-> (forall x. Rep ColumnImportance x -> ColumnImportance)
-> Generic ColumnImportance
forall x. Rep ColumnImportance x -> ColumnImportance
forall x. ColumnImportance -> Rep ColumnImportance x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ColumnImportance x -> ColumnImportance
$cfrom :: forall x. ColumnImportance -> Rep ColumnImportance x
Prelude.Generic)
newColumnImportance ::
ColumnImportance
newColumnImportance :: ColumnImportance
newColumnImportance =
ColumnImportance' :: Maybe Double -> Maybe Text -> ColumnImportance
ColumnImportance'
{ $sel:importance:ColumnImportance' :: Maybe Double
importance = Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:columnName:ColumnImportance' :: Maybe Text
columnName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
columnImportance_importance :: Lens.Lens' ColumnImportance (Prelude.Maybe Prelude.Double)
columnImportance_importance :: (Maybe Double -> f (Maybe Double))
-> ColumnImportance -> f ColumnImportance
columnImportance_importance = (ColumnImportance -> Maybe Double)
-> (ColumnImportance -> Maybe Double -> ColumnImportance)
-> Lens
ColumnImportance ColumnImportance (Maybe Double) (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ColumnImportance' {Maybe Double
importance :: Maybe Double
$sel:importance:ColumnImportance' :: ColumnImportance -> Maybe Double
importance} -> Maybe Double
importance) (\s :: ColumnImportance
s@ColumnImportance' {} Maybe Double
a -> ColumnImportance
s {$sel:importance:ColumnImportance' :: Maybe Double
importance = Maybe Double
a} :: ColumnImportance)
columnImportance_columnName :: Lens.Lens' ColumnImportance (Prelude.Maybe Prelude.Text)
columnImportance_columnName :: (Maybe Text -> f (Maybe Text))
-> ColumnImportance -> f ColumnImportance
columnImportance_columnName = (ColumnImportance -> Maybe Text)
-> (ColumnImportance -> Maybe Text -> ColumnImportance)
-> Lens ColumnImportance ColumnImportance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ColumnImportance' {Maybe Text
columnName :: Maybe Text
$sel:columnName:ColumnImportance' :: ColumnImportance -> Maybe Text
columnName} -> Maybe Text
columnName) (\s :: ColumnImportance
s@ColumnImportance' {} Maybe Text
a -> ColumnImportance
s {$sel:columnName:ColumnImportance' :: Maybe Text
columnName = Maybe Text
a} :: ColumnImportance)
instance Core.FromJSON ColumnImportance where
parseJSON :: Value -> Parser ColumnImportance
parseJSON =
String
-> (Object -> Parser ColumnImportance)
-> Value
-> Parser ColumnImportance
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ColumnImportance"
( \Object
x ->
Maybe Double -> Maybe Text -> ColumnImportance
ColumnImportance'
(Maybe Double -> Maybe Text -> ColumnImportance)
-> Parser (Maybe Double) -> Parser (Maybe Text -> ColumnImportance)
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
"Importance")
Parser (Maybe Text -> ColumnImportance)
-> Parser (Maybe Text) -> Parser ColumnImportance
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
"ColumnName")
)
instance Prelude.Hashable ColumnImportance
instance Prelude.NFData ColumnImportance