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