{-# 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 #-}
module Amazonka.CloudDirectory.Types.BatchGetObjectInformationResponse where
import Amazonka.CloudDirectory.Types.SchemaFacet
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
data BatchGetObjectInformationResponse = BatchGetObjectInformationResponse'
{
BatchGetObjectInformationResponse -> Maybe Text
objectIdentifier :: Prelude.Maybe Prelude.Text,
BatchGetObjectInformationResponse -> Maybe [SchemaFacet]
schemaFacets :: Prelude.Maybe [SchemaFacet]
}
deriving (BatchGetObjectInformationResponse
-> BatchGetObjectInformationResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchGetObjectInformationResponse
-> BatchGetObjectInformationResponse -> Bool
$c/= :: BatchGetObjectInformationResponse
-> BatchGetObjectInformationResponse -> Bool
== :: BatchGetObjectInformationResponse
-> BatchGetObjectInformationResponse -> Bool
$c== :: BatchGetObjectInformationResponse
-> BatchGetObjectInformationResponse -> Bool
Prelude.Eq, ReadPrec [BatchGetObjectInformationResponse]
ReadPrec BatchGetObjectInformationResponse
Int -> ReadS BatchGetObjectInformationResponse
ReadS [BatchGetObjectInformationResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchGetObjectInformationResponse]
$creadListPrec :: ReadPrec [BatchGetObjectInformationResponse]
readPrec :: ReadPrec BatchGetObjectInformationResponse
$creadPrec :: ReadPrec BatchGetObjectInformationResponse
readList :: ReadS [BatchGetObjectInformationResponse]
$creadList :: ReadS [BatchGetObjectInformationResponse]
readsPrec :: Int -> ReadS BatchGetObjectInformationResponse
$creadsPrec :: Int -> ReadS BatchGetObjectInformationResponse
Prelude.Read, Int -> BatchGetObjectInformationResponse -> ShowS
[BatchGetObjectInformationResponse] -> ShowS
BatchGetObjectInformationResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchGetObjectInformationResponse] -> ShowS
$cshowList :: [BatchGetObjectInformationResponse] -> ShowS
show :: BatchGetObjectInformationResponse -> String
$cshow :: BatchGetObjectInformationResponse -> String
showsPrec :: Int -> BatchGetObjectInformationResponse -> ShowS
$cshowsPrec :: Int -> BatchGetObjectInformationResponse -> ShowS
Prelude.Show, forall x.
Rep BatchGetObjectInformationResponse x
-> BatchGetObjectInformationResponse
forall x.
BatchGetObjectInformationResponse
-> Rep BatchGetObjectInformationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchGetObjectInformationResponse x
-> BatchGetObjectInformationResponse
$cfrom :: forall x.
BatchGetObjectInformationResponse
-> Rep BatchGetObjectInformationResponse x
Prelude.Generic)
newBatchGetObjectInformationResponse ::
BatchGetObjectInformationResponse
newBatchGetObjectInformationResponse :: BatchGetObjectInformationResponse
newBatchGetObjectInformationResponse =
BatchGetObjectInformationResponse'
{ $sel:objectIdentifier:BatchGetObjectInformationResponse' :: Maybe Text
objectIdentifier =
forall a. Maybe a
Prelude.Nothing,
$sel:schemaFacets:BatchGetObjectInformationResponse' :: Maybe [SchemaFacet]
schemaFacets = forall a. Maybe a
Prelude.Nothing
}
batchGetObjectInformationResponse_objectIdentifier :: Lens.Lens' BatchGetObjectInformationResponse (Prelude.Maybe Prelude.Text)
batchGetObjectInformationResponse_objectIdentifier :: Lens' BatchGetObjectInformationResponse (Maybe Text)
batchGetObjectInformationResponse_objectIdentifier = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetObjectInformationResponse' {Maybe Text
objectIdentifier :: Maybe Text
$sel:objectIdentifier:BatchGetObjectInformationResponse' :: BatchGetObjectInformationResponse -> Maybe Text
objectIdentifier} -> Maybe Text
objectIdentifier) (\s :: BatchGetObjectInformationResponse
s@BatchGetObjectInformationResponse' {} Maybe Text
a -> BatchGetObjectInformationResponse
s {$sel:objectIdentifier:BatchGetObjectInformationResponse' :: Maybe Text
objectIdentifier = Maybe Text
a} :: BatchGetObjectInformationResponse)
batchGetObjectInformationResponse_schemaFacets :: Lens.Lens' BatchGetObjectInformationResponse (Prelude.Maybe [SchemaFacet])
batchGetObjectInformationResponse_schemaFacets :: Lens' BatchGetObjectInformationResponse (Maybe [SchemaFacet])
batchGetObjectInformationResponse_schemaFacets = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetObjectInformationResponse' {Maybe [SchemaFacet]
schemaFacets :: Maybe [SchemaFacet]
$sel:schemaFacets:BatchGetObjectInformationResponse' :: BatchGetObjectInformationResponse -> Maybe [SchemaFacet]
schemaFacets} -> Maybe [SchemaFacet]
schemaFacets) (\s :: BatchGetObjectInformationResponse
s@BatchGetObjectInformationResponse' {} Maybe [SchemaFacet]
a -> BatchGetObjectInformationResponse
s {$sel:schemaFacets:BatchGetObjectInformationResponse' :: Maybe [SchemaFacet]
schemaFacets = Maybe [SchemaFacet]
a} :: BatchGetObjectInformationResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance
Data.FromJSON
BatchGetObjectInformationResponse
where
parseJSON :: Value -> Parser BatchGetObjectInformationResponse
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"BatchGetObjectInformationResponse"
( \Object
x ->
Maybe Text
-> Maybe [SchemaFacet] -> BatchGetObjectInformationResponse
BatchGetObjectInformationResponse'
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
"ObjectIdentifier")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"SchemaFacets" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
)
instance
Prelude.Hashable
BatchGetObjectInformationResponse
where
hashWithSalt :: Int -> BatchGetObjectInformationResponse -> Int
hashWithSalt
Int
_salt
BatchGetObjectInformationResponse' {Maybe [SchemaFacet]
Maybe Text
schemaFacets :: Maybe [SchemaFacet]
objectIdentifier :: Maybe Text
$sel:schemaFacets:BatchGetObjectInformationResponse' :: BatchGetObjectInformationResponse -> Maybe [SchemaFacet]
$sel:objectIdentifier:BatchGetObjectInformationResponse' :: BatchGetObjectInformationResponse -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
objectIdentifier
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [SchemaFacet]
schemaFacets
instance
Prelude.NFData
BatchGetObjectInformationResponse
where
rnf :: BatchGetObjectInformationResponse -> ()
rnf BatchGetObjectInformationResponse' {Maybe [SchemaFacet]
Maybe Text
schemaFacets :: Maybe [SchemaFacet]
objectIdentifier :: Maybe Text
$sel:schemaFacets:BatchGetObjectInformationResponse' :: BatchGetObjectInformationResponse -> Maybe [SchemaFacet]
$sel:objectIdentifier:BatchGetObjectInformationResponse' :: BatchGetObjectInformationResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
objectIdentifier
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [SchemaFacet]
schemaFacets