{-# 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.Inspector.DescribeAssessmentRuns
-- 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)
--
-- Describes the assessment runs that are specified by the ARNs of the
-- assessment runs.
module Amazonka.Inspector.DescribeAssessmentRuns
  ( -- * Creating a Request
    DescribeAssessmentRuns (..),
    newDescribeAssessmentRuns,

    -- * Request Lenses
    describeAssessmentRuns_assessmentRunArns,

    -- * Destructuring the Response
    DescribeAssessmentRunsResponse (..),
    newDescribeAssessmentRunsResponse,

    -- * Response Lenses
    describeAssessmentRunsResponse_httpStatus,
    describeAssessmentRunsResponse_assessmentRuns,
    describeAssessmentRunsResponse_failedItems,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.Inspector.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:/ 'newDescribeAssessmentRuns' smart constructor.
data DescribeAssessmentRuns = DescribeAssessmentRuns'
  { -- | The ARN that specifies the assessment run that you want to describe.
    DescribeAssessmentRuns -> NonEmpty Text
assessmentRunArns :: Prelude.NonEmpty Prelude.Text
  }
  deriving (DescribeAssessmentRuns -> DescribeAssessmentRuns -> Bool
(DescribeAssessmentRuns -> DescribeAssessmentRuns -> Bool)
-> (DescribeAssessmentRuns -> DescribeAssessmentRuns -> Bool)
-> Eq DescribeAssessmentRuns
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeAssessmentRuns -> DescribeAssessmentRuns -> Bool
$c/= :: DescribeAssessmentRuns -> DescribeAssessmentRuns -> Bool
== :: DescribeAssessmentRuns -> DescribeAssessmentRuns -> Bool
$c== :: DescribeAssessmentRuns -> DescribeAssessmentRuns -> Bool
Prelude.Eq, ReadPrec [DescribeAssessmentRuns]
ReadPrec DescribeAssessmentRuns
Int -> ReadS DescribeAssessmentRuns
ReadS [DescribeAssessmentRuns]
(Int -> ReadS DescribeAssessmentRuns)
-> ReadS [DescribeAssessmentRuns]
-> ReadPrec DescribeAssessmentRuns
-> ReadPrec [DescribeAssessmentRuns]
-> Read DescribeAssessmentRuns
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeAssessmentRuns]
$creadListPrec :: ReadPrec [DescribeAssessmentRuns]
readPrec :: ReadPrec DescribeAssessmentRuns
$creadPrec :: ReadPrec DescribeAssessmentRuns
readList :: ReadS [DescribeAssessmentRuns]
$creadList :: ReadS [DescribeAssessmentRuns]
readsPrec :: Int -> ReadS DescribeAssessmentRuns
$creadsPrec :: Int -> ReadS DescribeAssessmentRuns
Prelude.Read, Int -> DescribeAssessmentRuns -> ShowS
[DescribeAssessmentRuns] -> ShowS
DescribeAssessmentRuns -> String
(Int -> DescribeAssessmentRuns -> ShowS)
-> (DescribeAssessmentRuns -> String)
-> ([DescribeAssessmentRuns] -> ShowS)
-> Show DescribeAssessmentRuns
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeAssessmentRuns] -> ShowS
$cshowList :: [DescribeAssessmentRuns] -> ShowS
show :: DescribeAssessmentRuns -> String
$cshow :: DescribeAssessmentRuns -> String
showsPrec :: Int -> DescribeAssessmentRuns -> ShowS
$cshowsPrec :: Int -> DescribeAssessmentRuns -> ShowS
Prelude.Show, (forall x. DescribeAssessmentRuns -> Rep DescribeAssessmentRuns x)
-> (forall x.
    Rep DescribeAssessmentRuns x -> DescribeAssessmentRuns)
-> Generic DescribeAssessmentRuns
forall x. Rep DescribeAssessmentRuns x -> DescribeAssessmentRuns
forall x. DescribeAssessmentRuns -> Rep DescribeAssessmentRuns x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeAssessmentRuns x -> DescribeAssessmentRuns
$cfrom :: forall x. DescribeAssessmentRuns -> Rep DescribeAssessmentRuns x
Prelude.Generic)

-- |
-- Create a value of 'DescribeAssessmentRuns' 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:
--
-- 'assessmentRunArns', 'describeAssessmentRuns_assessmentRunArns' - The ARN that specifies the assessment run that you want to describe.
newDescribeAssessmentRuns ::
  -- | 'assessmentRunArns'
  Prelude.NonEmpty Prelude.Text ->
  DescribeAssessmentRuns
newDescribeAssessmentRuns :: NonEmpty Text -> DescribeAssessmentRuns
newDescribeAssessmentRuns NonEmpty Text
pAssessmentRunArns_ =
  DescribeAssessmentRuns' :: NonEmpty Text -> DescribeAssessmentRuns
DescribeAssessmentRuns'
    { $sel:assessmentRunArns:DescribeAssessmentRuns' :: NonEmpty Text
assessmentRunArns =
        Tagged (NonEmpty Text) (Identity (NonEmpty Text))
-> Tagged (NonEmpty Text) (Identity (NonEmpty Text))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced (Tagged (NonEmpty Text) (Identity (NonEmpty Text))
 -> Tagged (NonEmpty Text) (Identity (NonEmpty Text)))
-> NonEmpty Text -> NonEmpty Text
forall t b. AReview t b -> b -> t
Lens.# NonEmpty Text
pAssessmentRunArns_
    }

-- | The ARN that specifies the assessment run that you want to describe.
describeAssessmentRuns_assessmentRunArns :: Lens.Lens' DescribeAssessmentRuns (Prelude.NonEmpty Prelude.Text)
describeAssessmentRuns_assessmentRunArns :: (NonEmpty Text -> f (NonEmpty Text))
-> DescribeAssessmentRuns -> f DescribeAssessmentRuns
describeAssessmentRuns_assessmentRunArns = (DescribeAssessmentRuns -> NonEmpty Text)
-> (DescribeAssessmentRuns
    -> NonEmpty Text -> DescribeAssessmentRuns)
-> Lens
     DescribeAssessmentRuns
     DescribeAssessmentRuns
     (NonEmpty Text)
     (NonEmpty Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAssessmentRuns' {NonEmpty Text
assessmentRunArns :: NonEmpty Text
$sel:assessmentRunArns:DescribeAssessmentRuns' :: DescribeAssessmentRuns -> NonEmpty Text
assessmentRunArns} -> NonEmpty Text
assessmentRunArns) (\s :: DescribeAssessmentRuns
s@DescribeAssessmentRuns' {} NonEmpty Text
a -> DescribeAssessmentRuns
s {$sel:assessmentRunArns:DescribeAssessmentRuns' :: NonEmpty Text
assessmentRunArns = NonEmpty Text
a} :: DescribeAssessmentRuns) ((NonEmpty Text -> f (NonEmpty Text))
 -> DescribeAssessmentRuns -> f DescribeAssessmentRuns)
-> ((NonEmpty Text -> f (NonEmpty Text))
    -> NonEmpty Text -> f (NonEmpty Text))
-> (NonEmpty Text -> f (NonEmpty Text))
-> DescribeAssessmentRuns
-> f DescribeAssessmentRuns
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (NonEmpty Text -> f (NonEmpty Text))
-> NonEmpty Text -> f (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.Hashable DescribeAssessmentRuns

instance Prelude.NFData DescribeAssessmentRuns

instance Core.ToHeaders DescribeAssessmentRuns where
  toHeaders :: DescribeAssessmentRuns -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeAssessmentRuns -> 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
"InspectorService.DescribeAssessmentRuns" ::
                          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 DescribeAssessmentRuns where
  toJSON :: DescribeAssessmentRuns -> Value
toJSON DescribeAssessmentRuns' {NonEmpty Text
assessmentRunArns :: NonEmpty Text
$sel:assessmentRunArns:DescribeAssessmentRuns' :: DescribeAssessmentRuns -> NonEmpty Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"assessmentRunArns" Text -> NonEmpty Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= NonEmpty Text
assessmentRunArns)
          ]
      )

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

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

-- | /See:/ 'newDescribeAssessmentRunsResponse' smart constructor.
data DescribeAssessmentRunsResponse = DescribeAssessmentRunsResponse'
  { -- | The response's http status code.
    DescribeAssessmentRunsResponse -> Int
httpStatus :: Prelude.Int,
    -- | Information about the assessment run.
    DescribeAssessmentRunsResponse -> [AssessmentRun]
assessmentRuns :: [AssessmentRun],
    -- | Assessment run details that cannot be described. An error code is
    -- provided for each failed item.
    DescribeAssessmentRunsResponse -> HashMap Text FailedItemDetails
failedItems :: Prelude.HashMap Prelude.Text FailedItemDetails
  }
  deriving (DescribeAssessmentRunsResponse
-> DescribeAssessmentRunsResponse -> Bool
(DescribeAssessmentRunsResponse
 -> DescribeAssessmentRunsResponse -> Bool)
-> (DescribeAssessmentRunsResponse
    -> DescribeAssessmentRunsResponse -> Bool)
-> Eq DescribeAssessmentRunsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeAssessmentRunsResponse
-> DescribeAssessmentRunsResponse -> Bool
$c/= :: DescribeAssessmentRunsResponse
-> DescribeAssessmentRunsResponse -> Bool
== :: DescribeAssessmentRunsResponse
-> DescribeAssessmentRunsResponse -> Bool
$c== :: DescribeAssessmentRunsResponse
-> DescribeAssessmentRunsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeAssessmentRunsResponse]
ReadPrec DescribeAssessmentRunsResponse
Int -> ReadS DescribeAssessmentRunsResponse
ReadS [DescribeAssessmentRunsResponse]
(Int -> ReadS DescribeAssessmentRunsResponse)
-> ReadS [DescribeAssessmentRunsResponse]
-> ReadPrec DescribeAssessmentRunsResponse
-> ReadPrec [DescribeAssessmentRunsResponse]
-> Read DescribeAssessmentRunsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeAssessmentRunsResponse]
$creadListPrec :: ReadPrec [DescribeAssessmentRunsResponse]
readPrec :: ReadPrec DescribeAssessmentRunsResponse
$creadPrec :: ReadPrec DescribeAssessmentRunsResponse
readList :: ReadS [DescribeAssessmentRunsResponse]
$creadList :: ReadS [DescribeAssessmentRunsResponse]
readsPrec :: Int -> ReadS DescribeAssessmentRunsResponse
$creadsPrec :: Int -> ReadS DescribeAssessmentRunsResponse
Prelude.Read, Int -> DescribeAssessmentRunsResponse -> ShowS
[DescribeAssessmentRunsResponse] -> ShowS
DescribeAssessmentRunsResponse -> String
(Int -> DescribeAssessmentRunsResponse -> ShowS)
-> (DescribeAssessmentRunsResponse -> String)
-> ([DescribeAssessmentRunsResponse] -> ShowS)
-> Show DescribeAssessmentRunsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeAssessmentRunsResponse] -> ShowS
$cshowList :: [DescribeAssessmentRunsResponse] -> ShowS
show :: DescribeAssessmentRunsResponse -> String
$cshow :: DescribeAssessmentRunsResponse -> String
showsPrec :: Int -> DescribeAssessmentRunsResponse -> ShowS
$cshowsPrec :: Int -> DescribeAssessmentRunsResponse -> ShowS
Prelude.Show, (forall x.
 DescribeAssessmentRunsResponse
 -> Rep DescribeAssessmentRunsResponse x)
-> (forall x.
    Rep DescribeAssessmentRunsResponse x
    -> DescribeAssessmentRunsResponse)
-> Generic DescribeAssessmentRunsResponse
forall x.
Rep DescribeAssessmentRunsResponse x
-> DescribeAssessmentRunsResponse
forall x.
DescribeAssessmentRunsResponse
-> Rep DescribeAssessmentRunsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeAssessmentRunsResponse x
-> DescribeAssessmentRunsResponse
$cfrom :: forall x.
DescribeAssessmentRunsResponse
-> Rep DescribeAssessmentRunsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeAssessmentRunsResponse' 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:
--
-- 'httpStatus', 'describeAssessmentRunsResponse_httpStatus' - The response's http status code.
--
-- 'assessmentRuns', 'describeAssessmentRunsResponse_assessmentRuns' - Information about the assessment run.
--
-- 'failedItems', 'describeAssessmentRunsResponse_failedItems' - Assessment run details that cannot be described. An error code is
-- provided for each failed item.
newDescribeAssessmentRunsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeAssessmentRunsResponse
newDescribeAssessmentRunsResponse :: Int -> DescribeAssessmentRunsResponse
newDescribeAssessmentRunsResponse Int
pHttpStatus_ =
  DescribeAssessmentRunsResponse' :: Int
-> [AssessmentRun]
-> HashMap Text FailedItemDetails
-> DescribeAssessmentRunsResponse
DescribeAssessmentRunsResponse'
    { $sel:httpStatus:DescribeAssessmentRunsResponse' :: Int
httpStatus =
        Int
pHttpStatus_,
      $sel:assessmentRuns:DescribeAssessmentRunsResponse' :: [AssessmentRun]
assessmentRuns = [AssessmentRun]
forall a. Monoid a => a
Prelude.mempty,
      $sel:failedItems:DescribeAssessmentRunsResponse' :: HashMap Text FailedItemDetails
failedItems = HashMap Text FailedItemDetails
forall a. Monoid a => a
Prelude.mempty
    }

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

-- | Information about the assessment run.
describeAssessmentRunsResponse_assessmentRuns :: Lens.Lens' DescribeAssessmentRunsResponse [AssessmentRun]
describeAssessmentRunsResponse_assessmentRuns :: ([AssessmentRun] -> f [AssessmentRun])
-> DescribeAssessmentRunsResponse
-> f DescribeAssessmentRunsResponse
describeAssessmentRunsResponse_assessmentRuns = (DescribeAssessmentRunsResponse -> [AssessmentRun])
-> (DescribeAssessmentRunsResponse
    -> [AssessmentRun] -> DescribeAssessmentRunsResponse)
-> Lens
     DescribeAssessmentRunsResponse
     DescribeAssessmentRunsResponse
     [AssessmentRun]
     [AssessmentRun]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAssessmentRunsResponse' {[AssessmentRun]
assessmentRuns :: [AssessmentRun]
$sel:assessmentRuns:DescribeAssessmentRunsResponse' :: DescribeAssessmentRunsResponse -> [AssessmentRun]
assessmentRuns} -> [AssessmentRun]
assessmentRuns) (\s :: DescribeAssessmentRunsResponse
s@DescribeAssessmentRunsResponse' {} [AssessmentRun]
a -> DescribeAssessmentRunsResponse
s {$sel:assessmentRuns:DescribeAssessmentRunsResponse' :: [AssessmentRun]
assessmentRuns = [AssessmentRun]
a} :: DescribeAssessmentRunsResponse) (([AssessmentRun] -> f [AssessmentRun])
 -> DescribeAssessmentRunsResponse
 -> f DescribeAssessmentRunsResponse)
-> (([AssessmentRun] -> f [AssessmentRun])
    -> [AssessmentRun] -> f [AssessmentRun])
-> ([AssessmentRun] -> f [AssessmentRun])
-> DescribeAssessmentRunsResponse
-> f DescribeAssessmentRunsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([AssessmentRun] -> f [AssessmentRun])
-> [AssessmentRun] -> f [AssessmentRun]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Assessment run details that cannot be described. An error code is
-- provided for each failed item.
describeAssessmentRunsResponse_failedItems :: Lens.Lens' DescribeAssessmentRunsResponse (Prelude.HashMap Prelude.Text FailedItemDetails)
describeAssessmentRunsResponse_failedItems :: (HashMap Text FailedItemDetails
 -> f (HashMap Text FailedItemDetails))
-> DescribeAssessmentRunsResponse
-> f DescribeAssessmentRunsResponse
describeAssessmentRunsResponse_failedItems = (DescribeAssessmentRunsResponse -> HashMap Text FailedItemDetails)
-> (DescribeAssessmentRunsResponse
    -> HashMap Text FailedItemDetails
    -> DescribeAssessmentRunsResponse)
-> Lens
     DescribeAssessmentRunsResponse
     DescribeAssessmentRunsResponse
     (HashMap Text FailedItemDetails)
     (HashMap Text FailedItemDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAssessmentRunsResponse' {HashMap Text FailedItemDetails
failedItems :: HashMap Text FailedItemDetails
$sel:failedItems:DescribeAssessmentRunsResponse' :: DescribeAssessmentRunsResponse -> HashMap Text FailedItemDetails
failedItems} -> HashMap Text FailedItemDetails
failedItems) (\s :: DescribeAssessmentRunsResponse
s@DescribeAssessmentRunsResponse' {} HashMap Text FailedItemDetails
a -> DescribeAssessmentRunsResponse
s {$sel:failedItems:DescribeAssessmentRunsResponse' :: HashMap Text FailedItemDetails
failedItems = HashMap Text FailedItemDetails
a} :: DescribeAssessmentRunsResponse) ((HashMap Text FailedItemDetails
  -> f (HashMap Text FailedItemDetails))
 -> DescribeAssessmentRunsResponse
 -> f DescribeAssessmentRunsResponse)
-> ((HashMap Text FailedItemDetails
     -> f (HashMap Text FailedItemDetails))
    -> HashMap Text FailedItemDetails
    -> f (HashMap Text FailedItemDetails))
-> (HashMap Text FailedItemDetails
    -> f (HashMap Text FailedItemDetails))
-> DescribeAssessmentRunsResponse
-> f DescribeAssessmentRunsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (HashMap Text FailedItemDetails
 -> f (HashMap Text FailedItemDetails))
-> HashMap Text FailedItemDetails
-> f (HashMap Text FailedItemDetails)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Prelude.NFData
    DescribeAssessmentRunsResponse