{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.LexRuntime.PutSession
(
PutSession (..),
newPutSession,
putSession_accept,
putSession_activeContexts,
putSession_recentIntentSummaryView,
putSession_dialogAction,
putSession_sessionAttributes,
putSession_botName,
putSession_botAlias,
putSession_userId,
PutSessionResponse (..),
newPutSessionResponse,
putSessionResponse_slots,
putSessionResponse_intentName,
putSessionResponse_encodedMessage,
putSessionResponse_dialogState,
putSessionResponse_activeContexts,
putSessionResponse_messageFormat,
putSessionResponse_message,
putSessionResponse_sessionId,
putSessionResponse_slotToElicit,
putSessionResponse_contentType,
putSessionResponse_sessionAttributes,
putSessionResponse_httpStatus,
putSessionResponse_audioStream,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.LexRuntime.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data PutSession = PutSession'
{
PutSession -> Maybe Text
accept :: Prelude.Maybe Prelude.Text,
PutSession -> Maybe (Sensitive [ActiveContext])
activeContexts :: Prelude.Maybe (Core.Sensitive [ActiveContext]),
PutSession -> Maybe [IntentSummary]
recentIntentSummaryView :: Prelude.Maybe [IntentSummary],
PutSession -> Maybe DialogAction
dialogAction :: Prelude.Maybe DialogAction,
PutSession -> Maybe (Sensitive (HashMap Text Text))
sessionAttributes :: Prelude.Maybe (Core.Sensitive (Prelude.HashMap Prelude.Text Prelude.Text)),
PutSession -> Text
botName :: Prelude.Text,
PutSession -> Text
botAlias :: Prelude.Text,
PutSession -> Text
userId :: Prelude.Text
}
deriving (PutSession -> PutSession -> Bool
(PutSession -> PutSession -> Bool)
-> (PutSession -> PutSession -> Bool) -> Eq PutSession
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutSession -> PutSession -> Bool
$c/= :: PutSession -> PutSession -> Bool
== :: PutSession -> PutSession -> Bool
$c== :: PutSession -> PutSession -> Bool
Prelude.Eq, Int -> PutSession -> ShowS
[PutSession] -> ShowS
PutSession -> String
(Int -> PutSession -> ShowS)
-> (PutSession -> String)
-> ([PutSession] -> ShowS)
-> Show PutSession
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutSession] -> ShowS
$cshowList :: [PutSession] -> ShowS
show :: PutSession -> String
$cshow :: PutSession -> String
showsPrec :: Int -> PutSession -> ShowS
$cshowsPrec :: Int -> PutSession -> ShowS
Prelude.Show, (forall x. PutSession -> Rep PutSession x)
-> (forall x. Rep PutSession x -> PutSession) -> Generic PutSession
forall x. Rep PutSession x -> PutSession
forall x. PutSession -> Rep PutSession x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PutSession x -> PutSession
$cfrom :: forall x. PutSession -> Rep PutSession x
Prelude.Generic)
newPutSession ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
PutSession
newPutSession :: Text -> Text -> Text -> PutSession
newPutSession Text
pBotName_ Text
pBotAlias_ Text
pUserId_ =
PutSession' :: Maybe Text
-> Maybe (Sensitive [ActiveContext])
-> Maybe [IntentSummary]
-> Maybe DialogAction
-> Maybe (Sensitive (HashMap Text Text))
-> Text
-> Text
-> Text
-> PutSession
PutSession'
{ $sel:accept:PutSession' :: Maybe Text
accept = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:activeContexts:PutSession' :: Maybe (Sensitive [ActiveContext])
activeContexts = Maybe (Sensitive [ActiveContext])
forall a. Maybe a
Prelude.Nothing,
$sel:recentIntentSummaryView:PutSession' :: Maybe [IntentSummary]
recentIntentSummaryView = Maybe [IntentSummary]
forall a. Maybe a
Prelude.Nothing,
$sel:dialogAction:PutSession' :: Maybe DialogAction
dialogAction = Maybe DialogAction
forall a. Maybe a
Prelude.Nothing,
$sel:sessionAttributes:PutSession' :: Maybe (Sensitive (HashMap Text Text))
sessionAttributes = Maybe (Sensitive (HashMap Text Text))
forall a. Maybe a
Prelude.Nothing,
$sel:botName:PutSession' :: Text
botName = Text
pBotName_,
$sel:botAlias:PutSession' :: Text
botAlias = Text
pBotAlias_,
$sel:userId:PutSession' :: Text
userId = Text
pUserId_
}
putSession_accept :: Lens.Lens' PutSession (Prelude.Maybe Prelude.Text)
putSession_accept :: (Maybe Text -> f (Maybe Text)) -> PutSession -> f PutSession
putSession_accept = (PutSession -> Maybe Text)
-> (PutSession -> Maybe Text -> PutSession)
-> Lens PutSession PutSession (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutSession' {Maybe Text
accept :: Maybe Text
$sel:accept:PutSession' :: PutSession -> Maybe Text
accept} -> Maybe Text
accept) (\s :: PutSession
s@PutSession' {} Maybe Text
a -> PutSession
s {$sel:accept:PutSession' :: Maybe Text
accept = Maybe Text
a} :: PutSession)
putSession_activeContexts :: Lens.Lens' PutSession (Prelude.Maybe [ActiveContext])
putSession_activeContexts :: (Maybe [ActiveContext] -> f (Maybe [ActiveContext]))
-> PutSession -> f PutSession
putSession_activeContexts = (PutSession -> Maybe (Sensitive [ActiveContext]))
-> (PutSession -> Maybe (Sensitive [ActiveContext]) -> PutSession)
-> Lens
PutSession
PutSession
(Maybe (Sensitive [ActiveContext]))
(Maybe (Sensitive [ActiveContext]))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutSession' {Maybe (Sensitive [ActiveContext])
activeContexts :: Maybe (Sensitive [ActiveContext])
$sel:activeContexts:PutSession' :: PutSession -> Maybe (Sensitive [ActiveContext])
activeContexts} -> Maybe (Sensitive [ActiveContext])
activeContexts) (\s :: PutSession
s@PutSession' {} Maybe (Sensitive [ActiveContext])
a -> PutSession
s {$sel:activeContexts:PutSession' :: Maybe (Sensitive [ActiveContext])
activeContexts = Maybe (Sensitive [ActiveContext])
a} :: PutSession) ((Maybe (Sensitive [ActiveContext])
-> f (Maybe (Sensitive [ActiveContext])))
-> PutSession -> f PutSession)
-> ((Maybe [ActiveContext] -> f (Maybe [ActiveContext]))
-> Maybe (Sensitive [ActiveContext])
-> f (Maybe (Sensitive [ActiveContext])))
-> (Maybe [ActiveContext] -> f (Maybe [ActiveContext]))
-> PutSession
-> f PutSession
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(Sensitive [ActiveContext])
(Sensitive [ActiveContext])
[ActiveContext]
[ActiveContext]
-> Iso
(Maybe (Sensitive [ActiveContext]))
(Maybe (Sensitive [ActiveContext]))
(Maybe [ActiveContext])
(Maybe [ActiveContext])
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 [ActiveContext])
(Sensitive [ActiveContext])
[ActiveContext]
[ActiveContext]
forall a. Iso' (Sensitive a) a
Core._Sensitive AnIso
(Sensitive [ActiveContext])
(Sensitive [ActiveContext])
[ActiveContext]
[ActiveContext]
-> (Exchange
[ActiveContext]
[ActiveContext]
[ActiveContext]
(Identity [ActiveContext])
-> Exchange
[ActiveContext]
[ActiveContext]
[ActiveContext]
(Identity [ActiveContext]))
-> AnIso
(Sensitive [ActiveContext])
(Sensitive [ActiveContext])
[ActiveContext]
[ActiveContext]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Exchange
[ActiveContext]
[ActiveContext]
[ActiveContext]
(Identity [ActiveContext])
-> Exchange
[ActiveContext]
[ActiveContext]
[ActiveContext]
(Identity [ActiveContext])
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced)
putSession_recentIntentSummaryView :: Lens.Lens' PutSession (Prelude.Maybe [IntentSummary])
putSession_recentIntentSummaryView :: (Maybe [IntentSummary] -> f (Maybe [IntentSummary]))
-> PutSession -> f PutSession
putSession_recentIntentSummaryView = (PutSession -> Maybe [IntentSummary])
-> (PutSession -> Maybe [IntentSummary] -> PutSession)
-> Lens
PutSession
PutSession
(Maybe [IntentSummary])
(Maybe [IntentSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutSession' {Maybe [IntentSummary]
recentIntentSummaryView :: Maybe [IntentSummary]
$sel:recentIntentSummaryView:PutSession' :: PutSession -> Maybe [IntentSummary]
recentIntentSummaryView} -> Maybe [IntentSummary]
recentIntentSummaryView) (\s :: PutSession
s@PutSession' {} Maybe [IntentSummary]
a -> PutSession
s {$sel:recentIntentSummaryView:PutSession' :: Maybe [IntentSummary]
recentIntentSummaryView = Maybe [IntentSummary]
a} :: PutSession) ((Maybe [IntentSummary] -> f (Maybe [IntentSummary]))
-> PutSession -> f PutSession)
-> ((Maybe [IntentSummary] -> f (Maybe [IntentSummary]))
-> Maybe [IntentSummary] -> f (Maybe [IntentSummary]))
-> (Maybe [IntentSummary] -> f (Maybe [IntentSummary]))
-> PutSession
-> f PutSession
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[IntentSummary] [IntentSummary] [IntentSummary] [IntentSummary]
-> Iso
(Maybe [IntentSummary])
(Maybe [IntentSummary])
(Maybe [IntentSummary])
(Maybe [IntentSummary])
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
[IntentSummary] [IntentSummary] [IntentSummary] [IntentSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
putSession_dialogAction :: Lens.Lens' PutSession (Prelude.Maybe DialogAction)
putSession_dialogAction :: (Maybe DialogAction -> f (Maybe DialogAction))
-> PutSession -> f PutSession
putSession_dialogAction = (PutSession -> Maybe DialogAction)
-> (PutSession -> Maybe DialogAction -> PutSession)
-> Lens
PutSession PutSession (Maybe DialogAction) (Maybe DialogAction)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutSession' {Maybe DialogAction
dialogAction :: Maybe DialogAction
$sel:dialogAction:PutSession' :: PutSession -> Maybe DialogAction
dialogAction} -> Maybe DialogAction
dialogAction) (\s :: PutSession
s@PutSession' {} Maybe DialogAction
a -> PutSession
s {$sel:dialogAction:PutSession' :: Maybe DialogAction
dialogAction = Maybe DialogAction
a} :: PutSession)
putSession_sessionAttributes :: Lens.Lens' PutSession (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
putSession_sessionAttributes :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> PutSession -> f PutSession
putSession_sessionAttributes = (PutSession -> Maybe (Sensitive (HashMap Text Text)))
-> (PutSession
-> Maybe (Sensitive (HashMap Text Text)) -> PutSession)
-> Lens
PutSession
PutSession
(Maybe (Sensitive (HashMap Text Text)))
(Maybe (Sensitive (HashMap Text Text)))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutSession' {Maybe (Sensitive (HashMap Text Text))
sessionAttributes :: Maybe (Sensitive (HashMap Text Text))
$sel:sessionAttributes:PutSession' :: PutSession -> Maybe (Sensitive (HashMap Text Text))
sessionAttributes} -> Maybe (Sensitive (HashMap Text Text))
sessionAttributes) (\s :: PutSession
s@PutSession' {} Maybe (Sensitive (HashMap Text Text))
a -> PutSession
s {$sel:sessionAttributes:PutSession' :: Maybe (Sensitive (HashMap Text Text))
sessionAttributes = Maybe (Sensitive (HashMap Text Text))
a} :: PutSession) ((Maybe (Sensitive (HashMap Text Text))
-> f (Maybe (Sensitive (HashMap Text Text))))
-> PutSession -> f PutSession)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (Sensitive (HashMap Text Text))
-> f (Maybe (Sensitive (HashMap Text Text))))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> PutSession
-> f PutSession
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(Sensitive (HashMap Text Text))
(Sensitive (HashMap Text Text))
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (Sensitive (HashMap Text Text)))
(Maybe (Sensitive (HashMap Text Text)))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text 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 (HashMap Text Text))
(Sensitive (HashMap Text Text))
(HashMap Text Text)
(HashMap Text Text)
forall a. Iso' (Sensitive a) a
Core._Sensitive AnIso
(Sensitive (HashMap Text Text))
(Sensitive (HashMap Text Text))
(HashMap Text Text)
(HashMap Text Text)
-> (Exchange
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(Identity (HashMap Text Text))
-> Exchange
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(Identity (HashMap Text Text)))
-> AnIso
(Sensitive (HashMap Text Text))
(Sensitive (HashMap Text Text))
(HashMap Text Text)
(HashMap Text Text)
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Exchange
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(Identity (HashMap Text Text))
-> Exchange
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(Identity (HashMap Text Text))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced)
putSession_botName :: Lens.Lens' PutSession Prelude.Text
putSession_botName :: (Text -> f Text) -> PutSession -> f PutSession
putSession_botName = (PutSession -> Text)
-> (PutSession -> Text -> PutSession)
-> Lens PutSession PutSession Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutSession' {Text
botName :: Text
$sel:botName:PutSession' :: PutSession -> Text
botName} -> Text
botName) (\s :: PutSession
s@PutSession' {} Text
a -> PutSession
s {$sel:botName:PutSession' :: Text
botName = Text
a} :: PutSession)
putSession_botAlias :: Lens.Lens' PutSession Prelude.Text
putSession_botAlias :: (Text -> f Text) -> PutSession -> f PutSession
putSession_botAlias = (PutSession -> Text)
-> (PutSession -> Text -> PutSession)
-> Lens PutSession PutSession Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutSession' {Text
botAlias :: Text
$sel:botAlias:PutSession' :: PutSession -> Text
botAlias} -> Text
botAlias) (\s :: PutSession
s@PutSession' {} Text
a -> PutSession
s {$sel:botAlias:PutSession' :: Text
botAlias = Text
a} :: PutSession)
putSession_userId :: Lens.Lens' PutSession Prelude.Text
putSession_userId :: (Text -> f Text) -> PutSession -> f PutSession
putSession_userId = (PutSession -> Text)
-> (PutSession -> Text -> PutSession)
-> Lens PutSession PutSession Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutSession' {Text
userId :: Text
$sel:userId:PutSession' :: PutSession -> Text
userId} -> Text
userId) (\s :: PutSession
s@PutSession' {} Text
a -> PutSession
s {$sel:userId:PutSession' :: Text
userId = Text
a} :: PutSession)
instance Core.AWSRequest PutSession where
type AWSResponse PutSession = PutSessionResponse
request :: PutSession -> Request PutSession
request = Service -> PutSession -> Request PutSession
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy PutSession
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse PutSession)))
response =
(Int
-> ResponseHeaders
-> ResponseBody
-> Either String (AWSResponse PutSession))
-> Logger
-> Service
-> Proxy PutSession
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse PutSession)))
forall (m :: * -> *) a.
MonadResource m =>
(Int
-> ResponseHeaders
-> ResponseBody
-> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveBody
( \Int
s ResponseHeaders
h ResponseBody
x ->
Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe DialogState
-> Maybe (Sensitive Text)
-> Maybe MessageFormatType
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> ResponseBody
-> PutSessionResponse
PutSessionResponse'
(Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe DialogState
-> Maybe (Sensitive Text)
-> Maybe MessageFormatType
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> ResponseBody
-> PutSessionResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe (Sensitive Text)
-> Maybe DialogState
-> Maybe (Sensitive Text)
-> Maybe MessageFormatType
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> ResponseBody
-> PutSessionResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (ResponseHeaders
h ResponseHeaders -> HeaderName -> Either String (Maybe Text)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"x-amz-lex-slots")
Either
String
(Maybe Text
-> Maybe (Sensitive Text)
-> Maybe DialogState
-> Maybe (Sensitive Text)
-> Maybe MessageFormatType
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> ResponseBody
-> PutSessionResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe (Sensitive Text)
-> Maybe DialogState
-> Maybe (Sensitive Text)
-> Maybe MessageFormatType
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> ResponseBody
-> PutSessionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders -> HeaderName -> Either String (Maybe Text)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"x-amz-lex-intent-name")
Either
String
(Maybe (Sensitive Text)
-> Maybe DialogState
-> Maybe (Sensitive Text)
-> Maybe MessageFormatType
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> ResponseBody
-> PutSessionResponse)
-> Either String (Maybe (Sensitive Text))
-> Either
String
(Maybe DialogState
-> Maybe (Sensitive Text)
-> Maybe MessageFormatType
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> ResponseBody
-> PutSessionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders
-> HeaderName -> Either String (Maybe (Sensitive Text))
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"x-amz-lex-encoded-message")
Either
String
(Maybe DialogState
-> Maybe (Sensitive Text)
-> Maybe MessageFormatType
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> ResponseBody
-> PutSessionResponse)
-> Either String (Maybe DialogState)
-> Either
String
(Maybe (Sensitive Text)
-> Maybe MessageFormatType
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> ResponseBody
-> PutSessionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders -> HeaderName -> Either String (Maybe DialogState)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"x-amz-lex-dialog-state")
Either
String
(Maybe (Sensitive Text)
-> Maybe MessageFormatType
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> ResponseBody
-> PutSessionResponse)
-> Either String (Maybe (Sensitive Text))
-> Either
String
(Maybe MessageFormatType
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> ResponseBody
-> PutSessionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders
-> HeaderName -> Either String (Maybe (Sensitive Text))
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"x-amz-lex-active-contexts")
Either
String
(Maybe MessageFormatType
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> ResponseBody
-> PutSessionResponse)
-> Either String (Maybe MessageFormatType)
-> Either
String
(Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> ResponseBody
-> PutSessionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders
-> HeaderName -> Either String (Maybe MessageFormatType)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"x-amz-lex-message-format")
Either
String
(Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> ResponseBody
-> PutSessionResponse)
-> Either String (Maybe (Sensitive Text))
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> ResponseBody
-> PutSessionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders
-> HeaderName -> Either String (Maybe (Sensitive Text))
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"x-amz-lex-message")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> ResponseBody
-> PutSessionResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> ResponseBody
-> PutSessionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders -> HeaderName -> Either String (Maybe Text)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"x-amz-lex-session-id")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> ResponseBody
-> PutSessionResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text -> Int -> ResponseBody -> PutSessionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders -> HeaderName -> Either String (Maybe Text)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"x-amz-lex-slot-to-elicit")
Either
String
(Maybe Text
-> Maybe Text -> Int -> ResponseBody -> PutSessionResponse)
-> Either String (Maybe Text)
-> Either
String (Maybe Text -> Int -> ResponseBody -> PutSessionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders -> HeaderName -> Either String (Maybe Text)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"Content-Type")
Either
String (Maybe Text -> Int -> ResponseBody -> PutSessionResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ResponseBody -> PutSessionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders -> HeaderName -> Either String (Maybe Text)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"x-amz-lex-session-attributes")
Either String (Int -> ResponseBody -> PutSessionResponse)
-> Either String Int
-> Either String (ResponseBody -> PutSessionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
Either String (ResponseBody -> PutSessionResponse)
-> Either String ResponseBody -> Either String PutSessionResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseBody -> Either String ResponseBody
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure ResponseBody
x)
)
instance Prelude.Hashable PutSession
instance Prelude.NFData PutSession
instance Core.ToHeaders PutSession where
toHeaders :: PutSession -> ResponseHeaders
toHeaders PutSession' {Maybe [IntentSummary]
Maybe Text
Maybe (Sensitive [ActiveContext])
Maybe (Sensitive (HashMap Text Text))
Maybe DialogAction
Text
userId :: Text
botAlias :: Text
botName :: Text
sessionAttributes :: Maybe (Sensitive (HashMap Text Text))
dialogAction :: Maybe DialogAction
recentIntentSummaryView :: Maybe [IntentSummary]
activeContexts :: Maybe (Sensitive [ActiveContext])
accept :: Maybe Text
$sel:userId:PutSession' :: PutSession -> Text
$sel:botAlias:PutSession' :: PutSession -> Text
$sel:botName:PutSession' :: PutSession -> Text
$sel:sessionAttributes:PutSession' :: PutSession -> Maybe (Sensitive (HashMap Text Text))
$sel:dialogAction:PutSession' :: PutSession -> Maybe DialogAction
$sel:recentIntentSummaryView:PutSession' :: PutSession -> Maybe [IntentSummary]
$sel:activeContexts:PutSession' :: PutSession -> Maybe (Sensitive [ActiveContext])
$sel:accept:PutSession' :: PutSession -> Maybe Text
..} =
[ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Accept" HeaderName -> Maybe Text -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe Text
accept,
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# (ByteString
"application/x-amz-json-1.1" :: Prelude.ByteString)
]
instance Core.ToJSON PutSession where
toJSON :: PutSession -> Value
toJSON PutSession' {Maybe [IntentSummary]
Maybe Text
Maybe (Sensitive [ActiveContext])
Maybe (Sensitive (HashMap Text Text))
Maybe DialogAction
Text
userId :: Text
botAlias :: Text
botName :: Text
sessionAttributes :: Maybe (Sensitive (HashMap Text Text))
dialogAction :: Maybe DialogAction
recentIntentSummaryView :: Maybe [IntentSummary]
activeContexts :: Maybe (Sensitive [ActiveContext])
accept :: Maybe Text
$sel:userId:PutSession' :: PutSession -> Text
$sel:botAlias:PutSession' :: PutSession -> Text
$sel:botName:PutSession' :: PutSession -> Text
$sel:sessionAttributes:PutSession' :: PutSession -> Maybe (Sensitive (HashMap Text Text))
$sel:dialogAction:PutSession' :: PutSession -> Maybe DialogAction
$sel:recentIntentSummaryView:PutSession' :: PutSession -> Maybe [IntentSummary]
$sel:activeContexts:PutSession' :: PutSession -> Maybe (Sensitive [ActiveContext])
$sel:accept:PutSession' :: PutSession -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"activeContexts" Text -> Sensitive [ActiveContext] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Sensitive [ActiveContext] -> Pair)
-> Maybe (Sensitive [ActiveContext]) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive [ActiveContext])
activeContexts,
(Text
"recentIntentSummaryView" Text -> [IntentSummary] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([IntentSummary] -> Pair) -> Maybe [IntentSummary] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [IntentSummary]
recentIntentSummaryView,
(Text
"dialogAction" Text -> DialogAction -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (DialogAction -> Pair) -> Maybe DialogAction -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DialogAction
dialogAction,
(Text
"sessionAttributes" Text -> Sensitive (HashMap Text Text) -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Sensitive (HashMap Text Text) -> Pair)
-> Maybe (Sensitive (HashMap Text Text)) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive (HashMap Text Text))
sessionAttributes
]
)
instance Core.ToPath PutSession where
toPath :: PutSession -> ByteString
toPath PutSession' {Maybe [IntentSummary]
Maybe Text
Maybe (Sensitive [ActiveContext])
Maybe (Sensitive (HashMap Text Text))
Maybe DialogAction
Text
userId :: Text
botAlias :: Text
botName :: Text
sessionAttributes :: Maybe (Sensitive (HashMap Text Text))
dialogAction :: Maybe DialogAction
recentIntentSummaryView :: Maybe [IntentSummary]
activeContexts :: Maybe (Sensitive [ActiveContext])
accept :: Maybe Text
$sel:userId:PutSession' :: PutSession -> Text
$sel:botAlias:PutSession' :: PutSession -> Text
$sel:botName:PutSession' :: PutSession -> Text
$sel:sessionAttributes:PutSession' :: PutSession -> Maybe (Sensitive (HashMap Text Text))
$sel:dialogAction:PutSession' :: PutSession -> Maybe DialogAction
$sel:recentIntentSummaryView:PutSession' :: PutSession -> Maybe [IntentSummary]
$sel:activeContexts:PutSession' :: PutSession -> Maybe (Sensitive [ActiveContext])
$sel:accept:PutSession' :: PutSession -> Maybe Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/bot/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
botName,
ByteString
"/alias/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
botAlias,
ByteString
"/user/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
userId,
ByteString
"/session"
]
instance Core.ToQuery PutSession where
toQuery :: PutSession -> QueryString
toQuery = QueryString -> PutSession -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data PutSessionResponse = PutSessionResponse'
{
PutSessionResponse -> Maybe Text
slots :: Prelude.Maybe Prelude.Text,
PutSessionResponse -> Maybe Text
intentName :: Prelude.Maybe Prelude.Text,
PutSessionResponse -> Maybe (Sensitive Text)
encodedMessage :: Prelude.Maybe (Core.Sensitive Prelude.Text),
PutSessionResponse -> Maybe DialogState
dialogState :: Prelude.Maybe DialogState,
PutSessionResponse -> Maybe (Sensitive Text)
activeContexts :: Prelude.Maybe (Core.Sensitive Prelude.Text),
PutSessionResponse -> Maybe MessageFormatType
messageFormat :: Prelude.Maybe MessageFormatType,
PutSessionResponse -> Maybe (Sensitive Text)
message :: Prelude.Maybe (Core.Sensitive Prelude.Text),
PutSessionResponse -> Maybe Text
sessionId :: Prelude.Maybe Prelude.Text,
PutSessionResponse -> Maybe Text
slotToElicit :: Prelude.Maybe Prelude.Text,
PutSessionResponse -> Maybe Text
contentType :: Prelude.Maybe Prelude.Text,
PutSessionResponse -> Maybe Text
sessionAttributes :: Prelude.Maybe Prelude.Text,
PutSessionResponse -> Int
httpStatus :: Prelude.Int,
PutSessionResponse -> ResponseBody
audioStream :: Core.ResponseBody
}
deriving (Int -> PutSessionResponse -> ShowS
[PutSessionResponse] -> ShowS
PutSessionResponse -> String
(Int -> PutSessionResponse -> ShowS)
-> (PutSessionResponse -> String)
-> ([PutSessionResponse] -> ShowS)
-> Show PutSessionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutSessionResponse] -> ShowS
$cshowList :: [PutSessionResponse] -> ShowS
show :: PutSessionResponse -> String
$cshow :: PutSessionResponse -> String
showsPrec :: Int -> PutSessionResponse -> ShowS
$cshowsPrec :: Int -> PutSessionResponse -> ShowS
Prelude.Show, (forall x. PutSessionResponse -> Rep PutSessionResponse x)
-> (forall x. Rep PutSessionResponse x -> PutSessionResponse)
-> Generic PutSessionResponse
forall x. Rep PutSessionResponse x -> PutSessionResponse
forall x. PutSessionResponse -> Rep PutSessionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PutSessionResponse x -> PutSessionResponse
$cfrom :: forall x. PutSessionResponse -> Rep PutSessionResponse x
Prelude.Generic)
newPutSessionResponse ::
Prelude.Int ->
Core.ResponseBody ->
PutSessionResponse
newPutSessionResponse :: Int -> ResponseBody -> PutSessionResponse
newPutSessionResponse Int
pHttpStatus_ ResponseBody
pAudioStream_ =
PutSessionResponse' :: Maybe Text
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe DialogState
-> Maybe (Sensitive Text)
-> Maybe MessageFormatType
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> ResponseBody
-> PutSessionResponse
PutSessionResponse'
{ $sel:slots:PutSessionResponse' :: Maybe Text
slots = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:intentName:PutSessionResponse' :: Maybe Text
intentName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:encodedMessage:PutSessionResponse' :: Maybe (Sensitive Text)
encodedMessage = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:dialogState:PutSessionResponse' :: Maybe DialogState
dialogState = Maybe DialogState
forall a. Maybe a
Prelude.Nothing,
$sel:activeContexts:PutSessionResponse' :: Maybe (Sensitive Text)
activeContexts = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:messageFormat:PutSessionResponse' :: Maybe MessageFormatType
messageFormat = Maybe MessageFormatType
forall a. Maybe a
Prelude.Nothing,
$sel:message:PutSessionResponse' :: Maybe (Sensitive Text)
message = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:sessionId:PutSessionResponse' :: Maybe Text
sessionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:slotToElicit:PutSessionResponse' :: Maybe Text
slotToElicit = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:contentType:PutSessionResponse' :: Maybe Text
contentType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:sessionAttributes:PutSessionResponse' :: Maybe Text
sessionAttributes = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:PutSessionResponse' :: Int
httpStatus = Int
pHttpStatus_,
$sel:audioStream:PutSessionResponse' :: ResponseBody
audioStream = ResponseBody
pAudioStream_
}
putSessionResponse_slots :: Lens.Lens' PutSessionResponse (Prelude.Maybe Prelude.Text)
putSessionResponse_slots :: (Maybe Text -> f (Maybe Text))
-> PutSessionResponse -> f PutSessionResponse
putSessionResponse_slots = (PutSessionResponse -> Maybe Text)
-> (PutSessionResponse -> Maybe Text -> PutSessionResponse)
-> Lens
PutSessionResponse PutSessionResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutSessionResponse' {Maybe Text
slots :: Maybe Text
$sel:slots:PutSessionResponse' :: PutSessionResponse -> Maybe Text
slots} -> Maybe Text
slots) (\s :: PutSessionResponse
s@PutSessionResponse' {} Maybe Text
a -> PutSessionResponse
s {$sel:slots:PutSessionResponse' :: Maybe Text
slots = Maybe Text
a} :: PutSessionResponse)
putSessionResponse_intentName :: Lens.Lens' PutSessionResponse (Prelude.Maybe Prelude.Text)
putSessionResponse_intentName :: (Maybe Text -> f (Maybe Text))
-> PutSessionResponse -> f PutSessionResponse
putSessionResponse_intentName = (PutSessionResponse -> Maybe Text)
-> (PutSessionResponse -> Maybe Text -> PutSessionResponse)
-> Lens
PutSessionResponse PutSessionResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutSessionResponse' {Maybe Text
intentName :: Maybe Text
$sel:intentName:PutSessionResponse' :: PutSessionResponse -> Maybe Text
intentName} -> Maybe Text
intentName) (\s :: PutSessionResponse
s@PutSessionResponse' {} Maybe Text
a -> PutSessionResponse
s {$sel:intentName:PutSessionResponse' :: Maybe Text
intentName = Maybe Text
a} :: PutSessionResponse)
putSessionResponse_encodedMessage :: Lens.Lens' PutSessionResponse (Prelude.Maybe Prelude.Text)
putSessionResponse_encodedMessage :: (Maybe Text -> f (Maybe Text))
-> PutSessionResponse -> f PutSessionResponse
putSessionResponse_encodedMessage = (PutSessionResponse -> Maybe (Sensitive Text))
-> (PutSessionResponse
-> Maybe (Sensitive Text) -> PutSessionResponse)
-> Lens
PutSessionResponse
PutSessionResponse
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutSessionResponse' {Maybe (Sensitive Text)
encodedMessage :: Maybe (Sensitive Text)
$sel:encodedMessage:PutSessionResponse' :: PutSessionResponse -> Maybe (Sensitive Text)
encodedMessage} -> Maybe (Sensitive Text)
encodedMessage) (\s :: PutSessionResponse
s@PutSessionResponse' {} Maybe (Sensitive Text)
a -> PutSessionResponse
s {$sel:encodedMessage:PutSessionResponse' :: Maybe (Sensitive Text)
encodedMessage = Maybe (Sensitive Text)
a} :: PutSessionResponse) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> PutSessionResponse -> f PutSessionResponse)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> PutSessionResponse
-> f PutSessionResponse
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
putSessionResponse_dialogState :: Lens.Lens' PutSessionResponse (Prelude.Maybe DialogState)
putSessionResponse_dialogState :: (Maybe DialogState -> f (Maybe DialogState))
-> PutSessionResponse -> f PutSessionResponse
putSessionResponse_dialogState = (PutSessionResponse -> Maybe DialogState)
-> (PutSessionResponse -> Maybe DialogState -> PutSessionResponse)
-> Lens
PutSessionResponse
PutSessionResponse
(Maybe DialogState)
(Maybe DialogState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutSessionResponse' {Maybe DialogState
dialogState :: Maybe DialogState
$sel:dialogState:PutSessionResponse' :: PutSessionResponse -> Maybe DialogState
dialogState} -> Maybe DialogState
dialogState) (\s :: PutSessionResponse
s@PutSessionResponse' {} Maybe DialogState
a -> PutSessionResponse
s {$sel:dialogState:PutSessionResponse' :: Maybe DialogState
dialogState = Maybe DialogState
a} :: PutSessionResponse)
putSessionResponse_activeContexts :: Lens.Lens' PutSessionResponse (Prelude.Maybe Prelude.Text)
putSessionResponse_activeContexts :: (Maybe Text -> f (Maybe Text))
-> PutSessionResponse -> f PutSessionResponse
putSessionResponse_activeContexts = (PutSessionResponse -> Maybe (Sensitive Text))
-> (PutSessionResponse
-> Maybe (Sensitive Text) -> PutSessionResponse)
-> Lens
PutSessionResponse
PutSessionResponse
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutSessionResponse' {Maybe (Sensitive Text)
activeContexts :: Maybe (Sensitive Text)
$sel:activeContexts:PutSessionResponse' :: PutSessionResponse -> Maybe (Sensitive Text)
activeContexts} -> Maybe (Sensitive Text)
activeContexts) (\s :: PutSessionResponse
s@PutSessionResponse' {} Maybe (Sensitive Text)
a -> PutSessionResponse
s {$sel:activeContexts:PutSessionResponse' :: Maybe (Sensitive Text)
activeContexts = Maybe (Sensitive Text)
a} :: PutSessionResponse) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> PutSessionResponse -> f PutSessionResponse)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> PutSessionResponse
-> f PutSessionResponse
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
putSessionResponse_messageFormat :: Lens.Lens' PutSessionResponse (Prelude.Maybe MessageFormatType)
putSessionResponse_messageFormat :: (Maybe MessageFormatType -> f (Maybe MessageFormatType))
-> PutSessionResponse -> f PutSessionResponse
putSessionResponse_messageFormat = (PutSessionResponse -> Maybe MessageFormatType)
-> (PutSessionResponse
-> Maybe MessageFormatType -> PutSessionResponse)
-> Lens
PutSessionResponse
PutSessionResponse
(Maybe MessageFormatType)
(Maybe MessageFormatType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutSessionResponse' {Maybe MessageFormatType
messageFormat :: Maybe MessageFormatType
$sel:messageFormat:PutSessionResponse' :: PutSessionResponse -> Maybe MessageFormatType
messageFormat} -> Maybe MessageFormatType
messageFormat) (\s :: PutSessionResponse
s@PutSessionResponse' {} Maybe MessageFormatType
a -> PutSessionResponse
s {$sel:messageFormat:PutSessionResponse' :: Maybe MessageFormatType
messageFormat = Maybe MessageFormatType
a} :: PutSessionResponse)
putSessionResponse_message :: Lens.Lens' PutSessionResponse (Prelude.Maybe Prelude.Text)
putSessionResponse_message :: (Maybe Text -> f (Maybe Text))
-> PutSessionResponse -> f PutSessionResponse
putSessionResponse_message = (PutSessionResponse -> Maybe (Sensitive Text))
-> (PutSessionResponse
-> Maybe (Sensitive Text) -> PutSessionResponse)
-> Lens
PutSessionResponse
PutSessionResponse
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutSessionResponse' {Maybe (Sensitive Text)
message :: Maybe (Sensitive Text)
$sel:message:PutSessionResponse' :: PutSessionResponse -> Maybe (Sensitive Text)
message} -> Maybe (Sensitive Text)
message) (\s :: PutSessionResponse
s@PutSessionResponse' {} Maybe (Sensitive Text)
a -> PutSessionResponse
s {$sel:message:PutSessionResponse' :: Maybe (Sensitive Text)
message = Maybe (Sensitive Text)
a} :: PutSessionResponse) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> PutSessionResponse -> f PutSessionResponse)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> PutSessionResponse
-> f PutSessionResponse
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
putSessionResponse_sessionId :: Lens.Lens' PutSessionResponse (Prelude.Maybe Prelude.Text)
putSessionResponse_sessionId :: (Maybe Text -> f (Maybe Text))
-> PutSessionResponse -> f PutSessionResponse
putSessionResponse_sessionId = (PutSessionResponse -> Maybe Text)
-> (PutSessionResponse -> Maybe Text -> PutSessionResponse)
-> Lens
PutSessionResponse PutSessionResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutSessionResponse' {Maybe Text
sessionId :: Maybe Text
$sel:sessionId:PutSessionResponse' :: PutSessionResponse -> Maybe Text
sessionId} -> Maybe Text
sessionId) (\s :: PutSessionResponse
s@PutSessionResponse' {} Maybe Text
a -> PutSessionResponse
s {$sel:sessionId:PutSessionResponse' :: Maybe Text
sessionId = Maybe Text
a} :: PutSessionResponse)
putSessionResponse_slotToElicit :: Lens.Lens' PutSessionResponse (Prelude.Maybe Prelude.Text)
putSessionResponse_slotToElicit :: (Maybe Text -> f (Maybe Text))
-> PutSessionResponse -> f PutSessionResponse
putSessionResponse_slotToElicit = (PutSessionResponse -> Maybe Text)
-> (PutSessionResponse -> Maybe Text -> PutSessionResponse)
-> Lens
PutSessionResponse PutSessionResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutSessionResponse' {Maybe Text
slotToElicit :: Maybe Text
$sel:slotToElicit:PutSessionResponse' :: PutSessionResponse -> Maybe Text
slotToElicit} -> Maybe Text
slotToElicit) (\s :: PutSessionResponse
s@PutSessionResponse' {} Maybe Text
a -> PutSessionResponse
s {$sel:slotToElicit:PutSessionResponse' :: Maybe Text
slotToElicit = Maybe Text
a} :: PutSessionResponse)
putSessionResponse_contentType :: Lens.Lens' PutSessionResponse (Prelude.Maybe Prelude.Text)
putSessionResponse_contentType :: (Maybe Text -> f (Maybe Text))
-> PutSessionResponse -> f PutSessionResponse
putSessionResponse_contentType = (PutSessionResponse -> Maybe Text)
-> (PutSessionResponse -> Maybe Text -> PutSessionResponse)
-> Lens
PutSessionResponse PutSessionResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutSessionResponse' {Maybe Text
contentType :: Maybe Text
$sel:contentType:PutSessionResponse' :: PutSessionResponse -> Maybe Text
contentType} -> Maybe Text
contentType) (\s :: PutSessionResponse
s@PutSessionResponse' {} Maybe Text
a -> PutSessionResponse
s {$sel:contentType:PutSessionResponse' :: Maybe Text
contentType = Maybe Text
a} :: PutSessionResponse)
putSessionResponse_sessionAttributes :: Lens.Lens' PutSessionResponse (Prelude.Maybe Prelude.Text)
putSessionResponse_sessionAttributes :: (Maybe Text -> f (Maybe Text))
-> PutSessionResponse -> f PutSessionResponse
putSessionResponse_sessionAttributes = (PutSessionResponse -> Maybe Text)
-> (PutSessionResponse -> Maybe Text -> PutSessionResponse)
-> Lens
PutSessionResponse PutSessionResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutSessionResponse' {Maybe Text
sessionAttributes :: Maybe Text
$sel:sessionAttributes:PutSessionResponse' :: PutSessionResponse -> Maybe Text
sessionAttributes} -> Maybe Text
sessionAttributes) (\s :: PutSessionResponse
s@PutSessionResponse' {} Maybe Text
a -> PutSessionResponse
s {$sel:sessionAttributes:PutSessionResponse' :: Maybe Text
sessionAttributes = Maybe Text
a} :: PutSessionResponse)
putSessionResponse_httpStatus :: Lens.Lens' PutSessionResponse Prelude.Int
putSessionResponse_httpStatus :: (Int -> f Int) -> PutSessionResponse -> f PutSessionResponse
putSessionResponse_httpStatus = (PutSessionResponse -> Int)
-> (PutSessionResponse -> Int -> PutSessionResponse)
-> Lens PutSessionResponse PutSessionResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutSessionResponse' {Int
httpStatus :: Int
$sel:httpStatus:PutSessionResponse' :: PutSessionResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: PutSessionResponse
s@PutSessionResponse' {} Int
a -> PutSessionResponse
s {$sel:httpStatus:PutSessionResponse' :: Int
httpStatus = Int
a} :: PutSessionResponse)
putSessionResponse_audioStream :: Lens.Lens' PutSessionResponse Core.ResponseBody
putSessionResponse_audioStream :: (ResponseBody -> f ResponseBody)
-> PutSessionResponse -> f PutSessionResponse
putSessionResponse_audioStream = (PutSessionResponse -> ResponseBody)
-> (PutSessionResponse -> ResponseBody -> PutSessionResponse)
-> Lens
PutSessionResponse PutSessionResponse ResponseBody ResponseBody
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutSessionResponse' {ResponseBody
audioStream :: ResponseBody
$sel:audioStream:PutSessionResponse' :: PutSessionResponse -> ResponseBody
audioStream} -> ResponseBody
audioStream) (\s :: PutSessionResponse
s@PutSessionResponse' {} ResponseBody
a -> PutSessionResponse
s {$sel:audioStream:PutSessionResponse' :: ResponseBody
audioStream = ResponseBody
a} :: PutSessionResponse)