{-# 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.Lambda.Types.SnapStartResponse where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Lambda.Types.SnapStartApplyOn
import Amazonka.Lambda.Types.SnapStartOptimizationStatus
import qualified Amazonka.Prelude as Prelude
data SnapStartResponse = SnapStartResponse'
{
SnapStartResponse -> Maybe SnapStartApplyOn
applyOn :: Prelude.Maybe SnapStartApplyOn,
SnapStartResponse -> Maybe SnapStartOptimizationStatus
optimizationStatus :: Prelude.Maybe SnapStartOptimizationStatus
}
deriving (SnapStartResponse -> SnapStartResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SnapStartResponse -> SnapStartResponse -> Bool
$c/= :: SnapStartResponse -> SnapStartResponse -> Bool
== :: SnapStartResponse -> SnapStartResponse -> Bool
$c== :: SnapStartResponse -> SnapStartResponse -> Bool
Prelude.Eq, ReadPrec [SnapStartResponse]
ReadPrec SnapStartResponse
Int -> ReadS SnapStartResponse
ReadS [SnapStartResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SnapStartResponse]
$creadListPrec :: ReadPrec [SnapStartResponse]
readPrec :: ReadPrec SnapStartResponse
$creadPrec :: ReadPrec SnapStartResponse
readList :: ReadS [SnapStartResponse]
$creadList :: ReadS [SnapStartResponse]
readsPrec :: Int -> ReadS SnapStartResponse
$creadsPrec :: Int -> ReadS SnapStartResponse
Prelude.Read, Int -> SnapStartResponse -> ShowS
[SnapStartResponse] -> ShowS
SnapStartResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SnapStartResponse] -> ShowS
$cshowList :: [SnapStartResponse] -> ShowS
show :: SnapStartResponse -> String
$cshow :: SnapStartResponse -> String
showsPrec :: Int -> SnapStartResponse -> ShowS
$cshowsPrec :: Int -> SnapStartResponse -> ShowS
Prelude.Show, forall x. Rep SnapStartResponse x -> SnapStartResponse
forall x. SnapStartResponse -> Rep SnapStartResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SnapStartResponse x -> SnapStartResponse
$cfrom :: forall x. SnapStartResponse -> Rep SnapStartResponse x
Prelude.Generic)
newSnapStartResponse ::
SnapStartResponse
newSnapStartResponse :: SnapStartResponse
newSnapStartResponse =
SnapStartResponse'
{ $sel:applyOn:SnapStartResponse' :: Maybe SnapStartApplyOn
applyOn = forall a. Maybe a
Prelude.Nothing,
$sel:optimizationStatus:SnapStartResponse' :: Maybe SnapStartOptimizationStatus
optimizationStatus = forall a. Maybe a
Prelude.Nothing
}
snapStartResponse_applyOn :: Lens.Lens' SnapStartResponse (Prelude.Maybe SnapStartApplyOn)
snapStartResponse_applyOn :: Lens' SnapStartResponse (Maybe SnapStartApplyOn)
snapStartResponse_applyOn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SnapStartResponse' {Maybe SnapStartApplyOn
applyOn :: Maybe SnapStartApplyOn
$sel:applyOn:SnapStartResponse' :: SnapStartResponse -> Maybe SnapStartApplyOn
applyOn} -> Maybe SnapStartApplyOn
applyOn) (\s :: SnapStartResponse
s@SnapStartResponse' {} Maybe SnapStartApplyOn
a -> SnapStartResponse
s {$sel:applyOn:SnapStartResponse' :: Maybe SnapStartApplyOn
applyOn = Maybe SnapStartApplyOn
a} :: SnapStartResponse)
snapStartResponse_optimizationStatus :: Lens.Lens' SnapStartResponse (Prelude.Maybe SnapStartOptimizationStatus)
snapStartResponse_optimizationStatus :: Lens' SnapStartResponse (Maybe SnapStartOptimizationStatus)
snapStartResponse_optimizationStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SnapStartResponse' {Maybe SnapStartOptimizationStatus
optimizationStatus :: Maybe SnapStartOptimizationStatus
$sel:optimizationStatus:SnapStartResponse' :: SnapStartResponse -> Maybe SnapStartOptimizationStatus
optimizationStatus} -> Maybe SnapStartOptimizationStatus
optimizationStatus) (\s :: SnapStartResponse
s@SnapStartResponse' {} Maybe SnapStartOptimizationStatus
a -> SnapStartResponse
s {$sel:optimizationStatus:SnapStartResponse' :: Maybe SnapStartOptimizationStatus
optimizationStatus = Maybe SnapStartOptimizationStatus
a} :: SnapStartResponse)
instance Data.FromJSON SnapStartResponse where
parseJSON :: Value -> Parser SnapStartResponse
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"SnapStartResponse"
( \Object
x ->
Maybe SnapStartApplyOn
-> Maybe SnapStartOptimizationStatus -> SnapStartResponse
SnapStartResponse'
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
"ApplyOn")
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
"OptimizationStatus")
)
instance Prelude.Hashable SnapStartResponse where
hashWithSalt :: Int -> SnapStartResponse -> Int
hashWithSalt Int
_salt SnapStartResponse' {Maybe SnapStartApplyOn
Maybe SnapStartOptimizationStatus
optimizationStatus :: Maybe SnapStartOptimizationStatus
applyOn :: Maybe SnapStartApplyOn
$sel:optimizationStatus:SnapStartResponse' :: SnapStartResponse -> Maybe SnapStartOptimizationStatus
$sel:applyOn:SnapStartResponse' :: SnapStartResponse -> Maybe SnapStartApplyOn
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SnapStartApplyOn
applyOn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SnapStartOptimizationStatus
optimizationStatus
instance Prelude.NFData SnapStartResponse where
rnf :: SnapStartResponse -> ()
rnf SnapStartResponse' {Maybe SnapStartApplyOn
Maybe SnapStartOptimizationStatus
optimizationStatus :: Maybe SnapStartOptimizationStatus
applyOn :: Maybe SnapStartApplyOn
$sel:optimizationStatus:SnapStartResponse' :: SnapStartResponse -> Maybe SnapStartOptimizationStatus
$sel:applyOn:SnapStartResponse' :: SnapStartResponse -> Maybe SnapStartApplyOn
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe SnapStartApplyOn
applyOn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe SnapStartOptimizationStatus
optimizationStatus