{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.RDSData.Types.DecimalReturnType
import Amazonka.RDSData.Types.LongReturnType
data ResultSetOptions = ResultSetOptions'
{
ResultSetOptions -> Maybe DecimalReturnType
decimalReturnType :: Prelude.Maybe DecimalReturnType,
ResultSetOptions -> Maybe LongReturnType
longReturnType :: Prelude.Maybe LongReturnType
}
deriving (ResultSetOptions -> ResultSetOptions -> Bool
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]
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
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. 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'
{ $sel:decimalReturnType:ResultSetOptions' :: Maybe DecimalReturnType
decimalReturnType =
forall a. Maybe a
Prelude.Nothing,
$sel:longReturnType:ResultSetOptions' :: Maybe LongReturnType
longReturnType = forall a. Maybe a
Prelude.Nothing
}
resultSetOptions_decimalReturnType :: Lens.Lens' ResultSetOptions (Prelude.Maybe DecimalReturnType)
resultSetOptions_decimalReturnType :: Lens' ResultSetOptions (Maybe DecimalReturnType)
resultSetOptions_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)
resultSetOptions_longReturnType :: Lens.Lens' ResultSetOptions (Prelude.Maybe LongReturnType)
resultSetOptions_longReturnType :: Lens' ResultSetOptions (Maybe LongReturnType)
resultSetOptions_longReturnType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResultSetOptions' {Maybe LongReturnType
longReturnType :: Maybe LongReturnType
$sel:longReturnType:ResultSetOptions' :: ResultSetOptions -> Maybe LongReturnType
longReturnType} -> Maybe LongReturnType
longReturnType) (\s :: ResultSetOptions
s@ResultSetOptions' {} Maybe LongReturnType
a -> ResultSetOptions
s {$sel:longReturnType:ResultSetOptions' :: Maybe LongReturnType
longReturnType = Maybe LongReturnType
a} :: ResultSetOptions)
instance Prelude.Hashable ResultSetOptions where
hashWithSalt :: Int -> ResultSetOptions -> Int
hashWithSalt Int
_salt ResultSetOptions' {Maybe DecimalReturnType
Maybe LongReturnType
longReturnType :: Maybe LongReturnType
decimalReturnType :: Maybe DecimalReturnType
$sel:longReturnType:ResultSetOptions' :: ResultSetOptions -> Maybe LongReturnType
$sel:decimalReturnType:ResultSetOptions' :: ResultSetOptions -> Maybe DecimalReturnType
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DecimalReturnType
decimalReturnType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe LongReturnType
longReturnType
instance Prelude.NFData ResultSetOptions where
rnf :: ResultSetOptions -> ()
rnf ResultSetOptions' {Maybe DecimalReturnType
Maybe LongReturnType
longReturnType :: Maybe LongReturnType
decimalReturnType :: Maybe DecimalReturnType
$sel:longReturnType:ResultSetOptions' :: ResultSetOptions -> Maybe LongReturnType
$sel:decimalReturnType:ResultSetOptions' :: ResultSetOptions -> Maybe DecimalReturnType
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe DecimalReturnType
decimalReturnType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe LongReturnType
longReturnType
instance Data.ToJSON ResultSetOptions where
toJSON :: ResultSetOptions -> Value
toJSON ResultSetOptions' {Maybe DecimalReturnType
Maybe LongReturnType
longReturnType :: Maybe LongReturnType
decimalReturnType :: Maybe DecimalReturnType
$sel:longReturnType:ResultSetOptions' :: ResultSetOptions -> Maybe LongReturnType
$sel:decimalReturnType:ResultSetOptions' :: ResultSetOptions -> Maybe DecimalReturnType
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"decimalReturnType" 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 DecimalReturnType
decimalReturnType,
(Key
"longReturnType" 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 LongReturnType
longReturnType
]
)