{-# 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.QuickSight.Types.Parameters where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.QuickSight.Types.DateTimeParameter
import Amazonka.QuickSight.Types.DecimalParameter
import Amazonka.QuickSight.Types.IntegerParameter
import Amazonka.QuickSight.Types.StringParameter
data Parameters = Parameters'
{
Parameters -> Maybe [DateTimeParameter]
dateTimeParameters :: Prelude.Maybe [DateTimeParameter],
Parameters -> Maybe [DecimalParameter]
decimalParameters :: Prelude.Maybe [DecimalParameter],
Parameters -> Maybe [IntegerParameter]
integerParameters :: Prelude.Maybe [IntegerParameter],
Parameters -> Maybe [StringParameter]
stringParameters :: Prelude.Maybe [StringParameter]
}
deriving (Parameters -> Parameters -> Bool
(Parameters -> Parameters -> Bool)
-> (Parameters -> Parameters -> Bool) -> Eq Parameters
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Parameters -> Parameters -> Bool
$c/= :: Parameters -> Parameters -> Bool
== :: Parameters -> Parameters -> Bool
$c== :: Parameters -> Parameters -> Bool
Prelude.Eq, ReadPrec [Parameters]
ReadPrec Parameters
Int -> ReadS Parameters
ReadS [Parameters]
(Int -> ReadS Parameters)
-> ReadS [Parameters]
-> ReadPrec Parameters
-> ReadPrec [Parameters]
-> Read Parameters
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Parameters]
$creadListPrec :: ReadPrec [Parameters]
readPrec :: ReadPrec Parameters
$creadPrec :: ReadPrec Parameters
readList :: ReadS [Parameters]
$creadList :: ReadS [Parameters]
readsPrec :: Int -> ReadS Parameters
$creadsPrec :: Int -> ReadS Parameters
Prelude.Read, Int -> Parameters -> ShowS
[Parameters] -> ShowS
Parameters -> String
(Int -> Parameters -> ShowS)
-> (Parameters -> String)
-> ([Parameters] -> ShowS)
-> Show Parameters
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Parameters] -> ShowS
$cshowList :: [Parameters] -> ShowS
show :: Parameters -> String
$cshow :: Parameters -> String
showsPrec :: Int -> Parameters -> ShowS
$cshowsPrec :: Int -> Parameters -> ShowS
Prelude.Show, (forall x. Parameters -> Rep Parameters x)
-> (forall x. Rep Parameters x -> Parameters) -> Generic Parameters
forall x. Rep Parameters x -> Parameters
forall x. Parameters -> Rep Parameters x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Parameters x -> Parameters
$cfrom :: forall x. Parameters -> Rep Parameters x
Prelude.Generic)
newParameters ::
Parameters
newParameters :: Parameters
newParameters =
Parameters' :: Maybe [DateTimeParameter]
-> Maybe [DecimalParameter]
-> Maybe [IntegerParameter]
-> Maybe [StringParameter]
-> Parameters
Parameters'
{ $sel:dateTimeParameters:Parameters' :: Maybe [DateTimeParameter]
dateTimeParameters = Maybe [DateTimeParameter]
forall a. Maybe a
Prelude.Nothing,
$sel:decimalParameters:Parameters' :: Maybe [DecimalParameter]
decimalParameters = Maybe [DecimalParameter]
forall a. Maybe a
Prelude.Nothing,
$sel:integerParameters:Parameters' :: Maybe [IntegerParameter]
integerParameters = Maybe [IntegerParameter]
forall a. Maybe a
Prelude.Nothing,
$sel:stringParameters:Parameters' :: Maybe [StringParameter]
stringParameters = Maybe [StringParameter]
forall a. Maybe a
Prelude.Nothing
}
parameters_dateTimeParameters :: Lens.Lens' Parameters (Prelude.Maybe [DateTimeParameter])
parameters_dateTimeParameters :: (Maybe [DateTimeParameter] -> f (Maybe [DateTimeParameter]))
-> Parameters -> f Parameters
parameters_dateTimeParameters = (Parameters -> Maybe [DateTimeParameter])
-> (Parameters -> Maybe [DateTimeParameter] -> Parameters)
-> Lens
Parameters
Parameters
(Maybe [DateTimeParameter])
(Maybe [DateTimeParameter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Parameters' {Maybe [DateTimeParameter]
dateTimeParameters :: Maybe [DateTimeParameter]
$sel:dateTimeParameters:Parameters' :: Parameters -> Maybe [DateTimeParameter]
dateTimeParameters} -> Maybe [DateTimeParameter]
dateTimeParameters) (\s :: Parameters
s@Parameters' {} Maybe [DateTimeParameter]
a -> Parameters
s {$sel:dateTimeParameters:Parameters' :: Maybe [DateTimeParameter]
dateTimeParameters = Maybe [DateTimeParameter]
a} :: Parameters) ((Maybe [DateTimeParameter] -> f (Maybe [DateTimeParameter]))
-> Parameters -> f Parameters)
-> ((Maybe [DateTimeParameter] -> f (Maybe [DateTimeParameter]))
-> Maybe [DateTimeParameter] -> f (Maybe [DateTimeParameter]))
-> (Maybe [DateTimeParameter] -> f (Maybe [DateTimeParameter]))
-> Parameters
-> f Parameters
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[DateTimeParameter]
[DateTimeParameter]
[DateTimeParameter]
[DateTimeParameter]
-> Iso
(Maybe [DateTimeParameter])
(Maybe [DateTimeParameter])
(Maybe [DateTimeParameter])
(Maybe [DateTimeParameter])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
[DateTimeParameter]
[DateTimeParameter]
[DateTimeParameter]
[DateTimeParameter]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
parameters_decimalParameters :: Lens.Lens' Parameters (Prelude.Maybe [DecimalParameter])
parameters_decimalParameters :: (Maybe [DecimalParameter] -> f (Maybe [DecimalParameter]))
-> Parameters -> f Parameters
parameters_decimalParameters = (Parameters -> Maybe [DecimalParameter])
-> (Parameters -> Maybe [DecimalParameter] -> Parameters)
-> Lens
Parameters
Parameters
(Maybe [DecimalParameter])
(Maybe [DecimalParameter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Parameters' {Maybe [DecimalParameter]
decimalParameters :: Maybe [DecimalParameter]
$sel:decimalParameters:Parameters' :: Parameters -> Maybe [DecimalParameter]
decimalParameters} -> Maybe [DecimalParameter]
decimalParameters) (\s :: Parameters
s@Parameters' {} Maybe [DecimalParameter]
a -> Parameters
s {$sel:decimalParameters:Parameters' :: Maybe [DecimalParameter]
decimalParameters = Maybe [DecimalParameter]
a} :: Parameters) ((Maybe [DecimalParameter] -> f (Maybe [DecimalParameter]))
-> Parameters -> f Parameters)
-> ((Maybe [DecimalParameter] -> f (Maybe [DecimalParameter]))
-> Maybe [DecimalParameter] -> f (Maybe [DecimalParameter]))
-> (Maybe [DecimalParameter] -> f (Maybe [DecimalParameter]))
-> Parameters
-> f Parameters
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[DecimalParameter]
[DecimalParameter]
[DecimalParameter]
[DecimalParameter]
-> Iso
(Maybe [DecimalParameter])
(Maybe [DecimalParameter])
(Maybe [DecimalParameter])
(Maybe [DecimalParameter])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
[DecimalParameter]
[DecimalParameter]
[DecimalParameter]
[DecimalParameter]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
parameters_integerParameters :: Lens.Lens' Parameters (Prelude.Maybe [IntegerParameter])
parameters_integerParameters :: (Maybe [IntegerParameter] -> f (Maybe [IntegerParameter]))
-> Parameters -> f Parameters
parameters_integerParameters = (Parameters -> Maybe [IntegerParameter])
-> (Parameters -> Maybe [IntegerParameter] -> Parameters)
-> Lens
Parameters
Parameters
(Maybe [IntegerParameter])
(Maybe [IntegerParameter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Parameters' {Maybe [IntegerParameter]
integerParameters :: Maybe [IntegerParameter]
$sel:integerParameters:Parameters' :: Parameters -> Maybe [IntegerParameter]
integerParameters} -> Maybe [IntegerParameter]
integerParameters) (\s :: Parameters
s@Parameters' {} Maybe [IntegerParameter]
a -> Parameters
s {$sel:integerParameters:Parameters' :: Maybe [IntegerParameter]
integerParameters = Maybe [IntegerParameter]
a} :: Parameters) ((Maybe [IntegerParameter] -> f (Maybe [IntegerParameter]))
-> Parameters -> f Parameters)
-> ((Maybe [IntegerParameter] -> f (Maybe [IntegerParameter]))
-> Maybe [IntegerParameter] -> f (Maybe [IntegerParameter]))
-> (Maybe [IntegerParameter] -> f (Maybe [IntegerParameter]))
-> Parameters
-> f Parameters
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[IntegerParameter]
[IntegerParameter]
[IntegerParameter]
[IntegerParameter]
-> Iso
(Maybe [IntegerParameter])
(Maybe [IntegerParameter])
(Maybe [IntegerParameter])
(Maybe [IntegerParameter])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
[IntegerParameter]
[IntegerParameter]
[IntegerParameter]
[IntegerParameter]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
parameters_stringParameters :: Lens.Lens' Parameters (Prelude.Maybe [StringParameter])
parameters_stringParameters :: (Maybe [StringParameter] -> f (Maybe [StringParameter]))
-> Parameters -> f Parameters
parameters_stringParameters = (Parameters -> Maybe [StringParameter])
-> (Parameters -> Maybe [StringParameter] -> Parameters)
-> Lens
Parameters
Parameters
(Maybe [StringParameter])
(Maybe [StringParameter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Parameters' {Maybe [StringParameter]
stringParameters :: Maybe [StringParameter]
$sel:stringParameters:Parameters' :: Parameters -> Maybe [StringParameter]
stringParameters} -> Maybe [StringParameter]
stringParameters) (\s :: Parameters
s@Parameters' {} Maybe [StringParameter]
a -> Parameters
s {$sel:stringParameters:Parameters' :: Maybe [StringParameter]
stringParameters = Maybe [StringParameter]
a} :: Parameters) ((Maybe [StringParameter] -> f (Maybe [StringParameter]))
-> Parameters -> f Parameters)
-> ((Maybe [StringParameter] -> f (Maybe [StringParameter]))
-> Maybe [StringParameter] -> f (Maybe [StringParameter]))
-> (Maybe [StringParameter] -> f (Maybe [StringParameter]))
-> Parameters
-> f Parameters
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[StringParameter]
[StringParameter]
[StringParameter]
[StringParameter]
-> Iso
(Maybe [StringParameter])
(Maybe [StringParameter])
(Maybe [StringParameter])
(Maybe [StringParameter])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
[StringParameter]
[StringParameter]
[StringParameter]
[StringParameter]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Prelude.Hashable Parameters
instance Prelude.NFData Parameters
instance Core.ToJSON Parameters where
toJSON :: Parameters -> Value
toJSON Parameters' {Maybe [DateTimeParameter]
Maybe [DecimalParameter]
Maybe [IntegerParameter]
Maybe [StringParameter]
stringParameters :: Maybe [StringParameter]
integerParameters :: Maybe [IntegerParameter]
decimalParameters :: Maybe [DecimalParameter]
dateTimeParameters :: Maybe [DateTimeParameter]
$sel:stringParameters:Parameters' :: Parameters -> Maybe [StringParameter]
$sel:integerParameters:Parameters' :: Parameters -> Maybe [IntegerParameter]
$sel:decimalParameters:Parameters' :: Parameters -> Maybe [DecimalParameter]
$sel:dateTimeParameters:Parameters' :: Parameters -> Maybe [DateTimeParameter]
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"DateTimeParameters" Text -> [DateTimeParameter] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([DateTimeParameter] -> Pair)
-> Maybe [DateTimeParameter] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [DateTimeParameter]
dateTimeParameters,
(Text
"DecimalParameters" Text -> [DecimalParameter] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([DecimalParameter] -> Pair)
-> Maybe [DecimalParameter] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [DecimalParameter]
decimalParameters,
(Text
"IntegerParameters" Text -> [IntegerParameter] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([IntegerParameter] -> Pair)
-> Maybe [IntegerParameter] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [IntegerParameter]
integerParameters,
(Text
"StringParameters" Text -> [StringParameter] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([StringParameter] -> Pair)
-> Maybe [StringParameter] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [StringParameter]
stringParameters
]
)