{-# 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.BatchAttachObjectResponse
-- 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.BatchAttachObjectResponse where

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 batch AttachObject response operation.
--
-- /See:/ 'newBatchAttachObjectResponse' smart constructor.
data BatchAttachObjectResponse = BatchAttachObjectResponse'
  { -- | The @ObjectIdentifier@ of the object that has been attached.
    BatchAttachObjectResponse -> Maybe Text
attachedObjectIdentifier :: Prelude.Maybe Prelude.Text
  }
  deriving (BatchAttachObjectResponse -> BatchAttachObjectResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchAttachObjectResponse -> BatchAttachObjectResponse -> Bool
$c/= :: BatchAttachObjectResponse -> BatchAttachObjectResponse -> Bool
== :: BatchAttachObjectResponse -> BatchAttachObjectResponse -> Bool
$c== :: BatchAttachObjectResponse -> BatchAttachObjectResponse -> Bool
Prelude.Eq, ReadPrec [BatchAttachObjectResponse]
ReadPrec BatchAttachObjectResponse
Int -> ReadS BatchAttachObjectResponse
ReadS [BatchAttachObjectResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchAttachObjectResponse]
$creadListPrec :: ReadPrec [BatchAttachObjectResponse]
readPrec :: ReadPrec BatchAttachObjectResponse
$creadPrec :: ReadPrec BatchAttachObjectResponse
readList :: ReadS [BatchAttachObjectResponse]
$creadList :: ReadS [BatchAttachObjectResponse]
readsPrec :: Int -> ReadS BatchAttachObjectResponse
$creadsPrec :: Int -> ReadS BatchAttachObjectResponse
Prelude.Read, Int -> BatchAttachObjectResponse -> ShowS
[BatchAttachObjectResponse] -> ShowS
BatchAttachObjectResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchAttachObjectResponse] -> ShowS
$cshowList :: [BatchAttachObjectResponse] -> ShowS
show :: BatchAttachObjectResponse -> String
$cshow :: BatchAttachObjectResponse -> String
showsPrec :: Int -> BatchAttachObjectResponse -> ShowS
$cshowsPrec :: Int -> BatchAttachObjectResponse -> ShowS
Prelude.Show, forall x.
Rep BatchAttachObjectResponse x -> BatchAttachObjectResponse
forall x.
BatchAttachObjectResponse -> Rep BatchAttachObjectResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchAttachObjectResponse x -> BatchAttachObjectResponse
$cfrom :: forall x.
BatchAttachObjectResponse -> Rep BatchAttachObjectResponse x
Prelude.Generic)

-- |
-- Create a value of 'BatchAttachObjectResponse' 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:
--
-- 'attachedObjectIdentifier', 'batchAttachObjectResponse_attachedObjectIdentifier' - The @ObjectIdentifier@ of the object that has been attached.
newBatchAttachObjectResponse ::
  BatchAttachObjectResponse
newBatchAttachObjectResponse :: BatchAttachObjectResponse
newBatchAttachObjectResponse =
  BatchAttachObjectResponse'
    { $sel:attachedObjectIdentifier:BatchAttachObjectResponse' :: Maybe Text
attachedObjectIdentifier =
        forall a. Maybe a
Prelude.Nothing
    }

-- | The @ObjectIdentifier@ of the object that has been attached.
batchAttachObjectResponse_attachedObjectIdentifier :: Lens.Lens' BatchAttachObjectResponse (Prelude.Maybe Prelude.Text)
batchAttachObjectResponse_attachedObjectIdentifier :: Lens' BatchAttachObjectResponse (Maybe Text)
batchAttachObjectResponse_attachedObjectIdentifier = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchAttachObjectResponse' {Maybe Text
attachedObjectIdentifier :: Maybe Text
$sel:attachedObjectIdentifier:BatchAttachObjectResponse' :: BatchAttachObjectResponse -> Maybe Text
attachedObjectIdentifier} -> Maybe Text
attachedObjectIdentifier) (\s :: BatchAttachObjectResponse
s@BatchAttachObjectResponse' {} Maybe Text
a -> BatchAttachObjectResponse
s {$sel:attachedObjectIdentifier:BatchAttachObjectResponse' :: Maybe Text
attachedObjectIdentifier = Maybe Text
a} :: BatchAttachObjectResponse)

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

instance Prelude.Hashable BatchAttachObjectResponse where
  hashWithSalt :: Int -> BatchAttachObjectResponse -> Int
hashWithSalt Int
_salt BatchAttachObjectResponse' {Maybe Text
attachedObjectIdentifier :: Maybe Text
$sel:attachedObjectIdentifier:BatchAttachObjectResponse' :: BatchAttachObjectResponse -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
attachedObjectIdentifier

instance Prelude.NFData BatchAttachObjectResponse where
  rnf :: BatchAttachObjectResponse -> ()
rnf BatchAttachObjectResponse' {Maybe Text
attachedObjectIdentifier :: Maybe Text
$sel:attachedObjectIdentifier:BatchAttachObjectResponse' :: BatchAttachObjectResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
attachedObjectIdentifier