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

import Amazonka.CloudDirectory.Types.BatchGetLinkAttributes
import Amazonka.CloudDirectory.Types.BatchGetObjectAttributes
import Amazonka.CloudDirectory.Types.BatchGetObjectInformation
import Amazonka.CloudDirectory.Types.BatchListAttachedIndices
import Amazonka.CloudDirectory.Types.BatchListIncomingTypedLinks
import Amazonka.CloudDirectory.Types.BatchListIndex
import Amazonka.CloudDirectory.Types.BatchListObjectAttributes
import Amazonka.CloudDirectory.Types.BatchListObjectChildren
import Amazonka.CloudDirectory.Types.BatchListObjectParentPaths
import Amazonka.CloudDirectory.Types.BatchListObjectParents
import Amazonka.CloudDirectory.Types.BatchListObjectPolicies
import Amazonka.CloudDirectory.Types.BatchListOutgoingTypedLinks
import Amazonka.CloudDirectory.Types.BatchListPolicyAttachments
import Amazonka.CloudDirectory.Types.BatchLookupPolicy
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Represents the output of a @BatchRead@ operation.
--
-- /See:/ 'newBatchReadOperation' smart constructor.
data BatchReadOperation = BatchReadOperation'
  { -- | Lists objects attached to the specified index.
    BatchReadOperation -> Maybe BatchListIndex
listIndex :: Prelude.Maybe BatchListIndex,
    -- | Retrieves metadata about an object.
    BatchReadOperation -> Maybe BatchGetObjectInformation
getObjectInformation :: Prelude.Maybe BatchGetObjectInformation,
    -- | Lists indices attached to an object.
    BatchReadOperation -> Maybe BatchListAttachedIndices
listAttachedIndices :: Prelude.Maybe BatchListAttachedIndices,
    -- | Lists all policies from the root of the Directory to the object
    -- specified. If there are no policies present, an empty list is returned.
    -- If policies are present, and if some objects don\'t have the policies
    -- attached, it returns the @ObjectIdentifier@ for such objects. If
    -- policies are present, it returns @ObjectIdentifier@, @policyId@, and
    -- @policyType@. Paths that don\'t lead to the root from the target object
    -- are ignored. For more information, see
    -- <https://docs.aws.amazon.com/clouddirectory/latest/developerguide/key_concepts_directory.html#key_concepts_policies Policies>.
    BatchReadOperation -> Maybe BatchLookupPolicy
lookupPolicy :: Prelude.Maybe BatchLookupPolicy,
    -- | Retrieves all available parent paths for any object type such as node,
    -- leaf node, policy node, and index node objects. For more information
    -- about objects, see
    -- <https://docs.aws.amazon.com/clouddirectory/latest/developerguide/key_concepts_directorystructure.html Directory Structure>.
    BatchReadOperation -> Maybe BatchListObjectParentPaths
listObjectParentPaths :: Prelude.Maybe BatchListObjectParentPaths,
    -- | Lists all attributes that are associated with an object.
    BatchReadOperation -> Maybe BatchListObjectAttributes
listObjectAttributes :: Prelude.Maybe BatchListObjectAttributes,
    -- | Returns a paginated list of all the incoming TypedLinkSpecifier
    -- information for an object. It also supports filtering by typed link
    -- facet and identity attributes. For more information, see
    -- <https://docs.aws.amazon.com/clouddirectory/latest/developerguide/directory_objects_links.html#directory_objects_links_typedlink Typed Links>.
    BatchReadOperation -> Maybe BatchListIncomingTypedLinks
listIncomingTypedLinks :: Prelude.Maybe BatchListIncomingTypedLinks,
    -- | Retrieves attributes that are associated with a typed link.
    BatchReadOperation -> Maybe BatchGetLinkAttributes
getLinkAttributes :: Prelude.Maybe BatchGetLinkAttributes,
    -- | Retrieves attributes within a facet that are associated with an object.
    BatchReadOperation -> Maybe BatchGetObjectAttributes
getObjectAttributes :: Prelude.Maybe BatchGetObjectAttributes,
    -- | Returns a paginated list of child objects that are associated with a
    -- given object.
    BatchReadOperation -> Maybe BatchListObjectChildren
listObjectChildren :: Prelude.Maybe BatchListObjectChildren,
    -- | Lists parent objects that are associated with a given object in
    -- pagination fashion.
    BatchReadOperation -> Maybe BatchListObjectParents
listObjectParents :: Prelude.Maybe BatchListObjectParents,
    -- | Returns all of the @ObjectIdentifiers@ to which a given policy is
    -- attached.
    BatchReadOperation -> Maybe BatchListPolicyAttachments
listPolicyAttachments :: Prelude.Maybe BatchListPolicyAttachments,
    -- | Returns a paginated list of all the outgoing TypedLinkSpecifier
    -- information for an object. It also supports filtering by typed link
    -- facet and identity attributes. For more information, see
    -- <https://docs.aws.amazon.com/clouddirectory/latest/developerguide/directory_objects_links.html#directory_objects_links_typedlink Typed Links>.
    BatchReadOperation -> Maybe BatchListOutgoingTypedLinks
listOutgoingTypedLinks :: Prelude.Maybe BatchListOutgoingTypedLinks,
    -- | Returns policies attached to an object in pagination fashion.
    BatchReadOperation -> Maybe BatchListObjectPolicies
listObjectPolicies :: Prelude.Maybe BatchListObjectPolicies
  }
  deriving (BatchReadOperation -> BatchReadOperation -> Bool
(BatchReadOperation -> BatchReadOperation -> Bool)
-> (BatchReadOperation -> BatchReadOperation -> Bool)
-> Eq BatchReadOperation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchReadOperation -> BatchReadOperation -> Bool
$c/= :: BatchReadOperation -> BatchReadOperation -> Bool
== :: BatchReadOperation -> BatchReadOperation -> Bool
$c== :: BatchReadOperation -> BatchReadOperation -> Bool
Prelude.Eq, ReadPrec [BatchReadOperation]
ReadPrec BatchReadOperation
Int -> ReadS BatchReadOperation
ReadS [BatchReadOperation]
(Int -> ReadS BatchReadOperation)
-> ReadS [BatchReadOperation]
-> ReadPrec BatchReadOperation
-> ReadPrec [BatchReadOperation]
-> Read BatchReadOperation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchReadOperation]
$creadListPrec :: ReadPrec [BatchReadOperation]
readPrec :: ReadPrec BatchReadOperation
$creadPrec :: ReadPrec BatchReadOperation
readList :: ReadS [BatchReadOperation]
$creadList :: ReadS [BatchReadOperation]
readsPrec :: Int -> ReadS BatchReadOperation
$creadsPrec :: Int -> ReadS BatchReadOperation
Prelude.Read, Int -> BatchReadOperation -> ShowS
[BatchReadOperation] -> ShowS
BatchReadOperation -> String
(Int -> BatchReadOperation -> ShowS)
-> (BatchReadOperation -> String)
-> ([BatchReadOperation] -> ShowS)
-> Show BatchReadOperation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchReadOperation] -> ShowS
$cshowList :: [BatchReadOperation] -> ShowS
show :: BatchReadOperation -> String
$cshow :: BatchReadOperation -> String
showsPrec :: Int -> BatchReadOperation -> ShowS
$cshowsPrec :: Int -> BatchReadOperation -> ShowS
Prelude.Show, (forall x. BatchReadOperation -> Rep BatchReadOperation x)
-> (forall x. Rep BatchReadOperation x -> BatchReadOperation)
-> Generic BatchReadOperation
forall x. Rep BatchReadOperation x -> BatchReadOperation
forall x. BatchReadOperation -> Rep BatchReadOperation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BatchReadOperation x -> BatchReadOperation
$cfrom :: forall x. BatchReadOperation -> Rep BatchReadOperation x
Prelude.Generic)

-- |
-- Create a value of 'BatchReadOperation' 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:
--
-- 'listIndex', 'batchReadOperation_listIndex' - Lists objects attached to the specified index.
--
-- 'getObjectInformation', 'batchReadOperation_getObjectInformation' - Retrieves metadata about an object.
--
-- 'listAttachedIndices', 'batchReadOperation_listAttachedIndices' - Lists indices attached to an object.
--
-- 'lookupPolicy', 'batchReadOperation_lookupPolicy' - Lists all policies from the root of the Directory to the object
-- specified. If there are no policies present, an empty list is returned.
-- If policies are present, and if some objects don\'t have the policies
-- attached, it returns the @ObjectIdentifier@ for such objects. If
-- policies are present, it returns @ObjectIdentifier@, @policyId@, and
-- @policyType@. Paths that don\'t lead to the root from the target object
-- are ignored. For more information, see
-- <https://docs.aws.amazon.com/clouddirectory/latest/developerguide/key_concepts_directory.html#key_concepts_policies Policies>.
--
-- 'listObjectParentPaths', 'batchReadOperation_listObjectParentPaths' - Retrieves all available parent paths for any object type such as node,
-- leaf node, policy node, and index node objects. For more information
-- about objects, see
-- <https://docs.aws.amazon.com/clouddirectory/latest/developerguide/key_concepts_directorystructure.html Directory Structure>.
--
-- 'listObjectAttributes', 'batchReadOperation_listObjectAttributes' - Lists all attributes that are associated with an object.
--
-- 'listIncomingTypedLinks', 'batchReadOperation_listIncomingTypedLinks' - Returns a paginated list of all the incoming TypedLinkSpecifier
-- information for an object. It also supports filtering by typed link
-- facet and identity attributes. For more information, see
-- <https://docs.aws.amazon.com/clouddirectory/latest/developerguide/directory_objects_links.html#directory_objects_links_typedlink Typed Links>.
--
-- 'getLinkAttributes', 'batchReadOperation_getLinkAttributes' - Retrieves attributes that are associated with a typed link.
--
-- 'getObjectAttributes', 'batchReadOperation_getObjectAttributes' - Retrieves attributes within a facet that are associated with an object.
--
-- 'listObjectChildren', 'batchReadOperation_listObjectChildren' - Returns a paginated list of child objects that are associated with a
-- given object.
--
-- 'listObjectParents', 'batchReadOperation_listObjectParents' - Lists parent objects that are associated with a given object in
-- pagination fashion.
--
-- 'listPolicyAttachments', 'batchReadOperation_listPolicyAttachments' - Returns all of the @ObjectIdentifiers@ to which a given policy is
-- attached.
--
-- 'listOutgoingTypedLinks', 'batchReadOperation_listOutgoingTypedLinks' - Returns a paginated list of all the outgoing TypedLinkSpecifier
-- information for an object. It also supports filtering by typed link
-- facet and identity attributes. For more information, see
-- <https://docs.aws.amazon.com/clouddirectory/latest/developerguide/directory_objects_links.html#directory_objects_links_typedlink Typed Links>.
--
-- 'listObjectPolicies', 'batchReadOperation_listObjectPolicies' - Returns policies attached to an object in pagination fashion.
newBatchReadOperation ::
  BatchReadOperation
newBatchReadOperation :: BatchReadOperation
newBatchReadOperation =
  BatchReadOperation' :: Maybe BatchListIndex
-> Maybe BatchGetObjectInformation
-> Maybe BatchListAttachedIndices
-> Maybe BatchLookupPolicy
-> Maybe BatchListObjectParentPaths
-> Maybe BatchListObjectAttributes
-> Maybe BatchListIncomingTypedLinks
-> Maybe BatchGetLinkAttributes
-> Maybe BatchGetObjectAttributes
-> Maybe BatchListObjectChildren
-> Maybe BatchListObjectParents
-> Maybe BatchListPolicyAttachments
-> Maybe BatchListOutgoingTypedLinks
-> Maybe BatchListObjectPolicies
-> BatchReadOperation
BatchReadOperation'
    { $sel:listIndex:BatchReadOperation' :: Maybe BatchListIndex
listIndex = Maybe BatchListIndex
forall a. Maybe a
Prelude.Nothing,
      $sel:getObjectInformation:BatchReadOperation' :: Maybe BatchGetObjectInformation
getObjectInformation = Maybe BatchGetObjectInformation
forall a. Maybe a
Prelude.Nothing,
      $sel:listAttachedIndices:BatchReadOperation' :: Maybe BatchListAttachedIndices
listAttachedIndices = Maybe BatchListAttachedIndices
forall a. Maybe a
Prelude.Nothing,
      $sel:lookupPolicy:BatchReadOperation' :: Maybe BatchLookupPolicy
lookupPolicy = Maybe BatchLookupPolicy
forall a. Maybe a
Prelude.Nothing,
      $sel:listObjectParentPaths:BatchReadOperation' :: Maybe BatchListObjectParentPaths
listObjectParentPaths = Maybe BatchListObjectParentPaths
forall a. Maybe a
Prelude.Nothing,
      $sel:listObjectAttributes:BatchReadOperation' :: Maybe BatchListObjectAttributes
listObjectAttributes = Maybe BatchListObjectAttributes
forall a. Maybe a
Prelude.Nothing,
      $sel:listIncomingTypedLinks:BatchReadOperation' :: Maybe BatchListIncomingTypedLinks
listIncomingTypedLinks = Maybe BatchListIncomingTypedLinks
forall a. Maybe a
Prelude.Nothing,
      $sel:getLinkAttributes:BatchReadOperation' :: Maybe BatchGetLinkAttributes
getLinkAttributes = Maybe BatchGetLinkAttributes
forall a. Maybe a
Prelude.Nothing,
      $sel:getObjectAttributes:BatchReadOperation' :: Maybe BatchGetObjectAttributes
getObjectAttributes = Maybe BatchGetObjectAttributes
forall a. Maybe a
Prelude.Nothing,
      $sel:listObjectChildren:BatchReadOperation' :: Maybe BatchListObjectChildren
listObjectChildren = Maybe BatchListObjectChildren
forall a. Maybe a
Prelude.Nothing,
      $sel:listObjectParents:BatchReadOperation' :: Maybe BatchListObjectParents
listObjectParents = Maybe BatchListObjectParents
forall a. Maybe a
Prelude.Nothing,
      $sel:listPolicyAttachments:BatchReadOperation' :: Maybe BatchListPolicyAttachments
listPolicyAttachments = Maybe BatchListPolicyAttachments
forall a. Maybe a
Prelude.Nothing,
      $sel:listOutgoingTypedLinks:BatchReadOperation' :: Maybe BatchListOutgoingTypedLinks
listOutgoingTypedLinks = Maybe BatchListOutgoingTypedLinks
forall a. Maybe a
Prelude.Nothing,
      $sel:listObjectPolicies:BatchReadOperation' :: Maybe BatchListObjectPolicies
listObjectPolicies = Maybe BatchListObjectPolicies
forall a. Maybe a
Prelude.Nothing
    }

-- | Lists objects attached to the specified index.
batchReadOperation_listIndex :: Lens.Lens' BatchReadOperation (Prelude.Maybe BatchListIndex)
batchReadOperation_listIndex :: (Maybe BatchListIndex -> f (Maybe BatchListIndex))
-> BatchReadOperation -> f BatchReadOperation
batchReadOperation_listIndex = (BatchReadOperation -> Maybe BatchListIndex)
-> (BatchReadOperation
    -> Maybe BatchListIndex -> BatchReadOperation)
-> Lens
     BatchReadOperation
     BatchReadOperation
     (Maybe BatchListIndex)
     (Maybe BatchListIndex)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchReadOperation' {Maybe BatchListIndex
listIndex :: Maybe BatchListIndex
$sel:listIndex:BatchReadOperation' :: BatchReadOperation -> Maybe BatchListIndex
listIndex} -> Maybe BatchListIndex
listIndex) (\s :: BatchReadOperation
s@BatchReadOperation' {} Maybe BatchListIndex
a -> BatchReadOperation
s {$sel:listIndex:BatchReadOperation' :: Maybe BatchListIndex
listIndex = Maybe BatchListIndex
a} :: BatchReadOperation)

-- | Retrieves metadata about an object.
batchReadOperation_getObjectInformation :: Lens.Lens' BatchReadOperation (Prelude.Maybe BatchGetObjectInformation)
batchReadOperation_getObjectInformation :: (Maybe BatchGetObjectInformation
 -> f (Maybe BatchGetObjectInformation))
-> BatchReadOperation -> f BatchReadOperation
batchReadOperation_getObjectInformation = (BatchReadOperation -> Maybe BatchGetObjectInformation)
-> (BatchReadOperation
    -> Maybe BatchGetObjectInformation -> BatchReadOperation)
-> Lens
     BatchReadOperation
     BatchReadOperation
     (Maybe BatchGetObjectInformation)
     (Maybe BatchGetObjectInformation)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchReadOperation' {Maybe BatchGetObjectInformation
getObjectInformation :: Maybe BatchGetObjectInformation
$sel:getObjectInformation:BatchReadOperation' :: BatchReadOperation -> Maybe BatchGetObjectInformation
getObjectInformation} -> Maybe BatchGetObjectInformation
getObjectInformation) (\s :: BatchReadOperation
s@BatchReadOperation' {} Maybe BatchGetObjectInformation
a -> BatchReadOperation
s {$sel:getObjectInformation:BatchReadOperation' :: Maybe BatchGetObjectInformation
getObjectInformation = Maybe BatchGetObjectInformation
a} :: BatchReadOperation)

-- | Lists indices attached to an object.
batchReadOperation_listAttachedIndices :: Lens.Lens' BatchReadOperation (Prelude.Maybe BatchListAttachedIndices)
batchReadOperation_listAttachedIndices :: (Maybe BatchListAttachedIndices
 -> f (Maybe BatchListAttachedIndices))
-> BatchReadOperation -> f BatchReadOperation
batchReadOperation_listAttachedIndices = (BatchReadOperation -> Maybe BatchListAttachedIndices)
-> (BatchReadOperation
    -> Maybe BatchListAttachedIndices -> BatchReadOperation)
-> Lens
     BatchReadOperation
     BatchReadOperation
     (Maybe BatchListAttachedIndices)
     (Maybe BatchListAttachedIndices)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchReadOperation' {Maybe BatchListAttachedIndices
listAttachedIndices :: Maybe BatchListAttachedIndices
$sel:listAttachedIndices:BatchReadOperation' :: BatchReadOperation -> Maybe BatchListAttachedIndices
listAttachedIndices} -> Maybe BatchListAttachedIndices
listAttachedIndices) (\s :: BatchReadOperation
s@BatchReadOperation' {} Maybe BatchListAttachedIndices
a -> BatchReadOperation
s {$sel:listAttachedIndices:BatchReadOperation' :: Maybe BatchListAttachedIndices
listAttachedIndices = Maybe BatchListAttachedIndices
a} :: BatchReadOperation)

-- | Lists all policies from the root of the Directory to the object
-- specified. If there are no policies present, an empty list is returned.
-- If policies are present, and if some objects don\'t have the policies
-- attached, it returns the @ObjectIdentifier@ for such objects. If
-- policies are present, it returns @ObjectIdentifier@, @policyId@, and
-- @policyType@. Paths that don\'t lead to the root from the target object
-- are ignored. For more information, see
-- <https://docs.aws.amazon.com/clouddirectory/latest/developerguide/key_concepts_directory.html#key_concepts_policies Policies>.
batchReadOperation_lookupPolicy :: Lens.Lens' BatchReadOperation (Prelude.Maybe BatchLookupPolicy)
batchReadOperation_lookupPolicy :: (Maybe BatchLookupPolicy -> f (Maybe BatchLookupPolicy))
-> BatchReadOperation -> f BatchReadOperation
batchReadOperation_lookupPolicy = (BatchReadOperation -> Maybe BatchLookupPolicy)
-> (BatchReadOperation
    -> Maybe BatchLookupPolicy -> BatchReadOperation)
-> Lens
     BatchReadOperation
     BatchReadOperation
     (Maybe BatchLookupPolicy)
     (Maybe BatchLookupPolicy)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchReadOperation' {Maybe BatchLookupPolicy
lookupPolicy :: Maybe BatchLookupPolicy
$sel:lookupPolicy:BatchReadOperation' :: BatchReadOperation -> Maybe BatchLookupPolicy
lookupPolicy} -> Maybe BatchLookupPolicy
lookupPolicy) (\s :: BatchReadOperation
s@BatchReadOperation' {} Maybe BatchLookupPolicy
a -> BatchReadOperation
s {$sel:lookupPolicy:BatchReadOperation' :: Maybe BatchLookupPolicy
lookupPolicy = Maybe BatchLookupPolicy
a} :: BatchReadOperation)

-- | Retrieves all available parent paths for any object type such as node,
-- leaf node, policy node, and index node objects. For more information
-- about objects, see
-- <https://docs.aws.amazon.com/clouddirectory/latest/developerguide/key_concepts_directorystructure.html Directory Structure>.
batchReadOperation_listObjectParentPaths :: Lens.Lens' BatchReadOperation (Prelude.Maybe BatchListObjectParentPaths)
batchReadOperation_listObjectParentPaths :: (Maybe BatchListObjectParentPaths
 -> f (Maybe BatchListObjectParentPaths))
-> BatchReadOperation -> f BatchReadOperation
batchReadOperation_listObjectParentPaths = (BatchReadOperation -> Maybe BatchListObjectParentPaths)
-> (BatchReadOperation
    -> Maybe BatchListObjectParentPaths -> BatchReadOperation)
-> Lens
     BatchReadOperation
     BatchReadOperation
     (Maybe BatchListObjectParentPaths)
     (Maybe BatchListObjectParentPaths)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchReadOperation' {Maybe BatchListObjectParentPaths
listObjectParentPaths :: Maybe BatchListObjectParentPaths
$sel:listObjectParentPaths:BatchReadOperation' :: BatchReadOperation -> Maybe BatchListObjectParentPaths
listObjectParentPaths} -> Maybe BatchListObjectParentPaths
listObjectParentPaths) (\s :: BatchReadOperation
s@BatchReadOperation' {} Maybe BatchListObjectParentPaths
a -> BatchReadOperation
s {$sel:listObjectParentPaths:BatchReadOperation' :: Maybe BatchListObjectParentPaths
listObjectParentPaths = Maybe BatchListObjectParentPaths
a} :: BatchReadOperation)

-- | Lists all attributes that are associated with an object.
batchReadOperation_listObjectAttributes :: Lens.Lens' BatchReadOperation (Prelude.Maybe BatchListObjectAttributes)
batchReadOperation_listObjectAttributes :: (Maybe BatchListObjectAttributes
 -> f (Maybe BatchListObjectAttributes))
-> BatchReadOperation -> f BatchReadOperation
batchReadOperation_listObjectAttributes = (BatchReadOperation -> Maybe BatchListObjectAttributes)
-> (BatchReadOperation
    -> Maybe BatchListObjectAttributes -> BatchReadOperation)
-> Lens
     BatchReadOperation
     BatchReadOperation
     (Maybe BatchListObjectAttributes)
     (Maybe BatchListObjectAttributes)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchReadOperation' {Maybe BatchListObjectAttributes
listObjectAttributes :: Maybe BatchListObjectAttributes
$sel:listObjectAttributes:BatchReadOperation' :: BatchReadOperation -> Maybe BatchListObjectAttributes
listObjectAttributes} -> Maybe BatchListObjectAttributes
listObjectAttributes) (\s :: BatchReadOperation
s@BatchReadOperation' {} Maybe BatchListObjectAttributes
a -> BatchReadOperation
s {$sel:listObjectAttributes:BatchReadOperation' :: Maybe BatchListObjectAttributes
listObjectAttributes = Maybe BatchListObjectAttributes
a} :: BatchReadOperation)

-- | Returns a paginated list of all the incoming TypedLinkSpecifier
-- information for an object. It also supports filtering by typed link
-- facet and identity attributes. For more information, see
-- <https://docs.aws.amazon.com/clouddirectory/latest/developerguide/directory_objects_links.html#directory_objects_links_typedlink Typed Links>.
batchReadOperation_listIncomingTypedLinks :: Lens.Lens' BatchReadOperation (Prelude.Maybe BatchListIncomingTypedLinks)
batchReadOperation_listIncomingTypedLinks :: (Maybe BatchListIncomingTypedLinks
 -> f (Maybe BatchListIncomingTypedLinks))
-> BatchReadOperation -> f BatchReadOperation
batchReadOperation_listIncomingTypedLinks = (BatchReadOperation -> Maybe BatchListIncomingTypedLinks)
-> (BatchReadOperation
    -> Maybe BatchListIncomingTypedLinks -> BatchReadOperation)
-> Lens
     BatchReadOperation
     BatchReadOperation
     (Maybe BatchListIncomingTypedLinks)
     (Maybe BatchListIncomingTypedLinks)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchReadOperation' {Maybe BatchListIncomingTypedLinks
listIncomingTypedLinks :: Maybe BatchListIncomingTypedLinks
$sel:listIncomingTypedLinks:BatchReadOperation' :: BatchReadOperation -> Maybe BatchListIncomingTypedLinks
listIncomingTypedLinks} -> Maybe BatchListIncomingTypedLinks
listIncomingTypedLinks) (\s :: BatchReadOperation
s@BatchReadOperation' {} Maybe BatchListIncomingTypedLinks
a -> BatchReadOperation
s {$sel:listIncomingTypedLinks:BatchReadOperation' :: Maybe BatchListIncomingTypedLinks
listIncomingTypedLinks = Maybe BatchListIncomingTypedLinks
a} :: BatchReadOperation)

-- | Retrieves attributes that are associated with a typed link.
batchReadOperation_getLinkAttributes :: Lens.Lens' BatchReadOperation (Prelude.Maybe BatchGetLinkAttributes)
batchReadOperation_getLinkAttributes :: (Maybe BatchGetLinkAttributes -> f (Maybe BatchGetLinkAttributes))
-> BatchReadOperation -> f BatchReadOperation
batchReadOperation_getLinkAttributes = (BatchReadOperation -> Maybe BatchGetLinkAttributes)
-> (BatchReadOperation
    -> Maybe BatchGetLinkAttributes -> BatchReadOperation)
-> Lens
     BatchReadOperation
     BatchReadOperation
     (Maybe BatchGetLinkAttributes)
     (Maybe BatchGetLinkAttributes)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchReadOperation' {Maybe BatchGetLinkAttributes
getLinkAttributes :: Maybe BatchGetLinkAttributes
$sel:getLinkAttributes:BatchReadOperation' :: BatchReadOperation -> Maybe BatchGetLinkAttributes
getLinkAttributes} -> Maybe BatchGetLinkAttributes
getLinkAttributes) (\s :: BatchReadOperation
s@BatchReadOperation' {} Maybe BatchGetLinkAttributes
a -> BatchReadOperation
s {$sel:getLinkAttributes:BatchReadOperation' :: Maybe BatchGetLinkAttributes
getLinkAttributes = Maybe BatchGetLinkAttributes
a} :: BatchReadOperation)

-- | Retrieves attributes within a facet that are associated with an object.
batchReadOperation_getObjectAttributes :: Lens.Lens' BatchReadOperation (Prelude.Maybe BatchGetObjectAttributes)
batchReadOperation_getObjectAttributes :: (Maybe BatchGetObjectAttributes
 -> f (Maybe BatchGetObjectAttributes))
-> BatchReadOperation -> f BatchReadOperation
batchReadOperation_getObjectAttributes = (BatchReadOperation -> Maybe BatchGetObjectAttributes)
-> (BatchReadOperation
    -> Maybe BatchGetObjectAttributes -> BatchReadOperation)
-> Lens
     BatchReadOperation
     BatchReadOperation
     (Maybe BatchGetObjectAttributes)
     (Maybe BatchGetObjectAttributes)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchReadOperation' {Maybe BatchGetObjectAttributes
getObjectAttributes :: Maybe BatchGetObjectAttributes
$sel:getObjectAttributes:BatchReadOperation' :: BatchReadOperation -> Maybe BatchGetObjectAttributes
getObjectAttributes} -> Maybe BatchGetObjectAttributes
getObjectAttributes) (\s :: BatchReadOperation
s@BatchReadOperation' {} Maybe BatchGetObjectAttributes
a -> BatchReadOperation
s {$sel:getObjectAttributes:BatchReadOperation' :: Maybe BatchGetObjectAttributes
getObjectAttributes = Maybe BatchGetObjectAttributes
a} :: BatchReadOperation)

-- | Returns a paginated list of child objects that are associated with a
-- given object.
batchReadOperation_listObjectChildren :: Lens.Lens' BatchReadOperation (Prelude.Maybe BatchListObjectChildren)
batchReadOperation_listObjectChildren :: (Maybe BatchListObjectChildren
 -> f (Maybe BatchListObjectChildren))
-> BatchReadOperation -> f BatchReadOperation
batchReadOperation_listObjectChildren = (BatchReadOperation -> Maybe BatchListObjectChildren)
-> (BatchReadOperation
    -> Maybe BatchListObjectChildren -> BatchReadOperation)
-> Lens
     BatchReadOperation
     BatchReadOperation
     (Maybe BatchListObjectChildren)
     (Maybe BatchListObjectChildren)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchReadOperation' {Maybe BatchListObjectChildren
listObjectChildren :: Maybe BatchListObjectChildren
$sel:listObjectChildren:BatchReadOperation' :: BatchReadOperation -> Maybe BatchListObjectChildren
listObjectChildren} -> Maybe BatchListObjectChildren
listObjectChildren) (\s :: BatchReadOperation
s@BatchReadOperation' {} Maybe BatchListObjectChildren
a -> BatchReadOperation
s {$sel:listObjectChildren:BatchReadOperation' :: Maybe BatchListObjectChildren
listObjectChildren = Maybe BatchListObjectChildren
a} :: BatchReadOperation)

-- | Lists parent objects that are associated with a given object in
-- pagination fashion.
batchReadOperation_listObjectParents :: Lens.Lens' BatchReadOperation (Prelude.Maybe BatchListObjectParents)
batchReadOperation_listObjectParents :: (Maybe BatchListObjectParents -> f (Maybe BatchListObjectParents))
-> BatchReadOperation -> f BatchReadOperation
batchReadOperation_listObjectParents = (BatchReadOperation -> Maybe BatchListObjectParents)
-> (BatchReadOperation
    -> Maybe BatchListObjectParents -> BatchReadOperation)
-> Lens
     BatchReadOperation
     BatchReadOperation
     (Maybe BatchListObjectParents)
     (Maybe BatchListObjectParents)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchReadOperation' {Maybe BatchListObjectParents
listObjectParents :: Maybe BatchListObjectParents
$sel:listObjectParents:BatchReadOperation' :: BatchReadOperation -> Maybe BatchListObjectParents
listObjectParents} -> Maybe BatchListObjectParents
listObjectParents) (\s :: BatchReadOperation
s@BatchReadOperation' {} Maybe BatchListObjectParents
a -> BatchReadOperation
s {$sel:listObjectParents:BatchReadOperation' :: Maybe BatchListObjectParents
listObjectParents = Maybe BatchListObjectParents
a} :: BatchReadOperation)

-- | Returns all of the @ObjectIdentifiers@ to which a given policy is
-- attached.
batchReadOperation_listPolicyAttachments :: Lens.Lens' BatchReadOperation (Prelude.Maybe BatchListPolicyAttachments)
batchReadOperation_listPolicyAttachments :: (Maybe BatchListPolicyAttachments
 -> f (Maybe BatchListPolicyAttachments))
-> BatchReadOperation -> f BatchReadOperation
batchReadOperation_listPolicyAttachments = (BatchReadOperation -> Maybe BatchListPolicyAttachments)
-> (BatchReadOperation
    -> Maybe BatchListPolicyAttachments -> BatchReadOperation)
-> Lens
     BatchReadOperation
     BatchReadOperation
     (Maybe BatchListPolicyAttachments)
     (Maybe BatchListPolicyAttachments)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchReadOperation' {Maybe BatchListPolicyAttachments
listPolicyAttachments :: Maybe BatchListPolicyAttachments
$sel:listPolicyAttachments:BatchReadOperation' :: BatchReadOperation -> Maybe BatchListPolicyAttachments
listPolicyAttachments} -> Maybe BatchListPolicyAttachments
listPolicyAttachments) (\s :: BatchReadOperation
s@BatchReadOperation' {} Maybe BatchListPolicyAttachments
a -> BatchReadOperation
s {$sel:listPolicyAttachments:BatchReadOperation' :: Maybe BatchListPolicyAttachments
listPolicyAttachments = Maybe BatchListPolicyAttachments
a} :: BatchReadOperation)

-- | Returns a paginated list of all the outgoing TypedLinkSpecifier
-- information for an object. It also supports filtering by typed link
-- facet and identity attributes. For more information, see
-- <https://docs.aws.amazon.com/clouddirectory/latest/developerguide/directory_objects_links.html#directory_objects_links_typedlink Typed Links>.
batchReadOperation_listOutgoingTypedLinks :: Lens.Lens' BatchReadOperation (Prelude.Maybe BatchListOutgoingTypedLinks)
batchReadOperation_listOutgoingTypedLinks :: (Maybe BatchListOutgoingTypedLinks
 -> f (Maybe BatchListOutgoingTypedLinks))
-> BatchReadOperation -> f BatchReadOperation
batchReadOperation_listOutgoingTypedLinks = (BatchReadOperation -> Maybe BatchListOutgoingTypedLinks)
-> (BatchReadOperation
    -> Maybe BatchListOutgoingTypedLinks -> BatchReadOperation)
-> Lens
     BatchReadOperation
     BatchReadOperation
     (Maybe BatchListOutgoingTypedLinks)
     (Maybe BatchListOutgoingTypedLinks)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchReadOperation' {Maybe BatchListOutgoingTypedLinks
listOutgoingTypedLinks :: Maybe BatchListOutgoingTypedLinks
$sel:listOutgoingTypedLinks:BatchReadOperation' :: BatchReadOperation -> Maybe BatchListOutgoingTypedLinks
listOutgoingTypedLinks} -> Maybe BatchListOutgoingTypedLinks
listOutgoingTypedLinks) (\s :: BatchReadOperation
s@BatchReadOperation' {} Maybe BatchListOutgoingTypedLinks
a -> BatchReadOperation
s {$sel:listOutgoingTypedLinks:BatchReadOperation' :: Maybe BatchListOutgoingTypedLinks
listOutgoingTypedLinks = Maybe BatchListOutgoingTypedLinks
a} :: BatchReadOperation)

-- | Returns policies attached to an object in pagination fashion.
batchReadOperation_listObjectPolicies :: Lens.Lens' BatchReadOperation (Prelude.Maybe BatchListObjectPolicies)
batchReadOperation_listObjectPolicies :: (Maybe BatchListObjectPolicies
 -> f (Maybe BatchListObjectPolicies))
-> BatchReadOperation -> f BatchReadOperation
batchReadOperation_listObjectPolicies = (BatchReadOperation -> Maybe BatchListObjectPolicies)
-> (BatchReadOperation
    -> Maybe BatchListObjectPolicies -> BatchReadOperation)
-> Lens
     BatchReadOperation
     BatchReadOperation
     (Maybe BatchListObjectPolicies)
     (Maybe BatchListObjectPolicies)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchReadOperation' {Maybe BatchListObjectPolicies
listObjectPolicies :: Maybe BatchListObjectPolicies
$sel:listObjectPolicies:BatchReadOperation' :: BatchReadOperation -> Maybe BatchListObjectPolicies
listObjectPolicies} -> Maybe BatchListObjectPolicies
listObjectPolicies) (\s :: BatchReadOperation
s@BatchReadOperation' {} Maybe BatchListObjectPolicies
a -> BatchReadOperation
s {$sel:listObjectPolicies:BatchReadOperation' :: Maybe BatchListObjectPolicies
listObjectPolicies = Maybe BatchListObjectPolicies
a} :: BatchReadOperation)

instance Prelude.Hashable BatchReadOperation

instance Prelude.NFData BatchReadOperation

instance Core.ToJSON BatchReadOperation where
  toJSON :: BatchReadOperation -> Value
toJSON BatchReadOperation' {Maybe BatchLookupPolicy
Maybe BatchListPolicyAttachments
Maybe BatchListObjectPolicies
Maybe BatchListObjectParents
Maybe BatchListObjectParentPaths
Maybe BatchListObjectChildren
Maybe BatchListAttachedIndices
Maybe BatchGetObjectInformation
Maybe BatchListObjectAttributes
Maybe BatchGetObjectAttributes
Maybe BatchListIndex
Maybe BatchListOutgoingTypedLinks
Maybe BatchListIncomingTypedLinks
Maybe BatchGetLinkAttributes
listObjectPolicies :: Maybe BatchListObjectPolicies
listOutgoingTypedLinks :: Maybe BatchListOutgoingTypedLinks
listPolicyAttachments :: Maybe BatchListPolicyAttachments
listObjectParents :: Maybe BatchListObjectParents
listObjectChildren :: Maybe BatchListObjectChildren
getObjectAttributes :: Maybe BatchGetObjectAttributes
getLinkAttributes :: Maybe BatchGetLinkAttributes
listIncomingTypedLinks :: Maybe BatchListIncomingTypedLinks
listObjectAttributes :: Maybe BatchListObjectAttributes
listObjectParentPaths :: Maybe BatchListObjectParentPaths
lookupPolicy :: Maybe BatchLookupPolicy
listAttachedIndices :: Maybe BatchListAttachedIndices
getObjectInformation :: Maybe BatchGetObjectInformation
listIndex :: Maybe BatchListIndex
$sel:listObjectPolicies:BatchReadOperation' :: BatchReadOperation -> Maybe BatchListObjectPolicies
$sel:listOutgoingTypedLinks:BatchReadOperation' :: BatchReadOperation -> Maybe BatchListOutgoingTypedLinks
$sel:listPolicyAttachments:BatchReadOperation' :: BatchReadOperation -> Maybe BatchListPolicyAttachments
$sel:listObjectParents:BatchReadOperation' :: BatchReadOperation -> Maybe BatchListObjectParents
$sel:listObjectChildren:BatchReadOperation' :: BatchReadOperation -> Maybe BatchListObjectChildren
$sel:getObjectAttributes:BatchReadOperation' :: BatchReadOperation -> Maybe BatchGetObjectAttributes
$sel:getLinkAttributes:BatchReadOperation' :: BatchReadOperation -> Maybe BatchGetLinkAttributes
$sel:listIncomingTypedLinks:BatchReadOperation' :: BatchReadOperation -> Maybe BatchListIncomingTypedLinks
$sel:listObjectAttributes:BatchReadOperation' :: BatchReadOperation -> Maybe BatchListObjectAttributes
$sel:listObjectParentPaths:BatchReadOperation' :: BatchReadOperation -> Maybe BatchListObjectParentPaths
$sel:lookupPolicy:BatchReadOperation' :: BatchReadOperation -> Maybe BatchLookupPolicy
$sel:listAttachedIndices:BatchReadOperation' :: BatchReadOperation -> Maybe BatchListAttachedIndices
$sel:getObjectInformation:BatchReadOperation' :: BatchReadOperation -> Maybe BatchGetObjectInformation
$sel:listIndex:BatchReadOperation' :: BatchReadOperation -> Maybe BatchListIndex
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"ListIndex" Text -> BatchListIndex -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (BatchListIndex -> Pair) -> Maybe BatchListIndex -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BatchListIndex
listIndex,
            (Text
"GetObjectInformation" Text -> BatchGetObjectInformation -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (BatchGetObjectInformation -> Pair)
-> Maybe BatchGetObjectInformation -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BatchGetObjectInformation
getObjectInformation,
            (Text
"ListAttachedIndices" Text -> BatchListAttachedIndices -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (BatchListAttachedIndices -> Pair)
-> Maybe BatchListAttachedIndices -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BatchListAttachedIndices
listAttachedIndices,
            (Text
"LookupPolicy" Text -> BatchLookupPolicy -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (BatchLookupPolicy -> Pair)
-> Maybe BatchLookupPolicy -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BatchLookupPolicy
lookupPolicy,
            (Text
"ListObjectParentPaths" Text -> BatchListObjectParentPaths -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (BatchListObjectParentPaths -> Pair)
-> Maybe BatchListObjectParentPaths -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BatchListObjectParentPaths
listObjectParentPaths,
            (Text
"ListObjectAttributes" Text -> BatchListObjectAttributes -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (BatchListObjectAttributes -> Pair)
-> Maybe BatchListObjectAttributes -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BatchListObjectAttributes
listObjectAttributes,
            (Text
"ListIncomingTypedLinks" Text -> BatchListIncomingTypedLinks -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (BatchListIncomingTypedLinks -> Pair)
-> Maybe BatchListIncomingTypedLinks -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BatchListIncomingTypedLinks
listIncomingTypedLinks,
            (Text
"GetLinkAttributes" Text -> BatchGetLinkAttributes -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (BatchGetLinkAttributes -> Pair)
-> Maybe BatchGetLinkAttributes -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BatchGetLinkAttributes
getLinkAttributes,
            (Text
"GetObjectAttributes" Text -> BatchGetObjectAttributes -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (BatchGetObjectAttributes -> Pair)
-> Maybe BatchGetObjectAttributes -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BatchGetObjectAttributes
getObjectAttributes,
            (Text
"ListObjectChildren" Text -> BatchListObjectChildren -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (BatchListObjectChildren -> Pair)
-> Maybe BatchListObjectChildren -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BatchListObjectChildren
listObjectChildren,
            (Text
"ListObjectParents" Text -> BatchListObjectParents -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (BatchListObjectParents -> Pair)
-> Maybe BatchListObjectParents -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BatchListObjectParents
listObjectParents,
            (Text
"ListPolicyAttachments" Text -> BatchListPolicyAttachments -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (BatchListPolicyAttachments -> Pair)
-> Maybe BatchListPolicyAttachments -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BatchListPolicyAttachments
listPolicyAttachments,
            (Text
"ListOutgoingTypedLinks" Text -> BatchListOutgoingTypedLinks -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (BatchListOutgoingTypedLinks -> Pair)
-> Maybe BatchListOutgoingTypedLinks -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BatchListOutgoingTypedLinks
listOutgoingTypedLinks,
            (Text
"ListObjectPolicies" Text -> BatchListObjectPolicies -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (BatchListObjectPolicies -> Pair)
-> Maybe BatchListObjectPolicies -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BatchListObjectPolicies
listObjectPolicies
          ]
      )