{-# 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.Batch.ListSchedulingPolicies
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns a list of Batch scheduling policies.
--
-- This operation returns paginated results.
module Amazonka.Batch.ListSchedulingPolicies
  ( -- * Creating a Request
    ListSchedulingPolicies (..),
    newListSchedulingPolicies,

    -- * Request Lenses
    listSchedulingPolicies_maxResults,
    listSchedulingPolicies_nextToken,

    -- * Destructuring the Response
    ListSchedulingPoliciesResponse (..),
    newListSchedulingPoliciesResponse,

    -- * Response Lenses
    listSchedulingPoliciesResponse_nextToken,
    listSchedulingPoliciesResponse_schedulingPolicies,
    listSchedulingPoliciesResponse_httpStatus,
  )
where

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

-- | Contains the parameters for @ListSchedulingPolicies@.
--
-- /See:/ 'newListSchedulingPolicies' smart constructor.
data ListSchedulingPolicies = ListSchedulingPolicies'
  { -- | The maximum number of results that\'s returned by
    -- @ListSchedulingPolicies@ in paginated output. When this parameter is
    -- used, @ListSchedulingPolicies@ only returns @maxResults@ results in a
    -- single page and a @nextToken@ response element. You can see the
    -- remaining results of the initial request by sending another
    -- @ListSchedulingPolicies@ request with the returned @nextToken@ value.
    -- This value can be between 1 and 100. If this parameter isn\'t used,
    -- @ListSchedulingPolicies@ returns up to 100 results and a @nextToken@
    -- value if applicable.
    ListSchedulingPolicies -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int,
    -- | The @nextToken@ value that\'s returned from a previous paginated
    -- @ListSchedulingPolicies@ request where @maxResults@ was used and the
    -- results exceeded the value of that parameter. Pagination continues from
    -- the end of the previous results that returned the @nextToken@ value.
    -- This value is @null@ when there are no more results to return.
    --
    -- Treat this token as an opaque identifier that\'s only used to retrieve
    -- the next items in a list and not for other programmatic purposes.
    ListSchedulingPolicies -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
  }
  deriving (ListSchedulingPolicies -> ListSchedulingPolicies -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListSchedulingPolicies -> ListSchedulingPolicies -> Bool
$c/= :: ListSchedulingPolicies -> ListSchedulingPolicies -> Bool
== :: ListSchedulingPolicies -> ListSchedulingPolicies -> Bool
$c== :: ListSchedulingPolicies -> ListSchedulingPolicies -> Bool
Prelude.Eq, ReadPrec [ListSchedulingPolicies]
ReadPrec ListSchedulingPolicies
Int -> ReadS ListSchedulingPolicies
ReadS [ListSchedulingPolicies]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListSchedulingPolicies]
$creadListPrec :: ReadPrec [ListSchedulingPolicies]
readPrec :: ReadPrec ListSchedulingPolicies
$creadPrec :: ReadPrec ListSchedulingPolicies
readList :: ReadS [ListSchedulingPolicies]
$creadList :: ReadS [ListSchedulingPolicies]
readsPrec :: Int -> ReadS ListSchedulingPolicies
$creadsPrec :: Int -> ReadS ListSchedulingPolicies
Prelude.Read, Int -> ListSchedulingPolicies -> ShowS
[ListSchedulingPolicies] -> ShowS
ListSchedulingPolicies -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListSchedulingPolicies] -> ShowS
$cshowList :: [ListSchedulingPolicies] -> ShowS
show :: ListSchedulingPolicies -> String
$cshow :: ListSchedulingPolicies -> String
showsPrec :: Int -> ListSchedulingPolicies -> ShowS
$cshowsPrec :: Int -> ListSchedulingPolicies -> ShowS
Prelude.Show, forall x. Rep ListSchedulingPolicies x -> ListSchedulingPolicies
forall x. ListSchedulingPolicies -> Rep ListSchedulingPolicies x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListSchedulingPolicies x -> ListSchedulingPolicies
$cfrom :: forall x. ListSchedulingPolicies -> Rep ListSchedulingPolicies x
Prelude.Generic)

-- |
-- Create a value of 'ListSchedulingPolicies' 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:
--
-- 'maxResults', 'listSchedulingPolicies_maxResults' - The maximum number of results that\'s returned by
-- @ListSchedulingPolicies@ in paginated output. When this parameter is
-- used, @ListSchedulingPolicies@ only returns @maxResults@ results in a
-- single page and a @nextToken@ response element. You can see the
-- remaining results of the initial request by sending another
-- @ListSchedulingPolicies@ request with the returned @nextToken@ value.
-- This value can be between 1 and 100. If this parameter isn\'t used,
-- @ListSchedulingPolicies@ returns up to 100 results and a @nextToken@
-- value if applicable.
--
-- 'nextToken', 'listSchedulingPolicies_nextToken' - The @nextToken@ value that\'s returned from a previous paginated
-- @ListSchedulingPolicies@ request where @maxResults@ was used and the
-- results exceeded the value of that parameter. Pagination continues from
-- the end of the previous results that returned the @nextToken@ value.
-- This value is @null@ when there are no more results to return.
--
-- Treat this token as an opaque identifier that\'s only used to retrieve
-- the next items in a list and not for other programmatic purposes.
newListSchedulingPolicies ::
  ListSchedulingPolicies
newListSchedulingPolicies :: ListSchedulingPolicies
newListSchedulingPolicies =
  ListSchedulingPolicies'
    { $sel:maxResults:ListSchedulingPolicies' :: Maybe Int
maxResults =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListSchedulingPolicies' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing
    }

-- | The maximum number of results that\'s returned by
-- @ListSchedulingPolicies@ in paginated output. When this parameter is
-- used, @ListSchedulingPolicies@ only returns @maxResults@ results in a
-- single page and a @nextToken@ response element. You can see the
-- remaining results of the initial request by sending another
-- @ListSchedulingPolicies@ request with the returned @nextToken@ value.
-- This value can be between 1 and 100. If this parameter isn\'t used,
-- @ListSchedulingPolicies@ returns up to 100 results and a @nextToken@
-- value if applicable.
listSchedulingPolicies_maxResults :: Lens.Lens' ListSchedulingPolicies (Prelude.Maybe Prelude.Int)
listSchedulingPolicies_maxResults :: Lens' ListSchedulingPolicies (Maybe Int)
listSchedulingPolicies_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSchedulingPolicies' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:ListSchedulingPolicies' :: ListSchedulingPolicies -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: ListSchedulingPolicies
s@ListSchedulingPolicies' {} Maybe Int
a -> ListSchedulingPolicies
s {$sel:maxResults:ListSchedulingPolicies' :: Maybe Int
maxResults = Maybe Int
a} :: ListSchedulingPolicies)

-- | The @nextToken@ value that\'s returned from a previous paginated
-- @ListSchedulingPolicies@ request where @maxResults@ was used and the
-- results exceeded the value of that parameter. Pagination continues from
-- the end of the previous results that returned the @nextToken@ value.
-- This value is @null@ when there are no more results to return.
--
-- Treat this token as an opaque identifier that\'s only used to retrieve
-- the next items in a list and not for other programmatic purposes.
listSchedulingPolicies_nextToken :: Lens.Lens' ListSchedulingPolicies (Prelude.Maybe Prelude.Text)
listSchedulingPolicies_nextToken :: Lens' ListSchedulingPolicies (Maybe Text)
listSchedulingPolicies_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSchedulingPolicies' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListSchedulingPolicies' :: ListSchedulingPolicies -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListSchedulingPolicies
s@ListSchedulingPolicies' {} Maybe Text
a -> ListSchedulingPolicies
s {$sel:nextToken:ListSchedulingPolicies' :: Maybe Text
nextToken = Maybe Text
a} :: ListSchedulingPolicies)

instance Core.AWSPager ListSchedulingPolicies where
  page :: ListSchedulingPolicies
-> AWSResponse ListSchedulingPolicies
-> Maybe ListSchedulingPolicies
page ListSchedulingPolicies
rq AWSResponse ListSchedulingPolicies
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListSchedulingPolicies
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListSchedulingPoliciesResponse (Maybe Text)
listSchedulingPoliciesResponse_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 ListSchedulingPolicies
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  ListSchedulingPoliciesResponse
  (Maybe [SchedulingPolicyListingDetail])
listSchedulingPoliciesResponse_schedulingPolicies
            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.$ ListSchedulingPolicies
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListSchedulingPolicies (Maybe Text)
listSchedulingPolicies_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListSchedulingPolicies
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListSchedulingPoliciesResponse (Maybe Text)
listSchedulingPoliciesResponse_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 ListSchedulingPolicies where
  type
    AWSResponse ListSchedulingPolicies =
      ListSchedulingPoliciesResponse
  request :: (Service -> Service)
-> ListSchedulingPolicies -> Request ListSchedulingPolicies
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 ListSchedulingPolicies
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListSchedulingPolicies)))
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 [SchedulingPolicyListingDetail]
-> Int
-> ListSchedulingPoliciesResponse
ListSchedulingPoliciesResponse'
            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
"schedulingPolicies"
                            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 ListSchedulingPolicies where
  hashWithSalt :: Int -> ListSchedulingPolicies -> Int
hashWithSalt Int
_salt ListSchedulingPolicies' {Maybe Int
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Int
$sel:nextToken:ListSchedulingPolicies' :: ListSchedulingPolicies -> Maybe Text
$sel:maxResults:ListSchedulingPolicies' :: ListSchedulingPolicies -> Maybe Int
..} =
    Int
_salt
      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 ListSchedulingPolicies where
  rnf :: ListSchedulingPolicies -> ()
rnf ListSchedulingPolicies' {Maybe Int
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Int
$sel:nextToken:ListSchedulingPolicies' :: ListSchedulingPolicies -> Maybe Text
$sel:maxResults:ListSchedulingPolicies' :: ListSchedulingPolicies -> Maybe Int
..} =
    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 ListSchedulingPolicies where
  toHeaders :: ListSchedulingPolicies -> 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.ToJSON ListSchedulingPolicies where
  toJSON :: ListSchedulingPolicies -> Value
toJSON ListSchedulingPolicies' {Maybe Int
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Int
$sel:nextToken:ListSchedulingPolicies' :: ListSchedulingPolicies -> Maybe Text
$sel:maxResults:ListSchedulingPolicies' :: ListSchedulingPolicies -> Maybe Int
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (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 Int
maxResults,
            (Key
"nextToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken
          ]
      )

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

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

-- | /See:/ 'newListSchedulingPoliciesResponse' smart constructor.
data ListSchedulingPoliciesResponse = ListSchedulingPoliciesResponse'
  { -- | The @nextToken@ value to include in a future @ListSchedulingPolicies@
    -- request. When the results of a @ListSchedulingPolicies@ request exceed
    -- @maxResults@, this value can be used to retrieve the next page of
    -- results. This value is @null@ when there are no more results to return.
    ListSchedulingPoliciesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | A list of scheduling policies that match the request.
    ListSchedulingPoliciesResponse
-> Maybe [SchedulingPolicyListingDetail]
schedulingPolicies :: Prelude.Maybe [SchedulingPolicyListingDetail],
    -- | The response's http status code.
    ListSchedulingPoliciesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListSchedulingPoliciesResponse
-> ListSchedulingPoliciesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListSchedulingPoliciesResponse
-> ListSchedulingPoliciesResponse -> Bool
$c/= :: ListSchedulingPoliciesResponse
-> ListSchedulingPoliciesResponse -> Bool
== :: ListSchedulingPoliciesResponse
-> ListSchedulingPoliciesResponse -> Bool
$c== :: ListSchedulingPoliciesResponse
-> ListSchedulingPoliciesResponse -> Bool
Prelude.Eq, ReadPrec [ListSchedulingPoliciesResponse]
ReadPrec ListSchedulingPoliciesResponse
Int -> ReadS ListSchedulingPoliciesResponse
ReadS [ListSchedulingPoliciesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListSchedulingPoliciesResponse]
$creadListPrec :: ReadPrec [ListSchedulingPoliciesResponse]
readPrec :: ReadPrec ListSchedulingPoliciesResponse
$creadPrec :: ReadPrec ListSchedulingPoliciesResponse
readList :: ReadS [ListSchedulingPoliciesResponse]
$creadList :: ReadS [ListSchedulingPoliciesResponse]
readsPrec :: Int -> ReadS ListSchedulingPoliciesResponse
$creadsPrec :: Int -> ReadS ListSchedulingPoliciesResponse
Prelude.Read, Int -> ListSchedulingPoliciesResponse -> ShowS
[ListSchedulingPoliciesResponse] -> ShowS
ListSchedulingPoliciesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListSchedulingPoliciesResponse] -> ShowS
$cshowList :: [ListSchedulingPoliciesResponse] -> ShowS
show :: ListSchedulingPoliciesResponse -> String
$cshow :: ListSchedulingPoliciesResponse -> String
showsPrec :: Int -> ListSchedulingPoliciesResponse -> ShowS
$cshowsPrec :: Int -> ListSchedulingPoliciesResponse -> ShowS
Prelude.Show, forall x.
Rep ListSchedulingPoliciesResponse x
-> ListSchedulingPoliciesResponse
forall x.
ListSchedulingPoliciesResponse
-> Rep ListSchedulingPoliciesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListSchedulingPoliciesResponse x
-> ListSchedulingPoliciesResponse
$cfrom :: forall x.
ListSchedulingPoliciesResponse
-> Rep ListSchedulingPoliciesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListSchedulingPoliciesResponse' 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', 'listSchedulingPoliciesResponse_nextToken' - The @nextToken@ value to include in a future @ListSchedulingPolicies@
-- request. When the results of a @ListSchedulingPolicies@ request exceed
-- @maxResults@, this value can be used to retrieve the next page of
-- results. This value is @null@ when there are no more results to return.
--
-- 'schedulingPolicies', 'listSchedulingPoliciesResponse_schedulingPolicies' - A list of scheduling policies that match the request.
--
-- 'httpStatus', 'listSchedulingPoliciesResponse_httpStatus' - The response's http status code.
newListSchedulingPoliciesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListSchedulingPoliciesResponse
newListSchedulingPoliciesResponse :: Int -> ListSchedulingPoliciesResponse
newListSchedulingPoliciesResponse Int
pHttpStatus_ =
  ListSchedulingPoliciesResponse'
    { $sel:nextToken:ListSchedulingPoliciesResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:schedulingPolicies:ListSchedulingPoliciesResponse' :: Maybe [SchedulingPolicyListingDetail]
schedulingPolicies = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListSchedulingPoliciesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The @nextToken@ value to include in a future @ListSchedulingPolicies@
-- request. When the results of a @ListSchedulingPolicies@ request exceed
-- @maxResults@, this value can be used to retrieve the next page of
-- results. This value is @null@ when there are no more results to return.
listSchedulingPoliciesResponse_nextToken :: Lens.Lens' ListSchedulingPoliciesResponse (Prelude.Maybe Prelude.Text)
listSchedulingPoliciesResponse_nextToken :: Lens' ListSchedulingPoliciesResponse (Maybe Text)
listSchedulingPoliciesResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSchedulingPoliciesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListSchedulingPoliciesResponse' :: ListSchedulingPoliciesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListSchedulingPoliciesResponse
s@ListSchedulingPoliciesResponse' {} Maybe Text
a -> ListSchedulingPoliciesResponse
s {$sel:nextToken:ListSchedulingPoliciesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListSchedulingPoliciesResponse)

-- | A list of scheduling policies that match the request.
listSchedulingPoliciesResponse_schedulingPolicies :: Lens.Lens' ListSchedulingPoliciesResponse (Prelude.Maybe [SchedulingPolicyListingDetail])
listSchedulingPoliciesResponse_schedulingPolicies :: Lens'
  ListSchedulingPoliciesResponse
  (Maybe [SchedulingPolicyListingDetail])
listSchedulingPoliciesResponse_schedulingPolicies = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSchedulingPoliciesResponse' {Maybe [SchedulingPolicyListingDetail]
schedulingPolicies :: Maybe [SchedulingPolicyListingDetail]
$sel:schedulingPolicies:ListSchedulingPoliciesResponse' :: ListSchedulingPoliciesResponse
-> Maybe [SchedulingPolicyListingDetail]
schedulingPolicies} -> Maybe [SchedulingPolicyListingDetail]
schedulingPolicies) (\s :: ListSchedulingPoliciesResponse
s@ListSchedulingPoliciesResponse' {} Maybe [SchedulingPolicyListingDetail]
a -> ListSchedulingPoliciesResponse
s {$sel:schedulingPolicies:ListSchedulingPoliciesResponse' :: Maybe [SchedulingPolicyListingDetail]
schedulingPolicies = Maybe [SchedulingPolicyListingDetail]
a} :: ListSchedulingPoliciesResponse) 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.
listSchedulingPoliciesResponse_httpStatus :: Lens.Lens' ListSchedulingPoliciesResponse Prelude.Int
listSchedulingPoliciesResponse_httpStatus :: Lens' ListSchedulingPoliciesResponse Int
listSchedulingPoliciesResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSchedulingPoliciesResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListSchedulingPoliciesResponse' :: ListSchedulingPoliciesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListSchedulingPoliciesResponse
s@ListSchedulingPoliciesResponse' {} Int
a -> ListSchedulingPoliciesResponse
s {$sel:httpStatus:ListSchedulingPoliciesResponse' :: Int
httpStatus = Int
a} :: ListSchedulingPoliciesResponse)

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