module Stratosphere.Logs.LogStream (
        LogStream(..), mkLogStream
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data LogStream
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-logstream.html>
    LogStream {LogStream -> ()
haddock_workaround_ :: (),
               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-logstream.html#cfn-logs-logstream-loggroupname>
               LogStream -> Value Text
logGroupName :: (Value Prelude.Text),
               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-logstream.html#cfn-logs-logstream-logstreamname>
               LogStream -> Maybe (Value Text)
logStreamName :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (LogStream -> LogStream -> Bool
(LogStream -> LogStream -> Bool)
-> (LogStream -> LogStream -> Bool) -> Eq LogStream
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LogStream -> LogStream -> Bool
== :: LogStream -> LogStream -> Bool
$c/= :: LogStream -> LogStream -> Bool
/= :: LogStream -> LogStream -> Bool
Prelude.Eq, Int -> LogStream -> ShowS
[LogStream] -> ShowS
LogStream -> String
(Int -> LogStream -> ShowS)
-> (LogStream -> String)
-> ([LogStream] -> ShowS)
-> Show LogStream
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LogStream -> ShowS
showsPrec :: Int -> LogStream -> ShowS
$cshow :: LogStream -> String
show :: LogStream -> String
$cshowList :: [LogStream] -> ShowS
showList :: [LogStream] -> ShowS
Prelude.Show)
mkLogStream :: Value Prelude.Text -> LogStream
mkLogStream :: Value Text -> LogStream
mkLogStream Value Text
logGroupName
  = LogStream
      {haddock_workaround_ :: ()
haddock_workaround_ = (), logGroupName :: Value Text
logGroupName = Value Text
logGroupName,
       logStreamName :: Maybe (Value Text)
logStreamName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties LogStream where
  toResourceProperties :: LogStream -> ResourceProperties
toResourceProperties LogStream {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: LogStream -> ()
logGroupName :: LogStream -> Value Text
logStreamName :: LogStream -> Maybe (Value Text)
haddock_workaround_ :: ()
logGroupName :: Value Text
logStreamName :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Logs::LogStream", supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
                           [Key
"LogGroupName" 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..= Value Text
logGroupName]
                           ([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
"LogStreamName" (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)
logStreamName]))}
instance JSON.ToJSON LogStream where
  toJSON :: LogStream -> Value
toJSON LogStream {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: LogStream -> ()
logGroupName :: LogStream -> Value Text
logStreamName :: LogStream -> Maybe (Value Text)
haddock_workaround_ :: ()
logGroupName :: Value Text
logStreamName :: Maybe (Value Text)
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
              [Key
"LogGroupName" 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..= Value Text
logGroupName]
              ([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
"LogStreamName" (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)
logStreamName])))
instance Property "LogGroupName" LogStream where
  type PropertyType "LogGroupName" LogStream = Value Prelude.Text
  set :: PropertyType "LogGroupName" LogStream -> LogStream -> LogStream
set PropertyType "LogGroupName" LogStream
newValue LogStream {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: LogStream -> ()
logGroupName :: LogStream -> Value Text
logStreamName :: LogStream -> Maybe (Value Text)
haddock_workaround_ :: ()
logGroupName :: Value Text
logStreamName :: Maybe (Value Text)
..}
    = LogStream {logGroupName :: Value Text
logGroupName = PropertyType "LogGroupName" LogStream
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
logStreamName :: Maybe (Value Text)
haddock_workaround_ :: ()
logStreamName :: Maybe (Value Text)
..}
instance Property "LogStreamName" LogStream where
  type PropertyType "LogStreamName" LogStream = Value Prelude.Text
  set :: PropertyType "LogStreamName" LogStream -> LogStream -> LogStream
set PropertyType "LogStreamName" LogStream
newValue LogStream {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: LogStream -> ()
logGroupName :: LogStream -> Value Text
logStreamName :: LogStream -> Maybe (Value Text)
haddock_workaround_ :: ()
logGroupName :: Value Text
logStreamName :: Maybe (Value Text)
..}
    = LogStream {logStreamName :: Maybe (Value Text)
logStreamName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "LogStreamName" LogStream
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
logGroupName :: Value Text
haddock_workaround_ :: ()
logGroupName :: Value Text
..}