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