{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Chime.Types.MediaPlacement where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data MediaPlacement = MediaPlacement'
{
MediaPlacement -> Maybe Text
screenDataUrl :: Prelude.Maybe Prelude.Text,
MediaPlacement -> Maybe Text
eventIngestionUrl :: Prelude.Maybe Prelude.Text,
MediaPlacement -> Maybe Text
signalingUrl :: Prelude.Maybe Prelude.Text,
MediaPlacement -> Maybe Text
screenSharingUrl :: Prelude.Maybe Prelude.Text,
MediaPlacement -> Maybe Text
screenViewingUrl :: Prelude.Maybe Prelude.Text,
MediaPlacement -> Maybe Text
audioHostUrl :: Prelude.Maybe Prelude.Text,
MediaPlacement -> Maybe Text
audioFallbackUrl :: Prelude.Maybe Prelude.Text,
MediaPlacement -> Maybe Text
turnControlUrl :: Prelude.Maybe Prelude.Text
}
deriving (MediaPlacement -> MediaPlacement -> Bool
(MediaPlacement -> MediaPlacement -> Bool)
-> (MediaPlacement -> MediaPlacement -> Bool) -> Eq MediaPlacement
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MediaPlacement -> MediaPlacement -> Bool
$c/= :: MediaPlacement -> MediaPlacement -> Bool
== :: MediaPlacement -> MediaPlacement -> Bool
$c== :: MediaPlacement -> MediaPlacement -> Bool
Prelude.Eq, ReadPrec [MediaPlacement]
ReadPrec MediaPlacement
Int -> ReadS MediaPlacement
ReadS [MediaPlacement]
(Int -> ReadS MediaPlacement)
-> ReadS [MediaPlacement]
-> ReadPrec MediaPlacement
-> ReadPrec [MediaPlacement]
-> Read MediaPlacement
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MediaPlacement]
$creadListPrec :: ReadPrec [MediaPlacement]
readPrec :: ReadPrec MediaPlacement
$creadPrec :: ReadPrec MediaPlacement
readList :: ReadS [MediaPlacement]
$creadList :: ReadS [MediaPlacement]
readsPrec :: Int -> ReadS MediaPlacement
$creadsPrec :: Int -> ReadS MediaPlacement
Prelude.Read, Int -> MediaPlacement -> ShowS
[MediaPlacement] -> ShowS
MediaPlacement -> String
(Int -> MediaPlacement -> ShowS)
-> (MediaPlacement -> String)
-> ([MediaPlacement] -> ShowS)
-> Show MediaPlacement
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MediaPlacement] -> ShowS
$cshowList :: [MediaPlacement] -> ShowS
show :: MediaPlacement -> String
$cshow :: MediaPlacement -> String
showsPrec :: Int -> MediaPlacement -> ShowS
$cshowsPrec :: Int -> MediaPlacement -> ShowS
Prelude.Show, (forall x. MediaPlacement -> Rep MediaPlacement x)
-> (forall x. Rep MediaPlacement x -> MediaPlacement)
-> Generic MediaPlacement
forall x. Rep MediaPlacement x -> MediaPlacement
forall x. MediaPlacement -> Rep MediaPlacement x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MediaPlacement x -> MediaPlacement
$cfrom :: forall x. MediaPlacement -> Rep MediaPlacement x
Prelude.Generic)
newMediaPlacement ::
MediaPlacement
newMediaPlacement :: MediaPlacement
newMediaPlacement =
MediaPlacement' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> MediaPlacement
MediaPlacement'
{ $sel:screenDataUrl:MediaPlacement' :: Maybe Text
screenDataUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:eventIngestionUrl:MediaPlacement' :: Maybe Text
eventIngestionUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:signalingUrl:MediaPlacement' :: Maybe Text
signalingUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:screenSharingUrl:MediaPlacement' :: Maybe Text
screenSharingUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:screenViewingUrl:MediaPlacement' :: Maybe Text
screenViewingUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:audioHostUrl:MediaPlacement' :: Maybe Text
audioHostUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:audioFallbackUrl:MediaPlacement' :: Maybe Text
audioFallbackUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:turnControlUrl:MediaPlacement' :: Maybe Text
turnControlUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
mediaPlacement_screenDataUrl :: Lens.Lens' MediaPlacement (Prelude.Maybe Prelude.Text)
mediaPlacement_screenDataUrl :: (Maybe Text -> f (Maybe Text))
-> MediaPlacement -> f MediaPlacement
mediaPlacement_screenDataUrl = (MediaPlacement -> Maybe Text)
-> (MediaPlacement -> Maybe Text -> MediaPlacement)
-> Lens MediaPlacement MediaPlacement (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MediaPlacement' {Maybe Text
screenDataUrl :: Maybe Text
$sel:screenDataUrl:MediaPlacement' :: MediaPlacement -> Maybe Text
screenDataUrl} -> Maybe Text
screenDataUrl) (\s :: MediaPlacement
s@MediaPlacement' {} Maybe Text
a -> MediaPlacement
s {$sel:screenDataUrl:MediaPlacement' :: Maybe Text
screenDataUrl = Maybe Text
a} :: MediaPlacement)
mediaPlacement_eventIngestionUrl :: Lens.Lens' MediaPlacement (Prelude.Maybe Prelude.Text)
mediaPlacement_eventIngestionUrl :: (Maybe Text -> f (Maybe Text))
-> MediaPlacement -> f MediaPlacement
mediaPlacement_eventIngestionUrl = (MediaPlacement -> Maybe Text)
-> (MediaPlacement -> Maybe Text -> MediaPlacement)
-> Lens MediaPlacement MediaPlacement (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MediaPlacement' {Maybe Text
eventIngestionUrl :: Maybe Text
$sel:eventIngestionUrl:MediaPlacement' :: MediaPlacement -> Maybe Text
eventIngestionUrl} -> Maybe Text
eventIngestionUrl) (\s :: MediaPlacement
s@MediaPlacement' {} Maybe Text
a -> MediaPlacement
s {$sel:eventIngestionUrl:MediaPlacement' :: Maybe Text
eventIngestionUrl = Maybe Text
a} :: MediaPlacement)
mediaPlacement_signalingUrl :: Lens.Lens' MediaPlacement (Prelude.Maybe Prelude.Text)
mediaPlacement_signalingUrl :: (Maybe Text -> f (Maybe Text))
-> MediaPlacement -> f MediaPlacement
mediaPlacement_signalingUrl = (MediaPlacement -> Maybe Text)
-> (MediaPlacement -> Maybe Text -> MediaPlacement)
-> Lens MediaPlacement MediaPlacement (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MediaPlacement' {Maybe Text
signalingUrl :: Maybe Text
$sel:signalingUrl:MediaPlacement' :: MediaPlacement -> Maybe Text
signalingUrl} -> Maybe Text
signalingUrl) (\s :: MediaPlacement
s@MediaPlacement' {} Maybe Text
a -> MediaPlacement
s {$sel:signalingUrl:MediaPlacement' :: Maybe Text
signalingUrl = Maybe Text
a} :: MediaPlacement)
mediaPlacement_screenSharingUrl :: Lens.Lens' MediaPlacement (Prelude.Maybe Prelude.Text)
mediaPlacement_screenSharingUrl :: (Maybe Text -> f (Maybe Text))
-> MediaPlacement -> f MediaPlacement
mediaPlacement_screenSharingUrl = (MediaPlacement -> Maybe Text)
-> (MediaPlacement -> Maybe Text -> MediaPlacement)
-> Lens MediaPlacement MediaPlacement (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MediaPlacement' {Maybe Text
screenSharingUrl :: Maybe Text
$sel:screenSharingUrl:MediaPlacement' :: MediaPlacement -> Maybe Text
screenSharingUrl} -> Maybe Text
screenSharingUrl) (\s :: MediaPlacement
s@MediaPlacement' {} Maybe Text
a -> MediaPlacement
s {$sel:screenSharingUrl:MediaPlacement' :: Maybe Text
screenSharingUrl = Maybe Text
a} :: MediaPlacement)
mediaPlacement_screenViewingUrl :: Lens.Lens' MediaPlacement (Prelude.Maybe Prelude.Text)
mediaPlacement_screenViewingUrl :: (Maybe Text -> f (Maybe Text))
-> MediaPlacement -> f MediaPlacement
mediaPlacement_screenViewingUrl = (MediaPlacement -> Maybe Text)
-> (MediaPlacement -> Maybe Text -> MediaPlacement)
-> Lens MediaPlacement MediaPlacement (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MediaPlacement' {Maybe Text
screenViewingUrl :: Maybe Text
$sel:screenViewingUrl:MediaPlacement' :: MediaPlacement -> Maybe Text
screenViewingUrl} -> Maybe Text
screenViewingUrl) (\s :: MediaPlacement
s@MediaPlacement' {} Maybe Text
a -> MediaPlacement
s {$sel:screenViewingUrl:MediaPlacement' :: Maybe Text
screenViewingUrl = Maybe Text
a} :: MediaPlacement)
mediaPlacement_audioHostUrl :: Lens.Lens' MediaPlacement (Prelude.Maybe Prelude.Text)
mediaPlacement_audioHostUrl :: (Maybe Text -> f (Maybe Text))
-> MediaPlacement -> f MediaPlacement
mediaPlacement_audioHostUrl = (MediaPlacement -> Maybe Text)
-> (MediaPlacement -> Maybe Text -> MediaPlacement)
-> Lens MediaPlacement MediaPlacement (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MediaPlacement' {Maybe Text
audioHostUrl :: Maybe Text
$sel:audioHostUrl:MediaPlacement' :: MediaPlacement -> Maybe Text
audioHostUrl} -> Maybe Text
audioHostUrl) (\s :: MediaPlacement
s@MediaPlacement' {} Maybe Text
a -> MediaPlacement
s {$sel:audioHostUrl:MediaPlacement' :: Maybe Text
audioHostUrl = Maybe Text
a} :: MediaPlacement)
mediaPlacement_audioFallbackUrl :: Lens.Lens' MediaPlacement (Prelude.Maybe Prelude.Text)
mediaPlacement_audioFallbackUrl :: (Maybe Text -> f (Maybe Text))
-> MediaPlacement -> f MediaPlacement
mediaPlacement_audioFallbackUrl = (MediaPlacement -> Maybe Text)
-> (MediaPlacement -> Maybe Text -> MediaPlacement)
-> Lens MediaPlacement MediaPlacement (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MediaPlacement' {Maybe Text
audioFallbackUrl :: Maybe Text
$sel:audioFallbackUrl:MediaPlacement' :: MediaPlacement -> Maybe Text
audioFallbackUrl} -> Maybe Text
audioFallbackUrl) (\s :: MediaPlacement
s@MediaPlacement' {} Maybe Text
a -> MediaPlacement
s {$sel:audioFallbackUrl:MediaPlacement' :: Maybe Text
audioFallbackUrl = Maybe Text
a} :: MediaPlacement)
mediaPlacement_turnControlUrl :: Lens.Lens' MediaPlacement (Prelude.Maybe Prelude.Text)
mediaPlacement_turnControlUrl :: (Maybe Text -> f (Maybe Text))
-> MediaPlacement -> f MediaPlacement
mediaPlacement_turnControlUrl = (MediaPlacement -> Maybe Text)
-> (MediaPlacement -> Maybe Text -> MediaPlacement)
-> Lens MediaPlacement MediaPlacement (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MediaPlacement' {Maybe Text
turnControlUrl :: Maybe Text
$sel:turnControlUrl:MediaPlacement' :: MediaPlacement -> Maybe Text
turnControlUrl} -> Maybe Text
turnControlUrl) (\s :: MediaPlacement
s@MediaPlacement' {} Maybe Text
a -> MediaPlacement
s {$sel:turnControlUrl:MediaPlacement' :: Maybe Text
turnControlUrl = Maybe Text
a} :: MediaPlacement)
instance Core.FromJSON MediaPlacement where
parseJSON :: Value -> Parser MediaPlacement
parseJSON =
String
-> (Object -> Parser MediaPlacement)
-> Value
-> Parser MediaPlacement
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"MediaPlacement"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> MediaPlacement
MediaPlacement'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> MediaPlacement)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> MediaPlacement)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ScreenDataUrl")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> MediaPlacement)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> MediaPlacement)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EventIngestionUrl")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> MediaPlacement)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> MediaPlacement)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SignalingUrl")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> MediaPlacement)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> MediaPlacement)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ScreenSharingUrl")
Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> MediaPlacement)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> MediaPlacement)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ScreenViewingUrl")
Parser (Maybe Text -> Maybe Text -> Maybe Text -> MediaPlacement)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> MediaPlacement)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AudioHostUrl")
Parser (Maybe Text -> Maybe Text -> MediaPlacement)
-> Parser (Maybe Text) -> Parser (Maybe Text -> MediaPlacement)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AudioFallbackUrl")
Parser (Maybe Text -> MediaPlacement)
-> Parser (Maybe Text) -> Parser MediaPlacement
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TurnControlUrl")
)
instance Prelude.Hashable MediaPlacement
instance Prelude.NFData MediaPlacement