{-# 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.DataSync.DescribeTask
-- 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 metadata about a task.
module Amazonka.DataSync.DescribeTask
  ( -- * Creating a Request
    DescribeTask (..),
    newDescribeTask,

    -- * Request Lenses
    describeTask_taskArn,

    -- * Destructuring the Response
    DescribeTaskResponse (..),
    newDescribeTaskResponse,

    -- * Response Lenses
    describeTaskResponse_creationTime,
    describeTaskResponse_status,
    describeTaskResponse_schedule,
    describeTaskResponse_taskArn,
    describeTaskResponse_currentTaskExecutionArn,
    describeTaskResponse_destinationNetworkInterfaceArns,
    describeTaskResponse_destinationLocationArn,
    describeTaskResponse_includes,
    describeTaskResponse_name,
    describeTaskResponse_errorCode,
    describeTaskResponse_sourceLocationArn,
    describeTaskResponse_excludes,
    describeTaskResponse_sourceNetworkInterfaceArns,
    describeTaskResponse_options,
    describeTaskResponse_cloudWatchLogGroupArn,
    describeTaskResponse_errorDetail,
    describeTaskResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.DataSync.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

-- | DescribeTaskRequest
--
-- /See:/ 'newDescribeTask' smart constructor.
data DescribeTask = DescribeTask'
  { -- | The Amazon Resource Name (ARN) of the task to describe.
    DescribeTask -> Text
taskArn :: Prelude.Text
  }
  deriving (DescribeTask -> DescribeTask -> Bool
(DescribeTask -> DescribeTask -> Bool)
-> (DescribeTask -> DescribeTask -> Bool) -> Eq DescribeTask
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeTask -> DescribeTask -> Bool
$c/= :: DescribeTask -> DescribeTask -> Bool
== :: DescribeTask -> DescribeTask -> Bool
$c== :: DescribeTask -> DescribeTask -> Bool
Prelude.Eq, ReadPrec [DescribeTask]
ReadPrec DescribeTask
Int -> ReadS DescribeTask
ReadS [DescribeTask]
(Int -> ReadS DescribeTask)
-> ReadS [DescribeTask]
-> ReadPrec DescribeTask
-> ReadPrec [DescribeTask]
-> Read DescribeTask
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeTask]
$creadListPrec :: ReadPrec [DescribeTask]
readPrec :: ReadPrec DescribeTask
$creadPrec :: ReadPrec DescribeTask
readList :: ReadS [DescribeTask]
$creadList :: ReadS [DescribeTask]
readsPrec :: Int -> ReadS DescribeTask
$creadsPrec :: Int -> ReadS DescribeTask
Prelude.Read, Int -> DescribeTask -> ShowS
[DescribeTask] -> ShowS
DescribeTask -> String
(Int -> DescribeTask -> ShowS)
-> (DescribeTask -> String)
-> ([DescribeTask] -> ShowS)
-> Show DescribeTask
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeTask] -> ShowS
$cshowList :: [DescribeTask] -> ShowS
show :: DescribeTask -> String
$cshow :: DescribeTask -> String
showsPrec :: Int -> DescribeTask -> ShowS
$cshowsPrec :: Int -> DescribeTask -> ShowS
Prelude.Show, (forall x. DescribeTask -> Rep DescribeTask x)
-> (forall x. Rep DescribeTask x -> DescribeTask)
-> Generic DescribeTask
forall x. Rep DescribeTask x -> DescribeTask
forall x. DescribeTask -> Rep DescribeTask x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeTask x -> DescribeTask
$cfrom :: forall x. DescribeTask -> Rep DescribeTask x
Prelude.Generic)

-- |
-- Create a value of 'DescribeTask' 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:
--
-- 'taskArn', 'describeTask_taskArn' - The Amazon Resource Name (ARN) of the task to describe.
newDescribeTask ::
  -- | 'taskArn'
  Prelude.Text ->
  DescribeTask
newDescribeTask :: Text -> DescribeTask
newDescribeTask Text
pTaskArn_ =
  DescribeTask' :: Text -> DescribeTask
DescribeTask' {$sel:taskArn:DescribeTask' :: Text
taskArn = Text
pTaskArn_}

-- | The Amazon Resource Name (ARN) of the task to describe.
describeTask_taskArn :: Lens.Lens' DescribeTask Prelude.Text
describeTask_taskArn :: (Text -> f Text) -> DescribeTask -> f DescribeTask
describeTask_taskArn = (DescribeTask -> Text)
-> (DescribeTask -> Text -> DescribeTask)
-> Lens DescribeTask DescribeTask Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTask' {Text
taskArn :: Text
$sel:taskArn:DescribeTask' :: DescribeTask -> Text
taskArn} -> Text
taskArn) (\s :: DescribeTask
s@DescribeTask' {} Text
a -> DescribeTask
s {$sel:taskArn:DescribeTask' :: Text
taskArn = Text
a} :: DescribeTask)

instance Core.AWSRequest DescribeTask where
  type AWSResponse DescribeTask = DescribeTaskResponse
  request :: DescribeTask -> Request DescribeTask
request = Service -> DescribeTask -> Request DescribeTask
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeTask
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeTask)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeTask))
-> Logger
-> Service
-> Proxy DescribeTask
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeTask)))
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 POSIX
-> Maybe TaskStatus
-> Maybe TaskSchedule
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [FilterRule]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [FilterRule]
-> Maybe [Text]
-> Maybe Options
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeTaskResponse
DescribeTaskResponse'
            (Maybe POSIX
 -> Maybe TaskStatus
 -> Maybe TaskSchedule
 -> Maybe Text
 -> Maybe Text
 -> Maybe [Text]
 -> Maybe Text
 -> Maybe [FilterRule]
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe [FilterRule]
 -> Maybe [Text]
 -> Maybe Options
 -> Maybe Text
 -> Maybe Text
 -> Int
 -> DescribeTaskResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe TaskStatus
      -> Maybe TaskSchedule
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe [FilterRule]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [FilterRule]
      -> Maybe [Text]
      -> Maybe Options
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeTaskResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CreationTime")
            Either
  String
  (Maybe TaskStatus
   -> Maybe TaskSchedule
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe [FilterRule]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [FilterRule]
   -> Maybe [Text]
   -> Maybe Options
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeTaskResponse)
-> Either String (Maybe TaskStatus)
-> Either
     String
     (Maybe TaskSchedule
      -> Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe [FilterRule]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [FilterRule]
      -> Maybe [Text]
      -> Maybe Options
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeTaskResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe TaskStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Status")
            Either
  String
  (Maybe TaskSchedule
   -> Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe [FilterRule]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [FilterRule]
   -> Maybe [Text]
   -> Maybe Options
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeTaskResponse)
-> Either String (Maybe TaskSchedule)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe [FilterRule]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [FilterRule]
      -> Maybe [Text]
      -> Maybe Options
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeTaskResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe TaskSchedule)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Schedule")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe [FilterRule]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [FilterRule]
   -> Maybe [Text]
   -> Maybe Options
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeTaskResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe [FilterRule]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [FilterRule]
      -> Maybe [Text]
      -> Maybe Options
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeTaskResponse)
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
"TaskArn")
            Either
  String
  (Maybe Text
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe [FilterRule]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [FilterRule]
   -> Maybe [Text]
   -> Maybe Options
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeTaskResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [Text]
      -> Maybe Text
      -> Maybe [FilterRule]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [FilterRule]
      -> Maybe [Text]
      -> Maybe Options
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeTaskResponse)
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
"CurrentTaskExecutionArn")
            Either
  String
  (Maybe [Text]
   -> Maybe Text
   -> Maybe [FilterRule]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [FilterRule]
   -> Maybe [Text]
   -> Maybe Options
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeTaskResponse)
-> Either String (Maybe [Text])
-> Either
     String
     (Maybe Text
      -> Maybe [FilterRule]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [FilterRule]
      -> Maybe [Text]
      -> Maybe Options
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeTaskResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"DestinationNetworkInterfaceArns"
                            Either String (Maybe (Maybe [Text]))
-> Maybe [Text] -> Either String (Maybe [Text])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String
  (Maybe Text
   -> Maybe [FilterRule]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [FilterRule]
   -> Maybe [Text]
   -> Maybe Options
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeTaskResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [FilterRule]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [FilterRule]
      -> Maybe [Text]
      -> Maybe Options
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeTaskResponse)
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
"DestinationLocationArn")
            Either
  String
  (Maybe [FilterRule]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [FilterRule]
   -> Maybe [Text]
   -> Maybe Options
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeTaskResponse)
-> Either String (Maybe [FilterRule])
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [FilterRule]
      -> Maybe [Text]
      -> Maybe Options
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeTaskResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [FilterRule]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Includes" Either String (Maybe (Maybe [FilterRule]))
-> Maybe [FilterRule] -> Either String (Maybe [FilterRule])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [FilterRule]
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [FilterRule]
   -> Maybe [Text]
   -> Maybe Options
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeTaskResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe [FilterRule]
      -> Maybe [Text]
      -> Maybe Options
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeTaskResponse)
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
"Name")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe [FilterRule]
   -> Maybe [Text]
   -> Maybe Options
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeTaskResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe [FilterRule]
      -> Maybe [Text]
      -> Maybe Options
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeTaskResponse)
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
"ErrorCode")
            Either
  String
  (Maybe Text
   -> Maybe [FilterRule]
   -> Maybe [Text]
   -> Maybe Options
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeTaskResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [FilterRule]
      -> Maybe [Text]
      -> Maybe Options
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeTaskResponse)
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
"SourceLocationArn")
            Either
  String
  (Maybe [FilterRule]
   -> Maybe [Text]
   -> Maybe Options
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeTaskResponse)
-> Either String (Maybe [FilterRule])
-> Either
     String
     (Maybe [Text]
      -> Maybe Options
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeTaskResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [FilterRule]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Excludes" Either String (Maybe (Maybe [FilterRule]))
-> Maybe [FilterRule] -> Either String (Maybe [FilterRule])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [FilterRule]
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe [Text]
   -> Maybe Options
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeTaskResponse)
-> Either String (Maybe [Text])
-> Either
     String
     (Maybe Options
      -> Maybe Text -> Maybe Text -> Int -> DescribeTaskResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"SourceNetworkInterfaceArns"
                            Either String (Maybe (Maybe [Text]))
-> Maybe [Text] -> Either String (Maybe [Text])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String
  (Maybe Options
   -> Maybe Text -> Maybe Text -> Int -> DescribeTaskResponse)
-> Either String (Maybe Options)
-> Either
     String (Maybe Text -> Maybe Text -> Int -> DescribeTaskResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Options)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Options")
            Either
  String (Maybe Text -> Maybe Text -> Int -> DescribeTaskResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> DescribeTaskResponse)
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
"CloudWatchLogGroupArn")
            Either String (Maybe Text -> Int -> DescribeTaskResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeTaskResponse)
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
"ErrorDetail")
            Either String (Int -> DescribeTaskResponse)
-> Either String Int -> Either String DescribeTaskResponse
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 DescribeTask

instance Prelude.NFData DescribeTask

instance Core.ToHeaders DescribeTask where
  toHeaders :: DescribeTask -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeTask -> 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
"FmrsService.DescribeTask" :: 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 DescribeTask where
  toJSON :: DescribeTask -> Value
toJSON DescribeTask' {Text
taskArn :: Text
$sel:taskArn:DescribeTask' :: DescribeTask -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"TaskArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
taskArn)]
      )

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

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

-- | DescribeTaskResponse
--
-- /See:/ 'newDescribeTaskResponse' smart constructor.
data DescribeTaskResponse = DescribeTaskResponse'
  { -- | The time that the task was created.
    DescribeTaskResponse -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
    -- | The status of the task that was described.
    --
    -- For detailed information about task execution statuses, see
    -- Understanding Task Statuses in the /DataSync User Guide/.
    DescribeTaskResponse -> Maybe TaskStatus
status :: Prelude.Maybe TaskStatus,
    -- | The schedule used to periodically transfer files from a source to a
    -- destination location.
    DescribeTaskResponse -> Maybe TaskSchedule
schedule :: Prelude.Maybe TaskSchedule,
    -- | The Amazon Resource Name (ARN) of the task that was described.
    DescribeTaskResponse -> Maybe Text
taskArn :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the task execution that is syncing
    -- files.
    DescribeTaskResponse -> Maybe Text
currentTaskExecutionArn :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the destination ENIs (Elastic Network
    -- Interface) that was created for your subnet.
    DescribeTaskResponse -> Maybe [Text]
destinationNetworkInterfaceArns :: Prelude.Maybe [Prelude.Text],
    -- | The Amazon Resource Name (ARN) of the Amazon Web Services storage
    -- resource\'s location.
    DescribeTaskResponse -> Maybe Text
destinationLocationArn :: Prelude.Maybe Prelude.Text,
    -- | A list of filter rules that determines which files to include when
    -- running a task. The pattern should contain a single filter string that
    -- consists of the patterns to include. The patterns are delimited by \"|\"
    -- (that is, a pipe). For example: @\"\/folder1|\/folder2@\"
    DescribeTaskResponse -> Maybe [FilterRule]
includes :: Prelude.Maybe [FilterRule],
    -- | The name of the task that was described.
    DescribeTaskResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | Errors that DataSync encountered during execution of the task. You can
    -- use this error code to help troubleshoot issues.
    DescribeTaskResponse -> Maybe Text
errorCode :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the source file system\'s location.
    DescribeTaskResponse -> Maybe Text
sourceLocationArn :: Prelude.Maybe Prelude.Text,
    -- | A list of filter rules that determines which files to exclude from a
    -- task. The list should contain a single filter string that consists of
    -- the patterns to exclude. The patterns are delimited by \"|\" (that is, a
    -- pipe), for example: @\"\/folder1|\/folder2\"@
    DescribeTaskResponse -> Maybe [FilterRule]
excludes :: Prelude.Maybe [FilterRule],
    -- | The Amazon Resource Name (ARN) of the source ENIs (Elastic Network
    -- Interface) that was created for your subnet.
    DescribeTaskResponse -> Maybe [Text]
sourceNetworkInterfaceArns :: Prelude.Maybe [Prelude.Text],
    -- | The set of configuration options that control the behavior of a single
    -- execution of the task that occurs when you call @StartTaskExecution@.
    -- You can configure these options to preserve metadata such as user ID
    -- (UID) and group (GID), file permissions, data integrity verification,
    -- and so on.
    --
    -- For each individual task execution, you can override these options by
    -- specifying the overriding @OverrideOptions@ value to
    -- <https://docs.aws.amazon.com/datasync/latest/userguide/API_StartTaskExecution.html StartTaskExecution>
    -- operation.
    DescribeTaskResponse -> Maybe Options
options :: Prelude.Maybe Options,
    -- | The Amazon Resource Name (ARN) of the Amazon CloudWatch log group that
    -- was used to monitor and log events in the task.
    --
    -- For more information on these groups, see Working with Log Groups and
    -- Log Streams in the /Amazon CloudWatch User Guide/.
    DescribeTaskResponse -> Maybe Text
cloudWatchLogGroupArn :: Prelude.Maybe Prelude.Text,
    -- | Detailed description of an error that was encountered during the task
    -- execution. You can use this information to help troubleshoot issues.
    DescribeTaskResponse -> Maybe Text
errorDetail :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeTaskResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeTaskResponse -> DescribeTaskResponse -> Bool
(DescribeTaskResponse -> DescribeTaskResponse -> Bool)
-> (DescribeTaskResponse -> DescribeTaskResponse -> Bool)
-> Eq DescribeTaskResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeTaskResponse -> DescribeTaskResponse -> Bool
$c/= :: DescribeTaskResponse -> DescribeTaskResponse -> Bool
== :: DescribeTaskResponse -> DescribeTaskResponse -> Bool
$c== :: DescribeTaskResponse -> DescribeTaskResponse -> Bool
Prelude.Eq, ReadPrec [DescribeTaskResponse]
ReadPrec DescribeTaskResponse
Int -> ReadS DescribeTaskResponse
ReadS [DescribeTaskResponse]
(Int -> ReadS DescribeTaskResponse)
-> ReadS [DescribeTaskResponse]
-> ReadPrec DescribeTaskResponse
-> ReadPrec [DescribeTaskResponse]
-> Read DescribeTaskResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeTaskResponse]
$creadListPrec :: ReadPrec [DescribeTaskResponse]
readPrec :: ReadPrec DescribeTaskResponse
$creadPrec :: ReadPrec DescribeTaskResponse
readList :: ReadS [DescribeTaskResponse]
$creadList :: ReadS [DescribeTaskResponse]
readsPrec :: Int -> ReadS DescribeTaskResponse
$creadsPrec :: Int -> ReadS DescribeTaskResponse
Prelude.Read, Int -> DescribeTaskResponse -> ShowS
[DescribeTaskResponse] -> ShowS
DescribeTaskResponse -> String
(Int -> DescribeTaskResponse -> ShowS)
-> (DescribeTaskResponse -> String)
-> ([DescribeTaskResponse] -> ShowS)
-> Show DescribeTaskResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeTaskResponse] -> ShowS
$cshowList :: [DescribeTaskResponse] -> ShowS
show :: DescribeTaskResponse -> String
$cshow :: DescribeTaskResponse -> String
showsPrec :: Int -> DescribeTaskResponse -> ShowS
$cshowsPrec :: Int -> DescribeTaskResponse -> ShowS
Prelude.Show, (forall x. DescribeTaskResponse -> Rep DescribeTaskResponse x)
-> (forall x. Rep DescribeTaskResponse x -> DescribeTaskResponse)
-> Generic DescribeTaskResponse
forall x. Rep DescribeTaskResponse x -> DescribeTaskResponse
forall x. DescribeTaskResponse -> Rep DescribeTaskResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeTaskResponse x -> DescribeTaskResponse
$cfrom :: forall x. DescribeTaskResponse -> Rep DescribeTaskResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeTaskResponse' 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:
--
-- 'creationTime', 'describeTaskResponse_creationTime' - The time that the task was created.
--
-- 'status', 'describeTaskResponse_status' - The status of the task that was described.
--
-- For detailed information about task execution statuses, see
-- Understanding Task Statuses in the /DataSync User Guide/.
--
-- 'schedule', 'describeTaskResponse_schedule' - The schedule used to periodically transfer files from a source to a
-- destination location.
--
-- 'taskArn', 'describeTaskResponse_taskArn' - The Amazon Resource Name (ARN) of the task that was described.
--
-- 'currentTaskExecutionArn', 'describeTaskResponse_currentTaskExecutionArn' - The Amazon Resource Name (ARN) of the task execution that is syncing
-- files.
--
-- 'destinationNetworkInterfaceArns', 'describeTaskResponse_destinationNetworkInterfaceArns' - The Amazon Resource Name (ARN) of the destination ENIs (Elastic Network
-- Interface) that was created for your subnet.
--
-- 'destinationLocationArn', 'describeTaskResponse_destinationLocationArn' - The Amazon Resource Name (ARN) of the Amazon Web Services storage
-- resource\'s location.
--
-- 'includes', 'describeTaskResponse_includes' - A list of filter rules that determines which files to include when
-- running a task. The pattern should contain a single filter string that
-- consists of the patterns to include. The patterns are delimited by \"|\"
-- (that is, a pipe). For example: @\"\/folder1|\/folder2@\"
--
-- 'name', 'describeTaskResponse_name' - The name of the task that was described.
--
-- 'errorCode', 'describeTaskResponse_errorCode' - Errors that DataSync encountered during execution of the task. You can
-- use this error code to help troubleshoot issues.
--
-- 'sourceLocationArn', 'describeTaskResponse_sourceLocationArn' - The Amazon Resource Name (ARN) of the source file system\'s location.
--
-- 'excludes', 'describeTaskResponse_excludes' - A list of filter rules that determines which files to exclude from a
-- task. The list should contain a single filter string that consists of
-- the patterns to exclude. The patterns are delimited by \"|\" (that is, a
-- pipe), for example: @\"\/folder1|\/folder2\"@
--
-- 'sourceNetworkInterfaceArns', 'describeTaskResponse_sourceNetworkInterfaceArns' - The Amazon Resource Name (ARN) of the source ENIs (Elastic Network
-- Interface) that was created for your subnet.
--
-- 'options', 'describeTaskResponse_options' - The set of configuration options that control the behavior of a single
-- execution of the task that occurs when you call @StartTaskExecution@.
-- You can configure these options to preserve metadata such as user ID
-- (UID) and group (GID), file permissions, data integrity verification,
-- and so on.
--
-- For each individual task execution, you can override these options by
-- specifying the overriding @OverrideOptions@ value to
-- <https://docs.aws.amazon.com/datasync/latest/userguide/API_StartTaskExecution.html StartTaskExecution>
-- operation.
--
-- 'cloudWatchLogGroupArn', 'describeTaskResponse_cloudWatchLogGroupArn' - The Amazon Resource Name (ARN) of the Amazon CloudWatch log group that
-- was used to monitor and log events in the task.
--
-- For more information on these groups, see Working with Log Groups and
-- Log Streams in the /Amazon CloudWatch User Guide/.
--
-- 'errorDetail', 'describeTaskResponse_errorDetail' - Detailed description of an error that was encountered during the task
-- execution. You can use this information to help troubleshoot issues.
--
-- 'httpStatus', 'describeTaskResponse_httpStatus' - The response's http status code.
newDescribeTaskResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeTaskResponse
newDescribeTaskResponse :: Int -> DescribeTaskResponse
newDescribeTaskResponse Int
pHttpStatus_ =
  DescribeTaskResponse' :: Maybe POSIX
-> Maybe TaskStatus
-> Maybe TaskSchedule
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe [FilterRule]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [FilterRule]
-> Maybe [Text]
-> Maybe Options
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeTaskResponse
DescribeTaskResponse'
    { $sel:creationTime:DescribeTaskResponse' :: Maybe POSIX
creationTime =
        Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:status:DescribeTaskResponse' :: Maybe TaskStatus
status = Maybe TaskStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:schedule:DescribeTaskResponse' :: Maybe TaskSchedule
schedule = Maybe TaskSchedule
forall a. Maybe a
Prelude.Nothing,
      $sel:taskArn:DescribeTaskResponse' :: Maybe Text
taskArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:currentTaskExecutionArn:DescribeTaskResponse' :: Maybe Text
currentTaskExecutionArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:destinationNetworkInterfaceArns:DescribeTaskResponse' :: Maybe [Text]
destinationNetworkInterfaceArns = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:destinationLocationArn:DescribeTaskResponse' :: Maybe Text
destinationLocationArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:includes:DescribeTaskResponse' :: Maybe [FilterRule]
includes = Maybe [FilterRule]
forall a. Maybe a
Prelude.Nothing,
      $sel:name:DescribeTaskResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:errorCode:DescribeTaskResponse' :: Maybe Text
errorCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:sourceLocationArn:DescribeTaskResponse' :: Maybe Text
sourceLocationArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:excludes:DescribeTaskResponse' :: Maybe [FilterRule]
excludes = Maybe [FilterRule]
forall a. Maybe a
Prelude.Nothing,
      $sel:sourceNetworkInterfaceArns:DescribeTaskResponse' :: Maybe [Text]
sourceNetworkInterfaceArns = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:options:DescribeTaskResponse' :: Maybe Options
options = Maybe Options
forall a. Maybe a
Prelude.Nothing,
      $sel:cloudWatchLogGroupArn:DescribeTaskResponse' :: Maybe Text
cloudWatchLogGroupArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:errorDetail:DescribeTaskResponse' :: Maybe Text
errorDetail = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeTaskResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The time that the task was created.
describeTaskResponse_creationTime :: Lens.Lens' DescribeTaskResponse (Prelude.Maybe Prelude.UTCTime)
describeTaskResponse_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeTaskResponse -> f DescribeTaskResponse
describeTaskResponse_creationTime = (DescribeTaskResponse -> Maybe POSIX)
-> (DescribeTaskResponse -> Maybe POSIX -> DescribeTaskResponse)
-> Lens
     DescribeTaskResponse
     DescribeTaskResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTaskResponse' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:DescribeTaskResponse' :: DescribeTaskResponse -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: DescribeTaskResponse
s@DescribeTaskResponse' {} Maybe POSIX
a -> DescribeTaskResponse
s {$sel:creationTime:DescribeTaskResponse' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: DescribeTaskResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeTaskResponse -> f DescribeTaskResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeTaskResponse
-> f DescribeTaskResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The status of the task that was described.
--
-- For detailed information about task execution statuses, see
-- Understanding Task Statuses in the /DataSync User Guide/.
describeTaskResponse_status :: Lens.Lens' DescribeTaskResponse (Prelude.Maybe TaskStatus)
describeTaskResponse_status :: (Maybe TaskStatus -> f (Maybe TaskStatus))
-> DescribeTaskResponse -> f DescribeTaskResponse
describeTaskResponse_status = (DescribeTaskResponse -> Maybe TaskStatus)
-> (DescribeTaskResponse
    -> Maybe TaskStatus -> DescribeTaskResponse)
-> Lens
     DescribeTaskResponse
     DescribeTaskResponse
     (Maybe TaskStatus)
     (Maybe TaskStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTaskResponse' {Maybe TaskStatus
status :: Maybe TaskStatus
$sel:status:DescribeTaskResponse' :: DescribeTaskResponse -> Maybe TaskStatus
status} -> Maybe TaskStatus
status) (\s :: DescribeTaskResponse
s@DescribeTaskResponse' {} Maybe TaskStatus
a -> DescribeTaskResponse
s {$sel:status:DescribeTaskResponse' :: Maybe TaskStatus
status = Maybe TaskStatus
a} :: DescribeTaskResponse)

-- | The schedule used to periodically transfer files from a source to a
-- destination location.
describeTaskResponse_schedule :: Lens.Lens' DescribeTaskResponse (Prelude.Maybe TaskSchedule)
describeTaskResponse_schedule :: (Maybe TaskSchedule -> f (Maybe TaskSchedule))
-> DescribeTaskResponse -> f DescribeTaskResponse
describeTaskResponse_schedule = (DescribeTaskResponse -> Maybe TaskSchedule)
-> (DescribeTaskResponse
    -> Maybe TaskSchedule -> DescribeTaskResponse)
-> Lens
     DescribeTaskResponse
     DescribeTaskResponse
     (Maybe TaskSchedule)
     (Maybe TaskSchedule)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTaskResponse' {Maybe TaskSchedule
schedule :: Maybe TaskSchedule
$sel:schedule:DescribeTaskResponse' :: DescribeTaskResponse -> Maybe TaskSchedule
schedule} -> Maybe TaskSchedule
schedule) (\s :: DescribeTaskResponse
s@DescribeTaskResponse' {} Maybe TaskSchedule
a -> DescribeTaskResponse
s {$sel:schedule:DescribeTaskResponse' :: Maybe TaskSchedule
schedule = Maybe TaskSchedule
a} :: DescribeTaskResponse)

-- | The Amazon Resource Name (ARN) of the task that was described.
describeTaskResponse_taskArn :: Lens.Lens' DescribeTaskResponse (Prelude.Maybe Prelude.Text)
describeTaskResponse_taskArn :: (Maybe Text -> f (Maybe Text))
-> DescribeTaskResponse -> f DescribeTaskResponse
describeTaskResponse_taskArn = (DescribeTaskResponse -> Maybe Text)
-> (DescribeTaskResponse -> Maybe Text -> DescribeTaskResponse)
-> Lens
     DescribeTaskResponse DescribeTaskResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTaskResponse' {Maybe Text
taskArn :: Maybe Text
$sel:taskArn:DescribeTaskResponse' :: DescribeTaskResponse -> Maybe Text
taskArn} -> Maybe Text
taskArn) (\s :: DescribeTaskResponse
s@DescribeTaskResponse' {} Maybe Text
a -> DescribeTaskResponse
s {$sel:taskArn:DescribeTaskResponse' :: Maybe Text
taskArn = Maybe Text
a} :: DescribeTaskResponse)

-- | The Amazon Resource Name (ARN) of the task execution that is syncing
-- files.
describeTaskResponse_currentTaskExecutionArn :: Lens.Lens' DescribeTaskResponse (Prelude.Maybe Prelude.Text)
describeTaskResponse_currentTaskExecutionArn :: (Maybe Text -> f (Maybe Text))
-> DescribeTaskResponse -> f DescribeTaskResponse
describeTaskResponse_currentTaskExecutionArn = (DescribeTaskResponse -> Maybe Text)
-> (DescribeTaskResponse -> Maybe Text -> DescribeTaskResponse)
-> Lens
     DescribeTaskResponse DescribeTaskResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTaskResponse' {Maybe Text
currentTaskExecutionArn :: Maybe Text
$sel:currentTaskExecutionArn:DescribeTaskResponse' :: DescribeTaskResponse -> Maybe Text
currentTaskExecutionArn} -> Maybe Text
currentTaskExecutionArn) (\s :: DescribeTaskResponse
s@DescribeTaskResponse' {} Maybe Text
a -> DescribeTaskResponse
s {$sel:currentTaskExecutionArn:DescribeTaskResponse' :: Maybe Text
currentTaskExecutionArn = Maybe Text
a} :: DescribeTaskResponse)

-- | The Amazon Resource Name (ARN) of the destination ENIs (Elastic Network
-- Interface) that was created for your subnet.
describeTaskResponse_destinationNetworkInterfaceArns :: Lens.Lens' DescribeTaskResponse (Prelude.Maybe [Prelude.Text])
describeTaskResponse_destinationNetworkInterfaceArns :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribeTaskResponse -> f DescribeTaskResponse
describeTaskResponse_destinationNetworkInterfaceArns = (DescribeTaskResponse -> Maybe [Text])
-> (DescribeTaskResponse -> Maybe [Text] -> DescribeTaskResponse)
-> Lens
     DescribeTaskResponse
     DescribeTaskResponse
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTaskResponse' {Maybe [Text]
destinationNetworkInterfaceArns :: Maybe [Text]
$sel:destinationNetworkInterfaceArns:DescribeTaskResponse' :: DescribeTaskResponse -> Maybe [Text]
destinationNetworkInterfaceArns} -> Maybe [Text]
destinationNetworkInterfaceArns) (\s :: DescribeTaskResponse
s@DescribeTaskResponse' {} Maybe [Text]
a -> DescribeTaskResponse
s {$sel:destinationNetworkInterfaceArns:DescribeTaskResponse' :: Maybe [Text]
destinationNetworkInterfaceArns = Maybe [Text]
a} :: DescribeTaskResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> DescribeTaskResponse -> f DescribeTaskResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribeTaskResponse
-> f DescribeTaskResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The Amazon Resource Name (ARN) of the Amazon Web Services storage
-- resource\'s location.
describeTaskResponse_destinationLocationArn :: Lens.Lens' DescribeTaskResponse (Prelude.Maybe Prelude.Text)
describeTaskResponse_destinationLocationArn :: (Maybe Text -> f (Maybe Text))
-> DescribeTaskResponse -> f DescribeTaskResponse
describeTaskResponse_destinationLocationArn = (DescribeTaskResponse -> Maybe Text)
-> (DescribeTaskResponse -> Maybe Text -> DescribeTaskResponse)
-> Lens
     DescribeTaskResponse DescribeTaskResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTaskResponse' {Maybe Text
destinationLocationArn :: Maybe Text
$sel:destinationLocationArn:DescribeTaskResponse' :: DescribeTaskResponse -> Maybe Text
destinationLocationArn} -> Maybe Text
destinationLocationArn) (\s :: DescribeTaskResponse
s@DescribeTaskResponse' {} Maybe Text
a -> DescribeTaskResponse
s {$sel:destinationLocationArn:DescribeTaskResponse' :: Maybe Text
destinationLocationArn = Maybe Text
a} :: DescribeTaskResponse)

-- | A list of filter rules that determines which files to include when
-- running a task. The pattern should contain a single filter string that
-- consists of the patterns to include. The patterns are delimited by \"|\"
-- (that is, a pipe). For example: @\"\/folder1|\/folder2@\"
describeTaskResponse_includes :: Lens.Lens' DescribeTaskResponse (Prelude.Maybe [FilterRule])
describeTaskResponse_includes :: (Maybe [FilterRule] -> f (Maybe [FilterRule]))
-> DescribeTaskResponse -> f DescribeTaskResponse
describeTaskResponse_includes = (DescribeTaskResponse -> Maybe [FilterRule])
-> (DescribeTaskResponse
    -> Maybe [FilterRule] -> DescribeTaskResponse)
-> Lens
     DescribeTaskResponse
     DescribeTaskResponse
     (Maybe [FilterRule])
     (Maybe [FilterRule])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTaskResponse' {Maybe [FilterRule]
includes :: Maybe [FilterRule]
$sel:includes:DescribeTaskResponse' :: DescribeTaskResponse -> Maybe [FilterRule]
includes} -> Maybe [FilterRule]
includes) (\s :: DescribeTaskResponse
s@DescribeTaskResponse' {} Maybe [FilterRule]
a -> DescribeTaskResponse
s {$sel:includes:DescribeTaskResponse' :: Maybe [FilterRule]
includes = Maybe [FilterRule]
a} :: DescribeTaskResponse) ((Maybe [FilterRule] -> f (Maybe [FilterRule]))
 -> DescribeTaskResponse -> f DescribeTaskResponse)
-> ((Maybe [FilterRule] -> f (Maybe [FilterRule]))
    -> Maybe [FilterRule] -> f (Maybe [FilterRule]))
-> (Maybe [FilterRule] -> f (Maybe [FilterRule]))
-> DescribeTaskResponse
-> f DescribeTaskResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [FilterRule] [FilterRule] [FilterRule] [FilterRule]
-> Iso
     (Maybe [FilterRule])
     (Maybe [FilterRule])
     (Maybe [FilterRule])
     (Maybe [FilterRule])
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 [FilterRule] [FilterRule] [FilterRule] [FilterRule]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the task that was described.
describeTaskResponse_name :: Lens.Lens' DescribeTaskResponse (Prelude.Maybe Prelude.Text)
describeTaskResponse_name :: (Maybe Text -> f (Maybe Text))
-> DescribeTaskResponse -> f DescribeTaskResponse
describeTaskResponse_name = (DescribeTaskResponse -> Maybe Text)
-> (DescribeTaskResponse -> Maybe Text -> DescribeTaskResponse)
-> Lens
     DescribeTaskResponse DescribeTaskResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTaskResponse' {Maybe Text
name :: Maybe Text
$sel:name:DescribeTaskResponse' :: DescribeTaskResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: DescribeTaskResponse
s@DescribeTaskResponse' {} Maybe Text
a -> DescribeTaskResponse
s {$sel:name:DescribeTaskResponse' :: Maybe Text
name = Maybe Text
a} :: DescribeTaskResponse)

-- | Errors that DataSync encountered during execution of the task. You can
-- use this error code to help troubleshoot issues.
describeTaskResponse_errorCode :: Lens.Lens' DescribeTaskResponse (Prelude.Maybe Prelude.Text)
describeTaskResponse_errorCode :: (Maybe Text -> f (Maybe Text))
-> DescribeTaskResponse -> f DescribeTaskResponse
describeTaskResponse_errorCode = (DescribeTaskResponse -> Maybe Text)
-> (DescribeTaskResponse -> Maybe Text -> DescribeTaskResponse)
-> Lens
     DescribeTaskResponse DescribeTaskResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTaskResponse' {Maybe Text
errorCode :: Maybe Text
$sel:errorCode:DescribeTaskResponse' :: DescribeTaskResponse -> Maybe Text
errorCode} -> Maybe Text
errorCode) (\s :: DescribeTaskResponse
s@DescribeTaskResponse' {} Maybe Text
a -> DescribeTaskResponse
s {$sel:errorCode:DescribeTaskResponse' :: Maybe Text
errorCode = Maybe Text
a} :: DescribeTaskResponse)

-- | The Amazon Resource Name (ARN) of the source file system\'s location.
describeTaskResponse_sourceLocationArn :: Lens.Lens' DescribeTaskResponse (Prelude.Maybe Prelude.Text)
describeTaskResponse_sourceLocationArn :: (Maybe Text -> f (Maybe Text))
-> DescribeTaskResponse -> f DescribeTaskResponse
describeTaskResponse_sourceLocationArn = (DescribeTaskResponse -> Maybe Text)
-> (DescribeTaskResponse -> Maybe Text -> DescribeTaskResponse)
-> Lens
     DescribeTaskResponse DescribeTaskResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTaskResponse' {Maybe Text
sourceLocationArn :: Maybe Text
$sel:sourceLocationArn:DescribeTaskResponse' :: DescribeTaskResponse -> Maybe Text
sourceLocationArn} -> Maybe Text
sourceLocationArn) (\s :: DescribeTaskResponse
s@DescribeTaskResponse' {} Maybe Text
a -> DescribeTaskResponse
s {$sel:sourceLocationArn:DescribeTaskResponse' :: Maybe Text
sourceLocationArn = Maybe Text
a} :: DescribeTaskResponse)

-- | A list of filter rules that determines which files to exclude from a
-- task. The list should contain a single filter string that consists of
-- the patterns to exclude. The patterns are delimited by \"|\" (that is, a
-- pipe), for example: @\"\/folder1|\/folder2\"@
describeTaskResponse_excludes :: Lens.Lens' DescribeTaskResponse (Prelude.Maybe [FilterRule])
describeTaskResponse_excludes :: (Maybe [FilterRule] -> f (Maybe [FilterRule]))
-> DescribeTaskResponse -> f DescribeTaskResponse
describeTaskResponse_excludes = (DescribeTaskResponse -> Maybe [FilterRule])
-> (DescribeTaskResponse
    -> Maybe [FilterRule] -> DescribeTaskResponse)
-> Lens
     DescribeTaskResponse
     DescribeTaskResponse
     (Maybe [FilterRule])
     (Maybe [FilterRule])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTaskResponse' {Maybe [FilterRule]
excludes :: Maybe [FilterRule]
$sel:excludes:DescribeTaskResponse' :: DescribeTaskResponse -> Maybe [FilterRule]
excludes} -> Maybe [FilterRule]
excludes) (\s :: DescribeTaskResponse
s@DescribeTaskResponse' {} Maybe [FilterRule]
a -> DescribeTaskResponse
s {$sel:excludes:DescribeTaskResponse' :: Maybe [FilterRule]
excludes = Maybe [FilterRule]
a} :: DescribeTaskResponse) ((Maybe [FilterRule] -> f (Maybe [FilterRule]))
 -> DescribeTaskResponse -> f DescribeTaskResponse)
-> ((Maybe [FilterRule] -> f (Maybe [FilterRule]))
    -> Maybe [FilterRule] -> f (Maybe [FilterRule]))
-> (Maybe [FilterRule] -> f (Maybe [FilterRule]))
-> DescribeTaskResponse
-> f DescribeTaskResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [FilterRule] [FilterRule] [FilterRule] [FilterRule]
-> Iso
     (Maybe [FilterRule])
     (Maybe [FilterRule])
     (Maybe [FilterRule])
     (Maybe [FilterRule])
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 [FilterRule] [FilterRule] [FilterRule] [FilterRule]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The Amazon Resource Name (ARN) of the source ENIs (Elastic Network
-- Interface) that was created for your subnet.
describeTaskResponse_sourceNetworkInterfaceArns :: Lens.Lens' DescribeTaskResponse (Prelude.Maybe [Prelude.Text])
describeTaskResponse_sourceNetworkInterfaceArns :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribeTaskResponse -> f DescribeTaskResponse
describeTaskResponse_sourceNetworkInterfaceArns = (DescribeTaskResponse -> Maybe [Text])
-> (DescribeTaskResponse -> Maybe [Text] -> DescribeTaskResponse)
-> Lens
     DescribeTaskResponse
     DescribeTaskResponse
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTaskResponse' {Maybe [Text]
sourceNetworkInterfaceArns :: Maybe [Text]
$sel:sourceNetworkInterfaceArns:DescribeTaskResponse' :: DescribeTaskResponse -> Maybe [Text]
sourceNetworkInterfaceArns} -> Maybe [Text]
sourceNetworkInterfaceArns) (\s :: DescribeTaskResponse
s@DescribeTaskResponse' {} Maybe [Text]
a -> DescribeTaskResponse
s {$sel:sourceNetworkInterfaceArns:DescribeTaskResponse' :: Maybe [Text]
sourceNetworkInterfaceArns = Maybe [Text]
a} :: DescribeTaskResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> DescribeTaskResponse -> f DescribeTaskResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribeTaskResponse
-> f DescribeTaskResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The set of configuration options that control the behavior of a single
-- execution of the task that occurs when you call @StartTaskExecution@.
-- You can configure these options to preserve metadata such as user ID
-- (UID) and group (GID), file permissions, data integrity verification,
-- and so on.
--
-- For each individual task execution, you can override these options by
-- specifying the overriding @OverrideOptions@ value to
-- <https://docs.aws.amazon.com/datasync/latest/userguide/API_StartTaskExecution.html StartTaskExecution>
-- operation.
describeTaskResponse_options :: Lens.Lens' DescribeTaskResponse (Prelude.Maybe Options)
describeTaskResponse_options :: (Maybe Options -> f (Maybe Options))
-> DescribeTaskResponse -> f DescribeTaskResponse
describeTaskResponse_options = (DescribeTaskResponse -> Maybe Options)
-> (DescribeTaskResponse -> Maybe Options -> DescribeTaskResponse)
-> Lens
     DescribeTaskResponse
     DescribeTaskResponse
     (Maybe Options)
     (Maybe Options)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTaskResponse' {Maybe Options
options :: Maybe Options
$sel:options:DescribeTaskResponse' :: DescribeTaskResponse -> Maybe Options
options} -> Maybe Options
options) (\s :: DescribeTaskResponse
s@DescribeTaskResponse' {} Maybe Options
a -> DescribeTaskResponse
s {$sel:options:DescribeTaskResponse' :: Maybe Options
options = Maybe Options
a} :: DescribeTaskResponse)

-- | The Amazon Resource Name (ARN) of the Amazon CloudWatch log group that
-- was used to monitor and log events in the task.
--
-- For more information on these groups, see Working with Log Groups and
-- Log Streams in the /Amazon CloudWatch User Guide/.
describeTaskResponse_cloudWatchLogGroupArn :: Lens.Lens' DescribeTaskResponse (Prelude.Maybe Prelude.Text)
describeTaskResponse_cloudWatchLogGroupArn :: (Maybe Text -> f (Maybe Text))
-> DescribeTaskResponse -> f DescribeTaskResponse
describeTaskResponse_cloudWatchLogGroupArn = (DescribeTaskResponse -> Maybe Text)
-> (DescribeTaskResponse -> Maybe Text -> DescribeTaskResponse)
-> Lens
     DescribeTaskResponse DescribeTaskResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTaskResponse' {Maybe Text
cloudWatchLogGroupArn :: Maybe Text
$sel:cloudWatchLogGroupArn:DescribeTaskResponse' :: DescribeTaskResponse -> Maybe Text
cloudWatchLogGroupArn} -> Maybe Text
cloudWatchLogGroupArn) (\s :: DescribeTaskResponse
s@DescribeTaskResponse' {} Maybe Text
a -> DescribeTaskResponse
s {$sel:cloudWatchLogGroupArn:DescribeTaskResponse' :: Maybe Text
cloudWatchLogGroupArn = Maybe Text
a} :: DescribeTaskResponse)

-- | Detailed description of an error that was encountered during the task
-- execution. You can use this information to help troubleshoot issues.
describeTaskResponse_errorDetail :: Lens.Lens' DescribeTaskResponse (Prelude.Maybe Prelude.Text)
describeTaskResponse_errorDetail :: (Maybe Text -> f (Maybe Text))
-> DescribeTaskResponse -> f DescribeTaskResponse
describeTaskResponse_errorDetail = (DescribeTaskResponse -> Maybe Text)
-> (DescribeTaskResponse -> Maybe Text -> DescribeTaskResponse)
-> Lens
     DescribeTaskResponse DescribeTaskResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeTaskResponse' {Maybe Text
errorDetail :: Maybe Text
$sel:errorDetail:DescribeTaskResponse' :: DescribeTaskResponse -> Maybe Text
errorDetail} -> Maybe Text
errorDetail) (\s :: DescribeTaskResponse
s@DescribeTaskResponse' {} Maybe Text
a -> DescribeTaskResponse
s {$sel:errorDetail:DescribeTaskResponse' :: Maybe Text
errorDetail = Maybe Text
a} :: DescribeTaskResponse)

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

instance Prelude.NFData DescribeTaskResponse