module Stratosphere.KafkaConnect.Connector.CloudWatchLogsLogDeliveryProperty (
        CloudWatchLogsLogDeliveryProperty(..),
        mkCloudWatchLogsLogDeliveryProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data CloudWatchLogsLogDeliveryProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kafkaconnect-connector-cloudwatchlogslogdelivery.html>
    CloudWatchLogsLogDeliveryProperty {CloudWatchLogsLogDeliveryProperty -> ()
haddock_workaround_ :: (),
                                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kafkaconnect-connector-cloudwatchlogslogdelivery.html#cfn-kafkaconnect-connector-cloudwatchlogslogdelivery-enabled>
                                       CloudWatchLogsLogDeliveryProperty -> Value Bool
enabled :: (Value Prelude.Bool),
                                       -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kafkaconnect-connector-cloudwatchlogslogdelivery.html#cfn-kafkaconnect-connector-cloudwatchlogslogdelivery-loggroup>
                                       CloudWatchLogsLogDeliveryProperty -> Maybe (Value Text)
logGroup :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (CloudWatchLogsLogDeliveryProperty
-> CloudWatchLogsLogDeliveryProperty -> Bool
(CloudWatchLogsLogDeliveryProperty
 -> CloudWatchLogsLogDeliveryProperty -> Bool)
-> (CloudWatchLogsLogDeliveryProperty
    -> CloudWatchLogsLogDeliveryProperty -> Bool)
-> Eq CloudWatchLogsLogDeliveryProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CloudWatchLogsLogDeliveryProperty
-> CloudWatchLogsLogDeliveryProperty -> Bool
== :: CloudWatchLogsLogDeliveryProperty
-> CloudWatchLogsLogDeliveryProperty -> Bool
$c/= :: CloudWatchLogsLogDeliveryProperty
-> CloudWatchLogsLogDeliveryProperty -> Bool
/= :: CloudWatchLogsLogDeliveryProperty
-> CloudWatchLogsLogDeliveryProperty -> Bool
Prelude.Eq, Int -> CloudWatchLogsLogDeliveryProperty -> ShowS
[CloudWatchLogsLogDeliveryProperty] -> ShowS
CloudWatchLogsLogDeliveryProperty -> String
(Int -> CloudWatchLogsLogDeliveryProperty -> ShowS)
-> (CloudWatchLogsLogDeliveryProperty -> String)
-> ([CloudWatchLogsLogDeliveryProperty] -> ShowS)
-> Show CloudWatchLogsLogDeliveryProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CloudWatchLogsLogDeliveryProperty -> ShowS
showsPrec :: Int -> CloudWatchLogsLogDeliveryProperty -> ShowS
$cshow :: CloudWatchLogsLogDeliveryProperty -> String
show :: CloudWatchLogsLogDeliveryProperty -> String
$cshowList :: [CloudWatchLogsLogDeliveryProperty] -> ShowS
showList :: [CloudWatchLogsLogDeliveryProperty] -> ShowS
Prelude.Show)
mkCloudWatchLogsLogDeliveryProperty ::
  Value Prelude.Bool -> CloudWatchLogsLogDeliveryProperty
mkCloudWatchLogsLogDeliveryProperty :: Value Bool -> CloudWatchLogsLogDeliveryProperty
mkCloudWatchLogsLogDeliveryProperty Value Bool
enabled
  = CloudWatchLogsLogDeliveryProperty
      {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 CloudWatchLogsLogDeliveryProperty where
  toResourceProperties :: CloudWatchLogsLogDeliveryProperty -> ResourceProperties
toResourceProperties CloudWatchLogsLogDeliveryProperty {Maybe (Value Text)
()
Value Bool
haddock_workaround_ :: CloudWatchLogsLogDeliveryProperty -> ()
enabled :: CloudWatchLogsLogDeliveryProperty -> Value Bool
logGroup :: CloudWatchLogsLogDeliveryProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Value Bool
logGroup :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::KafkaConnect::Connector.CloudWatchLogsLogDelivery",
         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 CloudWatchLogsLogDeliveryProperty where
  toJSON :: CloudWatchLogsLogDeliveryProperty -> Value
toJSON CloudWatchLogsLogDeliveryProperty {Maybe (Value Text)
()
Value Bool
haddock_workaround_ :: CloudWatchLogsLogDeliveryProperty -> ()
enabled :: CloudWatchLogsLogDeliveryProperty -> Value Bool
logGroup :: CloudWatchLogsLogDeliveryProperty -> 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" CloudWatchLogsLogDeliveryProperty where
  type PropertyType "Enabled" CloudWatchLogsLogDeliveryProperty = Value Prelude.Bool
  set :: PropertyType "Enabled" CloudWatchLogsLogDeliveryProperty
-> CloudWatchLogsLogDeliveryProperty
-> CloudWatchLogsLogDeliveryProperty
set PropertyType "Enabled" CloudWatchLogsLogDeliveryProperty
newValue CloudWatchLogsLogDeliveryProperty {Maybe (Value Text)
()
Value Bool
haddock_workaround_ :: CloudWatchLogsLogDeliveryProperty -> ()
enabled :: CloudWatchLogsLogDeliveryProperty -> Value Bool
logGroup :: CloudWatchLogsLogDeliveryProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Value Bool
logGroup :: Maybe (Value Text)
..}
    = CloudWatchLogsLogDeliveryProperty {enabled :: Value Bool
enabled = PropertyType "Enabled" CloudWatchLogsLogDeliveryProperty
Value Bool
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
logGroup :: Maybe (Value Text)
haddock_workaround_ :: ()
logGroup :: Maybe (Value Text)
..}
instance Property "LogGroup" CloudWatchLogsLogDeliveryProperty where
  type PropertyType "LogGroup" CloudWatchLogsLogDeliveryProperty = Value Prelude.Text
  set :: PropertyType "LogGroup" CloudWatchLogsLogDeliveryProperty
-> CloudWatchLogsLogDeliveryProperty
-> CloudWatchLogsLogDeliveryProperty
set PropertyType "LogGroup" CloudWatchLogsLogDeliveryProperty
newValue CloudWatchLogsLogDeliveryProperty {Maybe (Value Text)
()
Value Bool
haddock_workaround_ :: CloudWatchLogsLogDeliveryProperty -> ()
enabled :: CloudWatchLogsLogDeliveryProperty -> Value Bool
logGroup :: CloudWatchLogsLogDeliveryProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Value Bool
logGroup :: Maybe (Value Text)
..}
    = CloudWatchLogsLogDeliveryProperty
        {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" CloudWatchLogsLogDeliveryProperty
Value Text
newValue, ()
Value Bool
haddock_workaround_ :: ()
enabled :: Value Bool
haddock_workaround_ :: ()
enabled :: Value Bool
..}