{-# 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.VoiceId.Types.SpeakerSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.VoiceId.Types.SpeakerStatus
data SpeakerSummary = SpeakerSummary'
{
SpeakerSummary -> Maybe SpeakerStatus
status :: Prelude.Maybe SpeakerStatus,
SpeakerSummary -> Maybe (Sensitive Text)
customerSpeakerId :: Prelude.Maybe (Core.Sensitive Prelude.Text),
SpeakerSummary -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
SpeakerSummary -> Maybe Text
domainId :: Prelude.Maybe Prelude.Text,
SpeakerSummary -> Maybe POSIX
updatedAt :: Prelude.Maybe Core.POSIX,
SpeakerSummary -> Maybe Text
generatedSpeakerId :: Prelude.Maybe Prelude.Text
}
deriving (SpeakerSummary -> SpeakerSummary -> Bool
(SpeakerSummary -> SpeakerSummary -> Bool)
-> (SpeakerSummary -> SpeakerSummary -> Bool) -> Eq SpeakerSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SpeakerSummary -> SpeakerSummary -> Bool
$c/= :: SpeakerSummary -> SpeakerSummary -> Bool
== :: SpeakerSummary -> SpeakerSummary -> Bool
$c== :: SpeakerSummary -> SpeakerSummary -> Bool
Prelude.Eq, Int -> SpeakerSummary -> ShowS
[SpeakerSummary] -> ShowS
SpeakerSummary -> String
(Int -> SpeakerSummary -> ShowS)
-> (SpeakerSummary -> String)
-> ([SpeakerSummary] -> ShowS)
-> Show SpeakerSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SpeakerSummary] -> ShowS
$cshowList :: [SpeakerSummary] -> ShowS
show :: SpeakerSummary -> String
$cshow :: SpeakerSummary -> String
showsPrec :: Int -> SpeakerSummary -> ShowS
$cshowsPrec :: Int -> SpeakerSummary -> ShowS
Prelude.Show, (forall x. SpeakerSummary -> Rep SpeakerSummary x)
-> (forall x. Rep SpeakerSummary x -> SpeakerSummary)
-> Generic SpeakerSummary
forall x. Rep SpeakerSummary x -> SpeakerSummary
forall x. SpeakerSummary -> Rep SpeakerSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SpeakerSummary x -> SpeakerSummary
$cfrom :: forall x. SpeakerSummary -> Rep SpeakerSummary x
Prelude.Generic)
newSpeakerSummary ::
SpeakerSummary
newSpeakerSummary :: SpeakerSummary
newSpeakerSummary =
SpeakerSummary' :: Maybe SpeakerStatus
-> Maybe (Sensitive Text)
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> SpeakerSummary
SpeakerSummary'
{ $sel:status:SpeakerSummary' :: Maybe SpeakerStatus
status = Maybe SpeakerStatus
forall a. Maybe a
Prelude.Nothing,
$sel:customerSpeakerId:SpeakerSummary' :: Maybe (Sensitive Text)
customerSpeakerId = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:createdAt:SpeakerSummary' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:domainId:SpeakerSummary' :: Maybe Text
domainId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:updatedAt:SpeakerSummary' :: Maybe POSIX
updatedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:generatedSpeakerId:SpeakerSummary' :: Maybe Text
generatedSpeakerId = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
speakerSummary_status :: Lens.Lens' SpeakerSummary (Prelude.Maybe SpeakerStatus)
speakerSummary_status :: (Maybe SpeakerStatus -> f (Maybe SpeakerStatus))
-> SpeakerSummary -> f SpeakerSummary
speakerSummary_status = (SpeakerSummary -> Maybe SpeakerStatus)
-> (SpeakerSummary -> Maybe SpeakerStatus -> SpeakerSummary)
-> Lens
SpeakerSummary
SpeakerSummary
(Maybe SpeakerStatus)
(Maybe SpeakerStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SpeakerSummary' {Maybe SpeakerStatus
status :: Maybe SpeakerStatus
$sel:status:SpeakerSummary' :: SpeakerSummary -> Maybe SpeakerStatus
status} -> Maybe SpeakerStatus
status) (\s :: SpeakerSummary
s@SpeakerSummary' {} Maybe SpeakerStatus
a -> SpeakerSummary
s {$sel:status:SpeakerSummary' :: Maybe SpeakerStatus
status = Maybe SpeakerStatus
a} :: SpeakerSummary)
speakerSummary_customerSpeakerId :: Lens.Lens' SpeakerSummary (Prelude.Maybe Prelude.Text)
speakerSummary_customerSpeakerId :: (Maybe Text -> f (Maybe Text))
-> SpeakerSummary -> f SpeakerSummary
speakerSummary_customerSpeakerId = (SpeakerSummary -> Maybe (Sensitive Text))
-> (SpeakerSummary -> Maybe (Sensitive Text) -> SpeakerSummary)
-> Lens
SpeakerSummary
SpeakerSummary
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SpeakerSummary' {Maybe (Sensitive Text)
customerSpeakerId :: Maybe (Sensitive Text)
$sel:customerSpeakerId:SpeakerSummary' :: SpeakerSummary -> Maybe (Sensitive Text)
customerSpeakerId} -> Maybe (Sensitive Text)
customerSpeakerId) (\s :: SpeakerSummary
s@SpeakerSummary' {} Maybe (Sensitive Text)
a -> SpeakerSummary
s {$sel:customerSpeakerId:SpeakerSummary' :: Maybe (Sensitive Text)
customerSpeakerId = Maybe (Sensitive Text)
a} :: SpeakerSummary) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> SpeakerSummary -> f SpeakerSummary)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> SpeakerSummary
-> f SpeakerSummary
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
speakerSummary_createdAt :: Lens.Lens' SpeakerSummary (Prelude.Maybe Prelude.UTCTime)
speakerSummary_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> SpeakerSummary -> f SpeakerSummary
speakerSummary_createdAt = (SpeakerSummary -> Maybe POSIX)
-> (SpeakerSummary -> Maybe POSIX -> SpeakerSummary)
-> Lens SpeakerSummary SpeakerSummary (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SpeakerSummary' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:SpeakerSummary' :: SpeakerSummary -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: SpeakerSummary
s@SpeakerSummary' {} Maybe POSIX
a -> SpeakerSummary
s {$sel:createdAt:SpeakerSummary' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: SpeakerSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> SpeakerSummary -> f SpeakerSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> SpeakerSummary
-> f SpeakerSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
speakerSummary_domainId :: Lens.Lens' SpeakerSummary (Prelude.Maybe Prelude.Text)
speakerSummary_domainId :: (Maybe Text -> f (Maybe Text))
-> SpeakerSummary -> f SpeakerSummary
speakerSummary_domainId = (SpeakerSummary -> Maybe Text)
-> (SpeakerSummary -> Maybe Text -> SpeakerSummary)
-> Lens SpeakerSummary SpeakerSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SpeakerSummary' {Maybe Text
domainId :: Maybe Text
$sel:domainId:SpeakerSummary' :: SpeakerSummary -> Maybe Text
domainId} -> Maybe Text
domainId) (\s :: SpeakerSummary
s@SpeakerSummary' {} Maybe Text
a -> SpeakerSummary
s {$sel:domainId:SpeakerSummary' :: Maybe Text
domainId = Maybe Text
a} :: SpeakerSummary)
speakerSummary_updatedAt :: Lens.Lens' SpeakerSummary (Prelude.Maybe Prelude.UTCTime)
speakerSummary_updatedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> SpeakerSummary -> f SpeakerSummary
speakerSummary_updatedAt = (SpeakerSummary -> Maybe POSIX)
-> (SpeakerSummary -> Maybe POSIX -> SpeakerSummary)
-> Lens SpeakerSummary SpeakerSummary (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SpeakerSummary' {Maybe POSIX
updatedAt :: Maybe POSIX
$sel:updatedAt:SpeakerSummary' :: SpeakerSummary -> Maybe POSIX
updatedAt} -> Maybe POSIX
updatedAt) (\s :: SpeakerSummary
s@SpeakerSummary' {} Maybe POSIX
a -> SpeakerSummary
s {$sel:updatedAt:SpeakerSummary' :: Maybe POSIX
updatedAt = Maybe POSIX
a} :: SpeakerSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> SpeakerSummary -> f SpeakerSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> SpeakerSummary
-> f SpeakerSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
speakerSummary_generatedSpeakerId :: Lens.Lens' SpeakerSummary (Prelude.Maybe Prelude.Text)
speakerSummary_generatedSpeakerId :: (Maybe Text -> f (Maybe Text))
-> SpeakerSummary -> f SpeakerSummary
speakerSummary_generatedSpeakerId = (SpeakerSummary -> Maybe Text)
-> (SpeakerSummary -> Maybe Text -> SpeakerSummary)
-> Lens SpeakerSummary SpeakerSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SpeakerSummary' {Maybe Text
generatedSpeakerId :: Maybe Text
$sel:generatedSpeakerId:SpeakerSummary' :: SpeakerSummary -> Maybe Text
generatedSpeakerId} -> Maybe Text
generatedSpeakerId) (\s :: SpeakerSummary
s@SpeakerSummary' {} Maybe Text
a -> SpeakerSummary
s {$sel:generatedSpeakerId:SpeakerSummary' :: Maybe Text
generatedSpeakerId = Maybe Text
a} :: SpeakerSummary)
instance Core.FromJSON SpeakerSummary where
parseJSON :: Value -> Parser SpeakerSummary
parseJSON =
String
-> (Object -> Parser SpeakerSummary)
-> Value
-> Parser SpeakerSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"SpeakerSummary"
( \Object
x ->
Maybe SpeakerStatus
-> Maybe (Sensitive Text)
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> SpeakerSummary
SpeakerSummary'
(Maybe SpeakerStatus
-> Maybe (Sensitive Text)
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> SpeakerSummary)
-> Parser (Maybe SpeakerStatus)
-> Parser
(Maybe (Sensitive Text)
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> SpeakerSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe SpeakerStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
Parser
(Maybe (Sensitive Text)
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> SpeakerSummary)
-> Parser (Maybe (Sensitive Text))
-> Parser
(Maybe POSIX
-> Maybe Text -> Maybe POSIX -> Maybe Text -> SpeakerSummary)
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
"CustomerSpeakerId")
Parser
(Maybe POSIX
-> Maybe Text -> Maybe POSIX -> Maybe Text -> SpeakerSummary)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text -> Maybe POSIX -> Maybe Text -> SpeakerSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreatedAt")
Parser (Maybe Text -> Maybe POSIX -> Maybe Text -> SpeakerSummary)
-> Parser (Maybe Text)
-> Parser (Maybe POSIX -> Maybe Text -> SpeakerSummary)
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
"DomainId")
Parser (Maybe POSIX -> Maybe Text -> SpeakerSummary)
-> Parser (Maybe POSIX) -> Parser (Maybe Text -> SpeakerSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"UpdatedAt")
Parser (Maybe Text -> SpeakerSummary)
-> Parser (Maybe Text) -> Parser SpeakerSummary
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
"GeneratedSpeakerId")
)
instance Prelude.Hashable SpeakerSummary
instance Prelude.NFData SpeakerSummary