{-# 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.ChimeSDKMessaging.Types.MessagingSessionEndpoint where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data MessagingSessionEndpoint = MessagingSessionEndpoint'
{
MessagingSessionEndpoint -> Maybe Text
url :: Prelude.Maybe Prelude.Text
}
deriving (MessagingSessionEndpoint -> MessagingSessionEndpoint -> Bool
(MessagingSessionEndpoint -> MessagingSessionEndpoint -> Bool)
-> (MessagingSessionEndpoint -> MessagingSessionEndpoint -> Bool)
-> Eq MessagingSessionEndpoint
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MessagingSessionEndpoint -> MessagingSessionEndpoint -> Bool
$c/= :: MessagingSessionEndpoint -> MessagingSessionEndpoint -> Bool
== :: MessagingSessionEndpoint -> MessagingSessionEndpoint -> Bool
$c== :: MessagingSessionEndpoint -> MessagingSessionEndpoint -> Bool
Prelude.Eq, ReadPrec [MessagingSessionEndpoint]
ReadPrec MessagingSessionEndpoint
Int -> ReadS MessagingSessionEndpoint
ReadS [MessagingSessionEndpoint]
(Int -> ReadS MessagingSessionEndpoint)
-> ReadS [MessagingSessionEndpoint]
-> ReadPrec MessagingSessionEndpoint
-> ReadPrec [MessagingSessionEndpoint]
-> Read MessagingSessionEndpoint
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MessagingSessionEndpoint]
$creadListPrec :: ReadPrec [MessagingSessionEndpoint]
readPrec :: ReadPrec MessagingSessionEndpoint
$creadPrec :: ReadPrec MessagingSessionEndpoint
readList :: ReadS [MessagingSessionEndpoint]
$creadList :: ReadS [MessagingSessionEndpoint]
readsPrec :: Int -> ReadS MessagingSessionEndpoint
$creadsPrec :: Int -> ReadS MessagingSessionEndpoint
Prelude.Read, Int -> MessagingSessionEndpoint -> ShowS
[MessagingSessionEndpoint] -> ShowS
MessagingSessionEndpoint -> String
(Int -> MessagingSessionEndpoint -> ShowS)
-> (MessagingSessionEndpoint -> String)
-> ([MessagingSessionEndpoint] -> ShowS)
-> Show MessagingSessionEndpoint
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MessagingSessionEndpoint] -> ShowS
$cshowList :: [MessagingSessionEndpoint] -> ShowS
show :: MessagingSessionEndpoint -> String
$cshow :: MessagingSessionEndpoint -> String
showsPrec :: Int -> MessagingSessionEndpoint -> ShowS
$cshowsPrec :: Int -> MessagingSessionEndpoint -> ShowS
Prelude.Show, (forall x.
MessagingSessionEndpoint -> Rep MessagingSessionEndpoint x)
-> (forall x.
Rep MessagingSessionEndpoint x -> MessagingSessionEndpoint)
-> Generic MessagingSessionEndpoint
forall x.
Rep MessagingSessionEndpoint x -> MessagingSessionEndpoint
forall x.
MessagingSessionEndpoint -> Rep MessagingSessionEndpoint x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep MessagingSessionEndpoint x -> MessagingSessionEndpoint
$cfrom :: forall x.
MessagingSessionEndpoint -> Rep MessagingSessionEndpoint x
Prelude.Generic)
newMessagingSessionEndpoint ::
MessagingSessionEndpoint
newMessagingSessionEndpoint :: MessagingSessionEndpoint
newMessagingSessionEndpoint =
MessagingSessionEndpoint' :: Maybe Text -> MessagingSessionEndpoint
MessagingSessionEndpoint' {$sel:url:MessagingSessionEndpoint' :: Maybe Text
url = Maybe Text
forall a. Maybe a
Prelude.Nothing}
messagingSessionEndpoint_url :: Lens.Lens' MessagingSessionEndpoint (Prelude.Maybe Prelude.Text)
messagingSessionEndpoint_url :: (Maybe Text -> f (Maybe Text))
-> MessagingSessionEndpoint -> f MessagingSessionEndpoint
messagingSessionEndpoint_url = (MessagingSessionEndpoint -> Maybe Text)
-> (MessagingSessionEndpoint
-> Maybe Text -> MessagingSessionEndpoint)
-> Lens
MessagingSessionEndpoint
MessagingSessionEndpoint
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MessagingSessionEndpoint' {Maybe Text
url :: Maybe Text
$sel:url:MessagingSessionEndpoint' :: MessagingSessionEndpoint -> Maybe Text
url} -> Maybe Text
url) (\s :: MessagingSessionEndpoint
s@MessagingSessionEndpoint' {} Maybe Text
a -> MessagingSessionEndpoint
s {$sel:url:MessagingSessionEndpoint' :: Maybe Text
url = Maybe Text
a} :: MessagingSessionEndpoint)
instance Core.FromJSON MessagingSessionEndpoint where
parseJSON :: Value -> Parser MessagingSessionEndpoint
parseJSON =
String
-> (Object -> Parser MessagingSessionEndpoint)
-> Value
-> Parser MessagingSessionEndpoint
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"MessagingSessionEndpoint"
( \Object
x ->
Maybe Text -> MessagingSessionEndpoint
MessagingSessionEndpoint'
(Maybe Text -> MessagingSessionEndpoint)
-> Parser (Maybe Text) -> Parser MessagingSessionEndpoint
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
"Url")
)
instance Prelude.Hashable MessagingSessionEndpoint
instance Prelude.NFData MessagingSessionEndpoint