{-# 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.Firehose.UpdateDestination
(
UpdateDestination (..),
newUpdateDestination,
updateDestination_amazonopensearchserviceDestinationUpdate,
updateDestination_splunkDestinationUpdate,
updateDestination_s3DestinationUpdate,
updateDestination_redshiftDestinationUpdate,
updateDestination_elasticsearchDestinationUpdate,
updateDestination_extendedS3DestinationUpdate,
updateDestination_httpEndpointDestinationUpdate,
updateDestination_deliveryStreamName,
updateDestination_currentDeliveryStreamVersionId,
updateDestination_destinationId,
UpdateDestinationResponse (..),
newUpdateDestinationResponse,
updateDestinationResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.Firehose.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data UpdateDestination = UpdateDestination'
{ UpdateDestination -> Maybe AmazonopensearchserviceDestinationUpdate
amazonopensearchserviceDestinationUpdate :: Prelude.Maybe AmazonopensearchserviceDestinationUpdate,
UpdateDestination -> Maybe SplunkDestinationUpdate
splunkDestinationUpdate :: Prelude.Maybe SplunkDestinationUpdate,
UpdateDestination -> Maybe S3DestinationUpdate
s3DestinationUpdate :: Prelude.Maybe S3DestinationUpdate,
UpdateDestination -> Maybe RedshiftDestinationUpdate
redshiftDestinationUpdate :: Prelude.Maybe RedshiftDestinationUpdate,
UpdateDestination -> Maybe ElasticsearchDestinationUpdate
elasticsearchDestinationUpdate :: Prelude.Maybe ElasticsearchDestinationUpdate,
UpdateDestination -> Maybe ExtendedS3DestinationUpdate
extendedS3DestinationUpdate :: Prelude.Maybe ExtendedS3DestinationUpdate,
UpdateDestination -> Maybe HttpEndpointDestinationUpdate
httpEndpointDestinationUpdate :: Prelude.Maybe HttpEndpointDestinationUpdate,
UpdateDestination -> Text
deliveryStreamName :: Prelude.Text,
UpdateDestination -> Text
currentDeliveryStreamVersionId :: Prelude.Text,
UpdateDestination -> Text
destinationId :: Prelude.Text
}
deriving (UpdateDestination -> UpdateDestination -> Bool
(UpdateDestination -> UpdateDestination -> Bool)
-> (UpdateDestination -> UpdateDestination -> Bool)
-> Eq UpdateDestination
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateDestination -> UpdateDestination -> Bool
$c/= :: UpdateDestination -> UpdateDestination -> Bool
== :: UpdateDestination -> UpdateDestination -> Bool
$c== :: UpdateDestination -> UpdateDestination -> Bool
Prelude.Eq, Int -> UpdateDestination -> ShowS
[UpdateDestination] -> ShowS
UpdateDestination -> String
(Int -> UpdateDestination -> ShowS)
-> (UpdateDestination -> String)
-> ([UpdateDestination] -> ShowS)
-> Show UpdateDestination
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateDestination] -> ShowS
$cshowList :: [UpdateDestination] -> ShowS
show :: UpdateDestination -> String
$cshow :: UpdateDestination -> String
showsPrec :: Int -> UpdateDestination -> ShowS
$cshowsPrec :: Int -> UpdateDestination -> ShowS
Prelude.Show, (forall x. UpdateDestination -> Rep UpdateDestination x)
-> (forall x. Rep UpdateDestination x -> UpdateDestination)
-> Generic UpdateDestination
forall x. Rep UpdateDestination x -> UpdateDestination
forall x. UpdateDestination -> Rep UpdateDestination x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateDestination x -> UpdateDestination
$cfrom :: forall x. UpdateDestination -> Rep UpdateDestination x
Prelude.Generic)
newUpdateDestination ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
UpdateDestination
newUpdateDestination :: Text -> Text -> Text -> UpdateDestination
newUpdateDestination
Text
pDeliveryStreamName_
Text
pCurrentDeliveryStreamVersionId_
Text
pDestinationId_ =
UpdateDestination' :: Maybe AmazonopensearchserviceDestinationUpdate
-> Maybe SplunkDestinationUpdate
-> Maybe S3DestinationUpdate
-> Maybe RedshiftDestinationUpdate
-> Maybe ElasticsearchDestinationUpdate
-> Maybe ExtendedS3DestinationUpdate
-> Maybe HttpEndpointDestinationUpdate
-> Text
-> Text
-> Text
-> UpdateDestination
UpdateDestination'
{ $sel:amazonopensearchserviceDestinationUpdate:UpdateDestination' :: Maybe AmazonopensearchserviceDestinationUpdate
amazonopensearchserviceDestinationUpdate =
Maybe AmazonopensearchserviceDestinationUpdate
forall a. Maybe a
Prelude.Nothing,
$sel:splunkDestinationUpdate:UpdateDestination' :: Maybe SplunkDestinationUpdate
splunkDestinationUpdate = Maybe SplunkDestinationUpdate
forall a. Maybe a
Prelude.Nothing,
$sel:s3DestinationUpdate:UpdateDestination' :: Maybe S3DestinationUpdate
s3DestinationUpdate = Maybe S3DestinationUpdate
forall a. Maybe a
Prelude.Nothing,
$sel:redshiftDestinationUpdate:UpdateDestination' :: Maybe RedshiftDestinationUpdate
redshiftDestinationUpdate = Maybe RedshiftDestinationUpdate
forall a. Maybe a
Prelude.Nothing,
$sel:elasticsearchDestinationUpdate:UpdateDestination' :: Maybe ElasticsearchDestinationUpdate
elasticsearchDestinationUpdate = Maybe ElasticsearchDestinationUpdate
forall a. Maybe a
Prelude.Nothing,
$sel:extendedS3DestinationUpdate:UpdateDestination' :: Maybe ExtendedS3DestinationUpdate
extendedS3DestinationUpdate = Maybe ExtendedS3DestinationUpdate
forall a. Maybe a
Prelude.Nothing,
$sel:httpEndpointDestinationUpdate:UpdateDestination' :: Maybe HttpEndpointDestinationUpdate
httpEndpointDestinationUpdate = Maybe HttpEndpointDestinationUpdate
forall a. Maybe a
Prelude.Nothing,
$sel:deliveryStreamName:UpdateDestination' :: Text
deliveryStreamName = Text
pDeliveryStreamName_,
$sel:currentDeliveryStreamVersionId:UpdateDestination' :: Text
currentDeliveryStreamVersionId =
Text
pCurrentDeliveryStreamVersionId_,
$sel:destinationId:UpdateDestination' :: Text
destinationId = Text
pDestinationId_
}
updateDestination_amazonopensearchserviceDestinationUpdate :: Lens.Lens' UpdateDestination (Prelude.Maybe AmazonopensearchserviceDestinationUpdate)
updateDestination_amazonopensearchserviceDestinationUpdate :: (Maybe AmazonopensearchserviceDestinationUpdate
-> f (Maybe AmazonopensearchserviceDestinationUpdate))
-> UpdateDestination -> f UpdateDestination
updateDestination_amazonopensearchserviceDestinationUpdate = (UpdateDestination
-> Maybe AmazonopensearchserviceDestinationUpdate)
-> (UpdateDestination
-> Maybe AmazonopensearchserviceDestinationUpdate
-> UpdateDestination)
-> Lens
UpdateDestination
UpdateDestination
(Maybe AmazonopensearchserviceDestinationUpdate)
(Maybe AmazonopensearchserviceDestinationUpdate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDestination' {Maybe AmazonopensearchserviceDestinationUpdate
amazonopensearchserviceDestinationUpdate :: Maybe AmazonopensearchserviceDestinationUpdate
$sel:amazonopensearchserviceDestinationUpdate:UpdateDestination' :: UpdateDestination -> Maybe AmazonopensearchserviceDestinationUpdate
amazonopensearchserviceDestinationUpdate} -> Maybe AmazonopensearchserviceDestinationUpdate
amazonopensearchserviceDestinationUpdate) (\s :: UpdateDestination
s@UpdateDestination' {} Maybe AmazonopensearchserviceDestinationUpdate
a -> UpdateDestination
s {$sel:amazonopensearchserviceDestinationUpdate:UpdateDestination' :: Maybe AmazonopensearchserviceDestinationUpdate
amazonopensearchserviceDestinationUpdate = Maybe AmazonopensearchserviceDestinationUpdate
a} :: UpdateDestination)
updateDestination_splunkDestinationUpdate :: Lens.Lens' UpdateDestination (Prelude.Maybe SplunkDestinationUpdate)
updateDestination_splunkDestinationUpdate :: (Maybe SplunkDestinationUpdate
-> f (Maybe SplunkDestinationUpdate))
-> UpdateDestination -> f UpdateDestination
updateDestination_splunkDestinationUpdate = (UpdateDestination -> Maybe SplunkDestinationUpdate)
-> (UpdateDestination
-> Maybe SplunkDestinationUpdate -> UpdateDestination)
-> Lens
UpdateDestination
UpdateDestination
(Maybe SplunkDestinationUpdate)
(Maybe SplunkDestinationUpdate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDestination' {Maybe SplunkDestinationUpdate
splunkDestinationUpdate :: Maybe SplunkDestinationUpdate
$sel:splunkDestinationUpdate:UpdateDestination' :: UpdateDestination -> Maybe SplunkDestinationUpdate
splunkDestinationUpdate} -> Maybe SplunkDestinationUpdate
splunkDestinationUpdate) (\s :: UpdateDestination
s@UpdateDestination' {} Maybe SplunkDestinationUpdate
a -> UpdateDestination
s {$sel:splunkDestinationUpdate:UpdateDestination' :: Maybe SplunkDestinationUpdate
splunkDestinationUpdate = Maybe SplunkDestinationUpdate
a} :: UpdateDestination)
updateDestination_s3DestinationUpdate :: Lens.Lens' UpdateDestination (Prelude.Maybe S3DestinationUpdate)
updateDestination_s3DestinationUpdate :: (Maybe S3DestinationUpdate -> f (Maybe S3DestinationUpdate))
-> UpdateDestination -> f UpdateDestination
updateDestination_s3DestinationUpdate = (UpdateDestination -> Maybe S3DestinationUpdate)
-> (UpdateDestination
-> Maybe S3DestinationUpdate -> UpdateDestination)
-> Lens
UpdateDestination
UpdateDestination
(Maybe S3DestinationUpdate)
(Maybe S3DestinationUpdate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDestination' {Maybe S3DestinationUpdate
s3DestinationUpdate :: Maybe S3DestinationUpdate
$sel:s3DestinationUpdate:UpdateDestination' :: UpdateDestination -> Maybe S3DestinationUpdate
s3DestinationUpdate} -> Maybe S3DestinationUpdate
s3DestinationUpdate) (\s :: UpdateDestination
s@UpdateDestination' {} Maybe S3DestinationUpdate
a -> UpdateDestination
s {$sel:s3DestinationUpdate:UpdateDestination' :: Maybe S3DestinationUpdate
s3DestinationUpdate = Maybe S3DestinationUpdate
a} :: UpdateDestination)
updateDestination_redshiftDestinationUpdate :: Lens.Lens' UpdateDestination (Prelude.Maybe RedshiftDestinationUpdate)
updateDestination_redshiftDestinationUpdate :: (Maybe RedshiftDestinationUpdate
-> f (Maybe RedshiftDestinationUpdate))
-> UpdateDestination -> f UpdateDestination
updateDestination_redshiftDestinationUpdate = (UpdateDestination -> Maybe RedshiftDestinationUpdate)
-> (UpdateDestination
-> Maybe RedshiftDestinationUpdate -> UpdateDestination)
-> Lens
UpdateDestination
UpdateDestination
(Maybe RedshiftDestinationUpdate)
(Maybe RedshiftDestinationUpdate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDestination' {Maybe RedshiftDestinationUpdate
redshiftDestinationUpdate :: Maybe RedshiftDestinationUpdate
$sel:redshiftDestinationUpdate:UpdateDestination' :: UpdateDestination -> Maybe RedshiftDestinationUpdate
redshiftDestinationUpdate} -> Maybe RedshiftDestinationUpdate
redshiftDestinationUpdate) (\s :: UpdateDestination
s@UpdateDestination' {} Maybe RedshiftDestinationUpdate
a -> UpdateDestination
s {$sel:redshiftDestinationUpdate:UpdateDestination' :: Maybe RedshiftDestinationUpdate
redshiftDestinationUpdate = Maybe RedshiftDestinationUpdate
a} :: UpdateDestination)
updateDestination_elasticsearchDestinationUpdate :: Lens.Lens' UpdateDestination (Prelude.Maybe ElasticsearchDestinationUpdate)
updateDestination_elasticsearchDestinationUpdate :: (Maybe ElasticsearchDestinationUpdate
-> f (Maybe ElasticsearchDestinationUpdate))
-> UpdateDestination -> f UpdateDestination
updateDestination_elasticsearchDestinationUpdate = (UpdateDestination -> Maybe ElasticsearchDestinationUpdate)
-> (UpdateDestination
-> Maybe ElasticsearchDestinationUpdate -> UpdateDestination)
-> Lens
UpdateDestination
UpdateDestination
(Maybe ElasticsearchDestinationUpdate)
(Maybe ElasticsearchDestinationUpdate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDestination' {Maybe ElasticsearchDestinationUpdate
elasticsearchDestinationUpdate :: Maybe ElasticsearchDestinationUpdate
$sel:elasticsearchDestinationUpdate:UpdateDestination' :: UpdateDestination -> Maybe ElasticsearchDestinationUpdate
elasticsearchDestinationUpdate} -> Maybe ElasticsearchDestinationUpdate
elasticsearchDestinationUpdate) (\s :: UpdateDestination
s@UpdateDestination' {} Maybe ElasticsearchDestinationUpdate
a -> UpdateDestination
s {$sel:elasticsearchDestinationUpdate:UpdateDestination' :: Maybe ElasticsearchDestinationUpdate
elasticsearchDestinationUpdate = Maybe ElasticsearchDestinationUpdate
a} :: UpdateDestination)
updateDestination_extendedS3DestinationUpdate :: Lens.Lens' UpdateDestination (Prelude.Maybe ExtendedS3DestinationUpdate)
updateDestination_extendedS3DestinationUpdate :: (Maybe ExtendedS3DestinationUpdate
-> f (Maybe ExtendedS3DestinationUpdate))
-> UpdateDestination -> f UpdateDestination
updateDestination_extendedS3DestinationUpdate = (UpdateDestination -> Maybe ExtendedS3DestinationUpdate)
-> (UpdateDestination
-> Maybe ExtendedS3DestinationUpdate -> UpdateDestination)
-> Lens
UpdateDestination
UpdateDestination
(Maybe ExtendedS3DestinationUpdate)
(Maybe ExtendedS3DestinationUpdate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDestination' {Maybe ExtendedS3DestinationUpdate
extendedS3DestinationUpdate :: Maybe ExtendedS3DestinationUpdate
$sel:extendedS3DestinationUpdate:UpdateDestination' :: UpdateDestination -> Maybe ExtendedS3DestinationUpdate
extendedS3DestinationUpdate} -> Maybe ExtendedS3DestinationUpdate
extendedS3DestinationUpdate) (\s :: UpdateDestination
s@UpdateDestination' {} Maybe ExtendedS3DestinationUpdate
a -> UpdateDestination
s {$sel:extendedS3DestinationUpdate:UpdateDestination' :: Maybe ExtendedS3DestinationUpdate
extendedS3DestinationUpdate = Maybe ExtendedS3DestinationUpdate
a} :: UpdateDestination)
updateDestination_httpEndpointDestinationUpdate :: Lens.Lens' UpdateDestination (Prelude.Maybe HttpEndpointDestinationUpdate)
updateDestination_httpEndpointDestinationUpdate :: (Maybe HttpEndpointDestinationUpdate
-> f (Maybe HttpEndpointDestinationUpdate))
-> UpdateDestination -> f UpdateDestination
updateDestination_httpEndpointDestinationUpdate = (UpdateDestination -> Maybe HttpEndpointDestinationUpdate)
-> (UpdateDestination
-> Maybe HttpEndpointDestinationUpdate -> UpdateDestination)
-> Lens
UpdateDestination
UpdateDestination
(Maybe HttpEndpointDestinationUpdate)
(Maybe HttpEndpointDestinationUpdate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDestination' {Maybe HttpEndpointDestinationUpdate
httpEndpointDestinationUpdate :: Maybe HttpEndpointDestinationUpdate
$sel:httpEndpointDestinationUpdate:UpdateDestination' :: UpdateDestination -> Maybe HttpEndpointDestinationUpdate
httpEndpointDestinationUpdate} -> Maybe HttpEndpointDestinationUpdate
httpEndpointDestinationUpdate) (\s :: UpdateDestination
s@UpdateDestination' {} Maybe HttpEndpointDestinationUpdate
a -> UpdateDestination
s {$sel:httpEndpointDestinationUpdate:UpdateDestination' :: Maybe HttpEndpointDestinationUpdate
httpEndpointDestinationUpdate = Maybe HttpEndpointDestinationUpdate
a} :: UpdateDestination)
updateDestination_deliveryStreamName :: Lens.Lens' UpdateDestination Prelude.Text
updateDestination_deliveryStreamName :: (Text -> f Text) -> UpdateDestination -> f UpdateDestination
updateDestination_deliveryStreamName = (UpdateDestination -> Text)
-> (UpdateDestination -> Text -> UpdateDestination)
-> Lens UpdateDestination UpdateDestination Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDestination' {Text
deliveryStreamName :: Text
$sel:deliveryStreamName:UpdateDestination' :: UpdateDestination -> Text
deliveryStreamName} -> Text
deliveryStreamName) (\s :: UpdateDestination
s@UpdateDestination' {} Text
a -> UpdateDestination
s {$sel:deliveryStreamName:UpdateDestination' :: Text
deliveryStreamName = Text
a} :: UpdateDestination)
updateDestination_currentDeliveryStreamVersionId :: Lens.Lens' UpdateDestination Prelude.Text
updateDestination_currentDeliveryStreamVersionId :: (Text -> f Text) -> UpdateDestination -> f UpdateDestination
updateDestination_currentDeliveryStreamVersionId = (UpdateDestination -> Text)
-> (UpdateDestination -> Text -> UpdateDestination)
-> Lens UpdateDestination UpdateDestination Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDestination' {Text
currentDeliveryStreamVersionId :: Text
$sel:currentDeliveryStreamVersionId:UpdateDestination' :: UpdateDestination -> Text
currentDeliveryStreamVersionId} -> Text
currentDeliveryStreamVersionId) (\s :: UpdateDestination
s@UpdateDestination' {} Text
a -> UpdateDestination
s {$sel:currentDeliveryStreamVersionId:UpdateDestination' :: Text
currentDeliveryStreamVersionId = Text
a} :: UpdateDestination)
updateDestination_destinationId :: Lens.Lens' UpdateDestination Prelude.Text
updateDestination_destinationId :: (Text -> f Text) -> UpdateDestination -> f UpdateDestination
updateDestination_destinationId = (UpdateDestination -> Text)
-> (UpdateDestination -> Text -> UpdateDestination)
-> Lens UpdateDestination UpdateDestination Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDestination' {Text
destinationId :: Text
$sel:destinationId:UpdateDestination' :: UpdateDestination -> Text
destinationId} -> Text
destinationId) (\s :: UpdateDestination
s@UpdateDestination' {} Text
a -> UpdateDestination
s {$sel:destinationId:UpdateDestination' :: Text
destinationId = Text
a} :: UpdateDestination)
instance Core.AWSRequest UpdateDestination where
type
AWSResponse UpdateDestination =
UpdateDestinationResponse
request :: UpdateDestination -> Request UpdateDestination
request = Service -> UpdateDestination -> Request UpdateDestination
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy UpdateDestination
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateDestination)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse UpdateDestination))
-> Logger
-> Service
-> Proxy UpdateDestination
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateDestination)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> UpdateDestinationResponse
UpdateDestinationResponse'
(Int -> UpdateDestinationResponse)
-> Either String Int -> Either String UpdateDestinationResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable UpdateDestination
instance Prelude.NFData UpdateDestination
instance Core.ToHeaders UpdateDestination where
toHeaders :: UpdateDestination -> ResponseHeaders
toHeaders =
ResponseHeaders -> UpdateDestination -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"Firehose_20150804.UpdateDestination" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON UpdateDestination where
toJSON :: UpdateDestination -> Value
toJSON UpdateDestination' {Maybe S3DestinationUpdate
Maybe RedshiftDestinationUpdate
Maybe HttpEndpointDestinationUpdate
Maybe ElasticsearchDestinationUpdate
Maybe AmazonopensearchserviceDestinationUpdate
Maybe ExtendedS3DestinationUpdate
Maybe SplunkDestinationUpdate
Text
destinationId :: Text
currentDeliveryStreamVersionId :: Text
deliveryStreamName :: Text
httpEndpointDestinationUpdate :: Maybe HttpEndpointDestinationUpdate
extendedS3DestinationUpdate :: Maybe ExtendedS3DestinationUpdate
elasticsearchDestinationUpdate :: Maybe ElasticsearchDestinationUpdate
redshiftDestinationUpdate :: Maybe RedshiftDestinationUpdate
s3DestinationUpdate :: Maybe S3DestinationUpdate
splunkDestinationUpdate :: Maybe SplunkDestinationUpdate
amazonopensearchserviceDestinationUpdate :: Maybe AmazonopensearchserviceDestinationUpdate
$sel:destinationId:UpdateDestination' :: UpdateDestination -> Text
$sel:currentDeliveryStreamVersionId:UpdateDestination' :: UpdateDestination -> Text
$sel:deliveryStreamName:UpdateDestination' :: UpdateDestination -> Text
$sel:httpEndpointDestinationUpdate:UpdateDestination' :: UpdateDestination -> Maybe HttpEndpointDestinationUpdate
$sel:extendedS3DestinationUpdate:UpdateDestination' :: UpdateDestination -> Maybe ExtendedS3DestinationUpdate
$sel:elasticsearchDestinationUpdate:UpdateDestination' :: UpdateDestination -> Maybe ElasticsearchDestinationUpdate
$sel:redshiftDestinationUpdate:UpdateDestination' :: UpdateDestination -> Maybe RedshiftDestinationUpdate
$sel:s3DestinationUpdate:UpdateDestination' :: UpdateDestination -> Maybe S3DestinationUpdate
$sel:splunkDestinationUpdate:UpdateDestination' :: UpdateDestination -> Maybe SplunkDestinationUpdate
$sel:amazonopensearchserviceDestinationUpdate:UpdateDestination' :: UpdateDestination -> Maybe AmazonopensearchserviceDestinationUpdate
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"AmazonopensearchserviceDestinationUpdate" Text -> AmazonopensearchserviceDestinationUpdate -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(AmazonopensearchserviceDestinationUpdate -> Pair)
-> Maybe AmazonopensearchserviceDestinationUpdate -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AmazonopensearchserviceDestinationUpdate
amazonopensearchserviceDestinationUpdate,
(Text
"SplunkDestinationUpdate" Text -> SplunkDestinationUpdate -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(SplunkDestinationUpdate -> Pair)
-> Maybe SplunkDestinationUpdate -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SplunkDestinationUpdate
splunkDestinationUpdate,
(Text
"S3DestinationUpdate" Text -> S3DestinationUpdate -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(S3DestinationUpdate -> Pair)
-> Maybe S3DestinationUpdate -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe S3DestinationUpdate
s3DestinationUpdate,
(Text
"RedshiftDestinationUpdate" Text -> RedshiftDestinationUpdate -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(RedshiftDestinationUpdate -> Pair)
-> Maybe RedshiftDestinationUpdate -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RedshiftDestinationUpdate
redshiftDestinationUpdate,
(Text
"ElasticsearchDestinationUpdate" Text -> ElasticsearchDestinationUpdate -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(ElasticsearchDestinationUpdate -> Pair)
-> Maybe ElasticsearchDestinationUpdate -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ElasticsearchDestinationUpdate
elasticsearchDestinationUpdate,
(Text
"ExtendedS3DestinationUpdate" Text -> ExtendedS3DestinationUpdate -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(ExtendedS3DestinationUpdate -> Pair)
-> Maybe ExtendedS3DestinationUpdate -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ExtendedS3DestinationUpdate
extendedS3DestinationUpdate,
(Text
"HttpEndpointDestinationUpdate" Text -> HttpEndpointDestinationUpdate -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(HttpEndpointDestinationUpdate -> Pair)
-> Maybe HttpEndpointDestinationUpdate -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HttpEndpointDestinationUpdate
httpEndpointDestinationUpdate,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"DeliveryStreamName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
deliveryStreamName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"CurrentDeliveryStreamVersionId"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
currentDeliveryStreamVersionId
),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"DestinationId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
destinationId)
]
)
instance Core.ToPath UpdateDestination where
toPath :: UpdateDestination -> ByteString
toPath = ByteString -> UpdateDestination -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery UpdateDestination where
toQuery :: UpdateDestination -> QueryString
toQuery = QueryString -> UpdateDestination -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data UpdateDestinationResponse = UpdateDestinationResponse'
{
UpdateDestinationResponse -> Int
httpStatus :: Prelude.Int
}
deriving (UpdateDestinationResponse -> UpdateDestinationResponse -> Bool
(UpdateDestinationResponse -> UpdateDestinationResponse -> Bool)
-> (UpdateDestinationResponse -> UpdateDestinationResponse -> Bool)
-> Eq UpdateDestinationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateDestinationResponse -> UpdateDestinationResponse -> Bool
$c/= :: UpdateDestinationResponse -> UpdateDestinationResponse -> Bool
== :: UpdateDestinationResponse -> UpdateDestinationResponse -> Bool
$c== :: UpdateDestinationResponse -> UpdateDestinationResponse -> Bool
Prelude.Eq, ReadPrec [UpdateDestinationResponse]
ReadPrec UpdateDestinationResponse
Int -> ReadS UpdateDestinationResponse
ReadS [UpdateDestinationResponse]
(Int -> ReadS UpdateDestinationResponse)
-> ReadS [UpdateDestinationResponse]
-> ReadPrec UpdateDestinationResponse
-> ReadPrec [UpdateDestinationResponse]
-> Read UpdateDestinationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateDestinationResponse]
$creadListPrec :: ReadPrec [UpdateDestinationResponse]
readPrec :: ReadPrec UpdateDestinationResponse
$creadPrec :: ReadPrec UpdateDestinationResponse
readList :: ReadS [UpdateDestinationResponse]
$creadList :: ReadS [UpdateDestinationResponse]
readsPrec :: Int -> ReadS UpdateDestinationResponse
$creadsPrec :: Int -> ReadS UpdateDestinationResponse
Prelude.Read, Int -> UpdateDestinationResponse -> ShowS
[UpdateDestinationResponse] -> ShowS
UpdateDestinationResponse -> String
(Int -> UpdateDestinationResponse -> ShowS)
-> (UpdateDestinationResponse -> String)
-> ([UpdateDestinationResponse] -> ShowS)
-> Show UpdateDestinationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateDestinationResponse] -> ShowS
$cshowList :: [UpdateDestinationResponse] -> ShowS
show :: UpdateDestinationResponse -> String
$cshow :: UpdateDestinationResponse -> String
showsPrec :: Int -> UpdateDestinationResponse -> ShowS
$cshowsPrec :: Int -> UpdateDestinationResponse -> ShowS
Prelude.Show, (forall x.
UpdateDestinationResponse -> Rep UpdateDestinationResponse x)
-> (forall x.
Rep UpdateDestinationResponse x -> UpdateDestinationResponse)
-> Generic UpdateDestinationResponse
forall x.
Rep UpdateDestinationResponse x -> UpdateDestinationResponse
forall x.
UpdateDestinationResponse -> Rep UpdateDestinationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateDestinationResponse x -> UpdateDestinationResponse
$cfrom :: forall x.
UpdateDestinationResponse -> Rep UpdateDestinationResponse x
Prelude.Generic)
newUpdateDestinationResponse ::
Prelude.Int ->
UpdateDestinationResponse
newUpdateDestinationResponse :: Int -> UpdateDestinationResponse
newUpdateDestinationResponse Int
pHttpStatus_ =
UpdateDestinationResponse' :: Int -> UpdateDestinationResponse
UpdateDestinationResponse'
{ $sel:httpStatus:UpdateDestinationResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
updateDestinationResponse_httpStatus :: Lens.Lens' UpdateDestinationResponse Prelude.Int
updateDestinationResponse_httpStatus :: (Int -> f Int)
-> UpdateDestinationResponse -> f UpdateDestinationResponse
updateDestinationResponse_httpStatus = (UpdateDestinationResponse -> Int)
-> (UpdateDestinationResponse -> Int -> UpdateDestinationResponse)
-> Lens UpdateDestinationResponse UpdateDestinationResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDestinationResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateDestinationResponse' :: UpdateDestinationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateDestinationResponse
s@UpdateDestinationResponse' {} Int
a -> UpdateDestinationResponse
s {$sel:httpStatus:UpdateDestinationResponse' :: Int
httpStatus = Int
a} :: UpdateDestinationResponse)
instance Prelude.NFData UpdateDestinationResponse