{-# 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.Lens as Lens
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
(SetEndpointAttributes -> SetEndpointAttributes -> Bool)
-> (SetEndpointAttributes -> SetEndpointAttributes -> Bool)
-> Eq SetEndpointAttributes
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]
(Int -> ReadS SetEndpointAttributes)
-> ReadS [SetEndpointAttributes]
-> ReadPrec SetEndpointAttributes
-> ReadPrec [SetEndpointAttributes]
-> Read 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
(Int -> SetEndpointAttributes -> ShowS)
-> (SetEndpointAttributes -> String)
-> ([SetEndpointAttributes] -> ShowS)
-> Show SetEndpointAttributes
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. SetEndpointAttributes -> Rep SetEndpointAttributes x)
-> (forall x. Rep SetEndpointAttributes x -> SetEndpointAttributes)
-> Generic SetEndpointAttributes
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' :: Text -> HashMap Text Text -> SetEndpointAttributes
SetEndpointAttributes'
{ $sel:endpointArn:SetEndpointAttributes' :: Text
endpointArn = Text
pEndpointArn_,
$sel:attributes:SetEndpointAttributes' :: HashMap Text Text
attributes = HashMap Text Text
forall a. Monoid a => a
Prelude.mempty
}
setEndpointAttributes_endpointArn :: Lens.Lens' SetEndpointAttributes Prelude.Text
setEndpointAttributes_endpointArn :: (Text -> f Text)
-> SetEndpointAttributes -> f SetEndpointAttributes
setEndpointAttributes_endpointArn = (SetEndpointAttributes -> Text)
-> (SetEndpointAttributes -> Text -> SetEndpointAttributes)
-> Lens SetEndpointAttributes SetEndpointAttributes Text Text
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 :: (HashMap Text Text -> f (HashMap Text Text))
-> SetEndpointAttributes -> f SetEndpointAttributes
setEndpointAttributes_attributes = (SetEndpointAttributes -> HashMap Text Text)
-> (SetEndpointAttributes
-> HashMap Text Text -> SetEndpointAttributes)
-> Lens
SetEndpointAttributes
SetEndpointAttributes
(HashMap Text Text)
(HashMap Text Text)
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) ((HashMap Text Text -> f (HashMap Text Text))
-> SetEndpointAttributes -> f SetEndpointAttributes)
-> ((HashMap Text Text -> f (HashMap Text Text))
-> HashMap Text Text -> f (HashMap Text Text))
-> (HashMap Text Text -> f (HashMap Text Text))
-> SetEndpointAttributes
-> f SetEndpointAttributes
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (HashMap Text Text -> f (HashMap Text Text))
-> HashMap Text Text -> f (HashMap Text Text)
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 :: SetEndpointAttributes -> Request SetEndpointAttributes
request = Service -> SetEndpointAttributes -> Request SetEndpointAttributes
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy SetEndpointAttributes
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse SetEndpointAttributes)))
response =
AWSResponse SetEndpointAttributes
-> Logger
-> Service
-> Proxy SetEndpointAttributes
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse SetEndpointAttributes)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse SetEndpointAttributes
SetEndpointAttributesResponse
SetEndpointAttributesResponse'
instance Prelude.Hashable SetEndpointAttributes
instance Prelude.NFData SetEndpointAttributes
instance Core.ToHeaders SetEndpointAttributes where
toHeaders :: SetEndpointAttributes -> [Header]
toHeaders = [Header] -> SetEndpointAttributes -> [Header]
forall a b. a -> b -> a
Prelude.const [Header]
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath SetEndpointAttributes where
toPath :: SetEndpointAttributes -> ByteString
toPath = ByteString -> SetEndpointAttributes -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.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
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"SetEndpointAttributes" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-03-31" :: Prelude.ByteString),
ByteString
"EndpointArn" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
endpointArn,
ByteString
"Attributes"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ByteString
-> ByteString -> ByteString -> HashMap Text Text -> QueryString
forall k v.
(ToQuery k, ToQuery v) =>
ByteString
-> ByteString -> ByteString -> HashMap k v -> QueryString
Core.toQueryMap ByteString
"entry" ByteString
"key" ByteString
"value" HashMap Text Text
attributes
]
data SetEndpointAttributesResponse = SetEndpointAttributesResponse'
{
}
deriving (SetEndpointAttributesResponse
-> SetEndpointAttributesResponse -> Bool
(SetEndpointAttributesResponse
-> SetEndpointAttributesResponse -> Bool)
-> (SetEndpointAttributesResponse
-> SetEndpointAttributesResponse -> Bool)
-> Eq SetEndpointAttributesResponse
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]
(Int -> ReadS SetEndpointAttributesResponse)
-> ReadS [SetEndpointAttributesResponse]
-> ReadPrec SetEndpointAttributesResponse
-> ReadPrec [SetEndpointAttributesResponse]
-> Read 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
(Int -> SetEndpointAttributesResponse -> ShowS)
-> (SetEndpointAttributesResponse -> String)
-> ([SetEndpointAttributesResponse] -> ShowS)
-> Show SetEndpointAttributesResponse
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.
SetEndpointAttributesResponse
-> Rep SetEndpointAttributesResponse x)
-> (forall x.
Rep SetEndpointAttributesResponse x
-> SetEndpointAttributesResponse)
-> Generic SetEndpointAttributesResponse
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