module Stratosphere.EC2.VerifiedAccessInstance.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-ec2-verifiedaccessinstance-cloudwatchlogs.html>
    CloudWatchLogsProperty {CloudWatchLogsProperty -> ()
haddock_workaround_ :: (),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-verifiedaccessinstance-cloudwatchlogs.html#cfn-ec2-verifiedaccessinstance-cloudwatchlogs-enabled>
                            CloudWatchLogsProperty -> Maybe (Value Bool)
enabled :: (Prelude.Maybe (Value Prelude.Bool)),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-verifiedaccessinstance-cloudwatchlogs.html#cfn-ec2-verifiedaccessinstance-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 :: CloudWatchLogsProperty
mkCloudWatchLogsProperty :: CloudWatchLogsProperty
mkCloudWatchLogsProperty
  = CloudWatchLogsProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), enabled :: Maybe (Value Bool)
enabled = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing,
       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 Bool)
Maybe (Value Text)
()
haddock_workaround_ :: CloudWatchLogsProperty -> ()
enabled :: CloudWatchLogsProperty -> Maybe (Value Bool)
logGroup :: CloudWatchLogsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
logGroup :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::EC2::VerifiedAccessInstance.CloudWatchLogs",
         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 Bool -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Enabled" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
enabled,
                            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 Bool)
Maybe (Value Text)
()
haddock_workaround_ :: CloudWatchLogsProperty -> ()
enabled :: CloudWatchLogsProperty -> Maybe (Value Bool)
logGroup :: CloudWatchLogsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Maybe (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
           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
              [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..=) Key
"Enabled" (Value Bool -> (Key, Value))
-> Maybe (Value Bool) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Bool)
enabled,
               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 Bool)
Maybe (Value Text)
()
haddock_workaround_ :: CloudWatchLogsProperty -> ()
enabled :: CloudWatchLogsProperty -> Maybe (Value Bool)
logGroup :: CloudWatchLogsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
logGroup :: Maybe (Value Text)
..}
    = CloudWatchLogsProperty {enabled :: Maybe (Value Bool)
enabled = Value Bool -> Maybe (Value Bool)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure 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 Bool)
Maybe (Value Text)
()
haddock_workaround_ :: CloudWatchLogsProperty -> ()
enabled :: CloudWatchLogsProperty -> Maybe (Value Bool)
logGroup :: CloudWatchLogsProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
enabled :: Maybe (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, Maybe (Value Bool)
()
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
..}