{-# 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.SSM.ListResourceDataSync
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Lists your resource data sync configurations. Includes information about
-- the last time a sync attempted to start, the last sync status, and the
-- last time a sync successfully completed.
--
-- The number of sync configurations might be too large to return using a
-- single call to @ListResourceDataSync@. You can limit the number of sync
-- configurations returned by using the @MaxResults@ parameter. To
-- determine whether there are more sync configurations to list, check the
-- value of @NextToken@ in the output. If there are more sync
-- configurations to list, you can request them by specifying the
-- @NextToken@ returned in the call to the parameter of a subsequent call.
--
-- This operation returns paginated results.
module Amazonka.SSM.ListResourceDataSync
  ( -- * Creating a Request
    ListResourceDataSync (..),
    newListResourceDataSync,

    -- * Request Lenses
    listResourceDataSync_syncType,
    listResourceDataSync_nextToken,
    listResourceDataSync_maxResults,

    -- * Destructuring the Response
    ListResourceDataSyncResponse (..),
    newListResourceDataSyncResponse,

    -- * Response Lenses
    listResourceDataSyncResponse_resourceDataSyncItems,
    listResourceDataSyncResponse_nextToken,
    listResourceDataSyncResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SSM.Types

-- | /See:/ 'newListResourceDataSync' smart constructor.
data ListResourceDataSync = ListResourceDataSync'
  { -- | View a list of resource data syncs according to the sync type. Specify
    -- @SyncToDestination@ to view resource data syncs that synchronize data to
    -- an Amazon S3 bucket. Specify @SyncFromSource@ to view resource data
    -- syncs from Organizations or from multiple Amazon Web Services Regions.
    ListResourceDataSync -> Maybe Text
syncType :: Prelude.Maybe Prelude.Text,
    -- | A token to start the list. Use this token to get the next set of
    -- results.
    ListResourceDataSync -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of items to return for this call. The call also
    -- returns a token that you can specify in a subsequent call to get the
    -- next set of results.
    ListResourceDataSync -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListResourceDataSync -> ListResourceDataSync -> Bool
(ListResourceDataSync -> ListResourceDataSync -> Bool)
-> (ListResourceDataSync -> ListResourceDataSync -> Bool)
-> Eq ListResourceDataSync
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListResourceDataSync -> ListResourceDataSync -> Bool
$c/= :: ListResourceDataSync -> ListResourceDataSync -> Bool
== :: ListResourceDataSync -> ListResourceDataSync -> Bool
$c== :: ListResourceDataSync -> ListResourceDataSync -> Bool
Prelude.Eq, ReadPrec [ListResourceDataSync]
ReadPrec ListResourceDataSync
Int -> ReadS ListResourceDataSync
ReadS [ListResourceDataSync]
(Int -> ReadS ListResourceDataSync)
-> ReadS [ListResourceDataSync]
-> ReadPrec ListResourceDataSync
-> ReadPrec [ListResourceDataSync]
-> Read ListResourceDataSync
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListResourceDataSync]
$creadListPrec :: ReadPrec [ListResourceDataSync]
readPrec :: ReadPrec ListResourceDataSync
$creadPrec :: ReadPrec ListResourceDataSync
readList :: ReadS [ListResourceDataSync]
$creadList :: ReadS [ListResourceDataSync]
readsPrec :: Int -> ReadS ListResourceDataSync
$creadsPrec :: Int -> ReadS ListResourceDataSync
Prelude.Read, Int -> ListResourceDataSync -> ShowS
[ListResourceDataSync] -> ShowS
ListResourceDataSync -> String
(Int -> ListResourceDataSync -> ShowS)
-> (ListResourceDataSync -> String)
-> ([ListResourceDataSync] -> ShowS)
-> Show ListResourceDataSync
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListResourceDataSync] -> ShowS
$cshowList :: [ListResourceDataSync] -> ShowS
show :: ListResourceDataSync -> String
$cshow :: ListResourceDataSync -> String
showsPrec :: Int -> ListResourceDataSync -> ShowS
$cshowsPrec :: Int -> ListResourceDataSync -> ShowS
Prelude.Show, (forall x. ListResourceDataSync -> Rep ListResourceDataSync x)
-> (forall x. Rep ListResourceDataSync x -> ListResourceDataSync)
-> Generic ListResourceDataSync
forall x. Rep ListResourceDataSync x -> ListResourceDataSync
forall x. ListResourceDataSync -> Rep ListResourceDataSync x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListResourceDataSync x -> ListResourceDataSync
$cfrom :: forall x. ListResourceDataSync -> Rep ListResourceDataSync x
Prelude.Generic)

-- |
-- Create a value of 'ListResourceDataSync' 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:
--
-- 'syncType', 'listResourceDataSync_syncType' - View a list of resource data syncs according to the sync type. Specify
-- @SyncToDestination@ to view resource data syncs that synchronize data to
-- an Amazon S3 bucket. Specify @SyncFromSource@ to view resource data
-- syncs from Organizations or from multiple Amazon Web Services Regions.
--
-- 'nextToken', 'listResourceDataSync_nextToken' - A token to start the list. Use this token to get the next set of
-- results.
--
-- 'maxResults', 'listResourceDataSync_maxResults' - The maximum number of items to return for this call. The call also
-- returns a token that you can specify in a subsequent call to get the
-- next set of results.
newListResourceDataSync ::
  ListResourceDataSync
newListResourceDataSync :: ListResourceDataSync
newListResourceDataSync =
  ListResourceDataSync' :: Maybe Text -> Maybe Text -> Maybe Natural -> ListResourceDataSync
ListResourceDataSync'
    { $sel:syncType:ListResourceDataSync' :: Maybe Text
syncType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListResourceDataSync' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListResourceDataSync' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | View a list of resource data syncs according to the sync type. Specify
-- @SyncToDestination@ to view resource data syncs that synchronize data to
-- an Amazon S3 bucket. Specify @SyncFromSource@ to view resource data
-- syncs from Organizations or from multiple Amazon Web Services Regions.
listResourceDataSync_syncType :: Lens.Lens' ListResourceDataSync (Prelude.Maybe Prelude.Text)
listResourceDataSync_syncType :: (Maybe Text -> f (Maybe Text))
-> ListResourceDataSync -> f ListResourceDataSync
listResourceDataSync_syncType = (ListResourceDataSync -> Maybe Text)
-> (ListResourceDataSync -> Maybe Text -> ListResourceDataSync)
-> Lens
     ListResourceDataSync ListResourceDataSync (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListResourceDataSync' {Maybe Text
syncType :: Maybe Text
$sel:syncType:ListResourceDataSync' :: ListResourceDataSync -> Maybe Text
syncType} -> Maybe Text
syncType) (\s :: ListResourceDataSync
s@ListResourceDataSync' {} Maybe Text
a -> ListResourceDataSync
s {$sel:syncType:ListResourceDataSync' :: Maybe Text
syncType = Maybe Text
a} :: ListResourceDataSync)

-- | A token to start the list. Use this token to get the next set of
-- results.
listResourceDataSync_nextToken :: Lens.Lens' ListResourceDataSync (Prelude.Maybe Prelude.Text)
listResourceDataSync_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListResourceDataSync -> f ListResourceDataSync
listResourceDataSync_nextToken = (ListResourceDataSync -> Maybe Text)
-> (ListResourceDataSync -> Maybe Text -> ListResourceDataSync)
-> Lens
     ListResourceDataSync ListResourceDataSync (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListResourceDataSync' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListResourceDataSync' :: ListResourceDataSync -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListResourceDataSync
s@ListResourceDataSync' {} Maybe Text
a -> ListResourceDataSync
s {$sel:nextToken:ListResourceDataSync' :: Maybe Text
nextToken = Maybe Text
a} :: ListResourceDataSync)

-- | The maximum number of items to return for this call. The call also
-- returns a token that you can specify in a subsequent call to get the
-- next set of results.
listResourceDataSync_maxResults :: Lens.Lens' ListResourceDataSync (Prelude.Maybe Prelude.Natural)
listResourceDataSync_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListResourceDataSync -> f ListResourceDataSync
listResourceDataSync_maxResults = (ListResourceDataSync -> Maybe Natural)
-> (ListResourceDataSync -> Maybe Natural -> ListResourceDataSync)
-> Lens
     ListResourceDataSync
     ListResourceDataSync
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListResourceDataSync' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListResourceDataSync' :: ListResourceDataSync -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListResourceDataSync
s@ListResourceDataSync' {} Maybe Natural
a -> ListResourceDataSync
s {$sel:maxResults:ListResourceDataSync' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListResourceDataSync)

instance Core.AWSPager ListResourceDataSync where
  page :: ListResourceDataSync
-> AWSResponse ListResourceDataSync -> Maybe ListResourceDataSync
page ListResourceDataSync
rq AWSResponse ListResourceDataSync
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListResourceDataSync
ListResourceDataSyncResponse
rs
            ListResourceDataSyncResponse
-> Getting (First Text) ListResourceDataSyncResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListResourceDataSyncResponse
-> Const (First Text) ListResourceDataSyncResponse
Lens' ListResourceDataSyncResponse (Maybe Text)
listResourceDataSyncResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListResourceDataSyncResponse
 -> Const (First Text) ListResourceDataSyncResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListResourceDataSyncResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListResourceDataSync
forall a. Maybe a
Prelude.Nothing
    | Maybe [ResourceDataSyncItem] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListResourceDataSync
ListResourceDataSyncResponse
rs
            ListResourceDataSyncResponse
-> Getting
     (First [ResourceDataSyncItem])
     ListResourceDataSyncResponse
     [ResourceDataSyncItem]
-> Maybe [ResourceDataSyncItem]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [ResourceDataSyncItem]
 -> Const
      (First [ResourceDataSyncItem]) (Maybe [ResourceDataSyncItem]))
-> ListResourceDataSyncResponse
-> Const
     (First [ResourceDataSyncItem]) ListResourceDataSyncResponse
Lens' ListResourceDataSyncResponse (Maybe [ResourceDataSyncItem])
listResourceDataSyncResponse_resourceDataSyncItems
              ((Maybe [ResourceDataSyncItem]
  -> Const
       (First [ResourceDataSyncItem]) (Maybe [ResourceDataSyncItem]))
 -> ListResourceDataSyncResponse
 -> Const
      (First [ResourceDataSyncItem]) ListResourceDataSyncResponse)
-> (([ResourceDataSyncItem]
     -> Const (First [ResourceDataSyncItem]) [ResourceDataSyncItem])
    -> Maybe [ResourceDataSyncItem]
    -> Const
         (First [ResourceDataSyncItem]) (Maybe [ResourceDataSyncItem]))
-> Getting
     (First [ResourceDataSyncItem])
     ListResourceDataSyncResponse
     [ResourceDataSyncItem]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([ResourceDataSyncItem]
 -> Const (First [ResourceDataSyncItem]) [ResourceDataSyncItem])
-> Maybe [ResourceDataSyncItem]
-> Const
     (First [ResourceDataSyncItem]) (Maybe [ResourceDataSyncItem])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListResourceDataSync
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListResourceDataSync -> Maybe ListResourceDataSync
forall a. a -> Maybe a
Prelude.Just (ListResourceDataSync -> Maybe ListResourceDataSync)
-> ListResourceDataSync -> Maybe ListResourceDataSync
forall a b. (a -> b) -> a -> b
Prelude.$
        ListResourceDataSync
rq
          ListResourceDataSync
-> (ListResourceDataSync -> ListResourceDataSync)
-> ListResourceDataSync
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListResourceDataSync -> Identity ListResourceDataSync
Lens
  ListResourceDataSync ListResourceDataSync (Maybe Text) (Maybe Text)
listResourceDataSync_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListResourceDataSync -> Identity ListResourceDataSync)
-> Maybe Text -> ListResourceDataSync -> ListResourceDataSync
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListResourceDataSync
ListResourceDataSyncResponse
rs
          ListResourceDataSyncResponse
-> Getting (First Text) ListResourceDataSyncResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListResourceDataSyncResponse
-> Const (First Text) ListResourceDataSyncResponse
Lens' ListResourceDataSyncResponse (Maybe Text)
listResourceDataSyncResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListResourceDataSyncResponse
 -> Const (First Text) ListResourceDataSyncResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListResourceDataSyncResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListResourceDataSync where
  type
    AWSResponse ListResourceDataSync =
      ListResourceDataSyncResponse
  request :: ListResourceDataSync -> Request ListResourceDataSync
request = Service -> ListResourceDataSync -> Request ListResourceDataSync
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListResourceDataSync
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListResourceDataSync)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListResourceDataSync))
-> Logger
-> Service
-> Proxy ListResourceDataSync
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListResourceDataSync)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe [ResourceDataSyncItem]
-> Maybe Text -> Int -> ListResourceDataSyncResponse
ListResourceDataSyncResponse'
            (Maybe [ResourceDataSyncItem]
 -> Maybe Text -> Int -> ListResourceDataSyncResponse)
-> Either String (Maybe [ResourceDataSyncItem])
-> Either
     String (Maybe Text -> Int -> ListResourceDataSyncResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object
-> Text -> Either String (Maybe (Maybe [ResourceDataSyncItem]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ResourceDataSyncItems"
                            Either String (Maybe (Maybe [ResourceDataSyncItem]))
-> Maybe [ResourceDataSyncItem]
-> Either String (Maybe [ResourceDataSyncItem])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [ResourceDataSyncItem]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either String (Maybe Text -> Int -> ListResourceDataSyncResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListResourceDataSyncResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NextToken")
            Either String (Int -> ListResourceDataSyncResponse)
-> Either String Int -> Either String ListResourceDataSyncResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable ListResourceDataSync

instance Prelude.NFData ListResourceDataSync

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

instance Core.ToJSON ListResourceDataSync where
  toJSON :: ListResourceDataSync -> Value
toJSON ListResourceDataSync' {Maybe Natural
Maybe Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
syncType :: Maybe Text
$sel:maxResults:ListResourceDataSync' :: ListResourceDataSync -> Maybe Natural
$sel:nextToken:ListResourceDataSync' :: ListResourceDataSync -> Maybe Text
$sel:syncType:ListResourceDataSync' :: ListResourceDataSync -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"SyncType" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
syncType,
            (Text
"NextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Text
"MaxResults" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults
          ]
      )

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

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

-- | /See:/ 'newListResourceDataSyncResponse' smart constructor.
data ListResourceDataSyncResponse = ListResourceDataSyncResponse'
  { -- | A list of your current resource data sync configurations and their
    -- statuses.
    ListResourceDataSyncResponse -> Maybe [ResourceDataSyncItem]
resourceDataSyncItems :: Prelude.Maybe [ResourceDataSyncItem],
    -- | The token for the next set of items to return. Use this token to get the
    -- next set of results.
    ListResourceDataSyncResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListResourceDataSyncResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListResourceDataSyncResponse
-> ListResourceDataSyncResponse -> Bool
(ListResourceDataSyncResponse
 -> ListResourceDataSyncResponse -> Bool)
-> (ListResourceDataSyncResponse
    -> ListResourceDataSyncResponse -> Bool)
-> Eq ListResourceDataSyncResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListResourceDataSyncResponse
-> ListResourceDataSyncResponse -> Bool
$c/= :: ListResourceDataSyncResponse
-> ListResourceDataSyncResponse -> Bool
== :: ListResourceDataSyncResponse
-> ListResourceDataSyncResponse -> Bool
$c== :: ListResourceDataSyncResponse
-> ListResourceDataSyncResponse -> Bool
Prelude.Eq, ReadPrec [ListResourceDataSyncResponse]
ReadPrec ListResourceDataSyncResponse
Int -> ReadS ListResourceDataSyncResponse
ReadS [ListResourceDataSyncResponse]
(Int -> ReadS ListResourceDataSyncResponse)
-> ReadS [ListResourceDataSyncResponse]
-> ReadPrec ListResourceDataSyncResponse
-> ReadPrec [ListResourceDataSyncResponse]
-> Read ListResourceDataSyncResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListResourceDataSyncResponse]
$creadListPrec :: ReadPrec [ListResourceDataSyncResponse]
readPrec :: ReadPrec ListResourceDataSyncResponse
$creadPrec :: ReadPrec ListResourceDataSyncResponse
readList :: ReadS [ListResourceDataSyncResponse]
$creadList :: ReadS [ListResourceDataSyncResponse]
readsPrec :: Int -> ReadS ListResourceDataSyncResponse
$creadsPrec :: Int -> ReadS ListResourceDataSyncResponse
Prelude.Read, Int -> ListResourceDataSyncResponse -> ShowS
[ListResourceDataSyncResponse] -> ShowS
ListResourceDataSyncResponse -> String
(Int -> ListResourceDataSyncResponse -> ShowS)
-> (ListResourceDataSyncResponse -> String)
-> ([ListResourceDataSyncResponse] -> ShowS)
-> Show ListResourceDataSyncResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListResourceDataSyncResponse] -> ShowS
$cshowList :: [ListResourceDataSyncResponse] -> ShowS
show :: ListResourceDataSyncResponse -> String
$cshow :: ListResourceDataSyncResponse -> String
showsPrec :: Int -> ListResourceDataSyncResponse -> ShowS
$cshowsPrec :: Int -> ListResourceDataSyncResponse -> ShowS
Prelude.Show, (forall x.
 ListResourceDataSyncResponse -> Rep ListResourceDataSyncResponse x)
-> (forall x.
    Rep ListResourceDataSyncResponse x -> ListResourceDataSyncResponse)
-> Generic ListResourceDataSyncResponse
forall x.
Rep ListResourceDataSyncResponse x -> ListResourceDataSyncResponse
forall x.
ListResourceDataSyncResponse -> Rep ListResourceDataSyncResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListResourceDataSyncResponse x -> ListResourceDataSyncResponse
$cfrom :: forall x.
ListResourceDataSyncResponse -> Rep ListResourceDataSyncResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListResourceDataSyncResponse' 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:
--
-- 'resourceDataSyncItems', 'listResourceDataSyncResponse_resourceDataSyncItems' - A list of your current resource data sync configurations and their
-- statuses.
--
-- 'nextToken', 'listResourceDataSyncResponse_nextToken' - The token for the next set of items to return. Use this token to get the
-- next set of results.
--
-- 'httpStatus', 'listResourceDataSyncResponse_httpStatus' - The response's http status code.
newListResourceDataSyncResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListResourceDataSyncResponse
newListResourceDataSyncResponse :: Int -> ListResourceDataSyncResponse
newListResourceDataSyncResponse Int
pHttpStatus_ =
  ListResourceDataSyncResponse' :: Maybe [ResourceDataSyncItem]
-> Maybe Text -> Int -> ListResourceDataSyncResponse
ListResourceDataSyncResponse'
    { $sel:resourceDataSyncItems:ListResourceDataSyncResponse' :: Maybe [ResourceDataSyncItem]
resourceDataSyncItems =
        Maybe [ResourceDataSyncItem]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListResourceDataSyncResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListResourceDataSyncResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A list of your current resource data sync configurations and their
-- statuses.
listResourceDataSyncResponse_resourceDataSyncItems :: Lens.Lens' ListResourceDataSyncResponse (Prelude.Maybe [ResourceDataSyncItem])
listResourceDataSyncResponse_resourceDataSyncItems :: (Maybe [ResourceDataSyncItem] -> f (Maybe [ResourceDataSyncItem]))
-> ListResourceDataSyncResponse -> f ListResourceDataSyncResponse
listResourceDataSyncResponse_resourceDataSyncItems = (ListResourceDataSyncResponse -> Maybe [ResourceDataSyncItem])
-> (ListResourceDataSyncResponse
    -> Maybe [ResourceDataSyncItem] -> ListResourceDataSyncResponse)
-> Lens'
     ListResourceDataSyncResponse (Maybe [ResourceDataSyncItem])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListResourceDataSyncResponse' {Maybe [ResourceDataSyncItem]
resourceDataSyncItems :: Maybe [ResourceDataSyncItem]
$sel:resourceDataSyncItems:ListResourceDataSyncResponse' :: ListResourceDataSyncResponse -> Maybe [ResourceDataSyncItem]
resourceDataSyncItems} -> Maybe [ResourceDataSyncItem]
resourceDataSyncItems) (\s :: ListResourceDataSyncResponse
s@ListResourceDataSyncResponse' {} Maybe [ResourceDataSyncItem]
a -> ListResourceDataSyncResponse
s {$sel:resourceDataSyncItems:ListResourceDataSyncResponse' :: Maybe [ResourceDataSyncItem]
resourceDataSyncItems = Maybe [ResourceDataSyncItem]
a} :: ListResourceDataSyncResponse) ((Maybe [ResourceDataSyncItem] -> f (Maybe [ResourceDataSyncItem]))
 -> ListResourceDataSyncResponse -> f ListResourceDataSyncResponse)
-> ((Maybe [ResourceDataSyncItem]
     -> f (Maybe [ResourceDataSyncItem]))
    -> Maybe [ResourceDataSyncItem]
    -> f (Maybe [ResourceDataSyncItem]))
-> (Maybe [ResourceDataSyncItem]
    -> f (Maybe [ResourceDataSyncItem]))
-> ListResourceDataSyncResponse
-> f ListResourceDataSyncResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ResourceDataSyncItem]
  [ResourceDataSyncItem]
  [ResourceDataSyncItem]
  [ResourceDataSyncItem]
-> Iso
     (Maybe [ResourceDataSyncItem])
     (Maybe [ResourceDataSyncItem])
     (Maybe [ResourceDataSyncItem])
     (Maybe [ResourceDataSyncItem])
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 AnIso
  [ResourceDataSyncItem]
  [ResourceDataSyncItem]
  [ResourceDataSyncItem]
  [ResourceDataSyncItem]
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 items to return. Use this token to get the
-- next set of results.
listResourceDataSyncResponse_nextToken :: Lens.Lens' ListResourceDataSyncResponse (Prelude.Maybe Prelude.Text)
listResourceDataSyncResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListResourceDataSyncResponse -> f ListResourceDataSyncResponse
listResourceDataSyncResponse_nextToken = (ListResourceDataSyncResponse -> Maybe Text)
-> (ListResourceDataSyncResponse
    -> Maybe Text -> ListResourceDataSyncResponse)
-> Lens' ListResourceDataSyncResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListResourceDataSyncResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListResourceDataSyncResponse' :: ListResourceDataSyncResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListResourceDataSyncResponse
s@ListResourceDataSyncResponse' {} Maybe Text
a -> ListResourceDataSyncResponse
s {$sel:nextToken:ListResourceDataSyncResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListResourceDataSyncResponse)

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

instance Prelude.NFData ListResourceDataSyncResponse