{-# 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.UpdateJsonClassifierRequest where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data UpdateJsonClassifierRequest = UpdateJsonClassifierRequest'
{
UpdateJsonClassifierRequest -> Maybe Text
jsonPath :: Prelude.Maybe Prelude.Text,
UpdateJsonClassifierRequest -> Text
name :: Prelude.Text
}
deriving (UpdateJsonClassifierRequest -> UpdateJsonClassifierRequest -> Bool
(UpdateJsonClassifierRequest
-> UpdateJsonClassifierRequest -> Bool)
-> (UpdateJsonClassifierRequest
-> UpdateJsonClassifierRequest -> Bool)
-> Eq UpdateJsonClassifierRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateJsonClassifierRequest -> UpdateJsonClassifierRequest -> Bool
$c/= :: UpdateJsonClassifierRequest -> UpdateJsonClassifierRequest -> Bool
== :: UpdateJsonClassifierRequest -> UpdateJsonClassifierRequest -> Bool
$c== :: UpdateJsonClassifierRequest -> UpdateJsonClassifierRequest -> Bool
Prelude.Eq, ReadPrec [UpdateJsonClassifierRequest]
ReadPrec UpdateJsonClassifierRequest
Int -> ReadS UpdateJsonClassifierRequest
ReadS [UpdateJsonClassifierRequest]
(Int -> ReadS UpdateJsonClassifierRequest)
-> ReadS [UpdateJsonClassifierRequest]
-> ReadPrec UpdateJsonClassifierRequest
-> ReadPrec [UpdateJsonClassifierRequest]
-> Read UpdateJsonClassifierRequest
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateJsonClassifierRequest]
$creadListPrec :: ReadPrec [UpdateJsonClassifierRequest]
readPrec :: ReadPrec UpdateJsonClassifierRequest
$creadPrec :: ReadPrec UpdateJsonClassifierRequest
readList :: ReadS [UpdateJsonClassifierRequest]
$creadList :: ReadS [UpdateJsonClassifierRequest]
readsPrec :: Int -> ReadS UpdateJsonClassifierRequest
$creadsPrec :: Int -> ReadS UpdateJsonClassifierRequest
Prelude.Read, Int -> UpdateJsonClassifierRequest -> ShowS
[UpdateJsonClassifierRequest] -> ShowS
UpdateJsonClassifierRequest -> String
(Int -> UpdateJsonClassifierRequest -> ShowS)
-> (UpdateJsonClassifierRequest -> String)
-> ([UpdateJsonClassifierRequest] -> ShowS)
-> Show UpdateJsonClassifierRequest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateJsonClassifierRequest] -> ShowS
$cshowList :: [UpdateJsonClassifierRequest] -> ShowS
show :: UpdateJsonClassifierRequest -> String
$cshow :: UpdateJsonClassifierRequest -> String
showsPrec :: Int -> UpdateJsonClassifierRequest -> ShowS
$cshowsPrec :: Int -> UpdateJsonClassifierRequest -> ShowS
Prelude.Show, (forall x.
UpdateJsonClassifierRequest -> Rep UpdateJsonClassifierRequest x)
-> (forall x.
Rep UpdateJsonClassifierRequest x -> UpdateJsonClassifierRequest)
-> Generic UpdateJsonClassifierRequest
forall x.
Rep UpdateJsonClassifierRequest x -> UpdateJsonClassifierRequest
forall x.
UpdateJsonClassifierRequest -> Rep UpdateJsonClassifierRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateJsonClassifierRequest x -> UpdateJsonClassifierRequest
$cfrom :: forall x.
UpdateJsonClassifierRequest -> Rep UpdateJsonClassifierRequest x
Prelude.Generic)
newUpdateJsonClassifierRequest ::
Prelude.Text ->
UpdateJsonClassifierRequest
newUpdateJsonClassifierRequest :: Text -> UpdateJsonClassifierRequest
newUpdateJsonClassifierRequest Text
pName_ =
UpdateJsonClassifierRequest' :: Maybe Text -> Text -> UpdateJsonClassifierRequest
UpdateJsonClassifierRequest'
{ $sel:jsonPath:UpdateJsonClassifierRequest' :: Maybe Text
jsonPath =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:UpdateJsonClassifierRequest' :: Text
name = Text
pName_
}
updateJsonClassifierRequest_jsonPath :: Lens.Lens' UpdateJsonClassifierRequest (Prelude.Maybe Prelude.Text)
updateJsonClassifierRequest_jsonPath :: (Maybe Text -> f (Maybe Text))
-> UpdateJsonClassifierRequest -> f UpdateJsonClassifierRequest
updateJsonClassifierRequest_jsonPath = (UpdateJsonClassifierRequest -> Maybe Text)
-> (UpdateJsonClassifierRequest
-> Maybe Text -> UpdateJsonClassifierRequest)
-> Lens
UpdateJsonClassifierRequest
UpdateJsonClassifierRequest
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateJsonClassifierRequest' {Maybe Text
jsonPath :: Maybe Text
$sel:jsonPath:UpdateJsonClassifierRequest' :: UpdateJsonClassifierRequest -> Maybe Text
jsonPath} -> Maybe Text
jsonPath) (\s :: UpdateJsonClassifierRequest
s@UpdateJsonClassifierRequest' {} Maybe Text
a -> UpdateJsonClassifierRequest
s {$sel:jsonPath:UpdateJsonClassifierRequest' :: Maybe Text
jsonPath = Maybe Text
a} :: UpdateJsonClassifierRequest)
updateJsonClassifierRequest_name :: Lens.Lens' UpdateJsonClassifierRequest Prelude.Text
updateJsonClassifierRequest_name :: (Text -> f Text)
-> UpdateJsonClassifierRequest -> f UpdateJsonClassifierRequest
updateJsonClassifierRequest_name = (UpdateJsonClassifierRequest -> Text)
-> (UpdateJsonClassifierRequest
-> Text -> UpdateJsonClassifierRequest)
-> Lens
UpdateJsonClassifierRequest UpdateJsonClassifierRequest Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateJsonClassifierRequest' {Text
name :: Text
$sel:name:UpdateJsonClassifierRequest' :: UpdateJsonClassifierRequest -> Text
name} -> Text
name) (\s :: UpdateJsonClassifierRequest
s@UpdateJsonClassifierRequest' {} Text
a -> UpdateJsonClassifierRequest
s {$sel:name:UpdateJsonClassifierRequest' :: Text
name = Text
a} :: UpdateJsonClassifierRequest)
instance Prelude.Hashable UpdateJsonClassifierRequest
instance Prelude.NFData UpdateJsonClassifierRequest
instance Core.ToJSON UpdateJsonClassifierRequest where
toJSON :: UpdateJsonClassifierRequest -> Value
toJSON UpdateJsonClassifierRequest' {Maybe Text
Text
name :: Text
jsonPath :: Maybe Text
$sel:name:UpdateJsonClassifierRequest' :: UpdateJsonClassifierRequest -> Text
$sel:jsonPath:UpdateJsonClassifierRequest' :: UpdateJsonClassifierRequest -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"JsonPath" 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
jsonPath,
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)
]
)