{-# 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.DebugSession 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 DebugSession = DebugSession'
{
DebugSession -> Maybe Bool
sessionEnabled :: Prelude.Maybe Prelude.Bool,
DebugSession -> Maybe Text
sessionTarget :: Prelude.Maybe Prelude.Text
}
deriving (DebugSession -> DebugSession -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DebugSession -> DebugSession -> Bool
$c/= :: DebugSession -> DebugSession -> Bool
== :: DebugSession -> DebugSession -> Bool
$c== :: DebugSession -> DebugSession -> Bool
Prelude.Eq, ReadPrec [DebugSession]
ReadPrec DebugSession
Int -> ReadS DebugSession
ReadS [DebugSession]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DebugSession]
$creadListPrec :: ReadPrec [DebugSession]
readPrec :: ReadPrec DebugSession
$creadPrec :: ReadPrec DebugSession
readList :: ReadS [DebugSession]
$creadList :: ReadS [DebugSession]
readsPrec :: Int -> ReadS DebugSession
$creadsPrec :: Int -> ReadS DebugSession
Prelude.Read, Int -> DebugSession -> ShowS
[DebugSession] -> ShowS
DebugSession -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DebugSession] -> ShowS
$cshowList :: [DebugSession] -> ShowS
show :: DebugSession -> String
$cshow :: DebugSession -> String
showsPrec :: Int -> DebugSession -> ShowS
$cshowsPrec :: Int -> DebugSession -> ShowS
Prelude.Show, forall x. Rep DebugSession x -> DebugSession
forall x. DebugSession -> Rep DebugSession x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DebugSession x -> DebugSession
$cfrom :: forall x. DebugSession -> Rep DebugSession x
Prelude.Generic)
newDebugSession ::
DebugSession
newDebugSession :: DebugSession
newDebugSession =
DebugSession'
{ $sel:sessionEnabled:DebugSession' :: Maybe Bool
sessionEnabled = forall a. Maybe a
Prelude.Nothing,
$sel:sessionTarget:DebugSession' :: Maybe Text
sessionTarget = forall a. Maybe a
Prelude.Nothing
}
debugSession_sessionEnabled :: Lens.Lens' DebugSession (Prelude.Maybe Prelude.Bool)
debugSession_sessionEnabled :: Lens' DebugSession (Maybe Bool)
debugSession_sessionEnabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DebugSession' {Maybe Bool
sessionEnabled :: Maybe Bool
$sel:sessionEnabled:DebugSession' :: DebugSession -> Maybe Bool
sessionEnabled} -> Maybe Bool
sessionEnabled) (\s :: DebugSession
s@DebugSession' {} Maybe Bool
a -> DebugSession
s {$sel:sessionEnabled:DebugSession' :: Maybe Bool
sessionEnabled = Maybe Bool
a} :: DebugSession)
debugSession_sessionTarget :: Lens.Lens' DebugSession (Prelude.Maybe Prelude.Text)
debugSession_sessionTarget :: Lens' DebugSession (Maybe Text)
debugSession_sessionTarget = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DebugSession' {Maybe Text
sessionTarget :: Maybe Text
$sel:sessionTarget:DebugSession' :: DebugSession -> Maybe Text
sessionTarget} -> Maybe Text
sessionTarget) (\s :: DebugSession
s@DebugSession' {} Maybe Text
a -> DebugSession
s {$sel:sessionTarget:DebugSession' :: Maybe Text
sessionTarget = Maybe Text
a} :: DebugSession)
instance Data.FromJSON DebugSession where
parseJSON :: Value -> Parser DebugSession
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"DebugSession"
( \Object
x ->
Maybe Bool -> Maybe Text -> DebugSession
DebugSession'
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
"sessionEnabled")
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
"sessionTarget")
)
instance Prelude.Hashable DebugSession where
hashWithSalt :: Int -> DebugSession -> Int
hashWithSalt Int
_salt DebugSession' {Maybe Bool
Maybe Text
sessionTarget :: Maybe Text
sessionEnabled :: Maybe Bool
$sel:sessionTarget:DebugSession' :: DebugSession -> Maybe Text
$sel:sessionEnabled:DebugSession' :: DebugSession -> Maybe Bool
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
sessionEnabled
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
sessionTarget
instance Prelude.NFData DebugSession where
rnf :: DebugSession -> ()
rnf DebugSession' {Maybe Bool
Maybe Text
sessionTarget :: Maybe Text
sessionEnabled :: Maybe Bool
$sel:sessionTarget:DebugSession' :: DebugSession -> Maybe Text
$sel:sessionEnabled:DebugSession' :: DebugSession -> Maybe Bool
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
sessionEnabled
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
sessionTarget