{-# 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.KinesisAnalyticsV2.Types.JSONMappingParameters where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data JSONMappingParameters = JSONMappingParameters'
{
JSONMappingParameters -> Text
recordRowPath :: Prelude.Text
}
deriving (JSONMappingParameters -> JSONMappingParameters -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: JSONMappingParameters -> JSONMappingParameters -> Bool
$c/= :: JSONMappingParameters -> JSONMappingParameters -> Bool
== :: JSONMappingParameters -> JSONMappingParameters -> Bool
$c== :: JSONMappingParameters -> JSONMappingParameters -> Bool
Prelude.Eq, ReadPrec [JSONMappingParameters]
ReadPrec JSONMappingParameters
Int -> ReadS JSONMappingParameters
ReadS [JSONMappingParameters]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [JSONMappingParameters]
$creadListPrec :: ReadPrec [JSONMappingParameters]
readPrec :: ReadPrec JSONMappingParameters
$creadPrec :: ReadPrec JSONMappingParameters
readList :: ReadS [JSONMappingParameters]
$creadList :: ReadS [JSONMappingParameters]
readsPrec :: Int -> ReadS JSONMappingParameters
$creadsPrec :: Int -> ReadS JSONMappingParameters
Prelude.Read, Int -> JSONMappingParameters -> ShowS
[JSONMappingParameters] -> ShowS
JSONMappingParameters -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [JSONMappingParameters] -> ShowS
$cshowList :: [JSONMappingParameters] -> ShowS
show :: JSONMappingParameters -> String
$cshow :: JSONMappingParameters -> String
showsPrec :: Int -> JSONMappingParameters -> ShowS
$cshowsPrec :: Int -> JSONMappingParameters -> ShowS
Prelude.Show, forall x. Rep JSONMappingParameters x -> JSONMappingParameters
forall x. JSONMappingParameters -> Rep JSONMappingParameters x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep JSONMappingParameters x -> JSONMappingParameters
$cfrom :: forall x. JSONMappingParameters -> Rep JSONMappingParameters x
Prelude.Generic)
newJSONMappingParameters ::
Prelude.Text ->
JSONMappingParameters
newJSONMappingParameters :: Text -> JSONMappingParameters
newJSONMappingParameters Text
pRecordRowPath_ =
JSONMappingParameters'
{ $sel:recordRowPath:JSONMappingParameters' :: Text
recordRowPath =
Text
pRecordRowPath_
}
jSONMappingParameters_recordRowPath :: Lens.Lens' JSONMappingParameters Prelude.Text
jSONMappingParameters_recordRowPath :: Lens' JSONMappingParameters Text
jSONMappingParameters_recordRowPath = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JSONMappingParameters' {Text
recordRowPath :: Text
$sel:recordRowPath:JSONMappingParameters' :: JSONMappingParameters -> Text
recordRowPath} -> Text
recordRowPath) (\s :: JSONMappingParameters
s@JSONMappingParameters' {} Text
a -> JSONMappingParameters
s {$sel:recordRowPath:JSONMappingParameters' :: Text
recordRowPath = Text
a} :: JSONMappingParameters)
instance Data.FromJSON JSONMappingParameters where
parseJSON :: Value -> Parser JSONMappingParameters
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"JSONMappingParameters"
( \Object
x ->
Text -> JSONMappingParameters
JSONMappingParameters'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"RecordRowPath")
)
instance Prelude.Hashable JSONMappingParameters where
hashWithSalt :: Int -> JSONMappingParameters -> Int
hashWithSalt Int
_salt JSONMappingParameters' {Text
recordRowPath :: Text
$sel:recordRowPath:JSONMappingParameters' :: JSONMappingParameters -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
recordRowPath
instance Prelude.NFData JSONMappingParameters where
rnf :: JSONMappingParameters -> ()
rnf JSONMappingParameters' {Text
recordRowPath :: Text
$sel:recordRowPath:JSONMappingParameters' :: JSONMappingParameters -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
recordRowPath
instance Data.ToJSON JSONMappingParameters where
toJSON :: JSONMappingParameters -> Value
toJSON JSONMappingParameters' {Text
recordRowPath :: Text
$sel:recordRowPath:JSONMappingParameters' :: JSONMappingParameters -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
(Key
"RecordRowPath" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
recordRowPath)
]
)