module Stratosphere.MSK.Cluster.TlsProperty (
        TlsProperty(..), mkTlsProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data TlsProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-msk-cluster-tls.html>
    TlsProperty {TlsProperty -> ()
haddock_workaround_ :: (),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-msk-cluster-tls.html#cfn-msk-cluster-tls-certificateauthorityarnlist>
                 TlsProperty -> Maybe (ValueList Text)
certificateAuthorityArnList :: (Prelude.Maybe (ValueList Prelude.Text)),
                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-msk-cluster-tls.html#cfn-msk-cluster-tls-enabled>
                 TlsProperty -> Maybe (Value Bool)
enabled :: (Prelude.Maybe (Value Prelude.Bool))}
  deriving stock (TlsProperty -> TlsProperty -> Bool
(TlsProperty -> TlsProperty -> Bool)
-> (TlsProperty -> TlsProperty -> Bool) -> Eq TlsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: TlsProperty -> TlsProperty -> Bool
== :: TlsProperty -> TlsProperty -> Bool
$c/= :: TlsProperty -> TlsProperty -> Bool
/= :: TlsProperty -> TlsProperty -> Bool
Prelude.Eq, Int -> TlsProperty -> ShowS
[TlsProperty] -> ShowS
TlsProperty -> String
(Int -> TlsProperty -> ShowS)
-> (TlsProperty -> String)
-> ([TlsProperty] -> ShowS)
-> Show TlsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> TlsProperty -> ShowS
showsPrec :: Int -> TlsProperty -> ShowS
$cshow :: TlsProperty -> String
show :: TlsProperty -> String
$cshowList :: [TlsProperty] -> ShowS
showList :: [TlsProperty] -> ShowS
Prelude.Show)
mkTlsProperty :: TlsProperty
mkTlsProperty :: TlsProperty
mkTlsProperty
  = TlsProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       certificateAuthorityArnList :: Maybe (ValueList Text)
certificateAuthorityArnList = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing,
       enabled :: Maybe (Value Bool)
enabled = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties TlsProperty where
  toResourceProperties :: TlsProperty -> ResourceProperties
toResourceProperties TlsProperty {Maybe (ValueList Text)
Maybe (Value Bool)
()
haddock_workaround_ :: TlsProperty -> ()
certificateAuthorityArnList :: TlsProperty -> Maybe (ValueList Text)
enabled :: TlsProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
certificateAuthorityArnList :: Maybe (ValueList Text)
enabled :: Maybe (Value Bool)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::MSK::Cluster.Tls", 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 -> ValueList 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
"CertificateAuthorityArnList"
                              (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
certificateAuthorityArnList,
                            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
"Enabled" (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)
enabled])}
instance JSON.ToJSON TlsProperty where
  toJSON :: TlsProperty -> Value
toJSON TlsProperty {Maybe (ValueList Text)
Maybe (Value Bool)
()
haddock_workaround_ :: TlsProperty -> ()
certificateAuthorityArnList :: TlsProperty -> Maybe (ValueList Text)
enabled :: TlsProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
certificateAuthorityArnList :: Maybe (ValueList Text)
enabled :: 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 -> ValueList 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
"CertificateAuthorityArnList"
                 (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
certificateAuthorityArnList,
               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
"Enabled" (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)
enabled]))
instance Property "CertificateAuthorityArnList" TlsProperty where
  type PropertyType "CertificateAuthorityArnList" TlsProperty = ValueList Prelude.Text
  set :: PropertyType "CertificateAuthorityArnList" TlsProperty
-> TlsProperty -> TlsProperty
set PropertyType "CertificateAuthorityArnList" TlsProperty
newValue TlsProperty {Maybe (ValueList Text)
Maybe (Value Bool)
()
haddock_workaround_ :: TlsProperty -> ()
certificateAuthorityArnList :: TlsProperty -> Maybe (ValueList Text)
enabled :: TlsProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
certificateAuthorityArnList :: Maybe (ValueList Text)
enabled :: Maybe (Value Bool)
..}
    = TlsProperty
        {certificateAuthorityArnList :: Maybe (ValueList Text)
certificateAuthorityArnList = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CertificateAuthorityArnList" TlsProperty
ValueList Text
newValue, Maybe (Value Bool)
()
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
..}
instance Property "Enabled" TlsProperty where
  type PropertyType "Enabled" TlsProperty = Value Prelude.Bool
  set :: PropertyType "Enabled" TlsProperty -> TlsProperty -> TlsProperty
set PropertyType "Enabled" TlsProperty
newValue TlsProperty {Maybe (ValueList Text)
Maybe (Value Bool)
()
haddock_workaround_ :: TlsProperty -> ()
certificateAuthorityArnList :: TlsProperty -> Maybe (ValueList Text)
enabled :: TlsProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
certificateAuthorityArnList :: Maybe (ValueList Text)
enabled :: Maybe (Value Bool)
..}
    = TlsProperty {enabled :: Maybe (Value Bool)
enabled = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Enabled" TlsProperty
Value Bool
newValue, Maybe (ValueList Text)
()
haddock_workaround_ :: ()
certificateAuthorityArnList :: Maybe (ValueList Text)
haddock_workaround_ :: ()
certificateAuthorityArnList :: Maybe (ValueList Text)
..}