{-# 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.Redshift.RejectDataShare
(
RejectDataShare (..),
newRejectDataShare,
rejectDataShare_dataShareArn,
DataShare (..),
newDataShare,
dataShare_producerArn,
dataShare_dataShareAssociations,
dataShare_dataShareArn,
dataShare_allowPubliclyAccessibleConsumers,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.Redshift.Types
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data RejectDataShare = RejectDataShare'
{
RejectDataShare -> Text
dataShareArn :: Prelude.Text
}
deriving (RejectDataShare -> RejectDataShare -> Bool
(RejectDataShare -> RejectDataShare -> Bool)
-> (RejectDataShare -> RejectDataShare -> Bool)
-> Eq RejectDataShare
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RejectDataShare -> RejectDataShare -> Bool
$c/= :: RejectDataShare -> RejectDataShare -> Bool
== :: RejectDataShare -> RejectDataShare -> Bool
$c== :: RejectDataShare -> RejectDataShare -> Bool
Prelude.Eq, ReadPrec [RejectDataShare]
ReadPrec RejectDataShare
Int -> ReadS RejectDataShare
ReadS [RejectDataShare]
(Int -> ReadS RejectDataShare)
-> ReadS [RejectDataShare]
-> ReadPrec RejectDataShare
-> ReadPrec [RejectDataShare]
-> Read RejectDataShare
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RejectDataShare]
$creadListPrec :: ReadPrec [RejectDataShare]
readPrec :: ReadPrec RejectDataShare
$creadPrec :: ReadPrec RejectDataShare
readList :: ReadS [RejectDataShare]
$creadList :: ReadS [RejectDataShare]
readsPrec :: Int -> ReadS RejectDataShare
$creadsPrec :: Int -> ReadS RejectDataShare
Prelude.Read, Int -> RejectDataShare -> ShowS
[RejectDataShare] -> ShowS
RejectDataShare -> String
(Int -> RejectDataShare -> ShowS)
-> (RejectDataShare -> String)
-> ([RejectDataShare] -> ShowS)
-> Show RejectDataShare
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RejectDataShare] -> ShowS
$cshowList :: [RejectDataShare] -> ShowS
show :: RejectDataShare -> String
$cshow :: RejectDataShare -> String
showsPrec :: Int -> RejectDataShare -> ShowS
$cshowsPrec :: Int -> RejectDataShare -> ShowS
Prelude.Show, (forall x. RejectDataShare -> Rep RejectDataShare x)
-> (forall x. Rep RejectDataShare x -> RejectDataShare)
-> Generic RejectDataShare
forall x. Rep RejectDataShare x -> RejectDataShare
forall x. RejectDataShare -> Rep RejectDataShare x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RejectDataShare x -> RejectDataShare
$cfrom :: forall x. RejectDataShare -> Rep RejectDataShare x
Prelude.Generic)
newRejectDataShare ::
Prelude.Text ->
RejectDataShare
newRejectDataShare :: Text -> RejectDataShare
newRejectDataShare Text
pDataShareArn_ =
RejectDataShare' :: Text -> RejectDataShare
RejectDataShare' {$sel:dataShareArn:RejectDataShare' :: Text
dataShareArn = Text
pDataShareArn_}
rejectDataShare_dataShareArn :: Lens.Lens' RejectDataShare Prelude.Text
rejectDataShare_dataShareArn :: (Text -> f Text) -> RejectDataShare -> f RejectDataShare
rejectDataShare_dataShareArn = (RejectDataShare -> Text)
-> (RejectDataShare -> Text -> RejectDataShare)
-> Lens RejectDataShare RejectDataShare Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RejectDataShare' {Text
dataShareArn :: Text
$sel:dataShareArn:RejectDataShare' :: RejectDataShare -> Text
dataShareArn} -> Text
dataShareArn) (\s :: RejectDataShare
s@RejectDataShare' {} Text
a -> RejectDataShare
s {$sel:dataShareArn:RejectDataShare' :: Text
dataShareArn = Text
a} :: RejectDataShare)
instance Core.AWSRequest RejectDataShare where
type AWSResponse RejectDataShare = DataShare
request :: RejectDataShare -> Request RejectDataShare
request = Service -> RejectDataShare -> Request RejectDataShare
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy RejectDataShare
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse RejectDataShare)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse RejectDataShare))
-> Logger
-> Service
-> Proxy RejectDataShare
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse RejectDataShare)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
-> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
Text
"RejectDataShareResult"
(\Int
s ResponseHeaders
h [Node]
x -> [Node] -> Either String DataShare
forall a. FromXML a => [Node] -> Either String a
Core.parseXML [Node]
x)
instance Prelude.Hashable RejectDataShare
instance Prelude.NFData RejectDataShare
instance Core.ToHeaders RejectDataShare where
toHeaders :: RejectDataShare -> ResponseHeaders
toHeaders = ResponseHeaders -> RejectDataShare -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath RejectDataShare where
toPath :: RejectDataShare -> ByteString
toPath = ByteString -> RejectDataShare -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery RejectDataShare where
toQuery :: RejectDataShare -> QueryString
toQuery RejectDataShare' {Text
dataShareArn :: Text
$sel:dataShareArn:RejectDataShare' :: RejectDataShare -> 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
"RejectDataShare" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2012-12-01" :: Prelude.ByteString),
ByteString
"DataShareArn" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
dataShareArn
]