{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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
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]
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
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.
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'
    { $sel:linkSpecifiers:BatchListIncomingTypedLinksResponse' :: Maybe [TypedLinkSpecifier]
linkSpecifiers =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:BatchListIncomingTypedLinksResponse' :: Maybe Text
nextToken = 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 :: Lens'
  BatchListIncomingTypedLinksResponse (Maybe [TypedLinkSpecifier])
batchListIncomingTypedLinksResponse_linkSpecifiers = 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) 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 pagination token.
batchListIncomingTypedLinksResponse_nextToken :: Lens.Lens' BatchListIncomingTypedLinksResponse (Prelude.Maybe Prelude.Text)
batchListIncomingTypedLinksResponse_nextToken :: Lens' BatchListIncomingTypedLinksResponse (Maybe Text)
batchListIncomingTypedLinksResponse_nextToken = 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
  Data.FromJSON
    BatchListIncomingTypedLinksResponse
  where
  parseJSON :: Value -> Parser BatchListIncomingTypedLinksResponse
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"BatchListIncomingTypedLinksResponse"
      ( \Object
x ->
          Maybe [TypedLinkSpecifier]
-> Maybe Text -> BatchListIncomingTypedLinksResponse
BatchListIncomingTypedLinksResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"LinkSpecifiers" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= 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 -> Parser (Maybe a)
Data..:? Key
"NextToken")
      )

instance
  Prelude.Hashable
    BatchListIncomingTypedLinksResponse
  where
  hashWithSalt :: Int -> BatchListIncomingTypedLinksResponse -> Int
hashWithSalt
    Int
_salt
    BatchListIncomingTypedLinksResponse' {Maybe [TypedLinkSpecifier]
Maybe Text
nextToken :: Maybe Text
linkSpecifiers :: Maybe [TypedLinkSpecifier]
$sel:nextToken:BatchListIncomingTypedLinksResponse' :: BatchListIncomingTypedLinksResponse -> Maybe Text
$sel:linkSpecifiers:BatchListIncomingTypedLinksResponse' :: BatchListIncomingTypedLinksResponse -> Maybe [TypedLinkSpecifier]
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [TypedLinkSpecifier]
linkSpecifiers
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken

instance
  Prelude.NFData
    BatchListIncomingTypedLinksResponse
  where
  rnf :: BatchListIncomingTypedLinksResponse -> ()
rnf BatchListIncomingTypedLinksResponse' {Maybe [TypedLinkSpecifier]
Maybe Text
nextToken :: Maybe Text
linkSpecifiers :: Maybe [TypedLinkSpecifier]
$sel:nextToken:BatchListIncomingTypedLinksResponse' :: BatchListIncomingTypedLinksResponse -> Maybe Text
$sel:linkSpecifiers:BatchListIncomingTypedLinksResponse' :: BatchListIncomingTypedLinksResponse -> Maybe [TypedLinkSpecifier]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [TypedLinkSpecifier]
linkSpecifiers
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken