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

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

-- | Represents the output of a CreateObject response operation.
--
-- /See:/ 'newBatchCreateObjectResponse' smart constructor.
data BatchCreateObjectResponse = BatchCreateObjectResponse'
  { -- | The ID that is associated with the object.
    BatchCreateObjectResponse -> Maybe Text
objectIdentifier :: Prelude.Maybe Prelude.Text
  }
  deriving (BatchCreateObjectResponse -> BatchCreateObjectResponse -> Bool
(BatchCreateObjectResponse -> BatchCreateObjectResponse -> Bool)
-> (BatchCreateObjectResponse -> BatchCreateObjectResponse -> Bool)
-> Eq BatchCreateObjectResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchCreateObjectResponse -> BatchCreateObjectResponse -> Bool
$c/= :: BatchCreateObjectResponse -> BatchCreateObjectResponse -> Bool
== :: BatchCreateObjectResponse -> BatchCreateObjectResponse -> Bool
$c== :: BatchCreateObjectResponse -> BatchCreateObjectResponse -> Bool
Prelude.Eq, ReadPrec [BatchCreateObjectResponse]
ReadPrec BatchCreateObjectResponse
Int -> ReadS BatchCreateObjectResponse
ReadS [BatchCreateObjectResponse]
(Int -> ReadS BatchCreateObjectResponse)
-> ReadS [BatchCreateObjectResponse]
-> ReadPrec BatchCreateObjectResponse
-> ReadPrec [BatchCreateObjectResponse]
-> Read BatchCreateObjectResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchCreateObjectResponse]
$creadListPrec :: ReadPrec [BatchCreateObjectResponse]
readPrec :: ReadPrec BatchCreateObjectResponse
$creadPrec :: ReadPrec BatchCreateObjectResponse
readList :: ReadS [BatchCreateObjectResponse]
$creadList :: ReadS [BatchCreateObjectResponse]
readsPrec :: Int -> ReadS BatchCreateObjectResponse
$creadsPrec :: Int -> ReadS BatchCreateObjectResponse
Prelude.Read, Int -> BatchCreateObjectResponse -> ShowS
[BatchCreateObjectResponse] -> ShowS
BatchCreateObjectResponse -> String
(Int -> BatchCreateObjectResponse -> ShowS)
-> (BatchCreateObjectResponse -> String)
-> ([BatchCreateObjectResponse] -> ShowS)
-> Show BatchCreateObjectResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchCreateObjectResponse] -> ShowS
$cshowList :: [BatchCreateObjectResponse] -> ShowS
show :: BatchCreateObjectResponse -> String
$cshow :: BatchCreateObjectResponse -> String
showsPrec :: Int -> BatchCreateObjectResponse -> ShowS
$cshowsPrec :: Int -> BatchCreateObjectResponse -> ShowS
Prelude.Show, (forall x.
 BatchCreateObjectResponse -> Rep BatchCreateObjectResponse x)
-> (forall x.
    Rep BatchCreateObjectResponse x -> BatchCreateObjectResponse)
-> Generic BatchCreateObjectResponse
forall x.
Rep BatchCreateObjectResponse x -> BatchCreateObjectResponse
forall x.
BatchCreateObjectResponse -> Rep BatchCreateObjectResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchCreateObjectResponse x -> BatchCreateObjectResponse
$cfrom :: forall x.
BatchCreateObjectResponse -> Rep BatchCreateObjectResponse x
Prelude.Generic)

-- |
-- Create a value of 'BatchCreateObjectResponse' 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:
--
-- 'objectIdentifier', 'batchCreateObjectResponse_objectIdentifier' - The ID that is associated with the object.
newBatchCreateObjectResponse ::
  BatchCreateObjectResponse
newBatchCreateObjectResponse :: BatchCreateObjectResponse
newBatchCreateObjectResponse =
  BatchCreateObjectResponse' :: Maybe Text -> BatchCreateObjectResponse
BatchCreateObjectResponse'
    { $sel:objectIdentifier:BatchCreateObjectResponse' :: Maybe Text
objectIdentifier =
        Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The ID that is associated with the object.
batchCreateObjectResponse_objectIdentifier :: Lens.Lens' BatchCreateObjectResponse (Prelude.Maybe Prelude.Text)
batchCreateObjectResponse_objectIdentifier :: (Maybe Text -> f (Maybe Text))
-> BatchCreateObjectResponse -> f BatchCreateObjectResponse
batchCreateObjectResponse_objectIdentifier = (BatchCreateObjectResponse -> Maybe Text)
-> (BatchCreateObjectResponse
    -> Maybe Text -> BatchCreateObjectResponse)
-> Lens
     BatchCreateObjectResponse
     BatchCreateObjectResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchCreateObjectResponse' {Maybe Text
objectIdentifier :: Maybe Text
$sel:objectIdentifier:BatchCreateObjectResponse' :: BatchCreateObjectResponse -> Maybe Text
objectIdentifier} -> Maybe Text
objectIdentifier) (\s :: BatchCreateObjectResponse
s@BatchCreateObjectResponse' {} Maybe Text
a -> BatchCreateObjectResponse
s {$sel:objectIdentifier:BatchCreateObjectResponse' :: Maybe Text
objectIdentifier = Maybe Text
a} :: BatchCreateObjectResponse)

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

instance Prelude.Hashable BatchCreateObjectResponse

instance Prelude.NFData BatchCreateObjectResponse