{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.SSMIncidents.UpdateResponsePlan
(
UpdateResponsePlan (..),
newUpdateResponsePlan,
updateResponsePlan_incidentTemplateImpact,
updateResponsePlan_clientToken,
updateResponsePlan_actions,
updateResponsePlan_incidentTemplateSummary,
updateResponsePlan_displayName,
updateResponsePlan_chatChannel,
updateResponsePlan_incidentTemplateDedupeString,
updateResponsePlan_incidentTemplateTitle,
updateResponsePlan_engagements,
updateResponsePlan_incidentTemplateNotificationTargets,
updateResponsePlan_arn,
UpdateResponsePlanResponse (..),
newUpdateResponsePlanResponse,
updateResponsePlanResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SSMIncidents.Types
data UpdateResponsePlan = UpdateResponsePlan'
{
UpdateResponsePlan -> Maybe Natural
incidentTemplateImpact :: Prelude.Maybe Prelude.Natural,
UpdateResponsePlan -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
UpdateResponsePlan -> Maybe [Action]
actions :: Prelude.Maybe [Action],
UpdateResponsePlan -> Maybe Text
incidentTemplateSummary :: Prelude.Maybe Prelude.Text,
UpdateResponsePlan -> Maybe Text
displayName :: Prelude.Maybe Prelude.Text,
UpdateResponsePlan -> Maybe ChatChannel
chatChannel :: Prelude.Maybe ChatChannel,
UpdateResponsePlan -> Maybe Text
incidentTemplateDedupeString :: Prelude.Maybe Prelude.Text,
UpdateResponsePlan -> Maybe Text
incidentTemplateTitle :: Prelude.Maybe Prelude.Text,
UpdateResponsePlan -> Maybe [Text]
engagements :: Prelude.Maybe [Prelude.Text],
UpdateResponsePlan -> Maybe [NotificationTargetItem]
incidentTemplateNotificationTargets :: Prelude.Maybe [NotificationTargetItem],
UpdateResponsePlan -> Text
arn :: Prelude.Text
}
deriving (UpdateResponsePlan -> UpdateResponsePlan -> Bool
(UpdateResponsePlan -> UpdateResponsePlan -> Bool)
-> (UpdateResponsePlan -> UpdateResponsePlan -> Bool)
-> Eq UpdateResponsePlan
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateResponsePlan -> UpdateResponsePlan -> Bool
$c/= :: UpdateResponsePlan -> UpdateResponsePlan -> Bool
== :: UpdateResponsePlan -> UpdateResponsePlan -> Bool
$c== :: UpdateResponsePlan -> UpdateResponsePlan -> Bool
Prelude.Eq, ReadPrec [UpdateResponsePlan]
ReadPrec UpdateResponsePlan
Int -> ReadS UpdateResponsePlan
ReadS [UpdateResponsePlan]
(Int -> ReadS UpdateResponsePlan)
-> ReadS [UpdateResponsePlan]
-> ReadPrec UpdateResponsePlan
-> ReadPrec [UpdateResponsePlan]
-> Read UpdateResponsePlan
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateResponsePlan]
$creadListPrec :: ReadPrec [UpdateResponsePlan]
readPrec :: ReadPrec UpdateResponsePlan
$creadPrec :: ReadPrec UpdateResponsePlan
readList :: ReadS [UpdateResponsePlan]
$creadList :: ReadS [UpdateResponsePlan]
readsPrec :: Int -> ReadS UpdateResponsePlan
$creadsPrec :: Int -> ReadS UpdateResponsePlan
Prelude.Read, Int -> UpdateResponsePlan -> ShowS
[UpdateResponsePlan] -> ShowS
UpdateResponsePlan -> String
(Int -> UpdateResponsePlan -> ShowS)
-> (UpdateResponsePlan -> String)
-> ([UpdateResponsePlan] -> ShowS)
-> Show UpdateResponsePlan
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateResponsePlan] -> ShowS
$cshowList :: [UpdateResponsePlan] -> ShowS
show :: UpdateResponsePlan -> String
$cshow :: UpdateResponsePlan -> String
showsPrec :: Int -> UpdateResponsePlan -> ShowS
$cshowsPrec :: Int -> UpdateResponsePlan -> ShowS
Prelude.Show, (forall x. UpdateResponsePlan -> Rep UpdateResponsePlan x)
-> (forall x. Rep UpdateResponsePlan x -> UpdateResponsePlan)
-> Generic UpdateResponsePlan
forall x. Rep UpdateResponsePlan x -> UpdateResponsePlan
forall x. UpdateResponsePlan -> Rep UpdateResponsePlan x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateResponsePlan x -> UpdateResponsePlan
$cfrom :: forall x. UpdateResponsePlan -> Rep UpdateResponsePlan x
Prelude.Generic)
newUpdateResponsePlan ::
Prelude.Text ->
UpdateResponsePlan
newUpdateResponsePlan :: Text -> UpdateResponsePlan
newUpdateResponsePlan Text
pArn_ =
UpdateResponsePlan' :: Maybe Natural
-> Maybe Text
-> Maybe [Action]
-> Maybe Text
-> Maybe Text
-> Maybe ChatChannel
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe [NotificationTargetItem]
-> Text
-> UpdateResponsePlan
UpdateResponsePlan'
{ $sel:incidentTemplateImpact:UpdateResponsePlan' :: Maybe Natural
incidentTemplateImpact =
Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:clientToken:UpdateResponsePlan' :: Maybe Text
clientToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:actions:UpdateResponsePlan' :: Maybe [Action]
actions = Maybe [Action]
forall a. Maybe a
Prelude.Nothing,
$sel:incidentTemplateSummary:UpdateResponsePlan' :: Maybe Text
incidentTemplateSummary = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:displayName:UpdateResponsePlan' :: Maybe Text
displayName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:chatChannel:UpdateResponsePlan' :: Maybe ChatChannel
chatChannel = Maybe ChatChannel
forall a. Maybe a
Prelude.Nothing,
$sel:incidentTemplateDedupeString:UpdateResponsePlan' :: Maybe Text
incidentTemplateDedupeString = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:incidentTemplateTitle:UpdateResponsePlan' :: Maybe Text
incidentTemplateTitle = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:engagements:UpdateResponsePlan' :: Maybe [Text]
engagements = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:incidentTemplateNotificationTargets:UpdateResponsePlan' :: Maybe [NotificationTargetItem]
incidentTemplateNotificationTargets =
Maybe [NotificationTargetItem]
forall a. Maybe a
Prelude.Nothing,
$sel:arn:UpdateResponsePlan' :: Text
arn = Text
pArn_
}
updateResponsePlan_incidentTemplateImpact :: Lens.Lens' UpdateResponsePlan (Prelude.Maybe Prelude.Natural)
updateResponsePlan_incidentTemplateImpact :: (Maybe Natural -> f (Maybe Natural))
-> UpdateResponsePlan -> f UpdateResponsePlan
updateResponsePlan_incidentTemplateImpact = (UpdateResponsePlan -> Maybe Natural)
-> (UpdateResponsePlan -> Maybe Natural -> UpdateResponsePlan)
-> Lens
UpdateResponsePlan
UpdateResponsePlan
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateResponsePlan' {Maybe Natural
incidentTemplateImpact :: Maybe Natural
$sel:incidentTemplateImpact:UpdateResponsePlan' :: UpdateResponsePlan -> Maybe Natural
incidentTemplateImpact} -> Maybe Natural
incidentTemplateImpact) (\s :: UpdateResponsePlan
s@UpdateResponsePlan' {} Maybe Natural
a -> UpdateResponsePlan
s {$sel:incidentTemplateImpact:UpdateResponsePlan' :: Maybe Natural
incidentTemplateImpact = Maybe Natural
a} :: UpdateResponsePlan)
updateResponsePlan_clientToken :: Lens.Lens' UpdateResponsePlan (Prelude.Maybe Prelude.Text)
updateResponsePlan_clientToken :: (Maybe Text -> f (Maybe Text))
-> UpdateResponsePlan -> f UpdateResponsePlan
updateResponsePlan_clientToken = (UpdateResponsePlan -> Maybe Text)
-> (UpdateResponsePlan -> Maybe Text -> UpdateResponsePlan)
-> Lens
UpdateResponsePlan UpdateResponsePlan (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateResponsePlan' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:UpdateResponsePlan' :: UpdateResponsePlan -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: UpdateResponsePlan
s@UpdateResponsePlan' {} Maybe Text
a -> UpdateResponsePlan
s {$sel:clientToken:UpdateResponsePlan' :: Maybe Text
clientToken = Maybe Text
a} :: UpdateResponsePlan)
updateResponsePlan_actions :: Lens.Lens' UpdateResponsePlan (Prelude.Maybe [Action])
updateResponsePlan_actions :: (Maybe [Action] -> f (Maybe [Action]))
-> UpdateResponsePlan -> f UpdateResponsePlan
updateResponsePlan_actions = (UpdateResponsePlan -> Maybe [Action])
-> (UpdateResponsePlan -> Maybe [Action] -> UpdateResponsePlan)
-> Lens
UpdateResponsePlan
UpdateResponsePlan
(Maybe [Action])
(Maybe [Action])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateResponsePlan' {Maybe [Action]
actions :: Maybe [Action]
$sel:actions:UpdateResponsePlan' :: UpdateResponsePlan -> Maybe [Action]
actions} -> Maybe [Action]
actions) (\s :: UpdateResponsePlan
s@UpdateResponsePlan' {} Maybe [Action]
a -> UpdateResponsePlan
s {$sel:actions:UpdateResponsePlan' :: Maybe [Action]
actions = Maybe [Action]
a} :: UpdateResponsePlan) ((Maybe [Action] -> f (Maybe [Action]))
-> UpdateResponsePlan -> f UpdateResponsePlan)
-> ((Maybe [Action] -> f (Maybe [Action]))
-> Maybe [Action] -> f (Maybe [Action]))
-> (Maybe [Action] -> f (Maybe [Action]))
-> UpdateResponsePlan
-> f UpdateResponsePlan
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Action] [Action] [Action] [Action]
-> Iso
(Maybe [Action]) (Maybe [Action]) (Maybe [Action]) (Maybe [Action])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Action] [Action] [Action] [Action]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
updateResponsePlan_incidentTemplateSummary :: Lens.Lens' UpdateResponsePlan (Prelude.Maybe Prelude.Text)
updateResponsePlan_incidentTemplateSummary :: (Maybe Text -> f (Maybe Text))
-> UpdateResponsePlan -> f UpdateResponsePlan
updateResponsePlan_incidentTemplateSummary = (UpdateResponsePlan -> Maybe Text)
-> (UpdateResponsePlan -> Maybe Text -> UpdateResponsePlan)
-> Lens
UpdateResponsePlan UpdateResponsePlan (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateResponsePlan' {Maybe Text
incidentTemplateSummary :: Maybe Text
$sel:incidentTemplateSummary:UpdateResponsePlan' :: UpdateResponsePlan -> Maybe Text
incidentTemplateSummary} -> Maybe Text
incidentTemplateSummary) (\s :: UpdateResponsePlan
s@UpdateResponsePlan' {} Maybe Text
a -> UpdateResponsePlan
s {$sel:incidentTemplateSummary:UpdateResponsePlan' :: Maybe Text
incidentTemplateSummary = Maybe Text
a} :: UpdateResponsePlan)
updateResponsePlan_displayName :: Lens.Lens' UpdateResponsePlan (Prelude.Maybe Prelude.Text)
updateResponsePlan_displayName :: (Maybe Text -> f (Maybe Text))
-> UpdateResponsePlan -> f UpdateResponsePlan
updateResponsePlan_displayName = (UpdateResponsePlan -> Maybe Text)
-> (UpdateResponsePlan -> Maybe Text -> UpdateResponsePlan)
-> Lens
UpdateResponsePlan UpdateResponsePlan (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateResponsePlan' {Maybe Text
displayName :: Maybe Text
$sel:displayName:UpdateResponsePlan' :: UpdateResponsePlan -> Maybe Text
displayName} -> Maybe Text
displayName) (\s :: UpdateResponsePlan
s@UpdateResponsePlan' {} Maybe Text
a -> UpdateResponsePlan
s {$sel:displayName:UpdateResponsePlan' :: Maybe Text
displayName = Maybe Text
a} :: UpdateResponsePlan)
updateResponsePlan_chatChannel :: Lens.Lens' UpdateResponsePlan (Prelude.Maybe ChatChannel)
updateResponsePlan_chatChannel :: (Maybe ChatChannel -> f (Maybe ChatChannel))
-> UpdateResponsePlan -> f UpdateResponsePlan
updateResponsePlan_chatChannel = (UpdateResponsePlan -> Maybe ChatChannel)
-> (UpdateResponsePlan -> Maybe ChatChannel -> UpdateResponsePlan)
-> Lens
UpdateResponsePlan
UpdateResponsePlan
(Maybe ChatChannel)
(Maybe ChatChannel)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateResponsePlan' {Maybe ChatChannel
chatChannel :: Maybe ChatChannel
$sel:chatChannel:UpdateResponsePlan' :: UpdateResponsePlan -> Maybe ChatChannel
chatChannel} -> Maybe ChatChannel
chatChannel) (\s :: UpdateResponsePlan
s@UpdateResponsePlan' {} Maybe ChatChannel
a -> UpdateResponsePlan
s {$sel:chatChannel:UpdateResponsePlan' :: Maybe ChatChannel
chatChannel = Maybe ChatChannel
a} :: UpdateResponsePlan)
updateResponsePlan_incidentTemplateDedupeString :: Lens.Lens' UpdateResponsePlan (Prelude.Maybe Prelude.Text)
updateResponsePlan_incidentTemplateDedupeString :: (Maybe Text -> f (Maybe Text))
-> UpdateResponsePlan -> f UpdateResponsePlan
updateResponsePlan_incidentTemplateDedupeString = (UpdateResponsePlan -> Maybe Text)
-> (UpdateResponsePlan -> Maybe Text -> UpdateResponsePlan)
-> Lens
UpdateResponsePlan UpdateResponsePlan (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateResponsePlan' {Maybe Text
incidentTemplateDedupeString :: Maybe Text
$sel:incidentTemplateDedupeString:UpdateResponsePlan' :: UpdateResponsePlan -> Maybe Text
incidentTemplateDedupeString} -> Maybe Text
incidentTemplateDedupeString) (\s :: UpdateResponsePlan
s@UpdateResponsePlan' {} Maybe Text
a -> UpdateResponsePlan
s {$sel:incidentTemplateDedupeString:UpdateResponsePlan' :: Maybe Text
incidentTemplateDedupeString = Maybe Text
a} :: UpdateResponsePlan)
updateResponsePlan_incidentTemplateTitle :: Lens.Lens' UpdateResponsePlan (Prelude.Maybe Prelude.Text)
updateResponsePlan_incidentTemplateTitle :: (Maybe Text -> f (Maybe Text))
-> UpdateResponsePlan -> f UpdateResponsePlan
updateResponsePlan_incidentTemplateTitle = (UpdateResponsePlan -> Maybe Text)
-> (UpdateResponsePlan -> Maybe Text -> UpdateResponsePlan)
-> Lens
UpdateResponsePlan UpdateResponsePlan (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateResponsePlan' {Maybe Text
incidentTemplateTitle :: Maybe Text
$sel:incidentTemplateTitle:UpdateResponsePlan' :: UpdateResponsePlan -> Maybe Text
incidentTemplateTitle} -> Maybe Text
incidentTemplateTitle) (\s :: UpdateResponsePlan
s@UpdateResponsePlan' {} Maybe Text
a -> UpdateResponsePlan
s {$sel:incidentTemplateTitle:UpdateResponsePlan' :: Maybe Text
incidentTemplateTitle = Maybe Text
a} :: UpdateResponsePlan)
updateResponsePlan_engagements :: Lens.Lens' UpdateResponsePlan (Prelude.Maybe [Prelude.Text])
updateResponsePlan_engagements :: (Maybe [Text] -> f (Maybe [Text]))
-> UpdateResponsePlan -> f UpdateResponsePlan
updateResponsePlan_engagements = (UpdateResponsePlan -> Maybe [Text])
-> (UpdateResponsePlan -> Maybe [Text] -> UpdateResponsePlan)
-> Lens
UpdateResponsePlan UpdateResponsePlan (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateResponsePlan' {Maybe [Text]
engagements :: Maybe [Text]
$sel:engagements:UpdateResponsePlan' :: UpdateResponsePlan -> Maybe [Text]
engagements} -> Maybe [Text]
engagements) (\s :: UpdateResponsePlan
s@UpdateResponsePlan' {} Maybe [Text]
a -> UpdateResponsePlan
s {$sel:engagements:UpdateResponsePlan' :: Maybe [Text]
engagements = Maybe [Text]
a} :: UpdateResponsePlan) ((Maybe [Text] -> f (Maybe [Text]))
-> UpdateResponsePlan -> f UpdateResponsePlan)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> UpdateResponsePlan
-> f UpdateResponsePlan
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
updateResponsePlan_incidentTemplateNotificationTargets :: Lens.Lens' UpdateResponsePlan (Prelude.Maybe [NotificationTargetItem])
updateResponsePlan_incidentTemplateNotificationTargets :: (Maybe [NotificationTargetItem]
-> f (Maybe [NotificationTargetItem]))
-> UpdateResponsePlan -> f UpdateResponsePlan
updateResponsePlan_incidentTemplateNotificationTargets = (UpdateResponsePlan -> Maybe [NotificationTargetItem])
-> (UpdateResponsePlan
-> Maybe [NotificationTargetItem] -> UpdateResponsePlan)
-> Lens
UpdateResponsePlan
UpdateResponsePlan
(Maybe [NotificationTargetItem])
(Maybe [NotificationTargetItem])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateResponsePlan' {Maybe [NotificationTargetItem]
incidentTemplateNotificationTargets :: Maybe [NotificationTargetItem]
$sel:incidentTemplateNotificationTargets:UpdateResponsePlan' :: UpdateResponsePlan -> Maybe [NotificationTargetItem]
incidentTemplateNotificationTargets} -> Maybe [NotificationTargetItem]
incidentTemplateNotificationTargets) (\s :: UpdateResponsePlan
s@UpdateResponsePlan' {} Maybe [NotificationTargetItem]
a -> UpdateResponsePlan
s {$sel:incidentTemplateNotificationTargets:UpdateResponsePlan' :: Maybe [NotificationTargetItem]
incidentTemplateNotificationTargets = Maybe [NotificationTargetItem]
a} :: UpdateResponsePlan) ((Maybe [NotificationTargetItem]
-> f (Maybe [NotificationTargetItem]))
-> UpdateResponsePlan -> f UpdateResponsePlan)
-> ((Maybe [NotificationTargetItem]
-> f (Maybe [NotificationTargetItem]))
-> Maybe [NotificationTargetItem]
-> f (Maybe [NotificationTargetItem]))
-> (Maybe [NotificationTargetItem]
-> f (Maybe [NotificationTargetItem]))
-> UpdateResponsePlan
-> f UpdateResponsePlan
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[NotificationTargetItem]
[NotificationTargetItem]
[NotificationTargetItem]
[NotificationTargetItem]
-> Iso
(Maybe [NotificationTargetItem])
(Maybe [NotificationTargetItem])
(Maybe [NotificationTargetItem])
(Maybe [NotificationTargetItem])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
[NotificationTargetItem]
[NotificationTargetItem]
[NotificationTargetItem]
[NotificationTargetItem]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
updateResponsePlan_arn :: Lens.Lens' UpdateResponsePlan Prelude.Text
updateResponsePlan_arn :: (Text -> f Text) -> UpdateResponsePlan -> f UpdateResponsePlan
updateResponsePlan_arn = (UpdateResponsePlan -> Text)
-> (UpdateResponsePlan -> Text -> UpdateResponsePlan)
-> Lens UpdateResponsePlan UpdateResponsePlan Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateResponsePlan' {Text
arn :: Text
$sel:arn:UpdateResponsePlan' :: UpdateResponsePlan -> Text
arn} -> Text
arn) (\s :: UpdateResponsePlan
s@UpdateResponsePlan' {} Text
a -> UpdateResponsePlan
s {$sel:arn:UpdateResponsePlan' :: Text
arn = Text
a} :: UpdateResponsePlan)
instance Core.AWSRequest UpdateResponsePlan where
type
AWSResponse UpdateResponsePlan =
UpdateResponsePlanResponse
request :: UpdateResponsePlan -> Request UpdateResponsePlan
request = Service -> UpdateResponsePlan -> Request UpdateResponsePlan
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy UpdateResponsePlan
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateResponsePlan)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse UpdateResponsePlan))
-> Logger
-> Service
-> Proxy UpdateResponsePlan
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateResponsePlan)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> UpdateResponsePlanResponse
UpdateResponsePlanResponse'
(Int -> UpdateResponsePlanResponse)
-> Either String Int -> Either String UpdateResponsePlanResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable UpdateResponsePlan
instance Prelude.NFData UpdateResponsePlan
instance Core.ToHeaders UpdateResponsePlan where
toHeaders :: UpdateResponsePlan -> ResponseHeaders
toHeaders =
ResponseHeaders -> UpdateResponsePlan -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON UpdateResponsePlan where
toJSON :: UpdateResponsePlan -> Value
toJSON UpdateResponsePlan' {Maybe Natural
Maybe [Text]
Maybe [NotificationTargetItem]
Maybe [Action]
Maybe Text
Maybe ChatChannel
Text
arn :: Text
incidentTemplateNotificationTargets :: Maybe [NotificationTargetItem]
engagements :: Maybe [Text]
incidentTemplateTitle :: Maybe Text
incidentTemplateDedupeString :: Maybe Text
chatChannel :: Maybe ChatChannel
displayName :: Maybe Text
incidentTemplateSummary :: Maybe Text
actions :: Maybe [Action]
clientToken :: Maybe Text
incidentTemplateImpact :: Maybe Natural
$sel:arn:UpdateResponsePlan' :: UpdateResponsePlan -> Text
$sel:incidentTemplateNotificationTargets:UpdateResponsePlan' :: UpdateResponsePlan -> Maybe [NotificationTargetItem]
$sel:engagements:UpdateResponsePlan' :: UpdateResponsePlan -> Maybe [Text]
$sel:incidentTemplateTitle:UpdateResponsePlan' :: UpdateResponsePlan -> Maybe Text
$sel:incidentTemplateDedupeString:UpdateResponsePlan' :: UpdateResponsePlan -> Maybe Text
$sel:chatChannel:UpdateResponsePlan' :: UpdateResponsePlan -> Maybe ChatChannel
$sel:displayName:UpdateResponsePlan' :: UpdateResponsePlan -> Maybe Text
$sel:incidentTemplateSummary:UpdateResponsePlan' :: UpdateResponsePlan -> Maybe Text
$sel:actions:UpdateResponsePlan' :: UpdateResponsePlan -> Maybe [Action]
$sel:clientToken:UpdateResponsePlan' :: UpdateResponsePlan -> Maybe Text
$sel:incidentTemplateImpact:UpdateResponsePlan' :: UpdateResponsePlan -> Maybe Natural
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"incidentTemplateImpact" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
incidentTemplateImpact,
(Text
"clientToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
clientToken,
(Text
"actions" Text -> [Action] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Action] -> Pair) -> Maybe [Action] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Action]
actions,
(Text
"incidentTemplateSummary" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
incidentTemplateSummary,
(Text
"displayName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
displayName,
(Text
"chatChannel" Text -> ChatChannel -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ChatChannel -> Pair) -> Maybe ChatChannel -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ChatChannel
chatChannel,
(Text
"incidentTemplateDedupeString" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
incidentTemplateDedupeString,
(Text
"incidentTemplateTitle" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
incidentTemplateTitle,
(Text
"engagements" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Text] -> Pair) -> Maybe [Text] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
engagements,
(Text
"incidentTemplateNotificationTargets" Text -> [NotificationTargetItem] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([NotificationTargetItem] -> Pair)
-> Maybe [NotificationTargetItem] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [NotificationTargetItem]
incidentTemplateNotificationTargets,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"arn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
arn)
]
)
instance Core.ToPath UpdateResponsePlan where
toPath :: UpdateResponsePlan -> ByteString
toPath = ByteString -> UpdateResponsePlan -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/updateResponsePlan"
instance Core.ToQuery UpdateResponsePlan where
toQuery :: UpdateResponsePlan -> QueryString
toQuery = QueryString -> UpdateResponsePlan -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data UpdateResponsePlanResponse = UpdateResponsePlanResponse'
{
UpdateResponsePlanResponse -> Int
httpStatus :: Prelude.Int
}
deriving (UpdateResponsePlanResponse -> UpdateResponsePlanResponse -> Bool
(UpdateResponsePlanResponse -> UpdateResponsePlanResponse -> Bool)
-> (UpdateResponsePlanResponse
-> UpdateResponsePlanResponse -> Bool)
-> Eq UpdateResponsePlanResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateResponsePlanResponse -> UpdateResponsePlanResponse -> Bool
$c/= :: UpdateResponsePlanResponse -> UpdateResponsePlanResponse -> Bool
== :: UpdateResponsePlanResponse -> UpdateResponsePlanResponse -> Bool
$c== :: UpdateResponsePlanResponse -> UpdateResponsePlanResponse -> Bool
Prelude.Eq, ReadPrec [UpdateResponsePlanResponse]
ReadPrec UpdateResponsePlanResponse
Int -> ReadS UpdateResponsePlanResponse
ReadS [UpdateResponsePlanResponse]
(Int -> ReadS UpdateResponsePlanResponse)
-> ReadS [UpdateResponsePlanResponse]
-> ReadPrec UpdateResponsePlanResponse
-> ReadPrec [UpdateResponsePlanResponse]
-> Read UpdateResponsePlanResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateResponsePlanResponse]
$creadListPrec :: ReadPrec [UpdateResponsePlanResponse]
readPrec :: ReadPrec UpdateResponsePlanResponse
$creadPrec :: ReadPrec UpdateResponsePlanResponse
readList :: ReadS [UpdateResponsePlanResponse]
$creadList :: ReadS [UpdateResponsePlanResponse]
readsPrec :: Int -> ReadS UpdateResponsePlanResponse
$creadsPrec :: Int -> ReadS UpdateResponsePlanResponse
Prelude.Read, Int -> UpdateResponsePlanResponse -> ShowS
[UpdateResponsePlanResponse] -> ShowS
UpdateResponsePlanResponse -> String
(Int -> UpdateResponsePlanResponse -> ShowS)
-> (UpdateResponsePlanResponse -> String)
-> ([UpdateResponsePlanResponse] -> ShowS)
-> Show UpdateResponsePlanResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateResponsePlanResponse] -> ShowS
$cshowList :: [UpdateResponsePlanResponse] -> ShowS
show :: UpdateResponsePlanResponse -> String
$cshow :: UpdateResponsePlanResponse -> String
showsPrec :: Int -> UpdateResponsePlanResponse -> ShowS
$cshowsPrec :: Int -> UpdateResponsePlanResponse -> ShowS
Prelude.Show, (forall x.
UpdateResponsePlanResponse -> Rep UpdateResponsePlanResponse x)
-> (forall x.
Rep UpdateResponsePlanResponse x -> UpdateResponsePlanResponse)
-> Generic UpdateResponsePlanResponse
forall x.
Rep UpdateResponsePlanResponse x -> UpdateResponsePlanResponse
forall x.
UpdateResponsePlanResponse -> Rep UpdateResponsePlanResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateResponsePlanResponse x -> UpdateResponsePlanResponse
$cfrom :: forall x.
UpdateResponsePlanResponse -> Rep UpdateResponsePlanResponse x
Prelude.Generic)
newUpdateResponsePlanResponse ::
Prelude.Int ->
UpdateResponsePlanResponse
newUpdateResponsePlanResponse :: Int -> UpdateResponsePlanResponse
newUpdateResponsePlanResponse Int
pHttpStatus_ =
UpdateResponsePlanResponse' :: Int -> UpdateResponsePlanResponse
UpdateResponsePlanResponse'
{ $sel:httpStatus:UpdateResponsePlanResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
updateResponsePlanResponse_httpStatus :: Lens.Lens' UpdateResponsePlanResponse Prelude.Int
updateResponsePlanResponse_httpStatus :: (Int -> f Int)
-> UpdateResponsePlanResponse -> f UpdateResponsePlanResponse
updateResponsePlanResponse_httpStatus = (UpdateResponsePlanResponse -> Int)
-> (UpdateResponsePlanResponse
-> Int -> UpdateResponsePlanResponse)
-> Lens
UpdateResponsePlanResponse UpdateResponsePlanResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateResponsePlanResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateResponsePlanResponse' :: UpdateResponsePlanResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateResponsePlanResponse
s@UpdateResponsePlanResponse' {} Int
a -> UpdateResponsePlanResponse
s {$sel:httpStatus:UpdateResponsePlanResponse' :: Int
httpStatus = Int
a} :: UpdateResponsePlanResponse)
instance Prelude.NFData UpdateResponsePlanResponse