module Stratosphere.MSK.Cluster.SaslProperty (
module Exports, SaslProperty(..), mkSaslProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.MSK.Cluster.IamProperty as Exports
import {-# SOURCE #-} Stratosphere.MSK.Cluster.ScramProperty as Exports
import Stratosphere.ResourceProperties
data SaslProperty
=
SaslProperty {SaslProperty -> ()
haddock_workaround_ :: (),
SaslProperty -> Maybe IamProperty
iam :: (Prelude.Maybe IamProperty),
SaslProperty -> Maybe ScramProperty
scram :: (Prelude.Maybe ScramProperty)}
deriving stock (SaslProperty -> SaslProperty -> Bool
(SaslProperty -> SaslProperty -> Bool)
-> (SaslProperty -> SaslProperty -> Bool) -> Eq SaslProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SaslProperty -> SaslProperty -> Bool
== :: SaslProperty -> SaslProperty -> Bool
$c/= :: SaslProperty -> SaslProperty -> Bool
/= :: SaslProperty -> SaslProperty -> Bool
Prelude.Eq, Int -> SaslProperty -> ShowS
[SaslProperty] -> ShowS
SaslProperty -> String
(Int -> SaslProperty -> ShowS)
-> (SaslProperty -> String)
-> ([SaslProperty] -> ShowS)
-> Show SaslProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SaslProperty -> ShowS
showsPrec :: Int -> SaslProperty -> ShowS
$cshow :: SaslProperty -> String
show :: SaslProperty -> String
$cshowList :: [SaslProperty] -> ShowS
showList :: [SaslProperty] -> ShowS
Prelude.Show)
mkSaslProperty :: SaslProperty
mkSaslProperty :: SaslProperty
mkSaslProperty
= SaslProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), iam :: Maybe IamProperty
iam = Maybe IamProperty
forall a. Maybe a
Prelude.Nothing,
scram :: Maybe ScramProperty
scram = Maybe ScramProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SaslProperty where
toResourceProperties :: SaslProperty -> ResourceProperties
toResourceProperties SaslProperty {Maybe IamProperty
Maybe ScramProperty
()
haddock_workaround_ :: SaslProperty -> ()
iam :: SaslProperty -> Maybe IamProperty
scram :: SaslProperty -> Maybe ScramProperty
haddock_workaround_ :: ()
iam :: Maybe IamProperty
scram :: Maybe ScramProperty
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::MSK::Cluster.Sasl", supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> IamProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Iam" (IamProperty -> (Key, Value))
-> Maybe IamProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe IamProperty
iam,
Key -> ScramProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Scram" (ScramProperty -> (Key, Value))
-> Maybe ScramProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ScramProperty
scram])}
instance JSON.ToJSON SaslProperty where
toJSON :: SaslProperty -> Value
toJSON SaslProperty {Maybe IamProperty
Maybe ScramProperty
()
haddock_workaround_ :: SaslProperty -> ()
iam :: SaslProperty -> Maybe IamProperty
scram :: SaslProperty -> Maybe ScramProperty
haddock_workaround_ :: ()
iam :: Maybe IamProperty
scram :: Maybe ScramProperty
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> IamProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Iam" (IamProperty -> (Key, Value))
-> Maybe IamProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe IamProperty
iam,
Key -> ScramProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Scram" (ScramProperty -> (Key, Value))
-> Maybe ScramProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ScramProperty
scram]))
instance Property "Iam" SaslProperty where
type PropertyType "Iam" SaslProperty = IamProperty
set :: PropertyType "Iam" SaslProperty -> SaslProperty -> SaslProperty
set PropertyType "Iam" SaslProperty
newValue SaslProperty {Maybe IamProperty
Maybe ScramProperty
()
haddock_workaround_ :: SaslProperty -> ()
iam :: SaslProperty -> Maybe IamProperty
scram :: SaslProperty -> Maybe ScramProperty
haddock_workaround_ :: ()
iam :: Maybe IamProperty
scram :: Maybe ScramProperty
..}
= SaslProperty {iam :: Maybe IamProperty
iam = IamProperty -> Maybe IamProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Iam" SaslProperty
IamProperty
newValue, Maybe ScramProperty
()
haddock_workaround_ :: ()
scram :: Maybe ScramProperty
haddock_workaround_ :: ()
scram :: Maybe ScramProperty
..}
instance Property "Scram" SaslProperty where
type PropertyType "Scram" SaslProperty = ScramProperty
set :: PropertyType "Scram" SaslProperty -> SaslProperty -> SaslProperty
set PropertyType "Scram" SaslProperty
newValue SaslProperty {Maybe IamProperty
Maybe ScramProperty
()
haddock_workaround_ :: SaslProperty -> ()
iam :: SaslProperty -> Maybe IamProperty
scram :: SaslProperty -> Maybe ScramProperty
haddock_workaround_ :: ()
iam :: Maybe IamProperty
scram :: Maybe ScramProperty
..}
= SaslProperty {scram :: Maybe ScramProperty
scram = ScramProperty -> Maybe ScramProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Scram" SaslProperty
ScramProperty
newValue, Maybe IamProperty
()
haddock_workaround_ :: ()
iam :: Maybe IamProperty
haddock_workaround_ :: ()
iam :: Maybe IamProperty
..}