{-# 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.EMRContainers.ListJobTemplates
-- 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 job templates based on a set of parameters. Job template stores
-- values of StartJobRun API request in a template and can be used to start
-- a job run. Job template allows two use cases: avoid repeating recurring
-- StartJobRun API request values, enforcing certain values in StartJobRun
-- API request.
--
-- This operation returns paginated results.
module Amazonka.EMRContainers.ListJobTemplates
  ( -- * Creating a Request
    ListJobTemplates (..),
    newListJobTemplates,

    -- * Request Lenses
    listJobTemplates_createdAfter,
    listJobTemplates_createdBefore,
    listJobTemplates_maxResults,
    listJobTemplates_nextToken,

    -- * Destructuring the Response
    ListJobTemplatesResponse (..),
    newListJobTemplatesResponse,

    -- * Response Lenses
    listJobTemplatesResponse_nextToken,
    listJobTemplatesResponse_templates,
    listJobTemplatesResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListJobTemplates' smart constructor.
data ListJobTemplates = ListJobTemplates'
  { -- | The date and time after which the job templates were created.
    ListJobTemplates -> Maybe ISO8601
createdAfter :: Prelude.Maybe Data.ISO8601,
    -- | The date and time before which the job templates were created.
    ListJobTemplates -> Maybe ISO8601
createdBefore :: Prelude.Maybe Data.ISO8601,
    -- | The maximum number of job templates that can be listed.
    ListJobTemplates -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int,
    -- | The token for the next set of job templates to return.
    ListJobTemplates -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
  }
  deriving (ListJobTemplates -> ListJobTemplates -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListJobTemplates -> ListJobTemplates -> Bool
$c/= :: ListJobTemplates -> ListJobTemplates -> Bool
== :: ListJobTemplates -> ListJobTemplates -> Bool
$c== :: ListJobTemplates -> ListJobTemplates -> Bool
Prelude.Eq, ReadPrec [ListJobTemplates]
ReadPrec ListJobTemplates
Int -> ReadS ListJobTemplates
ReadS [ListJobTemplates]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListJobTemplates]
$creadListPrec :: ReadPrec [ListJobTemplates]
readPrec :: ReadPrec ListJobTemplates
$creadPrec :: ReadPrec ListJobTemplates
readList :: ReadS [ListJobTemplates]
$creadList :: ReadS [ListJobTemplates]
readsPrec :: Int -> ReadS ListJobTemplates
$creadsPrec :: Int -> ReadS ListJobTemplates
Prelude.Read, Int -> ListJobTemplates -> ShowS
[ListJobTemplates] -> ShowS
ListJobTemplates -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListJobTemplates] -> ShowS
$cshowList :: [ListJobTemplates] -> ShowS
show :: ListJobTemplates -> String
$cshow :: ListJobTemplates -> String
showsPrec :: Int -> ListJobTemplates -> ShowS
$cshowsPrec :: Int -> ListJobTemplates -> ShowS
Prelude.Show, forall x. Rep ListJobTemplates x -> ListJobTemplates
forall x. ListJobTemplates -> Rep ListJobTemplates x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListJobTemplates x -> ListJobTemplates
$cfrom :: forall x. ListJobTemplates -> Rep ListJobTemplates x
Prelude.Generic)

-- |
-- Create a value of 'ListJobTemplates' 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:
--
-- 'createdAfter', 'listJobTemplates_createdAfter' - The date and time after which the job templates were created.
--
-- 'createdBefore', 'listJobTemplates_createdBefore' - The date and time before which the job templates were created.
--
-- 'maxResults', 'listJobTemplates_maxResults' - The maximum number of job templates that can be listed.
--
-- 'nextToken', 'listJobTemplates_nextToken' - The token for the next set of job templates to return.
newListJobTemplates ::
  ListJobTemplates
newListJobTemplates :: ListJobTemplates
newListJobTemplates =
  ListJobTemplates'
    { $sel:createdAfter:ListJobTemplates' :: Maybe ISO8601
createdAfter = forall a. Maybe a
Prelude.Nothing,
      $sel:createdBefore:ListJobTemplates' :: Maybe ISO8601
createdBefore = forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListJobTemplates' :: Maybe Int
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListJobTemplates' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing
    }

-- | The date and time after which the job templates were created.
listJobTemplates_createdAfter :: Lens.Lens' ListJobTemplates (Prelude.Maybe Prelude.UTCTime)
listJobTemplates_createdAfter :: Lens' ListJobTemplates (Maybe UTCTime)
listJobTemplates_createdAfter = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListJobTemplates' {Maybe ISO8601
createdAfter :: Maybe ISO8601
$sel:createdAfter:ListJobTemplates' :: ListJobTemplates -> Maybe ISO8601
createdAfter} -> Maybe ISO8601
createdAfter) (\s :: ListJobTemplates
s@ListJobTemplates' {} Maybe ISO8601
a -> ListJobTemplates
s {$sel:createdAfter:ListJobTemplates' :: Maybe ISO8601
createdAfter = Maybe ISO8601
a} :: ListJobTemplates) 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 date and time before which the job templates were created.
listJobTemplates_createdBefore :: Lens.Lens' ListJobTemplates (Prelude.Maybe Prelude.UTCTime)
listJobTemplates_createdBefore :: Lens' ListJobTemplates (Maybe UTCTime)
listJobTemplates_createdBefore = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListJobTemplates' {Maybe ISO8601
createdBefore :: Maybe ISO8601
$sel:createdBefore:ListJobTemplates' :: ListJobTemplates -> Maybe ISO8601
createdBefore} -> Maybe ISO8601
createdBefore) (\s :: ListJobTemplates
s@ListJobTemplates' {} Maybe ISO8601
a -> ListJobTemplates
s {$sel:createdBefore:ListJobTemplates' :: Maybe ISO8601
createdBefore = Maybe ISO8601
a} :: ListJobTemplates) 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 maximum number of job templates that can be listed.
listJobTemplates_maxResults :: Lens.Lens' ListJobTemplates (Prelude.Maybe Prelude.Int)
listJobTemplates_maxResults :: Lens' ListJobTemplates (Maybe Int)
listJobTemplates_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListJobTemplates' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:ListJobTemplates' :: ListJobTemplates -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: ListJobTemplates
s@ListJobTemplates' {} Maybe Int
a -> ListJobTemplates
s {$sel:maxResults:ListJobTemplates' :: Maybe Int
maxResults = Maybe Int
a} :: ListJobTemplates)

-- | The token for the next set of job templates to return.
listJobTemplates_nextToken :: Lens.Lens' ListJobTemplates (Prelude.Maybe Prelude.Text)
listJobTemplates_nextToken :: Lens' ListJobTemplates (Maybe Text)
listJobTemplates_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListJobTemplates' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListJobTemplates' :: ListJobTemplates -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListJobTemplates
s@ListJobTemplates' {} Maybe Text
a -> ListJobTemplates
s {$sel:nextToken:ListJobTemplates' :: Maybe Text
nextToken = Maybe Text
a} :: ListJobTemplates)

instance Core.AWSPager ListJobTemplates where
  page :: ListJobTemplates
-> AWSResponse ListJobTemplates -> Maybe ListJobTemplates
page ListJobTemplates
rq AWSResponse ListJobTemplates
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListJobTemplates
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListJobTemplatesResponse (Maybe Text)
listJobTemplatesResponse_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 ListJobTemplates
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListJobTemplatesResponse (Maybe [JobTemplate])
listJobTemplatesResponse_templates
            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.$ ListJobTemplates
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListJobTemplates (Maybe Text)
listJobTemplates_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListJobTemplates
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListJobTemplatesResponse (Maybe Text)
listJobTemplatesResponse_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 ListJobTemplates where
  type
    AWSResponse ListJobTemplates =
      ListJobTemplatesResponse
  request :: (Service -> Service)
-> ListJobTemplates -> Request ListJobTemplates
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListJobTemplates
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListJobTemplates)))
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 Text
-> Maybe [JobTemplate] -> Int -> ListJobTemplatesResponse
ListJobTemplatesResponse'
            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
"nextToken")
            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
"templates" 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.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable ListJobTemplates where
  hashWithSalt :: Int -> ListJobTemplates -> Int
hashWithSalt Int
_salt ListJobTemplates' {Maybe Int
Maybe Text
Maybe ISO8601
nextToken :: Maybe Text
maxResults :: Maybe Int
createdBefore :: Maybe ISO8601
createdAfter :: Maybe ISO8601
$sel:nextToken:ListJobTemplates' :: ListJobTemplates -> Maybe Text
$sel:maxResults:ListJobTemplates' :: ListJobTemplates -> Maybe Int
$sel:createdBefore:ListJobTemplates' :: ListJobTemplates -> Maybe ISO8601
$sel:createdAfter:ListJobTemplates' :: ListJobTemplates -> Maybe ISO8601
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
createdAfter
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
createdBefore
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken

instance Prelude.NFData ListJobTemplates where
  rnf :: ListJobTemplates -> ()
rnf ListJobTemplates' {Maybe Int
Maybe Text
Maybe ISO8601
nextToken :: Maybe Text
maxResults :: Maybe Int
createdBefore :: Maybe ISO8601
createdAfter :: Maybe ISO8601
$sel:nextToken:ListJobTemplates' :: ListJobTemplates -> Maybe Text
$sel:maxResults:ListJobTemplates' :: ListJobTemplates -> Maybe Int
$sel:createdBefore:ListJobTemplates' :: ListJobTemplates -> Maybe ISO8601
$sel:createdAfter:ListJobTemplates' :: ListJobTemplates -> Maybe ISO8601
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
createdAfter
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
createdBefore
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken

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

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

instance Data.ToQuery ListJobTemplates where
  toQuery :: ListJobTemplates -> QueryString
toQuery ListJobTemplates' {Maybe Int
Maybe Text
Maybe ISO8601
nextToken :: Maybe Text
maxResults :: Maybe Int
createdBefore :: Maybe ISO8601
createdAfter :: Maybe ISO8601
$sel:nextToken:ListJobTemplates' :: ListJobTemplates -> Maybe Text
$sel:maxResults:ListJobTemplates' :: ListJobTemplates -> Maybe Int
$sel:createdBefore:ListJobTemplates' :: ListJobTemplates -> Maybe ISO8601
$sel:createdAfter:ListJobTemplates' :: ListJobTemplates -> Maybe ISO8601
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"createdAfter" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe ISO8601
createdAfter,
        ByteString
"createdBefore" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe ISO8601
createdBefore,
        ByteString
"maxResults" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
maxResults,
        ByteString
"nextToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken
      ]

-- | /See:/ 'newListJobTemplatesResponse' smart constructor.
data ListJobTemplatesResponse = ListJobTemplatesResponse'
  { -- | This output displays the token for the next set of job templates.
    ListJobTemplatesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | This output lists information about the specified job templates.
    ListJobTemplatesResponse -> Maybe [JobTemplate]
templates :: Prelude.Maybe [JobTemplate],
    -- | The response's http status code.
    ListJobTemplatesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListJobTemplatesResponse -> ListJobTemplatesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListJobTemplatesResponse -> ListJobTemplatesResponse -> Bool
$c/= :: ListJobTemplatesResponse -> ListJobTemplatesResponse -> Bool
== :: ListJobTemplatesResponse -> ListJobTemplatesResponse -> Bool
$c== :: ListJobTemplatesResponse -> ListJobTemplatesResponse -> Bool
Prelude.Eq, Int -> ListJobTemplatesResponse -> ShowS
[ListJobTemplatesResponse] -> ShowS
ListJobTemplatesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListJobTemplatesResponse] -> ShowS
$cshowList :: [ListJobTemplatesResponse] -> ShowS
show :: ListJobTemplatesResponse -> String
$cshow :: ListJobTemplatesResponse -> String
showsPrec :: Int -> ListJobTemplatesResponse -> ShowS
$cshowsPrec :: Int -> ListJobTemplatesResponse -> ShowS
Prelude.Show, forall x.
Rep ListJobTemplatesResponse x -> ListJobTemplatesResponse
forall x.
ListJobTemplatesResponse -> Rep ListJobTemplatesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListJobTemplatesResponse x -> ListJobTemplatesResponse
$cfrom :: forall x.
ListJobTemplatesResponse -> Rep ListJobTemplatesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListJobTemplatesResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'nextToken', 'listJobTemplatesResponse_nextToken' - This output displays the token for the next set of job templates.
--
-- 'templates', 'listJobTemplatesResponse_templates' - This output lists information about the specified job templates.
--
-- 'httpStatus', 'listJobTemplatesResponse_httpStatus' - The response's http status code.
newListJobTemplatesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListJobTemplatesResponse
newListJobTemplatesResponse :: Int -> ListJobTemplatesResponse
newListJobTemplatesResponse Int
pHttpStatus_ =
  ListJobTemplatesResponse'
    { $sel:nextToken:ListJobTemplatesResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:templates:ListJobTemplatesResponse' :: Maybe [JobTemplate]
templates = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListJobTemplatesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | This output displays the token for the next set of job templates.
listJobTemplatesResponse_nextToken :: Lens.Lens' ListJobTemplatesResponse (Prelude.Maybe Prelude.Text)
listJobTemplatesResponse_nextToken :: Lens' ListJobTemplatesResponse (Maybe Text)
listJobTemplatesResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListJobTemplatesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListJobTemplatesResponse' :: ListJobTemplatesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListJobTemplatesResponse
s@ListJobTemplatesResponse' {} Maybe Text
a -> ListJobTemplatesResponse
s {$sel:nextToken:ListJobTemplatesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListJobTemplatesResponse)

-- | This output lists information about the specified job templates.
listJobTemplatesResponse_templates :: Lens.Lens' ListJobTemplatesResponse (Prelude.Maybe [JobTemplate])
listJobTemplatesResponse_templates :: Lens' ListJobTemplatesResponse (Maybe [JobTemplate])
listJobTemplatesResponse_templates = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListJobTemplatesResponse' {Maybe [JobTemplate]
templates :: Maybe [JobTemplate]
$sel:templates:ListJobTemplatesResponse' :: ListJobTemplatesResponse -> Maybe [JobTemplate]
templates} -> Maybe [JobTemplate]
templates) (\s :: ListJobTemplatesResponse
s@ListJobTemplatesResponse' {} Maybe [JobTemplate]
a -> ListJobTemplatesResponse
s {$sel:templates:ListJobTemplatesResponse' :: Maybe [JobTemplate]
templates = Maybe [JobTemplate]
a} :: ListJobTemplatesResponse) 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 response's http status code.
listJobTemplatesResponse_httpStatus :: Lens.Lens' ListJobTemplatesResponse Prelude.Int
listJobTemplatesResponse_httpStatus :: Lens' ListJobTemplatesResponse Int
listJobTemplatesResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListJobTemplatesResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListJobTemplatesResponse' :: ListJobTemplatesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListJobTemplatesResponse
s@ListJobTemplatesResponse' {} Int
a -> ListJobTemplatesResponse
s {$sel:httpStatus:ListJobTemplatesResponse' :: Int
httpStatus = Int
a} :: ListJobTemplatesResponse)

instance Prelude.NFData ListJobTemplatesResponse where
  rnf :: ListJobTemplatesResponse -> ()
rnf ListJobTemplatesResponse' {Int
Maybe [JobTemplate]
Maybe Text
httpStatus :: Int
templates :: Maybe [JobTemplate]
nextToken :: Maybe Text
$sel:httpStatus:ListJobTemplatesResponse' :: ListJobTemplatesResponse -> Int
$sel:templates:ListJobTemplatesResponse' :: ListJobTemplatesResponse -> Maybe [JobTemplate]
$sel:nextToken:ListJobTemplatesResponse' :: ListJobTemplatesResponse -> Maybe Text
..} =
    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 [JobTemplate]
templates
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus