{-# 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.WAF.CreateSizeConstraintSet
-- 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)
--
-- This is __AWS WAF Classic__ documentation. For more information, see
-- <https://docs.aws.amazon.com/waf/latest/developerguide/classic-waf-chapter.html AWS WAF Classic>
-- in the developer guide.
--
-- __For the latest version of AWS WAF__, use the AWS WAFV2 API and see the
-- <https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html AWS WAF Developer Guide>.
-- With the latest version, AWS WAF has a single set of endpoints for
-- regional and global use.
--
-- Creates a @SizeConstraintSet@. You then use UpdateSizeConstraintSet to
-- identify the part of a web request that you want AWS WAF to check for
-- length, such as the length of the @User-Agent@ header or the length of
-- the query string. For example, you can create a @SizeConstraintSet@ that
-- matches any requests that have a query string that is longer than 100
-- bytes. You can then configure AWS WAF to reject those requests.
--
-- To create and configure a @SizeConstraintSet@, perform the following
-- steps:
--
-- 1.  Use GetChangeToken to get the change token that you provide in the
--     @ChangeToken@ parameter of a @CreateSizeConstraintSet@ request.
--
-- 2.  Submit a @CreateSizeConstraintSet@ request.
--
-- 3.  Use @GetChangeToken@ to get the change token that you provide in the
--     @ChangeToken@ parameter of an @UpdateSizeConstraintSet@ request.
--
-- 4.  Submit an UpdateSizeConstraintSet request to specify the part of the
--     request that you want AWS WAF to inspect (for example, the header or
--     the URI) and the value that you want AWS WAF to watch for.
--
-- For more information about how to use the AWS WAF API to allow or block
-- HTTP requests, see the
-- <https://docs.aws.amazon.com/waf/latest/developerguide/ AWS WAF Developer Guide>.
module Amazonka.WAF.CreateSizeConstraintSet
  ( -- * Creating a Request
    CreateSizeConstraintSet (..),
    newCreateSizeConstraintSet,

    -- * Request Lenses
    createSizeConstraintSet_name,
    createSizeConstraintSet_changeToken,

    -- * Destructuring the Response
    CreateSizeConstraintSetResponse (..),
    newCreateSizeConstraintSetResponse,

    -- * Response Lenses
    createSizeConstraintSetResponse_sizeConstraintSet,
    createSizeConstraintSetResponse_changeToken,
    createSizeConstraintSetResponse_httpStatus,
  )
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.WAF.Types

-- | /See:/ 'newCreateSizeConstraintSet' smart constructor.
data CreateSizeConstraintSet = CreateSizeConstraintSet'
  { -- | A friendly name or description of the SizeConstraintSet. You can\'t
    -- change @Name@ after you create a @SizeConstraintSet@.
    CreateSizeConstraintSet -> Text
name :: Prelude.Text,
    -- | The value returned by the most recent call to GetChangeToken.
    CreateSizeConstraintSet -> Text
changeToken :: Prelude.Text
  }
  deriving (CreateSizeConstraintSet -> CreateSizeConstraintSet -> Bool
(CreateSizeConstraintSet -> CreateSizeConstraintSet -> Bool)
-> (CreateSizeConstraintSet -> CreateSizeConstraintSet -> Bool)
-> Eq CreateSizeConstraintSet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateSizeConstraintSet -> CreateSizeConstraintSet -> Bool
$c/= :: CreateSizeConstraintSet -> CreateSizeConstraintSet -> Bool
== :: CreateSizeConstraintSet -> CreateSizeConstraintSet -> Bool
$c== :: CreateSizeConstraintSet -> CreateSizeConstraintSet -> Bool
Prelude.Eq, ReadPrec [CreateSizeConstraintSet]
ReadPrec CreateSizeConstraintSet
Int -> ReadS CreateSizeConstraintSet
ReadS [CreateSizeConstraintSet]
(Int -> ReadS CreateSizeConstraintSet)
-> ReadS [CreateSizeConstraintSet]
-> ReadPrec CreateSizeConstraintSet
-> ReadPrec [CreateSizeConstraintSet]
-> Read CreateSizeConstraintSet
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateSizeConstraintSet]
$creadListPrec :: ReadPrec [CreateSizeConstraintSet]
readPrec :: ReadPrec CreateSizeConstraintSet
$creadPrec :: ReadPrec CreateSizeConstraintSet
readList :: ReadS [CreateSizeConstraintSet]
$creadList :: ReadS [CreateSizeConstraintSet]
readsPrec :: Int -> ReadS CreateSizeConstraintSet
$creadsPrec :: Int -> ReadS CreateSizeConstraintSet
Prelude.Read, Int -> CreateSizeConstraintSet -> ShowS
[CreateSizeConstraintSet] -> ShowS
CreateSizeConstraintSet -> String
(Int -> CreateSizeConstraintSet -> ShowS)
-> (CreateSizeConstraintSet -> String)
-> ([CreateSizeConstraintSet] -> ShowS)
-> Show CreateSizeConstraintSet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateSizeConstraintSet] -> ShowS
$cshowList :: [CreateSizeConstraintSet] -> ShowS
show :: CreateSizeConstraintSet -> String
$cshow :: CreateSizeConstraintSet -> String
showsPrec :: Int -> CreateSizeConstraintSet -> ShowS
$cshowsPrec :: Int -> CreateSizeConstraintSet -> ShowS
Prelude.Show, (forall x.
 CreateSizeConstraintSet -> Rep CreateSizeConstraintSet x)
-> (forall x.
    Rep CreateSizeConstraintSet x -> CreateSizeConstraintSet)
-> Generic CreateSizeConstraintSet
forall x. Rep CreateSizeConstraintSet x -> CreateSizeConstraintSet
forall x. CreateSizeConstraintSet -> Rep CreateSizeConstraintSet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateSizeConstraintSet x -> CreateSizeConstraintSet
$cfrom :: forall x. CreateSizeConstraintSet -> Rep CreateSizeConstraintSet x
Prelude.Generic)

-- |
-- Create a value of 'CreateSizeConstraintSet' 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:
--
-- 'name', 'createSizeConstraintSet_name' - A friendly name or description of the SizeConstraintSet. You can\'t
-- change @Name@ after you create a @SizeConstraintSet@.
--
-- 'changeToken', 'createSizeConstraintSet_changeToken' - The value returned by the most recent call to GetChangeToken.
newCreateSizeConstraintSet ::
  -- | 'name'
  Prelude.Text ->
  -- | 'changeToken'
  Prelude.Text ->
  CreateSizeConstraintSet
newCreateSizeConstraintSet :: Text -> Text -> CreateSizeConstraintSet
newCreateSizeConstraintSet Text
pName_ Text
pChangeToken_ =
  CreateSizeConstraintSet' :: Text -> Text -> CreateSizeConstraintSet
CreateSizeConstraintSet'
    { $sel:name:CreateSizeConstraintSet' :: Text
name = Text
pName_,
      $sel:changeToken:CreateSizeConstraintSet' :: Text
changeToken = Text
pChangeToken_
    }

-- | A friendly name or description of the SizeConstraintSet. You can\'t
-- change @Name@ after you create a @SizeConstraintSet@.
createSizeConstraintSet_name :: Lens.Lens' CreateSizeConstraintSet Prelude.Text
createSizeConstraintSet_name :: (Text -> f Text)
-> CreateSizeConstraintSet -> f CreateSizeConstraintSet
createSizeConstraintSet_name = (CreateSizeConstraintSet -> Text)
-> (CreateSizeConstraintSet -> Text -> CreateSizeConstraintSet)
-> Lens CreateSizeConstraintSet CreateSizeConstraintSet Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSizeConstraintSet' {Text
name :: Text
$sel:name:CreateSizeConstraintSet' :: CreateSizeConstraintSet -> Text
name} -> Text
name) (\s :: CreateSizeConstraintSet
s@CreateSizeConstraintSet' {} Text
a -> CreateSizeConstraintSet
s {$sel:name:CreateSizeConstraintSet' :: Text
name = Text
a} :: CreateSizeConstraintSet)

-- | The value returned by the most recent call to GetChangeToken.
createSizeConstraintSet_changeToken :: Lens.Lens' CreateSizeConstraintSet Prelude.Text
createSizeConstraintSet_changeToken :: (Text -> f Text)
-> CreateSizeConstraintSet -> f CreateSizeConstraintSet
createSizeConstraintSet_changeToken = (CreateSizeConstraintSet -> Text)
-> (CreateSizeConstraintSet -> Text -> CreateSizeConstraintSet)
-> Lens CreateSizeConstraintSet CreateSizeConstraintSet Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSizeConstraintSet' {Text
changeToken :: Text
$sel:changeToken:CreateSizeConstraintSet' :: CreateSizeConstraintSet -> Text
changeToken} -> Text
changeToken) (\s :: CreateSizeConstraintSet
s@CreateSizeConstraintSet' {} Text
a -> CreateSizeConstraintSet
s {$sel:changeToken:CreateSizeConstraintSet' :: Text
changeToken = Text
a} :: CreateSizeConstraintSet)

instance Core.AWSRequest CreateSizeConstraintSet where
  type
    AWSResponse CreateSizeConstraintSet =
      CreateSizeConstraintSetResponse
  request :: CreateSizeConstraintSet -> Request CreateSizeConstraintSet
request = Service
-> CreateSizeConstraintSet -> Request CreateSizeConstraintSet
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateSizeConstraintSet
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateSizeConstraintSet)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreateSizeConstraintSet))
-> Logger
-> Service
-> Proxy CreateSizeConstraintSet
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateSizeConstraintSet)))
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 ->
          Maybe SizeConstraintSet
-> Maybe Text -> Int -> CreateSizeConstraintSetResponse
CreateSizeConstraintSetResponse'
            (Maybe SizeConstraintSet
 -> Maybe Text -> Int -> CreateSizeConstraintSetResponse)
-> Either String (Maybe SizeConstraintSet)
-> Either
     String (Maybe Text -> Int -> CreateSizeConstraintSetResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe SizeConstraintSet)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"SizeConstraintSet")
            Either
  String (Maybe Text -> Int -> CreateSizeConstraintSetResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateSizeConstraintSetResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ChangeToken")
            Either String (Int -> CreateSizeConstraintSetResponse)
-> Either String Int
-> Either String CreateSizeConstraintSetResponse
forall (f :: * -> *) a b. Applicative f => 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))
      )

instance Prelude.Hashable CreateSizeConstraintSet

instance Prelude.NFData CreateSizeConstraintSet

instance Core.ToHeaders CreateSizeConstraintSet where
  toHeaders :: CreateSizeConstraintSet -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateSizeConstraintSet -> 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_20150824.CreateSizeConstraintSet" ::
                          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 CreateSizeConstraintSet where
  toJSON :: CreateSizeConstraintSet -> Value
toJSON CreateSizeConstraintSet' {Text
changeToken :: Text
name :: Text
$sel:changeToken:CreateSizeConstraintSet' :: CreateSizeConstraintSet -> Text
$sel:name:CreateSizeConstraintSet' :: CreateSizeConstraintSet -> 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
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ChangeToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
changeToken)
          ]
      )

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

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

-- | /See:/ 'newCreateSizeConstraintSetResponse' smart constructor.
data CreateSizeConstraintSetResponse = CreateSizeConstraintSetResponse'
  { -- | A SizeConstraintSet that contains no @SizeConstraint@ objects.
    CreateSizeConstraintSetResponse -> Maybe SizeConstraintSet
sizeConstraintSet :: Prelude.Maybe SizeConstraintSet,
    -- | The @ChangeToken@ that you used to submit the @CreateSizeConstraintSet@
    -- request. You can also use this value to query the status of the request.
    -- For more information, see GetChangeTokenStatus.
    CreateSizeConstraintSetResponse -> Maybe Text
changeToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    CreateSizeConstraintSetResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateSizeConstraintSetResponse
-> CreateSizeConstraintSetResponse -> Bool
(CreateSizeConstraintSetResponse
 -> CreateSizeConstraintSetResponse -> Bool)
-> (CreateSizeConstraintSetResponse
    -> CreateSizeConstraintSetResponse -> Bool)
-> Eq CreateSizeConstraintSetResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateSizeConstraintSetResponse
-> CreateSizeConstraintSetResponse -> Bool
$c/= :: CreateSizeConstraintSetResponse
-> CreateSizeConstraintSetResponse -> Bool
== :: CreateSizeConstraintSetResponse
-> CreateSizeConstraintSetResponse -> Bool
$c== :: CreateSizeConstraintSetResponse
-> CreateSizeConstraintSetResponse -> Bool
Prelude.Eq, ReadPrec [CreateSizeConstraintSetResponse]
ReadPrec CreateSizeConstraintSetResponse
Int -> ReadS CreateSizeConstraintSetResponse
ReadS [CreateSizeConstraintSetResponse]
(Int -> ReadS CreateSizeConstraintSetResponse)
-> ReadS [CreateSizeConstraintSetResponse]
-> ReadPrec CreateSizeConstraintSetResponse
-> ReadPrec [CreateSizeConstraintSetResponse]
-> Read CreateSizeConstraintSetResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateSizeConstraintSetResponse]
$creadListPrec :: ReadPrec [CreateSizeConstraintSetResponse]
readPrec :: ReadPrec CreateSizeConstraintSetResponse
$creadPrec :: ReadPrec CreateSizeConstraintSetResponse
readList :: ReadS [CreateSizeConstraintSetResponse]
$creadList :: ReadS [CreateSizeConstraintSetResponse]
readsPrec :: Int -> ReadS CreateSizeConstraintSetResponse
$creadsPrec :: Int -> ReadS CreateSizeConstraintSetResponse
Prelude.Read, Int -> CreateSizeConstraintSetResponse -> ShowS
[CreateSizeConstraintSetResponse] -> ShowS
CreateSizeConstraintSetResponse -> String
(Int -> CreateSizeConstraintSetResponse -> ShowS)
-> (CreateSizeConstraintSetResponse -> String)
-> ([CreateSizeConstraintSetResponse] -> ShowS)
-> Show CreateSizeConstraintSetResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateSizeConstraintSetResponse] -> ShowS
$cshowList :: [CreateSizeConstraintSetResponse] -> ShowS
show :: CreateSizeConstraintSetResponse -> String
$cshow :: CreateSizeConstraintSetResponse -> String
showsPrec :: Int -> CreateSizeConstraintSetResponse -> ShowS
$cshowsPrec :: Int -> CreateSizeConstraintSetResponse -> ShowS
Prelude.Show, (forall x.
 CreateSizeConstraintSetResponse
 -> Rep CreateSizeConstraintSetResponse x)
-> (forall x.
    Rep CreateSizeConstraintSetResponse x
    -> CreateSizeConstraintSetResponse)
-> Generic CreateSizeConstraintSetResponse
forall x.
Rep CreateSizeConstraintSetResponse x
-> CreateSizeConstraintSetResponse
forall x.
CreateSizeConstraintSetResponse
-> Rep CreateSizeConstraintSetResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateSizeConstraintSetResponse x
-> CreateSizeConstraintSetResponse
$cfrom :: forall x.
CreateSizeConstraintSetResponse
-> Rep CreateSizeConstraintSetResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateSizeConstraintSetResponse' 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:
--
-- 'sizeConstraintSet', 'createSizeConstraintSetResponse_sizeConstraintSet' - A SizeConstraintSet that contains no @SizeConstraint@ objects.
--
-- 'changeToken', 'createSizeConstraintSetResponse_changeToken' - The @ChangeToken@ that you used to submit the @CreateSizeConstraintSet@
-- request. You can also use this value to query the status of the request.
-- For more information, see GetChangeTokenStatus.
--
-- 'httpStatus', 'createSizeConstraintSetResponse_httpStatus' - The response's http status code.
newCreateSizeConstraintSetResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateSizeConstraintSetResponse
newCreateSizeConstraintSetResponse :: Int -> CreateSizeConstraintSetResponse
newCreateSizeConstraintSetResponse Int
pHttpStatus_ =
  CreateSizeConstraintSetResponse' :: Maybe SizeConstraintSet
-> Maybe Text -> Int -> CreateSizeConstraintSetResponse
CreateSizeConstraintSetResponse'
    { $sel:sizeConstraintSet:CreateSizeConstraintSetResponse' :: Maybe SizeConstraintSet
sizeConstraintSet =
        Maybe SizeConstraintSet
forall a. Maybe a
Prelude.Nothing,
      $sel:changeToken:CreateSizeConstraintSetResponse' :: Maybe Text
changeToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateSizeConstraintSetResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A SizeConstraintSet that contains no @SizeConstraint@ objects.
createSizeConstraintSetResponse_sizeConstraintSet :: Lens.Lens' CreateSizeConstraintSetResponse (Prelude.Maybe SizeConstraintSet)
createSizeConstraintSetResponse_sizeConstraintSet :: (Maybe SizeConstraintSet -> f (Maybe SizeConstraintSet))
-> CreateSizeConstraintSetResponse
-> f CreateSizeConstraintSetResponse
createSizeConstraintSetResponse_sizeConstraintSet = (CreateSizeConstraintSetResponse -> Maybe SizeConstraintSet)
-> (CreateSizeConstraintSetResponse
    -> Maybe SizeConstraintSet -> CreateSizeConstraintSetResponse)
-> Lens
     CreateSizeConstraintSetResponse
     CreateSizeConstraintSetResponse
     (Maybe SizeConstraintSet)
     (Maybe SizeConstraintSet)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSizeConstraintSetResponse' {Maybe SizeConstraintSet
sizeConstraintSet :: Maybe SizeConstraintSet
$sel:sizeConstraintSet:CreateSizeConstraintSetResponse' :: CreateSizeConstraintSetResponse -> Maybe SizeConstraintSet
sizeConstraintSet} -> Maybe SizeConstraintSet
sizeConstraintSet) (\s :: CreateSizeConstraintSetResponse
s@CreateSizeConstraintSetResponse' {} Maybe SizeConstraintSet
a -> CreateSizeConstraintSetResponse
s {$sel:sizeConstraintSet:CreateSizeConstraintSetResponse' :: Maybe SizeConstraintSet
sizeConstraintSet = Maybe SizeConstraintSet
a} :: CreateSizeConstraintSetResponse)

-- | The @ChangeToken@ that you used to submit the @CreateSizeConstraintSet@
-- request. You can also use this value to query the status of the request.
-- For more information, see GetChangeTokenStatus.
createSizeConstraintSetResponse_changeToken :: Lens.Lens' CreateSizeConstraintSetResponse (Prelude.Maybe Prelude.Text)
createSizeConstraintSetResponse_changeToken :: (Maybe Text -> f (Maybe Text))
-> CreateSizeConstraintSetResponse
-> f CreateSizeConstraintSetResponse
createSizeConstraintSetResponse_changeToken = (CreateSizeConstraintSetResponse -> Maybe Text)
-> (CreateSizeConstraintSetResponse
    -> Maybe Text -> CreateSizeConstraintSetResponse)
-> Lens
     CreateSizeConstraintSetResponse
     CreateSizeConstraintSetResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateSizeConstraintSetResponse' {Maybe Text
changeToken :: Maybe Text
$sel:changeToken:CreateSizeConstraintSetResponse' :: CreateSizeConstraintSetResponse -> Maybe Text
changeToken} -> Maybe Text
changeToken) (\s :: CreateSizeConstraintSetResponse
s@CreateSizeConstraintSetResponse' {} Maybe Text
a -> CreateSizeConstraintSetResponse
s {$sel:changeToken:CreateSizeConstraintSetResponse' :: Maybe Text
changeToken = Maybe Text
a} :: CreateSizeConstraintSetResponse)

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

instance
  Prelude.NFData
    CreateSizeConstraintSetResponse