{-# 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.Account.PutAlternateContact
-- 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)
--
-- Modifies the specified alternate contact attached to an Amazon Web
-- Services account.
--
-- For complete details about how to use the alternate contact operations,
-- see
-- <https://docs.aws.amazon.com/accounts/latest/reference/manage-acct-update-contact.html Access or updating the alternate contacts>.
module Amazonka.Account.PutAlternateContact
  ( -- * Creating a Request
    PutAlternateContact (..),
    newPutAlternateContact,

    -- * Request Lenses
    putAlternateContact_accountId,
    putAlternateContact_alternateContactType,
    putAlternateContact_emailAddress,
    putAlternateContact_name,
    putAlternateContact_phoneNumber,
    putAlternateContact_title,

    -- * Destructuring the Response
    PutAlternateContactResponse (..),
    newPutAlternateContactResponse,
  )
where

import Amazonka.Account.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:/ 'newPutAlternateContact' smart constructor.
data PutAlternateContact = PutAlternateContact'
  { -- | Specifies the 12 digit account ID number of the Amazon Web Services
    -- account that you want to access or modify with this operation.
    --
    -- If you do not specify this parameter, it defaults to the Amazon Web
    -- Services account of the identity used to call the operation.
    --
    -- To use this parameter, the caller must be an identity in the
    -- <https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#account organization\'s management account>
    -- or a delegated administrator account, and the specified account ID must
    -- be a member account in the same organization. The organization must have
    -- <https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html all features enabled>,
    -- and the organization must have
    -- <https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-trusted-access.html trusted access>
    -- enabled for the Account Management service, and optionally a
    -- <https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-delegated-admin.html delegated admin>
    -- account assigned.
    --
    -- The management account can\'t specify its own @AccountId@; it must call
    -- the operation in standalone context by not including the @AccountId@
    -- parameter.
    --
    -- To call this operation on an account that is not a member of an
    -- organization, then don\'t specify this parameter, and call the operation
    -- using an identity belonging to the account whose contacts you wish to
    -- retrieve or modify.
    PutAlternateContact -> Maybe Text
accountId :: Prelude.Maybe Prelude.Text,
    -- | Specifies which alternate contact you want to create or update.
    PutAlternateContact -> AlternateContactType
alternateContactType :: AlternateContactType,
    -- | Specifies an email address for the alternate contact.
    PutAlternateContact -> Sensitive Text
emailAddress :: Core.Sensitive Prelude.Text,
    -- | Specifies a name for the alternate contact.
    PutAlternateContact -> Sensitive Text
name :: Core.Sensitive Prelude.Text,
    -- | Specifies a phone number for the alternate contact.
    PutAlternateContact -> Sensitive Text
phoneNumber :: Core.Sensitive Prelude.Text,
    -- | Specifies a title for the alternate contact.
    PutAlternateContact -> Sensitive Text
title :: Core.Sensitive Prelude.Text
  }
  deriving (PutAlternateContact -> PutAlternateContact -> Bool
(PutAlternateContact -> PutAlternateContact -> Bool)
-> (PutAlternateContact -> PutAlternateContact -> Bool)
-> Eq PutAlternateContact
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutAlternateContact -> PutAlternateContact -> Bool
$c/= :: PutAlternateContact -> PutAlternateContact -> Bool
== :: PutAlternateContact -> PutAlternateContact -> Bool
$c== :: PutAlternateContact -> PutAlternateContact -> Bool
Prelude.Eq, Int -> PutAlternateContact -> ShowS
[PutAlternateContact] -> ShowS
PutAlternateContact -> String
(Int -> PutAlternateContact -> ShowS)
-> (PutAlternateContact -> String)
-> ([PutAlternateContact] -> ShowS)
-> Show PutAlternateContact
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutAlternateContact] -> ShowS
$cshowList :: [PutAlternateContact] -> ShowS
show :: PutAlternateContact -> String
$cshow :: PutAlternateContact -> String
showsPrec :: Int -> PutAlternateContact -> ShowS
$cshowsPrec :: Int -> PutAlternateContact -> ShowS
Prelude.Show, (forall x. PutAlternateContact -> Rep PutAlternateContact x)
-> (forall x. Rep PutAlternateContact x -> PutAlternateContact)
-> Generic PutAlternateContact
forall x. Rep PutAlternateContact x -> PutAlternateContact
forall x. PutAlternateContact -> Rep PutAlternateContact x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PutAlternateContact x -> PutAlternateContact
$cfrom :: forall x. PutAlternateContact -> Rep PutAlternateContact x
Prelude.Generic)

-- |
-- Create a value of 'PutAlternateContact' 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:
--
-- 'accountId', 'putAlternateContact_accountId' - Specifies the 12 digit account ID number of the Amazon Web Services
-- account that you want to access or modify with this operation.
--
-- If you do not specify this parameter, it defaults to the Amazon Web
-- Services account of the identity used to call the operation.
--
-- To use this parameter, the caller must be an identity in the
-- <https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#account organization\'s management account>
-- or a delegated administrator account, and the specified account ID must
-- be a member account in the same organization. The organization must have
-- <https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html all features enabled>,
-- and the organization must have
-- <https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-trusted-access.html trusted access>
-- enabled for the Account Management service, and optionally a
-- <https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-delegated-admin.html delegated admin>
-- account assigned.
--
-- The management account can\'t specify its own @AccountId@; it must call
-- the operation in standalone context by not including the @AccountId@
-- parameter.
--
-- To call this operation on an account that is not a member of an
-- organization, then don\'t specify this parameter, and call the operation
-- using an identity belonging to the account whose contacts you wish to
-- retrieve or modify.
--
-- 'alternateContactType', 'putAlternateContact_alternateContactType' - Specifies which alternate contact you want to create or update.
--
-- 'emailAddress', 'putAlternateContact_emailAddress' - Specifies an email address for the alternate contact.
--
-- 'name', 'putAlternateContact_name' - Specifies a name for the alternate contact.
--
-- 'phoneNumber', 'putAlternateContact_phoneNumber' - Specifies a phone number for the alternate contact.
--
-- 'title', 'putAlternateContact_title' - Specifies a title for the alternate contact.
newPutAlternateContact ::
  -- | 'alternateContactType'
  AlternateContactType ->
  -- | 'emailAddress'
  Prelude.Text ->
  -- | 'name'
  Prelude.Text ->
  -- | 'phoneNumber'
  Prelude.Text ->
  -- | 'title'
  Prelude.Text ->
  PutAlternateContact
newPutAlternateContact :: AlternateContactType
-> Text -> Text -> Text -> Text -> PutAlternateContact
newPutAlternateContact
  AlternateContactType
pAlternateContactType_
  Text
pEmailAddress_
  Text
pName_
  Text
pPhoneNumber_
  Text
pTitle_ =
    PutAlternateContact' :: Maybe Text
-> AlternateContactType
-> Sensitive Text
-> Sensitive Text
-> Sensitive Text
-> Sensitive Text
-> PutAlternateContact
PutAlternateContact'
      { $sel:accountId:PutAlternateContact' :: Maybe Text
accountId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:alternateContactType:PutAlternateContact' :: AlternateContactType
alternateContactType = AlternateContactType
pAlternateContactType_,
        $sel:emailAddress:PutAlternateContact' :: Sensitive Text
emailAddress = Tagged Text (Identity Text)
-> Tagged (Sensitive Text) (Identity (Sensitive Text))
forall a. Iso' (Sensitive a) a
Core._Sensitive (Tagged Text (Identity Text)
 -> Tagged (Sensitive Text) (Identity (Sensitive Text)))
-> Text -> Sensitive Text
forall t b. AReview t b -> b -> t
Lens.# Text
pEmailAddress_,
        $sel:name:PutAlternateContact' :: Sensitive Text
name = Tagged Text (Identity Text)
-> Tagged (Sensitive Text) (Identity (Sensitive Text))
forall a. Iso' (Sensitive a) a
Core._Sensitive (Tagged Text (Identity Text)
 -> Tagged (Sensitive Text) (Identity (Sensitive Text)))
-> Text -> Sensitive Text
forall t b. AReview t b -> b -> t
Lens.# Text
pName_,
        $sel:phoneNumber:PutAlternateContact' :: Sensitive Text
phoneNumber = Tagged Text (Identity Text)
-> Tagged (Sensitive Text) (Identity (Sensitive Text))
forall a. Iso' (Sensitive a) a
Core._Sensitive (Tagged Text (Identity Text)
 -> Tagged (Sensitive Text) (Identity (Sensitive Text)))
-> Text -> Sensitive Text
forall t b. AReview t b -> b -> t
Lens.# Text
pPhoneNumber_,
        $sel:title:PutAlternateContact' :: Sensitive Text
title = Tagged Text (Identity Text)
-> Tagged (Sensitive Text) (Identity (Sensitive Text))
forall a. Iso' (Sensitive a) a
Core._Sensitive (Tagged Text (Identity Text)
 -> Tagged (Sensitive Text) (Identity (Sensitive Text)))
-> Text -> Sensitive Text
forall t b. AReview t b -> b -> t
Lens.# Text
pTitle_
      }

-- | Specifies the 12 digit account ID number of the Amazon Web Services
-- account that you want to access or modify with this operation.
--
-- If you do not specify this parameter, it defaults to the Amazon Web
-- Services account of the identity used to call the operation.
--
-- To use this parameter, the caller must be an identity in the
-- <https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#account organization\'s management account>
-- or a delegated administrator account, and the specified account ID must
-- be a member account in the same organization. The organization must have
-- <https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html all features enabled>,
-- and the organization must have
-- <https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-trusted-access.html trusted access>
-- enabled for the Account Management service, and optionally a
-- <https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-delegated-admin.html delegated admin>
-- account assigned.
--
-- The management account can\'t specify its own @AccountId@; it must call
-- the operation in standalone context by not including the @AccountId@
-- parameter.
--
-- To call this operation on an account that is not a member of an
-- organization, then don\'t specify this parameter, and call the operation
-- using an identity belonging to the account whose contacts you wish to
-- retrieve or modify.
putAlternateContact_accountId :: Lens.Lens' PutAlternateContact (Prelude.Maybe Prelude.Text)
putAlternateContact_accountId :: (Maybe Text -> f (Maybe Text))
-> PutAlternateContact -> f PutAlternateContact
putAlternateContact_accountId = (PutAlternateContact -> Maybe Text)
-> (PutAlternateContact -> Maybe Text -> PutAlternateContact)
-> Lens
     PutAlternateContact PutAlternateContact (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutAlternateContact' {Maybe Text
accountId :: Maybe Text
$sel:accountId:PutAlternateContact' :: PutAlternateContact -> Maybe Text
accountId} -> Maybe Text
accountId) (\s :: PutAlternateContact
s@PutAlternateContact' {} Maybe Text
a -> PutAlternateContact
s {$sel:accountId:PutAlternateContact' :: Maybe Text
accountId = Maybe Text
a} :: PutAlternateContact)

-- | Specifies which alternate contact you want to create or update.
putAlternateContact_alternateContactType :: Lens.Lens' PutAlternateContact AlternateContactType
putAlternateContact_alternateContactType :: (AlternateContactType -> f AlternateContactType)
-> PutAlternateContact -> f PutAlternateContact
putAlternateContact_alternateContactType = (PutAlternateContact -> AlternateContactType)
-> (PutAlternateContact
    -> AlternateContactType -> PutAlternateContact)
-> Lens
     PutAlternateContact
     PutAlternateContact
     AlternateContactType
     AlternateContactType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutAlternateContact' {AlternateContactType
alternateContactType :: AlternateContactType
$sel:alternateContactType:PutAlternateContact' :: PutAlternateContact -> AlternateContactType
alternateContactType} -> AlternateContactType
alternateContactType) (\s :: PutAlternateContact
s@PutAlternateContact' {} AlternateContactType
a -> PutAlternateContact
s {$sel:alternateContactType:PutAlternateContact' :: AlternateContactType
alternateContactType = AlternateContactType
a} :: PutAlternateContact)

-- | Specifies an email address for the alternate contact.
putAlternateContact_emailAddress :: Lens.Lens' PutAlternateContact Prelude.Text
putAlternateContact_emailAddress :: (Text -> f Text) -> PutAlternateContact -> f PutAlternateContact
putAlternateContact_emailAddress = (PutAlternateContact -> Sensitive Text)
-> (PutAlternateContact -> Sensitive Text -> PutAlternateContact)
-> Lens
     PutAlternateContact
     PutAlternateContact
     (Sensitive Text)
     (Sensitive Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutAlternateContact' {Sensitive Text
emailAddress :: Sensitive Text
$sel:emailAddress:PutAlternateContact' :: PutAlternateContact -> Sensitive Text
emailAddress} -> Sensitive Text
emailAddress) (\s :: PutAlternateContact
s@PutAlternateContact' {} Sensitive Text
a -> PutAlternateContact
s {$sel:emailAddress:PutAlternateContact' :: Sensitive Text
emailAddress = Sensitive Text
a} :: PutAlternateContact) ((Sensitive Text -> f (Sensitive Text))
 -> PutAlternateContact -> f PutAlternateContact)
-> ((Text -> f Text) -> Sensitive Text -> f (Sensitive Text))
-> (Text -> f Text)
-> PutAlternateContact
-> f PutAlternateContact
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> f Text) -> Sensitive Text -> f (Sensitive Text)
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | Specifies a name for the alternate contact.
putAlternateContact_name :: Lens.Lens' PutAlternateContact Prelude.Text
putAlternateContact_name :: (Text -> f Text) -> PutAlternateContact -> f PutAlternateContact
putAlternateContact_name = (PutAlternateContact -> Sensitive Text)
-> (PutAlternateContact -> Sensitive Text -> PutAlternateContact)
-> Lens
     PutAlternateContact
     PutAlternateContact
     (Sensitive Text)
     (Sensitive Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutAlternateContact' {Sensitive Text
name :: Sensitive Text
$sel:name:PutAlternateContact' :: PutAlternateContact -> Sensitive Text
name} -> Sensitive Text
name) (\s :: PutAlternateContact
s@PutAlternateContact' {} Sensitive Text
a -> PutAlternateContact
s {$sel:name:PutAlternateContact' :: Sensitive Text
name = Sensitive Text
a} :: PutAlternateContact) ((Sensitive Text -> f (Sensitive Text))
 -> PutAlternateContact -> f PutAlternateContact)
-> ((Text -> f Text) -> Sensitive Text -> f (Sensitive Text))
-> (Text -> f Text)
-> PutAlternateContact
-> f PutAlternateContact
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> f Text) -> Sensitive Text -> f (Sensitive Text)
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | Specifies a phone number for the alternate contact.
putAlternateContact_phoneNumber :: Lens.Lens' PutAlternateContact Prelude.Text
putAlternateContact_phoneNumber :: (Text -> f Text) -> PutAlternateContact -> f PutAlternateContact
putAlternateContact_phoneNumber = (PutAlternateContact -> Sensitive Text)
-> (PutAlternateContact -> Sensitive Text -> PutAlternateContact)
-> Lens
     PutAlternateContact
     PutAlternateContact
     (Sensitive Text)
     (Sensitive Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutAlternateContact' {Sensitive Text
phoneNumber :: Sensitive Text
$sel:phoneNumber:PutAlternateContact' :: PutAlternateContact -> Sensitive Text
phoneNumber} -> Sensitive Text
phoneNumber) (\s :: PutAlternateContact
s@PutAlternateContact' {} Sensitive Text
a -> PutAlternateContact
s {$sel:phoneNumber:PutAlternateContact' :: Sensitive Text
phoneNumber = Sensitive Text
a} :: PutAlternateContact) ((Sensitive Text -> f (Sensitive Text))
 -> PutAlternateContact -> f PutAlternateContact)
-> ((Text -> f Text) -> Sensitive Text -> f (Sensitive Text))
-> (Text -> f Text)
-> PutAlternateContact
-> f PutAlternateContact
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> f Text) -> Sensitive Text -> f (Sensitive Text)
forall a. Iso' (Sensitive a) a
Core._Sensitive

-- | Specifies a title for the alternate contact.
putAlternateContact_title :: Lens.Lens' PutAlternateContact Prelude.Text
putAlternateContact_title :: (Text -> f Text) -> PutAlternateContact -> f PutAlternateContact
putAlternateContact_title = (PutAlternateContact -> Sensitive Text)
-> (PutAlternateContact -> Sensitive Text -> PutAlternateContact)
-> Lens
     PutAlternateContact
     PutAlternateContact
     (Sensitive Text)
     (Sensitive Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutAlternateContact' {Sensitive Text
title :: Sensitive Text
$sel:title:PutAlternateContact' :: PutAlternateContact -> Sensitive Text
title} -> Sensitive Text
title) (\s :: PutAlternateContact
s@PutAlternateContact' {} Sensitive Text
a -> PutAlternateContact
s {$sel:title:PutAlternateContact' :: Sensitive Text
title = Sensitive Text
a} :: PutAlternateContact) ((Sensitive Text -> f (Sensitive Text))
 -> PutAlternateContact -> f PutAlternateContact)
-> ((Text -> f Text) -> Sensitive Text -> f (Sensitive Text))
-> (Text -> f Text)
-> PutAlternateContact
-> f PutAlternateContact
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> f Text) -> Sensitive Text -> f (Sensitive Text)
forall a. Iso' (Sensitive a) a
Core._Sensitive

instance Core.AWSRequest PutAlternateContact where
  type
    AWSResponse PutAlternateContact =
      PutAlternateContactResponse
  request :: PutAlternateContact -> Request PutAlternateContact
request = Service -> PutAlternateContact -> Request PutAlternateContact
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy PutAlternateContact
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse PutAlternateContact)))
response =
    AWSResponse PutAlternateContact
-> Logger
-> Service
-> Proxy PutAlternateContact
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse PutAlternateContact)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse PutAlternateContact
PutAlternateContactResponse
PutAlternateContactResponse'

instance Prelude.Hashable PutAlternateContact

instance Prelude.NFData PutAlternateContact

instance Core.ToHeaders PutAlternateContact where
  toHeaders :: PutAlternateContact -> [Header]
toHeaders =
    [Header] -> PutAlternateContact -> [Header]
forall a b. a -> b -> a
Prelude.const
      ( [[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON PutAlternateContact where
  toJSON :: PutAlternateContact -> Value
toJSON PutAlternateContact' {Maybe Text
Sensitive Text
AlternateContactType
title :: Sensitive Text
phoneNumber :: Sensitive Text
name :: Sensitive Text
emailAddress :: Sensitive Text
alternateContactType :: AlternateContactType
accountId :: Maybe Text
$sel:title:PutAlternateContact' :: PutAlternateContact -> Sensitive Text
$sel:phoneNumber:PutAlternateContact' :: PutAlternateContact -> Sensitive Text
$sel:name:PutAlternateContact' :: PutAlternateContact -> Sensitive Text
$sel:emailAddress:PutAlternateContact' :: PutAlternateContact -> Sensitive Text
$sel:alternateContactType:PutAlternateContact' :: PutAlternateContact -> AlternateContactType
$sel:accountId:PutAlternateContact' :: PutAlternateContact -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"AccountId" 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
accountId,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"AlternateContactType"
                  Text -> AlternateContactType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= AlternateContactType
alternateContactType
              ),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"EmailAddress" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Sensitive Text
emailAddress),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Name" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Sensitive Text
name),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"PhoneNumber" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Sensitive Text
phoneNumber),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Title" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Sensitive Text
title)
          ]
      )

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

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

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

-- |
-- Create a value of 'PutAlternateContactResponse' 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.
newPutAlternateContactResponse ::
  PutAlternateContactResponse
newPutAlternateContactResponse :: PutAlternateContactResponse
newPutAlternateContactResponse =
  PutAlternateContactResponse
PutAlternateContactResponse'

instance Prelude.NFData PutAlternateContactResponse