{-# 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.Forecast.ListExplainabilities
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns a list of Explainability resources created using the
-- CreateExplainability operation. This operation returns a summary for
-- each Explainability. You can filter the list using an array of Filter
-- objects.
--
-- To retrieve the complete set of properties for a particular
-- Explainability resource, use the ARN with the DescribeExplainability
-- operation.
--
-- This operation returns paginated results.
module Amazonka.Forecast.ListExplainabilities
  ( -- * Creating a Request
    ListExplainabilities (..),
    newListExplainabilities,

    -- * Request Lenses
    listExplainabilities_filters,
    listExplainabilities_maxResults,
    listExplainabilities_nextToken,

    -- * Destructuring the Response
    ListExplainabilitiesResponse (..),
    newListExplainabilitiesResponse,

    -- * Response Lenses
    listExplainabilitiesResponse_explainabilities,
    listExplainabilitiesResponse_nextToken,
    listExplainabilitiesResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Forecast.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newListExplainabilities' smart constructor.
data ListExplainabilities = ListExplainabilities'
  { -- | An array of filters. For each filter, provide a condition and a match
    -- statement. The condition is either @IS@ or @IS_NOT@, which specifies
    -- whether to include or exclude the resources that match the statement
    -- from the list. The match statement consists of a key and a value.
    --
    -- __Filter properties__
    --
    -- -   @Condition@ - The condition to apply. Valid values are @IS@ and
    --     @IS_NOT@.
    --
    -- -   @Key@ - The name of the parameter to filter on. Valid values are
    --     @ResourceArn@ and @Status@.
    --
    -- -   @Value@ - The value to match.
    ListExplainabilities -> Maybe [Filter]
filters :: Prelude.Maybe [Filter],
    -- | The number of items returned in the response.
    ListExplainabilities -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | If the result of the previous request was truncated, the response
    -- includes a NextToken. To retrieve the next set of results, use the token
    -- in the next request. Tokens expire after 24 hours.
    ListExplainabilities -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
  }
  deriving (ListExplainabilities -> ListExplainabilities -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListExplainabilities -> ListExplainabilities -> Bool
$c/= :: ListExplainabilities -> ListExplainabilities -> Bool
== :: ListExplainabilities -> ListExplainabilities -> Bool
$c== :: ListExplainabilities -> ListExplainabilities -> Bool
Prelude.Eq, ReadPrec [ListExplainabilities]
ReadPrec ListExplainabilities
Int -> ReadS ListExplainabilities
ReadS [ListExplainabilities]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListExplainabilities]
$creadListPrec :: ReadPrec [ListExplainabilities]
readPrec :: ReadPrec ListExplainabilities
$creadPrec :: ReadPrec ListExplainabilities
readList :: ReadS [ListExplainabilities]
$creadList :: ReadS [ListExplainabilities]
readsPrec :: Int -> ReadS ListExplainabilities
$creadsPrec :: Int -> ReadS ListExplainabilities
Prelude.Read, Int -> ListExplainabilities -> ShowS
[ListExplainabilities] -> ShowS
ListExplainabilities -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListExplainabilities] -> ShowS
$cshowList :: [ListExplainabilities] -> ShowS
show :: ListExplainabilities -> String
$cshow :: ListExplainabilities -> String
showsPrec :: Int -> ListExplainabilities -> ShowS
$cshowsPrec :: Int -> ListExplainabilities -> ShowS
Prelude.Show, forall x. Rep ListExplainabilities x -> ListExplainabilities
forall x. ListExplainabilities -> Rep ListExplainabilities x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListExplainabilities x -> ListExplainabilities
$cfrom :: forall x. ListExplainabilities -> Rep ListExplainabilities x
Prelude.Generic)

-- |
-- Create a value of 'ListExplainabilities' 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:
--
-- 'filters', 'listExplainabilities_filters' - An array of filters. For each filter, provide a condition and a match
-- statement. The condition is either @IS@ or @IS_NOT@, which specifies
-- whether to include or exclude the resources that match the statement
-- from the list. The match statement consists of a key and a value.
--
-- __Filter properties__
--
-- -   @Condition@ - The condition to apply. Valid values are @IS@ and
--     @IS_NOT@.
--
-- -   @Key@ - The name of the parameter to filter on. Valid values are
--     @ResourceArn@ and @Status@.
--
-- -   @Value@ - The value to match.
--
-- 'maxResults', 'listExplainabilities_maxResults' - The number of items returned in the response.
--
-- 'nextToken', 'listExplainabilities_nextToken' - If the result of the previous request was truncated, the response
-- includes a NextToken. To retrieve the next set of results, use the token
-- in the next request. Tokens expire after 24 hours.
newListExplainabilities ::
  ListExplainabilities
newListExplainabilities :: ListExplainabilities
newListExplainabilities =
  ListExplainabilities'
    { $sel:filters:ListExplainabilities' :: Maybe [Filter]
filters = forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListExplainabilities' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListExplainabilities' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing
    }

-- | An array of filters. For each filter, provide a condition and a match
-- statement. The condition is either @IS@ or @IS_NOT@, which specifies
-- whether to include or exclude the resources that match the statement
-- from the list. The match statement consists of a key and a value.
--
-- __Filter properties__
--
-- -   @Condition@ - The condition to apply. Valid values are @IS@ and
--     @IS_NOT@.
--
-- -   @Key@ - The name of the parameter to filter on. Valid values are
--     @ResourceArn@ and @Status@.
--
-- -   @Value@ - The value to match.
listExplainabilities_filters :: Lens.Lens' ListExplainabilities (Prelude.Maybe [Filter])
listExplainabilities_filters :: Lens' ListExplainabilities (Maybe [Filter])
listExplainabilities_filters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListExplainabilities' {Maybe [Filter]
filters :: Maybe [Filter]
$sel:filters:ListExplainabilities' :: ListExplainabilities -> Maybe [Filter]
filters} -> Maybe [Filter]
filters) (\s :: ListExplainabilities
s@ListExplainabilities' {} Maybe [Filter]
a -> ListExplainabilities
s {$sel:filters:ListExplainabilities' :: Maybe [Filter]
filters = Maybe [Filter]
a} :: ListExplainabilities) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The number of items returned in the response.
listExplainabilities_maxResults :: Lens.Lens' ListExplainabilities (Prelude.Maybe Prelude.Natural)
listExplainabilities_maxResults :: Lens' ListExplainabilities (Maybe Natural)
listExplainabilities_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListExplainabilities' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListExplainabilities' :: ListExplainabilities -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListExplainabilities
s@ListExplainabilities' {} Maybe Natural
a -> ListExplainabilities
s {$sel:maxResults:ListExplainabilities' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListExplainabilities)

-- | If the result of the previous request was truncated, the response
-- includes a NextToken. To retrieve the next set of results, use the token
-- in the next request. Tokens expire after 24 hours.
listExplainabilities_nextToken :: Lens.Lens' ListExplainabilities (Prelude.Maybe Prelude.Text)
listExplainabilities_nextToken :: Lens' ListExplainabilities (Maybe Text)
listExplainabilities_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListExplainabilities' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListExplainabilities' :: ListExplainabilities -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListExplainabilities
s@ListExplainabilities' {} Maybe Text
a -> ListExplainabilities
s {$sel:nextToken:ListExplainabilities' :: Maybe Text
nextToken = Maybe Text
a} :: ListExplainabilities)

instance Core.AWSPager ListExplainabilities where
  page :: ListExplainabilities
-> AWSResponse ListExplainabilities -> Maybe ListExplainabilities
page ListExplainabilities
rq AWSResponse ListExplainabilities
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListExplainabilities
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListExplainabilitiesResponse (Maybe Text)
listExplainabilitiesResponse_nextToken
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListExplainabilities
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListExplainabilitiesResponse (Maybe [ExplainabilitySummary])
listExplainabilitiesResponse_explainabilities
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ ListExplainabilities
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListExplainabilities (Maybe Text)
listExplainabilities_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListExplainabilities
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListExplainabilitiesResponse (Maybe Text)
listExplainabilitiesResponse_nextToken
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListExplainabilities where
  type
    AWSResponse ListExplainabilities =
      ListExplainabilitiesResponse
  request :: (Service -> Service)
-> ListExplainabilities -> Request ListExplainabilities
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListExplainabilities
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListExplainabilities)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe [ExplainabilitySummary]
-> Maybe Text -> Int -> ListExplainabilitiesResponse
ListExplainabilitiesResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Explainabilities"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"NextToken")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable ListExplainabilities where
  hashWithSalt :: Int -> ListExplainabilities -> Int
hashWithSalt Int
_salt ListExplainabilities' {Maybe Natural
Maybe [Filter]
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe [Filter]
$sel:nextToken:ListExplainabilities' :: ListExplainabilities -> Maybe Text
$sel:maxResults:ListExplainabilities' :: ListExplainabilities -> Maybe Natural
$sel:filters:ListExplainabilities' :: ListExplainabilities -> Maybe [Filter]
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Filter]
filters
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken

instance Prelude.NFData ListExplainabilities where
  rnf :: ListExplainabilities -> ()
rnf ListExplainabilities' {Maybe Natural
Maybe [Filter]
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe [Filter]
$sel:nextToken:ListExplainabilities' :: ListExplainabilities -> Maybe Text
$sel:maxResults:ListExplainabilities' :: ListExplainabilities -> Maybe Natural
$sel:filters:ListExplainabilities' :: ListExplainabilities -> Maybe [Filter]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [Filter]
filters
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken

instance Data.ToHeaders ListExplainabilities where
  toHeaders :: ListExplainabilities -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"AmazonForecast.ListExplainabilities" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON ListExplainabilities where
  toJSON :: ListExplainabilities -> Value
toJSON ListExplainabilities' {Maybe Natural
Maybe [Filter]
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe [Filter]
$sel:nextToken:ListExplainabilities' :: ListExplainabilities -> Maybe Text
$sel:maxResults:ListExplainabilities' :: ListExplainabilities -> Maybe Natural
$sel:filters:ListExplainabilities' :: ListExplainabilities -> Maybe [Filter]
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"Filters" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Filter]
filters,
            (Key
"MaxResults" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
            (Key
"NextToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken
          ]
      )

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

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

-- | /See:/ 'newListExplainabilitiesResponse' smart constructor.
data ListExplainabilitiesResponse = ListExplainabilitiesResponse'
  { -- | An array of objects that summarize the properties of each Explainability
    -- resource.
    ListExplainabilitiesResponse -> Maybe [ExplainabilitySummary]
explainabilities :: Prelude.Maybe [ExplainabilitySummary],
    -- | Returns this token if the response is truncated. To retrieve the next
    -- set of results, use the token in the next request.
    ListExplainabilitiesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListExplainabilitiesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListExplainabilitiesResponse
-> ListExplainabilitiesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListExplainabilitiesResponse
-> ListExplainabilitiesResponse -> Bool
$c/= :: ListExplainabilitiesResponse
-> ListExplainabilitiesResponse -> Bool
== :: ListExplainabilitiesResponse
-> ListExplainabilitiesResponse -> Bool
$c== :: ListExplainabilitiesResponse
-> ListExplainabilitiesResponse -> Bool
Prelude.Eq, ReadPrec [ListExplainabilitiesResponse]
ReadPrec ListExplainabilitiesResponse
Int -> ReadS ListExplainabilitiesResponse
ReadS [ListExplainabilitiesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListExplainabilitiesResponse]
$creadListPrec :: ReadPrec [ListExplainabilitiesResponse]
readPrec :: ReadPrec ListExplainabilitiesResponse
$creadPrec :: ReadPrec ListExplainabilitiesResponse
readList :: ReadS [ListExplainabilitiesResponse]
$creadList :: ReadS [ListExplainabilitiesResponse]
readsPrec :: Int -> ReadS ListExplainabilitiesResponse
$creadsPrec :: Int -> ReadS ListExplainabilitiesResponse
Prelude.Read, Int -> ListExplainabilitiesResponse -> ShowS
[ListExplainabilitiesResponse] -> ShowS
ListExplainabilitiesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListExplainabilitiesResponse] -> ShowS
$cshowList :: [ListExplainabilitiesResponse] -> ShowS
show :: ListExplainabilitiesResponse -> String
$cshow :: ListExplainabilitiesResponse -> String
showsPrec :: Int -> ListExplainabilitiesResponse -> ShowS
$cshowsPrec :: Int -> ListExplainabilitiesResponse -> ShowS
Prelude.Show, forall x.
Rep ListExplainabilitiesResponse x -> ListExplainabilitiesResponse
forall x.
ListExplainabilitiesResponse -> Rep ListExplainabilitiesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListExplainabilitiesResponse x -> ListExplainabilitiesResponse
$cfrom :: forall x.
ListExplainabilitiesResponse -> Rep ListExplainabilitiesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListExplainabilitiesResponse' 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:
--
-- 'explainabilities', 'listExplainabilitiesResponse_explainabilities' - An array of objects that summarize the properties of each Explainability
-- resource.
--
-- 'nextToken', 'listExplainabilitiesResponse_nextToken' - Returns this token if the response is truncated. To retrieve the next
-- set of results, use the token in the next request.
--
-- 'httpStatus', 'listExplainabilitiesResponse_httpStatus' - The response's http status code.
newListExplainabilitiesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListExplainabilitiesResponse
newListExplainabilitiesResponse :: Int -> ListExplainabilitiesResponse
newListExplainabilitiesResponse Int
pHttpStatus_ =
  ListExplainabilitiesResponse'
    { $sel:explainabilities:ListExplainabilitiesResponse' :: Maybe [ExplainabilitySummary]
explainabilities =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListExplainabilitiesResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListExplainabilitiesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An array of objects that summarize the properties of each Explainability
-- resource.
listExplainabilitiesResponse_explainabilities :: Lens.Lens' ListExplainabilitiesResponse (Prelude.Maybe [ExplainabilitySummary])
listExplainabilitiesResponse_explainabilities :: Lens' ListExplainabilitiesResponse (Maybe [ExplainabilitySummary])
listExplainabilitiesResponse_explainabilities = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListExplainabilitiesResponse' {Maybe [ExplainabilitySummary]
explainabilities :: Maybe [ExplainabilitySummary]
$sel:explainabilities:ListExplainabilitiesResponse' :: ListExplainabilitiesResponse -> Maybe [ExplainabilitySummary]
explainabilities} -> Maybe [ExplainabilitySummary]
explainabilities) (\s :: ListExplainabilitiesResponse
s@ListExplainabilitiesResponse' {} Maybe [ExplainabilitySummary]
a -> ListExplainabilitiesResponse
s {$sel:explainabilities:ListExplainabilitiesResponse' :: Maybe [ExplainabilitySummary]
explainabilities = Maybe [ExplainabilitySummary]
a} :: ListExplainabilitiesResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Returns this token if the response is truncated. To retrieve the next
-- set of results, use the token in the next request.
listExplainabilitiesResponse_nextToken :: Lens.Lens' ListExplainabilitiesResponse (Prelude.Maybe Prelude.Text)
listExplainabilitiesResponse_nextToken :: Lens' ListExplainabilitiesResponse (Maybe Text)
listExplainabilitiesResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListExplainabilitiesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListExplainabilitiesResponse' :: ListExplainabilitiesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListExplainabilitiesResponse
s@ListExplainabilitiesResponse' {} Maybe Text
a -> ListExplainabilitiesResponse
s {$sel:nextToken:ListExplainabilitiesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListExplainabilitiesResponse)

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

instance Prelude.NFData ListExplainabilitiesResponse where
  rnf :: ListExplainabilitiesResponse -> ()
rnf ListExplainabilitiesResponse' {Int
Maybe [ExplainabilitySummary]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
explainabilities :: Maybe [ExplainabilitySummary]
$sel:httpStatus:ListExplainabilitiesResponse' :: ListExplainabilitiesResponse -> Int
$sel:nextToken:ListExplainabilitiesResponse' :: ListExplainabilitiesResponse -> Maybe Text
$sel:explainabilities:ListExplainabilitiesResponse' :: ListExplainabilitiesResponse -> Maybe [ExplainabilitySummary]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [ExplainabilitySummary]
explainabilities
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus