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