{-# 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.LexModels.PutBotAlias
(
PutBotAlias (..),
newPutBotAlias,
putBotAlias_checksum,
putBotAlias_conversationLogs,
putBotAlias_description,
putBotAlias_tags,
putBotAlias_name,
putBotAlias_botVersion,
putBotAlias_botName,
PutBotAliasResponse (..),
newPutBotAliasResponse,
putBotAliasResponse_checksum,
putBotAliasResponse_botVersion,
putBotAliasResponse_botName,
putBotAliasResponse_createdDate,
putBotAliasResponse_name,
putBotAliasResponse_conversationLogs,
putBotAliasResponse_lastUpdatedDate,
putBotAliasResponse_description,
putBotAliasResponse_tags,
putBotAliasResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.LexModels.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data PutBotAlias = PutBotAlias'
{
PutBotAlias -> Maybe Text
checksum :: Prelude.Maybe Prelude.Text,
PutBotAlias -> Maybe ConversationLogsRequest
conversationLogs :: Prelude.Maybe ConversationLogsRequest,
PutBotAlias -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
PutBotAlias -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
PutBotAlias -> Text
name :: Prelude.Text,
PutBotAlias -> Text
botVersion :: Prelude.Text,
PutBotAlias -> Text
botName :: Prelude.Text
}
deriving (PutBotAlias -> PutBotAlias -> Bool
(PutBotAlias -> PutBotAlias -> Bool)
-> (PutBotAlias -> PutBotAlias -> Bool) -> Eq PutBotAlias
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutBotAlias -> PutBotAlias -> Bool
$c/= :: PutBotAlias -> PutBotAlias -> Bool
== :: PutBotAlias -> PutBotAlias -> Bool
$c== :: PutBotAlias -> PutBotAlias -> Bool
Prelude.Eq, ReadPrec [PutBotAlias]
ReadPrec PutBotAlias
Int -> ReadS PutBotAlias
ReadS [PutBotAlias]
(Int -> ReadS PutBotAlias)
-> ReadS [PutBotAlias]
-> ReadPrec PutBotAlias
-> ReadPrec [PutBotAlias]
-> Read PutBotAlias
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutBotAlias]
$creadListPrec :: ReadPrec [PutBotAlias]
readPrec :: ReadPrec PutBotAlias
$creadPrec :: ReadPrec PutBotAlias
readList :: ReadS [PutBotAlias]
$creadList :: ReadS [PutBotAlias]
readsPrec :: Int -> ReadS PutBotAlias
$creadsPrec :: Int -> ReadS PutBotAlias
Prelude.Read, Int -> PutBotAlias -> ShowS
[PutBotAlias] -> ShowS
PutBotAlias -> String
(Int -> PutBotAlias -> ShowS)
-> (PutBotAlias -> String)
-> ([PutBotAlias] -> ShowS)
-> Show PutBotAlias
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutBotAlias] -> ShowS
$cshowList :: [PutBotAlias] -> ShowS
show :: PutBotAlias -> String
$cshow :: PutBotAlias -> String
showsPrec :: Int -> PutBotAlias -> ShowS
$cshowsPrec :: Int -> PutBotAlias -> ShowS
Prelude.Show, (forall x. PutBotAlias -> Rep PutBotAlias x)
-> (forall x. Rep PutBotAlias x -> PutBotAlias)
-> Generic PutBotAlias
forall x. Rep PutBotAlias x -> PutBotAlias
forall x. PutBotAlias -> Rep PutBotAlias x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PutBotAlias x -> PutBotAlias
$cfrom :: forall x. PutBotAlias -> Rep PutBotAlias x
Prelude.Generic)
newPutBotAlias ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
PutBotAlias
newPutBotAlias :: Text -> Text -> Text -> PutBotAlias
newPutBotAlias Text
pName_ Text
pBotVersion_ Text
pBotName_ =
PutBotAlias' :: Maybe Text
-> Maybe ConversationLogsRequest
-> Maybe Text
-> Maybe [Tag]
-> Text
-> Text
-> Text
-> PutBotAlias
PutBotAlias'
{ $sel:checksum:PutBotAlias' :: Maybe Text
checksum = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:conversationLogs:PutBotAlias' :: Maybe ConversationLogsRequest
conversationLogs = Maybe ConversationLogsRequest
forall a. Maybe a
Prelude.Nothing,
$sel:description:PutBotAlias' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:PutBotAlias' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:name:PutBotAlias' :: Text
name = Text
pName_,
$sel:botVersion:PutBotAlias' :: Text
botVersion = Text
pBotVersion_,
$sel:botName:PutBotAlias' :: Text
botName = Text
pBotName_
}
putBotAlias_checksum :: Lens.Lens' PutBotAlias (Prelude.Maybe Prelude.Text)
putBotAlias_checksum :: (Maybe Text -> f (Maybe Text)) -> PutBotAlias -> f PutBotAlias
putBotAlias_checksum = (PutBotAlias -> Maybe Text)
-> (PutBotAlias -> Maybe Text -> PutBotAlias)
-> Lens PutBotAlias PutBotAlias (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBotAlias' {Maybe Text
checksum :: Maybe Text
$sel:checksum:PutBotAlias' :: PutBotAlias -> Maybe Text
checksum} -> Maybe Text
checksum) (\s :: PutBotAlias
s@PutBotAlias' {} Maybe Text
a -> PutBotAlias
s {$sel:checksum:PutBotAlias' :: Maybe Text
checksum = Maybe Text
a} :: PutBotAlias)
putBotAlias_conversationLogs :: Lens.Lens' PutBotAlias (Prelude.Maybe ConversationLogsRequest)
putBotAlias_conversationLogs :: (Maybe ConversationLogsRequest
-> f (Maybe ConversationLogsRequest))
-> PutBotAlias -> f PutBotAlias
putBotAlias_conversationLogs = (PutBotAlias -> Maybe ConversationLogsRequest)
-> (PutBotAlias -> Maybe ConversationLogsRequest -> PutBotAlias)
-> Lens
PutBotAlias
PutBotAlias
(Maybe ConversationLogsRequest)
(Maybe ConversationLogsRequest)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBotAlias' {Maybe ConversationLogsRequest
conversationLogs :: Maybe ConversationLogsRequest
$sel:conversationLogs:PutBotAlias' :: PutBotAlias -> Maybe ConversationLogsRequest
conversationLogs} -> Maybe ConversationLogsRequest
conversationLogs) (\s :: PutBotAlias
s@PutBotAlias' {} Maybe ConversationLogsRequest
a -> PutBotAlias
s {$sel:conversationLogs:PutBotAlias' :: Maybe ConversationLogsRequest
conversationLogs = Maybe ConversationLogsRequest
a} :: PutBotAlias)
putBotAlias_description :: Lens.Lens' PutBotAlias (Prelude.Maybe Prelude.Text)
putBotAlias_description :: (Maybe Text -> f (Maybe Text)) -> PutBotAlias -> f PutBotAlias
putBotAlias_description = (PutBotAlias -> Maybe Text)
-> (PutBotAlias -> Maybe Text -> PutBotAlias)
-> Lens PutBotAlias PutBotAlias (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBotAlias' {Maybe Text
description :: Maybe Text
$sel:description:PutBotAlias' :: PutBotAlias -> Maybe Text
description} -> Maybe Text
description) (\s :: PutBotAlias
s@PutBotAlias' {} Maybe Text
a -> PutBotAlias
s {$sel:description:PutBotAlias' :: Maybe Text
description = Maybe Text
a} :: PutBotAlias)
putBotAlias_tags :: Lens.Lens' PutBotAlias (Prelude.Maybe [Tag])
putBotAlias_tags :: (Maybe [Tag] -> f (Maybe [Tag])) -> PutBotAlias -> f PutBotAlias
putBotAlias_tags = (PutBotAlias -> Maybe [Tag])
-> (PutBotAlias -> Maybe [Tag] -> PutBotAlias)
-> Lens PutBotAlias PutBotAlias (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBotAlias' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:PutBotAlias' :: PutBotAlias -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: PutBotAlias
s@PutBotAlias' {} Maybe [Tag]
a -> PutBotAlias
s {$sel:tags:PutBotAlias' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: PutBotAlias) ((Maybe [Tag] -> f (Maybe [Tag])) -> PutBotAlias -> f PutBotAlias)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> PutBotAlias
-> f PutBotAlias
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
putBotAlias_name :: Lens.Lens' PutBotAlias Prelude.Text
putBotAlias_name :: (Text -> f Text) -> PutBotAlias -> f PutBotAlias
putBotAlias_name = (PutBotAlias -> Text)
-> (PutBotAlias -> Text -> PutBotAlias)
-> Lens PutBotAlias PutBotAlias Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBotAlias' {Text
name :: Text
$sel:name:PutBotAlias' :: PutBotAlias -> Text
name} -> Text
name) (\s :: PutBotAlias
s@PutBotAlias' {} Text
a -> PutBotAlias
s {$sel:name:PutBotAlias' :: Text
name = Text
a} :: PutBotAlias)
putBotAlias_botVersion :: Lens.Lens' PutBotAlias Prelude.Text
putBotAlias_botVersion :: (Text -> f Text) -> PutBotAlias -> f PutBotAlias
putBotAlias_botVersion = (PutBotAlias -> Text)
-> (PutBotAlias -> Text -> PutBotAlias)
-> Lens PutBotAlias PutBotAlias Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBotAlias' {Text
botVersion :: Text
$sel:botVersion:PutBotAlias' :: PutBotAlias -> Text
botVersion} -> Text
botVersion) (\s :: PutBotAlias
s@PutBotAlias' {} Text
a -> PutBotAlias
s {$sel:botVersion:PutBotAlias' :: Text
botVersion = Text
a} :: PutBotAlias)
putBotAlias_botName :: Lens.Lens' PutBotAlias Prelude.Text
putBotAlias_botName :: (Text -> f Text) -> PutBotAlias -> f PutBotAlias
putBotAlias_botName = (PutBotAlias -> Text)
-> (PutBotAlias -> Text -> PutBotAlias)
-> Lens PutBotAlias PutBotAlias Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBotAlias' {Text
botName :: Text
$sel:botName:PutBotAlias' :: PutBotAlias -> Text
botName} -> Text
botName) (\s :: PutBotAlias
s@PutBotAlias' {} Text
a -> PutBotAlias
s {$sel:botName:PutBotAlias' :: Text
botName = Text
a} :: PutBotAlias)
instance Core.AWSRequest PutBotAlias where
type AWSResponse PutBotAlias = PutBotAliasResponse
request :: PutBotAlias -> Request PutBotAlias
request = Service -> PutBotAlias -> Request PutBotAlias
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
response :: Logger
-> Service
-> Proxy PutBotAlias
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse PutBotAlias)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse PutBotAlias))
-> Logger
-> Service
-> Proxy PutBotAlias
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse PutBotAlias)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe ConversationLogsResponse
-> Maybe POSIX
-> Maybe Text
-> Maybe [Tag]
-> Int
-> PutBotAliasResponse
PutBotAliasResponse'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe ConversationLogsResponse
-> Maybe POSIX
-> Maybe Text
-> Maybe [Tag]
-> Int
-> PutBotAliasResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe ConversationLogsResponse
-> Maybe POSIX
-> Maybe Text
-> Maybe [Tag]
-> Int
-> PutBotAliasResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"checksum")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe ConversationLogsResponse
-> Maybe POSIX
-> Maybe Text
-> Maybe [Tag]
-> Int
-> PutBotAliasResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe ConversationLogsResponse
-> Maybe POSIX
-> Maybe Text
-> Maybe [Tag]
-> Int
-> PutBotAliasResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"botVersion")
Either
String
(Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe ConversationLogsResponse
-> Maybe POSIX
-> Maybe Text
-> Maybe [Tag]
-> Int
-> PutBotAliasResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe POSIX
-> Maybe Text
-> Maybe ConversationLogsResponse
-> Maybe POSIX
-> Maybe Text
-> Maybe [Tag]
-> Int
-> PutBotAliasResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"botName")
Either
String
(Maybe POSIX
-> Maybe Text
-> Maybe ConversationLogsResponse
-> Maybe POSIX
-> Maybe Text
-> Maybe [Tag]
-> Int
-> PutBotAliasResponse)
-> Either String (Maybe POSIX)
-> Either
String
(Maybe Text
-> Maybe ConversationLogsResponse
-> Maybe POSIX
-> Maybe Text
-> Maybe [Tag]
-> Int
-> PutBotAliasResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"createdDate")
Either
String
(Maybe Text
-> Maybe ConversationLogsResponse
-> Maybe POSIX
-> Maybe Text
-> Maybe [Tag]
-> Int
-> PutBotAliasResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe ConversationLogsResponse
-> Maybe POSIX
-> Maybe Text
-> Maybe [Tag]
-> Int
-> PutBotAliasResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"name")
Either
String
(Maybe ConversationLogsResponse
-> Maybe POSIX
-> Maybe Text
-> Maybe [Tag]
-> Int
-> PutBotAliasResponse)
-> Either String (Maybe ConversationLogsResponse)
-> Either
String
(Maybe POSIX
-> Maybe Text -> Maybe [Tag] -> Int -> PutBotAliasResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe ConversationLogsResponse)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"conversationLogs")
Either
String
(Maybe POSIX
-> Maybe Text -> Maybe [Tag] -> Int -> PutBotAliasResponse)
-> Either String (Maybe POSIX)
-> Either
String (Maybe Text -> Maybe [Tag] -> Int -> PutBotAliasResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"lastUpdatedDate")
Either
String (Maybe Text -> Maybe [Tag] -> Int -> PutBotAliasResponse)
-> Either String (Maybe Text)
-> Either String (Maybe [Tag] -> Int -> PutBotAliasResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"description")
Either String (Maybe [Tag] -> Int -> PutBotAliasResponse)
-> Either String (Maybe [Tag])
-> Either String (Int -> PutBotAliasResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [Tag]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"tags" Either String (Maybe (Maybe [Tag]))
-> Maybe [Tag] -> Either String (Maybe [Tag])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Tag]
forall a. Monoid a => a
Prelude.mempty)
Either String (Int -> PutBotAliasResponse)
-> Either String Int -> Either String PutBotAliasResponse
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))
)
instance Prelude.Hashable PutBotAlias
instance Prelude.NFData PutBotAlias
instance Core.ToHeaders PutBotAlias where
toHeaders :: PutBotAlias -> ResponseHeaders
toHeaders =
ResponseHeaders -> PutBotAlias -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ 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 PutBotAlias where
toJSON :: PutBotAlias -> Value
toJSON PutBotAlias' {Maybe [Tag]
Maybe Text
Maybe ConversationLogsRequest
Text
botName :: Text
botVersion :: Text
name :: Text
tags :: Maybe [Tag]
description :: Maybe Text
conversationLogs :: Maybe ConversationLogsRequest
checksum :: Maybe Text
$sel:botName:PutBotAlias' :: PutBotAlias -> Text
$sel:botVersion:PutBotAlias' :: PutBotAlias -> Text
$sel:name:PutBotAlias' :: PutBotAlias -> Text
$sel:tags:PutBotAlias' :: PutBotAlias -> Maybe [Tag]
$sel:description:PutBotAlias' :: PutBotAlias -> Maybe Text
$sel:conversationLogs:PutBotAlias' :: PutBotAlias -> Maybe ConversationLogsRequest
$sel:checksum:PutBotAlias' :: PutBotAlias -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"checksum" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
checksum,
(Text
"conversationLogs" Text -> ConversationLogsRequest -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(ConversationLogsRequest -> Pair)
-> Maybe ConversationLogsRequest -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ConversationLogsRequest
conversationLogs,
(Text
"description" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description,
(Text
"tags" Text -> [Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Tag] -> Pair) -> Maybe [Tag] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"botVersion" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
botVersion)
]
)
instance Core.ToPath PutBotAlias where
toPath :: PutBotAlias -> ByteString
toPath PutBotAlias' {Maybe [Tag]
Maybe Text
Maybe ConversationLogsRequest
Text
botName :: Text
botVersion :: Text
name :: Text
tags :: Maybe [Tag]
description :: Maybe Text
conversationLogs :: Maybe ConversationLogsRequest
checksum :: Maybe Text
$sel:botName:PutBotAlias' :: PutBotAlias -> Text
$sel:botVersion:PutBotAlias' :: PutBotAlias -> Text
$sel:name:PutBotAlias' :: PutBotAlias -> Text
$sel:tags:PutBotAlias' :: PutBotAlias -> Maybe [Tag]
$sel:description:PutBotAlias' :: PutBotAlias -> Maybe Text
$sel:conversationLogs:PutBotAlias' :: PutBotAlias -> Maybe ConversationLogsRequest
$sel:checksum:PutBotAlias' :: PutBotAlias -> Maybe Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/bots/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
botName,
ByteString
"/aliases/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
name
]
instance Core.ToQuery PutBotAlias where
toQuery :: PutBotAlias -> QueryString
toQuery = QueryString -> PutBotAlias -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data PutBotAliasResponse = PutBotAliasResponse'
{
PutBotAliasResponse -> Maybe Text
checksum :: Prelude.Maybe Prelude.Text,
PutBotAliasResponse -> Maybe Text
botVersion :: Prelude.Maybe Prelude.Text,
PutBotAliasResponse -> Maybe Text
botName :: Prelude.Maybe Prelude.Text,
PutBotAliasResponse -> Maybe POSIX
createdDate :: Prelude.Maybe Core.POSIX,
PutBotAliasResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
PutBotAliasResponse -> Maybe ConversationLogsResponse
conversationLogs :: Prelude.Maybe ConversationLogsResponse,
PutBotAliasResponse -> Maybe POSIX
lastUpdatedDate :: Prelude.Maybe Core.POSIX,
PutBotAliasResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
PutBotAliasResponse -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
PutBotAliasResponse -> Int
httpStatus :: Prelude.Int
}
deriving (PutBotAliasResponse -> PutBotAliasResponse -> Bool
(PutBotAliasResponse -> PutBotAliasResponse -> Bool)
-> (PutBotAliasResponse -> PutBotAliasResponse -> Bool)
-> Eq PutBotAliasResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutBotAliasResponse -> PutBotAliasResponse -> Bool
$c/= :: PutBotAliasResponse -> PutBotAliasResponse -> Bool
== :: PutBotAliasResponse -> PutBotAliasResponse -> Bool
$c== :: PutBotAliasResponse -> PutBotAliasResponse -> Bool
Prelude.Eq, ReadPrec [PutBotAliasResponse]
ReadPrec PutBotAliasResponse
Int -> ReadS PutBotAliasResponse
ReadS [PutBotAliasResponse]
(Int -> ReadS PutBotAliasResponse)
-> ReadS [PutBotAliasResponse]
-> ReadPrec PutBotAliasResponse
-> ReadPrec [PutBotAliasResponse]
-> Read PutBotAliasResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutBotAliasResponse]
$creadListPrec :: ReadPrec [PutBotAliasResponse]
readPrec :: ReadPrec PutBotAliasResponse
$creadPrec :: ReadPrec PutBotAliasResponse
readList :: ReadS [PutBotAliasResponse]
$creadList :: ReadS [PutBotAliasResponse]
readsPrec :: Int -> ReadS PutBotAliasResponse
$creadsPrec :: Int -> ReadS PutBotAliasResponse
Prelude.Read, Int -> PutBotAliasResponse -> ShowS
[PutBotAliasResponse] -> ShowS
PutBotAliasResponse -> String
(Int -> PutBotAliasResponse -> ShowS)
-> (PutBotAliasResponse -> String)
-> ([PutBotAliasResponse] -> ShowS)
-> Show PutBotAliasResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutBotAliasResponse] -> ShowS
$cshowList :: [PutBotAliasResponse] -> ShowS
show :: PutBotAliasResponse -> String
$cshow :: PutBotAliasResponse -> String
showsPrec :: Int -> PutBotAliasResponse -> ShowS
$cshowsPrec :: Int -> PutBotAliasResponse -> ShowS
Prelude.Show, (forall x. PutBotAliasResponse -> Rep PutBotAliasResponse x)
-> (forall x. Rep PutBotAliasResponse x -> PutBotAliasResponse)
-> Generic PutBotAliasResponse
forall x. Rep PutBotAliasResponse x -> PutBotAliasResponse
forall x. PutBotAliasResponse -> Rep PutBotAliasResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PutBotAliasResponse x -> PutBotAliasResponse
$cfrom :: forall x. PutBotAliasResponse -> Rep PutBotAliasResponse x
Prelude.Generic)
newPutBotAliasResponse ::
Prelude.Int ->
PutBotAliasResponse
newPutBotAliasResponse :: Int -> PutBotAliasResponse
newPutBotAliasResponse Int
pHttpStatus_ =
PutBotAliasResponse' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe ConversationLogsResponse
-> Maybe POSIX
-> Maybe Text
-> Maybe [Tag]
-> Int
-> PutBotAliasResponse
PutBotAliasResponse'
{ $sel:checksum:PutBotAliasResponse' :: Maybe Text
checksum = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:botVersion:PutBotAliasResponse' :: Maybe Text
botVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:botName:PutBotAliasResponse' :: Maybe Text
botName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:createdDate:PutBotAliasResponse' :: Maybe POSIX
createdDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:name:PutBotAliasResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:conversationLogs:PutBotAliasResponse' :: Maybe ConversationLogsResponse
conversationLogs = Maybe ConversationLogsResponse
forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdatedDate:PutBotAliasResponse' :: Maybe POSIX
lastUpdatedDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:description:PutBotAliasResponse' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:PutBotAliasResponse' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:PutBotAliasResponse' :: Int
httpStatus = Int
pHttpStatus_
}
putBotAliasResponse_checksum :: Lens.Lens' PutBotAliasResponse (Prelude.Maybe Prelude.Text)
putBotAliasResponse_checksum :: (Maybe Text -> f (Maybe Text))
-> PutBotAliasResponse -> f PutBotAliasResponse
putBotAliasResponse_checksum = (PutBotAliasResponse -> Maybe Text)
-> (PutBotAliasResponse -> Maybe Text -> PutBotAliasResponse)
-> Lens
PutBotAliasResponse PutBotAliasResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBotAliasResponse' {Maybe Text
checksum :: Maybe Text
$sel:checksum:PutBotAliasResponse' :: PutBotAliasResponse -> Maybe Text
checksum} -> Maybe Text
checksum) (\s :: PutBotAliasResponse
s@PutBotAliasResponse' {} Maybe Text
a -> PutBotAliasResponse
s {$sel:checksum:PutBotAliasResponse' :: Maybe Text
checksum = Maybe Text
a} :: PutBotAliasResponse)
putBotAliasResponse_botVersion :: Lens.Lens' PutBotAliasResponse (Prelude.Maybe Prelude.Text)
putBotAliasResponse_botVersion :: (Maybe Text -> f (Maybe Text))
-> PutBotAliasResponse -> f PutBotAliasResponse
putBotAliasResponse_botVersion = (PutBotAliasResponse -> Maybe Text)
-> (PutBotAliasResponse -> Maybe Text -> PutBotAliasResponse)
-> Lens
PutBotAliasResponse PutBotAliasResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBotAliasResponse' {Maybe Text
botVersion :: Maybe Text
$sel:botVersion:PutBotAliasResponse' :: PutBotAliasResponse -> Maybe Text
botVersion} -> Maybe Text
botVersion) (\s :: PutBotAliasResponse
s@PutBotAliasResponse' {} Maybe Text
a -> PutBotAliasResponse
s {$sel:botVersion:PutBotAliasResponse' :: Maybe Text
botVersion = Maybe Text
a} :: PutBotAliasResponse)
putBotAliasResponse_botName :: Lens.Lens' PutBotAliasResponse (Prelude.Maybe Prelude.Text)
putBotAliasResponse_botName :: (Maybe Text -> f (Maybe Text))
-> PutBotAliasResponse -> f PutBotAliasResponse
putBotAliasResponse_botName = (PutBotAliasResponse -> Maybe Text)
-> (PutBotAliasResponse -> Maybe Text -> PutBotAliasResponse)
-> Lens
PutBotAliasResponse PutBotAliasResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBotAliasResponse' {Maybe Text
botName :: Maybe Text
$sel:botName:PutBotAliasResponse' :: PutBotAliasResponse -> Maybe Text
botName} -> Maybe Text
botName) (\s :: PutBotAliasResponse
s@PutBotAliasResponse' {} Maybe Text
a -> PutBotAliasResponse
s {$sel:botName:PutBotAliasResponse' :: Maybe Text
botName = Maybe Text
a} :: PutBotAliasResponse)
putBotAliasResponse_createdDate :: Lens.Lens' PutBotAliasResponse (Prelude.Maybe Prelude.UTCTime)
putBotAliasResponse_createdDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> PutBotAliasResponse -> f PutBotAliasResponse
putBotAliasResponse_createdDate = (PutBotAliasResponse -> Maybe POSIX)
-> (PutBotAliasResponse -> Maybe POSIX -> PutBotAliasResponse)
-> Lens
PutBotAliasResponse PutBotAliasResponse (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBotAliasResponse' {Maybe POSIX
createdDate :: Maybe POSIX
$sel:createdDate:PutBotAliasResponse' :: PutBotAliasResponse -> Maybe POSIX
createdDate} -> Maybe POSIX
createdDate) (\s :: PutBotAliasResponse
s@PutBotAliasResponse' {} Maybe POSIX
a -> PutBotAliasResponse
s {$sel:createdDate:PutBotAliasResponse' :: Maybe POSIX
createdDate = Maybe POSIX
a} :: PutBotAliasResponse) ((Maybe POSIX -> f (Maybe POSIX))
-> PutBotAliasResponse -> f PutBotAliasResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> PutBotAliasResponse
-> f PutBotAliasResponse
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
putBotAliasResponse_name :: Lens.Lens' PutBotAliasResponse (Prelude.Maybe Prelude.Text)
putBotAliasResponse_name :: (Maybe Text -> f (Maybe Text))
-> PutBotAliasResponse -> f PutBotAliasResponse
putBotAliasResponse_name = (PutBotAliasResponse -> Maybe Text)
-> (PutBotAliasResponse -> Maybe Text -> PutBotAliasResponse)
-> Lens
PutBotAliasResponse PutBotAliasResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBotAliasResponse' {Maybe Text
name :: Maybe Text
$sel:name:PutBotAliasResponse' :: PutBotAliasResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: PutBotAliasResponse
s@PutBotAliasResponse' {} Maybe Text
a -> PutBotAliasResponse
s {$sel:name:PutBotAliasResponse' :: Maybe Text
name = Maybe Text
a} :: PutBotAliasResponse)
putBotAliasResponse_conversationLogs :: Lens.Lens' PutBotAliasResponse (Prelude.Maybe ConversationLogsResponse)
putBotAliasResponse_conversationLogs :: (Maybe ConversationLogsResponse
-> f (Maybe ConversationLogsResponse))
-> PutBotAliasResponse -> f PutBotAliasResponse
putBotAliasResponse_conversationLogs = (PutBotAliasResponse -> Maybe ConversationLogsResponse)
-> (PutBotAliasResponse
-> Maybe ConversationLogsResponse -> PutBotAliasResponse)
-> Lens
PutBotAliasResponse
PutBotAliasResponse
(Maybe ConversationLogsResponse)
(Maybe ConversationLogsResponse)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBotAliasResponse' {Maybe ConversationLogsResponse
conversationLogs :: Maybe ConversationLogsResponse
$sel:conversationLogs:PutBotAliasResponse' :: PutBotAliasResponse -> Maybe ConversationLogsResponse
conversationLogs} -> Maybe ConversationLogsResponse
conversationLogs) (\s :: PutBotAliasResponse
s@PutBotAliasResponse' {} Maybe ConversationLogsResponse
a -> PutBotAliasResponse
s {$sel:conversationLogs:PutBotAliasResponse' :: Maybe ConversationLogsResponse
conversationLogs = Maybe ConversationLogsResponse
a} :: PutBotAliasResponse)
putBotAliasResponse_lastUpdatedDate :: Lens.Lens' PutBotAliasResponse (Prelude.Maybe Prelude.UTCTime)
putBotAliasResponse_lastUpdatedDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> PutBotAliasResponse -> f PutBotAliasResponse
putBotAliasResponse_lastUpdatedDate = (PutBotAliasResponse -> Maybe POSIX)
-> (PutBotAliasResponse -> Maybe POSIX -> PutBotAliasResponse)
-> Lens
PutBotAliasResponse PutBotAliasResponse (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBotAliasResponse' {Maybe POSIX
lastUpdatedDate :: Maybe POSIX
$sel:lastUpdatedDate:PutBotAliasResponse' :: PutBotAliasResponse -> Maybe POSIX
lastUpdatedDate} -> Maybe POSIX
lastUpdatedDate) (\s :: PutBotAliasResponse
s@PutBotAliasResponse' {} Maybe POSIX
a -> PutBotAliasResponse
s {$sel:lastUpdatedDate:PutBotAliasResponse' :: Maybe POSIX
lastUpdatedDate = Maybe POSIX
a} :: PutBotAliasResponse) ((Maybe POSIX -> f (Maybe POSIX))
-> PutBotAliasResponse -> f PutBotAliasResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> PutBotAliasResponse
-> f PutBotAliasResponse
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
putBotAliasResponse_description :: Lens.Lens' PutBotAliasResponse (Prelude.Maybe Prelude.Text)
putBotAliasResponse_description :: (Maybe Text -> f (Maybe Text))
-> PutBotAliasResponse -> f PutBotAliasResponse
putBotAliasResponse_description = (PutBotAliasResponse -> Maybe Text)
-> (PutBotAliasResponse -> Maybe Text -> PutBotAliasResponse)
-> Lens
PutBotAliasResponse PutBotAliasResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBotAliasResponse' {Maybe Text
description :: Maybe Text
$sel:description:PutBotAliasResponse' :: PutBotAliasResponse -> Maybe Text
description} -> Maybe Text
description) (\s :: PutBotAliasResponse
s@PutBotAliasResponse' {} Maybe Text
a -> PutBotAliasResponse
s {$sel:description:PutBotAliasResponse' :: Maybe Text
description = Maybe Text
a} :: PutBotAliasResponse)
putBotAliasResponse_tags :: Lens.Lens' PutBotAliasResponse (Prelude.Maybe [Tag])
putBotAliasResponse_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> PutBotAliasResponse -> f PutBotAliasResponse
putBotAliasResponse_tags = (PutBotAliasResponse -> Maybe [Tag])
-> (PutBotAliasResponse -> Maybe [Tag] -> PutBotAliasResponse)
-> Lens
PutBotAliasResponse PutBotAliasResponse (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBotAliasResponse' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:PutBotAliasResponse' :: PutBotAliasResponse -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: PutBotAliasResponse
s@PutBotAliasResponse' {} Maybe [Tag]
a -> PutBotAliasResponse
s {$sel:tags:PutBotAliasResponse' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: PutBotAliasResponse) ((Maybe [Tag] -> f (Maybe [Tag]))
-> PutBotAliasResponse -> f PutBotAliasResponse)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> PutBotAliasResponse
-> f PutBotAliasResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
putBotAliasResponse_httpStatus :: Lens.Lens' PutBotAliasResponse Prelude.Int
putBotAliasResponse_httpStatus :: (Int -> f Int) -> PutBotAliasResponse -> f PutBotAliasResponse
putBotAliasResponse_httpStatus = (PutBotAliasResponse -> Int)
-> (PutBotAliasResponse -> Int -> PutBotAliasResponse)
-> Lens PutBotAliasResponse PutBotAliasResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutBotAliasResponse' {Int
httpStatus :: Int
$sel:httpStatus:PutBotAliasResponse' :: PutBotAliasResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: PutBotAliasResponse
s@PutBotAliasResponse' {} Int
a -> PutBotAliasResponse
s {$sel:httpStatus:PutBotAliasResponse' :: Int
httpStatus = Int
a} :: PutBotAliasResponse)
instance Prelude.NFData PutBotAliasResponse