module Stratosphere.Cognito.IdentityPool.CognitoStreamsProperty (
        CognitoStreamsProperty(..), mkCognitoStreamsProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CognitoStreamsProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-identitypool-cognitostreams.html>
    CognitoStreamsProperty {CognitoStreamsProperty -> ()
haddock_workaround_ :: (),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-identitypool-cognitostreams.html#cfn-cognito-identitypool-cognitostreams-rolearn>
                            CognitoStreamsProperty -> Maybe (Value Text)
roleArn :: (Prelude.Maybe (Value Prelude.Text)),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-identitypool-cognitostreams.html#cfn-cognito-identitypool-cognitostreams-streamname>
                            CognitoStreamsProperty -> Maybe (Value Text)
streamName :: (Prelude.Maybe (Value Prelude.Text)),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cognito-identitypool-cognitostreams.html#cfn-cognito-identitypool-cognitostreams-streamingstatus>
                            CognitoStreamsProperty -> Maybe (Value Text)
streamingStatus :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (CognitoStreamsProperty -> CognitoStreamsProperty -> Bool
(CognitoStreamsProperty -> CognitoStreamsProperty -> Bool)
-> (CognitoStreamsProperty -> CognitoStreamsProperty -> Bool)
-> Eq CognitoStreamsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CognitoStreamsProperty -> CognitoStreamsProperty -> Bool
== :: CognitoStreamsProperty -> CognitoStreamsProperty -> Bool
$c/= :: CognitoStreamsProperty -> CognitoStreamsProperty -> Bool
/= :: CognitoStreamsProperty -> CognitoStreamsProperty -> Bool
Prelude.Eq, Int -> CognitoStreamsProperty -> ShowS
[CognitoStreamsProperty] -> ShowS
CognitoStreamsProperty -> String
(Int -> CognitoStreamsProperty -> ShowS)
-> (CognitoStreamsProperty -> String)
-> ([CognitoStreamsProperty] -> ShowS)
-> Show CognitoStreamsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CognitoStreamsProperty -> ShowS
showsPrec :: Int -> CognitoStreamsProperty -> ShowS
$cshow :: CognitoStreamsProperty -> String
show :: CognitoStreamsProperty -> String
$cshowList :: [CognitoStreamsProperty] -> ShowS
showList :: [CognitoStreamsProperty] -> ShowS
Prelude.Show)
mkCognitoStreamsProperty :: CognitoStreamsProperty
mkCognitoStreamsProperty :: CognitoStreamsProperty
mkCognitoStreamsProperty
  = CognitoStreamsProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), roleArn :: Maybe (Value Text)
roleArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       streamName :: Maybe (Value Text)
streamName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing, streamingStatus :: Maybe (Value Text)
streamingStatus = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CognitoStreamsProperty where
  toResourceProperties :: CognitoStreamsProperty -> ResourceProperties
toResourceProperties CognitoStreamsProperty {Maybe (Value Text)
()
haddock_workaround_ :: CognitoStreamsProperty -> ()
roleArn :: CognitoStreamsProperty -> Maybe (Value Text)
streamName :: CognitoStreamsProperty -> Maybe (Value Text)
streamingStatus :: CognitoStreamsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
roleArn :: Maybe (Value Text)
streamName :: Maybe (Value Text)
streamingStatus :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Cognito::IdentityPool.CognitoStreams",
         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
"RoleArn" (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)
roleArn,
                            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
"StreamName" (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)
streamName,
                            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
"StreamingStatus" (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)
streamingStatus])}
instance JSON.ToJSON CognitoStreamsProperty where
  toJSON :: CognitoStreamsProperty -> Value
toJSON CognitoStreamsProperty {Maybe (Value Text)
()
haddock_workaround_ :: CognitoStreamsProperty -> ()
roleArn :: CognitoStreamsProperty -> Maybe (Value Text)
streamName :: CognitoStreamsProperty -> Maybe (Value Text)
streamingStatus :: CognitoStreamsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
roleArn :: Maybe (Value Text)
streamName :: Maybe (Value Text)
streamingStatus :: 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
"RoleArn" (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)
roleArn,
               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
"StreamName" (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)
streamName,
               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
"StreamingStatus" (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)
streamingStatus]))
instance Property "RoleArn" CognitoStreamsProperty where
  type PropertyType "RoleArn" CognitoStreamsProperty = Value Prelude.Text
  set :: PropertyType "RoleArn" CognitoStreamsProperty
-> CognitoStreamsProperty -> CognitoStreamsProperty
set PropertyType "RoleArn" CognitoStreamsProperty
newValue CognitoStreamsProperty {Maybe (Value Text)
()
haddock_workaround_ :: CognitoStreamsProperty -> ()
roleArn :: CognitoStreamsProperty -> Maybe (Value Text)
streamName :: CognitoStreamsProperty -> Maybe (Value Text)
streamingStatus :: CognitoStreamsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
roleArn :: Maybe (Value Text)
streamName :: Maybe (Value Text)
streamingStatus :: Maybe (Value Text)
..}
    = CognitoStreamsProperty {roleArn :: Maybe (Value Text)
roleArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "RoleArn" CognitoStreamsProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
streamName :: Maybe (Value Text)
streamingStatus :: Maybe (Value Text)
haddock_workaround_ :: ()
streamName :: Maybe (Value Text)
streamingStatus :: Maybe (Value Text)
..}
instance Property "StreamName" CognitoStreamsProperty where
  type PropertyType "StreamName" CognitoStreamsProperty = Value Prelude.Text
  set :: PropertyType "StreamName" CognitoStreamsProperty
-> CognitoStreamsProperty -> CognitoStreamsProperty
set PropertyType "StreamName" CognitoStreamsProperty
newValue CognitoStreamsProperty {Maybe (Value Text)
()
haddock_workaround_ :: CognitoStreamsProperty -> ()
roleArn :: CognitoStreamsProperty -> Maybe (Value Text)
streamName :: CognitoStreamsProperty -> Maybe (Value Text)
streamingStatus :: CognitoStreamsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
roleArn :: Maybe (Value Text)
streamName :: Maybe (Value Text)
streamingStatus :: Maybe (Value Text)
..}
    = CognitoStreamsProperty {streamName :: Maybe (Value Text)
streamName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "StreamName" CognitoStreamsProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
roleArn :: Maybe (Value Text)
streamingStatus :: Maybe (Value Text)
haddock_workaround_ :: ()
roleArn :: Maybe (Value Text)
streamingStatus :: Maybe (Value Text)
..}
instance Property "StreamingStatus" CognitoStreamsProperty where
  type PropertyType "StreamingStatus" CognitoStreamsProperty = Value Prelude.Text
  set :: PropertyType "StreamingStatus" CognitoStreamsProperty
-> CognitoStreamsProperty -> CognitoStreamsProperty
set PropertyType "StreamingStatus" CognitoStreamsProperty
newValue CognitoStreamsProperty {Maybe (Value Text)
()
haddock_workaround_ :: CognitoStreamsProperty -> ()
roleArn :: CognitoStreamsProperty -> Maybe (Value Text)
streamName :: CognitoStreamsProperty -> Maybe (Value Text)
streamingStatus :: CognitoStreamsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
roleArn :: Maybe (Value Text)
streamName :: Maybe (Value Text)
streamingStatus :: Maybe (Value Text)
..}
    = CognitoStreamsProperty
        {streamingStatus :: Maybe (Value Text)
streamingStatus = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "StreamingStatus" CognitoStreamsProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
roleArn :: Maybe (Value Text)
streamName :: Maybe (Value Text)
haddock_workaround_ :: ()
roleArn :: Maybe (Value Text)
streamName :: Maybe (Value Text)
..}