{-# 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.DeviceFarm.ListTestGridSessionArtifacts
-- 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 list of artifacts created during the session.
module Amazonka.DeviceFarm.ListTestGridSessionArtifacts
  ( -- * Creating a Request
    ListTestGridSessionArtifacts (..),
    newListTestGridSessionArtifacts,

    -- * Request Lenses
    listTestGridSessionArtifacts_maxResult,
    listTestGridSessionArtifacts_nextToken,
    listTestGridSessionArtifacts_type,
    listTestGridSessionArtifacts_sessionArn,

    -- * Destructuring the Response
    ListTestGridSessionArtifactsResponse (..),
    newListTestGridSessionArtifactsResponse,

    -- * Response Lenses
    listTestGridSessionArtifactsResponse_artifacts,
    listTestGridSessionArtifactsResponse_nextToken,
    listTestGridSessionArtifactsResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.DeviceFarm.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:/ 'newListTestGridSessionArtifacts' smart constructor.
data ListTestGridSessionArtifacts = ListTestGridSessionArtifacts'
  { -- | The maximum number of results to be returned by a request.
    ListTestGridSessionArtifacts -> Maybe Natural
maxResult :: Prelude.Maybe Prelude.Natural,
    -- | Pagination token.
    ListTestGridSessionArtifacts -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Limit results to a specified type of artifact.
    ListTestGridSessionArtifacts
-> Maybe TestGridSessionArtifactCategory
type' :: Prelude.Maybe TestGridSessionArtifactCategory,
    -- | The ARN of a TestGridSession.
    ListTestGridSessionArtifacts -> Text
sessionArn :: Prelude.Text
  }
  deriving (ListTestGridSessionArtifacts
-> ListTestGridSessionArtifacts -> Bool
(ListTestGridSessionArtifacts
 -> ListTestGridSessionArtifacts -> Bool)
-> (ListTestGridSessionArtifacts
    -> ListTestGridSessionArtifacts -> Bool)
-> Eq ListTestGridSessionArtifacts
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListTestGridSessionArtifacts
-> ListTestGridSessionArtifacts -> Bool
$c/= :: ListTestGridSessionArtifacts
-> ListTestGridSessionArtifacts -> Bool
== :: ListTestGridSessionArtifacts
-> ListTestGridSessionArtifacts -> Bool
$c== :: ListTestGridSessionArtifacts
-> ListTestGridSessionArtifacts -> Bool
Prelude.Eq, ReadPrec [ListTestGridSessionArtifacts]
ReadPrec ListTestGridSessionArtifacts
Int -> ReadS ListTestGridSessionArtifacts
ReadS [ListTestGridSessionArtifacts]
(Int -> ReadS ListTestGridSessionArtifacts)
-> ReadS [ListTestGridSessionArtifacts]
-> ReadPrec ListTestGridSessionArtifacts
-> ReadPrec [ListTestGridSessionArtifacts]
-> Read ListTestGridSessionArtifacts
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListTestGridSessionArtifacts]
$creadListPrec :: ReadPrec [ListTestGridSessionArtifacts]
readPrec :: ReadPrec ListTestGridSessionArtifacts
$creadPrec :: ReadPrec ListTestGridSessionArtifacts
readList :: ReadS [ListTestGridSessionArtifacts]
$creadList :: ReadS [ListTestGridSessionArtifacts]
readsPrec :: Int -> ReadS ListTestGridSessionArtifacts
$creadsPrec :: Int -> ReadS ListTestGridSessionArtifacts
Prelude.Read, Int -> ListTestGridSessionArtifacts -> ShowS
[ListTestGridSessionArtifacts] -> ShowS
ListTestGridSessionArtifacts -> String
(Int -> ListTestGridSessionArtifacts -> ShowS)
-> (ListTestGridSessionArtifacts -> String)
-> ([ListTestGridSessionArtifacts] -> ShowS)
-> Show ListTestGridSessionArtifacts
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListTestGridSessionArtifacts] -> ShowS
$cshowList :: [ListTestGridSessionArtifacts] -> ShowS
show :: ListTestGridSessionArtifacts -> String
$cshow :: ListTestGridSessionArtifacts -> String
showsPrec :: Int -> ListTestGridSessionArtifacts -> ShowS
$cshowsPrec :: Int -> ListTestGridSessionArtifacts -> ShowS
Prelude.Show, (forall x.
 ListTestGridSessionArtifacts -> Rep ListTestGridSessionArtifacts x)
-> (forall x.
    Rep ListTestGridSessionArtifacts x -> ListTestGridSessionArtifacts)
-> Generic ListTestGridSessionArtifacts
forall x.
Rep ListTestGridSessionArtifacts x -> ListTestGridSessionArtifacts
forall x.
ListTestGridSessionArtifacts -> Rep ListTestGridSessionArtifacts x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListTestGridSessionArtifacts x -> ListTestGridSessionArtifacts
$cfrom :: forall x.
ListTestGridSessionArtifacts -> Rep ListTestGridSessionArtifacts x
Prelude.Generic)

-- |
-- Create a value of 'ListTestGridSessionArtifacts' 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:
--
-- 'maxResult', 'listTestGridSessionArtifacts_maxResult' - The maximum number of results to be returned by a request.
--
-- 'nextToken', 'listTestGridSessionArtifacts_nextToken' - Pagination token.
--
-- 'type'', 'listTestGridSessionArtifacts_type' - Limit results to a specified type of artifact.
--
-- 'sessionArn', 'listTestGridSessionArtifacts_sessionArn' - The ARN of a TestGridSession.
newListTestGridSessionArtifacts ::
  -- | 'sessionArn'
  Prelude.Text ->
  ListTestGridSessionArtifacts
newListTestGridSessionArtifacts :: Text -> ListTestGridSessionArtifacts
newListTestGridSessionArtifacts Text
pSessionArn_ =
  ListTestGridSessionArtifacts' :: Maybe Natural
-> Maybe Text
-> Maybe TestGridSessionArtifactCategory
-> Text
-> ListTestGridSessionArtifacts
ListTestGridSessionArtifacts'
    { $sel:maxResult:ListTestGridSessionArtifacts' :: Maybe Natural
maxResult =
        Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListTestGridSessionArtifacts' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:type':ListTestGridSessionArtifacts' :: Maybe TestGridSessionArtifactCategory
type' = Maybe TestGridSessionArtifactCategory
forall a. Maybe a
Prelude.Nothing,
      $sel:sessionArn:ListTestGridSessionArtifacts' :: Text
sessionArn = Text
pSessionArn_
    }

-- | The maximum number of results to be returned by a request.
listTestGridSessionArtifacts_maxResult :: Lens.Lens' ListTestGridSessionArtifacts (Prelude.Maybe Prelude.Natural)
listTestGridSessionArtifacts_maxResult :: (Maybe Natural -> f (Maybe Natural))
-> ListTestGridSessionArtifacts -> f ListTestGridSessionArtifacts
listTestGridSessionArtifacts_maxResult = (ListTestGridSessionArtifacts -> Maybe Natural)
-> (ListTestGridSessionArtifacts
    -> Maybe Natural -> ListTestGridSessionArtifacts)
-> Lens
     ListTestGridSessionArtifacts
     ListTestGridSessionArtifacts
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTestGridSessionArtifacts' {Maybe Natural
maxResult :: Maybe Natural
$sel:maxResult:ListTestGridSessionArtifacts' :: ListTestGridSessionArtifacts -> Maybe Natural
maxResult} -> Maybe Natural
maxResult) (\s :: ListTestGridSessionArtifacts
s@ListTestGridSessionArtifacts' {} Maybe Natural
a -> ListTestGridSessionArtifacts
s {$sel:maxResult:ListTestGridSessionArtifacts' :: Maybe Natural
maxResult = Maybe Natural
a} :: ListTestGridSessionArtifacts)

-- | Pagination token.
listTestGridSessionArtifacts_nextToken :: Lens.Lens' ListTestGridSessionArtifacts (Prelude.Maybe Prelude.Text)
listTestGridSessionArtifacts_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListTestGridSessionArtifacts -> f ListTestGridSessionArtifacts
listTestGridSessionArtifacts_nextToken = (ListTestGridSessionArtifacts -> Maybe Text)
-> (ListTestGridSessionArtifacts
    -> Maybe Text -> ListTestGridSessionArtifacts)
-> Lens
     ListTestGridSessionArtifacts
     ListTestGridSessionArtifacts
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTestGridSessionArtifacts' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListTestGridSessionArtifacts' :: ListTestGridSessionArtifacts -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListTestGridSessionArtifacts
s@ListTestGridSessionArtifacts' {} Maybe Text
a -> ListTestGridSessionArtifacts
s {$sel:nextToken:ListTestGridSessionArtifacts' :: Maybe Text
nextToken = Maybe Text
a} :: ListTestGridSessionArtifacts)

-- | Limit results to a specified type of artifact.
listTestGridSessionArtifacts_type :: Lens.Lens' ListTestGridSessionArtifacts (Prelude.Maybe TestGridSessionArtifactCategory)
listTestGridSessionArtifacts_type :: (Maybe TestGridSessionArtifactCategory
 -> f (Maybe TestGridSessionArtifactCategory))
-> ListTestGridSessionArtifacts -> f ListTestGridSessionArtifacts
listTestGridSessionArtifacts_type = (ListTestGridSessionArtifacts
 -> Maybe TestGridSessionArtifactCategory)
-> (ListTestGridSessionArtifacts
    -> Maybe TestGridSessionArtifactCategory
    -> ListTestGridSessionArtifacts)
-> Lens
     ListTestGridSessionArtifacts
     ListTestGridSessionArtifacts
     (Maybe TestGridSessionArtifactCategory)
     (Maybe TestGridSessionArtifactCategory)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTestGridSessionArtifacts' {Maybe TestGridSessionArtifactCategory
type' :: Maybe TestGridSessionArtifactCategory
$sel:type':ListTestGridSessionArtifacts' :: ListTestGridSessionArtifacts
-> Maybe TestGridSessionArtifactCategory
type'} -> Maybe TestGridSessionArtifactCategory
type') (\s :: ListTestGridSessionArtifacts
s@ListTestGridSessionArtifacts' {} Maybe TestGridSessionArtifactCategory
a -> ListTestGridSessionArtifacts
s {$sel:type':ListTestGridSessionArtifacts' :: Maybe TestGridSessionArtifactCategory
type' = Maybe TestGridSessionArtifactCategory
a} :: ListTestGridSessionArtifacts)

-- | The ARN of a TestGridSession.
listTestGridSessionArtifacts_sessionArn :: Lens.Lens' ListTestGridSessionArtifacts Prelude.Text
listTestGridSessionArtifacts_sessionArn :: (Text -> f Text)
-> ListTestGridSessionArtifacts -> f ListTestGridSessionArtifacts
listTestGridSessionArtifacts_sessionArn = (ListTestGridSessionArtifacts -> Text)
-> (ListTestGridSessionArtifacts
    -> Text -> ListTestGridSessionArtifacts)
-> Lens
     ListTestGridSessionArtifacts ListTestGridSessionArtifacts Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTestGridSessionArtifacts' {Text
sessionArn :: Text
$sel:sessionArn:ListTestGridSessionArtifacts' :: ListTestGridSessionArtifacts -> Text
sessionArn} -> Text
sessionArn) (\s :: ListTestGridSessionArtifacts
s@ListTestGridSessionArtifacts' {} Text
a -> ListTestGridSessionArtifacts
s {$sel:sessionArn:ListTestGridSessionArtifacts' :: Text
sessionArn = Text
a} :: ListTestGridSessionArtifacts)

instance Core.AWSRequest ListTestGridSessionArtifacts where
  type
    AWSResponse ListTestGridSessionArtifacts =
      ListTestGridSessionArtifactsResponse
  request :: ListTestGridSessionArtifacts
-> Request ListTestGridSessionArtifacts
request = Service
-> ListTestGridSessionArtifacts
-> Request ListTestGridSessionArtifacts
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListTestGridSessionArtifacts
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListTestGridSessionArtifacts)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListTestGridSessionArtifacts))
-> Logger
-> Service
-> Proxy ListTestGridSessionArtifacts
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListTestGridSessionArtifacts)))
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 [TestGridSessionArtifact]
-> Maybe Text -> Int -> ListTestGridSessionArtifactsResponse
ListTestGridSessionArtifactsResponse'
            (Maybe [TestGridSessionArtifact]
 -> Maybe Text -> Int -> ListTestGridSessionArtifactsResponse)
-> Either String (Maybe [TestGridSessionArtifact])
-> Either
     String (Maybe Text -> Int -> ListTestGridSessionArtifactsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Text -> Either String (Maybe (Maybe [TestGridSessionArtifact]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"artifacts" Either String (Maybe (Maybe [TestGridSessionArtifact]))
-> Maybe [TestGridSessionArtifact]
-> Either String (Maybe [TestGridSessionArtifact])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [TestGridSessionArtifact]
forall a. Monoid a => a
Prelude.mempty)
            Either
  String (Maybe Text -> Int -> ListTestGridSessionArtifactsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListTestGridSessionArtifactsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"nextToken")
            Either String (Int -> ListTestGridSessionArtifactsResponse)
-> Either String Int
-> Either String ListTestGridSessionArtifactsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance
  Prelude.Hashable
    ListTestGridSessionArtifacts

instance Prelude.NFData ListTestGridSessionArtifacts

instance Core.ToHeaders ListTestGridSessionArtifacts where
  toHeaders :: ListTestGridSessionArtifacts -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListTestGridSessionArtifacts -> 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
"DeviceFarm_20150623.ListTestGridSessionArtifacts" ::
                          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 ListTestGridSessionArtifacts where
  toJSON :: ListTestGridSessionArtifacts -> Value
toJSON ListTestGridSessionArtifacts' {Maybe Natural
Maybe Text
Maybe TestGridSessionArtifactCategory
Text
sessionArn :: Text
type' :: Maybe TestGridSessionArtifactCategory
nextToken :: Maybe Text
maxResult :: Maybe Natural
$sel:sessionArn:ListTestGridSessionArtifacts' :: ListTestGridSessionArtifacts -> Text
$sel:type':ListTestGridSessionArtifacts' :: ListTestGridSessionArtifacts
-> Maybe TestGridSessionArtifactCategory
$sel:nextToken:ListTestGridSessionArtifacts' :: ListTestGridSessionArtifacts -> Maybe Text
$sel:maxResult:ListTestGridSessionArtifacts' :: ListTestGridSessionArtifacts -> Maybe Natural
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"maxResult" 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
maxResult,
            (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
"type" Text -> TestGridSessionArtifactCategory -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (TestGridSessionArtifactCategory -> Pair)
-> Maybe TestGridSessionArtifactCategory -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TestGridSessionArtifactCategory
type',
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"sessionArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
sessionArn)
          ]
      )

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

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

-- | /See:/ 'newListTestGridSessionArtifactsResponse' smart constructor.
data ListTestGridSessionArtifactsResponse = ListTestGridSessionArtifactsResponse'
  { -- | A list of test grid session artifacts for a TestGridSession.
    ListTestGridSessionArtifactsResponse
-> Maybe [TestGridSessionArtifact]
artifacts :: Prelude.Maybe [TestGridSessionArtifact],
    -- | Pagination token.
    ListTestGridSessionArtifactsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListTestGridSessionArtifactsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListTestGridSessionArtifactsResponse
-> ListTestGridSessionArtifactsResponse -> Bool
(ListTestGridSessionArtifactsResponse
 -> ListTestGridSessionArtifactsResponse -> Bool)
-> (ListTestGridSessionArtifactsResponse
    -> ListTestGridSessionArtifactsResponse -> Bool)
-> Eq ListTestGridSessionArtifactsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListTestGridSessionArtifactsResponse
-> ListTestGridSessionArtifactsResponse -> Bool
$c/= :: ListTestGridSessionArtifactsResponse
-> ListTestGridSessionArtifactsResponse -> Bool
== :: ListTestGridSessionArtifactsResponse
-> ListTestGridSessionArtifactsResponse -> Bool
$c== :: ListTestGridSessionArtifactsResponse
-> ListTestGridSessionArtifactsResponse -> Bool
Prelude.Eq, Int -> ListTestGridSessionArtifactsResponse -> ShowS
[ListTestGridSessionArtifactsResponse] -> ShowS
ListTestGridSessionArtifactsResponse -> String
(Int -> ListTestGridSessionArtifactsResponse -> ShowS)
-> (ListTestGridSessionArtifactsResponse -> String)
-> ([ListTestGridSessionArtifactsResponse] -> ShowS)
-> Show ListTestGridSessionArtifactsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListTestGridSessionArtifactsResponse] -> ShowS
$cshowList :: [ListTestGridSessionArtifactsResponse] -> ShowS
show :: ListTestGridSessionArtifactsResponse -> String
$cshow :: ListTestGridSessionArtifactsResponse -> String
showsPrec :: Int -> ListTestGridSessionArtifactsResponse -> ShowS
$cshowsPrec :: Int -> ListTestGridSessionArtifactsResponse -> ShowS
Prelude.Show, (forall x.
 ListTestGridSessionArtifactsResponse
 -> Rep ListTestGridSessionArtifactsResponse x)
-> (forall x.
    Rep ListTestGridSessionArtifactsResponse x
    -> ListTestGridSessionArtifactsResponse)
-> Generic ListTestGridSessionArtifactsResponse
forall x.
Rep ListTestGridSessionArtifactsResponse x
-> ListTestGridSessionArtifactsResponse
forall x.
ListTestGridSessionArtifactsResponse
-> Rep ListTestGridSessionArtifactsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListTestGridSessionArtifactsResponse x
-> ListTestGridSessionArtifactsResponse
$cfrom :: forall x.
ListTestGridSessionArtifactsResponse
-> Rep ListTestGridSessionArtifactsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListTestGridSessionArtifactsResponse' 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:
--
-- 'artifacts', 'listTestGridSessionArtifactsResponse_artifacts' - A list of test grid session artifacts for a TestGridSession.
--
-- 'nextToken', 'listTestGridSessionArtifactsResponse_nextToken' - Pagination token.
--
-- 'httpStatus', 'listTestGridSessionArtifactsResponse_httpStatus' - The response's http status code.
newListTestGridSessionArtifactsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListTestGridSessionArtifactsResponse
newListTestGridSessionArtifactsResponse :: Int -> ListTestGridSessionArtifactsResponse
newListTestGridSessionArtifactsResponse Int
pHttpStatus_ =
  ListTestGridSessionArtifactsResponse' :: Maybe [TestGridSessionArtifact]
-> Maybe Text -> Int -> ListTestGridSessionArtifactsResponse
ListTestGridSessionArtifactsResponse'
    { $sel:artifacts:ListTestGridSessionArtifactsResponse' :: Maybe [TestGridSessionArtifact]
artifacts =
        Maybe [TestGridSessionArtifact]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListTestGridSessionArtifactsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListTestGridSessionArtifactsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A list of test grid session artifacts for a TestGridSession.
listTestGridSessionArtifactsResponse_artifacts :: Lens.Lens' ListTestGridSessionArtifactsResponse (Prelude.Maybe [TestGridSessionArtifact])
listTestGridSessionArtifactsResponse_artifacts :: (Maybe [TestGridSessionArtifact]
 -> f (Maybe [TestGridSessionArtifact]))
-> ListTestGridSessionArtifactsResponse
-> f ListTestGridSessionArtifactsResponse
listTestGridSessionArtifactsResponse_artifacts = (ListTestGridSessionArtifactsResponse
 -> Maybe [TestGridSessionArtifact])
-> (ListTestGridSessionArtifactsResponse
    -> Maybe [TestGridSessionArtifact]
    -> ListTestGridSessionArtifactsResponse)
-> Lens
     ListTestGridSessionArtifactsResponse
     ListTestGridSessionArtifactsResponse
     (Maybe [TestGridSessionArtifact])
     (Maybe [TestGridSessionArtifact])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTestGridSessionArtifactsResponse' {Maybe [TestGridSessionArtifact]
artifacts :: Maybe [TestGridSessionArtifact]
$sel:artifacts:ListTestGridSessionArtifactsResponse' :: ListTestGridSessionArtifactsResponse
-> Maybe [TestGridSessionArtifact]
artifacts} -> Maybe [TestGridSessionArtifact]
artifacts) (\s :: ListTestGridSessionArtifactsResponse
s@ListTestGridSessionArtifactsResponse' {} Maybe [TestGridSessionArtifact]
a -> ListTestGridSessionArtifactsResponse
s {$sel:artifacts:ListTestGridSessionArtifactsResponse' :: Maybe [TestGridSessionArtifact]
artifacts = Maybe [TestGridSessionArtifact]
a} :: ListTestGridSessionArtifactsResponse) ((Maybe [TestGridSessionArtifact]
  -> f (Maybe [TestGridSessionArtifact]))
 -> ListTestGridSessionArtifactsResponse
 -> f ListTestGridSessionArtifactsResponse)
-> ((Maybe [TestGridSessionArtifact]
     -> f (Maybe [TestGridSessionArtifact]))
    -> Maybe [TestGridSessionArtifact]
    -> f (Maybe [TestGridSessionArtifact]))
-> (Maybe [TestGridSessionArtifact]
    -> f (Maybe [TestGridSessionArtifact]))
-> ListTestGridSessionArtifactsResponse
-> f ListTestGridSessionArtifactsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [TestGridSessionArtifact]
  [TestGridSessionArtifact]
  [TestGridSessionArtifact]
  [TestGridSessionArtifact]
-> Iso
     (Maybe [TestGridSessionArtifact])
     (Maybe [TestGridSessionArtifact])
     (Maybe [TestGridSessionArtifact])
     (Maybe [TestGridSessionArtifact])
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
  [TestGridSessionArtifact]
  [TestGridSessionArtifact]
  [TestGridSessionArtifact]
  [TestGridSessionArtifact]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Pagination token.
listTestGridSessionArtifactsResponse_nextToken :: Lens.Lens' ListTestGridSessionArtifactsResponse (Prelude.Maybe Prelude.Text)
listTestGridSessionArtifactsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListTestGridSessionArtifactsResponse
-> f ListTestGridSessionArtifactsResponse
listTestGridSessionArtifactsResponse_nextToken = (ListTestGridSessionArtifactsResponse -> Maybe Text)
-> (ListTestGridSessionArtifactsResponse
    -> Maybe Text -> ListTestGridSessionArtifactsResponse)
-> Lens
     ListTestGridSessionArtifactsResponse
     ListTestGridSessionArtifactsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTestGridSessionArtifactsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListTestGridSessionArtifactsResponse' :: ListTestGridSessionArtifactsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListTestGridSessionArtifactsResponse
s@ListTestGridSessionArtifactsResponse' {} Maybe Text
a -> ListTestGridSessionArtifactsResponse
s {$sel:nextToken:ListTestGridSessionArtifactsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListTestGridSessionArtifactsResponse)

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

instance
  Prelude.NFData
    ListTestGridSessionArtifactsResponse