{-# 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.AlexaBusiness.UpdateContact
-- 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)
--
-- Updates the contact details by the contact ARN.
module Amazonka.AlexaBusiness.UpdateContact
  ( -- * Creating a Request
    UpdateContact (..),
    newUpdateContact,

    -- * Request Lenses
    updateContact_lastName,
    updateContact_phoneNumbers,
    updateContact_phoneNumber,
    updateContact_sipAddresses,
    updateContact_firstName,
    updateContact_displayName,
    updateContact_contactArn,

    -- * Destructuring the Response
    UpdateContactResponse (..),
    newUpdateContactResponse,

    -- * Response Lenses
    updateContactResponse_httpStatus,
  )
where

import Amazonka.AlexaBusiness.Types
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

-- | /See:/ 'newUpdateContact' smart constructor.
data UpdateContact = UpdateContact'
  { -- | The updated last name of the contact.
    UpdateContact -> Maybe Text
lastName :: Prelude.Maybe Prelude.Text,
    -- | The list of phone numbers for the contact.
    UpdateContact -> Maybe [PhoneNumber]
phoneNumbers :: Prelude.Maybe [PhoneNumber],
    -- | The updated phone number of the contact. The phone number type defaults
    -- to WORK. You can either specify PhoneNumber or PhoneNumbers. We
    -- recommend that you use PhoneNumbers, which lets you specify the phone
    -- number type and multiple numbers.
    UpdateContact -> Maybe (Sensitive Text)
phoneNumber :: Prelude.Maybe (Core.Sensitive Prelude.Text),
    -- | The list of SIP addresses for the contact.
    UpdateContact -> Maybe [SipAddress]
sipAddresses :: Prelude.Maybe [SipAddress],
    -- | The updated first name of the contact.
    UpdateContact -> Maybe Text
firstName :: Prelude.Maybe Prelude.Text,
    -- | The updated display name of the contact.
    UpdateContact -> Maybe Text
displayName :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the contact to update.
    UpdateContact -> Text
contactArn :: Prelude.Text
  }
  deriving (UpdateContact -> UpdateContact -> Bool
(UpdateContact -> UpdateContact -> Bool)
-> (UpdateContact -> UpdateContact -> Bool) -> Eq UpdateContact
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateContact -> UpdateContact -> Bool
$c/= :: UpdateContact -> UpdateContact -> Bool
== :: UpdateContact -> UpdateContact -> Bool
$c== :: UpdateContact -> UpdateContact -> Bool
Prelude.Eq, Int -> UpdateContact -> ShowS
[UpdateContact] -> ShowS
UpdateContact -> String
(Int -> UpdateContact -> ShowS)
-> (UpdateContact -> String)
-> ([UpdateContact] -> ShowS)
-> Show UpdateContact
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateContact] -> ShowS
$cshowList :: [UpdateContact] -> ShowS
show :: UpdateContact -> String
$cshow :: UpdateContact -> String
showsPrec :: Int -> UpdateContact -> ShowS
$cshowsPrec :: Int -> UpdateContact -> ShowS
Prelude.Show, (forall x. UpdateContact -> Rep UpdateContact x)
-> (forall x. Rep UpdateContact x -> UpdateContact)
-> Generic UpdateContact
forall x. Rep UpdateContact x -> UpdateContact
forall x. UpdateContact -> Rep UpdateContact x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateContact x -> UpdateContact
$cfrom :: forall x. UpdateContact -> Rep UpdateContact x
Prelude.Generic)

-- |
-- Create a value of 'UpdateContact' 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:
--
-- 'lastName', 'updateContact_lastName' - The updated last name of the contact.
--
-- 'phoneNumbers', 'updateContact_phoneNumbers' - The list of phone numbers for the contact.
--
-- 'phoneNumber', 'updateContact_phoneNumber' - The updated phone number of the contact. The phone number type defaults
-- to WORK. You can either specify PhoneNumber or PhoneNumbers. We
-- recommend that you use PhoneNumbers, which lets you specify the phone
-- number type and multiple numbers.
--
-- 'sipAddresses', 'updateContact_sipAddresses' - The list of SIP addresses for the contact.
--
-- 'firstName', 'updateContact_firstName' - The updated first name of the contact.
--
-- 'displayName', 'updateContact_displayName' - The updated display name of the contact.
--
-- 'contactArn', 'updateContact_contactArn' - The ARN of the contact to update.
newUpdateContact ::
  -- | 'contactArn'
  Prelude.Text ->
  UpdateContact
newUpdateContact :: Text -> UpdateContact
newUpdateContact Text
pContactArn_ =
  UpdateContact' :: Maybe Text
-> Maybe [PhoneNumber]
-> Maybe (Sensitive Text)
-> Maybe [SipAddress]
-> Maybe Text
-> Maybe Text
-> Text
-> UpdateContact
UpdateContact'
    { $sel:lastName:UpdateContact' :: Maybe Text
lastName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:phoneNumbers:UpdateContact' :: Maybe [PhoneNumber]
phoneNumbers = Maybe [PhoneNumber]
forall a. Maybe a
Prelude.Nothing,
      $sel:phoneNumber:UpdateContact' :: Maybe (Sensitive Text)
phoneNumber = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:sipAddresses:UpdateContact' :: Maybe [SipAddress]
sipAddresses = Maybe [SipAddress]
forall a. Maybe a
Prelude.Nothing,
      $sel:firstName:UpdateContact' :: Maybe Text
firstName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:displayName:UpdateContact' :: Maybe Text
displayName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:contactArn:UpdateContact' :: Text
contactArn = Text
pContactArn_
    }

-- | The updated last name of the contact.
updateContact_lastName :: Lens.Lens' UpdateContact (Prelude.Maybe Prelude.Text)
updateContact_lastName :: (Maybe Text -> f (Maybe Text)) -> UpdateContact -> f UpdateContact
updateContact_lastName = (UpdateContact -> Maybe Text)
-> (UpdateContact -> Maybe Text -> UpdateContact)
-> Lens UpdateContact UpdateContact (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateContact' {Maybe Text
lastName :: Maybe Text
$sel:lastName:UpdateContact' :: UpdateContact -> Maybe Text
lastName} -> Maybe Text
lastName) (\s :: UpdateContact
s@UpdateContact' {} Maybe Text
a -> UpdateContact
s {$sel:lastName:UpdateContact' :: Maybe Text
lastName = Maybe Text
a} :: UpdateContact)

-- | The list of phone numbers for the contact.
updateContact_phoneNumbers :: Lens.Lens' UpdateContact (Prelude.Maybe [PhoneNumber])
updateContact_phoneNumbers :: (Maybe [PhoneNumber] -> f (Maybe [PhoneNumber]))
-> UpdateContact -> f UpdateContact
updateContact_phoneNumbers = (UpdateContact -> Maybe [PhoneNumber])
-> (UpdateContact -> Maybe [PhoneNumber] -> UpdateContact)
-> Lens
     UpdateContact
     UpdateContact
     (Maybe [PhoneNumber])
     (Maybe [PhoneNumber])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateContact' {Maybe [PhoneNumber]
phoneNumbers :: Maybe [PhoneNumber]
$sel:phoneNumbers:UpdateContact' :: UpdateContact -> Maybe [PhoneNumber]
phoneNumbers} -> Maybe [PhoneNumber]
phoneNumbers) (\s :: UpdateContact
s@UpdateContact' {} Maybe [PhoneNumber]
a -> UpdateContact
s {$sel:phoneNumbers:UpdateContact' :: Maybe [PhoneNumber]
phoneNumbers = Maybe [PhoneNumber]
a} :: UpdateContact) ((Maybe [PhoneNumber] -> f (Maybe [PhoneNumber]))
 -> UpdateContact -> f UpdateContact)
-> ((Maybe [PhoneNumber] -> f (Maybe [PhoneNumber]))
    -> Maybe [PhoneNumber] -> f (Maybe [PhoneNumber]))
-> (Maybe [PhoneNumber] -> f (Maybe [PhoneNumber]))
-> UpdateContact
-> f UpdateContact
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [PhoneNumber] [PhoneNumber] [PhoneNumber] [PhoneNumber]
-> Iso
     (Maybe [PhoneNumber])
     (Maybe [PhoneNumber])
     (Maybe [PhoneNumber])
     (Maybe [PhoneNumber])
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 [PhoneNumber] [PhoneNumber] [PhoneNumber] [PhoneNumber]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The updated phone number of the contact. The phone number type defaults
-- to WORK. You can either specify PhoneNumber or PhoneNumbers. We
-- recommend that you use PhoneNumbers, which lets you specify the phone
-- number type and multiple numbers.
updateContact_phoneNumber :: Lens.Lens' UpdateContact (Prelude.Maybe Prelude.Text)
updateContact_phoneNumber :: (Maybe Text -> f (Maybe Text)) -> UpdateContact -> f UpdateContact
updateContact_phoneNumber = (UpdateContact -> Maybe (Sensitive Text))
-> (UpdateContact -> Maybe (Sensitive Text) -> UpdateContact)
-> Lens
     UpdateContact
     UpdateContact
     (Maybe (Sensitive Text))
     (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateContact' {Maybe (Sensitive Text)
phoneNumber :: Maybe (Sensitive Text)
$sel:phoneNumber:UpdateContact' :: UpdateContact -> Maybe (Sensitive Text)
phoneNumber} -> Maybe (Sensitive Text)
phoneNumber) (\s :: UpdateContact
s@UpdateContact' {} Maybe (Sensitive Text)
a -> UpdateContact
s {$sel:phoneNumber:UpdateContact' :: Maybe (Sensitive Text)
phoneNumber = Maybe (Sensitive Text)
a} :: UpdateContact) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
 -> UpdateContact -> f UpdateContact)
-> ((Maybe Text -> f (Maybe Text))
    -> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> UpdateContact
-> f UpdateContact
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
     (Maybe (Sensitive Text))
     (Maybe (Sensitive 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 (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | The list of SIP addresses for the contact.
updateContact_sipAddresses :: Lens.Lens' UpdateContact (Prelude.Maybe [SipAddress])
updateContact_sipAddresses :: (Maybe [SipAddress] -> f (Maybe [SipAddress]))
-> UpdateContact -> f UpdateContact
updateContact_sipAddresses = (UpdateContact -> Maybe [SipAddress])
-> (UpdateContact -> Maybe [SipAddress] -> UpdateContact)
-> Lens
     UpdateContact
     UpdateContact
     (Maybe [SipAddress])
     (Maybe [SipAddress])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateContact' {Maybe [SipAddress]
sipAddresses :: Maybe [SipAddress]
$sel:sipAddresses:UpdateContact' :: UpdateContact -> Maybe [SipAddress]
sipAddresses} -> Maybe [SipAddress]
sipAddresses) (\s :: UpdateContact
s@UpdateContact' {} Maybe [SipAddress]
a -> UpdateContact
s {$sel:sipAddresses:UpdateContact' :: Maybe [SipAddress]
sipAddresses = Maybe [SipAddress]
a} :: UpdateContact) ((Maybe [SipAddress] -> f (Maybe [SipAddress]))
 -> UpdateContact -> f UpdateContact)
-> ((Maybe [SipAddress] -> f (Maybe [SipAddress]))
    -> Maybe [SipAddress] -> f (Maybe [SipAddress]))
-> (Maybe [SipAddress] -> f (Maybe [SipAddress]))
-> UpdateContact
-> f UpdateContact
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [SipAddress] [SipAddress] [SipAddress] [SipAddress]
-> Iso
     (Maybe [SipAddress])
     (Maybe [SipAddress])
     (Maybe [SipAddress])
     (Maybe [SipAddress])
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 [SipAddress] [SipAddress] [SipAddress] [SipAddress]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The updated first name of the contact.
updateContact_firstName :: Lens.Lens' UpdateContact (Prelude.Maybe Prelude.Text)
updateContact_firstName :: (Maybe Text -> f (Maybe Text)) -> UpdateContact -> f UpdateContact
updateContact_firstName = (UpdateContact -> Maybe Text)
-> (UpdateContact -> Maybe Text -> UpdateContact)
-> Lens UpdateContact UpdateContact (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateContact' {Maybe Text
firstName :: Maybe Text
$sel:firstName:UpdateContact' :: UpdateContact -> Maybe Text
firstName} -> Maybe Text
firstName) (\s :: UpdateContact
s@UpdateContact' {} Maybe Text
a -> UpdateContact
s {$sel:firstName:UpdateContact' :: Maybe Text
firstName = Maybe Text
a} :: UpdateContact)

-- | The updated display name of the contact.
updateContact_displayName :: Lens.Lens' UpdateContact (Prelude.Maybe Prelude.Text)
updateContact_displayName :: (Maybe Text -> f (Maybe Text)) -> UpdateContact -> f UpdateContact
updateContact_displayName = (UpdateContact -> Maybe Text)
-> (UpdateContact -> Maybe Text -> UpdateContact)
-> Lens UpdateContact UpdateContact (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateContact' {Maybe Text
displayName :: Maybe Text
$sel:displayName:UpdateContact' :: UpdateContact -> Maybe Text
displayName} -> Maybe Text
displayName) (\s :: UpdateContact
s@UpdateContact' {} Maybe Text
a -> UpdateContact
s {$sel:displayName:UpdateContact' :: Maybe Text
displayName = Maybe Text
a} :: UpdateContact)

-- | The ARN of the contact to update.
updateContact_contactArn :: Lens.Lens' UpdateContact Prelude.Text
updateContact_contactArn :: (Text -> f Text) -> UpdateContact -> f UpdateContact
updateContact_contactArn = (UpdateContact -> Text)
-> (UpdateContact -> Text -> UpdateContact)
-> Lens UpdateContact UpdateContact Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateContact' {Text
contactArn :: Text
$sel:contactArn:UpdateContact' :: UpdateContact -> Text
contactArn} -> Text
contactArn) (\s :: UpdateContact
s@UpdateContact' {} Text
a -> UpdateContact
s {$sel:contactArn:UpdateContact' :: Text
contactArn = Text
a} :: UpdateContact)

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

instance Prelude.NFData UpdateContact

instance Core.ToHeaders UpdateContact where
  toHeaders :: UpdateContact -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateContact -> 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
"AlexaForBusiness.UpdateContact" ::
                          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 UpdateContact where
  toJSON :: UpdateContact -> Value
toJSON UpdateContact' {Maybe [PhoneNumber]
Maybe [SipAddress]
Maybe Text
Maybe (Sensitive Text)
Text
contactArn :: Text
displayName :: Maybe Text
firstName :: Maybe Text
sipAddresses :: Maybe [SipAddress]
phoneNumber :: Maybe (Sensitive Text)
phoneNumbers :: Maybe [PhoneNumber]
lastName :: Maybe Text
$sel:contactArn:UpdateContact' :: UpdateContact -> Text
$sel:displayName:UpdateContact' :: UpdateContact -> Maybe Text
$sel:firstName:UpdateContact' :: UpdateContact -> Maybe Text
$sel:sipAddresses:UpdateContact' :: UpdateContact -> Maybe [SipAddress]
$sel:phoneNumber:UpdateContact' :: UpdateContact -> Maybe (Sensitive Text)
$sel:phoneNumbers:UpdateContact' :: UpdateContact -> Maybe [PhoneNumber]
$sel:lastName:UpdateContact' :: UpdateContact -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"LastName" 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
lastName,
            (Text
"PhoneNumbers" Text -> [PhoneNumber] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([PhoneNumber] -> Pair) -> Maybe [PhoneNumber] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [PhoneNumber]
phoneNumbers,
            (Text
"PhoneNumber" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Sensitive Text -> Pair) -> Maybe (Sensitive Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
phoneNumber,
            (Text
"SipAddresses" Text -> [SipAddress] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([SipAddress] -> Pair) -> Maybe [SipAddress] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [SipAddress]
sipAddresses,
            (Text
"FirstName" 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
firstName,
            (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,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ContactArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
contactArn)
          ]
      )

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

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

-- | /See:/ 'newUpdateContactResponse' smart constructor.
data UpdateContactResponse = UpdateContactResponse'
  { -- | The response's http status code.
    UpdateContactResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateContactResponse -> UpdateContactResponse -> Bool
(UpdateContactResponse -> UpdateContactResponse -> Bool)
-> (UpdateContactResponse -> UpdateContactResponse -> Bool)
-> Eq UpdateContactResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateContactResponse -> UpdateContactResponse -> Bool
$c/= :: UpdateContactResponse -> UpdateContactResponse -> Bool
== :: UpdateContactResponse -> UpdateContactResponse -> Bool
$c== :: UpdateContactResponse -> UpdateContactResponse -> Bool
Prelude.Eq, ReadPrec [UpdateContactResponse]
ReadPrec UpdateContactResponse
Int -> ReadS UpdateContactResponse
ReadS [UpdateContactResponse]
(Int -> ReadS UpdateContactResponse)
-> ReadS [UpdateContactResponse]
-> ReadPrec UpdateContactResponse
-> ReadPrec [UpdateContactResponse]
-> Read UpdateContactResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateContactResponse]
$creadListPrec :: ReadPrec [UpdateContactResponse]
readPrec :: ReadPrec UpdateContactResponse
$creadPrec :: ReadPrec UpdateContactResponse
readList :: ReadS [UpdateContactResponse]
$creadList :: ReadS [UpdateContactResponse]
readsPrec :: Int -> ReadS UpdateContactResponse
$creadsPrec :: Int -> ReadS UpdateContactResponse
Prelude.Read, Int -> UpdateContactResponse -> ShowS
[UpdateContactResponse] -> ShowS
UpdateContactResponse -> String
(Int -> UpdateContactResponse -> ShowS)
-> (UpdateContactResponse -> String)
-> ([UpdateContactResponse] -> ShowS)
-> Show UpdateContactResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateContactResponse] -> ShowS
$cshowList :: [UpdateContactResponse] -> ShowS
show :: UpdateContactResponse -> String
$cshow :: UpdateContactResponse -> String
showsPrec :: Int -> UpdateContactResponse -> ShowS
$cshowsPrec :: Int -> UpdateContactResponse -> ShowS
Prelude.Show, (forall x. UpdateContactResponse -> Rep UpdateContactResponse x)
-> (forall x. Rep UpdateContactResponse x -> UpdateContactResponse)
-> Generic UpdateContactResponse
forall x. Rep UpdateContactResponse x -> UpdateContactResponse
forall x. UpdateContactResponse -> Rep UpdateContactResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateContactResponse x -> UpdateContactResponse
$cfrom :: forall x. UpdateContactResponse -> Rep UpdateContactResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateContactResponse' 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', 'updateContactResponse_httpStatus' - The response's http status code.
newUpdateContactResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateContactResponse
newUpdateContactResponse :: Int -> UpdateContactResponse
newUpdateContactResponse Int
pHttpStatus_ =
  UpdateContactResponse' :: Int -> UpdateContactResponse
UpdateContactResponse' {$sel:httpStatus:UpdateContactResponse' :: Int
httpStatus = Int
pHttpStatus_}

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

instance Prelude.NFData UpdateContactResponse