{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.CloudDirectory.Types.BatchListIncomingTypedLinksResponse
-- 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)
module Amazonka.CloudDirectory.Types.BatchListIncomingTypedLinksResponse where

import Amazonka.CloudDirectory.Types.TypedLinkSpecifier
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Represents the output of a ListIncomingTypedLinks response operation.
--
-- /See:/ 'newBatchListIncomingTypedLinksResponse' smart constructor.
data BatchListIncomingTypedLinksResponse = BatchListIncomingTypedLinksResponse'
  { -- | Returns one or more typed link specifiers as output.
    BatchListIncomingTypedLinksResponse -> Maybe [TypedLinkSpecifier]
linkSpecifiers :: Prelude.Maybe [TypedLinkSpecifier],
    -- | The pagination token.
    BatchListIncomingTypedLinksResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
  }
  deriving (BatchListIncomingTypedLinksResponse
-> BatchListIncomingTypedLinksResponse -> Bool
(BatchListIncomingTypedLinksResponse
 -> BatchListIncomingTypedLinksResponse -> Bool)
-> (BatchListIncomingTypedLinksResponse
    -> BatchListIncomingTypedLinksResponse -> Bool)
-> Eq BatchListIncomingTypedLinksResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchListIncomingTypedLinksResponse
-> BatchListIncomingTypedLinksResponse -> Bool
$c/= :: BatchListIncomingTypedLinksResponse
-> BatchListIncomingTypedLinksResponse -> Bool
== :: BatchListIncomingTypedLinksResponse
-> BatchListIncomingTypedLinksResponse -> Bool
$c== :: BatchListIncomingTypedLinksResponse
-> BatchListIncomingTypedLinksResponse -> Bool
Prelude.Eq, ReadPrec [BatchListIncomingTypedLinksResponse]
ReadPrec BatchListIncomingTypedLinksResponse
Int -> ReadS BatchListIncomingTypedLinksResponse
ReadS [BatchListIncomingTypedLinksResponse]
(Int -> ReadS BatchListIncomingTypedLinksResponse)
-> ReadS [BatchListIncomingTypedLinksResponse]
-> ReadPrec BatchListIncomingTypedLinksResponse
-> ReadPrec [BatchListIncomingTypedLinksResponse]
-> Read BatchListIncomingTypedLinksResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchListIncomingTypedLinksResponse]
$creadListPrec :: ReadPrec [BatchListIncomingTypedLinksResponse]
readPrec :: ReadPrec BatchListIncomingTypedLinksResponse
$creadPrec :: ReadPrec BatchListIncomingTypedLinksResponse
readList :: ReadS [BatchListIncomingTypedLinksResponse]
$creadList :: ReadS [BatchListIncomingTypedLinksResponse]
readsPrec :: Int -> ReadS BatchListIncomingTypedLinksResponse
$creadsPrec :: Int -> ReadS BatchListIncomingTypedLinksResponse
Prelude.Read, Int -> BatchListIncomingTypedLinksResponse -> ShowS
[BatchListIncomingTypedLinksResponse] -> ShowS
BatchListIncomingTypedLinksResponse -> String
(Int -> BatchListIncomingTypedLinksResponse -> ShowS)
-> (BatchListIncomingTypedLinksResponse -> String)
-> ([BatchListIncomingTypedLinksResponse] -> ShowS)
-> Show BatchListIncomingTypedLinksResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchListIncomingTypedLinksResponse] -> ShowS
$cshowList :: [BatchListIncomingTypedLinksResponse] -> ShowS
show :: BatchListIncomingTypedLinksResponse -> String
$cshow :: BatchListIncomingTypedLinksResponse -> String
showsPrec :: Int -> BatchListIncomingTypedLinksResponse -> ShowS
$cshowsPrec :: Int -> BatchListIncomingTypedLinksResponse -> ShowS
Prelude.Show, (forall x.
 BatchListIncomingTypedLinksResponse
 -> Rep BatchListIncomingTypedLinksResponse x)
-> (forall x.
    Rep BatchListIncomingTypedLinksResponse x
    -> BatchListIncomingTypedLinksResponse)
-> Generic BatchListIncomingTypedLinksResponse
forall x.
Rep BatchListIncomingTypedLinksResponse x
-> BatchListIncomingTypedLinksResponse
forall x.
BatchListIncomingTypedLinksResponse
-> Rep BatchListIncomingTypedLinksResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchListIncomingTypedLinksResponse x
-> BatchListIncomingTypedLinksResponse
$cfrom :: forall x.
BatchListIncomingTypedLinksResponse
-> Rep BatchListIncomingTypedLinksResponse x
Prelude.Generic)

-- |
-- Create a value of 'BatchListIncomingTypedLinksResponse' 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:
--
-- 'linkSpecifiers', 'batchListIncomingTypedLinksResponse_linkSpecifiers' - Returns one or more typed link specifiers as output.
--
-- 'nextToken', 'batchListIncomingTypedLinksResponse_nextToken' - The pagination token.
newBatchListIncomingTypedLinksResponse ::
  BatchListIncomingTypedLinksResponse
newBatchListIncomingTypedLinksResponse :: BatchListIncomingTypedLinksResponse
newBatchListIncomingTypedLinksResponse =
  BatchListIncomingTypedLinksResponse' :: Maybe [TypedLinkSpecifier]
-> Maybe Text -> BatchListIncomingTypedLinksResponse
BatchListIncomingTypedLinksResponse'
    { $sel:linkSpecifiers:BatchListIncomingTypedLinksResponse' :: Maybe [TypedLinkSpecifier]
linkSpecifiers =
        Maybe [TypedLinkSpecifier]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:BatchListIncomingTypedLinksResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | Returns one or more typed link specifiers as output.
batchListIncomingTypedLinksResponse_linkSpecifiers :: Lens.Lens' BatchListIncomingTypedLinksResponse (Prelude.Maybe [TypedLinkSpecifier])
batchListIncomingTypedLinksResponse_linkSpecifiers :: (Maybe [TypedLinkSpecifier] -> f (Maybe [TypedLinkSpecifier]))
-> BatchListIncomingTypedLinksResponse
-> f BatchListIncomingTypedLinksResponse
batchListIncomingTypedLinksResponse_linkSpecifiers = (BatchListIncomingTypedLinksResponse -> Maybe [TypedLinkSpecifier])
-> (BatchListIncomingTypedLinksResponse
    -> Maybe [TypedLinkSpecifier]
    -> BatchListIncomingTypedLinksResponse)
-> Lens
     BatchListIncomingTypedLinksResponse
     BatchListIncomingTypedLinksResponse
     (Maybe [TypedLinkSpecifier])
     (Maybe [TypedLinkSpecifier])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchListIncomingTypedLinksResponse' {Maybe [TypedLinkSpecifier]
linkSpecifiers :: Maybe [TypedLinkSpecifier]
$sel:linkSpecifiers:BatchListIncomingTypedLinksResponse' :: BatchListIncomingTypedLinksResponse -> Maybe [TypedLinkSpecifier]
linkSpecifiers} -> Maybe [TypedLinkSpecifier]
linkSpecifiers) (\s :: BatchListIncomingTypedLinksResponse
s@BatchListIncomingTypedLinksResponse' {} Maybe [TypedLinkSpecifier]
a -> BatchListIncomingTypedLinksResponse
s {$sel:linkSpecifiers:BatchListIncomingTypedLinksResponse' :: Maybe [TypedLinkSpecifier]
linkSpecifiers = Maybe [TypedLinkSpecifier]
a} :: BatchListIncomingTypedLinksResponse) ((Maybe [TypedLinkSpecifier] -> f (Maybe [TypedLinkSpecifier]))
 -> BatchListIncomingTypedLinksResponse
 -> f BatchListIncomingTypedLinksResponse)
-> ((Maybe [TypedLinkSpecifier] -> f (Maybe [TypedLinkSpecifier]))
    -> Maybe [TypedLinkSpecifier] -> f (Maybe [TypedLinkSpecifier]))
-> (Maybe [TypedLinkSpecifier] -> f (Maybe [TypedLinkSpecifier]))
-> BatchListIncomingTypedLinksResponse
-> f BatchListIncomingTypedLinksResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [TypedLinkSpecifier]
  [TypedLinkSpecifier]
  [TypedLinkSpecifier]
  [TypedLinkSpecifier]
-> Iso
     (Maybe [TypedLinkSpecifier])
     (Maybe [TypedLinkSpecifier])
     (Maybe [TypedLinkSpecifier])
     (Maybe [TypedLinkSpecifier])
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
  [TypedLinkSpecifier]
  [TypedLinkSpecifier]
  [TypedLinkSpecifier]
  [TypedLinkSpecifier]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The pagination token.
batchListIncomingTypedLinksResponse_nextToken :: Lens.Lens' BatchListIncomingTypedLinksResponse (Prelude.Maybe Prelude.Text)
batchListIncomingTypedLinksResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> BatchListIncomingTypedLinksResponse
-> f BatchListIncomingTypedLinksResponse
batchListIncomingTypedLinksResponse_nextToken = (BatchListIncomingTypedLinksResponse -> Maybe Text)
-> (BatchListIncomingTypedLinksResponse
    -> Maybe Text -> BatchListIncomingTypedLinksResponse)
-> Lens
     BatchListIncomingTypedLinksResponse
     BatchListIncomingTypedLinksResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchListIncomingTypedLinksResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:BatchListIncomingTypedLinksResponse' :: BatchListIncomingTypedLinksResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: BatchListIncomingTypedLinksResponse
s@BatchListIncomingTypedLinksResponse' {} Maybe Text
a -> BatchListIncomingTypedLinksResponse
s {$sel:nextToken:BatchListIncomingTypedLinksResponse' :: Maybe Text
nextToken = Maybe Text
a} :: BatchListIncomingTypedLinksResponse)

instance
  Core.FromJSON
    BatchListIncomingTypedLinksResponse
  where
  parseJSON :: Value -> Parser BatchListIncomingTypedLinksResponse
parseJSON =
    String
-> (Object -> Parser BatchListIncomingTypedLinksResponse)
-> Value
-> Parser BatchListIncomingTypedLinksResponse
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"BatchListIncomingTypedLinksResponse"
      ( \Object
x ->
          Maybe [TypedLinkSpecifier]
-> Maybe Text -> BatchListIncomingTypedLinksResponse
BatchListIncomingTypedLinksResponse'
            (Maybe [TypedLinkSpecifier]
 -> Maybe Text -> BatchListIncomingTypedLinksResponse)
-> Parser (Maybe [TypedLinkSpecifier])
-> Parser (Maybe Text -> BatchListIncomingTypedLinksResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe (Maybe [TypedLinkSpecifier]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LinkSpecifiers" Parser (Maybe (Maybe [TypedLinkSpecifier]))
-> Maybe [TypedLinkSpecifier]
-> Parser (Maybe [TypedLinkSpecifier])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [TypedLinkSpecifier]
forall a. Monoid a => a
Prelude.mempty)
            Parser (Maybe Text -> BatchListIncomingTypedLinksResponse)
-> Parser (Maybe Text)
-> Parser BatchListIncomingTypedLinksResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NextToken")
      )

instance
  Prelude.Hashable
    BatchListIncomingTypedLinksResponse

instance
  Prelude.NFData
    BatchListIncomingTypedLinksResponse