{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.LexV2Models.CreateExport
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates a zip archive containing the contents of a bot or a bot locale.
-- The archive contains a directory structure that contains JSON files that
-- define the bot.
--
-- You can create an archive that contains the complete definition of a
-- bot, or you can specify that the archive contain only the definition of
-- a single bot locale.
--
-- For more information about exporting bots, and about the structure of
-- the export archive, see
-- <https://docs.aws.amazon.com/lexv2/latest/dg/importing-exporting.html Importing and exporting bots>
module Amazonka.LexV2Models.CreateExport
  ( -- * Creating a Request
    CreateExport (..),
    newCreateExport,

    -- * Request Lenses
    createExport_filePassword,
    createExport_resourceSpecification,
    createExport_fileFormat,

    -- * Destructuring the Response
    CreateExportResponse (..),
    newCreateExportResponse,

    -- * Response Lenses
    createExportResponse_creationDateTime,
    createExportResponse_exportId,
    createExportResponse_exportStatus,
    createExportResponse_fileFormat,
    createExportResponse_resourceSpecification,
    createExportResponse_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

-- | /See:/ 'newCreateExport' smart constructor.
data CreateExport = CreateExport'
  { -- | An password to use to encrypt the exported archive. Using a password is
    -- optional, but you should encrypt the archive to protect the data in
    -- transit between Amazon Lex and your local computer.
    CreateExport -> Maybe (Sensitive Text)
filePassword :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | Specifies the type of resource to export, either a bot or a bot locale.
    -- You can only specify one type of resource to export.
    CreateExport -> ExportResourceSpecification
resourceSpecification :: ExportResourceSpecification,
    -- | The file format of the bot or bot locale definition files.
    CreateExport -> ImportExportFileFormat
fileFormat :: ImportExportFileFormat
  }
  deriving (CreateExport -> CreateExport -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateExport -> CreateExport -> Bool
$c/= :: CreateExport -> CreateExport -> Bool
== :: CreateExport -> CreateExport -> Bool
$c== :: CreateExport -> CreateExport -> Bool
Prelude.Eq, Int -> CreateExport -> ShowS
[CreateExport] -> ShowS
CreateExport -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateExport] -> ShowS
$cshowList :: [CreateExport] -> ShowS
show :: CreateExport -> String
$cshow :: CreateExport -> String
showsPrec :: Int -> CreateExport -> ShowS
$cshowsPrec :: Int -> CreateExport -> ShowS
Prelude.Show, forall x. Rep CreateExport x -> CreateExport
forall x. CreateExport -> Rep CreateExport x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateExport x -> CreateExport
$cfrom :: forall x. CreateExport -> Rep CreateExport x
Prelude.Generic)

-- |
-- Create a value of 'CreateExport' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'filePassword', 'createExport_filePassword' - An password to use to encrypt the exported archive. Using a password is
-- optional, but you should encrypt the archive to protect the data in
-- transit between Amazon Lex and your local computer.
--
-- 'resourceSpecification', 'createExport_resourceSpecification' - Specifies the type of resource to export, either a bot or a bot locale.
-- You can only specify one type of resource to export.
--
-- 'fileFormat', 'createExport_fileFormat' - The file format of the bot or bot locale definition files.
newCreateExport ::
  -- | 'resourceSpecification'
  ExportResourceSpecification ->
  -- | 'fileFormat'
  ImportExportFileFormat ->
  CreateExport
newCreateExport :: ExportResourceSpecification
-> ImportExportFileFormat -> CreateExport
newCreateExport ExportResourceSpecification
pResourceSpecification_ ImportExportFileFormat
pFileFormat_ =
  CreateExport'
    { $sel:filePassword:CreateExport' :: Maybe (Sensitive Text)
filePassword = forall a. Maybe a
Prelude.Nothing,
      $sel:resourceSpecification:CreateExport' :: ExportResourceSpecification
resourceSpecification = ExportResourceSpecification
pResourceSpecification_,
      $sel:fileFormat:CreateExport' :: ImportExportFileFormat
fileFormat = ImportExportFileFormat
pFileFormat_
    }

-- | An password to use to encrypt the exported archive. Using a password is
-- optional, but you should encrypt the archive to protect the data in
-- transit between Amazon Lex and your local computer.
createExport_filePassword :: Lens.Lens' CreateExport (Prelude.Maybe Prelude.Text)
createExport_filePassword :: Lens' CreateExport (Maybe Text)
createExport_filePassword = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateExport' {Maybe (Sensitive Text)
filePassword :: Maybe (Sensitive Text)
$sel:filePassword:CreateExport' :: CreateExport -> Maybe (Sensitive Text)
filePassword} -> Maybe (Sensitive Text)
filePassword) (\s :: CreateExport
s@CreateExport' {} Maybe (Sensitive Text)
a -> CreateExport
s {$sel:filePassword:CreateExport' :: Maybe (Sensitive Text)
filePassword = Maybe (Sensitive Text)
a} :: CreateExport) 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 a. Iso' (Sensitive a) a
Data._Sensitive

-- | Specifies the type of resource to export, either a bot or a bot locale.
-- You can only specify one type of resource to export.
createExport_resourceSpecification :: Lens.Lens' CreateExport ExportResourceSpecification
createExport_resourceSpecification :: Lens' CreateExport ExportResourceSpecification
createExport_resourceSpecification = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateExport' {ExportResourceSpecification
resourceSpecification :: ExportResourceSpecification
$sel:resourceSpecification:CreateExport' :: CreateExport -> ExportResourceSpecification
resourceSpecification} -> ExportResourceSpecification
resourceSpecification) (\s :: CreateExport
s@CreateExport' {} ExportResourceSpecification
a -> CreateExport
s {$sel:resourceSpecification:CreateExport' :: ExportResourceSpecification
resourceSpecification = ExportResourceSpecification
a} :: CreateExport)

-- | The file format of the bot or bot locale definition files.
createExport_fileFormat :: Lens.Lens' CreateExport ImportExportFileFormat
createExport_fileFormat :: Lens' CreateExport ImportExportFileFormat
createExport_fileFormat = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateExport' {ImportExportFileFormat
fileFormat :: ImportExportFileFormat
$sel:fileFormat:CreateExport' :: CreateExport -> ImportExportFileFormat
fileFormat} -> ImportExportFileFormat
fileFormat) (\s :: CreateExport
s@CreateExport' {} ImportExportFileFormat
a -> CreateExport
s {$sel:fileFormat:CreateExport' :: ImportExportFileFormat
fileFormat = ImportExportFileFormat
a} :: CreateExport)

instance Core.AWSRequest CreateExport where
  type AWSResponse CreateExport = CreateExportResponse
  request :: (Service -> Service) -> CreateExport -> Request CreateExport
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 CreateExport
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateExport)))
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 POSIX
-> Maybe Text
-> Maybe ExportStatus
-> Maybe ImportExportFileFormat
-> Maybe ExportResourceSpecification
-> Int
-> CreateExportResponse
CreateExportResponse'
            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
"creationDateTime")
            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
"exportId")
            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
"exportStatus")
            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
"fileFormat")
            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
"resourceSpecification")
            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 CreateExport where
  hashWithSalt :: Int -> CreateExport -> Int
hashWithSalt Int
_salt CreateExport' {Maybe (Sensitive Text)
ExportResourceSpecification
ImportExportFileFormat
fileFormat :: ImportExportFileFormat
resourceSpecification :: ExportResourceSpecification
filePassword :: Maybe (Sensitive Text)
$sel:fileFormat:CreateExport' :: CreateExport -> ImportExportFileFormat
$sel:resourceSpecification:CreateExport' :: CreateExport -> ExportResourceSpecification
$sel:filePassword:CreateExport' :: CreateExport -> Maybe (Sensitive Text)
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
filePassword
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ExportResourceSpecification
resourceSpecification
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ImportExportFileFormat
fileFormat

instance Prelude.NFData CreateExport where
  rnf :: CreateExport -> ()
rnf CreateExport' {Maybe (Sensitive Text)
ExportResourceSpecification
ImportExportFileFormat
fileFormat :: ImportExportFileFormat
resourceSpecification :: ExportResourceSpecification
filePassword :: Maybe (Sensitive Text)
$sel:fileFormat:CreateExport' :: CreateExport -> ImportExportFileFormat
$sel:resourceSpecification:CreateExport' :: CreateExport -> ExportResourceSpecification
$sel:filePassword:CreateExport' :: CreateExport -> Maybe (Sensitive Text)
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
filePassword
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ExportResourceSpecification
resourceSpecification
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ImportExportFileFormat
fileFormat

instance Data.ToHeaders CreateExport where
  toHeaders :: CreateExport -> 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 CreateExport where
  toJSON :: CreateExport -> Value
toJSON CreateExport' {Maybe (Sensitive Text)
ExportResourceSpecification
ImportExportFileFormat
fileFormat :: ImportExportFileFormat
resourceSpecification :: ExportResourceSpecification
filePassword :: Maybe (Sensitive Text)
$sel:fileFormat:CreateExport' :: CreateExport -> ImportExportFileFormat
$sel:resourceSpecification:CreateExport' :: CreateExport -> ExportResourceSpecification
$sel:filePassword:CreateExport' :: CreateExport -> Maybe (Sensitive Text)
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"filePassword" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
filePassword,
            forall a. a -> Maybe a
Prelude.Just
              ( Key
"resourceSpecification"
                  forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= ExportResourceSpecification
resourceSpecification
              ),
            forall a. a -> Maybe a
Prelude.Just (Key
"fileFormat" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= ImportExportFileFormat
fileFormat)
          ]
      )

instance Data.ToPath CreateExport where
  toPath :: CreateExport -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/exports/"

instance Data.ToQuery CreateExport where
  toQuery :: CreateExport -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newCreateExportResponse' smart constructor.
data CreateExportResponse = CreateExportResponse'
  { -- | The date and time that the request to export a bot was created.
    CreateExportResponse -> Maybe POSIX
creationDateTime :: Prelude.Maybe Data.POSIX,
    -- | An identifier for a specific request to create an export.
    CreateExportResponse -> Maybe Text
exportId :: Prelude.Maybe Prelude.Text,
    -- | The status of the export. When the status is @Completed@, you can use
    -- the
    -- <https://docs.aws.amazon.com/lexv2/latest/dg/API_DescribeExport.html DescribeExport>
    -- operation to get the pre-signed S3 URL link to your exported bot or bot
    -- locale.
    CreateExportResponse -> Maybe ExportStatus
exportStatus :: Prelude.Maybe ExportStatus,
    -- | The file format used for the bot or bot locale definition files.
    CreateExportResponse -> Maybe ImportExportFileFormat
fileFormat :: Prelude.Maybe ImportExportFileFormat,
    -- | A description of the type of resource that was exported, either a bot or
    -- a bot locale.
    CreateExportResponse -> Maybe ExportResourceSpecification
resourceSpecification :: Prelude.Maybe ExportResourceSpecification,
    -- | The response's http status code.
    CreateExportResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateExportResponse -> CreateExportResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateExportResponse -> CreateExportResponse -> Bool
$c/= :: CreateExportResponse -> CreateExportResponse -> Bool
== :: CreateExportResponse -> CreateExportResponse -> Bool
$c== :: CreateExportResponse -> CreateExportResponse -> Bool
Prelude.Eq, ReadPrec [CreateExportResponse]
ReadPrec CreateExportResponse
Int -> ReadS CreateExportResponse
ReadS [CreateExportResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateExportResponse]
$creadListPrec :: ReadPrec [CreateExportResponse]
readPrec :: ReadPrec CreateExportResponse
$creadPrec :: ReadPrec CreateExportResponse
readList :: ReadS [CreateExportResponse]
$creadList :: ReadS [CreateExportResponse]
readsPrec :: Int -> ReadS CreateExportResponse
$creadsPrec :: Int -> ReadS CreateExportResponse
Prelude.Read, Int -> CreateExportResponse -> ShowS
[CreateExportResponse] -> ShowS
CreateExportResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateExportResponse] -> ShowS
$cshowList :: [CreateExportResponse] -> ShowS
show :: CreateExportResponse -> String
$cshow :: CreateExportResponse -> String
showsPrec :: Int -> CreateExportResponse -> ShowS
$cshowsPrec :: Int -> CreateExportResponse -> ShowS
Prelude.Show, forall x. Rep CreateExportResponse x -> CreateExportResponse
forall x. CreateExportResponse -> Rep CreateExportResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateExportResponse x -> CreateExportResponse
$cfrom :: forall x. CreateExportResponse -> Rep CreateExportResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateExportResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'creationDateTime', 'createExportResponse_creationDateTime' - The date and time that the request to export a bot was created.
--
-- 'exportId', 'createExportResponse_exportId' - An identifier for a specific request to create an export.
--
-- 'exportStatus', 'createExportResponse_exportStatus' - The status of the export. When the status is @Completed@, you can use
-- the
-- <https://docs.aws.amazon.com/lexv2/latest/dg/API_DescribeExport.html DescribeExport>
-- operation to get the pre-signed S3 URL link to your exported bot or bot
-- locale.
--
-- 'fileFormat', 'createExportResponse_fileFormat' - The file format used for the bot or bot locale definition files.
--
-- 'resourceSpecification', 'createExportResponse_resourceSpecification' - A description of the type of resource that was exported, either a bot or
-- a bot locale.
--
-- 'httpStatus', 'createExportResponse_httpStatus' - The response's http status code.
newCreateExportResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateExportResponse
newCreateExportResponse :: Int -> CreateExportResponse
newCreateExportResponse Int
pHttpStatus_ =
  CreateExportResponse'
    { $sel:creationDateTime:CreateExportResponse' :: Maybe POSIX
creationDateTime =
        forall a. Maybe a
Prelude.Nothing,
      $sel:exportId:CreateExportResponse' :: Maybe Text
exportId = forall a. Maybe a
Prelude.Nothing,
      $sel:exportStatus:CreateExportResponse' :: Maybe ExportStatus
exportStatus = forall a. Maybe a
Prelude.Nothing,
      $sel:fileFormat:CreateExportResponse' :: Maybe ImportExportFileFormat
fileFormat = forall a. Maybe a
Prelude.Nothing,
      $sel:resourceSpecification:CreateExportResponse' :: Maybe ExportResourceSpecification
resourceSpecification = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateExportResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The date and time that the request to export a bot was created.
createExportResponse_creationDateTime :: Lens.Lens' CreateExportResponse (Prelude.Maybe Prelude.UTCTime)
createExportResponse_creationDateTime :: Lens' CreateExportResponse (Maybe UTCTime)
createExportResponse_creationDateTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateExportResponse' {Maybe POSIX
creationDateTime :: Maybe POSIX
$sel:creationDateTime:CreateExportResponse' :: CreateExportResponse -> Maybe POSIX
creationDateTime} -> Maybe POSIX
creationDateTime) (\s :: CreateExportResponse
s@CreateExportResponse' {} Maybe POSIX
a -> CreateExportResponse
s {$sel:creationDateTime:CreateExportResponse' :: Maybe POSIX
creationDateTime = Maybe POSIX
a} :: CreateExportResponse) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | An identifier for a specific request to create an export.
createExportResponse_exportId :: Lens.Lens' CreateExportResponse (Prelude.Maybe Prelude.Text)
createExportResponse_exportId :: Lens' CreateExportResponse (Maybe Text)
createExportResponse_exportId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateExportResponse' {Maybe Text
exportId :: Maybe Text
$sel:exportId:CreateExportResponse' :: CreateExportResponse -> Maybe Text
exportId} -> Maybe Text
exportId) (\s :: CreateExportResponse
s@CreateExportResponse' {} Maybe Text
a -> CreateExportResponse
s {$sel:exportId:CreateExportResponse' :: Maybe Text
exportId = Maybe Text
a} :: CreateExportResponse)

-- | The status of the export. When the status is @Completed@, you can use
-- the
-- <https://docs.aws.amazon.com/lexv2/latest/dg/API_DescribeExport.html DescribeExport>
-- operation to get the pre-signed S3 URL link to your exported bot or bot
-- locale.
createExportResponse_exportStatus :: Lens.Lens' CreateExportResponse (Prelude.Maybe ExportStatus)
createExportResponse_exportStatus :: Lens' CreateExportResponse (Maybe ExportStatus)
createExportResponse_exportStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateExportResponse' {Maybe ExportStatus
exportStatus :: Maybe ExportStatus
$sel:exportStatus:CreateExportResponse' :: CreateExportResponse -> Maybe ExportStatus
exportStatus} -> Maybe ExportStatus
exportStatus) (\s :: CreateExportResponse
s@CreateExportResponse' {} Maybe ExportStatus
a -> CreateExportResponse
s {$sel:exportStatus:CreateExportResponse' :: Maybe ExportStatus
exportStatus = Maybe ExportStatus
a} :: CreateExportResponse)

-- | The file format used for the bot or bot locale definition files.
createExportResponse_fileFormat :: Lens.Lens' CreateExportResponse (Prelude.Maybe ImportExportFileFormat)
createExportResponse_fileFormat :: Lens' CreateExportResponse (Maybe ImportExportFileFormat)
createExportResponse_fileFormat = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateExportResponse' {Maybe ImportExportFileFormat
fileFormat :: Maybe ImportExportFileFormat
$sel:fileFormat:CreateExportResponse' :: CreateExportResponse -> Maybe ImportExportFileFormat
fileFormat} -> Maybe ImportExportFileFormat
fileFormat) (\s :: CreateExportResponse
s@CreateExportResponse' {} Maybe ImportExportFileFormat
a -> CreateExportResponse
s {$sel:fileFormat:CreateExportResponse' :: Maybe ImportExportFileFormat
fileFormat = Maybe ImportExportFileFormat
a} :: CreateExportResponse)

-- | A description of the type of resource that was exported, either a bot or
-- a bot locale.
createExportResponse_resourceSpecification :: Lens.Lens' CreateExportResponse (Prelude.Maybe ExportResourceSpecification)
createExportResponse_resourceSpecification :: Lens' CreateExportResponse (Maybe ExportResourceSpecification)
createExportResponse_resourceSpecification = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateExportResponse' {Maybe ExportResourceSpecification
resourceSpecification :: Maybe ExportResourceSpecification
$sel:resourceSpecification:CreateExportResponse' :: CreateExportResponse -> Maybe ExportResourceSpecification
resourceSpecification} -> Maybe ExportResourceSpecification
resourceSpecification) (\s :: CreateExportResponse
s@CreateExportResponse' {} Maybe ExportResourceSpecification
a -> CreateExportResponse
s {$sel:resourceSpecification:CreateExportResponse' :: Maybe ExportResourceSpecification
resourceSpecification = Maybe ExportResourceSpecification
a} :: CreateExportResponse)

-- | The response's http status code.
createExportResponse_httpStatus :: Lens.Lens' CreateExportResponse Prelude.Int
createExportResponse_httpStatus :: Lens' CreateExportResponse Int
createExportResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateExportResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateExportResponse' :: CreateExportResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateExportResponse
s@CreateExportResponse' {} Int
a -> CreateExportResponse
s {$sel:httpStatus:CreateExportResponse' :: Int
httpStatus = Int
a} :: CreateExportResponse)

instance Prelude.NFData CreateExportResponse where
  rnf :: CreateExportResponse -> ()
rnf CreateExportResponse' {Int
Maybe Text
Maybe POSIX
Maybe ExportResourceSpecification
Maybe ExportStatus
Maybe ImportExportFileFormat
httpStatus :: Int
resourceSpecification :: Maybe ExportResourceSpecification
fileFormat :: Maybe ImportExportFileFormat
exportStatus :: Maybe ExportStatus
exportId :: Maybe Text
creationDateTime :: Maybe POSIX
$sel:httpStatus:CreateExportResponse' :: CreateExportResponse -> Int
$sel:resourceSpecification:CreateExportResponse' :: CreateExportResponse -> Maybe ExportResourceSpecification
$sel:fileFormat:CreateExportResponse' :: CreateExportResponse -> Maybe ImportExportFileFormat
$sel:exportStatus:CreateExportResponse' :: CreateExportResponse -> Maybe ExportStatus
$sel:exportId:CreateExportResponse' :: CreateExportResponse -> Maybe Text
$sel:creationDateTime:CreateExportResponse' :: CreateExportResponse -> Maybe POSIX
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
creationDateTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
exportId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ExportStatus
exportStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ImportExportFileFormat
fileFormat
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ExportResourceSpecification
resourceSpecification
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus