{-# 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.IoT.CreateAuditSuppression
-- 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 a Device Defender audit suppression.
--
-- Requires permission to access the
-- <https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions CreateAuditSuppression>
-- action.
module Amazonka.IoT.CreateAuditSuppression
  ( -- * Creating a Request
    CreateAuditSuppression (..),
    newCreateAuditSuppression,

    -- * Request Lenses
    createAuditSuppression_expirationDate,
    createAuditSuppression_suppressIndefinitely,
    createAuditSuppression_description,
    createAuditSuppression_checkName,
    createAuditSuppression_resourceIdentifier,
    createAuditSuppression_clientRequestToken,

    -- * Destructuring the Response
    CreateAuditSuppressionResponse (..),
    newCreateAuditSuppressionResponse,

    -- * Response Lenses
    createAuditSuppressionResponse_httpStatus,
  )
where

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

-- | /See:/ 'newCreateAuditSuppression' smart constructor.
data CreateAuditSuppression = CreateAuditSuppression'
  { -- | The epoch timestamp in seconds at which this suppression expires.
    CreateAuditSuppression -> Maybe POSIX
expirationDate :: Prelude.Maybe Core.POSIX,
    -- | Indicates whether a suppression should exist indefinitely or not.
    CreateAuditSuppression -> Maybe Bool
suppressIndefinitely :: Prelude.Maybe Prelude.Bool,
    -- | The description of the audit suppression.
    CreateAuditSuppression -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    CreateAuditSuppression -> Text
checkName :: Prelude.Text,
    CreateAuditSuppression -> ResourceIdentifier
resourceIdentifier :: ResourceIdentifier,
    -- | Each audit supression must have a unique client request token. If you
    -- try to create a new audit suppression with the same token as one that
    -- already exists, an exception occurs. If you omit this value, Amazon Web
    -- Services SDKs will automatically generate a unique client request.
    CreateAuditSuppression -> Text
clientRequestToken :: Prelude.Text
  }
  deriving (CreateAuditSuppression -> CreateAuditSuppression -> Bool
(CreateAuditSuppression -> CreateAuditSuppression -> Bool)
-> (CreateAuditSuppression -> CreateAuditSuppression -> Bool)
-> Eq CreateAuditSuppression
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateAuditSuppression -> CreateAuditSuppression -> Bool
$c/= :: CreateAuditSuppression -> CreateAuditSuppression -> Bool
== :: CreateAuditSuppression -> CreateAuditSuppression -> Bool
$c== :: CreateAuditSuppression -> CreateAuditSuppression -> Bool
Prelude.Eq, ReadPrec [CreateAuditSuppression]
ReadPrec CreateAuditSuppression
Int -> ReadS CreateAuditSuppression
ReadS [CreateAuditSuppression]
(Int -> ReadS CreateAuditSuppression)
-> ReadS [CreateAuditSuppression]
-> ReadPrec CreateAuditSuppression
-> ReadPrec [CreateAuditSuppression]
-> Read CreateAuditSuppression
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateAuditSuppression]
$creadListPrec :: ReadPrec [CreateAuditSuppression]
readPrec :: ReadPrec CreateAuditSuppression
$creadPrec :: ReadPrec CreateAuditSuppression
readList :: ReadS [CreateAuditSuppression]
$creadList :: ReadS [CreateAuditSuppression]
readsPrec :: Int -> ReadS CreateAuditSuppression
$creadsPrec :: Int -> ReadS CreateAuditSuppression
Prelude.Read, Int -> CreateAuditSuppression -> ShowS
[CreateAuditSuppression] -> ShowS
CreateAuditSuppression -> String
(Int -> CreateAuditSuppression -> ShowS)
-> (CreateAuditSuppression -> String)
-> ([CreateAuditSuppression] -> ShowS)
-> Show CreateAuditSuppression
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateAuditSuppression] -> ShowS
$cshowList :: [CreateAuditSuppression] -> ShowS
show :: CreateAuditSuppression -> String
$cshow :: CreateAuditSuppression -> String
showsPrec :: Int -> CreateAuditSuppression -> ShowS
$cshowsPrec :: Int -> CreateAuditSuppression -> ShowS
Prelude.Show, (forall x. CreateAuditSuppression -> Rep CreateAuditSuppression x)
-> (forall x.
    Rep CreateAuditSuppression x -> CreateAuditSuppression)
-> Generic CreateAuditSuppression
forall x. Rep CreateAuditSuppression x -> CreateAuditSuppression
forall x. CreateAuditSuppression -> Rep CreateAuditSuppression x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateAuditSuppression x -> CreateAuditSuppression
$cfrom :: forall x. CreateAuditSuppression -> Rep CreateAuditSuppression x
Prelude.Generic)

-- |
-- Create a value of 'CreateAuditSuppression' 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:
--
-- 'expirationDate', 'createAuditSuppression_expirationDate' - The epoch timestamp in seconds at which this suppression expires.
--
-- 'suppressIndefinitely', 'createAuditSuppression_suppressIndefinitely' - Indicates whether a suppression should exist indefinitely or not.
--
-- 'description', 'createAuditSuppression_description' - The description of the audit suppression.
--
-- 'checkName', 'createAuditSuppression_checkName' - Undocumented member.
--
-- 'resourceIdentifier', 'createAuditSuppression_resourceIdentifier' - Undocumented member.
--
-- 'clientRequestToken', 'createAuditSuppression_clientRequestToken' - Each audit supression must have a unique client request token. If you
-- try to create a new audit suppression with the same token as one that
-- already exists, an exception occurs. If you omit this value, Amazon Web
-- Services SDKs will automatically generate a unique client request.
newCreateAuditSuppression ::
  -- | 'checkName'
  Prelude.Text ->
  -- | 'resourceIdentifier'
  ResourceIdentifier ->
  -- | 'clientRequestToken'
  Prelude.Text ->
  CreateAuditSuppression
newCreateAuditSuppression :: Text -> ResourceIdentifier -> Text -> CreateAuditSuppression
newCreateAuditSuppression
  Text
pCheckName_
  ResourceIdentifier
pResourceIdentifier_
  Text
pClientRequestToken_ =
    CreateAuditSuppression' :: Maybe POSIX
-> Maybe Bool
-> Maybe Text
-> Text
-> ResourceIdentifier
-> Text
-> CreateAuditSuppression
CreateAuditSuppression'
      { $sel:expirationDate:CreateAuditSuppression' :: Maybe POSIX
expirationDate =
          Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
        $sel:suppressIndefinitely:CreateAuditSuppression' :: Maybe Bool
suppressIndefinitely = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:description:CreateAuditSuppression' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:checkName:CreateAuditSuppression' :: Text
checkName = Text
pCheckName_,
        $sel:resourceIdentifier:CreateAuditSuppression' :: ResourceIdentifier
resourceIdentifier = ResourceIdentifier
pResourceIdentifier_,
        $sel:clientRequestToken:CreateAuditSuppression' :: Text
clientRequestToken = Text
pClientRequestToken_
      }

-- | The epoch timestamp in seconds at which this suppression expires.
createAuditSuppression_expirationDate :: Lens.Lens' CreateAuditSuppression (Prelude.Maybe Prelude.UTCTime)
createAuditSuppression_expirationDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateAuditSuppression -> f CreateAuditSuppression
createAuditSuppression_expirationDate = (CreateAuditSuppression -> Maybe POSIX)
-> (CreateAuditSuppression
    -> Maybe POSIX -> CreateAuditSuppression)
-> Lens
     CreateAuditSuppression
     CreateAuditSuppression
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAuditSuppression' {Maybe POSIX
expirationDate :: Maybe POSIX
$sel:expirationDate:CreateAuditSuppression' :: CreateAuditSuppression -> Maybe POSIX
expirationDate} -> Maybe POSIX
expirationDate) (\s :: CreateAuditSuppression
s@CreateAuditSuppression' {} Maybe POSIX
a -> CreateAuditSuppression
s {$sel:expirationDate:CreateAuditSuppression' :: Maybe POSIX
expirationDate = Maybe POSIX
a} :: CreateAuditSuppression) ((Maybe POSIX -> f (Maybe POSIX))
 -> CreateAuditSuppression -> f CreateAuditSuppression)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateAuditSuppression
-> f CreateAuditSuppression
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | Indicates whether a suppression should exist indefinitely or not.
createAuditSuppression_suppressIndefinitely :: Lens.Lens' CreateAuditSuppression (Prelude.Maybe Prelude.Bool)
createAuditSuppression_suppressIndefinitely :: (Maybe Bool -> f (Maybe Bool))
-> CreateAuditSuppression -> f CreateAuditSuppression
createAuditSuppression_suppressIndefinitely = (CreateAuditSuppression -> Maybe Bool)
-> (CreateAuditSuppression -> Maybe Bool -> CreateAuditSuppression)
-> Lens
     CreateAuditSuppression
     CreateAuditSuppression
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAuditSuppression' {Maybe Bool
suppressIndefinitely :: Maybe Bool
$sel:suppressIndefinitely:CreateAuditSuppression' :: CreateAuditSuppression -> Maybe Bool
suppressIndefinitely} -> Maybe Bool
suppressIndefinitely) (\s :: CreateAuditSuppression
s@CreateAuditSuppression' {} Maybe Bool
a -> CreateAuditSuppression
s {$sel:suppressIndefinitely:CreateAuditSuppression' :: Maybe Bool
suppressIndefinitely = Maybe Bool
a} :: CreateAuditSuppression)

-- | The description of the audit suppression.
createAuditSuppression_description :: Lens.Lens' CreateAuditSuppression (Prelude.Maybe Prelude.Text)
createAuditSuppression_description :: (Maybe Text -> f (Maybe Text))
-> CreateAuditSuppression -> f CreateAuditSuppression
createAuditSuppression_description = (CreateAuditSuppression -> Maybe Text)
-> (CreateAuditSuppression -> Maybe Text -> CreateAuditSuppression)
-> Lens
     CreateAuditSuppression
     CreateAuditSuppression
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAuditSuppression' {Maybe Text
description :: Maybe Text
$sel:description:CreateAuditSuppression' :: CreateAuditSuppression -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateAuditSuppression
s@CreateAuditSuppression' {} Maybe Text
a -> CreateAuditSuppression
s {$sel:description:CreateAuditSuppression' :: Maybe Text
description = Maybe Text
a} :: CreateAuditSuppression)

-- | Undocumented member.
createAuditSuppression_checkName :: Lens.Lens' CreateAuditSuppression Prelude.Text
createAuditSuppression_checkName :: (Text -> f Text)
-> CreateAuditSuppression -> f CreateAuditSuppression
createAuditSuppression_checkName = (CreateAuditSuppression -> Text)
-> (CreateAuditSuppression -> Text -> CreateAuditSuppression)
-> Lens CreateAuditSuppression CreateAuditSuppression Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAuditSuppression' {Text
checkName :: Text
$sel:checkName:CreateAuditSuppression' :: CreateAuditSuppression -> Text
checkName} -> Text
checkName) (\s :: CreateAuditSuppression
s@CreateAuditSuppression' {} Text
a -> CreateAuditSuppression
s {$sel:checkName:CreateAuditSuppression' :: Text
checkName = Text
a} :: CreateAuditSuppression)

-- | Undocumented member.
createAuditSuppression_resourceIdentifier :: Lens.Lens' CreateAuditSuppression ResourceIdentifier
createAuditSuppression_resourceIdentifier :: (ResourceIdentifier -> f ResourceIdentifier)
-> CreateAuditSuppression -> f CreateAuditSuppression
createAuditSuppression_resourceIdentifier = (CreateAuditSuppression -> ResourceIdentifier)
-> (CreateAuditSuppression
    -> ResourceIdentifier -> CreateAuditSuppression)
-> Lens
     CreateAuditSuppression
     CreateAuditSuppression
     ResourceIdentifier
     ResourceIdentifier
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAuditSuppression' {ResourceIdentifier
resourceIdentifier :: ResourceIdentifier
$sel:resourceIdentifier:CreateAuditSuppression' :: CreateAuditSuppression -> ResourceIdentifier
resourceIdentifier} -> ResourceIdentifier
resourceIdentifier) (\s :: CreateAuditSuppression
s@CreateAuditSuppression' {} ResourceIdentifier
a -> CreateAuditSuppression
s {$sel:resourceIdentifier:CreateAuditSuppression' :: ResourceIdentifier
resourceIdentifier = ResourceIdentifier
a} :: CreateAuditSuppression)

-- | Each audit supression must have a unique client request token. If you
-- try to create a new audit suppression with the same token as one that
-- already exists, an exception occurs. If you omit this value, Amazon Web
-- Services SDKs will automatically generate a unique client request.
createAuditSuppression_clientRequestToken :: Lens.Lens' CreateAuditSuppression Prelude.Text
createAuditSuppression_clientRequestToken :: (Text -> f Text)
-> CreateAuditSuppression -> f CreateAuditSuppression
createAuditSuppression_clientRequestToken = (CreateAuditSuppression -> Text)
-> (CreateAuditSuppression -> Text -> CreateAuditSuppression)
-> Lens CreateAuditSuppression CreateAuditSuppression Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAuditSuppression' {Text
clientRequestToken :: Text
$sel:clientRequestToken:CreateAuditSuppression' :: CreateAuditSuppression -> Text
clientRequestToken} -> Text
clientRequestToken) (\s :: CreateAuditSuppression
s@CreateAuditSuppression' {} Text
a -> CreateAuditSuppression
s {$sel:clientRequestToken:CreateAuditSuppression' :: Text
clientRequestToken = Text
a} :: CreateAuditSuppression)

instance Core.AWSRequest CreateAuditSuppression where
  type
    AWSResponse CreateAuditSuppression =
      CreateAuditSuppressionResponse
  request :: CreateAuditSuppression -> Request CreateAuditSuppression
request = Service -> CreateAuditSuppression -> Request CreateAuditSuppression
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateAuditSuppression
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateAuditSuppression)))
response =
    (Int
 -> ResponseHeaders
 -> ()
 -> Either String (AWSResponse CreateAuditSuppression))
-> Logger
-> Service
-> Proxy CreateAuditSuppression
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateAuditSuppression)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
      ( \Int
s ResponseHeaders
h ()
x ->
          Int -> CreateAuditSuppressionResponse
CreateAuditSuppressionResponse'
            (Int -> CreateAuditSuppressionResponse)
-> Either String Int
-> Either String CreateAuditSuppressionResponse
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))
      )

instance Prelude.Hashable CreateAuditSuppression

instance Prelude.NFData CreateAuditSuppression

instance Core.ToHeaders CreateAuditSuppression where
  toHeaders :: CreateAuditSuppression -> ResponseHeaders
toHeaders = ResponseHeaders -> CreateAuditSuppression -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

instance Core.ToJSON CreateAuditSuppression where
  toJSON :: CreateAuditSuppression -> Value
toJSON CreateAuditSuppression' {Maybe Bool
Maybe Text
Maybe POSIX
Text
ResourceIdentifier
clientRequestToken :: Text
resourceIdentifier :: ResourceIdentifier
checkName :: Text
description :: Maybe Text
suppressIndefinitely :: Maybe Bool
expirationDate :: Maybe POSIX
$sel:clientRequestToken:CreateAuditSuppression' :: CreateAuditSuppression -> Text
$sel:resourceIdentifier:CreateAuditSuppression' :: CreateAuditSuppression -> ResourceIdentifier
$sel:checkName:CreateAuditSuppression' :: CreateAuditSuppression -> Text
$sel:description:CreateAuditSuppression' :: CreateAuditSuppression -> Maybe Text
$sel:suppressIndefinitely:CreateAuditSuppression' :: CreateAuditSuppression -> Maybe Bool
$sel:expirationDate:CreateAuditSuppression' :: CreateAuditSuppression -> Maybe POSIX
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"expirationDate" Text -> POSIX -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (POSIX -> Pair) -> Maybe POSIX -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
expirationDate,
            (Text
"suppressIndefinitely" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
suppressIndefinitely,
            (Text
"description" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"checkName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
checkName),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"resourceIdentifier" Text -> ResourceIdentifier -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ResourceIdentifier
resourceIdentifier),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"clientRequestToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
clientRequestToken)
          ]
      )

instance Core.ToPath CreateAuditSuppression where
  toPath :: CreateAuditSuppression -> ByteString
toPath = ByteString -> CreateAuditSuppression -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/audit/suppressions/create"

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

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

-- |
-- Create a value of 'CreateAuditSuppressionResponse' 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', 'createAuditSuppressionResponse_httpStatus' - The response's http status code.
newCreateAuditSuppressionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateAuditSuppressionResponse
newCreateAuditSuppressionResponse :: Int -> CreateAuditSuppressionResponse
newCreateAuditSuppressionResponse Int
pHttpStatus_ =
  CreateAuditSuppressionResponse' :: Int -> CreateAuditSuppressionResponse
CreateAuditSuppressionResponse'
    { $sel:httpStatus:CreateAuditSuppressionResponse' :: Int
httpStatus =
        Int
pHttpStatus_
    }

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

instance
  Prelude.NFData
    CreateAuditSuppressionResponse