{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.KinesisAnalytics.Types.CloudWatchLoggingOptionDescription where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CloudWatchLoggingOptionDescription = CloudWatchLoggingOptionDescription'
{
CloudWatchLoggingOptionDescription -> Maybe Text
cloudWatchLoggingOptionId :: Prelude.Maybe Prelude.Text,
CloudWatchLoggingOptionDescription -> Text
logStreamARN :: Prelude.Text,
CloudWatchLoggingOptionDescription -> Text
roleARN :: Prelude.Text
}
deriving (CloudWatchLoggingOptionDescription
-> CloudWatchLoggingOptionDescription -> Bool
(CloudWatchLoggingOptionDescription
-> CloudWatchLoggingOptionDescription -> Bool)
-> (CloudWatchLoggingOptionDescription
-> CloudWatchLoggingOptionDescription -> Bool)
-> Eq CloudWatchLoggingOptionDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CloudWatchLoggingOptionDescription
-> CloudWatchLoggingOptionDescription -> Bool
$c/= :: CloudWatchLoggingOptionDescription
-> CloudWatchLoggingOptionDescription -> Bool
== :: CloudWatchLoggingOptionDescription
-> CloudWatchLoggingOptionDescription -> Bool
$c== :: CloudWatchLoggingOptionDescription
-> CloudWatchLoggingOptionDescription -> Bool
Prelude.Eq, ReadPrec [CloudWatchLoggingOptionDescription]
ReadPrec CloudWatchLoggingOptionDescription
Int -> ReadS CloudWatchLoggingOptionDescription
ReadS [CloudWatchLoggingOptionDescription]
(Int -> ReadS CloudWatchLoggingOptionDescription)
-> ReadS [CloudWatchLoggingOptionDescription]
-> ReadPrec CloudWatchLoggingOptionDescription
-> ReadPrec [CloudWatchLoggingOptionDescription]
-> Read CloudWatchLoggingOptionDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CloudWatchLoggingOptionDescription]
$creadListPrec :: ReadPrec [CloudWatchLoggingOptionDescription]
readPrec :: ReadPrec CloudWatchLoggingOptionDescription
$creadPrec :: ReadPrec CloudWatchLoggingOptionDescription
readList :: ReadS [CloudWatchLoggingOptionDescription]
$creadList :: ReadS [CloudWatchLoggingOptionDescription]
readsPrec :: Int -> ReadS CloudWatchLoggingOptionDescription
$creadsPrec :: Int -> ReadS CloudWatchLoggingOptionDescription
Prelude.Read, Int -> CloudWatchLoggingOptionDescription -> ShowS
[CloudWatchLoggingOptionDescription] -> ShowS
CloudWatchLoggingOptionDescription -> String
(Int -> CloudWatchLoggingOptionDescription -> ShowS)
-> (CloudWatchLoggingOptionDescription -> String)
-> ([CloudWatchLoggingOptionDescription] -> ShowS)
-> Show CloudWatchLoggingOptionDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CloudWatchLoggingOptionDescription] -> ShowS
$cshowList :: [CloudWatchLoggingOptionDescription] -> ShowS
show :: CloudWatchLoggingOptionDescription -> String
$cshow :: CloudWatchLoggingOptionDescription -> String
showsPrec :: Int -> CloudWatchLoggingOptionDescription -> ShowS
$cshowsPrec :: Int -> CloudWatchLoggingOptionDescription -> ShowS
Prelude.Show, (forall x.
CloudWatchLoggingOptionDescription
-> Rep CloudWatchLoggingOptionDescription x)
-> (forall x.
Rep CloudWatchLoggingOptionDescription x
-> CloudWatchLoggingOptionDescription)
-> Generic CloudWatchLoggingOptionDescription
forall x.
Rep CloudWatchLoggingOptionDescription x
-> CloudWatchLoggingOptionDescription
forall x.
CloudWatchLoggingOptionDescription
-> Rep CloudWatchLoggingOptionDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CloudWatchLoggingOptionDescription x
-> CloudWatchLoggingOptionDescription
$cfrom :: forall x.
CloudWatchLoggingOptionDescription
-> Rep CloudWatchLoggingOptionDescription x
Prelude.Generic)
newCloudWatchLoggingOptionDescription ::
Prelude.Text ->
Prelude.Text ->
CloudWatchLoggingOptionDescription
newCloudWatchLoggingOptionDescription :: Text -> Text -> CloudWatchLoggingOptionDescription
newCloudWatchLoggingOptionDescription
Text
pLogStreamARN_
Text
pRoleARN_ =
CloudWatchLoggingOptionDescription' :: Maybe Text -> Text -> Text -> CloudWatchLoggingOptionDescription
CloudWatchLoggingOptionDescription'
{ $sel:cloudWatchLoggingOptionId:CloudWatchLoggingOptionDescription' :: Maybe Text
cloudWatchLoggingOptionId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:logStreamARN:CloudWatchLoggingOptionDescription' :: Text
logStreamARN = Text
pLogStreamARN_,
$sel:roleARN:CloudWatchLoggingOptionDescription' :: Text
roleARN = Text
pRoleARN_
}
cloudWatchLoggingOptionDescription_cloudWatchLoggingOptionId :: Lens.Lens' CloudWatchLoggingOptionDescription (Prelude.Maybe Prelude.Text)
cloudWatchLoggingOptionDescription_cloudWatchLoggingOptionId :: (Maybe Text -> f (Maybe Text))
-> CloudWatchLoggingOptionDescription
-> f CloudWatchLoggingOptionDescription
cloudWatchLoggingOptionDescription_cloudWatchLoggingOptionId = (CloudWatchLoggingOptionDescription -> Maybe Text)
-> (CloudWatchLoggingOptionDescription
-> Maybe Text -> CloudWatchLoggingOptionDescription)
-> Lens
CloudWatchLoggingOptionDescription
CloudWatchLoggingOptionDescription
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudWatchLoggingOptionDescription' {Maybe Text
cloudWatchLoggingOptionId :: Maybe Text
$sel:cloudWatchLoggingOptionId:CloudWatchLoggingOptionDescription' :: CloudWatchLoggingOptionDescription -> Maybe Text
cloudWatchLoggingOptionId} -> Maybe Text
cloudWatchLoggingOptionId) (\s :: CloudWatchLoggingOptionDescription
s@CloudWatchLoggingOptionDescription' {} Maybe Text
a -> CloudWatchLoggingOptionDescription
s {$sel:cloudWatchLoggingOptionId:CloudWatchLoggingOptionDescription' :: Maybe Text
cloudWatchLoggingOptionId = Maybe Text
a} :: CloudWatchLoggingOptionDescription)
cloudWatchLoggingOptionDescription_logStreamARN :: Lens.Lens' CloudWatchLoggingOptionDescription Prelude.Text
cloudWatchLoggingOptionDescription_logStreamARN :: (Text -> f Text)
-> CloudWatchLoggingOptionDescription
-> f CloudWatchLoggingOptionDescription
cloudWatchLoggingOptionDescription_logStreamARN = (CloudWatchLoggingOptionDescription -> Text)
-> (CloudWatchLoggingOptionDescription
-> Text -> CloudWatchLoggingOptionDescription)
-> Lens
CloudWatchLoggingOptionDescription
CloudWatchLoggingOptionDescription
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudWatchLoggingOptionDescription' {Text
logStreamARN :: Text
$sel:logStreamARN:CloudWatchLoggingOptionDescription' :: CloudWatchLoggingOptionDescription -> Text
logStreamARN} -> Text
logStreamARN) (\s :: CloudWatchLoggingOptionDescription
s@CloudWatchLoggingOptionDescription' {} Text
a -> CloudWatchLoggingOptionDescription
s {$sel:logStreamARN:CloudWatchLoggingOptionDescription' :: Text
logStreamARN = Text
a} :: CloudWatchLoggingOptionDescription)
cloudWatchLoggingOptionDescription_roleARN :: Lens.Lens' CloudWatchLoggingOptionDescription Prelude.Text
cloudWatchLoggingOptionDescription_roleARN :: (Text -> f Text)
-> CloudWatchLoggingOptionDescription
-> f CloudWatchLoggingOptionDescription
cloudWatchLoggingOptionDescription_roleARN = (CloudWatchLoggingOptionDescription -> Text)
-> (CloudWatchLoggingOptionDescription
-> Text -> CloudWatchLoggingOptionDescription)
-> Lens
CloudWatchLoggingOptionDescription
CloudWatchLoggingOptionDescription
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudWatchLoggingOptionDescription' {Text
roleARN :: Text
$sel:roleARN:CloudWatchLoggingOptionDescription' :: CloudWatchLoggingOptionDescription -> Text
roleARN} -> Text
roleARN) (\s :: CloudWatchLoggingOptionDescription
s@CloudWatchLoggingOptionDescription' {} Text
a -> CloudWatchLoggingOptionDescription
s {$sel:roleARN:CloudWatchLoggingOptionDescription' :: Text
roleARN = Text
a} :: CloudWatchLoggingOptionDescription)
instance
Core.FromJSON
CloudWatchLoggingOptionDescription
where
parseJSON :: Value -> Parser CloudWatchLoggingOptionDescription
parseJSON =
String
-> (Object -> Parser CloudWatchLoggingOptionDescription)
-> Value
-> Parser CloudWatchLoggingOptionDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"CloudWatchLoggingOptionDescription"
( \Object
x ->
Maybe Text -> Text -> Text -> CloudWatchLoggingOptionDescription
CloudWatchLoggingOptionDescription'
(Maybe Text -> Text -> Text -> CloudWatchLoggingOptionDescription)
-> Parser (Maybe Text)
-> Parser (Text -> Text -> CloudWatchLoggingOptionDescription)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CloudWatchLoggingOptionId")
Parser (Text -> Text -> CloudWatchLoggingOptionDescription)
-> Parser Text
-> Parser (Text -> CloudWatchLoggingOptionDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"LogStreamARN")
Parser (Text -> CloudWatchLoggingOptionDescription)
-> Parser Text -> Parser CloudWatchLoggingOptionDescription
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"RoleARN")
)
instance
Prelude.Hashable
CloudWatchLoggingOptionDescription
instance
Prelude.NFData
CloudWatchLoggingOptionDescription