{-# 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.SNS.SetEndpointAttributes
(
SetEndpointAttributes (..),
newSetEndpointAttributes,
setEndpointAttributes_endpointArn,
setEndpointAttributes_attributes,
SetEndpointAttributesResponse (..),
newSetEndpointAttributesResponse,
)
where
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
import Amazonka.SNS.Types
data SetEndpointAttributes = SetEndpointAttributes'
{
SetEndpointAttributes -> Text
endpointArn :: Prelude.Text,
SetEndpointAttributes -> HashMap Text Text
attributes :: Prelude.HashMap Prelude.Text Prelude.Text
}
deriving (SetEndpointAttributes -> SetEndpointAttributes -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SetEndpointAttributes -> SetEndpointAttributes -> Bool
$c/= :: SetEndpointAttributes -> SetEndpointAttributes -> Bool
== :: SetEndpointAttributes -> SetEndpointAttributes -> Bool
$c== :: SetEndpointAttributes -> SetEndpointAttributes -> Bool
Prelude.Eq, ReadPrec [SetEndpointAttributes]
ReadPrec SetEndpointAttributes
Int -> ReadS SetEndpointAttributes
ReadS [SetEndpointAttributes]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SetEndpointAttributes]
$creadListPrec :: ReadPrec [SetEndpointAttributes]
readPrec :: ReadPrec SetEndpointAttributes
$creadPrec :: ReadPrec SetEndpointAttributes
readList :: ReadS [SetEndpointAttributes]
$creadList :: ReadS [SetEndpointAttributes]
readsPrec :: Int -> ReadS SetEndpointAttributes
$creadsPrec :: Int -> ReadS SetEndpointAttributes
Prelude.Read, Int -> SetEndpointAttributes -> ShowS
[SetEndpointAttributes] -> ShowS
SetEndpointAttributes -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SetEndpointAttributes] -> ShowS
$cshowList :: [SetEndpointAttributes] -> ShowS
show :: SetEndpointAttributes -> String
$cshow :: SetEndpointAttributes -> String
showsPrec :: Int -> SetEndpointAttributes -> ShowS
$cshowsPrec :: Int -> SetEndpointAttributes -> ShowS
Prelude.Show, forall x. Rep SetEndpointAttributes x -> SetEndpointAttributes
forall x. SetEndpointAttributes -> Rep SetEndpointAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SetEndpointAttributes x -> SetEndpointAttributes
$cfrom :: forall x. SetEndpointAttributes -> Rep SetEndpointAttributes x
Prelude.Generic)
newSetEndpointAttributes ::
Prelude.Text ->
SetEndpointAttributes
newSetEndpointAttributes :: Text -> SetEndpointAttributes
newSetEndpointAttributes Text
pEndpointArn_ =
SetEndpointAttributes'
{ $sel:endpointArn:SetEndpointAttributes' :: Text
endpointArn = Text
pEndpointArn_,
$sel:attributes:SetEndpointAttributes' :: HashMap Text Text
attributes = forall a. Monoid a => a
Prelude.mempty
}
setEndpointAttributes_endpointArn :: Lens.Lens' SetEndpointAttributes Prelude.Text
setEndpointAttributes_endpointArn :: Lens' SetEndpointAttributes Text
setEndpointAttributes_endpointArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetEndpointAttributes' {Text
endpointArn :: Text
$sel:endpointArn:SetEndpointAttributes' :: SetEndpointAttributes -> Text
endpointArn} -> Text
endpointArn) (\s :: SetEndpointAttributes
s@SetEndpointAttributes' {} Text
a -> SetEndpointAttributes
s {$sel:endpointArn:SetEndpointAttributes' :: Text
endpointArn = Text
a} :: SetEndpointAttributes)
setEndpointAttributes_attributes :: Lens.Lens' SetEndpointAttributes (Prelude.HashMap Prelude.Text Prelude.Text)
setEndpointAttributes_attributes :: Lens' SetEndpointAttributes (HashMap Text Text)
setEndpointAttributes_attributes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SetEndpointAttributes' {HashMap Text Text
attributes :: HashMap Text Text
$sel:attributes:SetEndpointAttributes' :: SetEndpointAttributes -> HashMap Text Text
attributes} -> HashMap Text Text
attributes) (\s :: SetEndpointAttributes
s@SetEndpointAttributes' {} HashMap Text Text
a -> SetEndpointAttributes
s {$sel:attributes:SetEndpointAttributes' :: HashMap Text Text
attributes = HashMap Text Text
a} :: SetEndpointAttributes) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.AWSRequest SetEndpointAttributes where
type
AWSResponse SetEndpointAttributes =
SetEndpointAttributesResponse
request :: (Service -> Service)
-> SetEndpointAttributes -> Request SetEndpointAttributes
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy SetEndpointAttributes
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse SetEndpointAttributes)))
response =
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull SetEndpointAttributesResponse
SetEndpointAttributesResponse'
instance Prelude.Hashable SetEndpointAttributes where
hashWithSalt :: Int -> SetEndpointAttributes -> Int
hashWithSalt Int
_salt SetEndpointAttributes' {Text
HashMap Text Text
attributes :: HashMap Text Text
endpointArn :: Text
$sel:attributes:SetEndpointAttributes' :: SetEndpointAttributes -> HashMap Text Text
$sel:endpointArn:SetEndpointAttributes' :: SetEndpointAttributes -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
endpointArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` HashMap Text Text
attributes
instance Prelude.NFData SetEndpointAttributes where
rnf :: SetEndpointAttributes -> ()
rnf SetEndpointAttributes' {Text
HashMap Text Text
attributes :: HashMap Text Text
endpointArn :: Text
$sel:attributes:SetEndpointAttributes' :: SetEndpointAttributes -> HashMap Text Text
$sel:endpointArn:SetEndpointAttributes' :: SetEndpointAttributes -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
endpointArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf HashMap Text Text
attributes
instance Data.ToHeaders SetEndpointAttributes where
toHeaders :: SetEndpointAttributes -> [Header]
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath SetEndpointAttributes where
toPath :: SetEndpointAttributes -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery SetEndpointAttributes where
toQuery :: SetEndpointAttributes -> QueryString
toQuery SetEndpointAttributes' {Text
HashMap Text Text
attributes :: HashMap Text Text
endpointArn :: Text
$sel:attributes:SetEndpointAttributes' :: SetEndpointAttributes -> HashMap Text Text
$sel:endpointArn:SetEndpointAttributes' :: SetEndpointAttributes -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"SetEndpointAttributes" :: Prelude.ByteString),
ByteString
"Version"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-03-31" :: Prelude.ByteString),
ByteString
"EndpointArn" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
endpointArn,
ByteString
"Attributes"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall k v.
(ToQuery k, ToQuery v) =>
ByteString
-> ByteString -> ByteString -> HashMap k v -> QueryString
Data.toQueryMap ByteString
"entry" ByteString
"key" ByteString
"value" HashMap Text Text
attributes
]
data SetEndpointAttributesResponse = SetEndpointAttributesResponse'
{
}
deriving (SetEndpointAttributesResponse
-> SetEndpointAttributesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SetEndpointAttributesResponse
-> SetEndpointAttributesResponse -> Bool
$c/= :: SetEndpointAttributesResponse
-> SetEndpointAttributesResponse -> Bool
== :: SetEndpointAttributesResponse
-> SetEndpointAttributesResponse -> Bool
$c== :: SetEndpointAttributesResponse
-> SetEndpointAttributesResponse -> Bool
Prelude.Eq, ReadPrec [SetEndpointAttributesResponse]
ReadPrec SetEndpointAttributesResponse
Int -> ReadS SetEndpointAttributesResponse
ReadS [SetEndpointAttributesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SetEndpointAttributesResponse]
$creadListPrec :: ReadPrec [SetEndpointAttributesResponse]
readPrec :: ReadPrec SetEndpointAttributesResponse
$creadPrec :: ReadPrec SetEndpointAttributesResponse
readList :: ReadS [SetEndpointAttributesResponse]
$creadList :: ReadS [SetEndpointAttributesResponse]
readsPrec :: Int -> ReadS SetEndpointAttributesResponse
$creadsPrec :: Int -> ReadS SetEndpointAttributesResponse
Prelude.Read, Int -> SetEndpointAttributesResponse -> ShowS
[SetEndpointAttributesResponse] -> ShowS
SetEndpointAttributesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SetEndpointAttributesResponse] -> ShowS
$cshowList :: [SetEndpointAttributesResponse] -> ShowS
show :: SetEndpointAttributesResponse -> String
$cshow :: SetEndpointAttributesResponse -> String
showsPrec :: Int -> SetEndpointAttributesResponse -> ShowS
$cshowsPrec :: Int -> SetEndpointAttributesResponse -> ShowS
Prelude.Show, forall x.
Rep SetEndpointAttributesResponse x
-> SetEndpointAttributesResponse
forall x.
SetEndpointAttributesResponse
-> Rep SetEndpointAttributesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SetEndpointAttributesResponse x
-> SetEndpointAttributesResponse
$cfrom :: forall x.
SetEndpointAttributesResponse
-> Rep SetEndpointAttributesResponse x
Prelude.Generic)
newSetEndpointAttributesResponse ::
SetEndpointAttributesResponse
newSetEndpointAttributesResponse :: SetEndpointAttributesResponse
newSetEndpointAttributesResponse =
SetEndpointAttributesResponse
SetEndpointAttributesResponse'
instance Prelude.NFData SetEndpointAttributesResponse where
rnf :: SetEndpointAttributesResponse -> ()
rnf SetEndpointAttributesResponse
_ = ()