{-# 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.LexV2Models.BatchCreateCustomVocabularyItem
(
BatchCreateCustomVocabularyItem (..),
newBatchCreateCustomVocabularyItem,
batchCreateCustomVocabularyItem_botId,
batchCreateCustomVocabularyItem_botVersion,
batchCreateCustomVocabularyItem_localeId,
batchCreateCustomVocabularyItem_customVocabularyItemList,
BatchCreateCustomVocabularyItemResponse (..),
newBatchCreateCustomVocabularyItemResponse,
batchCreateCustomVocabularyItemResponse_botId,
batchCreateCustomVocabularyItemResponse_botVersion,
batchCreateCustomVocabularyItemResponse_errors,
batchCreateCustomVocabularyItemResponse_localeId,
batchCreateCustomVocabularyItemResponse_resources,
batchCreateCustomVocabularyItemResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.LexV2Models.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data BatchCreateCustomVocabularyItem = BatchCreateCustomVocabularyItem'
{
BatchCreateCustomVocabularyItem -> Text
botId :: Prelude.Text,
BatchCreateCustomVocabularyItem -> Text
botVersion :: Prelude.Text,
BatchCreateCustomVocabularyItem -> Text
localeId :: Prelude.Text,
BatchCreateCustomVocabularyItem -> NonEmpty NewCustomVocabularyItem
customVocabularyItemList :: Prelude.NonEmpty NewCustomVocabularyItem
}
deriving (BatchCreateCustomVocabularyItem
-> BatchCreateCustomVocabularyItem -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchCreateCustomVocabularyItem
-> BatchCreateCustomVocabularyItem -> Bool
$c/= :: BatchCreateCustomVocabularyItem
-> BatchCreateCustomVocabularyItem -> Bool
== :: BatchCreateCustomVocabularyItem
-> BatchCreateCustomVocabularyItem -> Bool
$c== :: BatchCreateCustomVocabularyItem
-> BatchCreateCustomVocabularyItem -> Bool
Prelude.Eq, ReadPrec [BatchCreateCustomVocabularyItem]
ReadPrec BatchCreateCustomVocabularyItem
Int -> ReadS BatchCreateCustomVocabularyItem
ReadS [BatchCreateCustomVocabularyItem]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchCreateCustomVocabularyItem]
$creadListPrec :: ReadPrec [BatchCreateCustomVocabularyItem]
readPrec :: ReadPrec BatchCreateCustomVocabularyItem
$creadPrec :: ReadPrec BatchCreateCustomVocabularyItem
readList :: ReadS [BatchCreateCustomVocabularyItem]
$creadList :: ReadS [BatchCreateCustomVocabularyItem]
readsPrec :: Int -> ReadS BatchCreateCustomVocabularyItem
$creadsPrec :: Int -> ReadS BatchCreateCustomVocabularyItem
Prelude.Read, Int -> BatchCreateCustomVocabularyItem -> ShowS
[BatchCreateCustomVocabularyItem] -> ShowS
BatchCreateCustomVocabularyItem -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchCreateCustomVocabularyItem] -> ShowS
$cshowList :: [BatchCreateCustomVocabularyItem] -> ShowS
show :: BatchCreateCustomVocabularyItem -> String
$cshow :: BatchCreateCustomVocabularyItem -> String
showsPrec :: Int -> BatchCreateCustomVocabularyItem -> ShowS
$cshowsPrec :: Int -> BatchCreateCustomVocabularyItem -> ShowS
Prelude.Show, forall x.
Rep BatchCreateCustomVocabularyItem x
-> BatchCreateCustomVocabularyItem
forall x.
BatchCreateCustomVocabularyItem
-> Rep BatchCreateCustomVocabularyItem x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchCreateCustomVocabularyItem x
-> BatchCreateCustomVocabularyItem
$cfrom :: forall x.
BatchCreateCustomVocabularyItem
-> Rep BatchCreateCustomVocabularyItem x
Prelude.Generic)
newBatchCreateCustomVocabularyItem ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.NonEmpty NewCustomVocabularyItem ->
BatchCreateCustomVocabularyItem
newBatchCreateCustomVocabularyItem :: Text
-> Text
-> Text
-> NonEmpty NewCustomVocabularyItem
-> BatchCreateCustomVocabularyItem
newBatchCreateCustomVocabularyItem
Text
pBotId_
Text
pBotVersion_
Text
pLocaleId_
NonEmpty NewCustomVocabularyItem
pCustomVocabularyItemList_ =
BatchCreateCustomVocabularyItem'
{ $sel:botId:BatchCreateCustomVocabularyItem' :: Text
botId = Text
pBotId_,
$sel:botVersion:BatchCreateCustomVocabularyItem' :: Text
botVersion = Text
pBotVersion_,
$sel:localeId:BatchCreateCustomVocabularyItem' :: Text
localeId = Text
pLocaleId_,
$sel:customVocabularyItemList:BatchCreateCustomVocabularyItem' :: NonEmpty NewCustomVocabularyItem
customVocabularyItemList =
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
forall t b. AReview t b -> b -> t
Lens.# NonEmpty NewCustomVocabularyItem
pCustomVocabularyItemList_
}
batchCreateCustomVocabularyItem_botId :: Lens.Lens' BatchCreateCustomVocabularyItem Prelude.Text
batchCreateCustomVocabularyItem_botId :: Lens' BatchCreateCustomVocabularyItem Text
batchCreateCustomVocabularyItem_botId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchCreateCustomVocabularyItem' {Text
botId :: Text
$sel:botId:BatchCreateCustomVocabularyItem' :: BatchCreateCustomVocabularyItem -> Text
botId} -> Text
botId) (\s :: BatchCreateCustomVocabularyItem
s@BatchCreateCustomVocabularyItem' {} Text
a -> BatchCreateCustomVocabularyItem
s {$sel:botId:BatchCreateCustomVocabularyItem' :: Text
botId = Text
a} :: BatchCreateCustomVocabularyItem)
batchCreateCustomVocabularyItem_botVersion :: Lens.Lens' BatchCreateCustomVocabularyItem Prelude.Text
batchCreateCustomVocabularyItem_botVersion :: Lens' BatchCreateCustomVocabularyItem Text
batchCreateCustomVocabularyItem_botVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchCreateCustomVocabularyItem' {Text
botVersion :: Text
$sel:botVersion:BatchCreateCustomVocabularyItem' :: BatchCreateCustomVocabularyItem -> Text
botVersion} -> Text
botVersion) (\s :: BatchCreateCustomVocabularyItem
s@BatchCreateCustomVocabularyItem' {} Text
a -> BatchCreateCustomVocabularyItem
s {$sel:botVersion:BatchCreateCustomVocabularyItem' :: Text
botVersion = Text
a} :: BatchCreateCustomVocabularyItem)
batchCreateCustomVocabularyItem_localeId :: Lens.Lens' BatchCreateCustomVocabularyItem Prelude.Text
batchCreateCustomVocabularyItem_localeId :: Lens' BatchCreateCustomVocabularyItem Text
batchCreateCustomVocabularyItem_localeId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchCreateCustomVocabularyItem' {Text
localeId :: Text
$sel:localeId:BatchCreateCustomVocabularyItem' :: BatchCreateCustomVocabularyItem -> Text
localeId} -> Text
localeId) (\s :: BatchCreateCustomVocabularyItem
s@BatchCreateCustomVocabularyItem' {} Text
a -> BatchCreateCustomVocabularyItem
s {$sel:localeId:BatchCreateCustomVocabularyItem' :: Text
localeId = Text
a} :: BatchCreateCustomVocabularyItem)
batchCreateCustomVocabularyItem_customVocabularyItemList :: Lens.Lens' BatchCreateCustomVocabularyItem (Prelude.NonEmpty NewCustomVocabularyItem)
batchCreateCustomVocabularyItem_customVocabularyItemList :: Lens'
BatchCreateCustomVocabularyItem (NonEmpty NewCustomVocabularyItem)
batchCreateCustomVocabularyItem_customVocabularyItemList = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchCreateCustomVocabularyItem' {NonEmpty NewCustomVocabularyItem
customVocabularyItemList :: NonEmpty NewCustomVocabularyItem
$sel:customVocabularyItemList:BatchCreateCustomVocabularyItem' :: BatchCreateCustomVocabularyItem -> NonEmpty NewCustomVocabularyItem
customVocabularyItemList} -> NonEmpty NewCustomVocabularyItem
customVocabularyItemList) (\s :: BatchCreateCustomVocabularyItem
s@BatchCreateCustomVocabularyItem' {} NonEmpty NewCustomVocabularyItem
a -> BatchCreateCustomVocabularyItem
s {$sel:customVocabularyItemList:BatchCreateCustomVocabularyItem' :: NonEmpty NewCustomVocabularyItem
customVocabularyItemList = NonEmpty NewCustomVocabularyItem
a} :: BatchCreateCustomVocabularyItem) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance
Core.AWSRequest
BatchCreateCustomVocabularyItem
where
type
AWSResponse BatchCreateCustomVocabularyItem =
BatchCreateCustomVocabularyItemResponse
request :: (Service -> Service)
-> BatchCreateCustomVocabularyItem
-> Request BatchCreateCustomVocabularyItem
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy BatchCreateCustomVocabularyItem
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse BatchCreateCustomVocabularyItem)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text
-> Maybe Text
-> Maybe [FailedCustomVocabularyItem]
-> Maybe Text
-> Maybe [CustomVocabularyItem]
-> Int
-> BatchCreateCustomVocabularyItemResponse
BatchCreateCustomVocabularyItemResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"botId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"botVersion")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"errors" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"localeId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"resources" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance
Prelude.Hashable
BatchCreateCustomVocabularyItem
where
hashWithSalt :: Int -> BatchCreateCustomVocabularyItem -> Int
hashWithSalt
Int
_salt
BatchCreateCustomVocabularyItem' {NonEmpty NewCustomVocabularyItem
Text
customVocabularyItemList :: NonEmpty NewCustomVocabularyItem
localeId :: Text
botVersion :: Text
botId :: Text
$sel:customVocabularyItemList:BatchCreateCustomVocabularyItem' :: BatchCreateCustomVocabularyItem -> NonEmpty NewCustomVocabularyItem
$sel:localeId:BatchCreateCustomVocabularyItem' :: BatchCreateCustomVocabularyItem -> Text
$sel:botVersion:BatchCreateCustomVocabularyItem' :: BatchCreateCustomVocabularyItem -> Text
$sel:botId:BatchCreateCustomVocabularyItem' :: BatchCreateCustomVocabularyItem -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
botId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
botVersion
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
localeId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` NonEmpty NewCustomVocabularyItem
customVocabularyItemList
instance
Prelude.NFData
BatchCreateCustomVocabularyItem
where
rnf :: BatchCreateCustomVocabularyItem -> ()
rnf BatchCreateCustomVocabularyItem' {NonEmpty NewCustomVocabularyItem
Text
customVocabularyItemList :: NonEmpty NewCustomVocabularyItem
localeId :: Text
botVersion :: Text
botId :: Text
$sel:customVocabularyItemList:BatchCreateCustomVocabularyItem' :: BatchCreateCustomVocabularyItem -> NonEmpty NewCustomVocabularyItem
$sel:localeId:BatchCreateCustomVocabularyItem' :: BatchCreateCustomVocabularyItem -> Text
$sel:botVersion:BatchCreateCustomVocabularyItem' :: BatchCreateCustomVocabularyItem -> Text
$sel:botId:BatchCreateCustomVocabularyItem' :: BatchCreateCustomVocabularyItem -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
botId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
botVersion
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
localeId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf NonEmpty NewCustomVocabularyItem
customVocabularyItemList
instance
Data.ToHeaders
BatchCreateCustomVocabularyItem
where
toHeaders :: BatchCreateCustomVocabularyItem -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON BatchCreateCustomVocabularyItem where
toJSON :: BatchCreateCustomVocabularyItem -> Value
toJSON BatchCreateCustomVocabularyItem' {NonEmpty NewCustomVocabularyItem
Text
customVocabularyItemList :: NonEmpty NewCustomVocabularyItem
localeId :: Text
botVersion :: Text
botId :: Text
$sel:customVocabularyItemList:BatchCreateCustomVocabularyItem' :: BatchCreateCustomVocabularyItem -> NonEmpty NewCustomVocabularyItem
$sel:localeId:BatchCreateCustomVocabularyItem' :: BatchCreateCustomVocabularyItem -> Text
$sel:botVersion:BatchCreateCustomVocabularyItem' :: BatchCreateCustomVocabularyItem -> Text
$sel:botId:BatchCreateCustomVocabularyItem' :: BatchCreateCustomVocabularyItem -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
( Key
"customVocabularyItemList"
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= NonEmpty NewCustomVocabularyItem
customVocabularyItemList
)
]
)
instance Data.ToPath BatchCreateCustomVocabularyItem where
toPath :: BatchCreateCustomVocabularyItem -> ByteString
toPath BatchCreateCustomVocabularyItem' {NonEmpty NewCustomVocabularyItem
Text
customVocabularyItemList :: NonEmpty NewCustomVocabularyItem
localeId :: Text
botVersion :: Text
botId :: Text
$sel:customVocabularyItemList:BatchCreateCustomVocabularyItem' :: BatchCreateCustomVocabularyItem -> NonEmpty NewCustomVocabularyItem
$sel:localeId:BatchCreateCustomVocabularyItem' :: BatchCreateCustomVocabularyItem -> Text
$sel:botVersion:BatchCreateCustomVocabularyItem' :: BatchCreateCustomVocabularyItem -> Text
$sel:botId:BatchCreateCustomVocabularyItem' :: BatchCreateCustomVocabularyItem -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/bots/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
botId,
ByteString
"/botversions/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
botVersion,
ByteString
"/botlocales/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
localeId,
ByteString
"/customvocabulary/DEFAULT/batchcreate"
]
instance Data.ToQuery BatchCreateCustomVocabularyItem where
toQuery :: BatchCreateCustomVocabularyItem -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data BatchCreateCustomVocabularyItemResponse = BatchCreateCustomVocabularyItemResponse'
{
BatchCreateCustomVocabularyItemResponse -> Maybe Text
botId :: Prelude.Maybe Prelude.Text,
BatchCreateCustomVocabularyItemResponse -> Maybe Text
botVersion :: Prelude.Maybe Prelude.Text,
BatchCreateCustomVocabularyItemResponse
-> Maybe [FailedCustomVocabularyItem]
errors :: Prelude.Maybe [FailedCustomVocabularyItem],
BatchCreateCustomVocabularyItemResponse -> Maybe Text
localeId :: Prelude.Maybe Prelude.Text,
BatchCreateCustomVocabularyItemResponse
-> Maybe [CustomVocabularyItem]
resources :: Prelude.Maybe [CustomVocabularyItem],
BatchCreateCustomVocabularyItemResponse -> Int
httpStatus :: Prelude.Int
}
deriving (BatchCreateCustomVocabularyItemResponse
-> BatchCreateCustomVocabularyItemResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchCreateCustomVocabularyItemResponse
-> BatchCreateCustomVocabularyItemResponse -> Bool
$c/= :: BatchCreateCustomVocabularyItemResponse
-> BatchCreateCustomVocabularyItemResponse -> Bool
== :: BatchCreateCustomVocabularyItemResponse
-> BatchCreateCustomVocabularyItemResponse -> Bool
$c== :: BatchCreateCustomVocabularyItemResponse
-> BatchCreateCustomVocabularyItemResponse -> Bool
Prelude.Eq, ReadPrec [BatchCreateCustomVocabularyItemResponse]
ReadPrec BatchCreateCustomVocabularyItemResponse
Int -> ReadS BatchCreateCustomVocabularyItemResponse
ReadS [BatchCreateCustomVocabularyItemResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchCreateCustomVocabularyItemResponse]
$creadListPrec :: ReadPrec [BatchCreateCustomVocabularyItemResponse]
readPrec :: ReadPrec BatchCreateCustomVocabularyItemResponse
$creadPrec :: ReadPrec BatchCreateCustomVocabularyItemResponse
readList :: ReadS [BatchCreateCustomVocabularyItemResponse]
$creadList :: ReadS [BatchCreateCustomVocabularyItemResponse]
readsPrec :: Int -> ReadS BatchCreateCustomVocabularyItemResponse
$creadsPrec :: Int -> ReadS BatchCreateCustomVocabularyItemResponse
Prelude.Read, Int -> BatchCreateCustomVocabularyItemResponse -> ShowS
[BatchCreateCustomVocabularyItemResponse] -> ShowS
BatchCreateCustomVocabularyItemResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchCreateCustomVocabularyItemResponse] -> ShowS
$cshowList :: [BatchCreateCustomVocabularyItemResponse] -> ShowS
show :: BatchCreateCustomVocabularyItemResponse -> String
$cshow :: BatchCreateCustomVocabularyItemResponse -> String
showsPrec :: Int -> BatchCreateCustomVocabularyItemResponse -> ShowS
$cshowsPrec :: Int -> BatchCreateCustomVocabularyItemResponse -> ShowS
Prelude.Show, forall x.
Rep BatchCreateCustomVocabularyItemResponse x
-> BatchCreateCustomVocabularyItemResponse
forall x.
BatchCreateCustomVocabularyItemResponse
-> Rep BatchCreateCustomVocabularyItemResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchCreateCustomVocabularyItemResponse x
-> BatchCreateCustomVocabularyItemResponse
$cfrom :: forall x.
BatchCreateCustomVocabularyItemResponse
-> Rep BatchCreateCustomVocabularyItemResponse x
Prelude.Generic)
newBatchCreateCustomVocabularyItemResponse ::
Prelude.Int ->
BatchCreateCustomVocabularyItemResponse
newBatchCreateCustomVocabularyItemResponse :: Int -> BatchCreateCustomVocabularyItemResponse
newBatchCreateCustomVocabularyItemResponse
Int
pHttpStatus_ =
BatchCreateCustomVocabularyItemResponse'
{ $sel:botId:BatchCreateCustomVocabularyItemResponse' :: Maybe Text
botId =
forall a. Maybe a
Prelude.Nothing,
$sel:botVersion:BatchCreateCustomVocabularyItemResponse' :: Maybe Text
botVersion = forall a. Maybe a
Prelude.Nothing,
$sel:errors:BatchCreateCustomVocabularyItemResponse' :: Maybe [FailedCustomVocabularyItem]
errors = forall a. Maybe a
Prelude.Nothing,
$sel:localeId:BatchCreateCustomVocabularyItemResponse' :: Maybe Text
localeId = forall a. Maybe a
Prelude.Nothing,
$sel:resources:BatchCreateCustomVocabularyItemResponse' :: Maybe [CustomVocabularyItem]
resources = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:BatchCreateCustomVocabularyItemResponse' :: Int
httpStatus = Int
pHttpStatus_
}
batchCreateCustomVocabularyItemResponse_botId :: Lens.Lens' BatchCreateCustomVocabularyItemResponse (Prelude.Maybe Prelude.Text)
batchCreateCustomVocabularyItemResponse_botId :: Lens' BatchCreateCustomVocabularyItemResponse (Maybe Text)
batchCreateCustomVocabularyItemResponse_botId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchCreateCustomVocabularyItemResponse' {Maybe Text
botId :: Maybe Text
$sel:botId:BatchCreateCustomVocabularyItemResponse' :: BatchCreateCustomVocabularyItemResponse -> Maybe Text
botId} -> Maybe Text
botId) (\s :: BatchCreateCustomVocabularyItemResponse
s@BatchCreateCustomVocabularyItemResponse' {} Maybe Text
a -> BatchCreateCustomVocabularyItemResponse
s {$sel:botId:BatchCreateCustomVocabularyItemResponse' :: Maybe Text
botId = Maybe Text
a} :: BatchCreateCustomVocabularyItemResponse)
batchCreateCustomVocabularyItemResponse_botVersion :: Lens.Lens' BatchCreateCustomVocabularyItemResponse (Prelude.Maybe Prelude.Text)
batchCreateCustomVocabularyItemResponse_botVersion :: Lens' BatchCreateCustomVocabularyItemResponse (Maybe Text)
batchCreateCustomVocabularyItemResponse_botVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchCreateCustomVocabularyItemResponse' {Maybe Text
botVersion :: Maybe Text
$sel:botVersion:BatchCreateCustomVocabularyItemResponse' :: BatchCreateCustomVocabularyItemResponse -> Maybe Text
botVersion} -> Maybe Text
botVersion) (\s :: BatchCreateCustomVocabularyItemResponse
s@BatchCreateCustomVocabularyItemResponse' {} Maybe Text
a -> BatchCreateCustomVocabularyItemResponse
s {$sel:botVersion:BatchCreateCustomVocabularyItemResponse' :: Maybe Text
botVersion = Maybe Text
a} :: BatchCreateCustomVocabularyItemResponse)
batchCreateCustomVocabularyItemResponse_errors :: Lens.Lens' BatchCreateCustomVocabularyItemResponse (Prelude.Maybe [FailedCustomVocabularyItem])
batchCreateCustomVocabularyItemResponse_errors :: Lens'
BatchCreateCustomVocabularyItemResponse
(Maybe [FailedCustomVocabularyItem])
batchCreateCustomVocabularyItemResponse_errors = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchCreateCustomVocabularyItemResponse' {Maybe [FailedCustomVocabularyItem]
errors :: Maybe [FailedCustomVocabularyItem]
$sel:errors:BatchCreateCustomVocabularyItemResponse' :: BatchCreateCustomVocabularyItemResponse
-> Maybe [FailedCustomVocabularyItem]
errors} -> Maybe [FailedCustomVocabularyItem]
errors) (\s :: BatchCreateCustomVocabularyItemResponse
s@BatchCreateCustomVocabularyItemResponse' {} Maybe [FailedCustomVocabularyItem]
a -> BatchCreateCustomVocabularyItemResponse
s {$sel:errors:BatchCreateCustomVocabularyItemResponse' :: Maybe [FailedCustomVocabularyItem]
errors = Maybe [FailedCustomVocabularyItem]
a} :: BatchCreateCustomVocabularyItemResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
batchCreateCustomVocabularyItemResponse_localeId :: Lens.Lens' BatchCreateCustomVocabularyItemResponse (Prelude.Maybe Prelude.Text)
batchCreateCustomVocabularyItemResponse_localeId :: Lens' BatchCreateCustomVocabularyItemResponse (Maybe Text)
batchCreateCustomVocabularyItemResponse_localeId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchCreateCustomVocabularyItemResponse' {Maybe Text
localeId :: Maybe Text
$sel:localeId:BatchCreateCustomVocabularyItemResponse' :: BatchCreateCustomVocabularyItemResponse -> Maybe Text
localeId} -> Maybe Text
localeId) (\s :: BatchCreateCustomVocabularyItemResponse
s@BatchCreateCustomVocabularyItemResponse' {} Maybe Text
a -> BatchCreateCustomVocabularyItemResponse
s {$sel:localeId:BatchCreateCustomVocabularyItemResponse' :: Maybe Text
localeId = Maybe Text
a} :: BatchCreateCustomVocabularyItemResponse)
batchCreateCustomVocabularyItemResponse_resources :: Lens.Lens' BatchCreateCustomVocabularyItemResponse (Prelude.Maybe [CustomVocabularyItem])
batchCreateCustomVocabularyItemResponse_resources :: Lens'
BatchCreateCustomVocabularyItemResponse
(Maybe [CustomVocabularyItem])
batchCreateCustomVocabularyItemResponse_resources = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchCreateCustomVocabularyItemResponse' {Maybe [CustomVocabularyItem]
resources :: Maybe [CustomVocabularyItem]
$sel:resources:BatchCreateCustomVocabularyItemResponse' :: BatchCreateCustomVocabularyItemResponse
-> Maybe [CustomVocabularyItem]
resources} -> Maybe [CustomVocabularyItem]
resources) (\s :: BatchCreateCustomVocabularyItemResponse
s@BatchCreateCustomVocabularyItemResponse' {} Maybe [CustomVocabularyItem]
a -> BatchCreateCustomVocabularyItemResponse
s {$sel:resources:BatchCreateCustomVocabularyItemResponse' :: Maybe [CustomVocabularyItem]
resources = Maybe [CustomVocabularyItem]
a} :: BatchCreateCustomVocabularyItemResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
batchCreateCustomVocabularyItemResponse_httpStatus :: Lens.Lens' BatchCreateCustomVocabularyItemResponse Prelude.Int
batchCreateCustomVocabularyItemResponse_httpStatus :: Lens' BatchCreateCustomVocabularyItemResponse Int
batchCreateCustomVocabularyItemResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchCreateCustomVocabularyItemResponse' {Int
httpStatus :: Int
$sel:httpStatus:BatchCreateCustomVocabularyItemResponse' :: BatchCreateCustomVocabularyItemResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: BatchCreateCustomVocabularyItemResponse
s@BatchCreateCustomVocabularyItemResponse' {} Int
a -> BatchCreateCustomVocabularyItemResponse
s {$sel:httpStatus:BatchCreateCustomVocabularyItemResponse' :: Int
httpStatus = Int
a} :: BatchCreateCustomVocabularyItemResponse)
instance
Prelude.NFData
BatchCreateCustomVocabularyItemResponse
where
rnf :: BatchCreateCustomVocabularyItemResponse -> ()
rnf BatchCreateCustomVocabularyItemResponse' {Int
Maybe [CustomVocabularyItem]
Maybe [FailedCustomVocabularyItem]
Maybe Text
httpStatus :: Int
resources :: Maybe [CustomVocabularyItem]
localeId :: Maybe Text
errors :: Maybe [FailedCustomVocabularyItem]
botVersion :: Maybe Text
botId :: Maybe Text
$sel:httpStatus:BatchCreateCustomVocabularyItemResponse' :: BatchCreateCustomVocabularyItemResponse -> Int
$sel:resources:BatchCreateCustomVocabularyItemResponse' :: BatchCreateCustomVocabularyItemResponse
-> Maybe [CustomVocabularyItem]
$sel:localeId:BatchCreateCustomVocabularyItemResponse' :: BatchCreateCustomVocabularyItemResponse -> Maybe Text
$sel:errors:BatchCreateCustomVocabularyItemResponse' :: BatchCreateCustomVocabularyItemResponse
-> Maybe [FailedCustomVocabularyItem]
$sel:botVersion:BatchCreateCustomVocabularyItemResponse' :: BatchCreateCustomVocabularyItemResponse -> Maybe Text
$sel:botId:BatchCreateCustomVocabularyItemResponse' :: BatchCreateCustomVocabularyItemResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
botId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
botVersion
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [FailedCustomVocabularyItem]
errors
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
localeId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [CustomVocabularyItem]
resources
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus