{-# 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.DescribeContinuousExports
-- 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)
--
-- Lists exports as specified by ID. All continuous exports associated with
-- your user account can be listed if you call @DescribeContinuousExports@
-- as is without passing any parameters.
--
-- This operation returns paginated results.
module Amazonka.Discovery.DescribeContinuousExports
  ( -- * Creating a Request
    DescribeContinuousExports (..),
    newDescribeContinuousExports,

    -- * Request Lenses
    describeContinuousExports_nextToken,
    describeContinuousExports_exportIds,
    describeContinuousExports_maxResults,

    -- * Destructuring the Response
    DescribeContinuousExportsResponse (..),
    newDescribeContinuousExportsResponse,

    -- * Response Lenses
    describeContinuousExportsResponse_nextToken,
    describeContinuousExportsResponse_descriptions,
    describeContinuousExportsResponse_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:/ 'newDescribeContinuousExports' smart constructor.
data DescribeContinuousExports = DescribeContinuousExports'
  { -- | The token from the previous call to @DescribeExportTasks@.
    DescribeContinuousExports -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The unique IDs assigned to the exports.
    DescribeContinuousExports -> Maybe [Text]
exportIds :: Prelude.Maybe [Prelude.Text],
    -- | A number between 1 and 100 specifying the maximum number of continuous
    -- export descriptions returned.
    DescribeContinuousExports -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (DescribeContinuousExports -> DescribeContinuousExports -> Bool
(DescribeContinuousExports -> DescribeContinuousExports -> Bool)
-> (DescribeContinuousExports -> DescribeContinuousExports -> Bool)
-> Eq DescribeContinuousExports
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeContinuousExports -> DescribeContinuousExports -> Bool
$c/= :: DescribeContinuousExports -> DescribeContinuousExports -> Bool
== :: DescribeContinuousExports -> DescribeContinuousExports -> Bool
$c== :: DescribeContinuousExports -> DescribeContinuousExports -> Bool
Prelude.Eq, ReadPrec [DescribeContinuousExports]
ReadPrec DescribeContinuousExports
Int -> ReadS DescribeContinuousExports
ReadS [DescribeContinuousExports]
(Int -> ReadS DescribeContinuousExports)
-> ReadS [DescribeContinuousExports]
-> ReadPrec DescribeContinuousExports
-> ReadPrec [DescribeContinuousExports]
-> Read DescribeContinuousExports
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeContinuousExports]
$creadListPrec :: ReadPrec [DescribeContinuousExports]
readPrec :: ReadPrec DescribeContinuousExports
$creadPrec :: ReadPrec DescribeContinuousExports
readList :: ReadS [DescribeContinuousExports]
$creadList :: ReadS [DescribeContinuousExports]
readsPrec :: Int -> ReadS DescribeContinuousExports
$creadsPrec :: Int -> ReadS DescribeContinuousExports
Prelude.Read, Int -> DescribeContinuousExports -> ShowS
[DescribeContinuousExports] -> ShowS
DescribeContinuousExports -> String
(Int -> DescribeContinuousExports -> ShowS)
-> (DescribeContinuousExports -> String)
-> ([DescribeContinuousExports] -> ShowS)
-> Show DescribeContinuousExports
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeContinuousExports] -> ShowS
$cshowList :: [DescribeContinuousExports] -> ShowS
show :: DescribeContinuousExports -> String
$cshow :: DescribeContinuousExports -> String
showsPrec :: Int -> DescribeContinuousExports -> ShowS
$cshowsPrec :: Int -> DescribeContinuousExports -> ShowS
Prelude.Show, (forall x.
 DescribeContinuousExports -> Rep DescribeContinuousExports x)
-> (forall x.
    Rep DescribeContinuousExports x -> DescribeContinuousExports)
-> Generic DescribeContinuousExports
forall x.
Rep DescribeContinuousExports x -> DescribeContinuousExports
forall x.
DescribeContinuousExports -> Rep DescribeContinuousExports x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeContinuousExports x -> DescribeContinuousExports
$cfrom :: forall x.
DescribeContinuousExports -> Rep DescribeContinuousExports x
Prelude.Generic)

-- |
-- Create a value of 'DescribeContinuousExports' 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:
--
-- 'nextToken', 'describeContinuousExports_nextToken' - The token from the previous call to @DescribeExportTasks@.
--
-- 'exportIds', 'describeContinuousExports_exportIds' - The unique IDs assigned to the exports.
--
-- 'maxResults', 'describeContinuousExports_maxResults' - A number between 1 and 100 specifying the maximum number of continuous
-- export descriptions returned.
newDescribeContinuousExports ::
  DescribeContinuousExports
newDescribeContinuousExports :: DescribeContinuousExports
newDescribeContinuousExports =
  DescribeContinuousExports' :: Maybe Text
-> Maybe [Text] -> Maybe Natural -> DescribeContinuousExports
DescribeContinuousExports'
    { $sel:nextToken:DescribeContinuousExports' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:exportIds:DescribeContinuousExports' :: Maybe [Text]
exportIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:DescribeContinuousExports' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | The token from the previous call to @DescribeExportTasks@.
describeContinuousExports_nextToken :: Lens.Lens' DescribeContinuousExports (Prelude.Maybe Prelude.Text)
describeContinuousExports_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeContinuousExports -> f DescribeContinuousExports
describeContinuousExports_nextToken = (DescribeContinuousExports -> Maybe Text)
-> (DescribeContinuousExports
    -> Maybe Text -> DescribeContinuousExports)
-> Lens
     DescribeContinuousExports
     DescribeContinuousExports
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeContinuousExports' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeContinuousExports' :: DescribeContinuousExports -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeContinuousExports
s@DescribeContinuousExports' {} Maybe Text
a -> DescribeContinuousExports
s {$sel:nextToken:DescribeContinuousExports' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeContinuousExports)

-- | The unique IDs assigned to the exports.
describeContinuousExports_exportIds :: Lens.Lens' DescribeContinuousExports (Prelude.Maybe [Prelude.Text])
describeContinuousExports_exportIds :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribeContinuousExports -> f DescribeContinuousExports
describeContinuousExports_exportIds = (DescribeContinuousExports -> Maybe [Text])
-> (DescribeContinuousExports
    -> Maybe [Text] -> DescribeContinuousExports)
-> Lens
     DescribeContinuousExports
     DescribeContinuousExports
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeContinuousExports' {Maybe [Text]
exportIds :: Maybe [Text]
$sel:exportIds:DescribeContinuousExports' :: DescribeContinuousExports -> Maybe [Text]
exportIds} -> Maybe [Text]
exportIds) (\s :: DescribeContinuousExports
s@DescribeContinuousExports' {} Maybe [Text]
a -> DescribeContinuousExports
s {$sel:exportIds:DescribeContinuousExports' :: Maybe [Text]
exportIds = Maybe [Text]
a} :: DescribeContinuousExports) ((Maybe [Text] -> f (Maybe [Text]))
 -> DescribeContinuousExports -> f DescribeContinuousExports)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribeContinuousExports
-> f DescribeContinuousExports
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

-- | A number between 1 and 100 specifying the maximum number of continuous
-- export descriptions returned.
describeContinuousExports_maxResults :: Lens.Lens' DescribeContinuousExports (Prelude.Maybe Prelude.Natural)
describeContinuousExports_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> DescribeContinuousExports -> f DescribeContinuousExports
describeContinuousExports_maxResults = (DescribeContinuousExports -> Maybe Natural)
-> (DescribeContinuousExports
    -> Maybe Natural -> DescribeContinuousExports)
-> Lens
     DescribeContinuousExports
     DescribeContinuousExports
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeContinuousExports' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:DescribeContinuousExports' :: DescribeContinuousExports -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: DescribeContinuousExports
s@DescribeContinuousExports' {} Maybe Natural
a -> DescribeContinuousExports
s {$sel:maxResults:DescribeContinuousExports' :: Maybe Natural
maxResults = Maybe Natural
a} :: DescribeContinuousExports)

instance Core.AWSPager DescribeContinuousExports where
  page :: DescribeContinuousExports
-> AWSResponse DescribeContinuousExports
-> Maybe DescribeContinuousExports
page DescribeContinuousExports
rq AWSResponse DescribeContinuousExports
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeContinuousExports
DescribeContinuousExportsResponse
rs
            DescribeContinuousExportsResponse
-> Getting (First Text) DescribeContinuousExportsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeContinuousExportsResponse
-> Const (First Text) DescribeContinuousExportsResponse
Lens' DescribeContinuousExportsResponse (Maybe Text)
describeContinuousExportsResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> DescribeContinuousExportsResponse
 -> Const (First Text) DescribeContinuousExportsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeContinuousExportsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe DescribeContinuousExports
forall a. Maybe a
Prelude.Nothing
    | Maybe [ContinuousExportDescription] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeContinuousExports
DescribeContinuousExportsResponse
rs
            DescribeContinuousExportsResponse
-> Getting
     (First [ContinuousExportDescription])
     DescribeContinuousExportsResponse
     [ContinuousExportDescription]
-> Maybe [ContinuousExportDescription]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [ContinuousExportDescription]
 -> Const
      (First [ContinuousExportDescription])
      (Maybe [ContinuousExportDescription]))
-> DescribeContinuousExportsResponse
-> Const
     (First [ContinuousExportDescription])
     DescribeContinuousExportsResponse
Lens'
  DescribeContinuousExportsResponse
  (Maybe [ContinuousExportDescription])
describeContinuousExportsResponse_descriptions
              ((Maybe [ContinuousExportDescription]
  -> Const
       (First [ContinuousExportDescription])
       (Maybe [ContinuousExportDescription]))
 -> DescribeContinuousExportsResponse
 -> Const
      (First [ContinuousExportDescription])
      DescribeContinuousExportsResponse)
-> (([ContinuousExportDescription]
     -> Const
          (First [ContinuousExportDescription])
          [ContinuousExportDescription])
    -> Maybe [ContinuousExportDescription]
    -> Const
         (First [ContinuousExportDescription])
         (Maybe [ContinuousExportDescription]))
-> Getting
     (First [ContinuousExportDescription])
     DescribeContinuousExportsResponse
     [ContinuousExportDescription]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([ContinuousExportDescription]
 -> Const
      (First [ContinuousExportDescription])
      [ContinuousExportDescription])
-> Maybe [ContinuousExportDescription]
-> Const
     (First [ContinuousExportDescription])
     (Maybe [ContinuousExportDescription])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe DescribeContinuousExports
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      DescribeContinuousExports -> Maybe DescribeContinuousExports
forall a. a -> Maybe a
Prelude.Just (DescribeContinuousExports -> Maybe DescribeContinuousExports)
-> DescribeContinuousExports -> Maybe DescribeContinuousExports
forall a b. (a -> b) -> a -> b
Prelude.$
        DescribeContinuousExports
rq
          DescribeContinuousExports
-> (DescribeContinuousExports -> DescribeContinuousExports)
-> DescribeContinuousExports
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeContinuousExports -> Identity DescribeContinuousExports
Lens
  DescribeContinuousExports
  DescribeContinuousExports
  (Maybe Text)
  (Maybe Text)
describeContinuousExports_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> DescribeContinuousExports -> Identity DescribeContinuousExports)
-> Maybe Text
-> DescribeContinuousExports
-> DescribeContinuousExports
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeContinuousExports
DescribeContinuousExportsResponse
rs
          DescribeContinuousExportsResponse
-> Getting (First Text) DescribeContinuousExportsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeContinuousExportsResponse
-> Const (First Text) DescribeContinuousExportsResponse
Lens' DescribeContinuousExportsResponse (Maybe Text)
describeContinuousExportsResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> DescribeContinuousExportsResponse
 -> Const (First Text) DescribeContinuousExportsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeContinuousExportsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest DescribeContinuousExports where
  type
    AWSResponse DescribeContinuousExports =
      DescribeContinuousExportsResponse
  request :: DescribeContinuousExports -> Request DescribeContinuousExports
request = Service
-> DescribeContinuousExports -> Request DescribeContinuousExports
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeContinuousExports
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeContinuousExports)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeContinuousExports))
-> Logger
-> Service
-> Proxy DescribeContinuousExports
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeContinuousExports)))
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
-> Maybe [ContinuousExportDescription]
-> Int
-> DescribeContinuousExportsResponse
DescribeContinuousExportsResponse'
            (Maybe Text
 -> Maybe [ContinuousExportDescription]
 -> Int
 -> DescribeContinuousExportsResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [ContinuousExportDescription]
      -> Int -> DescribeContinuousExportsResponse)
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
"nextToken")
            Either
  String
  (Maybe [ContinuousExportDescription]
   -> Int -> DescribeContinuousExportsResponse)
-> Either String (Maybe [ContinuousExportDescription])
-> Either String (Int -> DescribeContinuousExportsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Either String (Maybe (Maybe [ContinuousExportDescription]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"descriptions" Either String (Maybe (Maybe [ContinuousExportDescription]))
-> Maybe [ContinuousExportDescription]
-> Either String (Maybe [ContinuousExportDescription])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [ContinuousExportDescription]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> DescribeContinuousExportsResponse)
-> Either String Int
-> Either String DescribeContinuousExportsResponse
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 DescribeContinuousExports

instance Prelude.NFData DescribeContinuousExports

instance Core.ToHeaders DescribeContinuousExports where
  toHeaders :: DescribeContinuousExports -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeContinuousExports -> 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.DescribeContinuousExports" ::
                          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 DescribeContinuousExports where
  toJSON :: DescribeContinuousExports -> Value
toJSON DescribeContinuousExports' {Maybe Natural
Maybe [Text]
Maybe Text
maxResults :: Maybe Natural
exportIds :: Maybe [Text]
nextToken :: Maybe Text
$sel:maxResults:DescribeContinuousExports' :: DescribeContinuousExports -> Maybe Natural
$sel:exportIds:DescribeContinuousExports' :: DescribeContinuousExports -> Maybe [Text]
$sel:nextToken:DescribeContinuousExports' :: DescribeContinuousExports -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (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
"exportIds" 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]
exportIds,
            (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 DescribeContinuousExports where
  toPath :: DescribeContinuousExports -> ByteString
toPath = ByteString -> DescribeContinuousExports -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | /See:/ 'newDescribeContinuousExportsResponse' smart constructor.
data DescribeContinuousExportsResponse = DescribeContinuousExportsResponse'
  { -- | The token from the previous call to @DescribeExportTasks@.
    DescribeContinuousExportsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | A list of continuous export descriptions.
    DescribeContinuousExportsResponse
-> Maybe [ContinuousExportDescription]
descriptions :: Prelude.Maybe [ContinuousExportDescription],
    -- | The response's http status code.
    DescribeContinuousExportsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeContinuousExportsResponse
-> DescribeContinuousExportsResponse -> Bool
(DescribeContinuousExportsResponse
 -> DescribeContinuousExportsResponse -> Bool)
-> (DescribeContinuousExportsResponse
    -> DescribeContinuousExportsResponse -> Bool)
-> Eq DescribeContinuousExportsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeContinuousExportsResponse
-> DescribeContinuousExportsResponse -> Bool
$c/= :: DescribeContinuousExportsResponse
-> DescribeContinuousExportsResponse -> Bool
== :: DescribeContinuousExportsResponse
-> DescribeContinuousExportsResponse -> Bool
$c== :: DescribeContinuousExportsResponse
-> DescribeContinuousExportsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeContinuousExportsResponse]
ReadPrec DescribeContinuousExportsResponse
Int -> ReadS DescribeContinuousExportsResponse
ReadS [DescribeContinuousExportsResponse]
(Int -> ReadS DescribeContinuousExportsResponse)
-> ReadS [DescribeContinuousExportsResponse]
-> ReadPrec DescribeContinuousExportsResponse
-> ReadPrec [DescribeContinuousExportsResponse]
-> Read DescribeContinuousExportsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeContinuousExportsResponse]
$creadListPrec :: ReadPrec [DescribeContinuousExportsResponse]
readPrec :: ReadPrec DescribeContinuousExportsResponse
$creadPrec :: ReadPrec DescribeContinuousExportsResponse
readList :: ReadS [DescribeContinuousExportsResponse]
$creadList :: ReadS [DescribeContinuousExportsResponse]
readsPrec :: Int -> ReadS DescribeContinuousExportsResponse
$creadsPrec :: Int -> ReadS DescribeContinuousExportsResponse
Prelude.Read, Int -> DescribeContinuousExportsResponse -> ShowS
[DescribeContinuousExportsResponse] -> ShowS
DescribeContinuousExportsResponse -> String
(Int -> DescribeContinuousExportsResponse -> ShowS)
-> (DescribeContinuousExportsResponse -> String)
-> ([DescribeContinuousExportsResponse] -> ShowS)
-> Show DescribeContinuousExportsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeContinuousExportsResponse] -> ShowS
$cshowList :: [DescribeContinuousExportsResponse] -> ShowS
show :: DescribeContinuousExportsResponse -> String
$cshow :: DescribeContinuousExportsResponse -> String
showsPrec :: Int -> DescribeContinuousExportsResponse -> ShowS
$cshowsPrec :: Int -> DescribeContinuousExportsResponse -> ShowS
Prelude.Show, (forall x.
 DescribeContinuousExportsResponse
 -> Rep DescribeContinuousExportsResponse x)
-> (forall x.
    Rep DescribeContinuousExportsResponse x
    -> DescribeContinuousExportsResponse)
-> Generic DescribeContinuousExportsResponse
forall x.
Rep DescribeContinuousExportsResponse x
-> DescribeContinuousExportsResponse
forall x.
DescribeContinuousExportsResponse
-> Rep DescribeContinuousExportsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeContinuousExportsResponse x
-> DescribeContinuousExportsResponse
$cfrom :: forall x.
DescribeContinuousExportsResponse
-> Rep DescribeContinuousExportsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeContinuousExportsResponse' 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:
--
-- 'nextToken', 'describeContinuousExportsResponse_nextToken' - The token from the previous call to @DescribeExportTasks@.
--
-- 'descriptions', 'describeContinuousExportsResponse_descriptions' - A list of continuous export descriptions.
--
-- 'httpStatus', 'describeContinuousExportsResponse_httpStatus' - The response's http status code.
newDescribeContinuousExportsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeContinuousExportsResponse
newDescribeContinuousExportsResponse :: Int -> DescribeContinuousExportsResponse
newDescribeContinuousExportsResponse Int
pHttpStatus_ =
  DescribeContinuousExportsResponse' :: Maybe Text
-> Maybe [ContinuousExportDescription]
-> Int
-> DescribeContinuousExportsResponse
DescribeContinuousExportsResponse'
    { $sel:nextToken:DescribeContinuousExportsResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:descriptions:DescribeContinuousExportsResponse' :: Maybe [ContinuousExportDescription]
descriptions = Maybe [ContinuousExportDescription]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeContinuousExportsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The token from the previous call to @DescribeExportTasks@.
describeContinuousExportsResponse_nextToken :: Lens.Lens' DescribeContinuousExportsResponse (Prelude.Maybe Prelude.Text)
describeContinuousExportsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeContinuousExportsResponse
-> f DescribeContinuousExportsResponse
describeContinuousExportsResponse_nextToken = (DescribeContinuousExportsResponse -> Maybe Text)
-> (DescribeContinuousExportsResponse
    -> Maybe Text -> DescribeContinuousExportsResponse)
-> Lens' DescribeContinuousExportsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeContinuousExportsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeContinuousExportsResponse' :: DescribeContinuousExportsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeContinuousExportsResponse
s@DescribeContinuousExportsResponse' {} Maybe Text
a -> DescribeContinuousExportsResponse
s {$sel:nextToken:DescribeContinuousExportsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeContinuousExportsResponse)

-- | A list of continuous export descriptions.
describeContinuousExportsResponse_descriptions :: Lens.Lens' DescribeContinuousExportsResponse (Prelude.Maybe [ContinuousExportDescription])
describeContinuousExportsResponse_descriptions :: (Maybe [ContinuousExportDescription]
 -> f (Maybe [ContinuousExportDescription]))
-> DescribeContinuousExportsResponse
-> f DescribeContinuousExportsResponse
describeContinuousExportsResponse_descriptions = (DescribeContinuousExportsResponse
 -> Maybe [ContinuousExportDescription])
-> (DescribeContinuousExportsResponse
    -> Maybe [ContinuousExportDescription]
    -> DescribeContinuousExportsResponse)
-> Lens'
     DescribeContinuousExportsResponse
     (Maybe [ContinuousExportDescription])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeContinuousExportsResponse' {Maybe [ContinuousExportDescription]
descriptions :: Maybe [ContinuousExportDescription]
$sel:descriptions:DescribeContinuousExportsResponse' :: DescribeContinuousExportsResponse
-> Maybe [ContinuousExportDescription]
descriptions} -> Maybe [ContinuousExportDescription]
descriptions) (\s :: DescribeContinuousExportsResponse
s@DescribeContinuousExportsResponse' {} Maybe [ContinuousExportDescription]
a -> DescribeContinuousExportsResponse
s {$sel:descriptions:DescribeContinuousExportsResponse' :: Maybe [ContinuousExportDescription]
descriptions = Maybe [ContinuousExportDescription]
a} :: DescribeContinuousExportsResponse) ((Maybe [ContinuousExportDescription]
  -> f (Maybe [ContinuousExportDescription]))
 -> DescribeContinuousExportsResponse
 -> f DescribeContinuousExportsResponse)
-> ((Maybe [ContinuousExportDescription]
     -> f (Maybe [ContinuousExportDescription]))
    -> Maybe [ContinuousExportDescription]
    -> f (Maybe [ContinuousExportDescription]))
-> (Maybe [ContinuousExportDescription]
    -> f (Maybe [ContinuousExportDescription]))
-> DescribeContinuousExportsResponse
-> f DescribeContinuousExportsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ContinuousExportDescription]
  [ContinuousExportDescription]
  [ContinuousExportDescription]
  [ContinuousExportDescription]
-> Iso
     (Maybe [ContinuousExportDescription])
     (Maybe [ContinuousExportDescription])
     (Maybe [ContinuousExportDescription])
     (Maybe [ContinuousExportDescription])
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
  [ContinuousExportDescription]
  [ContinuousExportDescription]
  [ContinuousExportDescription]
  [ContinuousExportDescription]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    DescribeContinuousExportsResponse