{-# 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.UpdateGrokClassifierRequest where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data UpdateGrokClassifierRequest = UpdateGrokClassifierRequest'
{
UpdateGrokClassifierRequest -> Maybe Text
classification :: Prelude.Maybe Prelude.Text,
UpdateGrokClassifierRequest -> Maybe Text
customPatterns :: Prelude.Maybe Prelude.Text,
UpdateGrokClassifierRequest -> Maybe Text
grokPattern :: Prelude.Maybe Prelude.Text,
UpdateGrokClassifierRequest -> Text
name :: Prelude.Text
}
deriving (UpdateGrokClassifierRequest -> UpdateGrokClassifierRequest -> Bool
(UpdateGrokClassifierRequest
-> UpdateGrokClassifierRequest -> Bool)
-> (UpdateGrokClassifierRequest
-> UpdateGrokClassifierRequest -> Bool)
-> Eq UpdateGrokClassifierRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateGrokClassifierRequest -> UpdateGrokClassifierRequest -> Bool
$c/= :: UpdateGrokClassifierRequest -> UpdateGrokClassifierRequest -> Bool
== :: UpdateGrokClassifierRequest -> UpdateGrokClassifierRequest -> Bool
$c== :: UpdateGrokClassifierRequest -> UpdateGrokClassifierRequest -> Bool
Prelude.Eq, ReadPrec [UpdateGrokClassifierRequest]
ReadPrec UpdateGrokClassifierRequest
Int -> ReadS UpdateGrokClassifierRequest
ReadS [UpdateGrokClassifierRequest]
(Int -> ReadS UpdateGrokClassifierRequest)
-> ReadS [UpdateGrokClassifierRequest]
-> ReadPrec UpdateGrokClassifierRequest
-> ReadPrec [UpdateGrokClassifierRequest]
-> Read UpdateGrokClassifierRequest
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateGrokClassifierRequest]
$creadListPrec :: ReadPrec [UpdateGrokClassifierRequest]
readPrec :: ReadPrec UpdateGrokClassifierRequest
$creadPrec :: ReadPrec UpdateGrokClassifierRequest
readList :: ReadS [UpdateGrokClassifierRequest]
$creadList :: ReadS [UpdateGrokClassifierRequest]
readsPrec :: Int -> ReadS UpdateGrokClassifierRequest
$creadsPrec :: Int -> ReadS UpdateGrokClassifierRequest
Prelude.Read, Int -> UpdateGrokClassifierRequest -> ShowS
[UpdateGrokClassifierRequest] -> ShowS
UpdateGrokClassifierRequest -> String
(Int -> UpdateGrokClassifierRequest -> ShowS)
-> (UpdateGrokClassifierRequest -> String)
-> ([UpdateGrokClassifierRequest] -> ShowS)
-> Show UpdateGrokClassifierRequest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateGrokClassifierRequest] -> ShowS
$cshowList :: [UpdateGrokClassifierRequest] -> ShowS
show :: UpdateGrokClassifierRequest -> String
$cshow :: UpdateGrokClassifierRequest -> String
showsPrec :: Int -> UpdateGrokClassifierRequest -> ShowS
$cshowsPrec :: Int -> UpdateGrokClassifierRequest -> ShowS
Prelude.Show, (forall x.
UpdateGrokClassifierRequest -> Rep UpdateGrokClassifierRequest x)
-> (forall x.
Rep UpdateGrokClassifierRequest x -> UpdateGrokClassifierRequest)
-> Generic UpdateGrokClassifierRequest
forall x.
Rep UpdateGrokClassifierRequest x -> UpdateGrokClassifierRequest
forall x.
UpdateGrokClassifierRequest -> Rep UpdateGrokClassifierRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateGrokClassifierRequest x -> UpdateGrokClassifierRequest
$cfrom :: forall x.
UpdateGrokClassifierRequest -> Rep UpdateGrokClassifierRequest x
Prelude.Generic)
newUpdateGrokClassifierRequest ::
Prelude.Text ->
UpdateGrokClassifierRequest
newUpdateGrokClassifierRequest :: Text -> UpdateGrokClassifierRequest
newUpdateGrokClassifierRequest Text
pName_ =
UpdateGrokClassifierRequest' :: Maybe Text
-> Maybe Text -> Maybe Text -> Text -> UpdateGrokClassifierRequest
UpdateGrokClassifierRequest'
{ $sel:classification:UpdateGrokClassifierRequest' :: Maybe Text
classification =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:customPatterns:UpdateGrokClassifierRequest' :: Maybe Text
customPatterns = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:grokPattern:UpdateGrokClassifierRequest' :: Maybe Text
grokPattern = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:UpdateGrokClassifierRequest' :: Text
name = Text
pName_
}
updateGrokClassifierRequest_classification :: Lens.Lens' UpdateGrokClassifierRequest (Prelude.Maybe Prelude.Text)
updateGrokClassifierRequest_classification :: (Maybe Text -> f (Maybe Text))
-> UpdateGrokClassifierRequest -> f UpdateGrokClassifierRequest
updateGrokClassifierRequest_classification = (UpdateGrokClassifierRequest -> Maybe Text)
-> (UpdateGrokClassifierRequest
-> Maybe Text -> UpdateGrokClassifierRequest)
-> Lens
UpdateGrokClassifierRequest
UpdateGrokClassifierRequest
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateGrokClassifierRequest' {Maybe Text
classification :: Maybe Text
$sel:classification:UpdateGrokClassifierRequest' :: UpdateGrokClassifierRequest -> Maybe Text
classification} -> Maybe Text
classification) (\s :: UpdateGrokClassifierRequest
s@UpdateGrokClassifierRequest' {} Maybe Text
a -> UpdateGrokClassifierRequest
s {$sel:classification:UpdateGrokClassifierRequest' :: Maybe Text
classification = Maybe Text
a} :: UpdateGrokClassifierRequest)
updateGrokClassifierRequest_customPatterns :: Lens.Lens' UpdateGrokClassifierRequest (Prelude.Maybe Prelude.Text)
updateGrokClassifierRequest_customPatterns :: (Maybe Text -> f (Maybe Text))
-> UpdateGrokClassifierRequest -> f UpdateGrokClassifierRequest
updateGrokClassifierRequest_customPatterns = (UpdateGrokClassifierRequest -> Maybe Text)
-> (UpdateGrokClassifierRequest
-> Maybe Text -> UpdateGrokClassifierRequest)
-> Lens
UpdateGrokClassifierRequest
UpdateGrokClassifierRequest
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateGrokClassifierRequest' {Maybe Text
customPatterns :: Maybe Text
$sel:customPatterns:UpdateGrokClassifierRequest' :: UpdateGrokClassifierRequest -> Maybe Text
customPatterns} -> Maybe Text
customPatterns) (\s :: UpdateGrokClassifierRequest
s@UpdateGrokClassifierRequest' {} Maybe Text
a -> UpdateGrokClassifierRequest
s {$sel:customPatterns:UpdateGrokClassifierRequest' :: Maybe Text
customPatterns = Maybe Text
a} :: UpdateGrokClassifierRequest)
updateGrokClassifierRequest_grokPattern :: Lens.Lens' UpdateGrokClassifierRequest (Prelude.Maybe Prelude.Text)
updateGrokClassifierRequest_grokPattern :: (Maybe Text -> f (Maybe Text))
-> UpdateGrokClassifierRequest -> f UpdateGrokClassifierRequest
updateGrokClassifierRequest_grokPattern = (UpdateGrokClassifierRequest -> Maybe Text)
-> (UpdateGrokClassifierRequest
-> Maybe Text -> UpdateGrokClassifierRequest)
-> Lens
UpdateGrokClassifierRequest
UpdateGrokClassifierRequest
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateGrokClassifierRequest' {Maybe Text
grokPattern :: Maybe Text
$sel:grokPattern:UpdateGrokClassifierRequest' :: UpdateGrokClassifierRequest -> Maybe Text
grokPattern} -> Maybe Text
grokPattern) (\s :: UpdateGrokClassifierRequest
s@UpdateGrokClassifierRequest' {} Maybe Text
a -> UpdateGrokClassifierRequest
s {$sel:grokPattern:UpdateGrokClassifierRequest' :: Maybe Text
grokPattern = Maybe Text
a} :: UpdateGrokClassifierRequest)
updateGrokClassifierRequest_name :: Lens.Lens' UpdateGrokClassifierRequest Prelude.Text
updateGrokClassifierRequest_name :: (Text -> f Text)
-> UpdateGrokClassifierRequest -> f UpdateGrokClassifierRequest
updateGrokClassifierRequest_name = (UpdateGrokClassifierRequest -> Text)
-> (UpdateGrokClassifierRequest
-> Text -> UpdateGrokClassifierRequest)
-> Lens
UpdateGrokClassifierRequest UpdateGrokClassifierRequest Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateGrokClassifierRequest' {Text
name :: Text
$sel:name:UpdateGrokClassifierRequest' :: UpdateGrokClassifierRequest -> Text
name} -> Text
name) (\s :: UpdateGrokClassifierRequest
s@UpdateGrokClassifierRequest' {} Text
a -> UpdateGrokClassifierRequest
s {$sel:name:UpdateGrokClassifierRequest' :: Text
name = Text
a} :: UpdateGrokClassifierRequest)
instance Prelude.Hashable UpdateGrokClassifierRequest
instance Prelude.NFData UpdateGrokClassifierRequest
instance Core.ToJSON UpdateGrokClassifierRequest where
toJSON :: UpdateGrokClassifierRequest -> Value
toJSON UpdateGrokClassifierRequest' {Maybe Text
Text
name :: Text
grokPattern :: Maybe Text
customPatterns :: Maybe Text
classification :: Maybe Text
$sel:name:UpdateGrokClassifierRequest' :: UpdateGrokClassifierRequest -> Text
$sel:grokPattern:UpdateGrokClassifierRequest' :: UpdateGrokClassifierRequest -> Maybe Text
$sel:customPatterns:UpdateGrokClassifierRequest' :: UpdateGrokClassifierRequest -> Maybe Text
$sel:classification:UpdateGrokClassifierRequest' :: UpdateGrokClassifierRequest -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"Classification" 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
classification,
(Text
"CustomPatterns" 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
customPatterns,
(Text
"GrokPattern" 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
grokPattern,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name)
]
)