{-# 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.Lens as Lens
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
(DebugSession -> DebugSession -> Bool)
-> (DebugSession -> DebugSession -> Bool) -> Eq DebugSession
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]
(Int -> ReadS DebugSession)
-> ReadS [DebugSession]
-> ReadPrec DebugSession
-> ReadPrec [DebugSession]
-> Read 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
(Int -> DebugSession -> ShowS)
-> (DebugSession -> String)
-> ([DebugSession] -> ShowS)
-> Show DebugSession
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. DebugSession -> Rep DebugSession x)
-> (forall x. Rep DebugSession x -> DebugSession)
-> Generic DebugSession
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' :: Maybe Bool -> Maybe Text -> DebugSession
DebugSession'
{ $sel:sessionEnabled:DebugSession' :: Maybe Bool
sessionEnabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:sessionTarget:DebugSession' :: Maybe Text
sessionTarget = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
debugSession_sessionEnabled :: Lens.Lens' DebugSession (Prelude.Maybe Prelude.Bool)
debugSession_sessionEnabled :: (Maybe Bool -> f (Maybe Bool)) -> DebugSession -> f DebugSession
debugSession_sessionEnabled = (DebugSession -> Maybe Bool)
-> (DebugSession -> Maybe Bool -> DebugSession)
-> Lens DebugSession DebugSession (Maybe Bool) (Maybe Bool)
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 :: (Maybe Text -> f (Maybe Text)) -> DebugSession -> f DebugSession
debugSession_sessionTarget = (DebugSession -> Maybe Text)
-> (DebugSession -> Maybe Text -> DebugSession)
-> Lens DebugSession DebugSession (Maybe Text) (Maybe Text)
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 Core.FromJSON DebugSession where
parseJSON :: Value -> Parser DebugSession
parseJSON =
String
-> (Object -> Parser DebugSession) -> Value -> Parser DebugSession
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DebugSession"
( \Object
x ->
Maybe Bool -> Maybe Text -> DebugSession
DebugSession'
(Maybe Bool -> Maybe Text -> DebugSession)
-> Parser (Maybe Bool) -> Parser (Maybe Text -> DebugSession)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"sessionEnabled")
Parser (Maybe Text -> DebugSession)
-> Parser (Maybe Text) -> Parser DebugSession
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
"sessionTarget")
)
instance Prelude.Hashable DebugSession
instance Prelude.NFData DebugSession