{-# 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.DescribeNotificationConfiguration
(
DescribeNotificationConfiguration (..),
newDescribeNotificationConfiguration,
describeNotificationConfiguration_streamARN,
describeNotificationConfiguration_streamName,
DescribeNotificationConfigurationResponse (..),
newDescribeNotificationConfigurationResponse,
describeNotificationConfigurationResponse_notificationConfiguration,
describeNotificationConfigurationResponse_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 DescribeNotificationConfiguration = DescribeNotificationConfiguration'
{
DescribeNotificationConfiguration -> Maybe Text
streamARN :: Prelude.Maybe Prelude.Text,
DescribeNotificationConfiguration -> Maybe Text
streamName :: Prelude.Maybe Prelude.Text
}
deriving (DescribeNotificationConfiguration
-> DescribeNotificationConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeNotificationConfiguration
-> DescribeNotificationConfiguration -> Bool
$c/= :: DescribeNotificationConfiguration
-> DescribeNotificationConfiguration -> Bool
== :: DescribeNotificationConfiguration
-> DescribeNotificationConfiguration -> Bool
$c== :: DescribeNotificationConfiguration
-> DescribeNotificationConfiguration -> Bool
Prelude.Eq, ReadPrec [DescribeNotificationConfiguration]
ReadPrec DescribeNotificationConfiguration
Int -> ReadS DescribeNotificationConfiguration
ReadS [DescribeNotificationConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeNotificationConfiguration]
$creadListPrec :: ReadPrec [DescribeNotificationConfiguration]
readPrec :: ReadPrec DescribeNotificationConfiguration
$creadPrec :: ReadPrec DescribeNotificationConfiguration
readList :: ReadS [DescribeNotificationConfiguration]
$creadList :: ReadS [DescribeNotificationConfiguration]
readsPrec :: Int -> ReadS DescribeNotificationConfiguration
$creadsPrec :: Int -> ReadS DescribeNotificationConfiguration
Prelude.Read, Int -> DescribeNotificationConfiguration -> ShowS
[DescribeNotificationConfiguration] -> ShowS
DescribeNotificationConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeNotificationConfiguration] -> ShowS
$cshowList :: [DescribeNotificationConfiguration] -> ShowS
show :: DescribeNotificationConfiguration -> String
$cshow :: DescribeNotificationConfiguration -> String
showsPrec :: Int -> DescribeNotificationConfiguration -> ShowS
$cshowsPrec :: Int -> DescribeNotificationConfiguration -> ShowS
Prelude.Show, forall x.
Rep DescribeNotificationConfiguration x
-> DescribeNotificationConfiguration
forall x.
DescribeNotificationConfiguration
-> Rep DescribeNotificationConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeNotificationConfiguration x
-> DescribeNotificationConfiguration
$cfrom :: forall x.
DescribeNotificationConfiguration
-> Rep DescribeNotificationConfiguration x
Prelude.Generic)
newDescribeNotificationConfiguration ::
DescribeNotificationConfiguration
newDescribeNotificationConfiguration :: DescribeNotificationConfiguration
newDescribeNotificationConfiguration =
DescribeNotificationConfiguration'
{ $sel:streamARN:DescribeNotificationConfiguration' :: Maybe Text
streamARN =
forall a. Maybe a
Prelude.Nothing,
$sel:streamName:DescribeNotificationConfiguration' :: Maybe Text
streamName = forall a. Maybe a
Prelude.Nothing
}
describeNotificationConfiguration_streamARN :: Lens.Lens' DescribeNotificationConfiguration (Prelude.Maybe Prelude.Text)
describeNotificationConfiguration_streamARN :: Lens' DescribeNotificationConfiguration (Maybe Text)
describeNotificationConfiguration_streamARN = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeNotificationConfiguration' {Maybe Text
streamARN :: Maybe Text
$sel:streamARN:DescribeNotificationConfiguration' :: DescribeNotificationConfiguration -> Maybe Text
streamARN} -> Maybe Text
streamARN) (\s :: DescribeNotificationConfiguration
s@DescribeNotificationConfiguration' {} Maybe Text
a -> DescribeNotificationConfiguration
s {$sel:streamARN:DescribeNotificationConfiguration' :: Maybe Text
streamARN = Maybe Text
a} :: DescribeNotificationConfiguration)
describeNotificationConfiguration_streamName :: Lens.Lens' DescribeNotificationConfiguration (Prelude.Maybe Prelude.Text)
describeNotificationConfiguration_streamName :: Lens' DescribeNotificationConfiguration (Maybe Text)
describeNotificationConfiguration_streamName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeNotificationConfiguration' {Maybe Text
streamName :: Maybe Text
$sel:streamName:DescribeNotificationConfiguration' :: DescribeNotificationConfiguration -> Maybe Text
streamName} -> Maybe Text
streamName) (\s :: DescribeNotificationConfiguration
s@DescribeNotificationConfiguration' {} Maybe Text
a -> DescribeNotificationConfiguration
s {$sel:streamName:DescribeNotificationConfiguration' :: Maybe Text
streamName = Maybe Text
a} :: DescribeNotificationConfiguration)
instance
Core.AWSRequest
DescribeNotificationConfiguration
where
type
AWSResponse DescribeNotificationConfiguration =
DescribeNotificationConfigurationResponse
request :: (Service -> Service)
-> DescribeNotificationConfiguration
-> Request DescribeNotificationConfiguration
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 DescribeNotificationConfiguration
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DescribeNotificationConfiguration)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe NotificationConfiguration
-> Int -> DescribeNotificationConfigurationResponse
DescribeNotificationConfigurationResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"NotificationConfiguration")
forall (f :: * -> *) a b. Applicative f => 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
DescribeNotificationConfiguration
where
hashWithSalt :: Int -> DescribeNotificationConfiguration -> Int
hashWithSalt
Int
_salt
DescribeNotificationConfiguration' {Maybe Text
streamName :: Maybe Text
streamARN :: Maybe Text
$sel:streamName:DescribeNotificationConfiguration' :: DescribeNotificationConfiguration -> Maybe Text
$sel:streamARN:DescribeNotificationConfiguration' :: DescribeNotificationConfiguration -> Maybe Text
..} =
Int
_salt
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
DescribeNotificationConfiguration
where
rnf :: DescribeNotificationConfiguration -> ()
rnf DescribeNotificationConfiguration' {Maybe Text
streamName :: Maybe Text
streamARN :: Maybe Text
$sel:streamName:DescribeNotificationConfiguration' :: DescribeNotificationConfiguration -> Maybe Text
$sel:streamARN:DescribeNotificationConfiguration' :: DescribeNotificationConfiguration -> Maybe Text
..} =
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
DescribeNotificationConfiguration
where
toHeaders :: DescribeNotificationConfiguration -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance
Data.ToJSON
DescribeNotificationConfiguration
where
toJSON :: DescribeNotificationConfiguration -> Value
toJSON DescribeNotificationConfiguration' {Maybe Text
streamName :: Maybe Text
streamARN :: Maybe Text
$sel:streamName:DescribeNotificationConfiguration' :: DescribeNotificationConfiguration -> Maybe Text
$sel:streamARN:DescribeNotificationConfiguration' :: DescribeNotificationConfiguration -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (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
DescribeNotificationConfiguration
where
toPath :: DescribeNotificationConfiguration -> ByteString
toPath =
forall a b. a -> b -> a
Prelude.const ByteString
"/describeNotificationConfiguration"
instance
Data.ToQuery
DescribeNotificationConfiguration
where
toQuery :: DescribeNotificationConfiguration -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DescribeNotificationConfigurationResponse = DescribeNotificationConfigurationResponse'
{
DescribeNotificationConfigurationResponse
-> Maybe NotificationConfiguration
notificationConfiguration :: Prelude.Maybe NotificationConfiguration,
DescribeNotificationConfigurationResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeNotificationConfigurationResponse
-> DescribeNotificationConfigurationResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeNotificationConfigurationResponse
-> DescribeNotificationConfigurationResponse -> Bool
$c/= :: DescribeNotificationConfigurationResponse
-> DescribeNotificationConfigurationResponse -> Bool
== :: DescribeNotificationConfigurationResponse
-> DescribeNotificationConfigurationResponse -> Bool
$c== :: DescribeNotificationConfigurationResponse
-> DescribeNotificationConfigurationResponse -> Bool
Prelude.Eq, ReadPrec [DescribeNotificationConfigurationResponse]
ReadPrec DescribeNotificationConfigurationResponse
Int -> ReadS DescribeNotificationConfigurationResponse
ReadS [DescribeNotificationConfigurationResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeNotificationConfigurationResponse]
$creadListPrec :: ReadPrec [DescribeNotificationConfigurationResponse]
readPrec :: ReadPrec DescribeNotificationConfigurationResponse
$creadPrec :: ReadPrec DescribeNotificationConfigurationResponse
readList :: ReadS [DescribeNotificationConfigurationResponse]
$creadList :: ReadS [DescribeNotificationConfigurationResponse]
readsPrec :: Int -> ReadS DescribeNotificationConfigurationResponse
$creadsPrec :: Int -> ReadS DescribeNotificationConfigurationResponse
Prelude.Read, Int -> DescribeNotificationConfigurationResponse -> ShowS
[DescribeNotificationConfigurationResponse] -> ShowS
DescribeNotificationConfigurationResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeNotificationConfigurationResponse] -> ShowS
$cshowList :: [DescribeNotificationConfigurationResponse] -> ShowS
show :: DescribeNotificationConfigurationResponse -> String
$cshow :: DescribeNotificationConfigurationResponse -> String
showsPrec :: Int -> DescribeNotificationConfigurationResponse -> ShowS
$cshowsPrec :: Int -> DescribeNotificationConfigurationResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeNotificationConfigurationResponse x
-> DescribeNotificationConfigurationResponse
forall x.
DescribeNotificationConfigurationResponse
-> Rep DescribeNotificationConfigurationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeNotificationConfigurationResponse x
-> DescribeNotificationConfigurationResponse
$cfrom :: forall x.
DescribeNotificationConfigurationResponse
-> Rep DescribeNotificationConfigurationResponse x
Prelude.Generic)
newDescribeNotificationConfigurationResponse ::
Prelude.Int ->
DescribeNotificationConfigurationResponse
newDescribeNotificationConfigurationResponse :: Int -> DescribeNotificationConfigurationResponse
newDescribeNotificationConfigurationResponse
Int
pHttpStatus_ =
DescribeNotificationConfigurationResponse'
{ $sel:notificationConfiguration:DescribeNotificationConfigurationResponse' :: Maybe NotificationConfiguration
notificationConfiguration =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeNotificationConfigurationResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeNotificationConfigurationResponse_notificationConfiguration :: Lens.Lens' DescribeNotificationConfigurationResponse (Prelude.Maybe NotificationConfiguration)
describeNotificationConfigurationResponse_notificationConfiguration :: Lens'
DescribeNotificationConfigurationResponse
(Maybe NotificationConfiguration)
describeNotificationConfigurationResponse_notificationConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeNotificationConfigurationResponse' {Maybe NotificationConfiguration
notificationConfiguration :: Maybe NotificationConfiguration
$sel:notificationConfiguration:DescribeNotificationConfigurationResponse' :: DescribeNotificationConfigurationResponse
-> Maybe NotificationConfiguration
notificationConfiguration} -> Maybe NotificationConfiguration
notificationConfiguration) (\s :: DescribeNotificationConfigurationResponse
s@DescribeNotificationConfigurationResponse' {} Maybe NotificationConfiguration
a -> DescribeNotificationConfigurationResponse
s {$sel:notificationConfiguration:DescribeNotificationConfigurationResponse' :: Maybe NotificationConfiguration
notificationConfiguration = Maybe NotificationConfiguration
a} :: DescribeNotificationConfigurationResponse)
describeNotificationConfigurationResponse_httpStatus :: Lens.Lens' DescribeNotificationConfigurationResponse Prelude.Int
describeNotificationConfigurationResponse_httpStatus :: Lens' DescribeNotificationConfigurationResponse Int
describeNotificationConfigurationResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeNotificationConfigurationResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeNotificationConfigurationResponse' :: DescribeNotificationConfigurationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeNotificationConfigurationResponse
s@DescribeNotificationConfigurationResponse' {} Int
a -> DescribeNotificationConfigurationResponse
s {$sel:httpStatus:DescribeNotificationConfigurationResponse' :: Int
httpStatus = Int
a} :: DescribeNotificationConfigurationResponse)
instance
Prelude.NFData
DescribeNotificationConfigurationResponse
where
rnf :: DescribeNotificationConfigurationResponse -> ()
rnf DescribeNotificationConfigurationResponse' {Int
Maybe NotificationConfiguration
httpStatus :: Int
notificationConfiguration :: Maybe NotificationConfiguration
$sel:httpStatus:DescribeNotificationConfigurationResponse' :: DescribeNotificationConfigurationResponse -> Int
$sel:notificationConfiguration:DescribeNotificationConfigurationResponse' :: DescribeNotificationConfigurationResponse
-> 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 Int
httpStatus