{-# 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.KinesisVideo.UpdateNotificationConfiguration
(
UpdateNotificationConfiguration (..),
newUpdateNotificationConfiguration,
updateNotificationConfiguration_notificationConfiguration,
updateNotificationConfiguration_streamARN,
updateNotificationConfiguration_streamName,
UpdateNotificationConfigurationResponse (..),
newUpdateNotificationConfigurationResponse,
updateNotificationConfigurationResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.KinesisVideo.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data UpdateNotificationConfiguration = UpdateNotificationConfiguration'
{
UpdateNotificationConfiguration -> Maybe NotificationConfiguration
notificationConfiguration :: Prelude.Maybe NotificationConfiguration,
UpdateNotificationConfiguration -> Maybe Text
streamARN :: Prelude.Maybe Prelude.Text,
UpdateNotificationConfiguration -> Maybe Text
streamName :: Prelude.Maybe Prelude.Text
}
deriving (UpdateNotificationConfiguration
-> UpdateNotificationConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateNotificationConfiguration
-> UpdateNotificationConfiguration -> Bool
$c/= :: UpdateNotificationConfiguration
-> UpdateNotificationConfiguration -> Bool
== :: UpdateNotificationConfiguration
-> UpdateNotificationConfiguration -> Bool
$c== :: UpdateNotificationConfiguration
-> UpdateNotificationConfiguration -> Bool
Prelude.Eq, ReadPrec [UpdateNotificationConfiguration]
ReadPrec UpdateNotificationConfiguration
Int -> ReadS UpdateNotificationConfiguration
ReadS [UpdateNotificationConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateNotificationConfiguration]
$creadListPrec :: ReadPrec [UpdateNotificationConfiguration]
readPrec :: ReadPrec UpdateNotificationConfiguration
$creadPrec :: ReadPrec UpdateNotificationConfiguration
readList :: ReadS [UpdateNotificationConfiguration]
$creadList :: ReadS [UpdateNotificationConfiguration]
readsPrec :: Int -> ReadS UpdateNotificationConfiguration
$creadsPrec :: Int -> ReadS UpdateNotificationConfiguration
Prelude.Read, Int -> UpdateNotificationConfiguration -> ShowS
[UpdateNotificationConfiguration] -> ShowS
UpdateNotificationConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateNotificationConfiguration] -> ShowS
$cshowList :: [UpdateNotificationConfiguration] -> ShowS
show :: UpdateNotificationConfiguration -> String
$cshow :: UpdateNotificationConfiguration -> String
showsPrec :: Int -> UpdateNotificationConfiguration -> ShowS
$cshowsPrec :: Int -> UpdateNotificationConfiguration -> ShowS
Prelude.Show, forall x.
Rep UpdateNotificationConfiguration x
-> UpdateNotificationConfiguration
forall x.
UpdateNotificationConfiguration
-> Rep UpdateNotificationConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateNotificationConfiguration x
-> UpdateNotificationConfiguration
$cfrom :: forall x.
UpdateNotificationConfiguration
-> Rep UpdateNotificationConfiguration x
Prelude.Generic)
newUpdateNotificationConfiguration ::
UpdateNotificationConfiguration
newUpdateNotificationConfiguration :: UpdateNotificationConfiguration
newUpdateNotificationConfiguration =
UpdateNotificationConfiguration'
{ $sel:notificationConfiguration:UpdateNotificationConfiguration' :: Maybe NotificationConfiguration
notificationConfiguration =
forall a. Maybe a
Prelude.Nothing,
$sel:streamARN:UpdateNotificationConfiguration' :: Maybe Text
streamARN = forall a. Maybe a
Prelude.Nothing,
$sel:streamName:UpdateNotificationConfiguration' :: Maybe Text
streamName = forall a. Maybe a
Prelude.Nothing
}
updateNotificationConfiguration_notificationConfiguration :: Lens.Lens' UpdateNotificationConfiguration (Prelude.Maybe NotificationConfiguration)
updateNotificationConfiguration_notificationConfiguration :: Lens'
UpdateNotificationConfiguration (Maybe NotificationConfiguration)
updateNotificationConfiguration_notificationConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNotificationConfiguration' {Maybe NotificationConfiguration
notificationConfiguration :: Maybe NotificationConfiguration
$sel:notificationConfiguration:UpdateNotificationConfiguration' :: UpdateNotificationConfiguration -> Maybe NotificationConfiguration
notificationConfiguration} -> Maybe NotificationConfiguration
notificationConfiguration) (\s :: UpdateNotificationConfiguration
s@UpdateNotificationConfiguration' {} Maybe NotificationConfiguration
a -> UpdateNotificationConfiguration
s {$sel:notificationConfiguration:UpdateNotificationConfiguration' :: Maybe NotificationConfiguration
notificationConfiguration = Maybe NotificationConfiguration
a} :: UpdateNotificationConfiguration)
updateNotificationConfiguration_streamARN :: Lens.Lens' UpdateNotificationConfiguration (Prelude.Maybe Prelude.Text)
updateNotificationConfiguration_streamARN :: Lens' UpdateNotificationConfiguration (Maybe Text)
updateNotificationConfiguration_streamARN = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNotificationConfiguration' {Maybe Text
streamARN :: Maybe Text
$sel:streamARN:UpdateNotificationConfiguration' :: UpdateNotificationConfiguration -> Maybe Text
streamARN} -> Maybe Text
streamARN) (\s :: UpdateNotificationConfiguration
s@UpdateNotificationConfiguration' {} Maybe Text
a -> UpdateNotificationConfiguration
s {$sel:streamARN:UpdateNotificationConfiguration' :: Maybe Text
streamARN = Maybe Text
a} :: UpdateNotificationConfiguration)
updateNotificationConfiguration_streamName :: Lens.Lens' UpdateNotificationConfiguration (Prelude.Maybe Prelude.Text)
updateNotificationConfiguration_streamName :: Lens' UpdateNotificationConfiguration (Maybe Text)
updateNotificationConfiguration_streamName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNotificationConfiguration' {Maybe Text
streamName :: Maybe Text
$sel:streamName:UpdateNotificationConfiguration' :: UpdateNotificationConfiguration -> Maybe Text
streamName} -> Maybe Text
streamName) (\s :: UpdateNotificationConfiguration
s@UpdateNotificationConfiguration' {} Maybe Text
a -> UpdateNotificationConfiguration
s {$sel:streamName:UpdateNotificationConfiguration' :: Maybe Text
streamName = Maybe Text
a} :: UpdateNotificationConfiguration)
instance
Core.AWSRequest
UpdateNotificationConfiguration
where
type
AWSResponse UpdateNotificationConfiguration =
UpdateNotificationConfigurationResponse
request :: (Service -> Service)
-> UpdateNotificationConfiguration
-> Request UpdateNotificationConfiguration
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 UpdateNotificationConfiguration
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse UpdateNotificationConfiguration)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> UpdateNotificationConfigurationResponse
UpdateNotificationConfigurationResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance
Prelude.Hashable
UpdateNotificationConfiguration
where
hashWithSalt :: Int -> UpdateNotificationConfiguration -> Int
hashWithSalt
Int
_salt
UpdateNotificationConfiguration' {Maybe Text
Maybe NotificationConfiguration
streamName :: Maybe Text
streamARN :: Maybe Text
notificationConfiguration :: Maybe NotificationConfiguration
$sel:streamName:UpdateNotificationConfiguration' :: UpdateNotificationConfiguration -> Maybe Text
$sel:streamARN:UpdateNotificationConfiguration' :: UpdateNotificationConfiguration -> Maybe Text
$sel:notificationConfiguration:UpdateNotificationConfiguration' :: UpdateNotificationConfiguration -> Maybe NotificationConfiguration
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe NotificationConfiguration
notificationConfiguration
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
streamARN
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
streamName
instance
Prelude.NFData
UpdateNotificationConfiguration
where
rnf :: UpdateNotificationConfiguration -> ()
rnf UpdateNotificationConfiguration' {Maybe Text
Maybe NotificationConfiguration
streamName :: Maybe Text
streamARN :: Maybe Text
notificationConfiguration :: Maybe NotificationConfiguration
$sel:streamName:UpdateNotificationConfiguration' :: UpdateNotificationConfiguration -> Maybe Text
$sel:streamARN:UpdateNotificationConfiguration' :: UpdateNotificationConfiguration -> Maybe Text
$sel:notificationConfiguration:UpdateNotificationConfiguration' :: UpdateNotificationConfiguration -> Maybe NotificationConfiguration
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe NotificationConfiguration
notificationConfiguration
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
streamARN
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
streamName
instance
Data.ToHeaders
UpdateNotificationConfiguration
where
toHeaders :: UpdateNotificationConfiguration -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToJSON UpdateNotificationConfiguration where
toJSON :: UpdateNotificationConfiguration -> Value
toJSON UpdateNotificationConfiguration' {Maybe Text
Maybe NotificationConfiguration
streamName :: Maybe Text
streamARN :: Maybe Text
notificationConfiguration :: Maybe NotificationConfiguration
$sel:streamName:UpdateNotificationConfiguration' :: UpdateNotificationConfiguration -> Maybe Text
$sel:streamARN:UpdateNotificationConfiguration' :: UpdateNotificationConfiguration -> Maybe Text
$sel:notificationConfiguration:UpdateNotificationConfiguration' :: UpdateNotificationConfiguration -> Maybe NotificationConfiguration
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"NotificationConfiguration" 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 NotificationConfiguration
notificationConfiguration,
(Key
"StreamARN" 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
streamARN,
(Key
"StreamName" 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
streamName
]
)
instance Data.ToPath UpdateNotificationConfiguration where
toPath :: UpdateNotificationConfiguration -> ByteString
toPath =
forall a b. a -> b -> a
Prelude.const ByteString
"/updateNotificationConfiguration"
instance Data.ToQuery UpdateNotificationConfiguration where
toQuery :: UpdateNotificationConfiguration -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data UpdateNotificationConfigurationResponse = UpdateNotificationConfigurationResponse'
{
UpdateNotificationConfigurationResponse -> Int
httpStatus :: Prelude.Int
}
deriving (UpdateNotificationConfigurationResponse
-> UpdateNotificationConfigurationResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateNotificationConfigurationResponse
-> UpdateNotificationConfigurationResponse -> Bool
$c/= :: UpdateNotificationConfigurationResponse
-> UpdateNotificationConfigurationResponse -> Bool
== :: UpdateNotificationConfigurationResponse
-> UpdateNotificationConfigurationResponse -> Bool
$c== :: UpdateNotificationConfigurationResponse
-> UpdateNotificationConfigurationResponse -> Bool
Prelude.Eq, ReadPrec [UpdateNotificationConfigurationResponse]
ReadPrec UpdateNotificationConfigurationResponse
Int -> ReadS UpdateNotificationConfigurationResponse
ReadS [UpdateNotificationConfigurationResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateNotificationConfigurationResponse]
$creadListPrec :: ReadPrec [UpdateNotificationConfigurationResponse]
readPrec :: ReadPrec UpdateNotificationConfigurationResponse
$creadPrec :: ReadPrec UpdateNotificationConfigurationResponse
readList :: ReadS [UpdateNotificationConfigurationResponse]
$creadList :: ReadS [UpdateNotificationConfigurationResponse]
readsPrec :: Int -> ReadS UpdateNotificationConfigurationResponse
$creadsPrec :: Int -> ReadS UpdateNotificationConfigurationResponse
Prelude.Read, Int -> UpdateNotificationConfigurationResponse -> ShowS
[UpdateNotificationConfigurationResponse] -> ShowS
UpdateNotificationConfigurationResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateNotificationConfigurationResponse] -> ShowS
$cshowList :: [UpdateNotificationConfigurationResponse] -> ShowS
show :: UpdateNotificationConfigurationResponse -> String
$cshow :: UpdateNotificationConfigurationResponse -> String
showsPrec :: Int -> UpdateNotificationConfigurationResponse -> ShowS
$cshowsPrec :: Int -> UpdateNotificationConfigurationResponse -> ShowS
Prelude.Show, forall x.
Rep UpdateNotificationConfigurationResponse x
-> UpdateNotificationConfigurationResponse
forall x.
UpdateNotificationConfigurationResponse
-> Rep UpdateNotificationConfigurationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateNotificationConfigurationResponse x
-> UpdateNotificationConfigurationResponse
$cfrom :: forall x.
UpdateNotificationConfigurationResponse
-> Rep UpdateNotificationConfigurationResponse x
Prelude.Generic)
newUpdateNotificationConfigurationResponse ::
Prelude.Int ->
UpdateNotificationConfigurationResponse
newUpdateNotificationConfigurationResponse :: Int -> UpdateNotificationConfigurationResponse
newUpdateNotificationConfigurationResponse
Int
pHttpStatus_ =
UpdateNotificationConfigurationResponse'
{ $sel:httpStatus:UpdateNotificationConfigurationResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
updateNotificationConfigurationResponse_httpStatus :: Lens.Lens' UpdateNotificationConfigurationResponse Prelude.Int
updateNotificationConfigurationResponse_httpStatus :: Lens' UpdateNotificationConfigurationResponse Int
updateNotificationConfigurationResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNotificationConfigurationResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateNotificationConfigurationResponse' :: UpdateNotificationConfigurationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateNotificationConfigurationResponse
s@UpdateNotificationConfigurationResponse' {} Int
a -> UpdateNotificationConfigurationResponse
s {$sel:httpStatus:UpdateNotificationConfigurationResponse' :: Int
httpStatus = Int
a} :: UpdateNotificationConfigurationResponse)
instance
Prelude.NFData
UpdateNotificationConfigurationResponse
where
rnf :: UpdateNotificationConfigurationResponse -> ()
rnf UpdateNotificationConfigurationResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateNotificationConfigurationResponse' :: UpdateNotificationConfigurationResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus