{-# 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.AccessAnalyzer.CreateAnalyzer
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates an analyzer for your account.
module Amazonka.AccessAnalyzer.CreateAnalyzer
  ( -- * Creating a Request
    CreateAnalyzer (..),
    newCreateAnalyzer,

    -- * Request Lenses
    createAnalyzer_archiveRules,
    createAnalyzer_clientToken,
    createAnalyzer_tags,
    createAnalyzer_analyzerName,
    createAnalyzer_type,

    -- * Destructuring the Response
    CreateAnalyzerResponse (..),
    newCreateAnalyzerResponse,

    -- * Response Lenses
    createAnalyzerResponse_arn,
    createAnalyzerResponse_httpStatus,
  )
where

import Amazonka.AccessAnalyzer.Types
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 qualified Amazonka.Response as Response

-- | Creates an analyzer.
--
-- /See:/ 'newCreateAnalyzer' smart constructor.
data CreateAnalyzer = CreateAnalyzer'
  { -- | Specifies the archive rules to add for the analyzer. Archive rules
    -- automatically archive findings that meet the criteria you define for the
    -- rule.
    CreateAnalyzer -> Maybe [InlineArchiveRule]
archiveRules :: Prelude.Maybe [InlineArchiveRule],
    -- | A client token.
    CreateAnalyzer -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
    -- | The tags to apply to the analyzer.
    CreateAnalyzer -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The name of the analyzer to create.
    CreateAnalyzer -> Text
analyzerName :: Prelude.Text,
    -- | The type of analyzer to create. Only ACCOUNT and ORGANIZATION analyzers
    -- are supported. You can create only one analyzer per account per Region.
    -- You can create up to 5 analyzers per organization per Region.
    CreateAnalyzer -> Type
type' :: Type
  }
  deriving (CreateAnalyzer -> CreateAnalyzer -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateAnalyzer -> CreateAnalyzer -> Bool
$c/= :: CreateAnalyzer -> CreateAnalyzer -> Bool
== :: CreateAnalyzer -> CreateAnalyzer -> Bool
$c== :: CreateAnalyzer -> CreateAnalyzer -> Bool
Prelude.Eq, ReadPrec [CreateAnalyzer]
ReadPrec CreateAnalyzer
Int -> ReadS CreateAnalyzer
ReadS [CreateAnalyzer]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateAnalyzer]
$creadListPrec :: ReadPrec [CreateAnalyzer]
readPrec :: ReadPrec CreateAnalyzer
$creadPrec :: ReadPrec CreateAnalyzer
readList :: ReadS [CreateAnalyzer]
$creadList :: ReadS [CreateAnalyzer]
readsPrec :: Int -> ReadS CreateAnalyzer
$creadsPrec :: Int -> ReadS CreateAnalyzer
Prelude.Read, Int -> CreateAnalyzer -> ShowS
[CreateAnalyzer] -> ShowS
CreateAnalyzer -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateAnalyzer] -> ShowS
$cshowList :: [CreateAnalyzer] -> ShowS
show :: CreateAnalyzer -> String
$cshow :: CreateAnalyzer -> String
showsPrec :: Int -> CreateAnalyzer -> ShowS
$cshowsPrec :: Int -> CreateAnalyzer -> ShowS
Prelude.Show, forall x. Rep CreateAnalyzer x -> CreateAnalyzer
forall x. CreateAnalyzer -> Rep CreateAnalyzer x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateAnalyzer x -> CreateAnalyzer
$cfrom :: forall x. CreateAnalyzer -> Rep CreateAnalyzer x
Prelude.Generic)

-- |
-- Create a value of 'CreateAnalyzer' 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:
--
-- 'archiveRules', 'createAnalyzer_archiveRules' - Specifies the archive rules to add for the analyzer. Archive rules
-- automatically archive findings that meet the criteria you define for the
-- rule.
--
-- 'clientToken', 'createAnalyzer_clientToken' - A client token.
--
-- 'tags', 'createAnalyzer_tags' - The tags to apply to the analyzer.
--
-- 'analyzerName', 'createAnalyzer_analyzerName' - The name of the analyzer to create.
--
-- 'type'', 'createAnalyzer_type' - The type of analyzer to create. Only ACCOUNT and ORGANIZATION analyzers
-- are supported. You can create only one analyzer per account per Region.
-- You can create up to 5 analyzers per organization per Region.
newCreateAnalyzer ::
  -- | 'analyzerName'
  Prelude.Text ->
  -- | 'type''
  Type ->
  CreateAnalyzer
newCreateAnalyzer :: Text -> Type -> CreateAnalyzer
newCreateAnalyzer Text
pAnalyzerName_ Type
pType_ =
  CreateAnalyzer'
    { $sel:archiveRules:CreateAnalyzer' :: Maybe [InlineArchiveRule]
archiveRules = forall a. Maybe a
Prelude.Nothing,
      $sel:clientToken:CreateAnalyzer' :: Maybe Text
clientToken = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateAnalyzer' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:analyzerName:CreateAnalyzer' :: Text
analyzerName = Text
pAnalyzerName_,
      $sel:type':CreateAnalyzer' :: Type
type' = Type
pType_
    }

-- | Specifies the archive rules to add for the analyzer. Archive rules
-- automatically archive findings that meet the criteria you define for the
-- rule.
createAnalyzer_archiveRules :: Lens.Lens' CreateAnalyzer (Prelude.Maybe [InlineArchiveRule])
createAnalyzer_archiveRules :: Lens' CreateAnalyzer (Maybe [InlineArchiveRule])
createAnalyzer_archiveRules = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAnalyzer' {Maybe [InlineArchiveRule]
archiveRules :: Maybe [InlineArchiveRule]
$sel:archiveRules:CreateAnalyzer' :: CreateAnalyzer -> Maybe [InlineArchiveRule]
archiveRules} -> Maybe [InlineArchiveRule]
archiveRules) (\s :: CreateAnalyzer
s@CreateAnalyzer' {} Maybe [InlineArchiveRule]
a -> CreateAnalyzer
s {$sel:archiveRules:CreateAnalyzer' :: Maybe [InlineArchiveRule]
archiveRules = Maybe [InlineArchiveRule]
a} :: CreateAnalyzer) 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

-- | A client token.
createAnalyzer_clientToken :: Lens.Lens' CreateAnalyzer (Prelude.Maybe Prelude.Text)
createAnalyzer_clientToken :: Lens' CreateAnalyzer (Maybe Text)
createAnalyzer_clientToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAnalyzer' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:CreateAnalyzer' :: CreateAnalyzer -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: CreateAnalyzer
s@CreateAnalyzer' {} Maybe Text
a -> CreateAnalyzer
s {$sel:clientToken:CreateAnalyzer' :: Maybe Text
clientToken = Maybe Text
a} :: CreateAnalyzer)

-- | The tags to apply to the analyzer.
createAnalyzer_tags :: Lens.Lens' CreateAnalyzer (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createAnalyzer_tags :: Lens' CreateAnalyzer (Maybe (HashMap Text Text))
createAnalyzer_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAnalyzer' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateAnalyzer' :: CreateAnalyzer -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateAnalyzer
s@CreateAnalyzer' {} Maybe (HashMap Text Text)
a -> CreateAnalyzer
s {$sel:tags:CreateAnalyzer' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateAnalyzer) 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 name of the analyzer to create.
createAnalyzer_analyzerName :: Lens.Lens' CreateAnalyzer Prelude.Text
createAnalyzer_analyzerName :: Lens' CreateAnalyzer Text
createAnalyzer_analyzerName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAnalyzer' {Text
analyzerName :: Text
$sel:analyzerName:CreateAnalyzer' :: CreateAnalyzer -> Text
analyzerName} -> Text
analyzerName) (\s :: CreateAnalyzer
s@CreateAnalyzer' {} Text
a -> CreateAnalyzer
s {$sel:analyzerName:CreateAnalyzer' :: Text
analyzerName = Text
a} :: CreateAnalyzer)

-- | The type of analyzer to create. Only ACCOUNT and ORGANIZATION analyzers
-- are supported. You can create only one analyzer per account per Region.
-- You can create up to 5 analyzers per organization per Region.
createAnalyzer_type :: Lens.Lens' CreateAnalyzer Type
createAnalyzer_type :: Lens' CreateAnalyzer Type
createAnalyzer_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAnalyzer' {Type
type' :: Type
$sel:type':CreateAnalyzer' :: CreateAnalyzer -> Type
type'} -> Type
type') (\s :: CreateAnalyzer
s@CreateAnalyzer' {} Type
a -> CreateAnalyzer
s {$sel:type':CreateAnalyzer' :: Type
type' = Type
a} :: CreateAnalyzer)

instance Core.AWSRequest CreateAnalyzer where
  type
    AWSResponse CreateAnalyzer =
      CreateAnalyzerResponse
  request :: (Service -> Service) -> CreateAnalyzer -> Request CreateAnalyzer
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateAnalyzer
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateAnalyzer)))
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 -> Int -> CreateAnalyzerResponse
CreateAnalyzerResponse'
            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.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable CreateAnalyzer where
  hashWithSalt :: Int -> CreateAnalyzer -> Int
hashWithSalt Int
_salt CreateAnalyzer' {Maybe [InlineArchiveRule]
Maybe Text
Maybe (HashMap Text Text)
Text
Type
type' :: Type
analyzerName :: Text
tags :: Maybe (HashMap Text Text)
clientToken :: Maybe Text
archiveRules :: Maybe [InlineArchiveRule]
$sel:type':CreateAnalyzer' :: CreateAnalyzer -> Type
$sel:analyzerName:CreateAnalyzer' :: CreateAnalyzer -> Text
$sel:tags:CreateAnalyzer' :: CreateAnalyzer -> Maybe (HashMap Text Text)
$sel:clientToken:CreateAnalyzer' :: CreateAnalyzer -> Maybe Text
$sel:archiveRules:CreateAnalyzer' :: CreateAnalyzer -> Maybe [InlineArchiveRule]
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [InlineArchiveRule]
archiveRules
      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
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
analyzerName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Type
type'

instance Prelude.NFData CreateAnalyzer where
  rnf :: CreateAnalyzer -> ()
rnf CreateAnalyzer' {Maybe [InlineArchiveRule]
Maybe Text
Maybe (HashMap Text Text)
Text
Type
type' :: Type
analyzerName :: Text
tags :: Maybe (HashMap Text Text)
clientToken :: Maybe Text
archiveRules :: Maybe [InlineArchiveRule]
$sel:type':CreateAnalyzer' :: CreateAnalyzer -> Type
$sel:analyzerName:CreateAnalyzer' :: CreateAnalyzer -> Text
$sel:tags:CreateAnalyzer' :: CreateAnalyzer -> Maybe (HashMap Text Text)
$sel:clientToken:CreateAnalyzer' :: CreateAnalyzer -> Maybe Text
$sel:archiveRules:CreateAnalyzer' :: CreateAnalyzer -> Maybe [InlineArchiveRule]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [InlineArchiveRule]
archiveRules
      seq :: forall a b. a -> b -> b
`Prelude.seq` 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
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
analyzerName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Type
type'

instance Data.ToHeaders CreateAnalyzer where
  toHeaders :: CreateAnalyzer -> 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 CreateAnalyzer where
  toJSON :: CreateAnalyzer -> Value
toJSON CreateAnalyzer' {Maybe [InlineArchiveRule]
Maybe Text
Maybe (HashMap Text Text)
Text
Type
type' :: Type
analyzerName :: Text
tags :: Maybe (HashMap Text Text)
clientToken :: Maybe Text
archiveRules :: Maybe [InlineArchiveRule]
$sel:type':CreateAnalyzer' :: CreateAnalyzer -> Type
$sel:analyzerName:CreateAnalyzer' :: CreateAnalyzer -> Text
$sel:tags:CreateAnalyzer' :: CreateAnalyzer -> Maybe (HashMap Text Text)
$sel:clientToken:CreateAnalyzer' :: CreateAnalyzer -> Maybe Text
$sel:archiveRules:CreateAnalyzer' :: CreateAnalyzer -> Maybe [InlineArchiveRule]
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"archiveRules" 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 [InlineArchiveRule]
archiveRules,
            (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,
            forall a. a -> Maybe a
Prelude.Just (Key
"analyzerName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
analyzerName),
            forall a. a -> Maybe a
Prelude.Just (Key
"type" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Type
type')
          ]
      )

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

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

-- | The response to the request to create an analyzer.
--
-- /See:/ 'newCreateAnalyzerResponse' smart constructor.
data CreateAnalyzerResponse = CreateAnalyzerResponse'
  { -- | The ARN of the analyzer that was created by the request.
    CreateAnalyzerResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    CreateAnalyzerResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateAnalyzerResponse -> CreateAnalyzerResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateAnalyzerResponse -> CreateAnalyzerResponse -> Bool
$c/= :: CreateAnalyzerResponse -> CreateAnalyzerResponse -> Bool
== :: CreateAnalyzerResponse -> CreateAnalyzerResponse -> Bool
$c== :: CreateAnalyzerResponse -> CreateAnalyzerResponse -> Bool
Prelude.Eq, ReadPrec [CreateAnalyzerResponse]
ReadPrec CreateAnalyzerResponse
Int -> ReadS CreateAnalyzerResponse
ReadS [CreateAnalyzerResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateAnalyzerResponse]
$creadListPrec :: ReadPrec [CreateAnalyzerResponse]
readPrec :: ReadPrec CreateAnalyzerResponse
$creadPrec :: ReadPrec CreateAnalyzerResponse
readList :: ReadS [CreateAnalyzerResponse]
$creadList :: ReadS [CreateAnalyzerResponse]
readsPrec :: Int -> ReadS CreateAnalyzerResponse
$creadsPrec :: Int -> ReadS CreateAnalyzerResponse
Prelude.Read, Int -> CreateAnalyzerResponse -> ShowS
[CreateAnalyzerResponse] -> ShowS
CreateAnalyzerResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateAnalyzerResponse] -> ShowS
$cshowList :: [CreateAnalyzerResponse] -> ShowS
show :: CreateAnalyzerResponse -> String
$cshow :: CreateAnalyzerResponse -> String
showsPrec :: Int -> CreateAnalyzerResponse -> ShowS
$cshowsPrec :: Int -> CreateAnalyzerResponse -> ShowS
Prelude.Show, forall x. Rep CreateAnalyzerResponse x -> CreateAnalyzerResponse
forall x. CreateAnalyzerResponse -> Rep CreateAnalyzerResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateAnalyzerResponse x -> CreateAnalyzerResponse
$cfrom :: forall x. CreateAnalyzerResponse -> Rep CreateAnalyzerResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateAnalyzerResponse' 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', 'createAnalyzerResponse_arn' - The ARN of the analyzer that was created by the request.
--
-- 'httpStatus', 'createAnalyzerResponse_httpStatus' - The response's http status code.
newCreateAnalyzerResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateAnalyzerResponse
newCreateAnalyzerResponse :: Int -> CreateAnalyzerResponse
newCreateAnalyzerResponse Int
pHttpStatus_ =
  CreateAnalyzerResponse'
    { $sel:arn:CreateAnalyzerResponse' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateAnalyzerResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The ARN of the analyzer that was created by the request.
createAnalyzerResponse_arn :: Lens.Lens' CreateAnalyzerResponse (Prelude.Maybe Prelude.Text)
createAnalyzerResponse_arn :: Lens' CreateAnalyzerResponse (Maybe Text)
createAnalyzerResponse_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAnalyzerResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:CreateAnalyzerResponse' :: CreateAnalyzerResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: CreateAnalyzerResponse
s@CreateAnalyzerResponse' {} Maybe Text
a -> CreateAnalyzerResponse
s {$sel:arn:CreateAnalyzerResponse' :: Maybe Text
arn = Maybe Text
a} :: CreateAnalyzerResponse)

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

instance Prelude.NFData CreateAnalyzerResponse where
  rnf :: CreateAnalyzerResponse -> ()
rnf CreateAnalyzerResponse' {Int
Maybe Text
httpStatus :: Int
arn :: Maybe Text
$sel:httpStatus:CreateAnalyzerResponse' :: CreateAnalyzerResponse -> Int
$sel:arn:CreateAnalyzerResponse' :: CreateAnalyzerResponse -> 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 Int
httpStatus