{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.SSMIncidents.GetResponsePlan
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Retrieves the details of the specified response plan.
module Amazonka.SSMIncidents.GetResponsePlan
  ( -- * Creating a Request
    GetResponsePlan (..),
    newGetResponsePlan,

    -- * Request Lenses
    getResponsePlan_arn,

    -- * Destructuring the Response
    GetResponsePlanResponse (..),
    newGetResponsePlanResponse,

    -- * Response Lenses
    getResponsePlanResponse_actions,
    getResponsePlanResponse_displayName,
    getResponsePlanResponse_chatChannel,
    getResponsePlanResponse_engagements,
    getResponsePlanResponse_httpStatus,
    getResponsePlanResponse_arn,
    getResponsePlanResponse_incidentTemplate,
    getResponsePlanResponse_name,
  )
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

-- | /See:/ 'newGetResponsePlan' smart constructor.
data GetResponsePlan = GetResponsePlan'
  { -- | The Amazon Resource Name (ARN) of the response plan.
    GetResponsePlan -> Text
arn :: Prelude.Text
  }
  deriving (GetResponsePlan -> GetResponsePlan -> Bool
(GetResponsePlan -> GetResponsePlan -> Bool)
-> (GetResponsePlan -> GetResponsePlan -> Bool)
-> Eq GetResponsePlan
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetResponsePlan -> GetResponsePlan -> Bool
$c/= :: GetResponsePlan -> GetResponsePlan -> Bool
== :: GetResponsePlan -> GetResponsePlan -> Bool
$c== :: GetResponsePlan -> GetResponsePlan -> Bool
Prelude.Eq, ReadPrec [GetResponsePlan]
ReadPrec GetResponsePlan
Int -> ReadS GetResponsePlan
ReadS [GetResponsePlan]
(Int -> ReadS GetResponsePlan)
-> ReadS [GetResponsePlan]
-> ReadPrec GetResponsePlan
-> ReadPrec [GetResponsePlan]
-> Read GetResponsePlan
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetResponsePlan]
$creadListPrec :: ReadPrec [GetResponsePlan]
readPrec :: ReadPrec GetResponsePlan
$creadPrec :: ReadPrec GetResponsePlan
readList :: ReadS [GetResponsePlan]
$creadList :: ReadS [GetResponsePlan]
readsPrec :: Int -> ReadS GetResponsePlan
$creadsPrec :: Int -> ReadS GetResponsePlan
Prelude.Read, Int -> GetResponsePlan -> ShowS
[GetResponsePlan] -> ShowS
GetResponsePlan -> String
(Int -> GetResponsePlan -> ShowS)
-> (GetResponsePlan -> String)
-> ([GetResponsePlan] -> ShowS)
-> Show GetResponsePlan
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetResponsePlan] -> ShowS
$cshowList :: [GetResponsePlan] -> ShowS
show :: GetResponsePlan -> String
$cshow :: GetResponsePlan -> String
showsPrec :: Int -> GetResponsePlan -> ShowS
$cshowsPrec :: Int -> GetResponsePlan -> ShowS
Prelude.Show, (forall x. GetResponsePlan -> Rep GetResponsePlan x)
-> (forall x. Rep GetResponsePlan x -> GetResponsePlan)
-> Generic GetResponsePlan
forall x. Rep GetResponsePlan x -> GetResponsePlan
forall x. GetResponsePlan -> Rep GetResponsePlan x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetResponsePlan x -> GetResponsePlan
$cfrom :: forall x. GetResponsePlan -> Rep GetResponsePlan x
Prelude.Generic)

-- |
-- Create a value of 'GetResponsePlan' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'arn', 'getResponsePlan_arn' - The Amazon Resource Name (ARN) of the response plan.
newGetResponsePlan ::
  -- | 'arn'
  Prelude.Text ->
  GetResponsePlan
newGetResponsePlan :: Text -> GetResponsePlan
newGetResponsePlan Text
pArn_ =
  GetResponsePlan' :: Text -> GetResponsePlan
GetResponsePlan' {$sel:arn:GetResponsePlan' :: Text
arn = Text
pArn_}

-- | The Amazon Resource Name (ARN) of the response plan.
getResponsePlan_arn :: Lens.Lens' GetResponsePlan Prelude.Text
getResponsePlan_arn :: (Text -> f Text) -> GetResponsePlan -> f GetResponsePlan
getResponsePlan_arn = (GetResponsePlan -> Text)
-> (GetResponsePlan -> Text -> GetResponsePlan)
-> Lens GetResponsePlan GetResponsePlan Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResponsePlan' {Text
arn :: Text
$sel:arn:GetResponsePlan' :: GetResponsePlan -> Text
arn} -> Text
arn) (\s :: GetResponsePlan
s@GetResponsePlan' {} Text
a -> GetResponsePlan
s {$sel:arn:GetResponsePlan' :: Text
arn = Text
a} :: GetResponsePlan)

instance Core.AWSRequest GetResponsePlan where
  type
    AWSResponse GetResponsePlan =
      GetResponsePlanResponse
  request :: GetResponsePlan -> Request GetResponsePlan
request = Service -> GetResponsePlan -> Request GetResponsePlan
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy GetResponsePlan
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetResponsePlan)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetResponsePlan))
-> Logger
-> Service
-> Proxy GetResponsePlan
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetResponsePlan)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe [Action]
-> Maybe Text
-> Maybe ChatChannel
-> Maybe [Text]
-> Int
-> Text
-> IncidentTemplate
-> Text
-> GetResponsePlanResponse
GetResponsePlanResponse'
            (Maybe [Action]
 -> Maybe Text
 -> Maybe ChatChannel
 -> Maybe [Text]
 -> Int
 -> Text
 -> IncidentTemplate
 -> Text
 -> GetResponsePlanResponse)
-> Either String (Maybe [Action])
-> Either
     String
     (Maybe Text
      -> Maybe ChatChannel
      -> Maybe [Text]
      -> Int
      -> Text
      -> IncidentTemplate
      -> Text
      -> GetResponsePlanResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [Action]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"actions" Either String (Maybe (Maybe [Action]))
-> Maybe [Action] -> Either String (Maybe [Action])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Action]
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe Text
   -> Maybe ChatChannel
   -> Maybe [Text]
   -> Int
   -> Text
   -> IncidentTemplate
   -> Text
   -> GetResponsePlanResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe ChatChannel
      -> Maybe [Text]
      -> Int
      -> Text
      -> IncidentTemplate
      -> Text
      -> GetResponsePlanResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"displayName")
            Either
  String
  (Maybe ChatChannel
   -> Maybe [Text]
   -> Int
   -> Text
   -> IncidentTemplate
   -> Text
   -> GetResponsePlanResponse)
-> Either String (Maybe ChatChannel)
-> Either
     String
     (Maybe [Text]
      -> Int
      -> Text
      -> IncidentTemplate
      -> Text
      -> GetResponsePlanResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe ChatChannel)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"chatChannel")
            Either
  String
  (Maybe [Text]
   -> Int
   -> Text
   -> IncidentTemplate
   -> Text
   -> GetResponsePlanResponse)
-> Either String (Maybe [Text])
-> Either
     String
     (Int
      -> Text -> IncidentTemplate -> Text -> GetResponsePlanResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"engagements" Either String (Maybe (Maybe [Text]))
-> Maybe [Text] -> Either String (Maybe [Text])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Int
   -> Text -> IncidentTemplate -> Text -> GetResponsePlanResponse)
-> Either String Int
-> Either
     String
     (Text -> IncidentTemplate -> Text -> GetResponsePlanResponse)
forall (f :: * -> *) a b. Applicative f => 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))
            Either
  String
  (Text -> IncidentTemplate -> Text -> GetResponsePlanResponse)
-> Either String Text
-> Either
     String (IncidentTemplate -> Text -> GetResponsePlanResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"arn")
            Either String (IncidentTemplate -> Text -> GetResponsePlanResponse)
-> Either String IncidentTemplate
-> Either String (Text -> GetResponsePlanResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String IncidentTemplate
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"incidentTemplate")
            Either String (Text -> GetResponsePlanResponse)
-> Either String Text -> Either String GetResponsePlanResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"name")
      )

instance Prelude.Hashable GetResponsePlan

instance Prelude.NFData GetResponsePlan

instance Core.ToHeaders GetResponsePlan where
  toHeaders :: GetResponsePlan -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetResponsePlan -> 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.ToPath GetResponsePlan where
  toPath :: GetResponsePlan -> ByteString
toPath = ByteString -> GetResponsePlan -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/getResponsePlan"

instance Core.ToQuery GetResponsePlan where
  toQuery :: GetResponsePlan -> QueryString
toQuery GetResponsePlan' {Text
arn :: Text
$sel:arn:GetResponsePlan' :: GetResponsePlan -> Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"arn" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
arn]

-- | /See:/ 'newGetResponsePlanResponse' smart constructor.
data GetResponsePlanResponse = GetResponsePlanResponse'
  { -- | The actions that this response plan takes at the beginning of the
    -- incident.
    GetResponsePlanResponse -> Maybe [Action]
actions :: Prelude.Maybe [Action],
    -- | The long format name of the response plan. Can contain spaces.
    GetResponsePlanResponse -> Maybe Text
displayName :: Prelude.Maybe Prelude.Text,
    -- | The AWS Chatbot chat channel used for collaboration during an incident.
    GetResponsePlanResponse -> Maybe ChatChannel
chatChannel :: Prelude.Maybe ChatChannel,
    -- | The contacts and escalation plans that the response plan engages during
    -- an incident.
    GetResponsePlanResponse -> Maybe [Text]
engagements :: Prelude.Maybe [Prelude.Text],
    -- | The response's http status code.
    GetResponsePlanResponse -> Int
httpStatus :: Prelude.Int,
    -- | The ARN of the response plan.
    GetResponsePlanResponse -> Text
arn :: Prelude.Text,
    -- | Details used to create the incident when using this response plan.
    GetResponsePlanResponse -> IncidentTemplate
incidentTemplate :: IncidentTemplate,
    -- | The short format name of the response plan. Can\'t contain spaces.
    GetResponsePlanResponse -> Text
name :: Prelude.Text
  }
  deriving (GetResponsePlanResponse -> GetResponsePlanResponse -> Bool
(GetResponsePlanResponse -> GetResponsePlanResponse -> Bool)
-> (GetResponsePlanResponse -> GetResponsePlanResponse -> Bool)
-> Eq GetResponsePlanResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetResponsePlanResponse -> GetResponsePlanResponse -> Bool
$c/= :: GetResponsePlanResponse -> GetResponsePlanResponse -> Bool
== :: GetResponsePlanResponse -> GetResponsePlanResponse -> Bool
$c== :: GetResponsePlanResponse -> GetResponsePlanResponse -> Bool
Prelude.Eq, ReadPrec [GetResponsePlanResponse]
ReadPrec GetResponsePlanResponse
Int -> ReadS GetResponsePlanResponse
ReadS [GetResponsePlanResponse]
(Int -> ReadS GetResponsePlanResponse)
-> ReadS [GetResponsePlanResponse]
-> ReadPrec GetResponsePlanResponse
-> ReadPrec [GetResponsePlanResponse]
-> Read GetResponsePlanResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetResponsePlanResponse]
$creadListPrec :: ReadPrec [GetResponsePlanResponse]
readPrec :: ReadPrec GetResponsePlanResponse
$creadPrec :: ReadPrec GetResponsePlanResponse
readList :: ReadS [GetResponsePlanResponse]
$creadList :: ReadS [GetResponsePlanResponse]
readsPrec :: Int -> ReadS GetResponsePlanResponse
$creadsPrec :: Int -> ReadS GetResponsePlanResponse
Prelude.Read, Int -> GetResponsePlanResponse -> ShowS
[GetResponsePlanResponse] -> ShowS
GetResponsePlanResponse -> String
(Int -> GetResponsePlanResponse -> ShowS)
-> (GetResponsePlanResponse -> String)
-> ([GetResponsePlanResponse] -> ShowS)
-> Show GetResponsePlanResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetResponsePlanResponse] -> ShowS
$cshowList :: [GetResponsePlanResponse] -> ShowS
show :: GetResponsePlanResponse -> String
$cshow :: GetResponsePlanResponse -> String
showsPrec :: Int -> GetResponsePlanResponse -> ShowS
$cshowsPrec :: Int -> GetResponsePlanResponse -> ShowS
Prelude.Show, (forall x.
 GetResponsePlanResponse -> Rep GetResponsePlanResponse x)
-> (forall x.
    Rep GetResponsePlanResponse x -> GetResponsePlanResponse)
-> Generic GetResponsePlanResponse
forall x. Rep GetResponsePlanResponse x -> GetResponsePlanResponse
forall x. GetResponsePlanResponse -> Rep GetResponsePlanResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetResponsePlanResponse x -> GetResponsePlanResponse
$cfrom :: forall x. GetResponsePlanResponse -> Rep GetResponsePlanResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetResponsePlanResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'actions', 'getResponsePlanResponse_actions' - The actions that this response plan takes at the beginning of the
-- incident.
--
-- 'displayName', 'getResponsePlanResponse_displayName' - The long format name of the response plan. Can contain spaces.
--
-- 'chatChannel', 'getResponsePlanResponse_chatChannel' - The AWS Chatbot chat channel used for collaboration during an incident.
--
-- 'engagements', 'getResponsePlanResponse_engagements' - The contacts and escalation plans that the response plan engages during
-- an incident.
--
-- 'httpStatus', 'getResponsePlanResponse_httpStatus' - The response's http status code.
--
-- 'arn', 'getResponsePlanResponse_arn' - The ARN of the response plan.
--
-- 'incidentTemplate', 'getResponsePlanResponse_incidentTemplate' - Details used to create the incident when using this response plan.
--
-- 'name', 'getResponsePlanResponse_name' - The short format name of the response plan. Can\'t contain spaces.
newGetResponsePlanResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'arn'
  Prelude.Text ->
  -- | 'incidentTemplate'
  IncidentTemplate ->
  -- | 'name'
  Prelude.Text ->
  GetResponsePlanResponse
newGetResponsePlanResponse :: Int -> Text -> IncidentTemplate -> Text -> GetResponsePlanResponse
newGetResponsePlanResponse
  Int
pHttpStatus_
  Text
pArn_
  IncidentTemplate
pIncidentTemplate_
  Text
pName_ =
    GetResponsePlanResponse' :: Maybe [Action]
-> Maybe Text
-> Maybe ChatChannel
-> Maybe [Text]
-> Int
-> Text
-> IncidentTemplate
-> Text
-> GetResponsePlanResponse
GetResponsePlanResponse'
      { $sel:actions:GetResponsePlanResponse' :: Maybe [Action]
actions = Maybe [Action]
forall a. Maybe a
Prelude.Nothing,
        $sel:displayName:GetResponsePlanResponse' :: Maybe Text
displayName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:chatChannel:GetResponsePlanResponse' :: Maybe ChatChannel
chatChannel = Maybe ChatChannel
forall a. Maybe a
Prelude.Nothing,
        $sel:engagements:GetResponsePlanResponse' :: Maybe [Text]
engagements = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:GetResponsePlanResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:arn:GetResponsePlanResponse' :: Text
arn = Text
pArn_,
        $sel:incidentTemplate:GetResponsePlanResponse' :: IncidentTemplate
incidentTemplate = IncidentTemplate
pIncidentTemplate_,
        $sel:name:GetResponsePlanResponse' :: Text
name = Text
pName_
      }

-- | The actions that this response plan takes at the beginning of the
-- incident.
getResponsePlanResponse_actions :: Lens.Lens' GetResponsePlanResponse (Prelude.Maybe [Action])
getResponsePlanResponse_actions :: (Maybe [Action] -> f (Maybe [Action]))
-> GetResponsePlanResponse -> f GetResponsePlanResponse
getResponsePlanResponse_actions = (GetResponsePlanResponse -> Maybe [Action])
-> (GetResponsePlanResponse
    -> Maybe [Action] -> GetResponsePlanResponse)
-> Lens
     GetResponsePlanResponse
     GetResponsePlanResponse
     (Maybe [Action])
     (Maybe [Action])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResponsePlanResponse' {Maybe [Action]
actions :: Maybe [Action]
$sel:actions:GetResponsePlanResponse' :: GetResponsePlanResponse -> Maybe [Action]
actions} -> Maybe [Action]
actions) (\s :: GetResponsePlanResponse
s@GetResponsePlanResponse' {} Maybe [Action]
a -> GetResponsePlanResponse
s {$sel:actions:GetResponsePlanResponse' :: Maybe [Action]
actions = Maybe [Action]
a} :: GetResponsePlanResponse) ((Maybe [Action] -> f (Maybe [Action]))
 -> GetResponsePlanResponse -> f GetResponsePlanResponse)
-> ((Maybe [Action] -> f (Maybe [Action]))
    -> Maybe [Action] -> f (Maybe [Action]))
-> (Maybe [Action] -> f (Maybe [Action]))
-> GetResponsePlanResponse
-> f GetResponsePlanResponse
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

-- | The long format name of the response plan. Can contain spaces.
getResponsePlanResponse_displayName :: Lens.Lens' GetResponsePlanResponse (Prelude.Maybe Prelude.Text)
getResponsePlanResponse_displayName :: (Maybe Text -> f (Maybe Text))
-> GetResponsePlanResponse -> f GetResponsePlanResponse
getResponsePlanResponse_displayName = (GetResponsePlanResponse -> Maybe Text)
-> (GetResponsePlanResponse
    -> Maybe Text -> GetResponsePlanResponse)
-> Lens
     GetResponsePlanResponse
     GetResponsePlanResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResponsePlanResponse' {Maybe Text
displayName :: Maybe Text
$sel:displayName:GetResponsePlanResponse' :: GetResponsePlanResponse -> Maybe Text
displayName} -> Maybe Text
displayName) (\s :: GetResponsePlanResponse
s@GetResponsePlanResponse' {} Maybe Text
a -> GetResponsePlanResponse
s {$sel:displayName:GetResponsePlanResponse' :: Maybe Text
displayName = Maybe Text
a} :: GetResponsePlanResponse)

-- | The AWS Chatbot chat channel used for collaboration during an incident.
getResponsePlanResponse_chatChannel :: Lens.Lens' GetResponsePlanResponse (Prelude.Maybe ChatChannel)
getResponsePlanResponse_chatChannel :: (Maybe ChatChannel -> f (Maybe ChatChannel))
-> GetResponsePlanResponse -> f GetResponsePlanResponse
getResponsePlanResponse_chatChannel = (GetResponsePlanResponse -> Maybe ChatChannel)
-> (GetResponsePlanResponse
    -> Maybe ChatChannel -> GetResponsePlanResponse)
-> Lens
     GetResponsePlanResponse
     GetResponsePlanResponse
     (Maybe ChatChannel)
     (Maybe ChatChannel)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResponsePlanResponse' {Maybe ChatChannel
chatChannel :: Maybe ChatChannel
$sel:chatChannel:GetResponsePlanResponse' :: GetResponsePlanResponse -> Maybe ChatChannel
chatChannel} -> Maybe ChatChannel
chatChannel) (\s :: GetResponsePlanResponse
s@GetResponsePlanResponse' {} Maybe ChatChannel
a -> GetResponsePlanResponse
s {$sel:chatChannel:GetResponsePlanResponse' :: Maybe ChatChannel
chatChannel = Maybe ChatChannel
a} :: GetResponsePlanResponse)

-- | The contacts and escalation plans that the response plan engages during
-- an incident.
getResponsePlanResponse_engagements :: Lens.Lens' GetResponsePlanResponse (Prelude.Maybe [Prelude.Text])
getResponsePlanResponse_engagements :: (Maybe [Text] -> f (Maybe [Text]))
-> GetResponsePlanResponse -> f GetResponsePlanResponse
getResponsePlanResponse_engagements = (GetResponsePlanResponse -> Maybe [Text])
-> (GetResponsePlanResponse
    -> Maybe [Text] -> GetResponsePlanResponse)
-> Lens
     GetResponsePlanResponse
     GetResponsePlanResponse
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResponsePlanResponse' {Maybe [Text]
engagements :: Maybe [Text]
$sel:engagements:GetResponsePlanResponse' :: GetResponsePlanResponse -> Maybe [Text]
engagements} -> Maybe [Text]
engagements) (\s :: GetResponsePlanResponse
s@GetResponsePlanResponse' {} Maybe [Text]
a -> GetResponsePlanResponse
s {$sel:engagements:GetResponsePlanResponse' :: Maybe [Text]
engagements = Maybe [Text]
a} :: GetResponsePlanResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> GetResponsePlanResponse -> f GetResponsePlanResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> GetResponsePlanResponse
-> f GetResponsePlanResponse
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

-- | The response's http status code.
getResponsePlanResponse_httpStatus :: Lens.Lens' GetResponsePlanResponse Prelude.Int
getResponsePlanResponse_httpStatus :: (Int -> f Int)
-> GetResponsePlanResponse -> f GetResponsePlanResponse
getResponsePlanResponse_httpStatus = (GetResponsePlanResponse -> Int)
-> (GetResponsePlanResponse -> Int -> GetResponsePlanResponse)
-> Lens GetResponsePlanResponse GetResponsePlanResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResponsePlanResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetResponsePlanResponse' :: GetResponsePlanResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetResponsePlanResponse
s@GetResponsePlanResponse' {} Int
a -> GetResponsePlanResponse
s {$sel:httpStatus:GetResponsePlanResponse' :: Int
httpStatus = Int
a} :: GetResponsePlanResponse)

-- | The ARN of the response plan.
getResponsePlanResponse_arn :: Lens.Lens' GetResponsePlanResponse Prelude.Text
getResponsePlanResponse_arn :: (Text -> f Text)
-> GetResponsePlanResponse -> f GetResponsePlanResponse
getResponsePlanResponse_arn = (GetResponsePlanResponse -> Text)
-> (GetResponsePlanResponse -> Text -> GetResponsePlanResponse)
-> Lens GetResponsePlanResponse GetResponsePlanResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResponsePlanResponse' {Text
arn :: Text
$sel:arn:GetResponsePlanResponse' :: GetResponsePlanResponse -> Text
arn} -> Text
arn) (\s :: GetResponsePlanResponse
s@GetResponsePlanResponse' {} Text
a -> GetResponsePlanResponse
s {$sel:arn:GetResponsePlanResponse' :: Text
arn = Text
a} :: GetResponsePlanResponse)

-- | Details used to create the incident when using this response plan.
getResponsePlanResponse_incidentTemplate :: Lens.Lens' GetResponsePlanResponse IncidentTemplate
getResponsePlanResponse_incidentTemplate :: (IncidentTemplate -> f IncidentTemplate)
-> GetResponsePlanResponse -> f GetResponsePlanResponse
getResponsePlanResponse_incidentTemplate = (GetResponsePlanResponse -> IncidentTemplate)
-> (GetResponsePlanResponse
    -> IncidentTemplate -> GetResponsePlanResponse)
-> Lens
     GetResponsePlanResponse
     GetResponsePlanResponse
     IncidentTemplate
     IncidentTemplate
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResponsePlanResponse' {IncidentTemplate
incidentTemplate :: IncidentTemplate
$sel:incidentTemplate:GetResponsePlanResponse' :: GetResponsePlanResponse -> IncidentTemplate
incidentTemplate} -> IncidentTemplate
incidentTemplate) (\s :: GetResponsePlanResponse
s@GetResponsePlanResponse' {} IncidentTemplate
a -> GetResponsePlanResponse
s {$sel:incidentTemplate:GetResponsePlanResponse' :: IncidentTemplate
incidentTemplate = IncidentTemplate
a} :: GetResponsePlanResponse)

-- | The short format name of the response plan. Can\'t contain spaces.
getResponsePlanResponse_name :: Lens.Lens' GetResponsePlanResponse Prelude.Text
getResponsePlanResponse_name :: (Text -> f Text)
-> GetResponsePlanResponse -> f GetResponsePlanResponse
getResponsePlanResponse_name = (GetResponsePlanResponse -> Text)
-> (GetResponsePlanResponse -> Text -> GetResponsePlanResponse)
-> Lens GetResponsePlanResponse GetResponsePlanResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetResponsePlanResponse' {Text
name :: Text
$sel:name:GetResponsePlanResponse' :: GetResponsePlanResponse -> Text
name} -> Text
name) (\s :: GetResponsePlanResponse
s@GetResponsePlanResponse' {} Text
a -> GetResponsePlanResponse
s {$sel:name:GetResponsePlanResponse' :: Text
name = Text
a} :: GetResponsePlanResponse)

instance Prelude.NFData GetResponsePlanResponse