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