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