{-# 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.SSMContacts.CreateContact
-- 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)
--
-- Contacts are either the contacts that Incident Manager engages during an
-- incident or the escalation plans that Incident Manager uses to engage
-- contacts in phases during an incident.
module Amazonka.SSMContacts.CreateContact
  ( -- * Creating a Request
    CreateContact (..),
    newCreateContact,

    -- * Request Lenses
    createContact_idempotencyToken,
    createContact_displayName,
    createContact_tags,
    createContact_alias,
    createContact_type,
    createContact_plan,

    -- * Destructuring the Response
    CreateContactResponse (..),
    newCreateContactResponse,

    -- * Response Lenses
    createContactResponse_httpStatus,
    createContactResponse_contactArn,
  )
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.SSMContacts.Types

-- | /See:/ 'newCreateContact' smart constructor.
data CreateContact = CreateContact'
  { -- | A token ensuring that the operation is called only once with the
    -- specified details.
    CreateContact -> Maybe Text
idempotencyToken :: Prelude.Maybe Prelude.Text,
    -- | The full name of the contact or escalation plan.
    CreateContact -> Maybe Text
displayName :: Prelude.Maybe Prelude.Text,
    -- | Adds a tag to the target. You can only tag resources created in the
    -- first Region of your replication set.
    CreateContact -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The short name to quickly identify a contact or escalation plan. The
    -- contact alias must be unique and identifiable.
    CreateContact -> Text
alias :: Prelude.Text,
    -- | To create an escalation plan use @ESCALATION@. To create a contact use
    -- @PERSONAL@.
    CreateContact -> ContactType
type' :: ContactType,
    -- | A list of stages. A contact has an engagement plan with stages that
    -- contact specified contact channels. An escalation plan uses stages that
    -- contact specified contacts.
    CreateContact -> Plan
plan :: Plan
  }
  deriving (CreateContact -> CreateContact -> Bool
(CreateContact -> CreateContact -> Bool)
-> (CreateContact -> CreateContact -> Bool) -> Eq CreateContact
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateContact -> CreateContact -> Bool
$c/= :: CreateContact -> CreateContact -> Bool
== :: CreateContact -> CreateContact -> Bool
$c== :: CreateContact -> CreateContact -> Bool
Prelude.Eq, ReadPrec [CreateContact]
ReadPrec CreateContact
Int -> ReadS CreateContact
ReadS [CreateContact]
(Int -> ReadS CreateContact)
-> ReadS [CreateContact]
-> ReadPrec CreateContact
-> ReadPrec [CreateContact]
-> Read CreateContact
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateContact]
$creadListPrec :: ReadPrec [CreateContact]
readPrec :: ReadPrec CreateContact
$creadPrec :: ReadPrec CreateContact
readList :: ReadS [CreateContact]
$creadList :: ReadS [CreateContact]
readsPrec :: Int -> ReadS CreateContact
$creadsPrec :: Int -> ReadS CreateContact
Prelude.Read, Int -> CreateContact -> ShowS
[CreateContact] -> ShowS
CreateContact -> String
(Int -> CreateContact -> ShowS)
-> (CreateContact -> String)
-> ([CreateContact] -> ShowS)
-> Show CreateContact
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateContact] -> ShowS
$cshowList :: [CreateContact] -> ShowS
show :: CreateContact -> String
$cshow :: CreateContact -> String
showsPrec :: Int -> CreateContact -> ShowS
$cshowsPrec :: Int -> CreateContact -> ShowS
Prelude.Show, (forall x. CreateContact -> Rep CreateContact x)
-> (forall x. Rep CreateContact x -> CreateContact)
-> Generic CreateContact
forall x. Rep CreateContact x -> CreateContact
forall x. CreateContact -> Rep CreateContact x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateContact x -> CreateContact
$cfrom :: forall x. CreateContact -> Rep CreateContact x
Prelude.Generic)

-- |
-- Create a value of 'CreateContact' 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:
--
-- 'idempotencyToken', 'createContact_idempotencyToken' - A token ensuring that the operation is called only once with the
-- specified details.
--
-- 'displayName', 'createContact_displayName' - The full name of the contact or escalation plan.
--
-- 'tags', 'createContact_tags' - Adds a tag to the target. You can only tag resources created in the
-- first Region of your replication set.
--
-- 'alias', 'createContact_alias' - The short name to quickly identify a contact or escalation plan. The
-- contact alias must be unique and identifiable.
--
-- 'type'', 'createContact_type' - To create an escalation plan use @ESCALATION@. To create a contact use
-- @PERSONAL@.
--
-- 'plan', 'createContact_plan' - A list of stages. A contact has an engagement plan with stages that
-- contact specified contact channels. An escalation plan uses stages that
-- contact specified contacts.
newCreateContact ::
  -- | 'alias'
  Prelude.Text ->
  -- | 'type''
  ContactType ->
  -- | 'plan'
  Plan ->
  CreateContact
newCreateContact :: Text -> ContactType -> Plan -> CreateContact
newCreateContact Text
pAlias_ ContactType
pType_ Plan
pPlan_ =
  CreateContact' :: Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Text
-> ContactType
-> Plan
-> CreateContact
CreateContact'
    { $sel:idempotencyToken:CreateContact' :: Maybe Text
idempotencyToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:displayName:CreateContact' :: Maybe Text
displayName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateContact' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
      $sel:alias:CreateContact' :: Text
alias = Text
pAlias_,
      $sel:type':CreateContact' :: ContactType
type' = ContactType
pType_,
      $sel:plan:CreateContact' :: Plan
plan = Plan
pPlan_
    }

-- | A token ensuring that the operation is called only once with the
-- specified details.
createContact_idempotencyToken :: Lens.Lens' CreateContact (Prelude.Maybe Prelude.Text)
createContact_idempotencyToken :: (Maybe Text -> f (Maybe Text)) -> CreateContact -> f CreateContact
createContact_idempotencyToken = (CreateContact -> Maybe Text)
-> (CreateContact -> Maybe Text -> CreateContact)
-> Lens CreateContact CreateContact (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateContact' {Maybe Text
idempotencyToken :: Maybe Text
$sel:idempotencyToken:CreateContact' :: CreateContact -> Maybe Text
idempotencyToken} -> Maybe Text
idempotencyToken) (\s :: CreateContact
s@CreateContact' {} Maybe Text
a -> CreateContact
s {$sel:idempotencyToken:CreateContact' :: Maybe Text
idempotencyToken = Maybe Text
a} :: CreateContact)

-- | The full name of the contact or escalation plan.
createContact_displayName :: Lens.Lens' CreateContact (Prelude.Maybe Prelude.Text)
createContact_displayName :: (Maybe Text -> f (Maybe Text)) -> CreateContact -> f CreateContact
createContact_displayName = (CreateContact -> Maybe Text)
-> (CreateContact -> Maybe Text -> CreateContact)
-> Lens CreateContact CreateContact (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateContact' {Maybe Text
displayName :: Maybe Text
$sel:displayName:CreateContact' :: CreateContact -> Maybe Text
displayName} -> Maybe Text
displayName) (\s :: CreateContact
s@CreateContact' {} Maybe Text
a -> CreateContact
s {$sel:displayName:CreateContact' :: Maybe Text
displayName = Maybe Text
a} :: CreateContact)

-- | Adds a tag to the target. You can only tag resources created in the
-- first Region of your replication set.
createContact_tags :: Lens.Lens' CreateContact (Prelude.Maybe [Tag])
createContact_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateContact -> f CreateContact
createContact_tags = (CreateContact -> Maybe [Tag])
-> (CreateContact -> Maybe [Tag] -> CreateContact)
-> Lens CreateContact CreateContact (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateContact' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateContact' :: CreateContact -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateContact
s@CreateContact' {} Maybe [Tag]
a -> CreateContact
s {$sel:tags:CreateContact' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateContact) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> CreateContact -> f CreateContact)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateContact
-> f CreateContact
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The short name to quickly identify a contact or escalation plan. The
-- contact alias must be unique and identifiable.
createContact_alias :: Lens.Lens' CreateContact Prelude.Text
createContact_alias :: (Text -> f Text) -> CreateContact -> f CreateContact
createContact_alias = (CreateContact -> Text)
-> (CreateContact -> Text -> CreateContact)
-> Lens CreateContact CreateContact Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateContact' {Text
alias :: Text
$sel:alias:CreateContact' :: CreateContact -> Text
alias} -> Text
alias) (\s :: CreateContact
s@CreateContact' {} Text
a -> CreateContact
s {$sel:alias:CreateContact' :: Text
alias = Text
a} :: CreateContact)

-- | To create an escalation plan use @ESCALATION@. To create a contact use
-- @PERSONAL@.
createContact_type :: Lens.Lens' CreateContact ContactType
createContact_type :: (ContactType -> f ContactType) -> CreateContact -> f CreateContact
createContact_type = (CreateContact -> ContactType)
-> (CreateContact -> ContactType -> CreateContact)
-> Lens CreateContact CreateContact ContactType ContactType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateContact' {ContactType
type' :: ContactType
$sel:type':CreateContact' :: CreateContact -> ContactType
type'} -> ContactType
type') (\s :: CreateContact
s@CreateContact' {} ContactType
a -> CreateContact
s {$sel:type':CreateContact' :: ContactType
type' = ContactType
a} :: CreateContact)

-- | A list of stages. A contact has an engagement plan with stages that
-- contact specified contact channels. An escalation plan uses stages that
-- contact specified contacts.
createContact_plan :: Lens.Lens' CreateContact Plan
createContact_plan :: (Plan -> f Plan) -> CreateContact -> f CreateContact
createContact_plan = (CreateContact -> Plan)
-> (CreateContact -> Plan -> CreateContact)
-> Lens CreateContact CreateContact Plan Plan
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateContact' {Plan
plan :: Plan
$sel:plan:CreateContact' :: CreateContact -> Plan
plan} -> Plan
plan) (\s :: CreateContact
s@CreateContact' {} Plan
a -> CreateContact
s {$sel:plan:CreateContact' :: Plan
plan = Plan
a} :: CreateContact)

instance Core.AWSRequest CreateContact where
  type
    AWSResponse CreateContact =
      CreateContactResponse
  request :: CreateContact -> Request CreateContact
request = Service -> CreateContact -> Request CreateContact
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateContact
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateContact)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreateContact))
-> Logger
-> Service
-> Proxy CreateContact
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateContact)))
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 ->
          Int -> Text -> CreateContactResponse
CreateContactResponse'
            (Int -> Text -> CreateContactResponse)
-> Either String Int
-> Either String (Text -> CreateContactResponse)
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))
            Either String (Text -> CreateContactResponse)
-> Either String Text -> Either String CreateContactResponse
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
"ContactArn")
      )

instance Prelude.Hashable CreateContact

instance Prelude.NFData CreateContact

instance Core.ToHeaders CreateContact where
  toHeaders :: CreateContact -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateContact -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# (ByteString
"SSMContacts.CreateContact" :: Prelude.ByteString),
            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 CreateContact where
  toJSON :: CreateContact -> Value
toJSON CreateContact' {Maybe [Tag]
Maybe Text
Text
ContactType
Plan
plan :: Plan
type' :: ContactType
alias :: Text
tags :: Maybe [Tag]
displayName :: Maybe Text
idempotencyToken :: Maybe Text
$sel:plan:CreateContact' :: CreateContact -> Plan
$sel:type':CreateContact' :: CreateContact -> ContactType
$sel:alias:CreateContact' :: CreateContact -> Text
$sel:tags:CreateContact' :: CreateContact -> Maybe [Tag]
$sel:displayName:CreateContact' :: CreateContact -> Maybe Text
$sel:idempotencyToken:CreateContact' :: CreateContact -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"IdempotencyToken" 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
idempotencyToken,
            (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
"Tags" Text -> [Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Tag] -> Pair) -> Maybe [Tag] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Alias" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
alias),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Type" Text -> ContactType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ContactType
type'),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Plan" Text -> Plan -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Plan
plan)
          ]
      )

instance Core.ToPath CreateContact where
  toPath :: CreateContact -> ByteString
toPath = ByteString -> CreateContact -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery CreateContact where
  toQuery :: CreateContact -> QueryString
toQuery = QueryString -> CreateContact -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

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

-- |
-- Create a value of 'CreateContactResponse' 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:
--
-- 'httpStatus', 'createContactResponse_httpStatus' - The response's http status code.
--
-- 'contactArn', 'createContactResponse_contactArn' - The Amazon Resource Name (ARN) of the created contact or escalation
-- plan.
newCreateContactResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'contactArn'
  Prelude.Text ->
  CreateContactResponse
newCreateContactResponse :: Int -> Text -> CreateContactResponse
newCreateContactResponse Int
pHttpStatus_ Text
pContactArn_ =
  CreateContactResponse' :: Int -> Text -> CreateContactResponse
CreateContactResponse'
    { $sel:httpStatus:CreateContactResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:contactArn:CreateContactResponse' :: Text
contactArn = Text
pContactArn_
    }

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

-- | The Amazon Resource Name (ARN) of the created contact or escalation
-- plan.
createContactResponse_contactArn :: Lens.Lens' CreateContactResponse Prelude.Text
createContactResponse_contactArn :: (Text -> f Text)
-> CreateContactResponse -> f CreateContactResponse
createContactResponse_contactArn = (CreateContactResponse -> Text)
-> (CreateContactResponse -> Text -> CreateContactResponse)
-> Lens CreateContactResponse CreateContactResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateContactResponse' {Text
contactArn :: Text
$sel:contactArn:CreateContactResponse' :: CreateContactResponse -> Text
contactArn} -> Text
contactArn) (\s :: CreateContactResponse
s@CreateContactResponse' {} Text
a -> CreateContactResponse
s {$sel:contactArn:CreateContactResponse' :: Text
contactArn = Text
a} :: CreateContactResponse)

instance Prelude.NFData CreateContactResponse