{-# 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.MachineLearning.DescribeDataSources
-- 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 a list of @DataSource@ that match the search criteria in the
-- request.
--
-- This operation returns paginated results.
module Amazonka.MachineLearning.DescribeDataSources
  ( -- * Creating a Request
    DescribeDataSources (..),
    newDescribeDataSources,

    -- * Request Lenses
    describeDataSources_eq,
    describeDataSources_ge,
    describeDataSources_prefix,
    describeDataSources_gt,
    describeDataSources_ne,
    describeDataSources_nextToken,
    describeDataSources_sortOrder,
    describeDataSources_limit,
    describeDataSources_lt,
    describeDataSources_filterVariable,
    describeDataSources_le,

    -- * Destructuring the Response
    DescribeDataSourcesResponse (..),
    newDescribeDataSourcesResponse,

    -- * Response Lenses
    describeDataSourcesResponse_results,
    describeDataSourcesResponse_nextToken,
    describeDataSourcesResponse_httpStatus,
  )
where

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

-- | /See:/ 'newDescribeDataSources' smart constructor.
data DescribeDataSources = DescribeDataSources'
  { -- | The equal to operator. The @DataSource@ results will have
    -- @FilterVariable@ values that exactly match the value specified with
    -- @EQ@.
    DescribeDataSources -> Maybe Text
eq :: Prelude.Maybe Prelude.Text,
    -- | The greater than or equal to operator. The @DataSource@ results will
    -- have @FilterVariable@ values that are greater than or equal to the value
    -- specified with @GE@.
    DescribeDataSources -> Maybe Text
ge :: Prelude.Maybe Prelude.Text,
    -- | A string that is found at the beginning of a variable, such as @Name@ or
    -- @Id@.
    --
    -- For example, a @DataSource@ could have the @Name@
    -- @2014-09-09-HolidayGiftMailer@. To search for this @DataSource@, select
    -- @Name@ for the @FilterVariable@ and any of the following strings for the
    -- @Prefix@:
    --
    -- -   2014-09
    --
    -- -   2014-09-09
    --
    -- -   2014-09-09-Holiday
    DescribeDataSources -> Maybe Text
prefix :: Prelude.Maybe Prelude.Text,
    -- | The greater than operator. The @DataSource@ results will have
    -- @FilterVariable@ values that are greater than the value specified with
    -- @GT@.
    DescribeDataSources -> Maybe Text
gt :: Prelude.Maybe Prelude.Text,
    -- | The not equal to operator. The @DataSource@ results will have
    -- @FilterVariable@ values not equal to the value specified with @NE@.
    DescribeDataSources -> Maybe Text
ne :: Prelude.Maybe Prelude.Text,
    -- | The ID of the page in the paginated results.
    DescribeDataSources -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | A two-value parameter that determines the sequence of the resulting list
    -- of @DataSource@.
    --
    -- -   @asc@ - Arranges the list in ascending order (A-Z, 0-9).
    --
    -- -   @dsc@ - Arranges the list in descending order (Z-A, 9-0).
    --
    -- Results are sorted by @FilterVariable@.
    DescribeDataSources -> Maybe SortOrder
sortOrder :: Prelude.Maybe SortOrder,
    -- | The maximum number of @DataSource@ to include in the result.
    DescribeDataSources -> Maybe Natural
limit :: Prelude.Maybe Prelude.Natural,
    -- | The less than operator. The @DataSource@ results will have
    -- @FilterVariable@ values that are less than the value specified with
    -- @LT@.
    DescribeDataSources -> Maybe Text
lt :: Prelude.Maybe Prelude.Text,
    -- | Use one of the following variables to filter a list of @DataSource@:
    --
    -- -   @CreatedAt@ - Sets the search criteria to @DataSource@ creation
    --     dates.
    --
    -- -   @Status@ - Sets the search criteria to @DataSource@ statuses.
    --
    -- -   @Name@ - Sets the search criteria to the contents of @DataSource@
    --     @Name@.
    --
    -- -   @DataUri@ - Sets the search criteria to the URI of data files used
    --     to create the @DataSource@. The URI can identify either a file or an
    --     Amazon Simple Storage Service (Amazon S3) bucket or directory.
    --
    -- -   @IAMUser@ - Sets the search criteria to the user account that
    --     invoked the @DataSource@ creation.
    DescribeDataSources -> Maybe DataSourceFilterVariable
filterVariable :: Prelude.Maybe DataSourceFilterVariable,
    -- | The less than or equal to operator. The @DataSource@ results will have
    -- @FilterVariable@ values that are less than or equal to the value
    -- specified with @LE@.
    DescribeDataSources -> Maybe Text
le :: Prelude.Maybe Prelude.Text
  }
  deriving (DescribeDataSources -> DescribeDataSources -> Bool
(DescribeDataSources -> DescribeDataSources -> Bool)
-> (DescribeDataSources -> DescribeDataSources -> Bool)
-> Eq DescribeDataSources
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDataSources -> DescribeDataSources -> Bool
$c/= :: DescribeDataSources -> DescribeDataSources -> Bool
== :: DescribeDataSources -> DescribeDataSources -> Bool
$c== :: DescribeDataSources -> DescribeDataSources -> Bool
Prelude.Eq, ReadPrec [DescribeDataSources]
ReadPrec DescribeDataSources
Int -> ReadS DescribeDataSources
ReadS [DescribeDataSources]
(Int -> ReadS DescribeDataSources)
-> ReadS [DescribeDataSources]
-> ReadPrec DescribeDataSources
-> ReadPrec [DescribeDataSources]
-> Read DescribeDataSources
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDataSources]
$creadListPrec :: ReadPrec [DescribeDataSources]
readPrec :: ReadPrec DescribeDataSources
$creadPrec :: ReadPrec DescribeDataSources
readList :: ReadS [DescribeDataSources]
$creadList :: ReadS [DescribeDataSources]
readsPrec :: Int -> ReadS DescribeDataSources
$creadsPrec :: Int -> ReadS DescribeDataSources
Prelude.Read, Int -> DescribeDataSources -> ShowS
[DescribeDataSources] -> ShowS
DescribeDataSources -> String
(Int -> DescribeDataSources -> ShowS)
-> (DescribeDataSources -> String)
-> ([DescribeDataSources] -> ShowS)
-> Show DescribeDataSources
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDataSources] -> ShowS
$cshowList :: [DescribeDataSources] -> ShowS
show :: DescribeDataSources -> String
$cshow :: DescribeDataSources -> String
showsPrec :: Int -> DescribeDataSources -> ShowS
$cshowsPrec :: Int -> DescribeDataSources -> ShowS
Prelude.Show, (forall x. DescribeDataSources -> Rep DescribeDataSources x)
-> (forall x. Rep DescribeDataSources x -> DescribeDataSources)
-> Generic DescribeDataSources
forall x. Rep DescribeDataSources x -> DescribeDataSources
forall x. DescribeDataSources -> Rep DescribeDataSources x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeDataSources x -> DescribeDataSources
$cfrom :: forall x. DescribeDataSources -> Rep DescribeDataSources x
Prelude.Generic)

-- |
-- Create a value of 'DescribeDataSources' 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:
--
-- 'eq', 'describeDataSources_eq' - The equal to operator. The @DataSource@ results will have
-- @FilterVariable@ values that exactly match the value specified with
-- @EQ@.
--
-- 'ge', 'describeDataSources_ge' - The greater than or equal to operator. The @DataSource@ results will
-- have @FilterVariable@ values that are greater than or equal to the value
-- specified with @GE@.
--
-- 'prefix', 'describeDataSources_prefix' - A string that is found at the beginning of a variable, such as @Name@ or
-- @Id@.
--
-- For example, a @DataSource@ could have the @Name@
-- @2014-09-09-HolidayGiftMailer@. To search for this @DataSource@, select
-- @Name@ for the @FilterVariable@ and any of the following strings for the
-- @Prefix@:
--
-- -   2014-09
--
-- -   2014-09-09
--
-- -   2014-09-09-Holiday
--
-- 'gt', 'describeDataSources_gt' - The greater than operator. The @DataSource@ results will have
-- @FilterVariable@ values that are greater than the value specified with
-- @GT@.
--
-- 'ne', 'describeDataSources_ne' - The not equal to operator. The @DataSource@ results will have
-- @FilterVariable@ values not equal to the value specified with @NE@.
--
-- 'nextToken', 'describeDataSources_nextToken' - The ID of the page in the paginated results.
--
-- 'sortOrder', 'describeDataSources_sortOrder' - A two-value parameter that determines the sequence of the resulting list
-- of @DataSource@.
--
-- -   @asc@ - Arranges the list in ascending order (A-Z, 0-9).
--
-- -   @dsc@ - Arranges the list in descending order (Z-A, 9-0).
--
-- Results are sorted by @FilterVariable@.
--
-- 'limit', 'describeDataSources_limit' - The maximum number of @DataSource@ to include in the result.
--
-- 'lt', 'describeDataSources_lt' - The less than operator. The @DataSource@ results will have
-- @FilterVariable@ values that are less than the value specified with
-- @LT@.
--
-- 'filterVariable', 'describeDataSources_filterVariable' - Use one of the following variables to filter a list of @DataSource@:
--
-- -   @CreatedAt@ - Sets the search criteria to @DataSource@ creation
--     dates.
--
-- -   @Status@ - Sets the search criteria to @DataSource@ statuses.
--
-- -   @Name@ - Sets the search criteria to the contents of @DataSource@
--     @Name@.
--
-- -   @DataUri@ - Sets the search criteria to the URI of data files used
--     to create the @DataSource@. The URI can identify either a file or an
--     Amazon Simple Storage Service (Amazon S3) bucket or directory.
--
-- -   @IAMUser@ - Sets the search criteria to the user account that
--     invoked the @DataSource@ creation.
--
-- 'le', 'describeDataSources_le' - The less than or equal to operator. The @DataSource@ results will have
-- @FilterVariable@ values that are less than or equal to the value
-- specified with @LE@.
newDescribeDataSources ::
  DescribeDataSources
newDescribeDataSources :: DescribeDataSources
newDescribeDataSources =
  DescribeDataSources' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe SortOrder
-> Maybe Natural
-> Maybe Text
-> Maybe DataSourceFilterVariable
-> Maybe Text
-> DescribeDataSources
DescribeDataSources'
    { $sel:eq:DescribeDataSources' :: Maybe Text
eq = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:ge:DescribeDataSources' :: Maybe Text
ge = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:prefix:DescribeDataSources' :: Maybe Text
prefix = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:gt:DescribeDataSources' :: Maybe Text
gt = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:ne:DescribeDataSources' :: Maybe Text
ne = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeDataSources' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:sortOrder:DescribeDataSources' :: Maybe SortOrder
sortOrder = Maybe SortOrder
forall a. Maybe a
Prelude.Nothing,
      $sel:limit:DescribeDataSources' :: Maybe Natural
limit = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:lt:DescribeDataSources' :: Maybe Text
lt = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:filterVariable:DescribeDataSources' :: Maybe DataSourceFilterVariable
filterVariable = Maybe DataSourceFilterVariable
forall a. Maybe a
Prelude.Nothing,
      $sel:le:DescribeDataSources' :: Maybe Text
le = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The equal to operator. The @DataSource@ results will have
-- @FilterVariable@ values that exactly match the value specified with
-- @EQ@.
describeDataSources_eq :: Lens.Lens' DescribeDataSources (Prelude.Maybe Prelude.Text)
describeDataSources_eq :: (Maybe Text -> f (Maybe Text))
-> DescribeDataSources -> f DescribeDataSources
describeDataSources_eq = (DescribeDataSources -> Maybe Text)
-> (DescribeDataSources -> Maybe Text -> DescribeDataSources)
-> Lens
     DescribeDataSources DescribeDataSources (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDataSources' {Maybe Text
eq :: Maybe Text
$sel:eq:DescribeDataSources' :: DescribeDataSources -> Maybe Text
eq} -> Maybe Text
eq) (\s :: DescribeDataSources
s@DescribeDataSources' {} Maybe Text
a -> DescribeDataSources
s {$sel:eq:DescribeDataSources' :: Maybe Text
eq = Maybe Text
a} :: DescribeDataSources)

-- | The greater than or equal to operator. The @DataSource@ results will
-- have @FilterVariable@ values that are greater than or equal to the value
-- specified with @GE@.
describeDataSources_ge :: Lens.Lens' DescribeDataSources (Prelude.Maybe Prelude.Text)
describeDataSources_ge :: (Maybe Text -> f (Maybe Text))
-> DescribeDataSources -> f DescribeDataSources
describeDataSources_ge = (DescribeDataSources -> Maybe Text)
-> (DescribeDataSources -> Maybe Text -> DescribeDataSources)
-> Lens
     DescribeDataSources DescribeDataSources (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDataSources' {Maybe Text
ge :: Maybe Text
$sel:ge:DescribeDataSources' :: DescribeDataSources -> Maybe Text
ge} -> Maybe Text
ge) (\s :: DescribeDataSources
s@DescribeDataSources' {} Maybe Text
a -> DescribeDataSources
s {$sel:ge:DescribeDataSources' :: Maybe Text
ge = Maybe Text
a} :: DescribeDataSources)

-- | A string that is found at the beginning of a variable, such as @Name@ or
-- @Id@.
--
-- For example, a @DataSource@ could have the @Name@
-- @2014-09-09-HolidayGiftMailer@. To search for this @DataSource@, select
-- @Name@ for the @FilterVariable@ and any of the following strings for the
-- @Prefix@:
--
-- -   2014-09
--
-- -   2014-09-09
--
-- -   2014-09-09-Holiday
describeDataSources_prefix :: Lens.Lens' DescribeDataSources (Prelude.Maybe Prelude.Text)
describeDataSources_prefix :: (Maybe Text -> f (Maybe Text))
-> DescribeDataSources -> f DescribeDataSources
describeDataSources_prefix = (DescribeDataSources -> Maybe Text)
-> (DescribeDataSources -> Maybe Text -> DescribeDataSources)
-> Lens
     DescribeDataSources DescribeDataSources (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDataSources' {Maybe Text
prefix :: Maybe Text
$sel:prefix:DescribeDataSources' :: DescribeDataSources -> Maybe Text
prefix} -> Maybe Text
prefix) (\s :: DescribeDataSources
s@DescribeDataSources' {} Maybe Text
a -> DescribeDataSources
s {$sel:prefix:DescribeDataSources' :: Maybe Text
prefix = Maybe Text
a} :: DescribeDataSources)

-- | The greater than operator. The @DataSource@ results will have
-- @FilterVariable@ values that are greater than the value specified with
-- @GT@.
describeDataSources_gt :: Lens.Lens' DescribeDataSources (Prelude.Maybe Prelude.Text)
describeDataSources_gt :: (Maybe Text -> f (Maybe Text))
-> DescribeDataSources -> f DescribeDataSources
describeDataSources_gt = (DescribeDataSources -> Maybe Text)
-> (DescribeDataSources -> Maybe Text -> DescribeDataSources)
-> Lens
     DescribeDataSources DescribeDataSources (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDataSources' {Maybe Text
gt :: Maybe Text
$sel:gt:DescribeDataSources' :: DescribeDataSources -> Maybe Text
gt} -> Maybe Text
gt) (\s :: DescribeDataSources
s@DescribeDataSources' {} Maybe Text
a -> DescribeDataSources
s {$sel:gt:DescribeDataSources' :: Maybe Text
gt = Maybe Text
a} :: DescribeDataSources)

-- | The not equal to operator. The @DataSource@ results will have
-- @FilterVariable@ values not equal to the value specified with @NE@.
describeDataSources_ne :: Lens.Lens' DescribeDataSources (Prelude.Maybe Prelude.Text)
describeDataSources_ne :: (Maybe Text -> f (Maybe Text))
-> DescribeDataSources -> f DescribeDataSources
describeDataSources_ne = (DescribeDataSources -> Maybe Text)
-> (DescribeDataSources -> Maybe Text -> DescribeDataSources)
-> Lens
     DescribeDataSources DescribeDataSources (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDataSources' {Maybe Text
ne :: Maybe Text
$sel:ne:DescribeDataSources' :: DescribeDataSources -> Maybe Text
ne} -> Maybe Text
ne) (\s :: DescribeDataSources
s@DescribeDataSources' {} Maybe Text
a -> DescribeDataSources
s {$sel:ne:DescribeDataSources' :: Maybe Text
ne = Maybe Text
a} :: DescribeDataSources)

-- | The ID of the page in the paginated results.
describeDataSources_nextToken :: Lens.Lens' DescribeDataSources (Prelude.Maybe Prelude.Text)
describeDataSources_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeDataSources -> f DescribeDataSources
describeDataSources_nextToken = (DescribeDataSources -> Maybe Text)
-> (DescribeDataSources -> Maybe Text -> DescribeDataSources)
-> Lens
     DescribeDataSources DescribeDataSources (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDataSources' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeDataSources' :: DescribeDataSources -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeDataSources
s@DescribeDataSources' {} Maybe Text
a -> DescribeDataSources
s {$sel:nextToken:DescribeDataSources' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeDataSources)

-- | A two-value parameter that determines the sequence of the resulting list
-- of @DataSource@.
--
-- -   @asc@ - Arranges the list in ascending order (A-Z, 0-9).
--
-- -   @dsc@ - Arranges the list in descending order (Z-A, 9-0).
--
-- Results are sorted by @FilterVariable@.
describeDataSources_sortOrder :: Lens.Lens' DescribeDataSources (Prelude.Maybe SortOrder)
describeDataSources_sortOrder :: (Maybe SortOrder -> f (Maybe SortOrder))
-> DescribeDataSources -> f DescribeDataSources
describeDataSources_sortOrder = (DescribeDataSources -> Maybe SortOrder)
-> (DescribeDataSources -> Maybe SortOrder -> DescribeDataSources)
-> Lens
     DescribeDataSources
     DescribeDataSources
     (Maybe SortOrder)
     (Maybe SortOrder)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDataSources' {Maybe SortOrder
sortOrder :: Maybe SortOrder
$sel:sortOrder:DescribeDataSources' :: DescribeDataSources -> Maybe SortOrder
sortOrder} -> Maybe SortOrder
sortOrder) (\s :: DescribeDataSources
s@DescribeDataSources' {} Maybe SortOrder
a -> DescribeDataSources
s {$sel:sortOrder:DescribeDataSources' :: Maybe SortOrder
sortOrder = Maybe SortOrder
a} :: DescribeDataSources)

-- | The maximum number of @DataSource@ to include in the result.
describeDataSources_limit :: Lens.Lens' DescribeDataSources (Prelude.Maybe Prelude.Natural)
describeDataSources_limit :: (Maybe Natural -> f (Maybe Natural))
-> DescribeDataSources -> f DescribeDataSources
describeDataSources_limit = (DescribeDataSources -> Maybe Natural)
-> (DescribeDataSources -> Maybe Natural -> DescribeDataSources)
-> Lens
     DescribeDataSources
     DescribeDataSources
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDataSources' {Maybe Natural
limit :: Maybe Natural
$sel:limit:DescribeDataSources' :: DescribeDataSources -> Maybe Natural
limit} -> Maybe Natural
limit) (\s :: DescribeDataSources
s@DescribeDataSources' {} Maybe Natural
a -> DescribeDataSources
s {$sel:limit:DescribeDataSources' :: Maybe Natural
limit = Maybe Natural
a} :: DescribeDataSources)

-- | The less than operator. The @DataSource@ results will have
-- @FilterVariable@ values that are less than the value specified with
-- @LT@.
describeDataSources_lt :: Lens.Lens' DescribeDataSources (Prelude.Maybe Prelude.Text)
describeDataSources_lt :: (Maybe Text -> f (Maybe Text))
-> DescribeDataSources -> f DescribeDataSources
describeDataSources_lt = (DescribeDataSources -> Maybe Text)
-> (DescribeDataSources -> Maybe Text -> DescribeDataSources)
-> Lens
     DescribeDataSources DescribeDataSources (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDataSources' {Maybe Text
lt :: Maybe Text
$sel:lt:DescribeDataSources' :: DescribeDataSources -> Maybe Text
lt} -> Maybe Text
lt) (\s :: DescribeDataSources
s@DescribeDataSources' {} Maybe Text
a -> DescribeDataSources
s {$sel:lt:DescribeDataSources' :: Maybe Text
lt = Maybe Text
a} :: DescribeDataSources)

-- | Use one of the following variables to filter a list of @DataSource@:
--
-- -   @CreatedAt@ - Sets the search criteria to @DataSource@ creation
--     dates.
--
-- -   @Status@ - Sets the search criteria to @DataSource@ statuses.
--
-- -   @Name@ - Sets the search criteria to the contents of @DataSource@
--     @Name@.
--
-- -   @DataUri@ - Sets the search criteria to the URI of data files used
--     to create the @DataSource@. The URI can identify either a file or an
--     Amazon Simple Storage Service (Amazon S3) bucket or directory.
--
-- -   @IAMUser@ - Sets the search criteria to the user account that
--     invoked the @DataSource@ creation.
describeDataSources_filterVariable :: Lens.Lens' DescribeDataSources (Prelude.Maybe DataSourceFilterVariable)
describeDataSources_filterVariable :: (Maybe DataSourceFilterVariable
 -> f (Maybe DataSourceFilterVariable))
-> DescribeDataSources -> f DescribeDataSources
describeDataSources_filterVariable = (DescribeDataSources -> Maybe DataSourceFilterVariable)
-> (DescribeDataSources
    -> Maybe DataSourceFilterVariable -> DescribeDataSources)
-> Lens
     DescribeDataSources
     DescribeDataSources
     (Maybe DataSourceFilterVariable)
     (Maybe DataSourceFilterVariable)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDataSources' {Maybe DataSourceFilterVariable
filterVariable :: Maybe DataSourceFilterVariable
$sel:filterVariable:DescribeDataSources' :: DescribeDataSources -> Maybe DataSourceFilterVariable
filterVariable} -> Maybe DataSourceFilterVariable
filterVariable) (\s :: DescribeDataSources
s@DescribeDataSources' {} Maybe DataSourceFilterVariable
a -> DescribeDataSources
s {$sel:filterVariable:DescribeDataSources' :: Maybe DataSourceFilterVariable
filterVariable = Maybe DataSourceFilterVariable
a} :: DescribeDataSources)

-- | The less than or equal to operator. The @DataSource@ results will have
-- @FilterVariable@ values that are less than or equal to the value
-- specified with @LE@.
describeDataSources_le :: Lens.Lens' DescribeDataSources (Prelude.Maybe Prelude.Text)
describeDataSources_le :: (Maybe Text -> f (Maybe Text))
-> DescribeDataSources -> f DescribeDataSources
describeDataSources_le = (DescribeDataSources -> Maybe Text)
-> (DescribeDataSources -> Maybe Text -> DescribeDataSources)
-> Lens
     DescribeDataSources DescribeDataSources (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDataSources' {Maybe Text
le :: Maybe Text
$sel:le:DescribeDataSources' :: DescribeDataSources -> Maybe Text
le} -> Maybe Text
le) (\s :: DescribeDataSources
s@DescribeDataSources' {} Maybe Text
a -> DescribeDataSources
s {$sel:le:DescribeDataSources' :: Maybe Text
le = Maybe Text
a} :: DescribeDataSources)

instance Core.AWSPager DescribeDataSources where
  page :: DescribeDataSources
-> AWSResponse DescribeDataSources -> Maybe DescribeDataSources
page DescribeDataSources
rq AWSResponse DescribeDataSources
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeDataSources
DescribeDataSourcesResponse
rs
            DescribeDataSourcesResponse
-> Getting (First Text) DescribeDataSourcesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeDataSourcesResponse
-> Const (First Text) DescribeDataSourcesResponse
Lens' DescribeDataSourcesResponse (Maybe Text)
describeDataSourcesResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> DescribeDataSourcesResponse
 -> Const (First Text) DescribeDataSourcesResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeDataSourcesResponse 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 DescribeDataSources
forall a. Maybe a
Prelude.Nothing
    | Maybe [DataSource] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeDataSources
DescribeDataSourcesResponse
rs
            DescribeDataSourcesResponse
-> Getting
     (First [DataSource]) DescribeDataSourcesResponse [DataSource]
-> Maybe [DataSource]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [DataSource]
 -> Const (First [DataSource]) (Maybe [DataSource]))
-> DescribeDataSourcesResponse
-> Const (First [DataSource]) DescribeDataSourcesResponse
Lens' DescribeDataSourcesResponse (Maybe [DataSource])
describeDataSourcesResponse_results
              ((Maybe [DataSource]
  -> Const (First [DataSource]) (Maybe [DataSource]))
 -> DescribeDataSourcesResponse
 -> Const (First [DataSource]) DescribeDataSourcesResponse)
-> (([DataSource] -> Const (First [DataSource]) [DataSource])
    -> Maybe [DataSource]
    -> Const (First [DataSource]) (Maybe [DataSource]))
-> Getting
     (First [DataSource]) DescribeDataSourcesResponse [DataSource]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DataSource] -> Const (First [DataSource]) [DataSource])
-> Maybe [DataSource]
-> Const (First [DataSource]) (Maybe [DataSource])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe DescribeDataSources
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      DescribeDataSources -> Maybe DescribeDataSources
forall a. a -> Maybe a
Prelude.Just (DescribeDataSources -> Maybe DescribeDataSources)
-> DescribeDataSources -> Maybe DescribeDataSources
forall a b. (a -> b) -> a -> b
Prelude.$
        DescribeDataSources
rq
          DescribeDataSources
-> (DescribeDataSources -> DescribeDataSources)
-> DescribeDataSources
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeDataSources -> Identity DescribeDataSources
Lens
  DescribeDataSources DescribeDataSources (Maybe Text) (Maybe Text)
describeDataSources_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> DescribeDataSources -> Identity DescribeDataSources)
-> Maybe Text -> DescribeDataSources -> DescribeDataSources
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeDataSources
DescribeDataSourcesResponse
rs
          DescribeDataSourcesResponse
-> Getting (First Text) DescribeDataSourcesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeDataSourcesResponse
-> Const (First Text) DescribeDataSourcesResponse
Lens' DescribeDataSourcesResponse (Maybe Text)
describeDataSourcesResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> DescribeDataSourcesResponse
 -> Const (First Text) DescribeDataSourcesResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeDataSourcesResponse 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 DescribeDataSources where
  type
    AWSResponse DescribeDataSources =
      DescribeDataSourcesResponse
  request :: DescribeDataSources -> Request DescribeDataSources
request = Service -> DescribeDataSources -> Request DescribeDataSources
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeDataSources
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeDataSources)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeDataSources))
-> Logger
-> Service
-> Proxy DescribeDataSources
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeDataSources)))
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 [DataSource]
-> Maybe Text -> Int -> DescribeDataSourcesResponse
DescribeDataSourcesResponse'
            (Maybe [DataSource]
 -> Maybe Text -> Int -> DescribeDataSourcesResponse)
-> Either String (Maybe [DataSource])
-> Either String (Maybe Text -> Int -> DescribeDataSourcesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [DataSource]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Results" Either String (Maybe (Maybe [DataSource]))
-> Maybe [DataSource] -> Either String (Maybe [DataSource])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [DataSource]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Maybe Text -> Int -> DescribeDataSourcesResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeDataSourcesResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NextToken")
            Either String (Int -> DescribeDataSourcesResponse)
-> Either String Int -> Either String DescribeDataSourcesResponse
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 DescribeDataSources

instance Prelude.NFData DescribeDataSources

instance Core.ToHeaders DescribeDataSources where
  toHeaders :: DescribeDataSources -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeDataSources -> 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
"AmazonML_20141212.DescribeDataSources" ::
                          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 DescribeDataSources where
  toJSON :: DescribeDataSources -> Value
toJSON DescribeDataSources' {Maybe Natural
Maybe Text
Maybe DataSourceFilterVariable
Maybe SortOrder
le :: Maybe Text
filterVariable :: Maybe DataSourceFilterVariable
lt :: Maybe Text
limit :: Maybe Natural
sortOrder :: Maybe SortOrder
nextToken :: Maybe Text
ne :: Maybe Text
gt :: Maybe Text
prefix :: Maybe Text
ge :: Maybe Text
eq :: Maybe Text
$sel:le:DescribeDataSources' :: DescribeDataSources -> Maybe Text
$sel:filterVariable:DescribeDataSources' :: DescribeDataSources -> Maybe DataSourceFilterVariable
$sel:lt:DescribeDataSources' :: DescribeDataSources -> Maybe Text
$sel:limit:DescribeDataSources' :: DescribeDataSources -> Maybe Natural
$sel:sortOrder:DescribeDataSources' :: DescribeDataSources -> Maybe SortOrder
$sel:nextToken:DescribeDataSources' :: DescribeDataSources -> Maybe Text
$sel:ne:DescribeDataSources' :: DescribeDataSources -> Maybe Text
$sel:gt:DescribeDataSources' :: DescribeDataSources -> Maybe Text
$sel:prefix:DescribeDataSources' :: DescribeDataSources -> Maybe Text
$sel:ge:DescribeDataSources' :: DescribeDataSources -> Maybe Text
$sel:eq:DescribeDataSources' :: DescribeDataSources -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"EQ" 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
eq,
            (Text
"GE" 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
ge,
            (Text
"Prefix" 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
prefix,
            (Text
"GT" 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
gt,
            (Text
"NE" 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
ne,
            (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
"SortOrder" Text -> SortOrder -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (SortOrder -> Pair) -> Maybe SortOrder -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SortOrder
sortOrder,
            (Text
"Limit" 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
limit,
            (Text
"LT" 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
lt,
            (Text
"FilterVariable" Text -> DataSourceFilterVariable -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (DataSourceFilterVariable -> Pair)
-> Maybe DataSourceFilterVariable -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DataSourceFilterVariable
filterVariable,
            (Text
"LE" 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
le
          ]
      )

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

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

-- | Represents the query results from a DescribeDataSources operation. The
-- content is essentially a list of @DataSource@.
--
-- /See:/ 'newDescribeDataSourcesResponse' smart constructor.
data DescribeDataSourcesResponse = DescribeDataSourcesResponse'
  { -- | A list of @DataSource@ that meet the search criteria.
    DescribeDataSourcesResponse -> Maybe [DataSource]
results :: Prelude.Maybe [DataSource],
    -- | An ID of the next page in the paginated results that indicates at least
    -- one more page follows.
    DescribeDataSourcesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeDataSourcesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeDataSourcesResponse -> DescribeDataSourcesResponse -> Bool
(DescribeDataSourcesResponse
 -> DescribeDataSourcesResponse -> Bool)
-> (DescribeDataSourcesResponse
    -> DescribeDataSourcesResponse -> Bool)
-> Eq DescribeDataSourcesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDataSourcesResponse -> DescribeDataSourcesResponse -> Bool
$c/= :: DescribeDataSourcesResponse -> DescribeDataSourcesResponse -> Bool
== :: DescribeDataSourcesResponse -> DescribeDataSourcesResponse -> Bool
$c== :: DescribeDataSourcesResponse -> DescribeDataSourcesResponse -> Bool
Prelude.Eq, ReadPrec [DescribeDataSourcesResponse]
ReadPrec DescribeDataSourcesResponse
Int -> ReadS DescribeDataSourcesResponse
ReadS [DescribeDataSourcesResponse]
(Int -> ReadS DescribeDataSourcesResponse)
-> ReadS [DescribeDataSourcesResponse]
-> ReadPrec DescribeDataSourcesResponse
-> ReadPrec [DescribeDataSourcesResponse]
-> Read DescribeDataSourcesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDataSourcesResponse]
$creadListPrec :: ReadPrec [DescribeDataSourcesResponse]
readPrec :: ReadPrec DescribeDataSourcesResponse
$creadPrec :: ReadPrec DescribeDataSourcesResponse
readList :: ReadS [DescribeDataSourcesResponse]
$creadList :: ReadS [DescribeDataSourcesResponse]
readsPrec :: Int -> ReadS DescribeDataSourcesResponse
$creadsPrec :: Int -> ReadS DescribeDataSourcesResponse
Prelude.Read, Int -> DescribeDataSourcesResponse -> ShowS
[DescribeDataSourcesResponse] -> ShowS
DescribeDataSourcesResponse -> String
(Int -> DescribeDataSourcesResponse -> ShowS)
-> (DescribeDataSourcesResponse -> String)
-> ([DescribeDataSourcesResponse] -> ShowS)
-> Show DescribeDataSourcesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDataSourcesResponse] -> ShowS
$cshowList :: [DescribeDataSourcesResponse] -> ShowS
show :: DescribeDataSourcesResponse -> String
$cshow :: DescribeDataSourcesResponse -> String
showsPrec :: Int -> DescribeDataSourcesResponse -> ShowS
$cshowsPrec :: Int -> DescribeDataSourcesResponse -> ShowS
Prelude.Show, (forall x.
 DescribeDataSourcesResponse -> Rep DescribeDataSourcesResponse x)
-> (forall x.
    Rep DescribeDataSourcesResponse x -> DescribeDataSourcesResponse)
-> Generic DescribeDataSourcesResponse
forall x.
Rep DescribeDataSourcesResponse x -> DescribeDataSourcesResponse
forall x.
DescribeDataSourcesResponse -> Rep DescribeDataSourcesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeDataSourcesResponse x -> DescribeDataSourcesResponse
$cfrom :: forall x.
DescribeDataSourcesResponse -> Rep DescribeDataSourcesResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeDataSourcesResponse' 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:
--
-- 'results', 'describeDataSourcesResponse_results' - A list of @DataSource@ that meet the search criteria.
--
-- 'nextToken', 'describeDataSourcesResponse_nextToken' - An ID of the next page in the paginated results that indicates at least
-- one more page follows.
--
-- 'httpStatus', 'describeDataSourcesResponse_httpStatus' - The response's http status code.
newDescribeDataSourcesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeDataSourcesResponse
newDescribeDataSourcesResponse :: Int -> DescribeDataSourcesResponse
newDescribeDataSourcesResponse Int
pHttpStatus_ =
  DescribeDataSourcesResponse' :: Maybe [DataSource]
-> Maybe Text -> Int -> DescribeDataSourcesResponse
DescribeDataSourcesResponse'
    { $sel:results:DescribeDataSourcesResponse' :: Maybe [DataSource]
results =
        Maybe [DataSource]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeDataSourcesResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeDataSourcesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A list of @DataSource@ that meet the search criteria.
describeDataSourcesResponse_results :: Lens.Lens' DescribeDataSourcesResponse (Prelude.Maybe [DataSource])
describeDataSourcesResponse_results :: (Maybe [DataSource] -> f (Maybe [DataSource]))
-> DescribeDataSourcesResponse -> f DescribeDataSourcesResponse
describeDataSourcesResponse_results = (DescribeDataSourcesResponse -> Maybe [DataSource])
-> (DescribeDataSourcesResponse
    -> Maybe [DataSource] -> DescribeDataSourcesResponse)
-> Lens' DescribeDataSourcesResponse (Maybe [DataSource])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDataSourcesResponse' {Maybe [DataSource]
results :: Maybe [DataSource]
$sel:results:DescribeDataSourcesResponse' :: DescribeDataSourcesResponse -> Maybe [DataSource]
results} -> Maybe [DataSource]
results) (\s :: DescribeDataSourcesResponse
s@DescribeDataSourcesResponse' {} Maybe [DataSource]
a -> DescribeDataSourcesResponse
s {$sel:results:DescribeDataSourcesResponse' :: Maybe [DataSource]
results = Maybe [DataSource]
a} :: DescribeDataSourcesResponse) ((Maybe [DataSource] -> f (Maybe [DataSource]))
 -> DescribeDataSourcesResponse -> f DescribeDataSourcesResponse)
-> ((Maybe [DataSource] -> f (Maybe [DataSource]))
    -> Maybe [DataSource] -> f (Maybe [DataSource]))
-> (Maybe [DataSource] -> f (Maybe [DataSource]))
-> DescribeDataSourcesResponse
-> f DescribeDataSourcesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [DataSource] [DataSource] [DataSource] [DataSource]
-> Iso
     (Maybe [DataSource])
     (Maybe [DataSource])
     (Maybe [DataSource])
     (Maybe [DataSource])
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 [DataSource] [DataSource] [DataSource] [DataSource]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | An ID of the next page in the paginated results that indicates at least
-- one more page follows.
describeDataSourcesResponse_nextToken :: Lens.Lens' DescribeDataSourcesResponse (Prelude.Maybe Prelude.Text)
describeDataSourcesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeDataSourcesResponse -> f DescribeDataSourcesResponse
describeDataSourcesResponse_nextToken = (DescribeDataSourcesResponse -> Maybe Text)
-> (DescribeDataSourcesResponse
    -> Maybe Text -> DescribeDataSourcesResponse)
-> Lens' DescribeDataSourcesResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDataSourcesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeDataSourcesResponse' :: DescribeDataSourcesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeDataSourcesResponse
s@DescribeDataSourcesResponse' {} Maybe Text
a -> DescribeDataSourcesResponse
s {$sel:nextToken:DescribeDataSourcesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeDataSourcesResponse)

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

instance Prelude.NFData DescribeDataSourcesResponse