{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data LogsLocation = LogsLocation'
{
LogsLocation -> Maybe CloudWatchLogsConfig
cloudWatchLogs :: Prelude.Maybe CloudWatchLogsConfig,
LogsLocation -> Maybe Text
cloudWatchLogsArn :: Prelude.Maybe Prelude.Text,
LogsLocation -> Maybe Text
deepLink :: Prelude.Maybe Prelude.Text,
LogsLocation -> Maybe Text
groupName :: Prelude.Maybe Prelude.Text,
LogsLocation -> Maybe Text
s3DeepLink :: Prelude.Maybe Prelude.Text,
LogsLocation -> Maybe S3LogsConfig
s3Logs :: Prelude.Maybe S3LogsConfig,
LogsLocation -> Maybe Text
s3LogsArn :: Prelude.Maybe Prelude.Text,
LogsLocation -> Maybe Text
streamName :: Prelude.Maybe Prelude.Text
}
deriving (LogsLocation -> LogsLocation -> Bool
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]
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
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. 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'
{ $sel:cloudWatchLogs:LogsLocation' :: Maybe CloudWatchLogsConfig
cloudWatchLogs = forall a. Maybe a
Prelude.Nothing,
$sel:cloudWatchLogsArn:LogsLocation' :: Maybe Text
cloudWatchLogsArn = forall a. Maybe a
Prelude.Nothing,
$sel:deepLink:LogsLocation' :: Maybe Text
deepLink = forall a. Maybe a
Prelude.Nothing,
$sel:groupName:LogsLocation' :: Maybe Text
groupName = forall a. Maybe a
Prelude.Nothing,
$sel:s3DeepLink:LogsLocation' :: Maybe Text
s3DeepLink = forall a. Maybe a
Prelude.Nothing,
$sel:s3Logs:LogsLocation' :: Maybe S3LogsConfig
s3Logs = forall a. Maybe a
Prelude.Nothing,
$sel:s3LogsArn:LogsLocation' :: Maybe Text
s3LogsArn = forall a. Maybe a
Prelude.Nothing,
$sel:streamName:LogsLocation' :: Maybe Text
streamName = forall a. Maybe a
Prelude.Nothing
}
logsLocation_cloudWatchLogs :: Lens.Lens' LogsLocation (Prelude.Maybe CloudWatchLogsConfig)
logsLocation_cloudWatchLogs :: Lens' LogsLocation (Maybe CloudWatchLogsConfig)
logsLocation_cloudWatchLogs = 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_cloudWatchLogsArn :: Lens.Lens' LogsLocation (Prelude.Maybe Prelude.Text)
logsLocation_cloudWatchLogsArn :: Lens' LogsLocation (Maybe Text)
logsLocation_cloudWatchLogsArn = 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_deepLink :: Lens.Lens' LogsLocation (Prelude.Maybe Prelude.Text)
logsLocation_deepLink :: Lens' LogsLocation (Maybe Text)
logsLocation_deepLink = 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_groupName :: Lens.Lens' LogsLocation (Prelude.Maybe Prelude.Text)
logsLocation_groupName :: Lens' LogsLocation (Maybe Text)
logsLocation_groupName = 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_s3DeepLink :: Lens.Lens' LogsLocation (Prelude.Maybe Prelude.Text)
logsLocation_s3DeepLink :: Lens' LogsLocation (Maybe Text)
logsLocation_s3DeepLink = 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_s3Logs :: Lens.Lens' LogsLocation (Prelude.Maybe S3LogsConfig)
logsLocation_s3Logs :: Lens' LogsLocation (Maybe S3LogsConfig)
logsLocation_s3Logs = 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_s3LogsArn :: Lens.Lens' LogsLocation (Prelude.Maybe Prelude.Text)
logsLocation_s3LogsArn :: Lens' LogsLocation (Maybe Text)
logsLocation_s3LogsArn = 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_streamName :: Lens.Lens' LogsLocation (Prelude.Maybe Prelude.Text)
logsLocation_streamName :: Lens' LogsLocation (Maybe Text)
logsLocation_streamName = 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 Data.FromJSON LogsLocation where
parseJSON :: Value -> Parser LogsLocation
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"LogsLocation"
( \Object
x ->
Maybe CloudWatchLogsConfig
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe S3LogsConfig
-> Maybe Text
-> Maybe Text
-> LogsLocation
LogsLocation'
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
"cloudWatchLogs")
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
"cloudWatchLogsArn")
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
"deepLink")
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
"groupName")
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
"s3DeepLink")
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
"s3Logs")
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
"s3LogsArn")
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
"streamName")
)
instance Prelude.Hashable LogsLocation where
hashWithSalt :: Int -> LogsLocation -> Int
hashWithSalt Int
_salt LogsLocation' {Maybe Text
Maybe CloudWatchLogsConfig
Maybe S3LogsConfig
streamName :: Maybe Text
s3LogsArn :: Maybe Text
s3Logs :: Maybe S3LogsConfig
s3DeepLink :: Maybe Text
groupName :: Maybe Text
deepLink :: Maybe Text
cloudWatchLogsArn :: Maybe Text
cloudWatchLogs :: Maybe CloudWatchLogsConfig
$sel:streamName:LogsLocation' :: LogsLocation -> Maybe Text
$sel:s3LogsArn:LogsLocation' :: LogsLocation -> Maybe Text
$sel:s3Logs:LogsLocation' :: LogsLocation -> Maybe S3LogsConfig
$sel:s3DeepLink:LogsLocation' :: LogsLocation -> Maybe Text
$sel:groupName:LogsLocation' :: LogsLocation -> Maybe Text
$sel:deepLink:LogsLocation' :: LogsLocation -> Maybe Text
$sel:cloudWatchLogsArn:LogsLocation' :: LogsLocation -> Maybe Text
$sel:cloudWatchLogs:LogsLocation' :: LogsLocation -> Maybe CloudWatchLogsConfig
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CloudWatchLogsConfig
cloudWatchLogs
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
cloudWatchLogsArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
deepLink
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
groupName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
s3DeepLink
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe S3LogsConfig
s3Logs
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
s3LogsArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
streamName
instance Prelude.NFData LogsLocation where
rnf :: LogsLocation -> ()
rnf LogsLocation' {Maybe Text
Maybe CloudWatchLogsConfig
Maybe S3LogsConfig
streamName :: Maybe Text
s3LogsArn :: Maybe Text
s3Logs :: Maybe S3LogsConfig
s3DeepLink :: Maybe Text
groupName :: Maybe Text
deepLink :: Maybe Text
cloudWatchLogsArn :: Maybe Text
cloudWatchLogs :: Maybe CloudWatchLogsConfig
$sel:streamName:LogsLocation' :: LogsLocation -> Maybe Text
$sel:s3LogsArn:LogsLocation' :: LogsLocation -> Maybe Text
$sel:s3Logs:LogsLocation' :: LogsLocation -> Maybe S3LogsConfig
$sel:s3DeepLink:LogsLocation' :: LogsLocation -> Maybe Text
$sel:groupName:LogsLocation' :: LogsLocation -> Maybe Text
$sel:deepLink:LogsLocation' :: LogsLocation -> Maybe Text
$sel:cloudWatchLogsArn:LogsLocation' :: LogsLocation -> Maybe Text
$sel:cloudWatchLogs:LogsLocation' :: LogsLocation -> Maybe CloudWatchLogsConfig
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe CloudWatchLogsConfig
cloudWatchLogs
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
cloudWatchLogsArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
deepLink
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
groupName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
s3DeepLink
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe S3LogsConfig
s3Logs
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
s3LogsArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
streamName