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