{-# 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.CreateIndex
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Turns on Amazon Web Services Resource Explorer in the Amazon Web
-- Services Region in which you called this operation by creating an index.
-- Resource Explorer begins discovering the resources in this Region and
-- stores the details about the resources in the index so that they can be
-- queried by using the Search operation. You can create only one index in
-- a Region.
--
-- This operation creates only a /local/ index. To promote the local index
-- in one Amazon Web Services Region into the aggregator index for the
-- Amazon Web Services account, use the UpdateIndexType operation. For more
-- information, see
-- <https://docs.aws.amazon.com/resource-explorer/latest/userguide/manage-aggregator-region.html Turning on cross-Region search by creating an aggregator index>
-- in the /Amazon Web Services Resource Explorer User Guide/.
--
-- For more details about what happens when you turn on Resource Explorer
-- in an Amazon Web Services Region, see
-- <https://docs.aws.amazon.com/resource-explorer/latest/userguide/manage-service-activate.html Turn on Resource Explorer to index your resources in an Amazon Web Services Region>
-- in the /Amazon Web Services Resource Explorer User Guide/.
--
-- If this is the first Amazon Web Services Region in which you\'ve created
-- an index for Resource Explorer, then this operation also
-- <https://docs.aws.amazon.com/resource-explorer/latest/userguide/security_iam_service-linked-roles.html creates a service-linked role>
-- in your Amazon Web Services account that allows Resource Explorer to
-- enumerate your resources to populate the index.
--
-- -   __Action__: @resource-explorer-2:CreateIndex@
--
--     __Resource__: The ARN of the index (as it will exist after the
--     operation completes) in the Amazon Web Services Region and account
--     in which you\'re trying to create the index. Use the wildcard
--     character (@*@) at the end of the string to match the eventual UUID.
--     For example, the following @Resource@ element restricts the role or
--     user to creating an index in only the @us-east-2@ Region of the
--     specified account.
--
--     @\"Resource\": \"arn:aws:resource-explorer-2:us-west-2:@/@\<account-id>@/@:index\/*\"@
--
--     Alternatively, you can use @\"Resource\": \"*\"@ to allow the role
--     or user to create an index in any Region.
--
-- -   __Action__: @iam:CreateServiceLinkedRole@
--
--     __Resource__: No specific resource (*).
--
--     This permission is required only the first time you create an index
--     to turn on Resource Explorer in the account. Resource Explorer uses
--     this to create the
--     <https://docs.aws.amazon.com/resource-explorer/latest/userguide/security_iam_service-linked-roles.html service-linked role needed to index the resources in your account>.
--     Resource Explorer uses the same service-linked role for all
--     additional indexes you create afterwards.
module Amazonka.ResourceExplorer2.CreateIndex
  ( -- * Creating a Request
    CreateIndex (..),
    newCreateIndex,

    -- * Request Lenses
    createIndex_clientToken,
    createIndex_tags,

    -- * Destructuring the Response
    CreateIndexResponse (..),
    newCreateIndexResponse,

    -- * Response Lenses
    createIndexResponse_arn,
    createIndexResponse_createdAt,
    createIndexResponse_state,
    createIndexResponse_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:/ 'newCreateIndex' smart constructor.
data CreateIndex = CreateIndex'
  { -- | This value helps ensure idempotency. Resource Explorer uses this value
    -- to prevent the accidental creation of duplicate versions. We recommend
    -- that you generate a
    -- <https://wikipedia.org/wiki/Universally_unique_identifier UUID-type value>
    -- to ensure the uniqueness of your views.
    CreateIndex -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
    -- | The specified tags are attached only to the index created in this Amazon
    -- Web Services Region. The tags aren\'t attached to any of the resources
    -- listed in the index.
    CreateIndex -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
  }
  deriving (CreateIndex -> CreateIndex -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateIndex -> CreateIndex -> Bool
$c/= :: CreateIndex -> CreateIndex -> Bool
== :: CreateIndex -> CreateIndex -> Bool
$c== :: CreateIndex -> CreateIndex -> Bool
Prelude.Eq, ReadPrec [CreateIndex]
ReadPrec CreateIndex
Int -> ReadS CreateIndex
ReadS [CreateIndex]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateIndex]
$creadListPrec :: ReadPrec [CreateIndex]
readPrec :: ReadPrec CreateIndex
$creadPrec :: ReadPrec CreateIndex
readList :: ReadS [CreateIndex]
$creadList :: ReadS [CreateIndex]
readsPrec :: Int -> ReadS CreateIndex
$creadsPrec :: Int -> ReadS CreateIndex
Prelude.Read, Int -> CreateIndex -> ShowS
[CreateIndex] -> ShowS
CreateIndex -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateIndex] -> ShowS
$cshowList :: [CreateIndex] -> ShowS
show :: CreateIndex -> String
$cshow :: CreateIndex -> String
showsPrec :: Int -> CreateIndex -> ShowS
$cshowsPrec :: Int -> CreateIndex -> ShowS
Prelude.Show, forall x. Rep CreateIndex x -> CreateIndex
forall x. CreateIndex -> Rep CreateIndex x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateIndex x -> CreateIndex
$cfrom :: forall x. CreateIndex -> Rep CreateIndex x
Prelude.Generic)

-- |
-- Create a value of 'CreateIndex' 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:
--
-- 'clientToken', 'createIndex_clientToken' - This value helps ensure idempotency. Resource Explorer uses this value
-- to prevent the accidental creation of duplicate versions. We recommend
-- that you generate a
-- <https://wikipedia.org/wiki/Universally_unique_identifier UUID-type value>
-- to ensure the uniqueness of your views.
--
-- 'tags', 'createIndex_tags' - The specified tags are attached only to the index created in this Amazon
-- Web Services Region. The tags aren\'t attached to any of the resources
-- listed in the index.
newCreateIndex ::
  CreateIndex
newCreateIndex :: CreateIndex
newCreateIndex =
  CreateIndex'
    { $sel:clientToken:CreateIndex' :: Maybe Text
clientToken = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateIndex' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing
    }

-- | This value helps ensure idempotency. Resource Explorer uses this value
-- to prevent the accidental creation of duplicate versions. We recommend
-- that you generate a
-- <https://wikipedia.org/wiki/Universally_unique_identifier UUID-type value>
-- to ensure the uniqueness of your views.
createIndex_clientToken :: Lens.Lens' CreateIndex (Prelude.Maybe Prelude.Text)
createIndex_clientToken :: Lens' CreateIndex (Maybe Text)
createIndex_clientToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIndex' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:CreateIndex' :: CreateIndex -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: CreateIndex
s@CreateIndex' {} Maybe Text
a -> CreateIndex
s {$sel:clientToken:CreateIndex' :: Maybe Text
clientToken = Maybe Text
a} :: CreateIndex)

-- | The specified tags are attached only to the index created in this Amazon
-- Web Services Region. The tags aren\'t attached to any of the resources
-- listed in the index.
createIndex_tags :: Lens.Lens' CreateIndex (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createIndex_tags :: Lens' CreateIndex (Maybe (HashMap Text Text))
createIndex_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIndex' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateIndex' :: CreateIndex -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateIndex
s@CreateIndex' {} Maybe (HashMap Text Text)
a -> CreateIndex
s {$sel:tags:CreateIndex' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateIndex) 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 Core.AWSRequest CreateIndex where
  type AWSResponse CreateIndex = CreateIndexResponse
  request :: (Service -> Service) -> CreateIndex -> Request CreateIndex
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 CreateIndex
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateIndex)))
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 IndexState -> Int -> CreateIndexResponse
CreateIndexResponse'
            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
"State")
            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 CreateIndex where
  hashWithSalt :: Int -> CreateIndex -> Int
hashWithSalt Int
_salt CreateIndex' {Maybe Text
Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
clientToken :: Maybe Text
$sel:tags:CreateIndex' :: CreateIndex -> Maybe (HashMap Text Text)
$sel:clientToken:CreateIndex' :: CreateIndex -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clientToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags

instance Prelude.NFData CreateIndex where
  rnf :: CreateIndex -> ()
rnf CreateIndex' {Maybe Text
Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
clientToken :: Maybe Text
$sel:tags:CreateIndex' :: CreateIndex -> Maybe (HashMap Text Text)
$sel:clientToken:CreateIndex' :: CreateIndex -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags

instance Data.ToHeaders CreateIndex where
  toHeaders :: CreateIndex -> 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 CreateIndex where
  toJSON :: CreateIndex -> Value
toJSON CreateIndex' {Maybe Text
Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
clientToken :: Maybe Text
$sel:tags:CreateIndex' :: CreateIndex -> Maybe (HashMap Text Text)
$sel:clientToken:CreateIndex' :: CreateIndex -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"ClientToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
clientToken,
            (Key
"Tags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags
          ]
      )

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

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

-- | /See:/ 'newCreateIndexResponse' smart constructor.
data CreateIndexResponse = CreateIndexResponse'
  { -- | The ARN of the new local index for the Region. You can reference this
    -- ARN in IAM permission policies to authorize the following operations:
    -- DeleteIndex | GetIndex | UpdateIndexType | CreateView
    CreateIndexResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The date and timestamp when the index was created.
    CreateIndexResponse -> Maybe ISO8601
createdAt :: Prelude.Maybe Data.ISO8601,
    -- | Indicates the current state of the index. You can check for changes to
    -- the state for asynchronous operations by calling the GetIndex operation.
    --
    -- The state can remain in the @CREATING@ or @UPDATING@ state for several
    -- hours as Resource Explorer discovers the information about your
    -- resources and populates the index.
    CreateIndexResponse -> Maybe IndexState
state :: Prelude.Maybe IndexState,
    -- | The response's http status code.
    CreateIndexResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateIndexResponse -> CreateIndexResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateIndexResponse -> CreateIndexResponse -> Bool
$c/= :: CreateIndexResponse -> CreateIndexResponse -> Bool
== :: CreateIndexResponse -> CreateIndexResponse -> Bool
$c== :: CreateIndexResponse -> CreateIndexResponse -> Bool
Prelude.Eq, ReadPrec [CreateIndexResponse]
ReadPrec CreateIndexResponse
Int -> ReadS CreateIndexResponse
ReadS [CreateIndexResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateIndexResponse]
$creadListPrec :: ReadPrec [CreateIndexResponse]
readPrec :: ReadPrec CreateIndexResponse
$creadPrec :: ReadPrec CreateIndexResponse
readList :: ReadS [CreateIndexResponse]
$creadList :: ReadS [CreateIndexResponse]
readsPrec :: Int -> ReadS CreateIndexResponse
$creadsPrec :: Int -> ReadS CreateIndexResponse
Prelude.Read, Int -> CreateIndexResponse -> ShowS
[CreateIndexResponse] -> ShowS
CreateIndexResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateIndexResponse] -> ShowS
$cshowList :: [CreateIndexResponse] -> ShowS
show :: CreateIndexResponse -> String
$cshow :: CreateIndexResponse -> String
showsPrec :: Int -> CreateIndexResponse -> ShowS
$cshowsPrec :: Int -> CreateIndexResponse -> ShowS
Prelude.Show, forall x. Rep CreateIndexResponse x -> CreateIndexResponse
forall x. CreateIndexResponse -> Rep CreateIndexResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateIndexResponse x -> CreateIndexResponse
$cfrom :: forall x. CreateIndexResponse -> Rep CreateIndexResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateIndexResponse' 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', 'createIndexResponse_arn' - The ARN of the new local index for the Region. You can reference this
-- ARN in IAM permission policies to authorize the following operations:
-- DeleteIndex | GetIndex | UpdateIndexType | CreateView
--
-- 'createdAt', 'createIndexResponse_createdAt' - The date and timestamp when the index was created.
--
-- 'state', 'createIndexResponse_state' - Indicates the current state of the index. You can check for changes to
-- the state for asynchronous operations by calling the GetIndex operation.
--
-- The state can remain in the @CREATING@ or @UPDATING@ state for several
-- hours as Resource Explorer discovers the information about your
-- resources and populates the index.
--
-- 'httpStatus', 'createIndexResponse_httpStatus' - The response's http status code.
newCreateIndexResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateIndexResponse
newCreateIndexResponse :: Int -> CreateIndexResponse
newCreateIndexResponse Int
pHttpStatus_ =
  CreateIndexResponse'
    { $sel:arn:CreateIndexResponse' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:CreateIndexResponse' :: Maybe ISO8601
createdAt = forall a. Maybe a
Prelude.Nothing,
      $sel:state:CreateIndexResponse' :: Maybe IndexState
state = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateIndexResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The ARN of the new local index for the Region. You can reference this
-- ARN in IAM permission policies to authorize the following operations:
-- DeleteIndex | GetIndex | UpdateIndexType | CreateView
createIndexResponse_arn :: Lens.Lens' CreateIndexResponse (Prelude.Maybe Prelude.Text)
createIndexResponse_arn :: Lens' CreateIndexResponse (Maybe Text)
createIndexResponse_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIndexResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:CreateIndexResponse' :: CreateIndexResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: CreateIndexResponse
s@CreateIndexResponse' {} Maybe Text
a -> CreateIndexResponse
s {$sel:arn:CreateIndexResponse' :: Maybe Text
arn = Maybe Text
a} :: CreateIndexResponse)

-- | The date and timestamp when the index was created.
createIndexResponse_createdAt :: Lens.Lens' CreateIndexResponse (Prelude.Maybe Prelude.UTCTime)
createIndexResponse_createdAt :: Lens' CreateIndexResponse (Maybe UTCTime)
createIndexResponse_createdAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIndexResponse' {Maybe ISO8601
createdAt :: Maybe ISO8601
$sel:createdAt:CreateIndexResponse' :: CreateIndexResponse -> Maybe ISO8601
createdAt} -> Maybe ISO8601
createdAt) (\s :: CreateIndexResponse
s@CreateIndexResponse' {} Maybe ISO8601
a -> CreateIndexResponse
s {$sel:createdAt:CreateIndexResponse' :: Maybe ISO8601
createdAt = Maybe ISO8601
a} :: CreateIndexResponse) 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

-- | Indicates the current state of the index. You can check for changes to
-- the state for asynchronous operations by calling the GetIndex operation.
--
-- The state can remain in the @CREATING@ or @UPDATING@ state for several
-- hours as Resource Explorer discovers the information about your
-- resources and populates the index.
createIndexResponse_state :: Lens.Lens' CreateIndexResponse (Prelude.Maybe IndexState)
createIndexResponse_state :: Lens' CreateIndexResponse (Maybe IndexState)
createIndexResponse_state = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIndexResponse' {Maybe IndexState
state :: Maybe IndexState
$sel:state:CreateIndexResponse' :: CreateIndexResponse -> Maybe IndexState
state} -> Maybe IndexState
state) (\s :: CreateIndexResponse
s@CreateIndexResponse' {} Maybe IndexState
a -> CreateIndexResponse
s {$sel:state:CreateIndexResponse' :: Maybe IndexState
state = Maybe IndexState
a} :: CreateIndexResponse)

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

instance Prelude.NFData CreateIndexResponse where
  rnf :: CreateIndexResponse -> ()
rnf CreateIndexResponse' {Int
Maybe Text
Maybe ISO8601
Maybe IndexState
httpStatus :: Int
state :: Maybe IndexState
createdAt :: Maybe ISO8601
arn :: Maybe Text
$sel:httpStatus:CreateIndexResponse' :: CreateIndexResponse -> Int
$sel:state:CreateIndexResponse' :: CreateIndexResponse -> Maybe IndexState
$sel:createdAt:CreateIndexResponse' :: CreateIndexResponse -> Maybe ISO8601
$sel:arn:CreateIndexResponse' :: CreateIndexResponse -> 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 IndexState
state
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus