module Stratosphere.OpenSearchService.Domain.LogPublishingOptionProperty (
LogPublishingOptionProperty(..), mkLogPublishingOptionProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data LogPublishingOptionProperty
=
LogPublishingOptionProperty {LogPublishingOptionProperty -> ()
haddock_workaround_ :: (),
LogPublishingOptionProperty -> Maybe (Value Text)
cloudWatchLogsLogGroupArn :: (Prelude.Maybe (Value Prelude.Text)),
LogPublishingOptionProperty -> Maybe (Value Bool)
enabled :: (Prelude.Maybe (Value Prelude.Bool))}
deriving stock (LogPublishingOptionProperty -> LogPublishingOptionProperty -> Bool
(LogPublishingOptionProperty
-> LogPublishingOptionProperty -> Bool)
-> (LogPublishingOptionProperty
-> LogPublishingOptionProperty -> Bool)
-> Eq LogPublishingOptionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: LogPublishingOptionProperty -> LogPublishingOptionProperty -> Bool
== :: LogPublishingOptionProperty -> LogPublishingOptionProperty -> Bool
$c/= :: LogPublishingOptionProperty -> LogPublishingOptionProperty -> Bool
/= :: LogPublishingOptionProperty -> LogPublishingOptionProperty -> Bool
Prelude.Eq, Int -> LogPublishingOptionProperty -> ShowS
[LogPublishingOptionProperty] -> ShowS
LogPublishingOptionProperty -> String
(Int -> LogPublishingOptionProperty -> ShowS)
-> (LogPublishingOptionProperty -> String)
-> ([LogPublishingOptionProperty] -> ShowS)
-> Show LogPublishingOptionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> LogPublishingOptionProperty -> ShowS
showsPrec :: Int -> LogPublishingOptionProperty -> ShowS
$cshow :: LogPublishingOptionProperty -> String
show :: LogPublishingOptionProperty -> String
$cshowList :: [LogPublishingOptionProperty] -> ShowS
showList :: [LogPublishingOptionProperty] -> ShowS
Prelude.Show)
mkLogPublishingOptionProperty :: LogPublishingOptionProperty
mkLogPublishingOptionProperty :: LogPublishingOptionProperty
mkLogPublishingOptionProperty
= LogPublishingOptionProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (),
cloudWatchLogsLogGroupArn :: Maybe (Value Text)
cloudWatchLogsLogGroupArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
enabled :: Maybe (Value Bool)
enabled = Maybe (Value Bool)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties LogPublishingOptionProperty where
toResourceProperties :: LogPublishingOptionProperty -> ResourceProperties
toResourceProperties LogPublishingOptionProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: LogPublishingOptionProperty -> ()
cloudWatchLogsLogGroupArn :: LogPublishingOptionProperty -> Maybe (Value Text)
enabled :: LogPublishingOptionProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
cloudWatchLogsLogGroupArn :: Maybe (Value Text)
enabled :: Maybe (Value Bool)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::OpenSearchService::Domain.LogPublishingOption",
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
"CloudWatchLogsLogGroupArn"
(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)
cloudWatchLogsLogGroupArn,
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])}
instance JSON.ToJSON LogPublishingOptionProperty where
toJSON :: LogPublishingOptionProperty -> Value
toJSON LogPublishingOptionProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: LogPublishingOptionProperty -> ()
cloudWatchLogsLogGroupArn :: LogPublishingOptionProperty -> Maybe (Value Text)
enabled :: LogPublishingOptionProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
cloudWatchLogsLogGroupArn :: Maybe (Value Text)
enabled :: Maybe (Value Bool)
..}
= [(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
"CloudWatchLogsLogGroupArn"
(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)
cloudWatchLogsLogGroupArn,
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]))
instance Property "CloudWatchLogsLogGroupArn" LogPublishingOptionProperty where
type PropertyType "CloudWatchLogsLogGroupArn" LogPublishingOptionProperty = Value Prelude.Text
set :: PropertyType
"CloudWatchLogsLogGroupArn" LogPublishingOptionProperty
-> LogPublishingOptionProperty -> LogPublishingOptionProperty
set PropertyType
"CloudWatchLogsLogGroupArn" LogPublishingOptionProperty
newValue LogPublishingOptionProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: LogPublishingOptionProperty -> ()
cloudWatchLogsLogGroupArn :: LogPublishingOptionProperty -> Maybe (Value Text)
enabled :: LogPublishingOptionProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
cloudWatchLogsLogGroupArn :: Maybe (Value Text)
enabled :: Maybe (Value Bool)
..}
= LogPublishingOptionProperty
{cloudWatchLogsLogGroupArn :: Maybe (Value Text)
cloudWatchLogsLogGroupArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
"CloudWatchLogsLogGroupArn" LogPublishingOptionProperty
Value Text
newValue, Maybe (Value Bool)
()
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
haddock_workaround_ :: ()
enabled :: Maybe (Value Bool)
..}
instance Property "Enabled" LogPublishingOptionProperty where
type PropertyType "Enabled" LogPublishingOptionProperty = Value Prelude.Bool
set :: PropertyType "Enabled" LogPublishingOptionProperty
-> LogPublishingOptionProperty -> LogPublishingOptionProperty
set PropertyType "Enabled" LogPublishingOptionProperty
newValue LogPublishingOptionProperty {Maybe (Value Bool)
Maybe (Value Text)
()
haddock_workaround_ :: LogPublishingOptionProperty -> ()
cloudWatchLogsLogGroupArn :: LogPublishingOptionProperty -> Maybe (Value Text)
enabled :: LogPublishingOptionProperty -> Maybe (Value Bool)
haddock_workaround_ :: ()
cloudWatchLogsLogGroupArn :: Maybe (Value Text)
enabled :: Maybe (Value Bool)
..}
= LogPublishingOptionProperty {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" LogPublishingOptionProperty
Value Bool
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
cloudWatchLogsLogGroupArn :: Maybe (Value Text)
haddock_workaround_ :: ()
cloudWatchLogsLogGroupArn :: Maybe (Value Text)
..}