{-# 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.SMS.GetReplicationRuns
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Describes the replication runs for the specified replication job.
--
-- This operation returns paginated results.
module Amazonka.SMS.GetReplicationRuns
  ( -- * Creating a Request
    GetReplicationRuns (..),
    newGetReplicationRuns,

    -- * Request Lenses
    getReplicationRuns_maxResults,
    getReplicationRuns_nextToken,
    getReplicationRuns_replicationJobId,

    -- * Destructuring the Response
    GetReplicationRunsResponse (..),
    newGetReplicationRunsResponse,

    -- * Response Lenses
    getReplicationRunsResponse_nextToken,
    getReplicationRunsResponse_replicationJob,
    getReplicationRunsResponse_replicationRunList,
    getReplicationRunsResponse_httpStatus,
  )
where

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
import Amazonka.SMS.Types

-- | /See:/ 'newGetReplicationRuns' smart constructor.
data GetReplicationRuns = GetReplicationRuns'
  { -- | The maximum number of results to return in a single call. The default
    -- value is 50. To retrieve the remaining results, make another call with
    -- the returned @NextToken@ value.
    GetReplicationRuns -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int,
    -- | The token for the next set of results.
    GetReplicationRuns -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The ID of the replication job.
    GetReplicationRuns -> Text
replicationJobId :: Prelude.Text
  }
  deriving (GetReplicationRuns -> GetReplicationRuns -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetReplicationRuns -> GetReplicationRuns -> Bool
$c/= :: GetReplicationRuns -> GetReplicationRuns -> Bool
== :: GetReplicationRuns -> GetReplicationRuns -> Bool
$c== :: GetReplicationRuns -> GetReplicationRuns -> Bool
Prelude.Eq, ReadPrec [GetReplicationRuns]
ReadPrec GetReplicationRuns
Int -> ReadS GetReplicationRuns
ReadS [GetReplicationRuns]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetReplicationRuns]
$creadListPrec :: ReadPrec [GetReplicationRuns]
readPrec :: ReadPrec GetReplicationRuns
$creadPrec :: ReadPrec GetReplicationRuns
readList :: ReadS [GetReplicationRuns]
$creadList :: ReadS [GetReplicationRuns]
readsPrec :: Int -> ReadS GetReplicationRuns
$creadsPrec :: Int -> ReadS GetReplicationRuns
Prelude.Read, Int -> GetReplicationRuns -> ShowS
[GetReplicationRuns] -> ShowS
GetReplicationRuns -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetReplicationRuns] -> ShowS
$cshowList :: [GetReplicationRuns] -> ShowS
show :: GetReplicationRuns -> String
$cshow :: GetReplicationRuns -> String
showsPrec :: Int -> GetReplicationRuns -> ShowS
$cshowsPrec :: Int -> GetReplicationRuns -> ShowS
Prelude.Show, forall x. Rep GetReplicationRuns x -> GetReplicationRuns
forall x. GetReplicationRuns -> Rep GetReplicationRuns x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetReplicationRuns x -> GetReplicationRuns
$cfrom :: forall x. GetReplicationRuns -> Rep GetReplicationRuns x
Prelude.Generic)

-- |
-- Create a value of 'GetReplicationRuns' 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', 'getReplicationRuns_maxResults' - The maximum number of results to return in a single call. The default
-- value is 50. To retrieve the remaining results, make another call with
-- the returned @NextToken@ value.
--
-- 'nextToken', 'getReplicationRuns_nextToken' - The token for the next set of results.
--
-- 'replicationJobId', 'getReplicationRuns_replicationJobId' - The ID of the replication job.
newGetReplicationRuns ::
  -- | 'replicationJobId'
  Prelude.Text ->
  GetReplicationRuns
newGetReplicationRuns :: Text -> GetReplicationRuns
newGetReplicationRuns Text
pReplicationJobId_ =
  GetReplicationRuns'
    { $sel:maxResults:GetReplicationRuns' :: Maybe Int
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:GetReplicationRuns' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:replicationJobId:GetReplicationRuns' :: Text
replicationJobId = Text
pReplicationJobId_
    }

-- | The maximum number of results to return in a single call. The default
-- value is 50. To retrieve the remaining results, make another call with
-- the returned @NextToken@ value.
getReplicationRuns_maxResults :: Lens.Lens' GetReplicationRuns (Prelude.Maybe Prelude.Int)
getReplicationRuns_maxResults :: Lens' GetReplicationRuns (Maybe Int)
getReplicationRuns_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetReplicationRuns' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:GetReplicationRuns' :: GetReplicationRuns -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: GetReplicationRuns
s@GetReplicationRuns' {} Maybe Int
a -> GetReplicationRuns
s {$sel:maxResults:GetReplicationRuns' :: Maybe Int
maxResults = Maybe Int
a} :: GetReplicationRuns)

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

-- | The ID of the replication job.
getReplicationRuns_replicationJobId :: Lens.Lens' GetReplicationRuns Prelude.Text
getReplicationRuns_replicationJobId :: Lens' GetReplicationRuns Text
getReplicationRuns_replicationJobId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetReplicationRuns' {Text
replicationJobId :: Text
$sel:replicationJobId:GetReplicationRuns' :: GetReplicationRuns -> Text
replicationJobId} -> Text
replicationJobId) (\s :: GetReplicationRuns
s@GetReplicationRuns' {} Text
a -> GetReplicationRuns
s {$sel:replicationJobId:GetReplicationRuns' :: Text
replicationJobId = Text
a} :: GetReplicationRuns)

instance Core.AWSPager GetReplicationRuns where
  page :: GetReplicationRuns
-> AWSResponse GetReplicationRuns -> Maybe GetReplicationRuns
page GetReplicationRuns
rq AWSResponse GetReplicationRuns
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse GetReplicationRuns
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetReplicationRunsResponse (Maybe Text)
getReplicationRunsResponse_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 GetReplicationRuns
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetReplicationRunsResponse (Maybe [ReplicationRun])
getReplicationRunsResponse_replicationRunList
            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.$ GetReplicationRuns
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' GetReplicationRuns (Maybe Text)
getReplicationRuns_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse GetReplicationRuns
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetReplicationRunsResponse (Maybe Text)
getReplicationRunsResponse_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 GetReplicationRuns where
  type
    AWSResponse GetReplicationRuns =
      GetReplicationRunsResponse
  request :: (Service -> Service)
-> GetReplicationRuns -> Request GetReplicationRuns
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 GetReplicationRuns
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetReplicationRuns)))
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 ReplicationJob
-> Maybe [ReplicationRun]
-> Int
-> GetReplicationRunsResponse
GetReplicationRunsResponse'
            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
"replicationJob")
            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
"replicationRunList"
                            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 GetReplicationRuns where
  hashWithSalt :: Int -> GetReplicationRuns -> Int
hashWithSalt Int
_salt GetReplicationRuns' {Maybe Int
Maybe Text
Text
replicationJobId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Int
$sel:replicationJobId:GetReplicationRuns' :: GetReplicationRuns -> Text
$sel:nextToken:GetReplicationRuns' :: GetReplicationRuns -> Maybe Text
$sel:maxResults:GetReplicationRuns' :: GetReplicationRuns -> 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
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
replicationJobId

instance Prelude.NFData GetReplicationRuns where
  rnf :: GetReplicationRuns -> ()
rnf GetReplicationRuns' {Maybe Int
Maybe Text
Text
replicationJobId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Int
$sel:replicationJobId:GetReplicationRuns' :: GetReplicationRuns -> Text
$sel:nextToken:GetReplicationRuns' :: GetReplicationRuns -> Maybe Text
$sel:maxResults:GetReplicationRuns' :: GetReplicationRuns -> 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
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
replicationJobId

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

instance Data.ToJSON GetReplicationRuns where
  toJSON :: GetReplicationRuns -> Value
toJSON GetReplicationRuns' {Maybe Int
Maybe Text
Text
replicationJobId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Int
$sel:replicationJobId:GetReplicationRuns' :: GetReplicationRuns -> Text
$sel:nextToken:GetReplicationRuns' :: GetReplicationRuns -> Maybe Text
$sel:maxResults:GetReplicationRuns' :: GetReplicationRuns -> 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,
            forall a. a -> Maybe a
Prelude.Just
              (Key
"replicationJobId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
replicationJobId)
          ]
      )

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

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

-- | /See:/ 'newGetReplicationRunsResponse' smart constructor.
data GetReplicationRunsResponse = GetReplicationRunsResponse'
  { -- | The token required to retrieve the next set of results. This value is
    -- null when there are no more results to return.
    GetReplicationRunsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Information about the replication job.
    GetReplicationRunsResponse -> Maybe ReplicationJob
replicationJob :: Prelude.Maybe ReplicationJob,
    -- | Information about the replication runs.
    GetReplicationRunsResponse -> Maybe [ReplicationRun]
replicationRunList :: Prelude.Maybe [ReplicationRun],
    -- | The response's http status code.
    GetReplicationRunsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetReplicationRunsResponse -> GetReplicationRunsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetReplicationRunsResponse -> GetReplicationRunsResponse -> Bool
$c/= :: GetReplicationRunsResponse -> GetReplicationRunsResponse -> Bool
== :: GetReplicationRunsResponse -> GetReplicationRunsResponse -> Bool
$c== :: GetReplicationRunsResponse -> GetReplicationRunsResponse -> Bool
Prelude.Eq, ReadPrec [GetReplicationRunsResponse]
ReadPrec GetReplicationRunsResponse
Int -> ReadS GetReplicationRunsResponse
ReadS [GetReplicationRunsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetReplicationRunsResponse]
$creadListPrec :: ReadPrec [GetReplicationRunsResponse]
readPrec :: ReadPrec GetReplicationRunsResponse
$creadPrec :: ReadPrec GetReplicationRunsResponse
readList :: ReadS [GetReplicationRunsResponse]
$creadList :: ReadS [GetReplicationRunsResponse]
readsPrec :: Int -> ReadS GetReplicationRunsResponse
$creadsPrec :: Int -> ReadS GetReplicationRunsResponse
Prelude.Read, Int -> GetReplicationRunsResponse -> ShowS
[GetReplicationRunsResponse] -> ShowS
GetReplicationRunsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetReplicationRunsResponse] -> ShowS
$cshowList :: [GetReplicationRunsResponse] -> ShowS
show :: GetReplicationRunsResponse -> String
$cshow :: GetReplicationRunsResponse -> String
showsPrec :: Int -> GetReplicationRunsResponse -> ShowS
$cshowsPrec :: Int -> GetReplicationRunsResponse -> ShowS
Prelude.Show, forall x.
Rep GetReplicationRunsResponse x -> GetReplicationRunsResponse
forall x.
GetReplicationRunsResponse -> Rep GetReplicationRunsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetReplicationRunsResponse x -> GetReplicationRunsResponse
$cfrom :: forall x.
GetReplicationRunsResponse -> Rep GetReplicationRunsResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetReplicationRunsResponse' 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', 'getReplicationRunsResponse_nextToken' - The token required to retrieve the next set of results. This value is
-- null when there are no more results to return.
--
-- 'replicationJob', 'getReplicationRunsResponse_replicationJob' - Information about the replication job.
--
-- 'replicationRunList', 'getReplicationRunsResponse_replicationRunList' - Information about the replication runs.
--
-- 'httpStatus', 'getReplicationRunsResponse_httpStatus' - The response's http status code.
newGetReplicationRunsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetReplicationRunsResponse
newGetReplicationRunsResponse :: Int -> GetReplicationRunsResponse
newGetReplicationRunsResponse Int
pHttpStatus_ =
  GetReplicationRunsResponse'
    { $sel:nextToken:GetReplicationRunsResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:replicationJob:GetReplicationRunsResponse' :: Maybe ReplicationJob
replicationJob = forall a. Maybe a
Prelude.Nothing,
      $sel:replicationRunList:GetReplicationRunsResponse' :: Maybe [ReplicationRun]
replicationRunList = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetReplicationRunsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The token required to retrieve the next set of results. This value is
-- null when there are no more results to return.
getReplicationRunsResponse_nextToken :: Lens.Lens' GetReplicationRunsResponse (Prelude.Maybe Prelude.Text)
getReplicationRunsResponse_nextToken :: Lens' GetReplicationRunsResponse (Maybe Text)
getReplicationRunsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetReplicationRunsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetReplicationRunsResponse' :: GetReplicationRunsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetReplicationRunsResponse
s@GetReplicationRunsResponse' {} Maybe Text
a -> GetReplicationRunsResponse
s {$sel:nextToken:GetReplicationRunsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: GetReplicationRunsResponse)

-- | Information about the replication job.
getReplicationRunsResponse_replicationJob :: Lens.Lens' GetReplicationRunsResponse (Prelude.Maybe ReplicationJob)
getReplicationRunsResponse_replicationJob :: Lens' GetReplicationRunsResponse (Maybe ReplicationJob)
getReplicationRunsResponse_replicationJob = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetReplicationRunsResponse' {Maybe ReplicationJob
replicationJob :: Maybe ReplicationJob
$sel:replicationJob:GetReplicationRunsResponse' :: GetReplicationRunsResponse -> Maybe ReplicationJob
replicationJob} -> Maybe ReplicationJob
replicationJob) (\s :: GetReplicationRunsResponse
s@GetReplicationRunsResponse' {} Maybe ReplicationJob
a -> GetReplicationRunsResponse
s {$sel:replicationJob:GetReplicationRunsResponse' :: Maybe ReplicationJob
replicationJob = Maybe ReplicationJob
a} :: GetReplicationRunsResponse)

-- | Information about the replication runs.
getReplicationRunsResponse_replicationRunList :: Lens.Lens' GetReplicationRunsResponse (Prelude.Maybe [ReplicationRun])
getReplicationRunsResponse_replicationRunList :: Lens' GetReplicationRunsResponse (Maybe [ReplicationRun])
getReplicationRunsResponse_replicationRunList = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetReplicationRunsResponse' {Maybe [ReplicationRun]
replicationRunList :: Maybe [ReplicationRun]
$sel:replicationRunList:GetReplicationRunsResponse' :: GetReplicationRunsResponse -> Maybe [ReplicationRun]
replicationRunList} -> Maybe [ReplicationRun]
replicationRunList) (\s :: GetReplicationRunsResponse
s@GetReplicationRunsResponse' {} Maybe [ReplicationRun]
a -> GetReplicationRunsResponse
s {$sel:replicationRunList:GetReplicationRunsResponse' :: Maybe [ReplicationRun]
replicationRunList = Maybe [ReplicationRun]
a} :: GetReplicationRunsResponse) 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.
getReplicationRunsResponse_httpStatus :: Lens.Lens' GetReplicationRunsResponse Prelude.Int
getReplicationRunsResponse_httpStatus :: Lens' GetReplicationRunsResponse Int
getReplicationRunsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetReplicationRunsResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetReplicationRunsResponse' :: GetReplicationRunsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetReplicationRunsResponse
s@GetReplicationRunsResponse' {} Int
a -> GetReplicationRunsResponse
s {$sel:httpStatus:GetReplicationRunsResponse' :: Int
httpStatus = Int
a} :: GetReplicationRunsResponse)

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