{-# 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.PinpointSmsVoiceV2.CreateOptOutList
-- 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 a new opt-out list.
--
-- If the opt-out list name already exists, an Error is returned.
--
-- An opt-out list is a list of phone numbers that are opted out, meaning
-- you can\'t send SMS or voice messages to them. If end user replies with
-- the keyword \"STOP,\" an entry for the phone number is added to the
-- opt-out list. In addition to STOP, your recipients can use any supported
-- opt-out keyword, such as CANCEL or OPTOUT. For a list of supported
-- opt-out keywords, see
-- <https://docs.aws.amazon.com/pinpoint/latest/userguide/channels-sms-manage.html#channels-sms-manage-optout SMS opt out>
-- in the /Amazon Pinpoint User Guide/.
module Amazonka.PinpointSmsVoiceV2.CreateOptOutList
  ( -- * Creating a Request
    CreateOptOutList (..),
    newCreateOptOutList,

    -- * Request Lenses
    createOptOutList_clientToken,
    createOptOutList_tags,
    createOptOutList_optOutListName,

    -- * Destructuring the Response
    CreateOptOutListResponse (..),
    newCreateOptOutListResponse,

    -- * Response Lenses
    createOptOutListResponse_createdTimestamp,
    createOptOutListResponse_optOutListArn,
    createOptOutListResponse_optOutListName,
    createOptOutListResponse_tags,
    createOptOutListResponse_httpStatus,
  )
where

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

-- | /See:/ 'newCreateOptOutList' smart constructor.
data CreateOptOutList = CreateOptOutList'
  { -- | Unique, case-sensitive identifier that you provide to ensure the
    -- idempotency of the request. If you don\'t specify a client token, a
    -- randomly generated token is used for the request to ensure idempotency.
    CreateOptOutList -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
    -- | An array of tags (key and value pairs) to associate with the new
    -- OptOutList.
    CreateOptOutList -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The name of the new OptOutList.
    CreateOptOutList -> Text
optOutListName :: Prelude.Text
  }
  deriving (CreateOptOutList -> CreateOptOutList -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateOptOutList -> CreateOptOutList -> Bool
$c/= :: CreateOptOutList -> CreateOptOutList -> Bool
== :: CreateOptOutList -> CreateOptOutList -> Bool
$c== :: CreateOptOutList -> CreateOptOutList -> Bool
Prelude.Eq, ReadPrec [CreateOptOutList]
ReadPrec CreateOptOutList
Int -> ReadS CreateOptOutList
ReadS [CreateOptOutList]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateOptOutList]
$creadListPrec :: ReadPrec [CreateOptOutList]
readPrec :: ReadPrec CreateOptOutList
$creadPrec :: ReadPrec CreateOptOutList
readList :: ReadS [CreateOptOutList]
$creadList :: ReadS [CreateOptOutList]
readsPrec :: Int -> ReadS CreateOptOutList
$creadsPrec :: Int -> ReadS CreateOptOutList
Prelude.Read, Int -> CreateOptOutList -> ShowS
[CreateOptOutList] -> ShowS
CreateOptOutList -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateOptOutList] -> ShowS
$cshowList :: [CreateOptOutList] -> ShowS
show :: CreateOptOutList -> String
$cshow :: CreateOptOutList -> String
showsPrec :: Int -> CreateOptOutList -> ShowS
$cshowsPrec :: Int -> CreateOptOutList -> ShowS
Prelude.Show, forall x. Rep CreateOptOutList x -> CreateOptOutList
forall x. CreateOptOutList -> Rep CreateOptOutList x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateOptOutList x -> CreateOptOutList
$cfrom :: forall x. CreateOptOutList -> Rep CreateOptOutList x
Prelude.Generic)

-- |
-- Create a value of 'CreateOptOutList' 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', 'createOptOutList_clientToken' - Unique, case-sensitive identifier that you provide to ensure the
-- idempotency of the request. If you don\'t specify a client token, a
-- randomly generated token is used for the request to ensure idempotency.
--
-- 'tags', 'createOptOutList_tags' - An array of tags (key and value pairs) to associate with the new
-- OptOutList.
--
-- 'optOutListName', 'createOptOutList_optOutListName' - The name of the new OptOutList.
newCreateOptOutList ::
  -- | 'optOutListName'
  Prelude.Text ->
  CreateOptOutList
newCreateOptOutList :: Text -> CreateOptOutList
newCreateOptOutList Text
pOptOutListName_ =
  CreateOptOutList'
    { $sel:clientToken:CreateOptOutList' :: Maybe Text
clientToken = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateOptOutList' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:optOutListName:CreateOptOutList' :: Text
optOutListName = Text
pOptOutListName_
    }

-- | Unique, case-sensitive identifier that you provide to ensure the
-- idempotency of the request. If you don\'t specify a client token, a
-- randomly generated token is used for the request to ensure idempotency.
createOptOutList_clientToken :: Lens.Lens' CreateOptOutList (Prelude.Maybe Prelude.Text)
createOptOutList_clientToken :: Lens' CreateOptOutList (Maybe Text)
createOptOutList_clientToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateOptOutList' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:CreateOptOutList' :: CreateOptOutList -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: CreateOptOutList
s@CreateOptOutList' {} Maybe Text
a -> CreateOptOutList
s {$sel:clientToken:CreateOptOutList' :: Maybe Text
clientToken = Maybe Text
a} :: CreateOptOutList)

-- | An array of tags (key and value pairs) to associate with the new
-- OptOutList.
createOptOutList_tags :: Lens.Lens' CreateOptOutList (Prelude.Maybe [Tag])
createOptOutList_tags :: Lens' CreateOptOutList (Maybe [Tag])
createOptOutList_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateOptOutList' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateOptOutList' :: CreateOptOutList -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateOptOutList
s@CreateOptOutList' {} Maybe [Tag]
a -> CreateOptOutList
s {$sel:tags:CreateOptOutList' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateOptOutList) 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 new OptOutList.
createOptOutList_optOutListName :: Lens.Lens' CreateOptOutList Prelude.Text
createOptOutList_optOutListName :: Lens' CreateOptOutList Text
createOptOutList_optOutListName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateOptOutList' {Text
optOutListName :: Text
$sel:optOutListName:CreateOptOutList' :: CreateOptOutList -> Text
optOutListName} -> Text
optOutListName) (\s :: CreateOptOutList
s@CreateOptOutList' {} Text
a -> CreateOptOutList
s {$sel:optOutListName:CreateOptOutList' :: Text
optOutListName = Text
a} :: CreateOptOutList)

instance Core.AWSRequest CreateOptOutList where
  type
    AWSResponse CreateOptOutList =
      CreateOptOutListResponse
  request :: (Service -> Service)
-> CreateOptOutList -> Request CreateOptOutList
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 CreateOptOutList
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateOptOutList)))
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 POSIX
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Int
-> CreateOptOutListResponse
CreateOptOutListResponse'
            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
"CreatedTimestamp")
            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
"OptOutListArn")
            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
"OptOutListName")
            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.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable CreateOptOutList where
  hashWithSalt :: Int -> CreateOptOutList -> Int
hashWithSalt Int
_salt CreateOptOutList' {Maybe [Tag]
Maybe Text
Text
optOutListName :: Text
tags :: Maybe [Tag]
clientToken :: Maybe Text
$sel:optOutListName:CreateOptOutList' :: CreateOptOutList -> Text
$sel:tags:CreateOptOutList' :: CreateOptOutList -> Maybe [Tag]
$sel:clientToken:CreateOptOutList' :: CreateOptOutList -> 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 [Tag]
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
optOutListName

instance Prelude.NFData CreateOptOutList where
  rnf :: CreateOptOutList -> ()
rnf CreateOptOutList' {Maybe [Tag]
Maybe Text
Text
optOutListName :: Text
tags :: Maybe [Tag]
clientToken :: Maybe Text
$sel:optOutListName:CreateOptOutList' :: CreateOptOutList -> Text
$sel:tags:CreateOptOutList' :: CreateOptOutList -> Maybe [Tag]
$sel:clientToken:CreateOptOutList' :: CreateOptOutList -> 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 [Tag]
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
optOutListName

instance Data.ToHeaders CreateOptOutList where
  toHeaders :: CreateOptOutList -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"PinpointSMSVoiceV2.CreateOptOutList" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.0" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON CreateOptOutList where
  toJSON :: CreateOptOutList -> Value
toJSON CreateOptOutList' {Maybe [Tag]
Maybe Text
Text
optOutListName :: Text
tags :: Maybe [Tag]
clientToken :: Maybe Text
$sel:optOutListName:CreateOptOutList' :: CreateOptOutList -> Text
$sel:tags:CreateOptOutList' :: CreateOptOutList -> Maybe [Tag]
$sel:clientToken:CreateOptOutList' :: CreateOptOutList -> 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 [Tag]
tags,
            forall a. a -> Maybe a
Prelude.Just
              (Key
"OptOutListName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
optOutListName)
          ]
      )

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

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

-- | /See:/ 'newCreateOptOutListResponse' smart constructor.
data CreateOptOutListResponse = CreateOptOutListResponse'
  { -- | The time when the pool was created, in
    -- <https://www.epochconverter.com/ UNIX epoch time> format.
    CreateOptOutListResponse -> Maybe POSIX
createdTimestamp :: Prelude.Maybe Data.POSIX,
    -- | The Amazon Resource Name (ARN) for the OptOutList.
    CreateOptOutListResponse -> Maybe Text
optOutListArn :: Prelude.Maybe Prelude.Text,
    -- | The name of the new OptOutList.
    CreateOptOutListResponse -> Maybe Text
optOutListName :: Prelude.Maybe Prelude.Text,
    -- | An array of tags (key and value pairs) associated with the new
    -- OptOutList.
    CreateOptOutListResponse -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The response's http status code.
    CreateOptOutListResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateOptOutListResponse -> CreateOptOutListResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateOptOutListResponse -> CreateOptOutListResponse -> Bool
$c/= :: CreateOptOutListResponse -> CreateOptOutListResponse -> Bool
== :: CreateOptOutListResponse -> CreateOptOutListResponse -> Bool
$c== :: CreateOptOutListResponse -> CreateOptOutListResponse -> Bool
Prelude.Eq, ReadPrec [CreateOptOutListResponse]
ReadPrec CreateOptOutListResponse
Int -> ReadS CreateOptOutListResponse
ReadS [CreateOptOutListResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateOptOutListResponse]
$creadListPrec :: ReadPrec [CreateOptOutListResponse]
readPrec :: ReadPrec CreateOptOutListResponse
$creadPrec :: ReadPrec CreateOptOutListResponse
readList :: ReadS [CreateOptOutListResponse]
$creadList :: ReadS [CreateOptOutListResponse]
readsPrec :: Int -> ReadS CreateOptOutListResponse
$creadsPrec :: Int -> ReadS CreateOptOutListResponse
Prelude.Read, Int -> CreateOptOutListResponse -> ShowS
[CreateOptOutListResponse] -> ShowS
CreateOptOutListResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateOptOutListResponse] -> ShowS
$cshowList :: [CreateOptOutListResponse] -> ShowS
show :: CreateOptOutListResponse -> String
$cshow :: CreateOptOutListResponse -> String
showsPrec :: Int -> CreateOptOutListResponse -> ShowS
$cshowsPrec :: Int -> CreateOptOutListResponse -> ShowS
Prelude.Show, forall x.
Rep CreateOptOutListResponse x -> CreateOptOutListResponse
forall x.
CreateOptOutListResponse -> Rep CreateOptOutListResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateOptOutListResponse x -> CreateOptOutListResponse
$cfrom :: forall x.
CreateOptOutListResponse -> Rep CreateOptOutListResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateOptOutListResponse' 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:
--
-- 'createdTimestamp', 'createOptOutListResponse_createdTimestamp' - The time when the pool was created, in
-- <https://www.epochconverter.com/ UNIX epoch time> format.
--
-- 'optOutListArn', 'createOptOutListResponse_optOutListArn' - The Amazon Resource Name (ARN) for the OptOutList.
--
-- 'optOutListName', 'createOptOutListResponse_optOutListName' - The name of the new OptOutList.
--
-- 'tags', 'createOptOutListResponse_tags' - An array of tags (key and value pairs) associated with the new
-- OptOutList.
--
-- 'httpStatus', 'createOptOutListResponse_httpStatus' - The response's http status code.
newCreateOptOutListResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateOptOutListResponse
newCreateOptOutListResponse :: Int -> CreateOptOutListResponse
newCreateOptOutListResponse Int
pHttpStatus_ =
  CreateOptOutListResponse'
    { $sel:createdTimestamp:CreateOptOutListResponse' :: Maybe POSIX
createdTimestamp =
        forall a. Maybe a
Prelude.Nothing,
      $sel:optOutListArn:CreateOptOutListResponse' :: Maybe Text
optOutListArn = forall a. Maybe a
Prelude.Nothing,
      $sel:optOutListName:CreateOptOutListResponse' :: Maybe Text
optOutListName = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateOptOutListResponse' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateOptOutListResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The time when the pool was created, in
-- <https://www.epochconverter.com/ UNIX epoch time> format.
createOptOutListResponse_createdTimestamp :: Lens.Lens' CreateOptOutListResponse (Prelude.Maybe Prelude.UTCTime)
createOptOutListResponse_createdTimestamp :: Lens' CreateOptOutListResponse (Maybe UTCTime)
createOptOutListResponse_createdTimestamp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateOptOutListResponse' {Maybe POSIX
createdTimestamp :: Maybe POSIX
$sel:createdTimestamp:CreateOptOutListResponse' :: CreateOptOutListResponse -> Maybe POSIX
createdTimestamp} -> Maybe POSIX
createdTimestamp) (\s :: CreateOptOutListResponse
s@CreateOptOutListResponse' {} Maybe POSIX
a -> CreateOptOutListResponse
s {$sel:createdTimestamp:CreateOptOutListResponse' :: Maybe POSIX
createdTimestamp = Maybe POSIX
a} :: CreateOptOutListResponse) 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 Amazon Resource Name (ARN) for the OptOutList.
createOptOutListResponse_optOutListArn :: Lens.Lens' CreateOptOutListResponse (Prelude.Maybe Prelude.Text)
createOptOutListResponse_optOutListArn :: Lens' CreateOptOutListResponse (Maybe Text)
createOptOutListResponse_optOutListArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateOptOutListResponse' {Maybe Text
optOutListArn :: Maybe Text
$sel:optOutListArn:CreateOptOutListResponse' :: CreateOptOutListResponse -> Maybe Text
optOutListArn} -> Maybe Text
optOutListArn) (\s :: CreateOptOutListResponse
s@CreateOptOutListResponse' {} Maybe Text
a -> CreateOptOutListResponse
s {$sel:optOutListArn:CreateOptOutListResponse' :: Maybe Text
optOutListArn = Maybe Text
a} :: CreateOptOutListResponse)

-- | The name of the new OptOutList.
createOptOutListResponse_optOutListName :: Lens.Lens' CreateOptOutListResponse (Prelude.Maybe Prelude.Text)
createOptOutListResponse_optOutListName :: Lens' CreateOptOutListResponse (Maybe Text)
createOptOutListResponse_optOutListName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateOptOutListResponse' {Maybe Text
optOutListName :: Maybe Text
$sel:optOutListName:CreateOptOutListResponse' :: CreateOptOutListResponse -> Maybe Text
optOutListName} -> Maybe Text
optOutListName) (\s :: CreateOptOutListResponse
s@CreateOptOutListResponse' {} Maybe Text
a -> CreateOptOutListResponse
s {$sel:optOutListName:CreateOptOutListResponse' :: Maybe Text
optOutListName = Maybe Text
a} :: CreateOptOutListResponse)

-- | An array of tags (key and value pairs) associated with the new
-- OptOutList.
createOptOutListResponse_tags :: Lens.Lens' CreateOptOutListResponse (Prelude.Maybe [Tag])
createOptOutListResponse_tags :: Lens' CreateOptOutListResponse (Maybe [Tag])
createOptOutListResponse_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateOptOutListResponse' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateOptOutListResponse' :: CreateOptOutListResponse -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateOptOutListResponse
s@CreateOptOutListResponse' {} Maybe [Tag]
a -> CreateOptOutListResponse
s {$sel:tags:CreateOptOutListResponse' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateOptOutListResponse) 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 response's http status code.
createOptOutListResponse_httpStatus :: Lens.Lens' CreateOptOutListResponse Prelude.Int
createOptOutListResponse_httpStatus :: Lens' CreateOptOutListResponse Int
createOptOutListResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateOptOutListResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateOptOutListResponse' :: CreateOptOutListResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateOptOutListResponse
s@CreateOptOutListResponse' {} Int
a -> CreateOptOutListResponse
s {$sel:httpStatus:CreateOptOutListResponse' :: Int
httpStatus = Int
a} :: CreateOptOutListResponse)

instance Prelude.NFData CreateOptOutListResponse where
  rnf :: CreateOptOutListResponse -> ()
rnf CreateOptOutListResponse' {Int
Maybe [Tag]
Maybe Text
Maybe POSIX
httpStatus :: Int
tags :: Maybe [Tag]
optOutListName :: Maybe Text
optOutListArn :: Maybe Text
createdTimestamp :: Maybe POSIX
$sel:httpStatus:CreateOptOutListResponse' :: CreateOptOutListResponse -> Int
$sel:tags:CreateOptOutListResponse' :: CreateOptOutListResponse -> Maybe [Tag]
$sel:optOutListName:CreateOptOutListResponse' :: CreateOptOutListResponse -> Maybe Text
$sel:optOutListArn:CreateOptOutListResponse' :: CreateOptOutListResponse -> Maybe Text
$sel:createdTimestamp:CreateOptOutListResponse' :: CreateOptOutListResponse -> Maybe POSIX
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
createdTimestamp
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
optOutListArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
optOutListName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus