{-# 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.SSMIncidents.Types.ResponsePlanSummary 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 ResponsePlanSummary = ResponsePlanSummary'
{
ResponsePlanSummary -> Maybe Text
displayName :: Prelude.Maybe Prelude.Text,
ResponsePlanSummary -> Text
arn :: Prelude.Text,
ResponsePlanSummary -> Text
name :: Prelude.Text
}
deriving (ResponsePlanSummary -> ResponsePlanSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResponsePlanSummary -> ResponsePlanSummary -> Bool
$c/= :: ResponsePlanSummary -> ResponsePlanSummary -> Bool
== :: ResponsePlanSummary -> ResponsePlanSummary -> Bool
$c== :: ResponsePlanSummary -> ResponsePlanSummary -> Bool
Prelude.Eq, ReadPrec [ResponsePlanSummary]
ReadPrec ResponsePlanSummary
Int -> ReadS ResponsePlanSummary
ReadS [ResponsePlanSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ResponsePlanSummary]
$creadListPrec :: ReadPrec [ResponsePlanSummary]
readPrec :: ReadPrec ResponsePlanSummary
$creadPrec :: ReadPrec ResponsePlanSummary
readList :: ReadS [ResponsePlanSummary]
$creadList :: ReadS [ResponsePlanSummary]
readsPrec :: Int -> ReadS ResponsePlanSummary
$creadsPrec :: Int -> ReadS ResponsePlanSummary
Prelude.Read, Int -> ResponsePlanSummary -> ShowS
[ResponsePlanSummary] -> ShowS
ResponsePlanSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ResponsePlanSummary] -> ShowS
$cshowList :: [ResponsePlanSummary] -> ShowS
show :: ResponsePlanSummary -> String
$cshow :: ResponsePlanSummary -> String
showsPrec :: Int -> ResponsePlanSummary -> ShowS
$cshowsPrec :: Int -> ResponsePlanSummary -> ShowS
Prelude.Show, forall x. Rep ResponsePlanSummary x -> ResponsePlanSummary
forall x. ResponsePlanSummary -> Rep ResponsePlanSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ResponsePlanSummary x -> ResponsePlanSummary
$cfrom :: forall x. ResponsePlanSummary -> Rep ResponsePlanSummary x
Prelude.Generic)
newResponsePlanSummary ::
Prelude.Text ->
Prelude.Text ->
ResponsePlanSummary
newResponsePlanSummary :: Text -> Text -> ResponsePlanSummary
newResponsePlanSummary Text
pArn_ Text
pName_ =
ResponsePlanSummary'
{ $sel:displayName:ResponsePlanSummary' :: Maybe Text
displayName = forall a. Maybe a
Prelude.Nothing,
$sel:arn:ResponsePlanSummary' :: Text
arn = Text
pArn_,
$sel:name:ResponsePlanSummary' :: Text
name = Text
pName_
}
responsePlanSummary_displayName :: Lens.Lens' ResponsePlanSummary (Prelude.Maybe Prelude.Text)
responsePlanSummary_displayName :: Lens' ResponsePlanSummary (Maybe Text)
responsePlanSummary_displayName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResponsePlanSummary' {Maybe Text
displayName :: Maybe Text
$sel:displayName:ResponsePlanSummary' :: ResponsePlanSummary -> Maybe Text
displayName} -> Maybe Text
displayName) (\s :: ResponsePlanSummary
s@ResponsePlanSummary' {} Maybe Text
a -> ResponsePlanSummary
s {$sel:displayName:ResponsePlanSummary' :: Maybe Text
displayName = Maybe Text
a} :: ResponsePlanSummary)
responsePlanSummary_arn :: Lens.Lens' ResponsePlanSummary Prelude.Text
responsePlanSummary_arn :: Lens' ResponsePlanSummary Text
responsePlanSummary_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResponsePlanSummary' {Text
arn :: Text
$sel:arn:ResponsePlanSummary' :: ResponsePlanSummary -> Text
arn} -> Text
arn) (\s :: ResponsePlanSummary
s@ResponsePlanSummary' {} Text
a -> ResponsePlanSummary
s {$sel:arn:ResponsePlanSummary' :: Text
arn = Text
a} :: ResponsePlanSummary)
responsePlanSummary_name :: Lens.Lens' ResponsePlanSummary Prelude.Text
responsePlanSummary_name :: Lens' ResponsePlanSummary Text
responsePlanSummary_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResponsePlanSummary' {Text
name :: Text
$sel:name:ResponsePlanSummary' :: ResponsePlanSummary -> Text
name} -> Text
name) (\s :: ResponsePlanSummary
s@ResponsePlanSummary' {} Text
a -> ResponsePlanSummary
s {$sel:name:ResponsePlanSummary' :: Text
name = Text
a} :: ResponsePlanSummary)
instance Data.FromJSON ResponsePlanSummary where
parseJSON :: Value -> Parser ResponsePlanSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ResponsePlanSummary"
( \Object
x ->
Maybe Text -> Text -> Text -> ResponsePlanSummary
ResponsePlanSummary'
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
"displayName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"arn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"name")
)
instance Prelude.Hashable ResponsePlanSummary where
hashWithSalt :: Int -> ResponsePlanSummary -> Int
hashWithSalt Int
_salt ResponsePlanSummary' {Maybe Text
Text
name :: Text
arn :: Text
displayName :: Maybe Text
$sel:name:ResponsePlanSummary' :: ResponsePlanSummary -> Text
$sel:arn:ResponsePlanSummary' :: ResponsePlanSummary -> Text
$sel:displayName:ResponsePlanSummary' :: ResponsePlanSummary -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
displayName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
instance Prelude.NFData ResponsePlanSummary where
rnf :: ResponsePlanSummary -> ()
rnf ResponsePlanSummary' {Maybe Text
Text
name :: Text
arn :: Text
displayName :: Maybe Text
$sel:name:ResponsePlanSummary' :: ResponsePlanSummary -> Text
$sel:arn:ResponsePlanSummary' :: ResponsePlanSummary -> Text
$sel:displayName:ResponsePlanSummary' :: ResponsePlanSummary -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
displayName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
arn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name