{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Account.DeleteAlternateContact
(
DeleteAlternateContact (..),
newDeleteAlternateContact,
deleteAlternateContact_accountId,
deleteAlternateContact_alternateContactType,
DeleteAlternateContactResponse (..),
newDeleteAlternateContactResponse,
)
where
import Amazonka.Account.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DeleteAlternateContact = DeleteAlternateContact'
{
DeleteAlternateContact -> Maybe Text
accountId :: Prelude.Maybe Prelude.Text,
DeleteAlternateContact -> AlternateContactType
alternateContactType :: AlternateContactType
}
deriving (DeleteAlternateContact -> DeleteAlternateContact -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteAlternateContact -> DeleteAlternateContact -> Bool
$c/= :: DeleteAlternateContact -> DeleteAlternateContact -> Bool
== :: DeleteAlternateContact -> DeleteAlternateContact -> Bool
$c== :: DeleteAlternateContact -> DeleteAlternateContact -> Bool
Prelude.Eq, ReadPrec [DeleteAlternateContact]
ReadPrec DeleteAlternateContact
Int -> ReadS DeleteAlternateContact
ReadS [DeleteAlternateContact]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteAlternateContact]
$creadListPrec :: ReadPrec [DeleteAlternateContact]
readPrec :: ReadPrec DeleteAlternateContact
$creadPrec :: ReadPrec DeleteAlternateContact
readList :: ReadS [DeleteAlternateContact]
$creadList :: ReadS [DeleteAlternateContact]
readsPrec :: Int -> ReadS DeleteAlternateContact
$creadsPrec :: Int -> ReadS DeleteAlternateContact
Prelude.Read, Int -> DeleteAlternateContact -> ShowS
[DeleteAlternateContact] -> ShowS
DeleteAlternateContact -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteAlternateContact] -> ShowS
$cshowList :: [DeleteAlternateContact] -> ShowS
show :: DeleteAlternateContact -> String
$cshow :: DeleteAlternateContact -> String
showsPrec :: Int -> DeleteAlternateContact -> ShowS
$cshowsPrec :: Int -> DeleteAlternateContact -> ShowS
Prelude.Show, forall x. Rep DeleteAlternateContact x -> DeleteAlternateContact
forall x. DeleteAlternateContact -> Rep DeleteAlternateContact x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteAlternateContact x -> DeleteAlternateContact
$cfrom :: forall x. DeleteAlternateContact -> Rep DeleteAlternateContact x
Prelude.Generic)
newDeleteAlternateContact ::
AlternateContactType ->
DeleteAlternateContact
newDeleteAlternateContact :: AlternateContactType -> DeleteAlternateContact
newDeleteAlternateContact AlternateContactType
pAlternateContactType_ =
DeleteAlternateContact'
{ $sel:accountId:DeleteAlternateContact' :: Maybe Text
accountId =
forall a. Maybe a
Prelude.Nothing,
$sel:alternateContactType:DeleteAlternateContact' :: AlternateContactType
alternateContactType = AlternateContactType
pAlternateContactType_
}
deleteAlternateContact_accountId :: Lens.Lens' DeleteAlternateContact (Prelude.Maybe Prelude.Text)
deleteAlternateContact_accountId :: Lens' DeleteAlternateContact (Maybe Text)
deleteAlternateContact_accountId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteAlternateContact' {Maybe Text
accountId :: Maybe Text
$sel:accountId:DeleteAlternateContact' :: DeleteAlternateContact -> Maybe Text
accountId} -> Maybe Text
accountId) (\s :: DeleteAlternateContact
s@DeleteAlternateContact' {} Maybe Text
a -> DeleteAlternateContact
s {$sel:accountId:DeleteAlternateContact' :: Maybe Text
accountId = Maybe Text
a} :: DeleteAlternateContact)
deleteAlternateContact_alternateContactType :: Lens.Lens' DeleteAlternateContact AlternateContactType
deleteAlternateContact_alternateContactType :: Lens' DeleteAlternateContact AlternateContactType
deleteAlternateContact_alternateContactType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteAlternateContact' {AlternateContactType
alternateContactType :: AlternateContactType
$sel:alternateContactType:DeleteAlternateContact' :: DeleteAlternateContact -> AlternateContactType
alternateContactType} -> AlternateContactType
alternateContactType) (\s :: DeleteAlternateContact
s@DeleteAlternateContact' {} AlternateContactType
a -> DeleteAlternateContact
s {$sel:alternateContactType:DeleteAlternateContact' :: AlternateContactType
alternateContactType = AlternateContactType
a} :: DeleteAlternateContact)
instance Core.AWSRequest DeleteAlternateContact where
type
AWSResponse DeleteAlternateContact =
DeleteAlternateContactResponse
request :: (Service -> Service)
-> DeleteAlternateContact -> Request DeleteAlternateContact
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DeleteAlternateContact
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteAlternateContact)))
response =
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
DeleteAlternateContactResponse
DeleteAlternateContactResponse'
instance Prelude.Hashable DeleteAlternateContact where
hashWithSalt :: Int -> DeleteAlternateContact -> Int
hashWithSalt Int
_salt DeleteAlternateContact' {Maybe Text
AlternateContactType
alternateContactType :: AlternateContactType
accountId :: Maybe Text
$sel:alternateContactType:DeleteAlternateContact' :: DeleteAlternateContact -> AlternateContactType
$sel:accountId:DeleteAlternateContact' :: DeleteAlternateContact -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
accountId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` AlternateContactType
alternateContactType
instance Prelude.NFData DeleteAlternateContact where
rnf :: DeleteAlternateContact -> ()
rnf DeleteAlternateContact' {Maybe Text
AlternateContactType
alternateContactType :: AlternateContactType
accountId :: Maybe Text
$sel:alternateContactType:DeleteAlternateContact' :: DeleteAlternateContact -> AlternateContactType
$sel:accountId:DeleteAlternateContact' :: DeleteAlternateContact -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
accountId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf AlternateContactType
alternateContactType
instance Data.ToHeaders DeleteAlternateContact where
toHeaders :: DeleteAlternateContact -> [Header]
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> [Header]
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON DeleteAlternateContact where
toJSON :: DeleteAlternateContact -> Value
toJSON DeleteAlternateContact' {Maybe Text
AlternateContactType
alternateContactType :: AlternateContactType
accountId :: Maybe Text
$sel:alternateContactType:DeleteAlternateContact' :: DeleteAlternateContact -> AlternateContactType
$sel:accountId:DeleteAlternateContact' :: DeleteAlternateContact -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"AccountId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
accountId,
forall a. a -> Maybe a
Prelude.Just
( Key
"AlternateContactType"
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= AlternateContactType
alternateContactType
)
]
)
instance Data.ToPath DeleteAlternateContact where
toPath :: DeleteAlternateContact -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/deleteAlternateContact"
instance Data.ToQuery DeleteAlternateContact where
toQuery :: DeleteAlternateContact -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DeleteAlternateContactResponse = DeleteAlternateContactResponse'
{
}
deriving (DeleteAlternateContactResponse
-> DeleteAlternateContactResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteAlternateContactResponse
-> DeleteAlternateContactResponse -> Bool
$c/= :: DeleteAlternateContactResponse
-> DeleteAlternateContactResponse -> Bool
== :: DeleteAlternateContactResponse
-> DeleteAlternateContactResponse -> Bool
$c== :: DeleteAlternateContactResponse
-> DeleteAlternateContactResponse -> Bool
Prelude.Eq, ReadPrec [DeleteAlternateContactResponse]
ReadPrec DeleteAlternateContactResponse
Int -> ReadS DeleteAlternateContactResponse
ReadS [DeleteAlternateContactResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteAlternateContactResponse]
$creadListPrec :: ReadPrec [DeleteAlternateContactResponse]
readPrec :: ReadPrec DeleteAlternateContactResponse
$creadPrec :: ReadPrec DeleteAlternateContactResponse
readList :: ReadS [DeleteAlternateContactResponse]
$creadList :: ReadS [DeleteAlternateContactResponse]
readsPrec :: Int -> ReadS DeleteAlternateContactResponse
$creadsPrec :: Int -> ReadS DeleteAlternateContactResponse
Prelude.Read, Int -> DeleteAlternateContactResponse -> ShowS
[DeleteAlternateContactResponse] -> ShowS
DeleteAlternateContactResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteAlternateContactResponse] -> ShowS
$cshowList :: [DeleteAlternateContactResponse] -> ShowS
show :: DeleteAlternateContactResponse -> String
$cshow :: DeleteAlternateContactResponse -> String
showsPrec :: Int -> DeleteAlternateContactResponse -> ShowS
$cshowsPrec :: Int -> DeleteAlternateContactResponse -> ShowS
Prelude.Show, forall x.
Rep DeleteAlternateContactResponse x
-> DeleteAlternateContactResponse
forall x.
DeleteAlternateContactResponse
-> Rep DeleteAlternateContactResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteAlternateContactResponse x
-> DeleteAlternateContactResponse
$cfrom :: forall x.
DeleteAlternateContactResponse
-> Rep DeleteAlternateContactResponse x
Prelude.Generic)
newDeleteAlternateContactResponse ::
DeleteAlternateContactResponse
newDeleteAlternateContactResponse :: DeleteAlternateContactResponse
newDeleteAlternateContactResponse =
DeleteAlternateContactResponse
DeleteAlternateContactResponse'
instance
Prelude.NFData
DeleteAlternateContactResponse
where
rnf :: DeleteAlternateContactResponse -> ()
rnf DeleteAlternateContactResponse
_ = ()