module Stratosphere.Cognito.LogDeliveryConfiguration.FirehoseConfigurationProperty (
        FirehoseConfigurationProperty(..), mkFirehoseConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data FirehoseConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-logdeliveryconfiguration-firehoseconfiguration.html>
    FirehoseConfigurationProperty {FirehoseConfigurationProperty -> ()
haddock_workaround_ :: (),
                                   -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-logdeliveryconfiguration-firehoseconfiguration.html#cfn-cognito-logdeliveryconfiguration-firehoseconfiguration-streamarn>
                                   FirehoseConfigurationProperty -> Maybe (Value Text)
streamArn :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (FirehoseConfigurationProperty
-> FirehoseConfigurationProperty -> Bool
(FirehoseConfigurationProperty
 -> FirehoseConfigurationProperty -> Bool)
-> (FirehoseConfigurationProperty
    -> FirehoseConfigurationProperty -> Bool)
-> Eq FirehoseConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: FirehoseConfigurationProperty
-> FirehoseConfigurationProperty -> Bool
== :: FirehoseConfigurationProperty
-> FirehoseConfigurationProperty -> Bool
$c/= :: FirehoseConfigurationProperty
-> FirehoseConfigurationProperty -> Bool
/= :: FirehoseConfigurationProperty
-> FirehoseConfigurationProperty -> Bool
Prelude.Eq, Int -> FirehoseConfigurationProperty -> ShowS
[FirehoseConfigurationProperty] -> ShowS
FirehoseConfigurationProperty -> String
(Int -> FirehoseConfigurationProperty -> ShowS)
-> (FirehoseConfigurationProperty -> String)
-> ([FirehoseConfigurationProperty] -> ShowS)
-> Show FirehoseConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> FirehoseConfigurationProperty -> ShowS
showsPrec :: Int -> FirehoseConfigurationProperty -> ShowS
$cshow :: FirehoseConfigurationProperty -> String
show :: FirehoseConfigurationProperty -> String
$cshowList :: [FirehoseConfigurationProperty] -> ShowS
showList :: [FirehoseConfigurationProperty] -> ShowS
Prelude.Show)
mkFirehoseConfigurationProperty :: FirehoseConfigurationProperty
mkFirehoseConfigurationProperty :: FirehoseConfigurationProperty
mkFirehoseConfigurationProperty
  = FirehoseConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), streamArn :: Maybe (Value Text)
streamArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties FirehoseConfigurationProperty where
  toResourceProperties :: FirehoseConfigurationProperty -> ResourceProperties
toResourceProperties FirehoseConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: FirehoseConfigurationProperty -> ()
streamArn :: FirehoseConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
streamArn :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Cognito::LogDeliveryConfiguration.FirehoseConfiguration",
         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
"StreamArn" (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)
streamArn])}
instance JSON.ToJSON FirehoseConfigurationProperty where
  toJSON :: FirehoseConfigurationProperty -> Value
toJSON FirehoseConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: FirehoseConfigurationProperty -> ()
streamArn :: FirehoseConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
streamArn :: Maybe (Value Text)
..}
    = [(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
"StreamArn" (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)
streamArn]))
instance Property "StreamArn" FirehoseConfigurationProperty where
  type PropertyType "StreamArn" FirehoseConfigurationProperty = Value Prelude.Text
  set :: PropertyType "StreamArn" FirehoseConfigurationProperty
-> FirehoseConfigurationProperty -> FirehoseConfigurationProperty
set PropertyType "StreamArn" FirehoseConfigurationProperty
newValue FirehoseConfigurationProperty {Maybe (Value Text)
()
haddock_workaround_ :: FirehoseConfigurationProperty -> ()
streamArn :: FirehoseConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
streamArn :: Maybe (Value Text)
..}
    = FirehoseConfigurationProperty
        {streamArn :: Maybe (Value Text)
streamArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "StreamArn" FirehoseConfigurationProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}