{-# 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.Meeting where
import Amazonka.Chime.Types.MediaPlacement
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data Meeting = Meeting'
{
Meeting -> Maybe Text
mediaRegion :: Prelude.Maybe Prelude.Text,
Meeting -> Maybe MediaPlacement
mediaPlacement :: Prelude.Maybe MediaPlacement,
Meeting -> Maybe (Sensitive Text)
externalMeetingId :: Prelude.Maybe (Core.Sensitive Prelude.Text),
Meeting -> Maybe Text
meetingId :: Prelude.Maybe Prelude.Text
}
deriving (Meeting -> Meeting -> Bool
(Meeting -> Meeting -> Bool)
-> (Meeting -> Meeting -> Bool) -> Eq Meeting
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Meeting -> Meeting -> Bool
$c/= :: Meeting -> Meeting -> Bool
== :: Meeting -> Meeting -> Bool
$c== :: Meeting -> Meeting -> Bool
Prelude.Eq, Int -> Meeting -> ShowS
[Meeting] -> ShowS
Meeting -> String
(Int -> Meeting -> ShowS)
-> (Meeting -> String) -> ([Meeting] -> ShowS) -> Show Meeting
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Meeting] -> ShowS
$cshowList :: [Meeting] -> ShowS
show :: Meeting -> String
$cshow :: Meeting -> String
showsPrec :: Int -> Meeting -> ShowS
$cshowsPrec :: Int -> Meeting -> ShowS
Prelude.Show, (forall x. Meeting -> Rep Meeting x)
-> (forall x. Rep Meeting x -> Meeting) -> Generic Meeting
forall x. Rep Meeting x -> Meeting
forall x. Meeting -> Rep Meeting x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Meeting x -> Meeting
$cfrom :: forall x. Meeting -> Rep Meeting x
Prelude.Generic)
newMeeting ::
Meeting
newMeeting :: Meeting
newMeeting =
Meeting' :: Maybe Text
-> Maybe MediaPlacement
-> Maybe (Sensitive Text)
-> Maybe Text
-> Meeting
Meeting'
{ $sel:mediaRegion:Meeting' :: Maybe Text
mediaRegion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:mediaPlacement:Meeting' :: Maybe MediaPlacement
mediaPlacement = Maybe MediaPlacement
forall a. Maybe a
Prelude.Nothing,
$sel:externalMeetingId:Meeting' :: Maybe (Sensitive Text)
externalMeetingId = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:meetingId:Meeting' :: Maybe Text
meetingId = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
meeting_mediaRegion :: Lens.Lens' Meeting (Prelude.Maybe Prelude.Text)
meeting_mediaRegion :: (Maybe Text -> f (Maybe Text)) -> Meeting -> f Meeting
meeting_mediaRegion = (Meeting -> Maybe Text)
-> (Meeting -> Maybe Text -> Meeting)
-> Lens Meeting Meeting (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Meeting' {Maybe Text
mediaRegion :: Maybe Text
$sel:mediaRegion:Meeting' :: Meeting -> Maybe Text
mediaRegion} -> Maybe Text
mediaRegion) (\s :: Meeting
s@Meeting' {} Maybe Text
a -> Meeting
s {$sel:mediaRegion:Meeting' :: Maybe Text
mediaRegion = Maybe Text
a} :: Meeting)
meeting_mediaPlacement :: Lens.Lens' Meeting (Prelude.Maybe MediaPlacement)
meeting_mediaPlacement :: (Maybe MediaPlacement -> f (Maybe MediaPlacement))
-> Meeting -> f Meeting
meeting_mediaPlacement = (Meeting -> Maybe MediaPlacement)
-> (Meeting -> Maybe MediaPlacement -> Meeting)
-> Lens
Meeting Meeting (Maybe MediaPlacement) (Maybe MediaPlacement)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Meeting' {Maybe MediaPlacement
mediaPlacement :: Maybe MediaPlacement
$sel:mediaPlacement:Meeting' :: Meeting -> Maybe MediaPlacement
mediaPlacement} -> Maybe MediaPlacement
mediaPlacement) (\s :: Meeting
s@Meeting' {} Maybe MediaPlacement
a -> Meeting
s {$sel:mediaPlacement:Meeting' :: Maybe MediaPlacement
mediaPlacement = Maybe MediaPlacement
a} :: Meeting)
meeting_externalMeetingId :: Lens.Lens' Meeting (Prelude.Maybe Prelude.Text)
meeting_externalMeetingId :: (Maybe Text -> f (Maybe Text)) -> Meeting -> f Meeting
meeting_externalMeetingId = (Meeting -> Maybe (Sensitive Text))
-> (Meeting -> Maybe (Sensitive Text) -> Meeting)
-> Lens
Meeting Meeting (Maybe (Sensitive Text)) (Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Meeting' {Maybe (Sensitive Text)
externalMeetingId :: Maybe (Sensitive Text)
$sel:externalMeetingId:Meeting' :: Meeting -> Maybe (Sensitive Text)
externalMeetingId} -> Maybe (Sensitive Text)
externalMeetingId) (\s :: Meeting
s@Meeting' {} Maybe (Sensitive Text)
a -> Meeting
s {$sel:externalMeetingId:Meeting' :: Maybe (Sensitive Text)
externalMeetingId = Maybe (Sensitive Text)
a} :: Meeting) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> Meeting -> f Meeting)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> Meeting
-> f Meeting
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
(Maybe Text)
(Maybe Text)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
meeting_meetingId :: Lens.Lens' Meeting (Prelude.Maybe Prelude.Text)
meeting_meetingId :: (Maybe Text -> f (Maybe Text)) -> Meeting -> f Meeting
meeting_meetingId = (Meeting -> Maybe Text)
-> (Meeting -> Maybe Text -> Meeting)
-> Lens Meeting Meeting (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Meeting' {Maybe Text
meetingId :: Maybe Text
$sel:meetingId:Meeting' :: Meeting -> Maybe Text
meetingId} -> Maybe Text
meetingId) (\s :: Meeting
s@Meeting' {} Maybe Text
a -> Meeting
s {$sel:meetingId:Meeting' :: Maybe Text
meetingId = Maybe Text
a} :: Meeting)
instance Core.FromJSON Meeting where
parseJSON :: Value -> Parser Meeting
parseJSON =
String -> (Object -> Parser Meeting) -> Value -> Parser Meeting
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Meeting"
( \Object
x ->
Maybe Text
-> Maybe MediaPlacement
-> Maybe (Sensitive Text)
-> Maybe Text
-> Meeting
Meeting'
(Maybe Text
-> Maybe MediaPlacement
-> Maybe (Sensitive Text)
-> Maybe Text
-> Meeting)
-> Parser (Maybe Text)
-> Parser
(Maybe MediaPlacement
-> Maybe (Sensitive Text) -> Maybe Text -> Meeting)
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
"MediaRegion")
Parser
(Maybe MediaPlacement
-> Maybe (Sensitive Text) -> Maybe Text -> Meeting)
-> Parser (Maybe MediaPlacement)
-> Parser (Maybe (Sensitive Text) -> Maybe Text -> Meeting)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MediaPlacement)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MediaPlacement")
Parser (Maybe (Sensitive Text) -> Maybe Text -> Meeting)
-> Parser (Maybe (Sensitive Text))
-> Parser (Maybe Text -> Meeting)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Sensitive Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ExternalMeetingId")
Parser (Maybe Text -> Meeting)
-> Parser (Maybe Text) -> Parser Meeting
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
"MeetingId")
)
instance Prelude.Hashable Meeting
instance Prelude.NFData Meeting