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