{-# 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.WAFRegional.CreateWebACLMigrationStack
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates an AWS CloudFormation WAFV2 template for the specified web ACL
-- in the specified Amazon S3 bucket. Then, in CloudFormation, you create a
-- stack from the template, to create the web ACL and its resources in AWS
-- WAFV2. Use this to migrate your AWS WAF Classic web ACL to the latest
-- version of AWS WAF.
--
-- This is part of a larger migration procedure for web ACLs from AWS WAF
-- Classic to the latest version of AWS WAF. For the full procedure,
-- including caveats and manual steps to complete the migration and switch
-- over to the new web ACL, see
-- <https://docs.aws.amazon.com/waf/latest/developerguide/waf-migrating-from-classic.html Migrating your AWS WAF Classic resources to AWS WAF>
-- in the
-- <https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html AWS WAF Developer Guide>.
module Amazonka.WAFRegional.CreateWebACLMigrationStack
  ( -- * Creating a Request
    CreateWebACLMigrationStack (..),
    newCreateWebACLMigrationStack,

    -- * Request Lenses
    createWebACLMigrationStack_webACLId,
    createWebACLMigrationStack_s3BucketName,
    createWebACLMigrationStack_ignoreUnsupportedType,

    -- * Destructuring the Response
    CreateWebACLMigrationStackResponse (..),
    newCreateWebACLMigrationStackResponse,

    -- * Response Lenses
    createWebACLMigrationStackResponse_httpStatus,
    createWebACLMigrationStackResponse_s3ObjectUrl,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.WAFRegional.Types

-- | /See:/ 'newCreateWebACLMigrationStack' smart constructor.
data CreateWebACLMigrationStack = CreateWebACLMigrationStack'
  { -- | The UUID of the WAF Classic web ACL that you want to migrate to WAF v2.
    CreateWebACLMigrationStack -> Text
webACLId :: Prelude.Text,
    -- | The name of the Amazon S3 bucket to store the CloudFormation template
    -- in. The S3 bucket must be configured as follows for the migration:
    --
    -- -   The bucket name must start with @aws-waf-migration-@. For example,
    --     @aws-waf-migration-my-web-acl@.
    --
    -- -   The bucket must be in the Region where you are deploying the
    --     template. For example, for a web ACL in us-west-2, you must use an
    --     Amazon S3 bucket in us-west-2 and you must deploy the template stack
    --     to us-west-2.
    --
    -- -   The bucket policies must permit the migration process to write data.
    --     For listings of the bucket policies, see the Examples section.
    CreateWebACLMigrationStack -> Text
s3BucketName :: Prelude.Text,
    -- | Indicates whether to exclude entities that can\'t be migrated or to stop
    -- the migration. Set this to true to ignore unsupported entities in the
    -- web ACL during the migration. Otherwise, if AWS WAF encounters
    -- unsupported entities, it stops the process and throws an exception.
    CreateWebACLMigrationStack -> Bool
ignoreUnsupportedType :: Prelude.Bool
  }
  deriving (CreateWebACLMigrationStack -> CreateWebACLMigrationStack -> Bool
(CreateWebACLMigrationStack -> CreateWebACLMigrationStack -> Bool)
-> (CreateWebACLMigrationStack
    -> CreateWebACLMigrationStack -> Bool)
-> Eq CreateWebACLMigrationStack
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateWebACLMigrationStack -> CreateWebACLMigrationStack -> Bool
$c/= :: CreateWebACLMigrationStack -> CreateWebACLMigrationStack -> Bool
== :: CreateWebACLMigrationStack -> CreateWebACLMigrationStack -> Bool
$c== :: CreateWebACLMigrationStack -> CreateWebACLMigrationStack -> Bool
Prelude.Eq, ReadPrec [CreateWebACLMigrationStack]
ReadPrec CreateWebACLMigrationStack
Int -> ReadS CreateWebACLMigrationStack
ReadS [CreateWebACLMigrationStack]
(Int -> ReadS CreateWebACLMigrationStack)
-> ReadS [CreateWebACLMigrationStack]
-> ReadPrec CreateWebACLMigrationStack
-> ReadPrec [CreateWebACLMigrationStack]
-> Read CreateWebACLMigrationStack
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateWebACLMigrationStack]
$creadListPrec :: ReadPrec [CreateWebACLMigrationStack]
readPrec :: ReadPrec CreateWebACLMigrationStack
$creadPrec :: ReadPrec CreateWebACLMigrationStack
readList :: ReadS [CreateWebACLMigrationStack]
$creadList :: ReadS [CreateWebACLMigrationStack]
readsPrec :: Int -> ReadS CreateWebACLMigrationStack
$creadsPrec :: Int -> ReadS CreateWebACLMigrationStack
Prelude.Read, Int -> CreateWebACLMigrationStack -> ShowS
[CreateWebACLMigrationStack] -> ShowS
CreateWebACLMigrationStack -> String
(Int -> CreateWebACLMigrationStack -> ShowS)
-> (CreateWebACLMigrationStack -> String)
-> ([CreateWebACLMigrationStack] -> ShowS)
-> Show CreateWebACLMigrationStack
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateWebACLMigrationStack] -> ShowS
$cshowList :: [CreateWebACLMigrationStack] -> ShowS
show :: CreateWebACLMigrationStack -> String
$cshow :: CreateWebACLMigrationStack -> String
showsPrec :: Int -> CreateWebACLMigrationStack -> ShowS
$cshowsPrec :: Int -> CreateWebACLMigrationStack -> ShowS
Prelude.Show, (forall x.
 CreateWebACLMigrationStack -> Rep CreateWebACLMigrationStack x)
-> (forall x.
    Rep CreateWebACLMigrationStack x -> CreateWebACLMigrationStack)
-> Generic CreateWebACLMigrationStack
forall x.
Rep CreateWebACLMigrationStack x -> CreateWebACLMigrationStack
forall x.
CreateWebACLMigrationStack -> Rep CreateWebACLMigrationStack x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateWebACLMigrationStack x -> CreateWebACLMigrationStack
$cfrom :: forall x.
CreateWebACLMigrationStack -> Rep CreateWebACLMigrationStack x
Prelude.Generic)

-- |
-- Create a value of 'CreateWebACLMigrationStack' 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:
--
-- 'webACLId', 'createWebACLMigrationStack_webACLId' - The UUID of the WAF Classic web ACL that you want to migrate to WAF v2.
--
-- 's3BucketName', 'createWebACLMigrationStack_s3BucketName' - The name of the Amazon S3 bucket to store the CloudFormation template
-- in. The S3 bucket must be configured as follows for the migration:
--
-- -   The bucket name must start with @aws-waf-migration-@. For example,
--     @aws-waf-migration-my-web-acl@.
--
-- -   The bucket must be in the Region where you are deploying the
--     template. For example, for a web ACL in us-west-2, you must use an
--     Amazon S3 bucket in us-west-2 and you must deploy the template stack
--     to us-west-2.
--
-- -   The bucket policies must permit the migration process to write data.
--     For listings of the bucket policies, see the Examples section.
--
-- 'ignoreUnsupportedType', 'createWebACLMigrationStack_ignoreUnsupportedType' - Indicates whether to exclude entities that can\'t be migrated or to stop
-- the migration. Set this to true to ignore unsupported entities in the
-- web ACL during the migration. Otherwise, if AWS WAF encounters
-- unsupported entities, it stops the process and throws an exception.
newCreateWebACLMigrationStack ::
  -- | 'webACLId'
  Prelude.Text ->
  -- | 's3BucketName'
  Prelude.Text ->
  -- | 'ignoreUnsupportedType'
  Prelude.Bool ->
  CreateWebACLMigrationStack
newCreateWebACLMigrationStack :: Text -> Text -> Bool -> CreateWebACLMigrationStack
newCreateWebACLMigrationStack
  Text
pWebACLId_
  Text
pS3BucketName_
  Bool
pIgnoreUnsupportedType_ =
    CreateWebACLMigrationStack' :: Text -> Text -> Bool -> CreateWebACLMigrationStack
CreateWebACLMigrationStack'
      { $sel:webACLId:CreateWebACLMigrationStack' :: Text
webACLId = Text
pWebACLId_,
        $sel:s3BucketName:CreateWebACLMigrationStack' :: Text
s3BucketName = Text
pS3BucketName_,
        $sel:ignoreUnsupportedType:CreateWebACLMigrationStack' :: Bool
ignoreUnsupportedType = Bool
pIgnoreUnsupportedType_
      }

-- | The UUID of the WAF Classic web ACL that you want to migrate to WAF v2.
createWebACLMigrationStack_webACLId :: Lens.Lens' CreateWebACLMigrationStack Prelude.Text
createWebACLMigrationStack_webACLId :: (Text -> f Text)
-> CreateWebACLMigrationStack -> f CreateWebACLMigrationStack
createWebACLMigrationStack_webACLId = (CreateWebACLMigrationStack -> Text)
-> (CreateWebACLMigrationStack
    -> Text -> CreateWebACLMigrationStack)
-> Lens
     CreateWebACLMigrationStack CreateWebACLMigrationStack Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWebACLMigrationStack' {Text
webACLId :: Text
$sel:webACLId:CreateWebACLMigrationStack' :: CreateWebACLMigrationStack -> Text
webACLId} -> Text
webACLId) (\s :: CreateWebACLMigrationStack
s@CreateWebACLMigrationStack' {} Text
a -> CreateWebACLMigrationStack
s {$sel:webACLId:CreateWebACLMigrationStack' :: Text
webACLId = Text
a} :: CreateWebACLMigrationStack)

-- | The name of the Amazon S3 bucket to store the CloudFormation template
-- in. The S3 bucket must be configured as follows for the migration:
--
-- -   The bucket name must start with @aws-waf-migration-@. For example,
--     @aws-waf-migration-my-web-acl@.
--
-- -   The bucket must be in the Region where you are deploying the
--     template. For example, for a web ACL in us-west-2, you must use an
--     Amazon S3 bucket in us-west-2 and you must deploy the template stack
--     to us-west-2.
--
-- -   The bucket policies must permit the migration process to write data.
--     For listings of the bucket policies, see the Examples section.
createWebACLMigrationStack_s3BucketName :: Lens.Lens' CreateWebACLMigrationStack Prelude.Text
createWebACLMigrationStack_s3BucketName :: (Text -> f Text)
-> CreateWebACLMigrationStack -> f CreateWebACLMigrationStack
createWebACLMigrationStack_s3BucketName = (CreateWebACLMigrationStack -> Text)
-> (CreateWebACLMigrationStack
    -> Text -> CreateWebACLMigrationStack)
-> Lens
     CreateWebACLMigrationStack CreateWebACLMigrationStack Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWebACLMigrationStack' {Text
s3BucketName :: Text
$sel:s3BucketName:CreateWebACLMigrationStack' :: CreateWebACLMigrationStack -> Text
s3BucketName} -> Text
s3BucketName) (\s :: CreateWebACLMigrationStack
s@CreateWebACLMigrationStack' {} Text
a -> CreateWebACLMigrationStack
s {$sel:s3BucketName:CreateWebACLMigrationStack' :: Text
s3BucketName = Text
a} :: CreateWebACLMigrationStack)

-- | Indicates whether to exclude entities that can\'t be migrated or to stop
-- the migration. Set this to true to ignore unsupported entities in the
-- web ACL during the migration. Otherwise, if AWS WAF encounters
-- unsupported entities, it stops the process and throws an exception.
createWebACLMigrationStack_ignoreUnsupportedType :: Lens.Lens' CreateWebACLMigrationStack Prelude.Bool
createWebACLMigrationStack_ignoreUnsupportedType :: (Bool -> f Bool)
-> CreateWebACLMigrationStack -> f CreateWebACLMigrationStack
createWebACLMigrationStack_ignoreUnsupportedType = (CreateWebACLMigrationStack -> Bool)
-> (CreateWebACLMigrationStack
    -> Bool -> CreateWebACLMigrationStack)
-> Lens
     CreateWebACLMigrationStack CreateWebACLMigrationStack Bool Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWebACLMigrationStack' {Bool
ignoreUnsupportedType :: Bool
$sel:ignoreUnsupportedType:CreateWebACLMigrationStack' :: CreateWebACLMigrationStack -> Bool
ignoreUnsupportedType} -> Bool
ignoreUnsupportedType) (\s :: CreateWebACLMigrationStack
s@CreateWebACLMigrationStack' {} Bool
a -> CreateWebACLMigrationStack
s {$sel:ignoreUnsupportedType:CreateWebACLMigrationStack' :: Bool
ignoreUnsupportedType = Bool
a} :: CreateWebACLMigrationStack)

instance Core.AWSRequest CreateWebACLMigrationStack where
  type
    AWSResponse CreateWebACLMigrationStack =
      CreateWebACLMigrationStackResponse
  request :: CreateWebACLMigrationStack -> Request CreateWebACLMigrationStack
request = Service
-> CreateWebACLMigrationStack -> Request CreateWebACLMigrationStack
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateWebACLMigrationStack
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateWebACLMigrationStack)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreateWebACLMigrationStack))
-> Logger
-> Service
-> Proxy CreateWebACLMigrationStack
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateWebACLMigrationStack)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Int -> Text -> CreateWebACLMigrationStackResponse
CreateWebACLMigrationStackResponse'
            (Int -> Text -> CreateWebACLMigrationStackResponse)
-> Either String Int
-> Either String (Text -> CreateWebACLMigrationStackResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
            Either String (Text -> CreateWebACLMigrationStackResponse)
-> Either String Text
-> Either String CreateWebACLMigrationStackResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"S3ObjectUrl")
      )

instance Prelude.Hashable CreateWebACLMigrationStack

instance Prelude.NFData CreateWebACLMigrationStack

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

instance Core.ToJSON CreateWebACLMigrationStack where
  toJSON :: CreateWebACLMigrationStack -> Value
toJSON CreateWebACLMigrationStack' {Bool
Text
ignoreUnsupportedType :: Bool
s3BucketName :: Text
webACLId :: Text
$sel:ignoreUnsupportedType:CreateWebACLMigrationStack' :: CreateWebACLMigrationStack -> Bool
$sel:s3BucketName:CreateWebACLMigrationStack' :: CreateWebACLMigrationStack -> Text
$sel:webACLId:CreateWebACLMigrationStack' :: CreateWebACLMigrationStack -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"WebACLId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
webACLId),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"S3BucketName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
s3BucketName),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"IgnoreUnsupportedType"
                  Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Bool
ignoreUnsupportedType
              )
          ]
      )

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

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

-- | /See:/ 'newCreateWebACLMigrationStackResponse' smart constructor.
data CreateWebACLMigrationStackResponse = CreateWebACLMigrationStackResponse'
  { -- | The response's http status code.
    CreateWebACLMigrationStackResponse -> Int
httpStatus :: Prelude.Int,
    -- | The URL of the template created in Amazon S3.
    CreateWebACLMigrationStackResponse -> Text
s3ObjectUrl :: Prelude.Text
  }
  deriving (CreateWebACLMigrationStackResponse
-> CreateWebACLMigrationStackResponse -> Bool
(CreateWebACLMigrationStackResponse
 -> CreateWebACLMigrationStackResponse -> Bool)
-> (CreateWebACLMigrationStackResponse
    -> CreateWebACLMigrationStackResponse -> Bool)
-> Eq CreateWebACLMigrationStackResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateWebACLMigrationStackResponse
-> CreateWebACLMigrationStackResponse -> Bool
$c/= :: CreateWebACLMigrationStackResponse
-> CreateWebACLMigrationStackResponse -> Bool
== :: CreateWebACLMigrationStackResponse
-> CreateWebACLMigrationStackResponse -> Bool
$c== :: CreateWebACLMigrationStackResponse
-> CreateWebACLMigrationStackResponse -> Bool
Prelude.Eq, ReadPrec [CreateWebACLMigrationStackResponse]
ReadPrec CreateWebACLMigrationStackResponse
Int -> ReadS CreateWebACLMigrationStackResponse
ReadS [CreateWebACLMigrationStackResponse]
(Int -> ReadS CreateWebACLMigrationStackResponse)
-> ReadS [CreateWebACLMigrationStackResponse]
-> ReadPrec CreateWebACLMigrationStackResponse
-> ReadPrec [CreateWebACLMigrationStackResponse]
-> Read CreateWebACLMigrationStackResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateWebACLMigrationStackResponse]
$creadListPrec :: ReadPrec [CreateWebACLMigrationStackResponse]
readPrec :: ReadPrec CreateWebACLMigrationStackResponse
$creadPrec :: ReadPrec CreateWebACLMigrationStackResponse
readList :: ReadS [CreateWebACLMigrationStackResponse]
$creadList :: ReadS [CreateWebACLMigrationStackResponse]
readsPrec :: Int -> ReadS CreateWebACLMigrationStackResponse
$creadsPrec :: Int -> ReadS CreateWebACLMigrationStackResponse
Prelude.Read, Int -> CreateWebACLMigrationStackResponse -> ShowS
[CreateWebACLMigrationStackResponse] -> ShowS
CreateWebACLMigrationStackResponse -> String
(Int -> CreateWebACLMigrationStackResponse -> ShowS)
-> (CreateWebACLMigrationStackResponse -> String)
-> ([CreateWebACLMigrationStackResponse] -> ShowS)
-> Show CreateWebACLMigrationStackResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateWebACLMigrationStackResponse] -> ShowS
$cshowList :: [CreateWebACLMigrationStackResponse] -> ShowS
show :: CreateWebACLMigrationStackResponse -> String
$cshow :: CreateWebACLMigrationStackResponse -> String
showsPrec :: Int -> CreateWebACLMigrationStackResponse -> ShowS
$cshowsPrec :: Int -> CreateWebACLMigrationStackResponse -> ShowS
Prelude.Show, (forall x.
 CreateWebACLMigrationStackResponse
 -> Rep CreateWebACLMigrationStackResponse x)
-> (forall x.
    Rep CreateWebACLMigrationStackResponse x
    -> CreateWebACLMigrationStackResponse)
-> Generic CreateWebACLMigrationStackResponse
forall x.
Rep CreateWebACLMigrationStackResponse x
-> CreateWebACLMigrationStackResponse
forall x.
CreateWebACLMigrationStackResponse
-> Rep CreateWebACLMigrationStackResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateWebACLMigrationStackResponse x
-> CreateWebACLMigrationStackResponse
$cfrom :: forall x.
CreateWebACLMigrationStackResponse
-> Rep CreateWebACLMigrationStackResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateWebACLMigrationStackResponse' 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:
--
-- 'httpStatus', 'createWebACLMigrationStackResponse_httpStatus' - The response's http status code.
--
-- 's3ObjectUrl', 'createWebACLMigrationStackResponse_s3ObjectUrl' - The URL of the template created in Amazon S3.
newCreateWebACLMigrationStackResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 's3ObjectUrl'
  Prelude.Text ->
  CreateWebACLMigrationStackResponse
newCreateWebACLMigrationStackResponse :: Int -> Text -> CreateWebACLMigrationStackResponse
newCreateWebACLMigrationStackResponse
  Int
pHttpStatus_
  Text
pS3ObjectUrl_ =
    CreateWebACLMigrationStackResponse' :: Int -> Text -> CreateWebACLMigrationStackResponse
CreateWebACLMigrationStackResponse'
      { $sel:httpStatus:CreateWebACLMigrationStackResponse' :: Int
httpStatus =
          Int
pHttpStatus_,
        $sel:s3ObjectUrl:CreateWebACLMigrationStackResponse' :: Text
s3ObjectUrl = Text
pS3ObjectUrl_
      }

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

-- | The URL of the template created in Amazon S3.
createWebACLMigrationStackResponse_s3ObjectUrl :: Lens.Lens' CreateWebACLMigrationStackResponse Prelude.Text
createWebACLMigrationStackResponse_s3ObjectUrl :: (Text -> f Text)
-> CreateWebACLMigrationStackResponse
-> f CreateWebACLMigrationStackResponse
createWebACLMigrationStackResponse_s3ObjectUrl = (CreateWebACLMigrationStackResponse -> Text)
-> (CreateWebACLMigrationStackResponse
    -> Text -> CreateWebACLMigrationStackResponse)
-> Lens
     CreateWebACLMigrationStackResponse
     CreateWebACLMigrationStackResponse
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateWebACLMigrationStackResponse' {Text
s3ObjectUrl :: Text
$sel:s3ObjectUrl:CreateWebACLMigrationStackResponse' :: CreateWebACLMigrationStackResponse -> Text
s3ObjectUrl} -> Text
s3ObjectUrl) (\s :: CreateWebACLMigrationStackResponse
s@CreateWebACLMigrationStackResponse' {} Text
a -> CreateWebACLMigrationStackResponse
s {$sel:s3ObjectUrl:CreateWebACLMigrationStackResponse' :: Text
s3ObjectUrl = Text
a} :: CreateWebACLMigrationStackResponse)

instance
  Prelude.NFData
    CreateWebACLMigrationStackResponse