{-# 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.CreateConfigurationSet
-- 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 configuration set. After you create the configuration set,
-- you can add one or more event destinations to it.
--
-- A configuration set is a set of rules that you apply to the SMS and
-- voice messages that you send.
--
-- When you send a message, you can optionally specify a single
-- configuration set.
module Amazonka.PinpointSmsVoiceV2.CreateConfigurationSet
  ( -- * Creating a Request
    CreateConfigurationSet (..),
    newCreateConfigurationSet,

    -- * Request Lenses
    createConfigurationSet_clientToken,
    createConfigurationSet_tags,
    createConfigurationSet_configurationSetName,

    -- * Destructuring the Response
    CreateConfigurationSetResponse (..),
    newCreateConfigurationSetResponse,

    -- * Response Lenses
    createConfigurationSetResponse_configurationSetArn,
    createConfigurationSetResponse_configurationSetName,
    createConfigurationSetResponse_createdTimestamp,
    createConfigurationSetResponse_tags,
    createConfigurationSetResponse_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:/ 'newCreateConfigurationSet' smart constructor.
data CreateConfigurationSet = CreateConfigurationSet'
  { -- | 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.
    CreateConfigurationSet -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
    -- | An array of key and value pair tags that\'s associated with the new
    -- configuration set.
    CreateConfigurationSet -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The name to use for the new configuration set.
    CreateConfigurationSet -> Text
configurationSetName :: Prelude.Text
  }
  deriving (CreateConfigurationSet -> CreateConfigurationSet -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateConfigurationSet -> CreateConfigurationSet -> Bool
$c/= :: CreateConfigurationSet -> CreateConfigurationSet -> Bool
== :: CreateConfigurationSet -> CreateConfigurationSet -> Bool
$c== :: CreateConfigurationSet -> CreateConfigurationSet -> Bool
Prelude.Eq, ReadPrec [CreateConfigurationSet]
ReadPrec CreateConfigurationSet
Int -> ReadS CreateConfigurationSet
ReadS [CreateConfigurationSet]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateConfigurationSet]
$creadListPrec :: ReadPrec [CreateConfigurationSet]
readPrec :: ReadPrec CreateConfigurationSet
$creadPrec :: ReadPrec CreateConfigurationSet
readList :: ReadS [CreateConfigurationSet]
$creadList :: ReadS [CreateConfigurationSet]
readsPrec :: Int -> ReadS CreateConfigurationSet
$creadsPrec :: Int -> ReadS CreateConfigurationSet
Prelude.Read, Int -> CreateConfigurationSet -> ShowS
[CreateConfigurationSet] -> ShowS
CreateConfigurationSet -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateConfigurationSet] -> ShowS
$cshowList :: [CreateConfigurationSet] -> ShowS
show :: CreateConfigurationSet -> String
$cshow :: CreateConfigurationSet -> String
showsPrec :: Int -> CreateConfigurationSet -> ShowS
$cshowsPrec :: Int -> CreateConfigurationSet -> ShowS
Prelude.Show, forall x. Rep CreateConfigurationSet x -> CreateConfigurationSet
forall x. CreateConfigurationSet -> Rep CreateConfigurationSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateConfigurationSet x -> CreateConfigurationSet
$cfrom :: forall x. CreateConfigurationSet -> Rep CreateConfigurationSet x
Prelude.Generic)

-- |
-- Create a value of 'CreateConfigurationSet' 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', 'createConfigurationSet_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', 'createConfigurationSet_tags' - An array of key and value pair tags that\'s associated with the new
-- configuration set.
--
-- 'configurationSetName', 'createConfigurationSet_configurationSetName' - The name to use for the new configuration set.
newCreateConfigurationSet ::
  -- | 'configurationSetName'
  Prelude.Text ->
  CreateConfigurationSet
newCreateConfigurationSet :: Text -> CreateConfigurationSet
newCreateConfigurationSet Text
pConfigurationSetName_ =
  CreateConfigurationSet'
    { $sel:clientToken:CreateConfigurationSet' :: Maybe Text
clientToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateConfigurationSet' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:configurationSetName:CreateConfigurationSet' :: Text
configurationSetName = Text
pConfigurationSetName_
    }

-- | 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.
createConfigurationSet_clientToken :: Lens.Lens' CreateConfigurationSet (Prelude.Maybe Prelude.Text)
createConfigurationSet_clientToken :: Lens' CreateConfigurationSet (Maybe Text)
createConfigurationSet_clientToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConfigurationSet' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:CreateConfigurationSet' :: CreateConfigurationSet -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: CreateConfigurationSet
s@CreateConfigurationSet' {} Maybe Text
a -> CreateConfigurationSet
s {$sel:clientToken:CreateConfigurationSet' :: Maybe Text
clientToken = Maybe Text
a} :: CreateConfigurationSet)

-- | An array of key and value pair tags that\'s associated with the new
-- configuration set.
createConfigurationSet_tags :: Lens.Lens' CreateConfigurationSet (Prelude.Maybe [Tag])
createConfigurationSet_tags :: Lens' CreateConfigurationSet (Maybe [Tag])
createConfigurationSet_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConfigurationSet' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateConfigurationSet' :: CreateConfigurationSet -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateConfigurationSet
s@CreateConfigurationSet' {} Maybe [Tag]
a -> CreateConfigurationSet
s {$sel:tags:CreateConfigurationSet' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateConfigurationSet) 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 to use for the new configuration set.
createConfigurationSet_configurationSetName :: Lens.Lens' CreateConfigurationSet Prelude.Text
createConfigurationSet_configurationSetName :: Lens' CreateConfigurationSet Text
createConfigurationSet_configurationSetName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConfigurationSet' {Text
configurationSetName :: Text
$sel:configurationSetName:CreateConfigurationSet' :: CreateConfigurationSet -> Text
configurationSetName} -> Text
configurationSetName) (\s :: CreateConfigurationSet
s@CreateConfigurationSet' {} Text
a -> CreateConfigurationSet
s {$sel:configurationSetName:CreateConfigurationSet' :: Text
configurationSetName = Text
a} :: CreateConfigurationSet)

instance Core.AWSRequest CreateConfigurationSet where
  type
    AWSResponse CreateConfigurationSet =
      CreateConfigurationSetResponse
  request :: (Service -> Service)
-> CreateConfigurationSet -> Request CreateConfigurationSet
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 CreateConfigurationSet
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateConfigurationSet)))
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
-> Maybe POSIX
-> Maybe [Tag]
-> Int
-> CreateConfigurationSetResponse
CreateConfigurationSetResponse'
            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
"ConfigurationSetArn")
            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
"ConfigurationSetName")
            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
"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
"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 CreateConfigurationSet where
  hashWithSalt :: Int -> CreateConfigurationSet -> Int
hashWithSalt Int
_salt CreateConfigurationSet' {Maybe [Tag]
Maybe Text
Text
configurationSetName :: Text
tags :: Maybe [Tag]
clientToken :: Maybe Text
$sel:configurationSetName:CreateConfigurationSet' :: CreateConfigurationSet -> Text
$sel:tags:CreateConfigurationSet' :: CreateConfigurationSet -> Maybe [Tag]
$sel:clientToken:CreateConfigurationSet' :: CreateConfigurationSet -> 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
configurationSetName

instance Prelude.NFData CreateConfigurationSet where
  rnf :: CreateConfigurationSet -> ()
rnf CreateConfigurationSet' {Maybe [Tag]
Maybe Text
Text
configurationSetName :: Text
tags :: Maybe [Tag]
clientToken :: Maybe Text
$sel:configurationSetName:CreateConfigurationSet' :: CreateConfigurationSet -> Text
$sel:tags:CreateConfigurationSet' :: CreateConfigurationSet -> Maybe [Tag]
$sel:clientToken:CreateConfigurationSet' :: CreateConfigurationSet -> 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
configurationSetName

instance Data.ToHeaders CreateConfigurationSet where
  toHeaders :: CreateConfigurationSet -> 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.CreateConfigurationSet" ::
                          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 CreateConfigurationSet where
  toJSON :: CreateConfigurationSet -> Value
toJSON CreateConfigurationSet' {Maybe [Tag]
Maybe Text
Text
configurationSetName :: Text
tags :: Maybe [Tag]
clientToken :: Maybe Text
$sel:configurationSetName:CreateConfigurationSet' :: CreateConfigurationSet -> Text
$sel:tags:CreateConfigurationSet' :: CreateConfigurationSet -> Maybe [Tag]
$sel:clientToken:CreateConfigurationSet' :: CreateConfigurationSet -> 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
"ConfigurationSetName"
                  forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
configurationSetName
              )
          ]
      )

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

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

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

-- |
-- Create a value of 'CreateConfigurationSetResponse' 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:
--
-- 'configurationSetArn', 'createConfigurationSetResponse_configurationSetArn' - The Amazon Resource Name (ARN) of the newly created configuration set.
--
-- 'configurationSetName', 'createConfigurationSetResponse_configurationSetName' - The name of the new configuration set.
--
-- 'createdTimestamp', 'createConfigurationSetResponse_createdTimestamp' - The time when the configuration set was created, in
-- <https://www.epochconverter.com/ UNIX epoch time> format.
--
-- 'tags', 'createConfigurationSetResponse_tags' - An array of key and value pair tags that\'s associated with the
-- configuration set.
--
-- 'httpStatus', 'createConfigurationSetResponse_httpStatus' - The response's http status code.
newCreateConfigurationSetResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateConfigurationSetResponse
newCreateConfigurationSetResponse :: Int -> CreateConfigurationSetResponse
newCreateConfigurationSetResponse Int
pHttpStatus_ =
  CreateConfigurationSetResponse'
    { $sel:configurationSetArn:CreateConfigurationSetResponse' :: Maybe Text
configurationSetArn =
        forall a. Maybe a
Prelude.Nothing,
      $sel:configurationSetName:CreateConfigurationSetResponse' :: Maybe Text
configurationSetName = forall a. Maybe a
Prelude.Nothing,
      $sel:createdTimestamp:CreateConfigurationSetResponse' :: Maybe POSIX
createdTimestamp = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateConfigurationSetResponse' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateConfigurationSetResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The Amazon Resource Name (ARN) of the newly created configuration set.
createConfigurationSetResponse_configurationSetArn :: Lens.Lens' CreateConfigurationSetResponse (Prelude.Maybe Prelude.Text)
createConfigurationSetResponse_configurationSetArn :: Lens' CreateConfigurationSetResponse (Maybe Text)
createConfigurationSetResponse_configurationSetArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConfigurationSetResponse' {Maybe Text
configurationSetArn :: Maybe Text
$sel:configurationSetArn:CreateConfigurationSetResponse' :: CreateConfigurationSetResponse -> Maybe Text
configurationSetArn} -> Maybe Text
configurationSetArn) (\s :: CreateConfigurationSetResponse
s@CreateConfigurationSetResponse' {} Maybe Text
a -> CreateConfigurationSetResponse
s {$sel:configurationSetArn:CreateConfigurationSetResponse' :: Maybe Text
configurationSetArn = Maybe Text
a} :: CreateConfigurationSetResponse)

-- | The name of the new configuration set.
createConfigurationSetResponse_configurationSetName :: Lens.Lens' CreateConfigurationSetResponse (Prelude.Maybe Prelude.Text)
createConfigurationSetResponse_configurationSetName :: Lens' CreateConfigurationSetResponse (Maybe Text)
createConfigurationSetResponse_configurationSetName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConfigurationSetResponse' {Maybe Text
configurationSetName :: Maybe Text
$sel:configurationSetName:CreateConfigurationSetResponse' :: CreateConfigurationSetResponse -> Maybe Text
configurationSetName} -> Maybe Text
configurationSetName) (\s :: CreateConfigurationSetResponse
s@CreateConfigurationSetResponse' {} Maybe Text
a -> CreateConfigurationSetResponse
s {$sel:configurationSetName:CreateConfigurationSetResponse' :: Maybe Text
configurationSetName = Maybe Text
a} :: CreateConfigurationSetResponse)

-- | The time when the configuration set was created, in
-- <https://www.epochconverter.com/ UNIX epoch time> format.
createConfigurationSetResponse_createdTimestamp :: Lens.Lens' CreateConfigurationSetResponse (Prelude.Maybe Prelude.UTCTime)
createConfigurationSetResponse_createdTimestamp :: Lens' CreateConfigurationSetResponse (Maybe UTCTime)
createConfigurationSetResponse_createdTimestamp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConfigurationSetResponse' {Maybe POSIX
createdTimestamp :: Maybe POSIX
$sel:createdTimestamp:CreateConfigurationSetResponse' :: CreateConfigurationSetResponse -> Maybe POSIX
createdTimestamp} -> Maybe POSIX
createdTimestamp) (\s :: CreateConfigurationSetResponse
s@CreateConfigurationSetResponse' {} Maybe POSIX
a -> CreateConfigurationSetResponse
s {$sel:createdTimestamp:CreateConfigurationSetResponse' :: Maybe POSIX
createdTimestamp = Maybe POSIX
a} :: CreateConfigurationSetResponse) 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

-- | An array of key and value pair tags that\'s associated with the
-- configuration set.
createConfigurationSetResponse_tags :: Lens.Lens' CreateConfigurationSetResponse (Prelude.Maybe [Tag])
createConfigurationSetResponse_tags :: Lens' CreateConfigurationSetResponse (Maybe [Tag])
createConfigurationSetResponse_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConfigurationSetResponse' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateConfigurationSetResponse' :: CreateConfigurationSetResponse -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateConfigurationSetResponse
s@CreateConfigurationSetResponse' {} Maybe [Tag]
a -> CreateConfigurationSetResponse
s {$sel:tags:CreateConfigurationSetResponse' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateConfigurationSetResponse) 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.
createConfigurationSetResponse_httpStatus :: Lens.Lens' CreateConfigurationSetResponse Prelude.Int
createConfigurationSetResponse_httpStatus :: Lens' CreateConfigurationSetResponse Int
createConfigurationSetResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConfigurationSetResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateConfigurationSetResponse' :: CreateConfigurationSetResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateConfigurationSetResponse
s@CreateConfigurationSetResponse' {} Int
a -> CreateConfigurationSetResponse
s {$sel:httpStatus:CreateConfigurationSetResponse' :: Int
httpStatus = Int
a} :: CreateConfigurationSetResponse)

instance
  Prelude.NFData
    CreateConfigurationSetResponse
  where
  rnf :: CreateConfigurationSetResponse -> ()
rnf CreateConfigurationSetResponse' {Int
Maybe [Tag]
Maybe Text
Maybe POSIX
httpStatus :: Int
tags :: Maybe [Tag]
createdTimestamp :: Maybe POSIX
configurationSetName :: Maybe Text
configurationSetArn :: Maybe Text
$sel:httpStatus:CreateConfigurationSetResponse' :: CreateConfigurationSetResponse -> Int
$sel:tags:CreateConfigurationSetResponse' :: CreateConfigurationSetResponse -> Maybe [Tag]
$sel:createdTimestamp:CreateConfigurationSetResponse' :: CreateConfigurationSetResponse -> Maybe POSIX
$sel:configurationSetName:CreateConfigurationSetResponse' :: CreateConfigurationSetResponse -> Maybe Text
$sel:configurationSetArn:CreateConfigurationSetResponse' :: CreateConfigurationSetResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
configurationSetArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
configurationSetName
      seq :: forall a b. a -> b -> b
`Prelude.seq` 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 [Tag]
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus