module Stratosphere.MSK.Cluster.EncryptionInTransitProperty (
        EncryptionInTransitProperty(..), mkEncryptionInTransitProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data EncryptionInTransitProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-msk-cluster-encryptionintransit.html>
    EncryptionInTransitProperty {EncryptionInTransitProperty -> ()
haddock_workaround_ :: (),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-msk-cluster-encryptionintransit.html#cfn-msk-cluster-encryptionintransit-clientbroker>
                                 EncryptionInTransitProperty -> Maybe (Value Text)
clientBroker :: (Prelude.Maybe (Value Prelude.Text)),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-msk-cluster-encryptionintransit.html#cfn-msk-cluster-encryptionintransit-incluster>
                                 EncryptionInTransitProperty -> Maybe (Value Bool)
inCluster :: (Prelude.Maybe (Value Prelude.Bool))}
  deriving stock (EncryptionInTransitProperty -> EncryptionInTransitProperty -> Bool
(EncryptionInTransitProperty
 -> EncryptionInTransitProperty -> Bool)
-> (EncryptionInTransitProperty
    -> EncryptionInTransitProperty -> Bool)
-> Eq EncryptionInTransitProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: EncryptionInTransitProperty -> EncryptionInTransitProperty -> Bool
== :: EncryptionInTransitProperty -> EncryptionInTransitProperty -> Bool
$c/= :: EncryptionInTransitProperty -> EncryptionInTransitProperty -> Bool
/= :: EncryptionInTransitProperty -> EncryptionInTransitProperty -> Bool
Prelude.Eq, Int -> EncryptionInTransitProperty -> ShowS
[EncryptionInTransitProperty] -> ShowS
EncryptionInTransitProperty -> String
(Int -> EncryptionInTransitProperty -> ShowS)
-> (EncryptionInTransitProperty -> String)
-> ([EncryptionInTransitProperty] -> ShowS)
-> Show EncryptionInTransitProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> EncryptionInTransitProperty -> ShowS
showsPrec :: Int -> EncryptionInTransitProperty -> ShowS
$cshow :: EncryptionInTransitProperty -> String
show :: EncryptionInTransitProperty -> String
$cshowList :: [EncryptionInTransitProperty] -> ShowS
showList :: [EncryptionInTransitProperty] -> ShowS
Prelude.Show)
mkEncryptionInTransitProperty :: EncryptionInTransitProperty
mkEncryptionInTransitProperty :: EncryptionInTransitProperty
mkEncryptionInTransitProperty
  = EncryptionInTransitProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), clientBroker :: Maybe (Value Text)
clientBroker = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       inCluster :: Maybe (Value Bool)
inCluster = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties EncryptionInTransitProperty where
  toResourceProperties :: EncryptionInTransitProperty -> ResourceProperties
toResourceProperties EncryptionInTransitProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: EncryptionInTransitProperty -> ()
clientBroker :: EncryptionInTransitProperty -> Maybe (Value Text)
inCluster :: EncryptionInTransitProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
clientBroker :: Maybe (Value Text)
inCluster :: Maybe (Value Bool)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::MSK::Cluster.EncryptionInTransit",
         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 -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ClientBroker" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
clientBroker,
                            Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"InCluster" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
inCluster])}
instance JSON.ToJSON EncryptionInTransitProperty where
  toJSON :: EncryptionInTransitProperty -> Value
toJSON EncryptionInTransitProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: EncryptionInTransitProperty -> ()
clientBroker :: EncryptionInTransitProperty -> Maybe (Value Text)
inCluster :: EncryptionInTransitProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
clientBroker :: Maybe (Value Text)
inCluster :: Maybe (Value Bool)
..}
    = [(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 -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ClientBroker" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
clientBroker,
               Key -> Value Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"InCluster" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
inCluster]))
instance Property "ClientBroker" EncryptionInTransitProperty where
  type PropertyType "ClientBroker" EncryptionInTransitProperty = Value Prelude.Text
  set :: PropertyType "ClientBroker" EncryptionInTransitProperty
-> EncryptionInTransitProperty -> EncryptionInTransitProperty
set PropertyType "ClientBroker" EncryptionInTransitProperty
newValue EncryptionInTransitProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: EncryptionInTransitProperty -> ()
clientBroker :: EncryptionInTransitProperty -> Maybe (Value Text)
inCluster :: EncryptionInTransitProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
clientBroker :: Maybe (Value Text)
inCluster :: Maybe (Value Bool)
..}
    = EncryptionInTransitProperty
        {clientBroker :: Maybe (Value Text)
clientBroker = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ClientBroker" EncryptionInTransitProperty
Value Text
newValue, Maybe (Value Bool)
()
haddock_workaround_ :: ()
inCluster :: Maybe (Value Bool)
haddock_workaround_ :: ()
inCluster :: Maybe (Value Bool)
..}
instance Property "InCluster" EncryptionInTransitProperty where
  type PropertyType "InCluster" EncryptionInTransitProperty = Value Prelude.Bool
  set :: PropertyType "InCluster" EncryptionInTransitProperty
-> EncryptionInTransitProperty -> EncryptionInTransitProperty
set PropertyType "InCluster" EncryptionInTransitProperty
newValue EncryptionInTransitProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: EncryptionInTransitProperty -> ()
clientBroker :: EncryptionInTransitProperty -> Maybe (Value Text)
inCluster :: EncryptionInTransitProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
clientBroker :: Maybe (Value Text)
inCluster :: Maybe (Value Bool)
..}
    = EncryptionInTransitProperty
        {inCluster :: Maybe (Value Bool)
inCluster = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "InCluster" EncryptionInTransitProperty
Value Bool
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
clientBroker :: Maybe (Value Text)
haddock_workaround_ :: ()
clientBroker :: Maybe (Value Text)
..}