{-# 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.StartExportTask
-- 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)
--
-- Begins the export of discovered data to an S3 bucket.
--
-- If you specify @agentIds@ in a filter, the task exports up to 72 hours
-- of detailed data collected by the identified Application Discovery
-- Agent, including network, process, and performance details. A time range
-- for exported agent data may be set by using @startTime@ and @endTime@.
-- Export of detailed agent data is limited to five concurrently running
-- exports.
--
-- If you do not include an @agentIds@ filter, summary data is exported
-- that includes both AWS Agentless Discovery Connector data and summary
-- data from AWS Discovery Agents. Export of summary data is limited to two
-- exports per day.
module Amazonka.Discovery.StartExportTask
  ( -- * Creating a Request
    StartExportTask (..),
    newStartExportTask,

    -- * Request Lenses
    startExportTask_exportDataFormat,
    startExportTask_startTime,
    startExportTask_filters,
    startExportTask_endTime,

    -- * Destructuring the Response
    StartExportTaskResponse (..),
    newStartExportTaskResponse,

    -- * Response Lenses
    startExportTaskResponse_exportId,
    startExportTaskResponse_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:/ 'newStartExportTask' smart constructor.
data StartExportTask = StartExportTask'
  { -- | The file format for the returned export data. Default value is @CSV@.
    -- __Note:__ /The/ @GRAPHML@ /option has been deprecated./
    StartExportTask -> Maybe [ExportDataFormat]
exportDataFormat :: Prelude.Maybe [ExportDataFormat],
    -- | The start timestamp for exported data from the single Application
    -- Discovery Agent selected in the filters. If no value is specified, data
    -- is exported starting from the first data collected by the agent.
    StartExportTask -> Maybe POSIX
startTime :: Prelude.Maybe Core.POSIX,
    -- | If a filter is present, it selects the single @agentId@ of the
    -- Application Discovery Agent for which data is exported. The @agentId@
    -- can be found in the results of the @DescribeAgents@ API or CLI. If no
    -- filter is present, @startTime@ and @endTime@ are ignored and exported
    -- data includes both Agentless Discovery Connector data and summary data
    -- from Application Discovery agents.
    StartExportTask -> Maybe [ExportFilter]
filters :: Prelude.Maybe [ExportFilter],
    -- | The end timestamp for exported data from the single Application
    -- Discovery Agent selected in the filters. If no value is specified,
    -- exported data includes the most recent data collected by the agent.
    StartExportTask -> Maybe POSIX
endTime :: Prelude.Maybe Core.POSIX
  }
  deriving (StartExportTask -> StartExportTask -> Bool
(StartExportTask -> StartExportTask -> Bool)
-> (StartExportTask -> StartExportTask -> Bool)
-> Eq StartExportTask
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartExportTask -> StartExportTask -> Bool
$c/= :: StartExportTask -> StartExportTask -> Bool
== :: StartExportTask -> StartExportTask -> Bool
$c== :: StartExportTask -> StartExportTask -> Bool
Prelude.Eq, ReadPrec [StartExportTask]
ReadPrec StartExportTask
Int -> ReadS StartExportTask
ReadS [StartExportTask]
(Int -> ReadS StartExportTask)
-> ReadS [StartExportTask]
-> ReadPrec StartExportTask
-> ReadPrec [StartExportTask]
-> Read StartExportTask
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartExportTask]
$creadListPrec :: ReadPrec [StartExportTask]
readPrec :: ReadPrec StartExportTask
$creadPrec :: ReadPrec StartExportTask
readList :: ReadS [StartExportTask]
$creadList :: ReadS [StartExportTask]
readsPrec :: Int -> ReadS StartExportTask
$creadsPrec :: Int -> ReadS StartExportTask
Prelude.Read, Int -> StartExportTask -> ShowS
[StartExportTask] -> ShowS
StartExportTask -> String
(Int -> StartExportTask -> ShowS)
-> (StartExportTask -> String)
-> ([StartExportTask] -> ShowS)
-> Show StartExportTask
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartExportTask] -> ShowS
$cshowList :: [StartExportTask] -> ShowS
show :: StartExportTask -> String
$cshow :: StartExportTask -> String
showsPrec :: Int -> StartExportTask -> ShowS
$cshowsPrec :: Int -> StartExportTask -> ShowS
Prelude.Show, (forall x. StartExportTask -> Rep StartExportTask x)
-> (forall x. Rep StartExportTask x -> StartExportTask)
-> Generic StartExportTask
forall x. Rep StartExportTask x -> StartExportTask
forall x. StartExportTask -> Rep StartExportTask x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StartExportTask x -> StartExportTask
$cfrom :: forall x. StartExportTask -> Rep StartExportTask x
Prelude.Generic)

-- |
-- Create a value of 'StartExportTask' 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:
--
-- 'exportDataFormat', 'startExportTask_exportDataFormat' - The file format for the returned export data. Default value is @CSV@.
-- __Note:__ /The/ @GRAPHML@ /option has been deprecated./
--
-- 'startTime', 'startExportTask_startTime' - The start timestamp for exported data from the single Application
-- Discovery Agent selected in the filters. If no value is specified, data
-- is exported starting from the first data collected by the agent.
--
-- 'filters', 'startExportTask_filters' - If a filter is present, it selects the single @agentId@ of the
-- Application Discovery Agent for which data is exported. The @agentId@
-- can be found in the results of the @DescribeAgents@ API or CLI. If no
-- filter is present, @startTime@ and @endTime@ are ignored and exported
-- data includes both Agentless Discovery Connector data and summary data
-- from Application Discovery agents.
--
-- 'endTime', 'startExportTask_endTime' - The end timestamp for exported data from the single Application
-- Discovery Agent selected in the filters. If no value is specified,
-- exported data includes the most recent data collected by the agent.
newStartExportTask ::
  StartExportTask
newStartExportTask :: StartExportTask
newStartExportTask =
  StartExportTask' :: Maybe [ExportDataFormat]
-> Maybe POSIX
-> Maybe [ExportFilter]
-> Maybe POSIX
-> StartExportTask
StartExportTask'
    { $sel:exportDataFormat:StartExportTask' :: Maybe [ExportDataFormat]
exportDataFormat =
        Maybe [ExportDataFormat]
forall a. Maybe a
Prelude.Nothing,
      $sel:startTime:StartExportTask' :: Maybe POSIX
startTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:filters:StartExportTask' :: Maybe [ExportFilter]
filters = Maybe [ExportFilter]
forall a. Maybe a
Prelude.Nothing,
      $sel:endTime:StartExportTask' :: Maybe POSIX
endTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
    }

-- | The file format for the returned export data. Default value is @CSV@.
-- __Note:__ /The/ @GRAPHML@ /option has been deprecated./
startExportTask_exportDataFormat :: Lens.Lens' StartExportTask (Prelude.Maybe [ExportDataFormat])
startExportTask_exportDataFormat :: (Maybe [ExportDataFormat] -> f (Maybe [ExportDataFormat]))
-> StartExportTask -> f StartExportTask
startExportTask_exportDataFormat = (StartExportTask -> Maybe [ExportDataFormat])
-> (StartExportTask -> Maybe [ExportDataFormat] -> StartExportTask)
-> Lens
     StartExportTask
     StartExportTask
     (Maybe [ExportDataFormat])
     (Maybe [ExportDataFormat])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartExportTask' {Maybe [ExportDataFormat]
exportDataFormat :: Maybe [ExportDataFormat]
$sel:exportDataFormat:StartExportTask' :: StartExportTask -> Maybe [ExportDataFormat]
exportDataFormat} -> Maybe [ExportDataFormat]
exportDataFormat) (\s :: StartExportTask
s@StartExportTask' {} Maybe [ExportDataFormat]
a -> StartExportTask
s {$sel:exportDataFormat:StartExportTask' :: Maybe [ExportDataFormat]
exportDataFormat = Maybe [ExportDataFormat]
a} :: StartExportTask) ((Maybe [ExportDataFormat] -> f (Maybe [ExportDataFormat]))
 -> StartExportTask -> f StartExportTask)
-> ((Maybe [ExportDataFormat] -> f (Maybe [ExportDataFormat]))
    -> Maybe [ExportDataFormat] -> f (Maybe [ExportDataFormat]))
-> (Maybe [ExportDataFormat] -> f (Maybe [ExportDataFormat]))
-> StartExportTask
-> f StartExportTask
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ExportDataFormat]
  [ExportDataFormat]
  [ExportDataFormat]
  [ExportDataFormat]
-> Iso
     (Maybe [ExportDataFormat])
     (Maybe [ExportDataFormat])
     (Maybe [ExportDataFormat])
     (Maybe [ExportDataFormat])
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
  [ExportDataFormat]
  [ExportDataFormat]
  [ExportDataFormat]
  [ExportDataFormat]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The start timestamp for exported data from the single Application
-- Discovery Agent selected in the filters. If no value is specified, data
-- is exported starting from the first data collected by the agent.
startExportTask_startTime :: Lens.Lens' StartExportTask (Prelude.Maybe Prelude.UTCTime)
startExportTask_startTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> StartExportTask -> f StartExportTask
startExportTask_startTime = (StartExportTask -> Maybe POSIX)
-> (StartExportTask -> Maybe POSIX -> StartExportTask)
-> Lens StartExportTask StartExportTask (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartExportTask' {Maybe POSIX
startTime :: Maybe POSIX
$sel:startTime:StartExportTask' :: StartExportTask -> Maybe POSIX
startTime} -> Maybe POSIX
startTime) (\s :: StartExportTask
s@StartExportTask' {} Maybe POSIX
a -> StartExportTask
s {$sel:startTime:StartExportTask' :: Maybe POSIX
startTime = Maybe POSIX
a} :: StartExportTask) ((Maybe POSIX -> f (Maybe POSIX))
 -> StartExportTask -> f StartExportTask)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> StartExportTask
-> f StartExportTask
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

-- | If a filter is present, it selects the single @agentId@ of the
-- Application Discovery Agent for which data is exported. The @agentId@
-- can be found in the results of the @DescribeAgents@ API or CLI. If no
-- filter is present, @startTime@ and @endTime@ are ignored and exported
-- data includes both Agentless Discovery Connector data and summary data
-- from Application Discovery agents.
startExportTask_filters :: Lens.Lens' StartExportTask (Prelude.Maybe [ExportFilter])
startExportTask_filters :: (Maybe [ExportFilter] -> f (Maybe [ExportFilter]))
-> StartExportTask -> f StartExportTask
startExportTask_filters = (StartExportTask -> Maybe [ExportFilter])
-> (StartExportTask -> Maybe [ExportFilter] -> StartExportTask)
-> Lens
     StartExportTask
     StartExportTask
     (Maybe [ExportFilter])
     (Maybe [ExportFilter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartExportTask' {Maybe [ExportFilter]
filters :: Maybe [ExportFilter]
$sel:filters:StartExportTask' :: StartExportTask -> Maybe [ExportFilter]
filters} -> Maybe [ExportFilter]
filters) (\s :: StartExportTask
s@StartExportTask' {} Maybe [ExportFilter]
a -> StartExportTask
s {$sel:filters:StartExportTask' :: Maybe [ExportFilter]
filters = Maybe [ExportFilter]
a} :: StartExportTask) ((Maybe [ExportFilter] -> f (Maybe [ExportFilter]))
 -> StartExportTask -> f StartExportTask)
-> ((Maybe [ExportFilter] -> f (Maybe [ExportFilter]))
    -> Maybe [ExportFilter] -> f (Maybe [ExportFilter]))
-> (Maybe [ExportFilter] -> f (Maybe [ExportFilter]))
-> StartExportTask
-> f StartExportTask
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [ExportFilter] [ExportFilter] [ExportFilter] [ExportFilter]
-> Iso
     (Maybe [ExportFilter])
     (Maybe [ExportFilter])
     (Maybe [ExportFilter])
     (Maybe [ExportFilter])
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 [ExportFilter] [ExportFilter] [ExportFilter] [ExportFilter]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The end timestamp for exported data from the single Application
-- Discovery Agent selected in the filters. If no value is specified,
-- exported data includes the most recent data collected by the agent.
startExportTask_endTime :: Lens.Lens' StartExportTask (Prelude.Maybe Prelude.UTCTime)
startExportTask_endTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> StartExportTask -> f StartExportTask
startExportTask_endTime = (StartExportTask -> Maybe POSIX)
-> (StartExportTask -> Maybe POSIX -> StartExportTask)
-> Lens StartExportTask StartExportTask (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartExportTask' {Maybe POSIX
endTime :: Maybe POSIX
$sel:endTime:StartExportTask' :: StartExportTask -> Maybe POSIX
endTime} -> Maybe POSIX
endTime) (\s :: StartExportTask
s@StartExportTask' {} Maybe POSIX
a -> StartExportTask
s {$sel:endTime:StartExportTask' :: Maybe POSIX
endTime = Maybe POSIX
a} :: StartExportTask) ((Maybe POSIX -> f (Maybe POSIX))
 -> StartExportTask -> f StartExportTask)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> StartExportTask
-> f StartExportTask
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

instance Core.AWSRequest StartExportTask where
  type
    AWSResponse StartExportTask =
      StartExportTaskResponse
  request :: StartExportTask -> Request StartExportTask
request = Service -> StartExportTask -> Request StartExportTask
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy StartExportTask
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse StartExportTask)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse StartExportTask))
-> Logger
-> Service
-> Proxy StartExportTask
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse StartExportTask)))
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 Text -> Int -> StartExportTaskResponse
StartExportTaskResponse'
            (Maybe Text -> Int -> StartExportTaskResponse)
-> Either String (Maybe Text)
-> Either String (Int -> StartExportTaskResponse)
forall (f :: * -> *) a b. Functor 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
"exportId")
            Either String (Int -> StartExportTaskResponse)
-> Either String Int -> Either String StartExportTaskResponse
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 StartExportTask

instance Prelude.NFData StartExportTask

instance Core.ToHeaders StartExportTask where
  toHeaders :: StartExportTask -> ResponseHeaders
toHeaders =
    ResponseHeaders -> StartExportTask -> 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.StartExportTask" ::
                          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 StartExportTask where
  toJSON :: StartExportTask -> Value
toJSON StartExportTask' {Maybe [ExportDataFormat]
Maybe [ExportFilter]
Maybe POSIX
endTime :: Maybe POSIX
filters :: Maybe [ExportFilter]
startTime :: Maybe POSIX
exportDataFormat :: Maybe [ExportDataFormat]
$sel:endTime:StartExportTask' :: StartExportTask -> Maybe POSIX
$sel:filters:StartExportTask' :: StartExportTask -> Maybe [ExportFilter]
$sel:startTime:StartExportTask' :: StartExportTask -> Maybe POSIX
$sel:exportDataFormat:StartExportTask' :: StartExportTask -> Maybe [ExportDataFormat]
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"exportDataFormat" Text -> [ExportDataFormat] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              ([ExportDataFormat] -> Pair)
-> Maybe [ExportDataFormat] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ExportDataFormat]
exportDataFormat,
            (Text
"startTime" Text -> POSIX -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (POSIX -> Pair) -> Maybe POSIX -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
startTime,
            (Text
"filters" Text -> [ExportFilter] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([ExportFilter] -> Pair) -> Maybe [ExportFilter] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ExportFilter]
filters,
            (Text
"endTime" Text -> POSIX -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (POSIX -> Pair) -> Maybe POSIX -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
endTime
          ]
      )

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

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

-- | /See:/ 'newStartExportTaskResponse' smart constructor.
data StartExportTaskResponse = StartExportTaskResponse'
  { -- | A unique identifier used to query the status of an export request.
    StartExportTaskResponse -> Maybe Text
exportId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    StartExportTaskResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (StartExportTaskResponse -> StartExportTaskResponse -> Bool
(StartExportTaskResponse -> StartExportTaskResponse -> Bool)
-> (StartExportTaskResponse -> StartExportTaskResponse -> Bool)
-> Eq StartExportTaskResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartExportTaskResponse -> StartExportTaskResponse -> Bool
$c/= :: StartExportTaskResponse -> StartExportTaskResponse -> Bool
== :: StartExportTaskResponse -> StartExportTaskResponse -> Bool
$c== :: StartExportTaskResponse -> StartExportTaskResponse -> Bool
Prelude.Eq, ReadPrec [StartExportTaskResponse]
ReadPrec StartExportTaskResponse
Int -> ReadS StartExportTaskResponse
ReadS [StartExportTaskResponse]
(Int -> ReadS StartExportTaskResponse)
-> ReadS [StartExportTaskResponse]
-> ReadPrec StartExportTaskResponse
-> ReadPrec [StartExportTaskResponse]
-> Read StartExportTaskResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartExportTaskResponse]
$creadListPrec :: ReadPrec [StartExportTaskResponse]
readPrec :: ReadPrec StartExportTaskResponse
$creadPrec :: ReadPrec StartExportTaskResponse
readList :: ReadS [StartExportTaskResponse]
$creadList :: ReadS [StartExportTaskResponse]
readsPrec :: Int -> ReadS StartExportTaskResponse
$creadsPrec :: Int -> ReadS StartExportTaskResponse
Prelude.Read, Int -> StartExportTaskResponse -> ShowS
[StartExportTaskResponse] -> ShowS
StartExportTaskResponse -> String
(Int -> StartExportTaskResponse -> ShowS)
-> (StartExportTaskResponse -> String)
-> ([StartExportTaskResponse] -> ShowS)
-> Show StartExportTaskResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartExportTaskResponse] -> ShowS
$cshowList :: [StartExportTaskResponse] -> ShowS
show :: StartExportTaskResponse -> String
$cshow :: StartExportTaskResponse -> String
showsPrec :: Int -> StartExportTaskResponse -> ShowS
$cshowsPrec :: Int -> StartExportTaskResponse -> ShowS
Prelude.Show, (forall x.
 StartExportTaskResponse -> Rep StartExportTaskResponse x)
-> (forall x.
    Rep StartExportTaskResponse x -> StartExportTaskResponse)
-> Generic StartExportTaskResponse
forall x. Rep StartExportTaskResponse x -> StartExportTaskResponse
forall x. StartExportTaskResponse -> Rep StartExportTaskResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StartExportTaskResponse x -> StartExportTaskResponse
$cfrom :: forall x. StartExportTaskResponse -> Rep StartExportTaskResponse x
Prelude.Generic)

-- |
-- Create a value of 'StartExportTaskResponse' 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:
--
-- 'exportId', 'startExportTaskResponse_exportId' - A unique identifier used to query the status of an export request.
--
-- 'httpStatus', 'startExportTaskResponse_httpStatus' - The response's http status code.
newStartExportTaskResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  StartExportTaskResponse
newStartExportTaskResponse :: Int -> StartExportTaskResponse
newStartExportTaskResponse Int
pHttpStatus_ =
  StartExportTaskResponse' :: Maybe Text -> Int -> StartExportTaskResponse
StartExportTaskResponse'
    { $sel:exportId:StartExportTaskResponse' :: Maybe Text
exportId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:StartExportTaskResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A unique identifier used to query the status of an export request.
startExportTaskResponse_exportId :: Lens.Lens' StartExportTaskResponse (Prelude.Maybe Prelude.Text)
startExportTaskResponse_exportId :: (Maybe Text -> f (Maybe Text))
-> StartExportTaskResponse -> f StartExportTaskResponse
startExportTaskResponse_exportId = (StartExportTaskResponse -> Maybe Text)
-> (StartExportTaskResponse
    -> Maybe Text -> StartExportTaskResponse)
-> Lens
     StartExportTaskResponse
     StartExportTaskResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartExportTaskResponse' {Maybe Text
exportId :: Maybe Text
$sel:exportId:StartExportTaskResponse' :: StartExportTaskResponse -> Maybe Text
exportId} -> Maybe Text
exportId) (\s :: StartExportTaskResponse
s@StartExportTaskResponse' {} Maybe Text
a -> StartExportTaskResponse
s {$sel:exportId:StartExportTaskResponse' :: Maybe Text
exportId = Maybe Text
a} :: StartExportTaskResponse)

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

instance Prelude.NFData StartExportTaskResponse