{-# 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.DescribeImport
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Gets information about a specific import.
module Amazonka.LexV2Models.DescribeImport
  ( -- * Creating a Request
    DescribeImport (..),
    newDescribeImport,

    -- * Request Lenses
    describeImport_importId,

    -- * Destructuring the Response
    DescribeImportResponse (..),
    newDescribeImportResponse,

    -- * Response Lenses
    describeImportResponse_creationDateTime,
    describeImportResponse_failureReasons,
    describeImportResponse_importId,
    describeImportResponse_importStatus,
    describeImportResponse_importedResourceId,
    describeImportResponse_importedResourceName,
    describeImportResponse_lastUpdatedDateTime,
    describeImportResponse_mergeStrategy,
    describeImportResponse_resourceSpecification,
    describeImportResponse_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:/ 'newDescribeImport' smart constructor.
data DescribeImport = DescribeImport'
  { -- | The unique identifier of the import to describe.
    DescribeImport -> Text
importId :: Prelude.Text
  }
  deriving (DescribeImport -> DescribeImport -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeImport -> DescribeImport -> Bool
$c/= :: DescribeImport -> DescribeImport -> Bool
== :: DescribeImport -> DescribeImport -> Bool
$c== :: DescribeImport -> DescribeImport -> Bool
Prelude.Eq, ReadPrec [DescribeImport]
ReadPrec DescribeImport
Int -> ReadS DescribeImport
ReadS [DescribeImport]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeImport]
$creadListPrec :: ReadPrec [DescribeImport]
readPrec :: ReadPrec DescribeImport
$creadPrec :: ReadPrec DescribeImport
readList :: ReadS [DescribeImport]
$creadList :: ReadS [DescribeImport]
readsPrec :: Int -> ReadS DescribeImport
$creadsPrec :: Int -> ReadS DescribeImport
Prelude.Read, Int -> DescribeImport -> ShowS
[DescribeImport] -> ShowS
DescribeImport -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeImport] -> ShowS
$cshowList :: [DescribeImport] -> ShowS
show :: DescribeImport -> String
$cshow :: DescribeImport -> String
showsPrec :: Int -> DescribeImport -> ShowS
$cshowsPrec :: Int -> DescribeImport -> ShowS
Prelude.Show, forall x. Rep DescribeImport x -> DescribeImport
forall x. DescribeImport -> Rep DescribeImport x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeImport x -> DescribeImport
$cfrom :: forall x. DescribeImport -> Rep DescribeImport x
Prelude.Generic)

-- |
-- Create a value of 'DescribeImport' 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:
--
-- 'importId', 'describeImport_importId' - The unique identifier of the import to describe.
newDescribeImport ::
  -- | 'importId'
  Prelude.Text ->
  DescribeImport
newDescribeImport :: Text -> DescribeImport
newDescribeImport Text
pImportId_ =
  DescribeImport' {$sel:importId:DescribeImport' :: Text
importId = Text
pImportId_}

-- | The unique identifier of the import to describe.
describeImport_importId :: Lens.Lens' DescribeImport Prelude.Text
describeImport_importId :: Lens' DescribeImport Text
describeImport_importId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImport' {Text
importId :: Text
$sel:importId:DescribeImport' :: DescribeImport -> Text
importId} -> Text
importId) (\s :: DescribeImport
s@DescribeImport' {} Text
a -> DescribeImport
s {$sel:importId:DescribeImport' :: Text
importId = Text
a} :: DescribeImport)

instance Core.AWSRequest DescribeImport where
  type
    AWSResponse DescribeImport =
      DescribeImportResponse
  request :: (Service -> Service) -> DescribeImport -> Request DescribeImport
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 DescribeImport
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeImport)))
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 Text
-> Maybe ImportStatus
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe MergeStrategy
-> Maybe ImportResourceSpecification
-> Int
-> DescribeImportResponse
DescribeImportResponse'
            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
"failureReasons" 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
"importId")
            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
"importStatus")
            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
"importedResourceId")
            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
"importedResourceName")
            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
"lastUpdatedDateTime")
            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
"mergeStrategy")
            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 DescribeImport where
  hashWithSalt :: Int -> DescribeImport -> Int
hashWithSalt Int
_salt DescribeImport' {Text
importId :: Text
$sel:importId:DescribeImport' :: DescribeImport -> Text
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
importId

instance Prelude.NFData DescribeImport where
  rnf :: DescribeImport -> ()
rnf DescribeImport' {Text
importId :: Text
$sel:importId:DescribeImport' :: DescribeImport -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
importId

instance Data.ToHeaders DescribeImport where
  toHeaders :: DescribeImport -> 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 DescribeImport where
  toPath :: DescribeImport -> ByteString
toPath DescribeImport' {Text
importId :: Text
$sel:importId:DescribeImport' :: DescribeImport -> Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/imports/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
importId, ByteString
"/"]

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

-- | /See:/ 'newDescribeImportResponse' smart constructor.
data DescribeImportResponse = DescribeImportResponse'
  { -- | The date and time that the import was created.
    DescribeImportResponse -> Maybe POSIX
creationDateTime :: Prelude.Maybe Data.POSIX,
    -- | If the @importStatus@ field is @Failed@, this provides one or more
    -- reasons for the failure.
    DescribeImportResponse -> Maybe [Text]
failureReasons :: Prelude.Maybe [Prelude.Text],
    -- | The unique identifier of the described import.
    DescribeImportResponse -> Maybe Text
importId :: Prelude.Maybe Prelude.Text,
    -- | The status of the import process. When the status is @Completed@ the
    -- resource is imported and ready for use.
    DescribeImportResponse -> Maybe ImportStatus
importStatus :: Prelude.Maybe ImportStatus,
    -- | The unique identifier that Amazon Lex assigned to the resource created
    -- by the import.
    DescribeImportResponse -> Maybe Text
importedResourceId :: Prelude.Maybe Prelude.Text,
    -- | The name of the imported resource.
    DescribeImportResponse -> Maybe Text
importedResourceName :: Prelude.Maybe Prelude.Text,
    -- | The date and time that the import was last updated.
    DescribeImportResponse -> Maybe POSIX
lastUpdatedDateTime :: Prelude.Maybe Data.POSIX,
    -- | The strategy used when there was a name conflict between the imported
    -- resource and an existing resource. When the merge strategy is
    -- @FailOnConflict@ existing resources are not overwritten and the import
    -- fails.
    DescribeImportResponse -> Maybe MergeStrategy
mergeStrategy :: Prelude.Maybe MergeStrategy,
    -- | The specifications of the imported bot, bot locale, or custom
    -- vocabulary.
    DescribeImportResponse -> Maybe ImportResourceSpecification
resourceSpecification :: Prelude.Maybe ImportResourceSpecification,
    -- | The response's http status code.
    DescribeImportResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeImportResponse -> DescribeImportResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeImportResponse -> DescribeImportResponse -> Bool
$c/= :: DescribeImportResponse -> DescribeImportResponse -> Bool
== :: DescribeImportResponse -> DescribeImportResponse -> Bool
$c== :: DescribeImportResponse -> DescribeImportResponse -> Bool
Prelude.Eq, ReadPrec [DescribeImportResponse]
ReadPrec DescribeImportResponse
Int -> ReadS DescribeImportResponse
ReadS [DescribeImportResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeImportResponse]
$creadListPrec :: ReadPrec [DescribeImportResponse]
readPrec :: ReadPrec DescribeImportResponse
$creadPrec :: ReadPrec DescribeImportResponse
readList :: ReadS [DescribeImportResponse]
$creadList :: ReadS [DescribeImportResponse]
readsPrec :: Int -> ReadS DescribeImportResponse
$creadsPrec :: Int -> ReadS DescribeImportResponse
Prelude.Read, Int -> DescribeImportResponse -> ShowS
[DescribeImportResponse] -> ShowS
DescribeImportResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeImportResponse] -> ShowS
$cshowList :: [DescribeImportResponse] -> ShowS
show :: DescribeImportResponse -> String
$cshow :: DescribeImportResponse -> String
showsPrec :: Int -> DescribeImportResponse -> ShowS
$cshowsPrec :: Int -> DescribeImportResponse -> ShowS
Prelude.Show, forall x. Rep DescribeImportResponse x -> DescribeImportResponse
forall x. DescribeImportResponse -> Rep DescribeImportResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeImportResponse x -> DescribeImportResponse
$cfrom :: forall x. DescribeImportResponse -> Rep DescribeImportResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeImportResponse' 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', 'describeImportResponse_creationDateTime' - The date and time that the import was created.
--
-- 'failureReasons', 'describeImportResponse_failureReasons' - If the @importStatus@ field is @Failed@, this provides one or more
-- reasons for the failure.
--
-- 'importId', 'describeImportResponse_importId' - The unique identifier of the described import.
--
-- 'importStatus', 'describeImportResponse_importStatus' - The status of the import process. When the status is @Completed@ the
-- resource is imported and ready for use.
--
-- 'importedResourceId', 'describeImportResponse_importedResourceId' - The unique identifier that Amazon Lex assigned to the resource created
-- by the import.
--
-- 'importedResourceName', 'describeImportResponse_importedResourceName' - The name of the imported resource.
--
-- 'lastUpdatedDateTime', 'describeImportResponse_lastUpdatedDateTime' - The date and time that the import was last updated.
--
-- 'mergeStrategy', 'describeImportResponse_mergeStrategy' - The strategy used when there was a name conflict between the imported
-- resource and an existing resource. When the merge strategy is
-- @FailOnConflict@ existing resources are not overwritten and the import
-- fails.
--
-- 'resourceSpecification', 'describeImportResponse_resourceSpecification' - The specifications of the imported bot, bot locale, or custom
-- vocabulary.
--
-- 'httpStatus', 'describeImportResponse_httpStatus' - The response's http status code.
newDescribeImportResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeImportResponse
newDescribeImportResponse :: Int -> DescribeImportResponse
newDescribeImportResponse Int
pHttpStatus_ =
  DescribeImportResponse'
    { $sel:creationDateTime:DescribeImportResponse' :: Maybe POSIX
creationDateTime =
        forall a. Maybe a
Prelude.Nothing,
      $sel:failureReasons:DescribeImportResponse' :: Maybe [Text]
failureReasons = forall a. Maybe a
Prelude.Nothing,
      $sel:importId:DescribeImportResponse' :: Maybe Text
importId = forall a. Maybe a
Prelude.Nothing,
      $sel:importStatus:DescribeImportResponse' :: Maybe ImportStatus
importStatus = forall a. Maybe a
Prelude.Nothing,
      $sel:importedResourceId:DescribeImportResponse' :: Maybe Text
importedResourceId = forall a. Maybe a
Prelude.Nothing,
      $sel:importedResourceName:DescribeImportResponse' :: Maybe Text
importedResourceName = forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedDateTime:DescribeImportResponse' :: Maybe POSIX
lastUpdatedDateTime = forall a. Maybe a
Prelude.Nothing,
      $sel:mergeStrategy:DescribeImportResponse' :: Maybe MergeStrategy
mergeStrategy = forall a. Maybe a
Prelude.Nothing,
      $sel:resourceSpecification:DescribeImportResponse' :: Maybe ImportResourceSpecification
resourceSpecification = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeImportResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The date and time that the import was created.
describeImportResponse_creationDateTime :: Lens.Lens' DescribeImportResponse (Prelude.Maybe Prelude.UTCTime)
describeImportResponse_creationDateTime :: Lens' DescribeImportResponse (Maybe UTCTime)
describeImportResponse_creationDateTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImportResponse' {Maybe POSIX
creationDateTime :: Maybe POSIX
$sel:creationDateTime:DescribeImportResponse' :: DescribeImportResponse -> Maybe POSIX
creationDateTime} -> Maybe POSIX
creationDateTime) (\s :: DescribeImportResponse
s@DescribeImportResponse' {} Maybe POSIX
a -> DescribeImportResponse
s {$sel:creationDateTime:DescribeImportResponse' :: Maybe POSIX
creationDateTime = Maybe POSIX
a} :: DescribeImportResponse) 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

-- | If the @importStatus@ field is @Failed@, this provides one or more
-- reasons for the failure.
describeImportResponse_failureReasons :: Lens.Lens' DescribeImportResponse (Prelude.Maybe [Prelude.Text])
describeImportResponse_failureReasons :: Lens' DescribeImportResponse (Maybe [Text])
describeImportResponse_failureReasons = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImportResponse' {Maybe [Text]
failureReasons :: Maybe [Text]
$sel:failureReasons:DescribeImportResponse' :: DescribeImportResponse -> Maybe [Text]
failureReasons} -> Maybe [Text]
failureReasons) (\s :: DescribeImportResponse
s@DescribeImportResponse' {} Maybe [Text]
a -> DescribeImportResponse
s {$sel:failureReasons:DescribeImportResponse' :: Maybe [Text]
failureReasons = Maybe [Text]
a} :: DescribeImportResponse) 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

-- | The unique identifier of the described import.
describeImportResponse_importId :: Lens.Lens' DescribeImportResponse (Prelude.Maybe Prelude.Text)
describeImportResponse_importId :: Lens' DescribeImportResponse (Maybe Text)
describeImportResponse_importId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImportResponse' {Maybe Text
importId :: Maybe Text
$sel:importId:DescribeImportResponse' :: DescribeImportResponse -> Maybe Text
importId} -> Maybe Text
importId) (\s :: DescribeImportResponse
s@DescribeImportResponse' {} Maybe Text
a -> DescribeImportResponse
s {$sel:importId:DescribeImportResponse' :: Maybe Text
importId = Maybe Text
a} :: DescribeImportResponse)

-- | The status of the import process. When the status is @Completed@ the
-- resource is imported and ready for use.
describeImportResponse_importStatus :: Lens.Lens' DescribeImportResponse (Prelude.Maybe ImportStatus)
describeImportResponse_importStatus :: Lens' DescribeImportResponse (Maybe ImportStatus)
describeImportResponse_importStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImportResponse' {Maybe ImportStatus
importStatus :: Maybe ImportStatus
$sel:importStatus:DescribeImportResponse' :: DescribeImportResponse -> Maybe ImportStatus
importStatus} -> Maybe ImportStatus
importStatus) (\s :: DescribeImportResponse
s@DescribeImportResponse' {} Maybe ImportStatus
a -> DescribeImportResponse
s {$sel:importStatus:DescribeImportResponse' :: Maybe ImportStatus
importStatus = Maybe ImportStatus
a} :: DescribeImportResponse)

-- | The unique identifier that Amazon Lex assigned to the resource created
-- by the import.
describeImportResponse_importedResourceId :: Lens.Lens' DescribeImportResponse (Prelude.Maybe Prelude.Text)
describeImportResponse_importedResourceId :: Lens' DescribeImportResponse (Maybe Text)
describeImportResponse_importedResourceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImportResponse' {Maybe Text
importedResourceId :: Maybe Text
$sel:importedResourceId:DescribeImportResponse' :: DescribeImportResponse -> Maybe Text
importedResourceId} -> Maybe Text
importedResourceId) (\s :: DescribeImportResponse
s@DescribeImportResponse' {} Maybe Text
a -> DescribeImportResponse
s {$sel:importedResourceId:DescribeImportResponse' :: Maybe Text
importedResourceId = Maybe Text
a} :: DescribeImportResponse)

-- | The name of the imported resource.
describeImportResponse_importedResourceName :: Lens.Lens' DescribeImportResponse (Prelude.Maybe Prelude.Text)
describeImportResponse_importedResourceName :: Lens' DescribeImportResponse (Maybe Text)
describeImportResponse_importedResourceName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImportResponse' {Maybe Text
importedResourceName :: Maybe Text
$sel:importedResourceName:DescribeImportResponse' :: DescribeImportResponse -> Maybe Text
importedResourceName} -> Maybe Text
importedResourceName) (\s :: DescribeImportResponse
s@DescribeImportResponse' {} Maybe Text
a -> DescribeImportResponse
s {$sel:importedResourceName:DescribeImportResponse' :: Maybe Text
importedResourceName = Maybe Text
a} :: DescribeImportResponse)

-- | The date and time that the import was last updated.
describeImportResponse_lastUpdatedDateTime :: Lens.Lens' DescribeImportResponse (Prelude.Maybe Prelude.UTCTime)
describeImportResponse_lastUpdatedDateTime :: Lens' DescribeImportResponse (Maybe UTCTime)
describeImportResponse_lastUpdatedDateTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImportResponse' {Maybe POSIX
lastUpdatedDateTime :: Maybe POSIX
$sel:lastUpdatedDateTime:DescribeImportResponse' :: DescribeImportResponse -> Maybe POSIX
lastUpdatedDateTime} -> Maybe POSIX
lastUpdatedDateTime) (\s :: DescribeImportResponse
s@DescribeImportResponse' {} Maybe POSIX
a -> DescribeImportResponse
s {$sel:lastUpdatedDateTime:DescribeImportResponse' :: Maybe POSIX
lastUpdatedDateTime = Maybe POSIX
a} :: DescribeImportResponse) 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

-- | The strategy used when there was a name conflict between the imported
-- resource and an existing resource. When the merge strategy is
-- @FailOnConflict@ existing resources are not overwritten and the import
-- fails.
describeImportResponse_mergeStrategy :: Lens.Lens' DescribeImportResponse (Prelude.Maybe MergeStrategy)
describeImportResponse_mergeStrategy :: Lens' DescribeImportResponse (Maybe MergeStrategy)
describeImportResponse_mergeStrategy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImportResponse' {Maybe MergeStrategy
mergeStrategy :: Maybe MergeStrategy
$sel:mergeStrategy:DescribeImportResponse' :: DescribeImportResponse -> Maybe MergeStrategy
mergeStrategy} -> Maybe MergeStrategy
mergeStrategy) (\s :: DescribeImportResponse
s@DescribeImportResponse' {} Maybe MergeStrategy
a -> DescribeImportResponse
s {$sel:mergeStrategy:DescribeImportResponse' :: Maybe MergeStrategy
mergeStrategy = Maybe MergeStrategy
a} :: DescribeImportResponse)

-- | The specifications of the imported bot, bot locale, or custom
-- vocabulary.
describeImportResponse_resourceSpecification :: Lens.Lens' DescribeImportResponse (Prelude.Maybe ImportResourceSpecification)
describeImportResponse_resourceSpecification :: Lens' DescribeImportResponse (Maybe ImportResourceSpecification)
describeImportResponse_resourceSpecification = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImportResponse' {Maybe ImportResourceSpecification
resourceSpecification :: Maybe ImportResourceSpecification
$sel:resourceSpecification:DescribeImportResponse' :: DescribeImportResponse -> Maybe ImportResourceSpecification
resourceSpecification} -> Maybe ImportResourceSpecification
resourceSpecification) (\s :: DescribeImportResponse
s@DescribeImportResponse' {} Maybe ImportResourceSpecification
a -> DescribeImportResponse
s {$sel:resourceSpecification:DescribeImportResponse' :: Maybe ImportResourceSpecification
resourceSpecification = Maybe ImportResourceSpecification
a} :: DescribeImportResponse)

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

instance Prelude.NFData DescribeImportResponse where
  rnf :: DescribeImportResponse -> ()
rnf DescribeImportResponse' {Int
Maybe [Text]
Maybe Text
Maybe POSIX
Maybe ImportStatus
Maybe MergeStrategy
Maybe ImportResourceSpecification
httpStatus :: Int
resourceSpecification :: Maybe ImportResourceSpecification
mergeStrategy :: Maybe MergeStrategy
lastUpdatedDateTime :: Maybe POSIX
importedResourceName :: Maybe Text
importedResourceId :: Maybe Text
importStatus :: Maybe ImportStatus
importId :: Maybe Text
failureReasons :: Maybe [Text]
creationDateTime :: Maybe POSIX
$sel:httpStatus:DescribeImportResponse' :: DescribeImportResponse -> Int
$sel:resourceSpecification:DescribeImportResponse' :: DescribeImportResponse -> Maybe ImportResourceSpecification
$sel:mergeStrategy:DescribeImportResponse' :: DescribeImportResponse -> Maybe MergeStrategy
$sel:lastUpdatedDateTime:DescribeImportResponse' :: DescribeImportResponse -> Maybe POSIX
$sel:importedResourceName:DescribeImportResponse' :: DescribeImportResponse -> Maybe Text
$sel:importedResourceId:DescribeImportResponse' :: DescribeImportResponse -> Maybe Text
$sel:importStatus:DescribeImportResponse' :: DescribeImportResponse -> Maybe ImportStatus
$sel:importId:DescribeImportResponse' :: DescribeImportResponse -> Maybe Text
$sel:failureReasons:DescribeImportResponse' :: DescribeImportResponse -> Maybe [Text]
$sel:creationDateTime:DescribeImportResponse' :: DescribeImportResponse -> 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]
failureReasons
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
importId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ImportStatus
importStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
importedResourceId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
importedResourceName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastUpdatedDateTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe MergeStrategy
mergeStrategy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ImportResourceSpecification
resourceSpecification
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus