{-# 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.BatchAttachTypedLinkResponse
-- 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.BatchAttachTypedLinkResponse 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 AttachTypedLink response operation.
--
-- /See:/ 'newBatchAttachTypedLinkResponse' smart constructor.
data BatchAttachTypedLinkResponse = BatchAttachTypedLinkResponse'
  { -- | Returns a typed link specifier as output.
    BatchAttachTypedLinkResponse -> Maybe TypedLinkSpecifier
typedLinkSpecifier :: Prelude.Maybe TypedLinkSpecifier
  }
  deriving (BatchAttachTypedLinkResponse
-> BatchAttachTypedLinkResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchAttachTypedLinkResponse
-> BatchAttachTypedLinkResponse -> Bool
$c/= :: BatchAttachTypedLinkResponse
-> BatchAttachTypedLinkResponse -> Bool
== :: BatchAttachTypedLinkResponse
-> BatchAttachTypedLinkResponse -> Bool
$c== :: BatchAttachTypedLinkResponse
-> BatchAttachTypedLinkResponse -> Bool
Prelude.Eq, ReadPrec [BatchAttachTypedLinkResponse]
ReadPrec BatchAttachTypedLinkResponse
Int -> ReadS BatchAttachTypedLinkResponse
ReadS [BatchAttachTypedLinkResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchAttachTypedLinkResponse]
$creadListPrec :: ReadPrec [BatchAttachTypedLinkResponse]
readPrec :: ReadPrec BatchAttachTypedLinkResponse
$creadPrec :: ReadPrec BatchAttachTypedLinkResponse
readList :: ReadS [BatchAttachTypedLinkResponse]
$creadList :: ReadS [BatchAttachTypedLinkResponse]
readsPrec :: Int -> ReadS BatchAttachTypedLinkResponse
$creadsPrec :: Int -> ReadS BatchAttachTypedLinkResponse
Prelude.Read, Int -> BatchAttachTypedLinkResponse -> ShowS
[BatchAttachTypedLinkResponse] -> ShowS
BatchAttachTypedLinkResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchAttachTypedLinkResponse] -> ShowS
$cshowList :: [BatchAttachTypedLinkResponse] -> ShowS
show :: BatchAttachTypedLinkResponse -> String
$cshow :: BatchAttachTypedLinkResponse -> String
showsPrec :: Int -> BatchAttachTypedLinkResponse -> ShowS
$cshowsPrec :: Int -> BatchAttachTypedLinkResponse -> ShowS
Prelude.Show, forall x.
Rep BatchAttachTypedLinkResponse x -> BatchAttachTypedLinkResponse
forall x.
BatchAttachTypedLinkResponse -> Rep BatchAttachTypedLinkResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchAttachTypedLinkResponse x -> BatchAttachTypedLinkResponse
$cfrom :: forall x.
BatchAttachTypedLinkResponse -> Rep BatchAttachTypedLinkResponse x
Prelude.Generic)

-- |
-- Create a value of 'BatchAttachTypedLinkResponse' 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:
--
-- 'typedLinkSpecifier', 'batchAttachTypedLinkResponse_typedLinkSpecifier' - Returns a typed link specifier as output.
newBatchAttachTypedLinkResponse ::
  BatchAttachTypedLinkResponse
newBatchAttachTypedLinkResponse :: BatchAttachTypedLinkResponse
newBatchAttachTypedLinkResponse =
  BatchAttachTypedLinkResponse'
    { $sel:typedLinkSpecifier:BatchAttachTypedLinkResponse' :: Maybe TypedLinkSpecifier
typedLinkSpecifier =
        forall a. Maybe a
Prelude.Nothing
    }

-- | Returns a typed link specifier as output.
batchAttachTypedLinkResponse_typedLinkSpecifier :: Lens.Lens' BatchAttachTypedLinkResponse (Prelude.Maybe TypedLinkSpecifier)
batchAttachTypedLinkResponse_typedLinkSpecifier :: Lens' BatchAttachTypedLinkResponse (Maybe TypedLinkSpecifier)
batchAttachTypedLinkResponse_typedLinkSpecifier = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchAttachTypedLinkResponse' {Maybe TypedLinkSpecifier
typedLinkSpecifier :: Maybe TypedLinkSpecifier
$sel:typedLinkSpecifier:BatchAttachTypedLinkResponse' :: BatchAttachTypedLinkResponse -> Maybe TypedLinkSpecifier
typedLinkSpecifier} -> Maybe TypedLinkSpecifier
typedLinkSpecifier) (\s :: BatchAttachTypedLinkResponse
s@BatchAttachTypedLinkResponse' {} Maybe TypedLinkSpecifier
a -> BatchAttachTypedLinkResponse
s {$sel:typedLinkSpecifier:BatchAttachTypedLinkResponse' :: Maybe TypedLinkSpecifier
typedLinkSpecifier = Maybe TypedLinkSpecifier
a} :: BatchAttachTypedLinkResponse)

instance Data.FromJSON BatchAttachTypedLinkResponse where
  parseJSON :: Value -> Parser BatchAttachTypedLinkResponse
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"BatchAttachTypedLinkResponse"
      ( \Object
x ->
          Maybe TypedLinkSpecifier -> BatchAttachTypedLinkResponse
BatchAttachTypedLinkResponse'
            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
"TypedLinkSpecifier")
      )

instance
  Prelude.Hashable
    BatchAttachTypedLinkResponse
  where
  hashWithSalt :: Int -> BatchAttachTypedLinkResponse -> Int
hashWithSalt Int
_salt BatchAttachTypedLinkResponse' {Maybe TypedLinkSpecifier
typedLinkSpecifier :: Maybe TypedLinkSpecifier
$sel:typedLinkSpecifier:BatchAttachTypedLinkResponse' :: BatchAttachTypedLinkResponse -> Maybe TypedLinkSpecifier
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TypedLinkSpecifier
typedLinkSpecifier

instance Prelude.NFData BatchAttachTypedLinkResponse where
  rnf :: BatchAttachTypedLinkResponse -> ()
rnf BatchAttachTypedLinkResponse' {Maybe TypedLinkSpecifier
typedLinkSpecifier :: Maybe TypedLinkSpecifier
$sel:typedLinkSpecifier:BatchAttachTypedLinkResponse' :: BatchAttachTypedLinkResponse -> Maybe TypedLinkSpecifier
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe TypedLinkSpecifier
typedLinkSpecifier