{-# 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.GreengrassV2.ListEffectiveDeployments
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Retrieves a paginated list of deployment jobs that IoT Greengrass sends
-- to Greengrass core devices.
--
-- This operation returns paginated results.
module Amazonka.GreengrassV2.ListEffectiveDeployments
  ( -- * Creating a Request
    ListEffectiveDeployments (..),
    newListEffectiveDeployments,

    -- * Request Lenses
    listEffectiveDeployments_maxResults,
    listEffectiveDeployments_nextToken,
    listEffectiveDeployments_coreDeviceThingName,

    -- * Destructuring the Response
    ListEffectiveDeploymentsResponse (..),
    newListEffectiveDeploymentsResponse,

    -- * Response Lenses
    listEffectiveDeploymentsResponse_effectiveDeployments,
    listEffectiveDeploymentsResponse_nextToken,
    listEffectiveDeploymentsResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListEffectiveDeployments' smart constructor.
data ListEffectiveDeployments = ListEffectiveDeployments'
  { -- | The maximum number of results to be returned per paginated request.
    ListEffectiveDeployments -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The token to be used for the next set of paginated results.
    ListEffectiveDeployments -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The name of the core device. This is also the name of the IoT thing.
    ListEffectiveDeployments -> Text
coreDeviceThingName :: Prelude.Text
  }
  deriving (ListEffectiveDeployments -> ListEffectiveDeployments -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListEffectiveDeployments -> ListEffectiveDeployments -> Bool
$c/= :: ListEffectiveDeployments -> ListEffectiveDeployments -> Bool
== :: ListEffectiveDeployments -> ListEffectiveDeployments -> Bool
$c== :: ListEffectiveDeployments -> ListEffectiveDeployments -> Bool
Prelude.Eq, ReadPrec [ListEffectiveDeployments]
ReadPrec ListEffectiveDeployments
Int -> ReadS ListEffectiveDeployments
ReadS [ListEffectiveDeployments]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListEffectiveDeployments]
$creadListPrec :: ReadPrec [ListEffectiveDeployments]
readPrec :: ReadPrec ListEffectiveDeployments
$creadPrec :: ReadPrec ListEffectiveDeployments
readList :: ReadS [ListEffectiveDeployments]
$creadList :: ReadS [ListEffectiveDeployments]
readsPrec :: Int -> ReadS ListEffectiveDeployments
$creadsPrec :: Int -> ReadS ListEffectiveDeployments
Prelude.Read, Int -> ListEffectiveDeployments -> ShowS
[ListEffectiveDeployments] -> ShowS
ListEffectiveDeployments -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListEffectiveDeployments] -> ShowS
$cshowList :: [ListEffectiveDeployments] -> ShowS
show :: ListEffectiveDeployments -> String
$cshow :: ListEffectiveDeployments -> String
showsPrec :: Int -> ListEffectiveDeployments -> ShowS
$cshowsPrec :: Int -> ListEffectiveDeployments -> ShowS
Prelude.Show, forall x.
Rep ListEffectiveDeployments x -> ListEffectiveDeployments
forall x.
ListEffectiveDeployments -> Rep ListEffectiveDeployments x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListEffectiveDeployments x -> ListEffectiveDeployments
$cfrom :: forall x.
ListEffectiveDeployments -> Rep ListEffectiveDeployments x
Prelude.Generic)

-- |
-- Create a value of 'ListEffectiveDeployments' 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', 'listEffectiveDeployments_maxResults' - The maximum number of results to be returned per paginated request.
--
-- 'nextToken', 'listEffectiveDeployments_nextToken' - The token to be used for the next set of paginated results.
--
-- 'coreDeviceThingName', 'listEffectiveDeployments_coreDeviceThingName' - The name of the core device. This is also the name of the IoT thing.
newListEffectiveDeployments ::
  -- | 'coreDeviceThingName'
  Prelude.Text ->
  ListEffectiveDeployments
newListEffectiveDeployments :: Text -> ListEffectiveDeployments
newListEffectiveDeployments Text
pCoreDeviceThingName_ =
  ListEffectiveDeployments'
    { $sel:maxResults:ListEffectiveDeployments' :: Maybe Natural
maxResults =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListEffectiveDeployments' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:coreDeviceThingName:ListEffectiveDeployments' :: Text
coreDeviceThingName = Text
pCoreDeviceThingName_
    }

-- | The maximum number of results to be returned per paginated request.
listEffectiveDeployments_maxResults :: Lens.Lens' ListEffectiveDeployments (Prelude.Maybe Prelude.Natural)
listEffectiveDeployments_maxResults :: Lens' ListEffectiveDeployments (Maybe Natural)
listEffectiveDeployments_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEffectiveDeployments' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListEffectiveDeployments' :: ListEffectiveDeployments -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListEffectiveDeployments
s@ListEffectiveDeployments' {} Maybe Natural
a -> ListEffectiveDeployments
s {$sel:maxResults:ListEffectiveDeployments' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListEffectiveDeployments)

-- | The token to be used for the next set of paginated results.
listEffectiveDeployments_nextToken :: Lens.Lens' ListEffectiveDeployments (Prelude.Maybe Prelude.Text)
listEffectiveDeployments_nextToken :: Lens' ListEffectiveDeployments (Maybe Text)
listEffectiveDeployments_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEffectiveDeployments' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListEffectiveDeployments' :: ListEffectiveDeployments -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListEffectiveDeployments
s@ListEffectiveDeployments' {} Maybe Text
a -> ListEffectiveDeployments
s {$sel:nextToken:ListEffectiveDeployments' :: Maybe Text
nextToken = Maybe Text
a} :: ListEffectiveDeployments)

-- | The name of the core device. This is also the name of the IoT thing.
listEffectiveDeployments_coreDeviceThingName :: Lens.Lens' ListEffectiveDeployments Prelude.Text
listEffectiveDeployments_coreDeviceThingName :: Lens' ListEffectiveDeployments Text
listEffectiveDeployments_coreDeviceThingName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEffectiveDeployments' {Text
coreDeviceThingName :: Text
$sel:coreDeviceThingName:ListEffectiveDeployments' :: ListEffectiveDeployments -> Text
coreDeviceThingName} -> Text
coreDeviceThingName) (\s :: ListEffectiveDeployments
s@ListEffectiveDeployments' {} Text
a -> ListEffectiveDeployments
s {$sel:coreDeviceThingName:ListEffectiveDeployments' :: Text
coreDeviceThingName = Text
a} :: ListEffectiveDeployments)

instance Core.AWSPager ListEffectiveDeployments where
  page :: ListEffectiveDeployments
-> AWSResponse ListEffectiveDeployments
-> Maybe ListEffectiveDeployments
page ListEffectiveDeployments
rq AWSResponse ListEffectiveDeployments
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListEffectiveDeployments
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListEffectiveDeploymentsResponse (Maybe Text)
listEffectiveDeploymentsResponse_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 ListEffectiveDeployments
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  ListEffectiveDeploymentsResponse (Maybe [EffectiveDeployment])
listEffectiveDeploymentsResponse_effectiveDeployments
            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.$ ListEffectiveDeployments
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListEffectiveDeployments (Maybe Text)
listEffectiveDeployments_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListEffectiveDeployments
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListEffectiveDeploymentsResponse (Maybe Text)
listEffectiveDeploymentsResponse_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 ListEffectiveDeployments where
  type
    AWSResponse ListEffectiveDeployments =
      ListEffectiveDeploymentsResponse
  request :: (Service -> Service)
-> ListEffectiveDeployments -> Request ListEffectiveDeployments
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 ListEffectiveDeployments
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListEffectiveDeployments)))
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 [EffectiveDeployment]
-> Maybe Text -> Int -> ListEffectiveDeploymentsResponse
ListEffectiveDeploymentsResponse'
            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
"effectiveDeployments"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"nextToken")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable ListEffectiveDeployments where
  hashWithSalt :: Int -> ListEffectiveDeployments -> Int
hashWithSalt Int
_salt ListEffectiveDeployments' {Maybe Natural
Maybe Text
Text
coreDeviceThingName :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:coreDeviceThingName:ListEffectiveDeployments' :: ListEffectiveDeployments -> Text
$sel:nextToken:ListEffectiveDeployments' :: ListEffectiveDeployments -> Maybe Text
$sel:maxResults:ListEffectiveDeployments' :: ListEffectiveDeployments -> Maybe Natural
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
coreDeviceThingName

instance Prelude.NFData ListEffectiveDeployments where
  rnf :: ListEffectiveDeployments -> ()
rnf ListEffectiveDeployments' {Maybe Natural
Maybe Text
Text
coreDeviceThingName :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:coreDeviceThingName:ListEffectiveDeployments' :: ListEffectiveDeployments -> Text
$sel:nextToken:ListEffectiveDeployments' :: ListEffectiveDeployments -> Maybe Text
$sel:maxResults:ListEffectiveDeployments' :: ListEffectiveDeployments -> Maybe Natural
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
coreDeviceThingName

instance Data.ToHeaders ListEffectiveDeployments where
  toHeaders :: ListEffectiveDeployments -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

instance Data.ToPath ListEffectiveDeployments where
  toPath :: ListEffectiveDeployments -> ByteString
toPath ListEffectiveDeployments' {Maybe Natural
Maybe Text
Text
coreDeviceThingName :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:coreDeviceThingName:ListEffectiveDeployments' :: ListEffectiveDeployments -> Text
$sel:nextToken:ListEffectiveDeployments' :: ListEffectiveDeployments -> Maybe Text
$sel:maxResults:ListEffectiveDeployments' :: ListEffectiveDeployments -> Maybe Natural
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/greengrass/v2/coreDevices/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
coreDeviceThingName,
        ByteString
"/effectiveDeployments"
      ]

instance Data.ToQuery ListEffectiveDeployments where
  toQuery :: ListEffectiveDeployments -> QueryString
toQuery ListEffectiveDeployments' {Maybe Natural
Maybe Text
Text
coreDeviceThingName :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:coreDeviceThingName:ListEffectiveDeployments' :: ListEffectiveDeployments -> Text
$sel:nextToken:ListEffectiveDeployments' :: ListEffectiveDeployments -> Maybe Text
$sel:maxResults:ListEffectiveDeployments' :: ListEffectiveDeployments -> Maybe Natural
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"maxResults" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
maxResults,
        ByteString
"nextToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken
      ]

-- | /See:/ 'newListEffectiveDeploymentsResponse' smart constructor.
data ListEffectiveDeploymentsResponse = ListEffectiveDeploymentsResponse'
  { -- | A list that summarizes each deployment on the core device.
    ListEffectiveDeploymentsResponse -> Maybe [EffectiveDeployment]
effectiveDeployments :: Prelude.Maybe [EffectiveDeployment],
    -- | The token for the next set of results, or null if there are no
    -- additional results.
    ListEffectiveDeploymentsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListEffectiveDeploymentsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListEffectiveDeploymentsResponse
-> ListEffectiveDeploymentsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListEffectiveDeploymentsResponse
-> ListEffectiveDeploymentsResponse -> Bool
$c/= :: ListEffectiveDeploymentsResponse
-> ListEffectiveDeploymentsResponse -> Bool
== :: ListEffectiveDeploymentsResponse
-> ListEffectiveDeploymentsResponse -> Bool
$c== :: ListEffectiveDeploymentsResponse
-> ListEffectiveDeploymentsResponse -> Bool
Prelude.Eq, ReadPrec [ListEffectiveDeploymentsResponse]
ReadPrec ListEffectiveDeploymentsResponse
Int -> ReadS ListEffectiveDeploymentsResponse
ReadS [ListEffectiveDeploymentsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListEffectiveDeploymentsResponse]
$creadListPrec :: ReadPrec [ListEffectiveDeploymentsResponse]
readPrec :: ReadPrec ListEffectiveDeploymentsResponse
$creadPrec :: ReadPrec ListEffectiveDeploymentsResponse
readList :: ReadS [ListEffectiveDeploymentsResponse]
$creadList :: ReadS [ListEffectiveDeploymentsResponse]
readsPrec :: Int -> ReadS ListEffectiveDeploymentsResponse
$creadsPrec :: Int -> ReadS ListEffectiveDeploymentsResponse
Prelude.Read, Int -> ListEffectiveDeploymentsResponse -> ShowS
[ListEffectiveDeploymentsResponse] -> ShowS
ListEffectiveDeploymentsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListEffectiveDeploymentsResponse] -> ShowS
$cshowList :: [ListEffectiveDeploymentsResponse] -> ShowS
show :: ListEffectiveDeploymentsResponse -> String
$cshow :: ListEffectiveDeploymentsResponse -> String
showsPrec :: Int -> ListEffectiveDeploymentsResponse -> ShowS
$cshowsPrec :: Int -> ListEffectiveDeploymentsResponse -> ShowS
Prelude.Show, forall x.
Rep ListEffectiveDeploymentsResponse x
-> ListEffectiveDeploymentsResponse
forall x.
ListEffectiveDeploymentsResponse
-> Rep ListEffectiveDeploymentsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListEffectiveDeploymentsResponse x
-> ListEffectiveDeploymentsResponse
$cfrom :: forall x.
ListEffectiveDeploymentsResponse
-> Rep ListEffectiveDeploymentsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListEffectiveDeploymentsResponse' 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:
--
-- 'effectiveDeployments', 'listEffectiveDeploymentsResponse_effectiveDeployments' - A list that summarizes each deployment on the core device.
--
-- 'nextToken', 'listEffectiveDeploymentsResponse_nextToken' - The token for the next set of results, or null if there are no
-- additional results.
--
-- 'httpStatus', 'listEffectiveDeploymentsResponse_httpStatus' - The response's http status code.
newListEffectiveDeploymentsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListEffectiveDeploymentsResponse
newListEffectiveDeploymentsResponse :: Int -> ListEffectiveDeploymentsResponse
newListEffectiveDeploymentsResponse Int
pHttpStatus_ =
  ListEffectiveDeploymentsResponse'
    { $sel:effectiveDeployments:ListEffectiveDeploymentsResponse' :: Maybe [EffectiveDeployment]
effectiveDeployments =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListEffectiveDeploymentsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListEffectiveDeploymentsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A list that summarizes each deployment on the core device.
listEffectiveDeploymentsResponse_effectiveDeployments :: Lens.Lens' ListEffectiveDeploymentsResponse (Prelude.Maybe [EffectiveDeployment])
listEffectiveDeploymentsResponse_effectiveDeployments :: Lens'
  ListEffectiveDeploymentsResponse (Maybe [EffectiveDeployment])
listEffectiveDeploymentsResponse_effectiveDeployments = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEffectiveDeploymentsResponse' {Maybe [EffectiveDeployment]
effectiveDeployments :: Maybe [EffectiveDeployment]
$sel:effectiveDeployments:ListEffectiveDeploymentsResponse' :: ListEffectiveDeploymentsResponse -> Maybe [EffectiveDeployment]
effectiveDeployments} -> Maybe [EffectiveDeployment]
effectiveDeployments) (\s :: ListEffectiveDeploymentsResponse
s@ListEffectiveDeploymentsResponse' {} Maybe [EffectiveDeployment]
a -> ListEffectiveDeploymentsResponse
s {$sel:effectiveDeployments:ListEffectiveDeploymentsResponse' :: Maybe [EffectiveDeployment]
effectiveDeployments = Maybe [EffectiveDeployment]
a} :: ListEffectiveDeploymentsResponse) 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 token for the next set of results, or null if there are no
-- additional results.
listEffectiveDeploymentsResponse_nextToken :: Lens.Lens' ListEffectiveDeploymentsResponse (Prelude.Maybe Prelude.Text)
listEffectiveDeploymentsResponse_nextToken :: Lens' ListEffectiveDeploymentsResponse (Maybe Text)
listEffectiveDeploymentsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEffectiveDeploymentsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListEffectiveDeploymentsResponse' :: ListEffectiveDeploymentsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListEffectiveDeploymentsResponse
s@ListEffectiveDeploymentsResponse' {} Maybe Text
a -> ListEffectiveDeploymentsResponse
s {$sel:nextToken:ListEffectiveDeploymentsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListEffectiveDeploymentsResponse)

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

instance
  Prelude.NFData
    ListEffectiveDeploymentsResponse
  where
  rnf :: ListEffectiveDeploymentsResponse -> ()
rnf ListEffectiveDeploymentsResponse' {Int
Maybe [EffectiveDeployment]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
effectiveDeployments :: Maybe [EffectiveDeployment]
$sel:httpStatus:ListEffectiveDeploymentsResponse' :: ListEffectiveDeploymentsResponse -> Int
$sel:nextToken:ListEffectiveDeploymentsResponse' :: ListEffectiveDeploymentsResponse -> Maybe Text
$sel:effectiveDeployments:ListEffectiveDeploymentsResponse' :: ListEffectiveDeploymentsResponse -> Maybe [EffectiveDeployment]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [EffectiveDeployment]
effectiveDeployments
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus