{-# 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.LexModels.GetExport
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Exports the contents of a Amazon Lex resource in a specified format.
module Amazonka.LexModels.GetExport
  ( -- * Creating a Request
    GetExport (..),
    newGetExport,

    -- * Request Lenses
    getExport_name,
    getExport_version,
    getExport_resourceType,
    getExport_exportType,

    -- * Destructuring the Response
    GetExportResponse (..),
    newGetExportResponse,

    -- * Response Lenses
    getExportResponse_exportStatus,
    getExportResponse_exportType,
    getExportResponse_failureReason,
    getExportResponse_name,
    getExportResponse_resourceType,
    getExportResponse_url,
    getExportResponse_version,
    getExportResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.LexModels.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newGetExport' smart constructor.
data GetExport = GetExport'
  { -- | The name of the bot to export.
    GetExport -> Text
name :: Prelude.Text,
    -- | The version of the bot to export.
    GetExport -> Text
version :: Prelude.Text,
    -- | The type of resource to export.
    GetExport -> ResourceType
resourceType :: ResourceType,
    -- | The format of the exported data.
    GetExport -> ExportType
exportType :: ExportType
  }
  deriving (GetExport -> GetExport -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetExport -> GetExport -> Bool
$c/= :: GetExport -> GetExport -> Bool
== :: GetExport -> GetExport -> Bool
$c== :: GetExport -> GetExport -> Bool
Prelude.Eq, ReadPrec [GetExport]
ReadPrec GetExport
Int -> ReadS GetExport
ReadS [GetExport]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetExport]
$creadListPrec :: ReadPrec [GetExport]
readPrec :: ReadPrec GetExport
$creadPrec :: ReadPrec GetExport
readList :: ReadS [GetExport]
$creadList :: ReadS [GetExport]
readsPrec :: Int -> ReadS GetExport
$creadsPrec :: Int -> ReadS GetExport
Prelude.Read, Int -> GetExport -> ShowS
[GetExport] -> ShowS
GetExport -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetExport] -> ShowS
$cshowList :: [GetExport] -> ShowS
show :: GetExport -> String
$cshow :: GetExport -> String
showsPrec :: Int -> GetExport -> ShowS
$cshowsPrec :: Int -> GetExport -> ShowS
Prelude.Show, forall x. Rep GetExport x -> GetExport
forall x. GetExport -> Rep GetExport x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetExport x -> GetExport
$cfrom :: forall x. GetExport -> Rep GetExport x
Prelude.Generic)

-- |
-- Create a value of 'GetExport' 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:
--
-- 'name', 'getExport_name' - The name of the bot to export.
--
-- 'version', 'getExport_version' - The version of the bot to export.
--
-- 'resourceType', 'getExport_resourceType' - The type of resource to export.
--
-- 'exportType', 'getExport_exportType' - The format of the exported data.
newGetExport ::
  -- | 'name'
  Prelude.Text ->
  -- | 'version'
  Prelude.Text ->
  -- | 'resourceType'
  ResourceType ->
  -- | 'exportType'
  ExportType ->
  GetExport
newGetExport :: Text -> Text -> ResourceType -> ExportType -> GetExport
newGetExport
  Text
pName_
  Text
pVersion_
  ResourceType
pResourceType_
  ExportType
pExportType_ =
    GetExport'
      { $sel:name:GetExport' :: Text
name = Text
pName_,
        $sel:version:GetExport' :: Text
version = Text
pVersion_,
        $sel:resourceType:GetExport' :: ResourceType
resourceType = ResourceType
pResourceType_,
        $sel:exportType:GetExport' :: ExportType
exportType = ExportType
pExportType_
      }

-- | The name of the bot to export.
getExport_name :: Lens.Lens' GetExport Prelude.Text
getExport_name :: Lens' GetExport Text
getExport_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetExport' {Text
name :: Text
$sel:name:GetExport' :: GetExport -> Text
name} -> Text
name) (\s :: GetExport
s@GetExport' {} Text
a -> GetExport
s {$sel:name:GetExport' :: Text
name = Text
a} :: GetExport)

-- | The version of the bot to export.
getExport_version :: Lens.Lens' GetExport Prelude.Text
getExport_version :: Lens' GetExport Text
getExport_version = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetExport' {Text
version :: Text
$sel:version:GetExport' :: GetExport -> Text
version} -> Text
version) (\s :: GetExport
s@GetExport' {} Text
a -> GetExport
s {$sel:version:GetExport' :: Text
version = Text
a} :: GetExport)

-- | The type of resource to export.
getExport_resourceType :: Lens.Lens' GetExport ResourceType
getExport_resourceType :: Lens' GetExport ResourceType
getExport_resourceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetExport' {ResourceType
resourceType :: ResourceType
$sel:resourceType:GetExport' :: GetExport -> ResourceType
resourceType} -> ResourceType
resourceType) (\s :: GetExport
s@GetExport' {} ResourceType
a -> GetExport
s {$sel:resourceType:GetExport' :: ResourceType
resourceType = ResourceType
a} :: GetExport)

-- | The format of the exported data.
getExport_exportType :: Lens.Lens' GetExport ExportType
getExport_exportType :: Lens' GetExport ExportType
getExport_exportType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetExport' {ExportType
exportType :: ExportType
$sel:exportType:GetExport' :: GetExport -> ExportType
exportType} -> ExportType
exportType) (\s :: GetExport
s@GetExport' {} ExportType
a -> GetExport
s {$sel:exportType:GetExport' :: ExportType
exportType = ExportType
a} :: GetExport)

instance Core.AWSRequest GetExport where
  type AWSResponse GetExport = GetExportResponse
  request :: (Service -> Service) -> GetExport -> Request GetExport
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetExport
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetExport)))
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 ExportStatus
-> Maybe ExportType
-> Maybe Text
-> Maybe Text
-> Maybe ResourceType
-> Maybe Text
-> Maybe Text
-> Int
-> GetExportResponse
GetExportResponse'
            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
"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
"exportType")
            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
"failureReason")
            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
"name")
            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
"resourceType")
            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
"url")
            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
"version")
            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 GetExport where
  hashWithSalt :: Int -> GetExport -> Int
hashWithSalt Int
_salt GetExport' {Text
ExportType
ResourceType
exportType :: ExportType
resourceType :: ResourceType
version :: Text
name :: Text
$sel:exportType:GetExport' :: GetExport -> ExportType
$sel:resourceType:GetExport' :: GetExport -> ResourceType
$sel:version:GetExport' :: GetExport -> Text
$sel:name:GetExport' :: GetExport -> Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
version
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ResourceType
resourceType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ExportType
exportType

instance Prelude.NFData GetExport where
  rnf :: GetExport -> ()
rnf GetExport' {Text
ExportType
ResourceType
exportType :: ExportType
resourceType :: ResourceType
version :: Text
name :: Text
$sel:exportType:GetExport' :: GetExport -> ExportType
$sel:resourceType:GetExport' :: GetExport -> ResourceType
$sel:version:GetExport' :: GetExport -> Text
$sel:name:GetExport' :: GetExport -> Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
version
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ResourceType
resourceType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ExportType
exportType

instance Data.ToHeaders GetExport where
  toHeaders :: GetExport -> 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.ToPath GetExport where
  toPath :: GetExport -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/exports/"

instance Data.ToQuery GetExport where
  toQuery :: GetExport -> QueryString
toQuery GetExport' {Text
ExportType
ResourceType
exportType :: ExportType
resourceType :: ResourceType
version :: Text
name :: Text
$sel:exportType:GetExport' :: GetExport -> ExportType
$sel:resourceType:GetExport' :: GetExport -> ResourceType
$sel:version:GetExport' :: GetExport -> Text
$sel:name:GetExport' :: GetExport -> Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"name" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
name,
        ByteString
"version" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
version,
        ByteString
"resourceType" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: ResourceType
resourceType,
        ByteString
"exportType" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: ExportType
exportType
      ]

-- | /See:/ 'newGetExportResponse' smart constructor.
data GetExportResponse = GetExportResponse'
  { -- | The status of the export.
    --
    -- -   @IN_PROGRESS@ - The export is in progress.
    --
    -- -   @READY@ - The export is complete.
    --
    -- -   @FAILED@ - The export could not be completed.
    GetExportResponse -> Maybe ExportStatus
exportStatus :: Prelude.Maybe ExportStatus,
    -- | The format of the exported data.
    GetExportResponse -> Maybe ExportType
exportType :: Prelude.Maybe ExportType,
    -- | If @status@ is @FAILED@, Amazon Lex provides the reason that it failed
    -- to export the resource.
    GetExportResponse -> Maybe Text
failureReason :: Prelude.Maybe Prelude.Text,
    -- | The name of the bot being exported.
    GetExportResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The type of the exported resource.
    GetExportResponse -> Maybe ResourceType
resourceType :: Prelude.Maybe ResourceType,
    -- | An S3 pre-signed URL that provides the location of the exported
    -- resource. The exported resource is a ZIP archive that contains the
    -- exported resource in JSON format. The structure of the archive may
    -- change. Your code should not rely on the archive structure.
    GetExportResponse -> Maybe Text
url :: Prelude.Maybe Prelude.Text,
    -- | The version of the bot being exported.
    GetExportResponse -> Maybe Text
version :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    GetExportResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetExportResponse -> GetExportResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetExportResponse -> GetExportResponse -> Bool
$c/= :: GetExportResponse -> GetExportResponse -> Bool
== :: GetExportResponse -> GetExportResponse -> Bool
$c== :: GetExportResponse -> GetExportResponse -> Bool
Prelude.Eq, ReadPrec [GetExportResponse]
ReadPrec GetExportResponse
Int -> ReadS GetExportResponse
ReadS [GetExportResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetExportResponse]
$creadListPrec :: ReadPrec [GetExportResponse]
readPrec :: ReadPrec GetExportResponse
$creadPrec :: ReadPrec GetExportResponse
readList :: ReadS [GetExportResponse]
$creadList :: ReadS [GetExportResponse]
readsPrec :: Int -> ReadS GetExportResponse
$creadsPrec :: Int -> ReadS GetExportResponse
Prelude.Read, Int -> GetExportResponse -> ShowS
[GetExportResponse] -> ShowS
GetExportResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetExportResponse] -> ShowS
$cshowList :: [GetExportResponse] -> ShowS
show :: GetExportResponse -> String
$cshow :: GetExportResponse -> String
showsPrec :: Int -> GetExportResponse -> ShowS
$cshowsPrec :: Int -> GetExportResponse -> ShowS
Prelude.Show, forall x. Rep GetExportResponse x -> GetExportResponse
forall x. GetExportResponse -> Rep GetExportResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetExportResponse x -> GetExportResponse
$cfrom :: forall x. GetExportResponse -> Rep GetExportResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetExportResponse' 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:
--
-- 'exportStatus', 'getExportResponse_exportStatus' - The status of the export.
--
-- -   @IN_PROGRESS@ - The export is in progress.
--
-- -   @READY@ - The export is complete.
--
-- -   @FAILED@ - The export could not be completed.
--
-- 'exportType', 'getExportResponse_exportType' - The format of the exported data.
--
-- 'failureReason', 'getExportResponse_failureReason' - If @status@ is @FAILED@, Amazon Lex provides the reason that it failed
-- to export the resource.
--
-- 'name', 'getExportResponse_name' - The name of the bot being exported.
--
-- 'resourceType', 'getExportResponse_resourceType' - The type of the exported resource.
--
-- 'url', 'getExportResponse_url' - An S3 pre-signed URL that provides the location of the exported
-- resource. The exported resource is a ZIP archive that contains the
-- exported resource in JSON format. The structure of the archive may
-- change. Your code should not rely on the archive structure.
--
-- 'version', 'getExportResponse_version' - The version of the bot being exported.
--
-- 'httpStatus', 'getExportResponse_httpStatus' - The response's http status code.
newGetExportResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetExportResponse
newGetExportResponse :: Int -> GetExportResponse
newGetExportResponse Int
pHttpStatus_ =
  GetExportResponse'
    { $sel:exportStatus:GetExportResponse' :: Maybe ExportStatus
exportStatus = forall a. Maybe a
Prelude.Nothing,
      $sel:exportType:GetExportResponse' :: Maybe ExportType
exportType = forall a. Maybe a
Prelude.Nothing,
      $sel:failureReason:GetExportResponse' :: Maybe Text
failureReason = forall a. Maybe a
Prelude.Nothing,
      $sel:name:GetExportResponse' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
      $sel:resourceType:GetExportResponse' :: Maybe ResourceType
resourceType = forall a. Maybe a
Prelude.Nothing,
      $sel:url:GetExportResponse' :: Maybe Text
url = forall a. Maybe a
Prelude.Nothing,
      $sel:version:GetExportResponse' :: Maybe Text
version = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetExportResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The status of the export.
--
-- -   @IN_PROGRESS@ - The export is in progress.
--
-- -   @READY@ - The export is complete.
--
-- -   @FAILED@ - The export could not be completed.
getExportResponse_exportStatus :: Lens.Lens' GetExportResponse (Prelude.Maybe ExportStatus)
getExportResponse_exportStatus :: Lens' GetExportResponse (Maybe ExportStatus)
getExportResponse_exportStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetExportResponse' {Maybe ExportStatus
exportStatus :: Maybe ExportStatus
$sel:exportStatus:GetExportResponse' :: GetExportResponse -> Maybe ExportStatus
exportStatus} -> Maybe ExportStatus
exportStatus) (\s :: GetExportResponse
s@GetExportResponse' {} Maybe ExportStatus
a -> GetExportResponse
s {$sel:exportStatus:GetExportResponse' :: Maybe ExportStatus
exportStatus = Maybe ExportStatus
a} :: GetExportResponse)

-- | The format of the exported data.
getExportResponse_exportType :: Lens.Lens' GetExportResponse (Prelude.Maybe ExportType)
getExportResponse_exportType :: Lens' GetExportResponse (Maybe ExportType)
getExportResponse_exportType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetExportResponse' {Maybe ExportType
exportType :: Maybe ExportType
$sel:exportType:GetExportResponse' :: GetExportResponse -> Maybe ExportType
exportType} -> Maybe ExportType
exportType) (\s :: GetExportResponse
s@GetExportResponse' {} Maybe ExportType
a -> GetExportResponse
s {$sel:exportType:GetExportResponse' :: Maybe ExportType
exportType = Maybe ExportType
a} :: GetExportResponse)

-- | If @status@ is @FAILED@, Amazon Lex provides the reason that it failed
-- to export the resource.
getExportResponse_failureReason :: Lens.Lens' GetExportResponse (Prelude.Maybe Prelude.Text)
getExportResponse_failureReason :: Lens' GetExportResponse (Maybe Text)
getExportResponse_failureReason = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetExportResponse' {Maybe Text
failureReason :: Maybe Text
$sel:failureReason:GetExportResponse' :: GetExportResponse -> Maybe Text
failureReason} -> Maybe Text
failureReason) (\s :: GetExportResponse
s@GetExportResponse' {} Maybe Text
a -> GetExportResponse
s {$sel:failureReason:GetExportResponse' :: Maybe Text
failureReason = Maybe Text
a} :: GetExportResponse)

-- | The name of the bot being exported.
getExportResponse_name :: Lens.Lens' GetExportResponse (Prelude.Maybe Prelude.Text)
getExportResponse_name :: Lens' GetExportResponse (Maybe Text)
getExportResponse_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetExportResponse' {Maybe Text
name :: Maybe Text
$sel:name:GetExportResponse' :: GetExportResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: GetExportResponse
s@GetExportResponse' {} Maybe Text
a -> GetExportResponse
s {$sel:name:GetExportResponse' :: Maybe Text
name = Maybe Text
a} :: GetExportResponse)

-- | The type of the exported resource.
getExportResponse_resourceType :: Lens.Lens' GetExportResponse (Prelude.Maybe ResourceType)
getExportResponse_resourceType :: Lens' GetExportResponse (Maybe ResourceType)
getExportResponse_resourceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetExportResponse' {Maybe ResourceType
resourceType :: Maybe ResourceType
$sel:resourceType:GetExportResponse' :: GetExportResponse -> Maybe ResourceType
resourceType} -> Maybe ResourceType
resourceType) (\s :: GetExportResponse
s@GetExportResponse' {} Maybe ResourceType
a -> GetExportResponse
s {$sel:resourceType:GetExportResponse' :: Maybe ResourceType
resourceType = Maybe ResourceType
a} :: GetExportResponse)

-- | An S3 pre-signed URL that provides the location of the exported
-- resource. The exported resource is a ZIP archive that contains the
-- exported resource in JSON format. The structure of the archive may
-- change. Your code should not rely on the archive structure.
getExportResponse_url :: Lens.Lens' GetExportResponse (Prelude.Maybe Prelude.Text)
getExportResponse_url :: Lens' GetExportResponse (Maybe Text)
getExportResponse_url = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetExportResponse' {Maybe Text
url :: Maybe Text
$sel:url:GetExportResponse' :: GetExportResponse -> Maybe Text
url} -> Maybe Text
url) (\s :: GetExportResponse
s@GetExportResponse' {} Maybe Text
a -> GetExportResponse
s {$sel:url:GetExportResponse' :: Maybe Text
url = Maybe Text
a} :: GetExportResponse)

-- | The version of the bot being exported.
getExportResponse_version :: Lens.Lens' GetExportResponse (Prelude.Maybe Prelude.Text)
getExportResponse_version :: Lens' GetExportResponse (Maybe Text)
getExportResponse_version = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetExportResponse' {Maybe Text
version :: Maybe Text
$sel:version:GetExportResponse' :: GetExportResponse -> Maybe Text
version} -> Maybe Text
version) (\s :: GetExportResponse
s@GetExportResponse' {} Maybe Text
a -> GetExportResponse
s {$sel:version:GetExportResponse' :: Maybe Text
version = Maybe Text
a} :: GetExportResponse)

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

instance Prelude.NFData GetExportResponse where
  rnf :: GetExportResponse -> ()
rnf GetExportResponse' {Int
Maybe Text
Maybe ExportStatus
Maybe ExportType
Maybe ResourceType
httpStatus :: Int
version :: Maybe Text
url :: Maybe Text
resourceType :: Maybe ResourceType
name :: Maybe Text
failureReason :: Maybe Text
exportType :: Maybe ExportType
exportStatus :: Maybe ExportStatus
$sel:httpStatus:GetExportResponse' :: GetExportResponse -> Int
$sel:version:GetExportResponse' :: GetExportResponse -> Maybe Text
$sel:url:GetExportResponse' :: GetExportResponse -> Maybe Text
$sel:resourceType:GetExportResponse' :: GetExportResponse -> Maybe ResourceType
$sel:name:GetExportResponse' :: GetExportResponse -> Maybe Text
$sel:failureReason:GetExportResponse' :: GetExportResponse -> Maybe Text
$sel:exportType:GetExportResponse' :: GetExportResponse -> Maybe ExportType
$sel:exportStatus:GetExportResponse' :: GetExportResponse -> Maybe ExportStatus
..} =
    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 ExportType
exportType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
failureReason
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ResourceType
resourceType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
url
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
version
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus