{-# 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.MGN.ListSourceServerActions
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- List source server post migration custom actions.
--
-- This operation returns paginated results.
module Amazonka.MGN.ListSourceServerActions
  ( -- * Creating a Request
    ListSourceServerActions (..),
    newListSourceServerActions,

    -- * Request Lenses
    listSourceServerActions_filters,
    listSourceServerActions_maxResults,
    listSourceServerActions_nextToken,
    listSourceServerActions_sourceServerID,

    -- * Destructuring the Response
    ListSourceServerActionsResponse (..),
    newListSourceServerActionsResponse,

    -- * Response Lenses
    listSourceServerActionsResponse_items,
    listSourceServerActionsResponse_nextToken,
    listSourceServerActionsResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListSourceServerActions' smart constructor.
data ListSourceServerActions = ListSourceServerActions'
  { -- | Filters to apply when listing source server post migration custom
    -- actions.
    ListSourceServerActions -> Maybe SourceServerActionsRequestFilters
filters :: Prelude.Maybe SourceServerActionsRequestFilters,
    -- | Maximum amount of items to return when listing source server post
    -- migration custom actions.
    ListSourceServerActions -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | Next token to use when listing source server post migration custom
    -- actions.
    ListSourceServerActions -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Source server ID.
    ListSourceServerActions -> Text
sourceServerID :: Prelude.Text
  }
  deriving (ListSourceServerActions -> ListSourceServerActions -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListSourceServerActions -> ListSourceServerActions -> Bool
$c/= :: ListSourceServerActions -> ListSourceServerActions -> Bool
== :: ListSourceServerActions -> ListSourceServerActions -> Bool
$c== :: ListSourceServerActions -> ListSourceServerActions -> Bool
Prelude.Eq, ReadPrec [ListSourceServerActions]
ReadPrec ListSourceServerActions
Int -> ReadS ListSourceServerActions
ReadS [ListSourceServerActions]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListSourceServerActions]
$creadListPrec :: ReadPrec [ListSourceServerActions]
readPrec :: ReadPrec ListSourceServerActions
$creadPrec :: ReadPrec ListSourceServerActions
readList :: ReadS [ListSourceServerActions]
$creadList :: ReadS [ListSourceServerActions]
readsPrec :: Int -> ReadS ListSourceServerActions
$creadsPrec :: Int -> ReadS ListSourceServerActions
Prelude.Read, Int -> ListSourceServerActions -> ShowS
[ListSourceServerActions] -> ShowS
ListSourceServerActions -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListSourceServerActions] -> ShowS
$cshowList :: [ListSourceServerActions] -> ShowS
show :: ListSourceServerActions -> String
$cshow :: ListSourceServerActions -> String
showsPrec :: Int -> ListSourceServerActions -> ShowS
$cshowsPrec :: Int -> ListSourceServerActions -> ShowS
Prelude.Show, forall x. Rep ListSourceServerActions x -> ListSourceServerActions
forall x. ListSourceServerActions -> Rep ListSourceServerActions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListSourceServerActions x -> ListSourceServerActions
$cfrom :: forall x. ListSourceServerActions -> Rep ListSourceServerActions x
Prelude.Generic)

-- |
-- Create a value of 'ListSourceServerActions' 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:
--
-- 'filters', 'listSourceServerActions_filters' - Filters to apply when listing source server post migration custom
-- actions.
--
-- 'maxResults', 'listSourceServerActions_maxResults' - Maximum amount of items to return when listing source server post
-- migration custom actions.
--
-- 'nextToken', 'listSourceServerActions_nextToken' - Next token to use when listing source server post migration custom
-- actions.
--
-- 'sourceServerID', 'listSourceServerActions_sourceServerID' - Source server ID.
newListSourceServerActions ::
  -- | 'sourceServerID'
  Prelude.Text ->
  ListSourceServerActions
newListSourceServerActions :: Text -> ListSourceServerActions
newListSourceServerActions Text
pSourceServerID_ =
  ListSourceServerActions'
    { $sel:filters:ListSourceServerActions' :: Maybe SourceServerActionsRequestFilters
filters = forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListSourceServerActions' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListSourceServerActions' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:sourceServerID:ListSourceServerActions' :: Text
sourceServerID = Text
pSourceServerID_
    }

-- | Filters to apply when listing source server post migration custom
-- actions.
listSourceServerActions_filters :: Lens.Lens' ListSourceServerActions (Prelude.Maybe SourceServerActionsRequestFilters)
listSourceServerActions_filters :: Lens'
  ListSourceServerActions (Maybe SourceServerActionsRequestFilters)
listSourceServerActions_filters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSourceServerActions' {Maybe SourceServerActionsRequestFilters
filters :: Maybe SourceServerActionsRequestFilters
$sel:filters:ListSourceServerActions' :: ListSourceServerActions -> Maybe SourceServerActionsRequestFilters
filters} -> Maybe SourceServerActionsRequestFilters
filters) (\s :: ListSourceServerActions
s@ListSourceServerActions' {} Maybe SourceServerActionsRequestFilters
a -> ListSourceServerActions
s {$sel:filters:ListSourceServerActions' :: Maybe SourceServerActionsRequestFilters
filters = Maybe SourceServerActionsRequestFilters
a} :: ListSourceServerActions)

-- | Maximum amount of items to return when listing source server post
-- migration custom actions.
listSourceServerActions_maxResults :: Lens.Lens' ListSourceServerActions (Prelude.Maybe Prelude.Natural)
listSourceServerActions_maxResults :: Lens' ListSourceServerActions (Maybe Natural)
listSourceServerActions_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSourceServerActions' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListSourceServerActions' :: ListSourceServerActions -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListSourceServerActions
s@ListSourceServerActions' {} Maybe Natural
a -> ListSourceServerActions
s {$sel:maxResults:ListSourceServerActions' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListSourceServerActions)

-- | Next token to use when listing source server post migration custom
-- actions.
listSourceServerActions_nextToken :: Lens.Lens' ListSourceServerActions (Prelude.Maybe Prelude.Text)
listSourceServerActions_nextToken :: Lens' ListSourceServerActions (Maybe Text)
listSourceServerActions_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSourceServerActions' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListSourceServerActions' :: ListSourceServerActions -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListSourceServerActions
s@ListSourceServerActions' {} Maybe Text
a -> ListSourceServerActions
s {$sel:nextToken:ListSourceServerActions' :: Maybe Text
nextToken = Maybe Text
a} :: ListSourceServerActions)

-- | Source server ID.
listSourceServerActions_sourceServerID :: Lens.Lens' ListSourceServerActions Prelude.Text
listSourceServerActions_sourceServerID :: Lens' ListSourceServerActions Text
listSourceServerActions_sourceServerID = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSourceServerActions' {Text
sourceServerID :: Text
$sel:sourceServerID:ListSourceServerActions' :: ListSourceServerActions -> Text
sourceServerID} -> Text
sourceServerID) (\s :: ListSourceServerActions
s@ListSourceServerActions' {} Text
a -> ListSourceServerActions
s {$sel:sourceServerID:ListSourceServerActions' :: Text
sourceServerID = Text
a} :: ListSourceServerActions)

instance Core.AWSPager ListSourceServerActions where
  page :: ListSourceServerActions
-> AWSResponse ListSourceServerActions
-> Maybe ListSourceServerActions
page ListSourceServerActions
rq AWSResponse ListSourceServerActions
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListSourceServerActions
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListSourceServerActionsResponse (Maybe Text)
listSourceServerActionsResponse_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 ListSourceServerActions
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  ListSourceServerActionsResponse
  (Maybe [SourceServerActionDocument])
listSourceServerActionsResponse_items
            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.$ ListSourceServerActions
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListSourceServerActions (Maybe Text)
listSourceServerActions_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListSourceServerActions
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListSourceServerActionsResponse (Maybe Text)
listSourceServerActionsResponse_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 ListSourceServerActions where
  type
    AWSResponse ListSourceServerActions =
      ListSourceServerActionsResponse
  request :: (Service -> Service)
-> ListSourceServerActions -> Request ListSourceServerActions
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 ListSourceServerActions
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListSourceServerActions)))
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 [SourceServerActionDocument]
-> Maybe Text -> Int -> ListSourceServerActionsResponse
ListSourceServerActionsResponse'
            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
"items" 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 ListSourceServerActions where
  hashWithSalt :: Int -> ListSourceServerActions -> Int
hashWithSalt Int
_salt ListSourceServerActions' {Maybe Natural
Maybe Text
Maybe SourceServerActionsRequestFilters
Text
sourceServerID :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe SourceServerActionsRequestFilters
$sel:sourceServerID:ListSourceServerActions' :: ListSourceServerActions -> Text
$sel:nextToken:ListSourceServerActions' :: ListSourceServerActions -> Maybe Text
$sel:maxResults:ListSourceServerActions' :: ListSourceServerActions -> Maybe Natural
$sel:filters:ListSourceServerActions' :: ListSourceServerActions -> Maybe SourceServerActionsRequestFilters
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SourceServerActionsRequestFilters
filters
      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
sourceServerID

instance Prelude.NFData ListSourceServerActions where
  rnf :: ListSourceServerActions -> ()
rnf ListSourceServerActions' {Maybe Natural
Maybe Text
Maybe SourceServerActionsRequestFilters
Text
sourceServerID :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe SourceServerActionsRequestFilters
$sel:sourceServerID:ListSourceServerActions' :: ListSourceServerActions -> Text
$sel:nextToken:ListSourceServerActions' :: ListSourceServerActions -> Maybe Text
$sel:maxResults:ListSourceServerActions' :: ListSourceServerActions -> Maybe Natural
$sel:filters:ListSourceServerActions' :: ListSourceServerActions -> Maybe SourceServerActionsRequestFilters
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe SourceServerActionsRequestFilters
filters
      seq :: forall a b. a -> b -> b
`Prelude.seq` 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
sourceServerID

instance Data.ToHeaders ListSourceServerActions where
  toHeaders :: ListSourceServerActions -> 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 ListSourceServerActions where
  toJSON :: ListSourceServerActions -> Value
toJSON ListSourceServerActions' {Maybe Natural
Maybe Text
Maybe SourceServerActionsRequestFilters
Text
sourceServerID :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe SourceServerActionsRequestFilters
$sel:sourceServerID:ListSourceServerActions' :: ListSourceServerActions -> Text
$sel:nextToken:ListSourceServerActions' :: ListSourceServerActions -> Maybe Text
$sel:maxResults:ListSourceServerActions' :: ListSourceServerActions -> Maybe Natural
$sel:filters:ListSourceServerActions' :: ListSourceServerActions -> Maybe SourceServerActionsRequestFilters
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"filters" 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 SourceServerActionsRequestFilters
filters,
            (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 Natural
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,
            forall a. a -> Maybe a
Prelude.Just
              (Key
"sourceServerID" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
sourceServerID)
          ]
      )

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

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

-- | /See:/ 'newListSourceServerActionsResponse' smart constructor.
data ListSourceServerActionsResponse = ListSourceServerActionsResponse'
  { -- | List of source server post migration custom actions.
    ListSourceServerActionsResponse
-> Maybe [SourceServerActionDocument]
items :: Prelude.Maybe [SourceServerActionDocument],
    -- | Next token returned when listing source server post migration custom
    -- actions.
    ListSourceServerActionsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListSourceServerActionsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListSourceServerActionsResponse
-> ListSourceServerActionsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListSourceServerActionsResponse
-> ListSourceServerActionsResponse -> Bool
$c/= :: ListSourceServerActionsResponse
-> ListSourceServerActionsResponse -> Bool
== :: ListSourceServerActionsResponse
-> ListSourceServerActionsResponse -> Bool
$c== :: ListSourceServerActionsResponse
-> ListSourceServerActionsResponse -> Bool
Prelude.Eq, ReadPrec [ListSourceServerActionsResponse]
ReadPrec ListSourceServerActionsResponse
Int -> ReadS ListSourceServerActionsResponse
ReadS [ListSourceServerActionsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListSourceServerActionsResponse]
$creadListPrec :: ReadPrec [ListSourceServerActionsResponse]
readPrec :: ReadPrec ListSourceServerActionsResponse
$creadPrec :: ReadPrec ListSourceServerActionsResponse
readList :: ReadS [ListSourceServerActionsResponse]
$creadList :: ReadS [ListSourceServerActionsResponse]
readsPrec :: Int -> ReadS ListSourceServerActionsResponse
$creadsPrec :: Int -> ReadS ListSourceServerActionsResponse
Prelude.Read, Int -> ListSourceServerActionsResponse -> ShowS
[ListSourceServerActionsResponse] -> ShowS
ListSourceServerActionsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListSourceServerActionsResponse] -> ShowS
$cshowList :: [ListSourceServerActionsResponse] -> ShowS
show :: ListSourceServerActionsResponse -> String
$cshow :: ListSourceServerActionsResponse -> String
showsPrec :: Int -> ListSourceServerActionsResponse -> ShowS
$cshowsPrec :: Int -> ListSourceServerActionsResponse -> ShowS
Prelude.Show, forall x.
Rep ListSourceServerActionsResponse x
-> ListSourceServerActionsResponse
forall x.
ListSourceServerActionsResponse
-> Rep ListSourceServerActionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListSourceServerActionsResponse x
-> ListSourceServerActionsResponse
$cfrom :: forall x.
ListSourceServerActionsResponse
-> Rep ListSourceServerActionsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListSourceServerActionsResponse' 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:
--
-- 'items', 'listSourceServerActionsResponse_items' - List of source server post migration custom actions.
--
-- 'nextToken', 'listSourceServerActionsResponse_nextToken' - Next token returned when listing source server post migration custom
-- actions.
--
-- 'httpStatus', 'listSourceServerActionsResponse_httpStatus' - The response's http status code.
newListSourceServerActionsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListSourceServerActionsResponse
newListSourceServerActionsResponse :: Int -> ListSourceServerActionsResponse
newListSourceServerActionsResponse Int
pHttpStatus_ =
  ListSourceServerActionsResponse'
    { $sel:items:ListSourceServerActionsResponse' :: Maybe [SourceServerActionDocument]
items =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListSourceServerActionsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListSourceServerActionsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | List of source server post migration custom actions.
listSourceServerActionsResponse_items :: Lens.Lens' ListSourceServerActionsResponse (Prelude.Maybe [SourceServerActionDocument])
listSourceServerActionsResponse_items :: Lens'
  ListSourceServerActionsResponse
  (Maybe [SourceServerActionDocument])
listSourceServerActionsResponse_items = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSourceServerActionsResponse' {Maybe [SourceServerActionDocument]
items :: Maybe [SourceServerActionDocument]
$sel:items:ListSourceServerActionsResponse' :: ListSourceServerActionsResponse
-> Maybe [SourceServerActionDocument]
items} -> Maybe [SourceServerActionDocument]
items) (\s :: ListSourceServerActionsResponse
s@ListSourceServerActionsResponse' {} Maybe [SourceServerActionDocument]
a -> ListSourceServerActionsResponse
s {$sel:items:ListSourceServerActionsResponse' :: Maybe [SourceServerActionDocument]
items = Maybe [SourceServerActionDocument]
a} :: ListSourceServerActionsResponse) 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

-- | Next token returned when listing source server post migration custom
-- actions.
listSourceServerActionsResponse_nextToken :: Lens.Lens' ListSourceServerActionsResponse (Prelude.Maybe Prelude.Text)
listSourceServerActionsResponse_nextToken :: Lens' ListSourceServerActionsResponse (Maybe Text)
listSourceServerActionsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSourceServerActionsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListSourceServerActionsResponse' :: ListSourceServerActionsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListSourceServerActionsResponse
s@ListSourceServerActionsResponse' {} Maybe Text
a -> ListSourceServerActionsResponse
s {$sel:nextToken:ListSourceServerActionsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListSourceServerActionsResponse)

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

instance
  Prelude.NFData
    ListSourceServerActionsResponse
  where
  rnf :: ListSourceServerActionsResponse -> ()
rnf ListSourceServerActionsResponse' {Int
Maybe [SourceServerActionDocument]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
items :: Maybe [SourceServerActionDocument]
$sel:httpStatus:ListSourceServerActionsResponse' :: ListSourceServerActionsResponse -> Int
$sel:nextToken:ListSourceServerActionsResponse' :: ListSourceServerActionsResponse -> Maybe Text
$sel:items:ListSourceServerActionsResponse' :: ListSourceServerActionsResponse
-> Maybe [SourceServerActionDocument]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [SourceServerActionDocument]
items
      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