{-# 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.TrendArrowOptions 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.QuickSight.Types.Visibility
data TrendArrowOptions = TrendArrowOptions'
{
TrendArrowOptions -> Maybe Visibility
visibility :: Prelude.Maybe Visibility
}
deriving (TrendArrowOptions -> TrendArrowOptions -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TrendArrowOptions -> TrendArrowOptions -> Bool
$c/= :: TrendArrowOptions -> TrendArrowOptions -> Bool
== :: TrendArrowOptions -> TrendArrowOptions -> Bool
$c== :: TrendArrowOptions -> TrendArrowOptions -> Bool
Prelude.Eq, ReadPrec [TrendArrowOptions]
ReadPrec TrendArrowOptions
Int -> ReadS TrendArrowOptions
ReadS [TrendArrowOptions]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TrendArrowOptions]
$creadListPrec :: ReadPrec [TrendArrowOptions]
readPrec :: ReadPrec TrendArrowOptions
$creadPrec :: ReadPrec TrendArrowOptions
readList :: ReadS [TrendArrowOptions]
$creadList :: ReadS [TrendArrowOptions]
readsPrec :: Int -> ReadS TrendArrowOptions
$creadsPrec :: Int -> ReadS TrendArrowOptions
Prelude.Read, Int -> TrendArrowOptions -> ShowS
[TrendArrowOptions] -> ShowS
TrendArrowOptions -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TrendArrowOptions] -> ShowS
$cshowList :: [TrendArrowOptions] -> ShowS
show :: TrendArrowOptions -> String
$cshow :: TrendArrowOptions -> String
showsPrec :: Int -> TrendArrowOptions -> ShowS
$cshowsPrec :: Int -> TrendArrowOptions -> ShowS
Prelude.Show, forall x. Rep TrendArrowOptions x -> TrendArrowOptions
forall x. TrendArrowOptions -> Rep TrendArrowOptions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TrendArrowOptions x -> TrendArrowOptions
$cfrom :: forall x. TrendArrowOptions -> Rep TrendArrowOptions x
Prelude.Generic)
newTrendArrowOptions ::
TrendArrowOptions
newTrendArrowOptions :: TrendArrowOptions
newTrendArrowOptions =
TrendArrowOptions' {$sel:visibility:TrendArrowOptions' :: Maybe Visibility
visibility = forall a. Maybe a
Prelude.Nothing}
trendArrowOptions_visibility :: Lens.Lens' TrendArrowOptions (Prelude.Maybe Visibility)
trendArrowOptions_visibility :: Lens' TrendArrowOptions (Maybe Visibility)
trendArrowOptions_visibility = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrendArrowOptions' {Maybe Visibility
visibility :: Maybe Visibility
$sel:visibility:TrendArrowOptions' :: TrendArrowOptions -> Maybe Visibility
visibility} -> Maybe Visibility
visibility) (\s :: TrendArrowOptions
s@TrendArrowOptions' {} Maybe Visibility
a -> TrendArrowOptions
s {$sel:visibility:TrendArrowOptions' :: Maybe Visibility
visibility = Maybe Visibility
a} :: TrendArrowOptions)
instance Data.FromJSON TrendArrowOptions where
parseJSON :: Value -> Parser TrendArrowOptions
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"TrendArrowOptions"
( \Object
x ->
Maybe Visibility -> TrendArrowOptions
TrendArrowOptions'
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
"Visibility")
)
instance Prelude.Hashable TrendArrowOptions where
hashWithSalt :: Int -> TrendArrowOptions -> Int
hashWithSalt Int
_salt TrendArrowOptions' {Maybe Visibility
visibility :: Maybe Visibility
$sel:visibility:TrendArrowOptions' :: TrendArrowOptions -> Maybe Visibility
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Visibility
visibility
instance Prelude.NFData TrendArrowOptions where
rnf :: TrendArrowOptions -> ()
rnf TrendArrowOptions' {Maybe Visibility
visibility :: Maybe Visibility
$sel:visibility:TrendArrowOptions' :: TrendArrowOptions -> Maybe Visibility
..} = forall a. NFData a => a -> ()
Prelude.rnf Maybe Visibility
visibility
instance Data.ToJSON TrendArrowOptions where
toJSON :: TrendArrowOptions -> Value
toJSON TrendArrowOptions' {Maybe Visibility
visibility :: Maybe Visibility
$sel:visibility:TrendArrowOptions' :: TrendArrowOptions -> Maybe Visibility
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Key
"Visibility" 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 Visibility
visibility]
)