{-# 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.LookoutEquipment.ListInferenceExecutions
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Lists all inference executions that have been performed by the specified
-- inference scheduler.
module Amazonka.LookoutEquipment.ListInferenceExecutions
  ( -- * Creating a Request
    ListInferenceExecutions (..),
    newListInferenceExecutions,

    -- * Request Lenses
    listInferenceExecutions_dataEndTimeBefore,
    listInferenceExecutions_dataStartTimeAfter,
    listInferenceExecutions_maxResults,
    listInferenceExecutions_nextToken,
    listInferenceExecutions_status,
    listInferenceExecutions_inferenceSchedulerName,

    -- * Destructuring the Response
    ListInferenceExecutionsResponse (..),
    newListInferenceExecutionsResponse,

    -- * Response Lenses
    listInferenceExecutionsResponse_inferenceExecutionSummaries,
    listInferenceExecutionsResponse_nextToken,
    listInferenceExecutionsResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListInferenceExecutions' smart constructor.
data ListInferenceExecutions = ListInferenceExecutions'
  { -- | The time reference in the inferenced dataset before which Amazon Lookout
    -- for Equipment stopped the inference execution.
    ListInferenceExecutions -> Maybe POSIX
dataEndTimeBefore :: Prelude.Maybe Data.POSIX,
    -- | The time reference in the inferenced dataset after which Amazon Lookout
    -- for Equipment started the inference execution.
    ListInferenceExecutions -> Maybe POSIX
dataStartTimeAfter :: Prelude.Maybe Data.POSIX,
    -- | Specifies the maximum number of inference executions to list.
    ListInferenceExecutions -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | An opaque pagination token indicating where to continue the listing of
    -- inference executions.
    ListInferenceExecutions -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The status of the inference execution.
    ListInferenceExecutions -> Maybe InferenceExecutionStatus
status :: Prelude.Maybe InferenceExecutionStatus,
    -- | The name of the inference scheduler for the inference execution listed.
    ListInferenceExecutions -> Text
inferenceSchedulerName :: Prelude.Text
  }
  deriving (ListInferenceExecutions -> ListInferenceExecutions -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListInferenceExecutions -> ListInferenceExecutions -> Bool
$c/= :: ListInferenceExecutions -> ListInferenceExecutions -> Bool
== :: ListInferenceExecutions -> ListInferenceExecutions -> Bool
$c== :: ListInferenceExecutions -> ListInferenceExecutions -> Bool
Prelude.Eq, ReadPrec [ListInferenceExecutions]
ReadPrec ListInferenceExecutions
Int -> ReadS ListInferenceExecutions
ReadS [ListInferenceExecutions]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListInferenceExecutions]
$creadListPrec :: ReadPrec [ListInferenceExecutions]
readPrec :: ReadPrec ListInferenceExecutions
$creadPrec :: ReadPrec ListInferenceExecutions
readList :: ReadS [ListInferenceExecutions]
$creadList :: ReadS [ListInferenceExecutions]
readsPrec :: Int -> ReadS ListInferenceExecutions
$creadsPrec :: Int -> ReadS ListInferenceExecutions
Prelude.Read, Int -> ListInferenceExecutions -> ShowS
[ListInferenceExecutions] -> ShowS
ListInferenceExecutions -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListInferenceExecutions] -> ShowS
$cshowList :: [ListInferenceExecutions] -> ShowS
show :: ListInferenceExecutions -> String
$cshow :: ListInferenceExecutions -> String
showsPrec :: Int -> ListInferenceExecutions -> ShowS
$cshowsPrec :: Int -> ListInferenceExecutions -> ShowS
Prelude.Show, forall x. Rep ListInferenceExecutions x -> ListInferenceExecutions
forall x. ListInferenceExecutions -> Rep ListInferenceExecutions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListInferenceExecutions x -> ListInferenceExecutions
$cfrom :: forall x. ListInferenceExecutions -> Rep ListInferenceExecutions x
Prelude.Generic)

-- |
-- Create a value of 'ListInferenceExecutions' 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:
--
-- 'dataEndTimeBefore', 'listInferenceExecutions_dataEndTimeBefore' - The time reference in the inferenced dataset before which Amazon Lookout
-- for Equipment stopped the inference execution.
--
-- 'dataStartTimeAfter', 'listInferenceExecutions_dataStartTimeAfter' - The time reference in the inferenced dataset after which Amazon Lookout
-- for Equipment started the inference execution.
--
-- 'maxResults', 'listInferenceExecutions_maxResults' - Specifies the maximum number of inference executions to list.
--
-- 'nextToken', 'listInferenceExecutions_nextToken' - An opaque pagination token indicating where to continue the listing of
-- inference executions.
--
-- 'status', 'listInferenceExecutions_status' - The status of the inference execution.
--
-- 'inferenceSchedulerName', 'listInferenceExecutions_inferenceSchedulerName' - The name of the inference scheduler for the inference execution listed.
newListInferenceExecutions ::
  -- | 'inferenceSchedulerName'
  Prelude.Text ->
  ListInferenceExecutions
newListInferenceExecutions :: Text -> ListInferenceExecutions
newListInferenceExecutions Text
pInferenceSchedulerName_ =
  ListInferenceExecutions'
    { $sel:dataEndTimeBefore:ListInferenceExecutions' :: Maybe POSIX
dataEndTimeBefore =
        forall a. Maybe a
Prelude.Nothing,
      $sel:dataStartTimeAfter:ListInferenceExecutions' :: Maybe POSIX
dataStartTimeAfter = forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListInferenceExecutions' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListInferenceExecutions' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:status:ListInferenceExecutions' :: Maybe InferenceExecutionStatus
status = forall a. Maybe a
Prelude.Nothing,
      $sel:inferenceSchedulerName:ListInferenceExecutions' :: Text
inferenceSchedulerName = Text
pInferenceSchedulerName_
    }

-- | The time reference in the inferenced dataset before which Amazon Lookout
-- for Equipment stopped the inference execution.
listInferenceExecutions_dataEndTimeBefore :: Lens.Lens' ListInferenceExecutions (Prelude.Maybe Prelude.UTCTime)
listInferenceExecutions_dataEndTimeBefore :: Lens' ListInferenceExecutions (Maybe UTCTime)
listInferenceExecutions_dataEndTimeBefore = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListInferenceExecutions' {Maybe POSIX
dataEndTimeBefore :: Maybe POSIX
$sel:dataEndTimeBefore:ListInferenceExecutions' :: ListInferenceExecutions -> Maybe POSIX
dataEndTimeBefore} -> Maybe POSIX
dataEndTimeBefore) (\s :: ListInferenceExecutions
s@ListInferenceExecutions' {} Maybe POSIX
a -> ListInferenceExecutions
s {$sel:dataEndTimeBefore:ListInferenceExecutions' :: Maybe POSIX
dataEndTimeBefore = Maybe POSIX
a} :: ListInferenceExecutions) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The time reference in the inferenced dataset after which Amazon Lookout
-- for Equipment started the inference execution.
listInferenceExecutions_dataStartTimeAfter :: Lens.Lens' ListInferenceExecutions (Prelude.Maybe Prelude.UTCTime)
listInferenceExecutions_dataStartTimeAfter :: Lens' ListInferenceExecutions (Maybe UTCTime)
listInferenceExecutions_dataStartTimeAfter = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListInferenceExecutions' {Maybe POSIX
dataStartTimeAfter :: Maybe POSIX
$sel:dataStartTimeAfter:ListInferenceExecutions' :: ListInferenceExecutions -> Maybe POSIX
dataStartTimeAfter} -> Maybe POSIX
dataStartTimeAfter) (\s :: ListInferenceExecutions
s@ListInferenceExecutions' {} Maybe POSIX
a -> ListInferenceExecutions
s {$sel:dataStartTimeAfter:ListInferenceExecutions' :: Maybe POSIX
dataStartTimeAfter = Maybe POSIX
a} :: ListInferenceExecutions) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | Specifies the maximum number of inference executions to list.
listInferenceExecutions_maxResults :: Lens.Lens' ListInferenceExecutions (Prelude.Maybe Prelude.Natural)
listInferenceExecutions_maxResults :: Lens' ListInferenceExecutions (Maybe Natural)
listInferenceExecutions_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListInferenceExecutions' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListInferenceExecutions' :: ListInferenceExecutions -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListInferenceExecutions
s@ListInferenceExecutions' {} Maybe Natural
a -> ListInferenceExecutions
s {$sel:maxResults:ListInferenceExecutions' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListInferenceExecutions)

-- | An opaque pagination token indicating where to continue the listing of
-- inference executions.
listInferenceExecutions_nextToken :: Lens.Lens' ListInferenceExecutions (Prelude.Maybe Prelude.Text)
listInferenceExecutions_nextToken :: Lens' ListInferenceExecutions (Maybe Text)
listInferenceExecutions_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListInferenceExecutions' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListInferenceExecutions' :: ListInferenceExecutions -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListInferenceExecutions
s@ListInferenceExecutions' {} Maybe Text
a -> ListInferenceExecutions
s {$sel:nextToken:ListInferenceExecutions' :: Maybe Text
nextToken = Maybe Text
a} :: ListInferenceExecutions)

-- | The status of the inference execution.
listInferenceExecutions_status :: Lens.Lens' ListInferenceExecutions (Prelude.Maybe InferenceExecutionStatus)
listInferenceExecutions_status :: Lens' ListInferenceExecutions (Maybe InferenceExecutionStatus)
listInferenceExecutions_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListInferenceExecutions' {Maybe InferenceExecutionStatus
status :: Maybe InferenceExecutionStatus
$sel:status:ListInferenceExecutions' :: ListInferenceExecutions -> Maybe InferenceExecutionStatus
status} -> Maybe InferenceExecutionStatus
status) (\s :: ListInferenceExecutions
s@ListInferenceExecutions' {} Maybe InferenceExecutionStatus
a -> ListInferenceExecutions
s {$sel:status:ListInferenceExecutions' :: Maybe InferenceExecutionStatus
status = Maybe InferenceExecutionStatus
a} :: ListInferenceExecutions)

-- | The name of the inference scheduler for the inference execution listed.
listInferenceExecutions_inferenceSchedulerName :: Lens.Lens' ListInferenceExecutions Prelude.Text
listInferenceExecutions_inferenceSchedulerName :: Lens' ListInferenceExecutions Text
listInferenceExecutions_inferenceSchedulerName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListInferenceExecutions' {Text
inferenceSchedulerName :: Text
$sel:inferenceSchedulerName:ListInferenceExecutions' :: ListInferenceExecutions -> Text
inferenceSchedulerName} -> Text
inferenceSchedulerName) (\s :: ListInferenceExecutions
s@ListInferenceExecutions' {} Text
a -> ListInferenceExecutions
s {$sel:inferenceSchedulerName:ListInferenceExecutions' :: Text
inferenceSchedulerName = Text
a} :: ListInferenceExecutions)

instance Core.AWSRequest ListInferenceExecutions where
  type
    AWSResponse ListInferenceExecutions =
      ListInferenceExecutionsResponse
  request :: (Service -> Service)
-> ListInferenceExecutions -> Request ListInferenceExecutions
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 ListInferenceExecutions
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListInferenceExecutions)))
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 [InferenceExecutionSummary]
-> Maybe Text -> Int -> ListInferenceExecutionsResponse
ListInferenceExecutionsResponse'
            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
"InferenceExecutionSummaries"
                            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 ListInferenceExecutions where
  hashWithSalt :: Int -> ListInferenceExecutions -> Int
hashWithSalt Int
_salt ListInferenceExecutions' {Maybe Natural
Maybe Text
Maybe POSIX
Maybe InferenceExecutionStatus
Text
inferenceSchedulerName :: Text
status :: Maybe InferenceExecutionStatus
nextToken :: Maybe Text
maxResults :: Maybe Natural
dataStartTimeAfter :: Maybe POSIX
dataEndTimeBefore :: Maybe POSIX
$sel:inferenceSchedulerName:ListInferenceExecutions' :: ListInferenceExecutions -> Text
$sel:status:ListInferenceExecutions' :: ListInferenceExecutions -> Maybe InferenceExecutionStatus
$sel:nextToken:ListInferenceExecutions' :: ListInferenceExecutions -> Maybe Text
$sel:maxResults:ListInferenceExecutions' :: ListInferenceExecutions -> Maybe Natural
$sel:dataStartTimeAfter:ListInferenceExecutions' :: ListInferenceExecutions -> Maybe POSIX
$sel:dataEndTimeBefore:ListInferenceExecutions' :: ListInferenceExecutions -> Maybe POSIX
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
dataEndTimeBefore
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
dataStartTimeAfter
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe InferenceExecutionStatus
status
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
inferenceSchedulerName

instance Prelude.NFData ListInferenceExecutions where
  rnf :: ListInferenceExecutions -> ()
rnf ListInferenceExecutions' {Maybe Natural
Maybe Text
Maybe POSIX
Maybe InferenceExecutionStatus
Text
inferenceSchedulerName :: Text
status :: Maybe InferenceExecutionStatus
nextToken :: Maybe Text
maxResults :: Maybe Natural
dataStartTimeAfter :: Maybe POSIX
dataEndTimeBefore :: Maybe POSIX
$sel:inferenceSchedulerName:ListInferenceExecutions' :: ListInferenceExecutions -> Text
$sel:status:ListInferenceExecutions' :: ListInferenceExecutions -> Maybe InferenceExecutionStatus
$sel:nextToken:ListInferenceExecutions' :: ListInferenceExecutions -> Maybe Text
$sel:maxResults:ListInferenceExecutions' :: ListInferenceExecutions -> Maybe Natural
$sel:dataStartTimeAfter:ListInferenceExecutions' :: ListInferenceExecutions -> Maybe POSIX
$sel:dataEndTimeBefore:ListInferenceExecutions' :: ListInferenceExecutions -> Maybe POSIX
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
dataEndTimeBefore
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
dataStartTimeAfter
      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
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe InferenceExecutionStatus
status
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
inferenceSchedulerName

instance Data.ToHeaders ListInferenceExecutions where
  toHeaders :: ListInferenceExecutions -> 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
"AWSLookoutEquipmentFrontendService.ListInferenceExecutions" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.0" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON ListInferenceExecutions where
  toJSON :: ListInferenceExecutions -> Value
toJSON ListInferenceExecutions' {Maybe Natural
Maybe Text
Maybe POSIX
Maybe InferenceExecutionStatus
Text
inferenceSchedulerName :: Text
status :: Maybe InferenceExecutionStatus
nextToken :: Maybe Text
maxResults :: Maybe Natural
dataStartTimeAfter :: Maybe POSIX
dataEndTimeBefore :: Maybe POSIX
$sel:inferenceSchedulerName:ListInferenceExecutions' :: ListInferenceExecutions -> Text
$sel:status:ListInferenceExecutions' :: ListInferenceExecutions -> Maybe InferenceExecutionStatus
$sel:nextToken:ListInferenceExecutions' :: ListInferenceExecutions -> Maybe Text
$sel:maxResults:ListInferenceExecutions' :: ListInferenceExecutions -> Maybe Natural
$sel:dataStartTimeAfter:ListInferenceExecutions' :: ListInferenceExecutions -> Maybe POSIX
$sel:dataEndTimeBefore:ListInferenceExecutions' :: ListInferenceExecutions -> Maybe POSIX
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"DataEndTimeBefore" 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 POSIX
dataEndTimeBefore,
            (Key
"DataStartTimeAfter" 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 POSIX
dataStartTimeAfter,
            (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,
            (Key
"Status" 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 InferenceExecutionStatus
status,
            forall a. a -> Maybe a
Prelude.Just
              ( Key
"InferenceSchedulerName"
                  forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
inferenceSchedulerName
              )
          ]
      )

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

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

-- | /See:/ 'newListInferenceExecutionsResponse' smart constructor.
data ListInferenceExecutionsResponse = ListInferenceExecutionsResponse'
  { -- | Provides an array of information about the individual inference
    -- executions returned from the @ListInferenceExecutions@ operation,
    -- including model used, inference scheduler, data configuration, and so
    -- on.
    ListInferenceExecutionsResponse
-> Maybe [InferenceExecutionSummary]
inferenceExecutionSummaries :: Prelude.Maybe [InferenceExecutionSummary],
    -- | An opaque pagination token indicating where to continue the listing of
    -- inference executions.
    ListInferenceExecutionsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListInferenceExecutionsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListInferenceExecutionsResponse
-> ListInferenceExecutionsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListInferenceExecutionsResponse
-> ListInferenceExecutionsResponse -> Bool
$c/= :: ListInferenceExecutionsResponse
-> ListInferenceExecutionsResponse -> Bool
== :: ListInferenceExecutionsResponse
-> ListInferenceExecutionsResponse -> Bool
$c== :: ListInferenceExecutionsResponse
-> ListInferenceExecutionsResponse -> Bool
Prelude.Eq, ReadPrec [ListInferenceExecutionsResponse]
ReadPrec ListInferenceExecutionsResponse
Int -> ReadS ListInferenceExecutionsResponse
ReadS [ListInferenceExecutionsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListInferenceExecutionsResponse]
$creadListPrec :: ReadPrec [ListInferenceExecutionsResponse]
readPrec :: ReadPrec ListInferenceExecutionsResponse
$creadPrec :: ReadPrec ListInferenceExecutionsResponse
readList :: ReadS [ListInferenceExecutionsResponse]
$creadList :: ReadS [ListInferenceExecutionsResponse]
readsPrec :: Int -> ReadS ListInferenceExecutionsResponse
$creadsPrec :: Int -> ReadS ListInferenceExecutionsResponse
Prelude.Read, Int -> ListInferenceExecutionsResponse -> ShowS
[ListInferenceExecutionsResponse] -> ShowS
ListInferenceExecutionsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListInferenceExecutionsResponse] -> ShowS
$cshowList :: [ListInferenceExecutionsResponse] -> ShowS
show :: ListInferenceExecutionsResponse -> String
$cshow :: ListInferenceExecutionsResponse -> String
showsPrec :: Int -> ListInferenceExecutionsResponse -> ShowS
$cshowsPrec :: Int -> ListInferenceExecutionsResponse -> ShowS
Prelude.Show, forall x.
Rep ListInferenceExecutionsResponse x
-> ListInferenceExecutionsResponse
forall x.
ListInferenceExecutionsResponse
-> Rep ListInferenceExecutionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListInferenceExecutionsResponse x
-> ListInferenceExecutionsResponse
$cfrom :: forall x.
ListInferenceExecutionsResponse
-> Rep ListInferenceExecutionsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListInferenceExecutionsResponse' 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:
--
-- 'inferenceExecutionSummaries', 'listInferenceExecutionsResponse_inferenceExecutionSummaries' - Provides an array of information about the individual inference
-- executions returned from the @ListInferenceExecutions@ operation,
-- including model used, inference scheduler, data configuration, and so
-- on.
--
-- 'nextToken', 'listInferenceExecutionsResponse_nextToken' - An opaque pagination token indicating where to continue the listing of
-- inference executions.
--
-- 'httpStatus', 'listInferenceExecutionsResponse_httpStatus' - The response's http status code.
newListInferenceExecutionsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListInferenceExecutionsResponse
newListInferenceExecutionsResponse :: Int -> ListInferenceExecutionsResponse
newListInferenceExecutionsResponse Int
pHttpStatus_ =
  ListInferenceExecutionsResponse'
    { $sel:inferenceExecutionSummaries:ListInferenceExecutionsResponse' :: Maybe [InferenceExecutionSummary]
inferenceExecutionSummaries =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListInferenceExecutionsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListInferenceExecutionsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Provides an array of information about the individual inference
-- executions returned from the @ListInferenceExecutions@ operation,
-- including model used, inference scheduler, data configuration, and so
-- on.
listInferenceExecutionsResponse_inferenceExecutionSummaries :: Lens.Lens' ListInferenceExecutionsResponse (Prelude.Maybe [InferenceExecutionSummary])
listInferenceExecutionsResponse_inferenceExecutionSummaries :: Lens'
  ListInferenceExecutionsResponse (Maybe [InferenceExecutionSummary])
listInferenceExecutionsResponse_inferenceExecutionSummaries = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListInferenceExecutionsResponse' {Maybe [InferenceExecutionSummary]
inferenceExecutionSummaries :: Maybe [InferenceExecutionSummary]
$sel:inferenceExecutionSummaries:ListInferenceExecutionsResponse' :: ListInferenceExecutionsResponse
-> Maybe [InferenceExecutionSummary]
inferenceExecutionSummaries} -> Maybe [InferenceExecutionSummary]
inferenceExecutionSummaries) (\s :: ListInferenceExecutionsResponse
s@ListInferenceExecutionsResponse' {} Maybe [InferenceExecutionSummary]
a -> ListInferenceExecutionsResponse
s {$sel:inferenceExecutionSummaries:ListInferenceExecutionsResponse' :: Maybe [InferenceExecutionSummary]
inferenceExecutionSummaries = Maybe [InferenceExecutionSummary]
a} :: ListInferenceExecutionsResponse) 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

-- | An opaque pagination token indicating where to continue the listing of
-- inference executions.
listInferenceExecutionsResponse_nextToken :: Lens.Lens' ListInferenceExecutionsResponse (Prelude.Maybe Prelude.Text)
listInferenceExecutionsResponse_nextToken :: Lens' ListInferenceExecutionsResponse (Maybe Text)
listInferenceExecutionsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListInferenceExecutionsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListInferenceExecutionsResponse' :: ListInferenceExecutionsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListInferenceExecutionsResponse
s@ListInferenceExecutionsResponse' {} Maybe Text
a -> ListInferenceExecutionsResponse
s {$sel:nextToken:ListInferenceExecutionsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListInferenceExecutionsResponse)

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

instance
  Prelude.NFData
    ListInferenceExecutionsResponse
  where
  rnf :: ListInferenceExecutionsResponse -> ()
rnf ListInferenceExecutionsResponse' {Int
Maybe [InferenceExecutionSummary]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
inferenceExecutionSummaries :: Maybe [InferenceExecutionSummary]
$sel:httpStatus:ListInferenceExecutionsResponse' :: ListInferenceExecutionsResponse -> Int
$sel:nextToken:ListInferenceExecutionsResponse' :: ListInferenceExecutionsResponse -> Maybe Text
$sel:inferenceExecutionSummaries:ListInferenceExecutionsResponse' :: ListInferenceExecutionsResponse
-> Maybe [InferenceExecutionSummary]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [InferenceExecutionSummary]
inferenceExecutionSummaries
      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