{-# 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.GrokClassifier where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data GrokClassifier = GrokClassifier'
{
GrokClassifier -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
GrokClassifier -> Maybe POSIX
lastUpdated :: Prelude.Maybe Core.POSIX,
GrokClassifier -> Maybe Integer
version :: Prelude.Maybe Prelude.Integer,
GrokClassifier -> Maybe Text
customPatterns :: Prelude.Maybe Prelude.Text,
GrokClassifier -> Text
name :: Prelude.Text,
GrokClassifier -> Text
classification :: Prelude.Text,
GrokClassifier -> Text
grokPattern :: Prelude.Text
}
deriving (GrokClassifier -> GrokClassifier -> Bool
(GrokClassifier -> GrokClassifier -> Bool)
-> (GrokClassifier -> GrokClassifier -> Bool) -> Eq GrokClassifier
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GrokClassifier -> GrokClassifier -> Bool
$c/= :: GrokClassifier -> GrokClassifier -> Bool
== :: GrokClassifier -> GrokClassifier -> Bool
$c== :: GrokClassifier -> GrokClassifier -> Bool
Prelude.Eq, ReadPrec [GrokClassifier]
ReadPrec GrokClassifier
Int -> ReadS GrokClassifier
ReadS [GrokClassifier]
(Int -> ReadS GrokClassifier)
-> ReadS [GrokClassifier]
-> ReadPrec GrokClassifier
-> ReadPrec [GrokClassifier]
-> Read GrokClassifier
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GrokClassifier]
$creadListPrec :: ReadPrec [GrokClassifier]
readPrec :: ReadPrec GrokClassifier
$creadPrec :: ReadPrec GrokClassifier
readList :: ReadS [GrokClassifier]
$creadList :: ReadS [GrokClassifier]
readsPrec :: Int -> ReadS GrokClassifier
$creadsPrec :: Int -> ReadS GrokClassifier
Prelude.Read, Int -> GrokClassifier -> ShowS
[GrokClassifier] -> ShowS
GrokClassifier -> String
(Int -> GrokClassifier -> ShowS)
-> (GrokClassifier -> String)
-> ([GrokClassifier] -> ShowS)
-> Show GrokClassifier
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GrokClassifier] -> ShowS
$cshowList :: [GrokClassifier] -> ShowS
show :: GrokClassifier -> String
$cshow :: GrokClassifier -> String
showsPrec :: Int -> GrokClassifier -> ShowS
$cshowsPrec :: Int -> GrokClassifier -> ShowS
Prelude.Show, (forall x. GrokClassifier -> Rep GrokClassifier x)
-> (forall x. Rep GrokClassifier x -> GrokClassifier)
-> Generic GrokClassifier
forall x. Rep GrokClassifier x -> GrokClassifier
forall x. GrokClassifier -> Rep GrokClassifier x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GrokClassifier x -> GrokClassifier
$cfrom :: forall x. GrokClassifier -> Rep GrokClassifier x
Prelude.Generic)
newGrokClassifier ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
GrokClassifier
newGrokClassifier :: Text -> Text -> Text -> GrokClassifier
newGrokClassifier
Text
pName_
Text
pClassification_
Text
pGrokPattern_ =
GrokClassifier' :: Maybe POSIX
-> Maybe POSIX
-> Maybe Integer
-> Maybe Text
-> Text
-> Text
-> Text
-> GrokClassifier
GrokClassifier'
{ $sel:creationTime:GrokClassifier' :: Maybe POSIX
creationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdated:GrokClassifier' :: Maybe POSIX
lastUpdated = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:version:GrokClassifier' :: Maybe Integer
version = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:customPatterns:GrokClassifier' :: Maybe Text
customPatterns = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:GrokClassifier' :: Text
name = Text
pName_,
$sel:classification:GrokClassifier' :: Text
classification = Text
pClassification_,
$sel:grokPattern:GrokClassifier' :: Text
grokPattern = Text
pGrokPattern_
}
grokClassifier_creationTime :: Lens.Lens' GrokClassifier (Prelude.Maybe Prelude.UTCTime)
grokClassifier_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GrokClassifier -> f GrokClassifier
grokClassifier_creationTime = (GrokClassifier -> Maybe POSIX)
-> (GrokClassifier -> Maybe POSIX -> GrokClassifier)
-> Lens GrokClassifier GrokClassifier (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GrokClassifier' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:GrokClassifier' :: GrokClassifier -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: GrokClassifier
s@GrokClassifier' {} Maybe POSIX
a -> GrokClassifier
s {$sel:creationTime:GrokClassifier' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: GrokClassifier) ((Maybe POSIX -> f (Maybe POSIX))
-> GrokClassifier -> f GrokClassifier)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GrokClassifier
-> f GrokClassifier
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
grokClassifier_lastUpdated :: Lens.Lens' GrokClassifier (Prelude.Maybe Prelude.UTCTime)
grokClassifier_lastUpdated :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GrokClassifier -> f GrokClassifier
grokClassifier_lastUpdated = (GrokClassifier -> Maybe POSIX)
-> (GrokClassifier -> Maybe POSIX -> GrokClassifier)
-> Lens GrokClassifier GrokClassifier (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GrokClassifier' {Maybe POSIX
lastUpdated :: Maybe POSIX
$sel:lastUpdated:GrokClassifier' :: GrokClassifier -> Maybe POSIX
lastUpdated} -> Maybe POSIX
lastUpdated) (\s :: GrokClassifier
s@GrokClassifier' {} Maybe POSIX
a -> GrokClassifier
s {$sel:lastUpdated:GrokClassifier' :: Maybe POSIX
lastUpdated = Maybe POSIX
a} :: GrokClassifier) ((Maybe POSIX -> f (Maybe POSIX))
-> GrokClassifier -> f GrokClassifier)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GrokClassifier
-> f GrokClassifier
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
grokClassifier_version :: Lens.Lens' GrokClassifier (Prelude.Maybe Prelude.Integer)
grokClassifier_version :: (Maybe Integer -> f (Maybe Integer))
-> GrokClassifier -> f GrokClassifier
grokClassifier_version = (GrokClassifier -> Maybe Integer)
-> (GrokClassifier -> Maybe Integer -> GrokClassifier)
-> Lens
GrokClassifier GrokClassifier (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GrokClassifier' {Maybe Integer
version :: Maybe Integer
$sel:version:GrokClassifier' :: GrokClassifier -> Maybe Integer
version} -> Maybe Integer
version) (\s :: GrokClassifier
s@GrokClassifier' {} Maybe Integer
a -> GrokClassifier
s {$sel:version:GrokClassifier' :: Maybe Integer
version = Maybe Integer
a} :: GrokClassifier)
grokClassifier_customPatterns :: Lens.Lens' GrokClassifier (Prelude.Maybe Prelude.Text)
grokClassifier_customPatterns :: (Maybe Text -> f (Maybe Text))
-> GrokClassifier -> f GrokClassifier
grokClassifier_customPatterns = (GrokClassifier -> Maybe Text)
-> (GrokClassifier -> Maybe Text -> GrokClassifier)
-> Lens GrokClassifier GrokClassifier (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GrokClassifier' {Maybe Text
customPatterns :: Maybe Text
$sel:customPatterns:GrokClassifier' :: GrokClassifier -> Maybe Text
customPatterns} -> Maybe Text
customPatterns) (\s :: GrokClassifier
s@GrokClassifier' {} Maybe Text
a -> GrokClassifier
s {$sel:customPatterns:GrokClassifier' :: Maybe Text
customPatterns = Maybe Text
a} :: GrokClassifier)
grokClassifier_name :: Lens.Lens' GrokClassifier Prelude.Text
grokClassifier_name :: (Text -> f Text) -> GrokClassifier -> f GrokClassifier
grokClassifier_name = (GrokClassifier -> Text)
-> (GrokClassifier -> Text -> GrokClassifier)
-> Lens GrokClassifier GrokClassifier Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GrokClassifier' {Text
name :: Text
$sel:name:GrokClassifier' :: GrokClassifier -> Text
name} -> Text
name) (\s :: GrokClassifier
s@GrokClassifier' {} Text
a -> GrokClassifier
s {$sel:name:GrokClassifier' :: Text
name = Text
a} :: GrokClassifier)
grokClassifier_classification :: Lens.Lens' GrokClassifier Prelude.Text
grokClassifier_classification :: (Text -> f Text) -> GrokClassifier -> f GrokClassifier
grokClassifier_classification = (GrokClassifier -> Text)
-> (GrokClassifier -> Text -> GrokClassifier)
-> Lens GrokClassifier GrokClassifier Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GrokClassifier' {Text
classification :: Text
$sel:classification:GrokClassifier' :: GrokClassifier -> Text
classification} -> Text
classification) (\s :: GrokClassifier
s@GrokClassifier' {} Text
a -> GrokClassifier
s {$sel:classification:GrokClassifier' :: Text
classification = Text
a} :: GrokClassifier)
grokClassifier_grokPattern :: Lens.Lens' GrokClassifier Prelude.Text
grokClassifier_grokPattern :: (Text -> f Text) -> GrokClassifier -> f GrokClassifier
grokClassifier_grokPattern = (GrokClassifier -> Text)
-> (GrokClassifier -> Text -> GrokClassifier)
-> Lens GrokClassifier GrokClassifier Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GrokClassifier' {Text
grokPattern :: Text
$sel:grokPattern:GrokClassifier' :: GrokClassifier -> Text
grokPattern} -> Text
grokPattern) (\s :: GrokClassifier
s@GrokClassifier' {} Text
a -> GrokClassifier
s {$sel:grokPattern:GrokClassifier' :: Text
grokPattern = Text
a} :: GrokClassifier)
instance Core.FromJSON GrokClassifier where
parseJSON :: Value -> Parser GrokClassifier
parseJSON =
String
-> (Object -> Parser GrokClassifier)
-> Value
-> Parser GrokClassifier
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"GrokClassifier"
( \Object
x ->
Maybe POSIX
-> Maybe POSIX
-> Maybe Integer
-> Maybe Text
-> Text
-> Text
-> Text
-> GrokClassifier
GrokClassifier'
(Maybe POSIX
-> Maybe POSIX
-> Maybe Integer
-> Maybe Text
-> Text
-> Text
-> Text
-> GrokClassifier)
-> Parser (Maybe POSIX)
-> Parser
(Maybe POSIX
-> Maybe Integer
-> Maybe Text
-> Text
-> Text
-> Text
-> GrokClassifier)
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 POSIX
-> Maybe Integer
-> Maybe Text
-> Text
-> Text
-> Text
-> GrokClassifier)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Integer
-> Maybe Text -> Text -> Text -> Text -> GrokClassifier)
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
"LastUpdated")
Parser
(Maybe Integer
-> Maybe Text -> Text -> Text -> Text -> GrokClassifier)
-> Parser (Maybe Integer)
-> Parser (Maybe Text -> Text -> Text -> Text -> GrokClassifier)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Version")
Parser (Maybe Text -> Text -> Text -> Text -> GrokClassifier)
-> Parser (Maybe Text)
-> Parser (Text -> Text -> Text -> GrokClassifier)
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
"CustomPatterns")
Parser (Text -> Text -> Text -> GrokClassifier)
-> Parser Text -> Parser (Text -> Text -> GrokClassifier)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Name")
Parser (Text -> Text -> GrokClassifier)
-> Parser Text -> Parser (Text -> GrokClassifier)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Classification")
Parser (Text -> GrokClassifier)
-> Parser Text -> Parser GrokClassifier
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"GrokPattern")
)
instance Prelude.Hashable GrokClassifier
instance Prelude.NFData GrokClassifier