{-# 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.KinesisVideoWebRtcStorage.JoinStorageSession
(
JoinStorageSession (..),
newJoinStorageSession,
joinStorageSession_channelArn,
JoinStorageSessionResponse (..),
newJoinStorageSessionResponse,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.KinesisVideoWebRtcStorage.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data JoinStorageSession = JoinStorageSession'
{
JoinStorageSession -> Text
channelArn :: Prelude.Text
}
deriving (JoinStorageSession -> JoinStorageSession -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: JoinStorageSession -> JoinStorageSession -> Bool
$c/= :: JoinStorageSession -> JoinStorageSession -> Bool
== :: JoinStorageSession -> JoinStorageSession -> Bool
$c== :: JoinStorageSession -> JoinStorageSession -> Bool
Prelude.Eq, ReadPrec [JoinStorageSession]
ReadPrec JoinStorageSession
Int -> ReadS JoinStorageSession
ReadS [JoinStorageSession]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [JoinStorageSession]
$creadListPrec :: ReadPrec [JoinStorageSession]
readPrec :: ReadPrec JoinStorageSession
$creadPrec :: ReadPrec JoinStorageSession
readList :: ReadS [JoinStorageSession]
$creadList :: ReadS [JoinStorageSession]
readsPrec :: Int -> ReadS JoinStorageSession
$creadsPrec :: Int -> ReadS JoinStorageSession
Prelude.Read, Int -> JoinStorageSession -> ShowS
[JoinStorageSession] -> ShowS
JoinStorageSession -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [JoinStorageSession] -> ShowS
$cshowList :: [JoinStorageSession] -> ShowS
show :: JoinStorageSession -> String
$cshow :: JoinStorageSession -> String
showsPrec :: Int -> JoinStorageSession -> ShowS
$cshowsPrec :: Int -> JoinStorageSession -> ShowS
Prelude.Show, forall x. Rep JoinStorageSession x -> JoinStorageSession
forall x. JoinStorageSession -> Rep JoinStorageSession x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep JoinStorageSession x -> JoinStorageSession
$cfrom :: forall x. JoinStorageSession -> Rep JoinStorageSession x
Prelude.Generic)
newJoinStorageSession ::
Prelude.Text ->
JoinStorageSession
newJoinStorageSession :: Text -> JoinStorageSession
newJoinStorageSession Text
pChannelArn_ =
JoinStorageSession' {$sel:channelArn:JoinStorageSession' :: Text
channelArn = Text
pChannelArn_}
joinStorageSession_channelArn :: Lens.Lens' JoinStorageSession Prelude.Text
joinStorageSession_channelArn :: Lens' JoinStorageSession Text
joinStorageSession_channelArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JoinStorageSession' {Text
channelArn :: Text
$sel:channelArn:JoinStorageSession' :: JoinStorageSession -> Text
channelArn} -> Text
channelArn) (\s :: JoinStorageSession
s@JoinStorageSession' {} Text
a -> JoinStorageSession
s {$sel:channelArn:JoinStorageSession' :: Text
channelArn = Text
a} :: JoinStorageSession)
instance Core.AWSRequest JoinStorageSession where
type
AWSResponse JoinStorageSession =
JoinStorageSessionResponse
request :: (Service -> Service)
-> JoinStorageSession -> Request JoinStorageSession
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 JoinStorageSession
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse JoinStorageSession)))
response =
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull JoinStorageSessionResponse
JoinStorageSessionResponse'
instance Prelude.Hashable JoinStorageSession where
hashWithSalt :: Int -> JoinStorageSession -> Int
hashWithSalt Int
_salt JoinStorageSession' {Text
channelArn :: Text
$sel:channelArn:JoinStorageSession' :: JoinStorageSession -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
channelArn
instance Prelude.NFData JoinStorageSession where
rnf :: JoinStorageSession -> ()
rnf JoinStorageSession' {Text
channelArn :: Text
$sel:channelArn:JoinStorageSession' :: JoinStorageSession -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
channelArn
instance Data.ToHeaders JoinStorageSession where
toHeaders :: JoinStorageSession -> [Header]
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> [Header]
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON JoinStorageSession where
toJSON :: JoinStorageSession -> Value
toJSON JoinStorageSession' {Text
channelArn :: Text
$sel:channelArn:JoinStorageSession' :: JoinStorageSession -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[forall a. a -> Maybe a
Prelude.Just (Key
"channelArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
channelArn)]
)
instance Data.ToPath JoinStorageSession where
toPath :: JoinStorageSession -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/joinStorageSession"
instance Data.ToQuery JoinStorageSession where
toQuery :: JoinStorageSession -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data JoinStorageSessionResponse = JoinStorageSessionResponse'
{
}
deriving (JoinStorageSessionResponse -> JoinStorageSessionResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: JoinStorageSessionResponse -> JoinStorageSessionResponse -> Bool
$c/= :: JoinStorageSessionResponse -> JoinStorageSessionResponse -> Bool
== :: JoinStorageSessionResponse -> JoinStorageSessionResponse -> Bool
$c== :: JoinStorageSessionResponse -> JoinStorageSessionResponse -> Bool
Prelude.Eq, ReadPrec [JoinStorageSessionResponse]
ReadPrec JoinStorageSessionResponse
Int -> ReadS JoinStorageSessionResponse
ReadS [JoinStorageSessionResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [JoinStorageSessionResponse]
$creadListPrec :: ReadPrec [JoinStorageSessionResponse]
readPrec :: ReadPrec JoinStorageSessionResponse
$creadPrec :: ReadPrec JoinStorageSessionResponse
readList :: ReadS [JoinStorageSessionResponse]
$creadList :: ReadS [JoinStorageSessionResponse]
readsPrec :: Int -> ReadS JoinStorageSessionResponse
$creadsPrec :: Int -> ReadS JoinStorageSessionResponse
Prelude.Read, Int -> JoinStorageSessionResponse -> ShowS
[JoinStorageSessionResponse] -> ShowS
JoinStorageSessionResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [JoinStorageSessionResponse] -> ShowS
$cshowList :: [JoinStorageSessionResponse] -> ShowS
show :: JoinStorageSessionResponse -> String
$cshow :: JoinStorageSessionResponse -> String
showsPrec :: Int -> JoinStorageSessionResponse -> ShowS
$cshowsPrec :: Int -> JoinStorageSessionResponse -> ShowS
Prelude.Show, forall x.
Rep JoinStorageSessionResponse x -> JoinStorageSessionResponse
forall x.
JoinStorageSessionResponse -> Rep JoinStorageSessionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep JoinStorageSessionResponse x -> JoinStorageSessionResponse
$cfrom :: forall x.
JoinStorageSessionResponse -> Rep JoinStorageSessionResponse x
Prelude.Generic)
newJoinStorageSessionResponse ::
JoinStorageSessionResponse
newJoinStorageSessionResponse :: JoinStorageSessionResponse
newJoinStorageSessionResponse =
JoinStorageSessionResponse
JoinStorageSessionResponse'
instance Prelude.NFData JoinStorageSessionResponse where
rnf :: JoinStorageSessionResponse -> ()
rnf JoinStorageSessionResponse
_ = ()