{-# 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.EMR.Types.CancelStepsInfo where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EMR.Types.CancelStepsRequestStatus
import qualified Amazonka.Prelude as Prelude
data CancelStepsInfo = CancelStepsInfo'
{
CancelStepsInfo -> Maybe Text
reason :: Prelude.Maybe Prelude.Text,
CancelStepsInfo -> Maybe CancelStepsRequestStatus
status :: Prelude.Maybe CancelStepsRequestStatus,
CancelStepsInfo -> Maybe Text
stepId :: Prelude.Maybe Prelude.Text
}
deriving (CancelStepsInfo -> CancelStepsInfo -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CancelStepsInfo -> CancelStepsInfo -> Bool
$c/= :: CancelStepsInfo -> CancelStepsInfo -> Bool
== :: CancelStepsInfo -> CancelStepsInfo -> Bool
$c== :: CancelStepsInfo -> CancelStepsInfo -> Bool
Prelude.Eq, ReadPrec [CancelStepsInfo]
ReadPrec CancelStepsInfo
Int -> ReadS CancelStepsInfo
ReadS [CancelStepsInfo]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CancelStepsInfo]
$creadListPrec :: ReadPrec [CancelStepsInfo]
readPrec :: ReadPrec CancelStepsInfo
$creadPrec :: ReadPrec CancelStepsInfo
readList :: ReadS [CancelStepsInfo]
$creadList :: ReadS [CancelStepsInfo]
readsPrec :: Int -> ReadS CancelStepsInfo
$creadsPrec :: Int -> ReadS CancelStepsInfo
Prelude.Read, Int -> CancelStepsInfo -> ShowS
[CancelStepsInfo] -> ShowS
CancelStepsInfo -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CancelStepsInfo] -> ShowS
$cshowList :: [CancelStepsInfo] -> ShowS
show :: CancelStepsInfo -> String
$cshow :: CancelStepsInfo -> String
showsPrec :: Int -> CancelStepsInfo -> ShowS
$cshowsPrec :: Int -> CancelStepsInfo -> ShowS
Prelude.Show, forall x. Rep CancelStepsInfo x -> CancelStepsInfo
forall x. CancelStepsInfo -> Rep CancelStepsInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CancelStepsInfo x -> CancelStepsInfo
$cfrom :: forall x. CancelStepsInfo -> Rep CancelStepsInfo x
Prelude.Generic)
newCancelStepsInfo ::
CancelStepsInfo
newCancelStepsInfo :: CancelStepsInfo
newCancelStepsInfo =
CancelStepsInfo'
{ $sel:reason:CancelStepsInfo' :: Maybe Text
reason = forall a. Maybe a
Prelude.Nothing,
$sel:status:CancelStepsInfo' :: Maybe CancelStepsRequestStatus
status = forall a. Maybe a
Prelude.Nothing,
$sel:stepId:CancelStepsInfo' :: Maybe Text
stepId = forall a. Maybe a
Prelude.Nothing
}
cancelStepsInfo_reason :: Lens.Lens' CancelStepsInfo (Prelude.Maybe Prelude.Text)
cancelStepsInfo_reason :: Lens' CancelStepsInfo (Maybe Text)
cancelStepsInfo_reason = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CancelStepsInfo' {Maybe Text
reason :: Maybe Text
$sel:reason:CancelStepsInfo' :: CancelStepsInfo -> Maybe Text
reason} -> Maybe Text
reason) (\s :: CancelStepsInfo
s@CancelStepsInfo' {} Maybe Text
a -> CancelStepsInfo
s {$sel:reason:CancelStepsInfo' :: Maybe Text
reason = Maybe Text
a} :: CancelStepsInfo)
cancelStepsInfo_status :: Lens.Lens' CancelStepsInfo (Prelude.Maybe CancelStepsRequestStatus)
cancelStepsInfo_status :: Lens' CancelStepsInfo (Maybe CancelStepsRequestStatus)
cancelStepsInfo_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CancelStepsInfo' {Maybe CancelStepsRequestStatus
status :: Maybe CancelStepsRequestStatus
$sel:status:CancelStepsInfo' :: CancelStepsInfo -> Maybe CancelStepsRequestStatus
status} -> Maybe CancelStepsRequestStatus
status) (\s :: CancelStepsInfo
s@CancelStepsInfo' {} Maybe CancelStepsRequestStatus
a -> CancelStepsInfo
s {$sel:status:CancelStepsInfo' :: Maybe CancelStepsRequestStatus
status = Maybe CancelStepsRequestStatus
a} :: CancelStepsInfo)
cancelStepsInfo_stepId :: Lens.Lens' CancelStepsInfo (Prelude.Maybe Prelude.Text)
cancelStepsInfo_stepId :: Lens' CancelStepsInfo (Maybe Text)
cancelStepsInfo_stepId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CancelStepsInfo' {Maybe Text
stepId :: Maybe Text
$sel:stepId:CancelStepsInfo' :: CancelStepsInfo -> Maybe Text
stepId} -> Maybe Text
stepId) (\s :: CancelStepsInfo
s@CancelStepsInfo' {} Maybe Text
a -> CancelStepsInfo
s {$sel:stepId:CancelStepsInfo' :: Maybe Text
stepId = Maybe Text
a} :: CancelStepsInfo)
instance Data.FromJSON CancelStepsInfo where
parseJSON :: Value -> Parser CancelStepsInfo
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"CancelStepsInfo"
( \Object
x ->
Maybe Text
-> Maybe CancelStepsRequestStatus -> Maybe Text -> CancelStepsInfo
CancelStepsInfo'
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
"Reason")
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
"Status")
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
"StepId")
)
instance Prelude.Hashable CancelStepsInfo where
hashWithSalt :: Int -> CancelStepsInfo -> Int
hashWithSalt Int
_salt CancelStepsInfo' {Maybe Text
Maybe CancelStepsRequestStatus
stepId :: Maybe Text
status :: Maybe CancelStepsRequestStatus
reason :: Maybe Text
$sel:stepId:CancelStepsInfo' :: CancelStepsInfo -> Maybe Text
$sel:status:CancelStepsInfo' :: CancelStepsInfo -> Maybe CancelStepsRequestStatus
$sel:reason:CancelStepsInfo' :: CancelStepsInfo -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
reason
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CancelStepsRequestStatus
status
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
stepId
instance Prelude.NFData CancelStepsInfo where
rnf :: CancelStepsInfo -> ()
rnf CancelStepsInfo' {Maybe Text
Maybe CancelStepsRequestStatus
stepId :: Maybe Text
status :: Maybe CancelStepsRequestStatus
reason :: Maybe Text
$sel:stepId:CancelStepsInfo' :: CancelStepsInfo -> Maybe Text
$sel:status:CancelStepsInfo' :: CancelStepsInfo -> Maybe CancelStepsRequestStatus
$sel:reason:CancelStepsInfo' :: CancelStepsInfo -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
reason
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CancelStepsRequestStatus
status
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
stepId