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