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