{-# 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.Discovery.DescribeImportTasks
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns an array of import tasks for your account, including status
-- information, times, IDs, the Amazon S3 Object URL for the import file,
-- and more.
module Amazonka.Discovery.DescribeImportTasks
  ( -- * Creating a Request
    DescribeImportTasks (..),
    newDescribeImportTasks,

    -- * Request Lenses
    describeImportTasks_filters,
    describeImportTasks_nextToken,
    describeImportTasks_maxResults,

    -- * Destructuring the Response
    DescribeImportTasksResponse (..),
    newDescribeImportTasksResponse,

    -- * Response Lenses
    describeImportTasksResponse_tasks,
    describeImportTasksResponse_nextToken,
    describeImportTasksResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.Discovery.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newDescribeImportTasks' smart constructor.
data DescribeImportTasks = DescribeImportTasks'
  { -- | An array of name-value pairs that you provide to filter the results for
    -- the @DescribeImportTask@ request to a specific subset of results.
    -- Currently, wildcard values aren\'t supported for filters.
    DescribeImportTasks -> Maybe [ImportTaskFilter]
filters :: Prelude.Maybe [ImportTaskFilter],
    -- | The token to request a specific page of results.
    DescribeImportTasks -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results that you want this request to return, up
    -- to 100.
    DescribeImportTasks -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (DescribeImportTasks -> DescribeImportTasks -> Bool
(DescribeImportTasks -> DescribeImportTasks -> Bool)
-> (DescribeImportTasks -> DescribeImportTasks -> Bool)
-> Eq DescribeImportTasks
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeImportTasks -> DescribeImportTasks -> Bool
$c/= :: DescribeImportTasks -> DescribeImportTasks -> Bool
== :: DescribeImportTasks -> DescribeImportTasks -> Bool
$c== :: DescribeImportTasks -> DescribeImportTasks -> Bool
Prelude.Eq, ReadPrec [DescribeImportTasks]
ReadPrec DescribeImportTasks
Int -> ReadS DescribeImportTasks
ReadS [DescribeImportTasks]
(Int -> ReadS DescribeImportTasks)
-> ReadS [DescribeImportTasks]
-> ReadPrec DescribeImportTasks
-> ReadPrec [DescribeImportTasks]
-> Read DescribeImportTasks
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeImportTasks]
$creadListPrec :: ReadPrec [DescribeImportTasks]
readPrec :: ReadPrec DescribeImportTasks
$creadPrec :: ReadPrec DescribeImportTasks
readList :: ReadS [DescribeImportTasks]
$creadList :: ReadS [DescribeImportTasks]
readsPrec :: Int -> ReadS DescribeImportTasks
$creadsPrec :: Int -> ReadS DescribeImportTasks
Prelude.Read, Int -> DescribeImportTasks -> ShowS
[DescribeImportTasks] -> ShowS
DescribeImportTasks -> String
(Int -> DescribeImportTasks -> ShowS)
-> (DescribeImportTasks -> String)
-> ([DescribeImportTasks] -> ShowS)
-> Show DescribeImportTasks
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeImportTasks] -> ShowS
$cshowList :: [DescribeImportTasks] -> ShowS
show :: DescribeImportTasks -> String
$cshow :: DescribeImportTasks -> String
showsPrec :: Int -> DescribeImportTasks -> ShowS
$cshowsPrec :: Int -> DescribeImportTasks -> ShowS
Prelude.Show, (forall x. DescribeImportTasks -> Rep DescribeImportTasks x)
-> (forall x. Rep DescribeImportTasks x -> DescribeImportTasks)
-> Generic DescribeImportTasks
forall x. Rep DescribeImportTasks x -> DescribeImportTasks
forall x. DescribeImportTasks -> Rep DescribeImportTasks x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeImportTasks x -> DescribeImportTasks
$cfrom :: forall x. DescribeImportTasks -> Rep DescribeImportTasks x
Prelude.Generic)

-- |
-- Create a value of 'DescribeImportTasks' 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:
--
-- 'filters', 'describeImportTasks_filters' - An array of name-value pairs that you provide to filter the results for
-- the @DescribeImportTask@ request to a specific subset of results.
-- Currently, wildcard values aren\'t supported for filters.
--
-- 'nextToken', 'describeImportTasks_nextToken' - The token to request a specific page of results.
--
-- 'maxResults', 'describeImportTasks_maxResults' - The maximum number of results that you want this request to return, up
-- to 100.
newDescribeImportTasks ::
  DescribeImportTasks
newDescribeImportTasks :: DescribeImportTasks
newDescribeImportTasks =
  DescribeImportTasks' :: Maybe [ImportTaskFilter]
-> Maybe Text -> Maybe Natural -> DescribeImportTasks
DescribeImportTasks'
    { $sel:filters:DescribeImportTasks' :: Maybe [ImportTaskFilter]
filters = Maybe [ImportTaskFilter]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeImportTasks' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:DescribeImportTasks' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | An array of name-value pairs that you provide to filter the results for
-- the @DescribeImportTask@ request to a specific subset of results.
-- Currently, wildcard values aren\'t supported for filters.
describeImportTasks_filters :: Lens.Lens' DescribeImportTasks (Prelude.Maybe [ImportTaskFilter])
describeImportTasks_filters :: (Maybe [ImportTaskFilter] -> f (Maybe [ImportTaskFilter]))
-> DescribeImportTasks -> f DescribeImportTasks
describeImportTasks_filters = (DescribeImportTasks -> Maybe [ImportTaskFilter])
-> (DescribeImportTasks
    -> Maybe [ImportTaskFilter] -> DescribeImportTasks)
-> Lens
     DescribeImportTasks
     DescribeImportTasks
     (Maybe [ImportTaskFilter])
     (Maybe [ImportTaskFilter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImportTasks' {Maybe [ImportTaskFilter]
filters :: Maybe [ImportTaskFilter]
$sel:filters:DescribeImportTasks' :: DescribeImportTasks -> Maybe [ImportTaskFilter]
filters} -> Maybe [ImportTaskFilter]
filters) (\s :: DescribeImportTasks
s@DescribeImportTasks' {} Maybe [ImportTaskFilter]
a -> DescribeImportTasks
s {$sel:filters:DescribeImportTasks' :: Maybe [ImportTaskFilter]
filters = Maybe [ImportTaskFilter]
a} :: DescribeImportTasks) ((Maybe [ImportTaskFilter] -> f (Maybe [ImportTaskFilter]))
 -> DescribeImportTasks -> f DescribeImportTasks)
-> ((Maybe [ImportTaskFilter] -> f (Maybe [ImportTaskFilter]))
    -> Maybe [ImportTaskFilter] -> f (Maybe [ImportTaskFilter]))
-> (Maybe [ImportTaskFilter] -> f (Maybe [ImportTaskFilter]))
-> DescribeImportTasks
-> f DescribeImportTasks
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ImportTaskFilter]
  [ImportTaskFilter]
  [ImportTaskFilter]
  [ImportTaskFilter]
-> Iso
     (Maybe [ImportTaskFilter])
     (Maybe [ImportTaskFilter])
     (Maybe [ImportTaskFilter])
     (Maybe [ImportTaskFilter])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  [ImportTaskFilter]
  [ImportTaskFilter]
  [ImportTaskFilter]
  [ImportTaskFilter]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The token to request a specific page of results.
describeImportTasks_nextToken :: Lens.Lens' DescribeImportTasks (Prelude.Maybe Prelude.Text)
describeImportTasks_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeImportTasks -> f DescribeImportTasks
describeImportTasks_nextToken = (DescribeImportTasks -> Maybe Text)
-> (DescribeImportTasks -> Maybe Text -> DescribeImportTasks)
-> Lens
     DescribeImportTasks DescribeImportTasks (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImportTasks' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeImportTasks' :: DescribeImportTasks -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeImportTasks
s@DescribeImportTasks' {} Maybe Text
a -> DescribeImportTasks
s {$sel:nextToken:DescribeImportTasks' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeImportTasks)

-- | The maximum number of results that you want this request to return, up
-- to 100.
describeImportTasks_maxResults :: Lens.Lens' DescribeImportTasks (Prelude.Maybe Prelude.Natural)
describeImportTasks_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> DescribeImportTasks -> f DescribeImportTasks
describeImportTasks_maxResults = (DescribeImportTasks -> Maybe Natural)
-> (DescribeImportTasks -> Maybe Natural -> DescribeImportTasks)
-> Lens
     DescribeImportTasks
     DescribeImportTasks
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImportTasks' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:DescribeImportTasks' :: DescribeImportTasks -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: DescribeImportTasks
s@DescribeImportTasks' {} Maybe Natural
a -> DescribeImportTasks
s {$sel:maxResults:DescribeImportTasks' :: Maybe Natural
maxResults = Maybe Natural
a} :: DescribeImportTasks)

instance Core.AWSRequest DescribeImportTasks where
  type
    AWSResponse DescribeImportTasks =
      DescribeImportTasksResponse
  request :: DescribeImportTasks -> Request DescribeImportTasks
request = Service -> DescribeImportTasks -> Request DescribeImportTasks
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeImportTasks
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeImportTasks)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeImportTasks))
-> Logger
-> Service
-> Proxy DescribeImportTasks
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeImportTasks)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe [ImportTask]
-> Maybe Text -> Int -> DescribeImportTasksResponse
DescribeImportTasksResponse'
            (Maybe [ImportTask]
 -> Maybe Text -> Int -> DescribeImportTasksResponse)
-> Either String (Maybe [ImportTask])
-> Either String (Maybe Text -> Int -> DescribeImportTasksResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [ImportTask]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"tasks" Either String (Maybe (Maybe [ImportTask]))
-> Maybe [ImportTask] -> Either String (Maybe [ImportTask])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [ImportTask]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Maybe Text -> Int -> DescribeImportTasksResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeImportTasksResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"nextToken")
            Either String (Int -> DescribeImportTasksResponse)
-> Either String Int -> Either String DescribeImportTasksResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable DescribeImportTasks

instance Prelude.NFData DescribeImportTasks

instance Core.ToHeaders DescribeImportTasks where
  toHeaders :: DescribeImportTasks -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeImportTasks -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AWSPoseidonService_V2015_11_01.DescribeImportTasks" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON DescribeImportTasks where
  toJSON :: DescribeImportTasks -> Value
toJSON DescribeImportTasks' {Maybe Natural
Maybe [ImportTaskFilter]
Maybe Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
filters :: Maybe [ImportTaskFilter]
$sel:maxResults:DescribeImportTasks' :: DescribeImportTasks -> Maybe Natural
$sel:nextToken:DescribeImportTasks' :: DescribeImportTasks -> Maybe Text
$sel:filters:DescribeImportTasks' :: DescribeImportTasks -> Maybe [ImportTaskFilter]
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"filters" Text -> [ImportTaskFilter] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([ImportTaskFilter] -> Pair)
-> Maybe [ImportTaskFilter] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ImportTaskFilter]
filters,
            (Text
"nextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Text
"maxResults" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults
          ]
      )

instance Core.ToPath DescribeImportTasks where
  toPath :: DescribeImportTasks -> ByteString
toPath = ByteString -> DescribeImportTasks -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | /See:/ 'newDescribeImportTasksResponse' smart constructor.
data DescribeImportTasksResponse = DescribeImportTasksResponse'
  { -- | A returned array of import tasks that match any applied filters, up to
    -- the specified number of maximum results.
    DescribeImportTasksResponse -> Maybe [ImportTask]
tasks :: Prelude.Maybe [ImportTask],
    -- | The token to request the next page of results.
    DescribeImportTasksResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeImportTasksResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeImportTasksResponse -> DescribeImportTasksResponse -> Bool
(DescribeImportTasksResponse
 -> DescribeImportTasksResponse -> Bool)
-> (DescribeImportTasksResponse
    -> DescribeImportTasksResponse -> Bool)
-> Eq DescribeImportTasksResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeImportTasksResponse -> DescribeImportTasksResponse -> Bool
$c/= :: DescribeImportTasksResponse -> DescribeImportTasksResponse -> Bool
== :: DescribeImportTasksResponse -> DescribeImportTasksResponse -> Bool
$c== :: DescribeImportTasksResponse -> DescribeImportTasksResponse -> Bool
Prelude.Eq, ReadPrec [DescribeImportTasksResponse]
ReadPrec DescribeImportTasksResponse
Int -> ReadS DescribeImportTasksResponse
ReadS [DescribeImportTasksResponse]
(Int -> ReadS DescribeImportTasksResponse)
-> ReadS [DescribeImportTasksResponse]
-> ReadPrec DescribeImportTasksResponse
-> ReadPrec [DescribeImportTasksResponse]
-> Read DescribeImportTasksResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeImportTasksResponse]
$creadListPrec :: ReadPrec [DescribeImportTasksResponse]
readPrec :: ReadPrec DescribeImportTasksResponse
$creadPrec :: ReadPrec DescribeImportTasksResponse
readList :: ReadS [DescribeImportTasksResponse]
$creadList :: ReadS [DescribeImportTasksResponse]
readsPrec :: Int -> ReadS DescribeImportTasksResponse
$creadsPrec :: Int -> ReadS DescribeImportTasksResponse
Prelude.Read, Int -> DescribeImportTasksResponse -> ShowS
[DescribeImportTasksResponse] -> ShowS
DescribeImportTasksResponse -> String
(Int -> DescribeImportTasksResponse -> ShowS)
-> (DescribeImportTasksResponse -> String)
-> ([DescribeImportTasksResponse] -> ShowS)
-> Show DescribeImportTasksResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeImportTasksResponse] -> ShowS
$cshowList :: [DescribeImportTasksResponse] -> ShowS
show :: DescribeImportTasksResponse -> String
$cshow :: DescribeImportTasksResponse -> String
showsPrec :: Int -> DescribeImportTasksResponse -> ShowS
$cshowsPrec :: Int -> DescribeImportTasksResponse -> ShowS
Prelude.Show, (forall x.
 DescribeImportTasksResponse -> Rep DescribeImportTasksResponse x)
-> (forall x.
    Rep DescribeImportTasksResponse x -> DescribeImportTasksResponse)
-> Generic DescribeImportTasksResponse
forall x.
Rep DescribeImportTasksResponse x -> DescribeImportTasksResponse
forall x.
DescribeImportTasksResponse -> Rep DescribeImportTasksResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeImportTasksResponse x -> DescribeImportTasksResponse
$cfrom :: forall x.
DescribeImportTasksResponse -> Rep DescribeImportTasksResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeImportTasksResponse' 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:
--
-- 'tasks', 'describeImportTasksResponse_tasks' - A returned array of import tasks that match any applied filters, up to
-- the specified number of maximum results.
--
-- 'nextToken', 'describeImportTasksResponse_nextToken' - The token to request the next page of results.
--
-- 'httpStatus', 'describeImportTasksResponse_httpStatus' - The response's http status code.
newDescribeImportTasksResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeImportTasksResponse
newDescribeImportTasksResponse :: Int -> DescribeImportTasksResponse
newDescribeImportTasksResponse Int
pHttpStatus_ =
  DescribeImportTasksResponse' :: Maybe [ImportTask]
-> Maybe Text -> Int -> DescribeImportTasksResponse
DescribeImportTasksResponse'
    { $sel:tasks:DescribeImportTasksResponse' :: Maybe [ImportTask]
tasks =
        Maybe [ImportTask]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeImportTasksResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeImportTasksResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A returned array of import tasks that match any applied filters, up to
-- the specified number of maximum results.
describeImportTasksResponse_tasks :: Lens.Lens' DescribeImportTasksResponse (Prelude.Maybe [ImportTask])
describeImportTasksResponse_tasks :: (Maybe [ImportTask] -> f (Maybe [ImportTask]))
-> DescribeImportTasksResponse -> f DescribeImportTasksResponse
describeImportTasksResponse_tasks = (DescribeImportTasksResponse -> Maybe [ImportTask])
-> (DescribeImportTasksResponse
    -> Maybe [ImportTask] -> DescribeImportTasksResponse)
-> Lens
     DescribeImportTasksResponse
     DescribeImportTasksResponse
     (Maybe [ImportTask])
     (Maybe [ImportTask])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImportTasksResponse' {Maybe [ImportTask]
tasks :: Maybe [ImportTask]
$sel:tasks:DescribeImportTasksResponse' :: DescribeImportTasksResponse -> Maybe [ImportTask]
tasks} -> Maybe [ImportTask]
tasks) (\s :: DescribeImportTasksResponse
s@DescribeImportTasksResponse' {} Maybe [ImportTask]
a -> DescribeImportTasksResponse
s {$sel:tasks:DescribeImportTasksResponse' :: Maybe [ImportTask]
tasks = Maybe [ImportTask]
a} :: DescribeImportTasksResponse) ((Maybe [ImportTask] -> f (Maybe [ImportTask]))
 -> DescribeImportTasksResponse -> f DescribeImportTasksResponse)
-> ((Maybe [ImportTask] -> f (Maybe [ImportTask]))
    -> Maybe [ImportTask] -> f (Maybe [ImportTask]))
-> (Maybe [ImportTask] -> f (Maybe [ImportTask]))
-> DescribeImportTasksResponse
-> f DescribeImportTasksResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [ImportTask] [ImportTask] [ImportTask] [ImportTask]
-> Iso
     (Maybe [ImportTask])
     (Maybe [ImportTask])
     (Maybe [ImportTask])
     (Maybe [ImportTask])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [ImportTask] [ImportTask] [ImportTask] [ImportTask]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The token to request the next page of results.
describeImportTasksResponse_nextToken :: Lens.Lens' DescribeImportTasksResponse (Prelude.Maybe Prelude.Text)
describeImportTasksResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeImportTasksResponse -> f DescribeImportTasksResponse
describeImportTasksResponse_nextToken = (DescribeImportTasksResponse -> Maybe Text)
-> (DescribeImportTasksResponse
    -> Maybe Text -> DescribeImportTasksResponse)
-> Lens
     DescribeImportTasksResponse
     DescribeImportTasksResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImportTasksResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeImportTasksResponse' :: DescribeImportTasksResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeImportTasksResponse
s@DescribeImportTasksResponse' {} Maybe Text
a -> DescribeImportTasksResponse
s {$sel:nextToken:DescribeImportTasksResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeImportTasksResponse)

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

instance Prelude.NFData DescribeImportTasksResponse