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

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Represents the output of a DetachFromIndex response operation.
--
-- /See:/ 'newBatchDetachFromIndexResponse' smart constructor.
data BatchDetachFromIndexResponse = BatchDetachFromIndexResponse'
  { -- | The @ObjectIdentifier@ of the object that was detached from the index.
    BatchDetachFromIndexResponse -> Maybe Text
detachedObjectIdentifier :: Prelude.Maybe Prelude.Text
  }
  deriving (BatchDetachFromIndexResponse
-> BatchDetachFromIndexResponse -> Bool
(BatchDetachFromIndexResponse
 -> BatchDetachFromIndexResponse -> Bool)
-> (BatchDetachFromIndexResponse
    -> BatchDetachFromIndexResponse -> Bool)
-> Eq BatchDetachFromIndexResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchDetachFromIndexResponse
-> BatchDetachFromIndexResponse -> Bool
$c/= :: BatchDetachFromIndexResponse
-> BatchDetachFromIndexResponse -> Bool
== :: BatchDetachFromIndexResponse
-> BatchDetachFromIndexResponse -> Bool
$c== :: BatchDetachFromIndexResponse
-> BatchDetachFromIndexResponse -> Bool
Prelude.Eq, ReadPrec [BatchDetachFromIndexResponse]
ReadPrec BatchDetachFromIndexResponse
Int -> ReadS BatchDetachFromIndexResponse
ReadS [BatchDetachFromIndexResponse]
(Int -> ReadS BatchDetachFromIndexResponse)
-> ReadS [BatchDetachFromIndexResponse]
-> ReadPrec BatchDetachFromIndexResponse
-> ReadPrec [BatchDetachFromIndexResponse]
-> Read BatchDetachFromIndexResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchDetachFromIndexResponse]
$creadListPrec :: ReadPrec [BatchDetachFromIndexResponse]
readPrec :: ReadPrec BatchDetachFromIndexResponse
$creadPrec :: ReadPrec BatchDetachFromIndexResponse
readList :: ReadS [BatchDetachFromIndexResponse]
$creadList :: ReadS [BatchDetachFromIndexResponse]
readsPrec :: Int -> ReadS BatchDetachFromIndexResponse
$creadsPrec :: Int -> ReadS BatchDetachFromIndexResponse
Prelude.Read, Int -> BatchDetachFromIndexResponse -> ShowS
[BatchDetachFromIndexResponse] -> ShowS
BatchDetachFromIndexResponse -> String
(Int -> BatchDetachFromIndexResponse -> ShowS)
-> (BatchDetachFromIndexResponse -> String)
-> ([BatchDetachFromIndexResponse] -> ShowS)
-> Show BatchDetachFromIndexResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchDetachFromIndexResponse] -> ShowS
$cshowList :: [BatchDetachFromIndexResponse] -> ShowS
show :: BatchDetachFromIndexResponse -> String
$cshow :: BatchDetachFromIndexResponse -> String
showsPrec :: Int -> BatchDetachFromIndexResponse -> ShowS
$cshowsPrec :: Int -> BatchDetachFromIndexResponse -> ShowS
Prelude.Show, (forall x.
 BatchDetachFromIndexResponse -> Rep BatchDetachFromIndexResponse x)
-> (forall x.
    Rep BatchDetachFromIndexResponse x -> BatchDetachFromIndexResponse)
-> Generic BatchDetachFromIndexResponse
forall x.
Rep BatchDetachFromIndexResponse x -> BatchDetachFromIndexResponse
forall x.
BatchDetachFromIndexResponse -> Rep BatchDetachFromIndexResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchDetachFromIndexResponse x -> BatchDetachFromIndexResponse
$cfrom :: forall x.
BatchDetachFromIndexResponse -> Rep BatchDetachFromIndexResponse x
Prelude.Generic)

-- |
-- Create a value of 'BatchDetachFromIndexResponse' 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:
--
-- 'detachedObjectIdentifier', 'batchDetachFromIndexResponse_detachedObjectIdentifier' - The @ObjectIdentifier@ of the object that was detached from the index.
newBatchDetachFromIndexResponse ::
  BatchDetachFromIndexResponse
newBatchDetachFromIndexResponse :: BatchDetachFromIndexResponse
newBatchDetachFromIndexResponse =
  BatchDetachFromIndexResponse' :: Maybe Text -> BatchDetachFromIndexResponse
BatchDetachFromIndexResponse'
    { $sel:detachedObjectIdentifier:BatchDetachFromIndexResponse' :: Maybe Text
detachedObjectIdentifier =
        Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The @ObjectIdentifier@ of the object that was detached from the index.
batchDetachFromIndexResponse_detachedObjectIdentifier :: Lens.Lens' BatchDetachFromIndexResponse (Prelude.Maybe Prelude.Text)
batchDetachFromIndexResponse_detachedObjectIdentifier :: (Maybe Text -> f (Maybe Text))
-> BatchDetachFromIndexResponse -> f BatchDetachFromIndexResponse
batchDetachFromIndexResponse_detachedObjectIdentifier = (BatchDetachFromIndexResponse -> Maybe Text)
-> (BatchDetachFromIndexResponse
    -> Maybe Text -> BatchDetachFromIndexResponse)
-> Lens
     BatchDetachFromIndexResponse
     BatchDetachFromIndexResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDetachFromIndexResponse' {Maybe Text
detachedObjectIdentifier :: Maybe Text
$sel:detachedObjectIdentifier:BatchDetachFromIndexResponse' :: BatchDetachFromIndexResponse -> Maybe Text
detachedObjectIdentifier} -> Maybe Text
detachedObjectIdentifier) (\s :: BatchDetachFromIndexResponse
s@BatchDetachFromIndexResponse' {} Maybe Text
a -> BatchDetachFromIndexResponse
s {$sel:detachedObjectIdentifier:BatchDetachFromIndexResponse' :: Maybe Text
detachedObjectIdentifier = Maybe Text
a} :: BatchDetachFromIndexResponse)

instance Core.FromJSON BatchDetachFromIndexResponse where
  parseJSON :: Value -> Parser BatchDetachFromIndexResponse
parseJSON =
    String
-> (Object -> Parser BatchDetachFromIndexResponse)
-> Value
-> Parser BatchDetachFromIndexResponse
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"BatchDetachFromIndexResponse"
      ( \Object
x ->
          Maybe Text -> BatchDetachFromIndexResponse
BatchDetachFromIndexResponse'
            (Maybe Text -> BatchDetachFromIndexResponse)
-> Parser (Maybe Text) -> Parser BatchDetachFromIndexResponse
forall (f :: * -> *) a b. Functor 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
"DetachedObjectIdentifier")
      )

instance
  Prelude.Hashable
    BatchDetachFromIndexResponse

instance Prelude.NFData BatchDetachFromIndexResponse