{-# 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.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data SslProperties = SslProperties'
{
SslProperties -> Maybe Bool
disableSsl :: Prelude.Maybe Prelude.Bool
}
deriving (SslProperties -> SslProperties -> Bool
(SslProperties -> SslProperties -> Bool)
-> (SslProperties -> SslProperties -> Bool) -> Eq SslProperties
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]
(Int -> ReadS SslProperties)
-> ReadS [SslProperties]
-> ReadPrec SslProperties
-> ReadPrec [SslProperties]
-> Read 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
(Int -> SslProperties -> ShowS)
-> (SslProperties -> String)
-> ([SslProperties] -> ShowS)
-> Show SslProperties
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. SslProperties -> Rep SslProperties x)
-> (forall x. Rep SslProperties x -> SslProperties)
-> Generic SslProperties
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' :: Maybe Bool -> SslProperties
SslProperties' {$sel:disableSsl:SslProperties' :: Maybe Bool
disableSsl = Maybe Bool
forall a. Maybe a
Prelude.Nothing}
sslProperties_disableSsl :: Lens.Lens' SslProperties (Prelude.Maybe Prelude.Bool)
sslProperties_disableSsl :: (Maybe Bool -> f (Maybe Bool)) -> SslProperties -> f SslProperties
sslProperties_disableSsl = (SslProperties -> Maybe Bool)
-> (SslProperties -> Maybe Bool -> SslProperties)
-> Lens SslProperties SslProperties (Maybe Bool) (Maybe Bool)
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 Core.FromJSON SslProperties where
parseJSON :: Value -> Parser SslProperties
parseJSON =
String
-> (Object -> Parser SslProperties)
-> Value
-> Parser SslProperties
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"SslProperties"
( \Object
x ->
Maybe Bool -> SslProperties
SslProperties' (Maybe Bool -> SslProperties)
-> Parser (Maybe Bool) -> Parser SslProperties
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DisableSsl")
)
instance Prelude.Hashable SslProperties
instance Prelude.NFData SslProperties
instance Core.ToJSON SslProperties where
toJSON :: SslProperties -> Value
toJSON SslProperties' {Maybe Bool
disableSsl :: Maybe Bool
$sel:disableSsl:SslProperties' :: SslProperties -> Maybe Bool
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[(Text
"DisableSsl" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
disableSsl]
)