{-# 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.MacieV2.CreateAllowList
-- 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 and defines the settings for an allow list.
module Amazonka.MacieV2.CreateAllowList
  ( -- * Creating a Request
    CreateAllowList (..),
    newCreateAllowList,

    -- * Request Lenses
    createAllowList_description,
    createAllowList_tags,
    createAllowList_criteria,
    createAllowList_clientToken,
    createAllowList_name,

    -- * Destructuring the Response
    CreateAllowListResponse (..),
    newCreateAllowListResponse,

    -- * Response Lenses
    createAllowListResponse_arn,
    createAllowListResponse_id,
    createAllowListResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MacieV2.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newCreateAllowList' smart constructor.
data CreateAllowList = CreateAllowList'
  { -- | A custom description of the allow list. The description can contain as
    -- many as 512 characters.
    CreateAllowList -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | A map of key-value pairs that specifies the tags to associate with the
    -- allow list.
    --
    -- An allow list can have a maximum of 50 tags. Each tag consists of a tag
    -- key and an associated tag value. The maximum length of a tag key is 128
    -- characters. The maximum length of a tag value is 256 characters.
    CreateAllowList -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The criteria that specify the text or text pattern to ignore. The
    -- criteria can be the location and name of an S3 object that lists
    -- specific text to ignore (s3WordsList), or a regular expression (regex)
    -- that defines a text pattern to ignore.
    CreateAllowList -> AllowListCriteria
criteria :: AllowListCriteria,
    -- | A unique, case-sensitive token that you provide to ensure the
    -- idempotency of the request.
    CreateAllowList -> Text
clientToken :: Prelude.Text,
    -- | A custom name for the allow list. The name can contain as many as 128
    -- characters.
    CreateAllowList -> Text
name :: Prelude.Text
  }
  deriving (CreateAllowList -> CreateAllowList -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateAllowList -> CreateAllowList -> Bool
$c/= :: CreateAllowList -> CreateAllowList -> Bool
== :: CreateAllowList -> CreateAllowList -> Bool
$c== :: CreateAllowList -> CreateAllowList -> Bool
Prelude.Eq, ReadPrec [CreateAllowList]
ReadPrec CreateAllowList
Int -> ReadS CreateAllowList
ReadS [CreateAllowList]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateAllowList]
$creadListPrec :: ReadPrec [CreateAllowList]
readPrec :: ReadPrec CreateAllowList
$creadPrec :: ReadPrec CreateAllowList
readList :: ReadS [CreateAllowList]
$creadList :: ReadS [CreateAllowList]
readsPrec :: Int -> ReadS CreateAllowList
$creadsPrec :: Int -> ReadS CreateAllowList
Prelude.Read, Int -> CreateAllowList -> ShowS
[CreateAllowList] -> ShowS
CreateAllowList -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateAllowList] -> ShowS
$cshowList :: [CreateAllowList] -> ShowS
show :: CreateAllowList -> String
$cshow :: CreateAllowList -> String
showsPrec :: Int -> CreateAllowList -> ShowS
$cshowsPrec :: Int -> CreateAllowList -> ShowS
Prelude.Show, forall x. Rep CreateAllowList x -> CreateAllowList
forall x. CreateAllowList -> Rep CreateAllowList x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateAllowList x -> CreateAllowList
$cfrom :: forall x. CreateAllowList -> Rep CreateAllowList x
Prelude.Generic)

-- |
-- Create a value of 'CreateAllowList' 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:
--
-- 'description', 'createAllowList_description' - A custom description of the allow list. The description can contain as
-- many as 512 characters.
--
-- 'tags', 'createAllowList_tags' - A map of key-value pairs that specifies the tags to associate with the
-- allow list.
--
-- An allow list can have a maximum of 50 tags. Each tag consists of a tag
-- key and an associated tag value. The maximum length of a tag key is 128
-- characters. The maximum length of a tag value is 256 characters.
--
-- 'criteria', 'createAllowList_criteria' - The criteria that specify the text or text pattern to ignore. The
-- criteria can be the location and name of an S3 object that lists
-- specific text to ignore (s3WordsList), or a regular expression (regex)
-- that defines a text pattern to ignore.
--
-- 'clientToken', 'createAllowList_clientToken' - A unique, case-sensitive token that you provide to ensure the
-- idempotency of the request.
--
-- 'name', 'createAllowList_name' - A custom name for the allow list. The name can contain as many as 128
-- characters.
newCreateAllowList ::
  -- | 'criteria'
  AllowListCriteria ->
  -- | 'clientToken'
  Prelude.Text ->
  -- | 'name'
  Prelude.Text ->
  CreateAllowList
newCreateAllowList :: AllowListCriteria -> Text -> Text -> CreateAllowList
newCreateAllowList AllowListCriteria
pCriteria_ Text
pClientToken_ Text
pName_ =
  CreateAllowList'
    { $sel:description:CreateAllowList' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateAllowList' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:criteria:CreateAllowList' :: AllowListCriteria
criteria = AllowListCriteria
pCriteria_,
      $sel:clientToken:CreateAllowList' :: Text
clientToken = Text
pClientToken_,
      $sel:name:CreateAllowList' :: Text
name = Text
pName_
    }

-- | A custom description of the allow list. The description can contain as
-- many as 512 characters.
createAllowList_description :: Lens.Lens' CreateAllowList (Prelude.Maybe Prelude.Text)
createAllowList_description :: Lens' CreateAllowList (Maybe Text)
createAllowList_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAllowList' {Maybe Text
description :: Maybe Text
$sel:description:CreateAllowList' :: CreateAllowList -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateAllowList
s@CreateAllowList' {} Maybe Text
a -> CreateAllowList
s {$sel:description:CreateAllowList' :: Maybe Text
description = Maybe Text
a} :: CreateAllowList)

-- | A map of key-value pairs that specifies the tags to associate with the
-- allow list.
--
-- An allow list can have a maximum of 50 tags. Each tag consists of a tag
-- key and an associated tag value. The maximum length of a tag key is 128
-- characters. The maximum length of a tag value is 256 characters.
createAllowList_tags :: Lens.Lens' CreateAllowList (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createAllowList_tags :: Lens' CreateAllowList (Maybe (HashMap Text Text))
createAllowList_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAllowList' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateAllowList' :: CreateAllowList -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateAllowList
s@CreateAllowList' {} Maybe (HashMap Text Text)
a -> CreateAllowList
s {$sel:tags:CreateAllowList' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateAllowList) 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 criteria that specify the text or text pattern to ignore. The
-- criteria can be the location and name of an S3 object that lists
-- specific text to ignore (s3WordsList), or a regular expression (regex)
-- that defines a text pattern to ignore.
createAllowList_criteria :: Lens.Lens' CreateAllowList AllowListCriteria
createAllowList_criteria :: Lens' CreateAllowList AllowListCriteria
createAllowList_criteria = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAllowList' {AllowListCriteria
criteria :: AllowListCriteria
$sel:criteria:CreateAllowList' :: CreateAllowList -> AllowListCriteria
criteria} -> AllowListCriteria
criteria) (\s :: CreateAllowList
s@CreateAllowList' {} AllowListCriteria
a -> CreateAllowList
s {$sel:criteria:CreateAllowList' :: AllowListCriteria
criteria = AllowListCriteria
a} :: CreateAllowList)

-- | A unique, case-sensitive token that you provide to ensure the
-- idempotency of the request.
createAllowList_clientToken :: Lens.Lens' CreateAllowList Prelude.Text
createAllowList_clientToken :: Lens' CreateAllowList Text
createAllowList_clientToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAllowList' {Text
clientToken :: Text
$sel:clientToken:CreateAllowList' :: CreateAllowList -> Text
clientToken} -> Text
clientToken) (\s :: CreateAllowList
s@CreateAllowList' {} Text
a -> CreateAllowList
s {$sel:clientToken:CreateAllowList' :: Text
clientToken = Text
a} :: CreateAllowList)

-- | A custom name for the allow list. The name can contain as many as 128
-- characters.
createAllowList_name :: Lens.Lens' CreateAllowList Prelude.Text
createAllowList_name :: Lens' CreateAllowList Text
createAllowList_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAllowList' {Text
name :: Text
$sel:name:CreateAllowList' :: CreateAllowList -> Text
name} -> Text
name) (\s :: CreateAllowList
s@CreateAllowList' {} Text
a -> CreateAllowList
s {$sel:name:CreateAllowList' :: Text
name = Text
a} :: CreateAllowList)

instance Core.AWSRequest CreateAllowList where
  type
    AWSResponse CreateAllowList =
      CreateAllowListResponse
  request :: (Service -> Service) -> CreateAllowList -> Request CreateAllowList
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 CreateAllowList
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateAllowList)))
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 Text -> Int -> CreateAllowListResponse
CreateAllowListResponse'
            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
"id")
            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 CreateAllowList where
  hashWithSalt :: Int -> CreateAllowList -> Int
hashWithSalt Int
_salt CreateAllowList' {Maybe Text
Maybe (HashMap Text Text)
Text
AllowListCriteria
name :: Text
clientToken :: Text
criteria :: AllowListCriteria
tags :: Maybe (HashMap Text Text)
description :: Maybe Text
$sel:name:CreateAllowList' :: CreateAllowList -> Text
$sel:clientToken:CreateAllowList' :: CreateAllowList -> Text
$sel:criteria:CreateAllowList' :: CreateAllowList -> AllowListCriteria
$sel:tags:CreateAllowList' :: CreateAllowList -> Maybe (HashMap Text Text)
$sel:description:CreateAllowList' :: CreateAllowList -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` AllowListCriteria
criteria
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
clientToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name

instance Prelude.NFData CreateAllowList where
  rnf :: CreateAllowList -> ()
rnf CreateAllowList' {Maybe Text
Maybe (HashMap Text Text)
Text
AllowListCriteria
name :: Text
clientToken :: Text
criteria :: AllowListCriteria
tags :: Maybe (HashMap Text Text)
description :: Maybe Text
$sel:name:CreateAllowList' :: CreateAllowList -> Text
$sel:clientToken:CreateAllowList' :: CreateAllowList -> Text
$sel:criteria:CreateAllowList' :: CreateAllowList -> AllowListCriteria
$sel:tags:CreateAllowList' :: CreateAllowList -> Maybe (HashMap Text Text)
$sel:description:CreateAllowList' :: CreateAllowList -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      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 AllowListCriteria
criteria
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
clientToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name

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

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

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

-- | /See:/ 'newCreateAllowListResponse' smart constructor.
data CreateAllowListResponse = CreateAllowListResponse'
  { -- | The Amazon Resource Name (ARN) of the allow list.
    CreateAllowListResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The unique identifier for the allow list.
    CreateAllowListResponse -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    CreateAllowListResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateAllowListResponse -> CreateAllowListResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateAllowListResponse -> CreateAllowListResponse -> Bool
$c/= :: CreateAllowListResponse -> CreateAllowListResponse -> Bool
== :: CreateAllowListResponse -> CreateAllowListResponse -> Bool
$c== :: CreateAllowListResponse -> CreateAllowListResponse -> Bool
Prelude.Eq, ReadPrec [CreateAllowListResponse]
ReadPrec CreateAllowListResponse
Int -> ReadS CreateAllowListResponse
ReadS [CreateAllowListResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateAllowListResponse]
$creadListPrec :: ReadPrec [CreateAllowListResponse]
readPrec :: ReadPrec CreateAllowListResponse
$creadPrec :: ReadPrec CreateAllowListResponse
readList :: ReadS [CreateAllowListResponse]
$creadList :: ReadS [CreateAllowListResponse]
readsPrec :: Int -> ReadS CreateAllowListResponse
$creadsPrec :: Int -> ReadS CreateAllowListResponse
Prelude.Read, Int -> CreateAllowListResponse -> ShowS
[CreateAllowListResponse] -> ShowS
CreateAllowListResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateAllowListResponse] -> ShowS
$cshowList :: [CreateAllowListResponse] -> ShowS
show :: CreateAllowListResponse -> String
$cshow :: CreateAllowListResponse -> String
showsPrec :: Int -> CreateAllowListResponse -> ShowS
$cshowsPrec :: Int -> CreateAllowListResponse -> ShowS
Prelude.Show, forall x. Rep CreateAllowListResponse x -> CreateAllowListResponse
forall x. CreateAllowListResponse -> Rep CreateAllowListResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateAllowListResponse x -> CreateAllowListResponse
$cfrom :: forall x. CreateAllowListResponse -> Rep CreateAllowListResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateAllowListResponse' 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', 'createAllowListResponse_arn' - The Amazon Resource Name (ARN) of the allow list.
--
-- 'id', 'createAllowListResponse_id' - The unique identifier for the allow list.
--
-- 'httpStatus', 'createAllowListResponse_httpStatus' - The response's http status code.
newCreateAllowListResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateAllowListResponse
newCreateAllowListResponse :: Int -> CreateAllowListResponse
newCreateAllowListResponse Int
pHttpStatus_ =
  CreateAllowListResponse'
    { $sel:arn:CreateAllowListResponse' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
      $sel:id:CreateAllowListResponse' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateAllowListResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The Amazon Resource Name (ARN) of the allow list.
createAllowListResponse_arn :: Lens.Lens' CreateAllowListResponse (Prelude.Maybe Prelude.Text)
createAllowListResponse_arn :: Lens' CreateAllowListResponse (Maybe Text)
createAllowListResponse_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAllowListResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:CreateAllowListResponse' :: CreateAllowListResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: CreateAllowListResponse
s@CreateAllowListResponse' {} Maybe Text
a -> CreateAllowListResponse
s {$sel:arn:CreateAllowListResponse' :: Maybe Text
arn = Maybe Text
a} :: CreateAllowListResponse)

-- | The unique identifier for the allow list.
createAllowListResponse_id :: Lens.Lens' CreateAllowListResponse (Prelude.Maybe Prelude.Text)
createAllowListResponse_id :: Lens' CreateAllowListResponse (Maybe Text)
createAllowListResponse_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAllowListResponse' {Maybe Text
id :: Maybe Text
$sel:id:CreateAllowListResponse' :: CreateAllowListResponse -> Maybe Text
id} -> Maybe Text
id) (\s :: CreateAllowListResponse
s@CreateAllowListResponse' {} Maybe Text
a -> CreateAllowListResponse
s {$sel:id:CreateAllowListResponse' :: Maybe Text
id = Maybe Text
a} :: CreateAllowListResponse)

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

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