{-# 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.CodeBuild.Types.LogsLocation where
import Amazonka.CodeBuild.Types.CloudWatchLogsConfig
import Amazonka.CodeBuild.Types.S3LogsConfig
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data LogsLocation = LogsLocation'
{
LogsLocation -> Maybe Text
deepLink :: Prelude.Maybe Prelude.Text,
LogsLocation -> Maybe S3LogsConfig
s3Logs :: Prelude.Maybe S3LogsConfig,
LogsLocation -> Maybe CloudWatchLogsConfig
cloudWatchLogs :: Prelude.Maybe CloudWatchLogsConfig,
LogsLocation -> Maybe Text
s3DeepLink :: Prelude.Maybe Prelude.Text,
LogsLocation -> Maybe Text
s3LogsArn :: Prelude.Maybe Prelude.Text,
LogsLocation -> Maybe Text
cloudWatchLogsArn :: Prelude.Maybe Prelude.Text,
LogsLocation -> Maybe Text
groupName :: Prelude.Maybe Prelude.Text,
LogsLocation -> Maybe Text
streamName :: Prelude.Maybe Prelude.Text
}
deriving (LogsLocation -> LogsLocation -> Bool
(LogsLocation -> LogsLocation -> Bool)
-> (LogsLocation -> LogsLocation -> Bool) -> Eq LogsLocation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LogsLocation -> LogsLocation -> Bool
$c/= :: LogsLocation -> LogsLocation -> Bool
== :: LogsLocation -> LogsLocation -> Bool
$c== :: LogsLocation -> LogsLocation -> Bool
Prelude.Eq, ReadPrec [LogsLocation]
ReadPrec LogsLocation
Int -> ReadS LogsLocation
ReadS [LogsLocation]
(Int -> ReadS LogsLocation)
-> ReadS [LogsLocation]
-> ReadPrec LogsLocation
-> ReadPrec [LogsLocation]
-> Read LogsLocation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LogsLocation]
$creadListPrec :: ReadPrec [LogsLocation]
readPrec :: ReadPrec LogsLocation
$creadPrec :: ReadPrec LogsLocation
readList :: ReadS [LogsLocation]
$creadList :: ReadS [LogsLocation]
readsPrec :: Int -> ReadS LogsLocation
$creadsPrec :: Int -> ReadS LogsLocation
Prelude.Read, Int -> LogsLocation -> ShowS
[LogsLocation] -> ShowS
LogsLocation -> String
(Int -> LogsLocation -> ShowS)
-> (LogsLocation -> String)
-> ([LogsLocation] -> ShowS)
-> Show LogsLocation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LogsLocation] -> ShowS
$cshowList :: [LogsLocation] -> ShowS
show :: LogsLocation -> String
$cshow :: LogsLocation -> String
showsPrec :: Int -> LogsLocation -> ShowS
$cshowsPrec :: Int -> LogsLocation -> ShowS
Prelude.Show, (forall x. LogsLocation -> Rep LogsLocation x)
-> (forall x. Rep LogsLocation x -> LogsLocation)
-> Generic LogsLocation
forall x. Rep LogsLocation x -> LogsLocation
forall x. LogsLocation -> Rep LogsLocation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LogsLocation x -> LogsLocation
$cfrom :: forall x. LogsLocation -> Rep LogsLocation x
Prelude.Generic)
newLogsLocation ::
LogsLocation
newLogsLocation :: LogsLocation
newLogsLocation =
LogsLocation' :: Maybe Text
-> Maybe S3LogsConfig
-> Maybe CloudWatchLogsConfig
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> LogsLocation
LogsLocation'
{ $sel:deepLink:LogsLocation' :: Maybe Text
deepLink = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:s3Logs:LogsLocation' :: Maybe S3LogsConfig
s3Logs = Maybe S3LogsConfig
forall a. Maybe a
Prelude.Nothing,
$sel:cloudWatchLogs:LogsLocation' :: Maybe CloudWatchLogsConfig
cloudWatchLogs = Maybe CloudWatchLogsConfig
forall a. Maybe a
Prelude.Nothing,
$sel:s3DeepLink:LogsLocation' :: Maybe Text
s3DeepLink = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:s3LogsArn:LogsLocation' :: Maybe Text
s3LogsArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:cloudWatchLogsArn:LogsLocation' :: Maybe Text
cloudWatchLogsArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:groupName:LogsLocation' :: Maybe Text
groupName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:streamName:LogsLocation' :: Maybe Text
streamName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
logsLocation_deepLink :: Lens.Lens' LogsLocation (Prelude.Maybe Prelude.Text)
logsLocation_deepLink :: (Maybe Text -> f (Maybe Text)) -> LogsLocation -> f LogsLocation
logsLocation_deepLink = (LogsLocation -> Maybe Text)
-> (LogsLocation -> Maybe Text -> LogsLocation)
-> Lens LogsLocation LogsLocation (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LogsLocation' {Maybe Text
deepLink :: Maybe Text
$sel:deepLink:LogsLocation' :: LogsLocation -> Maybe Text
deepLink} -> Maybe Text
deepLink) (\s :: LogsLocation
s@LogsLocation' {} Maybe Text
a -> LogsLocation
s {$sel:deepLink:LogsLocation' :: Maybe Text
deepLink = Maybe Text
a} :: LogsLocation)
logsLocation_s3Logs :: Lens.Lens' LogsLocation (Prelude.Maybe S3LogsConfig)
logsLocation_s3Logs :: (Maybe S3LogsConfig -> f (Maybe S3LogsConfig))
-> LogsLocation -> f LogsLocation
logsLocation_s3Logs = (LogsLocation -> Maybe S3LogsConfig)
-> (LogsLocation -> Maybe S3LogsConfig -> LogsLocation)
-> Lens
LogsLocation LogsLocation (Maybe S3LogsConfig) (Maybe S3LogsConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LogsLocation' {Maybe S3LogsConfig
s3Logs :: Maybe S3LogsConfig
$sel:s3Logs:LogsLocation' :: LogsLocation -> Maybe S3LogsConfig
s3Logs} -> Maybe S3LogsConfig
s3Logs) (\s :: LogsLocation
s@LogsLocation' {} Maybe S3LogsConfig
a -> LogsLocation
s {$sel:s3Logs:LogsLocation' :: Maybe S3LogsConfig
s3Logs = Maybe S3LogsConfig
a} :: LogsLocation)
logsLocation_cloudWatchLogs :: Lens.Lens' LogsLocation (Prelude.Maybe CloudWatchLogsConfig)
logsLocation_cloudWatchLogs :: (Maybe CloudWatchLogsConfig -> f (Maybe CloudWatchLogsConfig))
-> LogsLocation -> f LogsLocation
logsLocation_cloudWatchLogs = (LogsLocation -> Maybe CloudWatchLogsConfig)
-> (LogsLocation -> Maybe CloudWatchLogsConfig -> LogsLocation)
-> Lens
LogsLocation
LogsLocation
(Maybe CloudWatchLogsConfig)
(Maybe CloudWatchLogsConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LogsLocation' {Maybe CloudWatchLogsConfig
cloudWatchLogs :: Maybe CloudWatchLogsConfig
$sel:cloudWatchLogs:LogsLocation' :: LogsLocation -> Maybe CloudWatchLogsConfig
cloudWatchLogs} -> Maybe CloudWatchLogsConfig
cloudWatchLogs) (\s :: LogsLocation
s@LogsLocation' {} Maybe CloudWatchLogsConfig
a -> LogsLocation
s {$sel:cloudWatchLogs:LogsLocation' :: Maybe CloudWatchLogsConfig
cloudWatchLogs = Maybe CloudWatchLogsConfig
a} :: LogsLocation)
logsLocation_s3DeepLink :: Lens.Lens' LogsLocation (Prelude.Maybe Prelude.Text)
logsLocation_s3DeepLink :: (Maybe Text -> f (Maybe Text)) -> LogsLocation -> f LogsLocation
logsLocation_s3DeepLink = (LogsLocation -> Maybe Text)
-> (LogsLocation -> Maybe Text -> LogsLocation)
-> Lens LogsLocation LogsLocation (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LogsLocation' {Maybe Text
s3DeepLink :: Maybe Text
$sel:s3DeepLink:LogsLocation' :: LogsLocation -> Maybe Text
s3DeepLink} -> Maybe Text
s3DeepLink) (\s :: LogsLocation
s@LogsLocation' {} Maybe Text
a -> LogsLocation
s {$sel:s3DeepLink:LogsLocation' :: Maybe Text
s3DeepLink = Maybe Text
a} :: LogsLocation)
logsLocation_s3LogsArn :: Lens.Lens' LogsLocation (Prelude.Maybe Prelude.Text)
logsLocation_s3LogsArn :: (Maybe Text -> f (Maybe Text)) -> LogsLocation -> f LogsLocation
logsLocation_s3LogsArn = (LogsLocation -> Maybe Text)
-> (LogsLocation -> Maybe Text -> LogsLocation)
-> Lens LogsLocation LogsLocation (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LogsLocation' {Maybe Text
s3LogsArn :: Maybe Text
$sel:s3LogsArn:LogsLocation' :: LogsLocation -> Maybe Text
s3LogsArn} -> Maybe Text
s3LogsArn) (\s :: LogsLocation
s@LogsLocation' {} Maybe Text
a -> LogsLocation
s {$sel:s3LogsArn:LogsLocation' :: Maybe Text
s3LogsArn = Maybe Text
a} :: LogsLocation)
logsLocation_cloudWatchLogsArn :: Lens.Lens' LogsLocation (Prelude.Maybe Prelude.Text)
logsLocation_cloudWatchLogsArn :: (Maybe Text -> f (Maybe Text)) -> LogsLocation -> f LogsLocation
logsLocation_cloudWatchLogsArn = (LogsLocation -> Maybe Text)
-> (LogsLocation -> Maybe Text -> LogsLocation)
-> Lens LogsLocation LogsLocation (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LogsLocation' {Maybe Text
cloudWatchLogsArn :: Maybe Text
$sel:cloudWatchLogsArn:LogsLocation' :: LogsLocation -> Maybe Text
cloudWatchLogsArn} -> Maybe Text
cloudWatchLogsArn) (\s :: LogsLocation
s@LogsLocation' {} Maybe Text
a -> LogsLocation
s {$sel:cloudWatchLogsArn:LogsLocation' :: Maybe Text
cloudWatchLogsArn = Maybe Text
a} :: LogsLocation)
logsLocation_groupName :: Lens.Lens' LogsLocation (Prelude.Maybe Prelude.Text)
logsLocation_groupName :: (Maybe Text -> f (Maybe Text)) -> LogsLocation -> f LogsLocation
logsLocation_groupName = (LogsLocation -> Maybe Text)
-> (LogsLocation -> Maybe Text -> LogsLocation)
-> Lens LogsLocation LogsLocation (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LogsLocation' {Maybe Text
groupName :: Maybe Text
$sel:groupName:LogsLocation' :: LogsLocation -> Maybe Text
groupName} -> Maybe Text
groupName) (\s :: LogsLocation
s@LogsLocation' {} Maybe Text
a -> LogsLocation
s {$sel:groupName:LogsLocation' :: Maybe Text
groupName = Maybe Text
a} :: LogsLocation)
logsLocation_streamName :: Lens.Lens' LogsLocation (Prelude.Maybe Prelude.Text)
logsLocation_streamName :: (Maybe Text -> f (Maybe Text)) -> LogsLocation -> f LogsLocation
logsLocation_streamName = (LogsLocation -> Maybe Text)
-> (LogsLocation -> Maybe Text -> LogsLocation)
-> Lens LogsLocation LogsLocation (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LogsLocation' {Maybe Text
streamName :: Maybe Text
$sel:streamName:LogsLocation' :: LogsLocation -> Maybe Text
streamName} -> Maybe Text
streamName) (\s :: LogsLocation
s@LogsLocation' {} Maybe Text
a -> LogsLocation
s {$sel:streamName:LogsLocation' :: Maybe Text
streamName = Maybe Text
a} :: LogsLocation)
instance Core.FromJSON LogsLocation where
parseJSON :: Value -> Parser LogsLocation
parseJSON =
String
-> (Object -> Parser LogsLocation) -> Value -> Parser LogsLocation
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"LogsLocation"
( \Object
x ->
Maybe Text
-> Maybe S3LogsConfig
-> Maybe CloudWatchLogsConfig
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> LogsLocation
LogsLocation'
(Maybe Text
-> Maybe S3LogsConfig
-> Maybe CloudWatchLogsConfig
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> LogsLocation)
-> Parser (Maybe Text)
-> Parser
(Maybe S3LogsConfig
-> Maybe CloudWatchLogsConfig
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> LogsLocation)
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
"deepLink")
Parser
(Maybe S3LogsConfig
-> Maybe CloudWatchLogsConfig
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> LogsLocation)
-> Parser (Maybe S3LogsConfig)
-> Parser
(Maybe CloudWatchLogsConfig
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> LogsLocation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe S3LogsConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"s3Logs")
Parser
(Maybe CloudWatchLogsConfig
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> LogsLocation)
-> Parser (Maybe CloudWatchLogsConfig)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> LogsLocation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe CloudWatchLogsConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"cloudWatchLogs")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> LogsLocation)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> LogsLocation)
forall (f :: * -> *) a b. Applicative f => 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
"s3DeepLink")
Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> LogsLocation)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> Maybe Text -> LogsLocation)
forall (f :: * -> *) a b. Applicative f => 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
"s3LogsArn")
Parser (Maybe Text -> Maybe Text -> Maybe Text -> LogsLocation)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> LogsLocation)
forall (f :: * -> *) a b. Applicative f => 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
"cloudWatchLogsArn")
Parser (Maybe Text -> Maybe Text -> LogsLocation)
-> Parser (Maybe Text) -> Parser (Maybe Text -> LogsLocation)
forall (f :: * -> *) a b. Applicative f => 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
"groupName")
Parser (Maybe Text -> LogsLocation)
-> Parser (Maybe Text) -> Parser LogsLocation
forall (f :: * -> *) a b. Applicative f => 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
"streamName")
)
instance Prelude.Hashable LogsLocation
instance Prelude.NFData LogsLocation