{-# 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-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.BatchAttachTypedLinkResponse 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 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
(BatchAttachTypedLinkResponse
 -> BatchAttachTypedLinkResponse -> Bool)
-> (BatchAttachTypedLinkResponse
    -> BatchAttachTypedLinkResponse -> Bool)
-> Eq BatchAttachTypedLinkResponse
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]
(Int -> ReadS BatchAttachTypedLinkResponse)
-> ReadS [BatchAttachTypedLinkResponse]
-> ReadPrec BatchAttachTypedLinkResponse
-> ReadPrec [BatchAttachTypedLinkResponse]
-> Read 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
(Int -> BatchAttachTypedLinkResponse -> ShowS)
-> (BatchAttachTypedLinkResponse -> String)
-> ([BatchAttachTypedLinkResponse] -> ShowS)
-> Show BatchAttachTypedLinkResponse
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.
 BatchAttachTypedLinkResponse -> Rep BatchAttachTypedLinkResponse x)
-> (forall x.
    Rep BatchAttachTypedLinkResponse x -> BatchAttachTypedLinkResponse)
-> Generic BatchAttachTypedLinkResponse
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' :: Maybe TypedLinkSpecifier -> BatchAttachTypedLinkResponse
BatchAttachTypedLinkResponse'
    { $sel:typedLinkSpecifier:BatchAttachTypedLinkResponse' :: Maybe TypedLinkSpecifier
typedLinkSpecifier =
        Maybe TypedLinkSpecifier
forall a. Maybe a
Prelude.Nothing
    }

-- | Returns a typed link specifier as output.
batchAttachTypedLinkResponse_typedLinkSpecifier :: Lens.Lens' BatchAttachTypedLinkResponse (Prelude.Maybe TypedLinkSpecifier)
batchAttachTypedLinkResponse_typedLinkSpecifier :: (Maybe TypedLinkSpecifier -> f (Maybe TypedLinkSpecifier))
-> BatchAttachTypedLinkResponse -> f BatchAttachTypedLinkResponse
batchAttachTypedLinkResponse_typedLinkSpecifier = (BatchAttachTypedLinkResponse -> Maybe TypedLinkSpecifier)
-> (BatchAttachTypedLinkResponse
    -> Maybe TypedLinkSpecifier -> BatchAttachTypedLinkResponse)
-> Lens
     BatchAttachTypedLinkResponse
     BatchAttachTypedLinkResponse
     (Maybe TypedLinkSpecifier)
     (Maybe 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 Core.FromJSON BatchAttachTypedLinkResponse where
  parseJSON :: Value -> Parser BatchAttachTypedLinkResponse
parseJSON =
    String
-> (Object -> Parser BatchAttachTypedLinkResponse)
-> Value
-> Parser BatchAttachTypedLinkResponse
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"BatchAttachTypedLinkResponse"
      ( \Object
x ->
          Maybe TypedLinkSpecifier -> BatchAttachTypedLinkResponse
BatchAttachTypedLinkResponse'
            (Maybe TypedLinkSpecifier -> BatchAttachTypedLinkResponse)
-> Parser (Maybe TypedLinkSpecifier)
-> Parser BatchAttachTypedLinkResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe TypedLinkSpecifier)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TypedLinkSpecifier")
      )

instance
  Prelude.Hashable
    BatchAttachTypedLinkResponse

instance Prelude.NFData BatchAttachTypedLinkResponse