{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.ResourceExplorer2.GetIndex
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Retrieves details about the Amazon Web Services Resource Explorer index
-- in the Amazon Web Services Region in which you invoked the operation.
module Amazonka.ResourceExplorer2.GetIndex
  ( -- * Creating a Request
    GetIndex (..),
    newGetIndex,

    -- * Destructuring the Response
    GetIndexResponse (..),
    newGetIndexResponse,

    -- * Response Lenses
    getIndexResponse_arn,
    getIndexResponse_createdAt,
    getIndexResponse_lastUpdatedAt,
    getIndexResponse_replicatingFrom,
    getIndexResponse_replicatingTo,
    getIndexResponse_state,
    getIndexResponse_tags,
    getIndexResponse_type,
    getIndexResponse_httpStatus,
  )
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
import qualified Amazonka.Request as Request
import Amazonka.ResourceExplorer2.Types
import qualified Amazonka.Response as Response

-- | /See:/ 'newGetIndex' smart constructor.
data GetIndex = GetIndex'
  {
  }
  deriving (GetIndex -> GetIndex -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetIndex -> GetIndex -> Bool
$c/= :: GetIndex -> GetIndex -> Bool
== :: GetIndex -> GetIndex -> Bool
$c== :: GetIndex -> GetIndex -> Bool
Prelude.Eq, ReadPrec [GetIndex]
ReadPrec GetIndex
Int -> ReadS GetIndex
ReadS [GetIndex]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetIndex]
$creadListPrec :: ReadPrec [GetIndex]
readPrec :: ReadPrec GetIndex
$creadPrec :: ReadPrec GetIndex
readList :: ReadS [GetIndex]
$creadList :: ReadS [GetIndex]
readsPrec :: Int -> ReadS GetIndex
$creadsPrec :: Int -> ReadS GetIndex
Prelude.Read, Int -> GetIndex -> ShowS
[GetIndex] -> ShowS
GetIndex -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetIndex] -> ShowS
$cshowList :: [GetIndex] -> ShowS
show :: GetIndex -> String
$cshow :: GetIndex -> String
showsPrec :: Int -> GetIndex -> ShowS
$cshowsPrec :: Int -> GetIndex -> ShowS
Prelude.Show, forall x. Rep GetIndex x -> GetIndex
forall x. GetIndex -> Rep GetIndex x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetIndex x -> GetIndex
$cfrom :: forall x. GetIndex -> Rep GetIndex x
Prelude.Generic)

-- |
-- Create a value of 'GetIndex' 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.
newGetIndex ::
  GetIndex
newGetIndex :: GetIndex
newGetIndex = GetIndex
GetIndex'

instance Core.AWSRequest GetIndex where
  type AWSResponse GetIndex = GetIndexResponse
  request :: (Service -> Service) -> GetIndex -> Request GetIndex
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetIndex
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetIndex)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe ISO8601
-> Maybe ISO8601
-> Maybe [Text]
-> Maybe [Text]
-> Maybe IndexState
-> Maybe (HashMap Text Text)
-> Maybe IndexType
-> Int
-> GetIndexResponse
GetIndexResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Arn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"CreatedAt")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"LastUpdatedAt")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"ReplicatingFrom"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"ReplicatingTo" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"State")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Tags" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Type")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable GetIndex where
  hashWithSalt :: Int -> GetIndex -> Int
hashWithSalt Int
_salt GetIndex
_ =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ()

instance Prelude.NFData GetIndex where
  rnf :: GetIndex -> ()
rnf GetIndex
_ = ()

instance Data.ToHeaders GetIndex where
  toHeaders :: GetIndex -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON GetIndex where
  toJSON :: GetIndex -> Value
toJSON = forall a b. a -> b -> a
Prelude.const (Object -> Value
Data.Object forall a. Monoid a => a
Prelude.mempty)

instance Data.ToPath GetIndex where
  toPath :: GetIndex -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/GetIndex"

instance Data.ToQuery GetIndex where
  toQuery :: GetIndex -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newGetIndexResponse' smart constructor.
data GetIndexResponse = GetIndexResponse'
  { -- | The
    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon resource name (ARN)>
    -- of the index.
    GetIndexResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The date and time when the index was originally created.
    GetIndexResponse -> Maybe ISO8601
createdAt :: Prelude.Maybe Data.ISO8601,
    -- | The date and time when the index was last updated.
    GetIndexResponse -> Maybe ISO8601
lastUpdatedAt :: Prelude.Maybe Data.ISO8601,
    -- | This response value is present only if this index is @Type=AGGREGATOR@.
    --
    -- A list of the Amazon Web Services Regions that replicate their content
    -- to the index in this Region.
    GetIndexResponse -> Maybe [Text]
replicatingFrom :: Prelude.Maybe [Prelude.Text],
    -- | This response value is present only if this index is @Type=LOCAL@.
    --
    -- The Amazon Web Services Region that contains the aggregator index, if
    -- one exists. If an aggregator index does exist then the Region in which
    -- you called this operation replicates its index information to the Region
    -- specified in this response value.
    GetIndexResponse -> Maybe [Text]
replicatingTo :: Prelude.Maybe [Prelude.Text],
    -- | The current state of the index in this Amazon Web Services Region.
    GetIndexResponse -> Maybe IndexState
state :: Prelude.Maybe IndexState,
    -- | Tag key and value pairs that are attached to the index.
    GetIndexResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The type of the index in this Region. For information about the
    -- aggregator index and how it differs from a local index, see
    -- <https://docs.aws.amazon.com/resource-explorer/latest/userguide/manage-aggregator-region.html Turning on cross-Region search by creating an aggregator index>.
    GetIndexResponse -> Maybe IndexType
type' :: Prelude.Maybe IndexType,
    -- | The response's http status code.
    GetIndexResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetIndexResponse -> GetIndexResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetIndexResponse -> GetIndexResponse -> Bool
$c/= :: GetIndexResponse -> GetIndexResponse -> Bool
== :: GetIndexResponse -> GetIndexResponse -> Bool
$c== :: GetIndexResponse -> GetIndexResponse -> Bool
Prelude.Eq, ReadPrec [GetIndexResponse]
ReadPrec GetIndexResponse
Int -> ReadS GetIndexResponse
ReadS [GetIndexResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetIndexResponse]
$creadListPrec :: ReadPrec [GetIndexResponse]
readPrec :: ReadPrec GetIndexResponse
$creadPrec :: ReadPrec GetIndexResponse
readList :: ReadS [GetIndexResponse]
$creadList :: ReadS [GetIndexResponse]
readsPrec :: Int -> ReadS GetIndexResponse
$creadsPrec :: Int -> ReadS GetIndexResponse
Prelude.Read, Int -> GetIndexResponse -> ShowS
[GetIndexResponse] -> ShowS
GetIndexResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetIndexResponse] -> ShowS
$cshowList :: [GetIndexResponse] -> ShowS
show :: GetIndexResponse -> String
$cshow :: GetIndexResponse -> String
showsPrec :: Int -> GetIndexResponse -> ShowS
$cshowsPrec :: Int -> GetIndexResponse -> ShowS
Prelude.Show, forall x. Rep GetIndexResponse x -> GetIndexResponse
forall x. GetIndexResponse -> Rep GetIndexResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetIndexResponse x -> GetIndexResponse
$cfrom :: forall x. GetIndexResponse -> Rep GetIndexResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetIndexResponse' 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:
--
-- 'arn', 'getIndexResponse_arn' - The
-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon resource name (ARN)>
-- of the index.
--
-- 'createdAt', 'getIndexResponse_createdAt' - The date and time when the index was originally created.
--
-- 'lastUpdatedAt', 'getIndexResponse_lastUpdatedAt' - The date and time when the index was last updated.
--
-- 'replicatingFrom', 'getIndexResponse_replicatingFrom' - This response value is present only if this index is @Type=AGGREGATOR@.
--
-- A list of the Amazon Web Services Regions that replicate their content
-- to the index in this Region.
--
-- 'replicatingTo', 'getIndexResponse_replicatingTo' - This response value is present only if this index is @Type=LOCAL@.
--
-- The Amazon Web Services Region that contains the aggregator index, if
-- one exists. If an aggregator index does exist then the Region in which
-- you called this operation replicates its index information to the Region
-- specified in this response value.
--
-- 'state', 'getIndexResponse_state' - The current state of the index in this Amazon Web Services Region.
--
-- 'tags', 'getIndexResponse_tags' - Tag key and value pairs that are attached to the index.
--
-- 'type'', 'getIndexResponse_type' - The type of the index in this Region. For information about the
-- aggregator index and how it differs from a local index, see
-- <https://docs.aws.amazon.com/resource-explorer/latest/userguide/manage-aggregator-region.html Turning on cross-Region search by creating an aggregator index>.
--
-- 'httpStatus', 'getIndexResponse_httpStatus' - The response's http status code.
newGetIndexResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetIndexResponse
newGetIndexResponse :: Int -> GetIndexResponse
newGetIndexResponse Int
pHttpStatus_ =
  GetIndexResponse'
    { $sel:arn:GetIndexResponse' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:GetIndexResponse' :: Maybe ISO8601
createdAt = forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedAt:GetIndexResponse' :: Maybe ISO8601
lastUpdatedAt = forall a. Maybe a
Prelude.Nothing,
      $sel:replicatingFrom:GetIndexResponse' :: Maybe [Text]
replicatingFrom = forall a. Maybe a
Prelude.Nothing,
      $sel:replicatingTo:GetIndexResponse' :: Maybe [Text]
replicatingTo = forall a. Maybe a
Prelude.Nothing,
      $sel:state:GetIndexResponse' :: Maybe IndexState
state = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:GetIndexResponse' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:type':GetIndexResponse' :: Maybe IndexType
type' = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetIndexResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The
-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Amazon resource name (ARN)>
-- of the index.
getIndexResponse_arn :: Lens.Lens' GetIndexResponse (Prelude.Maybe Prelude.Text)
getIndexResponse_arn :: Lens' GetIndexResponse (Maybe Text)
getIndexResponse_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetIndexResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:GetIndexResponse' :: GetIndexResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: GetIndexResponse
s@GetIndexResponse' {} Maybe Text
a -> GetIndexResponse
s {$sel:arn:GetIndexResponse' :: Maybe Text
arn = Maybe Text
a} :: GetIndexResponse)

-- | The date and time when the index was originally created.
getIndexResponse_createdAt :: Lens.Lens' GetIndexResponse (Prelude.Maybe Prelude.UTCTime)
getIndexResponse_createdAt :: Lens' GetIndexResponse (Maybe UTCTime)
getIndexResponse_createdAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetIndexResponse' {Maybe ISO8601
createdAt :: Maybe ISO8601
$sel:createdAt:GetIndexResponse' :: GetIndexResponse -> Maybe ISO8601
createdAt} -> Maybe ISO8601
createdAt) (\s :: GetIndexResponse
s@GetIndexResponse' {} Maybe ISO8601
a -> GetIndexResponse
s {$sel:createdAt:GetIndexResponse' :: Maybe ISO8601
createdAt = Maybe ISO8601
a} :: GetIndexResponse) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The date and time when the index was last updated.
getIndexResponse_lastUpdatedAt :: Lens.Lens' GetIndexResponse (Prelude.Maybe Prelude.UTCTime)
getIndexResponse_lastUpdatedAt :: Lens' GetIndexResponse (Maybe UTCTime)
getIndexResponse_lastUpdatedAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetIndexResponse' {Maybe ISO8601
lastUpdatedAt :: Maybe ISO8601
$sel:lastUpdatedAt:GetIndexResponse' :: GetIndexResponse -> Maybe ISO8601
lastUpdatedAt} -> Maybe ISO8601
lastUpdatedAt) (\s :: GetIndexResponse
s@GetIndexResponse' {} Maybe ISO8601
a -> GetIndexResponse
s {$sel:lastUpdatedAt:GetIndexResponse' :: Maybe ISO8601
lastUpdatedAt = Maybe ISO8601
a} :: GetIndexResponse) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | This response value is present only if this index is @Type=AGGREGATOR@.
--
-- A list of the Amazon Web Services Regions that replicate their content
-- to the index in this Region.
getIndexResponse_replicatingFrom :: Lens.Lens' GetIndexResponse (Prelude.Maybe [Prelude.Text])
getIndexResponse_replicatingFrom :: Lens' GetIndexResponse (Maybe [Text])
getIndexResponse_replicatingFrom = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetIndexResponse' {Maybe [Text]
replicatingFrom :: Maybe [Text]
$sel:replicatingFrom:GetIndexResponse' :: GetIndexResponse -> Maybe [Text]
replicatingFrom} -> Maybe [Text]
replicatingFrom) (\s :: GetIndexResponse
s@GetIndexResponse' {} Maybe [Text]
a -> GetIndexResponse
s {$sel:replicatingFrom:GetIndexResponse' :: Maybe [Text]
replicatingFrom = Maybe [Text]
a} :: GetIndexResponse) 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

-- | This response value is present only if this index is @Type=LOCAL@.
--
-- The Amazon Web Services Region that contains the aggregator index, if
-- one exists. If an aggregator index does exist then the Region in which
-- you called this operation replicates its index information to the Region
-- specified in this response value.
getIndexResponse_replicatingTo :: Lens.Lens' GetIndexResponse (Prelude.Maybe [Prelude.Text])
getIndexResponse_replicatingTo :: Lens' GetIndexResponse (Maybe [Text])
getIndexResponse_replicatingTo = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetIndexResponse' {Maybe [Text]
replicatingTo :: Maybe [Text]
$sel:replicatingTo:GetIndexResponse' :: GetIndexResponse -> Maybe [Text]
replicatingTo} -> Maybe [Text]
replicatingTo) (\s :: GetIndexResponse
s@GetIndexResponse' {} Maybe [Text]
a -> GetIndexResponse
s {$sel:replicatingTo:GetIndexResponse' :: Maybe [Text]
replicatingTo = Maybe [Text]
a} :: GetIndexResponse) 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

-- | The current state of the index in this Amazon Web Services Region.
getIndexResponse_state :: Lens.Lens' GetIndexResponse (Prelude.Maybe IndexState)
getIndexResponse_state :: Lens' GetIndexResponse (Maybe IndexState)
getIndexResponse_state = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetIndexResponse' {Maybe IndexState
state :: Maybe IndexState
$sel:state:GetIndexResponse' :: GetIndexResponse -> Maybe IndexState
state} -> Maybe IndexState
state) (\s :: GetIndexResponse
s@GetIndexResponse' {} Maybe IndexState
a -> GetIndexResponse
s {$sel:state:GetIndexResponse' :: Maybe IndexState
state = Maybe IndexState
a} :: GetIndexResponse)

-- | Tag key and value pairs that are attached to the index.
getIndexResponse_tags :: Lens.Lens' GetIndexResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
getIndexResponse_tags :: Lens' GetIndexResponse (Maybe (HashMap Text Text))
getIndexResponse_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetIndexResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:GetIndexResponse' :: GetIndexResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: GetIndexResponse
s@GetIndexResponse' {} Maybe (HashMap Text Text)
a -> GetIndexResponse
s {$sel:tags:GetIndexResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: GetIndexResponse) 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

-- | The type of the index in this Region. For information about the
-- aggregator index and how it differs from a local index, see
-- <https://docs.aws.amazon.com/resource-explorer/latest/userguide/manage-aggregator-region.html Turning on cross-Region search by creating an aggregator index>.
getIndexResponse_type :: Lens.Lens' GetIndexResponse (Prelude.Maybe IndexType)
getIndexResponse_type :: Lens' GetIndexResponse (Maybe IndexType)
getIndexResponse_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetIndexResponse' {Maybe IndexType
type' :: Maybe IndexType
$sel:type':GetIndexResponse' :: GetIndexResponse -> Maybe IndexType
type'} -> Maybe IndexType
type') (\s :: GetIndexResponse
s@GetIndexResponse' {} Maybe IndexType
a -> GetIndexResponse
s {$sel:type':GetIndexResponse' :: Maybe IndexType
type' = Maybe IndexType
a} :: GetIndexResponse)

-- | The response's http status code.
getIndexResponse_httpStatus :: Lens.Lens' GetIndexResponse Prelude.Int
getIndexResponse_httpStatus :: Lens' GetIndexResponse Int
getIndexResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetIndexResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetIndexResponse' :: GetIndexResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetIndexResponse
s@GetIndexResponse' {} Int
a -> GetIndexResponse
s {$sel:httpStatus:GetIndexResponse' :: Int
httpStatus = Int
a} :: GetIndexResponse)

instance Prelude.NFData GetIndexResponse where
  rnf :: GetIndexResponse -> ()
rnf GetIndexResponse' {Int
Maybe [Text]
Maybe Text
Maybe (HashMap Text Text)
Maybe ISO8601
Maybe IndexState
Maybe IndexType
httpStatus :: Int
type' :: Maybe IndexType
tags :: Maybe (HashMap Text Text)
state :: Maybe IndexState
replicatingTo :: Maybe [Text]
replicatingFrom :: Maybe [Text]
lastUpdatedAt :: Maybe ISO8601
createdAt :: Maybe ISO8601
arn :: Maybe Text
$sel:httpStatus:GetIndexResponse' :: GetIndexResponse -> Int
$sel:type':GetIndexResponse' :: GetIndexResponse -> Maybe IndexType
$sel:tags:GetIndexResponse' :: GetIndexResponse -> Maybe (HashMap Text Text)
$sel:state:GetIndexResponse' :: GetIndexResponse -> Maybe IndexState
$sel:replicatingTo:GetIndexResponse' :: GetIndexResponse -> Maybe [Text]
$sel:replicatingFrom:GetIndexResponse' :: GetIndexResponse -> Maybe [Text]
$sel:lastUpdatedAt:GetIndexResponse' :: GetIndexResponse -> Maybe ISO8601
$sel:createdAt:GetIndexResponse' :: GetIndexResponse -> Maybe ISO8601
$sel:arn:GetIndexResponse' :: GetIndexResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
createdAt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
lastUpdatedAt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
replicatingFrom
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
replicatingTo
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe IndexState
state
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe IndexType
type'
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus