{-# 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.Glue.ListMLTransforms
-- 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)
--
-- Retrieves a sortable, filterable list of existing Glue machine learning
-- transforms in this Amazon Web Services account, or the resources with
-- the specified tag. This operation takes the optional @Tags@ field, which
-- you can use as a filter of the responses so that tagged resources can be
-- retrieved as a group. If you choose to use tag filtering, only resources
-- with the tags are retrieved.
module Amazonka.Glue.ListMLTransforms
  ( -- * Creating a Request
    ListMLTransforms (..),
    newListMLTransforms,

    -- * Request Lenses
    listMLTransforms_nextToken,
    listMLTransforms_sort,
    listMLTransforms_filter,
    listMLTransforms_maxResults,
    listMLTransforms_tags,

    -- * Destructuring the Response
    ListMLTransformsResponse (..),
    newListMLTransformsResponse,

    -- * Response Lenses
    listMLTransformsResponse_nextToken,
    listMLTransformsResponse_httpStatus,
    listMLTransformsResponse_transformIds,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.Glue.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:/ 'newListMLTransforms' smart constructor.
data ListMLTransforms = ListMLTransforms'
  { -- | A continuation token, if this is a continuation request.
    ListMLTransforms -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | A @TransformSortCriteria@ used to sort the machine learning transforms.
    ListMLTransforms -> Maybe TransformSortCriteria
sort :: Prelude.Maybe TransformSortCriteria,
    -- | A @TransformFilterCriteria@ used to filter the machine learning
    -- transforms.
    ListMLTransforms -> Maybe TransformFilterCriteria
filter' :: Prelude.Maybe TransformFilterCriteria,
    -- | The maximum size of a list to return.
    ListMLTransforms -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | Specifies to return only these tagged resources.
    ListMLTransforms -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
  }
  deriving (ListMLTransforms -> ListMLTransforms -> Bool
(ListMLTransforms -> ListMLTransforms -> Bool)
-> (ListMLTransforms -> ListMLTransforms -> Bool)
-> Eq ListMLTransforms
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListMLTransforms -> ListMLTransforms -> Bool
$c/= :: ListMLTransforms -> ListMLTransforms -> Bool
== :: ListMLTransforms -> ListMLTransforms -> Bool
$c== :: ListMLTransforms -> ListMLTransforms -> Bool
Prelude.Eq, ReadPrec [ListMLTransforms]
ReadPrec ListMLTransforms
Int -> ReadS ListMLTransforms
ReadS [ListMLTransforms]
(Int -> ReadS ListMLTransforms)
-> ReadS [ListMLTransforms]
-> ReadPrec ListMLTransforms
-> ReadPrec [ListMLTransforms]
-> Read ListMLTransforms
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListMLTransforms]
$creadListPrec :: ReadPrec [ListMLTransforms]
readPrec :: ReadPrec ListMLTransforms
$creadPrec :: ReadPrec ListMLTransforms
readList :: ReadS [ListMLTransforms]
$creadList :: ReadS [ListMLTransforms]
readsPrec :: Int -> ReadS ListMLTransforms
$creadsPrec :: Int -> ReadS ListMLTransforms
Prelude.Read, Int -> ListMLTransforms -> ShowS
[ListMLTransforms] -> ShowS
ListMLTransforms -> String
(Int -> ListMLTransforms -> ShowS)
-> (ListMLTransforms -> String)
-> ([ListMLTransforms] -> ShowS)
-> Show ListMLTransforms
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListMLTransforms] -> ShowS
$cshowList :: [ListMLTransforms] -> ShowS
show :: ListMLTransforms -> String
$cshow :: ListMLTransforms -> String
showsPrec :: Int -> ListMLTransforms -> ShowS
$cshowsPrec :: Int -> ListMLTransforms -> ShowS
Prelude.Show, (forall x. ListMLTransforms -> Rep ListMLTransforms x)
-> (forall x. Rep ListMLTransforms x -> ListMLTransforms)
-> Generic ListMLTransforms
forall x. Rep ListMLTransforms x -> ListMLTransforms
forall x. ListMLTransforms -> Rep ListMLTransforms x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListMLTransforms x -> ListMLTransforms
$cfrom :: forall x. ListMLTransforms -> Rep ListMLTransforms x
Prelude.Generic)

-- |
-- Create a value of 'ListMLTransforms' 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', 'listMLTransforms_nextToken' - A continuation token, if this is a continuation request.
--
-- 'sort', 'listMLTransforms_sort' - A @TransformSortCriteria@ used to sort the machine learning transforms.
--
-- 'filter'', 'listMLTransforms_filter' - A @TransformFilterCriteria@ used to filter the machine learning
-- transforms.
--
-- 'maxResults', 'listMLTransforms_maxResults' - The maximum size of a list to return.
--
-- 'tags', 'listMLTransforms_tags' - Specifies to return only these tagged resources.
newListMLTransforms ::
  ListMLTransforms
newListMLTransforms :: ListMLTransforms
newListMLTransforms =
  ListMLTransforms' :: Maybe Text
-> Maybe TransformSortCriteria
-> Maybe TransformFilterCriteria
-> Maybe Natural
-> Maybe (HashMap Text Text)
-> ListMLTransforms
ListMLTransforms'
    { $sel:nextToken:ListMLTransforms' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:sort:ListMLTransforms' :: Maybe TransformSortCriteria
sort = Maybe TransformSortCriteria
forall a. Maybe a
Prelude.Nothing,
      $sel:filter':ListMLTransforms' :: Maybe TransformFilterCriteria
filter' = Maybe TransformFilterCriteria
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListMLTransforms' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:ListMLTransforms' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing
    }

-- | A continuation token, if this is a continuation request.
listMLTransforms_nextToken :: Lens.Lens' ListMLTransforms (Prelude.Maybe Prelude.Text)
listMLTransforms_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListMLTransforms -> f ListMLTransforms
listMLTransforms_nextToken = (ListMLTransforms -> Maybe Text)
-> (ListMLTransforms -> Maybe Text -> ListMLTransforms)
-> Lens ListMLTransforms ListMLTransforms (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMLTransforms' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListMLTransforms' :: ListMLTransforms -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListMLTransforms
s@ListMLTransforms' {} Maybe Text
a -> ListMLTransforms
s {$sel:nextToken:ListMLTransforms' :: Maybe Text
nextToken = Maybe Text
a} :: ListMLTransforms)

-- | A @TransformSortCriteria@ used to sort the machine learning transforms.
listMLTransforms_sort :: Lens.Lens' ListMLTransforms (Prelude.Maybe TransformSortCriteria)
listMLTransforms_sort :: (Maybe TransformSortCriteria -> f (Maybe TransformSortCriteria))
-> ListMLTransforms -> f ListMLTransforms
listMLTransforms_sort = (ListMLTransforms -> Maybe TransformSortCriteria)
-> (ListMLTransforms
    -> Maybe TransformSortCriteria -> ListMLTransforms)
-> Lens
     ListMLTransforms
     ListMLTransforms
     (Maybe TransformSortCriteria)
     (Maybe TransformSortCriteria)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMLTransforms' {Maybe TransformSortCriteria
sort :: Maybe TransformSortCriteria
$sel:sort:ListMLTransforms' :: ListMLTransforms -> Maybe TransformSortCriteria
sort} -> Maybe TransformSortCriteria
sort) (\s :: ListMLTransforms
s@ListMLTransforms' {} Maybe TransformSortCriteria
a -> ListMLTransforms
s {$sel:sort:ListMLTransforms' :: Maybe TransformSortCriteria
sort = Maybe TransformSortCriteria
a} :: ListMLTransforms)

-- | A @TransformFilterCriteria@ used to filter the machine learning
-- transforms.
listMLTransforms_filter :: Lens.Lens' ListMLTransforms (Prelude.Maybe TransformFilterCriteria)
listMLTransforms_filter :: (Maybe TransformFilterCriteria
 -> f (Maybe TransformFilterCriteria))
-> ListMLTransforms -> f ListMLTransforms
listMLTransforms_filter = (ListMLTransforms -> Maybe TransformFilterCriteria)
-> (ListMLTransforms
    -> Maybe TransformFilterCriteria -> ListMLTransforms)
-> Lens
     ListMLTransforms
     ListMLTransforms
     (Maybe TransformFilterCriteria)
     (Maybe TransformFilterCriteria)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMLTransforms' {Maybe TransformFilterCriteria
filter' :: Maybe TransformFilterCriteria
$sel:filter':ListMLTransforms' :: ListMLTransforms -> Maybe TransformFilterCriteria
filter'} -> Maybe TransformFilterCriteria
filter') (\s :: ListMLTransforms
s@ListMLTransforms' {} Maybe TransformFilterCriteria
a -> ListMLTransforms
s {$sel:filter':ListMLTransforms' :: Maybe TransformFilterCriteria
filter' = Maybe TransformFilterCriteria
a} :: ListMLTransforms)

-- | The maximum size of a list to return.
listMLTransforms_maxResults :: Lens.Lens' ListMLTransforms (Prelude.Maybe Prelude.Natural)
listMLTransforms_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListMLTransforms -> f ListMLTransforms
listMLTransforms_maxResults = (ListMLTransforms -> Maybe Natural)
-> (ListMLTransforms -> Maybe Natural -> ListMLTransforms)
-> Lens
     ListMLTransforms ListMLTransforms (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMLTransforms' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListMLTransforms' :: ListMLTransforms -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListMLTransforms
s@ListMLTransforms' {} Maybe Natural
a -> ListMLTransforms
s {$sel:maxResults:ListMLTransforms' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListMLTransforms)

-- | Specifies to return only these tagged resources.
listMLTransforms_tags :: Lens.Lens' ListMLTransforms (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
listMLTransforms_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ListMLTransforms -> f ListMLTransforms
listMLTransforms_tags = (ListMLTransforms -> Maybe (HashMap Text Text))
-> (ListMLTransforms
    -> Maybe (HashMap Text Text) -> ListMLTransforms)
-> Lens
     ListMLTransforms
     ListMLTransforms
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMLTransforms' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:ListMLTransforms' :: ListMLTransforms -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: ListMLTransforms
s@ListMLTransforms' {} Maybe (HashMap Text Text)
a -> ListMLTransforms
s {$sel:tags:ListMLTransforms' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: ListMLTransforms) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> ListMLTransforms -> f ListMLTransforms)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ListMLTransforms
-> f ListMLTransforms
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text 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
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.Hashable ListMLTransforms

instance Prelude.NFData ListMLTransforms

instance Core.ToHeaders ListMLTransforms where
  toHeaders :: ListMLTransforms -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListMLTransforms -> 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
"AWSGlue.ListMLTransforms" :: 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 ListMLTransforms where
  toJSON :: ListMLTransforms -> Value
toJSON ListMLTransforms' {Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
Maybe TransformSortCriteria
Maybe TransformFilterCriteria
tags :: Maybe (HashMap Text Text)
maxResults :: Maybe Natural
filter' :: Maybe TransformFilterCriteria
sort :: Maybe TransformSortCriteria
nextToken :: Maybe Text
$sel:tags:ListMLTransforms' :: ListMLTransforms -> Maybe (HashMap Text Text)
$sel:maxResults:ListMLTransforms' :: ListMLTransforms -> Maybe Natural
$sel:filter':ListMLTransforms' :: ListMLTransforms -> Maybe TransformFilterCriteria
$sel:sort:ListMLTransforms' :: ListMLTransforms -> Maybe TransformSortCriteria
$sel:nextToken:ListMLTransforms' :: ListMLTransforms -> 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
"Sort" Text -> TransformSortCriteria -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (TransformSortCriteria -> Pair)
-> Maybe TransformSortCriteria -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TransformSortCriteria
sort,
            (Text
"Filter" Text -> TransformFilterCriteria -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (TransformFilterCriteria -> Pair)
-> Maybe TransformFilterCriteria -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TransformFilterCriteria
filter',
            (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,
            (Text
"Tags" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags
          ]
      )

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

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

-- | /See:/ 'newListMLTransformsResponse' smart constructor.
data ListMLTransformsResponse = ListMLTransformsResponse'
  { -- | A continuation token, if the returned list does not contain the last
    -- metric available.
    ListMLTransformsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListMLTransformsResponse -> Int
httpStatus :: Prelude.Int,
    -- | The identifiers of all the machine learning transforms in the account,
    -- or the machine learning transforms with the specified tags.
    ListMLTransformsResponse -> [Text]
transformIds :: [Prelude.Text]
  }
  deriving (ListMLTransformsResponse -> ListMLTransformsResponse -> Bool
(ListMLTransformsResponse -> ListMLTransformsResponse -> Bool)
-> (ListMLTransformsResponse -> ListMLTransformsResponse -> Bool)
-> Eq ListMLTransformsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListMLTransformsResponse -> ListMLTransformsResponse -> Bool
$c/= :: ListMLTransformsResponse -> ListMLTransformsResponse -> Bool
== :: ListMLTransformsResponse -> ListMLTransformsResponse -> Bool
$c== :: ListMLTransformsResponse -> ListMLTransformsResponse -> Bool
Prelude.Eq, ReadPrec [ListMLTransformsResponse]
ReadPrec ListMLTransformsResponse
Int -> ReadS ListMLTransformsResponse
ReadS [ListMLTransformsResponse]
(Int -> ReadS ListMLTransformsResponse)
-> ReadS [ListMLTransformsResponse]
-> ReadPrec ListMLTransformsResponse
-> ReadPrec [ListMLTransformsResponse]
-> Read ListMLTransformsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListMLTransformsResponse]
$creadListPrec :: ReadPrec [ListMLTransformsResponse]
readPrec :: ReadPrec ListMLTransformsResponse
$creadPrec :: ReadPrec ListMLTransformsResponse
readList :: ReadS [ListMLTransformsResponse]
$creadList :: ReadS [ListMLTransformsResponse]
readsPrec :: Int -> ReadS ListMLTransformsResponse
$creadsPrec :: Int -> ReadS ListMLTransformsResponse
Prelude.Read, Int -> ListMLTransformsResponse -> ShowS
[ListMLTransformsResponse] -> ShowS
ListMLTransformsResponse -> String
(Int -> ListMLTransformsResponse -> ShowS)
-> (ListMLTransformsResponse -> String)
-> ([ListMLTransformsResponse] -> ShowS)
-> Show ListMLTransformsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListMLTransformsResponse] -> ShowS
$cshowList :: [ListMLTransformsResponse] -> ShowS
show :: ListMLTransformsResponse -> String
$cshow :: ListMLTransformsResponse -> String
showsPrec :: Int -> ListMLTransformsResponse -> ShowS
$cshowsPrec :: Int -> ListMLTransformsResponse -> ShowS
Prelude.Show, (forall x.
 ListMLTransformsResponse -> Rep ListMLTransformsResponse x)
-> (forall x.
    Rep ListMLTransformsResponse x -> ListMLTransformsResponse)
-> Generic ListMLTransformsResponse
forall x.
Rep ListMLTransformsResponse x -> ListMLTransformsResponse
forall x.
ListMLTransformsResponse -> Rep ListMLTransformsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListMLTransformsResponse x -> ListMLTransformsResponse
$cfrom :: forall x.
ListMLTransformsResponse -> Rep ListMLTransformsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListMLTransformsResponse' 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', 'listMLTransformsResponse_nextToken' - A continuation token, if the returned list does not contain the last
-- metric available.
--
-- 'httpStatus', 'listMLTransformsResponse_httpStatus' - The response's http status code.
--
-- 'transformIds', 'listMLTransformsResponse_transformIds' - The identifiers of all the machine learning transforms in the account,
-- or the machine learning transforms with the specified tags.
newListMLTransformsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListMLTransformsResponse
newListMLTransformsResponse :: Int -> ListMLTransformsResponse
newListMLTransformsResponse Int
pHttpStatus_ =
  ListMLTransformsResponse' :: Maybe Text -> Int -> [Text] -> ListMLTransformsResponse
ListMLTransformsResponse'
    { $sel:nextToken:ListMLTransformsResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListMLTransformsResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:transformIds:ListMLTransformsResponse' :: [Text]
transformIds = [Text]
forall a. Monoid a => a
Prelude.mempty
    }

-- | A continuation token, if the returned list does not contain the last
-- metric available.
listMLTransformsResponse_nextToken :: Lens.Lens' ListMLTransformsResponse (Prelude.Maybe Prelude.Text)
listMLTransformsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListMLTransformsResponse -> f ListMLTransformsResponse
listMLTransformsResponse_nextToken = (ListMLTransformsResponse -> Maybe Text)
-> (ListMLTransformsResponse
    -> Maybe Text -> ListMLTransformsResponse)
-> Lens
     ListMLTransformsResponse
     ListMLTransformsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMLTransformsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListMLTransformsResponse' :: ListMLTransformsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListMLTransformsResponse
s@ListMLTransformsResponse' {} Maybe Text
a -> ListMLTransformsResponse
s {$sel:nextToken:ListMLTransformsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListMLTransformsResponse)

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

-- | The identifiers of all the machine learning transforms in the account,
-- or the machine learning transforms with the specified tags.
listMLTransformsResponse_transformIds :: Lens.Lens' ListMLTransformsResponse [Prelude.Text]
listMLTransformsResponse_transformIds :: ([Text] -> f [Text])
-> ListMLTransformsResponse -> f ListMLTransformsResponse
listMLTransformsResponse_transformIds = (ListMLTransformsResponse -> [Text])
-> (ListMLTransformsResponse -> [Text] -> ListMLTransformsResponse)
-> Lens
     ListMLTransformsResponse ListMLTransformsResponse [Text] [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMLTransformsResponse' {[Text]
transformIds :: [Text]
$sel:transformIds:ListMLTransformsResponse' :: ListMLTransformsResponse -> [Text]
transformIds} -> [Text]
transformIds) (\s :: ListMLTransformsResponse
s@ListMLTransformsResponse' {} [Text]
a -> ListMLTransformsResponse
s {$sel:transformIds:ListMLTransformsResponse' :: [Text]
transformIds = [Text]
a} :: ListMLTransformsResponse) (([Text] -> f [Text])
 -> ListMLTransformsResponse -> f ListMLTransformsResponse)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> ListMLTransformsResponse
-> f ListMLTransformsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Prelude.NFData ListMLTransformsResponse