{-# 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.KinesisAnalyticsV2.Types.CloudWatchLoggingOptionDescription where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data CloudWatchLoggingOptionDescription = CloudWatchLoggingOptionDescription'
{
CloudWatchLoggingOptionDescription -> Maybe Text
cloudWatchLoggingOptionId :: Prelude.Maybe Prelude.Text,
CloudWatchLoggingOptionDescription -> Maybe Text
roleARN :: Prelude.Maybe Prelude.Text,
CloudWatchLoggingOptionDescription -> Text
logStreamARN :: Prelude.Text
}
deriving (CloudWatchLoggingOptionDescription
-> CloudWatchLoggingOptionDescription -> Bool
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]
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
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.
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 ->
CloudWatchLoggingOptionDescription
newCloudWatchLoggingOptionDescription :: Text -> CloudWatchLoggingOptionDescription
newCloudWatchLoggingOptionDescription Text
pLogStreamARN_ =
CloudWatchLoggingOptionDescription'
{ $sel:cloudWatchLoggingOptionId:CloudWatchLoggingOptionDescription' :: Maybe Text
cloudWatchLoggingOptionId =
forall a. Maybe a
Prelude.Nothing,
$sel:roleARN:CloudWatchLoggingOptionDescription' :: Maybe Text
roleARN = forall a. Maybe a
Prelude.Nothing,
$sel:logStreamARN:CloudWatchLoggingOptionDescription' :: Text
logStreamARN = Text
pLogStreamARN_
}
cloudWatchLoggingOptionDescription_cloudWatchLoggingOptionId :: Lens.Lens' CloudWatchLoggingOptionDescription (Prelude.Maybe Prelude.Text)
cloudWatchLoggingOptionDescription_cloudWatchLoggingOptionId :: Lens' CloudWatchLoggingOptionDescription (Maybe Text)
cloudWatchLoggingOptionDescription_cloudWatchLoggingOptionId = 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_roleARN :: Lens.Lens' CloudWatchLoggingOptionDescription (Prelude.Maybe Prelude.Text)
cloudWatchLoggingOptionDescription_roleARN :: Lens' CloudWatchLoggingOptionDescription (Maybe Text)
cloudWatchLoggingOptionDescription_roleARN = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudWatchLoggingOptionDescription' {Maybe Text
roleARN :: Maybe Text
$sel:roleARN:CloudWatchLoggingOptionDescription' :: CloudWatchLoggingOptionDescription -> Maybe Text
roleARN} -> Maybe Text
roleARN) (\s :: CloudWatchLoggingOptionDescription
s@CloudWatchLoggingOptionDescription' {} Maybe Text
a -> CloudWatchLoggingOptionDescription
s {$sel:roleARN:CloudWatchLoggingOptionDescription' :: Maybe Text
roleARN = Maybe Text
a} :: CloudWatchLoggingOptionDescription)
cloudWatchLoggingOptionDescription_logStreamARN :: Lens.Lens' CloudWatchLoggingOptionDescription Prelude.Text
cloudWatchLoggingOptionDescription_logStreamARN :: Lens' CloudWatchLoggingOptionDescription Text
cloudWatchLoggingOptionDescription_logStreamARN = 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)
instance
Data.FromJSON
CloudWatchLoggingOptionDescription
where
parseJSON :: Value -> Parser CloudWatchLoggingOptionDescription
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"CloudWatchLoggingOptionDescription"
( \Object
x ->
Maybe Text
-> Maybe Text -> Text -> CloudWatchLoggingOptionDescription
CloudWatchLoggingOptionDescription'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CloudWatchLoggingOptionId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"RoleARN")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"LogStreamARN")
)
instance
Prelude.Hashable
CloudWatchLoggingOptionDescription
where
hashWithSalt :: Int -> CloudWatchLoggingOptionDescription -> Int
hashWithSalt
Int
_salt
CloudWatchLoggingOptionDescription' {Maybe Text
Text
logStreamARN :: Text
roleARN :: Maybe Text
cloudWatchLoggingOptionId :: Maybe Text
$sel:logStreamARN:CloudWatchLoggingOptionDescription' :: CloudWatchLoggingOptionDescription -> Text
$sel:roleARN:CloudWatchLoggingOptionDescription' :: CloudWatchLoggingOptionDescription -> Maybe Text
$sel:cloudWatchLoggingOptionId:CloudWatchLoggingOptionDescription' :: CloudWatchLoggingOptionDescription -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
cloudWatchLoggingOptionId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
roleARN
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
logStreamARN
instance
Prelude.NFData
CloudWatchLoggingOptionDescription
where
rnf :: CloudWatchLoggingOptionDescription -> ()
rnf CloudWatchLoggingOptionDescription' {Maybe Text
Text
logStreamARN :: Text
roleARN :: Maybe Text
cloudWatchLoggingOptionId :: Maybe Text
$sel:logStreamARN:CloudWatchLoggingOptionDescription' :: CloudWatchLoggingOptionDescription -> Text
$sel:roleARN:CloudWatchLoggingOptionDescription' :: CloudWatchLoggingOptionDescription -> Maybe Text
$sel:cloudWatchLoggingOptionId:CloudWatchLoggingOptionDescription' :: CloudWatchLoggingOptionDescription -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
cloudWatchLoggingOptionId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
roleARN
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
logStreamARN